|
|
!(function(){var qSe=Object.defineProperty,e2e=Object.defineProperties;var t2e=Object.getOwnPropertyDescriptors;var ez=Object.getOwnPropertySymbols;var n2e=Object.prototype.hasOwnProperty,r2e=Object.prototype.propertyIsEnumerable;var Ux=Math.pow,nO=(ke,ve,k)=>ve in ke?qSe(ke,ve,{enumerable:!0,configurable:!0,writable:!0,value:k}):ke[ve]=k,b0=(ke,ve)=>{for(var k in ve||(ve={}))n2e.call(ve,k)&&nO(ke,k,ve[k]);if(ez)for(var k of ez(ve))r2e.call(ve,k)&&nO(ke,k,ve[k]);return ke},rO=(ke,ve)=>e2e(ke,t2e(ve));var Io=(ke,ve,k)=>nO(ke,typeof ve!="symbol"?ve+"":ve,k);(self.webpackChunk=self.webpackChunk||[]).push([[6979],{18299:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return C}});var M=k(87462),H=k(67294),U={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},Y=U,N=k(74643),I=function(F,P){return H.createElement(N.Z,(0,M.Z)({},F,{ref:P,icon:Y}))},C=H.forwardRef(I)},42922:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return C}});var M=k(87462),H=k(67294),U={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},Y=U,N=k(74643),I=function(F,P){return H.createElement(N.Z,(0,M.Z)({},F,{ref:P,icon:Y}))},C=H.forwardRef(I)},63237:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return C}});var M=k(87462),H=k(67294),U={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},Y=U,N=k(74643),I=function(F,P){return H.createElement(N.Z,(0,M.Z)({},F,{ref:P,icon:Y}))},C=H.forwardRef(I)},99569:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return C}});var M=k(87462),H=k(67294),U={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},Y=U,N=k(74643),I=function(F,P){return H.createElement(N.Z,(0,M.Z)({},F,{ref:P,icon:Y}))},C=H.forwardRef(I)},17663:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return C}});var M=k(87462),H=k(67294),U={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},Y=U,N=k(74643),I=function(F,P){return H.createElement(N.Z,(0,M.Z)({},F,{ref:P,icon:Y}))},C=H.forwardRef(I)},72395:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return C}});var M=k(87462),H=k(67294),U={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},Y=U,N=k(74643),I=function(F,P){return H.createElement(N.Z,(0,M.Z)({},F,{ref:P,icon:Y}))},C=H.forwardRef(I)},73686:function(ke,ve,k){"use strict";k.d(ve,{ni:function(){return Xi},EF:function(){return ic}});var M=function(Q,ae){var _e=Q.nodes,Re=Q.edges,Ge=[],Xe={};if(!_e)throw new Error("invalid nodes data!");return _e&&_e.forEach(function(yt,kt){Xe[yt.id]=kt;var Tt=[];Ge.push(Tt)}),Re&&Re.forEach(function(yt){var kt=yt.source,Tt=yt.target,It=Xe[kt],Dt=Xe[Tt];!It&&It!==0||!Dt&&Dt!==0||(Ge[It][Dt]=1,ae||(Ge[Dt][It]=1))}),Ge},H=M,U=function(Q,ae){return Q===ae},Y=function(){function de(Q,ae){ae===void 0&&(ae=null),this.value=Q,this.next=ae}return de.prototype.toString=function(Q){return Q?Q(this.value):"".concat(this.value)},de}(),N=function(){function de(Q){Q===void 0&&(Q=U),this.head=null,this.tail=null,this.compare=Q}return de.prototype.prepend=function(Q){var ae=new Y(Q,this.head);return this.head=ae,this.tail||(this.tail=ae),this},de.prototype.append=function(Q){var ae=new Y(Q);return this.head?(this.tail.next=ae,this.tail=ae,this):(this.head=ae,this.tail=ae,this)},de.prototype.delete=function(Q){if(!this.head)return null;for(var ae=null;this.head&&this.compare(this.head.value,Q);)ae=this.head,this.head=this.head.next;var _e=this.head;if(_e!==null)for(;_e.next;)this.compare(_e.next.value,Q)?(ae=_e.next,_e.next=_e.next.next):_e=_e.next;return this.compare(this.tail.value,Q)&&(this.tail=_e),ae},de.prototype.find=function(Q){var ae=Q.value,_e=ae===void 0?void 0:ae,Re=Q.callback,Ge=Re===void 0?void 0:Re;if(!this.head)return null;for(var Xe=this.head;Xe;){if(Ge&&Ge(Xe.value)||_e!==void 0&&this.compare(Xe.value,_e))return Xe;Xe=Xe.next}return null},de.prototype.deleteTail=function(){var Q=this.tail;if(this.head===this.tail)return this.head=null,this.tail=null,Q;for(var ae=this.head;ae.next;)ae.next.next?ae=ae.next:ae.next=null;return this.tail=ae,Q},de.prototype.deleteHead=function(){if(!this.head)return null;var Q=this.head;return this.head.next?this.head=this.head.next:(this.head=null,this.tail=null),Q},de.prototype.fromArray=function(Q){var ae=this;return Q.forEach(function(_e){return ae.append(_e)}),this},de.prototype.toArray=function(){for(var Q=[],ae=this.head;ae;)Q.push(ae),ae=ae.next;return Q},de.prototype.reverse=function(){for(var Q=this.head,ae=null,_e=null;Q;)_e=Q.next,Q.next=ae,ae=Q,Q=_e;this.tail=this.head,this.head=ae},de.prototype.toString=function(Q){return Q===void 0&&(Q=void 0),this.toArray().map(function(ae){return ae.toString(Q)}).toString()},de}(),I=N,C=function(){function de(){this.linkedList=new I}return de.prototype.isEmpty=function(){return!this.linkedList.head},de.prototype.peek=function(){return this.linkedList.head?this.linkedList.head.value:null},de.prototype.enqueue=function(Q){this.linkedList.append(Q)},de.prototype.dequeue=function(){var Q=this.linkedList.deleteHead();return Q?Q.value:null},de.prototype.toString=function(Q){return this.linkedList.toString(Q)},de}(),A=C,F=function(Q,ae,_e){ae===void 0&&(ae=[]);var Re=ae.filter(function(kt){return kt.source===Q||kt.target===Q});if(_e==="target"){var Ge=function(Tt){return Tt.source===Q};return Re.filter(Ge).map(function(kt){return kt.target})}if(_e==="source"){var Xe=function(Tt){return Tt.target===Q};return Re.filter(Xe).map(function(kt){return kt.source})}var yt=function(Tt){return Tt.source===Q?Tt.target:Tt.source};return Re.map(yt)},P=function(Q,ae){return ae.filter(function(_e){return _e.source===Q})},W=function(Q,ae){return ae.filter(function(_e){return _e.source===Q||_e.target===Q})},K=function(Q){Q===void 0&&(Q=0);var ae="".concat(Math.random()).split(".")[1].substr(0,5),_e="".concat(Math.random()).split(".")[1].substr(0,5);return"".concat(Q,"-").concat(ae).concat(_e)};function ge(de){de===void 0&&(de={});var Q=de,ae=function(){},_e=function(){var Re={};return function(Ge){var Xe=Ge.next,yt=Xe;return Re[yt]?!1:(Re[yt]=!0,!0)}}();return Q.allowTraversal=de.allowTraversal||_e,Q.enter=de.enter||ae,Q.leave=de.leave||ae,Q}var be=function(Q,ae,_e,Re){Re===void 0&&(Re=!0);var Ge=ge(_e),Xe=new A,yt=Q.edges,kt=yt===void 0?[]:yt;Xe.enqueue(ae);for(var Tt="",It=function(){var Yt=Xe.dequeue();Ge.enter({current:Yt,previous:Tt}),F(Yt,kt,Re?"target":void 0).forEach(function(Vt){Ge.allowTraversal({previous:Tt,current:Yt,next:Vt})&&Xe.enqueue(Vt)}),Ge.leave({current:Yt,previous:Tt}),Tt=Yt};!Xe.isEmpty();)It()},Ue=be,Ne=function(Q){for(var ae=Q.nodes,_e=ae===void 0?[]:ae,Re=Q.edges,Ge=Re===void 0?[]:Re,Xe=[],yt={},kt=[],Tt=function Vt(jt){kt.push(jt),yt[jt.id]=!0;for(var Zt=F(jt.id,Ge),Kt=function(wn){var ir=Zt[wn];if(!yt[ir]){var pr=_e.filter(function(_r){return _r.id===ir});pr.length>0&&Vt(pr[0])}},hn=0;hn<Zt.length;++hn)Kt(hn)},It=0;It<_e.length;It++){var Dt=_e[It];if(!yt[Dt.id]){Tt(Dt);for(var Yt=[];kt.length>0;)Yt.push(kt.pop());Xe.push(Yt)}}return Xe},ye=function(Q){for(var ae=Q.nodes,_e=ae===void 0?[]:ae,Re=Q.edges,Ge=Re===void 0?[]:Re,Xe=[],yt={},kt={},Tt={},It=[],Dt=0,Yt=function Kt(hn){kt[hn.id]=Dt,Tt[hn.id]=Dt,Dt+=1,Xe.push(hn),yt[hn.id]=!0;for(var xn=F(hn.id,Ge,"target").filter(function(si){return _e.map(function(Ur){return Ur.id}).indexOf(si)>-1}),wn=function(Ur){var qr=xn[Ur];if(!kt[qr]&&kt[qr]!==0){var Hi=_e.filter(function(Ri){return Ri.id===qr});Hi.length>0&&Kt(Hi[0]),Tt[hn.id]=Math.min(Tt[hn.id],Tt[qr])}else yt[qr]&&(Tt[hn.id]=Math.min(Tt[hn.id],kt[qr]))},ir=0;ir<xn.length;ir++)wn(ir);if(Tt[hn.id]===kt[hn.id]){for(var pr=[];Xe.length>0;){var _r=Xe.pop();if(yt[_r.id]=!1,pr.push(_r),_r===hn)break}pr.length>0&&It.push(pr)}},Vt=0,jt=_e;Vt<jt.length;Vt++){var Zt=jt[Vt];!kt[Zt.id]&&kt[Zt.id]!==0&&Yt(Zt)}return It};function De(de,Q){return Q?ye(de):Ne(de)}var Ce=function(Q){var ae={},_e=Q.nodes,Re=_e===void 0?[]:_e,Ge=Q.edges,Xe=Ge===void 0?[]:Ge;return Re.forEach(function(yt){ae[yt.id]={degree:0,inDegree:0,outDegree:0}}),Xe.forEach(function(yt){ae[yt.source].degree++,ae[yt.source].outDegree++,ae[yt.target].degree++,ae[yt.target].inDegree++}),ae},Me=Ce,Oe=function(Q,ae){var _e=Ce(Q);return _e[ae]?Ce(Q)[ae].inDegree:0},re=function(Q,ae){var _e=Ce(Q);return _e[ae]?Ce(Q)[ae].outDegree:0};function q(de){de===void 0&&(de={});var Q=de,ae=function(){},_e=function(){var Re={};return function(Ge){var Xe=Ge.next;return Re[Xe]?!1:(Re[Xe]=!0,!0)}}();return Q.allowTraversal=de.allowTraversal||_e,Q.enter=de.enter||ae,Q.leave=de.leave||ae,Q}function ce(de,Q,ae,_e,Re){Re===void 0&&(Re=!0),_e.enter({current:Q,previous:ae});var Ge=de.edges,Xe=Ge===void 0?[]:Ge;F(Q,Xe,Re?"target":void 0).forEach(function(yt){_e.allowTraversal({previous:ae,current:Q,next:yt})&&ce(de,yt,Q,_e,Re)}),_e.leave({current:Q,previous:ae})}function Ee(de,Q,ae,_e){_e===void 0&&(_e=!0),ce(de,Q,"",q(ae),_e)}var Te=function(Q){var ae=null,_e=Q.nodes,Re=_e===void 0?[]:_e,Ge={},Xe={},yt={},kt={};Re.forEach(function(Dt){Xe[Dt.id]=Dt});for(var Tt={enter:function(Yt){var Vt=Yt.current,jt=Yt.previous;if(yt[Vt]){ae={};for(var Zt=Vt,Kt=jt;Kt!==Vt;)ae[Zt]=Kt,Zt=Kt,Kt=Ge[Kt];ae[Zt]=Kt}else yt[Vt]=Vt,delete Xe[Vt],Ge[Vt]=jt},leave:function(Yt){var Vt=Yt.current;kt[Vt]=Vt,delete yt[Vt]},allowTraversal:function(Yt){var Vt=Yt.next;return ae?!1:!kt[Vt]}};Object.keys(Xe).length;){var It=Object.keys(Xe)[0];Ee(Q,It,Tt)}return ae},Je=function(Q,ae,_e){var Re,Ge;_e===void 0&&(_e=!0);for(var Xe=[],yt=De(Q,!1),kt=0,Tt=yt;kt<Tt.length;kt++){var It=Tt[kt];if(It.length)for(var Dt=It[0],Yt=Dt.id,Vt=[Dt],jt=(Re={},Re[Yt]=Dt,Re),Zt=(Ge={},Ge[Yt]=new Set,Ge);Vt.length>0;)for(var Kt=Vt.pop(),hn=Kt.id,xn=F(hn,Q.edges),wn=function(_r){var si,Ur=xn[_r],qr=Q.nodes.find(function(da){return da.id===Ur});if(Ur===hn)Xe.push((si={},si[Ur]=Kt,si));else if(!(Ur in Zt))jt[Ur]=Kt,Vt.push(qr),Zt[Ur]=new Set([Kt]);else if(!Zt[hn].has(qr)){for(var Hi=!0,Ri=[qr,Kt],ci=jt[hn];Zt[Ur].size&&!Zt[Ur].has(ci)&&(Ri.push(ci),ci!==jt[ci.id]);)ci=jt[ci.id];if(Ri.push(ci),ae&&_e?(Hi=!1,Ri.findIndex(function(da){return ae.indexOf(da.id)>-1})>-1&&(Hi=!0)):ae&&!_e&&Ri.findIndex(function(da){return ae.indexOf(da.id)>-1})>-1&&(Hi=!1),Hi){for(var Xa={},va=1;va<Ri.length;va+=1)Xa[Ri[va-1].id]=Ri[va];Ri.length&&(Xa[Ri[Ri.length-1].id]=Ri[0]),Xe.push(Xa)}Zt[Ur].add(Kt)}},ir=0;ir<xn.length;ir+=1)wn(ir)}return Xe},He=function(Q,ae,_e){_e===void 0&&(_e=!0);for(var Re=[],Ge=new Set,Xe=[],yt=[],kt={},Tt={},It=function(ci){for(var Xa=[ci];Xa.length>0;){var va=Xa.pop();Ge.has(va)&&(Ge.delete(va),Xe[va.id].forEach(function(da){Xa.push(da)}),Xe[va.id].clear())}},Dt=function Ri(ci,Xa,va){var da=!1;if(ae&&_e===!1&&ae.indexOf(ci.id)>-1)return da;Re.push(ci),Ge.add(ci);for(var Ua=va[ci.id],ja=0;ja<Ua.length;ja+=1){var La=kt[Ua[ja]];if(La===Xa){for(var hr={},Qr=1;Qr<Re.length;Qr+=1)hr[Re[Qr-1].id]=Re[Qr];Re.length&&(hr[Re[Re.length-1].id]=Re[0]),yt.push(hr),da=!0}else Ge.has(La)||Ri(La,Xa,va)&&(da=!0)}if(da)It(ci);else for(var ja=0;ja<Ua.length;ja+=1){var La=kt[Ua[ja]];Xe[La.id].has(ci)||Xe[La.id].add(ci)}return Re.pop(),da},Yt=Q.nodes,Vt=Yt===void 0?[]:Yt,jt=0;jt<Vt.length;jt+=1){var Zt=Vt[jt],Kt=Zt.id;Tt[Kt]=jt,kt[jt]=Zt}if(ae&&_e)for(var hn=function(ci){var Xa=ae[ci];Tt[Vt[ci].id]=Tt[Xa],Tt[Xa]=0,kt[0]=Vt.find(function(va){return va.id===Xa}),kt[Tt[Vt[ci].id]]=Vt[ci]},jt=0;jt<ae.length;jt++)hn(jt);for(var xn=function(ci){for(var Xa,va,da=1/0,Ua=0;Ua<ci.length;Ua+=1)for(var ja=ci[Ua],La=0;La<ja.length;La++){var hr=Tt[ja[La].id];hr<da&&(da=hr,va=Ua)}for(var Qr=ci[va],Ei=[],Ua=0;Ua<Qr.length;Ua+=1){var ji=Qr[Ua];Ei[ji.id]=[];for(var Ai=0,go=F(ji.id,Q.edges,"target").filter(function(Ku){return Qr.map(function(Ou){return Ou.id}).indexOf(Ku)>-1});Ai<go.length;Ai++){var _o=go[Ai];_o===ji.id&&!(_e===!1&&ae.indexOf(ji.id)>-1)?yt.push((Xa={},Xa[ji.id]=ji,Xa)):Ei[ji.id].push(Tt[_o])}}return{component:Qr,adjList:Ei,minIdx:da}},wn=0;wn<Vt.length;){var ir=Vt.filter(function(Ri){return Tt[Ri.id]>=wn}),pr=ye({nodes:ir,edges:Q.edges}).filter(function(Ri){return Ri.length>1});if(pr.length===0)break;var _r=xn(pr),si=_r.minIdx,Ur=_r.adjList,qr=_r.component;if(qr.length>1){qr.forEach(function(Ri){Xe[Ri.id]=new Set});var Hi=kt[si];if(ae&&_e&&ae.indexOf(Hi.id)===-1)return yt;Dt(Hi,Hi,Ur),wn=si+1}else break}return yt},rt=function(Q,ae,_e,Re){return Re===void 0&&(Re=!0),ae?He(Q,_e,Re):Je(Q,_e,Re)},Et=Te,lt=function(de,Q){return lt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ae,_e){ae.__proto__=_e}||function(ae,_e){for(var Re in _e)Object.prototype.hasOwnProperty.call(_e,Re)&&(ae[Re]=_e[Re])},lt(de,Q)};function st(de,Q){if(typeof Q!="function"&&Q!==null)throw new TypeError("Class extends value "+String(Q)+" is not a constructor or null");lt(de,Q);function ae(){this.constructor=de}de.prototype=Q===null?Object.create(Q):(ae.prototype=Q.prototype,new ae)}var mt=function(){return mt=Object.assign||function(Q){for(var ae,_e=1,Re=arguments.length;_e<Re;_e++){ae=arguments[_e];for(var Ge in ae)Object.prototype.hasOwnProperty.call(ae,Ge)&&(Q[Ge]=ae[Ge])}return Q},mt.apply(this,arguments)};function fe(de,Q){var ae={};for(var _e in de)Object.prototype.hasOwnProperty.call(de,_e)&&Q.indexOf(_e)<0&&(ae[_e]=de[_e]);if(de!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Re=0,_e=Object.getOwnPropertySymbols(de);Re<_e.length;Re++)Q.indexOf(_e[Re])<0&&Object.prototype.propertyIsEnumerable.call(de,_e[Re])&&(ae[_e[Re]]=de[_e[Re]]);return ae}function We(de,Q,ae,_e){var Re=arguments.length,Ge=Re<3?Q:_e===null?_e=Object.getOwnPropertyDescriptor(Q,ae):_e,Xe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ge=Reflect.decorate(de,Q,ae,_e);else for(var yt=de.length-1;yt>=0;yt--)(Xe=de[yt])&&(Ge=(Re<3?Xe(Ge):Re>3?Xe(Q,ae,Ge):Xe(Q,ae))||Ge);return Re>3&&Ge&&Object.defineProperty(Q,ae,Ge),Ge}function ht(de,Q){return function(ae,_e){Q(ae,_e,de)}}function Pt(de,Q,ae,_e,Re,Ge){function Xe(hn){if(hn!==void 0&&typeof hn!="function")throw new TypeError("Function expected");return hn}for(var yt=_e.kind,kt=yt==="getter"?"get":yt==="setter"?"set":"value",Tt=!Q&&de?_e.static?de:de.prototype:null,It=Q||(Tt?Object.getOwnPropertyDescriptor(Tt,_e.name):{}),Dt,Yt=!1,Vt=ae.length-1;Vt>=0;Vt--){var jt={};for(var Zt in _e)jt[Zt]=Zt==="access"?{}:_e[Zt];for(var Zt in _e.access)jt.access[Zt]=_e.access[Zt];jt.addInitializer=function(hn){if(Yt)throw new TypeError("Cannot add initializers after decoration has completed");Ge.push(Xe(hn||null))};var Kt=(0,ae[Vt])(yt==="accessor"?{get:It.get,set:It.set}:It[kt],jt);if(yt==="accessor"){if(Kt===void 0)continue;if(Kt===null||typeof Kt!="object")throw new TypeError("Object expected");(Dt=Xe(Kt.get))&&(It.get=Dt),(Dt=Xe(Kt.set))&&(It.set=Dt),(Dt=Xe(Kt.init))&&Re.push(Dt)}else(Dt=Xe(Kt))&&(yt==="field"?Re.push(Dt):It[kt]=Dt)}Tt&&Object.defineProperty(Tt,_e.name,It),Yt=!0}function Ve(de,Q,ae){for(var _e=arguments.length>2,Re=0;Re<Q.length;Re++)ae=_e?Q[Re].call(de,ae):Q[Re].call(de);return _e?ae:void 0}function it(de){return typeof de=="symbol"?de:"".concat(de)}function ft(de,Q,ae){return typeof Q=="symbol"&&(Q=Q.description?"[".concat(Q.description,"]"):""),Object.defineProperty(de,"name",{configurable:!0,value:ae?"".concat(ae," ",Q):Q})}function ze(de,Q){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(de,Q)}function Qe(de,Q,ae,_e){function Re(Ge){return Ge instanceof ae?Ge:new ae(function(Xe){Xe(Ge)})}return new(ae||(ae=Promise))(function(Ge,Xe){function yt(It){try{Tt(_e.next(It))}catch(Dt){Xe(Dt)}}function kt(It){try{Tt(_e.throw(It))}catch(Dt){Xe(Dt)}}function Tt(It){It.done?Ge(It.value):Re(It.value).then(yt,kt)}Tt((_e=_e.apply(de,Q||[])).next())})}function Se(de,Q){var ae={label:0,sent:function(){if(Ge[0]&1)throw Ge[1];return Ge[1]},trys:[],ops:[]},_e,Re,Ge,Xe;return Xe={next:yt(0),throw:yt(1),return:yt(2)},typeof Symbol=="function"&&(Xe[Symbol.iterator]=function(){return this}),Xe;function yt(Tt){return function(It){return kt([Tt,It])}}function kt(Tt){if(_e)throw new TypeError("Generator is already executing.");for(;Xe&&(Xe=0,Tt[0]&&(ae=0)),ae;)try{if(_e=1,Re&&(Ge=Tt[0]&2?Re.return:Tt[0]?Re.throw||((Ge=Re.return)&&Ge.call(Re),0):Re.next)&&!(Ge=Ge.call(Re,Tt[1])).done)return Ge;switch(Re=0,Ge&&(Tt=[Tt[0]&2,Ge.value]),Tt[0]){case 0:case 1:Ge=Tt;break;case 4:return ae.label++,{value:Tt[1],done:!1};case 5:ae.label++,Re=Tt[1],Tt=[0];continue;case 7:Tt=ae.ops.pop(),ae.trys.pop();continue;default:if(Ge=ae.trys,!(Ge=Ge.length>0&&Ge[Ge.length-1])&&(Tt[0]===6||Tt[0]===2)){ae=0;continue}if(Tt[0]===3&&(!Ge||Tt[1]>Ge[0]&&Tt[1]<Ge[3])){ae.label=Tt[1];break}if(Tt[0]===6&&ae.label<Ge[1]){ae.label=Ge[1],Ge=Tt;break}if(Ge&&ae.label<Ge[2]){ae.label=Ge[2],ae.ops.push(Tt);break}Ge[2]&&ae.ops.pop(),ae.trys.pop();continue}Tt=Q.call(de,ae)}catch(It){Tt=[6,It],Re=0}finally{_e=Ge=0}if(Tt[0]&5)throw Tt[1];return{value:Tt[0]?Tt[1]:void 0,done:!0}}}var E=Object.create?function(de,Q,ae,_e){_e===void 0&&(_e=ae);var Re=Object.getOwnPropertyDescriptor(Q,ae);(!Re||("get"in Re?!Q.__esModule:Re.writable||Re.configurable))&&(Re={enumerable:!0,get:function(){return Q[ae]}}),Object.defineProperty(de,_e,Re)}:function(de,Q,ae,_e){_e===void 0&&(_e=ae),de[_e]=Q[ae]};function me(de,Q){for(var ae in de)ae!=="default"&&!Object.prototype.hasOwnProperty.call(Q,ae)&&E(Q,de,ae)}function L(de){var Q=typeof Symbol=="function"&&Symbol.iterator,ae=Q&&de[Q],_e=0;if(ae)return ae.call(de);if(de&&typeof de.length=="number")return{next:function(){return de&&_e>=de.length&&(de=void 0),{value:de&&de[_e++],done:!de}}};throw new TypeError(Q?"Object is not iterable.":"Symbol.iterator is not defined.")}function X(de,Q){var ae=typeof Symbol=="function"&&de[Symbol.iterator];if(!ae)return de;var _e=ae.call(de),Re,Ge=[],Xe;try{for(;(Q===void 0||Q-- >0)&&!(Re=_e.next()).done;)Ge.push(Re.value)}catch(yt){Xe={error:yt}}finally{try{Re&&!Re.done&&(ae=_e.return)&&ae.call(_e)}finally{if(Xe)throw Xe.error}}return Ge}function Ke(){for(var de=[],Q=0;Q<arguments.length;Q++)de=de.concat(X(arguments[Q]));return de}function ot(){for(var de=0,Q=0,ae=arguments.length;Q<ae;Q++)de+=arguments[Q].length;for(var _e=Array(de),Re=0,Q=0;Q<ae;Q++)for(var Ge=arguments[Q],Xe=0,yt=Ge.length;Xe<yt;Xe++,Re++)_e[Re]=Ge[Xe];return _e}function pe(de,Q,ae){if(ae||arguments.length===2)for(var _e=0,Re=Q.length,Ge;_e<Re;_e++)(Ge||!(_e in Q))&&(Ge||(Ge=Array.prototype.slice.call(Q,0,_e)),Ge[_e]=Q[_e]);return de.concat(Ge||Array.prototype.slice.call(Q))}function xe(de){return this instanceof xe?(this.v=de,this):new xe(de)}function Ze(de,Q,ae){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var _e=ae.apply(de,Q||[]),Re,Ge=[];return Re={},Xe("next"),Xe("throw"),Xe("return"),Re[Symbol.asyncIterator]=function(){return this},Re;function Xe(Yt){_e[Yt]&&(Re[Yt]=function(Vt){return new Promise(function(jt,Zt){Ge.push([Yt,Vt,jt,Zt])>1||yt(Yt,Vt)})})}function yt(Yt,Vt){try{kt(_e[Yt](Vt))}catch(jt){Dt(Ge[0][3],jt)}}function kt(Yt){Yt.value instanceof xe?Promise.resolve(Yt.value.v).then(Tt,It):Dt(Ge[0][2],Yt)}function Tt(Yt){yt("next",Yt)}function It(Yt){yt("throw",Yt)}function Dt(Yt,Vt){Yt(Vt),Ge.shift(),Ge.length&&yt(Ge[0][0],Ge[0][1])}}function O(de){var Q,ae;return Q={},_e("next"),_e("throw",function(Re){throw Re}),_e("return"),Q[Symbol.iterator]=function(){return this},Q;function _e(Re,Ge){Q[Re]=de[Re]?function(Xe){return(ae=!ae)?{value:xe(de[Re](Xe)),done:!1}:Ge?Ge(Xe):Xe}:Ge}}function ne(de){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var Q=de[Symbol.asyncIterator],ae;return Q?Q.call(de):(de=typeof L=="function"?L(de):de[Symbol.iterator](),ae={},_e("next"),_e("throw"),_e("return"),ae[Symbol.asyncIterator]=function(){return this},ae);function _e(Ge){ae[Ge]=de[Ge]&&function(Xe){return new Promise(function(yt,kt){Xe=de[Ge](Xe),Re(yt,kt,Xe.done,Xe.value)})}}function Re(Ge,Xe,yt,kt){Promise.resolve(kt).then(function(Tt){Ge({value:Tt,done:yt})},Xe)}}function qe(de,Q){return Object.defineProperty?Object.defineProperty(de,"raw",{value:Q}):de.raw=Q,de}var dt=Object.create?function(de,Q){Object.defineProperty(de,"default",{enumerable:!0,value:Q})}:function(de,Q){de.default=Q};function nt(de){if(de&&de.__esModule)return de;var Q={};if(de!=null)for(var ae in de)ae!=="default"&&Object.prototype.hasOwnProperty.call(de,ae)&&E(Q,de,ae);return dt(Q,de),Q}function xt(de){return de&&de.__esModule?de:{default:de}}function bt(de,Q,ae,_e){if(ae==="a"&&!_e)throw new TypeError("Private accessor was defined without a getter");if(typeof Q=="function"?de!==Q||!_e:!Q.has(de))throw new TypeError("Cannot read private member from an object whose class did not declare it");return ae==="m"?_e:ae==="a"?_e.call(de):_e?_e.value:Q.get(de)}function wt(de,Q,ae,_e,Re){if(_e==="m")throw new TypeError("Private method is not writable");if(_e==="a"&&!Re)throw new TypeError("Private accessor was defined without a setter");if(typeof Q=="function"?de!==Q||!Re:!Q.has(de))throw new TypeError("Cannot write private member to an object whose class did not declare it");return _e==="a"?Re.call(de,ae):Re?Re.value=ae:Q.set(de,ae),ae}function we(de,Q){if(Q===null||typeof Q!="object"&&typeof Q!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof de=="function"?Q===de:de.has(Q)}var oe={}.toString,Fe=function(de,Q){return oe.call(de)==="[object "+Q+"]"},Ye=Fe,ie=function(de){return Ye(de,"Function")},Ie=function(de){return Array.isArray?Array.isArray(de):Ye(de,"Array")},je=function(de){var Q=typeof de;return de!==null&&Q==="object"||Q==="function"};function Be(de,Q){if(de){var ae;if(Ie(de))for(var _e=0,Re=de.length;_e<Re&&(ae=Q(de[_e],_e),ae!==!1);_e++);else if(je(de)){for(var Ge in de)if(de.hasOwnProperty(Ge)&&(ae=Q(de[Ge],Ge),ae===!1))break}}}var et=Be,gt=Object.keys?function(de){return Object.keys(de)}:function(de){var Q=[];return et(de,function(ae,_e){ie(de)&&_e==="prototype"||Q.push(_e)}),Q},Mt=null;function Rt(de,Q){var ae=keys(Q),_e=ae.length;if(isNil(de))return!_e;for(var Re=0;Re<_e;Re+=1){var Ge=ae[Re];if(Q[Ge]!==de[Ge]||!(Ge in de))return!1}return!0}var Ft=null,Xt=function(de){if(!isObjectLike(de)||!isType(de,"Object"))return!1;if(Object.getPrototypeOf(de)===null)return!0;for(var Q=de;Object.getPrototypeOf(Q)!==null;)Q=Object.getPrototypeOf(Q);return Object.getPrototypeOf(de)===Q},Qt=null;function an(de,Q){if(!isArray(de))return null;var ae;if(isFunction(Q)&&(ae=Q),isPlainObject(Q)&&(ae=function(Re){return isMatch(Re,Q)}),ae){for(var _e=0;_e<de.length;_e+=1)if(ae(de[_e]))return de[_e]}return null}var In=null,Xr=function(de,Q){for(var ae=null,_e=0;_e<de.length;_e++){var Re=de[_e],Ge=Re[Q];if(!isNil(Ge)){isArray(Ge)?ae=Ge[0]:ae=Ge;break}}return ae},Cn=null,or=function(de){if(!isArray(de))return[];for(var Q=[],ae=0;ae<de.length;ae++)Q=Q.concat(de[ae]);return Q},ei=null,mr=function(de,Q){if(Q===void 0&&(Q=[]),!isArray(de))Q.push(de);else for(var ae=0;ae<de.length;ae+=1)mr(de[ae],Q);return Q},Fr=null,ta=function(de){if(isArray(de))return de.reduce(function(Q,ae){return Math.max(Q,ae)},de[0])},Qa=function(de){if(isArray(de))return de.reduce(function(Q,ae){return Math.min(Q,ae)},de[0])},Bt=function(de){var Q=de.filter(function(Xe){return!isNaN(Xe)});if(!Q.length)return{min:0,max:0};if(isArray(de[0])){for(var ae=[],_e=0;_e<de.length;_e++)ae=ae.concat(de[_e]);Q=ae}var Re=getMax(Q),Ge=getMin(Q);return{min:Ge,max:Re}},en=null,Jt=Array.prototype,nn=Jt.splice,sr=Jt.indexOf,Pn=function(de){for(var Q=[],ae=1;ae<arguments.length;ae++)Q[ae-1]=arguments[ae];for(var _e=0;_e<Q.length;_e++)for(var Re=Q[_e],Ge=-1;(Ge=sr.call(de,Re))>-1;)nn.call(de,Ge,1);return de},Fn=null,zr=Array.prototype.splice,$r=function(Q,ae){if(!isArrayLike(Q))return[];for(var _e=Q?ae.length:0,Re=_e-1;_e--;){var Ge=void 0,Xe=ae[_e];(_e===Re||Xe!==Ge)&&(Ge=Xe,zr.call(Q,Xe,1))}return Q},Ae=null,$=function(de,Q,ae){if(!isArray(de)&&!isPlainObject(de))return de;var _e=ae;return each(de,function(Re,Ge){_e=Q(_e,Re,Ge)}),_e},z=null,S=function(de,Q){var ae=[];if(!isArrayLike(de))return ae;for(var _e=-1,Re=[],Ge=de.length;++_e<Ge;){var Xe=de[_e];Q(Xe,_e,de)&&(ae.push(Xe),Re.push(_e))}return pullAt(de,Re),ae},D=null,J=function(de){return Ye(de,"String")};function Le(de,Q){var ae;if(isFunction(Q))ae=function(Re,Ge){return Q(Re)-Q(Ge)};else{var _e=[];isString(Q)?_e.push(Q):isArray(Q)&&(_e=Q),ae=function(Re,Ge){for(var Xe=0;Xe<_e.length;Xe+=1){var yt=_e[Xe];if(Re[yt]>Ge[yt])return 1;if(Re[yt]<Ge[yt])return-1}return 0}}return de.sort(ae),de}var $e=null;function tt(de,Q){Q===void 0&&(Q=new Map);var ae=[];if(Array.isArray(de))for(var _e=0,Re=de.length;_e<Re;_e++){var Ge=de[_e];Q.has(Ge)||(ae.push(Ge),Q.set(Ge,!0))}return ae}var at=function(de,Q){for(var ae=[],_e={},Re=0;Re<de.length;Re++){var Ge=de[Re],Xe=Ge[Q];if(!isNil(Xe)){isArray(Xe)||(Xe=[Xe]);for(var yt=0;yt<Xe.length;yt++){var kt=Xe[yt];_e[kt]||(ae.push(kt),_e[kt]=!0)}}}return ae};function Ct(de,Q){return isArray(de)||isString(de)?de[0]===Q:!1}var pt=null;function $t(de,Q){return isArray(de)||isString(de)?de[de.length-1]===Q:!1}var Nt=null,Ot=Object.prototype.hasOwnProperty;function Wt(de,Q){if(!Q||!isArray(de))return{};for(var ae={},_e=isFunction(Q)?Q:function(yt){return yt[Q]},Re,Ge=0;Ge<de.length;Ge++){var Xe=de[Ge];Re=_e(Xe),Ot.call(ae,Re)?ae[Re].push(Xe):ae[Re]=[Xe]}return ae}var dn=null;function St(de,Q){if(!Q)return{0:de};if(!isFunction(Q)){var ae=isArray(Q)?Q:Q.replace(/\s+/g,"").split("*");Q=function(_e){for(var Re="_",Ge=0,Xe=ae.length;Ge<Xe;Ge++)Re+=_e[ae[Ge]]&&_e[ae[Ge]].toString();return Re}}return groupBy(de,Q)}var zt=function(de,Q){if(!Q)return[de];var ae=groupToMap(de,Q),_e=[];for(var Re in ae)_e.push(ae[Re]);return _e},pn={};function Mn(de){var Q=pn[de];if(!Q){for(var ae=de.toString(16),_e=ae.length;_e<6;_e++)ae="0"+ae;Q="#"+ae,pn[de]=Q}return Q}var En=null;function ti(de){var Q=0,ae=0,_e=0,Re=0;return isArray(de)?de.length===1?Q=ae=_e=Re=de[0]:de.length===2?(Q=_e=de[0],ae=Re=de[1]):de.length===3?(Q=de[0],ae=Re=de[1],_e=de[2]):(Q=de[0],ae=de[1],_e=de[2],Re=de[3]):Q=ae=_e=Re=de,{r1:Q,r2:ae,r3:_e,r4:Re}}var bn=null,Nn=function(de){return Ye(de,"Number")},Lr=Nn,At=function(de){return isNumber(de)&&de%1!==0},qt=null,yn=function(de){return isNumber(de)&&de%2===0},ln=null,wi=Number.isInteger?Number.isInteger:function(de){return Lr(de)&&de%1===0},Ci=null,fi=function(de){return isNumber(de)&&de<0},ai=null,Si=function(de){return isNumber(de)&&de%2!==0},za=null,sa=function(de){return isNumber(de)&&de>0},Ti=null,xa=function(de,Q){if(isArray(de)){for(var ae,_e=-1/0,Re=0;Re<de.length;Re++){var Ge=de[Re],Xe=isFunction(Q)?Q(Ge):Ge[Q];Xe>_e&&(ae=Ge,_e=Xe)}return ae}},wr=function(de,Q){if(isArray(de)){for(var ae,_e=1/0,Re=0;Re<de.length;Re++){var Ge=de[Re],Xe=isFunction(Q)?Q(Ge):Ge[Q];Xe<_e&&(ae=Ge,_e=Xe)}return ae}},Wi=180/Math.PI,ni=function(de){return Wi*de},Ea=null,Vr=Math.PI/180,os=function(de){return Vr*de},fo=null,dl=null,Ql=Object.values?function(de){return Object.values(de)}:function(de){var Q=[];return et(de,function(ae,_e){ie(de)&&_e==="prototype"||Q.push(ae)}),Q},Do=Ql,ql=function(de,Q){return contains(values(de),Q)},Tu={}.toString,qa=function(de){return Tu.call(de).replace(/^\[object /,"").replace(/]$/,"")},ou=null,lu=function(de){return isType(de,"Arguments")},Cu=null,eu=function(de){return isType(de,"Boolean")},tu=null,Mu=function(de){return isType(de,"Date")},Kr=null,bh=function(de){return isType(de,"Error")},kv=null;function kh(de){return isNumber(de)&&isFinite(de)}var cd=Object.prototype,wv=function(de){var Q=de&&de.constructor,ae=typeof Q=="function"&&Q.prototype||cd;return de===ae},Va=null,Sv=function(de){return isType(de,"RegExp")},uu=null,Sm=function(){for(var de=[],Q=0;Q<arguments.length;Q++)de[Q]=arguments[Q];for(var ae=de[0],_e=1;_e<de.length;_e++){var Re=de[_e];isFunction(Re)&&(Re=Re.prototype),mix(ae.prototype,Re)}},ig=null,wh=function(de){if(typeof de!="object"||de===null)return de;var Q;if(Ie(de)){Q=[];for(var ae=0,_e=de.length;ae<_e;ae++)typeof de[ae]=="object"&&de[ae]!=null?Q[ae]=wh(de[ae]):Q[ae]=de[ae]}else{Q={};for(var Re in de)typeof de[Re]=="object"&&de[Re]!=null?Q[Re]=wh(de[Re]):Q[Re]=de[Re]}return Q},Cf=wh,Sh=function(de,Q){if(!ie(de))throw new TypeError("Expected a function");var ae=function(){for(var _e=[],Re=0;Re<arguments.length;Re++)_e[Re]=arguments[Re];var Ge=Q?Q.apply(this,_e):_e[0],Xe=ae.cache;if(Xe.has(Ge))return Xe.get(Ge);var yt=de.apply(this,_e);return Xe.set(Ge,yt),yt};return ae.cache=new Map,ae},Tv=5;function Tn(de,Q,ae,_e){ae=ae||0,_e=_e||Tv;for(var Re in Q)if(Q.hasOwnProperty(Re)){var Ge=Q[Re];Ge!==null&&isPlainObject(Ge)?(isPlainObject(de[Re])||(de[Re]={}),ae<_e?Tn(de[Re],Ge,ae+1,_e):de[Re]=Q[Re]):isArray(Ge)?(de[Re]=[],de[Re]=de[Re].concat(Ge)):Ge!==void 0&&(de[Re]=Ge)}}var pl=function(de){for(var Q=[],ae=1;ae<arguments.length;ae++)Q[ae-1]=arguments[ae];for(var _e=0;_e<Q.length;_e+=1)Tn(de,Q[_e]);return de},An=null,cu=function(de,Q,ae,_e){isFunction(Q)||(ae=Q,Q=de,de=function(){});var Re=Object.create?function(Xe,yt){return Object.create(Xe,{constructor:{value:yt}})}:function(Xe,yt){function kt(){}kt.prototype=Xe;var Tt=new kt;return Tt.constructor=yt,Tt},Ge=Re(Q.prototype,de);return de.prototype=mix(Ge,de.prototype),de.superclass=Re(Q.prototype,Q),mix(Ge,ae),mix(de,_e),de},Th=null,Kg=Object.prototype.hasOwnProperty;function Jg(de){if(isNil(de))return!0;if(isArrayLike(de))return!de.length;var Q=getType(de);if(Q==="Map"||Q==="Set")return!de.size;if(isPrototype(de))return!Object.keys(de).length;for(var ae in de)if(Kg.call(de,ae))return!1;return!0}var vt=null,_t=function(de){return typeof de=="object"&&de!==null},Ht=_t,Gt=function(de){return de!==null&&typeof de!="function"&&isFinite(de.length)},sn=Gt,cn=function(de,Q){if(de===Q)return!0;if(!de||!Q||J(de)||J(Q))return!1;if(sn(de)||sn(Q)){if(de.length!==Q.length)return!1;for(var ae=!0,_e=0;_e<de.length&&(ae=cn(de[_e],Q[_e]),!!ae);_e++);return ae}if(Ht(de)||Ht(Q)){var Re=Object.keys(de),Ge=Object.keys(Q);if(Re.length!==Ge.length)return!1;for(var ae=!0,_e=0;_e<Re.length&&(ae=cn(de[Re[_e]],Q[Re[_e]]),!!ae);_e++);return ae}return!1},Sn=cn,Bn=function(de,Q,ae){return isFunction(ae)?!!ae(de,Q):isEqual(de,Q)},gr=function(de,Q,ae){for(var _e=0,Re=isString(Q)?Q.split("."):Q;de&&_e<Re.length;)de=de[Re[_e++]];return de===void 0||_e<Re.length?ae:de},gn=function(de,Q,ae){var _e=de,Re=isString(Q)?Q.split("."):Q;return Re.forEach(function(Ge,Xe){Xe<Re.length-1?(isObject(_e[Ge])||(_e[Ge]=isNumber(Re[Xe+1])?[]:{}),_e=_e[Ge]):_e[Ge]=ae}),de},_n=Object.prototype.hasOwnProperty,fn=function(de,Q){if(de===null||!isPlainObject(de))return{};var ae={};return each(Q,function(_e){_n.call(de,_e)&&(ae[_e]=de[_e])}),ae},Sr=function(de,Q){return reduce(de,function(ae,_e,Re){return Q.includes(Re)||(ae[Re]=_e),ae},{})},Rn={},Ln=function(de){return de=de||"g",Rn[de]?Rn[de]+=1:Rn[de]=1,de+Rn[de]},Jr,mi=Sh(function(de,Q){Q===void 0&&(Q={});var ae=Q.fontSize,_e=Q.fontFamily,Re=Q.fontWeight,Ge=Q.fontStyle,Xe=Q.fontVariant;return Jr||(Jr=document.createElement("canvas").getContext("2d")),Jr.font=[Ge,Xe,Re,ae+"px",_e].join(" "),Jr.measureText(J(de)?de:"").width},function(de,Q){return Q===void 0&&(Q={}),ot([de],Do(Q)).join("")}),_i=function(de,Q,ae,_e){_e===void 0&&(_e="...");var Re=16,Ge=measureTextWidth(_e,ae),Xe=isString(de)?de:toString(de),yt=Q,kt=[],Tt,It;if(measureTextWidth(de,ae)<=Q)return de;for(;Tt=Xe.substr(0,Re),It=measureTextWidth(Tt,ae),!(It+Ge>yt&&It>yt);)if(kt.push(Tt),yt-=It,Xe=Xe.substr(Re),!Xe)return kt.join("");for(;Tt=Xe.substr(0,1),It=measureTextWidth(Tt,ae),!(It+Ge>yt);)if(kt.push(Tt),yt-=It,Xe=Xe.substr(1),!Xe)return kt.join("");return""+kt.join("")+_e},vi=function(){function de(){this.map={}}return de.prototype.has=function(Q){return this.map[Q]!==void 0},de.prototype.get=function(Q,ae){var _e=this.map[Q];return _e===void 0?ae:_e},de.prototype.set=function(Q,ae){this.map[Q]=ae},de.prototype.clear=function(){this.map={}},de.prototype.delete=function(Q){delete this.map[Q]},de.prototype.size=function(){return Object.keys(this.map).length},de}(),pi=null,ba=function(Q,ae,_e){for(var Re=1/0,Ge,Xe=0;Xe<ae.length;Xe++){var yt=ae[Xe].id;!_e[yt]&&Q[yt]<=Re&&(Re=Q[yt],Ge=ae[Xe])}return Ge},Qi=function(Q,ae,_e,Re){var Ge=Q.nodes,Xe=Ge===void 0?[]:Ge,yt=Q.edges,kt=yt===void 0?[]:yt,Tt=[],It={},Dt={},Yt={};Xe.forEach(function(wn,ir){var pr=wn.id;Tt.push(pr),Dt[pr]=1/0,pr===ae&&(Dt[pr]=0)});for(var Vt=Xe.length,jt=function(ir){var pr=ba(Dt,Xe,It),_r=pr.id;if(It[_r]=!0,Dt[_r]===1/0)return"continue";var si=[];_e?si=P(_r,kt):si=W(_r,kt),si.forEach(function(Ur){var qr=Ur.target,Hi=Ur.source,Ri=qr===_r?Hi:qr,ci=Re&&Ur[Re]?Ur[Re]:1;Dt[Ri]>Dt[pr.id]+ci?(Dt[Ri]=Dt[pr.id]+ci,Yt[Ri]=[pr.id]):Dt[Ri]===Dt[pr.id]+ci&&Yt[Ri].push(pr.id)})},Zt=0;Zt<Vt;Zt++)jt(Zt);Yt[ae]=[ae];var Kt={};for(var hn in Dt)Dt[hn]!==1/0&&Yi(ae,hn,Yt,Kt);var xn={};for(var hn in Kt)xn[hn]=Kt[hn][0];return{length:Dt,path:xn,allPath:Kt}},li=Qi;function Yi(de,Q,ae,_e){if(de===Q)return[de];if(_e[Q])return _e[Q];for(var Re=[],Ge=0,Xe=ae[Q];Ge<Xe.length;Ge++){var yt=Xe[Ge],kt=Yi(de,yt,ae,_e);if(!kt)return;for(var Tt=0,It=kt;Tt<It.length;Tt++){var Dt=It[Tt];Ie(Dt)?Re.push(pe(pe([],Dt,!0),[Q],!1)):Re.push([Dt,Q])}}return _e[Q]=Re,_e[Q]}var Xi=function(Q,ae,_e,Re,Ge){var Xe=li(Q,ae,Re,Ge),yt=Xe.length,kt=Xe.path,Tt=Xe.allPath;return{length:yt[_e],path:kt[_e],allPath:Tt[_e]}},ha=function(Q,ae,_e,Re){var Ge;if(ae===_e)return[[ae]];var Xe=Q.edges,yt=Xe===void 0?[]:Xe,kt=[ae],Tt=(Ge={},Ge[ae]=!0,Ge),It=[],Dt=[],Yt=Re?F(ae,yt,"target"):F(ae,yt);for(It.push(Yt);kt.length>0&&It.length>0;){var Vt=It[It.length-1];if(Vt.length){var jt=Vt.shift();jt&&(kt.push(jt),Tt[jt]=!0,Yt=Re?F(jt,yt,"target"):F(jt,yt),It.push(Yt.filter(function(hn){return!Tt[hn]})))}else{var Zt=kt.pop();Tt[Zt]=!1,It.pop();continue}if(kt[kt.length-1]===_e){var Kt=kt.map(function(xn){return xn});Dt.push(Kt);var Zt=kt.pop();Tt[Zt]=!1,It.pop()}}return Dt},Gr=function(Q,ae){for(var _e=H(Q,ae),Re=[],Ge=_e.length,Xe=0;Xe<Ge;Xe+=1){Re[Xe]=[];for(var yt=0;yt<Ge;yt+=1)Xe===yt?Re[Xe][yt]=0:_e[Xe][yt]===0||!_e[Xe][yt]?Re[Xe][yt]=1/0:Re[Xe][yt]=_e[Xe][yt]}for(var kt=0;kt<Ge;kt+=1)for(var Xe=0;Xe<Ge;Xe+=1)for(var yt=0;yt<Ge;yt+=1)Re[Xe][yt]>Re[Xe][kt]+Re[kt][yt]&&(Re[Xe][yt]=Re[Xe][kt]+Re[kt][yt]);return Re},ua=Gr,As=function(Q,ae,_e,Re){ae===void 0&&(ae=!1),_e===void 0&&(_e="weight"),Re===void 0&&(Re=1e3);var Ge=Q.nodes,Xe=Ge===void 0?[]:Ge,yt=Q.edges,kt=yt===void 0?[]:yt,Tt={},It={};Xe.forEach(function(ir,pr){var _r=K();ir.clusterId=_r,Tt[_r]={id:_r,nodes:[ir]},It[ir.id]={node:ir,idx:pr}});var Dt=H(Q,ae),Yt=[],Vt={};Dt.forEach(function(ir,pr){var _r=0,si=Xe[pr].id;Vt[si]={},ir.forEach(function(Ur,qr){if(Ur){_r+=Ur;var Hi=Xe[qr].id;Vt[si][Hi]=Ur}}),Yt.push(_r)});for(var jt=0,Zt=function(){var pr=!1;if(Xe.forEach(function(_r){var si={};Object.keys(Vt[_r.id]).forEach(function(da){var Ua=Vt[_r.id][da],ja=It[da].node,La=ja.clusterId;si[La]||(si[La]=0),si[La]+=Ua});var Ur=-1/0,qr=[];if(Object.keys(si).forEach(function(da){Ur<si[da]?(Ur=si[da],qr=[da]):Ur===si[da]&&qr.push(da)}),!(qr.length===1&&qr[0]===_r.clusterId)){var Hi=qr.indexOf(_r.clusterId);if(Hi>=0&&qr.splice(Hi,1),qr&&qr.length){pr=!0;var Ri=Tt[_r.clusterId],ci=Ri.nodes.indexOf(_r);Ri.nodes.splice(ci,1);var Xa=Math.floor(Math.random()*qr.length),va=Tt[qr[Xa]];va.nodes.push(_r),_r.clusterId=va.id}}}),!pr)return"break";jt++};jt<Re;){var Kt=Zt();if(Kt==="break")break}Object.keys(Tt).forEach(function(ir){var pr=Tt[ir];(!pr.nodes||!pr.nodes.length)&&delete Tt[ir]});var hn=[],xn={};kt.forEach(function(ir){var pr=ir.source,_r=ir.target,si=ir[_e]||1,Ur=It[pr].node.clusterId,qr=It[_r].node.clusterId,Hi="".concat(Ur,"---").concat(qr);if(xn[Hi])xn[Hi].weight+=si,xn[Hi].count++;else{var Ri={source:Ur,target:qr,weight:si,count:1};xn[Hi]=Ri,hn.push(Ri)}});var wn=[];return Object.keys(Tt).forEach(function(ir){wn.push(Tt[ir])}),{clusters:wn,clusterEdges:hn}},Ra=As,Ca=function(){function de(Q){this.arr=Q}return de.prototype.getArr=function(){return this.arr||[]},de.prototype.add=function(Q){var ae,_e=Q.arr;if(!(!((ae=this.arr)===null||ae===void 0)&&ae.length))return new de(_e);if(!(_e!=null&&_e.length))return new de(this.arr);if(this.arr.length===_e.length){var Re=[];for(var Ge in this.arr)Re[Ge]=this.arr[Ge]+_e[Ge];return new de(Re)}},de.prototype.subtract=function(Q){var ae,_e=Q.arr;if(!(!((ae=this.arr)===null||ae===void 0)&&ae.length))return new de(_e);if(!(_e!=null&&_e.length))return new de(this.arr);if(this.arr.length===_e.length){var Re=[];for(var Ge in this.arr)Re[Ge]=this.arr[Ge]-_e[Ge];return new de(Re)}},de.prototype.avg=function(Q){var ae=[];if(Q!==0)for(var _e in this.arr)ae[_e]=this.arr[_e]/Q;return new de(ae)},de.prototype.negate=function(){var Q=[];for(var ae in this.arr)Q[ae]=-this.arr[ae];return new de(Q)},de.prototype.squareEuclideanDistance=function(Q){var ae,_e=Q.arr;if(!(!((ae=this.arr)===null||ae===void 0)&&ae.length)||!(_e!=null&&_e.length))return 0;if(this.arr.length===_e.length){var Re=0;for(var Ge in this.arr)Re+=Math.pow(this.arr[Ge]-Q.arr[Ge],2);return Re}},de.prototype.euclideanDistance=function(Q){var ae,_e=Q.arr;if(!(!((ae=this.arr)===null||ae===void 0)&&ae.length)||!(_e!=null&&_e.length))return 0;if(this.arr.length===_e.length){var Re=0;for(var Ge in this.arr)Re+=Math.pow(this.arr[Ge]-Q.arr[Ge],2);return Math.sqrt(Re)}else console.error("The two vectors are unequal in length.")},de.prototype.normalize=function(){var Q=[],ae=Cf(this.arr);ae.sort(function(Xe,yt){return Xe-yt});var _e=ae[ae.length-1],Re=ae[0];for(var Ge in this.arr)Q[Ge]=(this.arr[Ge]-Re)/(_e-Re);return new de(Q)},de.prototype.norm2=function(){var Q;if(!(!((Q=this.arr)===null||Q===void 0)&&Q.length))return 0;var ae=0;for(var _e in this.arr)ae+=Math.pow(this.arr[_e],2);return Math.sqrt(ae)},de.prototype.dot=function(Q){var ae,_e=Q.arr;if(!(!((ae=this.arr)===null||ae===void 0)&&ae.length)||!(_e!=null&&_e.length))return 0;if(this.arr.length===_e.length){var Re=0;for(var Ge in this.arr)Re+=this.arr[Ge]*Q.arr[Ge];return Re}else console.error("The two vectors are unequal in length.")},de.prototype.equal=function(Q){var ae,_e=Q.arr;if(((ae=this.arr)===null||ae===void 0?void 0:ae.length)!==(_e==null?void 0:_e.length))return!1;for(var Re in this.arr)if(this.arr[Re]!==_e[Re])return!1;return!0},de}(),Mi=Ca,yi=/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/,Pi=/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})$/,Ni=function(Q,ae){Q===void 0&&(Q=[]),ae===void 0&&(ae=100);var _e={};Q.forEach(function(Ge){Ge.properties&&Object.keys(Ge.properties).forEach(function(Xe){if(Xe==="id"||!"".concat(Ge.properties[Xe]).match(yi)&&!"".concat(Ge.properties[Xe]).match(Pi)&&isNaN(Number(Ge.properties[Xe]))){_e.hasOwnProperty(Xe)&&delete _e[Xe];return}_e.hasOwnProperty(Xe)?_e[Xe]+=1:_e[Xe]=1})});var Re=Object.keys(_e).sort(function(Ge,Xe){return _e[Xe]-_e[Ge]});return Re.length<ae?Re:Re.slice(0,ae)},na=function(Q,ae){return ae.map(function(_e){return Q.hasOwnProperty(_e)?Q[_e]:0})},nu=function(Q){for(var ae=Ni(Q),_e=[],Re=0;Re<Q.length;Re++)_e[Re]=na(Q[Re].properties,ae);return _e},Bs=function(Q,ae){ae===void 0&&(ae=void 0);var _e=[];return Q.forEach(function(Re){ae===void 0&&_e.push(Re),Re[ae]!==void 0&&_e.push(Re[ae])}),_e},No={getAllSortProperties:Ni,getPropertyWeight:nu,getAllProperties:Bs},es;(function(de){de.EuclideanDistance="euclideanDistance"})(es||(es={}));var ca=function(Q,ae,_e){var Re=[];ae!=null&&ae.length?Re=ae:(Q.forEach(function(Xe){Re=Re.concat(Object.keys(Xe))}),Re=tt(Re));var Ge={};return Re.forEach(function(Xe){var yt=[];Q.forEach(function(kt){kt[Xe]!==void 0&&kt[Xe]!==""&&yt.push(kt[Xe])}),yt.length&&!(_e!=null&&_e.includes(Xe))&&(Ge[Xe]=tt(yt))}),Ge},Fo=function(Q,ae,_e){var Re=ca(Q,ae,_e),Ge=[];if(!Object.keys(Re).length)return Ge;var Xe=Object.values(Re),yt=Xe.every(function(kt){return kt.every(function(Tt){return typeof Tt=="number"})});return Q.forEach(function(kt,Tt){var It=[];Object.keys(Re).forEach(function(Dt){var Yt=kt[Dt],Vt=Re[Dt],jt=Vt.findIndex(function(hn){return Yt===hn}),Zt=[];if(yt)Zt.push(Yt);else for(var Kt=0;Kt<Vt.length;Kt++)Kt===jt?Zt.push(1):Zt.push(0);It=It.concat(Zt)}),Ge[Tt]=It}),Ge},du=function(Q,ae,_e,Re){_e===void 0&&(_e=es.EuclideanDistance);var Ge=0;switch(_e){case es.EuclideanDistance:Ge=new Mi(Q).euclideanDistance(new Mi(ae));break;default:break}return Ge},Ui={getAllKeyValueMap:ca,oneHot:Fo,getDistance:du},jr=function(Q,ae,_e,Re){for(var Ge=ae.length,Xe=2*Re,yt=0,kt=0;kt<Ge;kt++)for(var Tt=Q[kt].clusterId,It=0;It<Ge;It++){var Dt=Q[It].clusterId;if(Tt===Dt){var Yt=ae[kt][It]||0,Vt=_e[kt]||0,jt=_e[It]||0;yt+=Yt-Vt*jt/Xe}}return yt*=1/Xe,yt},xi=function(Q,ae){Q===void 0&&(Q=[]);for(var _e=Q.length,Re=new Mi([]),Ge=0;Ge<_e;Ge++)Re=Re.add(new Mi(ae[Ge]));var Xe=Re.avg(_e);Xe.normalize();for(var yt=0,Ge=0;Ge<_e;Ge++){var kt=new Mi(ae[Ge]),Tt=kt.squareEuclideanDistance(Xe);yt+=Tt}var It=[];Q.forEach(function(){It.push([])});for(var Ge=0;Ge<_e;Ge++){var kt=new Mi(ae[Ge]);Q[Ge].clusterInertial=0;for(var Dt=0;Dt<_e;Dt++){if(Ge===Dt){It[Ge][Dt]=0;continue}var Yt=new Mi(ae[Dt]);It[Ge][Dt]=kt.squareEuclideanDistance(Yt),Q[Ge].clusterInertial+=It[Ge][Dt]}}for(var Vt=0,jt=2*_e*yt,Ge=0;Ge<_e;Ge++)for(var Zt=Q[Ge].clusterId,Dt=0;Dt<_e;Dt++){var Kt=Q[Dt].clusterId;if(!(Ge===Dt||Zt!==Kt)){var hn=Q[Ge].clusterInertial*Q[Dt].clusterInertial/Math.pow(jt,2)-It[Ge][Dt]/jt;Vt+=hn}}return Number(Vt.toFixed(4))},Aa=function(Q,ae,_e,Re,Ge,Xe,yt,kt,Tt){ae===void 0&&(ae=!1),_e===void 0&&(_e="weight"),Re===void 0&&(Re=1e-4),Ge===void 0&&(Ge=!1),Xe===void 0&&(Xe=void 0),yt===void 0&&(yt=[]),kt===void 0&&(kt=["id"]),Tt===void 0&&(Tt=1);var It=Q.nodes,Dt=It===void 0?[]:It,Yt=Q.edges,Vt=Yt===void 0?[]:Yt,jt=[];if(Ge){Dt.forEach(function(hr,Qr){hr.properties=hr.properties||{},hr.originIndex=Qr});var Zt=[];Dt.every(function(hr){return hr.hasOwnProperty("nodeType")})&&(Zt=Array.from(new Set(Dt.map(function(hr){return hr.nodeType}))),Dt.forEach(function(hr){hr.properties.nodeType=Zt.findIndex(function(Qr){return Qr===hr.nodeType})}));var Kt=Bs(Dt,Xe);jt=Fo(Kt,yt,kt)}var hn=1,xn={},wn={};Dt.forEach(function(hr,Qr){var Ei=String(hn++);hr.clusterId=Ei,xn[Ei]={id:Ei,nodes:[hr]},wn[hr.id]={node:hr,idx:Qr}});var ir=H(Q,ae),pr=[],_r={},si=0;ir.forEach(function(hr,Qr){var Ei=0,ji=Dt[Qr].id;_r[ji]={},hr.forEach(function(Ai,go){if(Ai){Ei+=Ai;var _o=Dt[go].id;_r[ji][_o]=Ai,si+=Ai}}),pr.push(Ei)}),si/=2;for(var Ur=1/0,qr=1/0,Hi=0,Ri=[],ci={};;){Ge&&Dt.every(function(hr){return hr.hasOwnProperty("properties")})?Ur=jr(Dt,ir,pr,si)+xi(Dt,jt)*Tt:Ur=jr(Dt,ir,pr,si),Hi===0&&(qr=Ur,Ri=Dt,ci=xn);var Xa=Ur>0&&Ur>qr&&Ur-qr<Re;if(Ur>qr&&(Ri=Dt.map(function(hr){return{node:hr,clusterId:hr.clusterId}}),ci=Cf(xn),qr=Ur),Xa||Hi>100)break;Hi++,Object.keys(xn).forEach(function(hr){var Qr=0;Vt.forEach(function(Ei){var ji=Ei.source,Ai=Ei.target,go=wn[ji].node.clusterId,_o=wn[Ai].node.clusterId;(go===hr&&_o!==hr||_o===hr&&go!==hr)&&(Qr=Qr+(Ei[_e]||1))}),xn[hr].sumTot=Qr}),Dt.forEach(function(hr,Qr){var Ei=xn[hr.clusterId],ji=0,Ai,go=pr[Qr]/(2*si),_o=0,ac=Ei.nodes;ac.forEach(function(Qu){var _u=wn[Qu.id].idx;_o+=ir[Qr][_u]||0});var Ku=_o-Ei.sumTot*go,Ou=ac.filter(function(Qu){return Qu.id!==hr.id}),Mh=[];Ou.forEach(function(Qu,_u){Mh[_u]=jt[Qu.originIndex]});var Ru=xi(Ou,jt)*Tt,Ph=_r[hr.id];if(Object.keys(Ph).forEach(function(Qu){var _u=wn[Qu].node,qg=_u.clusterId;if(qg!==hr.clusterId){var Tc=xn[qg],hd=Tc.nodes;if(!(!hd||!hd.length)){var Li=0;hd.forEach(function(Ha){var Ka=wn[Ha.id].idx;Li+=ir[Qr][Ka]||0});var ns=Li-Tc.sumTot*go,ka=hd.concat([hr]),Ma=[];ka.forEach(function(Ha,Ka){Ma[Ka]=jt[Ha.originIndex]});var mo=xi(ka,jt)*Tt,oi=ns-Ku;Ge&&(oi=ns+mo-(Ku+Ru)),oi>ji&&(ji=oi,Ai=Tc)}}}),ji>0){Ai.nodes.push(hr);var xl=hr.clusterId;hr.clusterId=Ai.id;var Mm=Ei.nodes.indexOf(hr);Ei.nodes.splice(Mm,1);var Ju=0,Qg=0;Vt.forEach(function(Qu){var _u=Qu.source,qg=Qu.target,Tc=wn[_u].node.clusterId,hd=wn[qg].node.clusterId;(Tc===Ai.id&&hd!==Ai.id||hd===Ai.id&&Tc!==Ai.id)&&(Ju=Ju+(Qu[_e]||1)),(Tc===xl&&hd!==xl||hd===xl&&Tc!==xl)&&(Qg=Qg+(Qu[_e]||1))}),Ai.sumTot=Ju,Ei.sumTot=Qg}})}var va={},da=0;Object.keys(ci).forEach(function(hr){var Qr=ci[hr];if(!Qr.nodes||!Qr.nodes.length){delete ci[hr];return}var Ei=String(da+1);Ei!==hr&&(Qr.id=Ei,Qr.nodes=Qr.nodes.map(function(ji){return{id:ji.id,clusterId:Ei}}),ci[Ei]=Qr,va[hr]=Ei,delete ci[hr],da++)}),Ri.forEach(function(hr){var Qr=hr.node,Ei=hr.clusterId;Qr&&(Qr.clusterId=Ei,Qr.clusterId&&va[Qr.clusterId]&&(Qr.clusterId=va[Qr.clusterId]))});var Ua=[],ja={};Vt.forEach(function(hr){var Qr=hr.source,Ei=hr.target,ji=hr[_e]||1,Ai=wn[Qr].node.clusterId,go=wn[Ei].node.clusterId;if(!(!Ai||!go)){var _o="".concat(Ai,"---").concat(go);if(ja[_o])ja[_o].weight+=ji,ja[_o].count++;else{var ac={source:Ai,target:go,weight:ji,count:1};ja[_o]=ac,Ua.push(ac)}}});var La=[];return Object.keys(ci).forEach(function(hr){La.push(ci[hr])}),{clusters:La,clusterEdges:Ua}},ra=Aa,oa=function(Q,ae,_e,Re,Ge,Xe,yt,kt){return ae===void 0&&(ae=!1),_e===void 0&&(_e="weight"),Re===void 0&&(Re=1e-4),Ge===void 0&&(Ge=void 0),Xe===void 0&&(Xe=[]),yt===void 0&&(yt=["id"]),kt===void 0&&(kt=1),ra(Q,ae,_e,Re,!0,Ge,Xe,yt,kt)},Ki=oa,Ya=function(Q,ae){var _e;ae===void 0&&(ae=1);for(var Re=Cf(Q),Ge=Re.nodes,Xe=Ge===void 0?[]:Ge,yt=Re.edges,kt=yt===void 0?[]:yt,Tt=function(){var Yt=Me({nodes:Xe,edges:kt}),Vt=Object.keys(Yt);Vt.sort(function(Kt,hn){var xn,wn;return((xn=Yt[Kt])===null||xn===void 0?void 0:xn.degree)-((wn=Yt[hn])===null||wn===void 0?void 0:wn.degree)});var jt=Vt[0];if(!Xe.length||((_e=Yt[jt])===null||_e===void 0?void 0:_e.degree)>=ae)return"break";var Zt=Xe.findIndex(function(Kt){return Kt.id===jt});Xe.splice(Zt,1),kt=kt.filter(function(Kt){return!(Kt.source===jt||Kt.target===jt)})};;){var It=Tt();if(It==="break")break}return{nodes:Xe,edges:kt}},bs=Ya,is=function(Q,ae,_e){var Re=[];switch(Q){case es.EuclideanDistance:Re=ae[_e];break;default:Re=[];break}return Re},Bo=function(Q,ae,_e,Re,Ge,Xe){ae===void 0&&(ae=3),_e===void 0&&(_e=void 0),Re===void 0&&(Re=[]),Ge===void 0&&(Ge=["id"]),Xe===void 0&&(Xe=es.EuclideanDistance);var yt=Q.nodes,kt=yt===void 0?[]:yt,Tt=Q.edges,It=Tt===void 0?[]:Tt,Dt={clusters:[{id:"0",nodes:kt}],clusterEdges:[]};if(Xe===es.EuclideanDistance&&!kt.every(function(Ei){return Ei.hasOwnProperty(_e)}))return Dt;var Yt=[],Vt=[];if(Xe===es.EuclideanDistance&&(Yt=Bs(kt,_e),Vt=Fo(Yt,Re,Ge)),!Vt.length)return Dt;for(var jt=tt(Vt.map(function(Ei){return Ei.join("")})),Zt=Math.min(ae,kt.length,jt.length),Kt=0;Kt<kt.length;Kt++)kt[Kt].originIndex=Kt;for(var hn=[],xn=[],wn=[],Kt=0;Kt<Zt;Kt++)if(Kt===0){var ir=Math.floor(Math.random()*kt.length);switch(Xe){case es.EuclideanDistance:hn[Kt]=Vt[ir];break;default:hn[Kt]=[];break}xn.push(ir),wn[Kt]=[kt[ir]],kt[ir].clusterId=String(Kt)}else{for(var pr=-1/0,_r=0,si=function(Ai){if(!xn.includes(Ai)){for(var go=0,_o=0;_o<hn.length;_o++){var ac=0;switch(Xe){case es.EuclideanDistance:ac=du(Vt[kt[Ai].originIndex],hn[_o],Xe);break;default:break}go+=ac}var Ku=go/hn.length;Ku>pr&&!hn.find(function(Ou){return Sn(Ou,is(Xe,Vt,kt[Ai].originIndex))})&&(pr=Ku,_r=Ai)}},Ur=0;Ur<kt.length;Ur++)si(Ur);hn[Kt]=is(Xe,Vt,_r),xn.push(_r),wn[Kt]=[kt[_r]],kt[_r].clusterId=String(Kt)}for(var qr=0;;){for(var Kt=0;Kt<kt.length;Kt++){var Hi=0,Ri=1/0;if(!(qr===0&&xn.includes(Kt))){for(var ci=0;ci<hn.length;ci++){var Xa=0;switch(Xe){case es.EuclideanDistance:Xa=du(Vt[Kt],hn[ci],Xe);break;default:break}Xa<Ri&&(Ri=Xa,Hi=ci)}if(kt[Kt].clusterId!==void 0)for(var va=wn[Number(kt[Kt].clusterId)].length-1;va>=0;va--)wn[Number(kt[Kt].clusterId)][va].id===kt[Kt].id&&wn[Number(kt[Kt].clusterId)].splice(va,1);kt[Kt].clusterId=String(Hi),wn[Hi].push(kt[Kt])}}for(var da=!1,Kt=0;Kt<wn.length;Kt++){for(var Ua=wn[Kt],ja=new Mi([]),ci=0;ci<Ua.length;ci++)ja=ja.add(new Mi(Vt[Ua[ci].originIndex]));var La=ja.avg(Ua.length);La.equal(new Mi(hn[Kt]))||(da=!0,hn[Kt]=La.getArr())}if(qr++,kt.every(function(Ei){return Ei.clusterId!==void 0})&&da||qr>=1e3)break}var hr=[],Qr={};return It.forEach(function(Ei){var ji,Ai,go=Ei.source,_o=Ei.target,ac=(ji=kt.find(function(Ru){return Ru.id===go}))===null||ji===void 0?void 0:ji.clusterId,Ku=(Ai=kt.find(function(Ru){return Ru.id===_o}))===null||Ai===void 0?void 0:Ai.clusterId,Ou="".concat(ac,"---").concat(Ku);if(Qr[Ou])Qr[Ou].count++;else{var Mh={source:ac,target:Ku,count:1};Qr[Ou]=Mh,hr.push(Mh)}}),{clusters:wn,clusterEdges:hr}},ks=Bo,Oo=function(Q,ae){var _e=new Mi(ae),Re=_e.norm2(),Ge=new Mi(Q),Xe=Ge.norm2(),yt=_e.dot(Ge),kt=Re*Xe,Tt=kt?yt/kt:0;return Tt},fa=Oo,as=function(Q,ae,_e,Re,Ge){Q===void 0&&(Q=[]),_e===void 0&&(_e=void 0),Re===void 0&&(Re=[]),Ge===void 0&&(Ge=[]);var Xe=Cf(Q.filter(function(Yt){return Yt.id!==ae.id})),yt=Q.findIndex(function(Yt){return Yt.id===ae.id}),kt=Bs(Q,_e),Tt=Fo(kt,Re,Ge),It=Tt[yt],Dt=[];return Xe.forEach(function(Yt,Vt){if(Yt.id!==ae.id){var jt=Tt[Vt],Zt=fa(jt,It);Dt.push(Zt),Yt.cosineSimilarity=Zt}}),Xe.sort(function(Yt,Vt){return Vt.cosineSimilarity-Yt.cosineSimilarity}),{allCosineSimilarity:Dt,similarNodes:Xe}},ls=as,ju=function(){function de(Q){this.count=Q.length,this.parent={};for(var ae=0,_e=Q;ae<_e.length;ae++){var Re=_e[ae];this.parent[Re]=Re}}return de.prototype.find=function(Q){for(;this.parent[Q]!==Q;)Q=this.parent[Q];return Q},de.prototype.union=function(Q,ae){var _e=this.find(Q),Re=this.find(ae);_e!==Re&&(_e<Re?(this.parent[ae]!==ae&&this.union(this.parent[ae],Q),this.parent[ae]=this.parent[Q]):(this.parent[Q]!==Q&&this.union(this.parent[Q],ae),this.parent[Q]=this.parent[ae]))},de.prototype.connected=function(Q,ae){return this.find(Q)===this.find(ae)},de}(),Pu=ju,$o=function(Q,ae){return Q-ae},Za=function(){function de(Q){Q===void 0&&(Q=$o),this.compareFn=Q,this.list=[]}return de.prototype.getLeft=function(Q){return 2*Q+1},de.prototype.getRight=function(Q){return 2*Q+2},de.prototype.getParent=function(Q){return Q===0?null:Math.floor((Q-1)/2)},de.prototype.isEmpty=function(){return this.list.length<=0},de.prototype.top=function(){return this.isEmpty()?void 0:this.list[0]},de.prototype.delMin=function(){var Q=this.top(),ae=this.list.pop();return this.list.length>0&&(this.list[0]=ae,this.moveDown(0)),Q},de.prototype.insert=function(Q){if(Q!==null){this.list.push(Q);var ae=this.list.length-1;return this.moveUp(ae),!0}return!1},de.prototype.moveUp=function(Q){for(var ae=this.getParent(Q);Q&&Q>0&&this.compareFn(this.list[ae],this.list[Q])>0;){var _e=this.list[ae];this.list[ae]=this.list[Q],this.list[Q]=_e,Q=ae,ae=this.getParent(Q)}},de.prototype.moveDown=function(Q){var ae,_e=Q,Re=this.getLeft(Q),Ge=this.getRight(Q),Xe=this.list.length;Re!==null&&Re<Xe&&this.compareFn(this.list[_e],this.list[Re])>0?_e=Re:Ge!==null&&Ge<Xe&&this.compareFn(this.list[_e],this.list[Ge])>0&&(_e=Ge),Q!==_e&&(ae=[this.list[_e],this.list[Q]],this.list[Q]=ae[0],this.list[_e]=ae[1],this.moveDown(_e))},de}(),Ro=Za,ru=function(Q,ae){var _e=[],Re=Q.nodes,Ge=Re===void 0?[]:Re,Xe=Q.edges,yt=Xe===void 0?[]:Xe;if(Ge.length===0)return _e;var kt=Ge[0],Tt=new Set;Tt.add(kt);var It=function(Kt,hn){return ae?Kt.weight-hn.weight:0},Dt=new Ro(It);for(W(kt.id,yt).forEach(function(Zt){Dt.insert(Zt)});!Dt.isEmpty();){var Yt=Dt.delMin(),Vt=Yt.source,jt=Yt.target;Tt.has(Vt)&&Tt.has(jt)||(_e.push(Yt),Tt.has(Vt)||(Tt.add(Vt),W(Vt,yt).forEach(function(Zt){Dt.insert(Zt)})),Tt.has(jt)||(Tt.add(jt),W(jt,yt).forEach(function(Zt){Dt.insert(Zt)})))}return _e},vo=function(Q,ae){var _e=[],Re=Q.nodes,Ge=Re===void 0?[]:Re,Xe=Q.edges,yt=Xe===void 0?[]:Xe;if(Ge.length===0)return _e;var kt=yt.map(function(Vt){return Vt});ae&&kt.sort(function(Vt,jt){return Vt.weight-jt.weight});for(var Tt=new Pu(Ge.map(function(Vt){return Vt.id}));kt.length>0;){var It=kt.shift(),Dt=It.source,Yt=It.target;Tt.connected(Dt,Yt)||(_e.push(It),Tt.union(Dt,Yt))}return _e},Ao=function(Q,ae,_e){var Re={prim:ru,kruskal:vo};return _e?Re[_e](Q,ae):vo(Q,ae)},jl=Ao,Ld=function(Q,ae,_e){typeof ae!="number"&&(ae=1e-6),typeof _e!="number"&&(_e=.85);for(var Re=1,Ge=0,Xe=1e3,yt=Q.nodes,kt=yt===void 0?[]:yt,Tt=Q.edges,It=Tt===void 0?[]:Tt,Dt=kt.length,Yt,Vt={},jt={},Zt=0;Zt<Dt;++Zt){var Kt=kt[Zt],hn=Kt.id;Vt[hn]=1/Dt,jt[hn]=1/Dt}for(var xn=Me(Q);Xe>0&&Re>ae;){Ge=0;for(var Zt=0;Zt<Dt;++Zt){var Kt=kt[Zt],hn=Kt.id;if(Yt=0,xn[Kt.id].inDegree===0)Vt[hn]=0;else{for(var wn=F(hn,It,"source"),ir=0;ir<wn.length;++ir){var pr=wn[ir],_r=xn[pr].outDegree;_r>0&&(Yt+=jt[pr]/_r)}Vt[hn]=_e*Yt,Ge+=Vt[hn]}}Ge=(1-Ge)/Dt,Re=0;for(var Zt=0;Zt<Dt;++Zt){var Kt=kt[Zt],hn=Kt.id;Yt=Vt[hn]+Ge,Re+=Math.abs(Yt-jt[hn]),jt[hn]=Yt}Xe-=1}return jt},ic=Ld,Ch=-1,Hu=-1,Nu="-1",Go="-1",iu=-1,Id="-1",dd=function(){function de(Q,ae,_e,Re){Q===void 0&&(Q=Ch),ae===void 0&&(ae=Hu),_e===void 0&&(_e=Hu),Re===void 0&&(Re=Nu),this.id=Q,this.from=ae,this.to=_e,this.label=Re}return de}(),Wu=function(){function de(Q,ae){Q===void 0&&(Q=Hu),ae===void 0&&(ae=Go),this.id=Q,this.label=ae,this.edges=[],this.edgeMap={}}return de.prototype.addEdge=function(Q){this.edges.push(Q),this.edgeMap[Q.id]=Q},de}(),kc=function(){function de(Q,ae,_e){Q===void 0&&(Q=Hu),ae===void 0&&(ae=!0),_e===void 0&&(_e=!1),this.id=Q,this.edgeIdAutoIncrease=ae,this.edges=[],this.nodes=[],this.nodeMap={},this.edgeMap={},this.nodeLabelMap={},this.edgeLabelMap={},this.counter=0,this.directed=_e}return de.prototype.getNodeNum=function(){return this.nodes.length},de.prototype.addNode=function(Q,ae){if(!this.nodeMap[Q]){var _e=new Wu(Q,ae);this.nodes.push(_e),this.nodeMap[Q]=_e,this.nodeLabelMap[ae]||(this.nodeLabelMap[ae]=[]),this.nodeLabelMap[ae].push(Q)}},de.prototype.addEdge=function(Q,ae,_e,Re){if((this.edgeIdAutoIncrease||Q===void 0)&&(Q=this.counter++),!(this.nodeMap[ae]&&this.nodeMap[_e]&&this.nodeMap[_e].edgeMap[Q])){var Ge=new dd(Q,ae,_e,Re);if(this.edges.push(Ge),this.edgeMap[Q]=Ge,this.nodeMap[ae].addEdge(Ge),this.edgeLabelMap[Re]||(this.edgeLabelMap[Re]=[]),this.edgeLabelMap[Re].push(Ge),!this.directed){var Xe=new dd(Q,_e,ae,Re);this.nodeMap[_e].addEdge(Xe),this.edgeLabelMap[Re].push(Xe)}}},de}(),hu=function(){function de(Q,ae,_e,Re,Ge){this.fromNode=Q,this.toNode=ae,this.nodeEdgeNodeLabel={nodeLabel1:_e||Go,edgeLabel:Re||Nu,nodeLabel2:Ge||Go}}return de.prototype.equalTo=function(Q){return this.fromNode===Q.formNode&&this.toNode===Q.toNode&&this.nodeEdgeNodeLabel===Q.nodeEdgeNodeLabel},de.prototype.notEqualTo=function(Q){return!this.equalTo(Q)},de}(),Dd=function(){function de(){this.rmpath=[],this.dfsEdgeList=[]}return de.prototype.equalTo=function(Q){var ae=this.dfsEdgeList.length,_e=Q.length;if(ae!==_e)return!1;for(var Re=0;Re<ae;Re++)if(this.dfsEdgeList[Re]!==Q[Re])return!1;return!0},de.prototype.notEqualTo=function(Q){return!this.equalTo(Q)},de.prototype.pushBack=function(Q,ae,_e,Re,Ge){return this.dfsEdgeList.push(new hu(Q,ae,_e,Re,Ge)),this.dfsEdgeList},de.prototype.toGraph=function(Q,ae){Q===void 0&&(Q=iu),ae===void 0&&(ae=!1);var _e=new kc(Q,!0,ae);return this.dfsEdgeList.forEach(function(Re){var Ge=Re.fromNode,Xe=Re.toNode,yt=Re.nodeEdgeNodeLabel,kt=yt.nodeLabel1,Tt=yt.edgeLabel,It=yt.nodeLabel2;kt!==Go&&_e.addNode(Ge,kt),It!==Go&&_e.addNode(Xe,It),kt!==Go&&It!==kt&&_e.addEdge(void 0,Ge,Xe,Tt)}),_e},de.prototype.buildRmpath=function(){this.rmpath=[];for(var Q=void 0,ae=this.dfsEdgeList.length,_e=ae-1;_e>=0;_e--){var Re=this.dfsEdgeList[_e],Ge=Re.fromNode,Xe=Re.toNode;Ge<Xe&&(Q===void 0||Xe===Q)&&(this.rmpath.push(_e),Q=Ge)}return this.rmpath},de.prototype.getNodeNum=function(){var Q={};return this.dfsEdgeList.forEach(function(ae){Q[ae.fromNode]||(Q[ae.fromNode]=!0),Q[ae.toNode]||(Q[ae.toNode]=!0)}),Object.keys(Q).length},de}(),fu=function(){function de(Q){if(this.his={},this.nodesUsed={},this.edgesUsed={},this.edges=[],!!Q){for(;Q;){var ae=Q.edge;this.edges.push(ae),this.nodesUsed[ae.from]=1,this.nodesUsed[ae.to]=1,this.edgesUsed[ae.id]=1,Q=Q.preNode}this.edges=this.edges.reverse()}}return de.prototype.hasNode=function(Q){return this.nodesUsed[Q.id]===1},de.prototype.hasEdge=function(Q){return this.edgesUsed[Q.id]===1},de}(),wc=function(){function de(Q){var ae=Q.graphs,_e=Q.minSupport,Re=_e===void 0?2:_e,Ge=Q.minNodeNum,Xe=Ge===void 0?1:Ge,yt=Q.maxNodeNum,kt=yt===void 0?4:yt,Tt=Q.top,It=Tt===void 0?10:Tt,Dt=Q.directed,Yt=Dt===void 0?!1:Dt,Vt=Q.verbose,jt=Vt===void 0?!1:Vt;this.graphs=ae,this.dfsCode=new Dd,this.support=0,this.frequentSize1Subgraphs=[],this.frequentSubgraphs=[],this.minSupport=Re,this.top=It,this.directed=Yt,this.counter=0,this.maxNodeNum=kt,this.minNodeNum=Xe,this.verbose=jt,this.maxNodeNum<this.minNodeNum&&(this.maxNodeNum=this.minNodeNum),this.reportDF=[]}return de.prototype.findForwardRootEdges=function(Q,ae){var _e=this,Re=[],Ge=Q.nodeMap;return ae.edges.forEach(function(Xe){(_e.directed||ae.label<=Ge[Xe.to].label)&&Re.push(Xe)}),Re},de.prototype.findBackwardEdge=function(Q,ae,_e,Re){if(!this.directed&&ae===_e)return null;for(var Ge=Q.nodeMap,Xe=Ge[_e.to],yt=Xe.edges,kt=yt.length,Tt=0;Tt<kt;Tt++){var It=yt[Tt];if(!(Re.hasEdge(It)||It.to!==ae.from)){if(this.directed){if(Ge[ae.from].label<Ge[_e.to].label||Ge[ae.from].label===Ge[_e.to].label&&ae.label<=It.label)return It}else if(ae.label<It.label||ae.label===It.label&&Ge[ae.to].label<=Ge[_e.to].label)return It}}return null},de.prototype.findForwardPureEdges=function(Q,ae,_e,Re){for(var Ge=[],Xe=ae.to,yt=Q.nodeMap[Xe].edges,kt=yt.length,Tt=0;Tt<kt;Tt++){var It=yt[Tt],Dt=Q.nodeMap[It.to];_e<=Dt.label&&!Re.hasNode(Dt)&&Ge.push(It)}return Ge},de.prototype.findForwardRmpathEdges=function(Q,ae,_e,Re){for(var Ge=[],Xe=Q.nodeMap,yt=Xe[ae.to].label,kt=Xe[ae.from],Tt=kt.edges,It=Tt.length,Dt=0;Dt<It;Dt++){var Yt=Tt[Dt],Vt=Xe[Yt.to].label;ae.to===Yt.to||_e>Vt||Re.hasNode(Xe[Yt.to])||(ae.label<Yt.label||ae.label===Yt.label&&yt<=Vt)&&Ge.push(Yt)}return Ge},de.prototype.getSupport=function(Q){var ae={};return Q.forEach(function(_e){ae[_e.graphId]||(ae[_e.graphId]=!0)}),Object.keys(ae).length},de.prototype.findMinLabel=function(Q){var ae=void 0;return Object.keys(Q).forEach(function(_e){var Re=Q[_e],Ge=Re.nodeLabel1,Xe=Re.edgeLabel,yt=Re.nodeLabel2;if(!ae){ae={nodeLabel1:Ge,edgeLabel:Xe,nodeLabel2:yt};return}(Ge<ae.nodeLabel1||Ge===ae.nodeLabel1&&Xe<ae.edgeLabel||Ge===ae.nodeLabel1&&Xe===ae.edgeLabel&&yt<ae.nodeLabel2)&&(ae={nodeLabel1:Ge,edgeLabel:Xe,nodeLabel2:yt})}),ae},de.prototype.isMin=function(){var Q=this,ae=this.dfsCode;if(this.verbose&&console.log("isMin checking",ae),ae.dfsEdgeList.length===1)return!0;var _e=this.directed,Re=ae.toGraph(iu,_e),Ge=Re.nodeMap,Xe=new Dd,yt={};Re.nodes.forEach(function(Dt){var Yt=Q.findForwardRootEdges(Re,Dt);Yt.forEach(function(Vt){var jt=Ge[Vt.to],Zt="".concat(Dt.label,"-").concat(Vt.label,"-").concat(jt.label);yt[Zt]||(yt[Zt]={projected:[],nodeLabel1:Dt.label,edgeLabel:Vt.label,nodeLabel2:jt.label});var Kt={graphId:Re.id,edge:Vt,preNode:null};yt[Zt].projected.push(Kt)})});var kt=this.findMinLabel(yt);if(kt){Xe.dfsEdgeList.push(new hu(0,1,kt.nodeLabel1,kt.edgeLabel,kt.nodeLabel2));var Tt=function Dt(Yt){for(var Vt=Xe.buildRmpath(),jt=Xe.dfsEdgeList[0].nodeEdgeNodeLabel.nodeLabel1,Zt=Xe.dfsEdgeList[Vt[0]].toNode,Kt={},hn=!1,xn=0,wn=_e?-1:0,ir=function(ja){if(hn)return"break";Yt.forEach(function(La){var hr=new fu(La),Qr=Q.findBackwardEdge(Re,hr.edges[Vt[ja]],hr.edges[Vt[0]],hr);Qr&&(Kt[Qr.label]||(Kt[Qr.label]={projected:[],edgeLabel:Qr.label}),Kt[Qr.label].projected.push({graphId:Re.id,edge:Kt,preNode:La}),xn=Xe.dfsEdgeList[Vt[ja]].fromNode,hn=!0)})},pr=Vt.length-1;pr>wn;pr--){var _r=ir(pr);if(_r==="break")break}if(hn){var si=Q.findMinLabel(Kt);Xe.dfsEdgeList.push(new hu(Zt,xn,Go,si.edgeLabel,Go));var Ur=Xe.dfsEdgeList.length-1;return Q.dfsCode.dfsEdgeList[Ur]!==Xe.dfsEdgeList[Ur]?!1:Dt(Kt[si.edgeLabel].projected)}var qr={};hn=!1;var Hi=0;Yt.forEach(function(Ua){var ja=new fu(Ua),La=Q.findForwardPureEdges(Re,ja.edges[Vt[0]],jt,ja);La.length>0&&(hn=!0,Hi=Zt,La.forEach(function(hr){var Qr="".concat(hr.label,"-").concat(Ge[hr.to].label);qr[Qr]||(qr[Qr]={projected:[],edgeLabel:hr.label,nodeLabel2:Ge[hr.to].label}),qr[Qr].projected.push({graphId:Re.id,edge:hr,preNode:Ua})}))});for(var Ri=Vt.length,ci=function(ja){if(hn)return"break";var La=Vt[ja];Yt.forEach(function(hr){var Qr=new fu(hr),Ei=Q.findForwardRmpathEdges(Re,Qr.edges[La],jt,Qr);Ei.length>0&&(hn=!0,Hi=Xe.dfsEdgeList[La].fromNode,Ei.forEach(function(ji){var Ai="".concat(ji.label,"-").concat(Ge[ji.to].label);qr[Ai]||(qr[Ai]={projected:[],edgeLabel:ji.label,nodeLabel2:Ge[ji.to].label}),qr[Ai].projected.push({graphId:Re.id,edge:ji,preNode:hr})}))})},pr=0;pr<Ri;pr++){var Xa=ci(pr);if(Xa==="break")break}if(!hn)return!0;var va=Q.findMinLabel(qr);Xe.dfsEdgeList.push(new hu(Hi,Zt+1,Go,va.edgeLabel,va.nodeLabel2));var da=Xe.dfsEdgeList.length-1;return ae.dfsEdgeList[da]!==Xe.dfsEdgeList[da]?!1:Dt(qr["".concat(va.edgeLabel,"-").concat(va.nodeLabel2)].projected)},It="".concat(kt.nodeLabel1,"-").concat(kt.edgeLabel,"-").concat(kt.nodeLabel2);return Tt(yt[It].projected)}},de.prototype.report=function(){if(!(this.dfsCode.getNodeNum()<this.minNodeNum)){this.counter++;var Q=this.dfsCode.toGraph(this.counter,this.directed);this.frequentSubgraphs.push(Cf(Q))}},de.prototype.subGraphMining=function(Q){var ae=this,_e=this.getSupport(Q);if(!(_e<this.minSupport)&&this.isMin()){this.report();var Re=this.dfsCode.getNodeNum(),Ge=this.dfsCode.buildRmpath(),Xe=this.dfsCode.dfsEdgeList[Ge[0]].toNode,yt=this.dfsCode.dfsEdgeList[0].nodeEdgeNodeLabel.nodeLabel1,kt={},Tt={};Q.forEach(function(It){for(var Dt=ae.graphs[It.graphId],Yt=Dt.nodeMap,Vt=new fu(It),jt=Ge.length-1;jt>=0;jt--){var Zt=ae.findBackwardEdge(Dt,Vt.edges[Ge[jt]],Vt.edges[Ge[0]],Vt);if(Zt){var Kt="".concat(ae.dfsCode.dfsEdgeList[Ge[jt]].fromNode,"-").concat(Zt.label);Tt[Kt]||(Tt[Kt]={projected:[],toNodeId:ae.dfsCode.dfsEdgeList[Ge[jt]].fromNode,edgeLabel:Zt.label}),Tt[Kt].projected.push({graphId:It.graphId,edge:Zt,preNode:It})}}if(!(Re>=ae.maxNodeNum)){var hn=ae.findForwardPureEdges(Dt,Vt.edges[Ge[0]],yt,Vt);hn.forEach(function(wn){var ir="".concat(Xe,"-").concat(wn.label,"-").concat(Yt[wn.to].label);kt[ir]||(kt[ir]={projected:[],fromNodeId:Xe,edgeLabel:wn.label,nodeLabel2:Yt[wn.to].label}),kt[ir].projected.push({graphId:It.graphId,edge:wn,preNode:It})});for(var xn=function(ir){var pr=ae.findForwardRmpathEdges(Dt,Vt.edges[Ge[ir]],yt,Vt);pr.forEach(function(_r){var si="".concat(ae.dfsCode.dfsEdgeList[Ge[ir]].fromNode,"-").concat(_r.label,"-").concat(Yt[_r.to].label);kt[si]||(kt[si]={projected:[],fromNodeId:ae.dfsCode.dfsEdgeList[Ge[ir]].fromNode,edgeLabel:_r.label,nodeLabel2:Yt[_r.to].label}),kt[si].projected.push({graphId:It.graphId,edge:_r,preNode:It})})},jt=0;jt<Ge.length;jt++)xn(jt)}}),Object.keys(Tt).forEach(function(It){var Dt=Tt[It],Yt=Dt.toNodeId,Vt=Dt.edgeLabel;ae.dfsCode.dfsEdgeList.push(new hu(Xe,Yt,"-1",Vt,"-1")),ae.subGraphMining(Tt[It].projected),ae.dfsCode.dfsEdgeList.pop()}),Object.keys(kt).forEach(function(It){var Dt=kt[It],Yt=Dt.fromNodeId,Vt=Dt.edgeLabel,jt=Dt.nodeLabel2;ae.dfsCode.dfsEdgeList.push(new hu(Yt,Xe+1,Go,Vt,jt)),ae.subGraphMining(kt[It].projected),ae.dfsCode.dfsEdgeList.pop()})}},de.prototype.generate1EdgeFrequentSubGraphs=function(){var Q=this.graphs,ae=this.directed,_e=this.minSupport,Re=this.frequentSize1Subgraphs,Ge={},Xe={},yt={},kt={};return Object.keys(Q).forEach(function(Tt){var It=Q[Tt],Dt=It.nodeMap;It.nodes.forEach(function(Yt,Vt){var jt=Yt.label,Zt="".concat(Tt,"-").concat(jt);if(!yt[Zt]){var Kt=Ge[jt]||0;Kt++,Ge[jt]=Kt}yt[Zt]={graphKey:Tt,label:jt},Yt.edges.forEach(function(hn){var xn=jt,wn=Dt[hn.to].label;if(!ae&&xn>wn){var ir=wn;wn=xn,xn=ir}var pr=hn.label,_r="".concat(Tt,"-").concat(xn,"-").concat(pr,"-").concat(wn),si="".concat(xn,"-").concat(pr,"-").concat(wn);if(!Xe[si]){var Ur=Xe[si]||0;Ur++,Xe[si]=Ur}kt[_r]={graphId:Tt,nodeLabel1:xn,edgeLabel:pr,nodeLabel2:wn}})})}),Object.keys(Ge).forEach(function(Tt){var It=Ge[Tt];if(!(It<_e)){var Dt={nodes:[],edges:[]};Dt.nodes.push({id:"0",label:Tt}),Re.push(Dt)}}),Re},de.prototype.run=function(){var Q=this;if(this.frequentSize1Subgraphs=this.generate1EdgeFrequentSubGraphs(),!(this.maxNodeNum<2)){var ae=this.graphs,_e=this.directed,Re={};Object.keys(ae).forEach(function(Ge){var Xe=ae[Ge],yt=Xe.nodeMap;Xe.nodes.forEach(function(kt){var Tt=Q.findForwardRootEdges(Xe,kt);Tt.forEach(function(It){var Dt=yt[It.to],Yt="".concat(kt.label,"-").concat(It.label,"-").concat(Dt.label);Re[Yt]||(Re[Yt]={projected:[],nodeLabel1:kt.label,edgeLabel:It.label,nodeLabel2:Dt.label});var Vt={graphId:Ge,edge:It,preNode:null};Re[Yt].projected.push(Vt)})})}),Object.keys(Re).forEach(function(Ge){var Xe=Re[Ge],yt=Xe.projected,kt=Xe.nodeLabel1,Tt=Xe.edgeLabel,It=Xe.nodeLabel2;Q.dfsCode.dfsEdgeList.push(new hu(0,1,kt,Tt,It)),Q.subGraphMining(yt),Q.dfsCode.dfsEdgeList.pop()})}},de}(),Oi=function(Q,ae,_e,Re){var Ge={};return Object.keys(Q).forEach(function(Xe,yt){var kt=Q[Xe],Tt=new kc(yt,!0,ae),It={};kt.nodes.forEach(function(Dt,Yt){Tt.addNode(Yt,Dt[_e]),It[Dt.id]=Yt}),kt.edges.forEach(function(Dt,Yt){var Vt=It[Dt.source],jt=It[Dt.target];Tt.addEdge(-1,Vt,jt,Dt[Re])}),Tt&&Tt.getNodeNum()&&(Ge[Tt.id]=Tt)}),Ge},On=function(Q,ae,_e){var Re=[];return Q.forEach(function(Ge){var Xe={nodes:[],edges:[]};Ge.nodes.forEach(function(yt){var kt;Xe.nodes.push((kt={id:"".concat(yt.id)},kt[ae]=yt.label,kt))}),Ge.edges.forEach(function(yt){var kt;Xe.edges.push((kt={source:"".concat(yt.from),target:"".concat(yt.to)},kt[_e]=yt.label,kt))}),Re.push(Xe)}),Re},Br="cluster",Hr=function(Q){var ae=Q.graphs,_e=Q.directed,Re=_e===void 0?!1:_e,Ge=Q.nodeLabelProp,Xe=Ge===void 0?Br:Ge,yt=Q.edgeLabelProp,kt=yt===void 0?Br:yt,Tt=Oi(ae,Re,Xe,kt),It=Q.minSupport,Dt=Q.maxNodeNum,Yt=Q.minNodeNum,Vt=Q.verbose,jt=Q.top,Zt={graphs:Tt,minSupport:It,maxNodeNum:Dt,minNodeNum:Yt,top:jt,verbose:Vt,directed:Re},Kt=new wc(Zt);Kt.run();var hn=On(Kt.frequentSubgraphs,Xe,kt);return hn},ui=Hr,ts=function(Q,ae,_e,Re){_e===void 0&&(_e="cluster"),Re===void 0&&(Re=2);var Ge=[],Xe=Q.nodes;return ae.forEach(function(yt,kt){Ge.push(ss(Xe,yt,kt,_e,Re))}),Ge},ss=function(Q,ae,_e,Re,Ge){var Xe=[_e],yt=[],kt={};return ae.forEach(function(Tt,It){if(Tt<=Ge&&_e!==It){Xe.push(It),yt.push(Q[It]);var Dt=Q[It][Re];kt[Dt]?(kt[Dt].count++,kt[Dt].dists.push(Tt)):kt[Dt]={count:1,dists:[Tt]}}}),Object.keys(kt).forEach(function(Tt){kt[Tt].dists=kt[Tt].dists.sort(function(It,Dt){return It-Dt})}),{nodeIdx:_e,nodeId:Q[_e].id,nodeIdxs:Xe,neighbors:yt,neighborNum:Xe.length-1,nodeLabelCountMap:kt}},Fd=function(Q,ae,_e,Re,Ge){var Xe=Math.ceil(_e/ae),yt={},kt=0;return Re.forEach(function(Tt,It){for(var Dt=0,Yt=0,Vt=Tt.nodeIdxs,jt=Tt.neighborNum-1;Dt<Xe;){for(var Zt=Vt[1+Math.floor(Math.random()*jt)],Kt=0;(yt["".concat(It,"-").concat(Zt)]||yt["".concat(Zt,"-").concat(It)])&&(Zt=Math.floor(Math.random()*ae),Kt++,!(Kt>2*ae)););if(Kt<2*ae&&(yt["".concat(It,"-").concat(Zt)]={start:It,end:Zt,distance:Ge[It][Zt]},Dt++,kt++,kt>=_e))return yt;if(Yt++,Yt>2*ae)break}if(Dt<Xe){var hn=Xe-Dt;Xe=(Xe+hn)/(ae-It-1)}}),yt},Yu=function(Q,ae,_e,Re){var Ge=_e.nodes;return Re||(Re={}),Object.keys(Q).forEach(function(Xe){var yt,kt;if(!(Re&&Re[Xe])){Re[Xe]={nodes:[],edges:[]};var Tt=Q[Xe],It=(yt=ae[Tt.start])===null||yt===void 0?void 0:yt.nodeIdxs,Dt=(kt=ae[Tt.end])===null||kt===void 0?void 0:kt.nodeIdxs;if(!(!It||!Dt)){var Yt=new Set(Dt),Vt=It.filter(function(xn){return Yt.has(xn)});if(!(!Vt||!Vt.length)){for(var jt={},Zt=Vt.length,Kt=0;Kt<Zt;Kt++){var hn=Ge[Vt[Kt]];Re[Xe].nodes.push(hn),jt[hn.id]=!0}_e.edges.forEach(function(xn){jt[xn.source]&&jt[xn.target]&&Re[Xe].edges.push(xn)})}}}}),Re},Zu=function(Q,ae,_e,Re){var Ge,Xe,yt={};Q.nodes.forEach(function(Tt){yt[Tt.id]=Tt});var kt=0;return!(!((Ge=ae==null?void 0:ae.edges)===null||Ge===void 0)&&Ge.length)||((Xe=ae==null?void 0:ae.nodes)===null||Xe===void 0?void 0:Xe.length)<2?0:(Q.edges.forEach(function(Tt){var It=yt[Tt.source][_e],Dt=yt[Tt.target][_e],Yt=ae==null?void 0:ae.nodes[0][_e],Vt=ae==null?void 0:ae.nodes[1][_e],jt=ae==null?void 0:ae.edges[0][Re];Tt[Re]===jt&&(It===Yt&&Dt===Vt||It===Vt&&Dt===Yt)&&kt++}),kt)},yl=function(Q,ae,_e){for(var Re=1/0,Ge=0,Xe=function(Tt){var It=Q[Tt],Dt=Object.keys(It).sort(function(xn,wn){return It[xn]-It[wn]}),Yt=10,Vt=[];Dt.forEach(function(xn,wn){Vt[wn%Yt]||(Vt[wn%Yt]={graphs:[],totalCount:0,aveCount:0}),Vt[wn%Yt].graphs.push(xn),Vt[wn%Yt].totalCount+=It[xn]});var jt=0,Zt=[];Vt.forEach(function(xn){var wn=xn.totalCount/xn.graphs.length;xn.aveCount=wn,Zt.push(wn);var ir=0,pr=xn.length;xn.graphs.forEach(function(_r,si){var Ur=It[_r];xn.graphs.forEach(function(qr,Hi){si!==Hi&&(ir+=Math.abs(Ur-It[qr]))})}),ir/=pr*(pr-1)/2,jt+=ir}),jt/=Vt.length;var Kt=0;Zt.forEach(function(xn,wn){Zt.forEach(function(ir,pr){wn!==pr&&(Kt+=Math.abs(xn-ir))}),Kt/=Zt.length*(Zt.length-1)/2});var hn=Kt-jt;Re<hn&&(Re=hn,Ge=Tt)},yt=0;yt<ae;yt++)Xe(yt);return{structure:_e[Ge],structureCountMap:Q[Ge]}},Sc=function(Q,ae){var _e={},Re={};return Q.forEach(function(Ge,Xe){_e[Ge.id]={idx:Xe,node:Ge,degree:0,inDegree:0,outDegree:0};var yt=Ge[ae];Re[yt]||(Re[yt]=[]),Re[yt].push(Ge)}),{nodeMap:_e,nodeLabelMap:Re}},Cv=function(Q,ae,_e){var Re={},Ge={};return Q.forEach(function(Xe,yt){Re["".concat(K)]={idx:yt,edge:Xe};var kt=Xe[ae];Ge[kt]||(Ge[kt]=[]),Ge[kt].push(Xe);var Tt=_e[Xe.source];Tt&&(Tt.degree++,Tt.outDegree++);var It=_e[Xe.target];It&&(It.degree++,It.inDegree++)}),{edgeMap:Re,edgeLabelMap:Ge}},ag=function(Q,ae,_e){var Re=ae.length,Ge={};return ae.forEach(function(Xe,yt){for(var kt=_e?0:yt+1,Tt=Q[yt].id,It=kt;It<Re;It++)if(yt!==It){var Dt=Q[It].id,Yt=Xe[It];Ge["".concat(Tt,"-").concat(Dt)]=Yt,_e||(Ge["".concat(Dt,"-").concat(Tt)]=Yt)}}),Ge},Tm=function(Q,ae,_e,Re,Ge,Xe,yt,kt,Tt,It,Dt){var Yt,Vt="".concat(ae.id,"-").concat(_e.id);if(It&&It[Vt])return It[Vt];var jt=Dt?Dt[Vt]:void 0;if(!jt){var Zt=(Yt={},Yt[Vt]={start:Re[ae.id].idx,end:Re[_e.id].idx,distance:Ge},Yt);Dt=Yu(Zt,Xe,Q,Dt),jt=Dt[Vt]}return Zu(jt,yt,kt,Tt)},Da=function(Q,ae,_e,Re){var Ge,Xe,yt,kt=(Ge=Q[ae])===null||Ge===void 0?void 0:Ge.degree,Tt=(Xe=Q[ae])===null||Xe===void 0?void 0:Xe.inDegree,It=(yt=Q[ae])===null||yt===void 0?void 0:yt.outDegree;return Q[ae]===void 0&&(kt=1/0,Tt=1/0,It=1/0,Re[ae].forEach(function(Dt){var Yt=_e[Dt.id].degree;kt>Yt&&(kt=Yt);var Vt=_e[Dt.id].inDegree;Tt>Vt&&(Tt=Vt);var jt=_e[Dt.id].outDegree;It>jt&&(It=jt)}),Q[ae]={degree:kt,inDegree:Tt,outDegree:It}),{minPatternNodeLabelDegree:kt,minPatternNodeLabelInDegree:Tt,minPatternNodeLabelOutDegree:It}},vu=function(Q,ae,_e,Re,Ge,Xe,yt){var kt;if(_e===void 0&&(_e=!1),Xe===void 0&&(Xe="cluster"),yt===void 0&&(yt="cluster"),!(!Q||!Q.nodes)){var Tt=Q.nodes.length;if(Tt){var It=ua(Q,_e),Dt=ua(ae,_e),Yt=ag(Q.nodes,It,_e),Vt=ag(ae.nodes,Dt,_e),jt=Sc(Q.nodes,Xe),Zt=jt.nodeMap,Kt=jt.nodeLabelMap,hn=Sc(ae.nodes,Xe),xn=hn.nodeMap,wn=hn.nodeLabelMap;Cv(Q.edges,yt,Zt);var ir=Cv(ae.edges,yt,xn).edgeLabelMap,pr=[];Dt==null||Dt.forEach(function(Li){pr=pr.concat(Li)}),Ge||(Ge=Math.max.apply(Math,pe(pe([],pr,!1),[2],!1))),Re||(Re=Ge);var _r=ts(Q,It,Xe,Re),si=ts(ae,Dt,Xe,Re),Ur=Math.min(100,Tt*(Tt-1)/2),qr=Fd(Re,Tt,Ur,_r,It),Hi=Yu(qr,_r,Q),Ri=10,ci=1,Xa=1,va=4,da={graphs:Hi,nodeLabelProp:Xe,edgeLabelProp:yt,minSupport:ci,minNodeNum:Xa,maxNodeNum:va,directed:_e},Ua=ui(da).slice(0,Ri),ja=Ua.length,La=[];Ua.forEach(function(Li,ns){La[ns]={},Object.keys(Hi).forEach(function(ka){var Ma=Hi[ka],mo=Zu(Ma,Li,Xe,yt);La[ns][ka]=mo})});var hr=yl(La,ja,Ua),Qr=hr.structure,Ei=hr.structureCountMap,ji=ae.nodes[0],Ai=[],go=(kt=ae.nodes[0])===null||kt===void 0?void 0:kt[Xe],_o=-1/0;ae.nodes.forEach(function(Li){var ns=Li[Xe],ka=Kt[ns];(ka==null?void 0:ka.length)>_o&&(_o=ka.length,Ai=ka,go=ns,ji=Li)});var ac={},Ku={},Ou={},Mh={},Ru={},Ph={};Object.keys(wn).forEach(function(Li,ns){Ru[Li]=[],_e&&(Ph[Li]=[]);var ka=-1/0,Ma=wn[Li],mo={};Ma.forEach(function(Ja){var Ia=Vt["".concat(ji.id,"-").concat(Ja.id)];if(Ia&&Ru[Li].push(Ia),ka<Ia&&(ka=Ia),mo["".concat(ji.id,"-").concat(Ja.id)]={start:0,end:xn[Ja.id].idx,distance:Ia},_e){var po=Vt["".concat(Ja.id,"-").concat(ji.id)];po&&Ph[Li].push(po)}}),Ru[Li]=Ru[Li].sort(function(Ja,Ia){return Ja-Ia}),_e&&(Ph[Li]=Ph[Li].sort(function(Ja,Ia){return Ja-Ia})),Ku=Yu(mo,si,ae,Ku);var oi=[];if(Object.keys(mo).forEach(function(Ja){if(Ou[Ja]){oi.push(Ou[Ja]);return}var Ia=Ku[Ja];Ou[Ja]=Zu(Ia,Qr,Xe,yt),oi.push(Ou[Ja])}),oi=oi.sort(function(Ja,Ia){return Ia-Ja}),Mh["".concat(ji.id,"-").concat(Li)]=oi,Li!==go)for(var Ha=(Ai==null?void 0:Ai.length)||0,Ka=function(Ia){var po=Ai[Ia],qu=_r[Zt[po.id].idx],zo=qu.nodeLabelCountMap[Li],sg=wn[Li].length;if(!zo||zo.count<sg)return Ai.splice(Ia,1),"continue";for(var e_=!1,ec=0;ec<sg;ec++)if(zo.dists[ec]>Ru[Li][ec]){e_=!0;break}if(e_)return Ai.splice(Ia,1),"continue";var fd={};qu.neighbors.forEach(function(Au){var sc=Yt["".concat(po.id,"-").concat(Au.id)];fd["".concat(po.id,"-").concat(Au.id)]={start:Zt[po.id].idx,end:Zt[Au.id].idx,distance:sc}}),Hi=Yu(fd,_r,Q,Hi);var Bd=[];Object.keys(fd).forEach(function(Au){if(Ei[Au]){Bd.push(Ei[Au]);return}var sc=Hi[Au];Ei[Au]=Zu(sc,Qr,Xe,yt),Bd.push(Ei[Au])}),Bd=Bd.sort(function(Au,sc){return sc-Au});for(var Mf=!1,ec=0;ec<sg;ec++)if(Bd[ec]<oi[ec]){Mf=!0;break}if(Mf)return Ai.splice(Ia,1),"continue"},El=Ha-1;El>=0;El--)Ka(El)});var xl=[];Ai==null||Ai.forEach(function(Li){for(var ns=Zt[Li.id].idx,ka=ss(Q.nodes,It[ns],ns,Xe,Ge),Ma=ka.neighbors,mo=Ma.length,oi=!1,Ha=mo-1;Ha>=0;Ha--){if(Ma.length+1<ae.nodes.length){oi=!0;return}var Ka=Ma[Ha],El=Ka[Xe];if(!wn[El]||!wn[El].length){Ma.splice(Ha,1);continue}if(!Ru[El]||!Ru[El].length){Ma.splice(Ha,1);continue}var Ja="".concat(Li.id,"-").concat(Ka.id),Ia=Yt[Ja],po=Ru[El].length-1,qu=Ru[El][po];if(Ia>qu){Ma.splice(Ha,1);continue}if(_e){var zo="".concat(Ka.id,"-").concat(Li.id),sg=Yt[zo];po=Ph[El].length-1;var e_=Ph[El][po];if(sg>e_){Ma.splice(Ha,1);continue}}var ec=Ei[Ja]?Ei[Ja]:Tm(Q,Li,Ka,Zt,Ia,_r,Qr,Xe,yt,Ei,Hi),fd="".concat(ji.id,"-").concat(El),Bd=Mh[fd][Mh[fd].length-1];if(ec<Bd){Ma.splice(Ha,1);continue}var Mf=Da(ac,El,xn,wn),Au=Mf.minPatternNodeLabelDegree,sc=Mf.minPatternNodeLabelInDegree,rs=Mf.minPatternNodeLabelOutDegree;if(Zt[Ka.id].degree<Au){Ma.splice(Ha,1);continue}}oi||xl.push({nodes:[Li].concat(Ma)})});var Mm=li(ae,ji.id,!1).length,Ju={};_e?(Object.keys(Mm).forEach(function(Li){var ns=xn[Li].node[Xe];Ju[ns]?Ju[ns].push(Mm[Li]):Ju[ns]=[Mm[Li]]}),Object.keys(Ju).forEach(function(Li){Ju[Li].sort(function(ns,ka){return ns-ka})})):Ju=Ru;for(var Qg=xl.length,Qu=function(ns){var ka=xl[ns],Ma=ka.nodes[0],mo={},oi={};ka.nodes.forEach(function(ws,oc){oi[ws.id]={idx:oc,node:ws,degree:0,inDegree:0,outDegree:0};var bl=ws[Xe];mo[bl]?mo[bl]++:mo[bl]=1});var Ha=[],Ka={};Q.edges.forEach(function(ws){oi[ws.source]&&oi[ws.target]&&(Ha.push(ws),Ka[ws[yt]]?Ka[ws[yt]]++:Ka[ws[yt]]=1,oi[ws.source].degree++,oi[ws.target].degree++,oi[ws.source].outDegree++,oi[ws.target].inDegree++)});for(var El=Object.keys(ir).length,Ja=!1,Ia=0;Ia<El;Ia++){var po=Object.keys(ir)[Ia];if(!Ka[po]||Ka[po]<ir[po].length){Ja=!0;break}}if(Ja)return xl.splice(ns,1),"continue";var qu=Ha.length;if(qu<ae.edges.length)return xl.splice(ns,1),"break";for(var zo=!1,sg=function(oc){var bl=Ha[oc],$d=bl[yt],Pv=ir[$d];if(!Pv||!Pv.length)return Ka[$d]--,Pv&&Ka[$d]<Pv.length?(zo=!0,"break"):(Ha.splice(oc,1),oi[bl.source].degree--,oi[bl.target].degree--,oi[bl.source].outDegree--,oi[bl.target].inDegree--,"continue");var Yx=oi[bl.source].node[Xe],Qw=oi[bl.target].node[Xe],t_=!1;if(Pv.forEach(function(k0){var Zx=xn[k0.source].node,Xx=xn[k0.target].node;Zx[Xe]===Yx&&Xx[Xe]===Qw&&(t_=!0),!_e&&Zx[Xe]===Qw&&Xx[Xe]===Yx&&(t_=!0)}),!t_)return Ka[$d]--,Pv&&Ka[$d]<Pv.length?(zo=!0,"break"):(Ha.splice(oc,1),oi[bl.source].degree--,oi[bl.target].degree--,oi[bl.source].outDegree--,oi[bl.target].inDegree--,"continue")},Ia=qu-1;Ia>=0;Ia--){var e_=sg(Ia);if(e_==="break")break}if(zo)return xl.splice(ns,1),"continue";ka.edges=Ha;var ec=li(ka,ka.nodes[0].id,!1).length;if(Object.keys(ec).reverse().forEach(function(ws){if(!(ws===ka.nodes[0].id||zo)){if(ec[ws]===1/0){var oc=oi[ws].node[Xe];if(mo[oc]--,mo[oc]<wn[oc].length){zo=!0;return}var bl=ka.nodes.indexOf(oi[ws].node);ka.nodes.splice(bl,1),oi[ws]=void 0;return}var $d=Zt[ws].node[Xe];if(!Ju[$d]||!Ju[$d].length||ec[ws]>Ju[$d][Ju[$d].length-1]){var oc=oi[ws].node[Xe];if(mo[oc]--,mo[oc]<wn[oc].length){zo=!0;return}var bl=ka.nodes.indexOf(oi[ws].node);ka.nodes.splice(bl,1),oi[ws]=void 0}}}),zo)return xl.splice(ns,1),"continue";for(var fd=!0,Bd=0;fd&&!zo;){fd=!1;var Mf=_e?oi[Ma.id].degree<xn[ji.id].degree||oi[Ma.id].inDegree<xn[ji.id].inDegree||oi[Ma.id].outDegree<xn[ji.id].outDegree:oi[Ma.id].degree<xn[ji.id].degree;if(Mf){zo=!0;break}if(mo[Ma[Xe]]<wn[Ma[Xe]].length){zo=!0;break}for(var Au=ka.nodes.length,sc=Au-1;sc>=0;sc--){var rs=ka.nodes[sc],Hx=oi[rs.id].degree,Ww=oi[rs.id].inDegree,Yw=oi[rs.id].outDegree,Zw=rs[Xe],Pm=Da(ac,Zw,xn,wn),Wx=Pm.minPatternNodeLabelDegree,Xw=Pm.minPatternNodeLabelInDegree,Kw=Pm.minPatternNodeLabelOutDegree,Jw=_e?Hx<Wx||Ww<Xw||Yw<Kw:Hx<Wx;if(Jw){if(mo[rs[Xe]]--,mo[rs[Xe]]<wn[rs[Xe]].length){zo=!0;break}ka.nodes.splice(sc,1),oi[rs.id]=void 0,fd=!0}}if(zo||!fd&&Bd!==0)break;qu=Ha.length;for(var Nm=qu-1;Nm>=0;Nm--){var Nh=Ha[Nm];if(!oi[Nh.source]||!oi[Nh.target]){Ha.splice(Nm,1);var Om=Nh[yt];if(Ka[Om]--,oi[Nh.source]&&(oi[Nh.source].degree--,oi[Nh.source].outDegree--),oi[Nh.target]&&(oi[Nh.target].degree--,oi[Nh.target].inDegree--),ir[Om]&&Ka[Om]<ir[Om].length){zo=!0;break}fd=!0}}Bd++}if(zo||zo||ka.nodes.length<ae.nodes.length||Ha.length<ae.edges.length)return xl.splice(ns,1),"continue"},_u=Qg-1;_u>=0;_u--){var qg=Qu(_u);if(qg==="break")break}for(var Tc=xl.length,hd=function(ns){var ka=xl[ns],Ma={};ka.edges.forEach(function(Ha){var Ka="".concat(Ha.source,"-").concat(Ha.target,"-").concat(Ha.label);Ma[Ka]?Ma[Ka]++:Ma[Ka]=1});for(var mo=function(Ka){var El=xl[Ka],Ja={};El.edges.forEach(function(po){var qu="".concat(po.source,"-").concat(po.target,"-").concat(po.label);Ja[qu]?Ja[qu]++:Ja[qu]=1});var Ia=!0;Object.keys(Ja).length!==Object.keys(Ma).length?Ia=!1:Object.keys(Ma).forEach(function(po){Ja[po]!==Ma[po]&&(Ia=!1)}),Ia&&xl.splice(Ka,1)},oi=Tc-1;oi>ns;oi--)mo(oi);Tc=xl.length},_u=0;_u<=Tc-1;_u++)hd(_u);return xl}}},gu=vu,Xu=function(){function de(Q){Q===void 0&&(Q=10),this.linkedList=new I,this.maxStep=Q}return Object.defineProperty(de.prototype,"length",{get:function(){return this.linkedList.toArray().length},enumerable:!1,configurable:!0}),de.prototype.isEmpty=function(){return!this.linkedList.head},de.prototype.isMaxStack=function(){return this.toArray().length>=this.maxStep},de.prototype.peek=function(){return this.isEmpty()?null:this.linkedList.head.value},de.prototype.push=function(Q){this.linkedList.prepend(Q),this.length>this.maxStep&&this.linkedList.deleteTail()},de.prototype.pop=function(){var Q=this.linkedList.deleteHead();return Q?Q.value:null},de.prototype.toArray=function(){return this.linkedList.toArray().map(function(Q){return Q.value})},de.prototype.clear=function(){for(;!this.isEmpty();)this.pop()},de}(),Mv=Xu,Cm=Et,jx={getAdjMatrix:H,breadthFirstSearch:Ue,connectedComponent:De,getDegree:Me,getInDegree:Oe,getOutDegree:re,detectCycle:Et,detectDirectedCycle:Cm,detectAllCycles:rt,detectAllDirectedCycle:He,detectAllUndirectedCycle:Je,depthFirstSearch:Ee,dijkstra:li,findAllPath:ha,findShortestPath:Xi,floydWarshall:ua,labelPropagation:Ra,louvain:ra,iLouvain:Ki,kCore:bs,kMeans:ks,cosineSimilarity:fa,nodesCosineSimilarity:ls,minimumSpanningTree:jl,pageRank:ic,getNeighbors:F,Stack:Mv,GADDI:gu}},90494:function(ke,ve){"use strict";var k="*",M=function(){function H(){this._events={}}return H.prototype.on=function(U,Y,N){return this._events[U]||(this._events[U]=[]),this._events[U].push({callback:Y,once:!!N}),this},H.prototype.once=function(U,Y){return this.on(U,Y,!0)},H.prototype.emit=function(U){for(var Y=this,N=[],I=1;I<arguments.length;I++)N[I-1]=arguments[I];var C=this._events[U]||[],A=this._events[k]||[],F=function(P){for(var W=P.length,K=0;K<W;K++)if(P[K]){var ge=P[K],be=ge.callback,Ue=ge.once;Ue&&(P.splice(K,1),P.length===0&&delete Y._events[U],W--,K--),be.apply(Y,N)}};F(C),F(A)},H.prototype.off=function(U,Y){if(!U)this._events={};else if(!Y)delete this._events[U];else{for(var N=this._events[U]||[],I=N.length,C=0;C<I;C++)N[C].callback===Y&&(N.splice(C,1),I--,C--);N.length===0&&delete this._events[U]}return this},H.prototype.getEvents=function(){return this._events},H}();ve.Z=M},11702:function(ke,ve,k){"use strict";k.d(ve,{TE:function(){return Y},U4:function(){return Te},Xk:function(){return Ee},Y1:function(){return Ye},_x:function(){return He},hE:function(){return X},l5:function(){return We},ph:function(){return Ve},vp:function(){return De},x4:function(){return we}});var M=k(97582),H=k(80450),U=k(31437);function Y(ie,Ie,je,Be){var et=ie-je,gt=Ie-Be;return Math.sqrt(et*et+gt*gt)}function N(ie,Ie){var je=Math.min.apply(Math,(0,M.ev)([],(0,M.CR)(ie),!1)),Be=Math.min.apply(Math,(0,M.ev)([],(0,M.CR)(Ie),!1)),et=Math.max.apply(Math,(0,M.ev)([],(0,M.CR)(ie),!1)),gt=Math.max.apply(Math,(0,M.ev)([],(0,M.CR)(Ie),!1));return{x:je,y:Be,width:et-je,height:gt-Be}}function I(ie){return(ie+Math.PI*2)%(Math.PI*2)}function C(ie,Ie){var je=Math.abs(ie);return Ie>0?je:je*-1}function A(ie,Ie,je,Be,et,gt){var Mt=je,Rt=Be;if(Mt===0||Rt===0)return{x:ie,y:Ie};for(var Ft=et-ie,Xt=gt-Ie,Qt=Math.abs(Ft),an=Math.abs(Xt),In=Mt*Mt,Xr=Rt*Rt,Cn=Math.PI/4,or=0,ei=0,mr=0;mr<4;mr++){or=Mt*Math.cos(Cn),ei=Rt*Math.sin(Cn);var Fr=(In-Xr)*Math.pow(Math.cos(Cn),3)/Mt,ta=(Xr-In)*Math.pow(Math.sin(Cn),3)/Rt,Qa=or-Fr,Bt=ei-ta,en=Qt-Fr,Jt=an-ta,nn=Math.hypot(Bt,Qa),sr=Math.hypot(Jt,en),Pn=nn*Math.asin((Qa*Jt-Bt*en)/(nn*sr)),Fn=Pn/Math.sqrt(In+Xr-or*or-ei*ei);Cn+=Fn,Cn=Math.min(Math.PI/2,Math.max(0,Cn))}return{x:ie+C(or,Ft),y:Ie+C(ei,Xt)}}function F(ie,Ie,je,Be,et,gt,Mt,Rt){return-1*je*Math.cos(et)*Math.sin(Rt)-Be*Math.sin(et)*Math.cos(Rt)}function P(ie,Ie,je,Be,et,gt,Mt,Rt){return-1*je*Math.sin(et)*Math.sin(Rt)+Be*Math.cos(et)*Math.cos(Rt)}function W(ie,Ie,je){return Math.atan(-Ie/ie*Math.tan(je))}function K(ie,Ie,je){return Math.atan(Ie/(ie*Math.tan(je)))}function ge(ie,Ie,je,Be,et,gt){return je*Math.cos(et)*Math.cos(gt)-Be*Math.sin(et)*Math.sin(gt)+ie}function be(ie,Ie,je,Be,et,gt){return je*Math.sin(et)*Math.cos(gt)+Be*Math.cos(et)*Math.sin(gt)+Ie}function Ue(ie,Ie,je,Be){var et=Math.atan2(Be*ie,je*Ie);return(et+Math.PI*2)%(Math.PI*2)}function Ne(ie,Ie,je){return{x:ie*Math.cos(je),y:Ie*Math.sin(je)}}function ye(ie,Ie,je){var Be=Math.cos(je),et=Math.sin(je);return[ie*Be-Ie*et,ie*et+Ie*Be]}function De(ie,Ie,je,Be,et,gt,Mt){for(var Rt=W(je,Be,et),Ft=1/0,Xt=-1/0,Qt=[gt,Mt],an=-Math.PI*2;an<=Math.PI*2;an+=Math.PI){var In=Rt+an;gt<Mt?gt<In&&In<Mt&&Qt.push(In):Mt<In&&In<gt&&Qt.push(In)}for(var an=0;an<Qt.length;an++){var Xr=ge(ie,Ie,je,Be,et,Qt[an]);Xr<Ft&&(Ft=Xr),Xr>Xt&&(Xt=Xr)}for(var Cn=K(je,Be,et),or=1/0,ei=-1/0,mr=[gt,Mt],an=-Math.PI*2;an<=Math.PI*2;an+=Math.PI){var Fr=Cn+an;gt<Mt?gt<Fr&&Fr<Mt&&mr.push(Fr):Mt<Fr&&Fr<gt&&mr.push(Fr)}for(var an=0;an<mr.length;an++){var ta=be(ie,Ie,je,Be,et,mr[an]);ta<or&&(or=ta),ta>ei&&(ei=ta)}return{x:Ft,y:or,width:Xt-Ft,height:ei-or}}function Ce(ie,Ie,je,Be,et,gt,Mt,Rt,Ft){var Xt=ye(Rt-ie,Ft-Ie,-et),Qt=__read(Xt,2),an=Qt[0],In=Qt[1],Xr=A(0,0,je,Be,an,In),Cn=Ue(je,Be,Xr.x,Xr.y);Cn<gt?Xr=Ne(je,Be,gt):Cn>Mt&&(Xr=Ne(je,Be,Mt));var or=ye(Xr.x,Xr.y,et);return{x:or[0]+ie,y:or[1]+Ie}}function Me(ie,Ie,je,Be,et,gt,Mt,Rt){var Ft=(Mt-gt)*Rt+gt,Xt=F(ie,Ie,je,Be,et,gt,Mt,Ft),Qt=P(ie,Ie,je,Be,et,gt,Mt,Ft);return I(Math.atan2(Qt,Xt))}var Oe=1e-4;function re(ie,Ie,je,Be,et,gt){var Mt=-1,Rt=1/0,Ft=[je,Be],Xt=20;gt&>>200&&(Xt=gt/10);for(var Qt=1/Xt,an=Qt/10,In=0;In<=Xt;In++){var Xr=In*Qt,Cn=[et.apply(void 0,(0,M.ev)([],(0,M.CR)(ie.concat([Xr])),!1)),et.apply(void 0,(0,M.ev)([],(0,M.CR)(Ie.concat([Xr])),!1))],or=Y(Ft[0],Ft[1],Cn[0],Cn[1]);or<Rt&&(Mt=Xr,Rt=or)}if(Mt===0)return{x:ie[0],y:Ie[0]};if(Mt===1){var ei=ie.length;return{x:ie[ei-1],y:Ie[ei-1]}}Rt=1/0;for(var In=0;In<32&&!(an<Oe);In++){var mr=Mt-an,Fr=Mt+an,Cn=[et.apply(void 0,(0,M.ev)([],(0,M.CR)(ie.concat([mr])),!1)),et.apply(void 0,(0,M.ev)([],(0,M.CR)(Ie.concat([mr])),!1))],or=Y(Ft[0],Ft[1],Cn[0],Cn[1]);if(mr>=0&&or<Rt)Mt=mr,Rt=or;else{var ta=[et.apply(void 0,(0,M.ev)([],(0,M.CR)(ie.concat([Fr])),!1)),et.apply(void 0,(0,M.ev)([],(0,M.CR)(Ie.concat([Fr])),!1))],Qa=Y(Ft[0],Ft[1],ta[0],ta[1]);Fr<=1&&Qa<Rt?(Mt=Fr,Rt=Qa):an*=.5}}return{x:et.apply(void 0,(0,M.ev)([],(0,M.CR)(ie.concat([Mt])),!1)),y:et.apply(void 0,(0,M.ev)([],(0,M.CR)(Ie.concat([Mt])),!1))}}function q(ie,Ie){for(var je=0,Be=ie.length,et=0;et<Be;et++){var gt=ie[et],Mt=Ie[et],Rt=ie[(et+1)%Be],Ft=Ie[(et+1)%Be];je+=Y(gt,Mt,Rt,Ft)}return je/2}function ce(ie,Ie,je,Be){return N([ie,je],[Ie,Be])}function Ee(ie,Ie,je,Be){return Y(ie,Ie,je,Be)}function Te(ie,Ie,je,Be,et){return{x:(1-et)*ie+et*je,y:(1-et)*Ie+et*Be}}function Je(ie,Ie,je,Be,et,gt){var Mt=(je-ie)*(et-ie)+(Be-Ie)*(gt-Ie);if(Mt<0)return Y(ie,Ie,et,gt);var Rt=(je-ie)*(je-ie)+(Be-Ie)*(Be-Ie);return Mt>Rt?Y(je,Be,et,gt):He(ie,Ie,je,Be,et,gt)}function He(ie,Ie,je,Be,et,gt){var Mt=[je-ie,Be-Ie];if(U.I6(Mt,[0,0]))return Math.sqrt((et-ie)*(et-ie)+(gt-Ie)*(gt-Ie));var Rt=[-Mt[1],Mt[0]];U.Fv(Rt,Rt);var Ft=[et-ie,gt-Ie];return Math.abs(U.AK(Ft,Rt))}function rt(ie,Ie,je,Be){return Math.atan2(Be-Ie,je-ie)}function Et(ie,Ie,je,Be,et){var gt=1-et;return gt*gt*gt*ie+3*Ie*et*gt*gt+3*je*et*et*gt+Be*et*et*et}function lt(ie,Ie,je,Be,et){var gt=1-et;return 3*(gt*gt*(Ie-ie)+2*gt*et*(je-Ie)+et*et*(Be-je))}function st(ie,Ie,je,Be){var et=-3*ie+9*Ie-9*je+3*Be,gt=6*ie-12*Ie+6*je,Mt=3*Ie-3*ie,Rt=[],Ft,Xt,Qt;if((0,H.Z)(et,0))(0,H.Z)(gt,0)||(Ft=-Mt/gt,Ft>=0&&Ft<=1&&Rt.push(Ft));else{var an=gt*gt-4*et*Mt;(0,H.Z)(an,0)?Rt.push(-gt/(2*et)):an>0&&(Qt=Math.sqrt(an),Ft=(-gt+Qt)/(2*et),Xt=(-gt-Qt)/(2*et),Ft>=0&&Ft<=1&&Rt.push(Ft),Xt>=0&&Xt<=1&&Rt.push(Xt))}return Rt}function mt(ie,Ie,je,Be,et,gt,Mt,Rt,Ft){var Xt=Et(ie,je,et,Mt,Ft),Qt=Et(Ie,Be,gt,Rt,Ft),an=Te(ie,Ie,je,Be,Ft),In=Te(je,Be,et,gt,Ft),Xr=Te(et,gt,Mt,Rt,Ft),Cn=Te(an.x,an.y,In.x,In.y,Ft),or=Te(In.x,In.y,Xr.x,Xr.y,Ft);return[[ie,Ie,an.x,an.y,Cn.x,Cn.y,Xt,Qt],[Xt,Qt,or.x,or.y,Xr.x,Xr.y,Mt,Rt]]}function fe(ie,Ie,je,Be,et,gt,Mt,Rt,Ft){if(Ft===0)return q([ie,je,et,Mt],[Ie,Be,gt,Rt]);var Xt=mt(ie,Ie,je,Be,et,gt,Mt,Rt,.5),Qt=__spreadArray(__spreadArray([],__read(Xt[0]),!1),[Ft-1],!1),an=__spreadArray(__spreadArray([],__read(Xt[1]),!1),[Ft-1],!1);return fe.apply(void 0,__spreadArray([],__read(Qt),!1))+fe.apply(void 0,__spreadArray([],__read(an),!1))}function We(ie,Ie,je,Be,et,gt,Mt,Rt){for(var Ft=[ie,Mt],Xt=[Ie,Rt],Qt=st(ie,je,et,Mt),an=st(Ie,Be,gt,Rt),In=0;In<Qt.length;In++)Ft.push(Et(ie,je,et,Mt,Qt[In]));for(var In=0;In<an.length;In++)Xt.push(Et(Ie,Be,gt,Rt,an[In]));return N(Ft,Xt)}function ht(ie,Ie,je,Be,et,gt,Mt,Rt){return fe(ie,Ie,je,Be,et,gt,Mt,Rt,3)}function Pt(ie,Ie,je,Be,et,gt,Mt,Rt,Ft,Xt,Qt){return re([ie,je,et,Mt],[Ie,Be,gt,Rt],Ft,Xt,Et,Qt)}function Ve(ie,Ie,je,Be,et,gt,Mt,Rt,Ft,Xt,Qt){var an=Pt(ie,Ie,je,Be,et,gt,Mt,Rt,Ft,Xt,Qt);return Y(an.x,an.y,Ft,Xt)}function it(ie,Ie,je,Be,et,gt,Mt,Rt,Ft){return{x:Et(ie,je,et,Mt,Ft),y:Et(Ie,Be,gt,Rt,Ft)}}function ft(ie,Ie,je,Be,et,gt,Mt,Rt,Ft){var Xt=lt(ie,je,et,Mt,Ft),Qt=lt(Ie,Be,gt,Rt,Ft);return I(Math.atan2(Qt,Xt))}function ze(ie){for(var Ie=0,je=[],Be=0;Be<ie.length-1;Be++){var et=ie[Be],gt=ie[Be+1],Mt=Y(et[0],et[1],gt[0],gt[1]),Rt={from:et,to:gt,length:Mt};je.push(Rt),Ie+=Mt}return{segments:je,totalLength:Ie}}function Qe(ie){if(ie.length<2)return 0;for(var Ie=0,je=0;je<ie.length-1;je++){var Be=ie[je],et=ie[je+1];Ie+=Y(Be[0],Be[1],et[0],et[1])}return Ie}function Se(ie,Ie){if(Ie>1||Ie<0||ie.length<2)return null;var je=ze(ie),Be=je.segments,et=je.totalLength;if(et===0)return{x:ie[0][0],y:ie[0][1]};for(var gt=0,Mt=null,Rt=0;Rt<Be.length;Rt++){var Ft=Be[Rt],Xt=Ft.from,Qt=Ft.to,an=Ft.length/et;if(Ie>=gt&&Ie<=gt+an){var In=(Ie-gt)/an;Mt=Te(Xt[0],Xt[1],Qt[0],Qt[1],In);break}gt+=an}return Mt}function E(ie,Ie){if(Ie>1||Ie<0||ie.length<2)return 0;for(var je=ze(ie),Be=je.segments,et=je.totalLength,gt=0,Mt=0,Rt=0;Rt<Be.length;Rt++){var Ft=Be[Rt],Xt=Ft.from,Qt=Ft.to,an=Ft.length/et;if(Ie>=gt&&Ie<=gt+an){Mt=Math.atan2(Qt[1]-Xt[1],Qt[0]-Xt[0]);break}gt+=an}return Mt}function me(ie,Ie,je){for(var Be=1/0,et=0;et<ie.length-1;et++){var gt=ie[et],Mt=ie[et+1],Rt=Je(gt[0],gt[1],Mt[0],Mt[1],Ie,je);Rt<Be&&(Be=Rt)}return Be}function L(ie){for(var Ie=[],je=[],Be=0;Be<ie.length;Be++){var et=ie[Be];Ie.push(et[0]),je.push(et[1])}return N(Ie,je)}function X(ie){return Qe(ie)}function Ke(ie,Ie){return Se(ie,Ie)}function ot(ie,Ie,je){return me(ie,Ie,je)}function pe(ie,Ie){return E(ie,Ie)}function xe(ie){var Ie=ie.slice(0);return ie.length&&Ie.push(ie[0]),Ie}function Ze(ie){return L(ie)}function O(ie){return Qe(xe(ie))}function ne(ie,Ie){return Se(xe(ie),Ie)}function qe(ie,Ie,je){return me(xe(ie),Ie,je)}function dt(ie,Ie){return E(xe(ie),Ie)}function nt(ie,Ie,je,Be){var et=1-Be;return et*et*ie+2*Be*et*Ie+Be*Be*je}function xt(ie,Ie,je){var Be=ie+je-2*Ie;if((0,H.Z)(Be,0))return[.5];var et=(ie-Ie)/Be;return et<=1&&et>=0?[et]:[]}function bt(ie,Ie,je,Be,et,gt,Mt){var Rt=nt(ie,je,et,Mt),Ft=nt(Ie,Be,gt,Mt),Xt=Te(ie,Ie,je,Be,Mt),Qt=Te(je,Be,et,gt,Mt);return[[ie,Ie,Xt.x,Xt.y,Rt,Ft],[Rt,Ft,Qt.x,Qt.y,et,gt]]}function wt(ie,Ie,je,Be,et,gt,Mt){if(Mt===0)return(Y(ie,Ie,je,Be)+Y(je,Be,et,gt)+Y(ie,Ie,et,gt))/2;var Rt=bt(ie,Ie,je,Be,et,gt,.5),Ft=Rt[0],Xt=Rt[1];return Ft.push(Mt-1),Xt.push(Mt-1),wt.apply(void 0,__spreadArray([],__read(Ft),!1))+wt.apply(void 0,__spreadArray([],__read(Xt),!1))}function we(ie,Ie,je,Be,et,gt){var Mt=xt(ie,je,et)[0],Rt=xt(Ie,Be,gt)[0],Ft=[ie,et],Xt=[Ie,gt];return Mt!==void 0&&Ft.push(nt(ie,je,et,Mt)),Rt!==void 0&&Xt.push(nt(Ie,Be,gt,Rt)),N(Ft,Xt)}function oe(ie,Ie,je,Be,et,gt){return wt(ie,Ie,je,Be,et,gt,3)}function Fe(ie,Ie,je,Be,et,gt,Mt,Rt){return re([ie,je,et],[Ie,Be,gt],Mt,Rt,nt)}function Ye(ie,Ie,je,Be,et,gt,Mt,Rt){var Ft=Fe(ie,Ie,je,Be,et,gt,Mt,Rt);return Y(Ft.x,Ft.y,Mt,Rt)}},44326:function(ke,ve,k){"use strict";k.d(ve,{k:function(){return Y}});var M=k(90494),H=k(69991),U=k(35105);class Y extends M.Z{constructor(C){super();Io(this,"nodeMap",new Map);Io(this,"edgeMap",new Map);Io(this,"inEdgesMap",new Map);Io(this,"outEdgesMap",new Map);Io(this,"bothEdgesMap",new Map);Io(this,"treeIndices",new Map);Io(this,"changes",[]);Io(this,"batchCount",0);Io(this,"onChanged",()=>{});Io(this,"batch",C=>{this.batchCount+=1,C(),this.batchCount-=1,this.batchCount||this.commit()});C&&(C.nodes&&this.addNodes(C.nodes),C.edges&&this.addEdges(C.edges),C.tree&&this.addTree(C.tree),C.onChanged&&(this.onChanged=C.onChanged))}commit(){const C=this.changes;this.changes=[];const A={graph:this,changes:C};this.emit("changed",A),this.onChanged(A)}reduceChanges(C){let A=[];return C.forEach(F=>{switch(F.type){case"NodeRemoved":{let P=!1;A=A.filter(W=>{if(W.type==="NodeAdded"){const K=W.value.id===F.value.id;return K&&(P=!0),!K}else{if(W.type==="NodeDataUpdated")return W.id!==F.value.id;if(W.type==="TreeStructureChanged")return W.nodeId!==F.value.id}return!0}),P||A.push(F);break}case"EdgeRemoved":{let P=!1;A=A.filter(W=>{if(W.type==="EdgeAdded"){const K=W.value.id===F.value.id;return K&&(P=!0),!K}else if(W.type==="EdgeDataUpdated"||W.type==="EdgeUpdated")return W.id!==F.value.id;return!0}),P||A.push(F);break}case"NodeDataUpdated":case"EdgeDataUpdated":case"EdgeUpdated":{const P=A.findIndex(K=>K.type===F.type&&K.id===F.id&&(F.propertyName===void 0||K.propertyName===F.propertyName)),W=A[P];W?F.propertyName!==void 0?W.newValue=F.newValue:(A.splice(P,1),A.push(F)):A.push(F);break}case"TreeStructureDetached":{A=A.filter(P=>P.type==="TreeStructureAttached"||P.type==="TreeStructureChanged"?P.treeKey!==F.treeKey:!0),A.push(F);break}case"TreeStructureChanged":{const P=A.find(W=>W.type==="TreeStructureChanged"&&W.treeKey===F.treeKey&&W.nodeId===F.nodeId);P?P.newParentId=F.newParentId:A.push(F);break}default:A.push(F);break}}),A}checkNodeExistence(C){this.getNode(C)}hasNode(C){return this.nodeMap.has(C)}areNeighbors(C,A){return this.getNeighbors(A).some(F=>F.id===C)}getNode(C){const A=this.nodeMap.get(C);if(!A)throw new Error("Node not found for id: "+C);return A}getRelatedEdges(C,A){if(this.checkNodeExistence(C),A==="in"){const F=this.inEdgesMap.get(C);return Array.from(F)}else if(A==="out"){const F=this.outEdgesMap.get(C);return Array.from(F)}else{const F=this.bothEdgesMap.get(C);return Array.from(F)}}getDegree(C,A){return this.getRelatedEdges(C,A).length}getSuccessors(C){const F=this.getRelatedEdges(C,"out").map(P=>this.getNode(P.target));return Array.from(new Set(F))}getPredecessors(C){const F=this.getRelatedEdges(C,"in").map(P=>this.getNode(P.source));return Array.from(new Set(F))}getNeighbors(C){const A=this.getPredecessors(C),F=this.getSuccessors(C);return Array.from(new Set([...A,...F]))}doAddNode(C){if(this.hasNode(C.id))throw new Error("Node already exists: "+C.id);this.nodeMap.set(C.id,C),this.inEdgesMap.set(C.id,new Set),this.outEdgesMap.set(C.id,new Set),this.bothEdgesMap.set(C.id,new Set),this.treeIndices.forEach(A=>{A.childrenMap.set(C.id,new Set)}),this.changes.push({type:"NodeAdded",value:C})}addNodes(C){this.batch(()=>{for(const A of C)this.doAddNode(A)})}addNode(C){this.addNodes([C])}doRemoveNode(C){const A=this.getNode(C),F=this.bothEdgesMap.get(C);F==null||F.forEach(P=>this.doRemoveEdge(P.id)),this.nodeMap.delete(C),this.treeIndices.forEach(P=>{var K,ge;(K=P.childrenMap.get(C))==null||K.forEach(be=>{P.parentMap.delete(be.id)});const W=P.parentMap.get(C);W&&((ge=P.childrenMap.get(W.id))==null||ge.delete(A)),P.parentMap.delete(C),P.childrenMap.delete(C)}),this.bothEdgesMap.delete(C),this.inEdgesMap.delete(C),this.outEdgesMap.delete(C),this.changes.push({type:"NodeRemoved",value:A})}removeNodes(C){this.batch(()=>{C.forEach(A=>this.doRemoveNode(A))})}removeNode(C){this.removeNodes([C])}updateNodeDataProperty(C,A,F){const P=this.getNode(C);this.batch(()=>{const W=P.data[A],K=F;P.data[A]=K,this.changes.push({type:"NodeDataUpdated",id:C,propertyName:A,oldValue:W,newValue:K})})}mergeNodeData(C,A){this.batch(()=>{Object.entries(A).forEach(([F,P])=>{this.updateNodeDataProperty(C,F,P)})})}updateNodeData(...C){const A=C[0],F=this.getNode(A);if(typeof C[1]=="string"){this.updateNodeDataProperty(A,C[1],C[2]);return}let P;if(typeof C[1]=="function"){const W=C[1];P=W(F.data)}else typeof C[1]=="object"&&(P=C[1]);this.batch(()=>{const W=F.data,K=P;F.data=P,this.changes.push({type:"NodeDataUpdated",id:A,oldValue:W,newValue:K})})}checkEdgeExistence(C){if(!this.hasEdge(C))throw new Error("Edge not found for id: "+C)}hasEdge(C){return this.edgeMap.has(C)}getEdge(C){return this.checkEdgeExistence(C),this.edgeMap.get(C)}getEdgeDetail(C){const A=this.getEdge(C);return{edge:A,source:this.getNode(A.source),target:this.getNode(A.target)}}doAddEdge(C){if(this.hasEdge(C.id))throw new Error("Edge already exists: "+C.id);this.checkNodeExistence(C.source),this.checkNodeExistence(C.target),this.edgeMap.set(C.id,C);const A=this.inEdgesMap.get(C.target),F=this.outEdgesMap.get(C.source),P=this.bothEdgesMap.get(C.source),W=this.bothEdgesMap.get(C.target);A.add(C),F.add(C),P.add(C),W.add(C),this.changes.push({type:"EdgeAdded",value:C})}addEdges(C){this.batch(()=>{for(const A of C)this.doAddEdge(A)})}addEdge(C){this.addEdges([C])}doRemoveEdge(C){const A=this.getEdge(C),F=this.outEdgesMap.get(A.source),P=this.inEdgesMap.get(A.target),W=this.bothEdgesMap.get(A.source),K=this.bothEdgesMap.get(A.target);F.delete(A),P.delete(A),W.delete(A),K.delete(A),this.edgeMap.delete(C),this.changes.push({type:"EdgeRemoved",value:A})}removeEdges(C){this.batch(()=>{C.forEach(A=>this.doRemoveEdge(A))})}removeEdge(C){this.removeEdges([C])}updateEdgeSource(C,A){const F=this.getEdge(C);this.checkNodeExistence(A);const P=F.source,W=A;this.outEdgesMap.get(P).delete(F),this.bothEdgesMap.get(P).delete(F),this.outEdgesMap.get(W).add(F),this.bothEdgesMap.get(W).add(F),F.source=A,this.batch(()=>{this.changes.push({type:"EdgeUpdated",id:C,propertyName:"source",oldValue:P,newValue:W})})}updateEdgeTarget(C,A){const F=this.getEdge(C);this.checkNodeExistence(A);const P=F.target,W=A;this.inEdgesMap.get(P).delete(F),this.bothEdgesMap.get(P).delete(F),this.inEdgesMap.get(W).add(F),this.bothEdgesMap.get(W).add(F),F.target=A,this.batch(()=>{this.changes.push({type:"EdgeUpdated",id:C,propertyName:"target",oldValue:P,newValue:W})})}updateEdgeDataProperty(C,A,F){const P=this.getEdge(C);this.batch(()=>{const W=P.data[A],K=F;P.data[A]=K,this.changes.push({type:"EdgeDataUpdated",id:C,propertyName:A,oldValue:W,newValue:K})})}updateEdgeData(...C){const A=C[0],F=this.getEdge(A);if(typeof C[1]=="string"){this.updateEdgeDataProperty(A,C[1],C[2]);return}let P;if(typeof C[1]=="function"){const W=C[1];P=W(F.data)}else typeof C[1]=="object"&&(P=C[1]);this.batch(()=>{const W=F.data,K=P;F.data=P,this.changes.push({type:"EdgeDataUpdated",id:A,oldValue:W,newValue:K})})}mergeEdgeData(C,A){this.batch(()=>{Object.entries(A).forEach(([F,P])=>{this.updateEdgeDataProperty(C,F,P)})})}checkTreeExistence(C){if(!this.hasTreeStructure(C))throw new Error("Tree structure not found for treeKey: "+C)}hasTreeStructure(C){return this.treeIndices.has(C)}attachTreeStructure(C){this.treeIndices.has(C)||(this.treeIndices.set(C,{parentMap:new Map,childrenMap:new Map}),this.batch(()=>{this.changes.push({type:"TreeStructureAttached",treeKey:C})}))}detachTreeStructure(C){this.checkTreeExistence(C),this.treeIndices.delete(C),this.batch(()=>{this.changes.push({type:"TreeStructureDetached",treeKey:C})})}addTree(C,A){this.batch(()=>{this.attachTreeStructure(A);const F=[],P=Array.isArray(C)?C:[C];for(;P.length;){const W=P.shift();F.push(W),W.children&&P.push(...W.children)}this.addNodes(F),F.forEach(W=>{var K;(K=W.children)==null||K.forEach(ge=>{this.setParent(ge.id,W.id,A)})})})}getRoots(C){return this.checkTreeExistence(C),this.getAllNodes().filter(A=>!this.getParent(A.id,C))}getChildren(C,A){this.checkNodeExistence(C),this.checkTreeExistence(A);const P=this.treeIndices.get(A).childrenMap.get(C);return Array.from(P||[])}getParent(C,A){return this.checkNodeExistence(C),this.checkTreeExistence(A),this.treeIndices.get(A).parentMap.get(C)||null}getAncestors(C,A){const F=[];let P=this.getNode(C),W;for(;W=this.getParent(P.id,A);)F.push(W),P=W;return F}setParent(C,A,F){var Ue,Ne;this.checkTreeExistence(F);const P=this.treeIndices.get(F),W=this.getNode(C),K=P.parentMap.get(C);if((K==null?void 0:K.id)===A)return;if(A===void 0){K&&((Ue=P.childrenMap.get(K.id))==null||Ue.delete(W)),P.parentMap.delete(C);return}const ge=this.getNode(A);P.parentMap.set(C,ge),K&&((Ne=P.childrenMap.get(K.id))==null||Ne.delete(W));let be=P.childrenMap.get(ge.id);be||(be=new Set,P.childrenMap.set(ge.id,be)),be.add(W),this.batch(()=>{this.changes.push({type:"TreeStructureChanged",treeKey:F,nodeId:C,oldParentId:K==null?void 0:K.id,newParentId:ge.id})})}dfsTree(C,A,F){const P=W=>this.getChildren(W,F);return(0,U.I)(this.getNode(C),new Set,A,P)}bfsTree(C,A,F){const P=W=>this.getChildren(W,F);return(0,U.O)([this.getNode(C)],new Set,A,P)}getAllNodes(){return Array.from(this.nodeMap.values())}getAllEdges(){return Array.from(this.edgeMap.values())}bfs(C,A,F="out"){const P={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[F];return(0,U.O)([this.getNode(C)],new Set,A,P)}dfs(C,A,F="out"){const P={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[F];return(0,U.I)(this.getNode(C),new Set,A,P)}clone(){const C=this.getAllNodes().map(P=>rO(b0({},P),{data:b0({},P.data)})),A=this.getAllEdges().map(P=>rO(b0({},P),{data:b0({},P.data)})),F=new Y({nodes:C,edges:A});return this.treeIndices.forEach(({parentMap:P,childrenMap:W},K)=>{const ge=new Map;P.forEach((Ue,Ne)=>{ge.set(Ne,F.getNode(Ue.id))});const be=new Map;W.forEach((Ue,Ne)=>{be.set(Ne,new Set(Array.from(Ue).map(ye=>F.getNode(ye.id))))}),F.treeIndices.set(K,{parentMap:ge,childrenMap:be})}),F}toJSON(){return JSON.stringify({nodes:this.getAllNodes(),edges:this.getAllEdges()})}createView(C){return new H.t(b0({graph:this},C))}}},69991:function(ke,ve,k){"use strict";k.d(ve,{t:function(){return U}});var M=k(35105);const H=()=>!0;class U{constructor(N){Io(this,"graph");Io(this,"nodeFilter");Io(this,"edgeFilter");Io(this,"cacheEnabled");Io(this,"inEdgesMap",new Map);Io(this,"outEdgesMap",new Map);Io(this,"bothEdgesMap",new Map);Io(this,"allNodesMap",new Map);Io(this,"allEdgesMap",new Map);Io(this,"clearCache",()=>{this.inEdgesMap.clear(),this.outEdgesMap.clear(),this.bothEdgesMap.clear(),this.allNodesMap.clear(),this.allEdgesMap.clear()});Io(this,"refreshCache",()=>{this.clearCache(),this.updateCache(this.graph.getAllNodes().map(N=>N.id))});Io(this,"updateCache",N=>{const I=new Set;N.forEach(C=>{const A=this.bothEdgesMap.get(C);if(A&&A.forEach(F=>I.add(F.id)),!this.hasNode(C))this.inEdgesMap.delete(C),this.outEdgesMap.delete(C),this.bothEdgesMap.delete(C),this.allNodesMap.delete(C);else{const F=this.graph.getRelatedEdges(C,"in").filter(this.edgeFilter),P=this.graph.getRelatedEdges(C,"out").filter(this.edgeFilter),W=Array.from(new Set([...F,...P]));W.forEach(K=>I.add(K.id)),this.inEdgesMap.set(C,F),this.outEdgesMap.set(C,P),this.bothEdgesMap.set(C,W),this.allNodesMap.set(C,this.graph.getNode(C))}}),I.forEach(C=>{this.hasEdge(C)?this.allEdgesMap.set(C,this.graph.getEdge(C)):this.allEdgesMap.delete(C)})});Io(this,"handleGraphChanged",N=>{const I=new Set;N.changes.forEach(C=>{switch(C.type){case"NodeAdded":I.add(C.value.id);break;case"NodeDataUpdated":I.add(C.id);break;case"EdgeAdded":I.add(C.value.source),I.add(C.value.target);break;case"EdgeUpdated":(C.propertyName==="source"||C.propertyName==="target")&&(I.add(C.oldValue),I.add(C.newValue));break;case"EdgeDataUpdated":if(N.graph.hasEdge(C.id)){const A=N.graph.getEdge(C.id);I.add(A.source),I.add(A.target)}break;case"EdgeRemoved":I.add(C.value.source),I.add(C.value.target);break;case"NodeRemoved":I.add(C.value.id);break;default:break}}),this.updateCache(I)});this.graph=N.graph;const I=N.nodeFilter||H,C=N.edgeFilter||H;this.nodeFilter=I,this.edgeFilter=A=>{const{source:F,target:P}=this.graph.getEdgeDetail(A.id);return!I(F)||!I(P)?!1:C(A,F,P)},N.cache==="auto"?(this.cacheEnabled=!0,this.startAutoCache()):N.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(N){this.getNode(N)}hasNode(N){if(!this.graph.hasNode(N))return!1;const I=this.graph.getNode(N);return this.nodeFilter(I)}areNeighbors(N,I){return this.checkNodeExistence(N),this.getNeighbors(I).some(C=>C.id===N)}getNode(N){const I=this.graph.getNode(N);if(!this.nodeFilter(I))throw new Error("Node not found for id: "+N);return I}getRelatedEdges(N,I){return this.checkNodeExistence(N),this.cacheEnabled?I==="in"?this.inEdgesMap.get(N):I==="out"?this.outEdgesMap.get(N):this.bothEdgesMap.get(N):this.graph.getRelatedEdges(N,I).filter(this.edgeFilter)}getDegree(N,I){return this.getRelatedEdges(N,I).length}getSuccessors(N){const C=this.getRelatedEdges(N,"out").map(A=>this.getNode(A.target));return Array.from(new Set(C))}getPredecessors(N){const C=this.getRelatedEdges(N,"in").map(A=>this.getNode(A.source));return Array.from(new Set(C))}getNeighbors(N){const I=this.getPredecessors(N),C=this.getSuccessors(N);return Array.from(new Set([...I,...C]))}hasEdge(N){if(!this.graph.hasEdge(N))return!1;const I=this.graph.getEdge(N);return this.edgeFilter(I)}getEdge(N){const I=this.graph.getEdge(N);if(!this.edgeFilter(I))throw new Error("Edge not found for id: "+N);return I}getEdgeDetail(N){const I=this.getEdge(N);return{edge:I,source:this.getNode(I.source),target:this.getNode(I.target)}}hasTreeStructure(N){return this.graph.hasTreeStructure(N)}getRoots(N){return this.graph.getRoots(N).filter(this.nodeFilter)}getChildren(N,I){return this.checkNodeExistence(N),this.graph.getChildren(N,I).filter(this.nodeFilter)}getParent(N,I){this.checkNodeExistence(N);const C=this.graph.getParent(N,I);return!C||!this.nodeFilter(C)?null:C}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(N,I,C="out"){const A={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[C];(0,M.O)([this.getNode(N)],new Set,I,A)}dfs(N,I,C="out"){const A={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[C];(0,M.I)(this.getNode(N),new Set,I,A)}}},35105:function(ke,ve,k){"use strict";k.d(ve,{I:function(){return H},O:function(){return M}});function M(U,Y,N,I){for(;U.length;){const C=U.shift();if(N(C))return!0;Y.add(C.id),I(C.id).forEach(F=>{Y.has(F.id)||(Y.add(F.id),U.push(F))})}return!1}function H(U,Y,N,I){if(N(U))return!0;Y.add(U.id);for(const A of I(U.id))if(!Y.has(A.id)&&H(A,Y,N,I))return!0;return!1}},81746:function(ke){(function(k,M){ke.exports=M()})(typeof self!="undefined"?self:this,function(){return function(ve){var k={};function M(H){if(k[H])return k[H].exports;var U=k[H]={i:H,l:!1,exports:{}};return ve[H].call(U.exports,U,U.exports,M),U.l=!0,U.exports}return M.m=ve,M.c=k,M.d=function(H,U,Y){M.o(H,U)||Object.defineProperty(H,U,{configurable:!1,enumerable:!0,get:Y})},M.n=function(H){var U=H&&H.__esModule?function(){return H.default}:function(){return H};return M.d(U,"a",U),U},M.o=function(H,U){return Object.prototype.hasOwnProperty.call(H,U)},M.p="",M(M.s=5)}([function(ve,k){function M(H,U,Y,N){return N===void 0&&(N="height"),Y==="center"?(H[N]+U[N])/2:H.height}ve.exports={assign:Object.assign,getHeight:M}},function(ve,k,M){var H=M(3),U=function(){function Y(I,C){C===void 0&&(C={});var A=this;A.options=C,A.rootNode=H(I,C)}var N=Y.prototype;return N.execute=function(){throw new Error("please override this method")},Y}();ve.exports=U},function(ve,k,M){var H=M(4),U=["LR","RL","TB","BT","H","V"],Y=["LR","RL","H"],N=function(F){return Y.indexOf(F)>-1},I=U[0];ve.exports=function(A,F,P){var W=F.direction||I;if(F.isHorizontal=N(W),W&&U.indexOf(W)===-1)throw new TypeError("Invalid direction: "+W);if(W===U[0])P(A,F);else if(W===U[1])P(A,F),A.right2left();else if(W===U[2])P(A,F);else if(W===U[3])P(A,F),A.bottom2top();else if(W===U[4]||W===U[5]){var K=H(A,F),ge=K.left,be=K.right;P(ge,F),P(be,F),F.isHorizontal?ge.right2left():ge.bottom2top(),be.translate(ge.x-be.x,ge.y-be.y),A.x=ge.x,A.y=be.y;var Ue=A.getBoundingBox();F.isHorizontal?Ue.top<0&&A.translate(0,-Ue.top):Ue.left<0&&A.translate(-Ue.left,0)}var Ne=F.fixedRoot;return Ne===void 0&&(Ne=!0),Ne&&A.translate(-(A.x+A.width/2+A.hgap),-(A.y+A.height/2+A.vgap)),C(A,F),A};function C(A,F){if(F.radial){var P=F.isHorizontal?["x","y"]:["y","x"],W=P[0],K=P[1],ge={x:1/0,y:1/0},be={x:-1/0,y:-1/0},Ue=0;A.DFTraverse(function(De){Ue++;var Ce=De.x,Me=De.y;ge.x=Math.min(ge.x,Ce),ge.y=Math.min(ge.y,Me),be.x=Math.max(be.x,Ce),be.y=Math.max(be.y,Me)});var Ne=be[K]-ge[K];if(Ne===0)return;var ye=Math.PI*2/Ue;A.DFTraverse(function(De){var Ce=(De[K]-ge[K])/Ne*(Math.PI*2-ye)+ye,Me=De[W]-A[W];De.x=Math.cos(Ce)*Me,De.y=Math.sin(Ce)*Me})}}},function(ve,k,M){var H=M(0),U=18,Y=U*2,N=U,I={getId:function(P){return P.id||P.name},getPreH:function(P){return P.preH||0},getPreV:function(P){return P.preV||0},getHGap:function(P){return P.hgap||N},getVGap:function(P){return P.vgap||N},getChildren:function(P){return P.children},getHeight:function(P){return P.height||Y},getWidth:function(P){var W=P.label||" ";return P.width||W.split("").length*U}};function C(F,P){var W=this;if(W.vgap=W.hgap=0,F instanceof C)return F;W.data=F;var K=P.getHGap(F),ge=P.getVGap(F);return W.preH=P.getPreH(F),W.preV=P.getPreV(F),W.width=P.getWidth(F),W.height=P.getHeight(F),W.width+=W.preH,W.height+=W.preV,W.id=P.getId(F),W.x=W.y=0,W.depth=0,W.children||(W.children=[]),W.addGap(K,ge),W}H.assign(C.prototype,{isRoot:function(){return this.depth===0},isLeaf:function(){return this.children.length===0},addGap:function(P,W){var K=this;K.hgap+=P,K.vgap+=W,K.width+=2*P,K.height+=2*W},eachNode:function(P){for(var W=this,K=[W],ge;ge=K.shift();)P(ge),K=ge.children.concat(K)},DFTraverse:function(P){this.eachNode(P)},BFTraverse:function(P){for(var W=this,K=[W],ge;ge=K.shift();)P(ge),K=K.concat(ge.children)},getBoundingBox:function(){var P={left:Number.MAX_VALUE,top:Number.MAX_VALUE,width:0,height:0};return this.eachNode(function(W){P.left=Math.min(P.left,W.x),P.top=Math.min(P.top,W.y),P.width=Math.max(P.width,W.x+W.width),P.height=Math.max(P.height,W.y+W.height)}),P},translate:function(P,W){P===void 0&&(P=0),W===void 0&&(W=0),this.eachNode(function(K){K.x+=P,K.y+=W,K.x+=K.preH,K.y+=K.preV})},right2left:function(){var P=this,W=P.getBoundingBox();P.eachNode(function(K){K.x=K.x-(K.x-W.left)*2-K.width}),P.translate(W.width,0)},bottom2top:function(){var P=this,W=P.getBoundingBox();P.eachNode(function(K){K.y=K.y-(K.y-W.top)*2-K.height}),P.translate(0,W.height)}});function A(F,P,W){P===void 0&&(P={}),P=H.assign({},I,P);var K=new C(F,P),ge=[K],be;if(!W&&!F.collapsed){for(;be=ge.shift();)if(!be.data.collapsed){var Ue=P.getChildren(be.data),Ne=Ue?Ue.length:0;if(be.children=new Array(Ne),Ue&&Ne)for(var ye=0;ye<Ne;ye++){var De=new C(Ue[ye],P);be.children[ye]=De,ge.push(De),De.parent=be,De.depth=be.depth+1}}}return K}ve.exports=A},function(ve,k,M){var H=M(3);ve.exports=function(U,Y){for(var N=H(U.data,Y,!0),I=H(U.data,Y,!0),C=U.children.length,A=Math.round(C/2),F=Y.getSide||function(ge,be){return be<A?"right":"left"},P=0;P<C;P++){var W=U.children[P],K=F(W,P);K==="right"?I.children.push(W):N.children.push(W)}return N.eachNode(function(ge){ge.isRoot()||(ge.side="left")}),I.eachNode(function(ge){ge.isRoot()||(ge.side="right")}),{left:N,right:I}}},function(ve,k,M){var H={compactBox:M(6),dendrogram:M(8),indented:M(10),mindmap:M(12)};ve.exports=H},function(ve,k,M){function H(W,K){W.prototype=Object.create(K.prototype),W.prototype.constructor=W,U(W,K)}function U(W,K){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ge,be){return ge.__proto__=be,ge},U(W,K)}var Y=M(1),N=M(7),I=M(2),C=M(0),A=function(W){function K(){return W.apply(this,arguments)||this}H(K,W);var ge=K.prototype;return ge.execute=function(){var Ue=this;return I(Ue.rootNode,Ue.options,N)},K}(Y),F={};function P(W,K){return K=C.assign({},F,K),new A(W,K).execute()}ve.exports=P},function(ve,k){function M(C,A,F,P){P===void 0&&(P=[]);var W=this;W.w=C||0,W.h=A||0,W.y=F||0,W.x=0,W.c=P||[],W.cs=P.length,W.prelim=0,W.mod=0,W.shift=0,W.change=0,W.tl=null,W.tr=null,W.el=null,W.er=null,W.msel=0,W.mser=0}M.fromNode=function(C,A){if(!C)return null;var F=[];return C.children.forEach(function(P){F.push(M.fromNode(P,A))}),A?new M(C.height,C.width,C.x,F):new M(C.width,C.height,C.y,F)};function H(C,A,F){F?C.y+=A:C.x+=A,C.children.forEach(function(P){H(P,A,F)})}function U(C,A){var F=A?C.y:C.x;return C.children.forEach(function(P){F=Math.min(U(P,A),F)}),F}function Y(C,A){var F=U(C,A);H(C,-F,A)}function N(C,A,F){F?A.y=C.x:A.x=C.x,C.c.forEach(function(P,W){N(P,A.children[W],F)})}function I(C,A,F){F===void 0&&(F=0),A?(C.x=F,F+=C.width):(C.y=F,F+=C.height),C.children.forEach(function(P){I(P,A,F)})}ve.exports=function(C,A){A===void 0&&(A={});var F=A.isHorizontal;function P(Ee){if(Ee.cs===0){W(Ee);return}P(Ee.c[0]);for(var Te=q(Ne(Ee.c[0].el),0,null),Je=1;Je<Ee.cs;++Je){P(Ee.c[Je]);var He=Ne(Ee.c[Je].er);K(Ee,Je,Te),Te=q(He,Je,Te)}Ce(Ee),W(Ee)}function W(Ee){Ee.cs===0?(Ee.el=Ee,Ee.er=Ee,Ee.msel=Ee.mser=0):(Ee.el=Ee.c[0].el,Ee.msel=Ee.c[0].msel,Ee.er=Ee.c[Ee.cs-1].er,Ee.mser=Ee.c[Ee.cs-1].mser)}function K(Ee,Te,Je){for(var He=Ee.c[Te-1],rt=He.mod,Et=Ee.c[Te],lt=Et.mod;He!==null&&Et!==null;){Ne(He)>Je.low&&(Je=Je.nxt);var st=rt+He.prelim+He.w-(lt+Et.prelim);st>0&&(lt+=st,ge(Ee,Te,Je.index,st));var mt=Ne(He),fe=Ne(Et);mt<=fe&&(He=Ue(He),He!==null&&(rt+=He.mod)),mt>=fe&&(Et=be(Et),Et!==null&&(lt+=Et.mod))}!He&&Et?ye(Ee,Te,Et,lt):He&&!Et&&De(Ee,Te,He,rt)}function ge(Ee,Te,Je,He){Ee.c[Te].mod+=He,Ee.c[Te].msel+=He,Ee.c[Te].mser+=He,Oe(Ee,Te,Je,He)}function be(Ee){return Ee.cs===0?Ee.tl:Ee.c[0]}function Ue(Ee){return Ee.cs===0?Ee.tr:Ee.c[Ee.cs-1]}function Ne(Ee){return Ee.y+Ee.h}function ye(Ee,Te,Je,He){var rt=Ee.c[0].el;rt.tl=Je;var Et=He-Je.mod-Ee.c[0].msel;rt.mod+=Et,rt.prelim-=Et,Ee.c[0].el=Ee.c[Te].el,Ee.c[0].msel=Ee.c[Te].msel}function De(Ee,Te,Je,He){var rt=Ee.c[Te].er;rt.tr=Je;var Et=He-Je.mod-Ee.c[Te].mser;rt.mod+=Et,rt.prelim-=Et,Ee.c[Te].er=Ee.c[Te-1].er,Ee.c[Te].mser=Ee.c[Te-1].mser}function Ce(Ee){Ee.prelim=(Ee.c[0].prelim+Ee.c[0].mod+Ee.c[Ee.cs-1].mod+Ee.c[Ee.cs-1].prelim+Ee.c[Ee.cs-1].w)/2-Ee.w/2}function Me(Ee,Te){Te+=Ee.mod,Ee.x=Ee.prelim+Te,re(Ee);for(var Je=0;Je<Ee.cs;Je++)Me(Ee.c[Je],Te)}function Oe(Ee,Te,Je,He){if(Je!==Te-1){var rt=Te-Je;Ee.c[Je+1].shift+=He/rt,Ee.c[Te].shift-=He/rt,Ee.c[Te].change-=He-He/rt}}function re(Ee){for(var Te=0,Je=0,He=0;He<Ee.cs;He++)Te+=Ee.c[He].shift,Je+=Te+Ee.c[He].change,Ee.c[He].mod+=Je}function q(Ee,Te,Je){for(;Je!==null&&Ee>=Je.low;)Je=Je.nxt;return{low:Ee,index:Te,nxt:Je}}I(C,F);var ce=M.fromNode(C,F);return P(ce),Me(ce,0),N(ce,C,F),Y(C,F),C}},function(ve,k,M){function H(W,K){W.prototype=Object.create(K.prototype),W.prototype.constructor=W,U(W,K)}function U(W,K){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ge,be){return ge.__proto__=be,ge},U(W,K)}var Y=M(1),N=M(9),I=M(2),C=M(0),A=function(W){function K(){return W.apply(this,arguments)||this}H(K,W);var ge=K.prototype;return ge.execute=function(){var Ue=this;return Ue.rootNode.width=0,I(Ue.rootNode,Ue.options,N)},K}(Y),F={};function P(W,K){return K=C.assign({},F,K),new A(W,K).execute()}ve.exports=P},function(ve,k,M){var H=M(0);function U(I,C){I===void 0&&(I=0),C===void 0&&(C=[]);var A=this;A.x=A.y=0,A.leftChild=A.rightChild=null,A.height=0,A.children=C}var Y={isHorizontal:!0,nodeSep:20,nodeSize:20,rankSep:200,subTreeSep:10};function N(I,C,A){A?(C.x=I.x,C.y=I.y):(C.x=I.y,C.y=I.x),I.children.forEach(function(F,P){N(F,C.children[P],A)})}ve.exports=function(I,C){C===void 0&&(C={}),C=H.assign({},Y,C);var A=0;function F(be){if(!be)return null;be.width=0,be.depth&&be.depth>A&&(A=be.depth);var Ue=be.children,Ne=Ue.length,ye=new U(be.height,[]);return Ue.forEach(function(De,Ce){var Me=F(De);ye.children.push(Me),Ce===0&&(ye.leftChild=Me),Ce===Ne-1&&(ye.rightChild=Me)}),ye.originNode=be,ye.isLeaf=be.isLeaf(),ye}function P(be){if(be.isLeaf||be.children.length===0)be.drawingDepth=A;else{var Ue=be.children.map(function(ye){return P(ye)}),Ne=Math.min.apply(null,Ue);be.drawingDepth=Ne-1}return be.drawingDepth}var W;function K(be){be.x=be.drawingDepth*C.rankSep,be.isLeaf?(be.y=0,W&&(be.y=W.y+W.height+C.nodeSep,be.originNode.parent!==W.originNode.parent&&(be.y+=C.subTreeSep)),W=be):(be.children.forEach(function(Ue){K(Ue)}),be.y=(be.leftChild.y+be.rightChild.y)/2)}var ge=F(I);return P(ge),K(ge),N(ge,I,C.isHorizontal),I}},function(ve,k,M){function H(ge,be){ge.prototype=Object.create(be.prototype),ge.prototype.constructor=ge,U(ge,be)}function U(ge,be){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Ue,Ne){return Ue.__proto__=Ne,Ue},U(ge,be)}var Y=M(1),N=M(11),I=M(4),C=M(0),A=["LR","RL","H"],F=A[0],P=function(ge){function be(){return ge.apply(this,arguments)||this}H(be,ge);var Ue=be.prototype;return Ue.execute=function(){var ye=this,De=ye.options,Ce=ye.rootNode;De.isHorizontal=!0;var Me=De.indent,Oe=Me===void 0?20:Me,re=De.dropCap,q=re===void 0?!0:re,ce=De.direction,Ee=ce===void 0?F:ce,Te=De.align;if(Ee&&A.indexOf(Ee)===-1)throw new TypeError("Invalid direction: "+Ee);if(Ee===A[0])N(Ce,Oe,q,Te);else if(Ee===A[1])N(Ce,Oe,q,Te),Ce.right2left();else if(Ee===A[2]){var Je=I(Ce,De),He=Je.left,rt=Je.right;N(He,Oe,q,Te),He.right2left(),N(rt,Oe,q,Te);var Et=He.getBoundingBox();rt.translate(Et.width,0),Ce.x=rt.x-Ce.width/2}return Ce},be}(Y),W={};function K(ge,be){return be=C.assign({},W,be),new P(ge,be).execute()}ve.exports=K},function(ve,k,M){var H=M(0);function U(Y,N,I,C,A){var F=(typeof I=="function"?I(Y):I)*Y.depth;if(!C)try{if(Y.id===Y.parent.children[0].id){Y.x+=F,Y.y=N?N.y:0;return}}catch(K){}if(Y.x+=F,N){if(Y.y=N.y+H.getHeight(N,Y,A),N.parent&&Y.parent.id!==N.parent.id){var P=N.parent,W=P.y+H.getHeight(P,Y,A);Y.y=W>Y.y?W:Y.y}}else Y.y=0}ve.exports=function(Y,N,I,C){var A=null;Y.eachNode(function(F){U(F,A,N,I,C),A=F})}},function(ve,k,M){function H(W,K){W.prototype=Object.create(K.prototype),W.prototype.constructor=W,U(W,K)}function U(W,K){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ge,be){return ge.__proto__=be,ge},U(W,K)}var Y=M(1),N=M(13),I=M(2),C=M(0),A=function(W){function K(){return W.apply(this,arguments)||this}H(K,W);var ge=K.prototype;return ge.execute=function(){var Ue=this;return I(Ue.rootNode,Ue.options,N)},K}(Y),F={};function P(W,K){return K=C.assign({},F,K),new A(W,K).execute()}ve.exports=P},function(ve,k,M){var H=M(0);function U(I,C){var A=0;return I.children.length?I.children.forEach(function(F){A+=U(F,C)}):A=I.height,I._subTreeSep=C.getSubTreeSep(I.data),I.totalHeight=Math.max(I.height,A)+2*I._subTreeSep,I.totalHeight}function Y(I){var C=I.children,A=C.length;if(A){C.forEach(function(be){Y(be)});var F=C[0],P=C[A-1],W=P.y-F.y+P.height,K=0;if(C.forEach(function(be){K+=be.totalHeight}),W>I.height)I.y=F.y+W/2-I.height/2;else if(C.length!==1||I.height>K){var ge=I.y+(I.height-W)/2-F.y;C.forEach(function(be){be.translate(0,ge)})}else I.y=(F.y+F.height/2+P.y+P.height/2)/2-I.height/2}}var N={getSubTreeSep:function(){return 0}};ve.exports=function(I,C){C===void 0&&(C={}),C=H.assign({},N,C),I.parent={x:0,width:0,height:0,y:0},I.BFTraverse(function(A){A.x=A.parent.x+A.parent.width}),I.parent=null,U(I,C),I.startY=0,I.y=I.totalHeight/2-I.height/2,I.eachNode(function(A){var F=A.children,P=F.length;if(P){var W=F[0];if(W.startY=A.startY+A._subTreeSep,P===1)W.y=A.y+A.height/2-W.height/2;else{W.y=W.startY+W.totalHeight/2-W.height/2;for(var K=1;K<P;K++){var ge=F[K];ge.startY=F[K-1].startY+F[K-1].totalHeight,ge.y=ge.startY+ge.totalHeight/2-ge.height/2}}}}),Y(I)}}])})},15278:function(ke,ve,k){"use strict";k.d(ve,{t:function(){return ye}});function M({map:De,initKey:Ce},Me){const Oe=Ce(Me);return De.has(Oe)?De.get(Oe):Me}function H({map:De,initKey:Ce},Me){const Oe=Ce(Me);return De.has(Oe)?De.get(Oe):(De.set(Oe,Me),Me)}function U({map:De,initKey:Ce},Me){const Oe=Ce(Me);return De.has(Oe)&&(Me=De.get(Oe),De.delete(Oe)),Me}function Y(De){return typeof De=="object"?De.valueOf():De}class N extends Map{constructor(Ce){if(super(),this.map=new Map,this.initKey=Y,Ce!==null)for(const[Me,Oe]of Ce)this.set(Me,Oe)}get(Ce){return super.get(M({map:this.map,initKey:this.initKey},Ce))}has(Ce){return super.has(M({map:this.map,initKey:this.initKey},Ce))}set(Ce,Me){return super.set(H({map:this.map,initKey:this.initKey},Ce),Me)}delete(Ce){return super.delete(U({map:this.map,initKey:this.initKey},Ce))}}var I=k(74271);const C=Symbol("defaultUnknown");function A(De,Ce,Me){for(let Oe=0;Oe<Ce.length;Oe+=1)De.has(Ce[Oe])||De.set(Me(Ce[Oe]),Oe)}function F(De){const{value:Ce,from:Me,to:Oe,mapper:re,notFoundReturn:q}=De;let ce=re.get(Ce);if(ce===void 0){if(q!==C)return q;ce=Me.push(Ce)-1,re.set(Ce,ce)}return Oe[ce%Oe.length]}function P(De){return De instanceof Date?Ce=>`${Ce}`:typeof De=="object"?Ce=>JSON.stringify(Ce):Ce=>Ce}class W extends I.X{getDefaultOptions(){return{domain:[],range:[],unknown:C}}constructor(Ce){super(Ce)}map(Ce){return this.domainIndexMap.size===0&&A(this.domainIndexMap,this.getDomain(),this.domainKey),F({value:this.domainKey(Ce),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(Ce){return this.rangeIndexMap.size===0&&A(this.rangeIndexMap,this.getRange(),this.rangeKey),F({value:this.rangeKey(Ce),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(Ce){const[Me]=this.options.domain,[Oe]=this.options.range;if(this.domainKey=P(Me),this.rangeKey=P(Oe),!this.rangeIndexMap){this.rangeIndexMap=new Map,this.domainIndexMap=new Map;return}(!Ce||Ce.range)&&this.rangeIndexMap.clear(),(!Ce||Ce.domain||Ce.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)}clone(){return new W(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;const{domain:Ce,compare:Me}=this.options;return this.sortedDomain=Me?[...Ce].sort(Me):Ce,this.sortedDomain}}function K(De){const Ce=Math.min(...De);return De.map(Me=>Me/Ce)}function ge(De,Ce){const Me=De.length,Oe=Ce-Me;return Oe>0?[...De,...new Array(Oe).fill(1)]:Oe<0?De.slice(0,Ce):De}function be(De){return Math.round(De*1e12)/1e12}function Ue(De){const{domain:Ce,range:Me,paddingOuter:Oe,paddingInner:re,flex:q,round:ce,align:Ee}=De,Te=Ce.length,Je=ge(q,Te),[He,rt]=Me,Et=rt-He,lt=2/Te*Oe+1-1/Te*re,st=Et/lt,mt=st*re/Te,fe=st-Te*mt,We=K(Je),ht=We.reduce((L,X)=>L+X),Pt=fe/ht,Ve=new N(Ce.map((L,X)=>{const Ke=We[X]*Pt;return[L,ce?Math.floor(Ke):Ke]})),it=new N(Ce.map((L,X)=>{const ot=We[X]*Pt+mt;return[L,ce?Math.floor(ot):ot]})),ft=Array.from(it.values()).reduce((L,X)=>L+X),Qe=(Et-(ft-ft/Te*re))*Ee,Se=He+Qe;let E=ce?Math.round(Se):Se;const me=new Array(Te);for(let L=0;L<Te;L+=1){me[L]=be(E);const X=Ce[L];E+=it.get(X)}return{valueBandWidth:Ve,valueStep:it,adjustedRange:me}}function Ne(De){var Ce;const{domain:Me}=De,Oe=Me.length;if(Oe===0)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!!(!((Ce=De.flex)===null||Ce===void 0)&&Ce.length))return Ue(De);const{range:q,paddingOuter:ce,paddingInner:Ee,round:Te,align:Je}=De;let He,rt,Et=q[0];const st=q[1]-Et,mt=ce*2,fe=Oe-Ee;He=st/Math.max(1,mt+fe),Te&&(He=Math.floor(He)),Et+=(st-He*(Oe-Ee))*Je,rt=He*(1-Ee),Te&&(Et=Math.round(Et),rt=Math.round(rt));const We=new Array(Oe).fill(0).map((ht,Pt)=>Et+Pt*He);return{valueStep:He,valueBandWidth:rt,adjustedRange:We}}class ye extends W{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:C,flex:[]}}constructor(Ce){super(Ce)}clone(){return new ye(this.options)}getStep(Ce){return this.valueStep===void 0?1:typeof this.valueStep=="number"?this.valueStep:Ce===void 0?Array.from(this.valueStep.values())[0]:this.valueStep.get(Ce)}getBandWidth(Ce){return this.valueBandWidth===void 0?1:typeof this.valueBandWidth=="number"?this.valueBandWidth:Ce===void 0?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(Ce)}getRange(){return this.adjustedRange}getPaddingInner(){const{padding:Ce,paddingInner:Me}=this.options;return Ce>0?Ce:Me}getPaddingOuter(){const{padding:Ce,paddingOuter:Me}=this.options;return Ce>0?Ce:Me}rescale(){super.rescale();const{align:Ce,domain:Me,range:Oe,round:re,flex:q}=this.options,{adjustedRange:ce,valueBandWidth:Ee,valueStep:Te}=Ne({align:Ce,range:Oe,round:re,flex:q,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:Me});this.valueStep=Te,this.valueBandWidth=Ee,this.adjustedRange=ce}}},74271:function(ke,ve,k){"use strict";k.d(ve,{X:function(){return H}});var M=k(83787);class H{constructor(Y){this.options=(0,M.Z)({},this.getDefaultOptions()),this.update(Y)}getOptions(){return this.options}update(Y={}){this.options=(0,M.Z)({},this.options,Y),this.rescale(Y)}rescale(Y){}}},53715:function(ke,ve,k){"use strict";k.d(ve,{b:function(){return Et}});var M=function(lt){return lt},H=k(74271);function U(lt,st){return st-lt?mt=>(mt-lt)/(st-lt):mt=>.5}function Y(lt,...st){return st.reduce((mt,fe)=>We=>mt(fe(We)),lt)}function N(lt,st,mt,fe,We){let ht=mt||0,Pt=fe||lt.length;const Ve=We||(it=>it);for(;ht<Pt;){const it=Math.floor((ht+Pt)/2);Ve(lt[it])>st?Pt=it:ht=it+1}return ht}var I=k(19818),C=k.n(I);function A(lt,st,mt){let fe=mt;return fe<0&&(fe+=1),fe>1&&(fe-=1),fe<1/6?lt+(st-lt)*6*fe:fe<1/2?st:fe<2/3?lt+(st-lt)*(2/3-fe)*6:lt}function F(lt){const st=lt[0]/360,mt=lt[1]/100,fe=lt[2]/100,We=lt[3];if(mt===0)return[fe*255,fe*255,fe*255,We];const ht=fe<.5?fe*(1+mt):fe+mt-fe*mt,Pt=2*fe-ht,Ve=A(Pt,ht,st+1/3),it=A(Pt,ht,st),ft=A(Pt,ht,st-1/3);return[Ve*255,it*255,ft*255,We]}function P(lt){const st=C().get(lt);if(!st)return null;const{model:mt,value:fe}=st;return mt==="rgb"?fe:mt==="hsl"?F(fe):null}const W=(lt,st)=>mt=>lt*(1-mt)+st*mt,K=(lt,st)=>{const mt=P(lt),fe=P(st);return mt===null||fe===null?mt?()=>lt:()=>st:We=>{const ht=new Array(4);for(let ze=0;ze<4;ze+=1){const Qe=mt[ze],Se=fe[ze];ht[ze]=Qe*(1-We)+Se*We}const[Pt,Ve,it,ft]=ht;return`rgba(${Math.round(Pt)}, ${Math.round(Ve)}, ${Math.round(it)}, ${ft})`}},ge=(lt,st)=>typeof lt=="number"&&typeof st=="number"?W(lt,st):typeof lt=="string"&&typeof st=="string"?K(lt,st):()=>lt,be=(lt,st)=>{const mt=W(lt,st);return fe=>Math.round(mt(fe))};var Ue=k(71154);function Ne(lt){return lt===null}function ye(lt){return!(0,Ue.Z)(lt)&&!Ne(lt)&&!Number.isNaN(lt)}const De=Math.sqrt(50),Ce=Math.sqrt(10),Me=Math.sqrt(2);function Oe(lt,st,mt){const fe=(st-lt)/Math.max(0,mt),We=Math.floor(Math.log(fe)/Math.LN10),ht=fe/Ux(10,We);return We>=0?(ht>=De?10:ht>=Ce?5:ht>=Me?2:1)*Ux(10,We):-Ux(10,-We)/(ht>=De?10:ht>=Ce?5:ht>=Me?2:1)}function re(lt,st,mt){const fe=Math.abs(st-lt)/Math.max(0,mt);let We=Ux(10,Math.floor(Math.log(fe)/Math.LN10));const ht=fe/We;return ht>=De?We*=10:ht>=Ce?We*=5:ht>=Me&&(We*=2),st<lt?-We:We}const q=(lt,st,mt=5)=>{const fe=[lt,st];let We=0,ht=fe.length-1,Pt=fe[We],Ve=fe[ht],it;return Ve<Pt&&([Pt,Ve]=[Ve,Pt],[We,ht]=[ht,We]),it=Oe(Pt,Ve,mt),it>0?(Pt=Math.floor(Pt/it)*it,Ve=Math.ceil(Ve/it)*it,it=Oe(Pt,Ve,mt)):it<0&&(Pt=Math.ceil(Pt*it)/it,Ve=Math.floor(Ve*it)/it,it=Oe(Pt,Ve,mt)),it>0?(fe[We]=Math.floor(Pt/it)*it,fe[ht]=Math.ceil(Ve/it)*it):it<0&&(fe[We]=Math.ceil(Pt*it)/it,fe[ht]=Math.floor(Ve*it)/it),fe};function ce(lt,st){const mt=st<lt?st:lt,fe=lt>st?lt:st;return We=>Math.min(Math.max(mt,We),fe)}const Ee=(lt,st,mt)=>{const[fe,We]=lt,[ht,Pt]=st;let Ve,it;return fe<We?(Ve=U(fe,We),it=mt(ht,Pt)):(Ve=U(We,fe),it=mt(Pt,ht)),Y(it,Ve)},Te=(lt,st,mt)=>{const fe=Math.min(lt.length,st.length)-1,We=new Array(fe),ht=new Array(fe),Pt=lt[0]>lt[fe],Ve=Pt?[...lt].reverse():lt,it=Pt?[...st].reverse():st;for(let ft=0;ft<fe;ft+=1)We[ft]=U(Ve[ft],Ve[ft+1]),ht[ft]=mt(it[ft],it[ft+1]);return ft=>{const ze=N(lt,ft,1,fe)-1,Qe=We[ze],Se=ht[ze];return Y(Se,Qe)(ft)}},Je=(lt,st,mt,fe)=>(Math.min(lt.length,st.length)>2?Te:Ee)(lt,st,fe?be:mt);class He extends H.X{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:W,tickCount:5}}map(st){return ye(st)?this.output(st):this.options.unknown}invert(st){return ye(st)?this.input(st):this.options.unknown}nice(){if(!this.options.nice)return;const[st,mt,fe,...We]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(st,mt,fe,...We)}getTicks(){const{tickMethod:st}=this.options,[mt,fe,We,...ht]=this.getTickMethodOptions();return st(mt,fe,We,...ht)}getTickMethodOptions(){const{domain:st,tickCount:mt}=this.options,fe=st[0],We=st[st.length-1];return[fe,We,mt]}chooseNice(){return q}rescale(){this.nice();const[st,mt]=this.chooseTransforms();this.composeOutput(st,this.chooseClamp(st)),this.composeInput(st,mt,this.chooseClamp(mt))}chooseClamp(st){const{clamp:mt,range:fe}=this.options,We=this.options.domain.map(st),ht=Math.min(We.length,fe.length);return mt?ce(We[0],We[ht-1]):M}composeOutput(st,mt){const{domain:fe,range:We,round:ht,interpolate:Pt}=this.options,Ve=Je(fe.map(st),We,Pt,ht);this.output=Y(Ve,mt,st)}composeInput(st,mt,fe){const{domain:We,range:ht}=this.options,Pt=Je(ht,We.map(st),W);this.input=Y(mt,fe,Pt)}}const rt=(lt,st,mt)=>{let fe,We,ht=lt,Pt=st;if(ht===Pt&&mt>0)return[ht];let Ve=Oe(ht,Pt,mt);if(Ve===0||!Number.isFinite(Ve))return[];if(Ve>0){ht=Math.ceil(ht/Ve),Pt=Math.floor(Pt/Ve),We=new Array(fe=Math.ceil(Pt-ht+1));for(let it=0;it<fe;it+=1)We[it]=(ht+it)*Ve}else{Ve=-Ve,ht=Math.ceil(ht*Ve),Pt=Math.floor(Pt*Ve),We=new Array(fe=Math.ceil(Pt-ht+1));for(let it=0;it<fe;it+=1)We[it]=(ht+it)/Ve}return We};class Et extends He{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:ge,tickMethod:rt,tickCount:5}}chooseTransforms(){return[M,M]}clone(){return new Et(this.options)}}},88204:function(ke,ve,k){"use strict";k.d(ve,{L:function(){return M}});function M(H){var U=document.createElement("div");U.innerHTML=H;var Y=U.childNodes[0];return Y&&U.contains(Y)&&U.removeChild(Y),Y}},81957:function(ke,ve){"use strict";var k=function(M,H,U){return M<H?H:M>U?U:M};ve.Z=k},83207:function(ke,ve,k){"use strict";var M=k(44978),H=function(U){if(typeof U!="object"||U===null)return U;var Y;if((0,M.Z)(U)){Y=[];for(var N=0,I=U.length;N<I;N++)typeof U[N]=="object"&&U[N]!=null?Y[N]=H(U[N]):Y[N]=U[N]}else{Y={};for(var C in U)typeof U[C]=="object"&&U[C]!=null?Y[C]=H(U[C]):Y[C]=U[C]}return Y};ve.Z=H},68040:function(ke,ve){"use strict";function k(M,H,U){var Y;return function(){var N=this,I=arguments,C=function(){Y=null,U||M.apply(N,I)},A=U&&!Y;clearTimeout(Y),Y=setTimeout(C,H),A&&M.apply(N,I)}}ve.Z=k},83787:function(ke,ve,k){"use strict";var M=k(44978),H=k(83845),U=5;function Y(C,A){if(Object.hasOwn)return Object.hasOwn(C,A);if(C==null)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(C),A)}function N(C,A,F,P){F=F||0,P=P||U;for(var W in A)if(Y(A,W)){var K=A[W];K!==null&&(0,H.Z)(K)?((0,H.Z)(C[W])||(C[W]={}),F<P?N(C[W],K,F+1,P):C[W]=A[W]):(0,M.Z)(K)?(C[W]=[],C[W]=C[W].concat(K)):K!==void 0&&(C[W]=K)}}var I=function(C){for(var A=[],F=1;F<arguments.length;F++)A[F-1]=arguments[F];for(var P=0;P<A.length;P+=1)N(C,A[P]);return C};ve.Z=I},50814:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return C}});var M=k(82844),H=function(A,F){if(!(0,M.Z)(A))return A;for(var P=[],W=0;W<A.length;W++){var K=A[W];F(K,W)&&P.push(K)}return P},U=H,Y=function(A,F){return(0,M.Z)(A)?A.indexOf(F)>-1:!1},N=Y,I=function(A,F){return F===void 0&&(F=[]),U(A,function(P){return!N(F,P)})},C=I},15255:function(ke,ve,k){"use strict";var M=k(44978),H=k(4637);function U(Y,N){if(Y){var I;if((0,M.Z)(Y))for(var C=0,A=Y.length;C<A&&(I=N(Y[C],C),I!==!1);C++);else if((0,H.Z)(Y)){for(var F in Y)if(Y.hasOwnProperty(F)&&(I=N(Y[F],F),I===!1))break}}}ve.Z=U},53032:function(ke,ve,k){"use strict";var M=k(76714);ve.Z=function(H,U,Y){for(var N=0,I=(0,M.Z)(U)?U.split("."):U;H&&N<I.length;)H=H[I[N++]];return H===void 0||N<I.length?Y:H}},73584:function(ke,ve,k){"use strict";var M=k(44978),H=k(45607),U=Object.prototype.hasOwnProperty;function Y(N,I){if(!I||!(0,M.Z)(N))return{};for(var C={},A=(0,H.Z)(I)?I:function(K){return K[I]},F,P=0;P<N.length;P++){var W=N[P];F=A(W),U.call(C,F)?C[F].push(W):C[F]=[W]}return C}ve.Z=Y},82844:function(ke,ve){"use strict";var k=function(M){return M!==null&&typeof M!="function"&&isFinite(M.length)};ve.Z=k},44978:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return M}});function M(H){return Array.isArray(H)}},90134:function(ke,ve,k){"use strict";var M=k(95456),H=function(U){return(0,M.Z)(U,"Boolean")};ve.Z=H},69246:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return M}});function M(H){return H instanceof Date}},95904:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return W}});var M=k(95147),H=k(82844),U={}.toString,Y=function(K){return U.call(K).replace(/^\[object /,"").replace(/]$/,"")},N=Y,I=Object.prototype,C=function(K){var ge=K&&K.constructor,be=typeof ge=="function"&&ge.prototype||I;return K===be},A=C,F=Object.prototype.hasOwnProperty;function P(K){if((0,M.Z)(K))return!0;if((0,H.Z)(K))return!K.length;var ge=N(K);if(ge==="Map"||ge==="Set")return!K.size;if(A(K))return!Object.keys(K).length;for(var be in K)if(F.call(K,be))return!1;return!0}var W=P},30335:function(ke,ve,k){"use strict";var M=k(6241),H=k(82844),U=k(76714),Y=function(N,I){if(N===I)return!0;if(!N||!I||(0,U.Z)(N)||(0,U.Z)(I))return!1;if((0,H.Z)(N)||(0,H.Z)(I)){if(N.length!==I.length)return!1;for(var C=!0,A=0;A<N.length&&(C=Y(N[A],I[A]),!!C);A++);return C}if((0,M.Z)(N)||(0,M.Z)(I)){var F=Object.keys(N),P=Object.keys(I);if(F.length!==P.length)return!1;for(var C=!0,A=0;A<F.length&&(C=Y(N[F[A]],I[F[A]]),!!C);A++);return C}return!1};ve.Z=Y},45607:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return M}});function M(H){return typeof H=="function"}},95147:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return M}});function M(H){return H==null}},80450:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return H}});var M=1e-5;function H(U,Y,N){return N===void 0&&(N=M),U===Y||Math.abs(U-Y)<N}},25897:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return M}});function M(H){return typeof H=="number"}},6241:function(ke,ve){"use strict";var k=function(M){return typeof M=="object"&&M!==null};ve.Z=k},4637:function(ke,ve){"use strict";ve.Z=function(k){var M=typeof k;return k!==null&&M==="object"||M==="function"}},83845:function(ke,ve,k){"use strict";var M=k(6241),H=k(95456),U=function(Y){if(!(0,M.Z)(Y)||!(0,H.Z)(Y,"Object"))return!1;if(Object.getPrototypeOf(Y)===null)return!0;for(var N=Y;Object.getPrototypeOf(N)!==null;)N=Object.getPrototypeOf(N);return Object.getPrototypeOf(Y)===N};ve.Z=U},76714:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return M}});function M(H){return typeof H=="string"}},95456:function(ke,ve){"use strict";var k={}.toString,M=function(H,U){return k.call(H)==="[object "+U+"]"};ve.Z=M},71154:function(ke,ve){"use strict";var k=function(M){return M===void 0};ve.Z=k},73576:function(ke,ve,k){"use strict";var M=k(92123),H=function(U){var Y=(0,M.Z)(U);return Y.charAt(0).toLowerCase()+Y.substring(1)};ve.Z=H},93442:function(ke,ve,k){"use strict";var M=k(44978),H=k(45607);ve.Z=function(U,Y){if((0,M.Z)(U)){for(var N,I=-1/0,C=0;C<U.length;C++){var A=U[C],F=(0,H.Z)(Y)?Y(A):A[Y];F>I&&(N=A,I=F)}return N}}},13882:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return M}});function M(H){if(!Array.isArray(H))return-1/0;var U=H.length;if(!U)return-1/0;for(var Y=H[0],N=1;N<U;N++)Y=Math.max(Y,H[N]);return Y}},92426:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return U}});function M(Y){var N,I,C,A=Y||1;function F(W,K){++N>A&&(C=I,P(1),++N),I[W]=K}function P(W){N=0,I=Object.create(null),W||(C=Object.create(null))}return P(),{clear:P,has:function(W){return I[W]!==void 0||C[W]!==void 0},get:function(W){var K=I[W];if(K!==void 0)return K;if((K=C[W])!==void 0)return F(W,K),K},set:function(W,K){I[W]!==void 0?I[W]=K:F(W,K)}}}var H=new Map;function U(Y,N,I){I===void 0&&(I=128);var C=function(){for(var A=[],F=0;F<arguments.length;F++)A[F]=arguments[F];var P=N?N.apply(this,A):A[0];H.has(Y)||H.set(Y,M(I));var W=H.get(Y);if(W.has(P))return W.get(P);var K=Y.apply(this,A);return W.set(P,K),K};return C}},89372:function(ke,ve,k){"use strict";var M=k(44978),H=k(45607);ve.Z=function(U,Y){if((0,M.Z)(U)){for(var N,I=1/0,C=0;C<U.length;C++){var A=U[C],F=(0,H.Z)(Y)?Y(A):A[Y];F<I&&(N=A,I=F)}return N}}},71523:function(ke,ve,k){"use strict";var M=k(44978);ve.Z=function(H){if((0,M.Z)(H))return H.reduce(function(U,Y){return Math.min(U,Y)},H[0])}},8614:function(ke,ve){"use strict";var k=function(M,H){return(M%H+H)%H};ve.Z=k},13279:function(ke,ve){"use strict";ve.Z=function(){}},35278:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return I}});var M=k(15255),H=k(44978),U=k(83845),Y=function(C,A,F){if(!(0,H.Z)(C)&&!(0,U.Z)(C))return C;var P=F;return(0,M.Z)(C,function(W,K){P=A(P,W,K)}),P},N=Y,I=function(C,A){return N(C,function(F,P,W){return A.includes(W)||(F[W]=P),F},{})}},23413:function(ke,ve,k){"use strict";var M=k(15255),H=k(83845),U=Object.prototype.hasOwnProperty;ve.Z=function(Y,N){if(Y===null||!(0,H.Z)(Y))return{};var I={};return(0,M.Z)(N,function(C){U.call(Y,C)&&(I[C]=Y[C])}),I}},17829:function(ke,ve,k){"use strict";var M=k(4637),H=k(76714),U=k(25897);ve.Z=function(Y,N,I){var C=Y,A=(0,H.Z)(N)?N.split("."):N;return A.forEach(function(F,P){P<A.length-1?((0,M.Z)(C[F])||(C[F]=(0,U.Z)(A[P+1])?[]:{}),C=C[F]):C[F]=I}),Y}},68856:function(ke,ve){"use strict";function k(M,H){return!M||!H?M:M.replace(/\\?\{([^{}]+)\}/g,function(U,Y){return U.charAt(0)==="\\"?U.slice(1):H[Y]===void 0?"":H[Y]})}ve.Z=k},99711:function(ke,ve){"use strict";ve.Z=function(k,M,H){var U,Y,N,I,C=0;H||(H={});var A=function(){C=H.leading===!1?0:Date.now(),U=null,I=k.apply(Y,N),U||(Y=N=null)},F=function(){var P=Date.now();!C&&H.leading===!1&&(C=P);var W=M-(P-C);return Y=this,N=arguments,W<=0||W>M?(U&&(clearTimeout(U),U=null),C=P,I=k.apply(Y,N),U||(Y=N=null)):!U&&H.trailing!==!1&&(U=setTimeout(A,W)),I};return F.cancel=function(){clearTimeout(U),C=0,U=Y=N=null},F}},92123:function(ke,ve,k){"use strict";var M=k(95147);ve.Z=function(H){return(0,M.Z)(H)?"":H.toString()}},58029:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return M}});function M(H,U){U===void 0&&(U=new Map);var Y=[];if(Array.isArray(H))for(var N=0,I=H.length;N<I;N++){var C=H[N];U.has(C)||(Y.push(C),U.set(C,!0))}return Y}},71701:function(ke,ve){"use strict";var k={};ve.Z=function(M){return M=M||"g",k[M]?k[M]+=1:k[M]=1,M+k[M]}},83914:function(ke,ve,k){"use strict";var M=k(92123),H=function(U){var Y=(0,M.Z)(U);return Y.charAt(0).toUpperCase()+Y.substring(1)};ve.Z=H},75839:function(ke,ve,k){"use strict";k.d(ve,{Y:function(){return K}});var M=k(97582),H=k(64985);function U(ge,be,Ue){if(ge[Ue].length>7){ge[Ue].shift();for(var Ne=ge[Ue],ye=Ue;Ne.length;)be[Ue]="A",ge.splice(ye+=1,0,["C"].concat(Ne.splice(0,6)));ge.splice(Ue,1)}}var Y=k(4848),N=k(11013);function I(ge){return(0,N.y)(ge)&&ge.every(function(be){var Ue=be[0];return"MC".includes(Ue)})}var C=k(74873);function A(ge,be,Ue,Ne,ye,De){var Ce=.3333333333333333,Me=2/3;return[Ce*ge+Me*Ue,Ce*be+Me*Ne,Ce*ye+Me*Ue,Ce*De+Me*Ne,ye,De]}var F=k(17570),P=function(ge,be,Ue,Ne){var ye=.5,De=(0,F.k)([ge,be],[Ue,Ne],ye);return(0,M.ev)((0,M.ev)([],De,!0),[Ue,Ne,Ue,Ne],!1)};function W(ge,be){var Ue=ge[0],Ne=ge.slice(1).map(Number),ye=Ne[0],De=Ne[1],Ce,Me=be.x1,Oe=be.y1,re=be.x,q=be.y;switch("TQ".includes(Ue)||(be.qx=null,be.qy=null),Ue){case"M":return be.x=ye,be.y=De,ge;case"A":return Ce=[Me,Oe].concat(Ne),["C"].concat((0,C.W)(Ce[0],Ce[1],Ce[2],Ce[3],Ce[4],Ce[5],Ce[6],Ce[7],Ce[8],Ce[9]));case"Q":return be.qx=ye,be.qy=De,Ce=[Me,Oe].concat(Ne),["C"].concat(A(Ce[0],Ce[1],Ce[2],Ce[3],Ce[4],Ce[5]));case"L":return["C"].concat(P(Me,Oe,ye,De));case"Z":return Me===re&&Oe===q?["C",Me,Oe,re,q,re,q]:["C"].concat(P(Me,Oe,re,q));default:}return ge}function K(ge,be){if(be===void 0&&(be=!1),I(ge)){var Ue=[].concat(ge);return be?[Ue,[]]:Ue}for(var Ne=(0,Y.A)(ge),ye=(0,M.pi)({},H.z),De=[],Ce="",Me=Ne.length,Oe,re,q=[],ce=0;ce<Me;ce+=1){Ne[ce]&&(Ce=Ne[ce][0]),De[ce]=Ce;var Ee=W(Ne[ce],ye);Ne[ce]=Ee,U(Ne,De,ce),Me=Ne.length,Ce==="Z"&&q.push(ce),Oe=Ne[ce],re=Oe.length,ye.x1=+Oe[re-2],ye.y1=+Oe[re-1],ye.x2=+Oe[re-4]||ye.x1,ye.y2=+Oe[re-3]||ye.y1}return be?[Ne,q]:Ne}},18323:function(ke,ve,k){"use strict";k.d(ve,{R:function(){return M}});var M={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0}},64985:function(ke,ve,k){"use strict";k.d(ve,{z:function(){return M}});var M={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null}},74873:function(ke,ve,k){"use strict";k.d(ve,{W:function(){return H}});function M(U,Y,N){var I=U*Math.cos(N)-Y*Math.sin(N),C=U*Math.sin(N)+Y*Math.cos(N);return{x:I,y:C}}function H(U,Y,N,I,C,A,F,P,W,K){var ge=U,be=Y,Ue=N,Ne=I,ye=P,De=W,Ce=Math.PI*120/180,Me=Math.PI/180*(+C||0),Oe=[],re,q,ce,Ee,Te;if(K)q=K[0],ce=K[1],Ee=K[2],Te=K[3];else{re=M(ge,be,-Me),ge=re.x,be=re.y,re=M(ye,De,-Me),ye=re.x,De=re.y;var Je=(ge-ye)/2,He=(be-De)/2,rt=Je*Je/(Ue*Ue)+He*He/(Ne*Ne);rt>1&&(rt=Math.sqrt(rt),Ue*=rt,Ne*=rt);var Et=Ue*Ue,lt=Ne*Ne,st=(A===F?-1:1)*Math.sqrt(Math.abs((Et*lt-Et*He*He-lt*Je*Je)/(Et*He*He+lt*Je*Je)));Ee=st*Ue*He/Ne+(ge+ye)/2,Te=st*-Ne*Je/Ue+(be+De)/2,q=Math.asin(((be-Te)/Ne*Math.pow(10,9)>>0)/Math.pow(10,9)),ce=Math.asin(((De-Te)/Ne*Math.pow(10,9)>>0)/Math.pow(10,9)),q=ge<Ee?Math.PI-q:q,ce=ye<Ee?Math.PI-ce:ce,q<0&&(q=Math.PI*2+q),ce<0&&(ce=Math.PI*2+ce),F&&q>ce&&(q-=Math.PI*2),!F&&ce>q&&(ce-=Math.PI*2)}var mt=ce-q;if(Math.abs(mt)>Ce){var fe=ce,We=ye,ht=De;ce=q+Ce*(F&&ce>q?1:-1),ye=Ee+Ue*Math.cos(ce),De=Te+Ne*Math.sin(ce),Oe=H(ye,De,Ue,Ne,C,0,F,We,ht,[ce,fe,Ee,Te])}mt=ce-q;var Pt=Math.cos(q),Ve=Math.sin(q),it=Math.cos(ce),ft=Math.sin(ce),ze=Math.tan(mt/4),Qe=4/3*Ue*ze,Se=4/3*Ne*ze,E=[ge,be],me=[ge+Qe*Ve,be-Se*Pt],L=[ye+Qe*ft,De-Se*it],X=[ye,De];if(me[0]=2*E[0]-me[0],me[1]=2*E[1]-me[1],K)return me.concat(L,X,Oe);Oe=me.concat(L,X,Oe);for(var Ke=[],ot=0,pe=Oe.length;ot<pe;ot+=1)Ke[ot]=ot%2?M(Oe[ot-1],Oe[ot],Me).y:M(Oe[ot],Oe[ot+1],Me).x;return Ke}},28659:function(ke,ve,k){"use strict";k.d(ve,{U:function(){return M}});function M(H){return H.map(function(U){return Array.isArray(U)?[].concat(U):U})}},4848:function(ke,ve,k){"use strict";k.d(ve,{A:function(){return Oe}});var M=k(97582),H=k(11013),U=k(64985),Y=k(41010),N=k(56346),I=k(18323);function C(re){for(var q=re.pathValue[re.segmentStart],ce=q.toLowerCase(),Ee=re.data;Ee.length>=I.R[ce]&&(ce==="m"&&Ee.length>2?(re.segments.push([q].concat(Ee.splice(0,2))),ce="l",q=q==="m"?"l":"L"):re.segments.push([q].concat(Ee.splice(0,I.R[ce]))),!!I.R[ce]););}function A(re){var q=re.index,ce=re.pathValue,Ee=ce.charCodeAt(q);if(Ee===48){re.param=0,re.index+=1;return}if(Ee===49){re.param=1,re.index+=1;return}re.err='[path-util]: invalid Arc flag "'.concat(ce[q],'", expecting 0 or 1 at index ').concat(q)}function F(re){return re>=48&&re<=57||re===43||re===45||re===46}function P(re){return re>=48&&re<=57}function W(re){var q=re.max,ce=re.pathValue,Ee=re.index,Te=Ee,Je=!1,He=!1,rt=!1,Et=!1,lt;if(Te>=q){re.err="[path-util]: Invalid path value at index ".concat(Te,', "pathValue" is missing param');return}if(lt=ce.charCodeAt(Te),(lt===43||lt===45)&&(Te+=1,lt=ce.charCodeAt(Te)),!P(lt)&<!==46){re.err="[path-util]: Invalid path value at index ".concat(Te,', "').concat(ce[Te],'" is not a number');return}if(lt!==46){if(Je=lt===48,Te+=1,lt=ce.charCodeAt(Te),Je&&Te<q&<&&P(lt)){re.err="[path-util]: Invalid path value at index ".concat(Ee,', "').concat(ce[Ee],'" illegal number');return}for(;Te<q&&P(ce.charCodeAt(Te));)Te+=1,He=!0;lt=ce.charCodeAt(Te)}if(lt===46){for(Et=!0,Te+=1;P(ce.charCodeAt(Te));)Te+=1,rt=!0;lt=ce.charCodeAt(Te)}if(lt===101||lt===69){if(Et&&!He&&!rt){re.err="[path-util]: Invalid path value at index ".concat(Te,', "').concat(ce[Te],'" invalid float exponent');return}if(Te+=1,lt=ce.charCodeAt(Te),(lt===43||lt===45)&&(Te+=1),Te<q&&P(ce.charCodeAt(Te)))for(;Te<q&&P(ce.charCodeAt(Te));)Te+=1;else{re.err="[path-util]: Invalid path value at index ".concat(Te,', "').concat(ce[Te],'" invalid integer exponent');return}}re.index=Te,re.param=+re.pathValue.slice(Ee,Te)}function K(re){var q=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];return re===10||re===13||re===8232||re===8233||re===32||re===9||re===11||re===12||re===160||re>=5760&&q.includes(re)}function ge(re){for(var q=re.pathValue,ce=re.max;re.index<ce&&K(q.charCodeAt(re.index));)re.index+=1}function be(re){switch(re|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 Ue(re){return(re|32)===97}function Ne(re){var q=re.max,ce=re.pathValue,Ee=re.index,Te=ce.charCodeAt(Ee),Je=I.R[ce[Ee].toLowerCase()];if(re.segmentStart=Ee,!be(Te)){re.err='[path-util]: Invalid path value "'.concat(ce[Ee],'" is not a path command');return}if(re.index+=1,ge(re),re.data=[],!Je){C(re);return}for(;;){for(var He=Je;He>0;He-=1){if(Ue(Te)&&(He===3||He===4)?A(re):W(re),re.err.length)return;re.data.push(re.param),ge(re),re.index<q&&ce.charCodeAt(re.index)===44&&(re.index+=1,ge(re))}if(re.index>=re.max||!F(ce.charCodeAt(re.index)))break}C(re)}var ye=function(){function re(q){this.pathValue=q,this.segments=[],this.max=q.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""}return re}();function De(re){if((0,N.n)(re))return[].concat(re);var q=new ye(re);for(ge(q);q.index<q.max&&!q.err.length;)Ne(q);return q.err?q.err:q.segments}function Ce(re){if((0,Y.b)(re))return[].concat(re);var q=De(re),ce=0,Ee=0,Te=0,Je=0;return q.map(function(He){var rt=He.slice(1).map(Number),Et=He[0],lt=Et.toUpperCase();if(Et==="M")return ce=rt[0],Ee=rt[1],Te=ce,Je=Ee,["M",ce,Ee];var st;if(Et!==lt)switch(lt){case"A":st=[lt,rt[0],rt[1],rt[2],rt[3],rt[4],rt[5]+ce,rt[6]+Ee];break;case"V":st=[lt,rt[0]+Ee];break;case"H":st=[lt,rt[0]+ce];break;default:{var mt=rt.map(function(We,ht){return We+(ht%2?Ee:ce)});st=[lt].concat(mt)}}else st=[lt].concat(rt);var fe=st.length;switch(lt){case"Z":ce=Te,Ee=Je;break;case"H":ce=st[1];break;case"V":Ee=st[1];break;default:ce=st[fe-2],Ee=st[fe-1],lt==="M"&&(Te=ce,Je=Ee)}return st})}function Me(re,q){var ce=re[0],Ee=q.x1,Te=q.y1,Je=q.x2,He=q.y2,rt=re.slice(1).map(Number),Et=re;if("TQ".includes(ce)||(q.qx=null,q.qy=null),ce==="H")Et=["L",re[1],Te];else if(ce==="V")Et=["L",Ee,re[1]];else if(ce==="S"){var lt=Ee*2-Je,st=Te*2-He;q.x1=lt,q.y1=st,Et=["C",lt,st].concat(rt)}else if(ce==="T"){var mt=Ee*2-q.qx,fe=Te*2-q.qy;q.qx=mt,q.qy=fe,Et=["Q",mt,fe].concat(rt)}else if(ce==="Q"){var We=rt[0],ht=rt[1];q.qx=We,q.qy=ht}return Et}function Oe(re){if((0,H.y)(re))return[].concat(re);for(var q=Ce(re),ce=(0,M.pi)({},U.z),Ee=0;Ee<q.length;Ee+=1){q[Ee]=Me(q[Ee],ce);var Te=q[Ee],Je=Te.length;ce.x1=+Te[Je-2],ce.y1=+Te[Je-1],ce.x2=+Te[Je-4]||ce.x1,ce.y2=+Te[Je-3]||ce.y1}return q}},65850:function(ke,ve,k){"use strict";k.d(ve,{G:function(){return M}});function M(H){var U=H.slice(1).map(function(Y,N,I){return N?I[N-1].slice(-2).concat(Y.slice(1)):H[0].slice(1).concat(Y.slice(1))}).map(function(Y){return Y.map(function(N,I){return Y[Y.length-I-2*(1-I%2)]})}).reverse();return[["M"].concat(U[0].slice(0,2))].concat(U.map(function(Y){return["C"].concat(Y.slice(2))}))}},44078:function(ke,ve,k){"use strict";k.d(ve,{y:function(){return M}});function M(H,U){return Math.sqrt((H[0]-U[0])*(H[0]-U[0])+(H[1]-U[1])*(H[1]-U[1]))}},99872:function(ke,ve,k){"use strict";k.d(ve,{x:function(){return N}});var M=k(17570),H=k(6489);function U(I,C){C===void 0&&(C=.5);var A=I.slice(0,2),F=I.slice(2,4),P=I.slice(4,6),W=I.slice(6,8),K=(0,M.k)(A,F,C),ge=(0,M.k)(F,P,C),be=(0,M.k)(P,W,C),Ue=(0,M.k)(K,ge,C),Ne=(0,M.k)(ge,be,C),ye=(0,M.k)(Ue,Ne,C);return[["C"].concat(K,Ue,ye),["C"].concat(Ne,be,W)]}function Y(I){return I.map(function(C,A,F){var P=A&&F[A-1].slice(-2).concat(C.slice(1)),W=A?(0,H.S)(P[0],P[1],P[2],P[3],P[4],P[5],P[6],P[7],P[8],{bbox:!1}).length:0,K;return A?K=W?U(P):[C,C]:K=[C],{s:C,ss:K,l:W}})}function N(I,C,A){var F=Y(I),P=Y(C),W=F.length,K=P.length,ge=F.filter(function(re){return re.l}).length,be=P.filter(function(re){return re.l}).length,Ue=F.filter(function(re){return re.l}).reduce(function(re,q){var ce=q.l;return re+ce},0)/ge||0,Ne=P.filter(function(re){return re.l}).reduce(function(re,q){var ce=q.l;return re+ce},0)/be||0,ye=A||Math.max(W,K),De=[Ue,Ne],Ce=[ye-W,ye-K],Me=0,Oe=[F,P].map(function(re,q){return re.l===ye?re.map(function(ce){return ce.s}):re.map(function(ce,Ee){return Me=Ee&&Ce[q]&&ce.l>=De[q],Ce[q]-=Me?1:0,Me?ce.ss:[ce.s]}).flat()});return Oe[0].length===Oe[1].length?Oe:N(Oe[0],Oe[1],ye)}},92455:function(ke,ve,k){"use strict";k.d(ve,{b:function(){return Y}});var M=k(75839);function H(N,I,C,A,F,P,W,K){return 3*((K-I)*(C+F)-(W-N)*(A+P)+A*(N-F)-C*(I-P)+K*(F+N/3)-W*(P+I/3))/20}function U(N){var I=0,C=0,A=0;return(0,M.Y)(N).map(function(F){var P;switch(F[0]){case"M":return I=F[1],C=F[2],0;default:var W=F.slice(1),K=W[0],ge=W[1],be=W[2],Ue=W[3],Ne=W[4],ye=W[5];return A=H(I,C,K,ge,be,Ue,Ne,ye),P=F.slice(-2),I=P[0],C=P[1],A}}).reduce(function(F,P){return F+P},0)}function Y(N){return U(N)>=0}},84329:function(ke,ve,k){"use strict";k.d(ve,{r:function(){return U}});var M=k(97582),H=k(32262);function U(Y,N,I){return(0,H.s)(Y,N,(0,M.pi)((0,M.pi)({},I),{bbox:!1,length:!0})).point}},83555:function(ke,ve,k){"use strict";k.d(ve,{g:function(){return U}});var M=k(44078);function H(Y){var N=Y.length,I=N-1;return Y.map(function(C,A){return Y.map(function(F,P){var W=A+P,K;return P===0||Y[W]&&Y[W][0]==="M"?(K=Y[W],["M"].concat(K.slice(-2))):(W>=N&&(W-=I),Y[W])})})}function U(Y,N){var I=Y.length-1,C=[],A=0,F=0,P=H(Y);return P.forEach(function(W,K){Y.slice(1).forEach(function(ge,be){F+=(0,M.y)(Y[(K+be)%I].slice(-2),N[be%I].slice(-2))}),C[K]=F,F=0}),A=C.indexOf(Math.min.apply(null,C)),P[A]}},69877:function(ke,ve,k){"use strict";k.d(ve,{D:function(){return U}});var M=k(97582),H=k(32262);function U(Y,N){return(0,H.s)(Y,void 0,(0,M.pi)((0,M.pi)({},N),{bbox:!1,length:!0})).length}},41010:function(ke,ve,k){"use strict";k.d(ve,{b:function(){return H}});var M=k(56346);function H(U){return(0,M.n)(U)&&U.every(function(Y){var N=Y[0];return N===N.toUpperCase()})}},11013:function(ke,ve,k){"use strict";k.d(ve,{y:function(){return H}});var M=k(41010);function H(U){return(0,M.b)(U)&&U.every(function(Y){var N=Y[0];return"ACLMQZ".includes(N)})}},56346:function(ke,ve,k){"use strict";k.d(ve,{n:function(){return H}});var M=k(18323);function H(U){return Array.isArray(U)&&U.every(function(Y){var N=Y[0].toLowerCase();return M.R[N]===Y.length-1&&"achlmqstvz".includes(N)})}},17570:function(ke,ve,k){"use strict";k.d(ve,{k:function(){return M}});function M(H,U,Y){var N=H[0],I=H[1],C=U[0],A=U[1];return[N+(C-N)*Y,I+(A-I)*Y]}},32262:function(ke,ve,k){"use strict";k.d(ve,{s:function(){return W}});var M=k(4848),H=k(17570),U=k(44078);function Y(K,ge,be,Ue,Ne){var ye=(0,U.y)([K,ge],[be,Ue]),De={x:0,y:0};if(typeof Ne=="number")if(Ne<=0)De={x:K,y:ge};else if(Ne>=ye)De={x:be,y:Ue};else{var Ce=(0,H.k)([K,ge],[be,Ue],Ne/ye),Me=Ce[0],Oe=Ce[1];De={x:Me,y:Oe}}return{length:ye,point:De,min:{x:Math.min(K,be),y:Math.min(ge,Ue)},max:{x:Math.max(K,be),y:Math.max(ge,Ue)}}}function N(K,ge){var be=K.x,Ue=K.y,Ne=ge.x,ye=ge.y,De=be*Ne+Ue*ye,Ce=Math.sqrt((Math.pow(be,2)+Math.pow(Ue,2))*(Math.pow(Ne,2)+Math.pow(ye,2))),Me=be*ye-Ue*Ne<0?-1:1,Oe=Me*Math.acos(De/Ce);return Oe}function I(K,ge,be,Ue,Ne,ye,De,Ce,Me,Oe){var re=Math.abs,q=Math.sin,ce=Math.cos,Ee=Math.sqrt,Te=Math.PI,Je=re(be),He=re(Ue),rt=(Ne%360+360)%360,Et=rt*(Te/180);if(K===Ce&&ge===Me)return{x:K,y:ge};if(Je===0||He===0)return Y(K,ge,Ce,Me,Oe).point;var lt=(K-Ce)/2,st=(ge-Me)/2,mt={x:ce(Et)*lt+q(Et)*st,y:-q(Et)*lt+ce(Et)*st},fe=Math.pow(mt.x,2)/Math.pow(Je,2)+Math.pow(mt.y,2)/Math.pow(He,2);fe>1&&(Je*=Ee(fe),He*=Ee(fe));var We=Math.pow(Je,2)*Math.pow(He,2)-Math.pow(Je,2)*Math.pow(mt.y,2)-Math.pow(He,2)*Math.pow(mt.x,2),ht=Math.pow(Je,2)*Math.pow(mt.y,2)+Math.pow(He,2)*Math.pow(mt.x,2),Pt=We/ht;Pt=Pt<0?0:Pt;var Ve=(ye!==De?1:-1)*Ee(Pt),it={x:Ve*(Je*mt.y/He),y:Ve*(-(He*mt.x)/Je)},ft={x:ce(Et)*it.x-q(Et)*it.y+(K+Ce)/2,y:q(Et)*it.x+ce(Et)*it.y+(ge+Me)/2},ze={x:(mt.x-it.x)/Je,y:(mt.y-it.y)/He},Qe=N({x:1,y:0},ze),Se={x:(-mt.x-it.x)/Je,y:(-mt.y-it.y)/He},E=N(ze,Se);!De&&E>0?E-=2*Te:De&&E<0&&(E+=2*Te),E%=2*Te;var me=Qe+E*Oe,L=Je*ce(me),X=He*q(me),Ke={x:ce(Et)*L-q(Et)*X+ft.x,y:q(Et)*L+ce(Et)*X+ft.y};return Ke}function C(K,ge,be,Ue,Ne,ye,De,Ce,Me,Oe,re){var q,ce=re.bbox,Ee=ce===void 0?!0:ce,Te=re.length,Je=Te===void 0?!0:Te,He=re.sampleSize,rt=He===void 0?30:He,Et=typeof Oe=="number",lt=K,st=ge,mt=0,fe=[lt,st,mt],We=[lt,st],ht=0,Pt={x:0,y:0},Ve=[{x:lt,y:st}];Et&&Oe<=0&&(Pt={x:lt,y:st});for(var it=0;it<=rt;it+=1){if(ht=it/rt,q=I(K,ge,be,Ue,Ne,ye,De,Ce,Me,ht),lt=q.x,st=q.y,Ee&&Ve.push({x:lt,y:st}),Je&&(mt+=(0,U.y)(We,[lt,st])),We=[lt,st],Et&&mt>=Oe&&Oe>fe[2]){var ft=(mt-Oe)/(mt-fe[2]);Pt={x:We[0]*(1-ft)+fe[0]*ft,y:We[1]*(1-ft)+fe[1]*ft}}fe=[lt,st,mt]}return Et&&Oe>=mt&&(Pt={x:Ce,y:Me}),{length:mt,point:Pt,min:{x:Math.min.apply(null,Ve.map(function(ze){return ze.x})),y:Math.min.apply(null,Ve.map(function(ze){return ze.y}))},max:{x:Math.max.apply(null,Ve.map(function(ze){return ze.x})),y:Math.max.apply(null,Ve.map(function(ze){return ze.y}))}}}var A=k(6489);function F(K,ge,be,Ue,Ne,ye,De){var Ce=1-De;return{x:Math.pow(Ce,2)*K+2*Ce*De*be+Math.pow(De,2)*Ne,y:Math.pow(Ce,2)*ge+2*Ce*De*Ue+Math.pow(De,2)*ye}}function P(K,ge,be,Ue,Ne,ye,De,Ce){var Me,Oe=Ce.bbox,re=Oe===void 0?!0:Oe,q=Ce.length,ce=q===void 0?!0:q,Ee=Ce.sampleSize,Te=Ee===void 0?10:Ee,Je=typeof De=="number",He=K,rt=ge,Et=0,lt=[He,rt,Et],st=[He,rt],mt=0,fe={x:0,y:0},We=[{x:He,y:rt}];Je&&De<=0&&(fe={x:He,y:rt});for(var ht=0;ht<=Te;ht+=1){if(mt=ht/Te,Me=F(K,ge,be,Ue,Ne,ye,mt),He=Me.x,rt=Me.y,re&&We.push({x:He,y:rt}),ce&&(Et+=(0,U.y)(st,[He,rt])),st=[He,rt],Je&&Et>=De&&De>lt[2]){var Pt=(Et-De)/(Et-lt[2]);fe={x:st[0]*(1-Pt)+lt[0]*Pt,y:st[1]*(1-Pt)+lt[1]*Pt}}lt=[He,rt,Et]}return Je&&De>=Et&&(fe={x:Ne,y:ye}),{length:Et,point:fe,min:{x:Math.min.apply(null,We.map(function(Ve){return Ve.x})),y:Math.min.apply(null,We.map(function(Ve){return Ve.y}))},max:{x:Math.max.apply(null,We.map(function(Ve){return Ve.x})),y:Math.max.apply(null,We.map(function(Ve){return Ve.y}))}}}function W(K,ge,be){for(var Ue,Ne,ye,De,Ce,Me,Oe=(0,M.A)(K),re=typeof ge=="number",q,ce=[],Ee,Te=0,Je=0,He=0,rt=0,Et,lt=[],st=[],mt=0,fe={x:0,y:0},We=fe,ht=fe,Pt=fe,Ve=0,it=0,ft=Oe.length;it<ft;it+=1)Et=Oe[it],Ee=Et[0],q=Ee==="M",ce=q?ce:[Te,Je].concat(Et.slice(1)),q?(He=Et[1],rt=Et[2],fe={x:He,y:rt},We=fe,mt=0,re&&ge<.001&&(Pt=fe)):Ee==="L"?(Ue=Y(ce[0],ce[1],ce[2],ce[3],(ge||0)-Ve),mt=Ue.length,fe=Ue.min,We=Ue.max,ht=Ue.point):Ee==="A"?(Ne=C(ce[0],ce[1],ce[2],ce[3],ce[4],ce[5],ce[6],ce[7],ce[8],(ge||0)-Ve,be||{}),mt=Ne.length,fe=Ne.min,We=Ne.max,ht=Ne.point):Ee==="C"?(ye=(0,A.S)(ce[0],ce[1],ce[2],ce[3],ce[4],ce[5],ce[6],ce[7],(ge||0)-Ve,be||{}),mt=ye.length,fe=ye.min,We=ye.max,ht=ye.point):Ee==="Q"?(De=P(ce[0],ce[1],ce[2],ce[3],ce[4],ce[5],(ge||0)-Ve,be||{}),mt=De.length,fe=De.min,We=De.max,ht=De.point):Ee==="Z"&&(ce=[Te,Je,He,rt],Ce=Y(ce[0],ce[1],ce[2],ce[3],(ge||0)-Ve),mt=Ce.length,fe=Ce.min,We=Ce.max,ht=Ce.point),re&&Ve<ge&&Ve+mt>=ge&&(Pt=ht),st.push(We),lt.push(fe),Ve+=mt,Me=Ee!=="Z"?Et.slice(-2):[He,rt],Te=Me[0],Je=Me[1];return re&&ge>=Ve&&(Pt={x:Te,y:Je}),{length:Ve,point:Pt,min:{x:Math.min.apply(null,lt.map(function(ze){return ze.x})),y:Math.min.apply(null,lt.map(function(ze){return ze.y}))},max:{x:Math.max.apply(null,st.map(function(ze){return ze.x})),y:Math.max.apply(null,st.map(function(ze){return ze.y}))}}}},6489:function(ke,ve,k){"use strict";k.d(ve,{S:function(){return U}});var M=k(44078);function H(Y,N,I,C,A,F,P,W,K){var ge=1-K;return{x:Math.pow(ge,3)*Y+3*Math.pow(ge,2)*K*I+3*ge*Math.pow(K,2)*A+Math.pow(K,3)*P,y:Math.pow(ge,3)*N+3*Math.pow(ge,2)*K*C+3*ge*Math.pow(K,2)*F+Math.pow(K,3)*W}}function U(Y,N,I,C,A,F,P,W,K,ge){var be,Ue=ge.bbox,Ne=Ue===void 0?!0:Ue,ye=ge.length,De=ye===void 0?!0:ye,Ce=ge.sampleSize,Me=Ce===void 0?10:Ce,Oe=typeof K=="number",re=Y,q=N,ce=0,Ee=[re,q,ce],Te=[re,q],Je=0,He={x:0,y:0},rt=[{x:re,y:q}];Oe&&K<=0&&(He={x:re,y:q});for(var Et=0;Et<=Me;Et+=1){if(Je=Et/Me,be=H(Y,N,I,C,A,F,P,W,Je),re=be.x,q=be.y,Ne&&rt.push({x:re,y:q}),De&&(ce+=(0,M.y)(Te,[re,q])),Te=[re,q],Oe&&ce>=K&&K>Ee[2]){var lt=(ce-K)/(ce-Ee[2]);He={x:Te[0]*(1-lt)+Ee[0]*lt,y:Te[1]*(1-lt)+Ee[1]*lt}}Ee=[re,q,ce]}return Oe&&K>=ce&&(He={x:P,y:W}),{length:ce,point:He,min:{x:Math.min.apply(null,rt.map(function(st){return st.x})),y:Math.min.apply(null,rt.map(function(st){return st.y}))},max:{x:Math.max.apply(null,rt.map(function(st){return st.x})),y:Math.max.apply(null,rt.map(function(st){return st.y}))}}}},83406:function(ke,ve,k){"use strict";k.r(ve),k.d(ve,{default:function(){return QSe}});var M={};k.r(M),k.d(M,{circle:function(){return dde},diamond:function(){return hde},rect:function(){return vde},simple:function(){return _de},triangle:function(){return K4},triangleRect:function(){return gde},vee:function(){return fde}});var H=k(67294),U=k(82309),Y=k(25871),N=k(38870),I=k(22150),C=k(71577),A=k(2453),F=k(14446),P=k(78045),W=k(69677),K=k(11713),ge=k(35973),be=k(33170),Ue=k(28706),Ne={rightopen:"rightopen___cs_vm",rightmodal:"rightmodal___MNsxT",rname:"rname___QGxLy",topradios:"topradios___si9En",topradio:"topradio___kGT57",bocent:"bocent___yMEuU",bctitle:"bctitle___Pll_D",btcent:"btcent___aHH1B",bctitles:"bctitles___UC1Yp"};function ye(r){"@babel/helpers - typeof";return ye=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ye(r)}function De(r,n){if(ye(r)!="object"||!r)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var t=e.call(r,n||"default");if(ye(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(r)}function Ce(r){var n=De(r,"string");return ye(n)=="symbol"?n:n+""}function Me(r,n,e){return(n=Ce(n))in r?Object.defineProperty(r,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[n]=e,r}function Oe(r,n){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);n&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),e.push.apply(e,t)}return e}function re(r){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?Oe(Object(e),!0).forEach(function(t){Me(r,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):Oe(Object(e)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))})}return r}function q(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}function ce(r,n){for(var e=0;e<n.length;e++){var t=n[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,Ce(t.key),t)}}function Ee(r,n,e){return n&&ce(r.prototype,n),e&&ce(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function Te(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=Array(n);e<n;e++)t[e]=r[e];return t}function Je(r){if(Array.isArray(r))return Te(r)}function He(r){if(typeof Symbol!="undefined"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function rt(r,n){if(r){if(typeof r=="string")return Te(r,n);var e={}.toString.call(r).slice(8,-1);return e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set"?Array.from(r):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Te(r,n):void 0}}function Et(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lt(r){return Je(r)||He(r)||rt(r)||Et()}function st(r){return st=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},st(r)}function mt(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(n){}return(mt=function(){return!!r})()}function fe(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function We(r,n){if(n&&(ye(n)=="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fe(r)}function ht(r,n,e){return n=st(n),We(r,mt()?Reflect.construct(n,e||[],st(r).constructor):n.apply(r,e))}function Pt(r,n){return Pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Pt(r,n)}function Ve(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(n&&n.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),n&&Pt(r,n)}function it(r){if(Array.isArray(r))return r}function ft(r,n){var e=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(e!=null){var t,i,a,s,o=[],l=!0,u=!1;try{if(a=(e=e.call(r)).next,n===0){if(Object(e)!==e)return;l=!1}else for(;!(l=(t=a.call(e)).done)&&(o.push(t.value),o.length!==n);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&e.return!=null&&(s=e.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function ze(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qe(r,n){return it(r)||ft(r,n)||rt(r,n)||ze()}var Se=k(54146),E=k(33983),me=k(98333),L=k(85975),X=k(32945),Ke=k(35600),ot=k(31437),pe=k(25897),xe=k(95147),Ze=k(76714),O=k(81957),ne=k(71523),qe=k(13882),dt=k(80450),nt=k(8614),xt=k(4848),bt=k(75839),wt=k(99872),we=k(92455),oe=k(65850),Fe=k(28659),Ye=k(83555),ie=k(71154),Ie=k(44978),je=k(90134),Be=k(45607);function et(r,n,e){r.prototype=n.prototype=e,e.constructor=r}function gt(r,n){var e=Object.create(r.prototype);for(var t in n)e[t]=n[t];return e}function Mt(){}var Rt=.7,Ft=1/Rt,Xt="\\s*([+-]?\\d+)\\s*",Qt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",an="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",In=/^#([0-9a-f]{3,8})$/,Xr=new RegExp(`^rgb\\(${Xt},${Xt},${Xt}\\)$`),Cn=new RegExp(`^rgb\\(${an},${an},${an}\\)$`),or=new RegExp(`^rgba\\(${Xt},${Xt},${Xt},${Qt}\\)$`),ei=new RegExp(`^rgba\\(${an},${an},${an},${Qt}\\)$`),mr=new RegExp(`^hsl\\(${Qt},${an},${an}\\)$`),Fr=new RegExp(`^hsla\\(${Qt},${an},${an},${Qt}\\)$`),ta={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};et(Mt,nn,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:Qa,formatHex:Qa,formatHex8:Bt,formatHsl:en,formatRgb:Jt,toString:Jt});function Qa(){return this.rgb().formatHex()}function Bt(){return this.rgb().formatHex8()}function en(){return $e(this).formatHsl()}function Jt(){return this.rgb().formatRgb()}function nn(r){var n,e;return r=(r+"").trim().toLowerCase(),(n=In.exec(r))?(e=n[1].length,n=parseInt(n[1],16),e===6?sr(n):e===3?new $r(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):e===8?Pn(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):e===4?Pn(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=Xr.exec(r))?new $r(n[1],n[2],n[3],1):(n=Cn.exec(r))?new $r(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=or.exec(r))?Pn(n[1],n[2],n[3],n[4]):(n=ei.exec(r))?Pn(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=mr.exec(r))?Le(n[1],n[2]/100,n[3]/100,1):(n=Fr.exec(r))?Le(n[1],n[2]/100,n[3]/100,n[4]):ta.hasOwnProperty(r)?sr(ta[r]):r==="transparent"?new $r(NaN,NaN,NaN,0):null}function sr(r){return new $r(r>>16&255,r>>8&255,r&255,1)}function Pn(r,n,e,t){return t<=0&&(r=n=e=NaN),new $r(r,n,e,t)}function Fn(r){return r instanceof Mt||(r=nn(r)),r?(r=r.rgb(),new $r(r.r,r.g,r.b,r.opacity)):new $r}function zr(r,n,e,t){return arguments.length===1?Fn(r):new $r(r,n,e,t==null?1:t)}function $r(r,n,e,t){this.r=+r,this.g=+n,this.b=+e,this.opacity=+t}et($r,zr,gt(Mt,{brighter(r){return r=r==null?Ft:Math.pow(Ft,r),new $r(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?Rt:Math.pow(Rt,r),new $r(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new $r(D(this.r),D(this.g),D(this.b),S(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:Ae,formatHex:Ae,formatHex8:$,formatRgb:z,toString:z}));function Ae(){return`#${J(this.r)}${J(this.g)}${J(this.b)}`}function $(){return`#${J(this.r)}${J(this.g)}${J(this.b)}${J((isNaN(this.opacity)?1:this.opacity)*255)}`}function z(){const r=S(this.opacity);return`${r===1?"rgb(":"rgba("}${D(this.r)}, ${D(this.g)}, ${D(this.b)}${r===1?")":`, ${r})`}`}function S(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function D(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function J(r){return r=D(r),(r<16?"0":"")+r.toString(16)}function Le(r,n,e,t){return t<=0?r=n=e=NaN:e<=0||e>=1?r=n=NaN:n<=0&&(r=NaN),new at(r,n,e,t)}function $e(r){if(r instanceof at)return new at(r.h,r.s,r.l,r.opacity);if(r instanceof Mt||(r=nn(r)),!r)return new at;if(r instanceof at)return r;r=r.rgb();var n=r.r/255,e=r.g/255,t=r.b/255,i=Math.min(n,e,t),a=Math.max(n,e,t),s=NaN,o=a-i,l=(a+i)/2;return o?(n===a?s=(e-t)/o+(e<t)*6:e===a?s=(t-n)/o+2:s=(n-e)/o+4,o/=l<.5?a+i:2-a-i,s*=60):o=l>0&&l<1?0:s,new at(s,o,l,r.opacity)}function tt(r,n,e,t){return arguments.length===1?$e(r):new at(r,n,e,t==null?1:t)}function at(r,n,e,t){this.h=+r,this.s=+n,this.l=+e,this.opacity=+t}et(at,tt,gt(Mt,{brighter(r){return r=r==null?Ft:Math.pow(Ft,r),new at(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?Rt:Math.pow(Rt,r),new at(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,n=isNaN(r)||isNaN(this.s)?0:this.s,e=this.l,t=e+(e<.5?e:1-e)*n,i=2*e-t;return new $r($t(r>=240?r-240:r+120,i,t),$t(r,i,t),$t(r<120?r+240:r-120,i,t),this.opacity)},clamp(){return new at(Ct(this.h),pt(this.s),pt(this.l),S(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const r=S(this.opacity);return`${r===1?"hsl(":"hsla("}${Ct(this.h)}, ${pt(this.s)*100}%, ${pt(this.l)*100}%${r===1?")":`, ${r})`}`}}));function Ct(r){return r=(r||0)%360,r<0?r+360:r}function pt(r){return Math.max(0,Math.min(1,r||0))}function $t(r,n,e){return(r<60?n+(e-n)*r/60:r<180?e:r<240?n+(e-n)*(240-r)/60:n)*255}var Nt=k(11702);function Ot(r,n){var e=typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(!e){if(Array.isArray(r)||(e=rt(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:i}}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 a,s=!0,o=!1;return{s:function(){e=e.call(r)},n:function(){var u=e.next();return s=u.done,u},e:function(u){o=!0,a=u},f:function(){try{s||e.return==null||e.return()}finally{if(o)throw a}}}}var Wt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof k.g!="undefined"?k.g:typeof self!="undefined"?self:{},dn={exports:{}};(function(r,n){(function(e,t){r.exports=t()})(Wt,function(){function e(x,_,p,b,R){t(x,_,p||0,b||x.length-1,R||a)}function t(x,_,p,b,R){for(;b>p;){if(b-p>600){var B=b-p+1,j=_-p+1,Z=Math.log(B),te=.5*Math.exp(2*Z/3),le=.5*Math.sqrt(Z*te*(B-te)/B)*(j-B/2<0?-1:1),ue=Math.max(p,Math.floor(_-j*te/B+le)),se=Math.min(b,Math.floor(_+(B-j)*te/B+le));t(x,_,ue,se,R)}var V=x[_],ee=p,he=b;for(i(x,p,_),R(x[b],V)>0&&i(x,p,b);ee<he;){for(i(x,ee,he),ee++,he--;R(x[ee],V)<0;)ee++;for(;R(x[he],V)>0;)he--}R(x[p],V)===0?i(x,p,he):(he++,i(x,he,b)),he<=_&&(p=he+1),_<=he&&(b=he-1)}}function i(x,_,p){var b=x[_];x[_]=x[p],x[p]=b}function a(x,_){return x<_?-1:x>_?1:0}var s=function(_){_===void 0&&(_=9),this._maxEntries=Math.max(4,_),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()};s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(_){var p=this.data,b=[];if(!w(_,p))return b;for(var R=this.toBBox,B=[];p;){for(var j=0;j<p.children.length;j++){var Z=p.children[j],te=p.leaf?R(Z):Z;w(_,te)&&(p.leaf?b.push(Z):y(_,te)?this._all(Z,b):B.push(Z))}p=B.pop()}return b},s.prototype.collides=function(_){var p=this.data;if(!w(_,p))return!1;for(var b=[];p;){for(var R=0;R<p.children.length;R++){var B=p.children[R],j=p.leaf?this.toBBox(B):B;if(w(_,j)){if(p.leaf||y(_,j))return!0;b.push(B)}}p=b.pop()}return!1},s.prototype.load=function(_){if(!(_&&_.length))return this;if(_.length<this._minEntries){for(var p=0;p<_.length;p++)this.insert(_[p]);return this}var b=this._build(_.slice(),0,_.length-1,0);if(!this.data.children.length)this.data=b;else if(this.data.height===b.height)this._splitRoot(this.data,b);else{if(this.data.height<b.height){var R=this.data;this.data=b,b=R}this._insert(b,this.data.height-b.height-1,!0)}return this},s.prototype.insert=function(_){return _&&this._insert(_,this.data.height-1),this},s.prototype.clear=function(){return this.data=T([]),this},s.prototype.remove=function(_,p){if(!_)return this;for(var b=this.data,R=this.toBBox(_),B=[],j=[],Z,te,le;b||B.length;){if(b||(b=B.pop(),te=B[B.length-1],Z=j.pop(),le=!0),b.leaf){var ue=o(_,b.children,p);if(ue!==-1)return b.children.splice(ue,1),B.push(b),this._condense(B),this}!le&&!b.leaf&&y(b,R)?(B.push(b),j.push(Z),Z=0,te=b,b=b.children[0]):te?(Z++,b=te.children[Z],le=!1):b=null}return this},s.prototype.toBBox=function(_){return _},s.prototype.compareMinX=function(_,p){return _.minX-p.minX},s.prototype.compareMinY=function(_,p){return _.minY-p.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(_){return this.data=_,this},s.prototype._all=function(_,p){for(var b=[];_;)_.leaf?p.push.apply(p,_.children):b.push.apply(b,_.children),_=b.pop();return p},s.prototype._build=function(_,p,b,R){var B=b-p+1,j=this._maxEntries,Z;if(B<=j)return Z=T(_.slice(p,b+1)),l(Z,this.toBBox),Z;R||(R=Math.ceil(Math.log(B)/Math.log(j)),j=Math.ceil(B/Math.pow(j,R-1))),Z=T([]),Z.leaf=!1,Z.height=R;var te=Math.ceil(B/j),le=te*Math.ceil(Math.sqrt(j));G(_,p,b,le,this.compareMinX);for(var ue=p;ue<=b;ue+=le){var se=Math.min(ue+le-1,b);G(_,ue,se,te,this.compareMinY);for(var V=ue;V<=se;V+=te){var ee=Math.min(V+te-1,se);Z.children.push(this._build(_,V,ee,R-1))}}return l(Z,this.toBBox),Z},s.prototype._chooseSubtree=function(_,p,b,R){for(;R.push(p),!(p.leaf||R.length-1===b);){for(var B=1/0,j=1/0,Z=void 0,te=0;te<p.children.length;te++){var le=p.children[te],ue=f(le),se=g(_,le)-ue;se<j?(j=se,B=ue<B?ue:B,Z=le):se===j&&ue<B&&(B=ue,Z=le)}p=Z||p.children[0]}return p},s.prototype._insert=function(_,p,b){var R=b?_:this.toBBox(_),B=[],j=this._chooseSubtree(R,this.data,p,B);for(j.children.push(_),c(j,R);p>=0&&B[p].children.length>this._maxEntries;)this._split(B,p),p--;this._adjustParentBBoxes(R,B,p)},s.prototype._split=function(_,p){var b=_[p],R=b.children.length,B=this._minEntries;this._chooseSplitAxis(b,B,R);var j=this._chooseSplitIndex(b,B,R),Z=T(b.children.splice(j,b.children.length-j));Z.height=b.height,Z.leaf=b.leaf,l(b,this.toBBox),l(Z,this.toBBox),p?_[p-1].children.push(Z):this._splitRoot(b,Z)},s.prototype._splitRoot=function(_,p){this.data=T([_,p]),this.data.height=_.height+1,this.data.leaf=!1,l(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(_,p,b){for(var R,B=1/0,j=1/0,Z=p;Z<=b-p;Z++){var te=u(_,0,Z,this.toBBox),le=u(_,Z,b,this.toBBox),ue=m(te,le),se=f(te)+f(le);ue<B?(B=ue,R=Z,j=se<j?se:j):ue===B&&se<j&&(j=se,R=Z)}return R||b-p},s.prototype._chooseSplitAxis=function(_,p,b){var R=_.leaf?this.compareMinX:d,B=_.leaf?this.compareMinY:h,j=this._allDistMargin(_,p,b,R),Z=this._allDistMargin(_,p,b,B);j<Z&&_.children.sort(R)},s.prototype._allDistMargin=function(_,p,b,R){_.children.sort(R);for(var B=this.toBBox,j=u(_,0,p,B),Z=u(_,b-p,b,B),te=v(j)+v(Z),le=p;le<b-p;le++){var ue=_.children[le];c(j,_.leaf?B(ue):ue),te+=v(j)}for(var se=b-p-1;se>=p;se--){var V=_.children[se];c(Z,_.leaf?B(V):V),te+=v(Z)}return te},s.prototype._adjustParentBBoxes=function(_,p,b){for(var R=b;R>=0;R--)c(p[R],_)},s.prototype._condense=function(_){for(var p=_.length-1,b=void 0;p>=0;p--)_[p].children.length===0?p>0?(b=_[p-1].children,b.splice(b.indexOf(_[p]),1)):this.clear():l(_[p],this.toBBox)};function o(x,_,p){if(!p)return _.indexOf(x);for(var b=0;b<_.length;b++)if(p(x,_[b]))return b;return-1}function l(x,_){u(x,0,x.children.length,_,x)}function u(x,_,p,b,R){R||(R=T(null)),R.minX=1/0,R.minY=1/0,R.maxX=-1/0,R.maxY=-1/0;for(var B=_;B<p;B++){var j=x.children[B];c(R,x.leaf?b(j):j)}return R}function c(x,_){return x.minX=Math.min(x.minX,_.minX),x.minY=Math.min(x.minY,_.minY),x.maxX=Math.max(x.maxX,_.maxX),x.maxY=Math.max(x.maxY,_.maxY),x}function d(x,_){return x.minX-_.minX}function h(x,_){return x.minY-_.minY}function f(x){return(x.maxX-x.minX)*(x.maxY-x.minY)}function v(x){return x.maxX-x.minX+(x.maxY-x.minY)}function g(x,_){return(Math.max(_.maxX,x.maxX)-Math.min(_.minX,x.minX))*(Math.max(_.maxY,x.maxY)-Math.min(_.minY,x.minY))}function m(x,_){var p=Math.max(x.minX,_.minX),b=Math.max(x.minY,_.minY),R=Math.min(x.maxX,_.maxX),B=Math.min(x.maxY,_.maxY);return Math.max(0,R-p)*Math.max(0,B-b)}function y(x,_){return x.minX<=_.minX&&x.minY<=_.minY&&_.maxX<=x.maxX&&_.maxY<=x.maxY}function w(x,_){return _.minX<=x.maxX&&_.minY<=x.maxY&&_.maxX>=x.minX&&_.maxY>=x.minY}function T(x){return{children:x,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function G(x,_,p,b,R){for(var B=[_,p];B.length;)if(p=B.pop(),_=B.pop(),!(p-_<=b)){var j=_+Math.ceil((p-_)/b/2)*b;e(x,j,_,p,R),B.push(_,j,j,p)}}return s})})(dn);var St=dn.exports,zt=function(r){return r.GROUP="g",r.FRAGMENT="fragment",r.CIRCLE="circle",r.ELLIPSE="ellipse",r.IMAGE="image",r.RECT="rect",r.LINE="line",r.POLYLINE="polyline",r.POLYGON="polygon",r.TEXT="text",r.PATH="path",r.HTML="html",r.MESH="mesh",r}({}),pn=function(r){return r[r.ZERO=0]="ZERO",r[r.NEGATIVE_ONE=1]="NEGATIVE_ONE",r}({}),Mn=null,En=null,ti=E.IH,bn=E.JG,Nn=E.Fp,Lr=E.VV,At=E.bA,qt=E.lu,yn=function(){function r(){q(this,r),this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return Ee(r,[{key:"update",value:function(e,t){bn(this.center,e),bn(this.halfExtents,t),qt(this.min,this.center,this.halfExtents),ti(this.max,this.center,this.halfExtents)}},{key:"setMinMax",value:function(e,t){ti(this.center,t,e),At(this.center,this.center,.5),qt(this.halfExtents,t,e),At(this.halfExtents,this.halfExtents,.5),bn(this.min,e),bn(this.max,t)}},{key:"getMin",value:function(){return this.min}},{key:"getMax",value:function(){return this.max}},{key:"add",value:function(e){if(!r.isEmpty(e)){if(r.isEmpty(this)){this.setMinMax(e.getMin(),e.getMax());return}var t=this.center,i=t[0],a=t[1],s=t[2],o=this.halfExtents,l=o[0],u=o[1],c=o[2],d=i-l,h=i+l,f=a-u,v=a+u,g=s-c,m=s+c,y=e.center,w=y[0],T=y[1],G=y[2],x=e.halfExtents,_=x[0],p=x[1],b=x[2],R=w-_,B=w+_,j=T-p,Z=T+p,te=G-b,le=G+b;R<d&&(d=R),B>h&&(h=B),j<f&&(f=j),Z>v&&(v=Z),te<g&&(g=te),le>m&&(m=le),t[0]=(d+h)*.5,t[1]=(f+v)*.5,t[2]=(g+m)*.5,o[0]=(h-d)*.5,o[1]=(v-f)*.5,o[2]=(m-g)*.5,this.min[0]=d,this.min[1]=f,this.min[2]=g,this.max[0]=h,this.max[1]=v,this.max[2]=m}}},{key:"setFromTransformedAABB",value:function(e,t){var i=this.center,a=this.halfExtents,s=e.center,o=e.halfExtents,l=t[0],u=t[4],c=t[8],d=t[1],h=t[5],f=t[9],v=t[2],g=t[6],m=t[10],y=Math.abs(l),w=Math.abs(u),T=Math.abs(c),G=Math.abs(d),x=Math.abs(h),_=Math.abs(f),p=Math.abs(v),b=Math.abs(g),R=Math.abs(m);i[0]=t[12]+l*s[0]+u*s[1]+c*s[2],i[1]=t[13]+d*s[0]+h*s[1]+f*s[2],i[2]=t[14]+v*s[0]+g*s[1]+m*s[2],a[0]=y*o[0]+w*o[1]+T*o[2],a[1]=G*o[0]+x*o[1]+_*o[2],a[2]=p*o[0]+b*o[1]+R*o[2],qt(this.min,i,a),ti(this.max,i,a)}},{key:"intersects",value:function(e){var t=this.getMax(),i=this.getMin(),a=e.getMax(),s=e.getMin();return i[0]<=a[0]&&t[0]>=s[0]&&i[1]<=a[1]&&t[1]>=s[1]&&i[2]<=a[2]&&t[2]>=s[2]}},{key:"intersection",value:function(e){if(!this.intersects(e))return null;var t=new r,i=Nn([0,0,0],this.getMin(),e.getMin()),a=Lr([0,0,0],this.getMax(),e.getMax());return t.setMinMax(i,a),t}},{key:"getNegativeFarPoint",value:function(e){return e.pnVertexFlag===273?bn([0,0,0],this.min):e.pnVertexFlag===272?[this.min[0],this.min[1],this.max[2]]:e.pnVertexFlag===257?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===256?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===17?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===16?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===1?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]}},{key:"getPositiveFarPoint",value:function(e){return e.pnVertexFlag===273?bn([0,0,0],this.max):e.pnVertexFlag===272?[this.max[0],this.max[1],this.min[2]]:e.pnVertexFlag===257?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===256?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===17?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===16?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===1?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]}}],[{key:"isEmpty",value:function(e){return!e||e.halfExtents[0]===0&&e.halfExtents[1]===0&&e.halfExtents[2]===0}}])}(),ln=function(){function r(n,e){q(this,r),this.distance=n||0,this.normal=e||E.al(0,1,0),this.updatePNVertexFlag()}return Ee(r,[{key:"updatePNVertexFlag",value:function(){this.pnVertexFlag=(+(this.normal[0]>=0)<<8)+(+(this.normal[1]>=0)<<4)+ +(this.normal[2]>=0)}},{key:"distanceToPoint",value:function(e){return E.AK(e,this.normal)-this.distance}},{key:"normalize",value:function(){var e=1/E.Zh(this.normal);E.bA(this.normal,this.normal,e),this.distance*=e}},{key:"intersectsLine",value:function(e,t,i){var a=this.distanceToPoint(e),s=this.distanceToPoint(t),o=a/(a-s),l=o>=0&&o<=1;return l&&i&&E.t7(i,e,t,o),l}}])}(),wi=function(r){return r[r.OUTSIDE=4294967295]="OUTSIDE",r[r.INSIDE=0]="INSIDE",r[r.INDETERMINATE=2147483647]="INDETERMINATE",r}({}),Ci=function(){function r(n){if(q(this,r),this.planes=[],n)this.planes=n;else for(var e=0;e<6;e++)this.planes.push(new ln)}return Ee(r,[{key:"extractFromVPMatrix",value:function(e){var t=Qe(e,16),i=t[0],a=t[1],s=t[2],o=t[3],l=t[4],u=t[5],c=t[6],d=t[7],h=t[8],f=t[9],v=t[10],g=t[11],m=t[12],y=t[13],w=t[14],T=t[15];E.t8(this.planes[0].normal,o-i,d-l,g-h),this.planes[0].distance=T-m,E.t8(this.planes[1].normal,o+i,d+l,g+h),this.planes[1].distance=T+m,E.t8(this.planes[2].normal,o+a,d+u,g+f),this.planes[2].distance=T+y,E.t8(this.planes[3].normal,o-a,d-u,g-f),this.planes[3].distance=T-y,E.t8(this.planes[4].normal,o-s,d-c,g-v),this.planes[4].distance=T-w,E.t8(this.planes[5].normal,o+s,d+c,g+v),this.planes[5].distance=T+w,this.planes.forEach(function(G){G.normalize(),G.updatePNVertexFlag()})}}])}(),fi=function(){function r(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;q(this,r),this.x=0,this.y=0,this.x=n,this.y=e}return Ee(r,[{key:"clone",value:function(){return new r(this.x,this.y)}},{key:"copyFrom",value:function(e){this.x=e.x,this.y=e.y}}])}(),ai=function(){function r(n,e,t,i){q(this,r),this.x=n,this.y=e,this.width=t,this.height=i,this.left=n,this.right=n+t,this.top=e,this.bottom=e+i}return Ee(r,[{key:"toJSON",value:function(){}}],[{key:"fromRect",value:function(e){return new r(e.x,e.y,e.width,e.height)}},{key:"applyTransform",value:function(e,t){var i=me.al(e.x,e.y,0,1),a=me.al(e.x+e.width,e.y,0,1),s=me.al(e.x,e.y+e.height,0,1),o=me.al(e.x+e.width,e.y+e.height,0,1),l=me.Ue(),u=me.Ue(),c=me.Ue(),d=me.Ue();me.fF(l,i,t),me.fF(u,a,t),me.fF(c,s,t),me.fF(d,o,t);var h=Math.min(l[0],u[0],c[0],d[0]),f=Math.min(l[1],u[1],c[1],d[1]),v=Math.max(l[0],u[0],c[0],d[0]),g=Math.max(l[1],u[1],c[1],d[1]);return r.fromRect({x:h,y:f,width:v-h,height:g-f})}}])}(),Si="Method not implemented.",za="Use document.documentElement instead.",sa="Cannot append a destroyed element.";function Ti(r){return r===void 0?0:r>360||r<-360?r%360:r}var xa=E.Ue();function wr(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;return Array.isArray(r)&&r.length===3?t?E.d9(r):E.JG(xa,r):(0,pe.Z)(r)?t?E.al(r,n,e):E.t8(xa,r,n,e):t?E.al(r[0],r[1]||n,r[2]||e):E.t8(xa,r[0],r[1]||n,r[2]||e)}var Wi=Math.PI/180;function ni(r){return r*Wi}var Ea=180/Math.PI;function Vr(r){return r*Ea}var os=.9;function fo(r){return r%=400,r<0&&(r+=400),r*os}function dl(r){return r/360}function Ql(r){return 360*r}var Do=Math.PI/2;function ql(r,n){var e=n[0],t=n[1],i=n[2],a=n[3],s=e*e,o=t*t,l=i*i,u=a*a,c=s+o+l+u,d=e*a-t*i;return d>.499995*c?(r[0]=Do,r[1]=2*Math.atan2(t,e),r[2]=0):d<-.499995*c?(r[0]=-Do,r[1]=2*Math.atan2(t,e),r[2]=0):(r[0]=Math.asin(2*(e*i-a*t)),r[1]=Math.atan2(2*(e*a+t*i),1-2*(l+u)),r[2]=Math.atan2(2*(e*t+i*a),1-2*(o+l))),r}function Tu(r,n){var e,t,i=mat4.getScaling(vec3.create(),n),a=_slicedToArray(i,3),s=a[0],o=a[1],l=a[2],u=Math.asin(-n[2]/s);return u<Do?u>-Do?(e=Math.atan2(n[6]/o,n[10]/l),t=Math.atan2(n[1]/s,n[0]/s)):(t=0,e=-Math.atan2(n[4]/o,n[5]/o)):(t=0,e=Math.atan2(n[4]/o,n[5]/o)),r[0]=e,r[1]=u,r[2]=t,r}function qa(r,n){return n.length===16?Tu(r,n):ql(r,n)}function ou(r,n,e,t,i){var a=Math.cos(r),s=Math.sin(r);return mat3.fromValues(t*a,i*s,0,-t*s,i*a,0,n,e,1)}function lu(r,n,e,t,i,a,s){var o=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1,l=2*a,u=e-n,c=t-i,d=l/u,h=l/c,f=(e+n)/u,v=(t+i)/c,g,m,y=s-a,w=s*a;return o?(g=-s/y,m=-w/y):(g=-(s+a)/y,m=-2*w/y),r[0]=d,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=h,r[6]=0,r[7]=0,r[8]=f,r[9]=v,r[10]=g,r[11]=-1,r[12]=0,r[13]=0,r[14]=m,r[15]=0,r}function Cu(r){var n=r[0],e=r[1],t=r[3],i=r[4],a=Math.sqrt(n*n+e*e),s=Math.sqrt(t*t+i*i),o=n*i-e*t;if(o<0&&(n<i?a=-a:s=-s),a){var l=1/a;n*=l,e*=l}if(s){var u=1/s;t*=u,i*=u}var c=Math.atan2(e,n),d=Vr(c);return[r[6],r[7],a,s,d]}var eu=L.create(),tu=L.create(),Mu=me.Ue(),Kr=[E.Ue(),E.Ue(),E.Ue()],bh=E.Ue();function kv(r,n,e,t,i,a){if(!kh(eu,r)||(L.copy(tu,eu),tu[3]=0,tu[7]=0,tu[11]=0,tu[15]=1,Math.abs(L.determinant(tu))<1e-8))return!1;var s=eu[3],o=eu[7],l=eu[11],u=eu[12],c=eu[13],d=eu[14],h=eu[15];if(s!==0||o!==0||l!==0){Mu[0]=s,Mu[1]=o,Mu[2]=l,Mu[3]=h;var f=L.invert(tu,tu);if(!f)return!1;L.transpose(tu,tu),me.fF(i,Mu,tu)}else i[0]=i[1]=i[2]=0,i[3]=1;if(n[0]=u,n[1]=c,n[2]=d,cd(Kr,eu),e[0]=E.kE(Kr[0]),E.Fv(Kr[0],Kr[0]),t[0]=E.AK(Kr[0],Kr[1]),wv(Kr[1],Kr[1],Kr[0],1,-t[0]),e[1]=E.kE(Kr[1]),E.Fv(Kr[1],Kr[1]),t[0]/=e[1],t[1]=E.AK(Kr[0],Kr[2]),wv(Kr[2],Kr[2],Kr[0],1,-t[1]),t[2]=E.AK(Kr[1],Kr[2]),wv(Kr[2],Kr[2],Kr[1],1,-t[2]),e[2]=E.kE(Kr[2]),E.Fv(Kr[2],Kr[2]),t[1]/=e[2],t[2]/=e[2],E.kC(bh,Kr[1],Kr[2]),E.AK(Kr[0],bh)<0)for(var v=0;v<3;v++)e[v]*=-1,Kr[v][0]*=-1,Kr[v][1]*=-1,Kr[v][2]*=-1;return a[0]=.5*Math.sqrt(Math.max(1+Kr[0][0]-Kr[1][1]-Kr[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-Kr[0][0]+Kr[1][1]-Kr[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-Kr[0][0]-Kr[1][1]+Kr[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+Kr[0][0]+Kr[1][1]+Kr[2][2],0)),Kr[2][1]>Kr[1][2]&&(a[0]=-a[0]),Kr[0][2]>Kr[2][0]&&(a[1]=-a[1]),Kr[1][0]>Kr[0][1]&&(a[2]=-a[2]),!0}function kh(r,n){var e=n[15];if(e===0)return!1;for(var t=1/e,i=0;i<16;i++)r[i]=n[i]*t;return!0}function cd(r,n){r[0][0]=n[0],r[0][1]=n[1],r[0][2]=n[2],r[1][0]=n[4],r[1][1]=n[5],r[1][2]=n[6],r[2][0]=n[8],r[2][1]=n[9],r[2][2]=n[10]}function wv(r,n,e,t,i){r[0]=n[0]*t+e[0]*i,r[1]=n[1]*t+e[1]*i,r[2]=n[2]*t+e[2]*i}var Va=function(r){return r[r.ORBITING=0]="ORBITING",r[r.EXPLORING=1]="EXPLORING",r[r.TRACKING=2]="TRACKING",r}({}),Sv=function(r){return r[r.DEFAULT=0]="DEFAULT",r[r.ROTATIONAL=1]="ROTATIONAL",r[r.TRANSLATIONAL=2]="TRANSLATIONAL",r[r.CINEMATIC=3]="CINEMATIC",r}({}),uu=function(r){return r[r.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",r[r.PERSPECTIVE=1]="PERSPECTIVE",r}({}),Sm={UPDATED:"updated"},ig=2e-4,wh=function(){function r(){q(this,r),this.clipSpaceNearZ=pn.NEGATIVE_ONE,this.eventEmitter=new Se.Z,this.matrix=L.create(),this.right=E.al(1,0,0),this.up=E.al(0,1,0),this.forward=E.al(0,0,1),this.position=E.al(0,0,1),this.focalPoint=E.al(0,0,0),this.distanceVector=E.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=L.create(),this.projectionMatrixInverse=L.create(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=Va.EXPLORING,this.trackingMode=Sv.DEFAULT,this.projectionMode=uu.PERSPECTIVE,this.frustum=new Ci,this.orthoMatrix=L.create()}return Ee(r,[{key:"isOrtho",value:function(){return this.projectionMode===uu.ORTHOGRAPHIC}},{key:"getProjectionMode",value:function(){return this.projectionMode}},{key:"getPerspective",value:function(){return this.jitteredProjectionMatrix||this.projectionMatrix}},{key:"getPerspectiveInverse",value:function(){return this.projectionMatrixInverse}},{key:"getFrustum",value:function(){return this.frustum}},{key:"getPosition",value:function(){return this.position}},{key:"getFocalPoint",value:function(){return this.focalPoint}},{key:"getDollyingStep",value:function(){return this.dollyingStep}},{key:"getNear",value:function(){return this.near}},{key:"getFar",value:function(){return this.far}},{key:"getZoom",value:function(){return this.zoom}},{key:"getOrthoMatrix",value:function(){return this.orthoMatrix}},{key:"getView",value:function(){return this.view}},{key:"setEnableUpdate",value:function(e){this.enableUpdate=e}},{key:"setType",value:function(e,t){return this.type=e,this.type===Va.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===Va.TRACKING&&t!==void 0&&this.setTrackingMode(t),this}},{key:"setProjectionMode",value:function(e){return this.projectionMode=e,this}},{key:"setTrackingMode",value:function(e){if(this.type!==Va.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=e,this}},{key:"setWorldRotation",value:function(e){return this.rotateWorld=e,this._getAngles(),this}},{key:"getViewTransform",value:function(){return L.invert(L.create(),this.matrix)}},{key:"getWorldTransform",value:function(){return this.matrix}},{key:"jitterProjectionMatrix",value:function(e,t){var i=L.fromTranslation(L.create(),[e,t,0]);this.jitteredProjectionMatrix=L.multiply(L.create(),i,this.projectionMatrix)}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0}},{key:"setMatrix",value:function(e){return this.matrix=e,this._update(),this}},{key:"setProjectionMatrix",value:function(e){this.projectionMatrix=e}},{key:"setFov",value:function(e){return this.setPerspective(this.near,this.far,e,this.aspect),this}},{key:"setAspect",value:function(e){return this.setPerspective(this.near,this.far,this.fov,e),this}},{key:"setNear",value:function(e){return this.projectionMode===uu.PERSPECTIVE?this.setPerspective(e,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,e,this.far),this}},{key:"setFar",value:function(e){return this.projectionMode===uu.PERSPECTIVE?this.setPerspective(this.near,e,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,e),this}},{key:"setViewOffset",value:function(e,t,i,a,s,o){return this.aspect=e/t,this.view===void 0&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=a,this.view.width=s,this.view.height=o,this.projectionMode===uu.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===uu.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"setZoom",value:function(e){return this.zoom=e,this.projectionMode===uu.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===uu.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this}},{key:"setZoomByViewportPoint",value:function(e,t){var i=this.canvas.viewport2Canvas({x:t[0],y:t[1]}),a=i.x,s=i.y,o=this.roll;this.rotate(0,0,-o),this.setPosition(a,s),this.setFocalPoint(a,s),this.setZoom(e),this.rotate(0,0,o);var l=this.canvas.viewport2Canvas({x:t[0],y:t[1]}),u=l.x,c=l.y,d=E.al(u-a,c-s,0),h=E.AK(d,this.right)/E.kE(this.right),f=E.AK(d,this.up)/E.kE(this.up),v=this.getPosition(),g=Qe(v,2),m=g[0],y=g[1],w=this.getFocalPoint(),T=Qe(w,2),G=T[0],x=T[1];return this.setPosition(m-h,y-f),this.setFocalPoint(G-h,x-f),this}},{key:"setPerspective",value:function(e,t,i,a){var s;this.projectionMode=uu.PERSPECTIVE,this.fov=i,this.near=e,this.far=t,this.aspect=a;var o=this.near*Math.tan(ni(.5*this.fov))/this.zoom,l=2*o,u=this.aspect*l,c=-.5*u;if((s=this.view)!==null&&s!==void 0&&s.enabled){var d=this.view.fullWidth,h=this.view.fullHeight;c+=this.view.offsetX*u/d,o-=this.view.offsetY*l/h,u*=this.view.width/d,l*=this.view.height/h}return lu(this.projectionMatrix,c,c+u,o-l,o,e,this.far,this.clipSpaceNearZ===pn.ZERO),L.invert(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this}},{key:"setOrthographic",value:function(e,t,i,a,s,o){var l;this.projectionMode=uu.ORTHOGRAPHIC,this.rright=t,this.left=e,this.top=i,this.bottom=a,this.near=s,this.far=o;var u=(this.rright-this.left)/(2*this.zoom),c=(this.top-this.bottom)/(2*this.zoom),d=(this.rright+this.left)/2,h=(this.top+this.bottom)/2,f=d-u,v=d+u,g=h+c,m=h-c;if((l=this.view)!==null&&l!==void 0&&l.enabled){var y=(this.rright-this.left)/this.view.fullWidth/this.zoom,w=(this.top-this.bottom)/this.view.fullHeight/this.zoom;f+=y*this.view.offsetX,v=f+y*this.view.width,g-=w*this.view.offsetY,m=g-w*this.view.height}return this.clipSpaceNearZ===pn.NEGATIVE_ONE?L.ortho(this.projectionMatrix,f,v,g,m,s,o):L.orthoZO(this.projectionMatrix,f,v,g,m,s,o),L.invert(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this}},{key:"setPosition",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.position[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.position[2],a=wr(e,t,i);return this._setPosition(a),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this}},{key:"setFocalPoint",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.focalPoint[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.focalPoint[2],a=E.al(0,1,0);if(this.focalPoint=wr(e,t,i),this.trackingMode===Sv.CINEMATIC){var s=E.$X(E.Ue(),this.focalPoint,this.position);e=s[0],t=s[1],i=s[2];var o=E.kE(s),l=Vr(Math.asin(t/o)),u=90+Vr(Math.atan2(i,e)),c=L.create();L.rotateY(c,c,ni(u)),L.rotateX(c,c,ni(l)),a=E.fF(E.Ue(),[0,1,0],c)}return L.invert(this.matrix,L.lookAt(L.create(),this.position,this.focalPoint,a)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this}},{key:"getDistance",value:function(){return this.distance}},{key:"getDistanceVector",value:function(){return this.distanceVector}},{key:"setDistance",value:function(e){if(this.distance===e||e<0)return this;this.distance=e,this.distance<ig&&(this.distance=ig),this.dollyingStep=this.distance/100;var t=E.Ue();e=this.distance;var i=this.forward,a=this.focalPoint;return t[0]=e*i[0]+a[0],t[1]=e*i[1]+a[1],t[2]=e*i[2]+a[2],this._setPosition(t),this.triggerUpdate(),this}},{key:"setMaxDistance",value:function(e){return this.maxDistance=e,this}},{key:"setMinDistance",value:function(e){return this.minDistance=e,this}},{key:"setAzimuth",value:function(e){return this.azimuth=Ti(e),this.computeMatrix(),this._getAxes(),this.type===Va.ORBITING||this.type===Va.EXPLORING?this._getPosition():this.type===Va.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getAzimuth",value:function(){return this.azimuth}},{key:"setElevation",value:function(e){return this.elevation=Ti(e),this.computeMatrix(),this._getAxes(),this.type===Va.ORBITING||this.type===Va.EXPLORING?this._getPosition():this.type===Va.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getElevation",value:function(){return this.elevation}},{key:"setRoll",value:function(e){return this.roll=Ti(e),this.computeMatrix(),this._getAxes(),this.type===Va.ORBITING||this.type===Va.EXPLORING?this._getPosition():this.type===Va.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getRoll",value:function(){return this.roll}},{key:"_update",value:function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()}},{key:"computeMatrix",value:function(){var e=X.yY(X.Ue(),[0,0,1],ni(this.roll));L.identity(this.matrix);var t=X.yY(X.Ue(),[1,0,0],ni((this.rotateWorld&&this.type!==Va.TRACKING||this.type===Va.TRACKING?1:-1)*this.elevation)),i=X.yY(X.Ue(),[0,1,0],ni((this.rotateWorld&&this.type!==Va.TRACKING||this.type===Va.TRACKING?1:-1)*this.azimuth)),a=X.Jp(X.Ue(),i,t);a=X.Jp(X.Ue(),a,e);var s=L.fromQuat(L.create(),a);this.type===Va.ORBITING||this.type===Va.EXPLORING?(L.translate(this.matrix,this.matrix,this.focalPoint),L.multiply(this.matrix,this.matrix,s),L.translate(this.matrix,this.matrix,[0,0,this.distance])):this.type===Va.TRACKING&&(L.translate(this.matrix,this.matrix,this.position),L.multiply(this.matrix,this.matrix,s))}},{key:"_setPosition",value:function(e,t,i){this.position=wr(e,t,i);var a=this.matrix;a[12]=this.position[0],a[13]=this.position[1],a[14]=this.position[2],a[15]=1,this._getOrthoMatrix()}},{key:"_getAxes",value:function(){E.JG(this.right,wr(me.fF(me.Ue(),[1,0,0,0],this.matrix))),E.JG(this.up,wr(me.fF(me.Ue(),[0,1,0,0],this.matrix))),E.JG(this.forward,wr(me.fF(me.Ue(),[0,0,1,0],this.matrix))),E.Fv(this.right,this.right),E.Fv(this.up,this.up),E.Fv(this.forward,this.forward)}},{key:"_getAngles",value:function(){var e=this.distanceVector[0],t=this.distanceVector[1],i=this.distanceVector[2],a=E.kE(this.distanceVector);if(a===0){this.elevation=0,this.azimuth=0;return}this.type===Va.TRACKING?(this.elevation=Vr(Math.asin(t/a)),this.azimuth=Vr(Math.atan2(-e,-i))):this.rotateWorld?(this.elevation=Vr(Math.asin(t/a)),this.azimuth=Vr(Math.atan2(-e,-i))):(this.elevation=-Vr(Math.asin(t/a)),this.azimuth=-Vr(Math.atan2(-e,-i)))}},{key:"_getPosition",value:function(){E.JG(this.position,wr(me.fF(me.Ue(),[0,0,0,1],this.matrix))),this._getDistance()}},{key:"_getFocalPoint",value:function(){E.kK(this.distanceVector,[0,0,-this.distance],Ke.xO(Ke.Ue(),this.matrix)),E.IH(this.focalPoint,this.position,this.distanceVector),this._getDistance()}},{key:"_getDistance",value:function(){this.distanceVector=E.$X(E.Ue(),this.focalPoint,this.position),this.distance=E.kE(this.distanceVector),this.dollyingStep=this.distance/100}},{key:"_getOrthoMatrix",value:function(){if(this.projectionMode===uu.ORTHOGRAPHIC){var e=this.position,t=X.yY(X.Ue(),[0,0,1],-this.roll*Math.PI/180);L.fromRotationTranslationScaleOrigin(this.orthoMatrix,t,E.al((this.rright-this.left)/2-e[0],(this.top-this.bottom)/2-e[1],0),E.al(this.zoom,this.zoom,1),e)}}},{key:"triggerUpdate",value:function(){if(this.enableUpdate){var e=this.getViewTransform(),t=L.multiply(L.create(),this.getPerspective(),e);this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(Sm.UPDATED)}}},{key:"rotate",value:function(e,t,i){throw new Error(Si)}},{key:"pan",value:function(e,t){throw new Error(Si)}},{key:"dolly",value:function(e){throw new Error(Si)}},{key:"createLandmark",value:function(e,t){throw new Error(Si)}},{key:"gotoLandmark",value:function(e,t){throw new Error(Si)}},{key:"cancelLandmarkAnimation",value:function(){throw new Error(Si)}}])}(),Cf=function(r){return r[r.Standard=0]="Standard",r}({}),Sh=function(r){return r[r.ADDED=0]="ADDED",r[r.REMOVED=1]="REMOVED",r[r.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED",r}({}),Tv={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new ai(0,0,0,0)},Tn=function(r){return r.COORDINATE="<coordinate>",r.COLOR="<color>",r.PAINT="<paint>",r.NUMBER="<number>",r.ANGLE="<angle>",r.OPACITY_VALUE="<opacity-value>",r.SHADOW_BLUR="<shadow-blur>",r.LENGTH="<length>",r.PERCENTAGE="<percentage>",r.LENGTH_PERCENTAGE="<length> | <percentage>",r.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",r.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",r.LIST_OF_POINTS="<list-of-points>",r.PATH="<path>",r.FILTER="<filter>",r.Z_INDEX="<z-index>",r.OFFSET_DISTANCE="<offset-distance>",r.DEFINED_PATH="<defined-path>",r.MARKER="<marker>",r.TRANSFORM="<transform>",r.TRANSFORM_ORIGIN="<transform-origin>",r.TEXT="<text>",r.TEXT_TRANSFORM="<text-transform>",r}({});function pl(r,n){if(typeof r!="function"||n!=null&&typeof n!="function")throw new TypeError("Expected a function");var e=function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var o=n?n.apply(this,a):a[0],l=e.cache;if(l.has(o))return l.get(o);var u=r.apply(this,a);return e.cache=l.set(o,u)||l,u};return e.cache=new(pl.Cache||Map),e}pl.Cache=Map;var An=function(r){return r[r.kUnknown=0]="kUnknown",r[r.kNumber=1]="kNumber",r[r.kPercentage=2]="kPercentage",r[r.kEms=3]="kEms",r[r.kPixels=4]="kPixels",r[r.kRems=5]="kRems",r[r.kDegrees=6]="kDegrees",r[r.kRadians=7]="kRadians",r[r.kGradians=8]="kGradians",r[r.kTurns=9]="kTurns",r[r.kMilliseconds=10]="kMilliseconds",r[r.kSeconds=11]="kSeconds",r[r.kInteger=12]="kInteger",r}({}),cu=function(r){return r[r.kUNumber=0]="kUNumber",r[r.kUPercent=1]="kUPercent",r[r.kULength=2]="kULength",r[r.kUAngle=3]="kUAngle",r[r.kUTime=4]="kUTime",r[r.kUOther=5]="kUOther",r}({}),Th=function(r){return r[r.kYes=0]="kYes",r[r.kNo=1]="kNo",r}({}),Kg=function(r){return r[r.kYes=0]="kYes",r[r.kNo=1]="kNo",r}({}),Jg=[{name:"em",unit_type:An.kEms},{name:"px",unit_type:An.kPixels},{name:"deg",unit_type:An.kDegrees},{name:"rad",unit_type:An.kRadians},{name:"grad",unit_type:An.kGradians},{name:"ms",unit_type:An.kMilliseconds},{name:"s",unit_type:An.kSeconds},{name:"rem",unit_type:An.kRems},{name:"turn",unit_type:An.kTurns}],vt=function(r){return r[r.kUnknownType=0]="kUnknownType",r[r.kUnparsedType=1]="kUnparsedType",r[r.kKeywordType=2]="kKeywordType",r[r.kUnitType=3]="kUnitType",r[r.kSumType=4]="kSumType",r[r.kProductType=5]="kProductType",r[r.kNegateType=6]="kNegateType",r[r.kInvertType=7]="kInvertType",r[r.kMinType=8]="kMinType",r[r.kMaxType=9]="kMaxType",r[r.kClampType=10]="kClampType",r[r.kTransformType=11]="kTransformType",r[r.kPositionType=12]="kPositionType",r[r.kURLImageType=13]="kURLImageType",r[r.kColorType=14]="kColorType",r[r.kUnsupportedColorType=15]="kUnsupportedColorType",r}({}),_t=function(n){return Jg.find(function(e){return e.name===n}).unit_type},Ht=function(n){return n?n==="number"?An.kNumber:n==="percent"||n==="%"?An.kPercentage:_t(n):An.kUnknown},Gt=function(n){switch(n){case An.kNumber:case An.kInteger:return cu.kUNumber;case An.kPercentage:return cu.kUPercent;case An.kPixels:return cu.kULength;case An.kMilliseconds:case An.kSeconds:return cu.kUTime;case An.kDegrees:case An.kRadians:case An.kGradians:case An.kTurns:return cu.kUAngle;default:return cu.kUOther}},sn=function(n){switch(n){case cu.kUNumber:return An.kNumber;case cu.kULength:return An.kPixels;case cu.kUPercent:return An.kPercentage;case cu.kUTime:return An.kSeconds;case cu.kUAngle:return An.kDegrees;default:return An.kUnknown}},cn=function(n){var e=1;switch(n){case An.kPixels:case An.kDegrees:case An.kSeconds:break;case An.kMilliseconds:e=.001;break;case An.kRadians:e=180/Math.PI;break;case An.kGradians:e=.9;break;case An.kTurns:e=360;break}return e},Sn=function(n){switch(n){case An.kNumber:case An.kInteger:return"";case An.kPercentage:return"%";case An.kEms:return"em";case An.kRems:return"rem";case An.kPixels:return"px";case An.kDegrees:return"deg";case An.kRadians:return"rad";case An.kGradians:return"grad";case An.kMilliseconds:return"ms";case An.kSeconds:return"s";case An.kTurns:return"turn"}return""},Bn=function(){function r(){q(this,r)}return Ee(r,[{key:"toString",value:function(){return this.buildCSSText(Th.kNo,Kg.kNo,"")}},{key:"isNumericValue",value:function(){return this.getType()>=vt.kUnitType&&this.getType()<=vt.kClampType}}],[{key:"isAngle",value:function(e){return e===An.kDegrees||e===An.kRadians||e===An.kGradians||e===An.kTurns}},{key:"isLength",value:function(e){return e>=An.kEms&&e<An.kDegrees}},{key:"isRelativeUnit",value:function(e){return e===An.kPercentage||e===An.kEms||e===An.kRems}},{key:"isTime",value:function(e){return e===An.kSeconds||e===An.kMilliseconds}}])}(),gr=function(r){function n(e){var t;return q(this,n),t=ht(this,n),t.colorSpace=e,t}return Ve(n,r),Ee(n,[{key:"getType",value:function(){return vt.kColorType}},{key:"to",value:function(t){return this}}])}(Bn),gn=function(r){return r[r.Constant=0]="Constant",r[r.LinearGradient=1]="LinearGradient",r[r.RadialGradient=2]="RadialGradient",r}({}),_n=function(r){function n(e,t){var i;return q(this,n),i=ht(this,n),i.type=e,i.value=t,i}return Ve(n,r),Ee(n,[{key:"clone",value:function(){return new n(this.type,this.value)}},{key:"buildCSSText",value:function(t,i,a){return a}},{key:"getType",value:function(){return vt.kColorType}}])}(Bn),fn=function(r){function n(e){var t;return q(this,n),t=ht(this,n),t.value=e,t}return Ve(n,r),Ee(n,[{key:"clone",value:function(){return new n(this.value)}},{key:"getType",value:function(){return vt.kKeywordType}},{key:"buildCSSText",value:function(t,i,a){return a+this.value}}])}(Bn),Sr=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",t="";return Number.isFinite(n)?t="NaN":n>0?t="infinity":t="-infinity",t+=e},Rn=function(n){return sn(Gt(n))},Ln=function(r){function n(e){var t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:An.kNumber;q(this,n),t=ht(this,n);var a;return typeof i=="string"?a=Ht(i):a=i,t.unit=a,t.value=e,t}return Ve(n,r),Ee(n,[{key:"clone",value:function(){return new n(this.value,this.unit)}},{key:"equals",value:function(t){var i=t;return this.value===i.value&&this.unit===i.unit}},{key:"getType",value:function(){return vt.kUnitType}},{key:"convertTo",value:function(t){if(this.unit===t)return new n(this.value,this.unit);var i=Rn(this.unit);if(i!==Rn(t)||i===An.kUnknown)return null;var a=cn(this.unit)/cn(t);return new n(this.value*a,t)}},{key:"buildCSSText",value:function(t,i,a){var s;switch(this.unit){case An.kUnknown:break;case An.kInteger:s=Number(this.value).toFixed(0);break;case An.kNumber:case An.kPercentage:case An.kEms:case An.kRems:case An.kPixels:case An.kDegrees:case An.kRadians:case An.kGradians:case An.kMilliseconds:case An.kSeconds:case An.kTurns:{var o=-999999,l=999999,u=this.value,c=Sn(this.unit);if(u<o||u>l){var d=Sn(this.unit);!Number.isFinite(u)||Number.isNaN(u)?s=Sr(u,d):s=u+(d||"")}else s="".concat(u).concat(c)}}return a+=s,a}}])}(Bn),Jr=new Ln(0,"px");new Ln(1,"px");var mi=new Ln(0,"deg"),_i=function(r){function n(e,t,i){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;return q(this,n),a=ht(this,n,["rgb"]),a.r=e,a.g=t,a.b=i,a.alpha=s,a.isNone=o,a}return Ve(n,r),Ee(n,[{key:"clone",value:function(){return new n(this.r,this.g,this.b,this.alpha)}},{key:"buildCSSText",value:function(t,i,a){return"".concat(a,"rgba(").concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")}}])}(gr),vi=new fn("unset"),pi=new fn("initial"),ba=new fn("inherit"),Qi={"":vi,unset:vi,initial:pi,inherit:ba},li=function(n){return Qi[n]||(Qi[n]=new fn(n)),Qi[n]},Yi=new _i(0,0,0,0,!0),Xi=new _i(0,0,0,0),ha=pl(function(r,n,e,t){return new _i(r,n,e,t)},function(r,n,e,t){return"rgba(".concat(r,",").concat(n,",").concat(e,",").concat(t,")")}),Gr=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:An.kNumber;return new Ln(n,e)};new Ln(50,"%");function ua(r){var n=r.type,e=r.value;return n==="hex"?"#".concat(e):n==="literal"?e:n==="rgb"?"rgb(".concat(e.join(","),")"):"rgba(".concat(e.join(","),")")}var As=function(){var r={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},n="";function e(V){throw new Error("".concat(n,": ").concat(V))}function t(){var V=i();return n.length>0&&e("Invalid input not EOF"),V}function i(){return T(a)}function a(){return s("linear-gradient",r.linearGradient,l)||s("repeating-linear-gradient",r.repeatingLinearGradient,l)||s("radial-gradient",r.radialGradient,d)||s("repeating-radial-gradient",r.repeatingRadialGradient,d)||s("conic-gradient",r.conicGradient,d)}function s(V,ee,he){return o(ee,function(ut){var ct=he();return ct&&(ue(r.comma)||e("Missing comma before color stops")),{type:V,orientation:ct,colorStops:T(G)}})}function o(V,ee){var he=ue(V);if(he){ue(r.startCall)||e("Missing (");var ut=ee(he);return ue(r.endCall)||e("Missing )"),ut}}function l(){return u()||c()}function u(){return le("directional",r.sideOrCorner,1)}function c(){return le("angular",r.angleValue,1)}function d(){var V,ee=h(),he;return ee&&(V=[],V.push(ee),he=n,ue(r.comma)&&(ee=h(),ee?V.push(ee):n=he)),V}function h(){var V=f()||v();if(V)V.at=m();else{var ee=g();if(ee){V=ee;var he=m();he&&(V.at=he)}else{var ut=y();ut&&(V={type:"default-radial",at:ut})}}return V}function f(){var V=le("shape",/^(circle)/i,0);return V&&(V.style=te()||g()),V}function v(){var V=le("shape",/^(ellipse)/i,0);return V&&(V.style=j()||g()),V}function g(){return le("extent-keyword",r.extentKeywords,1)}function m(){if(le("position",/^at/,0)){var V=y();return V||e("Missing positioning value"),V}}function y(){var V=w();if(V.x||V.y)return{type:"position",value:V}}function w(){return{x:j(),y:j()}}function T(V){var ee=V(),he=[];if(ee)for(he.push(ee);ue(r.comma);)ee=V(),ee?he.push(ee):e("One extra comma");return he}function G(){var V=x();return V||e("Expected color definition"),V.length=j(),V}function x(){return p()||R()||b()||_()}function _(){return le("literal",r.literalColor,0)}function p(){return le("hex",r.hexColor,1)}function b(){return o(r.rgbColor,function(){return{type:"rgb",value:T(B)}})}function R(){return o(r.rgbaColor,function(){return{type:"rgba",value:T(B)}})}function B(){return ue(r.number)[1]}function j(){return le("%",r.percentageValue,1)||Z()||te()}function Z(){return le("position-keyword",r.positionKeywords,1)}function te(){return le("px",r.pixelValue,1)||le("em",r.emValue,1)}function le(V,ee,he){var ut=ue(ee);if(ut)return{type:V,value:ut[he]}}function ue(V){var ee=/^[\n\r\t\s]+/.exec(n);ee&&se(ee[0].length);var he=V.exec(n);return he&&se(he[0].length),he}function se(V){n=n.substring(V)}return function(V){return n=V,t()}}();function Ra(r,n,e,t){var i=ni(t.value),a=0,s=0,o=a+n/2,l=s+e/2,u=Math.abs(n*Math.cos(i))+Math.abs(e*Math.sin(i)),c=r[0]+o-Math.cos(i)*u/2,d=r[1]+l-Math.sin(i)*u/2,h=r[0]+o+Math.cos(i)*u/2,f=r[1]+l+Math.sin(i)*u/2;return{x1:c,y1:d,x2:h,y2:f}}function Ca(r,n,e,t,i,a){var s=t.value,o=i.value;t.unit===An.kPercentage&&(s=t.value/100*n),i.unit===An.kPercentage&&(o=i.value/100*e);var l=Math.max(distanceSquareRoot([0,0],[s,o]),distanceSquareRoot([0,e],[s,o]),distanceSquareRoot([n,e],[s,o]),distanceSquareRoot([n,0],[s,o]));return a&&(a instanceof Ln?l=a.value:a instanceof fn&&(a.value==="closest-side"?l=Math.min(s,n-s,o,e-o):a.value==="farthest-side"?l=Math.max(s,n-s,o,e-o):a.value==="closest-corner"&&(l=Math.min(distanceSquareRoot([0,0],[s,o]),distanceSquareRoot([0,e],[s,o]),distanceSquareRoot([n,e],[s,o]),distanceSquareRoot([n,0],[s,o]))))),{x:s+r[0],y:o+r[1],r:l}}var Mi=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,yi=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,Pi=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,Ni=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function na(r){var n,e=r.length;if(r[e-1].length=(n=r[e-1].length)!==null&&n!==void 0?n:{type:"%",value:"100"},e>1){var t;r[0].length=(t=r[0].length)!==null&&t!==void 0?t:{type:"%",value:"0"}}for(var i=0,a=Number(r[0].length.value),s=1;s<e;s++){var o,l=(o=r[s].length)===null||o===void 0?void 0:o.value;if(!(0,xe.Z)(l)&&!(0,xe.Z)(a)){for(var u=1;u<s-i;u++)r[i+u].length={type:"%",value:"".concat(a+(Number(l)-a)*u/(s-i))};i=s,a=Number(l)}}}var nu={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},Bs=pl(function(r){var n;return r.type==="angular"?n=Number(r.value):n=nu[r.value]||0,Gr(n,"deg")}),No=pl(function(r){var n=50,e=50,t="%",i="%";if((r==null?void 0:r.type)==="position"){var a=r.value,s=a.x,o=a.y;(s==null?void 0:s.type)==="position-keyword"&&(s.value==="left"?n=0:s.value==="center"?n=50:s.value==="right"?n=100:s.value==="top"?e=0:s.value==="bottom"&&(e=100)),(o==null?void 0:o.type)==="position-keyword"&&(o.value==="left"?n=0:o.value==="center"?e=50:o.value==="right"?n=100:o.value==="top"?e=0:o.value==="bottom"&&(e=100)),((s==null?void 0:s.type)==="px"||(s==null?void 0:s.type)==="%"||(s==null?void 0:s.type)==="em")&&(t=s==null?void 0:s.type,n=Number(s.value)),((o==null?void 0:o.type)==="px"||(o==null?void 0:o.type)==="%"||(o==null?void 0:o.type)==="em")&&(i=o==null?void 0:o.type,e=Number(o.value))}return{cx:Gr(n,t),cy:Gr(e,i)}}),es=pl(function(r){if(r.indexOf("linear")>-1||r.indexOf("radial")>-1){var n=As(r);return n.map(function(o){var l=o.type,u=o.orientation,c=o.colorStops;na(c);var d=c.map(function(T){return{offset:Gr(Number(T.length.value),"%"),color:ua(T)}});if(l==="linear-gradient")return new _n(gn.LinearGradient,{angle:u?Bs(u):mi,steps:d});if(l==="radial-gradient"&&(u||(u=[{type:"shape",value:"circle"}]),u[0].type==="shape"&&u[0].value==="circle")){var h=No(u[0].at),f=h.cx,v=h.cy,g;if(u[0].style){var m=u[0].style,y=m.type,w=m.value;y==="extent-keyword"?g=li(w):g=Gr(w,y)}return new _n(gn.RadialGradient,{cx:f,cy:v,size:g,steps:d})}})}var e=r[0];if(r[1]==="("||r[2]==="("){if(e==="l"){var t=Mi.exec(r);if(t){var i,a=((i=t[2].match(Ni))===null||i===void 0?void 0:i.map(function(o){return o.split(":")}))||[];return[new _n(gn.LinearGradient,{angle:Gr(parseFloat(t[1]),"deg"),steps:a.map(function(o){var l=Qe(o,2),u=l[0],c=l[1];return{offset:Gr(Number(u)*100,"%"),color:c}})})]}}else if(e==="r"){var s=ca(r);if(s)if((0,Ze.Z)(s))r=s;else return[new _n(gn.RadialGradient,s)]}else if(e==="p")return Fo(r)}});function ca(r){var n=yi.exec(r);if(n){var e,t=((e=n[4].match(Ni))===null||e===void 0?void 0:e.map(function(i){return i.split(":")}))||[];return{cx:Gr(50,"%"),cy:Gr(50,"%"),steps:t.map(function(i){var a=Qe(i,2),s=a[0],o=a[1];return{offset:Gr(Number(s)*100,"%"),color:o}})}}return null}function Fo(r){var n=Pi.exec(r);if(n){var e=n[1],t=n[2];switch(e){case"a":e="repeat";break;case"x":e="repeat-x";break;case"y":e="repeat-y";break;case"n":e="no-repeat";break;default:e="no-repeat"}return{image:t,repetition:e}}return null}function du(r){return!!r.type&&!!r.value}function Ui(r){return r&&!!r.image}function jr(r){return r&&!(0,xe.Z)(r.r)&&!(0,xe.Z)(r.g)&&!(0,xe.Z)(r.b)}var xi=pl(function(r){if(Ui(r))return re({repetition:"repeat"},r);if((0,xe.Z)(r)&&(r=""),r==="transparent")return Xi;if(r==="currentColor")r="black";else if(r==="none")return Yi;var n=es(r);if(n)return n;var e=nn(r),t=[0,0,0,0];return e!==null&&(t[0]=e.r||0,t[1]=e.g||0,t[2]=e.b||0,t[3]=e.opacity),ha.apply(void 0,t)});function Aa(r,n){if(!(!jr(r)||!jr(n)))return[[Number(r.r),Number(r.g),Number(r.b),Number(r.alpha)],[Number(n.r),Number(n.g),Number(n.b),Number(n.alpha)],function(e){var t=e.slice();if(t[3])for(var i=0;i<3;i++)t[i]=Math.round((0,O.Z)(t[i],0,255));return t[3]=(0,O.Z)(t[3],0,1),"rgba(".concat(t.join(","),")")}]}function ra(r,n){if((0,xe.Z)(n))return Gr(0,"px");if(n="".concat(n).trim().toLowerCase(),isFinite(Number(n))){if("px".search(r)>=0)return Gr(Number(n),"px");if("deg".search(r)>=0)return Gr(Number(n),"deg")}var e=[];n=n.replace(r,function(i){return e.push(i),"U".concat(i)});var t="U(".concat(r.source,")");return e.map(function(i){return Gr(Number(n.replace(new RegExp("U".concat(i),"g"),"").replace(new RegExp(t,"g"),"*0")),i)})[0]}var oa=function(n){return ra(new RegExp("px","g"),n)},Ki=pl(oa),Ya=function(n){return ra(new RegExp("%","g"),n)};pl(Ya);var bs=function(n){return(0,pe.Z)(n)||isFinite(Number(n))?Gr(Number(n)||0,"px"):ra(new RegExp("px|%|em|rem","g"),n)},is=pl(bs),Bo=function(n){return ra(new RegExp("deg|rad|grad|turn","g"),n)},ks=pl(Bo);function Oo(r,n,e,t){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a="",s=r.value||0,o=n.value||0,l=Rn(r.unit),u=r.convertTo(l),c=n.convertTo(l);return u&&c?(s=u.value,o=c.value,a=Sn(r.unit)):(Ln.isLength(r.unit)||Ln.isLength(n.unit))&&(s=ls(r,i,e),o=ls(n,i,e),a="px"),[s,o,function(d){return t&&(d=Math.max(d,0)),d+a}]}function fa(r){var n=0;return r.unit===An.kDegrees?n=r.value:r.unit===An.kRadians?n=Vr(Number(r.value)):r.unit===An.kTurns?n=Ql(Number(r.value)):r.value&&(n=r.value),n}function as(r,n){var e;return Array.isArray(r)?e=r.map(function(t){return Number(t)}):(0,Ze.Z)(r)?e=r.split(" ").map(function(t){return Number(t)}):(0,pe.Z)(r)&&(e=[r]),n===2?e.length===1?[e[0],e[0]]:[e[0],e[1]]:e.length===1?[e[0],e[0],e[0],e[0]]:e.length===2?[e[0],e[1],e[0],e[1]]:e.length===3?[e[0],e[1],e[2],e[1]]:[e[0],e[1],e[2],e[3]]}function ls(r,n,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(r.unit===An.kPixels)return Number(r.value);if(r.unit===An.kPercentage&&e){var i=e.nodeName===zt.GROUP?e.getLocalBounds():e.getGeometryBounds();return(t?i.min[n]:0)+r.value/100*i.halfExtents[n]*2}return 0}var ju=function(n){return ra(/deg|rad|grad|turn|px|%/g,n)},Pu=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function $o(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(r=r.toLowerCase().trim(),r==="none")return[];for(var n=/\s*([\w-]+)\(([^)]*)\)/g,e=[],t,i=0;t=n.exec(r);){if(t.index!==i)return[];if(i=t.index+t[0].length,Pu.indexOf(t[1])>-1&&e.push({name:t[1],params:t[2].split(" ").map(function(a){return ju(a)||xi(a)})}),n.lastIndex===r.length)return e}return[]}function Za(r){return r.toString()}var Ro=function(n){return typeof n=="number"?Gr(n):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(n)?Gr(Number(n)):Gr(0)},ru=pl(Ro);pl(function(r){return(0,Ze.Z)(r)?r.split(" ").map(ru):r.map(ru)});function vo(r,n){return[r,n,Za]}function Ao(r,n){return function(e,t){return[e,t,function(i){return Za((0,O.Z)(i,r,n))}]}}function jl(r,n){if(r.length===n.length)return[r,n,function(e){return e}]}function Ld(r){return r.parsedStyle.d.totalLength===0&&(r.parsedStyle.d.totalLength=getTotalLength(r.parsedStyle.d.absolutePath)),r.parsedStyle.d.totalLength}function ic(r){return r.parsedStyle.points.totalLength===0&&(r.parsedStyle.points.totalLength=polylineLength(r.parsedStyle.points.points)),r.parsedStyle.points.totalLength}function Ch(r){for(var n=0;n<r.length;n++){var e=r[n-1],t=r[n],i=t[0];if(i==="M"&&e){var a=e[0],s=[t[1],t[2]],o=void 0;a==="L"||a==="M"?o=[e[1],e[2]]:(a==="C"||a==="A"||a==="Q")&&(o=[e[e.length-2],e[e.length-1]]),o&&Go(s,o)&&(r.splice(n,1),n--)}}}function Hu(r){for(var n=!1,e=r.length,t=0;t<e;t++){var i=r[t],a=i[0];if(a==="C"||a==="A"||a==="Q"){n=!0;break}}return n}function Nu(r){for(var n=[],e=[],t=[],i=0;i<r.length;i++){var a=r[i],s=a[0];s==="M"?(t.length&&(e.push(t),t=[]),t.push([a[1],a[2]])):s==="Z"?t.length&&(n.push(t),t=[]):t.push([a[1],a[2]])}return t.length>0&&e.push(t),{polygons:n,polylines:e}}function Go(r,n){return r[0]===n[0]&&r[1]===n[1]}function iu(r,n){for(var e=[],t=[],i=[],a=0;a<r.length;a++){var s=r[a],o=s.currentPoint,l=s.params,u=s.prePoint,c=void 0;switch(s.command){case"Q":c=(0,Nt.x4)(u[0],u[1],l[1],l[2],l[3],l[4]);break;case"C":c=(0,Nt.l5)(u[0],u[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var d=s.arcParams;c=(0,Nt.vp)(d.cx,d.cy,d.rx,d.ry,d.xRotation,d.startAngle,d.endAngle);break;default:e.push(o[0]),t.push(o[1]);break}c&&(s.box=c,e.push(c.x,c.x+c.width),t.push(c.y,c.y+c.height)),n&&(s.command==="L"||s.command==="M")&&s.prePoint&&s.nextPoint&&i.push(s)}e=e.filter(function(G){return!Number.isNaN(G)&&G!==1/0&&G!==-1/0}),t=t.filter(function(G){return!Number.isNaN(G)&&G!==1/0&&G!==-1/0});var h=(0,ne.Z)(e),f=(0,ne.Z)(t),v=(0,qe.Z)(e),g=(0,qe.Z)(t);if(i.length===0)return{x:h,y:f,width:v-h,height:g-f};for(var m=0;m<i.length;m++){var y=i[m],w=y.currentPoint,T=void 0;w[0]===h?(T=Id(y,n),h-=T.xExtra):w[0]===v&&(T=Id(y,n),v+=T.xExtra),w[1]===f?(T=Id(y,n),f-=T.yExtra):w[1]===g&&(T=Id(y,n),g+=T.yExtra)}return{x:h,y:f,width:v-h,height:g-f}}function Id(r,n){var e=r.prePoint,t=r.currentPoint,i=r.nextPoint,a=Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2),s=Math.pow(t[0]-i[0],2)+Math.pow(t[1]-i[1],2),o=Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2),l=Math.acos((a+s-o)/(2*Math.sqrt(a)*Math.sqrt(s)));if(!l||Math.sin(l)===0||(0,dt.Z)(l,0))return{xExtra:0,yExtra:0};var u=Math.abs(Math.atan2(i[1]-t[1],i[0]-t[0])),c=Math.abs(Math.atan2(i[0]-t[0],i[1]-t[1]));u=u>Math.PI/2?Math.PI-u:u,c=c>Math.PI/2?Math.PI-c:c;var d={xExtra:Math.cos(l/2-u)*(n/2*(1/Math.sin(l/2)))-n/2||0,yExtra:Math.cos(c-l/2)*(n/2*(1/Math.sin(l/2)))-n/2||0};return d}function dd(r,n){return[n[0]+(n[0]-r[0]),n[1]+(n[1]-r[1])]}var Wu=function(n,e){var t=n.x*e.x+n.y*e.y,i=Math.sqrt((Math.pow(n.x,2)+Math.pow(n.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2))),a=n.x*e.y-n.y*e.x<0?-1:1,s=a*Math.acos(t/i);return s},kc=function(n,e,t,i,a,s,o,l){e=Math.abs(e),t=Math.abs(t),i=(0,nt.Z)(i,360);var u=ni(i);if(n.x===o.x&&n.y===o.y)return{x:n.x,y:n.y,ellipticalArcAngle:0};if(e===0||t===0)return{x:0,y:0,ellipticalArcAngle:0};var c=(n.x-o.x)/2,d=(n.y-o.y)/2,h={x:Math.cos(u)*c+Math.sin(u)*d,y:-Math.sin(u)*c+Math.cos(u)*d},f=Math.pow(h.x,2)/Math.pow(e,2)+Math.pow(h.y,2)/Math.pow(t,2);f>1&&(e*=Math.sqrt(f),t*=Math.sqrt(f));var v=Math.pow(e,2)*Math.pow(t,2)-Math.pow(e,2)*Math.pow(h.y,2)-Math.pow(t,2)*Math.pow(h.x,2),g=Math.pow(e,2)*Math.pow(h.y,2)+Math.pow(t,2)*Math.pow(h.x,2),m=v/g;m=m<0?0:m;var y=(a!==s?1:-1)*Math.sqrt(m),w={x:y*(e*h.y/t),y:y*(-(t*h.x)/e)},T={x:Math.cos(u)*w.x-Math.sin(u)*w.y+(n.x+o.x)/2,y:Math.sin(u)*w.x+Math.cos(u)*w.y+(n.y+o.y)/2},G={x:(h.x-w.x)/e,y:(h.y-w.y)/t},x=Wu({x:1,y:0},G),_={x:(-h.x-w.x)/e,y:(-h.y-w.y)/t},p=Wu(G,_);!s&&p>0?p-=2*Math.PI:s&&p<0&&(p+=2*Math.PI),p%=2*Math.PI;var b=x+p*l,R=e*Math.cos(b),B=t*Math.sin(b),j={x:Math.cos(u)*R-Math.sin(u)*B+T.x,y:Math.sin(u)*R+Math.cos(u)*B+T.y,ellipticalArcStartAngle:x,ellipticalArcEndAngle:x+p,ellipticalArcAngle:b,ellipticalArcCenter:T,resultantRx:e,resultantRy:t};return j};function hu(r){for(var n=[],e=null,t=null,i=null,a=0,s=r.length,o=0;o<s;o++){var l=r[o];t=r[o+1];var u=l[0],c={command:u,prePoint:e,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(u){case"M":i=[l[1],l[2]],a=o;break;case"A":var d=On(e,l);c.arcParams=d;break}if(u==="Z")e=i,t=r[a+1];else{var h=l.length;e=[l[h-2],l[h-1]]}t&&t[0]==="Z"&&(t=r[a],n[a]&&(n[a].prePoint=e)),c.currentPoint=e,n[a]&&Go(e,n[a].currentPoint)&&(n[a].prePoint=c.prePoint);var f=t?[t[t.length-2],t[t.length-1]]:null;c.nextPoint=f;var v=c.prePoint;if(["L","H","V"].includes(u))c.startTangent=[v[0]-e[0],v[1]-e[1]],c.endTangent=[e[0]-v[0],e[1]-v[1]];else if(u==="Q"){var g=[l[1],l[2]];c.startTangent=[v[0]-g[0],v[1]-g[1]],c.endTangent=[e[0]-g[0],e[1]-g[1]]}else if(u==="T"){var m=n[o-1],y=dd(m.currentPoint,v);m.command==="Q"?(c.command="Q",c.startTangent=[v[0]-y[0],v[1]-y[1]],c.endTangent=[e[0]-y[0],e[1]-y[1]]):(c.command="TL",c.startTangent=[v[0]-e[0],v[1]-e[1]],c.endTangent=[e[0]-v[0],e[1]-v[1]])}else if(u==="C"){var w=[l[1],l[2]],T=[l[3],l[4]];c.startTangent=[v[0]-w[0],v[1]-w[1]],c.endTangent=[e[0]-T[0],e[1]-T[1]],c.startTangent[0]===0&&c.startTangent[1]===0&&(c.startTangent=[w[0]-T[0],w[1]-T[1]]),c.endTangent[0]===0&&c.endTangent[1]===0&&(c.endTangent=[T[0]-w[0],T[1]-w[1]])}else if(u==="S"){var G=n[o-1],x=dd(G.currentPoint,v),_=[l[1],l[2]];G.command==="C"?(c.command="C",c.startTangent=[v[0]-x[0],v[1]-x[1]],c.endTangent=[e[0]-_[0],e[1]-_[1]]):(c.command="SQ",c.startTangent=[v[0]-_[0],v[1]-_[1]],c.endTangent=[e[0]-_[0],e[1]-_[1]])}else if(u==="A"){var p=Dd(c,0),b=p.x,R=p.y,B=Dd(c,1,!1),j=B.x,Z=B.y;c.startTangent=[b,R],c.endTangent=[j,Z]}n.push(c)}return n}function Dd(r,n){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,t=r.arcParams,i=t.rx,a=i===void 0?0:i,s=t.ry,o=s===void 0?0:s,l=t.xRotation,u=t.arcFlag,c=t.sweepFlag,d=kc({x:r.prePoint[0],y:r.prePoint[1]},a,o,l,!!u,!!c,{x:r.currentPoint[0],y:r.currentPoint[1]},n),h=kc({x:r.prePoint[0],y:r.prePoint[1]},a,o,l,!!u,!!c,{x:r.currentPoint[0],y:r.currentPoint[1]},e?n+.005:n-.005),f=h.x-d.x,v=h.y-d.y,g=Math.sqrt(f*f+v*v);return{x:-f/g,y:-v/g}}function fu(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function wc(r,n){return fu(r)*fu(n)?(r[0]*n[0]+r[1]*n[1])/(fu(r)*fu(n)):1}function Oi(r,n){return(r[0]*n[1]<r[1]*n[0]?-1:1)*Math.acos(wc(r,n))}function On(r,n){var e=n[1],t=n[2],i=(0,nt.Z)(ni(n[3]),Math.PI*2),a=n[4],s=n[5],o=r[0],l=r[1],u=n[6],c=n[7],d=Math.cos(i)*(o-u)/2+Math.sin(i)*(l-c)/2,h=-1*Math.sin(i)*(o-u)/2+Math.cos(i)*(l-c)/2,f=d*d/(e*e)+h*h/(t*t);f>1&&(e*=Math.sqrt(f),t*=Math.sqrt(f));var v=e*e*(h*h)+t*t*(d*d),g=v?Math.sqrt((e*e*(t*t)-v)/v):1;a===s&&(g*=-1),isNaN(g)&&(g=0);var m=t?g*e*h/t:0,y=e?g*-t*d/e:0,w=(o+u)/2+Math.cos(i)*m-Math.sin(i)*y,T=(l+c)/2+Math.sin(i)*m+Math.cos(i)*y,G=[(d-m)/e,(h-y)/t],x=[(-1*d-m)/e,(-1*h-y)/t],_=Oi([1,0],G),p=Oi(G,x);return wc(G,x)<=-1&&(p=Math.PI),wc(G,x)>=1&&(p=0),s===0&&p>0&&(p-=2*Math.PI),s===1&&p<0&&(p+=2*Math.PI),{cx:w,cy:T,rx:Go(r,[u,c])?0:e,ry:Go(r,[u,c])?0:t,startAngle:_,endAngle:_+p,xRotation:i,arcFlag:a,sweepFlag:s}}function Br(r,n,e){return r.reduce(function(t,i){var a="";if(i[0]==="M"||i[0]==="L"){var s=vec3.fromValues(i[1],i[2],0);e&&vec3.transformMat4(s,s,e),a="".concat(i[0]).concat(s[0],",").concat(s[1])}else if(i[0]==="Z")a=i[0];else if(i[0]==="C"){var o=vec3.fromValues(i[1],i[2],0),l=vec3.fromValues(i[3],i[4],0),u=vec3.fromValues(i[5],i[6],0);e&&(vec3.transformMat4(o,o,e),vec3.transformMat4(l,l,e),vec3.transformMat4(u,u,e)),a="".concat(i[0]).concat(o[0],",").concat(o[1],",").concat(l[0],",").concat(l[1],",").concat(u[0],",").concat(u[1])}else if(i[0]==="A"){var c=vec3.fromValues(i[6],i[7],0);e&&vec3.transformMat4(c,c,e),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],",").concat(i[5],",").concat(c[0],",").concat(c[1])}else if(i[0]==="Q"){var d=vec3.fromValues(i[1],i[2],0),h=vec3.fromValues(i[3],i[4],0);e&&(vec3.transformMat4(d,d,e),vec3.transformMat4(h,h,e)),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],"}")}return t+=a},"")}function Hr(r,n,e,t){return[["M",r,n],["L",e,t]]}function ui(r,n,e,t){var i=(-1+Math.sqrt(2))/3*4,a=r*i,s=n*i,o=e-r,l=e+r,u=t-n,c=t+n;return[["M",o,t],["C",o,t-s,e-a,u,e,u],["C",e+a,u,l,t-s,l,t],["C",l,t+s,e+a,c,e,c],["C",e-a,c,o,t+s,o,t],["Z"]]}function ts(r,n){var e=r.map(function(t,i){return[i===0?"M":"L",t[0],t[1]]});return n&&e.push(["Z"]),e}function ss(r,n,e,t,i){if(i){var a=_slicedToArray(i,4),s=a[0],o=a[1],l=a[2],u=a[3],c=r>0?1:-1,d=n>0?1:-1,h=c+d!==0?1:0;return[["M",c*s+e,t],["L",r-c*o+e,t],o?["A",o,o,0,0,h,r+e,d*o+t]:null,["L",r+e,n-d*l+t],l?["A",l,l,0,0,h,r+e-c*l,n+t]:null,["L",e+c*u,n+t],u?["A",u,u,0,0,h,e,n+t-d*u]:null,["L",e,d*s+t],s?["A",s,s,0,0,h,c*s+e,t]:null,["Z"]].filter(function(f){return f})}return[["M",e,t],["L",e+r,t],["L",e+r,t+n],["L",e,t+n],["Z"]]}function Fd(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r.getLocalTransform(),e=[];switch(r.nodeName){case zt.LINE:var t=r.parsedStyle,i=t.x1,a=i===void 0?0:i,s=t.y1,o=s===void 0?0:s,l=t.x2,u=l===void 0?0:l,c=t.y2,d=c===void 0?0:c;e=Hr(a,o,u,d);break;case zt.CIRCLE:{var h=r.parsedStyle,f=h.r,v=f===void 0?0:f,g=h.cx,m=g===void 0?0:g,y=h.cy,w=y===void 0?0:y;e=ui(v,v,m,w);break}case zt.ELLIPSE:{var T=r.parsedStyle,G=T.rx,x=G===void 0?0:G,_=T.ry,p=_===void 0?0:_,b=T.cx,R=b===void 0?0:b,B=T.cy,j=B===void 0?0:B;e=ui(x,p,R,j);break}case zt.POLYLINE:case zt.POLYGON:var Z=r.parsedStyle.points;e=ts(Z.points,r.nodeName===zt.POLYGON);break;case zt.RECT:var te=r.parsedStyle,le=te.width,ue=le===void 0?0:le,se=te.height,V=se===void 0?0:se,ee=te.x,he=ee===void 0?0:ee,ut=te.y,ct=ut===void 0?0:ut,Lt=te.radius,vn=Lt&&Lt.some(function(rn){return rn!==0});e=ss(ue,V,he,ct,vn&&Lt.map(function(rn){return clamp(rn,0,Math.min(Math.abs(ue)/2,Math.abs(V)/2))}));break;case zt.PATH:var tn=r.parsedStyle.d.absolutePath;e=_toConsumableArray(tn);break}if(e.length)return Br(e,r,n)}function Yu(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a=r.map(function(s,o){var l=s[0],u=r[o+1],c=o===0&&(n!==0||e!==0),d=(o===r.length-1||u&&(u[0]==="M"||u[0]==="Z"))&&t!==0&&i!==0,h=c?[n,e]:[0,0],f=_slicedToArray(h,2),v=f[0],g=f[1],m=d?[t,i]:[0,0],y=_slicedToArray(m,2),w=y[0],T=y[1];switch(l){case"M":return"M ".concat(s[1]+v,",").concat(s[2]+g);case"L":return"L ".concat(s[1]+w,",").concat(s[2]+T);case"Q":return"Q ".concat(s[1]," ").concat(s[2],",").concat(s[3]+w," ").concat(s[4]+T);case"C":return"C ".concat(s[1]," ").concat(s[2],",").concat(s[3]," ").concat(s[4],",").concat(s[5]+w," ").concat(s[6]+T);case"A":return"A ".concat(s[1]," ").concat(s[2]," ").concat(s[3]," ").concat(s[4]," ").concat(s[5]," ").concat(s[6]+w," ").concat(s[7]+T);case"Z":return"Z";default:return null}}).filter(function(s){return s!==null}).join(" ");return~a.indexOf("NaN")?"":a}var Zu=function(n){if(n===""||Array.isArray(n)&&n.length===0)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var e;try{e=(0,xt.A)(n)}catch(f){e=(0,xt.A)(""),console.error("[g]: Invalid SVG Path definition: ".concat(n))}Ch(e);var t=Hu(e),i=Nu(e),a=i.polygons,s=i.polylines,o=hu(e),l=iu(o,0),u=l.x,c=l.y,d=l.width,h=l.height;return{absolutePath:e,hasArc:t,segments:o,polygons:a,polylines:s,totalLength:0,rect:{x:Number.isFinite(u)?u:0,y:Number.isFinite(c)?c:0,width:Number.isFinite(d)?d:0,height:Number.isFinite(h)?h:0}}},yl=pl(Zu);function Sc(r){return(0,Ze.Z)(r)?yl(r):Zu(r)}function Cv(r,n,e){var t=r.curve,i=n.curve;(!t||t.length===0)&&(t=(0,bt.Y)(r.absolutePath,!1),r.curve=t),(!i||i.length===0)&&(i=(0,bt.Y)(n.absolutePath,!1),n.curve=i);var a=[t,i];t.length!==i.length&&(a=(0,wt.x)(t,i));var s=(0,we.b)(a[0])!==(0,we.b)(a[1])?(0,oe.G)(a[0]):(0,Fe.U)(a[0]);return[s,(0,Ye.g)(a[1],s),function(o){return o}]}function ag(r,n){var e;return(0,Ze.Z)(r)?e=r.split(" ").map(function(t){var i=t.split(","),a=Qe(i,2),s=a[0],o=a[1];return[Number(s),Number(o)]}):e=r,{points:e,totalLength:0,segments:[]}}function Tm(r,n){return[r.points,n.points,function(e){return e}]}var Da=null,vu=/\s*(\w+)\(([^)]*)\)/g;function gu(r){return function(n){var e=0;return r.map(function(t){return t===Da?n[e++]:t})}}function Xu(r){return r}var Mv={matrix:["NNNNNN",[Da,Da,0,0,Da,Da,0,0,0,0,1,0,Da,Da,0,1],Xu],matrix3d:["NNNNNNNNNNNNNNNN",Xu],rotate:["A"],rotateX:["A"],rotateY:["A"],rotateZ:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",gu([Da,Da,new Ln(1)]),Xu],scaleX:["N",gu([Da,new Ln(1),new Ln(1)]),gu([Da,new Ln(1)])],scaleY:["N",gu([new Ln(1),Da,new Ln(1)]),gu([new Ln(1),Da])],scaleZ:["N",gu([new Ln(1),new Ln(1),Da])],scale3d:["NNN",Xu],skew:["Aa",null,Xu],skewX:["A",null,gu([Da,mi])],skewY:["A",null,gu([mi,Da])],translate:["Tt",gu([Da,Da,Jr]),Xu],translateX:["T",gu([Da,Jr,Jr]),gu([Da,Jr])],translateY:["T",gu([Jr,Da,Jr]),gu([Jr,Da])],translateZ:["L",gu([Jr,Jr,Da])],translate3d:["TTL",Xu]};function Cm(r){for(var n=[],e=r.length,t=0;t<e;t++){var i=r[t],a=i[0],s=i.slice(1);a==="translate"||a==="skew"?s.length===1&&s.push(0):a==="scale"&&s.length===1&&s.push(s[0]);var o=Mv[a];if(!o)return[];var l=s.map(function(u){return Gr(u)});n.push({t:a,d:l})}return n}function jx(r){if(Array.isArray(r))return Cm(r);if(r=(r||"none").trim(),r==="none")return[];var n=[],e,t=0;for(vu.lastIndex=0;e=vu.exec(r);){if(e.index!==t)return[];t=e.index+e[0].length;var i=e[1],a=Mv[i];if(!a)return[];var s=e[2].split(","),o=a[0];if(o.length<s.length)return[];for(var l=[],u=0;u<o.length;u++){var c=s[u],d=o[u],h=void 0;if(c?h={A:function(v){return v.trim()==="0"?mi:ks(v)},N:ru,T:is,L:Ki}[d.toUpperCase()](c):h={a:mi,n:l[0],t:Jr}[d],h===void 0)return[];l.push(h)}if(n.push({t:i,d:l}),vu.lastIndex===r.length)return n}return[]}function de(r){if(Array.isArray(r))return Cm(r);if(r=(r||"none").trim(),r==="none")return[];var n=[],e,t=0;for(vu.lastIndex=0;e=vu.exec(r);){if(e.index!==t)return[];t=e.index+e[0].length;var i=e[1],a=Mv[i];if(!a)return[];var s=e[2].split(","),o=a[0];if(o.length<s.length)return[];for(var l=[],u=0;u<o.length;u++){var c=s[u],d=o[u],h=void 0;if(c?h={A:function(v){return v.trim()==="0"?mi:Bo(v)},N:Ro,T:bs,L:oa}[d.toUpperCase()](c):h={a:mi,n:l[0],t:Jr}[d],h===void 0)return[];l.push(h)}if(n.push({t:i,d:l}),vu.lastIndex===r.length)return n}return[]}function Q(r){var n,e,t,i;switch(r.t){case"rotateX":return i=ni(fa(r.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotateY":return i=ni(fa(r.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotateZ":return i=ni(fa(r.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":n=r.d[0].value,e=r.d[1].value,t=r.d[2].value,i=ni(fa(r.d[3]));var a=n*n+e*e+t*t;if(a===0)n=1,e=0,t=0;else if(a!==1){var s=Math.sqrt(a);n/=s,e/=s,t/=s}var o=Math.sin(i/2),l=o*Math.cos(i/2),u=o*o;return[1-2*(e*e+t*t)*u,2*(n*e*u+t*l),2*(n*t*u-e*l),0,2*(n*e*u-t*l),1-2*(n*n+t*t)*u,2*(e*t*u+n*l),0,2*(n*t*u+e*l),2*(e*t*u-n*l),1-2*(n*n+e*e)*u,0,0,0,0,1];case"scale":return[r.d[0].value,0,0,0,0,r.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scaleX":return[r.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaleY":return[1,0,0,0,0,r.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scaleZ":return[1,0,0,0,0,1,0,0,0,0,r.d[0].value,0,0,0,0,1];case"scale3d":return[r.d[0].value,0,0,0,0,r.d[1].value,0,0,0,0,r.d[2].value,0,0,0,0,1];case"skew":var c=ni(fa(r.d[0])),d=ni(fa(r.d[1]));return[1,Math.tan(d),0,0,Math.tan(c),1,0,0,0,0,1,0,0,0,0,1];case"skewX":return i=ni(fa(r.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewY":return i=ni(fa(r.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return n=ls(r.d[0],0,null)||0,e=ls(r.d[1],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,e,0,1];case"translateX":return n=ls(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,0,0,1];case"translateY":return e=ls(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,e,0,1];case"translateZ":return t=ls(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,t,1];case"translate3d":return n=ls(r.d[0],0,null)||0,e=ls(r.d[1],0,null)||0,t=ls(r.d[2],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,e,t,1];case"perspective":var h=ls(r.d[0],0,null)||0,f=h?-1/h:0;return[1,0,0,0,0,1,0,0,0,0,1,f,0,0,0,1];case"matrix":return[r.d[0].value,r.d[1].value,0,0,r.d[2].value,r.d[3].value,0,0,0,0,1,0,r.d[4].value,r.d[5].value,0,1];case"matrix3d":return r.d.map(function(v){return v.value})}}function ae(r,n){return[r[0]*n[0]+r[4]*n[1]+r[8]*n[2]+r[12]*n[3],r[1]*n[0]+r[5]*n[1]+r[9]*n[2]+r[13]*n[3],r[2]*n[0]+r[6]*n[1]+r[10]*n[2]+r[14]*n[3],r[3]*n[0]+r[7]*n[1]+r[11]*n[2]+r[15]*n[3],r[0]*n[4]+r[4]*n[5]+r[8]*n[6]+r[12]*n[7],r[1]*n[4]+r[5]*n[5]+r[9]*n[6]+r[13]*n[7],r[2]*n[4]+r[6]*n[5]+r[10]*n[6]+r[14]*n[7],r[3]*n[4]+r[7]*n[5]+r[11]*n[6]+r[15]*n[7],r[0]*n[8]+r[4]*n[9]+r[8]*n[10]+r[12]*n[11],r[1]*n[8]+r[5]*n[9]+r[9]*n[10]+r[13]*n[11],r[2]*n[8]+r[6]*n[9]+r[10]*n[10]+r[14]*n[11],r[3]*n[8]+r[7]*n[9]+r[11]*n[10]+r[15]*n[11],r[0]*n[12]+r[4]*n[13]+r[8]*n[14]+r[12]*n[15],r[1]*n[12]+r[5]*n[13]+r[9]*n[14]+r[13]*n[15],r[2]*n[12]+r[6]*n[13]+r[10]*n[14]+r[14]*n[15],r[3]*n[12]+r[7]*n[13]+r[11]*n[14]+r[15]*n[15]]}function _e(r){return r.length===0?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:r.map(Q).reduce(ae)}function Re(r){var n=[0,0,0],e=[1,1,1],t=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return kv(_e(r),n,e,t,i,a),[[n,e,t,a,i]]}var Ge=function(){function r(t,i){for(var a=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],s=0;s<4;s++)for(var o=0;o<4;o++)for(var l=0;l<4;l++)a[s][o]+=i[s][l]*t[l][o];return a}function n(t){return t[0][2]===0&&t[0][3]===0&&t[1][2]===0&&t[1][3]===0&&t[2][0]===0&&t[2][1]===0&&t[2][2]===1&&t[2][3]===0&&t[3][2]===0&&t[3][3]===1}function e(t,i,a,s,o){for(var l=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],u=0;u<4;u++)l[u][3]=o[u];for(var c=0;c<3;c++)for(var d=0;d<3;d++)l[3][c]+=t[d]*l[d][c];var h=s[0],f=s[1],v=s[2],g=s[3],m=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];m[0][0]=1-2*(f*f+v*v),m[0][1]=2*(h*f-v*g),m[0][2]=2*(h*v+f*g),m[1][0]=2*(h*f+v*g),m[1][1]=1-2*(h*h+v*v),m[1][2]=2*(f*v-h*g),m[2][0]=2*(h*v-f*g),m[2][1]=2*(f*v+h*g),m[2][2]=1-2*(h*h+f*f),l=r(l,m);var y=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];a[2]&&(y[2][1]=a[2],l=r(l,y)),a[1]&&(y[2][1]=0,y[2][0]=a[0],l=r(l,y)),a[0]&&(y[2][0]=0,y[1][0]=a[0],l=r(l,y));for(var w=0;w<3;w++)for(var T=0;T<3;T++)l[w][T]*=i[w];return n(l)?[l[0][0],l[0][1],l[1][0],l[1][1],l[3][0],l[3][1]]:l[0].concat(l[1],l[2],l[3])}return e}();function Xe(r){return r.toFixed(6).replace(".000000","")}function yt(r,n){var e,t;return r.decompositionPair!==n&&(r.decompositionPair=n,e=Re(r)),n.decompositionPair!==r&&(n.decompositionPair=r,t=Re(n)),e[0]===null||t[0]===null?[[!1],[!0],function(i){return i?n[0].d:r[0].d}]:(e[0].push(0),t[0].push(1),[e,t,function(i){var a=Tt(e[0][3],t[0][3],i[5]),s=Ge(i[0],i[1],i[2],a,i[4]),o=s.map(Xe).join(",");return o}])}function kt(r,n){for(var e=0,t=0;t<r.length;t++)e+=r[t]*n[t];return e}function Tt(r,n,e){var t=kt(r,n);t=(0,O.Z)(t,-1,1);var i=[];if(t===1)i=r;else for(var a=Math.acos(t),s=Math.sin(e*a)*1/Math.sqrt(1-t*t),o=0;o<4;o++)i.push(r[o]*(Math.cos(e*a)-t*s)+n[o]*s);return i}function It(r){return r.replace(/[XY]/,"")}function Dt(r){return r.replace(/(X|Y|Z|3d)?$/,"3d")}var Yt=function(n,e){return n==="perspective"&&e==="perspective"||(n==="matrix"||n==="matrix3d")&&(e==="matrix"||e==="matrix3d")};function Vt(r,n,e){var t=!1;if(!r.length||!n.length){r.length||(t=!0,r=n,n=[]);for(var i=function(){var j=r[a],Z=j.t,te=j.d,le=Z.substring(0,5)==="scale"?1:0;n.push({t:Z,d:te.map(function(ue){return typeof ue=="number"?Gr(le):Gr(le,ue.unit)})})},a=0;a<r.length;a++)i()}var s=[],o=[],l=[];if(r.length!==n.length){var u=yt(r,n);s=[u[0]],o=[u[1]],l=[["matrix",[u[2]]]]}else for(var c=0;c<r.length;c++){var d=r[c].t,h=n[c].t,f=r[c].d,v=n[c].d,g=Mv[d],m=Mv[h],y=void 0;if(Yt(d,h)){var w=yt([r[c]],[n[c]]);s.push(w[0]),o.push(w[1]),l.push(["matrix",[w[2]]]);continue}else if(d===h)y=d;else if(g[2]&&m[2]&&It(d)===It(h))y=It(d),f=g[2](f),v=m[2](v);else if(g[1]&&m[1]&&Dt(d)===Dt(h))y=Dt(d),f=g[1](f),v=m[1](v);else{var T=yt(r,n);s=[T[0]],o=[T[1]],l=[["matrix",[T[2]]]];break}for(var G=[],x=[],_=[],p=0;p<f.length;p++){var b=Oo(f[p],v[p],e,!1,p);G[p]=b[0],x[p]=b[1],_.push(b[2])}s.push(G),o.push(x),l.push([y,_])}if(t){var R=s;s=o,o=R}return[s,o,function(B){return B.map(function(j,Z){var te=j.map(function(le,ue){return l[Z][1][ue](le)}).join(",");return l[Z][0]==="matrix"&&te.split(",").length===16&&(l[Z][0]="matrix3d"),l[Z][0]==="matrix3d"&&te.split(",").length===6&&(l[Z][0]="matrix"),"".concat(l[Z][0],"(").concat(te,")")}).join(" ")}]}var jt=pl(function(r){if((0,Ze.Z)(r)){if(r==="text-anchor")return[Gr(0,"px"),Gr(0,"px")];var n=r.split(" ");return n.length===1&&(n[0]==="top"||n[0]==="bottom"?(n[1]=n[0],n[0]="center"):n[1]="center"),n.length!==2?null:[is(Zt(n[0])),is(Zt(n[1]))]}return[Gr(r[0]||0,"px"),Gr(r[1]||0,"px")]});function Zt(r){return r==="center"?"50%":r==="left"||r==="top"?"0%":r==="right"||r==="bottom"?"100%":r}var Kt=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:Tn.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:Tn.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:Tn.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:Tn.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:Tn.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:Tn.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:Tn.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:Tn.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:Tn.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:Tn.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:Tn.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:Tn.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:Tn.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:Tn.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:Tn.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:Tn.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:Tn.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:Tn.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:Tn.FILTER},{n:"clipPath",syntax:Tn.DEFINED_PATH},{n:"textPath",syntax:Tn.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:Tn.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:Tn.TRANSFORM},{n:"transformOrigin",p:100,d:"0 0",l:!0,syntax:Tn.TRANSFORM_ORIGIN},{n:"cx",int:!0,l:!0,d:"0",syntax:Tn.COORDINATE},{n:"cy",int:!0,l:!0,d:"0",syntax:Tn.COORDINATE},{n:"cz",int:!0,l:!0,d:"0",syntax:Tn.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:Tn.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:Tn.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:Tn.LENGTH_PERCENTAGE},{n:"x",int:!0,l:!0,d:"0",syntax:Tn.COORDINATE},{n:"y",int:!0,l:!0,d:"0",syntax:Tn.COORDINATE},{n:"z",int:!0,l:!0,d:"0",syntax:Tn.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:Tn.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:Tn.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:Tn.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:Tn.COORDINATE},{n:"y1",int:!0,l:!0,syntax:Tn.COORDINATE},{n:"z1",int:!0,l:!0,syntax:Tn.COORDINATE},{n:"x2",int:!0,l:!0,syntax:Tn.COORDINATE},{n:"y2",int:!0,l:!0,syntax:Tn.COORDINATE},{n:"z2",int:!0,l:!0,syntax:Tn.COORDINATE},{n:"d",int:!0,l:!0,d:"",syntax:Tn.PATH,p:50},{n:"points",int:!0,l:!0,syntax:Tn.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:Tn.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:Tn.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:Tn.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:Tn.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:Tn.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:Tn.NUMBER,d:function(n){return n===zt.PATH||n===zt.POLYGON||n===zt.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:Tn.MARKER},{n:"markerEnd",syntax:Tn.MARKER},{n:"markerMid",syntax:Tn.MARKER},{n:"markerStartOffset",syntax:Tn.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:Tn.LENGTH,l:!0,int:!0,d:"0"}],hn=new Set(Kt.filter(function(r){return!!r.l}).map(function(r){return r.n})),xn={},wn=function(){function r(n){var e=this;q(this,r),this.runtime=n,Kt.forEach(function(t){e.registerMetadata(t)})}return Ee(r,[{key:"registerMetadata",value:function(e){[e.n].concat(lt(e.a||[])).forEach(function(t){xn[t]=e})}},{key:"getPropertySyntax",value:function(e){return this.runtime.CSSPropertySyntaxFactory[e]}},{key:"processProperties",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0};Object.assign(e.attributes,t);var a=e.parsedStyle.clipPath,s=e.parsedStyle.offsetPath;Object.assign(e.parsedStyle,t);var o=!!i.forceUpdateGeometry;if(!o){for(var l in t)if(hn.has(l)){o=!0;break}}t.fill&&(e.parsedStyle.fill=xi(t.fill)),t.stroke&&(e.parsedStyle.stroke=xi(t.stroke)),t.shadowColor&&(e.parsedStyle.shadowColor=xi(t.shadowColor)),t.filter&&(e.parsedStyle.filter=$o(t.filter)),(0,xe.Z)(t.radius)||(e.parsedStyle.radius=as(t.radius,4)),(0,xe.Z)(t.lineDash)||(e.parsedStyle.lineDash=as(t.lineDash,2)),t.points&&(e.parsedStyle.points=ag(t.points)),t.d===""&&(e.parsedStyle.d=re({},Tv)),t.d&&(e.parsedStyle.d=Sc(t.d)),t.textTransform&&this.runtime.CSSPropertySyntaxFactory[Tn.TEXT_TRANSFORM].calculator(null,null,{value:t.textTransform},e,null),(0,ie.Z)(t.clipPath)||this.runtime.CSSPropertySyntaxFactory[Tn.DEFINED_PATH].calculator("clipPath",a,t.clipPath,e,this.runtime),t.offsetPath&&this.runtime.CSSPropertySyntaxFactory[Tn.DEFINED_PATH].calculator("offsetPath",s,t.offsetPath,e,this.runtime),t.transform&&(e.parsedStyle.transform=jx(t.transform)),t.transformOrigin&&(e.parsedStyle.transformOrigin=jt(t.transformOrigin)),t.markerStart&&(e.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory[Tn.MARKER].calculator(null,t.markerStart,t.markerStart,null,null)),t.markerEnd&&(e.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory[Tn.MARKER].calculator(null,t.markerEnd,t.markerEnd,null,null)),t.markerMid&&(e.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory[Tn.MARKER].calculator("",t.markerMid,t.markerMid,null,null)),(0,xe.Z)(t.zIndex)||this.runtime.CSSPropertySyntaxFactory[Tn.Z_INDEX].postProcessor(e),(0,xe.Z)(t.offsetDistance)||this.runtime.CSSPropertySyntaxFactory[Tn.OFFSET_DISTANCE].postProcessor(e),t.transform&&this.runtime.CSSPropertySyntaxFactory[Tn.TRANSFORM].postProcessor(e),t.transformOrigin&&this.runtime.CSSPropertySyntaxFactory[Tn.TRANSFORM_ORIGIN].postProcessor(e),o&&(e.geometry.dirty=!0,e.renderable.boundsDirty=!0,e.renderable.renderBoundsDirty=!0,i.forceUpdateGeometry||this.runtime.sceneGraphService.dirtifyToRoot(e))}},{key:"updateGeometry",value:function(e){var t=e.nodeName,i=this.runtime.geometryUpdaterFactory[t];if(i){var a=e.geometry;a.contentBounds||(a.contentBounds=new yn),a.renderBounds||(a.renderBounds=new yn);var s=e.parsedStyle,o=i.update(s,e),l=o.cx,u=l===void 0?0:l,c=o.cy,d=c===void 0?0:c,h=o.cz,f=h===void 0?0:h,v=o.hwidth,g=v===void 0?0:v,m=o.hheight,y=m===void 0?0:m,w=o.hdepth,T=w===void 0?0:w,G=[Math.abs(g),Math.abs(y),T],x=s.stroke,_=s.lineWidth,p=_===void 0?1:_,b=s.increasedLineWidthForHitTesting,R=b===void 0?0:b,B=s.shadowType,j=B===void 0?"outer":B,Z=s.shadowColor,te=s.filter,le=te===void 0?[]:te,ue=s.transformOrigin,se=[u,d,f];a.contentBounds.update(se,G);var V=t===zt.POLYLINE||t===zt.POLYGON||t===zt.PATH?Math.SQRT2:.5,ee=x&&!x.isNone;if(ee){var he=((p||0)+(R||0))*V;G[0]+=he,G[1]+=he}if(a.renderBounds.update(se,G),Z&&j&&j!=="inner"){var ut=a.renderBounds,ct=ut.min,Lt=ut.max,vn=s.shadowBlur,tn=s.shadowOffsetX,rn=s.shadowOffsetY,mn=vn||0,ar=tn||0,gi=rn||0,kr=ct[0]-mn+ar,Ta=Lt[0]+mn+ar,Wa=ct[1]-mn+gi,la=Lt[1]+mn+gi;ct[0]=Math.min(ct[0],kr),Lt[0]=Math.max(Lt[0],Ta),ct[1]=Math.min(ct[1],Wa),Lt[1]=Math.max(Lt[1],la),a.renderBounds.setMinMax(ct,Lt)}le.forEach(function(so){var oo=so.name,qi=so.params;if(oo==="blur"){var lo=qi[0].value;a.renderBounds.update(a.renderBounds.center,E.IH(a.renderBounds.halfExtents,a.renderBounds.halfExtents,[lo,lo,0]))}else if(oo==="drop-shadow"){var uo=qi[0].value,co=qi[1].value,ea=qi[2].value,ho=a.renderBounds,Rr=ho.min,Ar=ho.max,Gu=Rr[0]-ea+uo,zu=Ar[0]+ea+uo,Vu=Rr[1]-ea+co,Uu=Ar[1]+ea+co;Rr[0]=Math.min(Rr[0],Gu),Ar[0]=Math.max(Ar[0],zu),Rr[1]=Math.min(Rr[1],Vu),Ar[1]=Math.max(Ar[1],Uu),a.renderBounds.setMinMax(Rr,Ar)}}),e.geometry.dirty=!1;var ys=g<0,Jl=y<0,xs=(ys?-1:1)*(ue?ls(ue[0],0,e,!0):0),Es=(Jl?-1:1)*(ue?ls(ue[1],1,e,!0):0);(xs||Es)&&e.setOrigin(xs,Es)}}},{key:"updateSizeAttenuation",value:function(e,t){e.style.isSizeAttenuation?(e.style.rawLineWidth||(e.style.rawLineWidth=e.style.lineWidth),e.style.lineWidth=(e.style.rawLineWidth||1)/t,e.nodeName===zt.CIRCLE&&(e.style.rawR||(e.style.rawR=e.style.r),e.style.r=(e.style.rawR||1)/t)):(e.style.rawLineWidth&&(e.style.lineWidth=e.style.rawLineWidth,delete e.style.rawLineWidth),e.nodeName===zt.CIRCLE&&e.style.rawR&&(e.style.r=e.style.rawR,delete e.style.rawR))}}])}(),ir=function(){function r(){q(this,r),this.mixer=vo}return Ee(r,[{key:"calculator",value:function(e,t,i,a){return fa(i)}}])}(),pr=function(){function r(){q(this,r)}return Ee(r,[{key:"calculator",value:function(e,t,i,a,s){return i instanceof fn&&(i=null),s.sceneGraphService.updateDisplayObjectDependency(e,t,i,a),e==="clipPath"&&a.forEach(function(o){o.childNodes.length===0&&s.sceneGraphService.dirtifyToRoot(o)}),i}}])}(),_r=function(){function r(){q(this,r),this.parser=xi,this.mixer=Aa}return Ee(r,[{key:"calculator",value:function(e,t,i,a){return i instanceof fn?i.value==="none"?Yi:Xi:i}}])}(),si=function(){function r(){q(this,r)}return Ee(r,[{key:"calculator",value:function(e,t,i){return i instanceof fn?[]:i}}])}();function Ur(r){var n=r.parsedStyle,e=n.fontSize;return(0,xe.Z)(e)?null:e}var qr=function(){function r(){q(this,r),this.mixer=vo}return Ee(r,[{key:"calculator",value:function(e,t,i,a,s){if((0,pe.Z)(i))return i;if(Ln.isRelativeUnit(i.unit)){if(i.unit===An.kPercentage)return 0;if(i.unit===An.kEms){if(a.parentNode){var o=Ur(a.parentNode);if(o)return o*=i.value,o}return 0}if(i.unit===An.kRems){var l;if(a!=null&&(l=a.ownerDocument)!==null&&l!==void 0&&l.documentElement){var u=Ur(a.ownerDocument.documentElement);if(u)return u*=i.value,u}return 0}}else return i.value}}])}(),Hi=function(){function r(){q(this,r),this.mixer=jl}return Ee(r,[{key:"calculator",value:function(e,t,i){return i.map(function(a){return a.value})}}])}(),Ri=function(){function r(){q(this,r),this.mixer=jl}return Ee(r,[{key:"calculator",value:function(e,t,i){return i.map(function(a){return a.value})}}])}(),ci=function(){function r(){q(this,r)}return Ee(r,[{key:"calculator",value:function(e,t,i,a){var s;i instanceof fn&&(i=null);var o=(s=i)===null||s===void 0?void 0:s.cloneNode(!0);return o&&(o.style.isMarker=!0),o}}])}(),Xa=function(){function r(){q(this,r),this.mixer=vo}return Ee(r,[{key:"calculator",value:function(e,t,i){return i.value}}])}(),va=function(){function r(){q(this,r),this.mixer=Ao(0,1)}return Ee(r,[{key:"calculator",value:function(e,t,i){return i.value}},{key:"postProcessor",value:function(e){var t=e.parsedStyle,i=t.offsetPath,a=t.offsetDistance;if(i){var s=i.nodeName;if(s===zt.LINE||s===zt.PATH||s===zt.POLYLINE){var o=i.getPoint(a);o&&e.setLocalPosition(o.x,o.y)}}}}])}(),da=function(){function r(){q(this,r),this.mixer=Ao(0,1)}return Ee(r,[{key:"calculator",value:function(e,t,i){return i.value}}])}(),Ua=function(){function r(){q(this,r),this.parser=Sc,this.mixer=Cv}return Ee(r,[{key:"calculator",value:function(e,t,i){return i instanceof fn&&i.value==="unset"?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new ai(0,0,0,0)}:i}}])}(),ja=Ee(function r(){q(this,r),this.mixer=Tm}),La=function(r){function n(){var e;q(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=ht(this,n,[].concat(i)),e.mixer=Ao(0,1/0),e}return Ve(n,r),Ee(n)}(qr),hr=function(){function r(){q(this,r)}return Ee(r,[{key:"calculator",value:function(e,t,i,a){return i instanceof fn?i.value==="unset"?"":i.value:"".concat(i)}},{key:"postProcessor",value:function(e){e.nodeValue="".concat(e.parsedStyle.text)||""}}])}(),Qr=function(){function r(){q(this,r)}return Ee(r,[{key:"calculator",value:function(e,t,i,a){var s=a.getAttribute("text");if(s){var o=s;i.value==="capitalize"?o=s.charAt(0).toUpperCase()+s.slice(1):i.value==="lowercase"?o=s.toLowerCase():i.value==="uppercase"&&(o=s.toUpperCase()),a.parsedStyle.text=o}return i.value}}])}(),Ei=function(n){return Object.fromEntries(Object.entries(n).filter(function(e){var t=_slicedToArray(e,2),i=t[1];return i!==void 0}))},ji=new WeakMap;function Ai(r,n,e){if(r){var t=typeof r=="string"?document.getElementById(r):r;ji.has(t)&&ji.get(t).destroy(e),ji.set(t,n)}}var go=typeof window!="undefined"&&typeof window.document!="undefined";function _o(r){return!!r.getAttribute}function ac(r,n){for(var e=0,t=r.length;e<t;){var i=e+t>>>1;Ku(r[i],n)<0?e=i+1:t=i}return e}function Ku(r,n){var e=Number(r.parsedStyle.zIndex||0),t=Number(n.parsedStyle.zIndex||0);if(e===t){var i=r.parentNode;if(i){var a=i.childNodes||[];return a.indexOf(r)-a.indexOf(n)}}return e-t}function Ou(r){var n=r;do{var e,t=(e=n.parsedStyle)===null||e===void 0?void 0:e.clipPath;if(t)return n;n=n.parentElement}while(n!==null);return null}var Mh="px";function Ru(r,n,e){go&&r.style&&(r.style.width=n+Mh,r.style.height=e+Mh)}function Ph(r,n){if(go)return document.defaultView.getComputedStyle(r,null).getPropertyValue(n)}function xl(r){var n=Ph(r,"width");return n==="auto"?r.offsetWidth:parseFloat(n)}function Mm(r){var n=Ph(r,"height");return n==="auto"?r.offsetHeight:parseFloat(n)}var Ju=1,Qg={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},Qu=typeof performance=="object"&&performance.now?performance:Date;function _u(r){return r.nodeName===zt.FRAGMENT?!0:r.getRootNode().nodeName===zt.FRAGMENT}function qg(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"auto",n=arguments.length>1?arguments[1]:void 0,e=arguments.length>2?arguments[2]:void 0,t=!1,i=!1,a=!!n&&!n.isNone,s=!!e&&!e.isNone;return r==="visiblepainted"||r==="painted"||r==="auto"?(t=a,i=s):r==="visiblefill"||r==="fill"?t=!0:r==="visiblestroke"||r==="stroke"?i=!0:(r==="visible"||r==="all")&&(t=!0,i=!0),[t,i]}var Tc=1,hd=function(){return Tc++},Li=typeof self=="object"&&self.self===self?self:typeof k.g=="object"&&k.g.global===k.g?k.g:{},ns=Date.now(),ka=function(){return Li.performance&&typeof Li.performance.now=="function"?Li.performance.now():Date.now()-ns},Ma={},mo=Date.now(),oi=function(n){if(typeof n!="function")throw new TypeError("".concat(n," is not a function"));var e=Date.now(),t=e-mo,i=t>16?0:16-t,a=hd();return Ma[a]=n,Object.keys(Ma).length>1||setTimeout(function(){mo=e;var s=Ma;Ma={},Object.keys(s).forEach(function(o){return s[o](ka())})},i),a},Ha=function(n){delete Ma[n]},Ka=["","webkit","moz","ms","o"],El=function(n){return typeof n!="string"?oi:n===""?Li.requestAnimationFrame:Li["".concat(n,"RequestAnimationFrame")]},Ja=function(n){return typeof n!="string"?Ha:n===""?Li.cancelAnimationFrame:Li["".concat(n,"CancelAnimationFrame")]||Li["".concat(n,"CancelRequestAnimationFrame")]},Ia=function(n,e){for(var t=0;n[t]!==void 0;){if(e(n[t]))return n[t];t+=1}},po=Ia(Ka,function(r){return!!El(r)}),qu=El(po),zo=Ja(po);Li.requestAnimationFrame=qu,Li.cancelAnimationFrame=zo;var sg=null,e_=null,ec=null,fd=null,Bd=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Mf=/([\"\'])[^\'\"]+\1/;function Au(r){for(var n=r.fontSize,e=n===void 0?16:n,t=r.fontFamily,i=t===void 0?"sans-serif":t,a=r.fontStyle,s=a===void 0?"normal":a,o=r.fontVariant,l=o===void 0?"normal":o,u=r.fontWeight,c=u===void 0?"normal":u,d=(0,pe.Z)(e)&&"".concat(e,"px")||"16px",h=i.split(","),f=h.length-1;f>=0;f--){var v=h[f].trim();!Mf.test(v)&&Bd.indexOf(v)<0&&(v='"'.concat(v,'"')),h[f]=v}return"".concat(s," ").concat(l," ").concat(c," ").concat(d," ").concat(h.join(","))}function sc(r,n,e){return L.identity(r),r[4]=Math.tan(n),r[1]=Math.tan(e),r}var rs=L.create(),Hx=L.create(),Ww={scale:function(n){L.fromScaling(rs,[n[0].value,n[1].value,1])},scaleX:function(n){L.fromScaling(rs,[n[0].value,1,1])},scaleY:function(n){L.fromScaling(rs,[1,n[0].value,1])},scaleZ:function(n){L.fromScaling(rs,[1,1,n[0].value])},scale3d:function(n){L.fromScaling(rs,[n[0].value,n[1].value,n[2].value])},translate:function(n){L.fromTranslation(rs,[n[0].value,n[1].value,0])},translateX:function(n){L.fromTranslation(rs,[n[0].value,0,0])},translateY:function(n){L.fromTranslation(rs,[0,n[0].value,0])},translateZ:function(n){L.fromTranslation(rs,[0,0,n[0].value])},translate3d:function(n){L.fromTranslation(rs,[n[0].value,n[1].value,n[2].value])},rotate:function(n){L.fromZRotation(rs,ni(fa(n[0])))},rotateX:function(n){L.fromXRotation(rs,ni(fa(n[0])))},rotateY:function(n){L.fromYRotation(rs,ni(fa(n[0])))},rotateZ:function(n){L.fromZRotation(rs,ni(fa(n[0])))},rotate3d:function(n){L.fromRotation(rs,ni(fa(n[3])),[n[0].value,n[1].value,n[2].value])},skew:function(n){sc(rs,ni(n[0].value),ni(n[1].value))},skewX:function(n){sc(rs,ni(n[0].value),0)},skewY:function(n){sc(rs,0,ni(n[0].value))},matrix:function(n){L.set(rs,n[0].value,n[1].value,0,0,n[2].value,n[3].value,0,0,0,0,1,0,n[4].value,n[5].value,0,1)},matrix3d:function(n){L.set.apply(L,[rs].concat(lt(n.map(function(e){return e.value}))))}},Yw=E.al(1,1,1),Zw=E.Ue(),Pm={translate:function(n,e){wa.sceneGraphService.setLocalScale(n,Yw,!1),wa.sceneGraphService.setLocalEulerAngles(n,Zw,void 0,void 0,!1),wa.sceneGraphService.setLocalPosition(n,[e[0].value,e[1].value,0],!1),wa.sceneGraphService.dirtifyLocal(n,n.transformable)}};function Wx(r,n){if(r.length){if(r.length===1&&Pm[r[0].t]){Pm[r[0].t](n,r[0].d);return}for(var e=L.identity(Hx),t=0;t<r.length;t++){var i=r[t],a=i.t,s=i.d,o=Ww[a];o&&(o(s),L.mul(e,e,rs))}n.setLocalTransform(e)}else n.resetLocalTransform();return n.getLocalTransform()}var Xw=function(){function r(){q(this,r),this.parser=de,this.mixer=Vt}return Ee(r,[{key:"calculator",value:function(e,t,i,a){return i instanceof fn?[]:i}},{key:"postProcessor",value:function(e){Wx(e.parsedStyle.transform,e)}}])}(),Kw=function(){function r(){q(this,r)}return Ee(r,[{key:"postProcessor",value:function(e){var t=e.parsedStyle.transformOrigin;t[0].unit===An.kPixels&&t[1].unit===An.kPixels?e.setOrigin(t[0].value,t[1].value):e.getGeometryBounds()}}])}(),Jw=function(){function r(){q(this,r)}return Ee(r,[{key:"calculator",value:function(e,t,i,a){return i.value}},{key:"postProcessor",value:function(e){if(e.parentNode){var t=e.parentNode,i=t.renderable,a=t.sortable;i&&(i.dirty=!0),a&&(a.dirty=!0,a.dirtyReason=Sh.Z_INDEX_CHANGED)}}}])}(),Nm=function(){function r(){q(this,r)}return Ee(r,[{key:"update",value:function(e,t){var i=e.cx,a=i===void 0?0:i,s=e.cy,o=s===void 0?0:s,l=e.r,u=l===void 0?0:l;return{cx:a,cy:o,hwidth:u,hheight:u}}}])}(),Nh=function(){function r(){q(this,r)}return Ee(r,[{key:"update",value:function(e,t){var i=e.cx,a=i===void 0?0:i,s=e.cy,o=s===void 0?0:s,l=e.rx,u=l===void 0?0:l,c=e.ry,d=c===void 0?0:c;return{cx:a,cy:o,hwidth:u,hheight:d}}}])}(),Om=function(){function r(){q(this,r)}return Ee(r,[{key:"update",value:function(e){var t=e.x1,i=e.y1,a=e.x2,s=e.y2,o=Math.min(t,a),l=Math.max(t,a),u=Math.min(i,s),c=Math.max(i,s),d=l-o,h=c-u,f=d/2,v=h/2;return{cx:o+f,cy:u+v,hwidth:f,hheight:v}}}])}(),ws=function(){function r(){q(this,r)}return Ee(r,[{key:"update",value:function(e){var t=e.d,i=t.rect,a=i.x,s=i.y,o=i.width,l=i.height,u=o/2,c=l/2;return{cx:a+u,cy:s+c,hwidth:u,hheight:c}}}])}(),oc=function(){function r(){q(this,r)}return Ee(r,[{key:"update",value:function(e){if(e.points&&(0,Ie.Z)(e.points.points)){var t=e.points.points,i=Math.min.apply(Math,lt(t.map(function(h){return h[0]}))),a=Math.max.apply(Math,lt(t.map(function(h){return h[0]}))),s=Math.min.apply(Math,lt(t.map(function(h){return h[1]}))),o=Math.max.apply(Math,lt(t.map(function(h){return h[1]}))),l=a-i,u=o-s,c=l/2,d=u/2;return{cx:i+c,cy:s+d,hwidth:c,hheight:d}}return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),bl=function(){function r(){q(this,r)}return Ee(r,[{key:"update",value:function(e,t){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s,l=e.src,u=e.width,c=u===void 0?0:u,d=e.height,h=d===void 0?0:d,f=c,v=h;return l&&!(0,Ze.Z)(l)&&(f||(f=l.width,e.width=f),v||(v=l.height,e.height=v)),{cx:a+f/2,cy:o+v/2,hwidth:f/2,hheight:v/2}}}])}(),$d=function(){function r(n){q(this,r),this.globalRuntime=n}return Ee(r,[{key:"isReadyToMeasure",value:function(e,t){var i=e.text;return i}},{key:"update",value:function(e,t){var i,a=e.text,s=e.textAlign,o=s===void 0?"start":s,l=e.lineWidth,u=l===void 0?1:l,c=e.textBaseline,d=c===void 0?"alphabetic":c,h=e.dx,f=h===void 0?0:h,v=e.dy,g=v===void 0?0:v,m=e.x,y=m===void 0?0:m,w=e.y,T=w===void 0?0:w;if(!this.isReadyToMeasure(e,t))return e.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{hwidth:0,hheight:0,cx:0,cy:0};var G=(t==null||(i=t.ownerDocument)===null||i===void 0||(i=i.defaultView)===null||i===void 0?void 0:i.getConfig())||{},x=G.offscreenCanvas,_=this.globalRuntime.textService.measureText(a,e,x);e.metrics=_;var p=_.width,b=_.height,R=p/2,B=b/2,j=y+R;o==="center"||o==="middle"?j+=u/2-R:(o==="right"||o==="end")&&(j+=u-R*2);var Z=T-B;return d==="middle"?Z+=B:d==="top"||d==="hanging"?Z+=B*2:d==="alphabetic"||(d==="bottom"||d==="ideographic")&&(Z+=0),f&&(j+=f),g&&(Z+=g),{cx:j,cy:Z,hwidth:R,hheight:B}}}])}(),Pv=function(){function r(){q(this,r)}return Ee(r,[{key:"update",value:function(e,t){return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),Yx=function(){function r(){q(this,r)}return Ee(r,[{key:"update",value:function(e,t){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s,l=e.width,u=l===void 0?0:l,c=e.height,d=c===void 0?0:c;return{cx:a+u/2,cy:o+d/2,hwidth:u/2,hheight:d/2}}}])}();function Qw(r){return!!r.type}var t_=function(){function r(n){q(this,r),this.eventPhase=r.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new fi,this.page=new fi,this.canvas=new fi,this.viewport=new fi,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=n}return Ee(r,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"composedPath",value:function(){return this.manager&&(!this.path||this.path[0]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}},{key:"propagationPath",get:function(){return this.composedPath()}},{key:"preventDefault",value:function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}},{key:"stopImmediatePropagation",value:function(){this.propagationImmediatelyStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"initEvent",value:function(){}},{key:"initUIEvent",value:function(){}},{key:"clone",value:function(){throw new Error(Si)}}])}(),k0=function(r){function n(){var e;q(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=ht(this,n,[].concat(i)),e.client=new fi,e.movement=new fi,e.offset=new fi,e.global=new fi,e.screen=new fi,e}return Ve(n,r),Ee(n,[{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(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)}},{key:"initMouseEvent",value:function(){throw new Error(Si)}}])}(t_),Zx=function(r){function n(){var e;q(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=ht(this,n,[].concat(i)),e.width=0,e.height=0,e.isPrimary=!1,e}return Ve(n,r),Ee(n,[{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)}}])}(k0),Xx=function(r){function n(){return q(this,n),ht(this,n,arguments)}return Ve(n,r),Ee(n,[{key:"clone",value:function(){return this.manager.cloneWheelEvent(this)}}])}(k0),Nv=function(r){function n(e,t){var i;return q(this,n),i=ht(this,n,[null]),i.type=e,i.detail=t,Object.assign(i,t),i}return Ve(n,r),Ee(n)}(t_),sO=new WeakMap,tz=function(){function r(){q(this,r),this.emitter=new Se.Z}return Ee(r,[{key:"on",value:function(e,t,i){return this.addEventListener(e,t,i),this}},{key:"addEventListener",value:function(e,t,i){var a=!1,s=!1;if((0,je.Z)(i))a=i;else if(i){var o=i.capture;a=o===void 0?!1:o;var l=i.once;s=l===void 0?!1:l}a&&(e+="capture"),t=(0,Be.Z)(t)?t:t.handleEvent;var u=(0,Be.Z)(t)?void 0:t;return s?this.emitter.once(e,t,u):this.emitter.on(e,t,u),this}},{key:"off",value:function(e,t,i){return e?this.removeEventListener(e,t,i):this.removeAllEventListeners(),this}},{key:"removeAllEventListeners",value:function(){var e;(e=this.emitter)===null||e===void 0||e.removeAllListeners()}},{key:"removeEventListener",value:function(e,t,i){var a;if(!this.emitter)return this;var s=(0,je.Z)(i)?i:i==null?void 0:i.capture;s&&(e+="capture"),t=(0,Be.Z)(t)?t:(a=t)===null||a===void 0?void 0:a.handleEvent;var o=(0,Be.Z)(t)?void 0:t;return this.emitter.off(e,t,o),this}},{key:"emit",value:function(e,t){this.dispatchEvent(new Nv(e,t))}},{key:"dispatchEvent",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=sO.get(this);if(!i){var a;this.document?i=this:this.defaultView?i=this.defaultView:i=(a=this.ownerDocument)===null||a===void 0?void 0:a.defaultView,i&&sO.set(this,i)}if(i){if(e.manager=i.getEventService(),!e.manager)return!1;e.defaultPrevented=!1,e.path?e.path.length=0:e.page=[],t||(e.target=this),e.manager.dispatchEvent(e,e.type,t)}else this.emitter.emit(e.type,e);return!e.defaultPrevented}}])}(),Rm=function(r){function n(){var e;q(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=ht(this,n,[].concat(i)),e.shadow=!1,e.ownerDocument=null,e.isConnected=!1,e.baseURI="",e.childNodes=[],e.nodeType=0,e.nodeName="",e.nodeValue=null,e.parentNode=null,e}return Ve(n,r),Ee(n,[{key:"textContent",get:function(){var t="";this.nodeName===zt.TEXT&&(t+=this.style.text);var i=Ot(this.childNodes),a;try{for(i.s();!(a=i.n()).done;){var s=a.value;s.nodeName===zt.TEXT?t+=s.nodeValue:t+=s.textContent}}catch(o){i.e(o)}finally{i.f()}return t},set:function(t){var i=this;this.childNodes.slice().forEach(function(a){i.removeChild(a)}),this.nodeName===zt.TEXT&&(this.style.text="".concat(t))}},{key:"getRootNode",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this}},{key:"hasChildNodes",value:function(){return this.childNodes.length>0}},{key:"isDefaultNamespace",value:function(t){throw new Error(Si)}},{key:"lookupNamespaceURI",value:function(t){throw new Error(Si)}},{key:"lookupPrefix",value:function(t){throw new Error(Si)}},{key:"normalize",value:function(){throw new Error(Si)}},{key:"isEqualNode",value:function(t){return this===t}},{key:"isSameNode",value:function(t){return this.isEqualNode(t)}},{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(t){if(t===this)return 0;for(var i=t,a=this,s=[i],o=[a];(l=i.parentNode)!==null&&l!==void 0?l:a.parentNode;){var l;i=i.parentNode?(s.push(i.parentNode),i.parentNode):i,a=a.parentNode?(o.push(a.parentNode),a.parentNode):a}if(i!==a)return n.DOCUMENT_POSITION_DISCONNECTED|n.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|n.DOCUMENT_POSITION_PRECEDING;var u=s.length>o.length?s:o,c=u===s?o:s;if(u[u.length-c.length]===c[0])return u===s?n.DOCUMENT_POSITION_CONTAINED_BY|n.DOCUMENT_POSITION_FOLLOWING:n.DOCUMENT_POSITION_CONTAINS|n.DOCUMENT_POSITION_PRECEDING;for(var d=u.length-c.length,h=c.length-1;h>=0;h--){var f=c[h],v=u[d+h];if(v!==f){var g=f.parentNode.childNodes;return g.indexOf(f)<g.indexOf(v)?c===s?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING:u===s?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING}}return n.DOCUMENT_POSITION_FOLLOWING}},{key:"contain",value:function(t){return this.contains(t)}},{key:"contains",value:function(t){for(var i=t;i&&this!==i;)i=i.parentNode;return!!i}},{key:"getAncestor",value:function(t){for(var i=this;t>0&&i;)i=i.parentNode,t--;return i}},{key:"forEach",value:function(t){for(var i=[this];i.length>0;){var a=i.pop(),s=t(a);if(s===!1)break;for(var o=a.childNodes.length-1;o>=0;o--)i.push(a.childNodes[o])}}}],[{key:"isNode",value:function(t){return!!t.childNodes}}])}(tz);Rm.DOCUMENT_POSITION_DISCONNECTED=1,Rm.DOCUMENT_POSITION_PRECEDING=2,Rm.DOCUMENT_POSITION_FOLLOWING=4,Rm.DOCUMENT_POSITION_CONTAINS=8,Rm.DOCUMENT_POSITION_CONTAINED_BY=16,Rm.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;var i2e=2048,a2e=null,nz=function(){function r(){q(this,r)}return Ee(r,[{key:"getOrCreateCanvas",value:function(e,t){if(this.canvas)return this.canvas;if(e||wa.offscreenCanvas)this.canvas=e||wa.offscreenCanvas,this.context=this.canvas.getContext("2d",re({willReadFrequently:!0},t));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",re({willReadFrequently:!0},t)),(!this.context||!this.context.measureText)&&(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(i){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",re({willReadFrequently:!0},t))}return this.canvas.width=10,this.canvas.height=10,this.canvas}},{key:"getOrCreateContext",value:function(e,t){return this.context?this.context:(this.getOrCreateCanvas(e,t),this.context)}}],[{key:"createCanvas",value:function(){try{return new window.OffscreenCanvas(0,0)}catch(e){}try{return document.createElement("canvas")}catch(e){}return null}}])}(),s2e=function(r){return r[r.CAMERA_CHANGED=0]="CAMERA_CHANGED",r[r.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",r[r.NONE=2]="NONE",r}({}),o2e=null,rz=/\[\s*(.*)=(.*)\s*\]/,iz=function(){function r(){q(this,r)}return Ee(r,[{key:"selectOne",value:function(e,t){var i=this;if(e.startsWith("."))return t.find(function(l){return((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(e))>-1});if(e.startsWith("#"))return t.find(function(l){return l.id===i.getIdOrClassname(e)});if(e.startsWith("[")){var a=this.getAttribute(e),s=a.name,o=a.value;return s?t.find(function(l){return t!==l&&(s==="name"?l.name===o:i.attributeToString(l,s)===o)}):null}return t.find(function(l){return t!==l&&l.nodeName===e})}},{key:"selectAll",value:function(e,t){var i=this;if(e.startsWith("."))return t.findAll(function(l){return t!==l&&((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(e))>-1});if(e.startsWith("#"))return t.findAll(function(l){return t!==l&&l.id===i.getIdOrClassname(e)});if(e.startsWith("[")){var a=this.getAttribute(e),s=a.name,o=a.value;return s?t.findAll(function(l){return t!==l&&(s==="name"?l.name===o:i.attributeToString(l,s)===o)}):[]}return t.findAll(function(l){return t!==l&&l.nodeName===e})}},{key:"is",value:function(e,t){if(e.startsWith("."))return t.className===this.getIdOrClassname(e);if(e.startsWith("#"))return t.id===this.getIdOrClassname(e);if(e.startsWith("[")){var i=this.getAttribute(e),a=i.name,s=i.value;return a==="name"?t.name===s:this.attributeToString(t,a)===s}return t.nodeName===e}},{key:"getIdOrClassname",value:function(e){return e.substring(1)}},{key:"getAttribute",value:function(e){var t=e.match(rz),i="",a="";return t&&t.length>2&&(i=t[1].replace(/"/g,""),a=t[2].replace(/"/g,"")),{name:i,value:a}}},{key:"attributeToString",value:function(e,t){if(!e.getAttribute)return"";var i=e.getAttribute(t);return(0,xe.Z)(i)?"":i.toString?i.toString():""}}])}(),mu=function(r){return r.REPARENT="reparent",r.DESTROY="destroy",r.ATTR_MODIFIED="DOMAttrModified",r.INSERTED="DOMNodeInserted",r.REMOVED="removed",r.MOUNTED="DOMNodeInsertedIntoDocument",r.UNMOUNTED="DOMNodeRemovedFromDocument",r.BOUNDS_CHANGED="bounds-changed",r.CULLED="culled",r}({}),Pf=function(r){function n(e,t,i,a,s,o,l,u){var c;return q(this,n),c=ht(this,n,[null]),c.relatedNode=t,c.prevValue=i,c.newValue=a,c.attrName=s,c.attrChange=o,c.prevParsedValue=l,c.newParsedValue=u,c.type=e,c}return Ve(n,r),Ee(n)}(t_);Pf.ADDITION=2,Pf.MODIFICATION=1,Pf.REMOVAL=3;function oO(r){var n=r.renderable;n&&(n.renderBoundsDirty=!0,n.boundsDirty=!0)}var az=new Pf(mu.REPARENT,null,"","","",0,"",""),sz=ot.Ue(),Kx=E.Ue(),oz=E.al(1,1,1),lz=L.create(),uz=ot.Ue(),og=E.Ue(),Am=L.create(),lg=X.Ue(),cz=E.Ue(),dz=X.Ue(),hz=E.Ue(),w0=E.Ue(),n_=E.Ue(),Jx=L.create(),lO=X.Ue(),uO=X.Ue(),Qx=X.Ue(),qw={affectChildren:!0},fz=function(){function r(n){q(this,r),this.pendingEvents=new Map,this.boundsChangedEvent=new Nv(mu.BOUNDS_CHANGED),this.displayObjectDependencyMap=new WeakMap,this.runtime=n}return Ee(r,[{key:"matches",value:function(e,t){return this.runtime.sceneGraphSelector.is(e,t)}},{key:"querySelector",value:function(e,t){return this.runtime.sceneGraphSelector.selectOne(e,t)}},{key:"querySelectorAll",value:function(e,t){return this.runtime.sceneGraphSelector.selectAll(e,t)}},{key:"attach",value:function(e,t,i){var a,s=!1;e.parentNode&&(s=e.parentNode!==t,this.detach(e));var o=e.nodeName===zt.FRAGMENT,l=_u(t);e.parentNode=t;var u=o?e.childNodes:[e];(0,pe.Z)(i)?u.forEach(function(f){t.childNodes.splice(i,0,f),f.parentNode=t}):u.forEach(function(f){t.childNodes.push(f),f.parentNode=t});var c=t,d=c.sortable;if((d!=null&&(a=d.sorted)!==null&&a!==void 0&&a.length||e.parsedStyle.zIndex)&&(d.dirtyChildren.indexOf(e)===-1&&d.dirtyChildren.push(e),d.dirty=!0,d.dirtyReason=Sh.ADDED),!l){if(o)this.dirtifyFragment(e);else{var h=e.transformable;h&&this.dirtifyWorld(e,h)}s&&e.dispatchEvent(az)}}},{key:"detach",value:function(e){if(e.parentNode){var t,i,a=e.transformable,s=e.parentNode,o=s.sortable;(o!=null&&(t=o.sorted)!==null&&t!==void 0&&t.length||(i=e.style)!==null&&i!==void 0&&i.zIndex)&&(o.dirtyChildren.indexOf(e)===-1&&o.dirtyChildren.push(e),o.dirty=!0,o.dirtyReason=Sh.REMOVED);var l=e.parentNode.childNodes.indexOf(e);l>-1&&e.parentNode.childNodes.splice(l,1),a&&this.dirtifyWorld(e,a),e.parentNode=null}}},{key:"getOrigin",value:function(e){return e.getGeometryBounds(),e.transformable.origin}},{key:"setOrigin",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=[t,i,a]);var s=e.transformable;if(!(t[0]===s.origin[0]&&t[1]===s.origin[1]&&t[2]===s.origin[2])){var o=s.origin;o[0]=t[0],o[1]=t[1],o[2]=t[2]||0,this.dirtifyLocal(e,s)}}},{key:"rotate",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;if(e.parentNode===null||!e.parentNode.transformable)this.rotateLocal(e,t);else{var o=lg;X.Su(o,t[0],t[1],t[2]);var l=this.getRotation(e),u=this.getRotation(e.parentNode);X.JG(Qx,u),X.U_(Qx,Qx),X.Jp(o,Qx,o),X.Jp(s.localRotation,o,l),X.Fv(s.localRotation,s.localRotation),this.dirtifyLocal(e,s)}}},{key:"rotateLocal",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;X.Su(uO,t[0],t[1],t[2]),X.dC(s.localRotation,s.localRotation,uO),this.dirtifyLocal(e,s)}},{key:"setEulerAngles",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;if(e.parentNode===null||!e.parentNode.transformable)this.setLocalEulerAngles(e,t);else{X.Su(s.localRotation,t[0],t[1],t[2]);var o=this.getRotation(e.parentNode);X.JG(lO,X.U_(lg,o)),X.dC(s.localRotation,s.localRotation,lO),this.dirtifyLocal(e,s)}}},{key:"setLocalEulerAngles",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;typeof t=="number"&&(t=E.al(t,i,a));var o=e.transformable;X.Su(o.localRotation,t[0],t[1],t[2]),s&&this.dirtifyLocal(e,o)}},{key:"translateLocal",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;E.fS(t,Kx)||(E.VC(t,t,s.localRotation),E.IH(s.localPosition,s.localPosition,t),this.dirtifyLocal(e,s))}},{key:"setPosition",value:function(e,t){var i,a=e.transformable;if(n_[0]=t[0],n_[1]=t[1],n_[2]=(i=t[2])!==null&&i!==void 0?i:0,!E.fS(this.getPosition(e),n_)){if(E.JG(a.position,n_),e.parentNode===null||!e.parentNode.transformable)E.JG(a.localPosition,n_);else{var s=e.parentNode.transformable;L.copy(Jx,s.worldTransform),L.invert(Jx,Jx),E.fF(a.localPosition,n_,Jx)}this.dirtifyLocal(e,a)}}},{key:"setLocalPosition",value:function(e,t){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=e.transformable;w0[0]=t[0],w0[1]=t[1],w0[2]=(i=t[2])!==null&&i!==void 0?i:0,!E.fS(s.localPosition,w0)&&(E.JG(s.localPosition,w0),a&&this.dirtifyLocal(e,s))}},{key:"scaleLocal",value:function(e,t){var i,a=e.transformable;E.Jp(a.localScale,a.localScale,E.t8(og,t[0],t[1],(i=t[2])!==null&&i!==void 0?i:1)),this.dirtifyLocal(e,a)}},{key:"setLocalScale",value:function(e,t){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=e.transformable;E.t8(og,t[0],t[1],(i=t[2])!==null&&i!==void 0?i:s.localScale[2]),!E.fS(og,s.localScale)&&(E.JG(s.localScale,og),a&&this.dirtifyLocal(e,s))}},{key:"translate",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.t8(og,t,i,a)),!E.fS(t,Kx)&&(E.IH(og,this.getPosition(e),t),this.setPosition(e,og))}},{key:"setRotation",value:function(e,t,i,a,s){var o=e.transformable;if(typeof t=="number"&&(t=X.al(t,i,a,s)),e.parentNode===null||!e.parentNode.transformable)this.setLocalRotation(e,t);else{var l=this.getRotation(e.parentNode);X.JG(lg,l),X.U_(lg,lg),X.Jp(o.localRotation,lg,t),X.Fv(o.localRotation,o.localRotation),this.dirtifyLocal(e,o)}}},{key:"setLocalRotation",value:function(e,t,i,a,s){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;typeof t=="number"&&(t=X.t8(lg,t,i,a,s));var l=e.transformable;X.JG(l.localRotation,t),o&&this.dirtifyLocal(e,l)}},{key:"setLocalSkew",value:function(e,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;typeof t=="number"&&(t=ot.t8(uz,t,i));var s=e.transformable;ot.JG(s.localSkew,t),a&&this.dirtifyLocal(e,s)}},{key:"dirtifyLocal",value:function(e,t){_u(e)||t.localDirtyFlag||(t.localDirtyFlag=!0,t.dirtyFlag||this.dirtifyWorld(e,t))}},{key:"dirtifyWorld",value:function(e,t){t.dirtyFlag||this.unfreezeParentToRoot(e),this.dirtifyWorldInternal(e,t),this.dirtifyToRoot(e,!0)}},{key:"dirtifyFragment",value:function(e){var t=e.transformable;t&&(t.frozen=!1,t.dirtyFlag=!0,t.localDirtyFlag=!0);var i=e.renderable;i&&(i.renderBoundsDirty=!0,i.boundsDirty=!0,i.dirty=!0);for(var a=e.childNodes.length,s=0;s<a;s++)this.dirtifyFragment(e.childNodes[s]);e.nodeName===zt.FRAGMENT&&this.pendingEvents.set(e,!1)}},{key:"triggerPendingEvents",value:function(){var e=this,t=new Set,i=function(s,o){!s.isConnected||t.has(s)||s.nodeName===zt.FRAGMENT||(e.boundsChangedEvent.detail=o,e.boundsChangedEvent.target=s,s.isMutationObserved?s.dispatchEvent(e.boundsChangedEvent):s.ownerDocument.defaultView.dispatchEvent(e.boundsChangedEvent,!0),t.add(s))};this.pendingEvents.forEach(function(a,s){s.nodeName!==zt.FRAGMENT&&(qw.affectChildren=a,a?s.forEach(function(o){i(o,qw)}):i(s,qw))}),t.clear(),this.clearPendingEvents()}},{key:"clearPendingEvents",value:function(){this.pendingEvents.clear()}},{key:"dirtifyToRoot",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=e;for(i.renderable&&(i.renderable.dirty=!0);i;)oO(i),i=i.parentNode;t&&e.forEach(function(a){oO(a)}),this.informDependentDisplayObjects(e),this.pendingEvents.set(e,t)}},{key:"updateDisplayObjectDependency",value:function(e,t,i,a){if(t&&t!==i){var s=this.displayObjectDependencyMap.get(t);if(s&&s[e]){var o=s[e].indexOf(a);s[e].splice(o,1)}}if(i){var l=this.displayObjectDependencyMap.get(i);l||(this.displayObjectDependencyMap.set(i,{}),l=this.displayObjectDependencyMap.get(i)),l[e]||(l[e]=[]),l[e].push(a)}}},{key:"informDependentDisplayObjects",value:function(e){var t=this,i=this.displayObjectDependencyMap.get(e);i&&Object.keys(i).forEach(function(a){i[a].forEach(function(s){t.dirtifyToRoot(s,!0),s.dispatchEvent(new Pf(mu.ATTR_MODIFIED,s,t,t,a,Pf.MODIFICATION,t,t)),s.isCustomElement&&s.isConnected&&s.attributeChangedCallback&&s.attributeChangedCallback(a,t,t)})})}},{key:"getPosition",value:function(e){var t=e.transformable;return L.getTranslation(t.position,this.getWorldTransform(e,t))}},{key:"getRotation",value:function(e){var t=e.transformable;return L.getRotation(t.rotation,this.getWorldTransform(e,t))}},{key:"getScale",value:function(e){var t=e.transformable;return L.getScaling(t.scaling,this.getWorldTransform(e,t))}},{key:"getWorldTransform",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.transformable;return!t.localDirtyFlag&&!t.dirtyFlag||(e.parentNode&&e.parentNode.transformable&&this.getWorldTransform(e.parentNode),this.sync(e,t)),t.worldTransform}},{key:"getLocalPosition",value:function(e){return e.transformable.localPosition}},{key:"getLocalRotation",value:function(e){return e.transformable.localRotation}},{key:"getLocalScale",value:function(e){return e.transformable.localScale}},{key:"getLocalSkew",value:function(e){return e.transformable.localSkew}},{key:"calcLocalTransform",value:function(e){var t=e.localSkew[0]!==0||e.localSkew[1]!==0;if(t){L.fromRotationTranslationScaleOrigin(e.localTransform,e.localRotation,e.localPosition,E.al(1,1,1),e.origin),(e.localSkew[0]!==0||e.localSkew[1]!==0)&&(L.identity(Am),Am[4]=Math.tan(e.localSkew[0]),Am[1]=Math.tan(e.localSkew[1]),L.multiply(e.localTransform,e.localTransform,Am));var i=L.fromRotationTranslationScaleOrigin(Am,X.t8(lg,0,0,0,1),E.t8(og,1,1,1),e.localScale,e.origin);L.multiply(e.localTransform,e.localTransform,i)}else{var a=e.localTransform,s=e.localPosition,o=e.localRotation,l=e.localScale,u=e.origin,c=s[0]!==0||s[1]!==0||s[2]!==0,d=o[3]!==1||o[0]!==0||o[1]!==0||o[2]!==0,h=l[0]!==1||l[1]!==1||l[2]!==1,f=u[0]!==0||u[1]!==0||u[2]!==0;!d&&!h&&!f?c?L.fromTranslation(a,s):L.identity(a):L.fromRotationTranslationScaleOrigin(a,o,s,l,u)}}},{key:"getLocalTransform",value:function(e){var t=e.transformable;return t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.localTransform}},{key:"setLocalTransform",value:function(e,t){var i=L.getTranslation(cz,t),a=L.getRotation(dz,t),s=L.getScaling(hz,t);this.setLocalScale(e,s,!1),this.setLocalPosition(e,i,!1),this.setLocalRotation(e,a,void 0,void 0,void 0,!1),this.dirtifyLocal(e,e.transformable)}},{key:"resetLocalTransform",value:function(e){this.setLocalScale(e,oz,!1),this.setLocalPosition(e,Kx,!1),this.setLocalEulerAngles(e,Kx,void 0,void 0,!1),this.setLocalSkew(e,sz,void 0,!1),this.dirtifyLocal(e,e.transformable)}},{key:"getTransformedGeometryBounds",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2?arguments[2]:void 0,a=this.getGeometryBounds(e,t);if(!yn.isEmpty(a)){var s=i||new yn;return s.setFromTransformedAABB(a,this.getWorldTransform(e)),s}return null}},{key:"getGeometryBounds",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=e,a=i.geometry;a.dirty&&wa.styleValueRegistry.updateGeometry(e);var s=t?a.renderBounds:a.contentBounds||null;return s||new yn}},{key:"getBounds",value:function(e){var t=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=e,s=a.renderable;if(!s.boundsDirty&&!i&&s.bounds)return s.bounds;if(!s.renderBoundsDirty&&i&&s.renderBounds)return s.renderBounds;var o=i?s.renderBounds:s.bounds,l=this.getTransformedGeometryBounds(e,i,o),u=e.childNodes;if(u.forEach(function(h){var f=t.getBounds(h,i);f&&(l?l.add(f):(l=o||new yn,l.update(f.center,f.halfExtents)))}),l||(l=new yn),i){var c=Ou(e);if(c){var d=c.parsedStyle.clipPath.getBounds(i);l?d&&(l=d.intersection(l)):l.update(d.center,d.halfExtents)}}return i?(s.renderBounds=l,s.renderBoundsDirty=!1):(s.bounds=l,s.boundsDirty=!1),l}},{key:"getLocalBounds",value:function(e){if(e.parentNode){var t=lz;e.parentNode.transformable&&(t=L.invert(Am,this.getWorldTransform(e.parentNode)));var i=this.getBounds(e);if(!yn.isEmpty(i)){var a=new yn;return a.setFromTransformedAABB(i,t),a}}return this.getBounds(e)}},{key:"getBoundingClientRect",value:function(e){var t,i,a=this.getGeometryBounds(e);yn.isEmpty(a)||(i=new yn,i.setFromTransformedAABB(a,this.getWorldTransform(e)));var s=(t=e.ownerDocument)===null||t===void 0||(t=t.defaultView)===null||t===void 0?void 0:t.getContextService().getBoundingClientRect();if(i){var o=i.getMin(),l=Qe(o,2),u=l[0],c=l[1],d=i.getMax(),h=Qe(d,2),f=h[0],v=h[1];return new ai(u+((s==null?void 0:s.left)||0),c+((s==null?void 0:s.top)||0),f-u,v-c)}return new ai((s==null?void 0:s.left)||0,(s==null?void 0:s.top)||0,0,0)}},{key:"dirtifyWorldInternal",value:function(e,t){var i=this;if(!t.dirtyFlag){t.dirtyFlag=!0,t.frozen=!1,e.childNodes.forEach(function(o){var l=o.transformable;l.dirtyFlag||i.dirtifyWorldInternal(o,l)});var a=e,s=a.renderable;s&&(s.renderBoundsDirty=!0,s.boundsDirty=!0,s.dirty=!0)}}},{key:"syncHierarchy",value:function(e){var t=e.transformable;if(!t.frozen){t.frozen=!0,(t.localDirtyFlag||t.dirtyFlag)&&this.sync(e,t);for(var i=e.childNodes,a=0;a<i.length;a++)this.syncHierarchy(i[a])}}},{key:"sync",value:function(e,t){if(t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.dirtyFlag){var i=e.parentNode,a=i&&i.transformable;i===null||!a?L.copy(t.worldTransform,t.localTransform):L.multiply(t.worldTransform,a.worldTransform,t.localTransform),t.dirtyFlag=!1}}},{key:"unfreezeParentToRoot",value:function(e){for(var t=e.parentNode;t;){var i=t.transformable;i&&(i.frozen=!1),t=t.parentNode}}}])}(),r_={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]},cO=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,vz=/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/,gz=/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/,_z=/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/,mz=/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/,pz=/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/,yz=/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/,xz=/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/,Ez=/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/,bz=new RegExp("".concat(vz.source,"|").concat(_z.source,"|").concat(pz.source,"|").concat(xz.source)),kz=new RegExp("".concat(gz.source,"|").concat(mz.source,"|").concat(yz.source,"|").concat(Ez.source)),wz=function(){function r(n){var e=this;q(this,r),this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,i){return e.isBreakingSpace(i)?!1:!!(t&&(kz.exec(i)||bz.exec(t)))},this.trimByKinsokuShorui=function(t){var i=lt(t),a=i[i.length-2];if(!a)return t;var s=a[a.length-1];return i[i.length-2]=a.slice(0,-1),i[i.length-1]=s+i[i.length-1],i},this.runtime=n}return Ee(r,[{key:"measureFont",value:function(e,t){if(this.fontMetricsCache[e])return this.fontMetricsCache[e];var i={ascent:0,descent:0,fontSize:0},a=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(t),s=this.runtime.offscreenCanvasCreator.getOrCreateContext(t,{willReadFrequently:!0});s.font=e;var o=r_.MetricsString+r_.BaselineSymbol,l=Math.ceil(s.measureText(o).width),u=Math.ceil(s.measureText(r_.BaselineSymbol).width),c=r_.HeightMultiplier*u;u=u*r_.BaselineMultiplier|0,a.width=l,a.height=c,s.fillStyle="#f00",s.fillRect(0,0,l,c),s.font=e,s.textBaseline="alphabetic",s.fillStyle="#000",s.fillText(o,0,u);var d=s.getImageData(0,0,l||1,c||1).data,h=d.length,f=l*4,v=0,g=0,m=!1;for(v=0;v<u;++v){for(var y=0;y<f;y+=4)if(d[g+y]!==255){m=!0;break}if(!m)g+=f;else break}for(i.ascent=u-v,g=h-f,m=!1,v=c;v>u;--v){for(var w=0;w<f;w+=4)if(d[g+w]!==255){m=!0;break}if(!m)g-=f;else break}return i.descent=v-u,i.fontSize=i.ascent+i.descent,this.fontMetricsCache[e]=i,i}},{key:"measureText",value:function(e,t,i){var a=t.fontSize,s=a===void 0?16:a,o=t.wordWrap,l=o===void 0?!1:o,u=t.lineHeight,c=t.lineWidth,d=c===void 0?1:c,h=t.textBaseline,f=h===void 0?"alphabetic":h,v=t.textAlign,g=v===void 0?"start":v,m=t.letterSpacing,y=m===void 0?0:m,w=t.textPath;t.textPathSide,t.textPathStartOffset;var T=t.leading,G=T===void 0?0:T,x=Au(t),_=this.measureFont(x,i);_.fontSize===0&&(_.fontSize=s,_.ascent=s);var p=this.runtime.offscreenCanvasCreator.getOrCreateContext(i);p.font=x,t.isOverflowing=!1;var b=l?this.wordWrap(e,t,i):e,R=b.split(/(?:\r\n|\r|\n)/),B=new Array(R.length),j=0;if(w){w.getTotalLength();for(var Z=0;Z<R.length;Z++)p.measureText(R[Z]).width+(R[Z].length-1)*y}else{for(var te=0;te<R.length;te++){var le=p.measureText(R[te]).width+(R[te].length-1)*y;B[te]=le,j=Math.max(j,le)}var ue=j+d,se=u||_.fontSize+d,V=Math.max(se,_.fontSize+d)+(R.length-1)*(se+G);se+=G;var ee=0;return f==="middle"?ee=-V/2:f==="bottom"||f==="alphabetic"||f==="ideographic"?ee=-V:(f==="top"||f==="hanging")&&(ee=0),{font:x,width:ue,height:V,lines:R,lineWidths:B,lineHeight:se,maxLineWidth:j,fontProperties:_,lineMetrics:B.map(function(he,ut){var ct=0;return g==="center"||g==="middle"?ct-=he/2:(g==="right"||g==="end")&&(ct-=he),new ai(ct-d/2,ee+ut*se,he+d,se)})}}}},{key:"setGraphemeOnPath",value:function(){}},{key:"wordWrap",value:function(e,t,i){var a=this,s=t.wordWrapWidth,o=s===void 0?0:s,l=t.letterSpacing,u=l===void 0?0:l,c=t.maxLines,d=c===void 0?1/0:c,h=t.textOverflow,f=this.runtime.offscreenCanvasCreator.getOrCreateContext(i),v=o+u,g="";h==="ellipsis"?g="...":h&&h!=="clip"&&(g=h);for(var m=[],y=0,w=0,T={},G=function(ee){return a.getFromCache(ee,u,T,f)},x=Array.from(g).reduce(function(V,ee){return V+G(ee)},0),_=Array.from(e),p=0;p<_.length;p++){var b=_[p],R=e[p-1],B=e[p+1],j=G(b);if(this.isNewline(b)){if(y++,y>=d){t.isOverflowing=!0;break}w=0,m[y]="";continue}if(w>0&&w+j>v){if(y+1>=d){if(t.isOverflowing=!0,x>0&&x<=v){for(var Z=m[y].length,te=0,le=Z,ue=0;ue<Z;ue++){var se=G(m[y][ue]);if(te+se+x>v){le=ue;break}te+=se}m[y]=(m[y]||"").slice(0,le)+g}break}if(y++,w=0,m[y]="",this.isBreakingSpace(b))continue;this.canBreakInLastChar(b)||(m=this.trimToBreakable(m),w=this.sumTextWidthByCache(m[y]||"",T)),this.shouldBreakByKinsokuShorui(b,B)&&(m=this.trimByKinsokuShorui(m),w+=G(R||""))}w+=j,m[y]=(m[y]||"")+b}return m.join(`
|
|
|
`)}},{key:"isBreakingSpace",value:function(e){return typeof e!="string"?!1:r_.BreakingSpaces.indexOf(e.charCodeAt(0))>=0}},{key:"isNewline",value:function(e){return typeof e!="string"?!1:r_.Newlines.indexOf(e.charCodeAt(0))>=0}},{key:"trimToBreakable",value:function(e){var t=lt(e),i=t[t.length-2],a=this.findBreakableIndex(i);if(a===-1||!i)return t;var s=i.slice(a,a+1),o=this.isBreakingSpace(s),l=a+1,u=a+(o?0:1);return t[t.length-1]+=i.slice(l,i.length),t[t.length-2]=i.slice(0,u),t}},{key:"canBreakInLastChar",value:function(e){return!(e&&cO.test(e))}},{key:"sumTextWidthByCache",value:function(e,t){return e.split("").reduce(function(i,a){if(!t[a])throw Error("cannot count the word without cache");return i+t[a]},0)}},{key:"findBreakableIndex",value:function(e){for(var t=e.length-1;t>=0;t--)if(!cO.test(e[t]))return t;return-1}},{key:"getFromCache",value:function(e,t,i,a){var s=i[e];if(typeof s!="number"){var o=e.length*t;s=a.measureText(e).width+o,i[e]=s}return s}}])}(),wa={},Sz=function(r){var n=new bl,e=new oc;return r={},Me(Me(Me(Me(Me(Me(Me(Me(Me(Me(r,zt.CIRCLE,new Nm),zt.ELLIPSE,new Nh),zt.RECT,n),zt.IMAGE,n),zt.GROUP,new Pv),zt.LINE,new Om),zt.TEXT,new $d(wa)),zt.POLYLINE,e),zt.POLYGON,e),zt.PATH,new ws),Me(Me(r,zt.HTML,new Yx),zt.MESH,null)}(),Tz=function(r){var n=new _r,e=new qr;return r={},Me(Me(Me(Me(Me(Me(Me(Me(Me(Me(r,Tn.PERCENTAGE,null),Tn.NUMBER,new Xa),Tn.ANGLE,new ir),Tn.DEFINED_PATH,new pr),Tn.PAINT,n),Tn.COLOR,n),Tn.FILTER,new si),Tn.LENGTH,e),Tn.LENGTH_PERCENTAGE,e),Tn.LENGTH_PERCENTAGE_12,new Hi),Me(Me(Me(Me(Me(Me(Me(Me(Me(Me(r,Tn.LENGTH_PERCENTAGE_14,new Ri),Tn.COORDINATE,new qr),Tn.OFFSET_DISTANCE,new va),Tn.OPACITY_VALUE,new da),Tn.PATH,new Ua),Tn.LIST_OF_POINTS,new ja),Tn.SHADOW_BLUR,new La),Tn.TEXT,new hr),Tn.TEXT_TRANSFORM,new Qr),Tn.TRANSFORM,new Xw),Me(Me(Me(r,Tn.TRANSFORM_ORIGIN,new Kw),Tn.Z_INDEX,new Jw),Tn.MARKER,new ci)}(),Cz=function(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof k.g!="undefined"?k.g:{}};wa.CameraContribution=wh,wa.AnimationTimeline=null,wa.EasingFunction=null,wa.offscreenCanvasCreator=new nz,wa.sceneGraphSelector=new iz,wa.sceneGraphService=new fz(wa),wa.textService=new wz(wa),wa.geometryUpdaterFactory=Sz,wa.CSSPropertySyntaxFactory=Tz,wa.styleValueRegistry=new wn(wa),wa.layoutRegistry=null,wa.globalThis=Cz(),wa.enableStyleSyntax=!0,wa.enableSizeAttenuation=!1;var Mz=0;function l2e(){Mz=0}var u2e=new Pf(mu.INSERTED,null,"","","",0,"",""),c2e=new Pf(mu.REMOVED,null,"","","",0,"",""),d2e=new Nv(mu.DESTROY),h2e=null;function f2e(r){return!!(r!=null&&r.nodeName)}var v2e=wa.globalThis.Proxy?wa.globalThis.Proxy:function(){},g2e=new Pf(mu.ATTR_MODIFIED,null,null,null,null,Pf.MODIFICATION,null,null),_2e=E.Ue(),m2e=X.Ue(),p2e=null,y2e=null,x2e=null,E2e=null,b2e=null,k2e=null,w2e=null,S2e=null,T2e=null,C2e=null,M2e=null,P2e=null,N2e=null,O2e=null,R2e=null,A2e=null,L2e=null,I2e=null,D2e=null,F2e=null,B2e=null,$2e=null,G2e={number:function(n){return new Ln(n)},percent:function(n){return new Ln(n,"%")},px:function(n){return new Ln(n,"px")},em:function(n){return new Ln(n,"em")},rem:function(n){return new Ln(n,"rem")},deg:function(n){return new Ln(n,"deg")},grad:function(n){return new Ln(n,"grad")},rad:function(n){return new Ln(n,"rad")},turn:function(n){return new Ln(n,"turn")},s:function(n){return new Ln(n,"s")},ms:function(n){return new Ln(n,"ms")},registerProperty:function(n){var e=n.name,t=n.inherits,i=n.interpolable,a=n.initialValue,s=n.syntax;wa.styleValueRegistry.registerMetadata({n:e,inh:t,int:i,d:a,syntax:s})},registerLayout:function(n,e){wa.layoutRegistry.registerLayout(n,e)}},z2e=null,Pz=function(){function r(n){q(this,r),this.strategies=n}return Ee(r,[{key:"apply",value:function(e){var t=e.camera,i=e.renderingService,a=e.renderingContext,s=this.strategies;i.hooks.cull.tap(r.tag,function(o){if(o){var l=o.cullable;return s.length===0?l.visible=a.unculledEntities.indexOf(o.entity)>-1:l.visible=s.every(function(u){return u.isVisible(t,o)}),!o.isCulled()&&o.isVisible()?o:(o.dispatchEvent(new Nv(mu.CULLED)),null)}return o}),i.hooks.afterRender.tap(r.tag,function(o){o.cullable.visibilityPlaneMask=-1})}}])}();Pz.tag="Culling";var Nz=function(){function r(){var n=this;q(this,r),this.autoPreventDefault=!1,this.rootPointerEvent=new Zx(null),this.rootWheelEvent=new Xx(null),this.onPointerMove=function(e){var t,i=(t=n.context.renderingContext.root)===null||t===void 0||(t=t.ownerDocument)===null||t===void 0?void 0:t.defaultView;if(!(i.supportsTouchEvents&&e.pointerType==="touch")){var a=n.normalizeToPointerEvent(e,i),s=Ot(a),o;try{for(s.s();!(o=s.n()).done;){var l=o.value,u=n.bootstrapEvent(n.rootPointerEvent,l,i,e);n.context.eventService.mapEvent(u)}}catch(c){s.e(c)}finally{s.f()}n.setCursor(n.context.eventService.cursor)}},this.onClick=function(e){var t,i=(t=n.context.renderingContext.root)===null||t===void 0||(t=t.ownerDocument)===null||t===void 0?void 0:t.defaultView,a=n.normalizeToPointerEvent(e,i),s=Ot(a),o;try{for(s.s();!(o=s.n()).done;){var l=o.value,u=n.bootstrapEvent(n.rootPointerEvent,l,i,e);n.context.eventService.mapEvent(u)}}catch(c){s.e(c)}finally{s.f()}n.setCursor(n.context.eventService.cursor)}}return Ee(r,[{key:"apply",value:function(e){var t=this;this.context=e;var i=e.renderingService,a=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(s){var o=t.context.renderingService.hooks.pickSync.call({position:s,picked:[],topmost:!0}),l=o.picked;return l[0]||null}),i.hooks.pointerWheel.tap(r.tag,function(s){var o=t.normalizeWheelEvent(s);t.context.eventService.mapEvent(o)}),i.hooks.pointerDown.tap(r.tag,function(s){if(!(a.supportsTouchEvents&&s.pointerType==="touch")){var o=t.normalizeToPointerEvent(s,a);if(t.autoPreventDefault&&o[0].isNormalized){var l=s.cancelable||!("cancelable"in s);l&&s.preventDefault()}var u=Ot(o),c;try{for(u.s();!(c=u.n()).done;){var d=c.value,h=t.bootstrapEvent(t.rootPointerEvent,d,a,s);t.context.eventService.mapEvent(h)}}catch(f){u.e(f)}finally{u.f()}t.setCursor(t.context.eventService.cursor)}}),i.hooks.pointerUp.tap(r.tag,function(s){if(!(a.supportsTouchEvents&&s.pointerType==="touch")){var o=t.context.contextService.getDomElement(),l=t.context.eventService.isNativeEventFromCanvas(o,s),u=l?"":"outside",c=t.normalizeToPointerEvent(s,a),d=Ot(c),h;try{for(d.s();!(h=d.n()).done;){var f=h.value,v=t.bootstrapEvent(t.rootPointerEvent,f,a,s);v.type+=u,t.context.eventService.mapEvent(v)}}catch(g){d.e(g)}finally{d.f()}t.setCursor(t.context.eventService.cursor)}}),i.hooks.pointerMove.tap(r.tag,this.onPointerMove),i.hooks.pointerOver.tap(r.tag,this.onPointerMove),i.hooks.pointerOut.tap(r.tag,this.onPointerMove),i.hooks.click.tap(r.tag,this.onClick),i.hooks.pointerCancel.tap(r.tag,function(s){var o=t.normalizeToPointerEvent(s,a),l=Ot(o),u;try{for(l.s();!(u=l.n()).done;){var c=u.value,d=t.bootstrapEvent(t.rootPointerEvent,c,a,s);t.context.eventService.mapEvent(d)}}catch(h){l.e(h)}finally{l.f()}t.setCursor(t.context.eventService.cursor)})}},{key:"bootstrapEvent",value:function(e,t,i,a){e.view=i,e.originalEvent=null,e.nativeEvent=a,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this.transferMouseData(e,t);var s=this.context.eventService.client2Viewport({x:t.clientX,y:t.clientY}),o=s.x,l=s.y;e.viewport.x=o,e.viewport.y=l;var u=this.context.eventService.viewport2Canvas(e.viewport),c=u.x,d=u.y;return e.canvas.x=c,e.canvas.y=d,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.isTrusted=a.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=Qg[e.type]||e.type),e}},{key:"normalizeWheelEvent",value:function(e){var t=this.rootWheelEvent;this.transferMouseData(t,e),t.deltaMode=e.deltaMode,t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ;var i=this.context.eventService.client2Viewport({x:e.clientX,y:e.clientY}),a=i.x,s=i.y;t.viewport.x=a,t.viewport.y=s;var o=this.context.eventService.viewport2Canvas(t.viewport),l=o.x,u=o.y;return t.canvas.x=l,t.canvas.y=u,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.nativeEvent=e,t.type=e.type,t}},{key:"transferMouseData",value:function(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=Qu.now(),e.type=t.type,e.altKey=t.altKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.ctrlKey=t.ctrlKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.screen.x=t.screenX,e.screen.y=t.screenY,e.relatedTarget=null}},{key:"setCursor",value:function(e){this.context.contextService.applyCursorStyle(e||this.context.config.cursor||"default")}},{key:"normalizeToPointerEvent",value:function(e,t){var i=[];if(t.isTouchEvent(e))for(var a=0;a<e.changedTouches.length;a++){var s=e.changedTouches[a];(0,ie.Z)(s.button)&&(s.button=0),(0,ie.Z)(s.buttons)&&(s.buttons=1),(0,ie.Z)(s.isPrimary)&&(s.isPrimary=e.touches.length===1&&e.type==="touchstart"),(0,ie.Z)(s.width)&&(s.width=s.radiusX||1),(0,ie.Z)(s.height)&&(s.height=s.radiusY||1),(0,ie.Z)(s.tiltX)&&(s.tiltX=0),(0,ie.Z)(s.tiltY)&&(s.tiltY=0),(0,ie.Z)(s.pointerType)&&(s.pointerType="touch"),(0,ie.Z)(s.pointerId)&&(s.pointerId=s.identifier||0),(0,ie.Z)(s.pressure)&&(s.pressure=s.force||.5),(0,ie.Z)(s.twist)&&(s.twist=0),(0,ie.Z)(s.tangentialPressure)&&(s.tangentialPressure=0),s.isNormalized=!0,s.type=e.type,i.push(s)}else if(t.isMouseEvent(e)){var o=e;(0,ie.Z)(o.isPrimary)&&(o.isPrimary=!0),(0,ie.Z)(o.width)&&(o.width=1),(0,ie.Z)(o.height)&&(o.height=1),(0,ie.Z)(o.tiltX)&&(o.tiltX=0),(0,ie.Z)(o.tiltY)&&(o.tiltY=0),(0,ie.Z)(o.pointerType)&&(o.pointerType="mouse"),(0,ie.Z)(o.pointerId)&&(o.pointerId=Ju),(0,ie.Z)(o.pressure)&&(o.pressure=.5),(0,ie.Z)(o.twist)&&(o.twist=0),(0,ie.Z)(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,i.push(o)}else i.push(e);return i}}])}();Nz.tag="Event";var V2e=[zt.CIRCLE,zt.ELLIPSE,zt.IMAGE,zt.RECT,zt.LINE,zt.POLYLINE,zt.POLYGON,zt.TEXT,zt.PATH,zt.HTML],U2e=null,Oz=function(){function r(){q(this,r),this.syncTasks=new Map,this.isFirstTimeRendering=!0,this.syncing=!1,this.isFirstTimeRenderingFinished=!1}return Ee(r,[{key:"apply",value:function(e){var t=this,i,a=e.renderingService,s=e.renderingContext,o=e.rBushRoot,l=s.root.ownerDocument.defaultView;this.rBush=o;var u=function(g){var m=g.target;m.renderable.dirty=!0,a.dirtify()},c=function(g){t.syncTasks.set(g.target,g.detail.affectChildren),a.dirtify()},d=function(g){var m=g.target;wa.enableSizeAttenuation&&wa.styleValueRegistry.updateSizeAttenuation(m,l.getCamera().getZoom())},h=function(g){var m=g.target,y=m.rBushNode;y.aabb&&t.rBush.remove(y.aabb),t.syncTasks.delete(m),wa.sceneGraphService.dirtifyToRoot(m),a.dirtify()};a.hooks.init.tap(r.tag,function(){l.addEventListener(mu.MOUNTED,d),l.addEventListener(mu.UNMOUNTED,h),l.addEventListener(mu.ATTR_MODIFIED,u),l.addEventListener(mu.BOUNDS_CHANGED,c)}),a.hooks.destroy.tap(r.tag,function(){l.removeEventListener(mu.MOUNTED,d),l.removeEventListener(mu.UNMOUNTED,h),l.removeEventListener(mu.ATTR_MODIFIED,u),l.removeEventListener(mu.BOUNDS_CHANGED,c),t.syncTasks.clear()});var f=(i=wa.globalThis.requestIdleCallback)!==null&&i!==void 0?i:qu.bind(wa.globalThis);a.hooks.endFrame.tap(r.tag,function(){t.isFirstTimeRendering?(t.isFirstTimeRendering=!1,t.syncing=!0,f(function(){t.syncRTree(!0),t.isFirstTimeRenderingFinished=!0})):t.syncRTree()})}},{key:"syncNode",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.isConnected){var i=e.rBushNode;i.aabb&&this.rBush.remove(i.aabb);var a=e.getRenderBounds();if(a){var s=e.renderable;t&&(s.dirtyRenderBounds||(s.dirtyRenderBounds=new yn),s.dirtyRenderBounds.update(a.center,a.halfExtents));var o=a.getMin(),l=Qe(o,2),u=l[0],c=l[1],d=a.getMax(),h=Qe(d,2),f=h[0],v=h[1];i.aabb||(i.aabb={}),i.aabb.displayObject=e,i.aabb.minX=u,i.aabb.minY=c,i.aabb.maxX=f,i.aabb.maxY=v}if(i.aabb&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.minX)&&!isNaN(i.aabb.minY))return i.aabb}}},{key:"syncRTree",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!(!t&&(this.syncing||this.syncTasks.size===0))){this.syncing=!0;var i=[],a=new Set,s=function(l){if(!a.has(l)&&l.renderable){var u=e.syncNode(l,t);u&&(i.push(u),a.add(l))}};this.syncTasks.forEach(function(o,l){o&&l.forEach(s);for(var u=l;u;)s(u),u=u.parentElement}),this.rBush.load(i),i.length=0,this.syncing=!1}}}])}();Oz.tag="Prepare";function j2e(r){return!!r.document}var eS=function(r){return r.READY="ready",r.BEFORE_RENDER="beforerender",r.RERENDER="rerender",r.AFTER_RENDER="afterrender",r.BEFORE_DESTROY="beforedestroy",r.AFTER_DESTROY="afterdestroy",r.RESIZE="resize",r.DIRTY_RECTANGLE="dirtyrectangle",r.RENDERER_CHANGED="rendererchanged",r}({}),H2e=500,W2e=.1,Y2e=1e3,Z2e=new Nv(mu.MOUNTED),X2e=new Nv(mu.UNMOUNTED),K2e=new Nv(eS.BEFORE_RENDER),J2e=new Nv(eS.RERENDER),Q2e=new Nv(eS.AFTER_RENDER),q2e=null;var Rz=function(r){function n(){var e;q(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=ht(this,n,[].concat(i)),e.landmarks=[],e}return Ve(n,r),Ee(n,[{key:"rotate",value:function(t,i,a){if(this.relElevation=Ti(i),this.relAzimuth=Ti(t),this.relRoll=Ti(a),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===Va.EXPLORING){var s=X.yY(X.Ue(),[1,0,0],ni((this.rotateWorld?1:-1)*this.relElevation)),o=X.yY(X.Ue(),[0,1,0],ni((this.rotateWorld?1:-1)*this.relAzimuth)),l=X.yY(X.Ue(),[0,0,1],ni(this.relRoll)),u=X.Jp(X.Ue(),o,s);u=X.Jp(X.Ue(),u,l);var c=L.fromQuat(L.create(),u);L.translate(this.matrix,this.matrix,[0,0,-this.distance]),L.multiply(this.matrix,this.matrix,c),L.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===Va.ORBITING||this.type===Va.EXPLORING?this._getPosition():this.type===Va.TRACKING&&this._getFocalPoint(),this._update(),this}},{key:"pan",value:function(t,i){var a=wr(t,i,0),s=E.d9(this.position);return E.IH(s,s,E.bA(E.Ue(),this.right,a[0])),E.IH(s,s,E.bA(E.Ue(),this.up,a[1])),this._setPosition(s),this.triggerUpdate(),this}},{key:"dolly",value:function(t){var i=this.forward,a=E.d9(this.position),s=t*this.dollyingStep,o=this.distance+t*this.dollyingStep;return s=Math.max(Math.min(o,this.maxDistance),this.minDistance)-this.distance,a[0]+=s*i[0],a[1]+=s*i[1],a[2]+=s*i[2],this._setPosition(a),this.type===Va.ORBITING||this.type===Va.EXPLORING?this._getDistance():this.type===Va.TRACKING&&E.IH(this.focalPoint,a,this.distanceVector),this.triggerUpdate(),this}},{key:"cancelLandmarkAnimation",value:function(){this.landmarkAnimationID!==void 0&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID)}},{key:"createLandmark",value:function(t){var i,a,s,o,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=l.position,c=u===void 0?this.position:u,d=l.focalPoint,h=d===void 0?this.focalPoint:d,f=l.roll,v=l.zoom,g=new wa.CameraContribution;g.setType(this.type,void 0),g.setPosition(c[0],(i=c[1])!==null&&i!==void 0?i:this.position[1],(a=c[2])!==null&&a!==void 0?a:this.position[2]),g.setFocalPoint(h[0],(s=h[1])!==null&&s!==void 0?s:this.focalPoint[1],(o=h[2])!==null&&o!==void 0?o:this.focalPoint[2]),g.setRoll(f!=null?f:this.roll),g.setZoom(v!=null?v:this.zoom);var m={name:t,matrix:L.clone(g.getWorldTransform()),right:E.d9(g.right),up:E.d9(g.up),forward:E.d9(g.forward),position:E.d9(g.getPosition()),focalPoint:E.d9(g.getFocalPoint()),distanceVector:E.d9(g.getDistanceVector()),distance:g.getDistance(),dollyingStep:g.getDollyingStep(),azimuth:g.getAzimuth(),elevation:g.getElevation(),roll:g.getRoll(),relAzimuth:g.relAzimuth,relElevation:g.relElevation,relRoll:g.relRoll,zoom:g.getZoom()};return this.landmarks.push(m),m}},{key:"gotoLandmark",value:function(t){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=(0,Ze.Z)(t)?this.landmarks.find(function(j){return j.name===t}):t;if(s){var o=(0,pe.Z)(a)?{duration:a}:a,l=o.easing,u=l===void 0?"linear":l,c=o.duration,d=c===void 0?100:c,h=o.easingFunction,f=h===void 0?void 0:h,v=o.onfinish,g=v===void 0?void 0:v,m=o.onframe,y=m===void 0?void 0:m,w=.01;this.cancelLandmarkAnimation();var T=s.position,G=s.focalPoint,x=s.zoom,_=s.roll,p=f||wa.EasingFunction(u),b,R=function(){i.setFocalPoint(G),i.setPosition(T),i.setRoll(_),i.setZoom(x),i.computeMatrix(),i.triggerUpdate(),g==null||g()};if(d===0)return R();var B=function(Z){b===void 0&&(b=Z);var te=Z-b;if(te>=d){R();return}var le=p(te/d),ue=E.Ue(),se=E.Ue(),V=1,ee=0;E.t7(ue,i.focalPoint,G,le),E.t7(se,i.position,T,le),ee=i.roll*(1-le)+_*le,V=i.zoom*(1-le)+x*le,i.setFocalPoint(ue),i.setPosition(se),i.setRoll(ee),i.setZoom(V);var he=E.TK(ue,G)+E.TK(se,T);if(he<=w&&x===void 0&&_===void 0)return R();i.computeMatrix(),i.triggerUpdate(),te<d&&(y==null||y(le),i.landmarkAnimationID=i.canvas.requestAnimationFrame(B))};this.canvas.requestAnimationFrame(B)}}}])}(wh);wa.CameraContribution=Rz;function Lm(r){"@babel/helpers - typeof";return Lm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Lm(r)}function Az(r,n){if(Lm(r)!="object"||!r)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var t=e.call(r,n||"default");if(Lm(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(r)}function dO(r){var n=Az(r,"string");return Lm(n)=="symbol"?n:n+""}function Pa(r,n,e){return(n=dO(n))in r?Object.defineProperty(r,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[n]=e,r}function hO(r,n){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);n&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),e.push.apply(e,t)}return e}function S0(r){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?hO(Object(e),!0).forEach(function(t){Pa(r,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):hO(Object(e)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))})}return r}function di(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}function fO(r,n){for(var e=0;e<n.length;e++){var t=n[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,dO(t.key),t)}}function hi(r,n,e){return n&&fO(r.prototype,n),e&&fO(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function tS(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=Array(n);e<n;e++)t[e]=r[e];return t}function Lz(r){if(Array.isArray(r))return tS(r)}function Iz(r){if(typeof Symbol!="undefined"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function nS(r,n){if(r){if(typeof r=="string")return tS(r,n);var e={}.toString.call(r).slice(8,-1);return e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set"?Array.from(r):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?tS(r,n):void 0}}function Dz(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ug(r){return Lz(r)||Iz(r)||nS(r)||Dz()}function qx(r){return qx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},qx(r)}function vO(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(n){}return(vO=function(){return!!r})()}function Fz(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Bz(r,n){if(n&&(Lm(n)=="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fz(r)}function Gd(r,n,e){return n=qx(n),Bz(r,vO()?Reflect.construct(n,e||[],qx(r).constructor):n.apply(r,e))}function rS(r,n){return rS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},rS(r,n)}function zd(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(n&&n.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),n&&rS(r,n)}function $z(r){if(Array.isArray(r))return r}function Gz(r,n){var e=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(e!=null){var t,i,a,s,o=[],l=!0,u=!1;try{if(a=(e=e.call(r)).next,n===0){if(Object(e)!==e)return;l=!1}else for(;!(l=(t=a.call(e)).done)&&(o.push(t.value),o.length!==n);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&e.return!=null&&(s=e.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function zz(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nf(r,n){return $z(r)||Gz(r,n)||nS(r,n)||zz()}function iS(r,n,e){r.prototype=n.prototype=e,e.constructor=r}function gO(r,n){var e=Object.create(r.prototype);for(var t in n)e[t]=n[t];return e}function T0(){}var C0=.7,e1=1/C0,Im="\\s*([+-]?\\d+)\\s*",M0="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Of="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Vz=/^#([0-9a-f]{3,8})$/,Uz=new RegExp(`^rgb\\(${Im},${Im},${Im}\\)$`),jz=new RegExp(`^rgb\\(${Of},${Of},${Of}\\)$`),Hz=new RegExp(`^rgba\\(${Im},${Im},${Im},${M0}\\)$`),Wz=new RegExp(`^rgba\\(${Of},${Of},${Of},${M0}\\)$`),Yz=new RegExp(`^hsl\\(${M0},${Of},${Of}\\)$`),Zz=new RegExp(`^hsla\\(${M0},${Of},${Of},${M0}\\)$`),_O={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};iS(T0,t1,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:mO,formatHex:mO,formatHex8:Xz,formatHsl:Kz,formatRgb:pO,toString:pO});function mO(){return this.rgb().formatHex()}function Xz(){return this.rgb().formatHex8()}function Kz(){return kO(this).formatHsl()}function pO(){return this.rgb().formatRgb()}function t1(r){var n,e;return r=(r+"").trim().toLowerCase(),(n=Vz.exec(r))?(e=n[1].length,n=parseInt(n[1],16),e===6?yO(n):e===3?new Cc(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):e===8?n1(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):e===4?n1(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=Uz.exec(r))?new Cc(n[1],n[2],n[3],1):(n=jz.exec(r))?new Cc(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=Hz.exec(r))?n1(n[1],n[2],n[3],n[4]):(n=Wz.exec(r))?n1(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=Yz.exec(r))?bO(n[1],n[2]/100,n[3]/100,1):(n=Zz.exec(r))?bO(n[1],n[2]/100,n[3]/100,n[4]):_O.hasOwnProperty(r)?yO(_O[r]):r==="transparent"?new Cc(NaN,NaN,NaN,0):null}function yO(r){return new Cc(r>>16&255,r>>8&255,r&255,1)}function n1(r,n,e,t){return t<=0&&(r=n=e=NaN),new Cc(r,n,e,t)}function Jz(r){return r instanceof T0||(r=t1(r)),r?(r=r.rgb(),new Cc(r.r,r.g,r.b,r.opacity)):new Cc}function Qz(r,n,e,t){return arguments.length===1?Jz(r):new Cc(r,n,e,t==null?1:t)}function Cc(r,n,e,t){this.r=+r,this.g=+n,this.b=+e,this.opacity=+t}iS(Cc,Qz,gO(T0,{brighter(r){return r=r==null?e1:Math.pow(e1,r),new Cc(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?C0:Math.pow(C0,r),new Cc(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new Cc(i_(this.r),i_(this.g),i_(this.b),r1(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:xO,formatHex:xO,formatHex8:qz,formatRgb:EO,toString:EO}));function xO(){return`#${a_(this.r)}${a_(this.g)}${a_(this.b)}`}function qz(){return`#${a_(this.r)}${a_(this.g)}${a_(this.b)}${a_((isNaN(this.opacity)?1:this.opacity)*255)}`}function EO(){const r=r1(this.opacity);return`${r===1?"rgb(":"rgba("}${i_(this.r)}, ${i_(this.g)}, ${i_(this.b)}${r===1?")":`, ${r})`}`}function r1(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function i_(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function a_(r){return r=i_(r),(r<16?"0":"")+r.toString(16)}function bO(r,n,e,t){return t<=0?r=n=e=NaN:e<=0||e>=1?r=n=NaN:n<=0&&(r=NaN),new Oh(r,n,e,t)}function kO(r){if(r instanceof Oh)return new Oh(r.h,r.s,r.l,r.opacity);if(r instanceof T0||(r=t1(r)),!r)return new Oh;if(r instanceof Oh)return r;r=r.rgb();var n=r.r/255,e=r.g/255,t=r.b/255,i=Math.min(n,e,t),a=Math.max(n,e,t),s=NaN,o=a-i,l=(a+i)/2;return o?(n===a?s=(e-t)/o+(e<t)*6:e===a?s=(t-n)/o+2:s=(n-e)/o+4,o/=l<.5?a+i:2-a-i,s*=60):o=l>0&&l<1?0:s,new Oh(s,o,l,r.opacity)}function e7(r,n,e,t){return arguments.length===1?kO(r):new Oh(r,n,e,t==null?1:t)}function Oh(r,n,e,t){this.h=+r,this.s=+n,this.l=+e,this.opacity=+t}iS(Oh,e7,gO(T0,{brighter(r){return r=r==null?e1:Math.pow(e1,r),new Oh(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?C0:Math.pow(C0,r),new Oh(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,n=isNaN(r)||isNaN(this.s)?0:this.s,e=this.l,t=e+(e<.5?e:1-e)*n,i=2*e-t;return new Cc(aS(r>=240?r-240:r+120,i,t),aS(r,i,t),aS(r<120?r+240:r-120,i,t),this.opacity)},clamp(){return new Oh(wO(this.h),i1(this.s),i1(this.l),r1(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const r=r1(this.opacity);return`${r===1?"hsl(":"hsla("}${wO(this.h)}, ${i1(this.s)*100}%, ${i1(this.l)*100}%${r===1?")":`, ${r})`}`}}));function wO(r){return r=(r||0)%360,r<0?r+360:r}function i1(r){return Math.max(0,Math.min(1,r||0))}function aS(r,n,e){return(r<60?n+(e-n)*r/60:r<180?e:r<240?n+(e-n)*(240-r)/60:n)*255}function Dm(r,n){var e=typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(!e){if(Array.isArray(r)||(e=nS(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:i}}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 a,s=!0,o=!1;return{s:function(){e=e.call(r)},n:function(){var u=e.next();return s=u.done,u},e:function(u){o=!0,a=u},f:function(){try{s||e.return==null||e.return()}finally{if(o)throw a}}}}var t7=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof k.g!="undefined"?k.g:typeof self!="undefined"?self:{},SO={exports:{}};(function(r,n){(function(e,t){r.exports=t()})(t7,function(){function e(x,_,p,b,R){t(x,_,p||0,b||x.length-1,R||a)}function t(x,_,p,b,R){for(;b>p;){if(b-p>600){var B=b-p+1,j=_-p+1,Z=Math.log(B),te=.5*Math.exp(2*Z/3),le=.5*Math.sqrt(Z*te*(B-te)/B)*(j-B/2<0?-1:1),ue=Math.max(p,Math.floor(_-j*te/B+le)),se=Math.min(b,Math.floor(_+(B-j)*te/B+le));t(x,_,ue,se,R)}var V=x[_],ee=p,he=b;for(i(x,p,_),R(x[b],V)>0&&i(x,p,b);ee<he;){for(i(x,ee,he),ee++,he--;R(x[ee],V)<0;)ee++;for(;R(x[he],V)>0;)he--}R(x[p],V)===0?i(x,p,he):(he++,i(x,he,b)),he<=_&&(p=he+1),_<=he&&(b=he-1)}}function i(x,_,p){var b=x[_];x[_]=x[p],x[p]=b}function a(x,_){return x<_?-1:x>_?1:0}var s=function(_){_===void 0&&(_=9),this._maxEntries=Math.max(4,_),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()};s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(_){var p=this.data,b=[];if(!w(_,p))return b;for(var R=this.toBBox,B=[];p;){for(var j=0;j<p.children.length;j++){var Z=p.children[j],te=p.leaf?R(Z):Z;w(_,te)&&(p.leaf?b.push(Z):y(_,te)?this._all(Z,b):B.push(Z))}p=B.pop()}return b},s.prototype.collides=function(_){var p=this.data;if(!w(_,p))return!1;for(var b=[];p;){for(var R=0;R<p.children.length;R++){var B=p.children[R],j=p.leaf?this.toBBox(B):B;if(w(_,j)){if(p.leaf||y(_,j))return!0;b.push(B)}}p=b.pop()}return!1},s.prototype.load=function(_){if(!(_&&_.length))return this;if(_.length<this._minEntries){for(var p=0;p<_.length;p++)this.insert(_[p]);return this}var b=this._build(_.slice(),0,_.length-1,0);if(!this.data.children.length)this.data=b;else if(this.data.height===b.height)this._splitRoot(this.data,b);else{if(this.data.height<b.height){var R=this.data;this.data=b,b=R}this._insert(b,this.data.height-b.height-1,!0)}return this},s.prototype.insert=function(_){return _&&this._insert(_,this.data.height-1),this},s.prototype.clear=function(){return this.data=T([]),this},s.prototype.remove=function(_,p){if(!_)return this;for(var b=this.data,R=this.toBBox(_),B=[],j=[],Z,te,le;b||B.length;){if(b||(b=B.pop(),te=B[B.length-1],Z=j.pop(),le=!0),b.leaf){var ue=o(_,b.children,p);if(ue!==-1)return b.children.splice(ue,1),B.push(b),this._condense(B),this}!le&&!b.leaf&&y(b,R)?(B.push(b),j.push(Z),Z=0,te=b,b=b.children[0]):te?(Z++,b=te.children[Z],le=!1):b=null}return this},s.prototype.toBBox=function(_){return _},s.prototype.compareMinX=function(_,p){return _.minX-p.minX},s.prototype.compareMinY=function(_,p){return _.minY-p.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(_){return this.data=_,this},s.prototype._all=function(_,p){for(var b=[];_;)_.leaf?p.push.apply(p,_.children):b.push.apply(b,_.children),_=b.pop();return p},s.prototype._build=function(_,p,b,R){var B=b-p+1,j=this._maxEntries,Z;if(B<=j)return Z=T(_.slice(p,b+1)),l(Z,this.toBBox),Z;R||(R=Math.ceil(Math.log(B)/Math.log(j)),j=Math.ceil(B/Math.pow(j,R-1))),Z=T([]),Z.leaf=!1,Z.height=R;var te=Math.ceil(B/j),le=te*Math.ceil(Math.sqrt(j));G(_,p,b,le,this.compareMinX);for(var ue=p;ue<=b;ue+=le){var se=Math.min(ue+le-1,b);G(_,ue,se,te,this.compareMinY);for(var V=ue;V<=se;V+=te){var ee=Math.min(V+te-1,se);Z.children.push(this._build(_,V,ee,R-1))}}return l(Z,this.toBBox),Z},s.prototype._chooseSubtree=function(_,p,b,R){for(;R.push(p),!(p.leaf||R.length-1===b);){for(var B=1/0,j=1/0,Z=void 0,te=0;te<p.children.length;te++){var le=p.children[te],ue=f(le),se=g(_,le)-ue;se<j?(j=se,B=ue<B?ue:B,Z=le):se===j&&ue<B&&(B=ue,Z=le)}p=Z||p.children[0]}return p},s.prototype._insert=function(_,p,b){var R=b?_:this.toBBox(_),B=[],j=this._chooseSubtree(R,this.data,p,B);for(j.children.push(_),c(j,R);p>=0&&B[p].children.length>this._maxEntries;)this._split(B,p),p--;this._adjustParentBBoxes(R,B,p)},s.prototype._split=function(_,p){var b=_[p],R=b.children.length,B=this._minEntries;this._chooseSplitAxis(b,B,R);var j=this._chooseSplitIndex(b,B,R),Z=T(b.children.splice(j,b.children.length-j));Z.height=b.height,Z.leaf=b.leaf,l(b,this.toBBox),l(Z,this.toBBox),p?_[p-1].children.push(Z):this._splitRoot(b,Z)},s.prototype._splitRoot=function(_,p){this.data=T([_,p]),this.data.height=_.height+1,this.data.leaf=!1,l(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(_,p,b){for(var R,B=1/0,j=1/0,Z=p;Z<=b-p;Z++){var te=u(_,0,Z,this.toBBox),le=u(_,Z,b,this.toBBox),ue=m(te,le),se=f(te)+f(le);ue<B?(B=ue,R=Z,j=se<j?se:j):ue===B&&se<j&&(j=se,R=Z)}return R||b-p},s.prototype._chooseSplitAxis=function(_,p,b){var R=_.leaf?this.compareMinX:d,B=_.leaf?this.compareMinY:h,j=this._allDistMargin(_,p,b,R),Z=this._allDistMargin(_,p,b,B);j<Z&&_.children.sort(R)},s.prototype._allDistMargin=function(_,p,b,R){_.children.sort(R);for(var B=this.toBBox,j=u(_,0,p,B),Z=u(_,b-p,b,B),te=v(j)+v(Z),le=p;le<b-p;le++){var ue=_.children[le];c(j,_.leaf?B(ue):ue),te+=v(j)}for(var se=b-p-1;se>=p;se--){var V=_.children[se];c(Z,_.leaf?B(V):V),te+=v(Z)}return te},s.prototype._adjustParentBBoxes=function(_,p,b){for(var R=b;R>=0;R--)c(p[R],_)},s.prototype._condense=function(_){for(var p=_.length-1,b=void 0;p>=0;p--)_[p].children.length===0?p>0?(b=_[p-1].children,b.splice(b.indexOf(_[p]),1)):this.clear():l(_[p],this.toBBox)};function o(x,_,p){if(!p)return _.indexOf(x);for(var b=0;b<_.length;b++)if(p(x,_[b]))return b;return-1}function l(x,_){u(x,0,x.children.length,_,x)}function u(x,_,p,b,R){R||(R=T(null)),R.minX=1/0,R.minY=1/0,R.maxX=-1/0,R.maxY=-1/0;for(var B=_;B<p;B++){var j=x.children[B];c(R,x.leaf?b(j):j)}return R}function c(x,_){return x.minX=Math.min(x.minX,_.minX),x.minY=Math.min(x.minY,_.minY),x.maxX=Math.max(x.maxX,_.maxX),x.maxY=Math.max(x.maxY,_.maxY),x}function d(x,_){return x.minX-_.minX}function h(x,_){return x.minY-_.minY}function f(x){return(x.maxX-x.minX)*(x.maxY-x.minY)}function v(x){return x.maxX-x.minX+(x.maxY-x.minY)}function g(x,_){return(Math.max(_.maxX,x.maxX)-Math.min(_.minX,x.minX))*(Math.max(_.maxY,x.maxY)-Math.min(_.minY,x.minY))}function m(x,_){var p=Math.max(x.minX,_.minX),b=Math.max(x.minY,_.minY),R=Math.min(x.maxX,_.maxX),B=Math.min(x.maxY,_.maxY);return Math.max(0,R-p)*Math.max(0,B-b)}function y(x,_){return x.minX<=_.minX&&x.minY<=_.minY&&_.maxX<=x.maxX&&_.maxY<=x.maxY}function w(x,_){return _.minX<=x.maxX&&_.minY<=x.maxY&&_.maxX>=x.minX&&_.maxY>=x.minY}function T(x){return{children:x,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function G(x,_,p,b,R){for(var B=[_,p];B.length;)if(p=B.pop(),_=B.pop(),!(p-_<=b)){var j=_+Math.ceil((p-_)/b/2)*b;e(x,j,_,p,R),B.push(_,j,j,p)}}return s})})(SO);var eTe=SO.exports,bi=function(r){return r.GROUP="g",r.FRAGMENT="fragment",r.CIRCLE="circle",r.ELLIPSE="ellipse",r.IMAGE="image",r.RECT="rect",r.LINE="line",r.POLYLINE="polyline",r.POLYGON="polygon",r.TEXT="text",r.PATH="path",r.HTML="html",r.MESH="mesh",r}({}),sS=function(r){return r[r.ZERO=0]="ZERO",r[r.NEGATIVE_ONE=1]="NEGATIVE_ONE",r}({}),tTe=null,nTe=null,oS=E.IH,Fm=E.JG,n7=E.Fp,r7=E.VV,TO=E.bA,lS=E.lu,Vd=function(){function r(){di(this,r),this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return hi(r,[{key:"update",value:function(e,t){Fm(this.center,e),Fm(this.halfExtents,t),lS(this.min,this.center,this.halfExtents),oS(this.max,this.center,this.halfExtents)}},{key:"setMinMax",value:function(e,t){oS(this.center,t,e),TO(this.center,this.center,.5),lS(this.halfExtents,t,e),TO(this.halfExtents,this.halfExtents,.5),Fm(this.min,e),Fm(this.max,t)}},{key:"getMin",value:function(){return this.min}},{key:"getMax",value:function(){return this.max}},{key:"add",value:function(e){if(!r.isEmpty(e)){if(r.isEmpty(this)){this.setMinMax(e.getMin(),e.getMax());return}var t=this.center,i=t[0],a=t[1],s=t[2],o=this.halfExtents,l=o[0],u=o[1],c=o[2],d=i-l,h=i+l,f=a-u,v=a+u,g=s-c,m=s+c,y=e.center,w=y[0],T=y[1],G=y[2],x=e.halfExtents,_=x[0],p=x[1],b=x[2],R=w-_,B=w+_,j=T-p,Z=T+p,te=G-b,le=G+b;R<d&&(d=R),B>h&&(h=B),j<f&&(f=j),Z>v&&(v=Z),te<g&&(g=te),le>m&&(m=le),t[0]=(d+h)*.5,t[1]=(f+v)*.5,t[2]=(g+m)*.5,o[0]=(h-d)*.5,o[1]=(v-f)*.5,o[2]=(m-g)*.5,this.min[0]=d,this.min[1]=f,this.min[2]=g,this.max[0]=h,this.max[1]=v,this.max[2]=m}}},{key:"setFromTransformedAABB",value:function(e,t){var i=this.center,a=this.halfExtents,s=e.center,o=e.halfExtents,l=t[0],u=t[4],c=t[8],d=t[1],h=t[5],f=t[9],v=t[2],g=t[6],m=t[10],y=Math.abs(l),w=Math.abs(u),T=Math.abs(c),G=Math.abs(d),x=Math.abs(h),_=Math.abs(f),p=Math.abs(v),b=Math.abs(g),R=Math.abs(m);i[0]=t[12]+l*s[0]+u*s[1]+c*s[2],i[1]=t[13]+d*s[0]+h*s[1]+f*s[2],i[2]=t[14]+v*s[0]+g*s[1]+m*s[2],a[0]=y*o[0]+w*o[1]+T*o[2],a[1]=G*o[0]+x*o[1]+_*o[2],a[2]=p*o[0]+b*o[1]+R*o[2],lS(this.min,i,a),oS(this.max,i,a)}},{key:"intersects",value:function(e){var t=this.getMax(),i=this.getMin(),a=e.getMax(),s=e.getMin();return i[0]<=a[0]&&t[0]>=s[0]&&i[1]<=a[1]&&t[1]>=s[1]&&i[2]<=a[2]&&t[2]>=s[2]}},{key:"intersection",value:function(e){if(!this.intersects(e))return null;var t=new r,i=n7([0,0,0],this.getMin(),e.getMin()),a=r7([0,0,0],this.getMax(),e.getMax());return t.setMinMax(i,a),t}},{key:"getNegativeFarPoint",value:function(e){return e.pnVertexFlag===273?Fm([0,0,0],this.min):e.pnVertexFlag===272?[this.min[0],this.min[1],this.max[2]]:e.pnVertexFlag===257?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===256?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===17?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===16?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===1?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]}},{key:"getPositiveFarPoint",value:function(e){return e.pnVertexFlag===273?Fm([0,0,0],this.max):e.pnVertexFlag===272?[this.max[0],this.max[1],this.min[2]]:e.pnVertexFlag===257?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===256?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===17?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===16?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===1?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]}}],[{key:"isEmpty",value:function(e){return!e||e.halfExtents[0]===0&&e.halfExtents[1]===0&&e.halfExtents[2]===0}}])}(),i7=function(){function r(n,e){di(this,r),this.distance=n||0,this.normal=e||E.al(0,1,0),this.updatePNVertexFlag()}return hi(r,[{key:"updatePNVertexFlag",value:function(){this.pnVertexFlag=(+(this.normal[0]>=0)<<8)+(+(this.normal[1]>=0)<<4)+ +(this.normal[2]>=0)}},{key:"distanceToPoint",value:function(e){return E.AK(e,this.normal)-this.distance}},{key:"normalize",value:function(){var e=1/E.Zh(this.normal);E.bA(this.normal,this.normal,e),this.distance*=e}},{key:"intersectsLine",value:function(e,t,i){var a=this.distanceToPoint(e),s=this.distanceToPoint(t),o=a/(a-s),l=o>=0&&o<=1;return l&&i&&E.t7(i,e,t,o),l}}])}(),rTe=function(r){return r[r.OUTSIDE=4294967295]="OUTSIDE",r[r.INSIDE=0]="INSIDE",r[r.INDETERMINATE=2147483647]="INDETERMINATE",r}({}),a7=function(){function r(n){if(di(this,r),this.planes=[],n)this.planes=n;else for(var e=0;e<6;e++)this.planes.push(new i7)}return hi(r,[{key:"extractFromVPMatrix",value:function(e){var t=Nf(e,16),i=t[0],a=t[1],s=t[2],o=t[3],l=t[4],u=t[5],c=t[6],d=t[7],h=t[8],f=t[9],v=t[10],g=t[11],m=t[12],y=t[13],w=t[14],T=t[15];E.t8(this.planes[0].normal,o-i,d-l,g-h),this.planes[0].distance=T-m,E.t8(this.planes[1].normal,o+i,d+l,g+h),this.planes[1].distance=T+m,E.t8(this.planes[2].normal,o+a,d+u,g+f),this.planes[2].distance=T+y,E.t8(this.planes[3].normal,o-a,d-u,g-f),this.planes[3].distance=T-y,E.t8(this.planes[4].normal,o-s,d-c,g-v),this.planes[4].distance=T-w,E.t8(this.planes[5].normal,o+s,d+c,g+v),this.planes[5].distance=T+w,this.planes.forEach(function(G){G.normalize(),G.updatePNVertexFlag()})}}])}(),Ov=function(){function r(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;di(this,r),this.x=0,this.y=0,this.x=n,this.y=e}return hi(r,[{key:"clone",value:function(){return new r(this.x,this.y)}},{key:"copyFrom",value:function(e){this.x=e.x,this.y=e.y}}])}(),P0=function(){function r(n,e,t,i){di(this,r),this.x=n,this.y=e,this.width=t,this.height=i,this.left=n,this.right=n+t,this.top=e,this.bottom=e+i}return hi(r,[{key:"toJSON",value:function(){}}],[{key:"fromRect",value:function(e){return new r(e.x,e.y,e.width,e.height)}},{key:"applyTransform",value:function(e,t){var i=me.al(e.x,e.y,0,1),a=me.al(e.x+e.width,e.y,0,1),s=me.al(e.x,e.y+e.height,0,1),o=me.al(e.x+e.width,e.y+e.height,0,1),l=me.Ue(),u=me.Ue(),c=me.Ue(),d=me.Ue();me.fF(l,i,t),me.fF(u,a,t),me.fF(c,s,t),me.fF(d,o,t);var h=Math.min(l[0],u[0],c[0],d[0]),f=Math.min(l[1],u[1],c[1],d[1]),v=Math.max(l[0],u[0],c[0],d[0]),g=Math.max(l[1],u[1],c[1],d[1]);return r.fromRect({x:h,y:f,width:v-h,height:g-f})}}])}(),Ud="Method not implemented.",iTe="Use document.documentElement instead.",aTe="Cannot append a destroyed element.";function uS(r){return r===void 0?0:r>360||r<-360?r%360:r}var cS=E.Ue();function s_(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;return Array.isArray(r)&&r.length===3?t?E.d9(r):E.JG(cS,r):(0,pe.Z)(r)?t?E.al(r,n,e):E.t8(cS,r,n,e):t?E.al(r[0],r[1]||n,r[2]||e):E.t8(cS,r[0],r[1]||n,r[2]||e)}var s7=Math.PI/180;function $s(r){return r*s7}var o7=180/Math.PI;function Rf(r){return r*o7}var l7=.9;function sTe(r){return r%=400,r<0&&(r+=400),r*l7}function oTe(r){return r/360}function u7(r){return 360*r}var a1=Math.PI/2;function c7(r,n){var e=n[0],t=n[1],i=n[2],a=n[3],s=e*e,o=t*t,l=i*i,u=a*a,c=s+o+l+u,d=e*a-t*i;return d>.499995*c?(r[0]=a1,r[1]=2*Math.atan2(t,e),r[2]=0):d<-.499995*c?(r[0]=-a1,r[1]=2*Math.atan2(t,e),r[2]=0):(r[0]=Math.asin(2*(e*i-a*t)),r[1]=Math.atan2(2*(e*a+t*i),1-2*(l+u)),r[2]=Math.atan2(2*(e*t+i*a),1-2*(o+l))),r}function d7(r,n){var e,t,i=mat4.getScaling(vec3.create(),n),a=_slicedToArray(i,3),s=a[0],o=a[1],l=a[2],u=Math.asin(-n[2]/s);return u<a1?u>-a1?(e=Math.atan2(n[6]/o,n[10]/l),t=Math.atan2(n[1]/s,n[0]/s)):(t=0,e=-Math.atan2(n[4]/o,n[5]/o)):(t=0,e=Math.atan2(n[4]/o,n[5]/o)),r[0]=e,r[1]=u,r[2]=t,r}function lTe(r,n){return n.length===16?d7(r,n):c7(r,n)}function uTe(r,n,e,t,i){var a=Math.cos(r),s=Math.sin(r);return mat3.fromValues(t*a,i*s,0,-t*s,i*a,0,n,e,1)}function h7(r,n,e,t,i,a,s){var o=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1,l=2*a,u=e-n,c=t-i,d=l/u,h=l/c,f=(e+n)/u,v=(t+i)/c,g,m,y=s-a,w=s*a;return o?(g=-s/y,m=-w/y):(g=-(s+a)/y,m=-2*w/y),r[0]=d,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=h,r[6]=0,r[7]=0,r[8]=f,r[9]=v,r[10]=g,r[11]=-1,r[12]=0,r[13]=0,r[14]=m,r[15]=0,r}function cTe(r){var n=r[0],e=r[1],t=r[3],i=r[4],a=Math.sqrt(n*n+e*e),s=Math.sqrt(t*t+i*i),o=n*i-e*t;if(o<0&&(n<i?a=-a:s=-s),a){var l=1/a;n*=l,e*=l}if(s){var u=1/s;t*=u,i*=u}var c=Math.atan2(e,n),d=Rf(c);return[r[6],r[7],a,s,d]}var Af=L.create(),Rh=L.create(),N0=me.Ue(),Ii=[E.Ue(),E.Ue(),E.Ue()],CO=E.Ue();function f7(r,n,e,t,i,a){if(!v7(Af,r)||(L.copy(Rh,Af),Rh[3]=0,Rh[7]=0,Rh[11]=0,Rh[15]=1,Math.abs(L.determinant(Rh))<1e-8))return!1;var s=Af[3],o=Af[7],l=Af[11],u=Af[12],c=Af[13],d=Af[14],h=Af[15];if(s!==0||o!==0||l!==0){N0[0]=s,N0[1]=o,N0[2]=l,N0[3]=h;var f=L.invert(Rh,Rh);if(!f)return!1;L.transpose(Rh,Rh),me.fF(i,N0,Rh)}else i[0]=i[1]=i[2]=0,i[3]=1;if(n[0]=u,n[1]=c,n[2]=d,g7(Ii,Af),e[0]=E.kE(Ii[0]),E.Fv(Ii[0],Ii[0]),t[0]=E.AK(Ii[0],Ii[1]),dS(Ii[1],Ii[1],Ii[0],1,-t[0]),e[1]=E.kE(Ii[1]),E.Fv(Ii[1],Ii[1]),t[0]/=e[1],t[1]=E.AK(Ii[0],Ii[2]),dS(Ii[2],Ii[2],Ii[0],1,-t[1]),t[2]=E.AK(Ii[1],Ii[2]),dS(Ii[2],Ii[2],Ii[1],1,-t[2]),e[2]=E.kE(Ii[2]),E.Fv(Ii[2],Ii[2]),t[1]/=e[2],t[2]/=e[2],E.kC(CO,Ii[1],Ii[2]),E.AK(Ii[0],CO)<0)for(var v=0;v<3;v++)e[v]*=-1,Ii[v][0]*=-1,Ii[v][1]*=-1,Ii[v][2]*=-1;return a[0]=.5*Math.sqrt(Math.max(1+Ii[0][0]-Ii[1][1]-Ii[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-Ii[0][0]+Ii[1][1]-Ii[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-Ii[0][0]-Ii[1][1]+Ii[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+Ii[0][0]+Ii[1][1]+Ii[2][2],0)),Ii[2][1]>Ii[1][2]&&(a[0]=-a[0]),Ii[0][2]>Ii[2][0]&&(a[1]=-a[1]),Ii[1][0]>Ii[0][1]&&(a[2]=-a[2]),!0}function v7(r,n){var e=n[15];if(e===0)return!1;for(var t=1/e,i=0;i<16;i++)r[i]=n[i]*t;return!0}function g7(r,n){r[0][0]=n[0],r[0][1]=n[1],r[0][2]=n[2],r[1][0]=n[4],r[1][1]=n[5],r[1][2]=n[6],r[2][0]=n[8],r[2][1]=n[9],r[2][2]=n[10]}function dS(r,n,e,t,i){r[0]=n[0]*t+e[0]*i,r[1]=n[1]*t+e[1]*i,r[2]=n[2]*t+e[2]*i}var kl=function(r){return r[r.ORBITING=0]="ORBITING",r[r.EXPLORING=1]="EXPLORING",r[r.TRACKING=2]="TRACKING",r}({}),MO=function(r){return r[r.DEFAULT=0]="DEFAULT",r[r.ROTATIONAL=1]="ROTATIONAL",r[r.TRANSLATIONAL=2]="TRANSLATIONAL",r[r.CINEMATIC=3]="CINEMATIC",r}({}),Ah=function(r){return r[r.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",r[r.PERSPECTIVE=1]="PERSPECTIVE",r}({}),_7={UPDATED:"updated"},PO=2e-4,m7=function(){function r(){di(this,r),this.clipSpaceNearZ=sS.NEGATIVE_ONE,this.eventEmitter=new Se.Z,this.matrix=L.create(),this.right=E.al(1,0,0),this.up=E.al(0,1,0),this.forward=E.al(0,0,1),this.position=E.al(0,0,1),this.focalPoint=E.al(0,0,0),this.distanceVector=E.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=L.create(),this.projectionMatrixInverse=L.create(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=kl.EXPLORING,this.trackingMode=MO.DEFAULT,this.projectionMode=Ah.PERSPECTIVE,this.frustum=new a7,this.orthoMatrix=L.create()}return hi(r,[{key:"isOrtho",value:function(){return this.projectionMode===Ah.ORTHOGRAPHIC}},{key:"getProjectionMode",value:function(){return this.projectionMode}},{key:"getPerspective",value:function(){return this.jitteredProjectionMatrix||this.projectionMatrix}},{key:"getPerspectiveInverse",value:function(){return this.projectionMatrixInverse}},{key:"getFrustum",value:function(){return this.frustum}},{key:"getPosition",value:function(){return this.position}},{key:"getFocalPoint",value:function(){return this.focalPoint}},{key:"getDollyingStep",value:function(){return this.dollyingStep}},{key:"getNear",value:function(){return this.near}},{key:"getFar",value:function(){return this.far}},{key:"getZoom",value:function(){return this.zoom}},{key:"getOrthoMatrix",value:function(){return this.orthoMatrix}},{key:"getView",value:function(){return this.view}},{key:"setEnableUpdate",value:function(e){this.enableUpdate=e}},{key:"setType",value:function(e,t){return this.type=e,this.type===kl.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===kl.TRACKING&&t!==void 0&&this.setTrackingMode(t),this}},{key:"setProjectionMode",value:function(e){return this.projectionMode=e,this}},{key:"setTrackingMode",value:function(e){if(this.type!==kl.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=e,this}},{key:"setWorldRotation",value:function(e){return this.rotateWorld=e,this._getAngles(),this}},{key:"getViewTransform",value:function(){return L.invert(L.create(),this.matrix)}},{key:"getWorldTransform",value:function(){return this.matrix}},{key:"jitterProjectionMatrix",value:function(e,t){var i=L.fromTranslation(L.create(),[e,t,0]);this.jitteredProjectionMatrix=L.multiply(L.create(),i,this.projectionMatrix)}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0}},{key:"setMatrix",value:function(e){return this.matrix=e,this._update(),this}},{key:"setProjectionMatrix",value:function(e){this.projectionMatrix=e}},{key:"setFov",value:function(e){return this.setPerspective(this.near,this.far,e,this.aspect),this}},{key:"setAspect",value:function(e){return this.setPerspective(this.near,this.far,this.fov,e),this}},{key:"setNear",value:function(e){return this.projectionMode===Ah.PERSPECTIVE?this.setPerspective(e,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,e,this.far),this}},{key:"setFar",value:function(e){return this.projectionMode===Ah.PERSPECTIVE?this.setPerspective(this.near,e,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,e),this}},{key:"setViewOffset",value:function(e,t,i,a,s,o){return this.aspect=e/t,this.view===void 0&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=a,this.view.width=s,this.view.height=o,this.projectionMode===Ah.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===Ah.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"setZoom",value:function(e){return this.zoom=e,this.projectionMode===Ah.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===Ah.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this}},{key:"setZoomByViewportPoint",value:function(e,t){var i=this.canvas.viewport2Canvas({x:t[0],y:t[1]}),a=i.x,s=i.y,o=this.roll;this.rotate(0,0,-o),this.setPosition(a,s),this.setFocalPoint(a,s),this.setZoom(e),this.rotate(0,0,o);var l=this.canvas.viewport2Canvas({x:t[0],y:t[1]}),u=l.x,c=l.y,d=E.al(u-a,c-s,0),h=E.AK(d,this.right)/E.kE(this.right),f=E.AK(d,this.up)/E.kE(this.up),v=this.getPosition(),g=Nf(v,2),m=g[0],y=g[1],w=this.getFocalPoint(),T=Nf(w,2),G=T[0],x=T[1];return this.setPosition(m-h,y-f),this.setFocalPoint(G-h,x-f),this}},{key:"setPerspective",value:function(e,t,i,a){var s;this.projectionMode=Ah.PERSPECTIVE,this.fov=i,this.near=e,this.far=t,this.aspect=a;var o=this.near*Math.tan($s(.5*this.fov))/this.zoom,l=2*o,u=this.aspect*l,c=-.5*u;if((s=this.view)!==null&&s!==void 0&&s.enabled){var d=this.view.fullWidth,h=this.view.fullHeight;c+=this.view.offsetX*u/d,o-=this.view.offsetY*l/h,u*=this.view.width/d,l*=this.view.height/h}return h7(this.projectionMatrix,c,c+u,o-l,o,e,this.far,this.clipSpaceNearZ===sS.ZERO),L.invert(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this}},{key:"setOrthographic",value:function(e,t,i,a,s,o){var l;this.projectionMode=Ah.ORTHOGRAPHIC,this.rright=t,this.left=e,this.top=i,this.bottom=a,this.near=s,this.far=o;var u=(this.rright-this.left)/(2*this.zoom),c=(this.top-this.bottom)/(2*this.zoom),d=(this.rright+this.left)/2,h=(this.top+this.bottom)/2,f=d-u,v=d+u,g=h+c,m=h-c;if((l=this.view)!==null&&l!==void 0&&l.enabled){var y=(this.rright-this.left)/this.view.fullWidth/this.zoom,w=(this.top-this.bottom)/this.view.fullHeight/this.zoom;f+=y*this.view.offsetX,v=f+y*this.view.width,g-=w*this.view.offsetY,m=g-w*this.view.height}return this.clipSpaceNearZ===sS.NEGATIVE_ONE?L.ortho(this.projectionMatrix,f,v,g,m,s,o):L.orthoZO(this.projectionMatrix,f,v,g,m,s,o),L.invert(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this}},{key:"setPosition",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.position[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.position[2],a=s_(e,t,i);return this._setPosition(a),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this}},{key:"setFocalPoint",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.focalPoint[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.focalPoint[2],a=E.al(0,1,0);if(this.focalPoint=s_(e,t,i),this.trackingMode===MO.CINEMATIC){var s=E.$X(E.Ue(),this.focalPoint,this.position);e=s[0],t=s[1],i=s[2];var o=E.kE(s),l=Rf(Math.asin(t/o)),u=90+Rf(Math.atan2(i,e)),c=L.create();L.rotateY(c,c,$s(u)),L.rotateX(c,c,$s(l)),a=E.fF(E.Ue(),[0,1,0],c)}return L.invert(this.matrix,L.lookAt(L.create(),this.position,this.focalPoint,a)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this}},{key:"getDistance",value:function(){return this.distance}},{key:"getDistanceVector",value:function(){return this.distanceVector}},{key:"setDistance",value:function(e){if(this.distance===e||e<0)return this;this.distance=e,this.distance<PO&&(this.distance=PO),this.dollyingStep=this.distance/100;var t=E.Ue();e=this.distance;var i=this.forward,a=this.focalPoint;return t[0]=e*i[0]+a[0],t[1]=e*i[1]+a[1],t[2]=e*i[2]+a[2],this._setPosition(t),this.triggerUpdate(),this}},{key:"setMaxDistance",value:function(e){return this.maxDistance=e,this}},{key:"setMinDistance",value:function(e){return this.minDistance=e,this}},{key:"setAzimuth",value:function(e){return this.azimuth=uS(e),this.computeMatrix(),this._getAxes(),this.type===kl.ORBITING||this.type===kl.EXPLORING?this._getPosition():this.type===kl.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getAzimuth",value:function(){return this.azimuth}},{key:"setElevation",value:function(e){return this.elevation=uS(e),this.computeMatrix(),this._getAxes(),this.type===kl.ORBITING||this.type===kl.EXPLORING?this._getPosition():this.type===kl.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getElevation",value:function(){return this.elevation}},{key:"setRoll",value:function(e){return this.roll=uS(e),this.computeMatrix(),this._getAxes(),this.type===kl.ORBITING||this.type===kl.EXPLORING?this._getPosition():this.type===kl.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getRoll",value:function(){return this.roll}},{key:"_update",value:function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()}},{key:"computeMatrix",value:function(){var e=X.yY(X.Ue(),[0,0,1],$s(this.roll));L.identity(this.matrix);var t=X.yY(X.Ue(),[1,0,0],$s((this.rotateWorld&&this.type!==kl.TRACKING||this.type===kl.TRACKING?1:-1)*this.elevation)),i=X.yY(X.Ue(),[0,1,0],$s((this.rotateWorld&&this.type!==kl.TRACKING||this.type===kl.TRACKING?1:-1)*this.azimuth)),a=X.Jp(X.Ue(),i,t);a=X.Jp(X.Ue(),a,e);var s=L.fromQuat(L.create(),a);this.type===kl.ORBITING||this.type===kl.EXPLORING?(L.translate(this.matrix,this.matrix,this.focalPoint),L.multiply(this.matrix,this.matrix,s),L.translate(this.matrix,this.matrix,[0,0,this.distance])):this.type===kl.TRACKING&&(L.translate(this.matrix,this.matrix,this.position),L.multiply(this.matrix,this.matrix,s))}},{key:"_setPosition",value:function(e,t,i){this.position=s_(e,t,i);var a=this.matrix;a[12]=this.position[0],a[13]=this.position[1],a[14]=this.position[2],a[15]=1,this._getOrthoMatrix()}},{key:"_getAxes",value:function(){E.JG(this.right,s_(me.fF(me.Ue(),[1,0,0,0],this.matrix))),E.JG(this.up,s_(me.fF(me.Ue(),[0,1,0,0],this.matrix))),E.JG(this.forward,s_(me.fF(me.Ue(),[0,0,1,0],this.matrix))),E.Fv(this.right,this.right),E.Fv(this.up,this.up),E.Fv(this.forward,this.forward)}},{key:"_getAngles",value:function(){var e=this.distanceVector[0],t=this.distanceVector[1],i=this.distanceVector[2],a=E.kE(this.distanceVector);if(a===0){this.elevation=0,this.azimuth=0;return}this.type===kl.TRACKING?(this.elevation=Rf(Math.asin(t/a)),this.azimuth=Rf(Math.atan2(-e,-i))):this.rotateWorld?(this.elevation=Rf(Math.asin(t/a)),this.azimuth=Rf(Math.atan2(-e,-i))):(this.elevation=-Rf(Math.asin(t/a)),this.azimuth=-Rf(Math.atan2(-e,-i)))}},{key:"_getPosition",value:function(){E.JG(this.position,s_(me.fF(me.Ue(),[0,0,0,1],this.matrix))),this._getDistance()}},{key:"_getFocalPoint",value:function(){E.kK(this.distanceVector,[0,0,-this.distance],Ke.xO(Ke.Ue(),this.matrix)),E.IH(this.focalPoint,this.position,this.distanceVector),this._getDistance()}},{key:"_getDistance",value:function(){this.distanceVector=E.$X(E.Ue(),this.focalPoint,this.position),this.distance=E.kE(this.distanceVector),this.dollyingStep=this.distance/100}},{key:"_getOrthoMatrix",value:function(){if(this.projectionMode===Ah.ORTHOGRAPHIC){var e=this.position,t=X.yY(X.Ue(),[0,0,1],-this.roll*Math.PI/180);L.fromRotationTranslationScaleOrigin(this.orthoMatrix,t,E.al((this.rright-this.left)/2-e[0],(this.top-this.bottom)/2-e[1],0),E.al(this.zoom,this.zoom,1),e)}}},{key:"triggerUpdate",value:function(){if(this.enableUpdate){var e=this.getViewTransform(),t=L.multiply(L.create(),this.getPerspective(),e);this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(_7.UPDATED)}}},{key:"rotate",value:function(e,t,i){throw new Error(Ud)}},{key:"pan",value:function(e,t){throw new Error(Ud)}},{key:"dolly",value:function(e){throw new Error(Ud)}},{key:"createLandmark",value:function(e,t){throw new Error(Ud)}},{key:"gotoLandmark",value:function(e,t){throw new Error(Ud)}},{key:"cancelLandmarkAnimation",value:function(){throw new Error(Ud)}}])}(),dTe=function(r){return r[r.Standard=0]="Standard",r}({}),hS=function(r){return r[r.ADDED=0]="ADDED",r[r.REMOVED=1]="REMOVED",r[r.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED",r}({}),p7={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new P0(0,0,0,0)},$n=function(r){return r.COORDINATE="<coordinate>",r.COLOR="<color>",r.PAINT="<paint>",r.NUMBER="<number>",r.ANGLE="<angle>",r.OPACITY_VALUE="<opacity-value>",r.SHADOW_BLUR="<shadow-blur>",r.LENGTH="<length>",r.PERCENTAGE="<percentage>",r.LENGTH_PERCENTAGE="<length> | <percentage>",r.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",r.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",r.LIST_OF_POINTS="<list-of-points>",r.PATH="<path>",r.FILTER="<filter>",r.Z_INDEX="<z-index>",r.OFFSET_DISTANCE="<offset-distance>",r.DEFINED_PATH="<defined-path>",r.MARKER="<marker>",r.TRANSFORM="<transform>",r.TRANSFORM_ORIGIN="<transform-origin>",r.TEXT="<text>",r.TEXT_TRANSFORM="<text-transform>",r}({});function lc(r,n){if(typeof r!="function"||n!=null&&typeof n!="function")throw new TypeError("Expected a function");var e=function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var o=n?n.apply(this,a):a[0],l=e.cache;if(l.has(o))return l.get(o);var u=r.apply(this,a);return e.cache=l.set(o,u)||l,u};return e.cache=new(lc.Cache||Map),e}lc.Cache=Map;var Kn=function(r){return r[r.kUnknown=0]="kUnknown",r[r.kNumber=1]="kNumber",r[r.kPercentage=2]="kPercentage",r[r.kEms=3]="kEms",r[r.kPixels=4]="kPixels",r[r.kRems=5]="kRems",r[r.kDegrees=6]="kDegrees",r[r.kRadians=7]="kRadians",r[r.kGradians=8]="kGradians",r[r.kTurns=9]="kTurns",r[r.kMilliseconds=10]="kMilliseconds",r[r.kSeconds=11]="kSeconds",r[r.kInteger=12]="kInteger",r}({}),Lh=function(r){return r[r.kUNumber=0]="kUNumber",r[r.kUPercent=1]="kUPercent",r[r.kULength=2]="kULength",r[r.kUAngle=3]="kUAngle",r[r.kUTime=4]="kUTime",r[r.kUOther=5]="kUOther",r}({}),y7=function(r){return r[r.kYes=0]="kYes",r[r.kNo=1]="kNo",r}({}),x7=function(r){return r[r.kYes=0]="kYes",r[r.kNo=1]="kNo",r}({}),E7=[{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}],Bm=function(r){return r[r.kUnknownType=0]="kUnknownType",r[r.kUnparsedType=1]="kUnparsedType",r[r.kKeywordType=2]="kKeywordType",r[r.kUnitType=3]="kUnitType",r[r.kSumType=4]="kSumType",r[r.kProductType=5]="kProductType",r[r.kNegateType=6]="kNegateType",r[r.kInvertType=7]="kInvertType",r[r.kMinType=8]="kMinType",r[r.kMaxType=9]="kMaxType",r[r.kClampType=10]="kClampType",r[r.kTransformType=11]="kTransformType",r[r.kPositionType=12]="kPositionType",r[r.kURLImageType=13]="kURLImageType",r[r.kColorType=14]="kColorType",r[r.kUnsupportedColorType=15]="kUnsupportedColorType",r}({}),b7=function(n){return E7.find(function(e){return e.name===n}).unit_type},k7=function(n){return n?n==="number"?Kn.kNumber:n==="percent"||n==="%"?Kn.kPercentage:b7(n):Kn.kUnknown},w7=function(n){switch(n){case Kn.kNumber:case Kn.kInteger:return Lh.kUNumber;case Kn.kPercentage:return Lh.kUPercent;case Kn.kPixels:return Lh.kULength;case Kn.kMilliseconds:case Kn.kSeconds:return Lh.kUTime;case Kn.kDegrees:case Kn.kRadians:case Kn.kGradians:case Kn.kTurns:return Lh.kUAngle;default:return Lh.kUOther}},S7=function(n){switch(n){case Lh.kUNumber:return Kn.kNumber;case Lh.kULength:return Kn.kPixels;case Lh.kUPercent:return Kn.kPercentage;case Lh.kUTime:return Kn.kSeconds;case Lh.kUAngle:return Kn.kDegrees;default:return Kn.kUnknown}},NO=function(n){var e=1;switch(n){case Kn.kPixels:case Kn.kDegrees:case Kn.kSeconds:break;case Kn.kMilliseconds:e=.001;break;case Kn.kRadians:e=180/Math.PI;break;case Kn.kGradians:e=.9;break;case Kn.kTurns:e=360;break}return e},fS=function(n){switch(n){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""},s1=function(){function r(){di(this,r)}return hi(r,[{key:"toString",value:function(){return this.buildCSSText(y7.kNo,x7.kNo,"")}},{key:"isNumericValue",value:function(){return this.getType()>=Bm.kUnitType&&this.getType()<=Bm.kClampType}}],[{key:"isAngle",value:function(e){return e===Kn.kDegrees||e===Kn.kRadians||e===Kn.kGradians||e===Kn.kTurns}},{key:"isLength",value:function(e){return e>=Kn.kEms&&e<Kn.kDegrees}},{key:"isRelativeUnit",value:function(e){return e===Kn.kPercentage||e===Kn.kEms||e===Kn.kRems}},{key:"isTime",value:function(e){return e===Kn.kSeconds||e===Kn.kMilliseconds}}])}(),T7=function(r){function n(e){var t;return di(this,n),t=Gd(this,n),t.colorSpace=e,t}return zd(n,r),hi(n,[{key:"getType",value:function(){return Bm.kColorType}},{key:"to",value:function(t){return this}}])}(s1),o1=function(r){return r[r.Constant=0]="Constant",r[r.LinearGradient=1]="LinearGradient",r[r.RadialGradient=2]="RadialGradient",r}({}),l1=function(r){function n(e,t){var i;return di(this,n),i=Gd(this,n),i.type=e,i.value=t,i}return zd(n,r),hi(n,[{key:"clone",value:function(){return new n(this.type,this.value)}},{key:"buildCSSText",value:function(t,i,a){return a}},{key:"getType",value:function(){return Bm.kColorType}}])}(s1),jd=function(r){function n(e){var t;return di(this,n),t=Gd(this,n),t.value=e,t}return zd(n,r),hi(n,[{key:"clone",value:function(){return new n(this.value)}},{key:"getType",value:function(){return Bm.kKeywordType}},{key:"buildCSSText",value:function(t,i,a){return a+this.value}}])}(s1),C7=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",t="";return Number.isFinite(n)?t="NaN":n>0?t="infinity":t="-infinity",t+=e},vS=function(n){return S7(w7(n))},us=function(r){function n(e){var t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Kn.kNumber;di(this,n),t=Gd(this,n);var a;return typeof i=="string"?a=k7(i):a=i,t.unit=a,t.value=e,t}return zd(n,r),hi(n,[{key:"clone",value:function(){return new n(this.value,this.unit)}},{key:"equals",value:function(t){var i=t;return this.value===i.value&&this.unit===i.unit}},{key:"getType",value:function(){return Bm.kUnitType}},{key:"convertTo",value:function(t){if(this.unit===t)return new n(this.value,this.unit);var i=vS(this.unit);if(i!==vS(t)||i===Kn.kUnknown)return null;var a=NO(this.unit)/NO(t);return new n(this.value*a,t)}},{key:"buildCSSText",value:function(t,i,a){var s;switch(this.unit){case Kn.kUnknown:break;case Kn.kInteger:s=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 o=-999999,l=999999,u=this.value,c=fS(this.unit);if(u<o||u>l){var d=fS(this.unit);!Number.isFinite(u)||Number.isNaN(u)?s=C7(u,d):s=u+(d||"")}else s="".concat(u).concat(c)}}return a+=s,a}}])}(s1),Ih=new us(0,"px");new us(1,"px");var o_=new us(0,"deg"),gS=function(r){function n(e,t,i){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;return di(this,n),a=Gd(this,n,["rgb"]),a.r=e,a.g=t,a.b=i,a.alpha=s,a.isNone=o,a}return zd(n,r),hi(n,[{key:"clone",value:function(){return new n(this.r,this.g,this.b,this.alpha)}},{key:"buildCSSText",value:function(t,i,a){return"".concat(a,"rgba(").concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")}}])}(T7),OO=new jd("unset"),M7=new jd("initial"),P7=new jd("inherit"),_S={"":OO,unset:OO,initial:M7,inherit:P7},N7=function(n){return _S[n]||(_S[n]=new jd(n)),_S[n]},RO=new gS(0,0,0,0,!0),AO=new gS(0,0,0,0),O7=lc(function(r,n,e,t){return new gS(r,n,e,t)},function(r,n,e,t){return"rgba(".concat(r,",").concat(n,",").concat(e,",").concat(t,")")}),yo=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Kn.kNumber;return new us(n,e)};new us(50,"%");function R7(r){var n=r.type,e=r.value;return n==="hex"?"#".concat(e):n==="literal"?e:n==="rgb"?"rgb(".concat(e.join(","),")"):"rgba(".concat(e.join(","),")")}var A7=function(){var r={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},n="";function e(V){throw new Error("".concat(n,": ").concat(V))}function t(){var V=i();return n.length>0&&e("Invalid input not EOF"),V}function i(){return T(a)}function a(){return s("linear-gradient",r.linearGradient,l)||s("repeating-linear-gradient",r.repeatingLinearGradient,l)||s("radial-gradient",r.radialGradient,d)||s("repeating-radial-gradient",r.repeatingRadialGradient,d)||s("conic-gradient",r.conicGradient,d)}function s(V,ee,he){return o(ee,function(ut){var ct=he();return ct&&(ue(r.comma)||e("Missing comma before color stops")),{type:V,orientation:ct,colorStops:T(G)}})}function o(V,ee){var he=ue(V);if(he){ue(r.startCall)||e("Missing (");var ut=ee(he);return ue(r.endCall)||e("Missing )"),ut}}function l(){return u()||c()}function u(){return le("directional",r.sideOrCorner,1)}function c(){return le("angular",r.angleValue,1)}function d(){var V,ee=h(),he;return ee&&(V=[],V.push(ee),he=n,ue(r.comma)&&(ee=h(),ee?V.push(ee):n=he)),V}function h(){var V=f()||v();if(V)V.at=m();else{var ee=g();if(ee){V=ee;var he=m();he&&(V.at=he)}else{var ut=y();ut&&(V={type:"default-radial",at:ut})}}return V}function f(){var V=le("shape",/^(circle)/i,0);return V&&(V.style=te()||g()),V}function v(){var V=le("shape",/^(ellipse)/i,0);return V&&(V.style=j()||g()),V}function g(){return le("extent-keyword",r.extentKeywords,1)}function m(){if(le("position",/^at/,0)){var V=y();return V||e("Missing positioning value"),V}}function y(){var V=w();if(V.x||V.y)return{type:"position",value:V}}function w(){return{x:j(),y:j()}}function T(V){var ee=V(),he=[];if(ee)for(he.push(ee);ue(r.comma);)ee=V(),ee?he.push(ee):e("One extra comma");return he}function G(){var V=x();return V||e("Expected color definition"),V.length=j(),V}function x(){return p()||R()||b()||_()}function _(){return le("literal",r.literalColor,0)}function p(){return le("hex",r.hexColor,1)}function b(){return o(r.rgbColor,function(){return{type:"rgb",value:T(B)}})}function R(){return o(r.rgbaColor,function(){return{type:"rgba",value:T(B)}})}function B(){return ue(r.number)[1]}function j(){return le("%",r.percentageValue,1)||Z()||te()}function Z(){return le("position-keyword",r.positionKeywords,1)}function te(){return le("px",r.pixelValue,1)||le("em",r.emValue,1)}function le(V,ee,he){var ut=ue(ee);if(ut)return{type:V,value:ut[he]}}function ue(V){var ee=/^[\n\r\t\s]+/.exec(n);ee&&se(ee[0].length);var he=V.exec(n);return he&&se(he[0].length),he}function se(V){n=n.substring(V)}return function(V){return n=V,t()}}();function hTe(r,n,e,t){var i=$s(t.value),a=0,s=0,o=a+n/2,l=s+e/2,u=Math.abs(n*Math.cos(i))+Math.abs(e*Math.sin(i)),c=r[0]+o-Math.cos(i)*u/2,d=r[1]+l-Math.sin(i)*u/2,h=r[0]+o+Math.cos(i)*u/2,f=r[1]+l+Math.sin(i)*u/2;return{x1:c,y1:d,x2:h,y2:f}}function fTe(r,n,e,t,i,a){var s=t.value,o=i.value;t.unit===Kn.kPercentage&&(s=t.value/100*n),i.unit===Kn.kPercentage&&(o=i.value/100*e);var l=Math.max(distanceSquareRoot([0,0],[s,o]),distanceSquareRoot([0,e],[s,o]),distanceSquareRoot([n,e],[s,o]),distanceSquareRoot([n,0],[s,o]));return a&&(a instanceof us?l=a.value:a instanceof jd&&(a.value==="closest-side"?l=Math.min(s,n-s,o,e-o):a.value==="farthest-side"?l=Math.max(s,n-s,o,e-o):a.value==="closest-corner"&&(l=Math.min(distanceSquareRoot([0,0],[s,o]),distanceSquareRoot([0,e],[s,o]),distanceSquareRoot([n,e],[s,o]),distanceSquareRoot([n,0],[s,o]))))),{x:s+r[0],y:o+r[1],r:l}}var L7=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,I7=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,D7=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,LO=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function F7(r){var n,e=r.length;if(r[e-1].length=(n=r[e-1].length)!==null&&n!==void 0?n:{type:"%",value:"100"},e>1){var t;r[0].length=(t=r[0].length)!==null&&t!==void 0?t:{type:"%",value:"0"}}for(var i=0,a=Number(r[0].length.value),s=1;s<e;s++){var o,l=(o=r[s].length)===null||o===void 0?void 0:o.value;if(!(0,xe.Z)(l)&&!(0,xe.Z)(a)){for(var u=1;u<s-i;u++)r[i+u].length={type:"%",value:"".concat(a+(Number(l)-a)*u/(s-i))};i=s,a=Number(l)}}}var B7={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},$7=lc(function(r){var n;return r.type==="angular"?n=Number(r.value):n=B7[r.value]||0,yo(n,"deg")}),G7=lc(function(r){var n=50,e=50,t="%",i="%";if((r==null?void 0:r.type)==="position"){var a=r.value,s=a.x,o=a.y;(s==null?void 0:s.type)==="position-keyword"&&(s.value==="left"?n=0:s.value==="center"?n=50:s.value==="right"?n=100:s.value==="top"?e=0:s.value==="bottom"&&(e=100)),(o==null?void 0:o.type)==="position-keyword"&&(o.value==="left"?n=0:o.value==="center"?e=50:o.value==="right"?n=100:o.value==="top"?e=0:o.value==="bottom"&&(e=100)),((s==null?void 0:s.type)==="px"||(s==null?void 0:s.type)==="%"||(s==null?void 0:s.type)==="em")&&(t=s==null?void 0:s.type,n=Number(s.value)),((o==null?void 0:o.type)==="px"||(o==null?void 0:o.type)==="%"||(o==null?void 0:o.type)==="em")&&(i=o==null?void 0:o.type,e=Number(o.value))}return{cx:yo(n,t),cy:yo(e,i)}}),z7=lc(function(r){if(r.indexOf("linear")>-1||r.indexOf("radial")>-1){var n=A7(r);return n.map(function(o){var l=o.type,u=o.orientation,c=o.colorStops;F7(c);var d=c.map(function(T){return{offset:yo(Number(T.length.value),"%"),color:R7(T)}});if(l==="linear-gradient")return new l1(o1.LinearGradient,{angle:u?$7(u):o_,steps:d});if(l==="radial-gradient"&&(u||(u=[{type:"shape",value:"circle"}]),u[0].type==="shape"&&u[0].value==="circle")){var h=G7(u[0].at),f=h.cx,v=h.cy,g;if(u[0].style){var m=u[0].style,y=m.type,w=m.value;y==="extent-keyword"?g=N7(w):g=yo(w,y)}return new l1(o1.RadialGradient,{cx:f,cy:v,size:g,steps:d})}})}var e=r[0];if(r[1]==="("||r[2]==="("){if(e==="l"){var t=L7.exec(r);if(t){var i,a=((i=t[2].match(LO))===null||i===void 0?void 0:i.map(function(o){return o.split(":")}))||[];return[new l1(o1.LinearGradient,{angle:yo(parseFloat(t[1]),"deg"),steps:a.map(function(o){var l=Nf(o,2),u=l[0],c=l[1];return{offset:yo(Number(u)*100,"%"),color:c}})})]}}else if(e==="r"){var s=V7(r);if(s)if((0,Ze.Z)(s))r=s;else return[new l1(o1.RadialGradient,s)]}else if(e==="p")return U7(r)}});function V7(r){var n=I7.exec(r);if(n){var e,t=((e=n[4].match(LO))===null||e===void 0?void 0:e.map(function(i){return i.split(":")}))||[];return{cx:yo(50,"%"),cy:yo(50,"%"),steps:t.map(function(i){var a=Nf(i,2),s=a[0],o=a[1];return{offset:yo(Number(s)*100,"%"),color:o}})}}return null}function U7(r){var n=D7.exec(r);if(n){var e=n[1],t=n[2];switch(e){case"a":e="repeat";break;case"x":e="repeat-x";break;case"y":e="repeat-y";break;case"n":e="no-repeat";break;default:e="no-repeat"}return{image:t,repetition:e}}return null}function vTe(r){return!!r.type&&!!r.value}function j7(r){return r&&!!r.image}function IO(r){return r&&!(0,xe.Z)(r.r)&&!(0,xe.Z)(r.g)&&!(0,xe.Z)(r.b)}var O0=lc(function(r){if(j7(r))return S0({repetition:"repeat"},r);if((0,xe.Z)(r)&&(r=""),r==="transparent")return AO;if(r==="currentColor")r="black";else if(r==="none")return RO;var n=z7(r);if(n)return n;var e=t1(r),t=[0,0,0,0];return e!==null&&(t[0]=e.r||0,t[1]=e.g||0,t[2]=e.b||0,t[3]=e.opacity),O7.apply(void 0,t)});function H7(r,n){if(!(!IO(r)||!IO(n)))return[[Number(r.r),Number(r.g),Number(r.b),Number(r.alpha)],[Number(n.r),Number(n.g),Number(n.b),Number(n.alpha)],function(e){var t=e.slice();if(t[3])for(var i=0;i<3;i++)t[i]=Math.round((0,O.Z)(t[i],0,255));return t[3]=(0,O.Z)(t[3],0,1),"rgba(".concat(t.join(","),")")}]}function R0(r,n){if((0,xe.Z)(n))return yo(0,"px");if(n="".concat(n).trim().toLowerCase(),isFinite(Number(n))){if("px".search(r)>=0)return yo(Number(n),"px");if("deg".search(r)>=0)return yo(Number(n),"deg")}var e=[];n=n.replace(r,function(i){return e.push(i),"U".concat(i)});var t="U(".concat(r.source,")");return e.map(function(i){return yo(Number(n.replace(new RegExp("U".concat(i),"g"),"").replace(new RegExp(t,"g"),"*0")),i)})[0]}var DO=function(n){return R0(new RegExp("px","g"),n)},W7=lc(DO),Y7=function(n){return R0(new RegExp("%","g"),n)};lc(Y7);var FO=function(n){return(0,pe.Z)(n)||isFinite(Number(n))?yo(Number(n)||0,"px"):R0(new RegExp("px|%|em|rem","g"),n)},mS=lc(FO),BO=function(n){return R0(new RegExp("deg|rad|grad|turn","g"),n)},Z7=lc(BO);function X7(r,n,e,t){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a="",s=r.value||0,o=n.value||0,l=vS(r.unit),u=r.convertTo(l),c=n.convertTo(l);return u&&c?(s=u.value,o=c.value,a=fS(r.unit)):(us.isLength(r.unit)||us.isLength(n.unit))&&(s=vd(r,i,e),o=vd(n,i,e),a="px"),[s,o,function(d){return t&&(d=Math.max(d,0)),d+a}]}function Mc(r){var n=0;return r.unit===Kn.kDegrees?n=r.value:r.unit===Kn.kRadians?n=Rf(Number(r.value)):r.unit===Kn.kTurns?n=u7(Number(r.value)):r.value&&(n=r.value),n}function $O(r,n){var e;return Array.isArray(r)?e=r.map(function(t){return Number(t)}):(0,Ze.Z)(r)?e=r.split(" ").map(function(t){return Number(t)}):(0,pe.Z)(r)&&(e=[r]),n===2?e.length===1?[e[0],e[0]]:[e[0],e[1]]:e.length===1?[e[0],e[0],e[0],e[0]]:e.length===2?[e[0],e[1],e[0],e[1]]:e.length===3?[e[0],e[1],e[2],e[1]]:[e[0],e[1],e[2],e[3]]}function vd(r,n,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(r.unit===Kn.kPixels)return Number(r.value);if(r.unit===Kn.kPercentage&&e){var i=e.nodeName===bi.GROUP?e.getLocalBounds():e.getGeometryBounds();return(t?i.min[n]:0)+r.value/100*i.halfExtents[n]*2}return 0}var K7=function(n){return R0(/deg|rad|grad|turn|px|%/g,n)},J7=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function Q7(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(r=r.toLowerCase().trim(),r==="none")return[];for(var n=/\s*([\w-]+)\(([^)]*)\)/g,e=[],t,i=0;t=n.exec(r);){if(t.index!==i)return[];if(i=t.index+t[0].length,J7.indexOf(t[1])>-1&&e.push({name:t[1],params:t[2].split(" ").map(function(a){return K7(a)||O0(a)})}),n.lastIndex===r.length)return e}return[]}function GO(r){return r.toString()}var zO=function(n){return typeof n=="number"?yo(n):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(n)?yo(Number(n)):yo(0)},pS=lc(zO);lc(function(r){return(0,Ze.Z)(r)?r.split(" ").map(pS):r.map(pS)});function yS(r,n){return[r,n,GO]}function xS(r,n){return function(e,t){return[e,t,function(i){return GO((0,O.Z)(i,r,n))}]}}function VO(r,n){if(r.length===n.length)return[r,n,function(e){return e}]}function gTe(r){return r.parsedStyle.d.totalLength===0&&(r.parsedStyle.d.totalLength=getTotalLength(r.parsedStyle.d.absolutePath)),r.parsedStyle.d.totalLength}function _Te(r){return r.parsedStyle.points.totalLength===0&&(r.parsedStyle.points.totalLength=polylineLength(r.parsedStyle.points.points)),r.parsedStyle.points.totalLength}function q7(r){for(var n=0;n<r.length;n++){var e=r[n-1],t=r[n],i=t[0];if(i==="M"&&e){var a=e[0],s=[t[1],t[2]],o=void 0;a==="L"||a==="M"?o=[e[1],e[2]]:(a==="C"||a==="A"||a==="Q")&&(o=[e[e.length-2],e[e.length-1]]),o&&u1(s,o)&&(r.splice(n,1),n--)}}}function e9(r){for(var n=!1,e=r.length,t=0;t<e;t++){var i=r[t],a=i[0];if(a==="C"||a==="A"||a==="Q"){n=!0;break}}return n}function t9(r){for(var n=[],e=[],t=[],i=0;i<r.length;i++){var a=r[i],s=a[0];s==="M"?(t.length&&(e.push(t),t=[]),t.push([a[1],a[2]])):s==="Z"?t.length&&(n.push(t),t=[]):t.push([a[1],a[2]])}return t.length>0&&e.push(t),{polygons:n,polylines:e}}function u1(r,n){return r[0]===n[0]&&r[1]===n[1]}function n9(r,n){for(var e=[],t=[],i=[],a=0;a<r.length;a++){var s=r[a],o=s.currentPoint,l=s.params,u=s.prePoint,c=void 0;switch(s.command){case"Q":c=(0,Nt.x4)(u[0],u[1],l[1],l[2],l[3],l[4]);break;case"C":c=(0,Nt.l5)(u[0],u[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var d=s.arcParams;c=(0,Nt.vp)(d.cx,d.cy,d.rx,d.ry,d.xRotation,d.startAngle,d.endAngle);break;default:e.push(o[0]),t.push(o[1]);break}c&&(s.box=c,e.push(c.x,c.x+c.width),t.push(c.y,c.y+c.height)),n&&(s.command==="L"||s.command==="M")&&s.prePoint&&s.nextPoint&&i.push(s)}e=e.filter(function(G){return!Number.isNaN(G)&&G!==1/0&&G!==-1/0}),t=t.filter(function(G){return!Number.isNaN(G)&&G!==1/0&&G!==-1/0});var h=(0,ne.Z)(e),f=(0,ne.Z)(t),v=(0,qe.Z)(e),g=(0,qe.Z)(t);if(i.length===0)return{x:h,y:f,width:v-h,height:g-f};for(var m=0;m<i.length;m++){var y=i[m],w=y.currentPoint,T=void 0;w[0]===h?(T=c1(y,n),h-=T.xExtra):w[0]===v&&(T=c1(y,n),v+=T.xExtra),w[1]===f?(T=c1(y,n),f-=T.yExtra):w[1]===g&&(T=c1(y,n),g+=T.yExtra)}return{x:h,y:f,width:v-h,height:g-f}}function c1(r,n){var e=r.prePoint,t=r.currentPoint,i=r.nextPoint,a=Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2),s=Math.pow(t[0]-i[0],2)+Math.pow(t[1]-i[1],2),o=Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2),l=Math.acos((a+s-o)/(2*Math.sqrt(a)*Math.sqrt(s)));if(!l||Math.sin(l)===0||(0,dt.Z)(l,0))return{xExtra:0,yExtra:0};var u=Math.abs(Math.atan2(i[1]-t[1],i[0]-t[0])),c=Math.abs(Math.atan2(i[0]-t[0],i[1]-t[1]));u=u>Math.PI/2?Math.PI-u:u,c=c>Math.PI/2?Math.PI-c:c;var d={xExtra:Math.cos(l/2-u)*(n/2*(1/Math.sin(l/2)))-n/2||0,yExtra:Math.cos(c-l/2)*(n/2*(1/Math.sin(l/2)))-n/2||0};return d}function UO(r,n){return[n[0]+(n[0]-r[0]),n[1]+(n[1]-r[1])]}var jO=function(n,e){var t=n.x*e.x+n.y*e.y,i=Math.sqrt((Math.pow(n.x,2)+Math.pow(n.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2))),a=n.x*e.y-n.y*e.x<0?-1:1,s=a*Math.acos(t/i);return s},HO=function(n,e,t,i,a,s,o,l){e=Math.abs(e),t=Math.abs(t),i=(0,nt.Z)(i,360);var u=$s(i);if(n.x===o.x&&n.y===o.y)return{x:n.x,y:n.y,ellipticalArcAngle:0};if(e===0||t===0)return{x:0,y:0,ellipticalArcAngle:0};var c=(n.x-o.x)/2,d=(n.y-o.y)/2,h={x:Math.cos(u)*c+Math.sin(u)*d,y:-Math.sin(u)*c+Math.cos(u)*d},f=Math.pow(h.x,2)/Math.pow(e,2)+Math.pow(h.y,2)/Math.pow(t,2);f>1&&(e*=Math.sqrt(f),t*=Math.sqrt(f));var v=Math.pow(e,2)*Math.pow(t,2)-Math.pow(e,2)*Math.pow(h.y,2)-Math.pow(t,2)*Math.pow(h.x,2),g=Math.pow(e,2)*Math.pow(h.y,2)+Math.pow(t,2)*Math.pow(h.x,2),m=v/g;m=m<0?0:m;var y=(a!==s?1:-1)*Math.sqrt(m),w={x:y*(e*h.y/t),y:y*(-(t*h.x)/e)},T={x:Math.cos(u)*w.x-Math.sin(u)*w.y+(n.x+o.x)/2,y:Math.sin(u)*w.x+Math.cos(u)*w.y+(n.y+o.y)/2},G={x:(h.x-w.x)/e,y:(h.y-w.y)/t},x=jO({x:1,y:0},G),_={x:(-h.x-w.x)/e,y:(-h.y-w.y)/t},p=jO(G,_);!s&&p>0?p-=2*Math.PI:s&&p<0&&(p+=2*Math.PI),p%=2*Math.PI;var b=x+p*l,R=e*Math.cos(b),B=t*Math.sin(b),j={x:Math.cos(u)*R-Math.sin(u)*B+T.x,y:Math.sin(u)*R+Math.cos(u)*B+T.y,ellipticalArcStartAngle:x,ellipticalArcEndAngle:x+p,ellipticalArcAngle:b,ellipticalArcCenter:T,resultantRx:e,resultantRy:t};return j};function r9(r){for(var n=[],e=null,t=null,i=null,a=0,s=r.length,o=0;o<s;o++){var l=r[o];t=r[o+1];var u=l[0],c={command:u,prePoint:e,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(u){case"M":i=[l[1],l[2]],a=o;break;case"A":var d=i9(e,l);c.arcParams=d;break}if(u==="Z")e=i,t=r[a+1];else{var h=l.length;e=[l[h-2],l[h-1]]}t&&t[0]==="Z"&&(t=r[a],n[a]&&(n[a].prePoint=e)),c.currentPoint=e,n[a]&&u1(e,n[a].currentPoint)&&(n[a].prePoint=c.prePoint);var f=t?[t[t.length-2],t[t.length-1]]:null;c.nextPoint=f;var v=c.prePoint;if(["L","H","V"].includes(u))c.startTangent=[v[0]-e[0],v[1]-e[1]],c.endTangent=[e[0]-v[0],e[1]-v[1]];else if(u==="Q"){var g=[l[1],l[2]];c.startTangent=[v[0]-g[0],v[1]-g[1]],c.endTangent=[e[0]-g[0],e[1]-g[1]]}else if(u==="T"){var m=n[o-1],y=UO(m.currentPoint,v);m.command==="Q"?(c.command="Q",c.startTangent=[v[0]-y[0],v[1]-y[1]],c.endTangent=[e[0]-y[0],e[1]-y[1]]):(c.command="TL",c.startTangent=[v[0]-e[0],v[1]-e[1]],c.endTangent=[e[0]-v[0],e[1]-v[1]])}else if(u==="C"){var w=[l[1],l[2]],T=[l[3],l[4]];c.startTangent=[v[0]-w[0],v[1]-w[1]],c.endTangent=[e[0]-T[0],e[1]-T[1]],c.startTangent[0]===0&&c.startTangent[1]===0&&(c.startTangent=[w[0]-T[0],w[1]-T[1]]),c.endTangent[0]===0&&c.endTangent[1]===0&&(c.endTangent=[T[0]-w[0],T[1]-w[1]])}else if(u==="S"){var G=n[o-1],x=UO(G.currentPoint,v),_=[l[1],l[2]];G.command==="C"?(c.command="C",c.startTangent=[v[0]-x[0],v[1]-x[1]],c.endTangent=[e[0]-_[0],e[1]-_[1]]):(c.command="SQ",c.startTangent=[v[0]-_[0],v[1]-_[1]],c.endTangent=[e[0]-_[0],e[1]-_[1]])}else if(u==="A"){var p=WO(c,0),b=p.x,R=p.y,B=WO(c,1,!1),j=B.x,Z=B.y;c.startTangent=[b,R],c.endTangent=[j,Z]}n.push(c)}return n}function WO(r,n){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,t=r.arcParams,i=t.rx,a=i===void 0?0:i,s=t.ry,o=s===void 0?0:s,l=t.xRotation,u=t.arcFlag,c=t.sweepFlag,d=HO({x:r.prePoint[0],y:r.prePoint[1]},a,o,l,!!u,!!c,{x:r.currentPoint[0],y:r.currentPoint[1]},n),h=HO({x:r.prePoint[0],y:r.prePoint[1]},a,o,l,!!u,!!c,{x:r.currentPoint[0],y:r.currentPoint[1]},e?n+.005:n-.005),f=h.x-d.x,v=h.y-d.y,g=Math.sqrt(f*f+v*v);return{x:-f/g,y:-v/g}}function d1(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function ES(r,n){return d1(r)*d1(n)?(r[0]*n[0]+r[1]*n[1])/(d1(r)*d1(n)):1}function YO(r,n){return(r[0]*n[1]<r[1]*n[0]?-1:1)*Math.acos(ES(r,n))}function i9(r,n){var e=n[1],t=n[2],i=(0,nt.Z)($s(n[3]),Math.PI*2),a=n[4],s=n[5],o=r[0],l=r[1],u=n[6],c=n[7],d=Math.cos(i)*(o-u)/2+Math.sin(i)*(l-c)/2,h=-1*Math.sin(i)*(o-u)/2+Math.cos(i)*(l-c)/2,f=d*d/(e*e)+h*h/(t*t);f>1&&(e*=Math.sqrt(f),t*=Math.sqrt(f));var v=e*e*(h*h)+t*t*(d*d),g=v?Math.sqrt((e*e*(t*t)-v)/v):1;a===s&&(g*=-1),isNaN(g)&&(g=0);var m=t?g*e*h/t:0,y=e?g*-t*d/e:0,w=(o+u)/2+Math.cos(i)*m-Math.sin(i)*y,T=(l+c)/2+Math.sin(i)*m+Math.cos(i)*y,G=[(d-m)/e,(h-y)/t],x=[(-1*d-m)/e,(-1*h-y)/t],_=YO([1,0],G),p=YO(G,x);return ES(G,x)<=-1&&(p=Math.PI),ES(G,x)>=1&&(p=0),s===0&&p>0&&(p-=2*Math.PI),s===1&&p<0&&(p+=2*Math.PI),{cx:w,cy:T,rx:u1(r,[u,c])?0:e,ry:u1(r,[u,c])?0:t,startAngle:_,endAngle:_+p,xRotation:i,arcFlag:a,sweepFlag:s}}function a9(r,n,e){return r.reduce(function(t,i){var a="";if(i[0]==="M"||i[0]==="L"){var s=vec3.fromValues(i[1],i[2],0);e&&vec3.transformMat4(s,s,e),a="".concat(i[0]).concat(s[0],",").concat(s[1])}else if(i[0]==="Z")a=i[0];else if(i[0]==="C"){var o=vec3.fromValues(i[1],i[2],0),l=vec3.fromValues(i[3],i[4],0),u=vec3.fromValues(i[5],i[6],0);e&&(vec3.transformMat4(o,o,e),vec3.transformMat4(l,l,e),vec3.transformMat4(u,u,e)),a="".concat(i[0]).concat(o[0],",").concat(o[1],",").concat(l[0],",").concat(l[1],",").concat(u[0],",").concat(u[1])}else if(i[0]==="A"){var c=vec3.fromValues(i[6],i[7],0);e&&vec3.transformMat4(c,c,e),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],",").concat(i[5],",").concat(c[0],",").concat(c[1])}else if(i[0]==="Q"){var d=vec3.fromValues(i[1],i[2],0),h=vec3.fromValues(i[3],i[4],0);e&&(vec3.transformMat4(d,d,e),vec3.transformMat4(h,h,e)),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],"}")}return t+=a},"")}function s9(r,n,e,t){return[["M",r,n],["L",e,t]]}function ZO(r,n,e,t){var i=(-1+Math.sqrt(2))/3*4,a=r*i,s=n*i,o=e-r,l=e+r,u=t-n,c=t+n;return[["M",o,t],["C",o,t-s,e-a,u,e,u],["C",e+a,u,l,t-s,l,t],["C",l,t+s,e+a,c,e,c],["C",e-a,c,o,t+s,o,t],["Z"]]}function o9(r,n){var e=r.map(function(t,i){return[i===0?"M":"L",t[0],t[1]]});return n&&e.push(["Z"]),e}function l9(r,n,e,t,i){if(i){var a=_slicedToArray(i,4),s=a[0],o=a[1],l=a[2],u=a[3],c=r>0?1:-1,d=n>0?1:-1,h=c+d!==0?1:0;return[["M",c*s+e,t],["L",r-c*o+e,t],o?["A",o,o,0,0,h,r+e,d*o+t]:null,["L",r+e,n-d*l+t],l?["A",l,l,0,0,h,r+e-c*l,n+t]:null,["L",e+c*u,n+t],u?["A",u,u,0,0,h,e,n+t-d*u]:null,["L",e,d*s+t],s?["A",s,s,0,0,h,c*s+e,t]:null,["Z"]].filter(function(f){return f})}return[["M",e,t],["L",e+r,t],["L",e+r,t+n],["L",e,t+n],["Z"]]}function mTe(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r.getLocalTransform(),e=[];switch(r.nodeName){case bi.LINE:var t=r.parsedStyle,i=t.x1,a=i===void 0?0:i,s=t.y1,o=s===void 0?0:s,l=t.x2,u=l===void 0?0:l,c=t.y2,d=c===void 0?0:c;e=s9(a,o,u,d);break;case bi.CIRCLE:{var h=r.parsedStyle,f=h.r,v=f===void 0?0:f,g=h.cx,m=g===void 0?0:g,y=h.cy,w=y===void 0?0:y;e=ZO(v,v,m,w);break}case bi.ELLIPSE:{var T=r.parsedStyle,G=T.rx,x=G===void 0?0:G,_=T.ry,p=_===void 0?0:_,b=T.cx,R=b===void 0?0:b,B=T.cy,j=B===void 0?0:B;e=ZO(x,p,R,j);break}case bi.POLYLINE:case bi.POLYGON:var Z=r.parsedStyle.points;e=o9(Z.points,r.nodeName===bi.POLYGON);break;case bi.RECT:var te=r.parsedStyle,le=te.width,ue=le===void 0?0:le,se=te.height,V=se===void 0?0:se,ee=te.x,he=ee===void 0?0:ee,ut=te.y,ct=ut===void 0?0:ut,Lt=te.radius,vn=Lt&&Lt.some(function(rn){return rn!==0});e=l9(ue,V,he,ct,vn&&Lt.map(function(rn){return clamp(rn,0,Math.min(Math.abs(ue)/2,Math.abs(V)/2))}));break;case bi.PATH:var tn=r.parsedStyle.d.absolutePath;e=_toConsumableArray(tn);break}if(e.length)return a9(e,r,n)}function pTe(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a=r.map(function(s,o){var l=s[0],u=r[o+1],c=o===0&&(n!==0||e!==0),d=(o===r.length-1||u&&(u[0]==="M"||u[0]==="Z"))&&t!==0&&i!==0,h=c?[n,e]:[0,0],f=_slicedToArray(h,2),v=f[0],g=f[1],m=d?[t,i]:[0,0],y=_slicedToArray(m,2),w=y[0],T=y[1];switch(l){case"M":return"M ".concat(s[1]+v,",").concat(s[2]+g);case"L":return"L ".concat(s[1]+w,",").concat(s[2]+T);case"Q":return"Q ".concat(s[1]," ").concat(s[2],",").concat(s[3]+w," ").concat(s[4]+T);case"C":return"C ".concat(s[1]," ").concat(s[2],",").concat(s[3]," ").concat(s[4],",").concat(s[5]+w," ").concat(s[6]+T);case"A":return"A ".concat(s[1]," ").concat(s[2]," ").concat(s[3]," ").concat(s[4]," ").concat(s[5]," ").concat(s[6]+w," ").concat(s[7]+T);case"Z":return"Z";default:return null}}).filter(function(s){return s!==null}).join(" ");return~a.indexOf("NaN")?"":a}var XO=function(n){if(n===""||Array.isArray(n)&&n.length===0)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var e;try{e=(0,xt.A)(n)}catch(f){e=(0,xt.A)(""),console.error("[g]: Invalid SVG Path definition: ".concat(n))}q7(e);var t=e9(e),i=t9(e),a=i.polygons,s=i.polylines,o=r9(e),l=n9(o,0),u=l.x,c=l.y,d=l.width,h=l.height;return{absolutePath:e,hasArc:t,segments:o,polygons:a,polylines:s,totalLength:0,rect:{x:Number.isFinite(u)?u:0,y:Number.isFinite(c)?c:0,width:Number.isFinite(d)?d:0,height:Number.isFinite(h)?h:0}}},u9=lc(XO);function KO(r){return(0,Ze.Z)(r)?u9(r):XO(r)}function c9(r,n,e){var t=r.curve,i=n.curve;(!t||t.length===0)&&(t=(0,bt.Y)(r.absolutePath,!1),r.curve=t),(!i||i.length===0)&&(i=(0,bt.Y)(n.absolutePath,!1),n.curve=i);var a=[t,i];t.length!==i.length&&(a=(0,wt.x)(t,i));var s=(0,we.b)(a[0])!==(0,we.b)(a[1])?(0,oe.G)(a[0]):(0,Fe.U)(a[0]);return[s,(0,Ye.g)(a[1],s),function(o){return o}]}function d9(r,n){var e;return(0,Ze.Z)(r)?e=r.split(" ").map(function(t){var i=t.split(","),a=Nf(i,2),s=a[0],o=a[1];return[Number(s),Number(o)]}):e=r,{points:e,totalLength:0,segments:[]}}function h9(r,n){return[r.points,n.points,function(e){return e}]}var Vo=null,$m=/\s*(\w+)\(([^)]*)\)/g;function Pc(r){return function(n){var e=0;return r.map(function(t){return t===Vo?n[e++]:t})}}function l_(r){return r}var A0={matrix:["NNNNNN",[Vo,Vo,0,0,Vo,Vo,0,0,0,0,1,0,Vo,Vo,0,1],l_],matrix3d:["NNNNNNNNNNNNNNNN",l_],rotate:["A"],rotateX:["A"],rotateY:["A"],rotateZ:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",Pc([Vo,Vo,new us(1)]),l_],scaleX:["N",Pc([Vo,new us(1),new us(1)]),Pc([Vo,new us(1)])],scaleY:["N",Pc([new us(1),Vo,new us(1)]),Pc([new us(1),Vo])],scaleZ:["N",Pc([new us(1),new us(1),Vo])],scale3d:["NNN",l_],skew:["Aa",null,l_],skewX:["A",null,Pc([Vo,o_])],skewY:["A",null,Pc([o_,Vo])],translate:["Tt",Pc([Vo,Vo,Ih]),l_],translateX:["T",Pc([Vo,Ih,Ih]),Pc([Vo,Ih])],translateY:["T",Pc([Ih,Vo,Ih]),Pc([Ih,Vo])],translateZ:["L",Pc([Ih,Ih,Vo])],translate3d:["TTL",l_]};function JO(r){for(var n=[],e=r.length,t=0;t<e;t++){var i=r[t],a=i[0],s=i.slice(1);a==="translate"||a==="skew"?s.length===1&&s.push(0):a==="scale"&&s.length===1&&s.push(s[0]);var o=A0[a];if(!o)return[];var l=s.map(function(u){return yo(u)});n.push({t:a,d:l})}return n}function f9(r){if(Array.isArray(r))return JO(r);if(r=(r||"none").trim(),r==="none")return[];var n=[],e,t=0;for($m.lastIndex=0;e=$m.exec(r);){if(e.index!==t)return[];t=e.index+e[0].length;var i=e[1],a=A0[i];if(!a)return[];var s=e[2].split(","),o=a[0];if(o.length<s.length)return[];for(var l=[],u=0;u<o.length;u++){var c=s[u],d=o[u],h=void 0;if(c?h={A:function(v){return v.trim()==="0"?o_:Z7(v)},N:pS,T:mS,L:W7}[d.toUpperCase()](c):h={a:o_,n:l[0],t:Ih}[d],h===void 0)return[];l.push(h)}if(n.push({t:i,d:l}),$m.lastIndex===r.length)return n}return[]}function v9(r){if(Array.isArray(r))return JO(r);if(r=(r||"none").trim(),r==="none")return[];var n=[],e,t=0;for($m.lastIndex=0;e=$m.exec(r);){if(e.index!==t)return[];t=e.index+e[0].length;var i=e[1],a=A0[i];if(!a)return[];var s=e[2].split(","),o=a[0];if(o.length<s.length)return[];for(var l=[],u=0;u<o.length;u++){var c=s[u],d=o[u],h=void 0;if(c?h={A:function(v){return v.trim()==="0"?o_:BO(v)},N:zO,T:FO,L:DO}[d.toUpperCase()](c):h={a:o_,n:l[0],t:Ih}[d],h===void 0)return[];l.push(h)}if(n.push({t:i,d:l}),$m.lastIndex===r.length)return n}return[]}function g9(r){var n,e,t,i;switch(r.t){case"rotateX":return i=$s(Mc(r.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotateY":return i=$s(Mc(r.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotateZ":return i=$s(Mc(r.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":n=r.d[0].value,e=r.d[1].value,t=r.d[2].value,i=$s(Mc(r.d[3]));var a=n*n+e*e+t*t;if(a===0)n=1,e=0,t=0;else if(a!==1){var s=Math.sqrt(a);n/=s,e/=s,t/=s}var o=Math.sin(i/2),l=o*Math.cos(i/2),u=o*o;return[1-2*(e*e+t*t)*u,2*(n*e*u+t*l),2*(n*t*u-e*l),0,2*(n*e*u-t*l),1-2*(n*n+t*t)*u,2*(e*t*u+n*l),0,2*(n*t*u+e*l),2*(e*t*u-n*l),1-2*(n*n+e*e)*u,0,0,0,0,1];case"scale":return[r.d[0].value,0,0,0,0,r.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scaleX":return[r.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaleY":return[1,0,0,0,0,r.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scaleZ":return[1,0,0,0,0,1,0,0,0,0,r.d[0].value,0,0,0,0,1];case"scale3d":return[r.d[0].value,0,0,0,0,r.d[1].value,0,0,0,0,r.d[2].value,0,0,0,0,1];case"skew":var c=$s(Mc(r.d[0])),d=$s(Mc(r.d[1]));return[1,Math.tan(d),0,0,Math.tan(c),1,0,0,0,0,1,0,0,0,0,1];case"skewX":return i=$s(Mc(r.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewY":return i=$s(Mc(r.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return n=vd(r.d[0],0,null)||0,e=vd(r.d[1],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,e,0,1];case"translateX":return n=vd(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,0,0,1];case"translateY":return e=vd(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,e,0,1];case"translateZ":return t=vd(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,t,1];case"translate3d":return n=vd(r.d[0],0,null)||0,e=vd(r.d[1],0,null)||0,t=vd(r.d[2],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,e,t,1];case"perspective":var h=vd(r.d[0],0,null)||0,f=h?-1/h:0;return[1,0,0,0,0,1,0,0,0,0,1,f,0,0,0,1];case"matrix":return[r.d[0].value,r.d[1].value,0,0,r.d[2].value,r.d[3].value,0,0,0,0,1,0,r.d[4].value,r.d[5].value,0,1];case"matrix3d":return r.d.map(function(v){return v.value})}}function _9(r,n){return[r[0]*n[0]+r[4]*n[1]+r[8]*n[2]+r[12]*n[3],r[1]*n[0]+r[5]*n[1]+r[9]*n[2]+r[13]*n[3],r[2]*n[0]+r[6]*n[1]+r[10]*n[2]+r[14]*n[3],r[3]*n[0]+r[7]*n[1]+r[11]*n[2]+r[15]*n[3],r[0]*n[4]+r[4]*n[5]+r[8]*n[6]+r[12]*n[7],r[1]*n[4]+r[5]*n[5]+r[9]*n[6]+r[13]*n[7],r[2]*n[4]+r[6]*n[5]+r[10]*n[6]+r[14]*n[7],r[3]*n[4]+r[7]*n[5]+r[11]*n[6]+r[15]*n[7],r[0]*n[8]+r[4]*n[9]+r[8]*n[10]+r[12]*n[11],r[1]*n[8]+r[5]*n[9]+r[9]*n[10]+r[13]*n[11],r[2]*n[8]+r[6]*n[9]+r[10]*n[10]+r[14]*n[11],r[3]*n[8]+r[7]*n[9]+r[11]*n[10]+r[15]*n[11],r[0]*n[12]+r[4]*n[13]+r[8]*n[14]+r[12]*n[15],r[1]*n[12]+r[5]*n[13]+r[9]*n[14]+r[13]*n[15],r[2]*n[12]+r[6]*n[13]+r[10]*n[14]+r[14]*n[15],r[3]*n[12]+r[7]*n[13]+r[11]*n[14]+r[15]*n[15]]}function m9(r){return r.length===0?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:r.map(g9).reduce(_9)}function QO(r){var n=[0,0,0],e=[1,1,1],t=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return f7(m9(r),n,e,t,i,a),[[n,e,t,a,i]]}var p9=function(){function r(t,i){for(var a=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],s=0;s<4;s++)for(var o=0;o<4;o++)for(var l=0;l<4;l++)a[s][o]+=i[s][l]*t[l][o];return a}function n(t){return t[0][2]===0&&t[0][3]===0&&t[1][2]===0&&t[1][3]===0&&t[2][0]===0&&t[2][1]===0&&t[2][2]===1&&t[2][3]===0&&t[3][2]===0&&t[3][3]===1}function e(t,i,a,s,o){for(var l=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],u=0;u<4;u++)l[u][3]=o[u];for(var c=0;c<3;c++)for(var d=0;d<3;d++)l[3][c]+=t[d]*l[d][c];var h=s[0],f=s[1],v=s[2],g=s[3],m=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];m[0][0]=1-2*(f*f+v*v),m[0][1]=2*(h*f-v*g),m[0][2]=2*(h*v+f*g),m[1][0]=2*(h*f+v*g),m[1][1]=1-2*(h*h+v*v),m[1][2]=2*(f*v-h*g),m[2][0]=2*(h*v-f*g),m[2][1]=2*(f*v+h*g),m[2][2]=1-2*(h*h+f*f),l=r(l,m);var y=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];a[2]&&(y[2][1]=a[2],l=r(l,y)),a[1]&&(y[2][1]=0,y[2][0]=a[0],l=r(l,y)),a[0]&&(y[2][0]=0,y[1][0]=a[0],l=r(l,y));for(var w=0;w<3;w++)for(var T=0;T<3;T++)l[w][T]*=i[w];return n(l)?[l[0][0],l[0][1],l[1][0],l[1][1],l[3][0],l[3][1]]:l[0].concat(l[1],l[2],l[3])}return e}();function y9(r){return r.toFixed(6).replace(".000000","")}function bS(r,n){var e,t;return r.decompositionPair!==n&&(r.decompositionPair=n,e=QO(r)),n.decompositionPair!==r&&(n.decompositionPair=r,t=QO(n)),e[0]===null||t[0]===null?[[!1],[!0],function(i){return i?n[0].d:r[0].d}]:(e[0].push(0),t[0].push(1),[e,t,function(i){var a=E9(e[0][3],t[0][3],i[5]),s=p9(i[0],i[1],i[2],a,i[4]),o=s.map(y9).join(",");return o}])}function x9(r,n){for(var e=0,t=0;t<r.length;t++)e+=r[t]*n[t];return e}function E9(r,n,e){var t=x9(r,n);t=(0,O.Z)(t,-1,1);var i=[];if(t===1)i=r;else for(var a=Math.acos(t),s=Math.sin(e*a)*1/Math.sqrt(1-t*t),o=0;o<4;o++)i.push(r[o]*(Math.cos(e*a)-t*s)+n[o]*s);return i}function kS(r){return r.replace(/[XY]/,"")}function wS(r){return r.replace(/(X|Y|Z|3d)?$/,"3d")}var b9=function(n,e){return n==="perspective"&&e==="perspective"||(n==="matrix"||n==="matrix3d")&&(e==="matrix"||e==="matrix3d")};function k9(r,n,e){var t=!1;if(!r.length||!n.length){r.length||(t=!0,r=n,n=[]);for(var i=function(){var j=r[a],Z=j.t,te=j.d,le=Z.substring(0,5)==="scale"?1:0;n.push({t:Z,d:te.map(function(ue){return typeof ue=="number"?yo(le):yo(le,ue.unit)})})},a=0;a<r.length;a++)i()}var s=[],o=[],l=[];if(r.length!==n.length){var u=bS(r,n);s=[u[0]],o=[u[1]],l=[["matrix",[u[2]]]]}else for(var c=0;c<r.length;c++){var d=r[c].t,h=n[c].t,f=r[c].d,v=n[c].d,g=A0[d],m=A0[h],y=void 0;if(b9(d,h)){var w=bS([r[c]],[n[c]]);s.push(w[0]),o.push(w[1]),l.push(["matrix",[w[2]]]);continue}else if(d===h)y=d;else if(g[2]&&m[2]&&kS(d)===kS(h))y=kS(d),f=g[2](f),v=m[2](v);else if(g[1]&&m[1]&&wS(d)===wS(h))y=wS(d),f=g[1](f),v=m[1](v);else{var T=bS(r,n);s=[T[0]],o=[T[1]],l=[["matrix",[T[2]]]];break}for(var G=[],x=[],_=[],p=0;p<f.length;p++){var b=X7(f[p],v[p],e,!1,p);G[p]=b[0],x[p]=b[1],_.push(b[2])}s.push(G),o.push(x),l.push([y,_])}if(t){var R=s;s=o,o=R}return[s,o,function(B){return B.map(function(j,Z){var te=j.map(function(le,ue){return l[Z][1][ue](le)}).join(",");return l[Z][0]==="matrix"&&te.split(",").length===16&&(l[Z][0]="matrix3d"),l[Z][0]==="matrix3d"&&te.split(",").length===6&&(l[Z][0]="matrix"),"".concat(l[Z][0],"(").concat(te,")")}).join(" ")}]}var w9=lc(function(r){if((0,Ze.Z)(r)){if(r==="text-anchor")return[yo(0,"px"),yo(0,"px")];var n=r.split(" ");return n.length===1&&(n[0]==="top"||n[0]==="bottom"?(n[1]=n[0],n[0]="center"):n[1]="center"),n.length!==2?null:[mS(qO(n[0])),mS(qO(n[1]))]}return[yo(r[0]||0,"px"),yo(r[1]||0,"px")]});function qO(r){return r==="center"?"50%":r==="left"||r==="top"?"0%":r==="right"||r==="bottom"?"100%":r}var eR=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:$n.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:$n.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:$n.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:$n.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:$n.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:$n.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:$n.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:$n.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:$n.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:$n.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:$n.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:$n.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:$n.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:$n.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:$n.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:$n.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:$n.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:$n.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:$n.FILTER},{n:"clipPath",syntax:$n.DEFINED_PATH},{n:"textPath",syntax:$n.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:$n.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:$n.TRANSFORM},{n:"transformOrigin",p:100,d:"0 0",l:!0,syntax:$n.TRANSFORM_ORIGIN},{n:"cx",int:!0,l:!0,d:"0",syntax:$n.COORDINATE},{n:"cy",int:!0,l:!0,d:"0",syntax:$n.COORDINATE},{n:"cz",int:!0,l:!0,d:"0",syntax:$n.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:$n.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:$n.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:$n.LENGTH_PERCENTAGE},{n:"x",int:!0,l:!0,d:"0",syntax:$n.COORDINATE},{n:"y",int:!0,l:!0,d:"0",syntax:$n.COORDINATE},{n:"z",int:!0,l:!0,d:"0",syntax:$n.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:$n.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:$n.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:$n.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:$n.COORDINATE},{n:"y1",int:!0,l:!0,syntax:$n.COORDINATE},{n:"z1",int:!0,l:!0,syntax:$n.COORDINATE},{n:"x2",int:!0,l:!0,syntax:$n.COORDINATE},{n:"y2",int:!0,l:!0,syntax:$n.COORDINATE},{n:"z2",int:!0,l:!0,syntax:$n.COORDINATE},{n:"d",int:!0,l:!0,d:"",syntax:$n.PATH,p:50},{n:"points",int:!0,l:!0,syntax:$n.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:$n.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:$n.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:$n.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:$n.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:$n.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:$n.NUMBER,d:function(n){return n===bi.PATH||n===bi.POLYGON||n===bi.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:$n.MARKER},{n:"markerEnd",syntax:$n.MARKER},{n:"markerMid",syntax:$n.MARKER},{n:"markerStartOffset",syntax:$n.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:$n.LENGTH,l:!0,int:!0,d:"0"}],S9=new Set(eR.filter(function(r){return!!r.l}).map(function(r){return r.n})),T9={},C9=function(){function r(n){var e=this;di(this,r),this.runtime=n,eR.forEach(function(t){e.registerMetadata(t)})}return hi(r,[{key:"registerMetadata",value:function(e){[e.n].concat(ug(e.a||[])).forEach(function(t){T9[t]=e})}},{key:"getPropertySyntax",value:function(e){return this.runtime.CSSPropertySyntaxFactory[e]}},{key:"processProperties",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0};Object.assign(e.attributes,t);var a=e.parsedStyle.clipPath,s=e.parsedStyle.offsetPath;Object.assign(e.parsedStyle,t);var o=!!i.forceUpdateGeometry;if(!o){for(var l in t)if(S9.has(l)){o=!0;break}}t.fill&&(e.parsedStyle.fill=O0(t.fill)),t.stroke&&(e.parsedStyle.stroke=O0(t.stroke)),t.shadowColor&&(e.parsedStyle.shadowColor=O0(t.shadowColor)),t.filter&&(e.parsedStyle.filter=Q7(t.filter)),(0,xe.Z)(t.radius)||(e.parsedStyle.radius=$O(t.radius,4)),(0,xe.Z)(t.lineDash)||(e.parsedStyle.lineDash=$O(t.lineDash,2)),t.points&&(e.parsedStyle.points=d9(t.points)),t.d===""&&(e.parsedStyle.d=S0({},p7)),t.d&&(e.parsedStyle.d=KO(t.d)),t.textTransform&&this.runtime.CSSPropertySyntaxFactory[$n.TEXT_TRANSFORM].calculator(null,null,{value:t.textTransform},e,null),(0,ie.Z)(t.clipPath)||this.runtime.CSSPropertySyntaxFactory[$n.DEFINED_PATH].calculator("clipPath",a,t.clipPath,e,this.runtime),t.offsetPath&&this.runtime.CSSPropertySyntaxFactory[$n.DEFINED_PATH].calculator("offsetPath",s,t.offsetPath,e,this.runtime),t.transform&&(e.parsedStyle.transform=f9(t.transform)),t.transformOrigin&&(e.parsedStyle.transformOrigin=w9(t.transformOrigin)),t.markerStart&&(e.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory[$n.MARKER].calculator(null,t.markerStart,t.markerStart,null,null)),t.markerEnd&&(e.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory[$n.MARKER].calculator(null,t.markerEnd,t.markerEnd,null,null)),t.markerMid&&(e.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory[$n.MARKER].calculator("",t.markerMid,t.markerMid,null,null)),(0,xe.Z)(t.zIndex)||this.runtime.CSSPropertySyntaxFactory[$n.Z_INDEX].postProcessor(e),(0,xe.Z)(t.offsetDistance)||this.runtime.CSSPropertySyntaxFactory[$n.OFFSET_DISTANCE].postProcessor(e),t.transform&&this.runtime.CSSPropertySyntaxFactory[$n.TRANSFORM].postProcessor(e),t.transformOrigin&&this.runtime.CSSPropertySyntaxFactory[$n.TRANSFORM_ORIGIN].postProcessor(e),o&&(e.geometry.dirty=!0,e.renderable.boundsDirty=!0,e.renderable.renderBoundsDirty=!0,i.forceUpdateGeometry||this.runtime.sceneGraphService.dirtifyToRoot(e))}},{key:"updateGeometry",value:function(e){var t=e.nodeName,i=this.runtime.geometryUpdaterFactory[t];if(i){var a=e.geometry;a.contentBounds||(a.contentBounds=new Vd),a.renderBounds||(a.renderBounds=new Vd);var s=e.parsedStyle,o=i.update(s,e),l=o.cx,u=l===void 0?0:l,c=o.cy,d=c===void 0?0:c,h=o.cz,f=h===void 0?0:h,v=o.hwidth,g=v===void 0?0:v,m=o.hheight,y=m===void 0?0:m,w=o.hdepth,T=w===void 0?0:w,G=[Math.abs(g),Math.abs(y),T],x=s.stroke,_=s.lineWidth,p=_===void 0?1:_,b=s.increasedLineWidthForHitTesting,R=b===void 0?0:b,B=s.shadowType,j=B===void 0?"outer":B,Z=s.shadowColor,te=s.filter,le=te===void 0?[]:te,ue=s.transformOrigin,se=[u,d,f];a.contentBounds.update(se,G);var V=t===bi.POLYLINE||t===bi.POLYGON||t===bi.PATH?Math.SQRT2:.5,ee=x&&!x.isNone;if(ee){var he=((p||0)+(R||0))*V;G[0]+=he,G[1]+=he}if(a.renderBounds.update(se,G),Z&&j&&j!=="inner"){var ut=a.renderBounds,ct=ut.min,Lt=ut.max,vn=s.shadowBlur,tn=s.shadowOffsetX,rn=s.shadowOffsetY,mn=vn||0,ar=tn||0,gi=rn||0,kr=ct[0]-mn+ar,Ta=Lt[0]+mn+ar,Wa=ct[1]-mn+gi,la=Lt[1]+mn+gi;ct[0]=Math.min(ct[0],kr),Lt[0]=Math.max(Lt[0],Ta),ct[1]=Math.min(ct[1],Wa),Lt[1]=Math.max(Lt[1],la),a.renderBounds.setMinMax(ct,Lt)}le.forEach(function(so){var oo=so.name,qi=so.params;if(oo==="blur"){var lo=qi[0].value;a.renderBounds.update(a.renderBounds.center,E.IH(a.renderBounds.halfExtents,a.renderBounds.halfExtents,[lo,lo,0]))}else if(oo==="drop-shadow"){var uo=qi[0].value,co=qi[1].value,ea=qi[2].value,ho=a.renderBounds,Rr=ho.min,Ar=ho.max,Gu=Rr[0]-ea+uo,zu=Ar[0]+ea+uo,Vu=Rr[1]-ea+co,Uu=Ar[1]+ea+co;Rr[0]=Math.min(Rr[0],Gu),Ar[0]=Math.max(Ar[0],zu),Rr[1]=Math.min(Rr[1],Vu),Ar[1]=Math.max(Ar[1],Uu),a.renderBounds.setMinMax(Rr,Ar)}}),e.geometry.dirty=!1;var ys=g<0,Jl=y<0,xs=(ys?-1:1)*(ue?vd(ue[0],0,e,!0):0),Es=(Jl?-1:1)*(ue?vd(ue[1],1,e,!0):0);(xs||Es)&&e.setOrigin(xs,Es)}}},{key:"updateSizeAttenuation",value:function(e,t){e.style.isSizeAttenuation?(e.style.rawLineWidth||(e.style.rawLineWidth=e.style.lineWidth),e.style.lineWidth=(e.style.rawLineWidth||1)/t,e.nodeName===bi.CIRCLE&&(e.style.rawR||(e.style.rawR=e.style.r),e.style.r=(e.style.rawR||1)/t)):(e.style.rawLineWidth&&(e.style.lineWidth=e.style.rawLineWidth,delete e.style.rawLineWidth),e.nodeName===bi.CIRCLE&&e.style.rawR&&(e.style.r=e.style.rawR,delete e.style.rawR))}}])}(),M9=function(){function r(){di(this,r),this.mixer=yS}return hi(r,[{key:"calculator",value:function(e,t,i,a){return Mc(i)}}])}(),P9=function(){function r(){di(this,r)}return hi(r,[{key:"calculator",value:function(e,t,i,a,s){return i instanceof jd&&(i=null),s.sceneGraphService.updateDisplayObjectDependency(e,t,i,a),e==="clipPath"&&a.forEach(function(o){o.childNodes.length===0&&s.sceneGraphService.dirtifyToRoot(o)}),i}}])}(),N9=function(){function r(){di(this,r),this.parser=O0,this.mixer=H7}return hi(r,[{key:"calculator",value:function(e,t,i,a){return i instanceof jd?i.value==="none"?RO:AO:i}}])}(),O9=function(){function r(){di(this,r)}return hi(r,[{key:"calculator",value:function(e,t,i){return i instanceof jd?[]:i}}])}();function tR(r){var n=r.parsedStyle,e=n.fontSize;return(0,xe.Z)(e)?null:e}var SS=function(){function r(){di(this,r),this.mixer=yS}return hi(r,[{key:"calculator",value:function(e,t,i,a,s){if((0,pe.Z)(i))return i;if(us.isRelativeUnit(i.unit)){if(i.unit===Kn.kPercentage)return 0;if(i.unit===Kn.kEms){if(a.parentNode){var o=tR(a.parentNode);if(o)return o*=i.value,o}return 0}if(i.unit===Kn.kRems){var l;if(a!=null&&(l=a.ownerDocument)!==null&&l!==void 0&&l.documentElement){var u=tR(a.ownerDocument.documentElement);if(u)return u*=i.value,u}return 0}}else return i.value}}])}(),R9=function(){function r(){di(this,r),this.mixer=VO}return hi(r,[{key:"calculator",value:function(e,t,i){return i.map(function(a){return a.value})}}])}(),A9=function(){function r(){di(this,r),this.mixer=VO}return hi(r,[{key:"calculator",value:function(e,t,i){return i.map(function(a){return a.value})}}])}(),L9=function(){function r(){di(this,r)}return hi(r,[{key:"calculator",value:function(e,t,i,a){var s;i instanceof jd&&(i=null);var o=(s=i)===null||s===void 0?void 0:s.cloneNode(!0);return o&&(o.style.isMarker=!0),o}}])}(),I9=function(){function r(){di(this,r),this.mixer=yS}return hi(r,[{key:"calculator",value:function(e,t,i){return i.value}}])}(),D9=function(){function r(){di(this,r),this.mixer=xS(0,1)}return hi(r,[{key:"calculator",value:function(e,t,i){return i.value}},{key:"postProcessor",value:function(e){var t=e.parsedStyle,i=t.offsetPath,a=t.offsetDistance;if(i){var s=i.nodeName;if(s===bi.LINE||s===bi.PATH||s===bi.POLYLINE){var o=i.getPoint(a);o&&e.setLocalPosition(o.x,o.y)}}}}])}(),F9=function(){function r(){di(this,r),this.mixer=xS(0,1)}return hi(r,[{key:"calculator",value:function(e,t,i){return i.value}}])}(),B9=function(){function r(){di(this,r),this.parser=KO,this.mixer=c9}return hi(r,[{key:"calculator",value:function(e,t,i){return i instanceof jd&&i.value==="unset"?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new P0(0,0,0,0)}:i}}])}(),$9=hi(function r(){di(this,r),this.mixer=h9}),G9=function(r){function n(){var e;di(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Gd(this,n,[].concat(i)),e.mixer=xS(0,1/0),e}return zd(n,r),hi(n)}(SS),z9=function(){function r(){di(this,r)}return hi(r,[{key:"calculator",value:function(e,t,i,a){return i instanceof jd?i.value==="unset"?"":i.value:"".concat(i)}},{key:"postProcessor",value:function(e){e.nodeValue="".concat(e.parsedStyle.text)||""}}])}(),V9=function(){function r(){di(this,r)}return hi(r,[{key:"calculator",value:function(e,t,i,a){var s=a.getAttribute("text");if(s){var o=s;i.value==="capitalize"?o=s.charAt(0).toUpperCase()+s.slice(1):i.value==="lowercase"?o=s.toLowerCase():i.value==="uppercase"&&(o=s.toUpperCase()),a.parsedStyle.text=o}return i.value}}])}(),yTe=function(n){return Object.fromEntries(Object.entries(n).filter(function(e){var t=_slicedToArray(e,2),i=t[1];return i!==void 0}))},TS=new WeakMap;function xTe(r,n,e){if(r){var t=typeof r=="string"?document.getElementById(r):r;TS.has(t)&&TS.get(t).destroy(e),TS.set(t,n)}}var nR=typeof window!="undefined"&&typeof window.document!="undefined";function ETe(r){return!!r.getAttribute}function bTe(r,n){for(var e=0,t=r.length;e<t;){var i=e+t>>>1;U9(r[i],n)<0?e=i+1:t=i}return e}function U9(r,n){var e=Number(r.parsedStyle.zIndex||0),t=Number(n.parsedStyle.zIndex||0);if(e===t){var i=r.parentNode;if(i){var a=i.childNodes||[];return a.indexOf(r)-a.indexOf(n)}}return e-t}function j9(r){var n=r;do{var e,t=(e=n.parsedStyle)===null||e===void 0?void 0:e.clipPath;if(t)return n;n=n.parentElement}while(n!==null);return null}var rR="px";function kTe(r,n,e){nR&&r.style&&(r.style.width=n+rR,r.style.height=e+rR)}function iR(r,n){if(nR)return document.defaultView.getComputedStyle(r,null).getPropertyValue(n)}function wTe(r){var n=iR(r,"width");return n==="auto"?r.offsetWidth:parseFloat(n)}function STe(r){var n=iR(r,"height");return n==="auto"?r.offsetHeight:parseFloat(n)}var H9=1,W9={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},Y9=typeof performance=="object"&&performance.now?performance:Date;function aR(r){return r.nodeName===bi.FRAGMENT?!0:r.getRootNode().nodeName===bi.FRAGMENT}function TTe(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"auto",n=arguments.length>1?arguments[1]:void 0,e=arguments.length>2?arguments[2]:void 0,t=!1,i=!1,a=!!n&&!n.isNone,s=!!e&&!e.isNone;return r==="visiblepainted"||r==="painted"||r==="auto"?(t=a,i=s):r==="visiblefill"||r==="fill"?t=!0:r==="visiblestroke"||r==="stroke"?i=!0:(r==="visible"||r==="all")&&(t=!0,i=!0),[t,i]}var Z9=1,X9=function(){return Z9++},Lf=typeof self=="object"&&self.self===self?self:typeof k.g=="object"&&k.g.global===k.g?k.g:{},K9=Date.now(),J9=function(){return Lf.performance&&typeof Lf.performance.now=="function"?Lf.performance.now():Date.now()-K9},L0={},sR=Date.now(),Q9=function(n){if(typeof n!="function")throw new TypeError("".concat(n," is not a function"));var e=Date.now(),t=e-sR,i=t>16?0:16-t,a=X9();return L0[a]=n,Object.keys(L0).length>1||setTimeout(function(){sR=e;var s=L0;L0={},Object.keys(s).forEach(function(o){return s[o](J9())})},i),a},q9=function(n){delete L0[n]},eV=["","webkit","moz","ms","o"],oR=function(n){return typeof n!="string"?Q9:n===""?Lf.requestAnimationFrame:Lf["".concat(n,"RequestAnimationFrame")]},tV=function(n){return typeof n!="string"?q9:n===""?Lf.cancelAnimationFrame:Lf["".concat(n,"CancelAnimationFrame")]||Lf["".concat(n,"CancelRequestAnimationFrame")]},nV=function(n,e){for(var t=0;n[t]!==void 0;){if(e(n[t]))return n[t];t+=1}},lR=nV(eV,function(r){return!!oR(r)}),uR=oR(lR),rV=tV(lR);Lf.requestAnimationFrame=uR,Lf.cancelAnimationFrame=rV;var CTe=null,MTe=null,PTe=null,NTe=null,iV=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],aV=/([\"\'])[^\'\"]+\1/;function sV(r){for(var n=r.fontSize,e=n===void 0?16:n,t=r.fontFamily,i=t===void 0?"sans-serif":t,a=r.fontStyle,s=a===void 0?"normal":a,o=r.fontVariant,l=o===void 0?"normal":o,u=r.fontWeight,c=u===void 0?"normal":u,d=(0,pe.Z)(e)&&"".concat(e,"px")||"16px",h=i.split(","),f=h.length-1;f>=0;f--){var v=h[f].trim();!aV.test(v)&&iV.indexOf(v)<0&&(v='"'.concat(v,'"')),h[f]=v}return"".concat(s," ").concat(l," ").concat(c," ").concat(d," ").concat(h.join(","))}function CS(r,n,e){return L.identity(r),r[4]=Math.tan(n),r[1]=Math.tan(e),r}var wl=L.create(),oV=L.create(),lV={scale:function(n){L.fromScaling(wl,[n[0].value,n[1].value,1])},scaleX:function(n){L.fromScaling(wl,[n[0].value,1,1])},scaleY:function(n){L.fromScaling(wl,[1,n[0].value,1])},scaleZ:function(n){L.fromScaling(wl,[1,1,n[0].value])},scale3d:function(n){L.fromScaling(wl,[n[0].value,n[1].value,n[2].value])},translate:function(n){L.fromTranslation(wl,[n[0].value,n[1].value,0])},translateX:function(n){L.fromTranslation(wl,[n[0].value,0,0])},translateY:function(n){L.fromTranslation(wl,[0,n[0].value,0])},translateZ:function(n){L.fromTranslation(wl,[0,0,n[0].value])},translate3d:function(n){L.fromTranslation(wl,[n[0].value,n[1].value,n[2].value])},rotate:function(n){L.fromZRotation(wl,$s(Mc(n[0])))},rotateX:function(n){L.fromXRotation(wl,$s(Mc(n[0])))},rotateY:function(n){L.fromYRotation(wl,$s(Mc(n[0])))},rotateZ:function(n){L.fromZRotation(wl,$s(Mc(n[0])))},rotate3d:function(n){L.fromRotation(wl,$s(Mc(n[3])),[n[0].value,n[1].value,n[2].value])},skew:function(n){CS(wl,$s(n[0].value),$s(n[1].value))},skewX:function(n){CS(wl,$s(n[0].value),0)},skewY:function(n){CS(wl,0,$s(n[0].value))},matrix:function(n){L.set(wl,n[0].value,n[1].value,0,0,n[2].value,n[3].value,0,0,0,0,1,0,n[4].value,n[5].value,0,1)},matrix3d:function(n){L.set.apply(L,[wl].concat(ug(n.map(function(e){return e.value}))))}},uV=E.al(1,1,1),cV=E.Ue(),cR={translate:function(n,e){Fa.sceneGraphService.setLocalScale(n,uV,!1),Fa.sceneGraphService.setLocalEulerAngles(n,cV,void 0,void 0,!1),Fa.sceneGraphService.setLocalPosition(n,[e[0].value,e[1].value,0],!1),Fa.sceneGraphService.dirtifyLocal(n,n.transformable)}};function dV(r,n){if(r.length){if(r.length===1&&cR[r[0].t]){cR[r[0].t](n,r[0].d);return}for(var e=L.identity(oV),t=0;t<r.length;t++){var i=r[t],a=i.t,s=i.d,o=lV[a];o&&(o(s),L.mul(e,e,wl))}n.setLocalTransform(e)}else n.resetLocalTransform();return n.getLocalTransform()}var hV=function(){function r(){di(this,r),this.parser=v9,this.mixer=k9}return hi(r,[{key:"calculator",value:function(e,t,i,a){return i instanceof jd?[]:i}},{key:"postProcessor",value:function(e){dV(e.parsedStyle.transform,e)}}])}(),fV=function(){function r(){di(this,r)}return hi(r,[{key:"postProcessor",value:function(e){var t=e.parsedStyle.transformOrigin;t[0].unit===Kn.kPixels&&t[1].unit===Kn.kPixels?e.setOrigin(t[0].value,t[1].value):e.getGeometryBounds()}}])}(),vV=function(){function r(){di(this,r)}return hi(r,[{key:"calculator",value:function(e,t,i,a){return i.value}},{key:"postProcessor",value:function(e){if(e.parentNode){var t=e.parentNode,i=t.renderable,a=t.sortable;i&&(i.dirty=!0),a&&(a.dirty=!0,a.dirtyReason=hS.Z_INDEX_CHANGED)}}}])}(),gV=function(){function r(){di(this,r)}return hi(r,[{key:"update",value:function(e,t){var i=e.cx,a=i===void 0?0:i,s=e.cy,o=s===void 0?0:s,l=e.r,u=l===void 0?0:l;return{cx:a,cy:o,hwidth:u,hheight:u}}}])}(),_V=function(){function r(){di(this,r)}return hi(r,[{key:"update",value:function(e,t){var i=e.cx,a=i===void 0?0:i,s=e.cy,o=s===void 0?0:s,l=e.rx,u=l===void 0?0:l,c=e.ry,d=c===void 0?0:c;return{cx:a,cy:o,hwidth:u,hheight:d}}}])}(),mV=function(){function r(){di(this,r)}return hi(r,[{key:"update",value:function(e){var t=e.x1,i=e.y1,a=e.x2,s=e.y2,o=Math.min(t,a),l=Math.max(t,a),u=Math.min(i,s),c=Math.max(i,s),d=l-o,h=c-u,f=d/2,v=h/2;return{cx:o+f,cy:u+v,hwidth:f,hheight:v}}}])}(),pV=function(){function r(){di(this,r)}return hi(r,[{key:"update",value:function(e){var t=e.d,i=t.rect,a=i.x,s=i.y,o=i.width,l=i.height,u=o/2,c=l/2;return{cx:a+u,cy:s+c,hwidth:u,hheight:c}}}])}(),yV=function(){function r(){di(this,r)}return hi(r,[{key:"update",value:function(e){if(e.points&&(0,Ie.Z)(e.points.points)){var t=e.points.points,i=Math.min.apply(Math,ug(t.map(function(h){return h[0]}))),a=Math.max.apply(Math,ug(t.map(function(h){return h[0]}))),s=Math.min.apply(Math,ug(t.map(function(h){return h[1]}))),o=Math.max.apply(Math,ug(t.map(function(h){return h[1]}))),l=a-i,u=o-s,c=l/2,d=u/2;return{cx:i+c,cy:s+d,hwidth:c,hheight:d}}return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),xV=function(){function r(){di(this,r)}return hi(r,[{key:"update",value:function(e,t){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s,l=e.src,u=e.width,c=u===void 0?0:u,d=e.height,h=d===void 0?0:d,f=c,v=h;return l&&!(0,Ze.Z)(l)&&(f||(f=l.width,e.width=f),v||(v=l.height,e.height=v)),{cx:a+f/2,cy:o+v/2,hwidth:f/2,hheight:v/2}}}])}(),EV=function(){function r(n){di(this,r),this.globalRuntime=n}return hi(r,[{key:"isReadyToMeasure",value:function(e,t){var i=e.text;return i}},{key:"update",value:function(e,t){var i,a=e.text,s=e.textAlign,o=s===void 0?"start":s,l=e.lineWidth,u=l===void 0?1:l,c=e.textBaseline,d=c===void 0?"alphabetic":c,h=e.dx,f=h===void 0?0:h,v=e.dy,g=v===void 0?0:v,m=e.x,y=m===void 0?0:m,w=e.y,T=w===void 0?0:w;if(!this.isReadyToMeasure(e,t))return e.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{hwidth:0,hheight:0,cx:0,cy:0};var G=(t==null||(i=t.ownerDocument)===null||i===void 0||(i=i.defaultView)===null||i===void 0?void 0:i.getConfig())||{},x=G.offscreenCanvas,_=this.globalRuntime.textService.measureText(a,e,x);e.metrics=_;var p=_.width,b=_.height,R=p/2,B=b/2,j=y+R;o==="center"||o==="middle"?j+=u/2-R:(o==="right"||o==="end")&&(j+=u-R*2);var Z=T-B;return d==="middle"?Z+=B:d==="top"||d==="hanging"?Z+=B*2:d==="alphabetic"||(d==="bottom"||d==="ideographic")&&(Z+=0),f&&(j+=f),g&&(Z+=g),{cx:j,cy:Z,hwidth:R,hheight:B}}}])}(),bV=function(){function r(){di(this,r)}return hi(r,[{key:"update",value:function(e,t){return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),kV=function(){function r(){di(this,r)}return hi(r,[{key:"update",value:function(e,t){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s,l=e.width,u=l===void 0?0:l,c=e.height,d=c===void 0?0:c;return{cx:a+u/2,cy:o+d/2,hwidth:u/2,hheight:d/2}}}])}();function OTe(r){return!!r.type}var MS=function(){function r(n){di(this,r),this.eventPhase=r.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new Ov,this.page=new Ov,this.canvas=new Ov,this.viewport=new Ov,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=n}return hi(r,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"composedPath",value:function(){return this.manager&&(!this.path||this.path[0]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}},{key:"propagationPath",get:function(){return this.composedPath()}},{key:"preventDefault",value:function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}},{key:"stopImmediatePropagation",value:function(){this.propagationImmediatelyStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"initEvent",value:function(){}},{key:"initUIEvent",value:function(){}},{key:"clone",value:function(){throw new Error(Ud)}}])}(),dR=function(r){function n(){var e;di(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Gd(this,n,[].concat(i)),e.client=new Ov,e.movement=new Ov,e.offset=new Ov,e.global=new Ov,e.screen=new Ov,e}return zd(n,r),hi(n,[{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(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)}},{key:"initMouseEvent",value:function(){throw new Error(Ud)}}])}(MS),wV=function(r){function n(){var e;di(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Gd(this,n,[].concat(i)),e.width=0,e.height=0,e.isPrimary=!1,e}return zd(n,r),hi(n,[{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)}}])}(dR),SV=function(r){function n(){return di(this,n),Gd(this,n,arguments)}return zd(n,r),hi(n,[{key:"clone",value:function(){return this.manager.cloneWheelEvent(this)}}])}(dR),Rv=function(r){function n(e,t){var i;return di(this,n),i=Gd(this,n,[null]),i.type=e,i.detail=t,Object.assign(i,t),i}return zd(n,r),hi(n)}(MS),hR=new WeakMap,TV=function(){function r(){di(this,r),this.emitter=new Se.Z}return hi(r,[{key:"on",value:function(e,t,i){return this.addEventListener(e,t,i),this}},{key:"addEventListener",value:function(e,t,i){var a=!1,s=!1;if((0,je.Z)(i))a=i;else if(i){var o=i.capture;a=o===void 0?!1:o;var l=i.once;s=l===void 0?!1:l}a&&(e+="capture"),t=(0,Be.Z)(t)?t:t.handleEvent;var u=(0,Be.Z)(t)?void 0:t;return s?this.emitter.once(e,t,u):this.emitter.on(e,t,u),this}},{key:"off",value:function(e,t,i){return e?this.removeEventListener(e,t,i):this.removeAllEventListeners(),this}},{key:"removeAllEventListeners",value:function(){var e;(e=this.emitter)===null||e===void 0||e.removeAllListeners()}},{key:"removeEventListener",value:function(e,t,i){var a;if(!this.emitter)return this;var s=(0,je.Z)(i)?i:i==null?void 0:i.capture;s&&(e+="capture"),t=(0,Be.Z)(t)?t:(a=t)===null||a===void 0?void 0:a.handleEvent;var o=(0,Be.Z)(t)?void 0:t;return this.emitter.off(e,t,o),this}},{key:"emit",value:function(e,t){this.dispatchEvent(new Rv(e,t))}},{key:"dispatchEvent",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=hR.get(this);if(!i){var a;this.document?i=this:this.defaultView?i=this.defaultView:i=(a=this.ownerDocument)===null||a===void 0?void 0:a.defaultView,i&&hR.set(this,i)}if(i){if(e.manager=i.getEventService(),!e.manager)return!1;e.defaultPrevented=!1,e.path?e.path.length=0:e.page=[],t||(e.target=this),e.manager.dispatchEvent(e,e.type,t)}else this.emitter.emit(e.type,e);return!e.defaultPrevented}}])}(),Gm=function(r){function n(){var e;di(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Gd(this,n,[].concat(i)),e.shadow=!1,e.ownerDocument=null,e.isConnected=!1,e.baseURI="",e.childNodes=[],e.nodeType=0,e.nodeName="",e.nodeValue=null,e.parentNode=null,e}return zd(n,r),hi(n,[{key:"textContent",get:function(){var t="";this.nodeName===bi.TEXT&&(t+=this.style.text);var i=Dm(this.childNodes),a;try{for(i.s();!(a=i.n()).done;){var s=a.value;s.nodeName===bi.TEXT?t+=s.nodeValue:t+=s.textContent}}catch(o){i.e(o)}finally{i.f()}return t},set:function(t){var i=this;this.childNodes.slice().forEach(function(a){i.removeChild(a)}),this.nodeName===bi.TEXT&&(this.style.text="".concat(t))}},{key:"getRootNode",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this}},{key:"hasChildNodes",value:function(){return this.childNodes.length>0}},{key:"isDefaultNamespace",value:function(t){throw new Error(Ud)}},{key:"lookupNamespaceURI",value:function(t){throw new Error(Ud)}},{key:"lookupPrefix",value:function(t){throw new Error(Ud)}},{key:"normalize",value:function(){throw new Error(Ud)}},{key:"isEqualNode",value:function(t){return this===t}},{key:"isSameNode",value:function(t){return this.isEqualNode(t)}},{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(t){if(t===this)return 0;for(var i=t,a=this,s=[i],o=[a];(l=i.parentNode)!==null&&l!==void 0?l:a.parentNode;){var l;i=i.parentNode?(s.push(i.parentNode),i.parentNode):i,a=a.parentNode?(o.push(a.parentNode),a.parentNode):a}if(i!==a)return n.DOCUMENT_POSITION_DISCONNECTED|n.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|n.DOCUMENT_POSITION_PRECEDING;var u=s.length>o.length?s:o,c=u===s?o:s;if(u[u.length-c.length]===c[0])return u===s?n.DOCUMENT_POSITION_CONTAINED_BY|n.DOCUMENT_POSITION_FOLLOWING:n.DOCUMENT_POSITION_CONTAINS|n.DOCUMENT_POSITION_PRECEDING;for(var d=u.length-c.length,h=c.length-1;h>=0;h--){var f=c[h],v=u[d+h];if(v!==f){var g=f.parentNode.childNodes;return g.indexOf(f)<g.indexOf(v)?c===s?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING:u===s?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING}}return n.DOCUMENT_POSITION_FOLLOWING}},{key:"contain",value:function(t){return this.contains(t)}},{key:"contains",value:function(t){for(var i=t;i&&this!==i;)i=i.parentNode;return!!i}},{key:"getAncestor",value:function(t){for(var i=this;t>0&&i;)i=i.parentNode,t--;return i}},{key:"forEach",value:function(t){for(var i=[this];i.length>0;){var a=i.pop(),s=t(a);if(s===!1)break;for(var o=a.childNodes.length-1;o>=0;o--)i.push(a.childNodes[o])}}}],[{key:"isNode",value:function(t){return!!t.childNodes}}])}(TV);Gm.DOCUMENT_POSITION_DISCONNECTED=1,Gm.DOCUMENT_POSITION_PRECEDING=2,Gm.DOCUMENT_POSITION_FOLLOWING=4,Gm.DOCUMENT_POSITION_CONTAINS=8,Gm.DOCUMENT_POSITION_CONTAINED_BY=16,Gm.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;var RTe=2048,ATe=null,CV=function(){function r(){di(this,r)}return hi(r,[{key:"getOrCreateCanvas",value:function(e,t){if(this.canvas)return this.canvas;if(e||Fa.offscreenCanvas)this.canvas=e||Fa.offscreenCanvas,this.context=this.canvas.getContext("2d",S0({willReadFrequently:!0},t));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",S0({willReadFrequently:!0},t)),(!this.context||!this.context.measureText)&&(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(i){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",S0({willReadFrequently:!0},t))}return this.canvas.width=10,this.canvas.height=10,this.canvas}},{key:"getOrCreateContext",value:function(e,t){return this.context?this.context:(this.getOrCreateCanvas(e,t),this.context)}}],[{key:"createCanvas",value:function(){try{return new window.OffscreenCanvas(0,0)}catch(e){}try{return document.createElement("canvas")}catch(e){}return null}}])}(),LTe=function(r){return r[r.CAMERA_CHANGED=0]="CAMERA_CHANGED",r[r.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",r[r.NONE=2]="NONE",r}({}),ITe=null,MV=/\[\s*(.*)=(.*)\s*\]/,PV=function(){function r(){di(this,r)}return hi(r,[{key:"selectOne",value:function(e,t){var i=this;if(e.startsWith("."))return t.find(function(l){return((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(e))>-1});if(e.startsWith("#"))return t.find(function(l){return l.id===i.getIdOrClassname(e)});if(e.startsWith("[")){var a=this.getAttribute(e),s=a.name,o=a.value;return s?t.find(function(l){return t!==l&&(s==="name"?l.name===o:i.attributeToString(l,s)===o)}):null}return t.find(function(l){return t!==l&&l.nodeName===e})}},{key:"selectAll",value:function(e,t){var i=this;if(e.startsWith("."))return t.findAll(function(l){return t!==l&&((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(e))>-1});if(e.startsWith("#"))return t.findAll(function(l){return t!==l&&l.id===i.getIdOrClassname(e)});if(e.startsWith("[")){var a=this.getAttribute(e),s=a.name,o=a.value;return s?t.findAll(function(l){return t!==l&&(s==="name"?l.name===o:i.attributeToString(l,s)===o)}):[]}return t.findAll(function(l){return t!==l&&l.nodeName===e})}},{key:"is",value:function(e,t){if(e.startsWith("."))return t.className===this.getIdOrClassname(e);if(e.startsWith("#"))return t.id===this.getIdOrClassname(e);if(e.startsWith("[")){var i=this.getAttribute(e),a=i.name,s=i.value;return a==="name"?t.name===s:this.attributeToString(t,a)===s}return t.nodeName===e}},{key:"getIdOrClassname",value:function(e){return e.substring(1)}},{key:"getAttribute",value:function(e){var t=e.match(MV),i="",a="";return t&&t.length>2&&(i=t[1].replace(/"/g,""),a=t[2].replace(/"/g,"")),{name:i,value:a}}},{key:"attributeToString",value:function(e,t){if(!e.getAttribute)return"";var i=e.getAttribute(t);return(0,xe.Z)(i)?"":i.toString?i.toString():""}}])}(),pu=function(r){return r.REPARENT="reparent",r.DESTROY="destroy",r.ATTR_MODIFIED="DOMAttrModified",r.INSERTED="DOMNodeInserted",r.REMOVED="removed",r.MOUNTED="DOMNodeInsertedIntoDocument",r.UNMOUNTED="DOMNodeRemovedFromDocument",r.BOUNDS_CHANGED="bounds-changed",r.CULLED="culled",r}({}),If=function(r){function n(e,t,i,a,s,o,l,u){var c;return di(this,n),c=Gd(this,n,[null]),c.relatedNode=t,c.prevValue=i,c.newValue=a,c.attrName=s,c.attrChange=o,c.prevParsedValue=l,c.newParsedValue=u,c.type=e,c}return zd(n,r),hi(n)}(MS);If.ADDITION=2,If.MODIFICATION=1,If.REMOVAL=3;function fR(r){var n=r.renderable;n&&(n.renderBoundsDirty=!0,n.boundsDirty=!0)}var NV=new If(pu.REPARENT,null,"","","",0,"",""),OV=ot.Ue(),h1=E.Ue(),RV=E.al(1,1,1),AV=L.create(),LV=ot.Ue(),cg=E.Ue(),zm=L.create(),dg=X.Ue(),IV=E.Ue(),DV=X.Ue(),FV=E.Ue(),I0=E.Ue(),u_=E.Ue(),f1=L.create(),vR=X.Ue(),gR=X.Ue(),v1=X.Ue(),PS={affectChildren:!0},BV=function(){function r(n){di(this,r),this.pendingEvents=new Map,this.boundsChangedEvent=new Rv(pu.BOUNDS_CHANGED),this.displayObjectDependencyMap=new WeakMap,this.runtime=n}return hi(r,[{key:"matches",value:function(e,t){return this.runtime.sceneGraphSelector.is(e,t)}},{key:"querySelector",value:function(e,t){return this.runtime.sceneGraphSelector.selectOne(e,t)}},{key:"querySelectorAll",value:function(e,t){return this.runtime.sceneGraphSelector.selectAll(e,t)}},{key:"attach",value:function(e,t,i){var a,s=!1;e.parentNode&&(s=e.parentNode!==t,this.detach(e));var o=e.nodeName===bi.FRAGMENT,l=aR(t);e.parentNode=t;var u=o?e.childNodes:[e];(0,pe.Z)(i)?u.forEach(function(f){t.childNodes.splice(i,0,f),f.parentNode=t}):u.forEach(function(f){t.childNodes.push(f),f.parentNode=t});var c=t,d=c.sortable;if((d!=null&&(a=d.sorted)!==null&&a!==void 0&&a.length||e.parsedStyle.zIndex)&&(d.dirtyChildren.indexOf(e)===-1&&d.dirtyChildren.push(e),d.dirty=!0,d.dirtyReason=hS.ADDED),!l){if(o)this.dirtifyFragment(e);else{var h=e.transformable;h&&this.dirtifyWorld(e,h)}s&&e.dispatchEvent(NV)}}},{key:"detach",value:function(e){if(e.parentNode){var t,i,a=e.transformable,s=e.parentNode,o=s.sortable;(o!=null&&(t=o.sorted)!==null&&t!==void 0&&t.length||(i=e.style)!==null&&i!==void 0&&i.zIndex)&&(o.dirtyChildren.indexOf(e)===-1&&o.dirtyChildren.push(e),o.dirty=!0,o.dirtyReason=hS.REMOVED);var l=e.parentNode.childNodes.indexOf(e);l>-1&&e.parentNode.childNodes.splice(l,1),a&&this.dirtifyWorld(e,a),e.parentNode=null}}},{key:"getOrigin",value:function(e){return e.getGeometryBounds(),e.transformable.origin}},{key:"setOrigin",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=[t,i,a]);var s=e.transformable;if(!(t[0]===s.origin[0]&&t[1]===s.origin[1]&&t[2]===s.origin[2])){var o=s.origin;o[0]=t[0],o[1]=t[1],o[2]=t[2]||0,this.dirtifyLocal(e,s)}}},{key:"rotate",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;if(e.parentNode===null||!e.parentNode.transformable)this.rotateLocal(e,t);else{var o=dg;X.Su(o,t[0],t[1],t[2]);var l=this.getRotation(e),u=this.getRotation(e.parentNode);X.JG(v1,u),X.U_(v1,v1),X.Jp(o,v1,o),X.Jp(s.localRotation,o,l),X.Fv(s.localRotation,s.localRotation),this.dirtifyLocal(e,s)}}},{key:"rotateLocal",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;X.Su(gR,t[0],t[1],t[2]),X.dC(s.localRotation,s.localRotation,gR),this.dirtifyLocal(e,s)}},{key:"setEulerAngles",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;if(e.parentNode===null||!e.parentNode.transformable)this.setLocalEulerAngles(e,t);else{X.Su(s.localRotation,t[0],t[1],t[2]);var o=this.getRotation(e.parentNode);X.JG(vR,X.U_(dg,o)),X.dC(s.localRotation,s.localRotation,vR),this.dirtifyLocal(e,s)}}},{key:"setLocalEulerAngles",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;typeof t=="number"&&(t=E.al(t,i,a));var o=e.transformable;X.Su(o.localRotation,t[0],t[1],t[2]),s&&this.dirtifyLocal(e,o)}},{key:"translateLocal",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;E.fS(t,h1)||(E.VC(t,t,s.localRotation),E.IH(s.localPosition,s.localPosition,t),this.dirtifyLocal(e,s))}},{key:"setPosition",value:function(e,t){var i,a=e.transformable;if(u_[0]=t[0],u_[1]=t[1],u_[2]=(i=t[2])!==null&&i!==void 0?i:0,!E.fS(this.getPosition(e),u_)){if(E.JG(a.position,u_),e.parentNode===null||!e.parentNode.transformable)E.JG(a.localPosition,u_);else{var s=e.parentNode.transformable;L.copy(f1,s.worldTransform),L.invert(f1,f1),E.fF(a.localPosition,u_,f1)}this.dirtifyLocal(e,a)}}},{key:"setLocalPosition",value:function(e,t){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=e.transformable;I0[0]=t[0],I0[1]=t[1],I0[2]=(i=t[2])!==null&&i!==void 0?i:0,!E.fS(s.localPosition,I0)&&(E.JG(s.localPosition,I0),a&&this.dirtifyLocal(e,s))}},{key:"scaleLocal",value:function(e,t){var i,a=e.transformable;E.Jp(a.localScale,a.localScale,E.t8(cg,t[0],t[1],(i=t[2])!==null&&i!==void 0?i:1)),this.dirtifyLocal(e,a)}},{key:"setLocalScale",value:function(e,t){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=e.transformable;E.t8(cg,t[0],t[1],(i=t[2])!==null&&i!==void 0?i:s.localScale[2]),!E.fS(cg,s.localScale)&&(E.JG(s.localScale,cg),a&&this.dirtifyLocal(e,s))}},{key:"translate",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.t8(cg,t,i,a)),!E.fS(t,h1)&&(E.IH(cg,this.getPosition(e),t),this.setPosition(e,cg))}},{key:"setRotation",value:function(e,t,i,a,s){var o=e.transformable;if(typeof t=="number"&&(t=X.al(t,i,a,s)),e.parentNode===null||!e.parentNode.transformable)this.setLocalRotation(e,t);else{var l=this.getRotation(e.parentNode);X.JG(dg,l),X.U_(dg,dg),X.Jp(o.localRotation,dg,t),X.Fv(o.localRotation,o.localRotation),this.dirtifyLocal(e,o)}}},{key:"setLocalRotation",value:function(e,t,i,a,s){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;typeof t=="number"&&(t=X.t8(dg,t,i,a,s));var l=e.transformable;X.JG(l.localRotation,t),o&&this.dirtifyLocal(e,l)}},{key:"setLocalSkew",value:function(e,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;typeof t=="number"&&(t=ot.t8(LV,t,i));var s=e.transformable;ot.JG(s.localSkew,t),a&&this.dirtifyLocal(e,s)}},{key:"dirtifyLocal",value:function(e,t){aR(e)||t.localDirtyFlag||(t.localDirtyFlag=!0,t.dirtyFlag||this.dirtifyWorld(e,t))}},{key:"dirtifyWorld",value:function(e,t){t.dirtyFlag||this.unfreezeParentToRoot(e),this.dirtifyWorldInternal(e,t),this.dirtifyToRoot(e,!0)}},{key:"dirtifyFragment",value:function(e){var t=e.transformable;t&&(t.frozen=!1,t.dirtyFlag=!0,t.localDirtyFlag=!0);var i=e.renderable;i&&(i.renderBoundsDirty=!0,i.boundsDirty=!0,i.dirty=!0);for(var a=e.childNodes.length,s=0;s<a;s++)this.dirtifyFragment(e.childNodes[s]);e.nodeName===bi.FRAGMENT&&this.pendingEvents.set(e,!1)}},{key:"triggerPendingEvents",value:function(){var e=this,t=new Set,i=function(s,o){!s.isConnected||t.has(s)||s.nodeName===bi.FRAGMENT||(e.boundsChangedEvent.detail=o,e.boundsChangedEvent.target=s,s.isMutationObserved?s.dispatchEvent(e.boundsChangedEvent):s.ownerDocument.defaultView.dispatchEvent(e.boundsChangedEvent,!0),t.add(s))};this.pendingEvents.forEach(function(a,s){s.nodeName!==bi.FRAGMENT&&(PS.affectChildren=a,a?s.forEach(function(o){i(o,PS)}):i(s,PS))}),t.clear(),this.clearPendingEvents()}},{key:"clearPendingEvents",value:function(){this.pendingEvents.clear()}},{key:"dirtifyToRoot",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=e;for(i.renderable&&(i.renderable.dirty=!0);i;)fR(i),i=i.parentNode;t&&e.forEach(function(a){fR(a)}),this.informDependentDisplayObjects(e),this.pendingEvents.set(e,t)}},{key:"updateDisplayObjectDependency",value:function(e,t,i,a){if(t&&t!==i){var s=this.displayObjectDependencyMap.get(t);if(s&&s[e]){var o=s[e].indexOf(a);s[e].splice(o,1)}}if(i){var l=this.displayObjectDependencyMap.get(i);l||(this.displayObjectDependencyMap.set(i,{}),l=this.displayObjectDependencyMap.get(i)),l[e]||(l[e]=[]),l[e].push(a)}}},{key:"informDependentDisplayObjects",value:function(e){var t=this,i=this.displayObjectDependencyMap.get(e);i&&Object.keys(i).forEach(function(a){i[a].forEach(function(s){t.dirtifyToRoot(s,!0),s.dispatchEvent(new If(pu.ATTR_MODIFIED,s,t,t,a,If.MODIFICATION,t,t)),s.isCustomElement&&s.isConnected&&s.attributeChangedCallback&&s.attributeChangedCallback(a,t,t)})})}},{key:"getPosition",value:function(e){var t=e.transformable;return L.getTranslation(t.position,this.getWorldTransform(e,t))}},{key:"getRotation",value:function(e){var t=e.transformable;return L.getRotation(t.rotation,this.getWorldTransform(e,t))}},{key:"getScale",value:function(e){var t=e.transformable;return L.getScaling(t.scaling,this.getWorldTransform(e,t))}},{key:"getWorldTransform",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.transformable;return!t.localDirtyFlag&&!t.dirtyFlag||(e.parentNode&&e.parentNode.transformable&&this.getWorldTransform(e.parentNode),this.sync(e,t)),t.worldTransform}},{key:"getLocalPosition",value:function(e){return e.transformable.localPosition}},{key:"getLocalRotation",value:function(e){return e.transformable.localRotation}},{key:"getLocalScale",value:function(e){return e.transformable.localScale}},{key:"getLocalSkew",value:function(e){return e.transformable.localSkew}},{key:"calcLocalTransform",value:function(e){var t=e.localSkew[0]!==0||e.localSkew[1]!==0;if(t){L.fromRotationTranslationScaleOrigin(e.localTransform,e.localRotation,e.localPosition,E.al(1,1,1),e.origin),(e.localSkew[0]!==0||e.localSkew[1]!==0)&&(L.identity(zm),zm[4]=Math.tan(e.localSkew[0]),zm[1]=Math.tan(e.localSkew[1]),L.multiply(e.localTransform,e.localTransform,zm));var i=L.fromRotationTranslationScaleOrigin(zm,X.t8(dg,0,0,0,1),E.t8(cg,1,1,1),e.localScale,e.origin);L.multiply(e.localTransform,e.localTransform,i)}else{var a=e.localTransform,s=e.localPosition,o=e.localRotation,l=e.localScale,u=e.origin,c=s[0]!==0||s[1]!==0||s[2]!==0,d=o[3]!==1||o[0]!==0||o[1]!==0||o[2]!==0,h=l[0]!==1||l[1]!==1||l[2]!==1,f=u[0]!==0||u[1]!==0||u[2]!==0;!d&&!h&&!f?c?L.fromTranslation(a,s):L.identity(a):L.fromRotationTranslationScaleOrigin(a,o,s,l,u)}}},{key:"getLocalTransform",value:function(e){var t=e.transformable;return t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.localTransform}},{key:"setLocalTransform",value:function(e,t){var i=L.getTranslation(IV,t),a=L.getRotation(DV,t),s=L.getScaling(FV,t);this.setLocalScale(e,s,!1),this.setLocalPosition(e,i,!1),this.setLocalRotation(e,a,void 0,void 0,void 0,!1),this.dirtifyLocal(e,e.transformable)}},{key:"resetLocalTransform",value:function(e){this.setLocalScale(e,RV,!1),this.setLocalPosition(e,h1,!1),this.setLocalEulerAngles(e,h1,void 0,void 0,!1),this.setLocalSkew(e,OV,void 0,!1),this.dirtifyLocal(e,e.transformable)}},{key:"getTransformedGeometryBounds",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2?arguments[2]:void 0,a=this.getGeometryBounds(e,t);if(!Vd.isEmpty(a)){var s=i||new Vd;return s.setFromTransformedAABB(a,this.getWorldTransform(e)),s}return null}},{key:"getGeometryBounds",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=e,a=i.geometry;a.dirty&&Fa.styleValueRegistry.updateGeometry(e);var s=t?a.renderBounds:a.contentBounds||null;return s||new Vd}},{key:"getBounds",value:function(e){var t=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=e,s=a.renderable;if(!s.boundsDirty&&!i&&s.bounds)return s.bounds;if(!s.renderBoundsDirty&&i&&s.renderBounds)return s.renderBounds;var o=i?s.renderBounds:s.bounds,l=this.getTransformedGeometryBounds(e,i,o),u=e.childNodes;if(u.forEach(function(h){var f=t.getBounds(h,i);f&&(l?l.add(f):(l=o||new Vd,l.update(f.center,f.halfExtents)))}),l||(l=new Vd),i){var c=j9(e);if(c){var d=c.parsedStyle.clipPath.getBounds(i);l?d&&(l=d.intersection(l)):l.update(d.center,d.halfExtents)}}return i?(s.renderBounds=l,s.renderBoundsDirty=!1):(s.bounds=l,s.boundsDirty=!1),l}},{key:"getLocalBounds",value:function(e){if(e.parentNode){var t=AV;e.parentNode.transformable&&(t=L.invert(zm,this.getWorldTransform(e.parentNode)));var i=this.getBounds(e);if(!Vd.isEmpty(i)){var a=new Vd;return a.setFromTransformedAABB(i,t),a}}return this.getBounds(e)}},{key:"getBoundingClientRect",value:function(e){var t,i,a=this.getGeometryBounds(e);Vd.isEmpty(a)||(i=new Vd,i.setFromTransformedAABB(a,this.getWorldTransform(e)));var s=(t=e.ownerDocument)===null||t===void 0||(t=t.defaultView)===null||t===void 0?void 0:t.getContextService().getBoundingClientRect();if(i){var o=i.getMin(),l=Nf(o,2),u=l[0],c=l[1],d=i.getMax(),h=Nf(d,2),f=h[0],v=h[1];return new P0(u+((s==null?void 0:s.left)||0),c+((s==null?void 0:s.top)||0),f-u,v-c)}return new P0((s==null?void 0:s.left)||0,(s==null?void 0:s.top)||0,0,0)}},{key:"dirtifyWorldInternal",value:function(e,t){var i=this;if(!t.dirtyFlag){t.dirtyFlag=!0,t.frozen=!1,e.childNodes.forEach(function(o){var l=o.transformable;l.dirtyFlag||i.dirtifyWorldInternal(o,l)});var a=e,s=a.renderable;s&&(s.renderBoundsDirty=!0,s.boundsDirty=!0,s.dirty=!0)}}},{key:"syncHierarchy",value:function(e){var t=e.transformable;if(!t.frozen){t.frozen=!0,(t.localDirtyFlag||t.dirtyFlag)&&this.sync(e,t);for(var i=e.childNodes,a=0;a<i.length;a++)this.syncHierarchy(i[a])}}},{key:"sync",value:function(e,t){if(t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.dirtyFlag){var i=e.parentNode,a=i&&i.transformable;i===null||!a?L.copy(t.worldTransform,t.localTransform):L.multiply(t.worldTransform,a.worldTransform,t.localTransform),t.dirtyFlag=!1}}},{key:"unfreezeParentToRoot",value:function(e){for(var t=e.parentNode;t;){var i=t.transformable;i&&(i.frozen=!1),t=t.parentNode}}}])}(),c_={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]},_R=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,$V=/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/,GV=/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/,zV=/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/,VV=/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/,UV=/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/,jV=/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/,HV=/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/,WV=/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/,YV=new RegExp("".concat($V.source,"|").concat(zV.source,"|").concat(UV.source,"|").concat(HV.source)),ZV=new RegExp("".concat(GV.source,"|").concat(VV.source,"|").concat(jV.source,"|").concat(WV.source)),XV=function(){function r(n){var e=this;di(this,r),this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,i){return e.isBreakingSpace(i)?!1:!!(t&&(ZV.exec(i)||YV.exec(t)))},this.trimByKinsokuShorui=function(t){var i=ug(t),a=i[i.length-2];if(!a)return t;var s=a[a.length-1];return i[i.length-2]=a.slice(0,-1),i[i.length-1]=s+i[i.length-1],i},this.runtime=n}return hi(r,[{key:"measureFont",value:function(e,t){if(this.fontMetricsCache[e])return this.fontMetricsCache[e];var i={ascent:0,descent:0,fontSize:0},a=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(t),s=this.runtime.offscreenCanvasCreator.getOrCreateContext(t,{willReadFrequently:!0});s.font=e;var o=c_.MetricsString+c_.BaselineSymbol,l=Math.ceil(s.measureText(o).width),u=Math.ceil(s.measureText(c_.BaselineSymbol).width),c=c_.HeightMultiplier*u;u=u*c_.BaselineMultiplier|0,a.width=l,a.height=c,s.fillStyle="#f00",s.fillRect(0,0,l,c),s.font=e,s.textBaseline="alphabetic",s.fillStyle="#000",s.fillText(o,0,u);var d=s.getImageData(0,0,l||1,c||1).data,h=d.length,f=l*4,v=0,g=0,m=!1;for(v=0;v<u;++v){for(var y=0;y<f;y+=4)if(d[g+y]!==255){m=!0;break}if(!m)g+=f;else break}for(i.ascent=u-v,g=h-f,m=!1,v=c;v>u;--v){for(var w=0;w<f;w+=4)if(d[g+w]!==255){m=!0;break}if(!m)g-=f;else break}return i.descent=v-u,i.fontSize=i.ascent+i.descent,this.fontMetricsCache[e]=i,i}},{key:"measureText",value:function(e,t,i){var a=t.fontSize,s=a===void 0?16:a,o=t.wordWrap,l=o===void 0?!1:o,u=t.lineHeight,c=t.lineWidth,d=c===void 0?1:c,h=t.textBaseline,f=h===void 0?"alphabetic":h,v=t.textAlign,g=v===void 0?"start":v,m=t.letterSpacing,y=m===void 0?0:m,w=t.textPath;t.textPathSide,t.textPathStartOffset;var T=t.leading,G=T===void 0?0:T,x=sV(t),_=this.measureFont(x,i);_.fontSize===0&&(_.fontSize=s,_.ascent=s);var p=this.runtime.offscreenCanvasCreator.getOrCreateContext(i);p.font=x,t.isOverflowing=!1;var b=l?this.wordWrap(e,t,i):e,R=b.split(/(?:\r\n|\r|\n)/),B=new Array(R.length),j=0;if(w){w.getTotalLength();for(var Z=0;Z<R.length;Z++)p.measureText(R[Z]).width+(R[Z].length-1)*y}else{for(var te=0;te<R.length;te++){var le=p.measureText(R[te]).width+(R[te].length-1)*y;B[te]=le,j=Math.max(j,le)}var ue=j+d,se=u||_.fontSize+d,V=Math.max(se,_.fontSize+d)+(R.length-1)*(se+G);se+=G;var ee=0;return f==="middle"?ee=-V/2:f==="bottom"||f==="alphabetic"||f==="ideographic"?ee=-V:(f==="top"||f==="hanging")&&(ee=0),{font:x,width:ue,height:V,lines:R,lineWidths:B,lineHeight:se,maxLineWidth:j,fontProperties:_,lineMetrics:B.map(function(he,ut){var ct=0;return g==="center"||g==="middle"?ct-=he/2:(g==="right"||g==="end")&&(ct-=he),new P0(ct-d/2,ee+ut*se,he+d,se)})}}}},{key:"setGraphemeOnPath",value:function(){}},{key:"wordWrap",value:function(e,t,i){var a=this,s=t.wordWrapWidth,o=s===void 0?0:s,l=t.letterSpacing,u=l===void 0?0:l,c=t.maxLines,d=c===void 0?1/0:c,h=t.textOverflow,f=this.runtime.offscreenCanvasCreator.getOrCreateContext(i),v=o+u,g="";h==="ellipsis"?g="...":h&&h!=="clip"&&(g=h);for(var m=[],y=0,w=0,T={},G=function(ee){return a.getFromCache(ee,u,T,f)},x=Array.from(g).reduce(function(V,ee){return V+G(ee)},0),_=Array.from(e),p=0;p<_.length;p++){var b=_[p],R=e[p-1],B=e[p+1],j=G(b);if(this.isNewline(b)){if(y++,y>=d){t.isOverflowing=!0;break}w=0,m[y]="";continue}if(w>0&&w+j>v){if(y+1>=d){if(t.isOverflowing=!0,x>0&&x<=v){for(var Z=m[y].length,te=0,le=Z,ue=0;ue<Z;ue++){var se=G(m[y][ue]);if(te+se+x>v){le=ue;break}te+=se}m[y]=(m[y]||"").slice(0,le)+g}break}if(y++,w=0,m[y]="",this.isBreakingSpace(b))continue;this.canBreakInLastChar(b)||(m=this.trimToBreakable(m),w=this.sumTextWidthByCache(m[y]||"",T)),this.shouldBreakByKinsokuShorui(b,B)&&(m=this.trimByKinsokuShorui(m),w+=G(R||""))}w+=j,m[y]=(m[y]||"")+b}return m.join(`
|
|
|
`)}},{key:"isBreakingSpace",value:function(e){return typeof e!="string"?!1:c_.BreakingSpaces.indexOf(e.charCodeAt(0))>=0}},{key:"isNewline",value:function(e){return typeof e!="string"?!1:c_.Newlines.indexOf(e.charCodeAt(0))>=0}},{key:"trimToBreakable",value:function(e){var t=ug(e),i=t[t.length-2],a=this.findBreakableIndex(i);if(a===-1||!i)return t;var s=i.slice(a,a+1),o=this.isBreakingSpace(s),l=a+1,u=a+(o?0:1);return t[t.length-1]+=i.slice(l,i.length),t[t.length-2]=i.slice(0,u),t}},{key:"canBreakInLastChar",value:function(e){return!(e&&_R.test(e))}},{key:"sumTextWidthByCache",value:function(e,t){return e.split("").reduce(function(i,a){if(!t[a])throw Error("cannot count the word without cache");return i+t[a]},0)}},{key:"findBreakableIndex",value:function(e){for(var t=e.length-1;t>=0;t--)if(!_R.test(e[t]))return t;return-1}},{key:"getFromCache",value:function(e,t,i,a){var s=i[e];if(typeof s!="number"){var o=e.length*t;s=a.measureText(e).width+o,i[e]=s}return s}}])}(),Fa={},KV=function(r){var n=new xV,e=new yV;return r={},Pa(Pa(Pa(Pa(Pa(Pa(Pa(Pa(Pa(Pa(r,bi.CIRCLE,new gV),bi.ELLIPSE,new _V),bi.RECT,n),bi.IMAGE,n),bi.GROUP,new bV),bi.LINE,new mV),bi.TEXT,new EV(Fa)),bi.POLYLINE,e),bi.POLYGON,e),bi.PATH,new pV),Pa(Pa(r,bi.HTML,new kV),bi.MESH,null)}(),JV=function(r){var n=new N9,e=new SS;return r={},Pa(Pa(Pa(Pa(Pa(Pa(Pa(Pa(Pa(Pa(r,$n.PERCENTAGE,null),$n.NUMBER,new I9),$n.ANGLE,new M9),$n.DEFINED_PATH,new P9),$n.PAINT,n),$n.COLOR,n),$n.FILTER,new O9),$n.LENGTH,e),$n.LENGTH_PERCENTAGE,e),$n.LENGTH_PERCENTAGE_12,new R9),Pa(Pa(Pa(Pa(Pa(Pa(Pa(Pa(Pa(Pa(r,$n.LENGTH_PERCENTAGE_14,new A9),$n.COORDINATE,new SS),$n.OFFSET_DISTANCE,new D9),$n.OPACITY_VALUE,new F9),$n.PATH,new B9),$n.LIST_OF_POINTS,new $9),$n.SHADOW_BLUR,new G9),$n.TEXT,new z9),$n.TEXT_TRANSFORM,new V9),$n.TRANSFORM,new hV),Pa(Pa(Pa(r,$n.TRANSFORM_ORIGIN,new fV),$n.Z_INDEX,new vV),$n.MARKER,new L9)}(),QV=function(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof k.g!="undefined"?k.g:{}};Fa.CameraContribution=m7,Fa.AnimationTimeline=null,Fa.EasingFunction=null,Fa.offscreenCanvasCreator=new CV,Fa.sceneGraphSelector=new PV,Fa.sceneGraphService=new BV(Fa),Fa.textService=new XV(Fa),Fa.geometryUpdaterFactory=KV,Fa.CSSPropertySyntaxFactory=JV,Fa.styleValueRegistry=new C9(Fa),Fa.layoutRegistry=null,Fa.globalThis=QV(),Fa.enableStyleSyntax=!0,Fa.enableSizeAttenuation=!1;var qV=0;function DTe(){qV=0}var FTe=new If(pu.INSERTED,null,"","","",0,"",""),BTe=new If(pu.REMOVED,null,"","","",0,"",""),$Te=new Rv(pu.DESTROY),GTe=null;function zTe(r){return!!(r!=null&&r.nodeName)}var VTe=Fa.globalThis.Proxy?Fa.globalThis.Proxy:function(){},UTe=new If(pu.ATTR_MODIFIED,null,null,null,null,If.MODIFICATION,null,null),jTe=E.Ue(),HTe=X.Ue(),WTe=null,YTe=null,ZTe=null,XTe=null,KTe=null,JTe=null,QTe=null,qTe=null,eCe=null,tCe=null,nCe=null,rCe=null,iCe=null,aCe=null,sCe=null,oCe=null,lCe=null,uCe=null,cCe=null,dCe=null,hCe=null,fCe=null,vCe={number:function(n){return new us(n)},percent:function(n){return new us(n,"%")},px:function(n){return new us(n,"px")},em:function(n){return new us(n,"em")},rem:function(n){return new us(n,"rem")},deg:function(n){return new us(n,"deg")},grad:function(n){return new us(n,"grad")},rad:function(n){return new us(n,"rad")},turn:function(n){return new us(n,"turn")},s:function(n){return new us(n,"s")},ms:function(n){return new us(n,"ms")},registerProperty:function(n){var e=n.name,t=n.inherits,i=n.interpolable,a=n.initialValue,s=n.syntax;Fa.styleValueRegistry.registerMetadata({n:e,inh:t,int:i,d:a,syntax:s})},registerLayout:function(n,e){Fa.layoutRegistry.registerLayout(n,e)}},gCe=null,eU=function(){function r(n){di(this,r),this.strategies=n}return hi(r,[{key:"apply",value:function(e){var t=e.camera,i=e.renderingService,a=e.renderingContext,s=this.strategies;i.hooks.cull.tap(r.tag,function(o){if(o){var l=o.cullable;return s.length===0?l.visible=a.unculledEntities.indexOf(o.entity)>-1:l.visible=s.every(function(u){return u.isVisible(t,o)}),!o.isCulled()&&o.isVisible()?o:(o.dispatchEvent(new Rv(pu.CULLED)),null)}return o}),i.hooks.afterRender.tap(r.tag,function(o){o.cullable.visibilityPlaneMask=-1})}}])}();eU.tag="Culling";var tU=function(){function r(){var n=this;di(this,r),this.autoPreventDefault=!1,this.rootPointerEvent=new wV(null),this.rootWheelEvent=new SV(null),this.onPointerMove=function(e){var t,i=(t=n.context.renderingContext.root)===null||t===void 0||(t=t.ownerDocument)===null||t===void 0?void 0:t.defaultView;if(!(i.supportsTouchEvents&&e.pointerType==="touch")){var a=n.normalizeToPointerEvent(e,i),s=Dm(a),o;try{for(s.s();!(o=s.n()).done;){var l=o.value,u=n.bootstrapEvent(n.rootPointerEvent,l,i,e);n.context.eventService.mapEvent(u)}}catch(c){s.e(c)}finally{s.f()}n.setCursor(n.context.eventService.cursor)}},this.onClick=function(e){var t,i=(t=n.context.renderingContext.root)===null||t===void 0||(t=t.ownerDocument)===null||t===void 0?void 0:t.defaultView,a=n.normalizeToPointerEvent(e,i),s=Dm(a),o;try{for(s.s();!(o=s.n()).done;){var l=o.value,u=n.bootstrapEvent(n.rootPointerEvent,l,i,e);n.context.eventService.mapEvent(u)}}catch(c){s.e(c)}finally{s.f()}n.setCursor(n.context.eventService.cursor)}}return hi(r,[{key:"apply",value:function(e){var t=this;this.context=e;var i=e.renderingService,a=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(s){var o=t.context.renderingService.hooks.pickSync.call({position:s,picked:[],topmost:!0}),l=o.picked;return l[0]||null}),i.hooks.pointerWheel.tap(r.tag,function(s){var o=t.normalizeWheelEvent(s);t.context.eventService.mapEvent(o)}),i.hooks.pointerDown.tap(r.tag,function(s){if(!(a.supportsTouchEvents&&s.pointerType==="touch")){var o=t.normalizeToPointerEvent(s,a);if(t.autoPreventDefault&&o[0].isNormalized){var l=s.cancelable||!("cancelable"in s);l&&s.preventDefault()}var u=Dm(o),c;try{for(u.s();!(c=u.n()).done;){var d=c.value,h=t.bootstrapEvent(t.rootPointerEvent,d,a,s);t.context.eventService.mapEvent(h)}}catch(f){u.e(f)}finally{u.f()}t.setCursor(t.context.eventService.cursor)}}),i.hooks.pointerUp.tap(r.tag,function(s){if(!(a.supportsTouchEvents&&s.pointerType==="touch")){var o=t.context.contextService.getDomElement(),l=t.context.eventService.isNativeEventFromCanvas(o,s),u=l?"":"outside",c=t.normalizeToPointerEvent(s,a),d=Dm(c),h;try{for(d.s();!(h=d.n()).done;){var f=h.value,v=t.bootstrapEvent(t.rootPointerEvent,f,a,s);v.type+=u,t.context.eventService.mapEvent(v)}}catch(g){d.e(g)}finally{d.f()}t.setCursor(t.context.eventService.cursor)}}),i.hooks.pointerMove.tap(r.tag,this.onPointerMove),i.hooks.pointerOver.tap(r.tag,this.onPointerMove),i.hooks.pointerOut.tap(r.tag,this.onPointerMove),i.hooks.click.tap(r.tag,this.onClick),i.hooks.pointerCancel.tap(r.tag,function(s){var o=t.normalizeToPointerEvent(s,a),l=Dm(o),u;try{for(l.s();!(u=l.n()).done;){var c=u.value,d=t.bootstrapEvent(t.rootPointerEvent,c,a,s);t.context.eventService.mapEvent(d)}}catch(h){l.e(h)}finally{l.f()}t.setCursor(t.context.eventService.cursor)})}},{key:"bootstrapEvent",value:function(e,t,i,a){e.view=i,e.originalEvent=null,e.nativeEvent=a,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this.transferMouseData(e,t);var s=this.context.eventService.client2Viewport({x:t.clientX,y:t.clientY}),o=s.x,l=s.y;e.viewport.x=o,e.viewport.y=l;var u=this.context.eventService.viewport2Canvas(e.viewport),c=u.x,d=u.y;return e.canvas.x=c,e.canvas.y=d,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.isTrusted=a.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=W9[e.type]||e.type),e}},{key:"normalizeWheelEvent",value:function(e){var t=this.rootWheelEvent;this.transferMouseData(t,e),t.deltaMode=e.deltaMode,t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ;var i=this.context.eventService.client2Viewport({x:e.clientX,y:e.clientY}),a=i.x,s=i.y;t.viewport.x=a,t.viewport.y=s;var o=this.context.eventService.viewport2Canvas(t.viewport),l=o.x,u=o.y;return t.canvas.x=l,t.canvas.y=u,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.nativeEvent=e,t.type=e.type,t}},{key:"transferMouseData",value:function(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=Y9.now(),e.type=t.type,e.altKey=t.altKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.ctrlKey=t.ctrlKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.screen.x=t.screenX,e.screen.y=t.screenY,e.relatedTarget=null}},{key:"setCursor",value:function(e){this.context.contextService.applyCursorStyle(e||this.context.config.cursor||"default")}},{key:"normalizeToPointerEvent",value:function(e,t){var i=[];if(t.isTouchEvent(e))for(var a=0;a<e.changedTouches.length;a++){var s=e.changedTouches[a];(0,ie.Z)(s.button)&&(s.button=0),(0,ie.Z)(s.buttons)&&(s.buttons=1),(0,ie.Z)(s.isPrimary)&&(s.isPrimary=e.touches.length===1&&e.type==="touchstart"),(0,ie.Z)(s.width)&&(s.width=s.radiusX||1),(0,ie.Z)(s.height)&&(s.height=s.radiusY||1),(0,ie.Z)(s.tiltX)&&(s.tiltX=0),(0,ie.Z)(s.tiltY)&&(s.tiltY=0),(0,ie.Z)(s.pointerType)&&(s.pointerType="touch"),(0,ie.Z)(s.pointerId)&&(s.pointerId=s.identifier||0),(0,ie.Z)(s.pressure)&&(s.pressure=s.force||.5),(0,ie.Z)(s.twist)&&(s.twist=0),(0,ie.Z)(s.tangentialPressure)&&(s.tangentialPressure=0),s.isNormalized=!0,s.type=e.type,i.push(s)}else if(t.isMouseEvent(e)){var o=e;(0,ie.Z)(o.isPrimary)&&(o.isPrimary=!0),(0,ie.Z)(o.width)&&(o.width=1),(0,ie.Z)(o.height)&&(o.height=1),(0,ie.Z)(o.tiltX)&&(o.tiltX=0),(0,ie.Z)(o.tiltY)&&(o.tiltY=0),(0,ie.Z)(o.pointerType)&&(o.pointerType="mouse"),(0,ie.Z)(o.pointerId)&&(o.pointerId=H9),(0,ie.Z)(o.pressure)&&(o.pressure=.5),(0,ie.Z)(o.twist)&&(o.twist=0),(0,ie.Z)(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,i.push(o)}else i.push(e);return i}}])}();tU.tag="Event";var _Ce=[bi.CIRCLE,bi.ELLIPSE,bi.IMAGE,bi.RECT,bi.LINE,bi.POLYLINE,bi.POLYGON,bi.TEXT,bi.PATH,bi.HTML],mCe=null,nU=function(){function r(){di(this,r),this.syncTasks=new Map,this.isFirstTimeRendering=!0,this.syncing=!1,this.isFirstTimeRenderingFinished=!1}return hi(r,[{key:"apply",value:function(e){var t=this,i,a=e.renderingService,s=e.renderingContext,o=e.rBushRoot,l=s.root.ownerDocument.defaultView;this.rBush=o;var u=function(g){var m=g.target;m.renderable.dirty=!0,a.dirtify()},c=function(g){t.syncTasks.set(g.target,g.detail.affectChildren),a.dirtify()},d=function(g){var m=g.target;Fa.enableSizeAttenuation&&Fa.styleValueRegistry.updateSizeAttenuation(m,l.getCamera().getZoom())},h=function(g){var m=g.target,y=m.rBushNode;y.aabb&&t.rBush.remove(y.aabb),t.syncTasks.delete(m),Fa.sceneGraphService.dirtifyToRoot(m),a.dirtify()};a.hooks.init.tap(r.tag,function(){l.addEventListener(pu.MOUNTED,d),l.addEventListener(pu.UNMOUNTED,h),l.addEventListener(pu.ATTR_MODIFIED,u),l.addEventListener(pu.BOUNDS_CHANGED,c)}),a.hooks.destroy.tap(r.tag,function(){l.removeEventListener(pu.MOUNTED,d),l.removeEventListener(pu.UNMOUNTED,h),l.removeEventListener(pu.ATTR_MODIFIED,u),l.removeEventListener(pu.BOUNDS_CHANGED,c),t.syncTasks.clear()});var f=(i=Fa.globalThis.requestIdleCallback)!==null&&i!==void 0?i:uR.bind(Fa.globalThis);a.hooks.endFrame.tap(r.tag,function(){t.isFirstTimeRendering?(t.isFirstTimeRendering=!1,t.syncing=!0,f(function(){t.syncRTree(!0),t.isFirstTimeRenderingFinished=!0})):t.syncRTree()})}},{key:"syncNode",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.isConnected){var i=e.rBushNode;i.aabb&&this.rBush.remove(i.aabb);var a=e.getRenderBounds();if(a){var s=e.renderable;t&&(s.dirtyRenderBounds||(s.dirtyRenderBounds=new Vd),s.dirtyRenderBounds.update(a.center,a.halfExtents));var o=a.getMin(),l=Nf(o,2),u=l[0],c=l[1],d=a.getMax(),h=Nf(d,2),f=h[0],v=h[1];i.aabb||(i.aabb={}),i.aabb.displayObject=e,i.aabb.minX=u,i.aabb.minY=c,i.aabb.maxX=f,i.aabb.maxY=v}if(i.aabb&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.minX)&&!isNaN(i.aabb.minY))return i.aabb}}},{key:"syncRTree",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!(!t&&(this.syncing||this.syncTasks.size===0))){this.syncing=!0;var i=[],a=new Set,s=function(l){if(!a.has(l)&&l.renderable){var u=e.syncNode(l,t);u&&(i.push(u),a.add(l))}};this.syncTasks.forEach(function(o,l){o&&l.forEach(s);for(var u=l;u;)s(u),u=u.parentElement}),this.rBush.load(i),i.length=0,this.syncing=!1}}}])}();nU.tag="Prepare";function pCe(r){return!!r.document}var NS=function(r){return r.READY="ready",r.BEFORE_RENDER="beforerender",r.RERENDER="rerender",r.AFTER_RENDER="afterrender",r.BEFORE_DESTROY="beforedestroy",r.AFTER_DESTROY="afterdestroy",r.RESIZE="resize",r.DIRTY_RECTANGLE="dirtyrectangle",r.RENDERER_CHANGED="rendererchanged",r}({}),yCe=500,xCe=.1,ECe=1e3,bCe=new Rv(pu.MOUNTED),kCe=new Rv(pu.UNMOUNTED),wCe=new Rv(NS.BEFORE_RENDER),SCe=new Rv(NS.RERENDER),TCe=new Rv(NS.AFTER_RENDER),CCe=null;var mR=null,MCe=0,pR=new WeakMap,PCe=null,NCe=null,g1,Av;function OCe(r,n){return g1=new mR(r,n)}function RCe(r){return Av||(Av=mR.copy(g1),Av.oldValue=r,Av)}function ACe(){g1=Av=void 0}function rU(r){return r===Av||r===g1}function LCe(r,n){return r===n?r:Av&&rU(r)?Av:null}function iU(r){r.nodes.forEach(function(n){var e=pR.get(n);e&&e.forEach(function(t){t.observer===r&&t.removeTransientObservers()})})}function ICe(r,n){for(var e=r;e;e=e.parentNode){var t=pR.get(e);if(t)for(var i=0;i<t.length;i++){var a=t[i],s=a.options;if(!(e!==r&&!s.subtree)){var o=n(s);o&&a.enqueue(o)}}}}var OS=!1,RS=null;function DCe(r){RS.push(r),OS||(OS=!0,typeof runtime.globalThis!="undefined"?runtime.globalThis.setTimeout(AS):AS())}function AS(){OS=!1;var r=RS;RS=[],r.sort(function(e,t){return e.uid-t.uid});var n=!1;r.forEach(function(e){var t=e.takeRecords();iU(e),t.length&&(e.callback(t,e),n=!0)}),n&&AS()}function hg(r){"@babel/helpers - typeof";return hg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},hg(r)}function aU(r,n){if(hg(r)!="object"||!r)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var t=e.call(r,n||"default");if(hg(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(r)}function yR(r){var n=aU(r,"string");return hg(n)=="symbol"?n:n+""}function Sa(r,n,e){return(n=yR(n))in r?Object.defineProperty(r,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[n]=e,r}function xR(r,n){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);n&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),e.push.apply(e,t)}return e}function xo(r){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?xR(Object(e),!0).forEach(function(t){Sa(r,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):xR(Object(e)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))})}return r}function fr(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}function ER(r,n){for(var e=0;e<n.length;e++){var t=n[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,yR(t.key),t)}}function vr(r,n,e){return n&&ER(r.prototype,n),e&&ER(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function LS(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=Array(n);e<n;e++)t[e]=r[e];return t}function sU(r){if(Array.isArray(r))return LS(r)}function oU(r){if(typeof Symbol!="undefined"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function IS(r,n){if(r){if(typeof r=="string")return LS(r,n);var e={}.toString.call(r).slice(8,-1);return e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set"?Array.from(r):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?LS(r,n):void 0}}function lU(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hd(r){return sU(r)||oU(r)||IS(r)||lU()}function Vm(r){return Vm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vm(r)}function bR(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(n){}return(bR=function(){return!!r})()}function uU(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function cU(r,n){if(n&&(hg(n)=="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uU(r)}function Ss(r,n,e){return n=Vm(n),cU(r,bR()?Reflect.construct(n,e||[],Vm(r).constructor):n.apply(r,e))}function DS(r,n){return DS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},DS(r,n)}function Ts(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(n&&n.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),n&&DS(r,n)}function dU(r){if(Array.isArray(r))return r}function hU(r,n){var e=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(e!=null){var t,i,a,s,o=[],l=!0,u=!1;try{if(a=(e=e.call(r)).next,n===0){if(Object(e)!==e)return;l=!1}else for(;!(l=(t=a.call(e)).done)&&(o.push(t.value),o.length!==n);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&e.return!=null&&(s=e.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function fU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uo(r,n){return dU(r)||hU(r,n)||IS(r,n)||fU()}var Um=k(69877),Gs=k(4637),jm=k(84329);function vU(r,n){for(;!{}.hasOwnProperty.call(r,n)&&(r=Vm(r))!==null;);return r}function FS(){return FS=typeof Reflect!="undefined"&&Reflect.get?Reflect.get.bind():function(r,n,e){var t=vU(r,n);if(t){var i=Object.getOwnPropertyDescriptor(t,n);return i.get?i.get.call(arguments.length<3?r:e):i.value}},FS.apply(null,arguments)}function kR(r,n,e,t){var i=FS(Vm(1&t?r.prototype:r),n,e);return 2&t&&typeof i=="function"?function(a){return i.apply(e,a)}:i}function BS(r,n,e){r.prototype=n.prototype=e,e.constructor=r}function wR(r,n){var e=Object.create(r.prototype);for(var t in n)e[t]=n[t];return e}function D0(){}var F0=.7,_1=1/F0,Hm="\\s*([+-]?\\d+)\\s*",B0="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Df="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",gU=/^#([0-9a-f]{3,8})$/,_U=new RegExp(`^rgb\\(${Hm},${Hm},${Hm}\\)$`),mU=new RegExp(`^rgb\\(${Df},${Df},${Df}\\)$`),pU=new RegExp(`^rgba\\(${Hm},${Hm},${Hm},${B0}\\)$`),yU=new RegExp(`^rgba\\(${Df},${Df},${Df},${B0}\\)$`),xU=new RegExp(`^hsl\\(${B0},${Df},${Df}\\)$`),EU=new RegExp(`^hsla\\(${B0},${Df},${Df},${B0}\\)$`),SR={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};BS(D0,m1,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:TR,formatHex:TR,formatHex8:bU,formatHsl:kU,formatRgb:CR,toString:CR});function TR(){return this.rgb().formatHex()}function bU(){return this.rgb().formatHex8()}function kU(){return RR(this).formatHsl()}function CR(){return this.rgb().formatRgb()}function m1(r){var n,e;return r=(r+"").trim().toLowerCase(),(n=gU.exec(r))?(e=n[1].length,n=parseInt(n[1],16),e===6?MR(n):e===3?new Nc(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):e===8?p1(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):e===4?p1(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=_U.exec(r))?new Nc(n[1],n[2],n[3],1):(n=mU.exec(r))?new Nc(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=pU.exec(r))?p1(n[1],n[2],n[3],n[4]):(n=yU.exec(r))?p1(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=xU.exec(r))?OR(n[1],n[2]/100,n[3]/100,1):(n=EU.exec(r))?OR(n[1],n[2]/100,n[3]/100,n[4]):SR.hasOwnProperty(r)?MR(SR[r]):r==="transparent"?new Nc(NaN,NaN,NaN,0):null}function MR(r){return new Nc(r>>16&255,r>>8&255,r&255,1)}function p1(r,n,e,t){return t<=0&&(r=n=e=NaN),new Nc(r,n,e,t)}function wU(r){return r instanceof D0||(r=m1(r)),r?(r=r.rgb(),new Nc(r.r,r.g,r.b,r.opacity)):new Nc}function SU(r,n,e,t){return arguments.length===1?wU(r):new Nc(r,n,e,t==null?1:t)}function Nc(r,n,e,t){this.r=+r,this.g=+n,this.b=+e,this.opacity=+t}BS(Nc,SU,wR(D0,{brighter(r){return r=r==null?_1:Math.pow(_1,r),new Nc(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?F0:Math.pow(F0,r),new Nc(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new Nc(d_(this.r),d_(this.g),d_(this.b),y1(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:PR,formatHex:PR,formatHex8:TU,formatRgb:NR,toString:NR}));function PR(){return`#${h_(this.r)}${h_(this.g)}${h_(this.b)}`}function TU(){return`#${h_(this.r)}${h_(this.g)}${h_(this.b)}${h_((isNaN(this.opacity)?1:this.opacity)*255)}`}function NR(){const r=y1(this.opacity);return`${r===1?"rgb(":"rgba("}${d_(this.r)}, ${d_(this.g)}, ${d_(this.b)}${r===1?")":`, ${r})`}`}function y1(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function d_(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function h_(r){return r=d_(r),(r<16?"0":"")+r.toString(16)}function OR(r,n,e,t){return t<=0?r=n=e=NaN:e<=0||e>=1?r=n=NaN:n<=0&&(r=NaN),new Dh(r,n,e,t)}function RR(r){if(r instanceof Dh)return new Dh(r.h,r.s,r.l,r.opacity);if(r instanceof D0||(r=m1(r)),!r)return new Dh;if(r instanceof Dh)return r;r=r.rgb();var n=r.r/255,e=r.g/255,t=r.b/255,i=Math.min(n,e,t),a=Math.max(n,e,t),s=NaN,o=a-i,l=(a+i)/2;return o?(n===a?s=(e-t)/o+(e<t)*6:e===a?s=(t-n)/o+2:s=(n-e)/o+4,o/=l<.5?a+i:2-a-i,s*=60):o=l>0&&l<1?0:s,new Dh(s,o,l,r.opacity)}function CU(r,n,e,t){return arguments.length===1?RR(r):new Dh(r,n,e,t==null?1:t)}function Dh(r,n,e,t){this.h=+r,this.s=+n,this.l=+e,this.opacity=+t}BS(Dh,CU,wR(D0,{brighter(r){return r=r==null?_1:Math.pow(_1,r),new Dh(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?F0:Math.pow(F0,r),new Dh(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,n=isNaN(r)||isNaN(this.s)?0:this.s,e=this.l,t=e+(e<.5?e:1-e)*n,i=2*e-t;return new Nc($S(r>=240?r-240:r+120,i,t),$S(r,i,t),$S(r<120?r+240:r-120,i,t),this.opacity)},clamp(){return new Dh(AR(this.h),x1(this.s),x1(this.l),y1(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const r=y1(this.opacity);return`${r===1?"hsl(":"hsla("}${AR(this.h)}, ${x1(this.s)*100}%, ${x1(this.l)*100}%${r===1?")":`, ${r})`}`}}));function AR(r){return r=(r||0)%360,r<0?r+360:r}function x1(r){return Math.max(0,Math.min(1,r||0))}function $S(r,n,e){return(r<60?n+(e-n)*r/60:r<180?e:r<240?n+(e-n)*(240-r)/60:n)*255}function f_(){"use strict";f_=function(){return n};var r,n={},e=Object.prototype,t=e.hasOwnProperty,i=Object.defineProperty||function(se,V,ee){se[V]=ee.value},a=typeof Symbol=="function"?Symbol:{},s=a.iterator||"@@iterator",o=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(se,V,ee){return Object.defineProperty(se,V,{value:ee,enumerable:!0,configurable:!0,writable:!0}),se[V]}try{u({},"")}catch(se){u=function(ee,he,ut){return ee[he]=ut}}function c(se,V,ee,he){var ut=V&&V.prototype instanceof y?V:y,ct=Object.create(ut.prototype),Lt=new le(he||[]);return i(ct,"_invoke",{value:B(se,ee,Lt)}),ct}function d(se,V,ee){try{return{type:"normal",arg:se.call(V,ee)}}catch(he){return{type:"throw",arg:he}}}n.wrap=c;var h="suspendedStart",f="suspendedYield",v="executing",g="completed",m={};function y(){}function w(){}function T(){}var G={};u(G,s,function(){return this});var x=Object.getPrototypeOf,_=x&&x(x(ue([])));_&&_!==e&&t.call(_,s)&&(G=_);var p=T.prototype=y.prototype=Object.create(G);function b(se){["next","throw","return"].forEach(function(V){u(se,V,function(ee){return this._invoke(V,ee)})})}function R(se,V){function ee(ut,ct,Lt,vn){var tn=d(se[ut],se,ct);if(tn.type!=="throw"){var rn=tn.arg,mn=rn.value;return mn&&hg(mn)=="object"&&t.call(mn,"__await")?V.resolve(mn.__await).then(function(ar){ee("next",ar,Lt,vn)},function(ar){ee("throw",ar,Lt,vn)}):V.resolve(mn).then(function(ar){rn.value=ar,Lt(rn)},function(ar){return ee("throw",ar,Lt,vn)})}vn(tn.arg)}var he;i(this,"_invoke",{value:function(ct,Lt){function vn(){return new V(function(tn,rn){ee(ct,Lt,tn,rn)})}return he=he?he.then(vn,vn):vn()}})}function B(se,V,ee){var he=h;return function(ut,ct){if(he===v)throw Error("Generator is already running");if(he===g){if(ut==="throw")throw ct;return{value:r,done:!0}}for(ee.method=ut,ee.arg=ct;;){var Lt=ee.delegate;if(Lt){var vn=j(Lt,ee);if(vn){if(vn===m)continue;return vn}}if(ee.method==="next")ee.sent=ee._sent=ee.arg;else if(ee.method==="throw"){if(he===h)throw he=g,ee.arg;ee.dispatchException(ee.arg)}else ee.method==="return"&&ee.abrupt("return",ee.arg);he=v;var tn=d(se,V,ee);if(tn.type==="normal"){if(he=ee.done?g:f,tn.arg===m)continue;return{value:tn.arg,done:ee.done}}tn.type==="throw"&&(he=g,ee.method="throw",ee.arg=tn.arg)}}}function j(se,V){var ee=V.method,he=se.iterator[ee];if(he===r)return V.delegate=null,ee==="throw"&&se.iterator.return&&(V.method="return",V.arg=r,j(se,V),V.method==="throw")||ee!=="return"&&(V.method="throw",V.arg=new TypeError("The iterator does not provide a '"+ee+"' method")),m;var ut=d(he,se.iterator,V.arg);if(ut.type==="throw")return V.method="throw",V.arg=ut.arg,V.delegate=null,m;var ct=ut.arg;return ct?ct.done?(V[se.resultName]=ct.value,V.next=se.nextLoc,V.method!=="return"&&(V.method="next",V.arg=r),V.delegate=null,m):ct:(V.method="throw",V.arg=new TypeError("iterator result is not an object"),V.delegate=null,m)}function Z(se){var V={tryLoc:se[0]};1 in se&&(V.catchLoc=se[1]),2 in se&&(V.finallyLoc=se[2],V.afterLoc=se[3]),this.tryEntries.push(V)}function te(se){var V=se.completion||{};V.type="normal",delete V.arg,se.completion=V}function le(se){this.tryEntries=[{tryLoc:"root"}],se.forEach(Z,this),this.reset(!0)}function ue(se){if(se||se===""){var V=se[s];if(V)return V.call(se);if(typeof se.next=="function")return se;if(!isNaN(se.length)){var ee=-1,he=function ut(){for(;++ee<se.length;)if(t.call(se,ee))return ut.value=se[ee],ut.done=!1,ut;return ut.value=r,ut.done=!0,ut};return he.next=he}}throw new TypeError(hg(se)+" is not iterable")}return w.prototype=T,i(p,"constructor",{value:T,configurable:!0}),i(T,"constructor",{value:w,configurable:!0}),w.displayName=u(T,l,"GeneratorFunction"),n.isGeneratorFunction=function(se){var V=typeof se=="function"&&se.constructor;return!!V&&(V===w||(V.displayName||V.name)==="GeneratorFunction")},n.mark=function(se){return Object.setPrototypeOf?Object.setPrototypeOf(se,T):(se.__proto__=T,u(se,l,"GeneratorFunction")),se.prototype=Object.create(p),se},n.awrap=function(se){return{__await:se}},b(R.prototype),u(R.prototype,o,function(){return this}),n.AsyncIterator=R,n.async=function(se,V,ee,he,ut){ut===void 0&&(ut=Promise);var ct=new R(c(se,V,ee,he),ut);return n.isGeneratorFunction(V)?ct:ct.next().then(function(Lt){return Lt.done?Lt.value:ct.next()})},b(p),u(p,l,"Generator"),u(p,s,function(){return this}),u(p,"toString",function(){return"[object Generator]"}),n.keys=function(se){var V=Object(se),ee=[];for(var he in V)ee.push(he);return ee.reverse(),function ut(){for(;ee.length;){var ct=ee.pop();if(ct in V)return ut.value=ct,ut.done=!1,ut}return ut.done=!0,ut}},n.values=ue,le.prototype={constructor:le,reset:function(V){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(te),!V)for(var ee in this)ee.charAt(0)==="t"&&t.call(this,ee)&&!isNaN(+ee.slice(1))&&(this[ee]=r)},stop:function(){this.done=!0;var V=this.tryEntries[0].completion;if(V.type==="throw")throw V.arg;return this.rval},dispatchException:function(V){if(this.done)throw V;var ee=this;function he(rn,mn){return Lt.type="throw",Lt.arg=V,ee.next=rn,mn&&(ee.method="next",ee.arg=r),!!mn}for(var ut=this.tryEntries.length-1;ut>=0;--ut){var ct=this.tryEntries[ut],Lt=ct.completion;if(ct.tryLoc==="root")return he("end");if(ct.tryLoc<=this.prev){var vn=t.call(ct,"catchLoc"),tn=t.call(ct,"finallyLoc");if(vn&&tn){if(this.prev<ct.catchLoc)return he(ct.catchLoc,!0);if(this.prev<ct.finallyLoc)return he(ct.finallyLoc)}else if(vn){if(this.prev<ct.catchLoc)return he(ct.catchLoc,!0)}else{if(!tn)throw Error("try statement without catch or finally");if(this.prev<ct.finallyLoc)return he(ct.finallyLoc)}}}},abrupt:function(V,ee){for(var he=this.tryEntries.length-1;he>=0;--he){var ut=this.tryEntries[he];if(ut.tryLoc<=this.prev&&t.call(ut,"finallyLoc")&&this.prev<ut.finallyLoc){var ct=ut;break}}ct&&(V==="break"||V==="continue")&&ct.tryLoc<=ee&&ee<=ct.finallyLoc&&(ct=null);var Lt=ct?ct.completion:{};return Lt.type=V,Lt.arg=ee,ct?(this.method="next",this.next=ct.finallyLoc,m):this.complete(Lt)},complete:function(V,ee){if(V.type==="throw")throw V.arg;return V.type==="break"||V.type==="continue"?this.next=V.arg:V.type==="return"?(this.rval=this.arg=V.arg,this.method="return",this.next="end"):V.type==="normal"&&ee&&(this.next=ee),m},finish:function(V){for(var ee=this.tryEntries.length-1;ee>=0;--ee){var he=this.tryEntries[ee];if(he.finallyLoc===V)return this.complete(he.completion,he.afterLoc),te(he),m}},catch:function(V){for(var ee=this.tryEntries.length-1;ee>=0;--ee){var he=this.tryEntries[ee];if(he.tryLoc===V){var ut=he.completion;if(ut.type==="throw"){var ct=ut.arg;te(he)}return ct}}throw Error("illegal catch attempt")},delegateYield:function(V,ee,he){return this.delegate={iterator:ue(V),resultName:ee,nextLoc:he},this.method==="next"&&(this.arg=r),m}},n}function LR(r,n,e,t,i,a,s){try{var o=r[a](s),l=o.value}catch(u){return void e(u)}o.done?n(l):Promise.resolve(l).then(t,i)}function GS(r){return function(){var n=this,e=arguments;return new Promise(function(t,i){var a=r.apply(n,e);function s(l){LR(a,t,i,s,o,"next",l)}function o(l){LR(a,t,i,s,o,"throw",l)}s(void 0)})}}function Wm(r,n){var e=typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(!e){if(Array.isArray(r)||(e=IS(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:i}}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 a,s=!0,o=!1;return{s:function(){e=e.call(r)},n:function(){var u=e.next();return s=u.done,u},e:function(u){o=!0,a=u},f:function(){try{s||e.return==null||e.return()}finally{if(o)throw a}}}}function MU(r,n){if(r==null)return{};var e={};for(var t in r)if({}.hasOwnProperty.call(r,t)){if(n.includes(t))continue;e[t]=r[t]}return e}function v_(r,n){if(r==null)return{};var e,t,i=MU(r,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(t=0;t<a.length;t++)e=a[t],n.includes(e)||{}.propertyIsEnumerable.call(r,e)&&(i[e]=r[e])}return i}var PU=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof k.g!="undefined"?k.g:typeof self!="undefined"?self:{},IR={exports:{}};(function(r,n){(function(e,t){r.exports=t()})(PU,function(){function e(x,_,p,b,R){t(x,_,p||0,b||x.length-1,R||a)}function t(x,_,p,b,R){for(;b>p;){if(b-p>600){var B=b-p+1,j=_-p+1,Z=Math.log(B),te=.5*Math.exp(2*Z/3),le=.5*Math.sqrt(Z*te*(B-te)/B)*(j-B/2<0?-1:1),ue=Math.max(p,Math.floor(_-j*te/B+le)),se=Math.min(b,Math.floor(_+(B-j)*te/B+le));t(x,_,ue,se,R)}var V=x[_],ee=p,he=b;for(i(x,p,_),R(x[b],V)>0&&i(x,p,b);ee<he;){for(i(x,ee,he),ee++,he--;R(x[ee],V)<0;)ee++;for(;R(x[he],V)>0;)he--}R(x[p],V)===0?i(x,p,he):(he++,i(x,he,b)),he<=_&&(p=he+1),_<=he&&(b=he-1)}}function i(x,_,p){var b=x[_];x[_]=x[p],x[p]=b}function a(x,_){return x<_?-1:x>_?1:0}var s=function(_){_===void 0&&(_=9),this._maxEntries=Math.max(4,_),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()};s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(_){var p=this.data,b=[];if(!w(_,p))return b;for(var R=this.toBBox,B=[];p;){for(var j=0;j<p.children.length;j++){var Z=p.children[j],te=p.leaf?R(Z):Z;w(_,te)&&(p.leaf?b.push(Z):y(_,te)?this._all(Z,b):B.push(Z))}p=B.pop()}return b},s.prototype.collides=function(_){var p=this.data;if(!w(_,p))return!1;for(var b=[];p;){for(var R=0;R<p.children.length;R++){var B=p.children[R],j=p.leaf?this.toBBox(B):B;if(w(_,j)){if(p.leaf||y(_,j))return!0;b.push(B)}}p=b.pop()}return!1},s.prototype.load=function(_){if(!(_&&_.length))return this;if(_.length<this._minEntries){for(var p=0;p<_.length;p++)this.insert(_[p]);return this}var b=this._build(_.slice(),0,_.length-1,0);if(!this.data.children.length)this.data=b;else if(this.data.height===b.height)this._splitRoot(this.data,b);else{if(this.data.height<b.height){var R=this.data;this.data=b,b=R}this._insert(b,this.data.height-b.height-1,!0)}return this},s.prototype.insert=function(_){return _&&this._insert(_,this.data.height-1),this},s.prototype.clear=function(){return this.data=T([]),this},s.prototype.remove=function(_,p){if(!_)return this;for(var b=this.data,R=this.toBBox(_),B=[],j=[],Z,te,le;b||B.length;){if(b||(b=B.pop(),te=B[B.length-1],Z=j.pop(),le=!0),b.leaf){var ue=o(_,b.children,p);if(ue!==-1)return b.children.splice(ue,1),B.push(b),this._condense(B),this}!le&&!b.leaf&&y(b,R)?(B.push(b),j.push(Z),Z=0,te=b,b=b.children[0]):te?(Z++,b=te.children[Z],le=!1):b=null}return this},s.prototype.toBBox=function(_){return _},s.prototype.compareMinX=function(_,p){return _.minX-p.minX},s.prototype.compareMinY=function(_,p){return _.minY-p.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(_){return this.data=_,this},s.prototype._all=function(_,p){for(var b=[];_;)_.leaf?p.push.apply(p,_.children):b.push.apply(b,_.children),_=b.pop();return p},s.prototype._build=function(_,p,b,R){var B=b-p+1,j=this._maxEntries,Z;if(B<=j)return Z=T(_.slice(p,b+1)),l(Z,this.toBBox),Z;R||(R=Math.ceil(Math.log(B)/Math.log(j)),j=Math.ceil(B/Math.pow(j,R-1))),Z=T([]),Z.leaf=!1,Z.height=R;var te=Math.ceil(B/j),le=te*Math.ceil(Math.sqrt(j));G(_,p,b,le,this.compareMinX);for(var ue=p;ue<=b;ue+=le){var se=Math.min(ue+le-1,b);G(_,ue,se,te,this.compareMinY);for(var V=ue;V<=se;V+=te){var ee=Math.min(V+te-1,se);Z.children.push(this._build(_,V,ee,R-1))}}return l(Z,this.toBBox),Z},s.prototype._chooseSubtree=function(_,p,b,R){for(;R.push(p),!(p.leaf||R.length-1===b);){for(var B=1/0,j=1/0,Z=void 0,te=0;te<p.children.length;te++){var le=p.children[te],ue=f(le),se=g(_,le)-ue;se<j?(j=se,B=ue<B?ue:B,Z=le):se===j&&ue<B&&(B=ue,Z=le)}p=Z||p.children[0]}return p},s.prototype._insert=function(_,p,b){var R=b?_:this.toBBox(_),B=[],j=this._chooseSubtree(R,this.data,p,B);for(j.children.push(_),c(j,R);p>=0&&B[p].children.length>this._maxEntries;)this._split(B,p),p--;this._adjustParentBBoxes(R,B,p)},s.prototype._split=function(_,p){var b=_[p],R=b.children.length,B=this._minEntries;this._chooseSplitAxis(b,B,R);var j=this._chooseSplitIndex(b,B,R),Z=T(b.children.splice(j,b.children.length-j));Z.height=b.height,Z.leaf=b.leaf,l(b,this.toBBox),l(Z,this.toBBox),p?_[p-1].children.push(Z):this._splitRoot(b,Z)},s.prototype._splitRoot=function(_,p){this.data=T([_,p]),this.data.height=_.height+1,this.data.leaf=!1,l(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(_,p,b){for(var R,B=1/0,j=1/0,Z=p;Z<=b-p;Z++){var te=u(_,0,Z,this.toBBox),le=u(_,Z,b,this.toBBox),ue=m(te,le),se=f(te)+f(le);ue<B?(B=ue,R=Z,j=se<j?se:j):ue===B&&se<j&&(j=se,R=Z)}return R||b-p},s.prototype._chooseSplitAxis=function(_,p,b){var R=_.leaf?this.compareMinX:d,B=_.leaf?this.compareMinY:h,j=this._allDistMargin(_,p,b,R),Z=this._allDistMargin(_,p,b,B);j<Z&&_.children.sort(R)},s.prototype._allDistMargin=function(_,p,b,R){_.children.sort(R);for(var B=this.toBBox,j=u(_,0,p,B),Z=u(_,b-p,b,B),te=v(j)+v(Z),le=p;le<b-p;le++){var ue=_.children[le];c(j,_.leaf?B(ue):ue),te+=v(j)}for(var se=b-p-1;se>=p;se--){var V=_.children[se];c(Z,_.leaf?B(V):V),te+=v(Z)}return te},s.prototype._adjustParentBBoxes=function(_,p,b){for(var R=b;R>=0;R--)c(p[R],_)},s.prototype._condense=function(_){for(var p=_.length-1,b=void 0;p>=0;p--)_[p].children.length===0?p>0?(b=_[p-1].children,b.splice(b.indexOf(_[p]),1)):this.clear():l(_[p],this.toBBox)};function o(x,_,p){if(!p)return _.indexOf(x);for(var b=0;b<_.length;b++)if(p(x,_[b]))return b;return-1}function l(x,_){u(x,0,x.children.length,_,x)}function u(x,_,p,b,R){R||(R=T(null)),R.minX=1/0,R.minY=1/0,R.maxX=-1/0,R.maxY=-1/0;for(var B=_;B<p;B++){var j=x.children[B];c(R,x.leaf?b(j):j)}return R}function c(x,_){return x.minX=Math.min(x.minX,_.minX),x.minY=Math.min(x.minY,_.minY),x.maxX=Math.max(x.maxX,_.maxX),x.maxY=Math.max(x.maxY,_.maxY),x}function d(x,_){return x.minX-_.minX}function h(x,_){return x.minY-_.minY}function f(x){return(x.maxX-x.minX)*(x.maxY-x.minY)}function v(x){return x.maxX-x.minX+(x.maxY-x.minY)}function g(x,_){return(Math.max(_.maxX,x.maxX)-Math.min(_.minX,x.minX))*(Math.max(_.maxY,x.maxY)-Math.min(_.minY,x.minY))}function m(x,_){var p=Math.max(x.minX,_.minX),b=Math.max(x.minY,_.minY),R=Math.min(x.maxX,_.maxX),B=Math.min(x.maxY,_.maxY);return Math.max(0,R-p)*Math.max(0,B-b)}function y(x,_){return x.minX<=_.minX&&x.minY<=_.minY&&_.maxX<=x.maxX&&_.maxY<=x.maxY}function w(x,_){return _.minX<=x.maxX&&_.minY<=x.maxY&&_.maxX>=x.minX&&_.maxY>=x.minY}function T(x){return{children:x,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function G(x,_,p,b,R){for(var B=[_,p];B.length;)if(p=B.pop(),_=B.pop(),!(p-_<=b)){var j=_+Math.ceil((p-_)/b/2)*b;e(x,j,_,p,R),B.push(_,j,j,p)}}return s})})(IR);var NU=IR.exports,yr=function(r){return r.GROUP="g",r.FRAGMENT="fragment",r.CIRCLE="circle",r.ELLIPSE="ellipse",r.IMAGE="image",r.RECT="rect",r.LINE="line",r.POLYLINE="polyline",r.POLYGON="polygon",r.TEXT="text",r.PATH="path",r.HTML="html",r.MESH="mesh",r}({}),zS=function(r){return r[r.ZERO=0]="ZERO",r[r.NEGATIVE_ONE=1]="NEGATIVE_ONE",r}({}),FCe=null,BCe=null,VS=E.IH,Ym=E.JG,OU=E.Fp,RU=E.VV,DR=E.bA,US=E.lu,hl=function(){function r(){fr(this,r),this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return vr(r,[{key:"update",value:function(e,t){Ym(this.center,e),Ym(this.halfExtents,t),US(this.min,this.center,this.halfExtents),VS(this.max,this.center,this.halfExtents)}},{key:"setMinMax",value:function(e,t){VS(this.center,t,e),DR(this.center,this.center,.5),US(this.halfExtents,t,e),DR(this.halfExtents,this.halfExtents,.5),Ym(this.min,e),Ym(this.max,t)}},{key:"getMin",value:function(){return this.min}},{key:"getMax",value:function(){return this.max}},{key:"add",value:function(e){if(!r.isEmpty(e)){if(r.isEmpty(this)){this.setMinMax(e.getMin(),e.getMax());return}var t=this.center,i=t[0],a=t[1],s=t[2],o=this.halfExtents,l=o[0],u=o[1],c=o[2],d=i-l,h=i+l,f=a-u,v=a+u,g=s-c,m=s+c,y=e.center,w=y[0],T=y[1],G=y[2],x=e.halfExtents,_=x[0],p=x[1],b=x[2],R=w-_,B=w+_,j=T-p,Z=T+p,te=G-b,le=G+b;R<d&&(d=R),B>h&&(h=B),j<f&&(f=j),Z>v&&(v=Z),te<g&&(g=te),le>m&&(m=le),t[0]=(d+h)*.5,t[1]=(f+v)*.5,t[2]=(g+m)*.5,o[0]=(h-d)*.5,o[1]=(v-f)*.5,o[2]=(m-g)*.5,this.min[0]=d,this.min[1]=f,this.min[2]=g,this.max[0]=h,this.max[1]=v,this.max[2]=m}}},{key:"setFromTransformedAABB",value:function(e,t){var i=this.center,a=this.halfExtents,s=e.center,o=e.halfExtents,l=t[0],u=t[4],c=t[8],d=t[1],h=t[5],f=t[9],v=t[2],g=t[6],m=t[10],y=Math.abs(l),w=Math.abs(u),T=Math.abs(c),G=Math.abs(d),x=Math.abs(h),_=Math.abs(f),p=Math.abs(v),b=Math.abs(g),R=Math.abs(m);i[0]=t[12]+l*s[0]+u*s[1]+c*s[2],i[1]=t[13]+d*s[0]+h*s[1]+f*s[2],i[2]=t[14]+v*s[0]+g*s[1]+m*s[2],a[0]=y*o[0]+w*o[1]+T*o[2],a[1]=G*o[0]+x*o[1]+_*o[2],a[2]=p*o[0]+b*o[1]+R*o[2],US(this.min,i,a),VS(this.max,i,a)}},{key:"intersects",value:function(e){var t=this.getMax(),i=this.getMin(),a=e.getMax(),s=e.getMin();return i[0]<=a[0]&&t[0]>=s[0]&&i[1]<=a[1]&&t[1]>=s[1]&&i[2]<=a[2]&&t[2]>=s[2]}},{key:"intersection",value:function(e){if(!this.intersects(e))return null;var t=new r,i=OU([0,0,0],this.getMin(),e.getMin()),a=RU([0,0,0],this.getMax(),e.getMax());return t.setMinMax(i,a),t}},{key:"getNegativeFarPoint",value:function(e){return e.pnVertexFlag===273?Ym([0,0,0],this.min):e.pnVertexFlag===272?[this.min[0],this.min[1],this.max[2]]:e.pnVertexFlag===257?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===256?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===17?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===16?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===1?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]}},{key:"getPositiveFarPoint",value:function(e){return e.pnVertexFlag===273?Ym([0,0,0],this.max):e.pnVertexFlag===272?[this.max[0],this.max[1],this.min[2]]:e.pnVertexFlag===257?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===256?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===17?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===16?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===1?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]}}],[{key:"isEmpty",value:function(e){return!e||e.halfExtents[0]===0&&e.halfExtents[1]===0&&e.halfExtents[2]===0}}])}(),AU=function(){function r(n,e){fr(this,r),this.distance=n||0,this.normal=e||E.al(0,1,0),this.updatePNVertexFlag()}return vr(r,[{key:"updatePNVertexFlag",value:function(){this.pnVertexFlag=(+(this.normal[0]>=0)<<8)+(+(this.normal[1]>=0)<<4)+ +(this.normal[2]>=0)}},{key:"distanceToPoint",value:function(e){return E.AK(e,this.normal)-this.distance}},{key:"normalize",value:function(){var e=1/E.Zh(this.normal);E.bA(this.normal,this.normal,e),this.distance*=e}},{key:"intersectsLine",value:function(e,t,i){var a=this.distanceToPoint(e),s=this.distanceToPoint(t),o=a/(a-s),l=o>=0&&o<=1;return l&&i&&E.t7(i,e,t,o),l}}])}(),Zm=function(r){return r[r.OUTSIDE=4294967295]="OUTSIDE",r[r.INSIDE=0]="INSIDE",r[r.INDETERMINATE=2147483647]="INDETERMINATE",r}({}),LU=function(){function r(n){if(fr(this,r),this.planes=[],n)this.planes=n;else for(var e=0;e<6;e++)this.planes.push(new AU)}return vr(r,[{key:"extractFromVPMatrix",value:function(e){var t=Uo(e,16),i=t[0],a=t[1],s=t[2],o=t[3],l=t[4],u=t[5],c=t[6],d=t[7],h=t[8],f=t[9],v=t[10],g=t[11],m=t[12],y=t[13],w=t[14],T=t[15];E.t8(this.planes[0].normal,o-i,d-l,g-h),this.planes[0].distance=T-m,E.t8(this.planes[1].normal,o+i,d+l,g+h),this.planes[1].distance=T+m,E.t8(this.planes[2].normal,o+a,d+u,g+f),this.planes[2].distance=T+y,E.t8(this.planes[3].normal,o-a,d-u,g-f),this.planes[3].distance=T-y,E.t8(this.planes[4].normal,o-s,d-c,g-v),this.planes[4].distance=T-w,E.t8(this.planes[5].normal,o+s,d+c,g+v),this.planes[5].distance=T+w,this.planes.forEach(function(G){G.normalize(),G.updatePNVertexFlag()})}}])}(),tc=function(){function r(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;fr(this,r),this.x=0,this.y=0,this.x=n,this.y=e}return vr(r,[{key:"clone",value:function(){return new r(this.x,this.y)}},{key:"copyFrom",value:function(e){this.x=e.x,this.y=e.y}}])}(),Xm=function(){function r(n,e,t,i){fr(this,r),this.x=n,this.y=e,this.width=t,this.height=i,this.left=n,this.right=n+t,this.top=e,this.bottom=e+i}return vr(r,[{key:"toJSON",value:function(){}}],[{key:"fromRect",value:function(e){return new r(e.x,e.y,e.width,e.height)}},{key:"applyTransform",value:function(e,t){var i=me.al(e.x,e.y,0,1),a=me.al(e.x+e.width,e.y,0,1),s=me.al(e.x,e.y+e.height,0,1),o=me.al(e.x+e.width,e.y+e.height,0,1),l=me.Ue(),u=me.Ue(),c=me.Ue(),d=me.Ue();me.fF(l,i,t),me.fF(u,a,t),me.fF(c,s,t),me.fF(d,o,t);var h=Math.min(l[0],u[0],c[0],d[0]),f=Math.min(l[1],u[1],c[1],d[1]),v=Math.max(l[0],u[0],c[0],d[0]),g=Math.max(l[1],u[1],c[1],d[1]);return r.fromRect({x:h,y:f,width:v-h,height:g-f})}}])}(),Lo="Method not implemented.",Km="Use document.documentElement instead.",IU="Cannot append a destroyed element.";function jS(r){return r===void 0?0:r>360||r<-360?r%360:r}var HS=E.Ue();function Oc(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;return Array.isArray(r)&&r.length===3?t?E.d9(r):E.JG(HS,r):(0,pe.Z)(r)?t?E.al(r,n,e):E.t8(HS,r,n,e):t?E.al(r[0],r[1]||n,r[2]||e):E.t8(HS,r[0],r[1]||n,r[2]||e)}var DU=Math.PI/180;function zs(r){return r*DU}var FU=180/Math.PI;function Rc(r){return r*FU}var BU=.9;function $Ce(r){return r%=400,r<0&&(r+=400),r*BU}function GCe(r){return r/360}function $U(r){return 360*r}var E1=Math.PI/2;function GU(r,n){var e=n[0],t=n[1],i=n[2],a=n[3],s=e*e,o=t*t,l=i*i,u=a*a,c=s+o+l+u,d=e*a-t*i;return d>.499995*c?(r[0]=E1,r[1]=2*Math.atan2(t,e),r[2]=0):d<-.499995*c?(r[0]=-E1,r[1]=2*Math.atan2(t,e),r[2]=0):(r[0]=Math.asin(2*(e*i-a*t)),r[1]=Math.atan2(2*(e*a+t*i),1-2*(l+u)),r[2]=Math.atan2(2*(e*t+i*a),1-2*(o+l))),r}function zU(r,n){var e,t,i=L.getScaling(E.Ue(),n),a=Uo(i,3),s=a[0],o=a[1],l=a[2],u=Math.asin(-n[2]/s);return u<E1?u>-E1?(e=Math.atan2(n[6]/o,n[10]/l),t=Math.atan2(n[1]/s,n[0]/s)):(t=0,e=-Math.atan2(n[4]/o,n[5]/o)):(t=0,e=Math.atan2(n[4]/o,n[5]/o)),r[0]=e,r[1]=u,r[2]=t,r}function WS(r,n){return n.length===16?zU(r,n):GU(r,n)}function VU(r,n,e,t,i){var a=Math.cos(r),s=Math.sin(r);return Ke.al(t*a,i*s,0,-t*s,i*a,0,n,e,1)}function UU(r,n,e,t,i,a,s){var o=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1,l=2*a,u=e-n,c=t-i,d=l/u,h=l/c,f=(e+n)/u,v=(t+i)/c,g,m,y=s-a,w=s*a;return o?(g=-s/y,m=-w/y):(g=-(s+a)/y,m=-2*w/y),r[0]=d,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=h,r[6]=0,r[7]=0,r[8]=f,r[9]=v,r[10]=g,r[11]=-1,r[12]=0,r[13]=0,r[14]=m,r[15]=0,r}function FR(r){var n=r[0],e=r[1],t=r[3],i=r[4],a=Math.sqrt(n*n+e*e),s=Math.sqrt(t*t+i*i),o=n*i-e*t;if(o<0&&(n<i?a=-a:s=-s),a){var l=1/a;n*=l,e*=l}if(s){var u=1/s;t*=u,i*=u}var c=Math.atan2(e,n),d=Rc(c);return[r[6],r[7],a,s,d]}var Ff=L.create(),Fh=L.create(),$0=me.Ue(),Di=[E.Ue(),E.Ue(),E.Ue()],BR=E.Ue();function jU(r,n,e,t,i,a){if(!HU(Ff,r)||(L.copy(Fh,Ff),Fh[3]=0,Fh[7]=0,Fh[11]=0,Fh[15]=1,Math.abs(L.determinant(Fh))<1e-8))return!1;var s=Ff[3],o=Ff[7],l=Ff[11],u=Ff[12],c=Ff[13],d=Ff[14],h=Ff[15];if(s!==0||o!==0||l!==0){$0[0]=s,$0[1]=o,$0[2]=l,$0[3]=h;var f=L.invert(Fh,Fh);if(!f)return!1;L.transpose(Fh,Fh),me.fF(i,$0,Fh)}else i[0]=i[1]=i[2]=0,i[3]=1;if(n[0]=u,n[1]=c,n[2]=d,WU(Di,Ff),e[0]=E.kE(Di[0]),E.Fv(Di[0],Di[0]),t[0]=E.AK(Di[0],Di[1]),YS(Di[1],Di[1],Di[0],1,-t[0]),e[1]=E.kE(Di[1]),E.Fv(Di[1],Di[1]),t[0]/=e[1],t[1]=E.AK(Di[0],Di[2]),YS(Di[2],Di[2],Di[0],1,-t[1]),t[2]=E.AK(Di[1],Di[2]),YS(Di[2],Di[2],Di[1],1,-t[2]),e[2]=E.kE(Di[2]),E.Fv(Di[2],Di[2]),t[1]/=e[2],t[2]/=e[2],E.kC(BR,Di[1],Di[2]),E.AK(Di[0],BR)<0)for(var v=0;v<3;v++)e[v]*=-1,Di[v][0]*=-1,Di[v][1]*=-1,Di[v][2]*=-1;return a[0]=.5*Math.sqrt(Math.max(1+Di[0][0]-Di[1][1]-Di[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-Di[0][0]+Di[1][1]-Di[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-Di[0][0]-Di[1][1]+Di[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+Di[0][0]+Di[1][1]+Di[2][2],0)),Di[2][1]>Di[1][2]&&(a[0]=-a[0]),Di[0][2]>Di[2][0]&&(a[1]=-a[1]),Di[1][0]>Di[0][1]&&(a[2]=-a[2]),!0}function HU(r,n){var e=n[15];if(e===0)return!1;for(var t=1/e,i=0;i<16;i++)r[i]=n[i]*t;return!0}function WU(r,n){r[0][0]=n[0],r[0][1]=n[1],r[0][2]=n[2],r[1][0]=n[4],r[1][1]=n[5],r[1][2]=n[6],r[2][0]=n[8],r[2][1]=n[9],r[2][2]=n[10]}function YS(r,n,e,t,i){r[0]=n[0]*t+e[0]*i,r[1]=n[1]*t+e[1]*i,r[2]=n[2]*t+e[2]*i}var fl=function(r){return r[r.ORBITING=0]="ORBITING",r[r.EXPLORING=1]="EXPLORING",r[r.TRACKING=2]="TRACKING",r}({}),ZS=function(r){return r[r.DEFAULT=0]="DEFAULT",r[r.ROTATIONAL=1]="ROTATIONAL",r[r.TRANSLATIONAL=2]="TRANSLATIONAL",r[r.CINEMATIC=3]="CINEMATIC",r}({}),Wd=function(r){return r[r.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",r[r.PERSPECTIVE=1]="PERSPECTIVE",r}({}),$R={UPDATED:"updated"},GR=2e-4,YU=function(){function r(){fr(this,r),this.clipSpaceNearZ=zS.NEGATIVE_ONE,this.eventEmitter=new Se.Z,this.matrix=L.create(),this.right=E.al(1,0,0),this.up=E.al(0,1,0),this.forward=E.al(0,0,1),this.position=E.al(0,0,1),this.focalPoint=E.al(0,0,0),this.distanceVector=E.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=L.create(),this.projectionMatrixInverse=L.create(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=fl.EXPLORING,this.trackingMode=ZS.DEFAULT,this.projectionMode=Wd.PERSPECTIVE,this.frustum=new LU,this.orthoMatrix=L.create()}return vr(r,[{key:"isOrtho",value:function(){return this.projectionMode===Wd.ORTHOGRAPHIC}},{key:"getProjectionMode",value:function(){return this.projectionMode}},{key:"getPerspective",value:function(){return this.jitteredProjectionMatrix||this.projectionMatrix}},{key:"getPerspectiveInverse",value:function(){return this.projectionMatrixInverse}},{key:"getFrustum",value:function(){return this.frustum}},{key:"getPosition",value:function(){return this.position}},{key:"getFocalPoint",value:function(){return this.focalPoint}},{key:"getDollyingStep",value:function(){return this.dollyingStep}},{key:"getNear",value:function(){return this.near}},{key:"getFar",value:function(){return this.far}},{key:"getZoom",value:function(){return this.zoom}},{key:"getOrthoMatrix",value:function(){return this.orthoMatrix}},{key:"getView",value:function(){return this.view}},{key:"setEnableUpdate",value:function(e){this.enableUpdate=e}},{key:"setType",value:function(e,t){return this.type=e,this.type===fl.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===fl.TRACKING&&t!==void 0&&this.setTrackingMode(t),this}},{key:"setProjectionMode",value:function(e){return this.projectionMode=e,this}},{key:"setTrackingMode",value:function(e){if(this.type!==fl.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=e,this}},{key:"setWorldRotation",value:function(e){return this.rotateWorld=e,this._getAngles(),this}},{key:"getViewTransform",value:function(){return L.invert(L.create(),this.matrix)}},{key:"getWorldTransform",value:function(){return this.matrix}},{key:"jitterProjectionMatrix",value:function(e,t){var i=L.fromTranslation(L.create(),[e,t,0]);this.jitteredProjectionMatrix=L.multiply(L.create(),i,this.projectionMatrix)}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0}},{key:"setMatrix",value:function(e){return this.matrix=e,this._update(),this}},{key:"setProjectionMatrix",value:function(e){this.projectionMatrix=e}},{key:"setFov",value:function(e){return this.setPerspective(this.near,this.far,e,this.aspect),this}},{key:"setAspect",value:function(e){return this.setPerspective(this.near,this.far,this.fov,e),this}},{key:"setNear",value:function(e){return this.projectionMode===Wd.PERSPECTIVE?this.setPerspective(e,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,e,this.far),this}},{key:"setFar",value:function(e){return this.projectionMode===Wd.PERSPECTIVE?this.setPerspective(this.near,e,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,e),this}},{key:"setViewOffset",value:function(e,t,i,a,s,o){return this.aspect=e/t,this.view===void 0&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=a,this.view.width=s,this.view.height=o,this.projectionMode===Wd.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===Wd.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"setZoom",value:function(e){return this.zoom=e,this.projectionMode===Wd.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===Wd.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this}},{key:"setZoomByViewportPoint",value:function(e,t){var i=this.canvas.viewport2Canvas({x:t[0],y:t[1]}),a=i.x,s=i.y,o=this.roll;this.rotate(0,0,-o),this.setPosition(a,s),this.setFocalPoint(a,s),this.setZoom(e),this.rotate(0,0,o);var l=this.canvas.viewport2Canvas({x:t[0],y:t[1]}),u=l.x,c=l.y,d=E.al(u-a,c-s,0),h=E.AK(d,this.right)/E.kE(this.right),f=E.AK(d,this.up)/E.kE(this.up),v=this.getPosition(),g=Uo(v,2),m=g[0],y=g[1],w=this.getFocalPoint(),T=Uo(w,2),G=T[0],x=T[1];return this.setPosition(m-h,y-f),this.setFocalPoint(G-h,x-f),this}},{key:"setPerspective",value:function(e,t,i,a){var s;this.projectionMode=Wd.PERSPECTIVE,this.fov=i,this.near=e,this.far=t,this.aspect=a;var o=this.near*Math.tan(zs(.5*this.fov))/this.zoom,l=2*o,u=this.aspect*l,c=-.5*u;if((s=this.view)!==null&&s!==void 0&&s.enabled){var d=this.view.fullWidth,h=this.view.fullHeight;c+=this.view.offsetX*u/d,o-=this.view.offsetY*l/h,u*=this.view.width/d,l*=this.view.height/h}return UU(this.projectionMatrix,c,c+u,o-l,o,e,this.far,this.clipSpaceNearZ===zS.ZERO),L.invert(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this}},{key:"setOrthographic",value:function(e,t,i,a,s,o){var l;this.projectionMode=Wd.ORTHOGRAPHIC,this.rright=t,this.left=e,this.top=i,this.bottom=a,this.near=s,this.far=o;var u=(this.rright-this.left)/(2*this.zoom),c=(this.top-this.bottom)/(2*this.zoom),d=(this.rright+this.left)/2,h=(this.top+this.bottom)/2,f=d-u,v=d+u,g=h+c,m=h-c;if((l=this.view)!==null&&l!==void 0&&l.enabled){var y=(this.rright-this.left)/this.view.fullWidth/this.zoom,w=(this.top-this.bottom)/this.view.fullHeight/this.zoom;f+=y*this.view.offsetX,v=f+y*this.view.width,g-=w*this.view.offsetY,m=g-w*this.view.height}return this.clipSpaceNearZ===zS.NEGATIVE_ONE?L.ortho(this.projectionMatrix,f,v,g,m,s,o):L.orthoZO(this.projectionMatrix,f,v,g,m,s,o),L.invert(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this}},{key:"setPosition",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.position[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.position[2],a=Oc(e,t,i);return this._setPosition(a),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this}},{key:"setFocalPoint",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.focalPoint[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.focalPoint[2],a=E.al(0,1,0);if(this.focalPoint=Oc(e,t,i),this.trackingMode===ZS.CINEMATIC){var s=E.$X(E.Ue(),this.focalPoint,this.position);e=s[0],t=s[1],i=s[2];var o=E.kE(s),l=Rc(Math.asin(t/o)),u=90+Rc(Math.atan2(i,e)),c=L.create();L.rotateY(c,c,zs(u)),L.rotateX(c,c,zs(l)),a=E.fF(E.Ue(),[0,1,0],c)}return L.invert(this.matrix,L.lookAt(L.create(),this.position,this.focalPoint,a)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this}},{key:"getDistance",value:function(){return this.distance}},{key:"getDistanceVector",value:function(){return this.distanceVector}},{key:"setDistance",value:function(e){if(this.distance===e||e<0)return this;this.distance=e,this.distance<GR&&(this.distance=GR),this.dollyingStep=this.distance/100;var t=E.Ue();e=this.distance;var i=this.forward,a=this.focalPoint;return t[0]=e*i[0]+a[0],t[1]=e*i[1]+a[1],t[2]=e*i[2]+a[2],this._setPosition(t),this.triggerUpdate(),this}},{key:"setMaxDistance",value:function(e){return this.maxDistance=e,this}},{key:"setMinDistance",value:function(e){return this.minDistance=e,this}},{key:"setAzimuth",value:function(e){return this.azimuth=jS(e),this.computeMatrix(),this._getAxes(),this.type===fl.ORBITING||this.type===fl.EXPLORING?this._getPosition():this.type===fl.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getAzimuth",value:function(){return this.azimuth}},{key:"setElevation",value:function(e){return this.elevation=jS(e),this.computeMatrix(),this._getAxes(),this.type===fl.ORBITING||this.type===fl.EXPLORING?this._getPosition():this.type===fl.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getElevation",value:function(){return this.elevation}},{key:"setRoll",value:function(e){return this.roll=jS(e),this.computeMatrix(),this._getAxes(),this.type===fl.ORBITING||this.type===fl.EXPLORING?this._getPosition():this.type===fl.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getRoll",value:function(){return this.roll}},{key:"_update",value:function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()}},{key:"computeMatrix",value:function(){var e=X.yY(X.Ue(),[0,0,1],zs(this.roll));L.identity(this.matrix);var t=X.yY(X.Ue(),[1,0,0],zs((this.rotateWorld&&this.type!==fl.TRACKING||this.type===fl.TRACKING?1:-1)*this.elevation)),i=X.yY(X.Ue(),[0,1,0],zs((this.rotateWorld&&this.type!==fl.TRACKING||this.type===fl.TRACKING?1:-1)*this.azimuth)),a=X.Jp(X.Ue(),i,t);a=X.Jp(X.Ue(),a,e);var s=L.fromQuat(L.create(),a);this.type===fl.ORBITING||this.type===fl.EXPLORING?(L.translate(this.matrix,this.matrix,this.focalPoint),L.multiply(this.matrix,this.matrix,s),L.translate(this.matrix,this.matrix,[0,0,this.distance])):this.type===fl.TRACKING&&(L.translate(this.matrix,this.matrix,this.position),L.multiply(this.matrix,this.matrix,s))}},{key:"_setPosition",value:function(e,t,i){this.position=Oc(e,t,i);var a=this.matrix;a[12]=this.position[0],a[13]=this.position[1],a[14]=this.position[2],a[15]=1,this._getOrthoMatrix()}},{key:"_getAxes",value:function(){E.JG(this.right,Oc(me.fF(me.Ue(),[1,0,0,0],this.matrix))),E.JG(this.up,Oc(me.fF(me.Ue(),[0,1,0,0],this.matrix))),E.JG(this.forward,Oc(me.fF(me.Ue(),[0,0,1,0],this.matrix))),E.Fv(this.right,this.right),E.Fv(this.up,this.up),E.Fv(this.forward,this.forward)}},{key:"_getAngles",value:function(){var e=this.distanceVector[0],t=this.distanceVector[1],i=this.distanceVector[2],a=E.kE(this.distanceVector);if(a===0){this.elevation=0,this.azimuth=0;return}this.type===fl.TRACKING?(this.elevation=Rc(Math.asin(t/a)),this.azimuth=Rc(Math.atan2(-e,-i))):this.rotateWorld?(this.elevation=Rc(Math.asin(t/a)),this.azimuth=Rc(Math.atan2(-e,-i))):(this.elevation=-Rc(Math.asin(t/a)),this.azimuth=-Rc(Math.atan2(-e,-i)))}},{key:"_getPosition",value:function(){E.JG(this.position,Oc(me.fF(me.Ue(),[0,0,0,1],this.matrix))),this._getDistance()}},{key:"_getFocalPoint",value:function(){E.kK(this.distanceVector,[0,0,-this.distance],Ke.xO(Ke.Ue(),this.matrix)),E.IH(this.focalPoint,this.position,this.distanceVector),this._getDistance()}},{key:"_getDistance",value:function(){this.distanceVector=E.$X(E.Ue(),this.focalPoint,this.position),this.distance=E.kE(this.distanceVector),this.dollyingStep=this.distance/100}},{key:"_getOrthoMatrix",value:function(){if(this.projectionMode===Wd.ORTHOGRAPHIC){var e=this.position,t=X.yY(X.Ue(),[0,0,1],-this.roll*Math.PI/180);L.fromRotationTranslationScaleOrigin(this.orthoMatrix,t,E.al((this.rright-this.left)/2-e[0],(this.top-this.bottom)/2-e[1],0),E.al(this.zoom,this.zoom,1),e)}}},{key:"triggerUpdate",value:function(){if(this.enableUpdate){var e=this.getViewTransform(),t=L.multiply(L.create(),this.getPerspective(),e);this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit($R.UPDATED)}}},{key:"rotate",value:function(e,t,i){throw new Error(Lo)}},{key:"pan",value:function(e,t){throw new Error(Lo)}},{key:"dolly",value:function(e){throw new Error(Lo)}},{key:"createLandmark",value:function(e,t){throw new Error(Lo)}},{key:"gotoLandmark",value:function(e,t){throw new Error(Lo)}},{key:"cancelLandmarkAnimation",value:function(){throw new Error(Lo)}}])}(),ZU=function(r){return r[r.Standard=0]="Standard",r}({}),b1=function(r){return r[r.ADDED=0]="ADDED",r[r.REMOVED=1]="REMOVED",r[r.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED",r}({}),zR={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Xm(0,0,0,0)},Gn=function(r){return r.COORDINATE="<coordinate>",r.COLOR="<color>",r.PAINT="<paint>",r.NUMBER="<number>",r.ANGLE="<angle>",r.OPACITY_VALUE="<opacity-value>",r.SHADOW_BLUR="<shadow-blur>",r.LENGTH="<length>",r.PERCENTAGE="<percentage>",r.LENGTH_PERCENTAGE="<length> | <percentage>",r.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",r.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",r.LIST_OF_POINTS="<list-of-points>",r.PATH="<path>",r.FILTER="<filter>",r.Z_INDEX="<z-index>",r.OFFSET_DISTANCE="<offset-distance>",r.DEFINED_PATH="<defined-path>",r.MARKER="<marker>",r.TRANSFORM="<transform>",r.TRANSFORM_ORIGIN="<transform-origin>",r.TEXT="<text>",r.TEXT_TRANSFORM="<text-transform>",r}({});function uc(r,n){if(typeof r!="function"||n!=null&&typeof n!="function")throw new TypeError("Expected a function");var e=function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var o=n?n.apply(this,a):a[0],l=e.cache;if(l.has(o))return l.get(o);var u=r.apply(this,a);return e.cache=l.set(o,u)||l,u};return e.cache=new(uc.Cache||Map),e}uc.Cache=Map;var Jn=function(r){return r[r.kUnknown=0]="kUnknown",r[r.kNumber=1]="kNumber",r[r.kPercentage=2]="kPercentage",r[r.kEms=3]="kEms",r[r.kPixels=4]="kPixels",r[r.kRems=5]="kRems",r[r.kDegrees=6]="kDegrees",r[r.kRadians=7]="kRadians",r[r.kGradians=8]="kGradians",r[r.kTurns=9]="kTurns",r[r.kMilliseconds=10]="kMilliseconds",r[r.kSeconds=11]="kSeconds",r[r.kInteger=12]="kInteger",r}({}),Bh=function(r){return r[r.kUNumber=0]="kUNumber",r[r.kUPercent=1]="kUPercent",r[r.kULength=2]="kULength",r[r.kUAngle=3]="kUAngle",r[r.kUTime=4]="kUTime",r[r.kUOther=5]="kUOther",r}({}),XU=function(r){return r[r.kYes=0]="kYes",r[r.kNo=1]="kNo",r}({}),KU=function(r){return r[r.kYes=0]="kYes",r[r.kNo=1]="kNo",r}({}),JU=[{name:"em",unit_type:Jn.kEms},{name:"px",unit_type:Jn.kPixels},{name:"deg",unit_type:Jn.kDegrees},{name:"rad",unit_type:Jn.kRadians},{name:"grad",unit_type:Jn.kGradians},{name:"ms",unit_type:Jn.kMilliseconds},{name:"s",unit_type:Jn.kSeconds},{name:"rem",unit_type:Jn.kRems},{name:"turn",unit_type:Jn.kTurns}],Jm=function(r){return r[r.kUnknownType=0]="kUnknownType",r[r.kUnparsedType=1]="kUnparsedType",r[r.kKeywordType=2]="kKeywordType",r[r.kUnitType=3]="kUnitType",r[r.kSumType=4]="kSumType",r[r.kProductType=5]="kProductType",r[r.kNegateType=6]="kNegateType",r[r.kInvertType=7]="kInvertType",r[r.kMinType=8]="kMinType",r[r.kMaxType=9]="kMaxType",r[r.kClampType=10]="kClampType",r[r.kTransformType=11]="kTransformType",r[r.kPositionType=12]="kPositionType",r[r.kURLImageType=13]="kURLImageType",r[r.kColorType=14]="kColorType",r[r.kUnsupportedColorType=15]="kUnsupportedColorType",r}({}),QU=function(n){return JU.find(function(e){return e.name===n}).unit_type},qU=function(n){return n?n==="number"?Jn.kNumber:n==="percent"||n==="%"?Jn.kPercentage:QU(n):Jn.kUnknown},ej=function(n){switch(n){case Jn.kNumber:case Jn.kInteger:return Bh.kUNumber;case Jn.kPercentage:return Bh.kUPercent;case Jn.kPixels:return Bh.kULength;case Jn.kMilliseconds:case Jn.kSeconds:return Bh.kUTime;case Jn.kDegrees:case Jn.kRadians:case Jn.kGradians:case Jn.kTurns:return Bh.kUAngle;default:return Bh.kUOther}},tj=function(n){switch(n){case Bh.kUNumber:return Jn.kNumber;case Bh.kULength:return Jn.kPixels;case Bh.kUPercent:return Jn.kPercentage;case Bh.kUTime:return Jn.kSeconds;case Bh.kUAngle:return Jn.kDegrees;default:return Jn.kUnknown}},VR=function(n){var e=1;switch(n){case Jn.kPixels:case Jn.kDegrees:case Jn.kSeconds:break;case Jn.kMilliseconds:e=.001;break;case Jn.kRadians:e=180/Math.PI;break;case Jn.kGradians:e=.9;break;case Jn.kTurns:e=360;break}return e},XS=function(n){switch(n){case Jn.kNumber:case Jn.kInteger:return"";case Jn.kPercentage:return"%";case Jn.kEms:return"em";case Jn.kRems:return"rem";case Jn.kPixels:return"px";case Jn.kDegrees:return"deg";case Jn.kRadians:return"rad";case Jn.kGradians:return"grad";case Jn.kMilliseconds:return"ms";case Jn.kSeconds:return"s";case Jn.kTurns:return"turn"}return""},k1=function(){function r(){fr(this,r)}return vr(r,[{key:"toString",value:function(){return this.buildCSSText(XU.kNo,KU.kNo,"")}},{key:"isNumericValue",value:function(){return this.getType()>=Jm.kUnitType&&this.getType()<=Jm.kClampType}}],[{key:"isAngle",value:function(e){return e===Jn.kDegrees||e===Jn.kRadians||e===Jn.kGradians||e===Jn.kTurns}},{key:"isLength",value:function(e){return e>=Jn.kEms&&e<Jn.kDegrees}},{key:"isRelativeUnit",value:function(e){return e===Jn.kPercentage||e===Jn.kEms||e===Jn.kRems}},{key:"isTime",value:function(e){return e===Jn.kSeconds||e===Jn.kMilliseconds}}])}(),nj=function(r){function n(e){var t;return fr(this,n),t=Ss(this,n),t.colorSpace=e,t}return Ts(n,r),vr(n,[{key:"getType",value:function(){return Jm.kColorType}},{key:"to",value:function(t){return this}}])}(k1),w1=function(r){return r[r.Constant=0]="Constant",r[r.LinearGradient=1]="LinearGradient",r[r.RadialGradient=2]="RadialGradient",r}({}),S1=function(r){function n(e,t){var i;return fr(this,n),i=Ss(this,n),i.type=e,i.value=t,i}return Ts(n,r),vr(n,[{key:"clone",value:function(){return new n(this.type,this.value)}},{key:"buildCSSText",value:function(t,i,a){return a}},{key:"getType",value:function(){return Jm.kColorType}}])}(k1),Yd=function(r){function n(e){var t;return fr(this,n),t=Ss(this,n),t.value=e,t}return Ts(n,r),vr(n,[{key:"clone",value:function(){return new n(this.value)}},{key:"getType",value:function(){return Jm.kKeywordType}},{key:"buildCSSText",value:function(t,i,a){return a+this.value}}])}(k1),rj=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",t="";return Number.isFinite(n)?t="NaN":n>0?t="infinity":t="-infinity",t+=e},KS=function(n){return tj(ej(n))},cs=function(r){function n(e){var t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Jn.kNumber;fr(this,n),t=Ss(this,n);var a;return typeof i=="string"?a=qU(i):a=i,t.unit=a,t.value=e,t}return Ts(n,r),vr(n,[{key:"clone",value:function(){return new n(this.value,this.unit)}},{key:"equals",value:function(t){var i=t;return this.value===i.value&&this.unit===i.unit}},{key:"getType",value:function(){return Jm.kUnitType}},{key:"convertTo",value:function(t){if(this.unit===t)return new n(this.value,this.unit);var i=KS(this.unit);if(i!==KS(t)||i===Jn.kUnknown)return null;var a=VR(this.unit)/VR(t);return new n(this.value*a,t)}},{key:"buildCSSText",value:function(t,i,a){var s;switch(this.unit){case Jn.kUnknown:break;case Jn.kInteger:s=Number(this.value).toFixed(0);break;case Jn.kNumber:case Jn.kPercentage:case Jn.kEms:case Jn.kRems:case Jn.kPixels:case Jn.kDegrees:case Jn.kRadians:case Jn.kGradians:case Jn.kMilliseconds:case Jn.kSeconds:case Jn.kTurns:{var o=-999999,l=999999,u=this.value,c=XS(this.unit);if(u<o||u>l){var d=XS(this.unit);!Number.isFinite(u)||Number.isNaN(u)?s=rj(u,d):s=u+(d||"")}else s="".concat(u).concat(c)}}return a+=s,a}}])}(k1),$h=new cs(0,"px");new cs(1,"px");var g_=new cs(0,"deg"),JS=function(r){function n(e,t,i){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;return fr(this,n),a=Ss(this,n,["rgb"]),a.r=e,a.g=t,a.b=i,a.alpha=s,a.isNone=o,a}return Ts(n,r),vr(n,[{key:"clone",value:function(){return new n(this.r,this.g,this.b,this.alpha)}},{key:"buildCSSText",value:function(t,i,a){return"".concat(a,"rgba(").concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")}}])}(nj),UR=new Yd("unset"),ij=new Yd("initial"),aj=new Yd("inherit"),QS={"":UR,unset:UR,initial:ij,inherit:aj},sj=function(n){return QS[n]||(QS[n]=new Yd(n)),QS[n]},jR=new JS(0,0,0,0,!0),HR=new JS(0,0,0,0),oj=uc(function(r,n,e,t){return new JS(r,n,e,t)},function(r,n,e,t){return"rgba(".concat(r,",").concat(n,",").concat(e,",").concat(t,")")}),Eo=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Jn.kNumber;return new cs(n,e)};new cs(50,"%");function lj(r){var n=r.type,e=r.value;return n==="hex"?"#".concat(e):n==="literal"?e:n==="rgb"?"rgb(".concat(e.join(","),")"):"rgba(".concat(e.join(","),")")}var uj=function(){var r={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},n="";function e(V){throw new Error("".concat(n,": ").concat(V))}function t(){var V=i();return n.length>0&&e("Invalid input not EOF"),V}function i(){return T(a)}function a(){return s("linear-gradient",r.linearGradient,l)||s("repeating-linear-gradient",r.repeatingLinearGradient,l)||s("radial-gradient",r.radialGradient,d)||s("repeating-radial-gradient",r.repeatingRadialGradient,d)||s("conic-gradient",r.conicGradient,d)}function s(V,ee,he){return o(ee,function(ut){var ct=he();return ct&&(ue(r.comma)||e("Missing comma before color stops")),{type:V,orientation:ct,colorStops:T(G)}})}function o(V,ee){var he=ue(V);if(he){ue(r.startCall)||e("Missing (");var ut=ee(he);return ue(r.endCall)||e("Missing )"),ut}}function l(){return u()||c()}function u(){return le("directional",r.sideOrCorner,1)}function c(){return le("angular",r.angleValue,1)}function d(){var V,ee=h(),he;return ee&&(V=[],V.push(ee),he=n,ue(r.comma)&&(ee=h(),ee?V.push(ee):n=he)),V}function h(){var V=f()||v();if(V)V.at=m();else{var ee=g();if(ee){V=ee;var he=m();he&&(V.at=he)}else{var ut=y();ut&&(V={type:"default-radial",at:ut})}}return V}function f(){var V=le("shape",/^(circle)/i,0);return V&&(V.style=te()||g()),V}function v(){var V=le("shape",/^(ellipse)/i,0);return V&&(V.style=j()||g()),V}function g(){return le("extent-keyword",r.extentKeywords,1)}function m(){if(le("position",/^at/,0)){var V=y();return V||e("Missing positioning value"),V}}function y(){var V=w();if(V.x||V.y)return{type:"position",value:V}}function w(){return{x:j(),y:j()}}function T(V){var ee=V(),he=[];if(ee)for(he.push(ee);ue(r.comma);)ee=V(),ee?he.push(ee):e("One extra comma");return he}function G(){var V=x();return V||e("Expected color definition"),V.length=j(),V}function x(){return p()||R()||b()||_()}function _(){return le("literal",r.literalColor,0)}function p(){return le("hex",r.hexColor,1)}function b(){return o(r.rgbColor,function(){return{type:"rgb",value:T(B)}})}function R(){return o(r.rgbaColor,function(){return{type:"rgba",value:T(B)}})}function B(){return ue(r.number)[1]}function j(){return le("%",r.percentageValue,1)||Z()||te()}function Z(){return le("position-keyword",r.positionKeywords,1)}function te(){return le("px",r.pixelValue,1)||le("em",r.emValue,1)}function le(V,ee,he){var ut=ue(ee);if(ut)return{type:V,value:ut[he]}}function ue(V){var ee=/^[\n\r\t\s]+/.exec(n);ee&&se(ee[0].length);var he=V.exec(n);return he&&se(he[0].length),he}function se(V){n=n.substring(V)}return function(V){return n=V,t()}}();function zCe(r,n,e,t){var i=zs(t.value),a=0,s=0,o=a+n/2,l=s+e/2,u=Math.abs(n*Math.cos(i))+Math.abs(e*Math.sin(i)),c=r[0]+o-Math.cos(i)*u/2,d=r[1]+l-Math.sin(i)*u/2,h=r[0]+o+Math.cos(i)*u/2,f=r[1]+l+Math.sin(i)*u/2;return{x1:c,y1:d,x2:h,y2:f}}function VCe(r,n,e,t,i,a){var s=t.value,o=i.value;t.unit===Jn.kPercentage&&(s=t.value/100*n),i.unit===Jn.kPercentage&&(o=i.value/100*e);var l=Math.max(distanceSquareRoot([0,0],[s,o]),distanceSquareRoot([0,e],[s,o]),distanceSquareRoot([n,e],[s,o]),distanceSquareRoot([n,0],[s,o]));return a&&(a instanceof cs?l=a.value:a instanceof Yd&&(a.value==="closest-side"?l=Math.min(s,n-s,o,e-o):a.value==="farthest-side"?l=Math.max(s,n-s,o,e-o):a.value==="closest-corner"&&(l=Math.min(distanceSquareRoot([0,0],[s,o]),distanceSquareRoot([0,e],[s,o]),distanceSquareRoot([n,e],[s,o]),distanceSquareRoot([n,0],[s,o]))))),{x:s+r[0],y:o+r[1],r:l}}var cj=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,dj=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,hj=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,WR=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function fj(r){var n,e=r.length;if(r[e-1].length=(n=r[e-1].length)!==null&&n!==void 0?n:{type:"%",value:"100"},e>1){var t;r[0].length=(t=r[0].length)!==null&&t!==void 0?t:{type:"%",value:"0"}}for(var i=0,a=Number(r[0].length.value),s=1;s<e;s++){var o,l=(o=r[s].length)===null||o===void 0?void 0:o.value;if(!(0,xe.Z)(l)&&!(0,xe.Z)(a)){for(var u=1;u<s-i;u++)r[i+u].length={type:"%",value:"".concat(a+(Number(l)-a)*u/(s-i))};i=s,a=Number(l)}}}var vj={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},gj=uc(function(r){var n;return r.type==="angular"?n=Number(r.value):n=vj[r.value]||0,Eo(n,"deg")}),_j=uc(function(r){var n=50,e=50,t="%",i="%";if((r==null?void 0:r.type)==="position"){var a=r.value,s=a.x,o=a.y;(s==null?void 0:s.type)==="position-keyword"&&(s.value==="left"?n=0:s.value==="center"?n=50:s.value==="right"?n=100:s.value==="top"?e=0:s.value==="bottom"&&(e=100)),(o==null?void 0:o.type)==="position-keyword"&&(o.value==="left"?n=0:o.value==="center"?e=50:o.value==="right"?n=100:o.value==="top"?e=0:o.value==="bottom"&&(e=100)),((s==null?void 0:s.type)==="px"||(s==null?void 0:s.type)==="%"||(s==null?void 0:s.type)==="em")&&(t=s==null?void 0:s.type,n=Number(s.value)),((o==null?void 0:o.type)==="px"||(o==null?void 0:o.type)==="%"||(o==null?void 0:o.type)==="em")&&(i=o==null?void 0:o.type,e=Number(o.value))}return{cx:Eo(n,t),cy:Eo(e,i)}}),mj=uc(function(r){if(r.indexOf("linear")>-1||r.indexOf("radial")>-1){var n=uj(r);return n.map(function(o){var l=o.type,u=o.orientation,c=o.colorStops;fj(c);var d=c.map(function(T){return{offset:Eo(Number(T.length.value),"%"),color:lj(T)}});if(l==="linear-gradient")return new S1(w1.LinearGradient,{angle:u?gj(u):g_,steps:d});if(l==="radial-gradient"&&(u||(u=[{type:"shape",value:"circle"}]),u[0].type==="shape"&&u[0].value==="circle")){var h=_j(u[0].at),f=h.cx,v=h.cy,g;if(u[0].style){var m=u[0].style,y=m.type,w=m.value;y==="extent-keyword"?g=sj(w):g=Eo(w,y)}return new S1(w1.RadialGradient,{cx:f,cy:v,size:g,steps:d})}})}var e=r[0];if(r[1]==="("||r[2]==="("){if(e==="l"){var t=cj.exec(r);if(t){var i,a=((i=t[2].match(WR))===null||i===void 0?void 0:i.map(function(o){return o.split(":")}))||[];return[new S1(w1.LinearGradient,{angle:Eo(parseFloat(t[1]),"deg"),steps:a.map(function(o){var l=Uo(o,2),u=l[0],c=l[1];return{offset:Eo(Number(u)*100,"%"),color:c}})})]}}else if(e==="r"){var s=pj(r);if(s)if((0,Ze.Z)(s))r=s;else return[new S1(w1.RadialGradient,s)]}else if(e==="p")return yj(r)}});function pj(r){var n=dj.exec(r);if(n){var e,t=((e=n[4].match(WR))===null||e===void 0?void 0:e.map(function(i){return i.split(":")}))||[];return{cx:Eo(50,"%"),cy:Eo(50,"%"),steps:t.map(function(i){var a=Uo(i,2),s=a[0],o=a[1];return{offset:Eo(Number(s)*100,"%"),color:o}})}}return null}function yj(r){var n=hj.exec(r);if(n){var e=n[1],t=n[2];switch(e){case"a":e="repeat";break;case"x":e="repeat-x";break;case"y":e="repeat-y";break;case"n":e="no-repeat";break;default:e="no-repeat"}return{image:t,repetition:e}}return null}function UCe(r){return!!r.type&&!!r.value}function xj(r){return r&&!!r.image}function YR(r){return r&&!(0,xe.Z)(r.r)&&!(0,xe.Z)(r.g)&&!(0,xe.Z)(r.b)}var G0=uc(function(r){if(xj(r))return xo({repetition:"repeat"},r);if((0,xe.Z)(r)&&(r=""),r==="transparent")return HR;if(r==="currentColor")r="black";else if(r==="none")return jR;var n=mj(r);if(n)return n;var e=m1(r),t=[0,0,0,0];return e!==null&&(t[0]=e.r||0,t[1]=e.g||0,t[2]=e.b||0,t[3]=e.opacity),oj.apply(void 0,t)});function Ej(r,n){if(!(!YR(r)||!YR(n)))return[[Number(r.r),Number(r.g),Number(r.b),Number(r.alpha)],[Number(n.r),Number(n.g),Number(n.b),Number(n.alpha)],function(e){var t=e.slice();if(t[3])for(var i=0;i<3;i++)t[i]=Math.round((0,O.Z)(t[i],0,255));return t[3]=(0,O.Z)(t[3],0,1),"rgba(".concat(t.join(","),")")}]}function z0(r,n){if((0,xe.Z)(n))return Eo(0,"px");if(n="".concat(n).trim().toLowerCase(),isFinite(Number(n))){if("px".search(r)>=0)return Eo(Number(n),"px");if("deg".search(r)>=0)return Eo(Number(n),"deg")}var e=[];n=n.replace(r,function(i){return e.push(i),"U".concat(i)});var t="U(".concat(r.source,")");return e.map(function(i){return Eo(Number(n.replace(new RegExp("U".concat(i),"g"),"").replace(new RegExp(t,"g"),"*0")),i)})[0]}var ZR=function(n){return z0(new RegExp("px","g"),n)},bj=uc(ZR),kj=function(n){return z0(new RegExp("%","g"),n)};uc(kj);var XR=function(n){return(0,pe.Z)(n)||isFinite(Number(n))?Eo(Number(n)||0,"px"):z0(new RegExp("px|%|em|rem","g"),n)},qS=uc(XR),KR=function(n){return z0(new RegExp("deg|rad|grad|turn","g"),n)},wj=uc(KR);function Sj(r,n,e,t){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a="",s=r.value||0,o=n.value||0,l=KS(r.unit),u=r.convertTo(l),c=n.convertTo(l);return u&&c?(s=u.value,o=c.value,a=XS(r.unit)):(cs.isLength(r.unit)||cs.isLength(n.unit))&&(s=gd(r,i,e),o=gd(n,i,e),a="px"),[s,o,function(d){return t&&(d=Math.max(d,0)),d+a}]}function Ac(r){var n=0;return r.unit===Jn.kDegrees?n=r.value:r.unit===Jn.kRadians?n=Rc(Number(r.value)):r.unit===Jn.kTurns?n=$U(Number(r.value)):r.value&&(n=r.value),n}function JR(r,n){var e;return Array.isArray(r)?e=r.map(function(t){return Number(t)}):(0,Ze.Z)(r)?e=r.split(" ").map(function(t){return Number(t)}):(0,pe.Z)(r)&&(e=[r]),n===2?e.length===1?[e[0],e[0]]:[e[0],e[1]]:e.length===1?[e[0],e[0],e[0],e[0]]:e.length===2?[e[0],e[1],e[0],e[1]]:e.length===3?[e[0],e[1],e[2],e[1]]:[e[0],e[1],e[2],e[3]]}function gd(r,n,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(r.unit===Jn.kPixels)return Number(r.value);if(r.unit===Jn.kPercentage&&e){var i=e.nodeName===yr.GROUP?e.getLocalBounds():e.getGeometryBounds();return(t?i.min[n]:0)+r.value/100*i.halfExtents[n]*2}return 0}var Tj=function(n){return z0(/deg|rad|grad|turn|px|%/g,n)},Cj=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function Mj(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(r=r.toLowerCase().trim(),r==="none")return[];for(var n=/\s*([\w-]+)\(([^)]*)\)/g,e=[],t,i=0;t=n.exec(r);){if(t.index!==i)return[];if(i=t.index+t[0].length,Cj.indexOf(t[1])>-1&&e.push({name:t[1],params:t[2].split(" ").map(function(a){return Tj(a)||G0(a)})}),n.lastIndex===r.length)return e}return[]}function QR(r){return r.toString()}var qR=function(n){return typeof n=="number"?Eo(n):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(n)?Eo(Number(n)):Eo(0)},e2=uc(qR);uc(function(r){return(0,Ze.Z)(r)?r.split(" ").map(e2):r.map(e2)});function t2(r,n){return[r,n,QR]}function n2(r,n){return function(e,t){return[e,t,function(i){return QR((0,O.Z)(i,r,n))}]}}function eA(r,n){if(r.length===n.length)return[r,n,function(e){return e}]}function tA(r){return r.parsedStyle.d.totalLength===0&&(r.parsedStyle.d.totalLength=(0,Um.D)(r.parsedStyle.d.absolutePath)),r.parsedStyle.d.totalLength}function Pj(r){return r.parsedStyle.points.totalLength===0&&(r.parsedStyle.points.totalLength=(0,Nt.hE)(r.parsedStyle.points.points)),r.parsedStyle.points.totalLength}function Nj(r){for(var n=0;n<r.length;n++){var e=r[n-1],t=r[n],i=t[0];if(i==="M"&&e){var a=e[0],s=[t[1],t[2]],o=void 0;a==="L"||a==="M"?o=[e[1],e[2]]:(a==="C"||a==="A"||a==="Q")&&(o=[e[e.length-2],e[e.length-1]]),o&&T1(s,o)&&(r.splice(n,1),n--)}}}function Oj(r){for(var n=!1,e=r.length,t=0;t<e;t++){var i=r[t],a=i[0];if(a==="C"||a==="A"||a==="Q"){n=!0;break}}return n}function Rj(r){for(var n=[],e=[],t=[],i=0;i<r.length;i++){var a=r[i],s=a[0];s==="M"?(t.length&&(e.push(t),t=[]),t.push([a[1],a[2]])):s==="Z"?t.length&&(n.push(t),t=[]):t.push([a[1],a[2]])}return t.length>0&&e.push(t),{polygons:n,polylines:e}}function T1(r,n){return r[0]===n[0]&&r[1]===n[1]}function Aj(r,n){for(var e=[],t=[],i=[],a=0;a<r.length;a++){var s=r[a],o=s.currentPoint,l=s.params,u=s.prePoint,c=void 0;switch(s.command){case"Q":c=(0,Nt.x4)(u[0],u[1],l[1],l[2],l[3],l[4]);break;case"C":c=(0,Nt.l5)(u[0],u[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var d=s.arcParams;c=(0,Nt.vp)(d.cx,d.cy,d.rx,d.ry,d.xRotation,d.startAngle,d.endAngle);break;default:e.push(o[0]),t.push(o[1]);break}c&&(s.box=c,e.push(c.x,c.x+c.width),t.push(c.y,c.y+c.height)),n&&(s.command==="L"||s.command==="M")&&s.prePoint&&s.nextPoint&&i.push(s)}e=e.filter(function(G){return!Number.isNaN(G)&&G!==1/0&&G!==-1/0}),t=t.filter(function(G){return!Number.isNaN(G)&&G!==1/0&&G!==-1/0});var h=(0,ne.Z)(e),f=(0,ne.Z)(t),v=(0,qe.Z)(e),g=(0,qe.Z)(t);if(i.length===0)return{x:h,y:f,width:v-h,height:g-f};for(var m=0;m<i.length;m++){var y=i[m],w=y.currentPoint,T=void 0;w[0]===h?(T=C1(y,n),h-=T.xExtra):w[0]===v&&(T=C1(y,n),v+=T.xExtra),w[1]===f?(T=C1(y,n),f-=T.yExtra):w[1]===g&&(T=C1(y,n),g+=T.yExtra)}return{x:h,y:f,width:v-h,height:g-f}}function C1(r,n){var e=r.prePoint,t=r.currentPoint,i=r.nextPoint,a=Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2),s=Math.pow(t[0]-i[0],2)+Math.pow(t[1]-i[1],2),o=Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2),l=Math.acos((a+s-o)/(2*Math.sqrt(a)*Math.sqrt(s)));if(!l||Math.sin(l)===0||(0,dt.Z)(l,0))return{xExtra:0,yExtra:0};var u=Math.abs(Math.atan2(i[1]-t[1],i[0]-t[0])),c=Math.abs(Math.atan2(i[0]-t[0],i[1]-t[1]));u=u>Math.PI/2?Math.PI-u:u,c=c>Math.PI/2?Math.PI-c:c;var d={xExtra:Math.cos(l/2-u)*(n/2*(1/Math.sin(l/2)))-n/2||0,yExtra:Math.cos(c-l/2)*(n/2*(1/Math.sin(l/2)))-n/2||0};return d}function nA(r,n){return[n[0]+(n[0]-r[0]),n[1]+(n[1]-r[1])]}var rA=function(n,e){var t=n.x*e.x+n.y*e.y,i=Math.sqrt((Math.pow(n.x,2)+Math.pow(n.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2))),a=n.x*e.y-n.y*e.x<0?-1:1,s=a*Math.acos(t/i);return s},iA=function(n,e,t,i,a,s,o,l){e=Math.abs(e),t=Math.abs(t),i=(0,nt.Z)(i,360);var u=zs(i);if(n.x===o.x&&n.y===o.y)return{x:n.x,y:n.y,ellipticalArcAngle:0};if(e===0||t===0)return{x:0,y:0,ellipticalArcAngle:0};var c=(n.x-o.x)/2,d=(n.y-o.y)/2,h={x:Math.cos(u)*c+Math.sin(u)*d,y:-Math.sin(u)*c+Math.cos(u)*d},f=Math.pow(h.x,2)/Math.pow(e,2)+Math.pow(h.y,2)/Math.pow(t,2);f>1&&(e*=Math.sqrt(f),t*=Math.sqrt(f));var v=Math.pow(e,2)*Math.pow(t,2)-Math.pow(e,2)*Math.pow(h.y,2)-Math.pow(t,2)*Math.pow(h.x,2),g=Math.pow(e,2)*Math.pow(h.y,2)+Math.pow(t,2)*Math.pow(h.x,2),m=v/g;m=m<0?0:m;var y=(a!==s?1:-1)*Math.sqrt(m),w={x:y*(e*h.y/t),y:y*(-(t*h.x)/e)},T={x:Math.cos(u)*w.x-Math.sin(u)*w.y+(n.x+o.x)/2,y:Math.sin(u)*w.x+Math.cos(u)*w.y+(n.y+o.y)/2},G={x:(h.x-w.x)/e,y:(h.y-w.y)/t},x=rA({x:1,y:0},G),_={x:(-h.x-w.x)/e,y:(-h.y-w.y)/t},p=rA(G,_);!s&&p>0?p-=2*Math.PI:s&&p<0&&(p+=2*Math.PI),p%=2*Math.PI;var b=x+p*l,R=e*Math.cos(b),B=t*Math.sin(b),j={x:Math.cos(u)*R-Math.sin(u)*B+T.x,y:Math.sin(u)*R+Math.cos(u)*B+T.y,ellipticalArcStartAngle:x,ellipticalArcEndAngle:x+p,ellipticalArcAngle:b,ellipticalArcCenter:T,resultantRx:e,resultantRy:t};return j};function Lj(r){for(var n=[],e=null,t=null,i=null,a=0,s=r.length,o=0;o<s;o++){var l=r[o];t=r[o+1];var u=l[0],c={command:u,prePoint:e,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(u){case"M":i=[l[1],l[2]],a=o;break;case"A":var d=Ij(e,l);c.arcParams=d;break}if(u==="Z")e=i,t=r[a+1];else{var h=l.length;e=[l[h-2],l[h-1]]}t&&t[0]==="Z"&&(t=r[a],n[a]&&(n[a].prePoint=e)),c.currentPoint=e,n[a]&&T1(e,n[a].currentPoint)&&(n[a].prePoint=c.prePoint);var f=t?[t[t.length-2],t[t.length-1]]:null;c.nextPoint=f;var v=c.prePoint;if(["L","H","V"].includes(u))c.startTangent=[v[0]-e[0],v[1]-e[1]],c.endTangent=[e[0]-v[0],e[1]-v[1]];else if(u==="Q"){var g=[l[1],l[2]];c.startTangent=[v[0]-g[0],v[1]-g[1]],c.endTangent=[e[0]-g[0],e[1]-g[1]]}else if(u==="T"){var m=n[o-1],y=nA(m.currentPoint,v);m.command==="Q"?(c.command="Q",c.startTangent=[v[0]-y[0],v[1]-y[1]],c.endTangent=[e[0]-y[0],e[1]-y[1]]):(c.command="TL",c.startTangent=[v[0]-e[0],v[1]-e[1]],c.endTangent=[e[0]-v[0],e[1]-v[1]])}else if(u==="C"){var w=[l[1],l[2]],T=[l[3],l[4]];c.startTangent=[v[0]-w[0],v[1]-w[1]],c.endTangent=[e[0]-T[0],e[1]-T[1]],c.startTangent[0]===0&&c.startTangent[1]===0&&(c.startTangent=[w[0]-T[0],w[1]-T[1]]),c.endTangent[0]===0&&c.endTangent[1]===0&&(c.endTangent=[T[0]-w[0],T[1]-w[1]])}else if(u==="S"){var G=n[o-1],x=nA(G.currentPoint,v),_=[l[1],l[2]];G.command==="C"?(c.command="C",c.startTangent=[v[0]-x[0],v[1]-x[1]],c.endTangent=[e[0]-_[0],e[1]-_[1]]):(c.command="SQ",c.startTangent=[v[0]-_[0],v[1]-_[1]],c.endTangent=[e[0]-_[0],e[1]-_[1]])}else if(u==="A"){var p=aA(c,0),b=p.x,R=p.y,B=aA(c,1,!1),j=B.x,Z=B.y;c.startTangent=[b,R],c.endTangent=[j,Z]}n.push(c)}return n}function aA(r,n){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,t=r.arcParams,i=t.rx,a=i===void 0?0:i,s=t.ry,o=s===void 0?0:s,l=t.xRotation,u=t.arcFlag,c=t.sweepFlag,d=iA({x:r.prePoint[0],y:r.prePoint[1]},a,o,l,!!u,!!c,{x:r.currentPoint[0],y:r.currentPoint[1]},n),h=iA({x:r.prePoint[0],y:r.prePoint[1]},a,o,l,!!u,!!c,{x:r.currentPoint[0],y:r.currentPoint[1]},e?n+.005:n-.005),f=h.x-d.x,v=h.y-d.y,g=Math.sqrt(f*f+v*v);return{x:-f/g,y:-v/g}}function M1(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function r2(r,n){return M1(r)*M1(n)?(r[0]*n[0]+r[1]*n[1])/(M1(r)*M1(n)):1}function sA(r,n){return(r[0]*n[1]<r[1]*n[0]?-1:1)*Math.acos(r2(r,n))}function Ij(r,n){var e=n[1],t=n[2],i=(0,nt.Z)(zs(n[3]),Math.PI*2),a=n[4],s=n[5],o=r[0],l=r[1],u=n[6],c=n[7],d=Math.cos(i)*(o-u)/2+Math.sin(i)*(l-c)/2,h=-1*Math.sin(i)*(o-u)/2+Math.cos(i)*(l-c)/2,f=d*d/(e*e)+h*h/(t*t);f>1&&(e*=Math.sqrt(f),t*=Math.sqrt(f));var v=e*e*(h*h)+t*t*(d*d),g=v?Math.sqrt((e*e*(t*t)-v)/v):1;a===s&&(g*=-1),isNaN(g)&&(g=0);var m=t?g*e*h/t:0,y=e?g*-t*d/e:0,w=(o+u)/2+Math.cos(i)*m-Math.sin(i)*y,T=(l+c)/2+Math.sin(i)*m+Math.cos(i)*y,G=[(d-m)/e,(h-y)/t],x=[(-1*d-m)/e,(-1*h-y)/t],_=sA([1,0],G),p=sA(G,x);return r2(G,x)<=-1&&(p=Math.PI),r2(G,x)>=1&&(p=0),s===0&&p>0&&(p-=2*Math.PI),s===1&&p<0&&(p+=2*Math.PI),{cx:w,cy:T,rx:T1(r,[u,c])?0:e,ry:T1(r,[u,c])?0:t,startAngle:_,endAngle:_+p,xRotation:i,arcFlag:a,sweepFlag:s}}function Dj(r,n,e){return r.reduce(function(t,i){var a="";if(i[0]==="M"||i[0]==="L"){var s=vec3.fromValues(i[1],i[2],0);e&&vec3.transformMat4(s,s,e),a="".concat(i[0]).concat(s[0],",").concat(s[1])}else if(i[0]==="Z")a=i[0];else if(i[0]==="C"){var o=vec3.fromValues(i[1],i[2],0),l=vec3.fromValues(i[3],i[4],0),u=vec3.fromValues(i[5],i[6],0);e&&(vec3.transformMat4(o,o,e),vec3.transformMat4(l,l,e),vec3.transformMat4(u,u,e)),a="".concat(i[0]).concat(o[0],",").concat(o[1],",").concat(l[0],",").concat(l[1],",").concat(u[0],",").concat(u[1])}else if(i[0]==="A"){var c=vec3.fromValues(i[6],i[7],0);e&&vec3.transformMat4(c,c,e),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],",").concat(i[5],",").concat(c[0],",").concat(c[1])}else if(i[0]==="Q"){var d=vec3.fromValues(i[1],i[2],0),h=vec3.fromValues(i[3],i[4],0);e&&(vec3.transformMat4(d,d,e),vec3.transformMat4(h,h,e)),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],"}")}return t+=a},"")}function Fj(r,n,e,t){return[["M",r,n],["L",e,t]]}function oA(r,n,e,t){var i=(-1+Math.sqrt(2))/3*4,a=r*i,s=n*i,o=e-r,l=e+r,u=t-n,c=t+n;return[["M",o,t],["C",o,t-s,e-a,u,e,u],["C",e+a,u,l,t-s,l,t],["C",l,t+s,e+a,c,e,c],["C",e-a,c,o,t+s,o,t],["Z"]]}function Bj(r,n){var e=r.map(function(t,i){return[i===0?"M":"L",t[0],t[1]]});return n&&e.push(["Z"]),e}function $j(r,n,e,t,i){if(i){var a=_slicedToArray(i,4),s=a[0],o=a[1],l=a[2],u=a[3],c=r>0?1:-1,d=n>0?1:-1,h=c+d!==0?1:0;return[["M",c*s+e,t],["L",r-c*o+e,t],o?["A",o,o,0,0,h,r+e,d*o+t]:null,["L",r+e,n-d*l+t],l?["A",l,l,0,0,h,r+e-c*l,n+t]:null,["L",e+c*u,n+t],u?["A",u,u,0,0,h,e,n+t-d*u]:null,["L",e,d*s+t],s?["A",s,s,0,0,h,c*s+e,t]:null,["Z"]].filter(function(f){return f})}return[["M",e,t],["L",e+r,t],["L",e+r,t+n],["L",e,t+n],["Z"]]}function jCe(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r.getLocalTransform(),e=[];switch(r.nodeName){case yr.LINE:var t=r.parsedStyle,i=t.x1,a=i===void 0?0:i,s=t.y1,o=s===void 0?0:s,l=t.x2,u=l===void 0?0:l,c=t.y2,d=c===void 0?0:c;e=Fj(a,o,u,d);break;case yr.CIRCLE:{var h=r.parsedStyle,f=h.r,v=f===void 0?0:f,g=h.cx,m=g===void 0?0:g,y=h.cy,w=y===void 0?0:y;e=oA(v,v,m,w);break}case yr.ELLIPSE:{var T=r.parsedStyle,G=T.rx,x=G===void 0?0:G,_=T.ry,p=_===void 0?0:_,b=T.cx,R=b===void 0?0:b,B=T.cy,j=B===void 0?0:B;e=oA(x,p,R,j);break}case yr.POLYLINE:case yr.POLYGON:var Z=r.parsedStyle.points;e=Bj(Z.points,r.nodeName===yr.POLYGON);break;case yr.RECT:var te=r.parsedStyle,le=te.width,ue=le===void 0?0:le,se=te.height,V=se===void 0?0:se,ee=te.x,he=ee===void 0?0:ee,ut=te.y,ct=ut===void 0?0:ut,Lt=te.radius,vn=Lt&&Lt.some(function(rn){return rn!==0});e=$j(ue,V,he,ct,vn&&Lt.map(function(rn){return clamp(rn,0,Math.min(Math.abs(ue)/2,Math.abs(V)/2))}));break;case yr.PATH:var tn=r.parsedStyle.d.absolutePath;e=_toConsumableArray(tn);break}if(e.length)return Dj(e,r,n)}function HCe(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a=r.map(function(s,o){var l=s[0],u=r[o+1],c=o===0&&(n!==0||e!==0),d=(o===r.length-1||u&&(u[0]==="M"||u[0]==="Z"))&&t!==0&&i!==0,h=c?[n,e]:[0,0],f=_slicedToArray(h,2),v=f[0],g=f[1],m=d?[t,i]:[0,0],y=_slicedToArray(m,2),w=y[0],T=y[1];switch(l){case"M":return"M ".concat(s[1]+v,",").concat(s[2]+g);case"L":return"L ".concat(s[1]+w,",").concat(s[2]+T);case"Q":return"Q ".concat(s[1]," ").concat(s[2],",").concat(s[3]+w," ").concat(s[4]+T);case"C":return"C ".concat(s[1]," ").concat(s[2],",").concat(s[3]," ").concat(s[4],",").concat(s[5]+w," ").concat(s[6]+T);case"A":return"A ".concat(s[1]," ").concat(s[2]," ").concat(s[3]," ").concat(s[4]," ").concat(s[5]," ").concat(s[6]+w," ").concat(s[7]+T);case"Z":return"Z";default:return null}}).filter(function(s){return s!==null}).join(" ");return~a.indexOf("NaN")?"":a}var lA=function(n){if(n===""||Array.isArray(n)&&n.length===0)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var e;try{e=(0,xt.A)(n)}catch(f){e=(0,xt.A)(""),console.error("[g]: Invalid SVG Path definition: ".concat(n))}Nj(e);var t=Oj(e),i=Rj(e),a=i.polygons,s=i.polylines,o=Lj(e),l=Aj(o,0),u=l.x,c=l.y,d=l.width,h=l.height;return{absolutePath:e,hasArc:t,segments:o,polygons:a,polylines:s,totalLength:0,rect:{x:Number.isFinite(u)?u:0,y:Number.isFinite(c)?c:0,width:Number.isFinite(d)?d:0,height:Number.isFinite(h)?h:0}}},Gj=uc(lA);function uA(r){return(0,Ze.Z)(r)?Gj(r):lA(r)}function zj(r,n,e){var t=r.curve,i=n.curve;(!t||t.length===0)&&(t=(0,bt.Y)(r.absolutePath,!1),r.curve=t),(!i||i.length===0)&&(i=(0,bt.Y)(n.absolutePath,!1),n.curve=i);var a=[t,i];t.length!==i.length&&(a=(0,wt.x)(t,i));var s=(0,we.b)(a[0])!==(0,we.b)(a[1])?(0,oe.G)(a[0]):(0,Fe.U)(a[0]);return[s,(0,Ye.g)(a[1],s),function(o){return o}]}function Vj(r,n){var e;return(0,Ze.Z)(r)?e=r.split(" ").map(function(t){var i=t.split(","),a=Uo(i,2),s=a[0],o=a[1];return[Number(s),Number(o)]}):e=r,{points:e,totalLength:0,segments:[]}}function Uj(r,n){return[r.points,n.points,function(e){return e}]}var jo=null,Qm=/\s*(\w+)\(([^)]*)\)/g;function Lc(r){return function(n){var e=0;return r.map(function(t){return t===jo?n[e++]:t})}}function __(r){return r}var V0={matrix:["NNNNNN",[jo,jo,0,0,jo,jo,0,0,0,0,1,0,jo,jo,0,1],__],matrix3d:["NNNNNNNNNNNNNNNN",__],rotate:["A"],rotateX:["A"],rotateY:["A"],rotateZ:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",Lc([jo,jo,new cs(1)]),__],scaleX:["N",Lc([jo,new cs(1),new cs(1)]),Lc([jo,new cs(1)])],scaleY:["N",Lc([new cs(1),jo,new cs(1)]),Lc([new cs(1),jo])],scaleZ:["N",Lc([new cs(1),new cs(1),jo])],scale3d:["NNN",__],skew:["Aa",null,__],skewX:["A",null,Lc([jo,g_])],skewY:["A",null,Lc([g_,jo])],translate:["Tt",Lc([jo,jo,$h]),__],translateX:["T",Lc([jo,$h,$h]),Lc([jo,$h])],translateY:["T",Lc([$h,jo,$h]),Lc([$h,jo])],translateZ:["L",Lc([$h,$h,jo])],translate3d:["TTL",__]};function cA(r){for(var n=[],e=r.length,t=0;t<e;t++){var i=r[t],a=i[0],s=i.slice(1);a==="translate"||a==="skew"?s.length===1&&s.push(0):a==="scale"&&s.length===1&&s.push(s[0]);var o=V0[a];if(!o)return[];var l=s.map(function(u){return Eo(u)});n.push({t:a,d:l})}return n}function jj(r){if(Array.isArray(r))return cA(r);if(r=(r||"none").trim(),r==="none")return[];var n=[],e,t=0;for(Qm.lastIndex=0;e=Qm.exec(r);){if(e.index!==t)return[];t=e.index+e[0].length;var i=e[1],a=V0[i];if(!a)return[];var s=e[2].split(","),o=a[0];if(o.length<s.length)return[];for(var l=[],u=0;u<o.length;u++){var c=s[u],d=o[u],h=void 0;if(c?h={A:function(v){return v.trim()==="0"?g_:wj(v)},N:e2,T:qS,L:bj}[d.toUpperCase()](c):h={a:g_,n:l[0],t:$h}[d],h===void 0)return[];l.push(h)}if(n.push({t:i,d:l}),Qm.lastIndex===r.length)return n}return[]}function Hj(r){if(Array.isArray(r))return cA(r);if(r=(r||"none").trim(),r==="none")return[];var n=[],e,t=0;for(Qm.lastIndex=0;e=Qm.exec(r);){if(e.index!==t)return[];t=e.index+e[0].length;var i=e[1],a=V0[i];if(!a)return[];var s=e[2].split(","),o=a[0];if(o.length<s.length)return[];for(var l=[],u=0;u<o.length;u++){var c=s[u],d=o[u],h=void 0;if(c?h={A:function(v){return v.trim()==="0"?g_:KR(v)},N:qR,T:XR,L:ZR}[d.toUpperCase()](c):h={a:g_,n:l[0],t:$h}[d],h===void 0)return[];l.push(h)}if(n.push({t:i,d:l}),Qm.lastIndex===r.length)return n}return[]}function Wj(r){var n,e,t,i;switch(r.t){case"rotateX":return i=zs(Ac(r.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotateY":return i=zs(Ac(r.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotateZ":return i=zs(Ac(r.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":n=r.d[0].value,e=r.d[1].value,t=r.d[2].value,i=zs(Ac(r.d[3]));var a=n*n+e*e+t*t;if(a===0)n=1,e=0,t=0;else if(a!==1){var s=Math.sqrt(a);n/=s,e/=s,t/=s}var o=Math.sin(i/2),l=o*Math.cos(i/2),u=o*o;return[1-2*(e*e+t*t)*u,2*(n*e*u+t*l),2*(n*t*u-e*l),0,2*(n*e*u-t*l),1-2*(n*n+t*t)*u,2*(e*t*u+n*l),0,2*(n*t*u+e*l),2*(e*t*u-n*l),1-2*(n*n+e*e)*u,0,0,0,0,1];case"scale":return[r.d[0].value,0,0,0,0,r.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scaleX":return[r.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaleY":return[1,0,0,0,0,r.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scaleZ":return[1,0,0,0,0,1,0,0,0,0,r.d[0].value,0,0,0,0,1];case"scale3d":return[r.d[0].value,0,0,0,0,r.d[1].value,0,0,0,0,r.d[2].value,0,0,0,0,1];case"skew":var c=zs(Ac(r.d[0])),d=zs(Ac(r.d[1]));return[1,Math.tan(d),0,0,Math.tan(c),1,0,0,0,0,1,0,0,0,0,1];case"skewX":return i=zs(Ac(r.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewY":return i=zs(Ac(r.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return n=gd(r.d[0],0,null)||0,e=gd(r.d[1],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,e,0,1];case"translateX":return n=gd(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,0,0,1];case"translateY":return e=gd(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,e,0,1];case"translateZ":return t=gd(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,t,1];case"translate3d":return n=gd(r.d[0],0,null)||0,e=gd(r.d[1],0,null)||0,t=gd(r.d[2],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,e,t,1];case"perspective":var h=gd(r.d[0],0,null)||0,f=h?-1/h:0;return[1,0,0,0,0,1,0,0,0,0,1,f,0,0,0,1];case"matrix":return[r.d[0].value,r.d[1].value,0,0,r.d[2].value,r.d[3].value,0,0,0,0,1,0,r.d[4].value,r.d[5].value,0,1];case"matrix3d":return r.d.map(function(v){return v.value})}}function Yj(r,n){return[r[0]*n[0]+r[4]*n[1]+r[8]*n[2]+r[12]*n[3],r[1]*n[0]+r[5]*n[1]+r[9]*n[2]+r[13]*n[3],r[2]*n[0]+r[6]*n[1]+r[10]*n[2]+r[14]*n[3],r[3]*n[0]+r[7]*n[1]+r[11]*n[2]+r[15]*n[3],r[0]*n[4]+r[4]*n[5]+r[8]*n[6]+r[12]*n[7],r[1]*n[4]+r[5]*n[5]+r[9]*n[6]+r[13]*n[7],r[2]*n[4]+r[6]*n[5]+r[10]*n[6]+r[14]*n[7],r[3]*n[4]+r[7]*n[5]+r[11]*n[6]+r[15]*n[7],r[0]*n[8]+r[4]*n[9]+r[8]*n[10]+r[12]*n[11],r[1]*n[8]+r[5]*n[9]+r[9]*n[10]+r[13]*n[11],r[2]*n[8]+r[6]*n[9]+r[10]*n[10]+r[14]*n[11],r[3]*n[8]+r[7]*n[9]+r[11]*n[10]+r[15]*n[11],r[0]*n[12]+r[4]*n[13]+r[8]*n[14]+r[12]*n[15],r[1]*n[12]+r[5]*n[13]+r[9]*n[14]+r[13]*n[15],r[2]*n[12]+r[6]*n[13]+r[10]*n[14]+r[14]*n[15],r[3]*n[12]+r[7]*n[13]+r[11]*n[14]+r[15]*n[15]]}function Zj(r){return r.length===0?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:r.map(Wj).reduce(Yj)}function dA(r){var n=[0,0,0],e=[1,1,1],t=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return jU(Zj(r),n,e,t,i,a),[[n,e,t,a,i]]}var Xj=function(){function r(t,i){for(var a=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],s=0;s<4;s++)for(var o=0;o<4;o++)for(var l=0;l<4;l++)a[s][o]+=i[s][l]*t[l][o];return a}function n(t){return t[0][2]===0&&t[0][3]===0&&t[1][2]===0&&t[1][3]===0&&t[2][0]===0&&t[2][1]===0&&t[2][2]===1&&t[2][3]===0&&t[3][2]===0&&t[3][3]===1}function e(t,i,a,s,o){for(var l=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],u=0;u<4;u++)l[u][3]=o[u];for(var c=0;c<3;c++)for(var d=0;d<3;d++)l[3][c]+=t[d]*l[d][c];var h=s[0],f=s[1],v=s[2],g=s[3],m=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];m[0][0]=1-2*(f*f+v*v),m[0][1]=2*(h*f-v*g),m[0][2]=2*(h*v+f*g),m[1][0]=2*(h*f+v*g),m[1][1]=1-2*(h*h+v*v),m[1][2]=2*(f*v-h*g),m[2][0]=2*(h*v-f*g),m[2][1]=2*(f*v+h*g),m[2][2]=1-2*(h*h+f*f),l=r(l,m);var y=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];a[2]&&(y[2][1]=a[2],l=r(l,y)),a[1]&&(y[2][1]=0,y[2][0]=a[0],l=r(l,y)),a[0]&&(y[2][0]=0,y[1][0]=a[0],l=r(l,y));for(var w=0;w<3;w++)for(var T=0;T<3;T++)l[w][T]*=i[w];return n(l)?[l[0][0],l[0][1],l[1][0],l[1][1],l[3][0],l[3][1]]:l[0].concat(l[1],l[2],l[3])}return e}();function Kj(r){return r.toFixed(6).replace(".000000","")}function i2(r,n){var e,t;return r.decompositionPair!==n&&(r.decompositionPair=n,e=dA(r)),n.decompositionPair!==r&&(n.decompositionPair=r,t=dA(n)),e[0]===null||t[0]===null?[[!1],[!0],function(i){return i?n[0].d:r[0].d}]:(e[0].push(0),t[0].push(1),[e,t,function(i){var a=Qj(e[0][3],t[0][3],i[5]),s=Xj(i[0],i[1],i[2],a,i[4]),o=s.map(Kj).join(",");return o}])}function Jj(r,n){for(var e=0,t=0;t<r.length;t++)e+=r[t]*n[t];return e}function Qj(r,n,e){var t=Jj(r,n);t=(0,O.Z)(t,-1,1);var i=[];if(t===1)i=r;else for(var a=Math.acos(t),s=Math.sin(e*a)*1/Math.sqrt(1-t*t),o=0;o<4;o++)i.push(r[o]*(Math.cos(e*a)-t*s)+n[o]*s);return i}function a2(r){return r.replace(/[XY]/,"")}function s2(r){return r.replace(/(X|Y|Z|3d)?$/,"3d")}var qj=function(n,e){return n==="perspective"&&e==="perspective"||(n==="matrix"||n==="matrix3d")&&(e==="matrix"||e==="matrix3d")};function eH(r,n,e){var t=!1;if(!r.length||!n.length){r.length||(t=!0,r=n,n=[]);for(var i=function(){var j=r[a],Z=j.t,te=j.d,le=Z.substring(0,5)==="scale"?1:0;n.push({t:Z,d:te.map(function(ue){return typeof ue=="number"?Eo(le):Eo(le,ue.unit)})})},a=0;a<r.length;a++)i()}var s=[],o=[],l=[];if(r.length!==n.length){var u=i2(r,n);s=[u[0]],o=[u[1]],l=[["matrix",[u[2]]]]}else for(var c=0;c<r.length;c++){var d=r[c].t,h=n[c].t,f=r[c].d,v=n[c].d,g=V0[d],m=V0[h],y=void 0;if(qj(d,h)){var w=i2([r[c]],[n[c]]);s.push(w[0]),o.push(w[1]),l.push(["matrix",[w[2]]]);continue}else if(d===h)y=d;else if(g[2]&&m[2]&&a2(d)===a2(h))y=a2(d),f=g[2](f),v=m[2](v);else if(g[1]&&m[1]&&s2(d)===s2(h))y=s2(d),f=g[1](f),v=m[1](v);else{var T=i2(r,n);s=[T[0]],o=[T[1]],l=[["matrix",[T[2]]]];break}for(var G=[],x=[],_=[],p=0;p<f.length;p++){var b=Sj(f[p],v[p],e,!1,p);G[p]=b[0],x[p]=b[1],_.push(b[2])}s.push(G),o.push(x),l.push([y,_])}if(t){var R=s;s=o,o=R}return[s,o,function(B){return B.map(function(j,Z){var te=j.map(function(le,ue){return l[Z][1][ue](le)}).join(",");return l[Z][0]==="matrix"&&te.split(",").length===16&&(l[Z][0]="matrix3d"),l[Z][0]==="matrix3d"&&te.split(",").length===6&&(l[Z][0]="matrix"),"".concat(l[Z][0],"(").concat(te,")")}).join(" ")}]}var tH=uc(function(r){if((0,Ze.Z)(r)){if(r==="text-anchor")return[Eo(0,"px"),Eo(0,"px")];var n=r.split(" ");return n.length===1&&(n[0]==="top"||n[0]==="bottom"?(n[1]=n[0],n[0]="center"):n[1]="center"),n.length!==2?null:[qS(hA(n[0])),qS(hA(n[1]))]}return[Eo(r[0]||0,"px"),Eo(r[1]||0,"px")]});function hA(r){return r==="center"?"50%":r==="left"||r==="top"?"0%":r==="right"||r==="bottom"?"100%":r}var o2=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:Gn.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:Gn.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:Gn.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:Gn.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:Gn.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:Gn.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:Gn.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:Gn.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:Gn.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:Gn.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:Gn.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:Gn.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:Gn.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:Gn.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:Gn.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:Gn.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:Gn.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:Gn.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:Gn.FILTER},{n:"clipPath",syntax:Gn.DEFINED_PATH},{n:"textPath",syntax:Gn.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:Gn.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:Gn.TRANSFORM},{n:"transformOrigin",p:100,d:"0 0",l:!0,syntax:Gn.TRANSFORM_ORIGIN},{n:"cx",int:!0,l:!0,d:"0",syntax:Gn.COORDINATE},{n:"cy",int:!0,l:!0,d:"0",syntax:Gn.COORDINATE},{n:"cz",int:!0,l:!0,d:"0",syntax:Gn.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:Gn.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:Gn.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:Gn.LENGTH_PERCENTAGE},{n:"x",int:!0,l:!0,d:"0",syntax:Gn.COORDINATE},{n:"y",int:!0,l:!0,d:"0",syntax:Gn.COORDINATE},{n:"z",int:!0,l:!0,d:"0",syntax:Gn.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:Gn.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:Gn.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:Gn.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:Gn.COORDINATE},{n:"y1",int:!0,l:!0,syntax:Gn.COORDINATE},{n:"z1",int:!0,l:!0,syntax:Gn.COORDINATE},{n:"x2",int:!0,l:!0,syntax:Gn.COORDINATE},{n:"y2",int:!0,l:!0,syntax:Gn.COORDINATE},{n:"z2",int:!0,l:!0,syntax:Gn.COORDINATE},{n:"d",int:!0,l:!0,d:"",syntax:Gn.PATH,p:50},{n:"points",int:!0,l:!0,syntax:Gn.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:Gn.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:Gn.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:Gn.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:Gn.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:Gn.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:Gn.NUMBER,d:function(n){return n===yr.PATH||n===yr.POLYGON||n===yr.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:Gn.MARKER},{n:"markerEnd",syntax:Gn.MARKER},{n:"markerMid",syntax:Gn.MARKER},{n:"markerStartOffset",syntax:Gn.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:Gn.LENGTH,l:!0,int:!0,d:"0"}],nH=new Set(o2.filter(function(r){return!!r.l}).map(function(r){return r.n})),rH={},iH=function(){function r(n){var e=this;fr(this,r),this.runtime=n,o2.forEach(function(t){e.registerMetadata(t)})}return vr(r,[{key:"registerMetadata",value:function(e){[e.n].concat(Hd(e.a||[])).forEach(function(t){rH[t]=e})}},{key:"getPropertySyntax",value:function(e){return this.runtime.CSSPropertySyntaxFactory[e]}},{key:"processProperties",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0};Object.assign(e.attributes,t);var a=e.parsedStyle.clipPath,s=e.parsedStyle.offsetPath;Object.assign(e.parsedStyle,t);var o=!!i.forceUpdateGeometry;if(!o){for(var l in t)if(nH.has(l)){o=!0;break}}t.fill&&(e.parsedStyle.fill=G0(t.fill)),t.stroke&&(e.parsedStyle.stroke=G0(t.stroke)),t.shadowColor&&(e.parsedStyle.shadowColor=G0(t.shadowColor)),t.filter&&(e.parsedStyle.filter=Mj(t.filter)),(0,xe.Z)(t.radius)||(e.parsedStyle.radius=JR(t.radius,4)),(0,xe.Z)(t.lineDash)||(e.parsedStyle.lineDash=JR(t.lineDash,2)),t.points&&(e.parsedStyle.points=Vj(t.points)),t.d===""&&(e.parsedStyle.d=xo({},zR)),t.d&&(e.parsedStyle.d=uA(t.d)),t.textTransform&&this.runtime.CSSPropertySyntaxFactory[Gn.TEXT_TRANSFORM].calculator(null,null,{value:t.textTransform},e,null),(0,ie.Z)(t.clipPath)||this.runtime.CSSPropertySyntaxFactory[Gn.DEFINED_PATH].calculator("clipPath",a,t.clipPath,e,this.runtime),t.offsetPath&&this.runtime.CSSPropertySyntaxFactory[Gn.DEFINED_PATH].calculator("offsetPath",s,t.offsetPath,e,this.runtime),t.transform&&(e.parsedStyle.transform=jj(t.transform)),t.transformOrigin&&(e.parsedStyle.transformOrigin=tH(t.transformOrigin)),t.markerStart&&(e.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory[Gn.MARKER].calculator(null,t.markerStart,t.markerStart,null,null)),t.markerEnd&&(e.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory[Gn.MARKER].calculator(null,t.markerEnd,t.markerEnd,null,null)),t.markerMid&&(e.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory[Gn.MARKER].calculator("",t.markerMid,t.markerMid,null,null)),(0,xe.Z)(t.zIndex)||this.runtime.CSSPropertySyntaxFactory[Gn.Z_INDEX].postProcessor(e),(0,xe.Z)(t.offsetDistance)||this.runtime.CSSPropertySyntaxFactory[Gn.OFFSET_DISTANCE].postProcessor(e),t.transform&&this.runtime.CSSPropertySyntaxFactory[Gn.TRANSFORM].postProcessor(e),t.transformOrigin&&this.runtime.CSSPropertySyntaxFactory[Gn.TRANSFORM_ORIGIN].postProcessor(e),o&&(e.geometry.dirty=!0,e.renderable.boundsDirty=!0,e.renderable.renderBoundsDirty=!0,i.forceUpdateGeometry||this.runtime.sceneGraphService.dirtifyToRoot(e))}},{key:"updateGeometry",value:function(e){var t=e.nodeName,i=this.runtime.geometryUpdaterFactory[t];if(i){var a=e.geometry;a.contentBounds||(a.contentBounds=new hl),a.renderBounds||(a.renderBounds=new hl);var s=e.parsedStyle,o=i.update(s,e),l=o.cx,u=l===void 0?0:l,c=o.cy,d=c===void 0?0:c,h=o.cz,f=h===void 0?0:h,v=o.hwidth,g=v===void 0?0:v,m=o.hheight,y=m===void 0?0:m,w=o.hdepth,T=w===void 0?0:w,G=[Math.abs(g),Math.abs(y),T],x=s.stroke,_=s.lineWidth,p=_===void 0?1:_,b=s.increasedLineWidthForHitTesting,R=b===void 0?0:b,B=s.shadowType,j=B===void 0?"outer":B,Z=s.shadowColor,te=s.filter,le=te===void 0?[]:te,ue=s.transformOrigin,se=[u,d,f];a.contentBounds.update(se,G);var V=t===yr.POLYLINE||t===yr.POLYGON||t===yr.PATH?Math.SQRT2:.5,ee=x&&!x.isNone;if(ee){var he=((p||0)+(R||0))*V;G[0]+=he,G[1]+=he}if(a.renderBounds.update(se,G),Z&&j&&j!=="inner"){var ut=a.renderBounds,ct=ut.min,Lt=ut.max,vn=s.shadowBlur,tn=s.shadowOffsetX,rn=s.shadowOffsetY,mn=vn||0,ar=tn||0,gi=rn||0,kr=ct[0]-mn+ar,Ta=Lt[0]+mn+ar,Wa=ct[1]-mn+gi,la=Lt[1]+mn+gi;ct[0]=Math.min(ct[0],kr),Lt[0]=Math.max(Lt[0],Ta),ct[1]=Math.min(ct[1],Wa),Lt[1]=Math.max(Lt[1],la),a.renderBounds.setMinMax(ct,Lt)}le.forEach(function(so){var oo=so.name,qi=so.params;if(oo==="blur"){var lo=qi[0].value;a.renderBounds.update(a.renderBounds.center,E.IH(a.renderBounds.halfExtents,a.renderBounds.halfExtents,[lo,lo,0]))}else if(oo==="drop-shadow"){var uo=qi[0].value,co=qi[1].value,ea=qi[2].value,ho=a.renderBounds,Rr=ho.min,Ar=ho.max,Gu=Rr[0]-ea+uo,zu=Ar[0]+ea+uo,Vu=Rr[1]-ea+co,Uu=Ar[1]+ea+co;Rr[0]=Math.min(Rr[0],Gu),Ar[0]=Math.max(Ar[0],zu),Rr[1]=Math.min(Rr[1],Vu),Ar[1]=Math.max(Ar[1],Uu),a.renderBounds.setMinMax(Rr,Ar)}}),e.geometry.dirty=!1;var ys=g<0,Jl=y<0,xs=(ys?-1:1)*(ue?gd(ue[0],0,e,!0):0),Es=(Jl?-1:1)*(ue?gd(ue[1],1,e,!0):0);(xs||Es)&&e.setOrigin(xs,Es)}}},{key:"updateSizeAttenuation",value:function(e,t){e.style.isSizeAttenuation?(e.style.rawLineWidth||(e.style.rawLineWidth=e.style.lineWidth),e.style.lineWidth=(e.style.rawLineWidth||1)/t,e.nodeName===yr.CIRCLE&&(e.style.rawR||(e.style.rawR=e.style.r),e.style.r=(e.style.rawR||1)/t)):(e.style.rawLineWidth&&(e.style.lineWidth=e.style.rawLineWidth,delete e.style.rawLineWidth),e.nodeName===yr.CIRCLE&&e.style.rawR&&(e.style.r=e.style.rawR,delete e.style.rawR))}}])}(),aH=function(){function r(){fr(this,r),this.mixer=t2}return vr(r,[{key:"calculator",value:function(e,t,i,a){return Ac(i)}}])}(),sH=function(){function r(){fr(this,r)}return vr(r,[{key:"calculator",value:function(e,t,i,a,s){return i instanceof Yd&&(i=null),s.sceneGraphService.updateDisplayObjectDependency(e,t,i,a),e==="clipPath"&&a.forEach(function(o){o.childNodes.length===0&&s.sceneGraphService.dirtifyToRoot(o)}),i}}])}(),oH=function(){function r(){fr(this,r),this.parser=G0,this.mixer=Ej}return vr(r,[{key:"calculator",value:function(e,t,i,a){return i instanceof Yd?i.value==="none"?jR:HR:i}}])}(),lH=function(){function r(){fr(this,r)}return vr(r,[{key:"calculator",value:function(e,t,i){return i instanceof Yd?[]:i}}])}();function fA(r){var n=r.parsedStyle,e=n.fontSize;return(0,xe.Z)(e)?null:e}var l2=function(){function r(){fr(this,r),this.mixer=t2}return vr(r,[{key:"calculator",value:function(e,t,i,a,s){if((0,pe.Z)(i))return i;if(cs.isRelativeUnit(i.unit)){if(i.unit===Jn.kPercentage)return 0;if(i.unit===Jn.kEms){if(a.parentNode){var o=fA(a.parentNode);if(o)return o*=i.value,o}return 0}if(i.unit===Jn.kRems){var l;if(a!=null&&(l=a.ownerDocument)!==null&&l!==void 0&&l.documentElement){var u=fA(a.ownerDocument.documentElement);if(u)return u*=i.value,u}return 0}}else return i.value}}])}(),uH=function(){function r(){fr(this,r),this.mixer=eA}return vr(r,[{key:"calculator",value:function(e,t,i){return i.map(function(a){return a.value})}}])}(),cH=function(){function r(){fr(this,r),this.mixer=eA}return vr(r,[{key:"calculator",value:function(e,t,i){return i.map(function(a){return a.value})}}])}(),dH=function(){function r(){fr(this,r)}return vr(r,[{key:"calculator",value:function(e,t,i,a){var s;i instanceof Yd&&(i=null);var o=(s=i)===null||s===void 0?void 0:s.cloneNode(!0);return o&&(o.style.isMarker=!0),o}}])}(),hH=function(){function r(){fr(this,r),this.mixer=t2}return vr(r,[{key:"calculator",value:function(e,t,i){return i.value}}])}(),fH=function(){function r(){fr(this,r),this.mixer=n2(0,1)}return vr(r,[{key:"calculator",value:function(e,t,i){return i.value}},{key:"postProcessor",value:function(e){var t=e.parsedStyle,i=t.offsetPath,a=t.offsetDistance;if(i){var s=i.nodeName;if(s===yr.LINE||s===yr.PATH||s===yr.POLYLINE){var o=i.getPoint(a);o&&e.setLocalPosition(o.x,o.y)}}}}])}(),vH=function(){function r(){fr(this,r),this.mixer=n2(0,1)}return vr(r,[{key:"calculator",value:function(e,t,i){return i.value}}])}(),gH=function(){function r(){fr(this,r),this.parser=uA,this.mixer=zj}return vr(r,[{key:"calculator",value:function(e,t,i){return i instanceof Yd&&i.value==="unset"?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Xm(0,0,0,0)}:i}}])}(),_H=vr(function r(){fr(this,r),this.mixer=Uj}),mH=function(r){function n(){var e;fr(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ss(this,n,[].concat(i)),e.mixer=n2(0,1/0),e}return Ts(n,r),vr(n)}(l2),pH=function(){function r(){fr(this,r)}return vr(r,[{key:"calculator",value:function(e,t,i,a){return i instanceof Yd?i.value==="unset"?"":i.value:"".concat(i)}},{key:"postProcessor",value:function(e){e.nodeValue="".concat(e.parsedStyle.text)||""}}])}(),yH=function(){function r(){fr(this,r)}return vr(r,[{key:"calculator",value:function(e,t,i,a){var s=a.getAttribute("text");if(s){var o=s;i.value==="capitalize"?o=s.charAt(0).toUpperCase()+s.slice(1):i.value==="lowercase"?o=s.toLowerCase():i.value==="uppercase"&&(o=s.toUpperCase()),a.parsedStyle.text=o}return i.value}}])}(),WCe=function(n){return Object.fromEntries(Object.entries(n).filter(function(e){var t=_slicedToArray(e,2),i=t[1];return i!==void 0}))},u2=new WeakMap;function xH(r,n,e){if(r){var t=typeof r=="string"?document.getElementById(r):r;u2.has(t)&&u2.get(t).destroy(e),u2.set(t,n)}}var c2=typeof window!="undefined"&&typeof window.document!="undefined";function EH(r){return!!r.getAttribute}function bH(r,n){for(var e=0,t=r.length;e<t;){var i=e+t>>>1;vA(r[i],n)<0?e=i+1:t=i}return e}function vA(r,n){var e=Number(r.parsedStyle.zIndex||0),t=Number(n.parsedStyle.zIndex||0);if(e===t){var i=r.parentNode;if(i){var a=i.childNodes||[];return a.indexOf(r)-a.indexOf(n)}}return e-t}function kH(r){var n=r;do{var e,t=(e=n.parsedStyle)===null||e===void 0?void 0:e.clipPath;if(t)return n;n=n.parentElement}while(n!==null);return null}var gA="px";function YCe(r,n,e){c2&&r.style&&(r.style.width=n+gA,r.style.height=e+gA)}function _A(r,n){if(c2)return document.defaultView.getComputedStyle(r,null).getPropertyValue(n)}function wH(r){var n=_A(r,"width");return n==="auto"?r.offsetWidth:parseFloat(n)}function SH(r){var n=_A(r,"height");return n==="auto"?r.offsetHeight:parseFloat(n)}var TH=1,CH={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},d2=typeof performance=="object"&&performance.now?performance:Date;function P1(r){return r.nodeName===yr.FRAGMENT?!0:r.getRootNode().nodeName===yr.FRAGMENT}function ZCe(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"auto",n=arguments.length>1?arguments[1]:void 0,e=arguments.length>2?arguments[2]:void 0,t=!1,i=!1,a=!!n&&!n.isNone,s=!!e&&!e.isNone;return r==="visiblepainted"||r==="painted"||r==="auto"?(t=a,i=s):r==="visiblefill"||r==="fill"?t=!0:r==="visiblestroke"||r==="stroke"?i=!0:(r==="visible"||r==="all")&&(t=!0,i=!0),[t,i]}var MH=1,PH=function(){return MH++},Bf=typeof self=="object"&&self.self===self?self:typeof k.g=="object"&&k.g.global===k.g?k.g:{},NH=Date.now(),OH=function(){return Bf.performance&&typeof Bf.performance.now=="function"?Bf.performance.now():Date.now()-NH},U0={},mA=Date.now(),RH=function(n){if(typeof n!="function")throw new TypeError("".concat(n," is not a function"));var e=Date.now(),t=e-mA,i=t>16?0:16-t,a=PH();return U0[a]=n,Object.keys(U0).length>1||setTimeout(function(){mA=e;var s=U0;U0={},Object.keys(s).forEach(function(o){return s[o](OH())})},i),a},AH=function(n){delete U0[n]},LH=["","webkit","moz","ms","o"],pA=function(n){return typeof n!="string"?RH:n===""?Bf.requestAnimationFrame:Bf["".concat(n,"RequestAnimationFrame")]},IH=function(n){return typeof n!="string"?AH:n===""?Bf.cancelAnimationFrame:Bf["".concat(n,"CancelAnimationFrame")]||Bf["".concat(n,"CancelRequestAnimationFrame")]},DH=function(n,e){for(var t=0;n[t]!==void 0;){if(e(n[t]))return n[t];t+=1}},yA=DH(LH,function(r){return!!pA(r)}),h2=pA(yA),xA=IH(yA);Bf.requestAnimationFrame=h2,Bf.cancelAnimationFrame=xA;var FH=function(){function r(){fr(this,r),this.callbacks=[]}return vr(r,[{key:"getCallbacksNum",value:function(){return this.callbacks.length}},{key:"tapPromise",value:function(e,t){this.callbacks.push(t)}},{key:"promise",value:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return Promise.all(this.callbacks.map(function(a){return a.apply(void 0,t)}))}}])}(),BH=function(){function r(){fr(this,r),this.callbacks=[]}return vr(r,[{key:"tapPromise",value:function(e,t){this.callbacks.push(t)}},{key:"promise",value:function(){var n=GS(f_().mark(function t(){var i,a,s,o,l=arguments;return f_().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(!this.callbacks.length){c.next=14;break}return c.next=3,(i=this.callbacks)[0].apply(i,l);case 3:a=c.sent,s=0;case 5:if(!(s<this.callbacks.length-1)){c.next=13;break}return o=this.callbacks[s],c.next=9,o(a);case 9:a=c.sent;case 10:s++,c.next=5;break;case 13:return c.abrupt("return",a);case 14:return c.abrupt("return",null);case 15:case"end":return c.stop()}},t,this)}));function e(){return n.apply(this,arguments)}return e}()}])}(),cc=function(){function r(){fr(this,r),this.callbacks=[]}return vr(r,[{key:"tap",value:function(e,t){this.callbacks.push(t)}},{key:"call",value:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var a=arguments;this.callbacks.forEach(function(s){s.apply(void 0,a)})}}])}(),f2=function(){function r(){fr(this,r),this.callbacks=[]}return vr(r,[{key:"tap",value:function(e,t){this.callbacks.push(t)}},{key:"call",value:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(this.callbacks.length){for(var a=arguments,s=this.callbacks[0].apply(void 0,a),o=0;o<this.callbacks.length-1;o++){var l=this.callbacks[o];s=l(s)}return s}return null}}])}(),$H=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],GH=/([\"\'])[^\'\"]+\1/;function zH(r){for(var n=r.fontSize,e=n===void 0?16:n,t=r.fontFamily,i=t===void 0?"sans-serif":t,a=r.fontStyle,s=a===void 0?"normal":a,o=r.fontVariant,l=o===void 0?"normal":o,u=r.fontWeight,c=u===void 0?"normal":u,d=(0,pe.Z)(e)&&"".concat(e,"px")||"16px",h=i.split(","),f=h.length-1;f>=0;f--){var v=h[f].trim();!GH.test(v)&&$H.indexOf(v)<0&&(v='"'.concat(v,'"')),h[f]=v}return"".concat(s," ").concat(l," ").concat(c," ").concat(d," ").concat(h.join(","))}function v2(r,n,e){return L.identity(r),r[4]=Math.tan(n),r[1]=Math.tan(e),r}var Sl=L.create(),VH=L.create(),UH={scale:function(n){L.fromScaling(Sl,[n[0].value,n[1].value,1])},scaleX:function(n){L.fromScaling(Sl,[n[0].value,1,1])},scaleY:function(n){L.fromScaling(Sl,[1,n[0].value,1])},scaleZ:function(n){L.fromScaling(Sl,[1,1,n[0].value])},scale3d:function(n){L.fromScaling(Sl,[n[0].value,n[1].value,n[2].value])},translate:function(n){L.fromTranslation(Sl,[n[0].value,n[1].value,0])},translateX:function(n){L.fromTranslation(Sl,[n[0].value,0,0])},translateY:function(n){L.fromTranslation(Sl,[0,n[0].value,0])},translateZ:function(n){L.fromTranslation(Sl,[0,0,n[0].value])},translate3d:function(n){L.fromTranslation(Sl,[n[0].value,n[1].value,n[2].value])},rotate:function(n){L.fromZRotation(Sl,zs(Ac(n[0])))},rotateX:function(n){L.fromXRotation(Sl,zs(Ac(n[0])))},rotateY:function(n){L.fromYRotation(Sl,zs(Ac(n[0])))},rotateZ:function(n){L.fromZRotation(Sl,zs(Ac(n[0])))},rotate3d:function(n){L.fromRotation(Sl,zs(Ac(n[3])),[n[0].value,n[1].value,n[2].value])},skew:function(n){v2(Sl,zs(n[0].value),zs(n[1].value))},skewX:function(n){v2(Sl,zs(n[0].value),0)},skewY:function(n){v2(Sl,0,zs(n[0].value))},matrix:function(n){L.set(Sl,n[0].value,n[1].value,0,0,n[2].value,n[3].value,0,0,0,0,1,0,n[4].value,n[5].value,0,1)},matrix3d:function(n){L.set.apply(L,[Sl].concat(Hd(n.map(function(e){return e.value}))))}},jH=E.al(1,1,1),HH=E.Ue(),EA={translate:function(n,e){kn.sceneGraphService.setLocalScale(n,jH,!1),kn.sceneGraphService.setLocalEulerAngles(n,HH,void 0,void 0,!1),kn.sceneGraphService.setLocalPosition(n,[e[0].value,e[1].value,0],!1),kn.sceneGraphService.dirtifyLocal(n,n.transformable)}};function WH(r,n){if(r.length){if(r.length===1&&EA[r[0].t]){EA[r[0].t](n,r[0].d);return}for(var e=L.identity(VH),t=0;t<r.length;t++){var i=r[t],a=i.t,s=i.d,o=UH[a];o&&(o(s),L.mul(e,e,Sl))}n.setLocalTransform(e)}else n.resetLocalTransform();return n.getLocalTransform()}var YH=function(){function r(){fr(this,r),this.parser=Hj,this.mixer=eH}return vr(r,[{key:"calculator",value:function(e,t,i,a){return i instanceof Yd?[]:i}},{key:"postProcessor",value:function(e){WH(e.parsedStyle.transform,e)}}])}(),ZH=function(){function r(){fr(this,r)}return vr(r,[{key:"postProcessor",value:function(e){var t=e.parsedStyle.transformOrigin;t[0].unit===Jn.kPixels&&t[1].unit===Jn.kPixels?e.setOrigin(t[0].value,t[1].value):e.getGeometryBounds()}}])}(),XH=function(){function r(){fr(this,r)}return vr(r,[{key:"calculator",value:function(e,t,i,a){return i.value}},{key:"postProcessor",value:function(e){if(e.parentNode){var t=e.parentNode,i=t.renderable,a=t.sortable;i&&(i.dirty=!0),a&&(a.dirty=!0,a.dirtyReason=b1.Z_INDEX_CHANGED)}}}])}(),KH=function(){function r(){fr(this,r)}return vr(r,[{key:"update",value:function(e,t){var i=e.cx,a=i===void 0?0:i,s=e.cy,o=s===void 0?0:s,l=e.r,u=l===void 0?0:l;return{cx:a,cy:o,hwidth:u,hheight:u}}}])}(),JH=function(){function r(){fr(this,r)}return vr(r,[{key:"update",value:function(e,t){var i=e.cx,a=i===void 0?0:i,s=e.cy,o=s===void 0?0:s,l=e.rx,u=l===void 0?0:l,c=e.ry,d=c===void 0?0:c;return{cx:a,cy:o,hwidth:u,hheight:d}}}])}(),QH=function(){function r(){fr(this,r)}return vr(r,[{key:"update",value:function(e){var t=e.x1,i=e.y1,a=e.x2,s=e.y2,o=Math.min(t,a),l=Math.max(t,a),u=Math.min(i,s),c=Math.max(i,s),d=l-o,h=c-u,f=d/2,v=h/2;return{cx:o+f,cy:u+v,hwidth:f,hheight:v}}}])}(),qH=function(){function r(){fr(this,r)}return vr(r,[{key:"update",value:function(e){var t=e.d,i=t.rect,a=i.x,s=i.y,o=i.width,l=i.height,u=o/2,c=l/2;return{cx:a+u,cy:s+c,hwidth:u,hheight:c}}}])}(),eW=function(){function r(){fr(this,r)}return vr(r,[{key:"update",value:function(e){if(e.points&&(0,Ie.Z)(e.points.points)){var t=e.points.points,i=Math.min.apply(Math,Hd(t.map(function(h){return h[0]}))),a=Math.max.apply(Math,Hd(t.map(function(h){return h[0]}))),s=Math.min.apply(Math,Hd(t.map(function(h){return h[1]}))),o=Math.max.apply(Math,Hd(t.map(function(h){return h[1]}))),l=a-i,u=o-s,c=l/2,d=u/2;return{cx:i+c,cy:s+d,hwidth:c,hheight:d}}return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),tW=function(){function r(){fr(this,r)}return vr(r,[{key:"update",value:function(e,t){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s,l=e.src,u=e.width,c=u===void 0?0:u,d=e.height,h=d===void 0?0:d,f=c,v=h;return l&&!(0,Ze.Z)(l)&&(f||(f=l.width,e.width=f),v||(v=l.height,e.height=v)),{cx:a+f/2,cy:o+v/2,hwidth:f/2,hheight:v/2}}}])}(),nW=function(){function r(n){fr(this,r),this.globalRuntime=n}return vr(r,[{key:"isReadyToMeasure",value:function(e,t){var i=e.text;return i}},{key:"update",value:function(e,t){var i,a=e.text,s=e.textAlign,o=s===void 0?"start":s,l=e.lineWidth,u=l===void 0?1:l,c=e.textBaseline,d=c===void 0?"alphabetic":c,h=e.dx,f=h===void 0?0:h,v=e.dy,g=v===void 0?0:v,m=e.x,y=m===void 0?0:m,w=e.y,T=w===void 0?0:w;if(!this.isReadyToMeasure(e,t))return e.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{hwidth:0,hheight:0,cx:0,cy:0};var G=(t==null||(i=t.ownerDocument)===null||i===void 0||(i=i.defaultView)===null||i===void 0?void 0:i.getConfig())||{},x=G.offscreenCanvas,_=this.globalRuntime.textService.measureText(a,e,x);e.metrics=_;var p=_.width,b=_.height,R=p/2,B=b/2,j=y+R;o==="center"||o==="middle"?j+=u/2-R:(o==="right"||o==="end")&&(j+=u-R*2);var Z=T-B;return d==="middle"?Z+=B:d==="top"||d==="hanging"?Z+=B*2:d==="alphabetic"||(d==="bottom"||d==="ideographic")&&(Z+=0),f&&(j+=f),g&&(Z+=g),{cx:j,cy:Z,hwidth:R,hheight:B}}}])}(),rW=function(){function r(){fr(this,r)}return vr(r,[{key:"update",value:function(e,t){return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),iW=function(){function r(){fr(this,r)}return vr(r,[{key:"update",value:function(e,t){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s,l=e.width,u=l===void 0?0:l,c=e.height,d=c===void 0?0:c;return{cx:a+u/2,cy:o+d/2,hwidth:u/2,hheight:d/2}}}])}();function XCe(r){return!!r.type}var g2=function(){function r(n){fr(this,r),this.eventPhase=r.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new tc,this.page=new tc,this.canvas=new tc,this.viewport=new tc,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=n}return vr(r,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"composedPath",value:function(){return this.manager&&(!this.path||this.path[0]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}},{key:"propagationPath",get:function(){return this.composedPath()}},{key:"preventDefault",value:function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}},{key:"stopImmediatePropagation",value:function(){this.propagationImmediatelyStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"initEvent",value:function(){}},{key:"initUIEvent",value:function(){}},{key:"clone",value:function(){throw new Error(Lo)}}])}(),bA=function(r){function n(){var e;fr(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ss(this,n,[].concat(i)),e.client=new tc,e.movement=new tc,e.offset=new tc,e.global=new tc,e.screen=new tc,e}return Ts(n,r),vr(n,[{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(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)}},{key:"initMouseEvent",value:function(){throw new Error(Lo)}}])}(g2),N1=function(r){function n(){var e;fr(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ss(this,n,[].concat(i)),e.width=0,e.height=0,e.isPrimary=!1,e}return Ts(n,r),vr(n,[{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)}}])}(bA),_2=function(r){function n(){return fr(this,n),Ss(this,n,arguments)}return Ts(n,r),vr(n,[{key:"clone",value:function(){return this.manager.cloneWheelEvent(this)}}])}(bA),dc=function(r){function n(e,t){var i;return fr(this,n),i=Ss(this,n,[null]),i.type=e,i.detail=t,Object.assign(i,t),i}return Ts(n,r),vr(n)}(g2),kA=new WeakMap,wA=function(){function r(){fr(this,r),this.emitter=new Se.Z}return vr(r,[{key:"on",value:function(e,t,i){return this.addEventListener(e,t,i),this}},{key:"addEventListener",value:function(e,t,i){var a=!1,s=!1;if((0,je.Z)(i))a=i;else if(i){var o=i.capture;a=o===void 0?!1:o;var l=i.once;s=l===void 0?!1:l}a&&(e+="capture"),t=(0,Be.Z)(t)?t:t.handleEvent;var u=(0,Be.Z)(t)?void 0:t;return s?this.emitter.once(e,t,u):this.emitter.on(e,t,u),this}},{key:"off",value:function(e,t,i){return e?this.removeEventListener(e,t,i):this.removeAllEventListeners(),this}},{key:"removeAllEventListeners",value:function(){var e;(e=this.emitter)===null||e===void 0||e.removeAllListeners()}},{key:"removeEventListener",value:function(e,t,i){var a;if(!this.emitter)return this;var s=(0,je.Z)(i)?i:i==null?void 0:i.capture;s&&(e+="capture"),t=(0,Be.Z)(t)?t:(a=t)===null||a===void 0?void 0:a.handleEvent;var o=(0,Be.Z)(t)?void 0:t;return this.emitter.off(e,t,o),this}},{key:"emit",value:function(e,t){this.dispatchEvent(new dc(e,t))}},{key:"dispatchEvent",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=kA.get(this);if(!i){var a;this.document?i=this:this.defaultView?i=this.defaultView:i=(a=this.ownerDocument)===null||a===void 0?void 0:a.defaultView,i&&kA.set(this,i)}if(i){if(e.manager=i.getEventService(),!e.manager)return!1;e.defaultPrevented=!1,e.path?e.path.length=0:e.page=[],t||(e.target=this),e.manager.dispatchEvent(e,e.type,t)}else this.emitter.emit(e.type,e);return!e.defaultPrevented}}])}(),Ho=function(r){function n(){var e;fr(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ss(this,n,[].concat(i)),e.shadow=!1,e.ownerDocument=null,e.isConnected=!1,e.baseURI="",e.childNodes=[],e.nodeType=0,e.nodeName="",e.nodeValue=null,e.parentNode=null,e}return Ts(n,r),vr(n,[{key:"textContent",get:function(){var t="";this.nodeName===yr.TEXT&&(t+=this.style.text);var i=Wm(this.childNodes),a;try{for(i.s();!(a=i.n()).done;){var s=a.value;s.nodeName===yr.TEXT?t+=s.nodeValue:t+=s.textContent}}catch(o){i.e(o)}finally{i.f()}return t},set:function(t){var i=this;this.childNodes.slice().forEach(function(a){i.removeChild(a)}),this.nodeName===yr.TEXT&&(this.style.text="".concat(t))}},{key:"getRootNode",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this}},{key:"hasChildNodes",value:function(){return this.childNodes.length>0}},{key:"isDefaultNamespace",value:function(t){throw new Error(Lo)}},{key:"lookupNamespaceURI",value:function(t){throw new Error(Lo)}},{key:"lookupPrefix",value:function(t){throw new Error(Lo)}},{key:"normalize",value:function(){throw new Error(Lo)}},{key:"isEqualNode",value:function(t){return this===t}},{key:"isSameNode",value:function(t){return this.isEqualNode(t)}},{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(t){if(t===this)return 0;for(var i=t,a=this,s=[i],o=[a];(l=i.parentNode)!==null&&l!==void 0?l:a.parentNode;){var l;i=i.parentNode?(s.push(i.parentNode),i.parentNode):i,a=a.parentNode?(o.push(a.parentNode),a.parentNode):a}if(i!==a)return n.DOCUMENT_POSITION_DISCONNECTED|n.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|n.DOCUMENT_POSITION_PRECEDING;var u=s.length>o.length?s:o,c=u===s?o:s;if(u[u.length-c.length]===c[0])return u===s?n.DOCUMENT_POSITION_CONTAINED_BY|n.DOCUMENT_POSITION_FOLLOWING:n.DOCUMENT_POSITION_CONTAINS|n.DOCUMENT_POSITION_PRECEDING;for(var d=u.length-c.length,h=c.length-1;h>=0;h--){var f=c[h],v=u[d+h];if(v!==f){var g=f.parentNode.childNodes;return g.indexOf(f)<g.indexOf(v)?c===s?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING:u===s?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING}}return n.DOCUMENT_POSITION_FOLLOWING}},{key:"contain",value:function(t){return this.contains(t)}},{key:"contains",value:function(t){for(var i=t;i&&this!==i;)i=i.parentNode;return!!i}},{key:"getAncestor",value:function(t){for(var i=this;t>0&&i;)i=i.parentNode,t--;return i}},{key:"forEach",value:function(t){for(var i=[this];i.length>0;){var a=i.pop(),s=t(a);if(s===!1)break;for(var o=a.childNodes.length-1;o>=0;o--)i.push(a.childNodes[o])}}}],[{key:"isNode",value:function(t){return!!t.childNodes}}])}(wA);Ho.DOCUMENT_POSITION_DISCONNECTED=1,Ho.DOCUMENT_POSITION_PRECEDING=2,Ho.DOCUMENT_POSITION_FOLLOWING=4,Ho.DOCUMENT_POSITION_CONTAINS=8,Ho.DOCUMENT_POSITION_CONTAINED_BY=16,Ho.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;var aW=2048,sW=function(){function r(n,e){var t=this;fr(this,r),this.emitter=new Se.Z,this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=L.create(),this.tmpVec3=E.Ue(),this.onPointerDown=function(i){var a=t.createPointerEvent(i);if(t.dispatchEvent(a,"pointerdown"),a.pointerType==="touch")t.dispatchEvent(a,"touchstart");else if(a.pointerType==="mouse"||a.pointerType==="pen"){var s=a.button===2;t.dispatchEvent(a,s?"rightdown":"mousedown")}var o=t.trackingData(i.pointerId);o.pressTargetsByButton[i.button]=a.composedPath(),t.freeEvent(a)},this.onPointerUp=function(i){var a=d2.now(),s=t.createPointerEvent(i,void 0,void 0,t.context.config.alwaysTriggerPointerEventOnCanvas?t.rootTarget:void 0);if(t.dispatchEvent(s,"pointerup"),s.pointerType==="touch")t.dispatchEvent(s,"touchend");else if(s.pointerType==="mouse"||s.pointerType==="pen"){var o=s.button===2;t.dispatchEvent(s,o?"rightup":"mouseup")}var l=t.trackingData(i.pointerId),u=t.findMountedTarget(l.pressTargetsByButton[i.button]),c=u;if(u&&!s.composedPath().includes(u)){for(var d=u;d&&!s.composedPath().includes(d);){if(s.currentTarget=d,t.notifyTarget(s,"pointerupoutside"),s.pointerType==="touch")t.notifyTarget(s,"touchendoutside");else if(s.pointerType==="mouse"||s.pointerType==="pen"){var h=s.button===2;t.notifyTarget(s,h?"rightupoutside":"mouseupoutside")}Ho.isNode(d)&&(d=d.parentNode)}delete l.pressTargetsByButton[i.button],c=d}if(c){var f,v=t.clonePointerEvent(s,"click");v.target=c,v.path=[],l.clicksByButton[i.button]||(l.clicksByButton[i.button]={clickCount:0,target:v.target,timeStamp:a});var g=t.context.renderingContext.root.ownerDocument.defaultView,m=l.clicksByButton[i.button];m.target===v.target&&a-m.timeStamp<g.dblClickSpeed?++m.clickCount:m.clickCount=1,m.target=v.target,m.timeStamp=a,v.detail=m.clickCount,(f=s.detail)!==null&&f!==void 0&&f.preventClick||(!t.context.config.useNativeClickEvent&&(v.pointerType==="mouse"||v.pointerType==="touch")&&t.dispatchEvent(v,"click"),t.dispatchEvent(v,"pointertap")),t.freeEvent(v)}t.freeEvent(s)},this.onPointerMove=function(i){var a=t.createPointerEvent(i,void 0,void 0,t.context.config.alwaysTriggerPointerEventOnCanvas?t.rootTarget:void 0),s=a.pointerType==="mouse"||a.pointerType==="pen",o=t.trackingData(i.pointerId),l=t.findMountedTarget(o.overTargets);if(o.overTargets&&l!==a.target){var u=i.type==="mousemove"?"mouseout":"pointerout",c=t.createPointerEvent(i,u,l||void 0);if(t.dispatchEvent(c,"pointerout"),s&&t.dispatchEvent(c,"mouseout"),!a.composedPath().includes(l)){var d=t.createPointerEvent(i,"pointerleave",l||void 0);for(d.eventPhase=d.AT_TARGET;d.target&&!a.composedPath().includes(d.target);)d.currentTarget=d.target,t.notifyTarget(d),s&&t.notifyTarget(d,"mouseleave"),Ho.isNode(d.target)&&(d.target=d.target.parentNode);t.freeEvent(d)}t.freeEvent(c)}if(l!==a.target){var h=i.type==="mousemove"?"mouseover":"pointerover",f=t.clonePointerEvent(a,h);t.dispatchEvent(f,"pointerover"),s&&t.dispatchEvent(f,"mouseover");for(var v=l&&Ho.isNode(l)&&l.parentNode;v&&v!==(Ho.isNode(t.rootTarget)&&t.rootTarget.parentNode)&&v!==a.target;)v=v.parentNode;var g=!v||v===(Ho.isNode(t.rootTarget)&&t.rootTarget.parentNode);if(g){var m=t.clonePointerEvent(a,"pointerenter");for(m.eventPhase=m.AT_TARGET;m.target&&m.target!==l&&m.target!==(Ho.isNode(t.rootTarget)&&t.rootTarget.parentNode);)m.currentTarget=m.target,t.notifyTarget(m),s&&t.notifyTarget(m,"mouseenter"),Ho.isNode(m.target)&&(m.target=m.target.parentNode);t.freeEvent(m)}t.freeEvent(f)}t.dispatchEvent(a,"pointermove"),a.pointerType==="touch"&&t.dispatchEvent(a,"touchmove"),s&&(t.dispatchEvent(a,"mousemove"),t.cursor=t.getCursor(a.target)),o.overTargets=a.composedPath(),t.freeEvent(a)},this.onPointerOut=function(i){var a=t.trackingData(i.pointerId);if(a.overTargets){var s=i.pointerType==="mouse"||i.pointerType==="pen",o=t.findMountedTarget(a.overTargets),l=t.createPointerEvent(i,"pointerout",o||void 0);t.dispatchEvent(l),s&&t.dispatchEvent(l,"mouseout");var u=t.createPointerEvent(i,"pointerleave",o||void 0);for(u.eventPhase=u.AT_TARGET;u.target&&u.target!==(Ho.isNode(t.rootTarget)&&t.rootTarget.parentNode);)u.currentTarget=u.target,t.notifyTarget(u),s&&t.notifyTarget(u,"mouseleave"),Ho.isNode(u.target)&&(u.target=u.target.parentNode);a.overTargets=null,t.freeEvent(l),t.freeEvent(u)}t.cursor=null},this.onPointerOver=function(i){var a=t.trackingData(i.pointerId),s=t.createPointerEvent(i),o=s.pointerType==="mouse"||s.pointerType==="pen";t.dispatchEvent(s,"pointerover"),o&&t.dispatchEvent(s,"mouseover"),s.pointerType==="mouse"&&(t.cursor=t.getCursor(s.target));var l=t.clonePointerEvent(s,"pointerenter");for(l.eventPhase=l.AT_TARGET;l.target&&l.target!==(Ho.isNode(t.rootTarget)&&t.rootTarget.parentNode);)l.currentTarget=l.target,t.notifyTarget(l),o&&t.notifyTarget(l,"mouseenter"),Ho.isNode(l.target)&&(l.target=l.target.parentNode);a.overTargets=s.composedPath(),t.freeEvent(s),t.freeEvent(l)},this.onPointerUpOutside=function(i){var a=t.trackingData(i.pointerId),s=t.findMountedTarget(a.pressTargetsByButton[i.button]),o=t.createPointerEvent(i);if(s){for(var l=s;l;)o.currentTarget=l,t.notifyTarget(o,"pointerupoutside"),o.pointerType==="touch"||(o.pointerType==="mouse"||o.pointerType==="pen")&&t.notifyTarget(o,o.button===2?"rightupoutside":"mouseupoutside"),Ho.isNode(l)&&(l=l.parentNode);delete a.pressTargetsByButton[i.button]}t.freeEvent(o)},this.onWheel=function(i){var a=t.createWheelEvent(i);t.dispatchEvent(a),t.freeEvent(a)},this.onClick=function(i){if(t.context.config.useNativeClickEvent){var a=t.createPointerEvent(i);t.dispatchEvent(a),t.freeEvent(a)}},this.onPointerCancel=function(i){var a=t.createPointerEvent(i,void 0,void 0,t.context.config.alwaysTriggerPointerEventOnCanvas?t.rootTarget:void 0);t.dispatchEvent(a),t.freeEvent(a)},this.globalRuntime=n,this.context=e}return vr(r,[{key:"init",value:function(){this.rootTarget=this.context.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointercancel",this.onPointerCancel),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel),this.addEventMapping("click",this.onClick)}},{key:"destroy",value:function(){this.emitter.removeAllListeners(),this.mappingTable={},this.mappingState={},this.eventPool.clear()}},{key:"getScale",value:function(){var e=this.context.contextService.getBoundingClientRect(),t=1,i=1,a=this.context.contextService.getDomElement();if(a&&e){var s=a.offsetWidth,o=a.offsetHeight;s&&o&&(t=e.width/s,i=e.height/o)}return{scaleX:t,scaleY:i,bbox:e}}},{key:"client2Viewport",value:function(e){var t=this.getScale(),i=t.scaleX,a=t.scaleY,s=t.bbox;return new tc((e.x-((s==null?void 0:s.left)||0))/i,(e.y-((s==null?void 0:s.top)||0))/a)}},{key:"viewport2Client",value:function(e){var t=this.getScale(),i=t.scaleX,a=t.scaleY,s=t.bbox;return new tc((e.x+((s==null?void 0:s.left)||0))*i,(e.y+((s==null?void 0:s.top)||0))*a)}},{key:"viewport2Canvas",value:function(e){var t=e.x,i=e.y,a=this.rootTarget.defaultView,s=a.getCamera(),o=this.context.config,l=o.width,u=o.height,c=s.getPerspectiveInverse(),d=s.getWorldTransform(),h=L.multiply(this.tmpMatrix,d,c),f=E.t8(this.tmpVec3,t/l*2-1,(1-i/u)*2-1,0);return E.fF(f,f,h),new tc(f[0],f[1])}},{key:"canvas2Viewport",value:function(e){var t=this.rootTarget.defaultView,i=t.getCamera(),a=i.getPerspective(),s=i.getViewTransform(),o=L.multiply(this.tmpMatrix,a,s),l=E.t8(this.tmpVec3,e.x,e.y,0);E.fF(this.tmpVec3,this.tmpVec3,o);var u=this.context.config,c=u.width,d=u.height;return new tc((l[0]+1)/2*c,(1-(l[1]+1)/2)*d)}},{key:"setPickHandler",value:function(e){this.pickHandler=e}},{key:"addEventMapping",value:function(e,t){this.mappingTable[e]||(this.mappingTable[e]=[]),this.mappingTable[e].push({fn:t,priority:0}),this.mappingTable[e].sort(function(i,a){return i.priority-a.priority})}},{key:"mapEvent",value:function(e){if(this.rootTarget){var t=this.mappingTable[e.type];if(t)for(var i=0,a=t.length;i<a;i++)t[i].fn(e);else console.warn("[EventService]: Event mapping not defined for ".concat(e.type))}}},{key:"dispatchEvent",value:function(e,t,i){if(!i)e.propagationStopped=!1,e.propagationImmediatelyStopped=!1,this.propagate(e,t);else{e.eventPhase=e.AT_TARGET;var a=this.rootTarget.defaultView||null;e.currentTarget=a,this.notifyListeners(e,t)}this.emitter.emit(t||e.type,e)}},{key:"propagate",value:function(e,t){if(e.target){var i=e.composedPath();e.eventPhase=e.CAPTURING_PHASE;for(var a=i.length-1;a>=1;a--)if(e.currentTarget=i[a],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return;if(e.eventPhase=e.AT_TARGET,e.currentTarget=e.target,this.notifyTarget(e,t),!(e.propagationStopped||e.propagationImmediatelyStopped)){var s=i.indexOf(e.currentTarget);e.eventPhase=e.BUBBLING_PHASE;for(var o=s+1;o<i.length;o++)if(e.currentTarget=i[o],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return}}}},{key:"propagationPath",value:function(e){var t=[e],i=this.rootTarget.defaultView||null;if(i&&i===e)return t.unshift(i.document),t;for(var a=0;a<aW&&e!==this.rootTarget;a++)Ho.isNode(e)&&e.parentNode&&(t.push(e.parentNode),e=e.parentNode);return i&&t.push(i),t}},{key:"hitTest",value:function(e){var t=e.viewportX,i=e.viewportY,a=this.context.config,s=a.width,o=a.height,l=a.disableHitTesting;return t<0||i<0||t>s||i>o?null:!l&&this.pickHandler(e)||this.rootTarget||null}},{key:"isNativeEventFromCanvas",value:function(e,t){var i,a=t==null?void 0:t.target;if((i=a)!==null&&i!==void 0&&i.shadowRoot&&(a=t.composedPath()[0]),a){if(a===e)return!0;if(e&&e.contains)return e.contains(a)}return t!=null&&t.composedPath?t.composedPath().indexOf(e)>-1:!1}},{key:"getExistedHTML",value:function(e){if(e.nativeEvent.composedPath)for(var t=0,i=e.nativeEvent.composedPath();t<i.length;t++){var a=i[t],s=this.nativeHTMLMap.get(a);if(s)return s}return null}},{key:"pickTarget",value:function(e){return this.hitTest({clientX:e.clientX,clientY:e.clientY,viewportX:e.viewportX,viewportY:e.viewportY,x:e.canvasX,y:e.canvasY})}},{key:"createPointerEvent",value:function(e,t,i,a){var s=this.allocateEvent(N1);this.copyPointerData(e,s),this.copyMouseData(e,s),this.copyData(e,s),s.nativeEvent=e.nativeEvent,s.originalEvent=e;var o=this.getExistedHTML(s),l=this.context.contextService.getDomElement();return s.target=i!=null?i:o||this.isNativeEventFromCanvas(l,s.nativeEvent)&&this.pickTarget(s)||a,typeof t=="string"&&(s.type=t),s}},{key:"createWheelEvent",value:function(e){var t=this.allocateEvent(_2);this.copyWheelData(e,t),this.copyMouseData(e,t),this.copyData(e,t),t.nativeEvent=e.nativeEvent,t.originalEvent=e;var i=this.getExistedHTML(t),a=this.context.contextService.getDomElement();return t.target=i||this.isNativeEventFromCanvas(a,t.nativeEvent)&&this.pickTarget(t),t}},{key:"trackingData",value:function(e){return this.mappingState.trackingData[e]||(this.mappingState.trackingData[e]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[e]}},{key:"cloneWheelEvent",value:function(e){var t=this.allocateEvent(_2);return t.nativeEvent=e.nativeEvent,t.originalEvent=e.originalEvent,this.copyWheelData(e,t),this.copyMouseData(e,t),this.copyData(e,t),t.target=e.target,t.path=e.composedPath().slice(),t.type=e.type,t}},{key:"clonePointerEvent",value:function(e,t){var i=this.allocateEvent(N1);return i.nativeEvent=e.nativeEvent,i.originalEvent=e.originalEvent,this.copyPointerData(e,i),this.copyMouseData(e,i),this.copyData(e,i),i.target=e.target,i.path=e.composedPath().slice(),i.type=t!=null?t:i.type,i}},{key:"copyPointerData",value:function(e,t){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}},{key:"copyMouseData",value:function(e,t){t.altKey=e.altKey,t.button=e.button,t.buttons=e.buttons,t.ctrlKey=e.ctrlKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.client.copyFrom(e.client),t.movement.copyFrom(e.movement),t.canvas.copyFrom(e.canvas),t.screen.copyFrom(e.screen),t.global.copyFrom(e.global),t.offset.copyFrom(e.offset)}},{key:"copyWheelData",value:function(e,t){t.deltaMode=e.deltaMode,t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ}},{key:"copyData",value:function(e,t){t.isTrusted=e.isTrusted,t.timeStamp=d2.now(),t.type=e.type,t.detail=e.detail,t.view=e.view,t.page.copyFrom(e.page),t.viewport.copyFrom(e.viewport)}},{key:"allocateEvent",value:function(e){this.eventPool.has(e)||this.eventPool.set(e,[]);var t=this.eventPool.get(e).pop()||new e(this);return t.eventPhase=t.NONE,t.currentTarget=null,t.path=[],t.target=null,t}},{key:"freeEvent",value:function(e){if(e.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var t=e.constructor;this.eventPool.has(t)||this.eventPool.set(t,[]),this.eventPool.get(t).push(e)}},{key:"notifyTarget",value:function(e,t){var i;t=(i=t)!==null&&i!==void 0?i:e.type;var a=e.eventPhase===e.CAPTURING_PHASE||e.eventPhase===e.AT_TARGET?"".concat(t,"capture"):t;this.notifyListeners(e,a),e.eventPhase===e.AT_TARGET&&this.notifyListeners(e,t)}},{key:"notifyListeners",value:function(e,t){var i=e.currentTarget.emitter,a=i._events[t];if(a)if("fn"in a)a.once&&i.removeListener(t,a.fn,void 0,!0),a.fn.call(e.currentTarget||a.context,e);else for(var s=0;s<a.length&&!e.propagationImmediatelyStopped;s++)a[s].once&&i.removeListener(t,a[s].fn,void 0,!0),a[s].fn.call(e.currentTarget||a[s].context,e)}},{key:"findMountedTarget",value:function(e){if(!e)return null;for(var t=e[e.length-1],i=e.length-2;i>=0;i--){var a=e[i];if(a===this.rootTarget||Ho.isNode(a)&&a.parentNode===t)t=e[i];else break}return t}},{key:"getCursor",value:function(e){for(var t=e;t;){var i=EH(t)&&t.getAttribute("cursor");if(i)return i;t=Ho.isNode(t)&&t.parentNode}}}])}(),oW=function(){function r(){fr(this,r)}return vr(r,[{key:"getOrCreateCanvas",value:function(e,t){if(this.canvas)return this.canvas;if(e||kn.offscreenCanvas)this.canvas=e||kn.offscreenCanvas,this.context=this.canvas.getContext("2d",xo({willReadFrequently:!0},t));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",xo({willReadFrequently:!0},t)),(!this.context||!this.context.measureText)&&(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(i){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",xo({willReadFrequently:!0},t))}return this.canvas.width=10,this.canvas.height=10,this.canvas}},{key:"getOrCreateContext",value:function(e,t){return this.context?this.context:(this.getOrCreateCanvas(e,t),this.context)}}],[{key:"createCanvas",value:function(){try{return new window.OffscreenCanvas(0,0)}catch(e){}try{return document.createElement("canvas")}catch(e){}return null}}])}(),O1=function(r){return r[r.CAMERA_CHANGED=0]="CAMERA_CHANGED",r[r.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",r[r.NONE=2]="NONE",r}({}),lW=function(){function r(n,e){fr(this,r),this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.hooks={init:new cc,initAsync:new FH,dirtycheck:new f2,cull:new f2,beginFrame:new cc,beforeRender:new cc,render:new cc,afterRender:new cc,endFrame:new cc,destroy:new cc,pick:new BH,pickSync:new f2,pointerDown:new cc,pointerUp:new cc,pointerMove:new cc,pointerOut:new cc,pointerOver:new cc,pointerWheel:new cc,pointerCancel:new cc,click:new cc},this.globalRuntime=n,this.context=e}return vr(r,[{key:"init",value:function(e){var t=this,i=xo(xo({},this.globalRuntime),this.context);this.context.renderingPlugins.forEach(function(a){a.apply(i,t.globalRuntime)}),this.hooks.init.call(),this.hooks.initAsync.getCallbacksNum()===0?(this.inited=!0,e()):this.hooks.initAsync.promise().then(function(){t.inited=!0,e()}).catch(function(a){})}},{key:"getStats",value:function(){return this.stats}},{key:"disableDirtyRectangleRendering",value:function(){var e=this.context.config.renderer,t=e.getConfig(),i=t.enableDirtyRectangleRendering;return!i||this.context.renderingContext.renderReasons.has(O1.CAMERA_CHANGED)}},{key:"render",value:function(e,t,i){var a=this;this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0;var s=this.context.renderingContext;if(this.globalRuntime.sceneGraphService.syncHierarchy(s.root),this.globalRuntime.sceneGraphService.triggerPendingEvents(),s.renderReasons.size&&this.inited){s.dirtyRectangleRenderingDisabled=this.disableDirtyRectangleRendering();var o=s.renderReasons.size===1&&s.renderReasons.has(O1.CAMERA_CHANGED),l=!e.disableRenderHooks||!(e.disableRenderHooks&&o);l&&this.renderDisplayObject(s.root,e,s),this.hooks.beginFrame.call(t),l&&s.renderListCurrentFrame.forEach(function(u){a.hooks.beforeRender.call(u),a.hooks.render.call(u),a.hooks.afterRender.call(u)}),this.hooks.endFrame.call(t),s.renderListCurrentFrame=[],s.renderReasons.clear(),i()}}},{key:"renderDisplayObject",value:function(e,t,i){var a=this,s=t.renderer.getConfig(),o=s.enableDirtyCheck,l=s.enableCulling;function u(v){var g=v.renderable,m=v.sortable,y=o?g.dirty||i.dirtyRectangleRenderingDisabled?v:null:v;if(y){var w=l?a.hooks.cull.call(y,a.context.camera):y;w&&(a.stats.rendered+=1,i.renderListCurrentFrame.push(w))}g.dirty=!1,m.renderOrder=a.zIndexCounter,a.zIndexCounter+=1,a.stats.total+=1,m.dirty&&(a.sort(v,m),m.dirty=!1,m.dirtyChildren=[],m.dirtyReason=void 0)}for(var c=[e];c.length>0;){var d=c.pop();u(d);for(var h=d.sortable.sorted||d.childNodes,f=h.length-1;f>=0;f--)c.push(h[f])}}},{key:"sort",value:function(e,t){t.sorted&&t.dirtyReason!==b1.Z_INDEX_CHANGED?t.dirtyChildren.forEach(function(i){var a=e.childNodes.indexOf(i);if(a===-1){var s=t.sorted.indexOf(i);s>=0&&t.sorted.splice(s,1)}else if(t.sorted.length===0)t.sorted.push(i);else{var o=bH(t.sorted,i);t.sorted.splice(o,0,i)}}):t.sorted=e.childNodes.slice().sort(vA)}},{key:"destroy",value:function(){this.inited=!1,this.hooks.destroy.call(),this.globalRuntime.sceneGraphService.clearPendingEvents()}},{key:"dirtify",value:function(){this.context.renderingContext.renderReasons.add(O1.DISPLAY_OBJECT_CHANGED)}}])}(),uW=/\[\s*(.*)=(.*)\s*\]/,cW=function(){function r(){fr(this,r)}return vr(r,[{key:"selectOne",value:function(e,t){var i=this;if(e.startsWith("."))return t.find(function(l){return((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(e))>-1});if(e.startsWith("#"))return t.find(function(l){return l.id===i.getIdOrClassname(e)});if(e.startsWith("[")){var a=this.getAttribute(e),s=a.name,o=a.value;return s?t.find(function(l){return t!==l&&(s==="name"?l.name===o:i.attributeToString(l,s)===o)}):null}return t.find(function(l){return t!==l&&l.nodeName===e})}},{key:"selectAll",value:function(e,t){var i=this;if(e.startsWith("."))return t.findAll(function(l){return t!==l&&((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(e))>-1});if(e.startsWith("#"))return t.findAll(function(l){return t!==l&&l.id===i.getIdOrClassname(e)});if(e.startsWith("[")){var a=this.getAttribute(e),s=a.name,o=a.value;return s?t.findAll(function(l){return t!==l&&(s==="name"?l.name===o:i.attributeToString(l,s)===o)}):[]}return t.findAll(function(l){return t!==l&&l.nodeName===e})}},{key:"is",value:function(e,t){if(e.startsWith("."))return t.className===this.getIdOrClassname(e);if(e.startsWith("#"))return t.id===this.getIdOrClassname(e);if(e.startsWith("[")){var i=this.getAttribute(e),a=i.name,s=i.value;return a==="name"?t.name===s:this.attributeToString(t,a)===s}return t.nodeName===e}},{key:"getIdOrClassname",value:function(e){return e.substring(1)}},{key:"getAttribute",value:function(e){var t=e.match(uW),i="",a="";return t&&t.length>2&&(i=t[1].replace(/"/g,""),a=t[2].replace(/"/g,"")),{name:i,value:a}}},{key:"attributeToString",value:function(e,t){if(!e.getAttribute)return"";var i=e.getAttribute(t);return(0,xe.Z)(i)?"":i.toString?i.toString():""}}])}(),Hl=function(r){return r.REPARENT="reparent",r.DESTROY="destroy",r.ATTR_MODIFIED="DOMAttrModified",r.INSERTED="DOMNodeInserted",r.REMOVED="removed",r.MOUNTED="DOMNodeInsertedIntoDocument",r.UNMOUNTED="DOMNodeRemovedFromDocument",r.BOUNDS_CHANGED="bounds-changed",r.CULLED="culled",r}({}),$f=function(r){function n(e,t,i,a,s,o,l,u){var c;return fr(this,n),c=Ss(this,n,[null]),c.relatedNode=t,c.prevValue=i,c.newValue=a,c.attrName=s,c.attrChange=o,c.prevParsedValue=l,c.newParsedValue=u,c.type=e,c}return Ts(n,r),vr(n)}(g2);$f.ADDITION=2,$f.MODIFICATION=1,$f.REMOVAL=3;function SA(r){var n=r.renderable;n&&(n.renderBoundsDirty=!0,n.boundsDirty=!0)}var dW=new $f(Hl.REPARENT,null,"","","",0,"",""),hW=ot.Ue(),R1=E.Ue(),fW=E.al(1,1,1),vW=L.create(),gW=ot.Ue(),fg=E.Ue(),qm=L.create(),vg=X.Ue(),_W=E.Ue(),mW=X.Ue(),pW=E.Ue(),j0=E.Ue(),m_=E.Ue(),A1=L.create(),TA=X.Ue(),CA=X.Ue(),L1=X.Ue(),m2={affectChildren:!0},yW=function(){function r(n){fr(this,r),this.pendingEvents=new Map,this.boundsChangedEvent=new dc(Hl.BOUNDS_CHANGED),this.displayObjectDependencyMap=new WeakMap,this.runtime=n}return vr(r,[{key:"matches",value:function(e,t){return this.runtime.sceneGraphSelector.is(e,t)}},{key:"querySelector",value:function(e,t){return this.runtime.sceneGraphSelector.selectOne(e,t)}},{key:"querySelectorAll",value:function(e,t){return this.runtime.sceneGraphSelector.selectAll(e,t)}},{key:"attach",value:function(e,t,i){var a,s=!1;e.parentNode&&(s=e.parentNode!==t,this.detach(e));var o=e.nodeName===yr.FRAGMENT,l=P1(t);e.parentNode=t;var u=o?e.childNodes:[e];(0,pe.Z)(i)?u.forEach(function(f){t.childNodes.splice(i,0,f),f.parentNode=t}):u.forEach(function(f){t.childNodes.push(f),f.parentNode=t});var c=t,d=c.sortable;if((d!=null&&(a=d.sorted)!==null&&a!==void 0&&a.length||e.parsedStyle.zIndex)&&(d.dirtyChildren.indexOf(e)===-1&&d.dirtyChildren.push(e),d.dirty=!0,d.dirtyReason=b1.ADDED),!l){if(o)this.dirtifyFragment(e);else{var h=e.transformable;h&&this.dirtifyWorld(e,h)}s&&e.dispatchEvent(dW)}}},{key:"detach",value:function(e){if(e.parentNode){var t,i,a=e.transformable,s=e.parentNode,o=s.sortable;(o!=null&&(t=o.sorted)!==null&&t!==void 0&&t.length||(i=e.style)!==null&&i!==void 0&&i.zIndex)&&(o.dirtyChildren.indexOf(e)===-1&&o.dirtyChildren.push(e),o.dirty=!0,o.dirtyReason=b1.REMOVED);var l=e.parentNode.childNodes.indexOf(e);l>-1&&e.parentNode.childNodes.splice(l,1),a&&this.dirtifyWorld(e,a),e.parentNode=null}}},{key:"getOrigin",value:function(e){return e.getGeometryBounds(),e.transformable.origin}},{key:"setOrigin",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=[t,i,a]);var s=e.transformable;if(!(t[0]===s.origin[0]&&t[1]===s.origin[1]&&t[2]===s.origin[2])){var o=s.origin;o[0]=t[0],o[1]=t[1],o[2]=t[2]||0,this.dirtifyLocal(e,s)}}},{key:"rotate",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;if(e.parentNode===null||!e.parentNode.transformable)this.rotateLocal(e,t);else{var o=vg;X.Su(o,t[0],t[1],t[2]);var l=this.getRotation(e),u=this.getRotation(e.parentNode);X.JG(L1,u),X.U_(L1,L1),X.Jp(o,L1,o),X.Jp(s.localRotation,o,l),X.Fv(s.localRotation,s.localRotation),this.dirtifyLocal(e,s)}}},{key:"rotateLocal",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;X.Su(CA,t[0],t[1],t[2]),X.dC(s.localRotation,s.localRotation,CA),this.dirtifyLocal(e,s)}},{key:"setEulerAngles",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;if(e.parentNode===null||!e.parentNode.transformable)this.setLocalEulerAngles(e,t);else{X.Su(s.localRotation,t[0],t[1],t[2]);var o=this.getRotation(e.parentNode);X.JG(TA,X.U_(vg,o)),X.dC(s.localRotation,s.localRotation,TA),this.dirtifyLocal(e,s)}}},{key:"setLocalEulerAngles",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;typeof t=="number"&&(t=E.al(t,i,a));var o=e.transformable;X.Su(o.localRotation,t[0],t[1],t[2]),s&&this.dirtifyLocal(e,o)}},{key:"translateLocal",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;E.fS(t,R1)||(E.VC(t,t,s.localRotation),E.IH(s.localPosition,s.localPosition,t),this.dirtifyLocal(e,s))}},{key:"setPosition",value:function(e,t){var i,a=e.transformable;if(m_[0]=t[0],m_[1]=t[1],m_[2]=(i=t[2])!==null&&i!==void 0?i:0,!E.fS(this.getPosition(e),m_)){if(E.JG(a.position,m_),e.parentNode===null||!e.parentNode.transformable)E.JG(a.localPosition,m_);else{var s=e.parentNode.transformable;L.copy(A1,s.worldTransform),L.invert(A1,A1),E.fF(a.localPosition,m_,A1)}this.dirtifyLocal(e,a)}}},{key:"setLocalPosition",value:function(e,t){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=e.transformable;j0[0]=t[0],j0[1]=t[1],j0[2]=(i=t[2])!==null&&i!==void 0?i:0,!E.fS(s.localPosition,j0)&&(E.JG(s.localPosition,j0),a&&this.dirtifyLocal(e,s))}},{key:"scaleLocal",value:function(e,t){var i,a=e.transformable;E.Jp(a.localScale,a.localScale,E.t8(fg,t[0],t[1],(i=t[2])!==null&&i!==void 0?i:1)),this.dirtifyLocal(e,a)}},{key:"setLocalScale",value:function(e,t){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=e.transformable;E.t8(fg,t[0],t[1],(i=t[2])!==null&&i!==void 0?i:s.localScale[2]),!E.fS(fg,s.localScale)&&(E.JG(s.localScale,fg),a&&this.dirtifyLocal(e,s))}},{key:"translate",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.t8(fg,t,i,a)),!E.fS(t,R1)&&(E.IH(fg,this.getPosition(e),t),this.setPosition(e,fg))}},{key:"setRotation",value:function(e,t,i,a,s){var o=e.transformable;if(typeof t=="number"&&(t=X.al(t,i,a,s)),e.parentNode===null||!e.parentNode.transformable)this.setLocalRotation(e,t);else{var l=this.getRotation(e.parentNode);X.JG(vg,l),X.U_(vg,vg),X.Jp(o.localRotation,vg,t),X.Fv(o.localRotation,o.localRotation),this.dirtifyLocal(e,o)}}},{key:"setLocalRotation",value:function(e,t,i,a,s){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;typeof t=="number"&&(t=X.t8(vg,t,i,a,s));var l=e.transformable;X.JG(l.localRotation,t),o&&this.dirtifyLocal(e,l)}},{key:"setLocalSkew",value:function(e,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;typeof t=="number"&&(t=ot.t8(gW,t,i));var s=e.transformable;ot.JG(s.localSkew,t),a&&this.dirtifyLocal(e,s)}},{key:"dirtifyLocal",value:function(e,t){P1(e)||t.localDirtyFlag||(t.localDirtyFlag=!0,t.dirtyFlag||this.dirtifyWorld(e,t))}},{key:"dirtifyWorld",value:function(e,t){t.dirtyFlag||this.unfreezeParentToRoot(e),this.dirtifyWorldInternal(e,t),this.dirtifyToRoot(e,!0)}},{key:"dirtifyFragment",value:function(e){var t=e.transformable;t&&(t.frozen=!1,t.dirtyFlag=!0,t.localDirtyFlag=!0);var i=e.renderable;i&&(i.renderBoundsDirty=!0,i.boundsDirty=!0,i.dirty=!0);for(var a=e.childNodes.length,s=0;s<a;s++)this.dirtifyFragment(e.childNodes[s]);e.nodeName===yr.FRAGMENT&&this.pendingEvents.set(e,!1)}},{key:"triggerPendingEvents",value:function(){var e=this,t=new Set,i=function(s,o){!s.isConnected||t.has(s)||s.nodeName===yr.FRAGMENT||(e.boundsChangedEvent.detail=o,e.boundsChangedEvent.target=s,s.isMutationObserved?s.dispatchEvent(e.boundsChangedEvent):s.ownerDocument.defaultView.dispatchEvent(e.boundsChangedEvent,!0),t.add(s))};this.pendingEvents.forEach(function(a,s){s.nodeName!==yr.FRAGMENT&&(m2.affectChildren=a,a?s.forEach(function(o){i(o,m2)}):i(s,m2))}),t.clear(),this.clearPendingEvents()}},{key:"clearPendingEvents",value:function(){this.pendingEvents.clear()}},{key:"dirtifyToRoot",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=e;for(i.renderable&&(i.renderable.dirty=!0);i;)SA(i),i=i.parentNode;t&&e.forEach(function(a){SA(a)}),this.informDependentDisplayObjects(e),this.pendingEvents.set(e,t)}},{key:"updateDisplayObjectDependency",value:function(e,t,i,a){if(t&&t!==i){var s=this.displayObjectDependencyMap.get(t);if(s&&s[e]){var o=s[e].indexOf(a);s[e].splice(o,1)}}if(i){var l=this.displayObjectDependencyMap.get(i);l||(this.displayObjectDependencyMap.set(i,{}),l=this.displayObjectDependencyMap.get(i)),l[e]||(l[e]=[]),l[e].push(a)}}},{key:"informDependentDisplayObjects",value:function(e){var t=this,i=this.displayObjectDependencyMap.get(e);i&&Object.keys(i).forEach(function(a){i[a].forEach(function(s){t.dirtifyToRoot(s,!0),s.dispatchEvent(new $f(Hl.ATTR_MODIFIED,s,t,t,a,$f.MODIFICATION,t,t)),s.isCustomElement&&s.isConnected&&s.attributeChangedCallback&&s.attributeChangedCallback(a,t,t)})})}},{key:"getPosition",value:function(e){var t=e.transformable;return L.getTranslation(t.position,this.getWorldTransform(e,t))}},{key:"getRotation",value:function(e){var t=e.transformable;return L.getRotation(t.rotation,this.getWorldTransform(e,t))}},{key:"getScale",value:function(e){var t=e.transformable;return L.getScaling(t.scaling,this.getWorldTransform(e,t))}},{key:"getWorldTransform",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.transformable;return!t.localDirtyFlag&&!t.dirtyFlag||(e.parentNode&&e.parentNode.transformable&&this.getWorldTransform(e.parentNode),this.sync(e,t)),t.worldTransform}},{key:"getLocalPosition",value:function(e){return e.transformable.localPosition}},{key:"getLocalRotation",value:function(e){return e.transformable.localRotation}},{key:"getLocalScale",value:function(e){return e.transformable.localScale}},{key:"getLocalSkew",value:function(e){return e.transformable.localSkew}},{key:"calcLocalTransform",value:function(e){var t=e.localSkew[0]!==0||e.localSkew[1]!==0;if(t){L.fromRotationTranslationScaleOrigin(e.localTransform,e.localRotation,e.localPosition,E.al(1,1,1),e.origin),(e.localSkew[0]!==0||e.localSkew[1]!==0)&&(L.identity(qm),qm[4]=Math.tan(e.localSkew[0]),qm[1]=Math.tan(e.localSkew[1]),L.multiply(e.localTransform,e.localTransform,qm));var i=L.fromRotationTranslationScaleOrigin(qm,X.t8(vg,0,0,0,1),E.t8(fg,1,1,1),e.localScale,e.origin);L.multiply(e.localTransform,e.localTransform,i)}else{var a=e.localTransform,s=e.localPosition,o=e.localRotation,l=e.localScale,u=e.origin,c=s[0]!==0||s[1]!==0||s[2]!==0,d=o[3]!==1||o[0]!==0||o[1]!==0||o[2]!==0,h=l[0]!==1||l[1]!==1||l[2]!==1,f=u[0]!==0||u[1]!==0||u[2]!==0;!d&&!h&&!f?c?L.fromTranslation(a,s):L.identity(a):L.fromRotationTranslationScaleOrigin(a,o,s,l,u)}}},{key:"getLocalTransform",value:function(e){var t=e.transformable;return t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.localTransform}},{key:"setLocalTransform",value:function(e,t){var i=L.getTranslation(_W,t),a=L.getRotation(mW,t),s=L.getScaling(pW,t);this.setLocalScale(e,s,!1),this.setLocalPosition(e,i,!1),this.setLocalRotation(e,a,void 0,void 0,void 0,!1),this.dirtifyLocal(e,e.transformable)}},{key:"resetLocalTransform",value:function(e){this.setLocalScale(e,fW,!1),this.setLocalPosition(e,R1,!1),this.setLocalEulerAngles(e,R1,void 0,void 0,!1),this.setLocalSkew(e,hW,void 0,!1),this.dirtifyLocal(e,e.transformable)}},{key:"getTransformedGeometryBounds",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2?arguments[2]:void 0,a=this.getGeometryBounds(e,t);if(!hl.isEmpty(a)){var s=i||new hl;return s.setFromTransformedAABB(a,this.getWorldTransform(e)),s}return null}},{key:"getGeometryBounds",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=e,a=i.geometry;a.dirty&&kn.styleValueRegistry.updateGeometry(e);var s=t?a.renderBounds:a.contentBounds||null;return s||new hl}},{key:"getBounds",value:function(e){var t=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=e,s=a.renderable;if(!s.boundsDirty&&!i&&s.bounds)return s.bounds;if(!s.renderBoundsDirty&&i&&s.renderBounds)return s.renderBounds;var o=i?s.renderBounds:s.bounds,l=this.getTransformedGeometryBounds(e,i,o),u=e.childNodes;if(u.forEach(function(h){var f=t.getBounds(h,i);f&&(l?l.add(f):(l=o||new hl,l.update(f.center,f.halfExtents)))}),l||(l=new hl),i){var c=kH(e);if(c){var d=c.parsedStyle.clipPath.getBounds(i);l?d&&(l=d.intersection(l)):l.update(d.center,d.halfExtents)}}return i?(s.renderBounds=l,s.renderBoundsDirty=!1):(s.bounds=l,s.boundsDirty=!1),l}},{key:"getLocalBounds",value:function(e){if(e.parentNode){var t=vW;e.parentNode.transformable&&(t=L.invert(qm,this.getWorldTransform(e.parentNode)));var i=this.getBounds(e);if(!hl.isEmpty(i)){var a=new hl;return a.setFromTransformedAABB(i,t),a}}return this.getBounds(e)}},{key:"getBoundingClientRect",value:function(e){var t,i,a=this.getGeometryBounds(e);hl.isEmpty(a)||(i=new hl,i.setFromTransformedAABB(a,this.getWorldTransform(e)));var s=(t=e.ownerDocument)===null||t===void 0||(t=t.defaultView)===null||t===void 0?void 0:t.getContextService().getBoundingClientRect();if(i){var o=i.getMin(),l=Uo(o,2),u=l[0],c=l[1],d=i.getMax(),h=Uo(d,2),f=h[0],v=h[1];return new Xm(u+((s==null?void 0:s.left)||0),c+((s==null?void 0:s.top)||0),f-u,v-c)}return new Xm((s==null?void 0:s.left)||0,(s==null?void 0:s.top)||0,0,0)}},{key:"dirtifyWorldInternal",value:function(e,t){var i=this;if(!t.dirtyFlag){t.dirtyFlag=!0,t.frozen=!1,e.childNodes.forEach(function(o){var l=o.transformable;l.dirtyFlag||i.dirtifyWorldInternal(o,l)});var a=e,s=a.renderable;s&&(s.renderBoundsDirty=!0,s.boundsDirty=!0,s.dirty=!0)}}},{key:"syncHierarchy",value:function(e){var t=e.transformable;if(!t.frozen){t.frozen=!0,(t.localDirtyFlag||t.dirtyFlag)&&this.sync(e,t);for(var i=e.childNodes,a=0;a<i.length;a++)this.syncHierarchy(i[a])}}},{key:"sync",value:function(e,t){if(t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.dirtyFlag){var i=e.parentNode,a=i&&i.transformable;i===null||!a?L.copy(t.worldTransform,t.localTransform):L.multiply(t.worldTransform,a.worldTransform,t.localTransform),t.dirtyFlag=!1}}},{key:"unfreezeParentToRoot",value:function(e){for(var t=e.parentNode;t;){var i=t.transformable;i&&(i.frozen=!1),t=t.parentNode}}}])}(),p_={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]},MA=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,xW=/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/,EW=/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/,bW=/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/,kW=/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/,wW=/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/,SW=/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/,TW=/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/,CW=/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/,MW=new RegExp("".concat(xW.source,"|").concat(bW.source,"|").concat(wW.source,"|").concat(TW.source)),PW=new RegExp("".concat(EW.source,"|").concat(kW.source,"|").concat(SW.source,"|").concat(CW.source)),NW=function(){function r(n){var e=this;fr(this,r),this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,i){return e.isBreakingSpace(i)?!1:!!(t&&(PW.exec(i)||MW.exec(t)))},this.trimByKinsokuShorui=function(t){var i=Hd(t),a=i[i.length-2];if(!a)return t;var s=a[a.length-1];return i[i.length-2]=a.slice(0,-1),i[i.length-1]=s+i[i.length-1],i},this.runtime=n}return vr(r,[{key:"measureFont",value:function(e,t){if(this.fontMetricsCache[e])return this.fontMetricsCache[e];var i={ascent:0,descent:0,fontSize:0},a=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(t),s=this.runtime.offscreenCanvasCreator.getOrCreateContext(t,{willReadFrequently:!0});s.font=e;var o=p_.MetricsString+p_.BaselineSymbol,l=Math.ceil(s.measureText(o).width),u=Math.ceil(s.measureText(p_.BaselineSymbol).width),c=p_.HeightMultiplier*u;u=u*p_.BaselineMultiplier|0,a.width=l,a.height=c,s.fillStyle="#f00",s.fillRect(0,0,l,c),s.font=e,s.textBaseline="alphabetic",s.fillStyle="#000",s.fillText(o,0,u);var d=s.getImageData(0,0,l||1,c||1).data,h=d.length,f=l*4,v=0,g=0,m=!1;for(v=0;v<u;++v){for(var y=0;y<f;y+=4)if(d[g+y]!==255){m=!0;break}if(!m)g+=f;else break}for(i.ascent=u-v,g=h-f,m=!1,v=c;v>u;--v){for(var w=0;w<f;w+=4)if(d[g+w]!==255){m=!0;break}if(!m)g-=f;else break}return i.descent=v-u,i.fontSize=i.ascent+i.descent,this.fontMetricsCache[e]=i,i}},{key:"measureText",value:function(e,t,i){var a=t.fontSize,s=a===void 0?16:a,o=t.wordWrap,l=o===void 0?!1:o,u=t.lineHeight,c=t.lineWidth,d=c===void 0?1:c,h=t.textBaseline,f=h===void 0?"alphabetic":h,v=t.textAlign,g=v===void 0?"start":v,m=t.letterSpacing,y=m===void 0?0:m,w=t.textPath;t.textPathSide,t.textPathStartOffset;var T=t.leading,G=T===void 0?0:T,x=zH(t),_=this.measureFont(x,i);_.fontSize===0&&(_.fontSize=s,_.ascent=s);var p=this.runtime.offscreenCanvasCreator.getOrCreateContext(i);p.font=x,t.isOverflowing=!1;var b=l?this.wordWrap(e,t,i):e,R=b.split(/(?:\r\n|\r|\n)/),B=new Array(R.length),j=0;if(w){w.getTotalLength();for(var Z=0;Z<R.length;Z++)p.measureText(R[Z]).width+(R[Z].length-1)*y}else{for(var te=0;te<R.length;te++){var le=p.measureText(R[te]).width+(R[te].length-1)*y;B[te]=le,j=Math.max(j,le)}var ue=j+d,se=u||_.fontSize+d,V=Math.max(se,_.fontSize+d)+(R.length-1)*(se+G);se+=G;var ee=0;return f==="middle"?ee=-V/2:f==="bottom"||f==="alphabetic"||f==="ideographic"?ee=-V:(f==="top"||f==="hanging")&&(ee=0),{font:x,width:ue,height:V,lines:R,lineWidths:B,lineHeight:se,maxLineWidth:j,fontProperties:_,lineMetrics:B.map(function(he,ut){var ct=0;return g==="center"||g==="middle"?ct-=he/2:(g==="right"||g==="end")&&(ct-=he),new Xm(ct-d/2,ee+ut*se,he+d,se)})}}}},{key:"setGraphemeOnPath",value:function(){}},{key:"wordWrap",value:function(e,t,i){var a=this,s=t.wordWrapWidth,o=s===void 0?0:s,l=t.letterSpacing,u=l===void 0?0:l,c=t.maxLines,d=c===void 0?1/0:c,h=t.textOverflow,f=this.runtime.offscreenCanvasCreator.getOrCreateContext(i),v=o+u,g="";h==="ellipsis"?g="...":h&&h!=="clip"&&(g=h);for(var m=[],y=0,w=0,T={},G=function(ee){return a.getFromCache(ee,u,T,f)},x=Array.from(g).reduce(function(V,ee){return V+G(ee)},0),_=Array.from(e),p=0;p<_.length;p++){var b=_[p],R=e[p-1],B=e[p+1],j=G(b);if(this.isNewline(b)){if(y++,y>=d){t.isOverflowing=!0;break}w=0,m[y]="";continue}if(w>0&&w+j>v){if(y+1>=d){if(t.isOverflowing=!0,x>0&&x<=v){for(var Z=m[y].length,te=0,le=Z,ue=0;ue<Z;ue++){var se=G(m[y][ue]);if(te+se+x>v){le=ue;break}te+=se}m[y]=(m[y]||"").slice(0,le)+g}break}if(y++,w=0,m[y]="",this.isBreakingSpace(b))continue;this.canBreakInLastChar(b)||(m=this.trimToBreakable(m),w=this.sumTextWidthByCache(m[y]||"",T)),this.shouldBreakByKinsokuShorui(b,B)&&(m=this.trimByKinsokuShorui(m),w+=G(R||""))}w+=j,m[y]=(m[y]||"")+b}return m.join(`
|
|
|
`)}},{key:"isBreakingSpace",value:function(e){return typeof e!="string"?!1:p_.BreakingSpaces.indexOf(e.charCodeAt(0))>=0}},{key:"isNewline",value:function(e){return typeof e!="string"?!1:p_.Newlines.indexOf(e.charCodeAt(0))>=0}},{key:"trimToBreakable",value:function(e){var t=Hd(e),i=t[t.length-2],a=this.findBreakableIndex(i);if(a===-1||!i)return t;var s=i.slice(a,a+1),o=this.isBreakingSpace(s),l=a+1,u=a+(o?0:1);return t[t.length-1]+=i.slice(l,i.length),t[t.length-2]=i.slice(0,u),t}},{key:"canBreakInLastChar",value:function(e){return!(e&&MA.test(e))}},{key:"sumTextWidthByCache",value:function(e,t){return e.split("").reduce(function(i,a){if(!t[a])throw Error("cannot count the word without cache");return i+t[a]},0)}},{key:"findBreakableIndex",value:function(e){for(var t=e.length-1;t>=0;t--)if(!MA.test(e[t]))return t;return-1}},{key:"getFromCache",value:function(e,t,i,a){var s=i[e];if(typeof s!="number"){var o=e.length*t;s=a.measureText(e).width+o,i[e]=s}return s}}])}(),kn={},OW=function(r){var n=new tW,e=new eW;return r={},Sa(Sa(Sa(Sa(Sa(Sa(Sa(Sa(Sa(Sa(r,yr.CIRCLE,new KH),yr.ELLIPSE,new JH),yr.RECT,n),yr.IMAGE,n),yr.GROUP,new rW),yr.LINE,new QH),yr.TEXT,new nW(kn)),yr.POLYLINE,e),yr.POLYGON,e),yr.PATH,new qH),Sa(Sa(r,yr.HTML,new iW),yr.MESH,null)}(),RW=function(r){var n=new oH,e=new l2;return r={},Sa(Sa(Sa(Sa(Sa(Sa(Sa(Sa(Sa(Sa(r,Gn.PERCENTAGE,null),Gn.NUMBER,new hH),Gn.ANGLE,new aH),Gn.DEFINED_PATH,new sH),Gn.PAINT,n),Gn.COLOR,n),Gn.FILTER,new lH),Gn.LENGTH,e),Gn.LENGTH_PERCENTAGE,e),Gn.LENGTH_PERCENTAGE_12,new uH),Sa(Sa(Sa(Sa(Sa(Sa(Sa(Sa(Sa(Sa(r,Gn.LENGTH_PERCENTAGE_14,new cH),Gn.COORDINATE,new l2),Gn.OFFSET_DISTANCE,new fH),Gn.OPACITY_VALUE,new vH),Gn.PATH,new gH),Gn.LIST_OF_POINTS,new _H),Gn.SHADOW_BLUR,new mH),Gn.TEXT,new pH),Gn.TEXT_TRANSFORM,new yH),Gn.TRANSFORM,new YH),Sa(Sa(Sa(r,Gn.TRANSFORM_ORIGIN,new ZH),Gn.Z_INDEX,new XH),Gn.MARKER,new dH)}(),AW=function(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof k.g!="undefined"?k.g:{}};kn.CameraContribution=YU,kn.AnimationTimeline=null,kn.EasingFunction=null,kn.offscreenCanvasCreator=new oW,kn.sceneGraphSelector=new cW,kn.sceneGraphService=new yW(kn),kn.textService=new NW(kn),kn.geometryUpdaterFactory=OW,kn.CSSPropertySyntaxFactory=RW,kn.styleValueRegistry=new iH(kn),kn.layoutRegistry=null,kn.globalThis=AW(),kn.enableStyleSyntax=!0,kn.enableSizeAttenuation=!1;var PA=0;function KCe(){PA=0}var p2=new $f(Hl.INSERTED,null,"","","",0,"",""),y2=new $f(Hl.REMOVED,null,"","","",0,"",""),NA=new dc(Hl.DESTROY),LW=function(r){function n(){var e;fr(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ss(this,n,[].concat(i)),e.entity=PA++,e.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},e.cullable={strategy:ZU.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},e.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:[0,0,0],localRotation:[0,0,0,1],localScale:[1,1,1],localTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],localSkew:[0,0],position:[0,0,0],rotation:[0,0,0,1],scaling:[1,1,1],worldTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],origin:[0,0,0]},e.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},e.geometry={contentBounds:void 0,renderBounds:void 0,dirty:!0},e.rBushNode={aabb:void 0},e.namespaceURI="g",e.scrollLeft=0,e.scrollTop=0,e.clientTop=0,e.clientLeft=0,e.destroyed=!1,e.style={},e.computedStyle={},e.parsedStyle={},e.attributes={},e}return Ts(n,r),vr(n,[{key:"className",get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(t){return t!==""})}},{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 t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t+1]||null}return null}},{key:"previousSibling",get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t-1]||null}return null}},{key:"cloneNode",value:function(t){throw new Error(Lo)}},{key:"appendChild",value:function(t,i){var a;if(t.destroyed)throw new Error(IU);return kn.sceneGraphService.attach(t,this,i),(a=this.ownerDocument)!==null&&a!==void 0&&a.defaultView&&(!P1(this)&&t.nodeName===yr.FRAGMENT?this.ownerDocument.defaultView.mountFragment(t):this.ownerDocument.defaultView.mountChildren(t)),this.isMutationObserved&&(p2.relatedNode=this,t.dispatchEvent(p2)),t}},{key:"insertBefore",value:function(t,i){if(!i)this.appendChild(t);else{t.parentElement&&t.parentElement.removeChild(t);var a=this.childNodes.indexOf(i);a===-1?this.appendChild(t):this.appendChild(t,a)}return t}},{key:"replaceChild",value:function(t,i){var a=this.childNodes.indexOf(i);return this.removeChild(i),this.appendChild(t,a),i}},{key:"removeChild",value:function(t){var i;return y2.relatedNode=this,t.dispatchEvent(y2),(i=t.ownerDocument)!==null&&i!==void 0&&i.defaultView&&t.ownerDocument.defaultView.unmountChildren(t),kn.sceneGraphService.detach(t),t}},{key:"removeChildren",value:function(){for(var t=this.childNodes.length-1;t>=0;t--){var i=this.childNodes[t];this.removeChild(i)}}},{key:"destroyChildren",value:function(){for(var t=this.childNodes.length-1;t>=0;t--){var i=this.childNodes[t];i.childNodes.length>0&&i.destroyChildren(),i.destroy()}}},{key:"matches",value:function(t){return kn.sceneGraphService.matches(t,this)}},{key:"getElementById",value:function(t){return kn.sceneGraphService.querySelector("#".concat(t),this)}},{key:"getElementsByName",value:function(t){return kn.sceneGraphService.querySelectorAll('[name="'.concat(t,'"]'),this)}},{key:"getElementsByClassName",value:function(t){return kn.sceneGraphService.querySelectorAll(".".concat(t),this)}},{key:"getElementsByTagName",value:function(t){return kn.sceneGraphService.querySelectorAll(t,this)}},{key:"querySelector",value:function(t){return kn.sceneGraphService.querySelector(t,this)}},{key:"querySelectorAll",value:function(t){return kn.sceneGraphService.querySelectorAll(t,this)}},{key:"closest",value:function(t){var i=this;do{if(kn.sceneGraphService.matches(t,i))return i;i=i.parentElement}while(i!==null);return null}},{key:"find",value:function(t){var i=this,a=null;return this.forEach(function(s){return s!==i&&t(s)?(a=s,!1):!0}),a}},{key:"findAll",value:function(t){var i=this,a=[];return this.forEach(function(s){s!==i&&t(s)&&a.push(s)}),a}},{key:"after",value:function(){var t=this;if(this.parentNode){for(var i=this.parentNode.childNodes.indexOf(this),a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];s.forEach(function(l,u){var c;return(c=t.parentNode)===null||c===void 0?void 0:c.appendChild(l,i+u+1)})}}},{key:"before",value:function(){if(this.parentNode){for(var t,i=this.parentNode.childNodes.indexOf(this),a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];var l=s[0],u=s.slice(1);this.parentNode.appendChild(l,i),(t=l).after.apply(t,Hd(u))}}},{key:"replaceWith",value:function(){this.after.apply(this,arguments),this.remove()}},{key:"append",value:function(){for(var t=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];a.forEach(function(o){return t.appendChild(o)})}},{key:"prepend",value:function(){for(var t=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];a.forEach(function(o,l){return t.appendChild(o,l)})}},{key:"replaceChildren",value:function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)}},{key:"remove",value:function(){return this.parentNode?this.parentNode.removeChild(this):this}},{key:"destroy",value:function(){this.dispatchEvent(NA),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0}},{key:"getGeometryBounds",value:function(){return kn.sceneGraphService.getGeometryBounds(this)}},{key:"getRenderBounds",value:function(){return kn.sceneGraphService.getBounds(this,!0)}},{key:"getBounds",value:function(){return kn.sceneGraphService.getBounds(this)}},{key:"getLocalBounds",value:function(){return kn.sceneGraphService.getLocalBounds(this)}},{key:"getBoundingClientRect",value:function(){return kn.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(t){if(typeof t!="symbol"){var i=this.attributes[t];return i}}},{key:"hasAttribute",value:function(t){return this.getAttributeNames().includes(t)}},{key:"hasAttributes",value:function(){return!!this.getAttributeNames().length}},{key:"removeAttribute",value:function(t){this.setAttribute(t,null),delete this.attributes[t]}},{key:"setAttribute",value:function(t,i,a,s){this.attributes[t]=i}},{key:"getAttributeNS",value:function(t,i){throw new Error(Lo)}},{key:"getAttributeNode",value:function(t){throw new Error(Lo)}},{key:"getAttributeNodeNS",value:function(t,i){throw new Error(Lo)}},{key:"hasAttributeNS",value:function(t,i){throw new Error(Lo)}},{key:"removeAttributeNS",value:function(t,i){throw new Error(Lo)}},{key:"removeAttributeNode",value:function(t){throw new Error(Lo)}},{key:"setAttributeNS",value:function(t,i,a){throw new Error(Lo)}},{key:"setAttributeNode",value:function(t){throw new Error(Lo)}},{key:"setAttributeNodeNS",value:function(t){throw new Error(Lo)}},{key:"toggleAttribute",value:function(t,i){throw new Error(Lo)}}])}(Ho);function Vs(r){return!!(r!=null&&r.nodeName)}var IW=kn.globalThis.Proxy?kn.globalThis.Proxy:function(){},Gf=new $f(Hl.ATTR_MODIFIED,null,null,null,null,$f.MODIFICATION,null,null),H0=E.Ue(),DW=X.Ue(),Zd=function(r){function n(e){var t;return fr(this,n),t=Ss(this,n),t.isCustomElement=!1,t.isMutationObserved=!1,t.activeAnimations=[],t.config=e,t.id=e.id||"",t.name=e.name||"",(e.className||e.class)&&(t.className=e.className||e.class),t.nodeName=e.type||yr.GROUP,e.initialParsedStyle&&Object.assign(t.parsedStyle,e.initialParsedStyle),t.initAttributes(e.style),kn.enableStyleSyntax&&(t.style=new IW({setProperty:function(a,s){t.setAttribute(a,s)},getPropertyValue:function(a){return t.getAttribute(a)},removeProperty:function(a){t.removeAttribute(a)},item:function(){return""}},{get:function(a,s){return a[s]!==void 0?a[s]:t.getAttribute(s)},set:function(a,s,o){return t.setAttribute(s,o),!0}})),t}return Ts(n,r),vr(n,[{key:"destroy",value:function(){kR(n,"destroy",this,3)([]),this.getAnimations().forEach(function(t){t.cancel()})}},{key:"cloneNode",value:function(t,i){var a=xo({},this.attributes);for(var s in a){var o=a[s];Vs(o)&&s!=="clipPath"&&s!=="offsetPath"&&s!=="textPath"&&(a[s]=o.cloneNode(t)),i&&(a[s]=i(s,o))}var l=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:a});return l.setLocalTransform(this.getLocalTransform()),t&&this.children.forEach(function(u){if(!u.style.isMarker){var c=u.cloneNode(t);l.appendChild(c)}}),l}},{key:"initAttributes",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i={forceUpdateGeometry:!0};kn.styleValueRegistry.processProperties(this,t,i),this.renderable.dirty=!0}},{key:"setAttribute",value:function(t,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;(0,ie.Z)(i)||(a||i!==this.attributes[t])&&(this.internalSetAttribute(t,i,{memoize:s}),kR(n,"setAttribute",this,3)([t,i]))}},{key:"internalSetAttribute",value:function(t,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=this.renderable,o=this.attributes[t],l=this.parsedStyle[t];kn.styleValueRegistry.processProperties(this,Sa({},t,i),a),s.dirty=!0;var u=this.parsedStyle[t];if(this.isConnected&&(Gf.relatedNode=this,Gf.prevValue=o,Gf.newValue=i,Gf.attrName=t,Gf.prevParsedValue=l,Gf.newParsedValue=u,this.isMutationObserved?this.dispatchEvent(Gf):(Gf.target=this,this.ownerDocument.defaultView.dispatchEvent(Gf,!0))),this.isCustomElement&&this.isConnected||!this.isCustomElement){var c,d;(c=(d=this).attributeChangedCallback)===null||c===void 0||c.call(d,t,o,i,l,u)}}},{key:"getBBox",value:function(){var t=this.getBounds(),i=t.getMin(),a=Uo(i,2),s=a[0],o=a[1],l=t.getMax(),u=Uo(l,2),c=u[0],d=u[1];return new Xm(s,o,c-s,d-o)}},{key:"setOrigin",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return kn.sceneGraphService.setOrigin(this,Oc(t,i,a,!1)),this}},{key:"getOrigin",value:function(){return kn.sceneGraphService.getOrigin(this)}},{key:"setPosition",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return kn.sceneGraphService.setPosition(this,Oc(t,i,a,!1)),this}},{key:"setLocalPosition",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return kn.sceneGraphService.setLocalPosition(this,Oc(t,i,a,!1)),this}},{key:"translate",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return kn.sceneGraphService.translate(this,Oc(t,i,a,!1)),this}},{key:"translateLocal",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return kn.sceneGraphService.translateLocal(this,Oc(t,i,a,!1)),this}},{key:"getPosition",value:function(){return kn.sceneGraphService.getPosition(this)}},{key:"getLocalPosition",value:function(){return kn.sceneGraphService.getLocalPosition(this)}},{key:"scale",value:function(t,i,a){return this.scaleLocal(t,i,a)}},{key:"scaleLocal",value:function(t,i,a){return typeof t=="number"&&(i=i||t,a=a||t,t=Oc(t,i,a,!1)),kn.sceneGraphService.scaleLocal(this,t),this}},{key:"setLocalScale",value:function(t,i,a){return typeof t=="number"&&(i=i||t,a=a||t,t=Oc(t,i,a,!1)),kn.sceneGraphService.setLocalScale(this,t),this}},{key:"getLocalScale",value:function(){return kn.sceneGraphService.getLocalScale(this)}},{key:"getScale",value:function(){return kn.sceneGraphService.getScale(this)}},{key:"getEulerAngles",value:function(){var t=WS(H0,kn.sceneGraphService.getWorldTransform(this)),i=Uo(t,3),a=i[2];return Rc(a)}},{key:"getLocalEulerAngles",value:function(){var t=WS(H0,kn.sceneGraphService.getLocalRotation(this)),i=Uo(t,3),a=i[2];return Rc(a)}},{key:"setEulerAngles",value:function(t){return kn.sceneGraphService.setEulerAngles(this,0,0,t),this}},{key:"setLocalEulerAngles",value:function(t){return kn.sceneGraphService.setLocalEulerAngles(this,0,0,t),this}},{key:"rotateLocal",value:function(t,i,a){return(0,xe.Z)(i)&&(0,xe.Z)(a)?kn.sceneGraphService.rotateLocal(this,0,0,t):kn.sceneGraphService.rotateLocal(this,t,i,a),this}},{key:"rotate",value:function(t,i,a){return(0,xe.Z)(i)&&(0,xe.Z)(a)?kn.sceneGraphService.rotate(this,0,0,t):kn.sceneGraphService.rotate(this,t,i,a),this}},{key:"setRotation",value:function(t,i,a,s){return kn.sceneGraphService.setRotation(this,t,i,a,s),this}},{key:"setLocalRotation",value:function(t,i,a,s){return kn.sceneGraphService.setLocalRotation(this,t,i,a,s),this}},{key:"setLocalSkew",value:function(t,i){return kn.sceneGraphService.setLocalSkew(this,t,i),this}},{key:"getRotation",value:function(){return kn.sceneGraphService.getRotation(this)}},{key:"getLocalRotation",value:function(){return kn.sceneGraphService.getLocalRotation(this)}},{key:"getLocalSkew",value:function(){return kn.sceneGraphService.getLocalSkew(this)}},{key:"getLocalTransform",value:function(){return kn.sceneGraphService.getLocalTransform(this)}},{key:"getWorldTransform",value:function(){return kn.sceneGraphService.getWorldTransform(this)}},{key:"setLocalTransform",value:function(t){return kn.sceneGraphService.setLocalTransform(this,t),this}},{key:"resetLocalTransform",value:function(){kn.sceneGraphService.resetLocalTransform(this)}},{key:"getAnimations",value:function(){return this.activeAnimations}},{key:"animate",value:function(t,i){var a,s=(a=this.ownerDocument)===null||a===void 0?void 0:a.timeline;return s?s.play(this,t,i):null}},{key:"isVisible",value:function(){var t;return((t=this.parsedStyle)===null||t===void 0?void 0:t.visibility)!=="hidden"}},{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}},{key:"isInteractive",value:function(){var t;return((t=this.parsedStyle)===null||t===void 0?void 0:t.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,Hd(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})))+1),this}},{key:"toBack",value:function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,Hd(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})))-1),this}},{key:"getConfig",value:function(){return this.config}},{key:"attr",value:function(){for(var t=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var o=a[0],l=a[1];return o?(0,Gs.Z)(o)?(Object.keys(o).forEach(function(u){t.setAttribute(u,o[u])}),this):a.length===2?(this.setAttribute(o,l),this):this.attributes[o]:this.attributes}},{key:"getMatrix",value:function(t){var i=t||this.getWorldTransform(),a=L.getTranslation(H0,i),s=Uo(a,2),o=s[0],l=s[1],u=L.getScaling(H0,i),c=Uo(u,2),d=c[0],h=c[1],f=L.getRotation(DW,i),v=WS(H0,f),g=Uo(v,3),m=g[0],y=g[2];return VU(m||y,o,l,d,h)}},{key:"getLocalMatrix",value:function(){return this.getMatrix(this.getLocalTransform())}},{key:"setMatrix",value:function(t){var i=FR(t),a=Uo(i,5),s=a[0],o=a[1],l=a[2],u=a[3],c=a[4];this.setEulerAngles(c).setPosition(s,o).setLocalScale(l,u)}},{key:"setLocalMatrix",value:function(t){var i=FR(t),a=Uo(i,5),s=a[0],o=a[1],l=a[2],u=a[3],c=a[4];this.setLocalEulerAngles(c).setLocalPosition(s,o).setLocalScale(l,u)}},{key:"show",value:function(){this.forEach(function(t){t.style.visibility="visible"})}},{key:"hide",value:function(){this.forEach(function(t){t.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(t){return this.children[t]||null}},{key:"add",value:function(t,i){return this.appendChild(t,i)}},{key:"set",value:function(t,i){this.config[t]=i}},{key:"get",value:function(t){return this.config[t]}},{key:"moveTo",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(t,i,a),this}},{key:"move",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(t,i,a),this}},{key:"setZIndex",value:function(t){return this.style.zIndex=t,this}}])}(LW),W0=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return fr(this,n),Ss(this,n,[xo({type:yr.CIRCLE},e)])}return Ts(n,r),vr(n)}(Zd),FW=["style"],BW=function(r){function n(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.style,a=v_(t,FW);return fr(this,n),e=Ss(this,n,[xo({style:i},a)]),e.isCustomElement=!0,e}return Ts(n,r),vr(n)}(Zd),x2=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return fr(this,n),Ss(this,n,[xo({type:yr.ELLIPSE},e)])}return Ts(n,r),vr(n)}(Zd),JCe=null,Y0=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return fr(this,n),Ss(this,n,[xo({type:yr.GROUP},e)])}return Ts(n,r),vr(n)}(Zd),$W=["style"],E2=function(r){function n(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.style,a=v_(t,$W);return fr(this,n),e=Ss(this,n,[xo({type:yr.HTML,style:i},a)]),e.cullable.enable=!1,e}return Ts(n,r),vr(n,[{key:"getDomElement",value:function(){return this.parsedStyle.$el}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"getLocalBounds",value:function(){if(this.parentNode){var t=L.invert(L.create(),this.parentNode.getWorldTransform()),i=this.getBounds();if(!hl.isEmpty(i)){var a=new hl;return a.setFromTransformedAABB(i,t),a}}return this.getBounds()}}])}(Zd),b2=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return fr(this,n),Ss(this,n,[xo({type:yr.IMAGE},e)])}return Ts(n,r),vr(n)}(Zd),GW=["style"],I1=function(r){function n(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.style,a=v_(t,GW);fr(this,n),e=Ss(this,n,[xo({type:yr.LINE,style:xo({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},i)},a)]),e.markerStartAngle=0,e.markerEndAngle=0;var s=e.parsedStyle,o=s.markerStart,l=s.markerEnd;return o&&Vs(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),l&&Vs(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return Ts(n,r),vr(n,[{key:"attributeChangedCallback",value:function(t,i,a,s,o){t==="x1"||t==="y1"||t==="x2"||t==="y2"||t==="markerStartOffset"||t==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):t==="markerStart"?(s&&Vs(s)&&(this.markerStartAngle=0,s.remove()),o&&Vs(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):t==="markerEnd"&&(s&&Vs(s)&&(this.markerEndAngle=0,s.remove()),o&&Vs(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1)))}},{key:"transformMarker",value:function(t){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=i.x1,c=i.x2,d=i.y1,h=i.y2,f=t?a:s;if(!(!f||!Vs(f))){var v=0,g,m,y,w,T,G;t?(y=u,w=d,g=c-u,m=h-d,T=o||0,G=this.markerStartAngle):(y=c,w=h,g=u-c,m=d-h,T=l||0,G=this.markerEndAngle),v=Math.atan2(m,g),f.setLocalEulerAngles(v*180/Math.PI+G),f.setLocalPosition(y+Math.cos(v)*T,w+Math.sin(v)*T)}}},{key:"getPoint",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle,s=a.x1,o=a.y1,l=a.x2,u=a.y2,c=(0,Nt.U4)(s,o,l,u,t),d=c.x,h=c.y,f=E.fF(E.Ue(),E.al(d,h,0),i?this.getWorldTransform():this.getLocalTransform());return new tc(f[0],f[1])}},{key:"getPointAtLength",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(t/this.getTotalLength(),i)}},{key:"getTotalLength",value:function(){var t=this.parsedStyle,i=t.x1,a=t.y1,s=t.x2,o=t.y2;return(0,Nt.Xk)(i,a,s,o)}}])}(Zd),zW=["style"],gg=function(r){function n(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.style,a=v_(t,zW);fr(this,n),e=Ss(this,n,[xo({type:yr.PATH,style:i,initialParsedStyle:{miterLimit:4,d:xo({},zR)}},a)]),e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[];var s=e.parsedStyle,o=s.markerStart,l=s.markerEnd,u=s.markerMid;return o&&Vs(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),u&&Vs(u)&&e.placeMarkerMid(u),l&&Vs(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return Ts(n,r),vr(n,[{key:"attributeChangedCallback",value:function(t,i,a,s,o){t==="d"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):t==="markerStartOffset"||t==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):t==="markerStart"?(s&&Vs(s)&&(this.markerStartAngle=0,s.remove()),o&&Vs(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):t==="markerEnd"?(s&&Vs(s)&&(this.markerEndAngle=0,s.remove()),o&&Vs(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1))):t==="markerMid"&&this.placeMarkerMid(o)}},{key:"transformMarker",value:function(t){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=t?a:s;if(!(!u||!Vs(u))){var c=0,d,h,f,v,g,m;if(t){var y=this.getStartTangent(),w=Uo(y,2),T=w[0],G=w[1];f=G[0],v=G[1],d=T[0]-G[0],h=T[1]-G[1],g=o||0,m=this.markerStartAngle}else{var x=this.getEndTangent(),_=Uo(x,2),p=_[0],b=_[1];f=b[0],v=b[1],d=p[0]-b[0],h=p[1]-b[1],g=l||0,m=this.markerEndAngle}c=Math.atan2(h,d),u.setLocalEulerAngles(c*180/Math.PI+m),u.setLocalPosition(f+Math.cos(c)*g,v+Math.sin(c)*g)}}},{key:"placeMarkerMid",value:function(t){var i=this.parsedStyle.d.segments;if(this.markerMidList.forEach(function(c){c.remove()}),t&&Vs(t))for(var a=1;a<i.length-1;a++){var s=Uo(i[a].currentPoint,2),o=s[0],l=s[1],u=a===1?t:t.cloneNode(!0);this.markerMidList.push(u),this.appendChild(u),u.setLocalPosition(o,l)}}},{key:"getTotalLength",value:function(){return tA(this)}},{key:"getPointAtLength",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle.d.absolutePath,s=(0,jm.r)(a,t),o=s.x,l=s.y,u=E.fF(E.Ue(),E.al(o,l,0),i?this.getWorldTransform():this.getLocalTransform());return new tc(u[0],u[1])}},{key:"getPoint",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPointAtLength(t*tA(this),i)}},{key:"getStartTangent",value:function(){var t=this.parsedStyle.d.segments,i=[];if(t.length>1){var a=t[0].currentPoint,s=t[1].currentPoint,o=t[1].startTangent;i=[],o?(i.push([a[0]-o[0],a[1]-o[1]]),i.push([a[0],a[1]])):(i.push([s[0],s[1]]),i.push([a[0],a[1]]))}return i}},{key:"getEndTangent",value:function(){var t=this.parsedStyle.d.segments,i=t.length,a=[];if(i>1){var s=t[i-2].currentPoint,o=t[i-1].currentPoint,l=t[i-1].endTangent;a=[],l?(a.push([o[0]-l[0],o[1]-l[1]]),a.push([o[0],o[1]])):(a.push([s[0],s[1]]),a.push([o[0],o[1]]))}return a}}])}(Zd),VW=["style"],D1=function(r){function n(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.style,a=v_(t,VW);fr(this,n),e=Ss(this,n,[xo({type:yr.POLYGON,style:i,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},a)]),e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[];var s=e.parsedStyle,o=s.markerStart,l=s.markerEnd,u=s.markerMid;return o&&Vs(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),u&&Vs(u)&&e.placeMarkerMid(u),l&&Vs(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return Ts(n,r),vr(n,[{key:"attributeChangedCallback",value:function(t,i,a,s,o){t==="points"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):t==="markerStartOffset"||t==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):t==="markerStart"?(s&&Vs(s)&&(this.markerStartAngle=0,s.remove()),o&&Vs(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):t==="markerEnd"?(s&&Vs(s)&&(this.markerEndAngle=0,s.remove()),o&&Vs(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1))):t==="markerMid"&&this.placeMarkerMid(o)}},{key:"transformMarker",value:function(t){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=i.points,c=u||{},d=c.points,h=t?a:s;if(!(!h||!Vs(h)||!d)){var f=0,v,g,m,y,w,T;if(m=d[0][0],y=d[0][1],t)v=d[1][0]-d[0][0],g=d[1][1]-d[0][1],w=o||0,T=this.markerStartAngle;else{var G=d.length;this.parsedStyle.isClosed?(v=d[G-1][0]-d[0][0],g=d[G-1][1]-d[0][1]):(m=d[G-1][0],y=d[G-1][1],v=d[G-2][0]-d[G-1][0],g=d[G-2][1]-d[G-1][1]),w=l||0,T=this.markerEndAngle}f=Math.atan2(g,v),h.setLocalEulerAngles(f*180/Math.PI+T),h.setLocalPosition(m+Math.cos(f)*w,y+Math.sin(f)*w)}}},{key:"placeMarkerMid",value:function(t){var i=this.parsedStyle.points,a=i||{},s=a.points;if(this.markerMidList.forEach(function(d){d.remove()}),this.markerMidList=[],t&&Vs(t)&&s)for(var o=1;o<(this.parsedStyle.isClosed?s.length:s.length-1);o++){var l=s[o][0],u=s[o][1],c=o===1?t:t.cloneNode(!0);this.markerMidList.push(c),this.appendChild(c),c.setLocalPosition(l,u)}}}])}(Zd),UW=["style"],OA=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.style,i=v_(e,UW);return fr(this,n),Ss(this,n,[xo({type:yr.POLYLINE,style:t,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},i)])}return Ts(n,r),vr(n,[{key:"getTotalLength",value:function(){return Pj(this)}},{key:"getPointAtLength",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(t/this.getTotalLength(),i)}},{key:"getPoint",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle.points.points;if(this.parsedStyle.points.segments.length===0){var s=[],o=0,l,u,c=this.getTotalLength();a.forEach(function(y,w){a[w+1]&&(l=[0,0],l[0]=o/c,u=(0,Nt.Xk)(y[0],y[1],a[w+1][0],a[w+1][1]),o+=u,l[1]=o/c,s.push(l))}),this.parsedStyle.points.segments=s}var d=0,h=0;this.parsedStyle.points.segments.forEach(function(y,w){t>=y[0]&&t<=y[1]&&(d=(t-y[0])/(y[1]-y[0]),h=w)});var f=(0,Nt.U4)(a[h][0],a[h][1],a[h+1][0],a[h+1][1],d),v=f.x,g=f.y,m=E.fF(E.Ue(),E.al(v,g,0),i?this.getWorldTransform():this.getLocalTransform());return new tc(m[0],m[1])}},{key:"getStartTangent",value:function(){var t=this.parsedStyle.points.points,i=[];return i.push([t[1][0],t[1][1]]),i.push([t[0][0],t[0][1]]),i}},{key:"getEndTangent",value:function(){var t=this.parsedStyle.points.points,i=t.length-1,a=[];return a.push([t[i-1][0],t[i-1][1]]),a.push([t[i][0],t[i][1]]),a}}])}(D1),zf=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return fr(this,n),Ss(this,n,[xo({type:yr.RECT},e)])}return Ts(n,r),vr(n)}(Zd),jW=["style"],Z0=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.style,i=v_(e,jW);return fr(this,n),Ss(this,n,[xo({type:yr.TEXT,style:xo({fill:"black"},t)},i)])}return Ts(n,r),vr(n,[{key:"getComputedTextLength",value:function(){var t;return this.getGeometryBounds(),((t=this.parsedStyle.metrics)===null||t===void 0?void 0:t.maxLineWidth)||0}},{key:"getLineBoundingRects",value:function(){var t;return this.getGeometryBounds(),((t=this.parsedStyle.metrics)===null||t===void 0?void 0:t.lineMetrics)||[]}},{key:"isOverflowing",value:function(){return this.getGeometryBounds(),!!this.parsedStyle.isOverflowing}}])}(Zd),HW=function(){function r(){fr(this,r),this.registry={},this.define(yr.CIRCLE,W0),this.define(yr.ELLIPSE,x2),this.define(yr.RECT,zf),this.define(yr.IMAGE,b2),this.define(yr.LINE,I1),this.define(yr.GROUP,Y0),this.define(yr.PATH,gg),this.define(yr.POLYGON,D1),this.define(yr.POLYLINE,OA),this.define(yr.TEXT,Z0),this.define(yr.HTML,E2)}return vr(r,[{key:"define",value:function(e,t){this.registry[e]=t}},{key:"get",value:function(e){return this.registry[e]}}])}(),QCe={number:function(n){return new cs(n)},percent:function(n){return new cs(n,"%")},px:function(n){return new cs(n,"px")},em:function(n){return new cs(n,"em")},rem:function(n){return new cs(n,"rem")},deg:function(n){return new cs(n,"deg")},grad:function(n){return new cs(n,"grad")},rad:function(n){return new cs(n,"rad")},turn:function(n){return new cs(n,"turn")},s:function(n){return new cs(n,"s")},ms:function(n){return new cs(n,"ms")},registerProperty:function(n){var e=n.name,t=n.inherits,i=n.interpolable,a=n.initialValue,s=n.syntax;kn.styleValueRegistry.registerMetadata({n:e,inh:t,int:i,d:a,syntax:s})},registerLayout:function(n,e){kn.layoutRegistry.registerLayout(n,e)}},RA=function(r){function n(){var e;fr(this,n),e=Ss(this,n),e.defaultView=null,e.ownerDocument=null,e.nodeName="document";try{e.timeline=new kn.AnimationTimeline(e)}catch(i){}var t={};return o2.forEach(function(i){var a=i.n,s=i.inh,o=i.d;s&&o&&(t[a]=(0,Be.Z)(o)?o(yr.GROUP):o)}),e.documentElement=new Y0({id:"g-root",style:t}),e.documentElement.ownerDocument=e,e.documentElement.parentNode=e,e.childNodes=[e.documentElement],e}return Ts(n,r),vr(n,[{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(t,i){if(t==="svg")return this.documentElement;var a=this.defaultView.customElements.get(t);a||(console.warn("Unsupported tagName: ",t),a=t==="tspan"?Z0:Y0);var s=new a(i);return s.ownerDocument=this,s}},{key:"createElementNS",value:function(t,i,a){return this.createElement(i,a)}},{key:"cloneNode",value:function(t){throw new Error(Lo)}},{key:"destroy",value:function(){try{this.documentElement.destroyChildren(),this.timeline.destroy()}catch(t){}}},{key:"elementsFromBBox",value:function(t,i,a,s){var o=this.defaultView.context.rBushRoot,l=o.search({minX:t,minY:i,maxX:a,maxY:s}),u=[];return l.forEach(function(c){var d=c.displayObject,h=d.parsedStyle.pointerEvents,f=h===void 0?"auto":h,v=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(f);(!v||v&&d.isVisible())&&!d.isCulled()&&d.isInteractive()&&u.push(d)}),u.sort(function(c,d){return d.sortable.renderOrder-c.sortable.renderOrder}),u}},{key:"elementFromPointSync",value:function(t,i){var a=this.defaultView.canvas2Viewport({x:t,y:i}),s=a.x,o=a.y,l=this.defaultView.getConfig(),u=l.width,c=l.height;if(s<0||o<0||s>u||o>c)return null;var d=this.defaultView.viewport2Client({x:s,y:o}),h=d.x,f=d.y,v=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:t,y:i,viewportX:s,viewportY:o,clientX:h,clientY:f},picked:[]}),g=v.picked;return g&&g[0]||this.documentElement}},{key:"elementFromPoint",value:function(){var e=GS(f_().mark(function i(a,s){var o,l,u,c,d,h,f,v,g,m,y;return f_().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:if(o=this.defaultView.canvas2Viewport({x:a,y:s}),l=o.x,u=o.y,c=this.defaultView.getConfig(),d=c.width,h=c.height,!(l<0||u<0||l>d||u>h)){T.next=4;break}return T.abrupt("return",null);case 4:return f=this.defaultView.viewport2Client({x:l,y:u}),v=f.x,g=f.y,T.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:a,y:s,viewportX:l,viewportY:u,clientX:v,clientY:g},picked:[]});case 7:return m=T.sent,y=m.picked,T.abrupt("return",y&&y[0]||this.documentElement);case 10:case"end":return T.stop()}},i,this)}));function t(i,a){return e.apply(this,arguments)}return t}()},{key:"elementsFromPointSync",value:function(t,i){var a=this.defaultView.canvas2Viewport({x:t,y:i}),s=a.x,o=a.y,l=this.defaultView.getConfig(),u=l.width,c=l.height;if(s<0||o<0||s>u||o>c)return[];var d=this.defaultView.viewport2Client({x:s,y:o}),h=d.x,f=d.y,v=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:t,y:i,viewportX:s,viewportY:o,clientX:h,clientY:f},picked:[]}),g=v.picked;return g[g.length-1]!==this.documentElement&&g.push(this.documentElement),g}},{key:"elementsFromPoint",value:function(){var e=GS(f_().mark(function i(a,s){var o,l,u,c,d,h,f,v,g,m,y;return f_().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:if(o=this.defaultView.canvas2Viewport({x:a,y:s}),l=o.x,u=o.y,c=this.defaultView.getConfig(),d=c.width,h=c.height,!(l<0||u<0||l>d||u>h)){T.next=4;break}return T.abrupt("return",[]);case 4:return f=this.defaultView.viewport2Client({x:l,y:u}),v=f.x,g=f.y,T.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:a,y:s,viewportX:l,viewportY:u,clientX:v,clientY:g},picked:[]});case 7:return m=T.sent,y=m.picked,y[y.length-1]!==this.documentElement&&y.push(this.documentElement),T.abrupt("return",y);case 11:case"end":return T.stop()}},i,this)}));function t(i,a){return e.apply(this,arguments)}return t}()},{key:"appendChild",value:function(t,i){throw new Error(Km)}},{key:"insertBefore",value:function(t,i){throw new Error(Km)}},{key:"removeChild",value:function(t,i){throw new Error(Km)}},{key:"replaceChild",value:function(t,i,a){throw new Error(Km)}},{key:"append",value:function(){throw new Error(Km)}},{key:"prepend",value:function(){throw new Error(Km)}},{key:"getElementById",value:function(t){return this.documentElement.getElementById(t)}},{key:"getElementsByName",value:function(t){return this.documentElement.getElementsByName(t)}},{key:"getElementsByTagName",value:function(t){return this.documentElement.getElementsByTagName(t)}},{key:"getElementsByClassName",value:function(t){return this.documentElement.getElementsByClassName(t)}},{key:"querySelector",value:function(t){return this.documentElement.querySelector(t)}},{key:"querySelectorAll",value:function(t){return this.documentElement.querySelectorAll(t)}},{key:"find",value:function(t){return this.documentElement.find(t)}},{key:"findAll",value:function(t){return this.documentElement.findAll(t)}}])}(Ho),AA=function(){function r(n){fr(this,r),this.strategies=n}return vr(r,[{key:"apply",value:function(e){var t=e.camera,i=e.renderingService,a=e.renderingContext,s=this.strategies;i.hooks.cull.tap(r.tag,function(o){if(o){var l=o.cullable;return s.length===0?l.visible=a.unculledEntities.indexOf(o.entity)>-1:l.visible=s.every(function(u){return u.isVisible(t,o)}),!o.isCulled()&&o.isVisible()?o:(o.dispatchEvent(new dc(Hl.CULLED)),null)}return o}),i.hooks.afterRender.tap(r.tag,function(o){o.cullable.visibilityPlaneMask=-1})}}])}();AA.tag="Culling";var LA=function(){function r(){var n=this;fr(this,r),this.autoPreventDefault=!1,this.rootPointerEvent=new N1(null),this.rootWheelEvent=new _2(null),this.onPointerMove=function(e){var t,i=(t=n.context.renderingContext.root)===null||t===void 0||(t=t.ownerDocument)===null||t===void 0?void 0:t.defaultView;if(!(i.supportsTouchEvents&&e.pointerType==="touch")){var a=n.normalizeToPointerEvent(e,i),s=Wm(a),o;try{for(s.s();!(o=s.n()).done;){var l=o.value,u=n.bootstrapEvent(n.rootPointerEvent,l,i,e);n.context.eventService.mapEvent(u)}}catch(c){s.e(c)}finally{s.f()}n.setCursor(n.context.eventService.cursor)}},this.onClick=function(e){var t,i=(t=n.context.renderingContext.root)===null||t===void 0||(t=t.ownerDocument)===null||t===void 0?void 0:t.defaultView,a=n.normalizeToPointerEvent(e,i),s=Wm(a),o;try{for(s.s();!(o=s.n()).done;){var l=o.value,u=n.bootstrapEvent(n.rootPointerEvent,l,i,e);n.context.eventService.mapEvent(u)}}catch(c){s.e(c)}finally{s.f()}n.setCursor(n.context.eventService.cursor)}}return vr(r,[{key:"apply",value:function(e){var t=this;this.context=e;var i=e.renderingService,a=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(s){var o=t.context.renderingService.hooks.pickSync.call({position:s,picked:[],topmost:!0}),l=o.picked;return l[0]||null}),i.hooks.pointerWheel.tap(r.tag,function(s){var o=t.normalizeWheelEvent(s);t.context.eventService.mapEvent(o)}),i.hooks.pointerDown.tap(r.tag,function(s){if(!(a.supportsTouchEvents&&s.pointerType==="touch")){var o=t.normalizeToPointerEvent(s,a);if(t.autoPreventDefault&&o[0].isNormalized){var l=s.cancelable||!("cancelable"in s);l&&s.preventDefault()}var u=Wm(o),c;try{for(u.s();!(c=u.n()).done;){var d=c.value,h=t.bootstrapEvent(t.rootPointerEvent,d,a,s);t.context.eventService.mapEvent(h)}}catch(f){u.e(f)}finally{u.f()}t.setCursor(t.context.eventService.cursor)}}),i.hooks.pointerUp.tap(r.tag,function(s){if(!(a.supportsTouchEvents&&s.pointerType==="touch")){var o=t.context.contextService.getDomElement(),l=t.context.eventService.isNativeEventFromCanvas(o,s),u=l?"":"outside",c=t.normalizeToPointerEvent(s,a),d=Wm(c),h;try{for(d.s();!(h=d.n()).done;){var f=h.value,v=t.bootstrapEvent(t.rootPointerEvent,f,a,s);v.type+=u,t.context.eventService.mapEvent(v)}}catch(g){d.e(g)}finally{d.f()}t.setCursor(t.context.eventService.cursor)}}),i.hooks.pointerMove.tap(r.tag,this.onPointerMove),i.hooks.pointerOver.tap(r.tag,this.onPointerMove),i.hooks.pointerOut.tap(r.tag,this.onPointerMove),i.hooks.click.tap(r.tag,this.onClick),i.hooks.pointerCancel.tap(r.tag,function(s){var o=t.normalizeToPointerEvent(s,a),l=Wm(o),u;try{for(l.s();!(u=l.n()).done;){var c=u.value,d=t.bootstrapEvent(t.rootPointerEvent,c,a,s);t.context.eventService.mapEvent(d)}}catch(h){l.e(h)}finally{l.f()}t.setCursor(t.context.eventService.cursor)})}},{key:"bootstrapEvent",value:function(e,t,i,a){e.view=i,e.originalEvent=null,e.nativeEvent=a,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this.transferMouseData(e,t);var s=this.context.eventService.client2Viewport({x:t.clientX,y:t.clientY}),o=s.x,l=s.y;e.viewport.x=o,e.viewport.y=l;var u=this.context.eventService.viewport2Canvas(e.viewport),c=u.x,d=u.y;return e.canvas.x=c,e.canvas.y=d,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.isTrusted=a.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=CH[e.type]||e.type),e}},{key:"normalizeWheelEvent",value:function(e){var t=this.rootWheelEvent;this.transferMouseData(t,e),t.deltaMode=e.deltaMode,t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ;var i=this.context.eventService.client2Viewport({x:e.clientX,y:e.clientY}),a=i.x,s=i.y;t.viewport.x=a,t.viewport.y=s;var o=this.context.eventService.viewport2Canvas(t.viewport),l=o.x,u=o.y;return t.canvas.x=l,t.canvas.y=u,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.nativeEvent=e,t.type=e.type,t}},{key:"transferMouseData",value:function(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=d2.now(),e.type=t.type,e.altKey=t.altKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.ctrlKey=t.ctrlKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.screen.x=t.screenX,e.screen.y=t.screenY,e.relatedTarget=null}},{key:"setCursor",value:function(e){this.context.contextService.applyCursorStyle(e||this.context.config.cursor||"default")}},{key:"normalizeToPointerEvent",value:function(e,t){var i=[];if(t.isTouchEvent(e))for(var a=0;a<e.changedTouches.length;a++){var s=e.changedTouches[a];(0,ie.Z)(s.button)&&(s.button=0),(0,ie.Z)(s.buttons)&&(s.buttons=1),(0,ie.Z)(s.isPrimary)&&(s.isPrimary=e.touches.length===1&&e.type==="touchstart"),(0,ie.Z)(s.width)&&(s.width=s.radiusX||1),(0,ie.Z)(s.height)&&(s.height=s.radiusY||1),(0,ie.Z)(s.tiltX)&&(s.tiltX=0),(0,ie.Z)(s.tiltY)&&(s.tiltY=0),(0,ie.Z)(s.pointerType)&&(s.pointerType="touch"),(0,ie.Z)(s.pointerId)&&(s.pointerId=s.identifier||0),(0,ie.Z)(s.pressure)&&(s.pressure=s.force||.5),(0,ie.Z)(s.twist)&&(s.twist=0),(0,ie.Z)(s.tangentialPressure)&&(s.tangentialPressure=0),s.isNormalized=!0,s.type=e.type,i.push(s)}else if(t.isMouseEvent(e)){var o=e;(0,ie.Z)(o.isPrimary)&&(o.isPrimary=!0),(0,ie.Z)(o.width)&&(o.width=1),(0,ie.Z)(o.height)&&(o.height=1),(0,ie.Z)(o.tiltX)&&(o.tiltX=0),(0,ie.Z)(o.tiltY)&&(o.tiltY=0),(0,ie.Z)(o.pointerType)&&(o.pointerType="mouse"),(0,ie.Z)(o.pointerId)&&(o.pointerId=TH),(0,ie.Z)(o.pressure)&&(o.pressure=.5),(0,ie.Z)(o.twist)&&(o.twist=0),(0,ie.Z)(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,i.push(o)}else i.push(e);return i}}])}();LA.tag="Event";var WW=[yr.CIRCLE,yr.ELLIPSE,yr.IMAGE,yr.RECT,yr.LINE,yr.POLYLINE,yr.POLYGON,yr.TEXT,yr.PATH,yr.HTML],YW=function(){function r(){fr(this,r)}return vr(r,[{key:"isVisible",value:function(e,t){var i,a=t.cullable;if(!a.enable)return!0;var s=t.getRenderBounds();if(hl.isEmpty(s))return!1;var o=e.getFrustum(),l=(i=t.parentNode)===null||i===void 0||(i=i.cullable)===null||i===void 0?void 0:i.visibilityPlaneMask;return a.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(t,s,l||Zm.INDETERMINATE,o.planes),a.visible=a.visibilityPlaneMask!==Zm.OUTSIDE,a.visible}},{key:"computeVisibilityWithPlaneMask",value:function(e,t,i,a){if(i===Zm.OUTSIDE||i===Zm.INSIDE)return i;for(var s=Zm.INSIDE,o=WW.indexOf(e.nodeName)>-1,l=0,u=a.length;l<u;++l){var c=1<<l;if(i&c&&!(o&&(l===4||l===5))){var d=a[l],h=d.normal,f=d.distance;if(E.AK(h,t.getPositiveFarPoint(a[l]))+f<0)return Zm.OUTSIDE;E.AK(h,t.getNegativeFarPoint(a[l]))+f<0&&(s|=c)}}return s}}])}(),IA=function(){function r(){fr(this,r),this.syncTasks=new Map,this.isFirstTimeRendering=!0,this.syncing=!1,this.isFirstTimeRenderingFinished=!1}return vr(r,[{key:"apply",value:function(e){var t=this,i,a=e.renderingService,s=e.renderingContext,o=e.rBushRoot,l=s.root.ownerDocument.defaultView;this.rBush=o;var u=function(g){var m=g.target;m.renderable.dirty=!0,a.dirtify()},c=function(g){t.syncTasks.set(g.target,g.detail.affectChildren),a.dirtify()},d=function(g){var m=g.target;kn.enableSizeAttenuation&&kn.styleValueRegistry.updateSizeAttenuation(m,l.getCamera().getZoom())},h=function(g){var m=g.target,y=m.rBushNode;y.aabb&&t.rBush.remove(y.aabb),t.syncTasks.delete(m),kn.sceneGraphService.dirtifyToRoot(m),a.dirtify()};a.hooks.init.tap(r.tag,function(){l.addEventListener(Hl.MOUNTED,d),l.addEventListener(Hl.UNMOUNTED,h),l.addEventListener(Hl.ATTR_MODIFIED,u),l.addEventListener(Hl.BOUNDS_CHANGED,c)}),a.hooks.destroy.tap(r.tag,function(){l.removeEventListener(Hl.MOUNTED,d),l.removeEventListener(Hl.UNMOUNTED,h),l.removeEventListener(Hl.ATTR_MODIFIED,u),l.removeEventListener(Hl.BOUNDS_CHANGED,c),t.syncTasks.clear()});var f=(i=kn.globalThis.requestIdleCallback)!==null&&i!==void 0?i:h2.bind(kn.globalThis);a.hooks.endFrame.tap(r.tag,function(){t.isFirstTimeRendering?(t.isFirstTimeRendering=!1,t.syncing=!0,f(function(){t.syncRTree(!0),t.isFirstTimeRenderingFinished=!0})):t.syncRTree()})}},{key:"syncNode",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.isConnected){var i=e.rBushNode;i.aabb&&this.rBush.remove(i.aabb);var a=e.getRenderBounds();if(a){var s=e.renderable;t&&(s.dirtyRenderBounds||(s.dirtyRenderBounds=new hl),s.dirtyRenderBounds.update(a.center,a.halfExtents));var o=a.getMin(),l=Uo(o,2),u=l[0],c=l[1],d=a.getMax(),h=Uo(d,2),f=h[0],v=h[1];i.aabb||(i.aabb={}),i.aabb.displayObject=e,i.aabb.minX=u,i.aabb.minY=c,i.aabb.maxX=f,i.aabb.maxY=v}if(i.aabb&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.minX)&&!isNaN(i.aabb.minY))return i.aabb}}},{key:"syncRTree",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!(!t&&(this.syncing||this.syncTasks.size===0))){this.syncing=!0;var i=[],a=new Set,s=function(l){if(!a.has(l)&&l.renderable){var u=e.syncNode(l,t);u&&(i.push(u),a.add(l))}};this.syncTasks.forEach(function(o,l){o&&l.forEach(s);for(var u=l;u;)s(u),u=u.parentElement}),this.rBush.load(i),i.length=0,this.syncing=!1}}}])}();IA.tag="Prepare";function qCe(r){return!!r.document}var Vf=function(r){return r.READY="ready",r.BEFORE_RENDER="beforerender",r.RERENDER="rerender",r.AFTER_RENDER="afterrender",r.BEFORE_DESTROY="beforedestroy",r.AFTER_DESTROY="afterdestroy",r.RESIZE="resize",r.DIRTY_RECTANGLE="dirtyrectangle",r.RENDERER_CHANGED="rendererchanged",r}({}),DA=500,ZW=.1,XW=1e3,F1=new dc(Hl.MOUNTED),B1=new dc(Hl.UNMOUNTED),k2=new dc(Vf.BEFORE_RENDER),FA=new dc(Vf.RERENDER),w2=new dc(Vf.AFTER_RENDER),$1=function(r){function n(e){var t;fr(this,n),t=Ss(this,n),t.Element=Zd,t.inited=!1,t.context={},t.document=new RA,t.document.defaultView=t,t.customElements=new HW;var i=e.container,a=e.canvas,s=e.offscreenCanvas,o=e.width,l=e.height,u=e.devicePixelRatio,c=e.renderer,d=e.background,h=e.cursor,f=e.document,v=e.requestAnimationFrame,g=e.cancelAnimationFrame,m=e.createImage,y=e.enableLargeImageOptimization,w=e.supportsPointerEvents,T=e.supportsTouchEvents,G=e.supportsCSSTransform,x=e.cleanUpOnDestroy,_=x===void 0?!0:x,p=e.supportsMutipleCanvasesInOneContainer,b=e.useNativeClickEvent,R=e.alwaysTriggerPointerEventOnCanvas,B=e.isTouchEvent,j=e.isMouseEvent,Z=e.dblClickSpeed;p||xH(i,t,_);var te=o,le=l,ue=u;return a&&(ue=u||c2&&window.devicePixelRatio||1,ue=ue>=1?Math.ceil(ue):1,te=o||wH(a)||a.width/ue,le=l||SH(a)||a.height/ue),s&&(kn.offscreenCanvas=s),t.devicePixelRatio=ue,t.requestAnimationFrame=v!=null?v:h2.bind(kn.globalThis),t.cancelAnimationFrame=g!=null?g:xA.bind(kn.globalThis),t.supportsTouchEvents=T!=null?T:"ontouchstart"in kn.globalThis,t.supportsPointerEvents=w!=null?w:!!kn.globalThis.PointerEvent,t.isTouchEvent=B!=null?B:function(se){return t.supportsTouchEvents&&se instanceof kn.globalThis.TouchEvent},t.isMouseEvent=j!=null?j:function(se){return!kn.globalThis.MouseEvent||se instanceof kn.globalThis.MouseEvent&&(!t.supportsPointerEvents||!(se instanceof kn.globalThis.PointerEvent))},t.dblClickSpeed=Z!=null?Z:200,t.initRenderingContext({container:i,canvas:a,width:te,height:le,renderer:c,offscreenCanvas:s,devicePixelRatio:ue,cursor:h||"default",background:d||"transparent",createImage:m,enableLargeImageOptimization:y,document:f,supportsCSSTransform:G,useNativeClickEvent:b,cleanUpOnDestroy:_,alwaysTriggerPointerEventOnCanvas:R}),t.initDefaultCamera(te,le,c.clipSpaceNearZ),t.initRenderer(c,!0),t}return Ts(n,r),vr(n,[{key:"initRenderingContext",value:function(t){this.context.config=t,this.context.renderingContext={root:this.document.documentElement,renderListCurrentFrame:[],unculledEntities:[],renderReasons:new Set,force:!1,dirty:!1}}},{key:"initDefaultCamera",value:function(t,i,a){var s=this,o=new kn.CameraContribution;o.clipSpaceNearZ=a,o.setType(fl.EXPLORING,ZS.DEFAULT).setPosition(t/2,i/2,DA).setFocalPoint(t/2,i/2,0).setOrthographic(t/-2,t/2,i/2,i/-2,ZW,XW),o.canvas=this,o.eventEmitter.on($R.UPDATED,function(){s.context.renderingContext.renderReasons.add(O1.CAMERA_CHANGED),kn.enableSizeAttenuation&&s.getConfig().renderer.getConfig().enableSizeAttenuation&&s.updateSizeAttenuation()}),this.context.camera=o}},{key:"updateSizeAttenuation",value:function(){var t=this.getCamera().getZoom();this.document.documentElement.forEach(function(i){kn.styleValueRegistry.updateSizeAttenuation(i,t)})}},{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 t=this;return this.readyPromise||(this.readyPromise=new Promise(function(i){t.resolveReadyPromise=function(){i(t)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise}},{key:"destroy",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,i=arguments.length>1?arguments[1]:void 0;i===void 0&&(i=this.getConfig().fastCleanExistingCanvas),i||this.dispatchEvent(new dc(Vf.BEFORE_DESTROY)),this.frameId&&this.cancelAnimationFrame(this.frameId);var a=this.getRoot();this.unmountChildren(a),t&&(this.document.destroy(),this.getEventService().destroy()),this.getRenderingService().destroy(),this.getContextService().destroy(),t&&this.context.rBushRoot&&(this.context.rBushRoot.clear(),this.context.rBushRoot=null,this.context.renderingContext.root=null),i||this.dispatchEvent(new dc(Vf.AFTER_DESTROY));var s=function(l){l.currentTarget=null,l.manager=null,l.target=null,l.relatedNode=null};s(F1),s(B1),s(k2),s(FA),s(w2),s(Gf),s(p2),s(y2),s(NA)}},{key:"changeSize",value:function(t,i){this.resize(t,i)}},{key:"resize",value:function(t,i){var a=this.context.config;a.width=t,a.height=i,this.getContextService().resize(t,i);var s=this.context.camera,o=s.getProjectionMode();s.setPosition(t/2,i/2,DA).setFocalPoint(t/2,i/2,0),o===Wd.ORTHOGRAPHIC?s.setOrthographic(t/-2,t/2,i/2,i/-2,s.getNear(),s.getFar()):s.setAspect(t/i),this.dispatchEvent(new dc(Vf.RESIZE,{width:t,height:i}))}},{key:"appendChild",value:function(t,i){return this.document.documentElement.appendChild(t,i)}},{key:"insertBefore",value:function(t,i){return this.document.documentElement.insertBefore(t,i)}},{key:"removeChild",value:function(t){return this.document.documentElement.removeChild(t)}},{key:"removeChildren",value:function(){this.document.documentElement.removeChildren()}},{key:"destroyChildren",value:function(){this.document.documentElement.destroyChildren()}},{key:"render",value:function(t){var i=this;t&&(k2.detail=t,w2.detail=t),this.dispatchEvent(k2);var a=this.getRenderingService();a.render(this.getConfig(),t,function(){i.dispatchEvent(FA)}),this.dispatchEvent(w2)}},{key:"run",value:function(){var t=this,i=function(s,o){t.render(o),t.frameId=t.requestAnimationFrame(i)};i()}},{key:"initRenderer",value:function(t){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!t)throw new Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.context.rBushRoot=new NU,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new LA,new IA,new AA([new YW])),this.loadRendererContainerModule(t),this.context.contextService=new this.context.ContextService(xo(xo({},kn),this.context)),this.context.renderingService=new lW(kn,this.context),this.context.eventService=new sW(kn,this.context),this.context.eventService.init(),this.context.contextService.init?(this.context.contextService.init(),this.initRenderingService(t,a,!0)):this.context.contextService.initAsync().then(function(){i.initRenderingService(t,a)})}},{key:"initRenderingService",value:function(t){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.context.renderingService.init(function(){i.inited=!0,a?s?i.requestAnimationFrame(function(){i.dispatchEvent(new dc(Vf.READY))}):i.dispatchEvent(new dc(Vf.READY)):i.dispatchEvent(new dc(Vf.RENDERER_CHANGED)),i.readyPromise&&i.resolveReadyPromise(),a||i.getRoot().forEach(function(o){var l=o,u=l.renderable;u&&(u.renderBoundsDirty=!0,u.boundsDirty=!0,u.dirty=!0)}),i.mountChildren(i.getRoot()),t.getConfig().enableAutoRendering&&i.run()})}},{key:"loadRendererContainerModule",value:function(t){var i=this,a=t.getPlugins();a.forEach(function(s){s.context=i.context,s.init(kn)})}},{key:"setRenderer",value:function(t){var i=this.getConfig();if(i.renderer!==t){var a=i.renderer;i.renderer=t,this.destroy(!1,!0),Hd((a==null?void 0:a.getPlugins())||[]).reverse().forEach(function(s){s.destroy(kn)}),this.initRenderer(t)}}},{key:"setCursor",value:function(t){var i=this.getConfig();i.cursor=t,this.getContextService().applyCursorStyle(t)}},{key:"unmountChildren",value:function(t){var i=this;t.childNodes.forEach(function(a){i.unmountChildren(a)}),this.inited&&(t.isMutationObserved?t.dispatchEvent(B1):(B1.target=t,this.dispatchEvent(B1,!0)),t!==this.document.documentElement&&(t.ownerDocument=null),t.isConnected=!1),t.isCustomElement&&t.disconnectedCallback&&t.disconnectedCallback()}},{key:"mountChildren",value:function(t){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:P1(t);this.inited?t.isConnected||(t.ownerDocument=this.document,t.isConnected=!0,a||(t.isMutationObserved?t.dispatchEvent(F1):(F1.target=t,this.dispatchEvent(F1,!0)))):console.warn("[g]: You are trying to call `canvas.appendChild` before canvas' initialization finished. You can either await `canvas.ready` or listen to `CanvasEvent.READY` manually.","appended child: ",t.nodeName),t.childNodes.forEach(function(s){i.mountChildren(s,a)}),t.isCustomElement&&t.connectedCallback&&t.connectedCallback()}},{key:"mountFragment",value:function(t){this.mountChildren(t,!1)}},{key:"client2Viewport",value:function(t){return this.getEventService().client2Viewport(t)}},{key:"viewport2Client",value:function(t){return this.getEventService().viewport2Client(t)}},{key:"viewport2Canvas",value:function(t){return this.getEventService().viewport2Canvas(t)}},{key:"canvas2Viewport",value:function(t){return this.getEventService().canvas2Viewport(t)}},{key:"getPointByClient",value:function(t,i){return this.client2Viewport({x:t,y:i})}},{key:"getClientByPoint",value:function(t,i){return this.viewport2Client({x:t,y:i})}}])}(wA);function ep(r){"@babel/helpers - typeof";return ep=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ep(r)}function KW(r,n){if(ep(r)!="object"||!r)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var t=e.call(r,n||"default");if(ep(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(r)}function BA(r){var n=KW(r,"string");return ep(n)=="symbol"?n:n+""}function Na(r,n,e){return(n=BA(n))in r?Object.defineProperty(r,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[n]=e,r}function $A(r,n){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);n&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),e.push.apply(e,t)}return e}function X0(r){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?$A(Object(e),!0).forEach(function(t){Na(r,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):$A(Object(e)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))})}return r}function ri(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}function GA(r,n){for(var e=0;e<n.length;e++){var t=n[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,BA(t.key),t)}}function ii(r,n,e){return n&&GA(r.prototype,n),e&&GA(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function S2(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=Array(n);e<n;e++)t[e]=r[e];return t}function JW(r){if(Array.isArray(r))return S2(r)}function QW(r){if(typeof Symbol!="undefined"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function T2(r,n){if(r){if(typeof r=="string")return S2(r,n);var e={}.toString.call(r).slice(8,-1);return e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set"?Array.from(r):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?S2(r,n):void 0}}function qW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uf(r){return JW(r)||QW(r)||T2(r)||qW()}function G1(r){return G1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},G1(r)}function zA(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(n){}return(zA=function(){return!!r})()}function eY(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function tY(r,n){if(n&&(ep(n)=="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return eY(r)}function _d(r,n,e){return n=G1(n),tY(r,zA()?Reflect.construct(n,e||[],G1(r).constructor):n.apply(r,e))}function C2(r,n){return C2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},C2(r,n)}function md(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(n&&n.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),n&&C2(r,n)}function nY(r){if(Array.isArray(r))return r}function rY(r,n){var e=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(e!=null){var t,i,a,s,o=[],l=!0,u=!1;try{if(a=(e=e.call(r)).next,n===0){if(Object(e)!==e)return;l=!1}else for(;!(l=(t=a.call(e)).done)&&(o.push(t.value),o.length!==n);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&e.return!=null&&(s=e.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function iY(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ic(r,n){return nY(r)||rY(r,n)||T2(r,n)||iY()}function M2(r,n,e){r.prototype=n.prototype=e,e.constructor=r}function VA(r,n){var e=Object.create(r.prototype);for(var t in n)e[t]=n[t];return e}function K0(){}var J0=.7,z1=1/J0,tp="\\s*([+-]?\\d+)\\s*",Q0="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",jf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",aY=/^#([0-9a-f]{3,8})$/,sY=new RegExp(`^rgb\\(${tp},${tp},${tp}\\)$`),oY=new RegExp(`^rgb\\(${jf},${jf},${jf}\\)$`),lY=new RegExp(`^rgba\\(${tp},${tp},${tp},${Q0}\\)$`),uY=new RegExp(`^rgba\\(${jf},${jf},${jf},${Q0}\\)$`),cY=new RegExp(`^hsl\\(${Q0},${jf},${jf}\\)$`),dY=new RegExp(`^hsla\\(${Q0},${jf},${jf},${Q0}\\)$`),UA={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};M2(K0,V1,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:jA,formatHex:jA,formatHex8:hY,formatHsl:fY,formatRgb:HA,toString:HA});function jA(){return this.rgb().formatHex()}function hY(){return this.rgb().formatHex8()}function fY(){return KA(this).formatHsl()}function HA(){return this.rgb().formatRgb()}function V1(r){var n,e;return r=(r+"").trim().toLowerCase(),(n=aY.exec(r))?(e=n[1].length,n=parseInt(n[1],16),e===6?WA(n):e===3?new Dc(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):e===8?U1(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):e===4?U1(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=sY.exec(r))?new Dc(n[1],n[2],n[3],1):(n=oY.exec(r))?new Dc(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=lY.exec(r))?U1(n[1],n[2],n[3],n[4]):(n=uY.exec(r))?U1(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=cY.exec(r))?XA(n[1],n[2]/100,n[3]/100,1):(n=dY.exec(r))?XA(n[1],n[2]/100,n[3]/100,n[4]):UA.hasOwnProperty(r)?WA(UA[r]):r==="transparent"?new Dc(NaN,NaN,NaN,0):null}function WA(r){return new Dc(r>>16&255,r>>8&255,r&255,1)}function U1(r,n,e,t){return t<=0&&(r=n=e=NaN),new Dc(r,n,e,t)}function vY(r){return r instanceof K0||(r=V1(r)),r?(r=r.rgb(),new Dc(r.r,r.g,r.b,r.opacity)):new Dc}function gY(r,n,e,t){return arguments.length===1?vY(r):new Dc(r,n,e,t==null?1:t)}function Dc(r,n,e,t){this.r=+r,this.g=+n,this.b=+e,this.opacity=+t}M2(Dc,gY,VA(K0,{brighter(r){return r=r==null?z1:Math.pow(z1,r),new Dc(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?J0:Math.pow(J0,r),new Dc(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new Dc(y_(this.r),y_(this.g),y_(this.b),j1(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:YA,formatHex:YA,formatHex8:_Y,formatRgb:ZA,toString:ZA}));function YA(){return`#${x_(this.r)}${x_(this.g)}${x_(this.b)}`}function _Y(){return`#${x_(this.r)}${x_(this.g)}${x_(this.b)}${x_((isNaN(this.opacity)?1:this.opacity)*255)}`}function ZA(){const r=j1(this.opacity);return`${r===1?"rgb(":"rgba("}${y_(this.r)}, ${y_(this.g)}, ${y_(this.b)}${r===1?")":`, ${r})`}`}function j1(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function y_(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function x_(r){return r=y_(r),(r<16?"0":"")+r.toString(16)}function XA(r,n,e,t){return t<=0?r=n=e=NaN:e<=0||e>=1?r=n=NaN:n<=0&&(r=NaN),new Gh(r,n,e,t)}function KA(r){if(r instanceof Gh)return new Gh(r.h,r.s,r.l,r.opacity);if(r instanceof K0||(r=V1(r)),!r)return new Gh;if(r instanceof Gh)return r;r=r.rgb();var n=r.r/255,e=r.g/255,t=r.b/255,i=Math.min(n,e,t),a=Math.max(n,e,t),s=NaN,o=a-i,l=(a+i)/2;return o?(n===a?s=(e-t)/o+(e<t)*6:e===a?s=(t-n)/o+2:s=(n-e)/o+4,o/=l<.5?a+i:2-a-i,s*=60):o=l>0&&l<1?0:s,new Gh(s,o,l,r.opacity)}function mY(r,n,e,t){return arguments.length===1?KA(r):new Gh(r,n,e,t==null?1:t)}function Gh(r,n,e,t){this.h=+r,this.s=+n,this.l=+e,this.opacity=+t}M2(Gh,mY,VA(K0,{brighter(r){return r=r==null?z1:Math.pow(z1,r),new Gh(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?J0:Math.pow(J0,r),new Gh(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,n=isNaN(r)||isNaN(this.s)?0:this.s,e=this.l,t=e+(e<.5?e:1-e)*n,i=2*e-t;return new Dc(P2(r>=240?r-240:r+120,i,t),P2(r,i,t),P2(r<120?r+240:r-120,i,t),this.opacity)},clamp(){return new Gh(JA(this.h),H1(this.s),H1(this.l),j1(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const r=j1(this.opacity);return`${r===1?"hsl(":"hsla("}${JA(this.h)}, ${H1(this.s)*100}%, ${H1(this.l)*100}%${r===1?")":`, ${r})`}`}}));function JA(r){return r=(r||0)%360,r<0?r+360:r}function H1(r){return Math.max(0,Math.min(1,r||0))}function P2(r,n,e){return(r<60?n+(e-n)*r/60:r<180?e:r<240?n+(e-n)*(240-r)/60:n)*255}function np(r,n){var e=typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(!e){if(Array.isArray(r)||(e=T2(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:i}}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 a,s=!0,o=!1;return{s:function(){e=e.call(r)},n:function(){var u=e.next();return s=u.done,u},e:function(u){o=!0,a=u},f:function(){try{s||e.return==null||e.return()}finally{if(o)throw a}}}}var pY=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof k.g!="undefined"?k.g:typeof self!="undefined"?self:{},QA={exports:{}};(function(r,n){(function(e,t){r.exports=t()})(pY,function(){function e(x,_,p,b,R){t(x,_,p||0,b||x.length-1,R||a)}function t(x,_,p,b,R){for(;b>p;){if(b-p>600){var B=b-p+1,j=_-p+1,Z=Math.log(B),te=.5*Math.exp(2*Z/3),le=.5*Math.sqrt(Z*te*(B-te)/B)*(j-B/2<0?-1:1),ue=Math.max(p,Math.floor(_-j*te/B+le)),se=Math.min(b,Math.floor(_+(B-j)*te/B+le));t(x,_,ue,se,R)}var V=x[_],ee=p,he=b;for(i(x,p,_),R(x[b],V)>0&&i(x,p,b);ee<he;){for(i(x,ee,he),ee++,he--;R(x[ee],V)<0;)ee++;for(;R(x[he],V)>0;)he--}R(x[p],V)===0?i(x,p,he):(he++,i(x,he,b)),he<=_&&(p=he+1),_<=he&&(b=he-1)}}function i(x,_,p){var b=x[_];x[_]=x[p],x[p]=b}function a(x,_){return x<_?-1:x>_?1:0}var s=function(_){_===void 0&&(_=9),this._maxEntries=Math.max(4,_),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()};s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(_){var p=this.data,b=[];if(!w(_,p))return b;for(var R=this.toBBox,B=[];p;){for(var j=0;j<p.children.length;j++){var Z=p.children[j],te=p.leaf?R(Z):Z;w(_,te)&&(p.leaf?b.push(Z):y(_,te)?this._all(Z,b):B.push(Z))}p=B.pop()}return b},s.prototype.collides=function(_){var p=this.data;if(!w(_,p))return!1;for(var b=[];p;){for(var R=0;R<p.children.length;R++){var B=p.children[R],j=p.leaf?this.toBBox(B):B;if(w(_,j)){if(p.leaf||y(_,j))return!0;b.push(B)}}p=b.pop()}return!1},s.prototype.load=function(_){if(!(_&&_.length))return this;if(_.length<this._minEntries){for(var p=0;p<_.length;p++)this.insert(_[p]);return this}var b=this._build(_.slice(),0,_.length-1,0);if(!this.data.children.length)this.data=b;else if(this.data.height===b.height)this._splitRoot(this.data,b);else{if(this.data.height<b.height){var R=this.data;this.data=b,b=R}this._insert(b,this.data.height-b.height-1,!0)}return this},s.prototype.insert=function(_){return _&&this._insert(_,this.data.height-1),this},s.prototype.clear=function(){return this.data=T([]),this},s.prototype.remove=function(_,p){if(!_)return this;for(var b=this.data,R=this.toBBox(_),B=[],j=[],Z,te,le;b||B.length;){if(b||(b=B.pop(),te=B[B.length-1],Z=j.pop(),le=!0),b.leaf){var ue=o(_,b.children,p);if(ue!==-1)return b.children.splice(ue,1),B.push(b),this._condense(B),this}!le&&!b.leaf&&y(b,R)?(B.push(b),j.push(Z),Z=0,te=b,b=b.children[0]):te?(Z++,b=te.children[Z],le=!1):b=null}return this},s.prototype.toBBox=function(_){return _},s.prototype.compareMinX=function(_,p){return _.minX-p.minX},s.prototype.compareMinY=function(_,p){return _.minY-p.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(_){return this.data=_,this},s.prototype._all=function(_,p){for(var b=[];_;)_.leaf?p.push.apply(p,_.children):b.push.apply(b,_.children),_=b.pop();return p},s.prototype._build=function(_,p,b,R){var B=b-p+1,j=this._maxEntries,Z;if(B<=j)return Z=T(_.slice(p,b+1)),l(Z,this.toBBox),Z;R||(R=Math.ceil(Math.log(B)/Math.log(j)),j=Math.ceil(B/Math.pow(j,R-1))),Z=T([]),Z.leaf=!1,Z.height=R;var te=Math.ceil(B/j),le=te*Math.ceil(Math.sqrt(j));G(_,p,b,le,this.compareMinX);for(var ue=p;ue<=b;ue+=le){var se=Math.min(ue+le-1,b);G(_,ue,se,te,this.compareMinY);for(var V=ue;V<=se;V+=te){var ee=Math.min(V+te-1,se);Z.children.push(this._build(_,V,ee,R-1))}}return l(Z,this.toBBox),Z},s.prototype._chooseSubtree=function(_,p,b,R){for(;R.push(p),!(p.leaf||R.length-1===b);){for(var B=1/0,j=1/0,Z=void 0,te=0;te<p.children.length;te++){var le=p.children[te],ue=f(le),se=g(_,le)-ue;se<j?(j=se,B=ue<B?ue:B,Z=le):se===j&&ue<B&&(B=ue,Z=le)}p=Z||p.children[0]}return p},s.prototype._insert=function(_,p,b){var R=b?_:this.toBBox(_),B=[],j=this._chooseSubtree(R,this.data,p,B);for(j.children.push(_),c(j,R);p>=0&&B[p].children.length>this._maxEntries;)this._split(B,p),p--;this._adjustParentBBoxes(R,B,p)},s.prototype._split=function(_,p){var b=_[p],R=b.children.length,B=this._minEntries;this._chooseSplitAxis(b,B,R);var j=this._chooseSplitIndex(b,B,R),Z=T(b.children.splice(j,b.children.length-j));Z.height=b.height,Z.leaf=b.leaf,l(b,this.toBBox),l(Z,this.toBBox),p?_[p-1].children.push(Z):this._splitRoot(b,Z)},s.prototype._splitRoot=function(_,p){this.data=T([_,p]),this.data.height=_.height+1,this.data.leaf=!1,l(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(_,p,b){for(var R,B=1/0,j=1/0,Z=p;Z<=b-p;Z++){var te=u(_,0,Z,this.toBBox),le=u(_,Z,b,this.toBBox),ue=m(te,le),se=f(te)+f(le);ue<B?(B=ue,R=Z,j=se<j?se:j):ue===B&&se<j&&(j=se,R=Z)}return R||b-p},s.prototype._chooseSplitAxis=function(_,p,b){var R=_.leaf?this.compareMinX:d,B=_.leaf?this.compareMinY:h,j=this._allDistMargin(_,p,b,R),Z=this._allDistMargin(_,p,b,B);j<Z&&_.children.sort(R)},s.prototype._allDistMargin=function(_,p,b,R){_.children.sort(R);for(var B=this.toBBox,j=u(_,0,p,B),Z=u(_,b-p,b,B),te=v(j)+v(Z),le=p;le<b-p;le++){var ue=_.children[le];c(j,_.leaf?B(ue):ue),te+=v(j)}for(var se=b-p-1;se>=p;se--){var V=_.children[se];c(Z,_.leaf?B(V):V),te+=v(Z)}return te},s.prototype._adjustParentBBoxes=function(_,p,b){for(var R=b;R>=0;R--)c(p[R],_)},s.prototype._condense=function(_){for(var p=_.length-1,b=void 0;p>=0;p--)_[p].children.length===0?p>0?(b=_[p-1].children,b.splice(b.indexOf(_[p]),1)):this.clear():l(_[p],this.toBBox)};function o(x,_,p){if(!p)return _.indexOf(x);for(var b=0;b<_.length;b++)if(p(x,_[b]))return b;return-1}function l(x,_){u(x,0,x.children.length,_,x)}function u(x,_,p,b,R){R||(R=T(null)),R.minX=1/0,R.minY=1/0,R.maxX=-1/0,R.maxY=-1/0;for(var B=_;B<p;B++){var j=x.children[B];c(R,x.leaf?b(j):j)}return R}function c(x,_){return x.minX=Math.min(x.minX,_.minX),x.minY=Math.min(x.minY,_.minY),x.maxX=Math.max(x.maxX,_.maxX),x.maxY=Math.max(x.maxY,_.maxY),x}function d(x,_){return x.minX-_.minX}function h(x,_){return x.minY-_.minY}function f(x){return(x.maxX-x.minX)*(x.maxY-x.minY)}function v(x){return x.maxX-x.minX+(x.maxY-x.minY)}function g(x,_){return(Math.max(_.maxX,x.maxX)-Math.min(_.minX,x.minX))*(Math.max(_.maxY,x.maxY)-Math.min(_.minY,x.minY))}function m(x,_){var p=Math.max(x.minX,_.minX),b=Math.max(x.minY,_.minY),R=Math.min(x.maxX,_.maxX),B=Math.min(x.maxY,_.maxY);return Math.max(0,R-p)*Math.max(0,B-b)}function y(x,_){return x.minX<=_.minX&&x.minY<=_.minY&&_.maxX<=x.maxX&&_.maxY<=x.maxY}function w(x,_){return _.minX<=x.maxX&&_.minY<=x.maxY&&_.maxX>=x.minX&&_.maxY>=x.minY}function T(x){return{children:x,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function G(x,_,p,b,R){for(var B=[_,p];B.length;)if(p=B.pop(),_=B.pop(),!(p-_<=b)){var j=_+Math.ceil((p-_)/b/2)*b;e(x,j,_,p,R),B.push(_,j,j,p)}}return s})})(QA);var eMe=QA.exports,ki=function(r){return r.GROUP="g",r.FRAGMENT="fragment",r.CIRCLE="circle",r.ELLIPSE="ellipse",r.IMAGE="image",r.RECT="rect",r.LINE="line",r.POLYLINE="polyline",r.POLYGON="polygon",r.TEXT="text",r.PATH="path",r.HTML="html",r.MESH="mesh",r}({}),N2=function(r){return r[r.ZERO=0]="ZERO",r[r.NEGATIVE_ONE=1]="NEGATIVE_ONE",r}({}),tMe=null,nMe=null,O2=E.IH,rp=E.JG,yY=E.Fp,xY=E.VV,qA=E.bA,R2=E.lu,Xd=function(){function r(){ri(this,r),this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return ii(r,[{key:"update",value:function(e,t){rp(this.center,e),rp(this.halfExtents,t),R2(this.min,this.center,this.halfExtents),O2(this.max,this.center,this.halfExtents)}},{key:"setMinMax",value:function(e,t){O2(this.center,t,e),qA(this.center,this.center,.5),R2(this.halfExtents,t,e),qA(this.halfExtents,this.halfExtents,.5),rp(this.min,e),rp(this.max,t)}},{key:"getMin",value:function(){return this.min}},{key:"getMax",value:function(){return this.max}},{key:"add",value:function(e){if(!r.isEmpty(e)){if(r.isEmpty(this)){this.setMinMax(e.getMin(),e.getMax());return}var t=this.center,i=t[0],a=t[1],s=t[2],o=this.halfExtents,l=o[0],u=o[1],c=o[2],d=i-l,h=i+l,f=a-u,v=a+u,g=s-c,m=s+c,y=e.center,w=y[0],T=y[1],G=y[2],x=e.halfExtents,_=x[0],p=x[1],b=x[2],R=w-_,B=w+_,j=T-p,Z=T+p,te=G-b,le=G+b;R<d&&(d=R),B>h&&(h=B),j<f&&(f=j),Z>v&&(v=Z),te<g&&(g=te),le>m&&(m=le),t[0]=(d+h)*.5,t[1]=(f+v)*.5,t[2]=(g+m)*.5,o[0]=(h-d)*.5,o[1]=(v-f)*.5,o[2]=(m-g)*.5,this.min[0]=d,this.min[1]=f,this.min[2]=g,this.max[0]=h,this.max[1]=v,this.max[2]=m}}},{key:"setFromTransformedAABB",value:function(e,t){var i=this.center,a=this.halfExtents,s=e.center,o=e.halfExtents,l=t[0],u=t[4],c=t[8],d=t[1],h=t[5],f=t[9],v=t[2],g=t[6],m=t[10],y=Math.abs(l),w=Math.abs(u),T=Math.abs(c),G=Math.abs(d),x=Math.abs(h),_=Math.abs(f),p=Math.abs(v),b=Math.abs(g),R=Math.abs(m);i[0]=t[12]+l*s[0]+u*s[1]+c*s[2],i[1]=t[13]+d*s[0]+h*s[1]+f*s[2],i[2]=t[14]+v*s[0]+g*s[1]+m*s[2],a[0]=y*o[0]+w*o[1]+T*o[2],a[1]=G*o[0]+x*o[1]+_*o[2],a[2]=p*o[0]+b*o[1]+R*o[2],R2(this.min,i,a),O2(this.max,i,a)}},{key:"intersects",value:function(e){var t=this.getMax(),i=this.getMin(),a=e.getMax(),s=e.getMin();return i[0]<=a[0]&&t[0]>=s[0]&&i[1]<=a[1]&&t[1]>=s[1]&&i[2]<=a[2]&&t[2]>=s[2]}},{key:"intersection",value:function(e){if(!this.intersects(e))return null;var t=new r,i=yY([0,0,0],this.getMin(),e.getMin()),a=xY([0,0,0],this.getMax(),e.getMax());return t.setMinMax(i,a),t}},{key:"getNegativeFarPoint",value:function(e){return e.pnVertexFlag===273?rp([0,0,0],this.min):e.pnVertexFlag===272?[this.min[0],this.min[1],this.max[2]]:e.pnVertexFlag===257?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===256?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===17?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===16?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===1?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]}},{key:"getPositiveFarPoint",value:function(e){return e.pnVertexFlag===273?rp([0,0,0],this.max):e.pnVertexFlag===272?[this.max[0],this.max[1],this.min[2]]:e.pnVertexFlag===257?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===256?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===17?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===16?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===1?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]}}],[{key:"isEmpty",value:function(e){return!e||e.halfExtents[0]===0&&e.halfExtents[1]===0&&e.halfExtents[2]===0}}])}(),EY=function(){function r(n,e){ri(this,r),this.distance=n||0,this.normal=e||E.al(0,1,0),this.updatePNVertexFlag()}return ii(r,[{key:"updatePNVertexFlag",value:function(){this.pnVertexFlag=(+(this.normal[0]>=0)<<8)+(+(this.normal[1]>=0)<<4)+ +(this.normal[2]>=0)}},{key:"distanceToPoint",value:function(e){return E.AK(e,this.normal)-this.distance}},{key:"normalize",value:function(){var e=1/E.Zh(this.normal);E.bA(this.normal,this.normal,e),this.distance*=e}},{key:"intersectsLine",value:function(e,t,i){var a=this.distanceToPoint(e),s=this.distanceToPoint(t),o=a/(a-s),l=o>=0&&o<=1;return l&&i&&E.t7(i,e,t,o),l}}])}(),rMe=function(r){return r[r.OUTSIDE=4294967295]="OUTSIDE",r[r.INSIDE=0]="INSIDE",r[r.INDETERMINATE=2147483647]="INDETERMINATE",r}({}),bY=function(){function r(n){if(ri(this,r),this.planes=[],n)this.planes=n;else for(var e=0;e<6;e++)this.planes.push(new EY)}return ii(r,[{key:"extractFromVPMatrix",value:function(e){var t=Ic(e,16),i=t[0],a=t[1],s=t[2],o=t[3],l=t[4],u=t[5],c=t[6],d=t[7],h=t[8],f=t[9],v=t[10],g=t[11],m=t[12],y=t[13],w=t[14],T=t[15];E.t8(this.planes[0].normal,o-i,d-l,g-h),this.planes[0].distance=T-m,E.t8(this.planes[1].normal,o+i,d+l,g+h),this.planes[1].distance=T+m,E.t8(this.planes[2].normal,o+a,d+u,g+f),this.planes[2].distance=T+y,E.t8(this.planes[3].normal,o-a,d-u,g-f),this.planes[3].distance=T-y,E.t8(this.planes[4].normal,o-s,d-c,g-v),this.planes[4].distance=T-w,E.t8(this.planes[5].normal,o+s,d+c,g+v),this.planes[5].distance=T+w,this.planes.forEach(function(G){G.normalize(),G.updatePNVertexFlag()})}}])}(),Lv=function(){function r(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;ri(this,r),this.x=0,this.y=0,this.x=n,this.y=e}return ii(r,[{key:"clone",value:function(){return new r(this.x,this.y)}},{key:"copyFrom",value:function(e){this.x=e.x,this.y=e.y}}])}(),q0=function(){function r(n,e,t,i){ri(this,r),this.x=n,this.y=e,this.width=t,this.height=i,this.left=n,this.right=n+t,this.top=e,this.bottom=e+i}return ii(r,[{key:"toJSON",value:function(){}}],[{key:"fromRect",value:function(e){return new r(e.x,e.y,e.width,e.height)}},{key:"applyTransform",value:function(e,t){var i=me.al(e.x,e.y,0,1),a=me.al(e.x+e.width,e.y,0,1),s=me.al(e.x,e.y+e.height,0,1),o=me.al(e.x+e.width,e.y+e.height,0,1),l=me.Ue(),u=me.Ue(),c=me.Ue(),d=me.Ue();me.fF(l,i,t),me.fF(u,a,t),me.fF(c,s,t),me.fF(d,o,t);var h=Math.min(l[0],u[0],c[0],d[0]),f=Math.min(l[1],u[1],c[1],d[1]),v=Math.max(l[0],u[0],c[0],d[0]),g=Math.max(l[1],u[1],c[1],d[1]);return r.fromRect({x:h,y:f,width:v-h,height:g-f})}}])}(),Lu="Method not implemented.",iMe="Use document.documentElement instead.",aMe="Cannot append a destroyed element.";function A2(r){return r===void 0?0:r>360||r<-360?r%360:r}var L2=E.Ue();function E_(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;return Array.isArray(r)&&r.length===3?t?E.d9(r):E.JG(L2,r):(0,pe.Z)(r)?t?E.al(r,n,e):E.t8(L2,r,n,e):t?E.al(r[0],r[1]||n,r[2]||e):E.t8(L2,r[0],r[1]||n,r[2]||e)}var kY=Math.PI/180;function Us(r){return r*kY}var wY=180/Math.PI;function Hf(r){return r*wY}var SY=.9;function sMe(r){return r%=400,r<0&&(r+=400),r*SY}function oMe(r){return r/360}function TY(r){return 360*r}var W1=Math.PI/2;function CY(r,n){var e=n[0],t=n[1],i=n[2],a=n[3],s=e*e,o=t*t,l=i*i,u=a*a,c=s+o+l+u,d=e*a-t*i;return d>.499995*c?(r[0]=W1,r[1]=2*Math.atan2(t,e),r[2]=0):d<-.499995*c?(r[0]=-W1,r[1]=2*Math.atan2(t,e),r[2]=0):(r[0]=Math.asin(2*(e*i-a*t)),r[1]=Math.atan2(2*(e*a+t*i),1-2*(l+u)),r[2]=Math.atan2(2*(e*t+i*a),1-2*(o+l))),r}function MY(r,n){var e,t,i=mat4.getScaling(vec3.create(),n),a=_slicedToArray(i,3),s=a[0],o=a[1],l=a[2],u=Math.asin(-n[2]/s);return u<W1?u>-W1?(e=Math.atan2(n[6]/o,n[10]/l),t=Math.atan2(n[1]/s,n[0]/s)):(t=0,e=-Math.atan2(n[4]/o,n[5]/o)):(t=0,e=Math.atan2(n[4]/o,n[5]/o)),r[0]=e,r[1]=u,r[2]=t,r}function lMe(r,n){return n.length===16?MY(r,n):CY(r,n)}function uMe(r,n,e,t,i){var a=Math.cos(r),s=Math.sin(r);return mat3.fromValues(t*a,i*s,0,-t*s,i*a,0,n,e,1)}function PY(r,n,e,t,i,a,s){var o=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1,l=2*a,u=e-n,c=t-i,d=l/u,h=l/c,f=(e+n)/u,v=(t+i)/c,g,m,y=s-a,w=s*a;return o?(g=-s/y,m=-w/y):(g=-(s+a)/y,m=-2*w/y),r[0]=d,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=h,r[6]=0,r[7]=0,r[8]=f,r[9]=v,r[10]=g,r[11]=-1,r[12]=0,r[13]=0,r[14]=m,r[15]=0,r}function cMe(r){var n=r[0],e=r[1],t=r[3],i=r[4],a=Math.sqrt(n*n+e*e),s=Math.sqrt(t*t+i*i),o=n*i-e*t;if(o<0&&(n<i?a=-a:s=-s),a){var l=1/a;n*=l,e*=l}if(s){var u=1/s;t*=u,i*=u}var c=Math.atan2(e,n),d=Hf(c);return[r[6],r[7],a,s,d]}var Wf=L.create(),zh=L.create(),ey=me.Ue(),Fi=[E.Ue(),E.Ue(),E.Ue()],eL=E.Ue();function NY(r,n,e,t,i,a){if(!OY(Wf,r)||(L.copy(zh,Wf),zh[3]=0,zh[7]=0,zh[11]=0,zh[15]=1,Math.abs(L.determinant(zh))<1e-8))return!1;var s=Wf[3],o=Wf[7],l=Wf[11],u=Wf[12],c=Wf[13],d=Wf[14],h=Wf[15];if(s!==0||o!==0||l!==0){ey[0]=s,ey[1]=o,ey[2]=l,ey[3]=h;var f=L.invert(zh,zh);if(!f)return!1;L.transpose(zh,zh),me.fF(i,ey,zh)}else i[0]=i[1]=i[2]=0,i[3]=1;if(n[0]=u,n[1]=c,n[2]=d,RY(Fi,Wf),e[0]=E.kE(Fi[0]),E.Fv(Fi[0],Fi[0]),t[0]=E.AK(Fi[0],Fi[1]),I2(Fi[1],Fi[1],Fi[0],1,-t[0]),e[1]=E.kE(Fi[1]),E.Fv(Fi[1],Fi[1]),t[0]/=e[1],t[1]=E.AK(Fi[0],Fi[2]),I2(Fi[2],Fi[2],Fi[0],1,-t[1]),t[2]=E.AK(Fi[1],Fi[2]),I2(Fi[2],Fi[2],Fi[1],1,-t[2]),e[2]=E.kE(Fi[2]),E.Fv(Fi[2],Fi[2]),t[1]/=e[2],t[2]/=e[2],E.kC(eL,Fi[1],Fi[2]),E.AK(Fi[0],eL)<0)for(var v=0;v<3;v++)e[v]*=-1,Fi[v][0]*=-1,Fi[v][1]*=-1,Fi[v][2]*=-1;return a[0]=.5*Math.sqrt(Math.max(1+Fi[0][0]-Fi[1][1]-Fi[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-Fi[0][0]+Fi[1][1]-Fi[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-Fi[0][0]-Fi[1][1]+Fi[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+Fi[0][0]+Fi[1][1]+Fi[2][2],0)),Fi[2][1]>Fi[1][2]&&(a[0]=-a[0]),Fi[0][2]>Fi[2][0]&&(a[1]=-a[1]),Fi[1][0]>Fi[0][1]&&(a[2]=-a[2]),!0}function OY(r,n){var e=n[15];if(e===0)return!1;for(var t=1/e,i=0;i<16;i++)r[i]=n[i]*t;return!0}function RY(r,n){r[0][0]=n[0],r[0][1]=n[1],r[0][2]=n[2],r[1][0]=n[4],r[1][1]=n[5],r[1][2]=n[6],r[2][0]=n[8],r[2][1]=n[9],r[2][2]=n[10]}function I2(r,n,e,t,i){r[0]=n[0]*t+e[0]*i,r[1]=n[1]*t+e[1]*i,r[2]=n[2]*t+e[2]*i}var Tl=function(r){return r[r.ORBITING=0]="ORBITING",r[r.EXPLORING=1]="EXPLORING",r[r.TRACKING=2]="TRACKING",r}({}),tL=function(r){return r[r.DEFAULT=0]="DEFAULT",r[r.ROTATIONAL=1]="ROTATIONAL",r[r.TRANSLATIONAL=2]="TRANSLATIONAL",r[r.CINEMATIC=3]="CINEMATIC",r}({}),Vh=function(r){return r[r.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",r[r.PERSPECTIVE=1]="PERSPECTIVE",r}({}),AY={UPDATED:"updated"},nL=2e-4,LY=function(){function r(){ri(this,r),this.clipSpaceNearZ=N2.NEGATIVE_ONE,this.eventEmitter=new Se.Z,this.matrix=L.create(),this.right=E.al(1,0,0),this.up=E.al(0,1,0),this.forward=E.al(0,0,1),this.position=E.al(0,0,1),this.focalPoint=E.al(0,0,0),this.distanceVector=E.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=L.create(),this.projectionMatrixInverse=L.create(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=Tl.EXPLORING,this.trackingMode=tL.DEFAULT,this.projectionMode=Vh.PERSPECTIVE,this.frustum=new bY,this.orthoMatrix=L.create()}return ii(r,[{key:"isOrtho",value:function(){return this.projectionMode===Vh.ORTHOGRAPHIC}},{key:"getProjectionMode",value:function(){return this.projectionMode}},{key:"getPerspective",value:function(){return this.jitteredProjectionMatrix||this.projectionMatrix}},{key:"getPerspectiveInverse",value:function(){return this.projectionMatrixInverse}},{key:"getFrustum",value:function(){return this.frustum}},{key:"getPosition",value:function(){return this.position}},{key:"getFocalPoint",value:function(){return this.focalPoint}},{key:"getDollyingStep",value:function(){return this.dollyingStep}},{key:"getNear",value:function(){return this.near}},{key:"getFar",value:function(){return this.far}},{key:"getZoom",value:function(){return this.zoom}},{key:"getOrthoMatrix",value:function(){return this.orthoMatrix}},{key:"getView",value:function(){return this.view}},{key:"setEnableUpdate",value:function(e){this.enableUpdate=e}},{key:"setType",value:function(e,t){return this.type=e,this.type===Tl.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===Tl.TRACKING&&t!==void 0&&this.setTrackingMode(t),this}},{key:"setProjectionMode",value:function(e){return this.projectionMode=e,this}},{key:"setTrackingMode",value:function(e){if(this.type!==Tl.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=e,this}},{key:"setWorldRotation",value:function(e){return this.rotateWorld=e,this._getAngles(),this}},{key:"getViewTransform",value:function(){return L.invert(L.create(),this.matrix)}},{key:"getWorldTransform",value:function(){return this.matrix}},{key:"jitterProjectionMatrix",value:function(e,t){var i=L.fromTranslation(L.create(),[e,t,0]);this.jitteredProjectionMatrix=L.multiply(L.create(),i,this.projectionMatrix)}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0}},{key:"setMatrix",value:function(e){return this.matrix=e,this._update(),this}},{key:"setProjectionMatrix",value:function(e){this.projectionMatrix=e}},{key:"setFov",value:function(e){return this.setPerspective(this.near,this.far,e,this.aspect),this}},{key:"setAspect",value:function(e){return this.setPerspective(this.near,this.far,this.fov,e),this}},{key:"setNear",value:function(e){return this.projectionMode===Vh.PERSPECTIVE?this.setPerspective(e,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,e,this.far),this}},{key:"setFar",value:function(e){return this.projectionMode===Vh.PERSPECTIVE?this.setPerspective(this.near,e,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,e),this}},{key:"setViewOffset",value:function(e,t,i,a,s,o){return this.aspect=e/t,this.view===void 0&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=a,this.view.width=s,this.view.height=o,this.projectionMode===Vh.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===Vh.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"setZoom",value:function(e){return this.zoom=e,this.projectionMode===Vh.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===Vh.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this}},{key:"setZoomByViewportPoint",value:function(e,t){var i=this.canvas.viewport2Canvas({x:t[0],y:t[1]}),a=i.x,s=i.y,o=this.roll;this.rotate(0,0,-o),this.setPosition(a,s),this.setFocalPoint(a,s),this.setZoom(e),this.rotate(0,0,o);var l=this.canvas.viewport2Canvas({x:t[0],y:t[1]}),u=l.x,c=l.y,d=E.al(u-a,c-s,0),h=E.AK(d,this.right)/E.kE(this.right),f=E.AK(d,this.up)/E.kE(this.up),v=this.getPosition(),g=Ic(v,2),m=g[0],y=g[1],w=this.getFocalPoint(),T=Ic(w,2),G=T[0],x=T[1];return this.setPosition(m-h,y-f),this.setFocalPoint(G-h,x-f),this}},{key:"setPerspective",value:function(e,t,i,a){var s;this.projectionMode=Vh.PERSPECTIVE,this.fov=i,this.near=e,this.far=t,this.aspect=a;var o=this.near*Math.tan(Us(.5*this.fov))/this.zoom,l=2*o,u=this.aspect*l,c=-.5*u;if((s=this.view)!==null&&s!==void 0&&s.enabled){var d=this.view.fullWidth,h=this.view.fullHeight;c+=this.view.offsetX*u/d,o-=this.view.offsetY*l/h,u*=this.view.width/d,l*=this.view.height/h}return PY(this.projectionMatrix,c,c+u,o-l,o,e,this.far,this.clipSpaceNearZ===N2.ZERO),L.invert(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this}},{key:"setOrthographic",value:function(e,t,i,a,s,o){var l;this.projectionMode=Vh.ORTHOGRAPHIC,this.rright=t,this.left=e,this.top=i,this.bottom=a,this.near=s,this.far=o;var u=(this.rright-this.left)/(2*this.zoom),c=(this.top-this.bottom)/(2*this.zoom),d=(this.rright+this.left)/2,h=(this.top+this.bottom)/2,f=d-u,v=d+u,g=h+c,m=h-c;if((l=this.view)!==null&&l!==void 0&&l.enabled){var y=(this.rright-this.left)/this.view.fullWidth/this.zoom,w=(this.top-this.bottom)/this.view.fullHeight/this.zoom;f+=y*this.view.offsetX,v=f+y*this.view.width,g-=w*this.view.offsetY,m=g-w*this.view.height}return this.clipSpaceNearZ===N2.NEGATIVE_ONE?L.ortho(this.projectionMatrix,f,v,g,m,s,o):L.orthoZO(this.projectionMatrix,f,v,g,m,s,o),L.invert(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this}},{key:"setPosition",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.position[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.position[2],a=E_(e,t,i);return this._setPosition(a),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this}},{key:"setFocalPoint",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.focalPoint[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.focalPoint[2],a=E.al(0,1,0);if(this.focalPoint=E_(e,t,i),this.trackingMode===tL.CINEMATIC){var s=E.$X(E.Ue(),this.focalPoint,this.position);e=s[0],t=s[1],i=s[2];var o=E.kE(s),l=Hf(Math.asin(t/o)),u=90+Hf(Math.atan2(i,e)),c=L.create();L.rotateY(c,c,Us(u)),L.rotateX(c,c,Us(l)),a=E.fF(E.Ue(),[0,1,0],c)}return L.invert(this.matrix,L.lookAt(L.create(),this.position,this.focalPoint,a)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this}},{key:"getDistance",value:function(){return this.distance}},{key:"getDistanceVector",value:function(){return this.distanceVector}},{key:"setDistance",value:function(e){if(this.distance===e||e<0)return this;this.distance=e,this.distance<nL&&(this.distance=nL),this.dollyingStep=this.distance/100;var t=E.Ue();e=this.distance;var i=this.forward,a=this.focalPoint;return t[0]=e*i[0]+a[0],t[1]=e*i[1]+a[1],t[2]=e*i[2]+a[2],this._setPosition(t),this.triggerUpdate(),this}},{key:"setMaxDistance",value:function(e){return this.maxDistance=e,this}},{key:"setMinDistance",value:function(e){return this.minDistance=e,this}},{key:"setAzimuth",value:function(e){return this.azimuth=A2(e),this.computeMatrix(),this._getAxes(),this.type===Tl.ORBITING||this.type===Tl.EXPLORING?this._getPosition():this.type===Tl.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getAzimuth",value:function(){return this.azimuth}},{key:"setElevation",value:function(e){return this.elevation=A2(e),this.computeMatrix(),this._getAxes(),this.type===Tl.ORBITING||this.type===Tl.EXPLORING?this._getPosition():this.type===Tl.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getElevation",value:function(){return this.elevation}},{key:"setRoll",value:function(e){return this.roll=A2(e),this.computeMatrix(),this._getAxes(),this.type===Tl.ORBITING||this.type===Tl.EXPLORING?this._getPosition():this.type===Tl.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getRoll",value:function(){return this.roll}},{key:"_update",value:function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()}},{key:"computeMatrix",value:function(){var e=X.yY(X.Ue(),[0,0,1],Us(this.roll));L.identity(this.matrix);var t=X.yY(X.Ue(),[1,0,0],Us((this.rotateWorld&&this.type!==Tl.TRACKING||this.type===Tl.TRACKING?1:-1)*this.elevation)),i=X.yY(X.Ue(),[0,1,0],Us((this.rotateWorld&&this.type!==Tl.TRACKING||this.type===Tl.TRACKING?1:-1)*this.azimuth)),a=X.Jp(X.Ue(),i,t);a=X.Jp(X.Ue(),a,e);var s=L.fromQuat(L.create(),a);this.type===Tl.ORBITING||this.type===Tl.EXPLORING?(L.translate(this.matrix,this.matrix,this.focalPoint),L.multiply(this.matrix,this.matrix,s),L.translate(this.matrix,this.matrix,[0,0,this.distance])):this.type===Tl.TRACKING&&(L.translate(this.matrix,this.matrix,this.position),L.multiply(this.matrix,this.matrix,s))}},{key:"_setPosition",value:function(e,t,i){this.position=E_(e,t,i);var a=this.matrix;a[12]=this.position[0],a[13]=this.position[1],a[14]=this.position[2],a[15]=1,this._getOrthoMatrix()}},{key:"_getAxes",value:function(){E.JG(this.right,E_(me.fF(me.Ue(),[1,0,0,0],this.matrix))),E.JG(this.up,E_(me.fF(me.Ue(),[0,1,0,0],this.matrix))),E.JG(this.forward,E_(me.fF(me.Ue(),[0,0,1,0],this.matrix))),E.Fv(this.right,this.right),E.Fv(this.up,this.up),E.Fv(this.forward,this.forward)}},{key:"_getAngles",value:function(){var e=this.distanceVector[0],t=this.distanceVector[1],i=this.distanceVector[2],a=E.kE(this.distanceVector);if(a===0){this.elevation=0,this.azimuth=0;return}this.type===Tl.TRACKING?(this.elevation=Hf(Math.asin(t/a)),this.azimuth=Hf(Math.atan2(-e,-i))):this.rotateWorld?(this.elevation=Hf(Math.asin(t/a)),this.azimuth=Hf(Math.atan2(-e,-i))):(this.elevation=-Hf(Math.asin(t/a)),this.azimuth=-Hf(Math.atan2(-e,-i)))}},{key:"_getPosition",value:function(){E.JG(this.position,E_(me.fF(me.Ue(),[0,0,0,1],this.matrix))),this._getDistance()}},{key:"_getFocalPoint",value:function(){E.kK(this.distanceVector,[0,0,-this.distance],Ke.xO(Ke.Ue(),this.matrix)),E.IH(this.focalPoint,this.position,this.distanceVector),this._getDistance()}},{key:"_getDistance",value:function(){this.distanceVector=E.$X(E.Ue(),this.focalPoint,this.position),this.distance=E.kE(this.distanceVector),this.dollyingStep=this.distance/100}},{key:"_getOrthoMatrix",value:function(){if(this.projectionMode===Vh.ORTHOGRAPHIC){var e=this.position,t=X.yY(X.Ue(),[0,0,1],-this.roll*Math.PI/180);L.fromRotationTranslationScaleOrigin(this.orthoMatrix,t,E.al((this.rright-this.left)/2-e[0],(this.top-this.bottom)/2-e[1],0),E.al(this.zoom,this.zoom,1),e)}}},{key:"triggerUpdate",value:function(){if(this.enableUpdate){var e=this.getViewTransform(),t=L.multiply(L.create(),this.getPerspective(),e);this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(AY.UPDATED)}}},{key:"rotate",value:function(e,t,i){throw new Error(Lu)}},{key:"pan",value:function(e,t){throw new Error(Lu)}},{key:"dolly",value:function(e){throw new Error(Lu)}},{key:"createLandmark",value:function(e,t){throw new Error(Lu)}},{key:"gotoLandmark",value:function(e,t){throw new Error(Lu)}},{key:"cancelLandmarkAnimation",value:function(){throw new Error(Lu)}}])}(),dMe=function(r){return r[r.Standard=0]="Standard",r}({}),D2=function(r){return r[r.ADDED=0]="ADDED",r[r.REMOVED=1]="REMOVED",r[r.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED",r}({}),IY={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new q0(0,0,0,0)},zn=function(r){return r.COORDINATE="<coordinate>",r.COLOR="<color>",r.PAINT="<paint>",r.NUMBER="<number>",r.ANGLE="<angle>",r.OPACITY_VALUE="<opacity-value>",r.SHADOW_BLUR="<shadow-blur>",r.LENGTH="<length>",r.PERCENTAGE="<percentage>",r.LENGTH_PERCENTAGE="<length> | <percentage>",r.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",r.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",r.LIST_OF_POINTS="<list-of-points>",r.PATH="<path>",r.FILTER="<filter>",r.Z_INDEX="<z-index>",r.OFFSET_DISTANCE="<offset-distance>",r.DEFINED_PATH="<defined-path>",r.MARKER="<marker>",r.TRANSFORM="<transform>",r.TRANSFORM_ORIGIN="<transform-origin>",r.TEXT="<text>",r.TEXT_TRANSFORM="<text-transform>",r}({});function hc(r,n){if(typeof r!="function"||n!=null&&typeof n!="function")throw new TypeError("Expected a function");var e=function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var o=n?n.apply(this,a):a[0],l=e.cache;if(l.has(o))return l.get(o);var u=r.apply(this,a);return e.cache=l.set(o,u)||l,u};return e.cache=new(hc.Cache||Map),e}hc.Cache=Map;var Qn=function(r){return r[r.kUnknown=0]="kUnknown",r[r.kNumber=1]="kNumber",r[r.kPercentage=2]="kPercentage",r[r.kEms=3]="kEms",r[r.kPixels=4]="kPixels",r[r.kRems=5]="kRems",r[r.kDegrees=6]="kDegrees",r[r.kRadians=7]="kRadians",r[r.kGradians=8]="kGradians",r[r.kTurns=9]="kTurns",r[r.kMilliseconds=10]="kMilliseconds",r[r.kSeconds=11]="kSeconds",r[r.kInteger=12]="kInteger",r}({}),Uh=function(r){return r[r.kUNumber=0]="kUNumber",r[r.kUPercent=1]="kUPercent",r[r.kULength=2]="kULength",r[r.kUAngle=3]="kUAngle",r[r.kUTime=4]="kUTime",r[r.kUOther=5]="kUOther",r}({}),DY=function(r){return r[r.kYes=0]="kYes",r[r.kNo=1]="kNo",r}({}),FY=function(r){return r[r.kYes=0]="kYes",r[r.kNo=1]="kNo",r}({}),BY=[{name:"em",unit_type:Qn.kEms},{name:"px",unit_type:Qn.kPixels},{name:"deg",unit_type:Qn.kDegrees},{name:"rad",unit_type:Qn.kRadians},{name:"grad",unit_type:Qn.kGradians},{name:"ms",unit_type:Qn.kMilliseconds},{name:"s",unit_type:Qn.kSeconds},{name:"rem",unit_type:Qn.kRems},{name:"turn",unit_type:Qn.kTurns}],ip=function(r){return r[r.kUnknownType=0]="kUnknownType",r[r.kUnparsedType=1]="kUnparsedType",r[r.kKeywordType=2]="kKeywordType",r[r.kUnitType=3]="kUnitType",r[r.kSumType=4]="kSumType",r[r.kProductType=5]="kProductType",r[r.kNegateType=6]="kNegateType",r[r.kInvertType=7]="kInvertType",r[r.kMinType=8]="kMinType",r[r.kMaxType=9]="kMaxType",r[r.kClampType=10]="kClampType",r[r.kTransformType=11]="kTransformType",r[r.kPositionType=12]="kPositionType",r[r.kURLImageType=13]="kURLImageType",r[r.kColorType=14]="kColorType",r[r.kUnsupportedColorType=15]="kUnsupportedColorType",r}({}),$Y=function(n){return BY.find(function(e){return e.name===n}).unit_type},GY=function(n){return n?n==="number"?Qn.kNumber:n==="percent"||n==="%"?Qn.kPercentage:$Y(n):Qn.kUnknown},zY=function(n){switch(n){case Qn.kNumber:case Qn.kInteger:return Uh.kUNumber;case Qn.kPercentage:return Uh.kUPercent;case Qn.kPixels:return Uh.kULength;case Qn.kMilliseconds:case Qn.kSeconds:return Uh.kUTime;case Qn.kDegrees:case Qn.kRadians:case Qn.kGradians:case Qn.kTurns:return Uh.kUAngle;default:return Uh.kUOther}},VY=function(n){switch(n){case Uh.kUNumber:return Qn.kNumber;case Uh.kULength:return Qn.kPixels;case Uh.kUPercent:return Qn.kPercentage;case Uh.kUTime:return Qn.kSeconds;case Uh.kUAngle:return Qn.kDegrees;default:return Qn.kUnknown}},rL=function(n){var e=1;switch(n){case Qn.kPixels:case Qn.kDegrees:case Qn.kSeconds:break;case Qn.kMilliseconds:e=.001;break;case Qn.kRadians:e=180/Math.PI;break;case Qn.kGradians:e=.9;break;case Qn.kTurns:e=360;break}return e},F2=function(n){switch(n){case Qn.kNumber:case Qn.kInteger:return"";case Qn.kPercentage:return"%";case Qn.kEms:return"em";case Qn.kRems:return"rem";case Qn.kPixels:return"px";case Qn.kDegrees:return"deg";case Qn.kRadians:return"rad";case Qn.kGradians:return"grad";case Qn.kMilliseconds:return"ms";case Qn.kSeconds:return"s";case Qn.kTurns:return"turn"}return""},Y1=function(){function r(){ri(this,r)}return ii(r,[{key:"toString",value:function(){return this.buildCSSText(DY.kNo,FY.kNo,"")}},{key:"isNumericValue",value:function(){return this.getType()>=ip.kUnitType&&this.getType()<=ip.kClampType}}],[{key:"isAngle",value:function(e){return e===Qn.kDegrees||e===Qn.kRadians||e===Qn.kGradians||e===Qn.kTurns}},{key:"isLength",value:function(e){return e>=Qn.kEms&&e<Qn.kDegrees}},{key:"isRelativeUnit",value:function(e){return e===Qn.kPercentage||e===Qn.kEms||e===Qn.kRems}},{key:"isTime",value:function(e){return e===Qn.kSeconds||e===Qn.kMilliseconds}}])}(),UY=function(r){function n(e){var t;return ri(this,n),t=_d(this,n),t.colorSpace=e,t}return md(n,r),ii(n,[{key:"getType",value:function(){return ip.kColorType}},{key:"to",value:function(t){return this}}])}(Y1),Z1=function(r){return r[r.Constant=0]="Constant",r[r.LinearGradient=1]="LinearGradient",r[r.RadialGradient=2]="RadialGradient",r}({}),X1=function(r){function n(e,t){var i;return ri(this,n),i=_d(this,n),i.type=e,i.value=t,i}return md(n,r),ii(n,[{key:"clone",value:function(){return new n(this.type,this.value)}},{key:"buildCSSText",value:function(t,i,a){return a}},{key:"getType",value:function(){return ip.kColorType}}])}(Y1),Kd=function(r){function n(e){var t;return ri(this,n),t=_d(this,n),t.value=e,t}return md(n,r),ii(n,[{key:"clone",value:function(){return new n(this.value)}},{key:"getType",value:function(){return ip.kKeywordType}},{key:"buildCSSText",value:function(t,i,a){return a+this.value}}])}(Y1),jY=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",t="";return Number.isFinite(n)?t="NaN":n>0?t="infinity":t="-infinity",t+=e},B2=function(n){return VY(zY(n))},ds=function(r){function n(e){var t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Qn.kNumber;ri(this,n),t=_d(this,n);var a;return typeof i=="string"?a=GY(i):a=i,t.unit=a,t.value=e,t}return md(n,r),ii(n,[{key:"clone",value:function(){return new n(this.value,this.unit)}},{key:"equals",value:function(t){var i=t;return this.value===i.value&&this.unit===i.unit}},{key:"getType",value:function(){return ip.kUnitType}},{key:"convertTo",value:function(t){if(this.unit===t)return new n(this.value,this.unit);var i=B2(this.unit);if(i!==B2(t)||i===Qn.kUnknown)return null;var a=rL(this.unit)/rL(t);return new n(this.value*a,t)}},{key:"buildCSSText",value:function(t,i,a){var s;switch(this.unit){case Qn.kUnknown:break;case Qn.kInteger:s=Number(this.value).toFixed(0);break;case Qn.kNumber:case Qn.kPercentage:case Qn.kEms:case Qn.kRems:case Qn.kPixels:case Qn.kDegrees:case Qn.kRadians:case Qn.kGradians:case Qn.kMilliseconds:case Qn.kSeconds:case Qn.kTurns:{var o=-999999,l=999999,u=this.value,c=F2(this.unit);if(u<o||u>l){var d=F2(this.unit);!Number.isFinite(u)||Number.isNaN(u)?s=jY(u,d):s=u+(d||"")}else s="".concat(u).concat(c)}}return a+=s,a}}])}(Y1),jh=new ds(0,"px");new ds(1,"px");var b_=new ds(0,"deg"),$2=function(r){function n(e,t,i){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;return ri(this,n),a=_d(this,n,["rgb"]),a.r=e,a.g=t,a.b=i,a.alpha=s,a.isNone=o,a}return md(n,r),ii(n,[{key:"clone",value:function(){return new n(this.r,this.g,this.b,this.alpha)}},{key:"buildCSSText",value:function(t,i,a){return"".concat(a,"rgba(").concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")}}])}(UY),iL=new Kd("unset"),HY=new Kd("initial"),WY=new Kd("inherit"),G2={"":iL,unset:iL,initial:HY,inherit:WY},YY=function(n){return G2[n]||(G2[n]=new Kd(n)),G2[n]},aL=new $2(0,0,0,0,!0),sL=new $2(0,0,0,0),ZY=hc(function(r,n,e,t){return new $2(r,n,e,t)},function(r,n,e,t){return"rgba(".concat(r,",").concat(n,",").concat(e,",").concat(t,")")}),bo=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Qn.kNumber;return new ds(n,e)};new ds(50,"%");function XY(r){var n=r.type,e=r.value;return n==="hex"?"#".concat(e):n==="literal"?e:n==="rgb"?"rgb(".concat(e.join(","),")"):"rgba(".concat(e.join(","),")")}var KY=function(){var r={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},n="";function e(V){throw new Error("".concat(n,": ").concat(V))}function t(){var V=i();return n.length>0&&e("Invalid input not EOF"),V}function i(){return T(a)}function a(){return s("linear-gradient",r.linearGradient,l)||s("repeating-linear-gradient",r.repeatingLinearGradient,l)||s("radial-gradient",r.radialGradient,d)||s("repeating-radial-gradient",r.repeatingRadialGradient,d)||s("conic-gradient",r.conicGradient,d)}function s(V,ee,he){return o(ee,function(ut){var ct=he();return ct&&(ue(r.comma)||e("Missing comma before color stops")),{type:V,orientation:ct,colorStops:T(G)}})}function o(V,ee){var he=ue(V);if(he){ue(r.startCall)||e("Missing (");var ut=ee(he);return ue(r.endCall)||e("Missing )"),ut}}function l(){return u()||c()}function u(){return le("directional",r.sideOrCorner,1)}function c(){return le("angular",r.angleValue,1)}function d(){var V,ee=h(),he;return ee&&(V=[],V.push(ee),he=n,ue(r.comma)&&(ee=h(),ee?V.push(ee):n=he)),V}function h(){var V=f()||v();if(V)V.at=m();else{var ee=g();if(ee){V=ee;var he=m();he&&(V.at=he)}else{var ut=y();ut&&(V={type:"default-radial",at:ut})}}return V}function f(){var V=le("shape",/^(circle)/i,0);return V&&(V.style=te()||g()),V}function v(){var V=le("shape",/^(ellipse)/i,0);return V&&(V.style=j()||g()),V}function g(){return le("extent-keyword",r.extentKeywords,1)}function m(){if(le("position",/^at/,0)){var V=y();return V||e("Missing positioning value"),V}}function y(){var V=w();if(V.x||V.y)return{type:"position",value:V}}function w(){return{x:j(),y:j()}}function T(V){var ee=V(),he=[];if(ee)for(he.push(ee);ue(r.comma);)ee=V(),ee?he.push(ee):e("One extra comma");return he}function G(){var V=x();return V||e("Expected color definition"),V.length=j(),V}function x(){return p()||R()||b()||_()}function _(){return le("literal",r.literalColor,0)}function p(){return le("hex",r.hexColor,1)}function b(){return o(r.rgbColor,function(){return{type:"rgb",value:T(B)}})}function R(){return o(r.rgbaColor,function(){return{type:"rgba",value:T(B)}})}function B(){return ue(r.number)[1]}function j(){return le("%",r.percentageValue,1)||Z()||te()}function Z(){return le("position-keyword",r.positionKeywords,1)}function te(){return le("px",r.pixelValue,1)||le("em",r.emValue,1)}function le(V,ee,he){var ut=ue(ee);if(ut)return{type:V,value:ut[he]}}function ue(V){var ee=/^[\n\r\t\s]+/.exec(n);ee&&se(ee[0].length);var he=V.exec(n);return he&&se(he[0].length),he}function se(V){n=n.substring(V)}return function(V){return n=V,t()}}();function hMe(r,n,e,t){var i=Us(t.value),a=0,s=0,o=a+n/2,l=s+e/2,u=Math.abs(n*Math.cos(i))+Math.abs(e*Math.sin(i)),c=r[0]+o-Math.cos(i)*u/2,d=r[1]+l-Math.sin(i)*u/2,h=r[0]+o+Math.cos(i)*u/2,f=r[1]+l+Math.sin(i)*u/2;return{x1:c,y1:d,x2:h,y2:f}}function fMe(r,n,e,t,i,a){var s=t.value,o=i.value;t.unit===Qn.kPercentage&&(s=t.value/100*n),i.unit===Qn.kPercentage&&(o=i.value/100*e);var l=Math.max(distanceSquareRoot([0,0],[s,o]),distanceSquareRoot([0,e],[s,o]),distanceSquareRoot([n,e],[s,o]),distanceSquareRoot([n,0],[s,o]));return a&&(a instanceof ds?l=a.value:a instanceof Kd&&(a.value==="closest-side"?l=Math.min(s,n-s,o,e-o):a.value==="farthest-side"?l=Math.max(s,n-s,o,e-o):a.value==="closest-corner"&&(l=Math.min(distanceSquareRoot([0,0],[s,o]),distanceSquareRoot([0,e],[s,o]),distanceSquareRoot([n,e],[s,o]),distanceSquareRoot([n,0],[s,o]))))),{x:s+r[0],y:o+r[1],r:l}}var JY=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,QY=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,qY=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,oL=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function eZ(r){var n,e=r.length;if(r[e-1].length=(n=r[e-1].length)!==null&&n!==void 0?n:{type:"%",value:"100"},e>1){var t;r[0].length=(t=r[0].length)!==null&&t!==void 0?t:{type:"%",value:"0"}}for(var i=0,a=Number(r[0].length.value),s=1;s<e;s++){var o,l=(o=r[s].length)===null||o===void 0?void 0:o.value;if(!(0,xe.Z)(l)&&!(0,xe.Z)(a)){for(var u=1;u<s-i;u++)r[i+u].length={type:"%",value:"".concat(a+(Number(l)-a)*u/(s-i))};i=s,a=Number(l)}}}var tZ={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},nZ=hc(function(r){var n;return r.type==="angular"?n=Number(r.value):n=tZ[r.value]||0,bo(n,"deg")}),rZ=hc(function(r){var n=50,e=50,t="%",i="%";if((r==null?void 0:r.type)==="position"){var a=r.value,s=a.x,o=a.y;(s==null?void 0:s.type)==="position-keyword"&&(s.value==="left"?n=0:s.value==="center"?n=50:s.value==="right"?n=100:s.value==="top"?e=0:s.value==="bottom"&&(e=100)),(o==null?void 0:o.type)==="position-keyword"&&(o.value==="left"?n=0:o.value==="center"?e=50:o.value==="right"?n=100:o.value==="top"?e=0:o.value==="bottom"&&(e=100)),((s==null?void 0:s.type)==="px"||(s==null?void 0:s.type)==="%"||(s==null?void 0:s.type)==="em")&&(t=s==null?void 0:s.type,n=Number(s.value)),((o==null?void 0:o.type)==="px"||(o==null?void 0:o.type)==="%"||(o==null?void 0:o.type)==="em")&&(i=o==null?void 0:o.type,e=Number(o.value))}return{cx:bo(n,t),cy:bo(e,i)}}),iZ=hc(function(r){if(r.indexOf("linear")>-1||r.indexOf("radial")>-1){var n=KY(r);return n.map(function(o){var l=o.type,u=o.orientation,c=o.colorStops;eZ(c);var d=c.map(function(T){return{offset:bo(Number(T.length.value),"%"),color:XY(T)}});if(l==="linear-gradient")return new X1(Z1.LinearGradient,{angle:u?nZ(u):b_,steps:d});if(l==="radial-gradient"&&(u||(u=[{type:"shape",value:"circle"}]),u[0].type==="shape"&&u[0].value==="circle")){var h=rZ(u[0].at),f=h.cx,v=h.cy,g;if(u[0].style){var m=u[0].style,y=m.type,w=m.value;y==="extent-keyword"?g=YY(w):g=bo(w,y)}return new X1(Z1.RadialGradient,{cx:f,cy:v,size:g,steps:d})}})}var e=r[0];if(r[1]==="("||r[2]==="("){if(e==="l"){var t=JY.exec(r);if(t){var i,a=((i=t[2].match(oL))===null||i===void 0?void 0:i.map(function(o){return o.split(":")}))||[];return[new X1(Z1.LinearGradient,{angle:bo(parseFloat(t[1]),"deg"),steps:a.map(function(o){var l=Ic(o,2),u=l[0],c=l[1];return{offset:bo(Number(u)*100,"%"),color:c}})})]}}else if(e==="r"){var s=aZ(r);if(s)if((0,Ze.Z)(s))r=s;else return[new X1(Z1.RadialGradient,s)]}else if(e==="p")return sZ(r)}});function aZ(r){var n=QY.exec(r);if(n){var e,t=((e=n[4].match(oL))===null||e===void 0?void 0:e.map(function(i){return i.split(":")}))||[];return{cx:bo(50,"%"),cy:bo(50,"%"),steps:t.map(function(i){var a=Ic(i,2),s=a[0],o=a[1];return{offset:bo(Number(s)*100,"%"),color:o}})}}return null}function sZ(r){var n=qY.exec(r);if(n){var e=n[1],t=n[2];switch(e){case"a":e="repeat";break;case"x":e="repeat-x";break;case"y":e="repeat-y";break;case"n":e="no-repeat";break;default:e="no-repeat"}return{image:t,repetition:e}}return null}function vMe(r){return!!r.type&&!!r.value}function oZ(r){return r&&!!r.image}function lL(r){return r&&!(0,xe.Z)(r.r)&&!(0,xe.Z)(r.g)&&!(0,xe.Z)(r.b)}var ty=hc(function(r){if(oZ(r))return X0({repetition:"repeat"},r);if((0,xe.Z)(r)&&(r=""),r==="transparent")return sL;if(r==="currentColor")r="black";else if(r==="none")return aL;var n=iZ(r);if(n)return n;var e=V1(r),t=[0,0,0,0];return e!==null&&(t[0]=e.r||0,t[1]=e.g||0,t[2]=e.b||0,t[3]=e.opacity),ZY.apply(void 0,t)});function lZ(r,n){if(!(!lL(r)||!lL(n)))return[[Number(r.r),Number(r.g),Number(r.b),Number(r.alpha)],[Number(n.r),Number(n.g),Number(n.b),Number(n.alpha)],function(e){var t=e.slice();if(t[3])for(var i=0;i<3;i++)t[i]=Math.round((0,O.Z)(t[i],0,255));return t[3]=(0,O.Z)(t[3],0,1),"rgba(".concat(t.join(","),")")}]}function ny(r,n){if((0,xe.Z)(n))return bo(0,"px");if(n="".concat(n).trim().toLowerCase(),isFinite(Number(n))){if("px".search(r)>=0)return bo(Number(n),"px");if("deg".search(r)>=0)return bo(Number(n),"deg")}var e=[];n=n.replace(r,function(i){return e.push(i),"U".concat(i)});var t="U(".concat(r.source,")");return e.map(function(i){return bo(Number(n.replace(new RegExp("U".concat(i),"g"),"").replace(new RegExp(t,"g"),"*0")),i)})[0]}var uL=function(n){return ny(new RegExp("px","g"),n)},uZ=hc(uL),cZ=function(n){return ny(new RegExp("%","g"),n)};hc(cZ);var cL=function(n){return(0,pe.Z)(n)||isFinite(Number(n))?bo(Number(n)||0,"px"):ny(new RegExp("px|%|em|rem","g"),n)},z2=hc(cL),dL=function(n){return ny(new RegExp("deg|rad|grad|turn","g"),n)},dZ=hc(dL);function hZ(r,n,e,t){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a="",s=r.value||0,o=n.value||0,l=B2(r.unit),u=r.convertTo(l),c=n.convertTo(l);return u&&c?(s=u.value,o=c.value,a=F2(r.unit)):(ds.isLength(r.unit)||ds.isLength(n.unit))&&(s=pd(r,i,e),o=pd(n,i,e),a="px"),[s,o,function(d){return t&&(d=Math.max(d,0)),d+a}]}function Fc(r){var n=0;return r.unit===Qn.kDegrees?n=r.value:r.unit===Qn.kRadians?n=Hf(Number(r.value)):r.unit===Qn.kTurns?n=TY(Number(r.value)):r.value&&(n=r.value),n}function hL(r,n){var e;return Array.isArray(r)?e=r.map(function(t){return Number(t)}):(0,Ze.Z)(r)?e=r.split(" ").map(function(t){return Number(t)}):(0,pe.Z)(r)&&(e=[r]),n===2?e.length===1?[e[0],e[0]]:[e[0],e[1]]:e.length===1?[e[0],e[0],e[0],e[0]]:e.length===2?[e[0],e[1],e[0],e[1]]:e.length===3?[e[0],e[1],e[2],e[1]]:[e[0],e[1],e[2],e[3]]}function pd(r,n,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(r.unit===Qn.kPixels)return Number(r.value);if(r.unit===Qn.kPercentage&&e){var i=e.nodeName===ki.GROUP?e.getLocalBounds():e.getGeometryBounds();return(t?i.min[n]:0)+r.value/100*i.halfExtents[n]*2}return 0}var fZ=function(n){return ny(/deg|rad|grad|turn|px|%/g,n)},vZ=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function gZ(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(r=r.toLowerCase().trim(),r==="none")return[];for(var n=/\s*([\w-]+)\(([^)]*)\)/g,e=[],t,i=0;t=n.exec(r);){if(t.index!==i)return[];if(i=t.index+t[0].length,vZ.indexOf(t[1])>-1&&e.push({name:t[1],params:t[2].split(" ").map(function(a){return fZ(a)||ty(a)})}),n.lastIndex===r.length)return e}return[]}function fL(r){return r.toString()}var vL=function(n){return typeof n=="number"?bo(n):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(n)?bo(Number(n)):bo(0)},V2=hc(vL);hc(function(r){return(0,Ze.Z)(r)?r.split(" ").map(V2):r.map(V2)});function U2(r,n){return[r,n,fL]}function j2(r,n){return function(e,t){return[e,t,function(i){return fL((0,O.Z)(i,r,n))}]}}function gL(r,n){if(r.length===n.length)return[r,n,function(e){return e}]}function gMe(r){return r.parsedStyle.d.totalLength===0&&(r.parsedStyle.d.totalLength=getTotalLength(r.parsedStyle.d.absolutePath)),r.parsedStyle.d.totalLength}function _Me(r){return r.parsedStyle.points.totalLength===0&&(r.parsedStyle.points.totalLength=polylineLength(r.parsedStyle.points.points)),r.parsedStyle.points.totalLength}function _Z(r){for(var n=0;n<r.length;n++){var e=r[n-1],t=r[n],i=t[0];if(i==="M"&&e){var a=e[0],s=[t[1],t[2]],o=void 0;a==="L"||a==="M"?o=[e[1],e[2]]:(a==="C"||a==="A"||a==="Q")&&(o=[e[e.length-2],e[e.length-1]]),o&&K1(s,o)&&(r.splice(n,1),n--)}}}function mZ(r){for(var n=!1,e=r.length,t=0;t<e;t++){var i=r[t],a=i[0];if(a==="C"||a==="A"||a==="Q"){n=!0;break}}return n}function pZ(r){for(var n=[],e=[],t=[],i=0;i<r.length;i++){var a=r[i],s=a[0];s==="M"?(t.length&&(e.push(t),t=[]),t.push([a[1],a[2]])):s==="Z"?t.length&&(n.push(t),t=[]):t.push([a[1],a[2]])}return t.length>0&&e.push(t),{polygons:n,polylines:e}}function K1(r,n){return r[0]===n[0]&&r[1]===n[1]}function yZ(r,n){for(var e=[],t=[],i=[],a=0;a<r.length;a++){var s=r[a],o=s.currentPoint,l=s.params,u=s.prePoint,c=void 0;switch(s.command){case"Q":c=(0,Nt.x4)(u[0],u[1],l[1],l[2],l[3],l[4]);break;case"C":c=(0,Nt.l5)(u[0],u[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var d=s.arcParams;c=(0,Nt.vp)(d.cx,d.cy,d.rx,d.ry,d.xRotation,d.startAngle,d.endAngle);break;default:e.push(o[0]),t.push(o[1]);break}c&&(s.box=c,e.push(c.x,c.x+c.width),t.push(c.y,c.y+c.height)),n&&(s.command==="L"||s.command==="M")&&s.prePoint&&s.nextPoint&&i.push(s)}e=e.filter(function(G){return!Number.isNaN(G)&&G!==1/0&&G!==-1/0}),t=t.filter(function(G){return!Number.isNaN(G)&&G!==1/0&&G!==-1/0});var h=(0,ne.Z)(e),f=(0,ne.Z)(t),v=(0,qe.Z)(e),g=(0,qe.Z)(t);if(i.length===0)return{x:h,y:f,width:v-h,height:g-f};for(var m=0;m<i.length;m++){var y=i[m],w=y.currentPoint,T=void 0;w[0]===h?(T=J1(y,n),h-=T.xExtra):w[0]===v&&(T=J1(y,n),v+=T.xExtra),w[1]===f?(T=J1(y,n),f-=T.yExtra):w[1]===g&&(T=J1(y,n),g+=T.yExtra)}return{x:h,y:f,width:v-h,height:g-f}}function J1(r,n){var e=r.prePoint,t=r.currentPoint,i=r.nextPoint,a=Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2),s=Math.pow(t[0]-i[0],2)+Math.pow(t[1]-i[1],2),o=Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2),l=Math.acos((a+s-o)/(2*Math.sqrt(a)*Math.sqrt(s)));if(!l||Math.sin(l)===0||(0,dt.Z)(l,0))return{xExtra:0,yExtra:0};var u=Math.abs(Math.atan2(i[1]-t[1],i[0]-t[0])),c=Math.abs(Math.atan2(i[0]-t[0],i[1]-t[1]));u=u>Math.PI/2?Math.PI-u:u,c=c>Math.PI/2?Math.PI-c:c;var d={xExtra:Math.cos(l/2-u)*(n/2*(1/Math.sin(l/2)))-n/2||0,yExtra:Math.cos(c-l/2)*(n/2*(1/Math.sin(l/2)))-n/2||0};return d}function _L(r,n){return[n[0]+(n[0]-r[0]),n[1]+(n[1]-r[1])]}var mL=function(n,e){var t=n.x*e.x+n.y*e.y,i=Math.sqrt((Math.pow(n.x,2)+Math.pow(n.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2))),a=n.x*e.y-n.y*e.x<0?-1:1,s=a*Math.acos(t/i);return s},pL=function(n,e,t,i,a,s,o,l){e=Math.abs(e),t=Math.abs(t),i=(0,nt.Z)(i,360);var u=Us(i);if(n.x===o.x&&n.y===o.y)return{x:n.x,y:n.y,ellipticalArcAngle:0};if(e===0||t===0)return{x:0,y:0,ellipticalArcAngle:0};var c=(n.x-o.x)/2,d=(n.y-o.y)/2,h={x:Math.cos(u)*c+Math.sin(u)*d,y:-Math.sin(u)*c+Math.cos(u)*d},f=Math.pow(h.x,2)/Math.pow(e,2)+Math.pow(h.y,2)/Math.pow(t,2);f>1&&(e*=Math.sqrt(f),t*=Math.sqrt(f));var v=Math.pow(e,2)*Math.pow(t,2)-Math.pow(e,2)*Math.pow(h.y,2)-Math.pow(t,2)*Math.pow(h.x,2),g=Math.pow(e,2)*Math.pow(h.y,2)+Math.pow(t,2)*Math.pow(h.x,2),m=v/g;m=m<0?0:m;var y=(a!==s?1:-1)*Math.sqrt(m),w={x:y*(e*h.y/t),y:y*(-(t*h.x)/e)},T={x:Math.cos(u)*w.x-Math.sin(u)*w.y+(n.x+o.x)/2,y:Math.sin(u)*w.x+Math.cos(u)*w.y+(n.y+o.y)/2},G={x:(h.x-w.x)/e,y:(h.y-w.y)/t},x=mL({x:1,y:0},G),_={x:(-h.x-w.x)/e,y:(-h.y-w.y)/t},p=mL(G,_);!s&&p>0?p-=2*Math.PI:s&&p<0&&(p+=2*Math.PI),p%=2*Math.PI;var b=x+p*l,R=e*Math.cos(b),B=t*Math.sin(b),j={x:Math.cos(u)*R-Math.sin(u)*B+T.x,y:Math.sin(u)*R+Math.cos(u)*B+T.y,ellipticalArcStartAngle:x,ellipticalArcEndAngle:x+p,ellipticalArcAngle:b,ellipticalArcCenter:T,resultantRx:e,resultantRy:t};return j};function xZ(r){for(var n=[],e=null,t=null,i=null,a=0,s=r.length,o=0;o<s;o++){var l=r[o];t=r[o+1];var u=l[0],c={command:u,prePoint:e,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(u){case"M":i=[l[1],l[2]],a=o;break;case"A":var d=EZ(e,l);c.arcParams=d;break}if(u==="Z")e=i,t=r[a+1];else{var h=l.length;e=[l[h-2],l[h-1]]}t&&t[0]==="Z"&&(t=r[a],n[a]&&(n[a].prePoint=e)),c.currentPoint=e,n[a]&&K1(e,n[a].currentPoint)&&(n[a].prePoint=c.prePoint);var f=t?[t[t.length-2],t[t.length-1]]:null;c.nextPoint=f;var v=c.prePoint;if(["L","H","V"].includes(u))c.startTangent=[v[0]-e[0],v[1]-e[1]],c.endTangent=[e[0]-v[0],e[1]-v[1]];else if(u==="Q"){var g=[l[1],l[2]];c.startTangent=[v[0]-g[0],v[1]-g[1]],c.endTangent=[e[0]-g[0],e[1]-g[1]]}else if(u==="T"){var m=n[o-1],y=_L(m.currentPoint,v);m.command==="Q"?(c.command="Q",c.startTangent=[v[0]-y[0],v[1]-y[1]],c.endTangent=[e[0]-y[0],e[1]-y[1]]):(c.command="TL",c.startTangent=[v[0]-e[0],v[1]-e[1]],c.endTangent=[e[0]-v[0],e[1]-v[1]])}else if(u==="C"){var w=[l[1],l[2]],T=[l[3],l[4]];c.startTangent=[v[0]-w[0],v[1]-w[1]],c.endTangent=[e[0]-T[0],e[1]-T[1]],c.startTangent[0]===0&&c.startTangent[1]===0&&(c.startTangent=[w[0]-T[0],w[1]-T[1]]),c.endTangent[0]===0&&c.endTangent[1]===0&&(c.endTangent=[T[0]-w[0],T[1]-w[1]])}else if(u==="S"){var G=n[o-1],x=_L(G.currentPoint,v),_=[l[1],l[2]];G.command==="C"?(c.command="C",c.startTangent=[v[0]-x[0],v[1]-x[1]],c.endTangent=[e[0]-_[0],e[1]-_[1]]):(c.command="SQ",c.startTangent=[v[0]-_[0],v[1]-_[1]],c.endTangent=[e[0]-_[0],e[1]-_[1]])}else if(u==="A"){var p=yL(c,0),b=p.x,R=p.y,B=yL(c,1,!1),j=B.x,Z=B.y;c.startTangent=[b,R],c.endTangent=[j,Z]}n.push(c)}return n}function yL(r,n){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,t=r.arcParams,i=t.rx,a=i===void 0?0:i,s=t.ry,o=s===void 0?0:s,l=t.xRotation,u=t.arcFlag,c=t.sweepFlag,d=pL({x:r.prePoint[0],y:r.prePoint[1]},a,o,l,!!u,!!c,{x:r.currentPoint[0],y:r.currentPoint[1]},n),h=pL({x:r.prePoint[0],y:r.prePoint[1]},a,o,l,!!u,!!c,{x:r.currentPoint[0],y:r.currentPoint[1]},e?n+.005:n-.005),f=h.x-d.x,v=h.y-d.y,g=Math.sqrt(f*f+v*v);return{x:-f/g,y:-v/g}}function Q1(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function H2(r,n){return Q1(r)*Q1(n)?(r[0]*n[0]+r[1]*n[1])/(Q1(r)*Q1(n)):1}function xL(r,n){return(r[0]*n[1]<r[1]*n[0]?-1:1)*Math.acos(H2(r,n))}function EZ(r,n){var e=n[1],t=n[2],i=(0,nt.Z)(Us(n[3]),Math.PI*2),a=n[4],s=n[5],o=r[0],l=r[1],u=n[6],c=n[7],d=Math.cos(i)*(o-u)/2+Math.sin(i)*(l-c)/2,h=-1*Math.sin(i)*(o-u)/2+Math.cos(i)*(l-c)/2,f=d*d/(e*e)+h*h/(t*t);f>1&&(e*=Math.sqrt(f),t*=Math.sqrt(f));var v=e*e*(h*h)+t*t*(d*d),g=v?Math.sqrt((e*e*(t*t)-v)/v):1;a===s&&(g*=-1),isNaN(g)&&(g=0);var m=t?g*e*h/t:0,y=e?g*-t*d/e:0,w=(o+u)/2+Math.cos(i)*m-Math.sin(i)*y,T=(l+c)/2+Math.sin(i)*m+Math.cos(i)*y,G=[(d-m)/e,(h-y)/t],x=[(-1*d-m)/e,(-1*h-y)/t],_=xL([1,0],G),p=xL(G,x);return H2(G,x)<=-1&&(p=Math.PI),H2(G,x)>=1&&(p=0),s===0&&p>0&&(p-=2*Math.PI),s===1&&p<0&&(p+=2*Math.PI),{cx:w,cy:T,rx:K1(r,[u,c])?0:e,ry:K1(r,[u,c])?0:t,startAngle:_,endAngle:_+p,xRotation:i,arcFlag:a,sweepFlag:s}}function bZ(r,n,e){return r.reduce(function(t,i){var a="";if(i[0]==="M"||i[0]==="L"){var s=vec3.fromValues(i[1],i[2],0);e&&vec3.transformMat4(s,s,e),a="".concat(i[0]).concat(s[0],",").concat(s[1])}else if(i[0]==="Z")a=i[0];else if(i[0]==="C"){var o=vec3.fromValues(i[1],i[2],0),l=vec3.fromValues(i[3],i[4],0),u=vec3.fromValues(i[5],i[6],0);e&&(vec3.transformMat4(o,o,e),vec3.transformMat4(l,l,e),vec3.transformMat4(u,u,e)),a="".concat(i[0]).concat(o[0],",").concat(o[1],",").concat(l[0],",").concat(l[1],",").concat(u[0],",").concat(u[1])}else if(i[0]==="A"){var c=vec3.fromValues(i[6],i[7],0);e&&vec3.transformMat4(c,c,e),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],",").concat(i[5],",").concat(c[0],",").concat(c[1])}else if(i[0]==="Q"){var d=vec3.fromValues(i[1],i[2],0),h=vec3.fromValues(i[3],i[4],0);e&&(vec3.transformMat4(d,d,e),vec3.transformMat4(h,h,e)),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],"}")}return t+=a},"")}function kZ(r,n,e,t){return[["M",r,n],["L",e,t]]}function EL(r,n,e,t){var i=(-1+Math.sqrt(2))/3*4,a=r*i,s=n*i,o=e-r,l=e+r,u=t-n,c=t+n;return[["M",o,t],["C",o,t-s,e-a,u,e,u],["C",e+a,u,l,t-s,l,t],["C",l,t+s,e+a,c,e,c],["C",e-a,c,o,t+s,o,t],["Z"]]}function wZ(r,n){var e=r.map(function(t,i){return[i===0?"M":"L",t[0],t[1]]});return n&&e.push(["Z"]),e}function SZ(r,n,e,t,i){if(i){var a=_slicedToArray(i,4),s=a[0],o=a[1],l=a[2],u=a[3],c=r>0?1:-1,d=n>0?1:-1,h=c+d!==0?1:0;return[["M",c*s+e,t],["L",r-c*o+e,t],o?["A",o,o,0,0,h,r+e,d*o+t]:null,["L",r+e,n-d*l+t],l?["A",l,l,0,0,h,r+e-c*l,n+t]:null,["L",e+c*u,n+t],u?["A",u,u,0,0,h,e,n+t-d*u]:null,["L",e,d*s+t],s?["A",s,s,0,0,h,c*s+e,t]:null,["Z"]].filter(function(f){return f})}return[["M",e,t],["L",e+r,t],["L",e+r,t+n],["L",e,t+n],["Z"]]}function mMe(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r.getLocalTransform(),e=[];switch(r.nodeName){case ki.LINE:var t=r.parsedStyle,i=t.x1,a=i===void 0?0:i,s=t.y1,o=s===void 0?0:s,l=t.x2,u=l===void 0?0:l,c=t.y2,d=c===void 0?0:c;e=kZ(a,o,u,d);break;case ki.CIRCLE:{var h=r.parsedStyle,f=h.r,v=f===void 0?0:f,g=h.cx,m=g===void 0?0:g,y=h.cy,w=y===void 0?0:y;e=EL(v,v,m,w);break}case ki.ELLIPSE:{var T=r.parsedStyle,G=T.rx,x=G===void 0?0:G,_=T.ry,p=_===void 0?0:_,b=T.cx,R=b===void 0?0:b,B=T.cy,j=B===void 0?0:B;e=EL(x,p,R,j);break}case ki.POLYLINE:case ki.POLYGON:var Z=r.parsedStyle.points;e=wZ(Z.points,r.nodeName===ki.POLYGON);break;case ki.RECT:var te=r.parsedStyle,le=te.width,ue=le===void 0?0:le,se=te.height,V=se===void 0?0:se,ee=te.x,he=ee===void 0?0:ee,ut=te.y,ct=ut===void 0?0:ut,Lt=te.radius,vn=Lt&&Lt.some(function(rn){return rn!==0});e=SZ(ue,V,he,ct,vn&&Lt.map(function(rn){return clamp(rn,0,Math.min(Math.abs(ue)/2,Math.abs(V)/2))}));break;case ki.PATH:var tn=r.parsedStyle.d.absolutePath;e=_toConsumableArray(tn);break}if(e.length)return bZ(e,r,n)}function pMe(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a=r.map(function(s,o){var l=s[0],u=r[o+1],c=o===0&&(n!==0||e!==0),d=(o===r.length-1||u&&(u[0]==="M"||u[0]==="Z"))&&t!==0&&i!==0,h=c?[n,e]:[0,0],f=_slicedToArray(h,2),v=f[0],g=f[1],m=d?[t,i]:[0,0],y=_slicedToArray(m,2),w=y[0],T=y[1];switch(l){case"M":return"M ".concat(s[1]+v,",").concat(s[2]+g);case"L":return"L ".concat(s[1]+w,",").concat(s[2]+T);case"Q":return"Q ".concat(s[1]," ").concat(s[2],",").concat(s[3]+w," ").concat(s[4]+T);case"C":return"C ".concat(s[1]," ").concat(s[2],",").concat(s[3]," ").concat(s[4],",").concat(s[5]+w," ").concat(s[6]+T);case"A":return"A ".concat(s[1]," ").concat(s[2]," ").concat(s[3]," ").concat(s[4]," ").concat(s[5]," ").concat(s[6]+w," ").concat(s[7]+T);case"Z":return"Z";default:return null}}).filter(function(s){return s!==null}).join(" ");return~a.indexOf("NaN")?"":a}var bL=function(n){if(n===""||Array.isArray(n)&&n.length===0)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var e;try{e=(0,xt.A)(n)}catch(f){e=(0,xt.A)(""),console.error("[g]: Invalid SVG Path definition: ".concat(n))}_Z(e);var t=mZ(e),i=pZ(e),a=i.polygons,s=i.polylines,o=xZ(e),l=yZ(o,0),u=l.x,c=l.y,d=l.width,h=l.height;return{absolutePath:e,hasArc:t,segments:o,polygons:a,polylines:s,totalLength:0,rect:{x:Number.isFinite(u)?u:0,y:Number.isFinite(c)?c:0,width:Number.isFinite(d)?d:0,height:Number.isFinite(h)?h:0}}},TZ=hc(bL);function kL(r){return(0,Ze.Z)(r)?TZ(r):bL(r)}function CZ(r,n,e){var t=r.curve,i=n.curve;(!t||t.length===0)&&(t=(0,bt.Y)(r.absolutePath,!1),r.curve=t),(!i||i.length===0)&&(i=(0,bt.Y)(n.absolutePath,!1),n.curve=i);var a=[t,i];t.length!==i.length&&(a=(0,wt.x)(t,i));var s=(0,we.b)(a[0])!==(0,we.b)(a[1])?(0,oe.G)(a[0]):(0,Fe.U)(a[0]);return[s,(0,Ye.g)(a[1],s),function(o){return o}]}function MZ(r,n){var e;return(0,Ze.Z)(r)?e=r.split(" ").map(function(t){var i=t.split(","),a=Ic(i,2),s=a[0],o=a[1];return[Number(s),Number(o)]}):e=r,{points:e,totalLength:0,segments:[]}}function PZ(r,n){return[r.points,n.points,function(e){return e}]}var Wo=null,ap=/\s*(\w+)\(([^)]*)\)/g;function Bc(r){return function(n){var e=0;return r.map(function(t){return t===Wo?n[e++]:t})}}function k_(r){return r}var ry={matrix:["NNNNNN",[Wo,Wo,0,0,Wo,Wo,0,0,0,0,1,0,Wo,Wo,0,1],k_],matrix3d:["NNNNNNNNNNNNNNNN",k_],rotate:["A"],rotateX:["A"],rotateY:["A"],rotateZ:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",Bc([Wo,Wo,new ds(1)]),k_],scaleX:["N",Bc([Wo,new ds(1),new ds(1)]),Bc([Wo,new ds(1)])],scaleY:["N",Bc([new ds(1),Wo,new ds(1)]),Bc([new ds(1),Wo])],scaleZ:["N",Bc([new ds(1),new ds(1),Wo])],scale3d:["NNN",k_],skew:["Aa",null,k_],skewX:["A",null,Bc([Wo,b_])],skewY:["A",null,Bc([b_,Wo])],translate:["Tt",Bc([Wo,Wo,jh]),k_],translateX:["T",Bc([Wo,jh,jh]),Bc([Wo,jh])],translateY:["T",Bc([jh,Wo,jh]),Bc([jh,Wo])],translateZ:["L",Bc([jh,jh,Wo])],translate3d:["TTL",k_]};function wL(r){for(var n=[],e=r.length,t=0;t<e;t++){var i=r[t],a=i[0],s=i.slice(1);a==="translate"||a==="skew"?s.length===1&&s.push(0):a==="scale"&&s.length===1&&s.push(s[0]);var o=ry[a];if(!o)return[];var l=s.map(function(u){return bo(u)});n.push({t:a,d:l})}return n}function NZ(r){if(Array.isArray(r))return wL(r);if(r=(r||"none").trim(),r==="none")return[];var n=[],e,t=0;for(ap.lastIndex=0;e=ap.exec(r);){if(e.index!==t)return[];t=e.index+e[0].length;var i=e[1],a=ry[i];if(!a)return[];var s=e[2].split(","),o=a[0];if(o.length<s.length)return[];for(var l=[],u=0;u<o.length;u++){var c=s[u],d=o[u],h=void 0;if(c?h={A:function(v){return v.trim()==="0"?b_:dZ(v)},N:V2,T:z2,L:uZ}[d.toUpperCase()](c):h={a:b_,n:l[0],t:jh}[d],h===void 0)return[];l.push(h)}if(n.push({t:i,d:l}),ap.lastIndex===r.length)return n}return[]}function OZ(r){if(Array.isArray(r))return wL(r);if(r=(r||"none").trim(),r==="none")return[];var n=[],e,t=0;for(ap.lastIndex=0;e=ap.exec(r);){if(e.index!==t)return[];t=e.index+e[0].length;var i=e[1],a=ry[i];if(!a)return[];var s=e[2].split(","),o=a[0];if(o.length<s.length)return[];for(var l=[],u=0;u<o.length;u++){var c=s[u],d=o[u],h=void 0;if(c?h={A:function(v){return v.trim()==="0"?b_:dL(v)},N:vL,T:cL,L:uL}[d.toUpperCase()](c):h={a:b_,n:l[0],t:jh}[d],h===void 0)return[];l.push(h)}if(n.push({t:i,d:l}),ap.lastIndex===r.length)return n}return[]}function RZ(r){var n,e,t,i;switch(r.t){case"rotateX":return i=Us(Fc(r.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotateY":return i=Us(Fc(r.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotateZ":return i=Us(Fc(r.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":n=r.d[0].value,e=r.d[1].value,t=r.d[2].value,i=Us(Fc(r.d[3]));var a=n*n+e*e+t*t;if(a===0)n=1,e=0,t=0;else if(a!==1){var s=Math.sqrt(a);n/=s,e/=s,t/=s}var o=Math.sin(i/2),l=o*Math.cos(i/2),u=o*o;return[1-2*(e*e+t*t)*u,2*(n*e*u+t*l),2*(n*t*u-e*l),0,2*(n*e*u-t*l),1-2*(n*n+t*t)*u,2*(e*t*u+n*l),0,2*(n*t*u+e*l),2*(e*t*u-n*l),1-2*(n*n+e*e)*u,0,0,0,0,1];case"scale":return[r.d[0].value,0,0,0,0,r.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scaleX":return[r.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaleY":return[1,0,0,0,0,r.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scaleZ":return[1,0,0,0,0,1,0,0,0,0,r.d[0].value,0,0,0,0,1];case"scale3d":return[r.d[0].value,0,0,0,0,r.d[1].value,0,0,0,0,r.d[2].value,0,0,0,0,1];case"skew":var c=Us(Fc(r.d[0])),d=Us(Fc(r.d[1]));return[1,Math.tan(d),0,0,Math.tan(c),1,0,0,0,0,1,0,0,0,0,1];case"skewX":return i=Us(Fc(r.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewY":return i=Us(Fc(r.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return n=pd(r.d[0],0,null)||0,e=pd(r.d[1],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,e,0,1];case"translateX":return n=pd(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,0,0,1];case"translateY":return e=pd(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,e,0,1];case"translateZ":return t=pd(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,t,1];case"translate3d":return n=pd(r.d[0],0,null)||0,e=pd(r.d[1],0,null)||0,t=pd(r.d[2],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,e,t,1];case"perspective":var h=pd(r.d[0],0,null)||0,f=h?-1/h:0;return[1,0,0,0,0,1,0,0,0,0,1,f,0,0,0,1];case"matrix":return[r.d[0].value,r.d[1].value,0,0,r.d[2].value,r.d[3].value,0,0,0,0,1,0,r.d[4].value,r.d[5].value,0,1];case"matrix3d":return r.d.map(function(v){return v.value})}}function AZ(r,n){return[r[0]*n[0]+r[4]*n[1]+r[8]*n[2]+r[12]*n[3],r[1]*n[0]+r[5]*n[1]+r[9]*n[2]+r[13]*n[3],r[2]*n[0]+r[6]*n[1]+r[10]*n[2]+r[14]*n[3],r[3]*n[0]+r[7]*n[1]+r[11]*n[2]+r[15]*n[3],r[0]*n[4]+r[4]*n[5]+r[8]*n[6]+r[12]*n[7],r[1]*n[4]+r[5]*n[5]+r[9]*n[6]+r[13]*n[7],r[2]*n[4]+r[6]*n[5]+r[10]*n[6]+r[14]*n[7],r[3]*n[4]+r[7]*n[5]+r[11]*n[6]+r[15]*n[7],r[0]*n[8]+r[4]*n[9]+r[8]*n[10]+r[12]*n[11],r[1]*n[8]+r[5]*n[9]+r[9]*n[10]+r[13]*n[11],r[2]*n[8]+r[6]*n[9]+r[10]*n[10]+r[14]*n[11],r[3]*n[8]+r[7]*n[9]+r[11]*n[10]+r[15]*n[11],r[0]*n[12]+r[4]*n[13]+r[8]*n[14]+r[12]*n[15],r[1]*n[12]+r[5]*n[13]+r[9]*n[14]+r[13]*n[15],r[2]*n[12]+r[6]*n[13]+r[10]*n[14]+r[14]*n[15],r[3]*n[12]+r[7]*n[13]+r[11]*n[14]+r[15]*n[15]]}function LZ(r){return r.length===0?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:r.map(RZ).reduce(AZ)}function SL(r){var n=[0,0,0],e=[1,1,1],t=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return NY(LZ(r),n,e,t,i,a),[[n,e,t,a,i]]}var IZ=function(){function r(t,i){for(var a=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],s=0;s<4;s++)for(var o=0;o<4;o++)for(var l=0;l<4;l++)a[s][o]+=i[s][l]*t[l][o];return a}function n(t){return t[0][2]===0&&t[0][3]===0&&t[1][2]===0&&t[1][3]===0&&t[2][0]===0&&t[2][1]===0&&t[2][2]===1&&t[2][3]===0&&t[3][2]===0&&t[3][3]===1}function e(t,i,a,s,o){for(var l=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],u=0;u<4;u++)l[u][3]=o[u];for(var c=0;c<3;c++)for(var d=0;d<3;d++)l[3][c]+=t[d]*l[d][c];var h=s[0],f=s[1],v=s[2],g=s[3],m=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];m[0][0]=1-2*(f*f+v*v),m[0][1]=2*(h*f-v*g),m[0][2]=2*(h*v+f*g),m[1][0]=2*(h*f+v*g),m[1][1]=1-2*(h*h+v*v),m[1][2]=2*(f*v-h*g),m[2][0]=2*(h*v-f*g),m[2][1]=2*(f*v+h*g),m[2][2]=1-2*(h*h+f*f),l=r(l,m);var y=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];a[2]&&(y[2][1]=a[2],l=r(l,y)),a[1]&&(y[2][1]=0,y[2][0]=a[0],l=r(l,y)),a[0]&&(y[2][0]=0,y[1][0]=a[0],l=r(l,y));for(var w=0;w<3;w++)for(var T=0;T<3;T++)l[w][T]*=i[w];return n(l)?[l[0][0],l[0][1],l[1][0],l[1][1],l[3][0],l[3][1]]:l[0].concat(l[1],l[2],l[3])}return e}();function DZ(r){return r.toFixed(6).replace(".000000","")}function W2(r,n){var e,t;return r.decompositionPair!==n&&(r.decompositionPair=n,e=SL(r)),n.decompositionPair!==r&&(n.decompositionPair=r,t=SL(n)),e[0]===null||t[0]===null?[[!1],[!0],function(i){return i?n[0].d:r[0].d}]:(e[0].push(0),t[0].push(1),[e,t,function(i){var a=BZ(e[0][3],t[0][3],i[5]),s=IZ(i[0],i[1],i[2],a,i[4]),o=s.map(DZ).join(",");return o}])}function FZ(r,n){for(var e=0,t=0;t<r.length;t++)e+=r[t]*n[t];return e}function BZ(r,n,e){var t=FZ(r,n);t=(0,O.Z)(t,-1,1);var i=[];if(t===1)i=r;else for(var a=Math.acos(t),s=Math.sin(e*a)*1/Math.sqrt(1-t*t),o=0;o<4;o++)i.push(r[o]*(Math.cos(e*a)-t*s)+n[o]*s);return i}function Y2(r){return r.replace(/[XY]/,"")}function Z2(r){return r.replace(/(X|Y|Z|3d)?$/,"3d")}var $Z=function(n,e){return n==="perspective"&&e==="perspective"||(n==="matrix"||n==="matrix3d")&&(e==="matrix"||e==="matrix3d")};function GZ(r,n,e){var t=!1;if(!r.length||!n.length){r.length||(t=!0,r=n,n=[]);for(var i=function(){var j=r[a],Z=j.t,te=j.d,le=Z.substring(0,5)==="scale"?1:0;n.push({t:Z,d:te.map(function(ue){return typeof ue=="number"?bo(le):bo(le,ue.unit)})})},a=0;a<r.length;a++)i()}var s=[],o=[],l=[];if(r.length!==n.length){var u=W2(r,n);s=[u[0]],o=[u[1]],l=[["matrix",[u[2]]]]}else for(var c=0;c<r.length;c++){var d=r[c].t,h=n[c].t,f=r[c].d,v=n[c].d,g=ry[d],m=ry[h],y=void 0;if($Z(d,h)){var w=W2([r[c]],[n[c]]);s.push(w[0]),o.push(w[1]),l.push(["matrix",[w[2]]]);continue}else if(d===h)y=d;else if(g[2]&&m[2]&&Y2(d)===Y2(h))y=Y2(d),f=g[2](f),v=m[2](v);else if(g[1]&&m[1]&&Z2(d)===Z2(h))y=Z2(d),f=g[1](f),v=m[1](v);else{var T=W2(r,n);s=[T[0]],o=[T[1]],l=[["matrix",[T[2]]]];break}for(var G=[],x=[],_=[],p=0;p<f.length;p++){var b=hZ(f[p],v[p],e,!1,p);G[p]=b[0],x[p]=b[1],_.push(b[2])}s.push(G),o.push(x),l.push([y,_])}if(t){var R=s;s=o,o=R}return[s,o,function(B){return B.map(function(j,Z){var te=j.map(function(le,ue){return l[Z][1][ue](le)}).join(",");return l[Z][0]==="matrix"&&te.split(",").length===16&&(l[Z][0]="matrix3d"),l[Z][0]==="matrix3d"&&te.split(",").length===6&&(l[Z][0]="matrix"),"".concat(l[Z][0],"(").concat(te,")")}).join(" ")}]}var zZ=hc(function(r){if((0,Ze.Z)(r)){if(r==="text-anchor")return[bo(0,"px"),bo(0,"px")];var n=r.split(" ");return n.length===1&&(n[0]==="top"||n[0]==="bottom"?(n[1]=n[0],n[0]="center"):n[1]="center"),n.length!==2?null:[z2(TL(n[0])),z2(TL(n[1]))]}return[bo(r[0]||0,"px"),bo(r[1]||0,"px")]});function TL(r){return r==="center"?"50%":r==="left"||r==="top"?"0%":r==="right"||r==="bottom"?"100%":r}var CL=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:zn.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:zn.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:zn.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:zn.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:zn.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:zn.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:zn.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:zn.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:zn.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:zn.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:zn.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:zn.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:zn.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:zn.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:zn.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:zn.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:zn.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:zn.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:zn.FILTER},{n:"clipPath",syntax:zn.DEFINED_PATH},{n:"textPath",syntax:zn.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:zn.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:zn.TRANSFORM},{n:"transformOrigin",p:100,d:"0 0",l:!0,syntax:zn.TRANSFORM_ORIGIN},{n:"cx",int:!0,l:!0,d:"0",syntax:zn.COORDINATE},{n:"cy",int:!0,l:!0,d:"0",syntax:zn.COORDINATE},{n:"cz",int:!0,l:!0,d:"0",syntax:zn.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:zn.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:zn.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:zn.LENGTH_PERCENTAGE},{n:"x",int:!0,l:!0,d:"0",syntax:zn.COORDINATE},{n:"y",int:!0,l:!0,d:"0",syntax:zn.COORDINATE},{n:"z",int:!0,l:!0,d:"0",syntax:zn.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:zn.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:zn.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:zn.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:zn.COORDINATE},{n:"y1",int:!0,l:!0,syntax:zn.COORDINATE},{n:"z1",int:!0,l:!0,syntax:zn.COORDINATE},{n:"x2",int:!0,l:!0,syntax:zn.COORDINATE},{n:"y2",int:!0,l:!0,syntax:zn.COORDINATE},{n:"z2",int:!0,l:!0,syntax:zn.COORDINATE},{n:"d",int:!0,l:!0,d:"",syntax:zn.PATH,p:50},{n:"points",int:!0,l:!0,syntax:zn.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:zn.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:zn.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:zn.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:zn.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:zn.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:zn.NUMBER,d:function(n){return n===ki.PATH||n===ki.POLYGON||n===ki.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:zn.MARKER},{n:"markerEnd",syntax:zn.MARKER},{n:"markerMid",syntax:zn.MARKER},{n:"markerStartOffset",syntax:zn.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:zn.LENGTH,l:!0,int:!0,d:"0"}],VZ=new Set(CL.filter(function(r){return!!r.l}).map(function(r){return r.n})),ML={},UZ=function(){function r(n){var e=this;ri(this,r),this.runtime=n,CL.forEach(function(t){e.registerMetadata(t)})}return ii(r,[{key:"registerMetadata",value:function(e){[e.n].concat(Uf(e.a||[])).forEach(function(t){ML[t]=e})}},{key:"getPropertySyntax",value:function(e){return this.runtime.CSSPropertySyntaxFactory[e]}},{key:"processProperties",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0};Object.assign(e.attributes,t);var a=e.parsedStyle.clipPath,s=e.parsedStyle.offsetPath;Object.assign(e.parsedStyle,t);var o=!!i.forceUpdateGeometry;if(!o){for(var l in t)if(VZ.has(l)){o=!0;break}}t.fill&&(e.parsedStyle.fill=ty(t.fill)),t.stroke&&(e.parsedStyle.stroke=ty(t.stroke)),t.shadowColor&&(e.parsedStyle.shadowColor=ty(t.shadowColor)),t.filter&&(e.parsedStyle.filter=gZ(t.filter)),(0,xe.Z)(t.radius)||(e.parsedStyle.radius=hL(t.radius,4)),(0,xe.Z)(t.lineDash)||(e.parsedStyle.lineDash=hL(t.lineDash,2)),t.points&&(e.parsedStyle.points=MZ(t.points)),t.d===""&&(e.parsedStyle.d=X0({},IY)),t.d&&(e.parsedStyle.d=kL(t.d)),t.textTransform&&this.runtime.CSSPropertySyntaxFactory[zn.TEXT_TRANSFORM].calculator(null,null,{value:t.textTransform},e,null),(0,ie.Z)(t.clipPath)||this.runtime.CSSPropertySyntaxFactory[zn.DEFINED_PATH].calculator("clipPath",a,t.clipPath,e,this.runtime),t.offsetPath&&this.runtime.CSSPropertySyntaxFactory[zn.DEFINED_PATH].calculator("offsetPath",s,t.offsetPath,e,this.runtime),t.transform&&(e.parsedStyle.transform=NZ(t.transform)),t.transformOrigin&&(e.parsedStyle.transformOrigin=zZ(t.transformOrigin)),t.markerStart&&(e.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory[zn.MARKER].calculator(null,t.markerStart,t.markerStart,null,null)),t.markerEnd&&(e.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory[zn.MARKER].calculator(null,t.markerEnd,t.markerEnd,null,null)),t.markerMid&&(e.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory[zn.MARKER].calculator("",t.markerMid,t.markerMid,null,null)),(0,xe.Z)(t.zIndex)||this.runtime.CSSPropertySyntaxFactory[zn.Z_INDEX].postProcessor(e),(0,xe.Z)(t.offsetDistance)||this.runtime.CSSPropertySyntaxFactory[zn.OFFSET_DISTANCE].postProcessor(e),t.transform&&this.runtime.CSSPropertySyntaxFactory[zn.TRANSFORM].postProcessor(e),t.transformOrigin&&this.runtime.CSSPropertySyntaxFactory[zn.TRANSFORM_ORIGIN].postProcessor(e),o&&(e.geometry.dirty=!0,e.renderable.boundsDirty=!0,e.renderable.renderBoundsDirty=!0,i.forceUpdateGeometry||this.runtime.sceneGraphService.dirtifyToRoot(e))}},{key:"updateGeometry",value:function(e){var t=e.nodeName,i=this.runtime.geometryUpdaterFactory[t];if(i){var a=e.geometry;a.contentBounds||(a.contentBounds=new Xd),a.renderBounds||(a.renderBounds=new Xd);var s=e.parsedStyle,o=i.update(s,e),l=o.cx,u=l===void 0?0:l,c=o.cy,d=c===void 0?0:c,h=o.cz,f=h===void 0?0:h,v=o.hwidth,g=v===void 0?0:v,m=o.hheight,y=m===void 0?0:m,w=o.hdepth,T=w===void 0?0:w,G=[Math.abs(g),Math.abs(y),T],x=s.stroke,_=s.lineWidth,p=_===void 0?1:_,b=s.increasedLineWidthForHitTesting,R=b===void 0?0:b,B=s.shadowType,j=B===void 0?"outer":B,Z=s.shadowColor,te=s.filter,le=te===void 0?[]:te,ue=s.transformOrigin,se=[u,d,f];a.contentBounds.update(se,G);var V=t===ki.POLYLINE||t===ki.POLYGON||t===ki.PATH?Math.SQRT2:.5,ee=x&&!x.isNone;if(ee){var he=((p||0)+(R||0))*V;G[0]+=he,G[1]+=he}if(a.renderBounds.update(se,G),Z&&j&&j!=="inner"){var ut=a.renderBounds,ct=ut.min,Lt=ut.max,vn=s.shadowBlur,tn=s.shadowOffsetX,rn=s.shadowOffsetY,mn=vn||0,ar=tn||0,gi=rn||0,kr=ct[0]-mn+ar,Ta=Lt[0]+mn+ar,Wa=ct[1]-mn+gi,la=Lt[1]+mn+gi;ct[0]=Math.min(ct[0],kr),Lt[0]=Math.max(Lt[0],Ta),ct[1]=Math.min(ct[1],Wa),Lt[1]=Math.max(Lt[1],la),a.renderBounds.setMinMax(ct,Lt)}le.forEach(function(so){var oo=so.name,qi=so.params;if(oo==="blur"){var lo=qi[0].value;a.renderBounds.update(a.renderBounds.center,E.IH(a.renderBounds.halfExtents,a.renderBounds.halfExtents,[lo,lo,0]))}else if(oo==="drop-shadow"){var uo=qi[0].value,co=qi[1].value,ea=qi[2].value,ho=a.renderBounds,Rr=ho.min,Ar=ho.max,Gu=Rr[0]-ea+uo,zu=Ar[0]+ea+uo,Vu=Rr[1]-ea+co,Uu=Ar[1]+ea+co;Rr[0]=Math.min(Rr[0],Gu),Ar[0]=Math.max(Ar[0],zu),Rr[1]=Math.min(Rr[1],Vu),Ar[1]=Math.max(Ar[1],Uu),a.renderBounds.setMinMax(Rr,Ar)}}),e.geometry.dirty=!1;var ys=g<0,Jl=y<0,xs=(ys?-1:1)*(ue?pd(ue[0],0,e,!0):0),Es=(Jl?-1:1)*(ue?pd(ue[1],1,e,!0):0);(xs||Es)&&e.setOrigin(xs,Es)}}},{key:"updateSizeAttenuation",value:function(e,t){e.style.isSizeAttenuation?(e.style.rawLineWidth||(e.style.rawLineWidth=e.style.lineWidth),e.style.lineWidth=(e.style.rawLineWidth||1)/t,e.nodeName===ki.CIRCLE&&(e.style.rawR||(e.style.rawR=e.style.r),e.style.r=(e.style.rawR||1)/t)):(e.style.rawLineWidth&&(e.style.lineWidth=e.style.rawLineWidth,delete e.style.rawLineWidth),e.nodeName===ki.CIRCLE&&e.style.rawR&&(e.style.r=e.style.rawR,delete e.style.rawR))}}])}(),jZ=function(){function r(){ri(this,r),this.mixer=U2}return ii(r,[{key:"calculator",value:function(e,t,i,a){return Fc(i)}}])}(),HZ=function(){function r(){ri(this,r)}return ii(r,[{key:"calculator",value:function(e,t,i,a,s){return i instanceof Kd&&(i=null),s.sceneGraphService.updateDisplayObjectDependency(e,t,i,a),e==="clipPath"&&a.forEach(function(o){o.childNodes.length===0&&s.sceneGraphService.dirtifyToRoot(o)}),i}}])}(),WZ=function(){function r(){ri(this,r),this.parser=ty,this.mixer=lZ}return ii(r,[{key:"calculator",value:function(e,t,i,a){return i instanceof Kd?i.value==="none"?aL:sL:i}}])}(),YZ=function(){function r(){ri(this,r)}return ii(r,[{key:"calculator",value:function(e,t,i){return i instanceof Kd?[]:i}}])}();function PL(r){var n=r.parsedStyle,e=n.fontSize;return(0,xe.Z)(e)?null:e}var X2=function(){function r(){ri(this,r),this.mixer=U2}return ii(r,[{key:"calculator",value:function(e,t,i,a,s){if((0,pe.Z)(i))return i;if(ds.isRelativeUnit(i.unit)){if(i.unit===Qn.kPercentage)return 0;if(i.unit===Qn.kEms){if(a.parentNode){var o=PL(a.parentNode);if(o)return o*=i.value,o}return 0}if(i.unit===Qn.kRems){var l;if(a!=null&&(l=a.ownerDocument)!==null&&l!==void 0&&l.documentElement){var u=PL(a.ownerDocument.documentElement);if(u)return u*=i.value,u}return 0}}else return i.value}}])}(),ZZ=function(){function r(){ri(this,r),this.mixer=gL}return ii(r,[{key:"calculator",value:function(e,t,i){return i.map(function(a){return a.value})}}])}(),XZ=function(){function r(){ri(this,r),this.mixer=gL}return ii(r,[{key:"calculator",value:function(e,t,i){return i.map(function(a){return a.value})}}])}(),KZ=function(){function r(){ri(this,r)}return ii(r,[{key:"calculator",value:function(e,t,i,a){var s;i instanceof Kd&&(i=null);var o=(s=i)===null||s===void 0?void 0:s.cloneNode(!0);return o&&(o.style.isMarker=!0),o}}])}(),JZ=function(){function r(){ri(this,r),this.mixer=U2}return ii(r,[{key:"calculator",value:function(e,t,i){return i.value}}])}(),QZ=function(){function r(){ri(this,r),this.mixer=j2(0,1)}return ii(r,[{key:"calculator",value:function(e,t,i){return i.value}},{key:"postProcessor",value:function(e){var t=e.parsedStyle,i=t.offsetPath,a=t.offsetDistance;if(i){var s=i.nodeName;if(s===ki.LINE||s===ki.PATH||s===ki.POLYLINE){var o=i.getPoint(a);o&&e.setLocalPosition(o.x,o.y)}}}}])}(),qZ=function(){function r(){ri(this,r),this.mixer=j2(0,1)}return ii(r,[{key:"calculator",value:function(e,t,i){return i.value}}])}(),eX=function(){function r(){ri(this,r),this.parser=kL,this.mixer=CZ}return ii(r,[{key:"calculator",value:function(e,t,i){return i instanceof Kd&&i.value==="unset"?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new q0(0,0,0,0)}:i}}])}(),tX=ii(function r(){ri(this,r),this.mixer=PZ}),nX=function(r){function n(){var e;ri(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=_d(this,n,[].concat(i)),e.mixer=j2(0,1/0),e}return md(n,r),ii(n)}(X2),rX=function(){function r(){ri(this,r)}return ii(r,[{key:"calculator",value:function(e,t,i,a){return i instanceof Kd?i.value==="unset"?"":i.value:"".concat(i)}},{key:"postProcessor",value:function(e){e.nodeValue="".concat(e.parsedStyle.text)||""}}])}(),iX=function(){function r(){ri(this,r)}return ii(r,[{key:"calculator",value:function(e,t,i,a){var s=a.getAttribute("text");if(s){var o=s;i.value==="capitalize"?o=s.charAt(0).toUpperCase()+s.slice(1):i.value==="lowercase"?o=s.toLowerCase():i.value==="uppercase"&&(o=s.toUpperCase()),a.parsedStyle.text=o}return i.value}}])}(),yMe=function(n){return Object.fromEntries(Object.entries(n).filter(function(e){var t=_slicedToArray(e,2),i=t[1];return i!==void 0}))},K2=new WeakMap;function xMe(r,n,e){if(r){var t=typeof r=="string"?document.getElementById(r):r;K2.has(t)&&K2.get(t).destroy(e),K2.set(t,n)}}var NL=typeof window!="undefined"&&typeof window.document!="undefined";function EMe(r){return!!r.getAttribute}function bMe(r,n){for(var e=0,t=r.length;e<t;){var i=e+t>>>1;aX(r[i],n)<0?e=i+1:t=i}return e}function aX(r,n){var e=Number(r.parsedStyle.zIndex||0),t=Number(n.parsedStyle.zIndex||0);if(e===t){var i=r.parentNode;if(i){var a=i.childNodes||[];return a.indexOf(r)-a.indexOf(n)}}return e-t}function sX(r){var n=r;do{var e,t=(e=n.parsedStyle)===null||e===void 0?void 0:e.clipPath;if(t)return n;n=n.parentElement}while(n!==null);return null}var OL="px";function kMe(r,n,e){NL&&r.style&&(r.style.width=n+OL,r.style.height=e+OL)}function RL(r,n){if(NL)return document.defaultView.getComputedStyle(r,null).getPropertyValue(n)}function wMe(r){var n=RL(r,"width");return n==="auto"?r.offsetWidth:parseFloat(n)}function SMe(r){var n=RL(r,"height");return n==="auto"?r.offsetHeight:parseFloat(n)}var oX=1,lX={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},uX=typeof performance=="object"&&performance.now?performance:Date;function AL(r){return r.nodeName===ki.FRAGMENT?!0:r.getRootNode().nodeName===ki.FRAGMENT}function TMe(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"auto",n=arguments.length>1?arguments[1]:void 0,e=arguments.length>2?arguments[2]:void 0,t=!1,i=!1,a=!!n&&!n.isNone,s=!!e&&!e.isNone;return r==="visiblepainted"||r==="painted"||r==="auto"?(t=a,i=s):r==="visiblefill"||r==="fill"?t=!0:r==="visiblestroke"||r==="stroke"?i=!0:(r==="visible"||r==="all")&&(t=!0,i=!0),[t,i]}var cX=1,dX=function(){return cX++},Yf=typeof self=="object"&&self.self===self?self:typeof k.g=="object"&&k.g.global===k.g?k.g:{},hX=Date.now(),fX=function(){return Yf.performance&&typeof Yf.performance.now=="function"?Yf.performance.now():Date.now()-hX},iy={},LL=Date.now(),vX=function(n){if(typeof n!="function")throw new TypeError("".concat(n," is not a function"));var e=Date.now(),t=e-LL,i=t>16?0:16-t,a=dX();return iy[a]=n,Object.keys(iy).length>1||setTimeout(function(){LL=e;var s=iy;iy={},Object.keys(s).forEach(function(o){return s[o](fX())})},i),a},gX=function(n){delete iy[n]},_X=["","webkit","moz","ms","o"],IL=function(n){return typeof n!="string"?vX:n===""?Yf.requestAnimationFrame:Yf["".concat(n,"RequestAnimationFrame")]},mX=function(n){return typeof n!="string"?gX:n===""?Yf.cancelAnimationFrame:Yf["".concat(n,"CancelAnimationFrame")]||Yf["".concat(n,"CancelRequestAnimationFrame")]},pX=function(n,e){for(var t=0;n[t]!==void 0;){if(e(n[t]))return n[t];t+=1}},DL=pX(_X,function(r){return!!IL(r)}),FL=IL(DL),yX=mX(DL);Yf.requestAnimationFrame=FL,Yf.cancelAnimationFrame=yX;var CMe=null,MMe=null,PMe=null,NMe=null,xX=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],EX=/([\"\'])[^\'\"]+\1/;function bX(r){for(var n=r.fontSize,e=n===void 0?16:n,t=r.fontFamily,i=t===void 0?"sans-serif":t,a=r.fontStyle,s=a===void 0?"normal":a,o=r.fontVariant,l=o===void 0?"normal":o,u=r.fontWeight,c=u===void 0?"normal":u,d=(0,pe.Z)(e)&&"".concat(e,"px")||"16px",h=i.split(","),f=h.length-1;f>=0;f--){var v=h[f].trim();!EX.test(v)&&xX.indexOf(v)<0&&(v='"'.concat(v,'"')),h[f]=v}return"".concat(s," ").concat(l," ").concat(c," ").concat(d," ").concat(h.join(","))}function J2(r,n,e){return L.identity(r),r[4]=Math.tan(n),r[1]=Math.tan(e),r}var Cl=L.create(),kX=L.create(),wX={scale:function(n){L.fromScaling(Cl,[n[0].value,n[1].value,1])},scaleX:function(n){L.fromScaling(Cl,[n[0].value,1,1])},scaleY:function(n){L.fromScaling(Cl,[1,n[0].value,1])},scaleZ:function(n){L.fromScaling(Cl,[1,1,n[0].value])},scale3d:function(n){L.fromScaling(Cl,[n[0].value,n[1].value,n[2].value])},translate:function(n){L.fromTranslation(Cl,[n[0].value,n[1].value,0])},translateX:function(n){L.fromTranslation(Cl,[n[0].value,0,0])},translateY:function(n){L.fromTranslation(Cl,[0,n[0].value,0])},translateZ:function(n){L.fromTranslation(Cl,[0,0,n[0].value])},translate3d:function(n){L.fromTranslation(Cl,[n[0].value,n[1].value,n[2].value])},rotate:function(n){L.fromZRotation(Cl,Us(Fc(n[0])))},rotateX:function(n){L.fromXRotation(Cl,Us(Fc(n[0])))},rotateY:function(n){L.fromYRotation(Cl,Us(Fc(n[0])))},rotateZ:function(n){L.fromZRotation(Cl,Us(Fc(n[0])))},rotate3d:function(n){L.fromRotation(Cl,Us(Fc(n[3])),[n[0].value,n[1].value,n[2].value])},skew:function(n){J2(Cl,Us(n[0].value),Us(n[1].value))},skewX:function(n){J2(Cl,Us(n[0].value),0)},skewY:function(n){J2(Cl,0,Us(n[0].value))},matrix:function(n){L.set(Cl,n[0].value,n[1].value,0,0,n[2].value,n[3].value,0,0,0,0,1,0,n[4].value,n[5].value,0,1)},matrix3d:function(n){L.set.apply(L,[Cl].concat(Uf(n.map(function(e){return e.value}))))}},SX=E.al(1,1,1),TX=E.Ue(),BL={translate:function(n,e){ga.sceneGraphService.setLocalScale(n,SX,!1),ga.sceneGraphService.setLocalEulerAngles(n,TX,void 0,void 0,!1),ga.sceneGraphService.setLocalPosition(n,[e[0].value,e[1].value,0],!1),ga.sceneGraphService.dirtifyLocal(n,n.transformable)}};function CX(r,n){if(r.length){if(r.length===1&&BL[r[0].t]){BL[r[0].t](n,r[0].d);return}for(var e=L.identity(kX),t=0;t<r.length;t++){var i=r[t],a=i.t,s=i.d,o=wX[a];o&&(o(s),L.mul(e,e,Cl))}n.setLocalTransform(e)}else n.resetLocalTransform();return n.getLocalTransform()}var MX=function(){function r(){ri(this,r),this.parser=OZ,this.mixer=GZ}return ii(r,[{key:"calculator",value:function(e,t,i,a){return i instanceof Kd?[]:i}},{key:"postProcessor",value:function(e){CX(e.parsedStyle.transform,e)}}])}(),PX=function(){function r(){ri(this,r)}return ii(r,[{key:"postProcessor",value:function(e){var t=e.parsedStyle.transformOrigin;t[0].unit===Qn.kPixels&&t[1].unit===Qn.kPixels?e.setOrigin(t[0].value,t[1].value):e.getGeometryBounds()}}])}(),NX=function(){function r(){ri(this,r)}return ii(r,[{key:"calculator",value:function(e,t,i,a){return i.value}},{key:"postProcessor",value:function(e){if(e.parentNode){var t=e.parentNode,i=t.renderable,a=t.sortable;i&&(i.dirty=!0),a&&(a.dirty=!0,a.dirtyReason=D2.Z_INDEX_CHANGED)}}}])}(),OX=function(){function r(){ri(this,r)}return ii(r,[{key:"update",value:function(e,t){var i=e.cx,a=i===void 0?0:i,s=e.cy,o=s===void 0?0:s,l=e.r,u=l===void 0?0:l;return{cx:a,cy:o,hwidth:u,hheight:u}}}])}(),RX=function(){function r(){ri(this,r)}return ii(r,[{key:"update",value:function(e,t){var i=e.cx,a=i===void 0?0:i,s=e.cy,o=s===void 0?0:s,l=e.rx,u=l===void 0?0:l,c=e.ry,d=c===void 0?0:c;return{cx:a,cy:o,hwidth:u,hheight:d}}}])}(),AX=function(){function r(){ri(this,r)}return ii(r,[{key:"update",value:function(e){var t=e.x1,i=e.y1,a=e.x2,s=e.y2,o=Math.min(t,a),l=Math.max(t,a),u=Math.min(i,s),c=Math.max(i,s),d=l-o,h=c-u,f=d/2,v=h/2;return{cx:o+f,cy:u+v,hwidth:f,hheight:v}}}])}(),LX=function(){function r(){ri(this,r)}return ii(r,[{key:"update",value:function(e){var t=e.d,i=t.rect,a=i.x,s=i.y,o=i.width,l=i.height,u=o/2,c=l/2;return{cx:a+u,cy:s+c,hwidth:u,hheight:c}}}])}(),IX=function(){function r(){ri(this,r)}return ii(r,[{key:"update",value:function(e){if(e.points&&(0,Ie.Z)(e.points.points)){var t=e.points.points,i=Math.min.apply(Math,Uf(t.map(function(h){return h[0]}))),a=Math.max.apply(Math,Uf(t.map(function(h){return h[0]}))),s=Math.min.apply(Math,Uf(t.map(function(h){return h[1]}))),o=Math.max.apply(Math,Uf(t.map(function(h){return h[1]}))),l=a-i,u=o-s,c=l/2,d=u/2;return{cx:i+c,cy:s+d,hwidth:c,hheight:d}}return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),DX=function(){function r(){ri(this,r)}return ii(r,[{key:"update",value:function(e,t){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s,l=e.src,u=e.width,c=u===void 0?0:u,d=e.height,h=d===void 0?0:d,f=c,v=h;return l&&!(0,Ze.Z)(l)&&(f||(f=l.width,e.width=f),v||(v=l.height,e.height=v)),{cx:a+f/2,cy:o+v/2,hwidth:f/2,hheight:v/2}}}])}(),FX=function(){function r(n){ri(this,r),this.globalRuntime=n}return ii(r,[{key:"isReadyToMeasure",value:function(e,t){var i=e.text;return i}},{key:"update",value:function(e,t){var i,a=e.text,s=e.textAlign,o=s===void 0?"start":s,l=e.lineWidth,u=l===void 0?1:l,c=e.textBaseline,d=c===void 0?"alphabetic":c,h=e.dx,f=h===void 0?0:h,v=e.dy,g=v===void 0?0:v,m=e.x,y=m===void 0?0:m,w=e.y,T=w===void 0?0:w;if(!this.isReadyToMeasure(e,t))return e.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{hwidth:0,hheight:0,cx:0,cy:0};var G=(t==null||(i=t.ownerDocument)===null||i===void 0||(i=i.defaultView)===null||i===void 0?void 0:i.getConfig())||{},x=G.offscreenCanvas,_=this.globalRuntime.textService.measureText(a,e,x);e.metrics=_;var p=_.width,b=_.height,R=p/2,B=b/2,j=y+R;o==="center"||o==="middle"?j+=u/2-R:(o==="right"||o==="end")&&(j+=u-R*2);var Z=T-B;return d==="middle"?Z+=B:d==="top"||d==="hanging"?Z+=B*2:d==="alphabetic"||(d==="bottom"||d==="ideographic")&&(Z+=0),f&&(j+=f),g&&(Z+=g),{cx:j,cy:Z,hwidth:R,hheight:B}}}])}(),BX=function(){function r(){ri(this,r)}return ii(r,[{key:"update",value:function(e,t){return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),$X=function(){function r(){ri(this,r)}return ii(r,[{key:"update",value:function(e,t){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s,l=e.width,u=l===void 0?0:l,c=e.height,d=c===void 0?0:c;return{cx:a+u/2,cy:o+d/2,hwidth:u/2,hheight:d/2}}}])}();function OMe(r){return!!r.type}var q1=function(){function r(n){ri(this,r),this.eventPhase=r.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new Lv,this.page=new Lv,this.canvas=new Lv,this.viewport=new Lv,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=n}return ii(r,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"composedPath",value:function(){return this.manager&&(!this.path||this.path[0]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}},{key:"propagationPath",get:function(){return this.composedPath()}},{key:"preventDefault",value:function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}},{key:"stopImmediatePropagation",value:function(){this.propagationImmediatelyStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"initEvent",value:function(){}},{key:"initUIEvent",value:function(){}},{key:"clone",value:function(){throw new Error(Lu)}}])}(),$L=function(r){function n(){var e;ri(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=_d(this,n,[].concat(i)),e.client=new Lv,e.movement=new Lv,e.offset=new Lv,e.global=new Lv,e.screen=new Lv,e}return md(n,r),ii(n,[{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(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)}},{key:"initMouseEvent",value:function(){throw new Error(Lu)}}])}(q1),GX=function(r){function n(){var e;ri(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=_d(this,n,[].concat(i)),e.width=0,e.height=0,e.isPrimary=!1,e}return md(n,r),ii(n,[{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)}}])}($L),zX=function(r){function n(){return ri(this,n),_d(this,n,arguments)}return md(n,r),ii(n,[{key:"clone",value:function(){return this.manager.cloneWheelEvent(this)}}])}($L),Iv=function(r){function n(e,t){var i;return ri(this,n),i=_d(this,n,[null]),i.type=e,i.detail=t,Object.assign(i,t),i}return md(n,r),ii(n)}(q1),GL=new WeakMap,VX=function(){function r(){ri(this,r),this.emitter=new Se.Z}return ii(r,[{key:"on",value:function(e,t,i){return this.addEventListener(e,t,i),this}},{key:"addEventListener",value:function(e,t,i){var a=!1,s=!1;if((0,je.Z)(i))a=i;else if(i){var o=i.capture;a=o===void 0?!1:o;var l=i.once;s=l===void 0?!1:l}a&&(e+="capture"),t=(0,Be.Z)(t)?t:t.handleEvent;var u=(0,Be.Z)(t)?void 0:t;return s?this.emitter.once(e,t,u):this.emitter.on(e,t,u),this}},{key:"off",value:function(e,t,i){return e?this.removeEventListener(e,t,i):this.removeAllEventListeners(),this}},{key:"removeAllEventListeners",value:function(){var e;(e=this.emitter)===null||e===void 0||e.removeAllListeners()}},{key:"removeEventListener",value:function(e,t,i){var a;if(!this.emitter)return this;var s=(0,je.Z)(i)?i:i==null?void 0:i.capture;s&&(e+="capture"),t=(0,Be.Z)(t)?t:(a=t)===null||a===void 0?void 0:a.handleEvent;var o=(0,Be.Z)(t)?void 0:t;return this.emitter.off(e,t,o),this}},{key:"emit",value:function(e,t){this.dispatchEvent(new Iv(e,t))}},{key:"dispatchEvent",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=GL.get(this);if(!i){var a;this.document?i=this:this.defaultView?i=this.defaultView:i=(a=this.ownerDocument)===null||a===void 0?void 0:a.defaultView,i&&GL.set(this,i)}if(i){if(e.manager=i.getEventService(),!e.manager)return!1;e.defaultPrevented=!1,e.path?e.path.length=0:e.page=[],t||(e.target=this),e.manager.dispatchEvent(e,e.type,t)}else this.emitter.emit(e.type,e);return!e.defaultPrevented}}])}(),sp=function(r){function n(){var e;ri(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=_d(this,n,[].concat(i)),e.shadow=!1,e.ownerDocument=null,e.isConnected=!1,e.baseURI="",e.childNodes=[],e.nodeType=0,e.nodeName="",e.nodeValue=null,e.parentNode=null,e}return md(n,r),ii(n,[{key:"textContent",get:function(){var t="";this.nodeName===ki.TEXT&&(t+=this.style.text);var i=np(this.childNodes),a;try{for(i.s();!(a=i.n()).done;){var s=a.value;s.nodeName===ki.TEXT?t+=s.nodeValue:t+=s.textContent}}catch(o){i.e(o)}finally{i.f()}return t},set:function(t){var i=this;this.childNodes.slice().forEach(function(a){i.removeChild(a)}),this.nodeName===ki.TEXT&&(this.style.text="".concat(t))}},{key:"getRootNode",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this}},{key:"hasChildNodes",value:function(){return this.childNodes.length>0}},{key:"isDefaultNamespace",value:function(t){throw new Error(Lu)}},{key:"lookupNamespaceURI",value:function(t){throw new Error(Lu)}},{key:"lookupPrefix",value:function(t){throw new Error(Lu)}},{key:"normalize",value:function(){throw new Error(Lu)}},{key:"isEqualNode",value:function(t){return this===t}},{key:"isSameNode",value:function(t){return this.isEqualNode(t)}},{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(t){if(t===this)return 0;for(var i=t,a=this,s=[i],o=[a];(l=i.parentNode)!==null&&l!==void 0?l:a.parentNode;){var l;i=i.parentNode?(s.push(i.parentNode),i.parentNode):i,a=a.parentNode?(o.push(a.parentNode),a.parentNode):a}if(i!==a)return n.DOCUMENT_POSITION_DISCONNECTED|n.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|n.DOCUMENT_POSITION_PRECEDING;var u=s.length>o.length?s:o,c=u===s?o:s;if(u[u.length-c.length]===c[0])return u===s?n.DOCUMENT_POSITION_CONTAINED_BY|n.DOCUMENT_POSITION_FOLLOWING:n.DOCUMENT_POSITION_CONTAINS|n.DOCUMENT_POSITION_PRECEDING;for(var d=u.length-c.length,h=c.length-1;h>=0;h--){var f=c[h],v=u[d+h];if(v!==f){var g=f.parentNode.childNodes;return g.indexOf(f)<g.indexOf(v)?c===s?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING:u===s?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING}}return n.DOCUMENT_POSITION_FOLLOWING}},{key:"contain",value:function(t){return this.contains(t)}},{key:"contains",value:function(t){for(var i=t;i&&this!==i;)i=i.parentNode;return!!i}},{key:"getAncestor",value:function(t){for(var i=this;t>0&&i;)i=i.parentNode,t--;return i}},{key:"forEach",value:function(t){for(var i=[this];i.length>0;){var a=i.pop(),s=t(a);if(s===!1)break;for(var o=a.childNodes.length-1;o>=0;o--)i.push(a.childNodes[o])}}}],[{key:"isNode",value:function(t){return!!t.childNodes}}])}(VX);sp.DOCUMENT_POSITION_DISCONNECTED=1,sp.DOCUMENT_POSITION_PRECEDING=2,sp.DOCUMENT_POSITION_FOLLOWING=4,sp.DOCUMENT_POSITION_CONTAINS=8,sp.DOCUMENT_POSITION_CONTAINED_BY=16,sp.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;var RMe=2048,AMe=null,UX=function(){function r(){ri(this,r)}return ii(r,[{key:"getOrCreateCanvas",value:function(e,t){if(this.canvas)return this.canvas;if(e||ga.offscreenCanvas)this.canvas=e||ga.offscreenCanvas,this.context=this.canvas.getContext("2d",X0({willReadFrequently:!0},t));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",X0({willReadFrequently:!0},t)),(!this.context||!this.context.measureText)&&(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(i){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",X0({willReadFrequently:!0},t))}return this.canvas.width=10,this.canvas.height=10,this.canvas}},{key:"getOrCreateContext",value:function(e,t){return this.context?this.context:(this.getOrCreateCanvas(e,t),this.context)}}],[{key:"createCanvas",value:function(){try{return new window.OffscreenCanvas(0,0)}catch(e){}try{return document.createElement("canvas")}catch(e){}return null}}])}(),LMe=function(r){return r[r.CAMERA_CHANGED=0]="CAMERA_CHANGED",r[r.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",r[r.NONE=2]="NONE",r}({}),IMe=null,jX=/\[\s*(.*)=(.*)\s*\]/,HX=function(){function r(){ri(this,r)}return ii(r,[{key:"selectOne",value:function(e,t){var i=this;if(e.startsWith("."))return t.find(function(l){return((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(e))>-1});if(e.startsWith("#"))return t.find(function(l){return l.id===i.getIdOrClassname(e)});if(e.startsWith("[")){var a=this.getAttribute(e),s=a.name,o=a.value;return s?t.find(function(l){return t!==l&&(s==="name"?l.name===o:i.attributeToString(l,s)===o)}):null}return t.find(function(l){return t!==l&&l.nodeName===e})}},{key:"selectAll",value:function(e,t){var i=this;if(e.startsWith("."))return t.findAll(function(l){return t!==l&&((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(e))>-1});if(e.startsWith("#"))return t.findAll(function(l){return t!==l&&l.id===i.getIdOrClassname(e)});if(e.startsWith("[")){var a=this.getAttribute(e),s=a.name,o=a.value;return s?t.findAll(function(l){return t!==l&&(s==="name"?l.name===o:i.attributeToString(l,s)===o)}):[]}return t.findAll(function(l){return t!==l&&l.nodeName===e})}},{key:"is",value:function(e,t){if(e.startsWith("."))return t.className===this.getIdOrClassname(e);if(e.startsWith("#"))return t.id===this.getIdOrClassname(e);if(e.startsWith("[")){var i=this.getAttribute(e),a=i.name,s=i.value;return a==="name"?t.name===s:this.attributeToString(t,a)===s}return t.nodeName===e}},{key:"getIdOrClassname",value:function(e){return e.substring(1)}},{key:"getAttribute",value:function(e){var t=e.match(jX),i="",a="";return t&&t.length>2&&(i=t[1].replace(/"/g,""),a=t[2].replace(/"/g,"")),{name:i,value:a}}},{key:"attributeToString",value:function(e,t){if(!e.getAttribute)return"";var i=e.getAttribute(t);return(0,xe.Z)(i)?"":i.toString?i.toString():""}}])}(),yu=function(r){return r.REPARENT="reparent",r.DESTROY="destroy",r.ATTR_MODIFIED="DOMAttrModified",r.INSERTED="DOMNodeInserted",r.REMOVED="removed",r.MOUNTED="DOMNodeInsertedIntoDocument",r.UNMOUNTED="DOMNodeRemovedFromDocument",r.BOUNDS_CHANGED="bounds-changed",r.CULLED="culled",r}({}),Zf=function(r){function n(e,t,i,a,s,o,l,u){var c;return ri(this,n),c=_d(this,n,[null]),c.relatedNode=t,c.prevValue=i,c.newValue=a,c.attrName=s,c.attrChange=o,c.prevParsedValue=l,c.newParsedValue=u,c.type=e,c}return md(n,r),ii(n)}(q1);Zf.ADDITION=2,Zf.MODIFICATION=1,Zf.REMOVAL=3;function zL(r){var n=r.renderable;n&&(n.renderBoundsDirty=!0,n.boundsDirty=!0)}var WX=new Zf(yu.REPARENT,null,"","","",0,"",""),YX=ot.Ue(),eE=E.Ue(),ZX=E.al(1,1,1),XX=L.create(),KX=ot.Ue(),_g=E.Ue(),op=L.create(),mg=X.Ue(),JX=E.Ue(),QX=X.Ue(),qX=E.Ue(),ay=E.Ue(),w_=E.Ue(),tE=L.create(),VL=X.Ue(),UL=X.Ue(),nE=X.Ue(),Q2={affectChildren:!0},eK=function(){function r(n){ri(this,r),this.pendingEvents=new Map,this.boundsChangedEvent=new Iv(yu.BOUNDS_CHANGED),this.displayObjectDependencyMap=new WeakMap,this.runtime=n}return ii(r,[{key:"matches",value:function(e,t){return this.runtime.sceneGraphSelector.is(e,t)}},{key:"querySelector",value:function(e,t){return this.runtime.sceneGraphSelector.selectOne(e,t)}},{key:"querySelectorAll",value:function(e,t){return this.runtime.sceneGraphSelector.selectAll(e,t)}},{key:"attach",value:function(e,t,i){var a,s=!1;e.parentNode&&(s=e.parentNode!==t,this.detach(e));var o=e.nodeName===ki.FRAGMENT,l=AL(t);e.parentNode=t;var u=o?e.childNodes:[e];(0,pe.Z)(i)?u.forEach(function(f){t.childNodes.splice(i,0,f),f.parentNode=t}):u.forEach(function(f){t.childNodes.push(f),f.parentNode=t});var c=t,d=c.sortable;if((d!=null&&(a=d.sorted)!==null&&a!==void 0&&a.length||e.parsedStyle.zIndex)&&(d.dirtyChildren.indexOf(e)===-1&&d.dirtyChildren.push(e),d.dirty=!0,d.dirtyReason=D2.ADDED),!l){if(o)this.dirtifyFragment(e);else{var h=e.transformable;h&&this.dirtifyWorld(e,h)}s&&e.dispatchEvent(WX)}}},{key:"detach",value:function(e){if(e.parentNode){var t,i,a=e.transformable,s=e.parentNode,o=s.sortable;(o!=null&&(t=o.sorted)!==null&&t!==void 0&&t.length||(i=e.style)!==null&&i!==void 0&&i.zIndex)&&(o.dirtyChildren.indexOf(e)===-1&&o.dirtyChildren.push(e),o.dirty=!0,o.dirtyReason=D2.REMOVED);var l=e.parentNode.childNodes.indexOf(e);l>-1&&e.parentNode.childNodes.splice(l,1),a&&this.dirtifyWorld(e,a),e.parentNode=null}}},{key:"getOrigin",value:function(e){return e.getGeometryBounds(),e.transformable.origin}},{key:"setOrigin",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=[t,i,a]);var s=e.transformable;if(!(t[0]===s.origin[0]&&t[1]===s.origin[1]&&t[2]===s.origin[2])){var o=s.origin;o[0]=t[0],o[1]=t[1],o[2]=t[2]||0,this.dirtifyLocal(e,s)}}},{key:"rotate",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;if(e.parentNode===null||!e.parentNode.transformable)this.rotateLocal(e,t);else{var o=mg;X.Su(o,t[0],t[1],t[2]);var l=this.getRotation(e),u=this.getRotation(e.parentNode);X.JG(nE,u),X.U_(nE,nE),X.Jp(o,nE,o),X.Jp(s.localRotation,o,l),X.Fv(s.localRotation,s.localRotation),this.dirtifyLocal(e,s)}}},{key:"rotateLocal",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;X.Su(UL,t[0],t[1],t[2]),X.dC(s.localRotation,s.localRotation,UL),this.dirtifyLocal(e,s)}},{key:"setEulerAngles",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;if(e.parentNode===null||!e.parentNode.transformable)this.setLocalEulerAngles(e,t);else{X.Su(s.localRotation,t[0],t[1],t[2]);var o=this.getRotation(e.parentNode);X.JG(VL,X.U_(mg,o)),X.dC(s.localRotation,s.localRotation,VL),this.dirtifyLocal(e,s)}}},{key:"setLocalEulerAngles",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;typeof t=="number"&&(t=E.al(t,i,a));var o=e.transformable;X.Su(o.localRotation,t[0],t[1],t[2]),s&&this.dirtifyLocal(e,o)}},{key:"translateLocal",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;E.fS(t,eE)||(E.VC(t,t,s.localRotation),E.IH(s.localPosition,s.localPosition,t),this.dirtifyLocal(e,s))}},{key:"setPosition",value:function(e,t){var i,a=e.transformable;if(w_[0]=t[0],w_[1]=t[1],w_[2]=(i=t[2])!==null&&i!==void 0?i:0,!E.fS(this.getPosition(e),w_)){if(E.JG(a.position,w_),e.parentNode===null||!e.parentNode.transformable)E.JG(a.localPosition,w_);else{var s=e.parentNode.transformable;L.copy(tE,s.worldTransform),L.invert(tE,tE),E.fF(a.localPosition,w_,tE)}this.dirtifyLocal(e,a)}}},{key:"setLocalPosition",value:function(e,t){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=e.transformable;ay[0]=t[0],ay[1]=t[1],ay[2]=(i=t[2])!==null&&i!==void 0?i:0,!E.fS(s.localPosition,ay)&&(E.JG(s.localPosition,ay),a&&this.dirtifyLocal(e,s))}},{key:"scaleLocal",value:function(e,t){var i,a=e.transformable;E.Jp(a.localScale,a.localScale,E.t8(_g,t[0],t[1],(i=t[2])!==null&&i!==void 0?i:1)),this.dirtifyLocal(e,a)}},{key:"setLocalScale",value:function(e,t){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=e.transformable;E.t8(_g,t[0],t[1],(i=t[2])!==null&&i!==void 0?i:s.localScale[2]),!E.fS(_g,s.localScale)&&(E.JG(s.localScale,_g),a&&this.dirtifyLocal(e,s))}},{key:"translate",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.t8(_g,t,i,a)),!E.fS(t,eE)&&(E.IH(_g,this.getPosition(e),t),this.setPosition(e,_g))}},{key:"setRotation",value:function(e,t,i,a,s){var o=e.transformable;if(typeof t=="number"&&(t=X.al(t,i,a,s)),e.parentNode===null||!e.parentNode.transformable)this.setLocalRotation(e,t);else{var l=this.getRotation(e.parentNode);X.JG(mg,l),X.U_(mg,mg),X.Jp(o.localRotation,mg,t),X.Fv(o.localRotation,o.localRotation),this.dirtifyLocal(e,o)}}},{key:"setLocalRotation",value:function(e,t,i,a,s){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;typeof t=="number"&&(t=X.t8(mg,t,i,a,s));var l=e.transformable;X.JG(l.localRotation,t),o&&this.dirtifyLocal(e,l)}},{key:"setLocalSkew",value:function(e,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;typeof t=="number"&&(t=ot.t8(KX,t,i));var s=e.transformable;ot.JG(s.localSkew,t),a&&this.dirtifyLocal(e,s)}},{key:"dirtifyLocal",value:function(e,t){AL(e)||t.localDirtyFlag||(t.localDirtyFlag=!0,t.dirtyFlag||this.dirtifyWorld(e,t))}},{key:"dirtifyWorld",value:function(e,t){t.dirtyFlag||this.unfreezeParentToRoot(e),this.dirtifyWorldInternal(e,t),this.dirtifyToRoot(e,!0)}},{key:"dirtifyFragment",value:function(e){var t=e.transformable;t&&(t.frozen=!1,t.dirtyFlag=!0,t.localDirtyFlag=!0);var i=e.renderable;i&&(i.renderBoundsDirty=!0,i.boundsDirty=!0,i.dirty=!0);for(var a=e.childNodes.length,s=0;s<a;s++)this.dirtifyFragment(e.childNodes[s]);e.nodeName===ki.FRAGMENT&&this.pendingEvents.set(e,!1)}},{key:"triggerPendingEvents",value:function(){var e=this,t=new Set,i=function(s,o){!s.isConnected||t.has(s)||s.nodeName===ki.FRAGMENT||(e.boundsChangedEvent.detail=o,e.boundsChangedEvent.target=s,s.isMutationObserved?s.dispatchEvent(e.boundsChangedEvent):s.ownerDocument.defaultView.dispatchEvent(e.boundsChangedEvent,!0),t.add(s))};this.pendingEvents.forEach(function(a,s){s.nodeName!==ki.FRAGMENT&&(Q2.affectChildren=a,a?s.forEach(function(o){i(o,Q2)}):i(s,Q2))}),t.clear(),this.clearPendingEvents()}},{key:"clearPendingEvents",value:function(){this.pendingEvents.clear()}},{key:"dirtifyToRoot",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=e;for(i.renderable&&(i.renderable.dirty=!0);i;)zL(i),i=i.parentNode;t&&e.forEach(function(a){zL(a)}),this.informDependentDisplayObjects(e),this.pendingEvents.set(e,t)}},{key:"updateDisplayObjectDependency",value:function(e,t,i,a){if(t&&t!==i){var s=this.displayObjectDependencyMap.get(t);if(s&&s[e]){var o=s[e].indexOf(a);s[e].splice(o,1)}}if(i){var l=this.displayObjectDependencyMap.get(i);l||(this.displayObjectDependencyMap.set(i,{}),l=this.displayObjectDependencyMap.get(i)),l[e]||(l[e]=[]),l[e].push(a)}}},{key:"informDependentDisplayObjects",value:function(e){var t=this,i=this.displayObjectDependencyMap.get(e);i&&Object.keys(i).forEach(function(a){i[a].forEach(function(s){t.dirtifyToRoot(s,!0),s.dispatchEvent(new Zf(yu.ATTR_MODIFIED,s,t,t,a,Zf.MODIFICATION,t,t)),s.isCustomElement&&s.isConnected&&s.attributeChangedCallback&&s.attributeChangedCallback(a,t,t)})})}},{key:"getPosition",value:function(e){var t=e.transformable;return L.getTranslation(t.position,this.getWorldTransform(e,t))}},{key:"getRotation",value:function(e){var t=e.transformable;return L.getRotation(t.rotation,this.getWorldTransform(e,t))}},{key:"getScale",value:function(e){var t=e.transformable;return L.getScaling(t.scaling,this.getWorldTransform(e,t))}},{key:"getWorldTransform",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.transformable;return!t.localDirtyFlag&&!t.dirtyFlag||(e.parentNode&&e.parentNode.transformable&&this.getWorldTransform(e.parentNode),this.sync(e,t)),t.worldTransform}},{key:"getLocalPosition",value:function(e){return e.transformable.localPosition}},{key:"getLocalRotation",value:function(e){return e.transformable.localRotation}},{key:"getLocalScale",value:function(e){return e.transformable.localScale}},{key:"getLocalSkew",value:function(e){return e.transformable.localSkew}},{key:"calcLocalTransform",value:function(e){var t=e.localSkew[0]!==0||e.localSkew[1]!==0;if(t){L.fromRotationTranslationScaleOrigin(e.localTransform,e.localRotation,e.localPosition,E.al(1,1,1),e.origin),(e.localSkew[0]!==0||e.localSkew[1]!==0)&&(L.identity(op),op[4]=Math.tan(e.localSkew[0]),op[1]=Math.tan(e.localSkew[1]),L.multiply(e.localTransform,e.localTransform,op));var i=L.fromRotationTranslationScaleOrigin(op,X.t8(mg,0,0,0,1),E.t8(_g,1,1,1),e.localScale,e.origin);L.multiply(e.localTransform,e.localTransform,i)}else{var a=e.localTransform,s=e.localPosition,o=e.localRotation,l=e.localScale,u=e.origin,c=s[0]!==0||s[1]!==0||s[2]!==0,d=o[3]!==1||o[0]!==0||o[1]!==0||o[2]!==0,h=l[0]!==1||l[1]!==1||l[2]!==1,f=u[0]!==0||u[1]!==0||u[2]!==0;!d&&!h&&!f?c?L.fromTranslation(a,s):L.identity(a):L.fromRotationTranslationScaleOrigin(a,o,s,l,u)}}},{key:"getLocalTransform",value:function(e){var t=e.transformable;return t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.localTransform}},{key:"setLocalTransform",value:function(e,t){var i=L.getTranslation(JX,t),a=L.getRotation(QX,t),s=L.getScaling(qX,t);this.setLocalScale(e,s,!1),this.setLocalPosition(e,i,!1),this.setLocalRotation(e,a,void 0,void 0,void 0,!1),this.dirtifyLocal(e,e.transformable)}},{key:"resetLocalTransform",value:function(e){this.setLocalScale(e,ZX,!1),this.setLocalPosition(e,eE,!1),this.setLocalEulerAngles(e,eE,void 0,void 0,!1),this.setLocalSkew(e,YX,void 0,!1),this.dirtifyLocal(e,e.transformable)}},{key:"getTransformedGeometryBounds",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2?arguments[2]:void 0,a=this.getGeometryBounds(e,t);if(!Xd.isEmpty(a)){var s=i||new Xd;return s.setFromTransformedAABB(a,this.getWorldTransform(e)),s}return null}},{key:"getGeometryBounds",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=e,a=i.geometry;a.dirty&&ga.styleValueRegistry.updateGeometry(e);var s=t?a.renderBounds:a.contentBounds||null;return s||new Xd}},{key:"getBounds",value:function(e){var t=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=e,s=a.renderable;if(!s.boundsDirty&&!i&&s.bounds)return s.bounds;if(!s.renderBoundsDirty&&i&&s.renderBounds)return s.renderBounds;var o=i?s.renderBounds:s.bounds,l=this.getTransformedGeometryBounds(e,i,o),u=e.childNodes;if(u.forEach(function(h){var f=t.getBounds(h,i);f&&(l?l.add(f):(l=o||new Xd,l.update(f.center,f.halfExtents)))}),l||(l=new Xd),i){var c=sX(e);if(c){var d=c.parsedStyle.clipPath.getBounds(i);l?d&&(l=d.intersection(l)):l.update(d.center,d.halfExtents)}}return i?(s.renderBounds=l,s.renderBoundsDirty=!1):(s.bounds=l,s.boundsDirty=!1),l}},{key:"getLocalBounds",value:function(e){if(e.parentNode){var t=XX;e.parentNode.transformable&&(t=L.invert(op,this.getWorldTransform(e.parentNode)));var i=this.getBounds(e);if(!Xd.isEmpty(i)){var a=new Xd;return a.setFromTransformedAABB(i,t),a}}return this.getBounds(e)}},{key:"getBoundingClientRect",value:function(e){var t,i,a=this.getGeometryBounds(e);Xd.isEmpty(a)||(i=new Xd,i.setFromTransformedAABB(a,this.getWorldTransform(e)));var s=(t=e.ownerDocument)===null||t===void 0||(t=t.defaultView)===null||t===void 0?void 0:t.getContextService().getBoundingClientRect();if(i){var o=i.getMin(),l=Ic(o,2),u=l[0],c=l[1],d=i.getMax(),h=Ic(d,2),f=h[0],v=h[1];return new q0(u+((s==null?void 0:s.left)||0),c+((s==null?void 0:s.top)||0),f-u,v-c)}return new q0((s==null?void 0:s.left)||0,(s==null?void 0:s.top)||0,0,0)}},{key:"dirtifyWorldInternal",value:function(e,t){var i=this;if(!t.dirtyFlag){t.dirtyFlag=!0,t.frozen=!1,e.childNodes.forEach(function(o){var l=o.transformable;l.dirtyFlag||i.dirtifyWorldInternal(o,l)});var a=e,s=a.renderable;s&&(s.renderBoundsDirty=!0,s.boundsDirty=!0,s.dirty=!0)}}},{key:"syncHierarchy",value:function(e){var t=e.transformable;if(!t.frozen){t.frozen=!0,(t.localDirtyFlag||t.dirtyFlag)&&this.sync(e,t);for(var i=e.childNodes,a=0;a<i.length;a++)this.syncHierarchy(i[a])}}},{key:"sync",value:function(e,t){if(t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.dirtyFlag){var i=e.parentNode,a=i&&i.transformable;i===null||!a?L.copy(t.worldTransform,t.localTransform):L.multiply(t.worldTransform,a.worldTransform,t.localTransform),t.dirtyFlag=!1}}},{key:"unfreezeParentToRoot",value:function(e){for(var t=e.parentNode;t;){var i=t.transformable;i&&(i.frozen=!1),t=t.parentNode}}}])}(),S_={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]},jL=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,tK=/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/,nK=/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/,rK=/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/,iK=/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/,aK=/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/,sK=/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/,oK=/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/,lK=/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/,uK=new RegExp("".concat(tK.source,"|").concat(rK.source,"|").concat(aK.source,"|").concat(oK.source)),cK=new RegExp("".concat(nK.source,"|").concat(iK.source,"|").concat(sK.source,"|").concat(lK.source)),dK=function(){function r(n){var e=this;ri(this,r),this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,i){return e.isBreakingSpace(i)?!1:!!(t&&(cK.exec(i)||uK.exec(t)))},this.trimByKinsokuShorui=function(t){var i=Uf(t),a=i[i.length-2];if(!a)return t;var s=a[a.length-1];return i[i.length-2]=a.slice(0,-1),i[i.length-1]=s+i[i.length-1],i},this.runtime=n}return ii(r,[{key:"measureFont",value:function(e,t){if(this.fontMetricsCache[e])return this.fontMetricsCache[e];var i={ascent:0,descent:0,fontSize:0},a=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(t),s=this.runtime.offscreenCanvasCreator.getOrCreateContext(t,{willReadFrequently:!0});s.font=e;var o=S_.MetricsString+S_.BaselineSymbol,l=Math.ceil(s.measureText(o).width),u=Math.ceil(s.measureText(S_.BaselineSymbol).width),c=S_.HeightMultiplier*u;u=u*S_.BaselineMultiplier|0,a.width=l,a.height=c,s.fillStyle="#f00",s.fillRect(0,0,l,c),s.font=e,s.textBaseline="alphabetic",s.fillStyle="#000",s.fillText(o,0,u);var d=s.getImageData(0,0,l||1,c||1).data,h=d.length,f=l*4,v=0,g=0,m=!1;for(v=0;v<u;++v){for(var y=0;y<f;y+=4)if(d[g+y]!==255){m=!0;break}if(!m)g+=f;else break}for(i.ascent=u-v,g=h-f,m=!1,v=c;v>u;--v){for(var w=0;w<f;w+=4)if(d[g+w]!==255){m=!0;break}if(!m)g-=f;else break}return i.descent=v-u,i.fontSize=i.ascent+i.descent,this.fontMetricsCache[e]=i,i}},{key:"measureText",value:function(e,t,i){var a=t.fontSize,s=a===void 0?16:a,o=t.wordWrap,l=o===void 0?!1:o,u=t.lineHeight,c=t.lineWidth,d=c===void 0?1:c,h=t.textBaseline,f=h===void 0?"alphabetic":h,v=t.textAlign,g=v===void 0?"start":v,m=t.letterSpacing,y=m===void 0?0:m,w=t.textPath;t.textPathSide,t.textPathStartOffset;var T=t.leading,G=T===void 0?0:T,x=bX(t),_=this.measureFont(x,i);_.fontSize===0&&(_.fontSize=s,_.ascent=s);var p=this.runtime.offscreenCanvasCreator.getOrCreateContext(i);p.font=x,t.isOverflowing=!1;var b=l?this.wordWrap(e,t,i):e,R=b.split(/(?:\r\n|\r|\n)/),B=new Array(R.length),j=0;if(w){w.getTotalLength();for(var Z=0;Z<R.length;Z++)p.measureText(R[Z]).width+(R[Z].length-1)*y}else{for(var te=0;te<R.length;te++){var le=p.measureText(R[te]).width+(R[te].length-1)*y;B[te]=le,j=Math.max(j,le)}var ue=j+d,se=u||_.fontSize+d,V=Math.max(se,_.fontSize+d)+(R.length-1)*(se+G);se+=G;var ee=0;return f==="middle"?ee=-V/2:f==="bottom"||f==="alphabetic"||f==="ideographic"?ee=-V:(f==="top"||f==="hanging")&&(ee=0),{font:x,width:ue,height:V,lines:R,lineWidths:B,lineHeight:se,maxLineWidth:j,fontProperties:_,lineMetrics:B.map(function(he,ut){var ct=0;return g==="center"||g==="middle"?ct-=he/2:(g==="right"||g==="end")&&(ct-=he),new q0(ct-d/2,ee+ut*se,he+d,se)})}}}},{key:"setGraphemeOnPath",value:function(){}},{key:"wordWrap",value:function(e,t,i){var a=this,s=t.wordWrapWidth,o=s===void 0?0:s,l=t.letterSpacing,u=l===void 0?0:l,c=t.maxLines,d=c===void 0?1/0:c,h=t.textOverflow,f=this.runtime.offscreenCanvasCreator.getOrCreateContext(i),v=o+u,g="";h==="ellipsis"?g="...":h&&h!=="clip"&&(g=h);for(var m=[],y=0,w=0,T={},G=function(ee){return a.getFromCache(ee,u,T,f)},x=Array.from(g).reduce(function(V,ee){return V+G(ee)},0),_=Array.from(e),p=0;p<_.length;p++){var b=_[p],R=e[p-1],B=e[p+1],j=G(b);if(this.isNewline(b)){if(y++,y>=d){t.isOverflowing=!0;break}w=0,m[y]="";continue}if(w>0&&w+j>v){if(y+1>=d){if(t.isOverflowing=!0,x>0&&x<=v){for(var Z=m[y].length,te=0,le=Z,ue=0;ue<Z;ue++){var se=G(m[y][ue]);if(te+se+x>v){le=ue;break}te+=se}m[y]=(m[y]||"").slice(0,le)+g}break}if(y++,w=0,m[y]="",this.isBreakingSpace(b))continue;this.canBreakInLastChar(b)||(m=this.trimToBreakable(m),w=this.sumTextWidthByCache(m[y]||"",T)),this.shouldBreakByKinsokuShorui(b,B)&&(m=this.trimByKinsokuShorui(m),w+=G(R||""))}w+=j,m[y]=(m[y]||"")+b}return m.join(`
|
|
|
`)}},{key:"isBreakingSpace",value:function(e){return typeof e!="string"?!1:S_.BreakingSpaces.indexOf(e.charCodeAt(0))>=0}},{key:"isNewline",value:function(e){return typeof e!="string"?!1:S_.Newlines.indexOf(e.charCodeAt(0))>=0}},{key:"trimToBreakable",value:function(e){var t=Uf(e),i=t[t.length-2],a=this.findBreakableIndex(i);if(a===-1||!i)return t;var s=i.slice(a,a+1),o=this.isBreakingSpace(s),l=a+1,u=a+(o?0:1);return t[t.length-1]+=i.slice(l,i.length),t[t.length-2]=i.slice(0,u),t}},{key:"canBreakInLastChar",value:function(e){return!(e&&jL.test(e))}},{key:"sumTextWidthByCache",value:function(e,t){return e.split("").reduce(function(i,a){if(!t[a])throw Error("cannot count the word without cache");return i+t[a]},0)}},{key:"findBreakableIndex",value:function(e){for(var t=e.length-1;t>=0;t--)if(!jL.test(e[t]))return t;return-1}},{key:"getFromCache",value:function(e,t,i,a){var s=i[e];if(typeof s!="number"){var o=e.length*t;s=a.measureText(e).width+o,i[e]=s}return s}}])}(),ga={},hK=function(r){var n=new DX,e=new IX;return r={},Na(Na(Na(Na(Na(Na(Na(Na(Na(Na(r,ki.CIRCLE,new OX),ki.ELLIPSE,new RX),ki.RECT,n),ki.IMAGE,n),ki.GROUP,new BX),ki.LINE,new AX),ki.TEXT,new FX(ga)),ki.POLYLINE,e),ki.POLYGON,e),ki.PATH,new LX),Na(Na(r,ki.HTML,new $X),ki.MESH,null)}(),fK=function(r){var n=new WZ,e=new X2;return r={},Na(Na(Na(Na(Na(Na(Na(Na(Na(Na(r,zn.PERCENTAGE,null),zn.NUMBER,new JZ),zn.ANGLE,new jZ),zn.DEFINED_PATH,new HZ),zn.PAINT,n),zn.COLOR,n),zn.FILTER,new YZ),zn.LENGTH,e),zn.LENGTH_PERCENTAGE,e),zn.LENGTH_PERCENTAGE_12,new ZZ),Na(Na(Na(Na(Na(Na(Na(Na(Na(Na(r,zn.LENGTH_PERCENTAGE_14,new XZ),zn.COORDINATE,new X2),zn.OFFSET_DISTANCE,new QZ),zn.OPACITY_VALUE,new qZ),zn.PATH,new eX),zn.LIST_OF_POINTS,new tX),zn.SHADOW_BLUR,new nX),zn.TEXT,new rX),zn.TEXT_TRANSFORM,new iX),zn.TRANSFORM,new MX),Na(Na(Na(r,zn.TRANSFORM_ORIGIN,new PX),zn.Z_INDEX,new NX),zn.MARKER,new KZ)}(),vK=function(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof k.g!="undefined"?k.g:{}};ga.CameraContribution=LY,ga.AnimationTimeline=null,ga.EasingFunction=null,ga.offscreenCanvasCreator=new UX,ga.sceneGraphSelector=new HX,ga.sceneGraphService=new eK(ga),ga.textService=new dK(ga),ga.geometryUpdaterFactory=hK,ga.CSSPropertySyntaxFactory=fK,ga.styleValueRegistry=new UZ(ga),ga.layoutRegistry=null,ga.globalThis=vK(),ga.enableStyleSyntax=!0,ga.enableSizeAttenuation=!1;var gK=0;function DMe(){gK=0}var FMe=new Zf(yu.INSERTED,null,"","","",0,"",""),BMe=new Zf(yu.REMOVED,null,"","","",0,"",""),$Me=new Iv(yu.DESTROY),GMe=null;function zMe(r){return!!(r!=null&&r.nodeName)}var VMe=ga.globalThis.Proxy?ga.globalThis.Proxy:function(){},UMe=new Zf(yu.ATTR_MODIFIED,null,null,null,null,Zf.MODIFICATION,null,null),jMe=E.Ue(),HMe=X.Ue(),WMe=null,YMe=null,ZMe=null,XMe=null,KMe=null,JMe=null,QMe=null,qMe=null,ePe=null,tPe=null,nPe=null,rPe=null,iPe=null,aPe=null,sPe=null,oPe=null,lPe=null,uPe=null,cPe=null,dPe=null,hPe=null,fPe=null,vPe={number:function(n){return new ds(n)},percent:function(n){return new ds(n,"%")},px:function(n){return new ds(n,"px")},em:function(n){return new ds(n,"em")},rem:function(n){return new ds(n,"rem")},deg:function(n){return new ds(n,"deg")},grad:function(n){return new ds(n,"grad")},rad:function(n){return new ds(n,"rad")},turn:function(n){return new ds(n,"turn")},s:function(n){return new ds(n,"s")},ms:function(n){return new ds(n,"ms")},registerProperty:function(n){var e=n.name,t=n.inherits,i=n.interpolable,a=n.initialValue,s=n.syntax;ga.styleValueRegistry.registerMetadata({n:e,inh:t,int:i,d:a,syntax:s})},registerLayout:function(n,e){ga.layoutRegistry.registerLayout(n,e)}},gPe=null,_K=function(){function r(n){ri(this,r),this.strategies=n}return ii(r,[{key:"apply",value:function(e){var t=e.camera,i=e.renderingService,a=e.renderingContext,s=this.strategies;i.hooks.cull.tap(r.tag,function(o){if(o){var l=o.cullable;return s.length===0?l.visible=a.unculledEntities.indexOf(o.entity)>-1:l.visible=s.every(function(u){return u.isVisible(t,o)}),!o.isCulled()&&o.isVisible()?o:(o.dispatchEvent(new Iv(yu.CULLED)),null)}return o}),i.hooks.afterRender.tap(r.tag,function(o){o.cullable.visibilityPlaneMask=-1})}}])}();_K.tag="Culling";var mK=function(){function r(){var n=this;ri(this,r),this.autoPreventDefault=!1,this.rootPointerEvent=new GX(null),this.rootWheelEvent=new zX(null),this.onPointerMove=function(e){var t,i=(t=n.context.renderingContext.root)===null||t===void 0||(t=t.ownerDocument)===null||t===void 0?void 0:t.defaultView;if(!(i.supportsTouchEvents&&e.pointerType==="touch")){var a=n.normalizeToPointerEvent(e,i),s=np(a),o;try{for(s.s();!(o=s.n()).done;){var l=o.value,u=n.bootstrapEvent(n.rootPointerEvent,l,i,e);n.context.eventService.mapEvent(u)}}catch(c){s.e(c)}finally{s.f()}n.setCursor(n.context.eventService.cursor)}},this.onClick=function(e){var t,i=(t=n.context.renderingContext.root)===null||t===void 0||(t=t.ownerDocument)===null||t===void 0?void 0:t.defaultView,a=n.normalizeToPointerEvent(e,i),s=np(a),o;try{for(s.s();!(o=s.n()).done;){var l=o.value,u=n.bootstrapEvent(n.rootPointerEvent,l,i,e);n.context.eventService.mapEvent(u)}}catch(c){s.e(c)}finally{s.f()}n.setCursor(n.context.eventService.cursor)}}return ii(r,[{key:"apply",value:function(e){var t=this;this.context=e;var i=e.renderingService,a=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(s){var o=t.context.renderingService.hooks.pickSync.call({position:s,picked:[],topmost:!0}),l=o.picked;return l[0]||null}),i.hooks.pointerWheel.tap(r.tag,function(s){var o=t.normalizeWheelEvent(s);t.context.eventService.mapEvent(o)}),i.hooks.pointerDown.tap(r.tag,function(s){if(!(a.supportsTouchEvents&&s.pointerType==="touch")){var o=t.normalizeToPointerEvent(s,a);if(t.autoPreventDefault&&o[0].isNormalized){var l=s.cancelable||!("cancelable"in s);l&&s.preventDefault()}var u=np(o),c;try{for(u.s();!(c=u.n()).done;){var d=c.value,h=t.bootstrapEvent(t.rootPointerEvent,d,a,s);t.context.eventService.mapEvent(h)}}catch(f){u.e(f)}finally{u.f()}t.setCursor(t.context.eventService.cursor)}}),i.hooks.pointerUp.tap(r.tag,function(s){if(!(a.supportsTouchEvents&&s.pointerType==="touch")){var o=t.context.contextService.getDomElement(),l=t.context.eventService.isNativeEventFromCanvas(o,s),u=l?"":"outside",c=t.normalizeToPointerEvent(s,a),d=np(c),h;try{for(d.s();!(h=d.n()).done;){var f=h.value,v=t.bootstrapEvent(t.rootPointerEvent,f,a,s);v.type+=u,t.context.eventService.mapEvent(v)}}catch(g){d.e(g)}finally{d.f()}t.setCursor(t.context.eventService.cursor)}}),i.hooks.pointerMove.tap(r.tag,this.onPointerMove),i.hooks.pointerOver.tap(r.tag,this.onPointerMove),i.hooks.pointerOut.tap(r.tag,this.onPointerMove),i.hooks.click.tap(r.tag,this.onClick),i.hooks.pointerCancel.tap(r.tag,function(s){var o=t.normalizeToPointerEvent(s,a),l=np(o),u;try{for(l.s();!(u=l.n()).done;){var c=u.value,d=t.bootstrapEvent(t.rootPointerEvent,c,a,s);t.context.eventService.mapEvent(d)}}catch(h){l.e(h)}finally{l.f()}t.setCursor(t.context.eventService.cursor)})}},{key:"bootstrapEvent",value:function(e,t,i,a){e.view=i,e.originalEvent=null,e.nativeEvent=a,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this.transferMouseData(e,t);var s=this.context.eventService.client2Viewport({x:t.clientX,y:t.clientY}),o=s.x,l=s.y;e.viewport.x=o,e.viewport.y=l;var u=this.context.eventService.viewport2Canvas(e.viewport),c=u.x,d=u.y;return e.canvas.x=c,e.canvas.y=d,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.isTrusted=a.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=lX[e.type]||e.type),e}},{key:"normalizeWheelEvent",value:function(e){var t=this.rootWheelEvent;this.transferMouseData(t,e),t.deltaMode=e.deltaMode,t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ;var i=this.context.eventService.client2Viewport({x:e.clientX,y:e.clientY}),a=i.x,s=i.y;t.viewport.x=a,t.viewport.y=s;var o=this.context.eventService.viewport2Canvas(t.viewport),l=o.x,u=o.y;return t.canvas.x=l,t.canvas.y=u,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.nativeEvent=e,t.type=e.type,t}},{key:"transferMouseData",value:function(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=uX.now(),e.type=t.type,e.altKey=t.altKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.ctrlKey=t.ctrlKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.screen.x=t.screenX,e.screen.y=t.screenY,e.relatedTarget=null}},{key:"setCursor",value:function(e){this.context.contextService.applyCursorStyle(e||this.context.config.cursor||"default")}},{key:"normalizeToPointerEvent",value:function(e,t){var i=[];if(t.isTouchEvent(e))for(var a=0;a<e.changedTouches.length;a++){var s=e.changedTouches[a];(0,ie.Z)(s.button)&&(s.button=0),(0,ie.Z)(s.buttons)&&(s.buttons=1),(0,ie.Z)(s.isPrimary)&&(s.isPrimary=e.touches.length===1&&e.type==="touchstart"),(0,ie.Z)(s.width)&&(s.width=s.radiusX||1),(0,ie.Z)(s.height)&&(s.height=s.radiusY||1),(0,ie.Z)(s.tiltX)&&(s.tiltX=0),(0,ie.Z)(s.tiltY)&&(s.tiltY=0),(0,ie.Z)(s.pointerType)&&(s.pointerType="touch"),(0,ie.Z)(s.pointerId)&&(s.pointerId=s.identifier||0),(0,ie.Z)(s.pressure)&&(s.pressure=s.force||.5),(0,ie.Z)(s.twist)&&(s.twist=0),(0,ie.Z)(s.tangentialPressure)&&(s.tangentialPressure=0),s.isNormalized=!0,s.type=e.type,i.push(s)}else if(t.isMouseEvent(e)){var o=e;(0,ie.Z)(o.isPrimary)&&(o.isPrimary=!0),(0,ie.Z)(o.width)&&(o.width=1),(0,ie.Z)(o.height)&&(o.height=1),(0,ie.Z)(o.tiltX)&&(o.tiltX=0),(0,ie.Z)(o.tiltY)&&(o.tiltY=0),(0,ie.Z)(o.pointerType)&&(o.pointerType="mouse"),(0,ie.Z)(o.pointerId)&&(o.pointerId=oX),(0,ie.Z)(o.pressure)&&(o.pressure=.5),(0,ie.Z)(o.twist)&&(o.twist=0),(0,ie.Z)(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,i.push(o)}else i.push(e);return i}}])}();mK.tag="Event";var _Pe=[ki.CIRCLE,ki.ELLIPSE,ki.IMAGE,ki.RECT,ki.LINE,ki.POLYLINE,ki.POLYGON,ki.TEXT,ki.PATH,ki.HTML],mPe=null,pK=function(){function r(){ri(this,r),this.syncTasks=new Map,this.isFirstTimeRendering=!0,this.syncing=!1,this.isFirstTimeRenderingFinished=!1}return ii(r,[{key:"apply",value:function(e){var t=this,i,a=e.renderingService,s=e.renderingContext,o=e.rBushRoot,l=s.root.ownerDocument.defaultView;this.rBush=o;var u=function(g){var m=g.target;m.renderable.dirty=!0,a.dirtify()},c=function(g){t.syncTasks.set(g.target,g.detail.affectChildren),a.dirtify()},d=function(g){var m=g.target;ga.enableSizeAttenuation&&ga.styleValueRegistry.updateSizeAttenuation(m,l.getCamera().getZoom())},h=function(g){var m=g.target,y=m.rBushNode;y.aabb&&t.rBush.remove(y.aabb),t.syncTasks.delete(m),ga.sceneGraphService.dirtifyToRoot(m),a.dirtify()};a.hooks.init.tap(r.tag,function(){l.addEventListener(yu.MOUNTED,d),l.addEventListener(yu.UNMOUNTED,h),l.addEventListener(yu.ATTR_MODIFIED,u),l.addEventListener(yu.BOUNDS_CHANGED,c)}),a.hooks.destroy.tap(r.tag,function(){l.removeEventListener(yu.MOUNTED,d),l.removeEventListener(yu.UNMOUNTED,h),l.removeEventListener(yu.ATTR_MODIFIED,u),l.removeEventListener(yu.BOUNDS_CHANGED,c),t.syncTasks.clear()});var f=(i=ga.globalThis.requestIdleCallback)!==null&&i!==void 0?i:FL.bind(ga.globalThis);a.hooks.endFrame.tap(r.tag,function(){t.isFirstTimeRendering?(t.isFirstTimeRendering=!1,t.syncing=!0,f(function(){t.syncRTree(!0),t.isFirstTimeRenderingFinished=!0})):t.syncRTree()})}},{key:"syncNode",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.isConnected){var i=e.rBushNode;i.aabb&&this.rBush.remove(i.aabb);var a=e.getRenderBounds();if(a){var s=e.renderable;t&&(s.dirtyRenderBounds||(s.dirtyRenderBounds=new Xd),s.dirtyRenderBounds.update(a.center,a.halfExtents));var o=a.getMin(),l=Ic(o,2),u=l[0],c=l[1],d=a.getMax(),h=Ic(d,2),f=h[0],v=h[1];i.aabb||(i.aabb={}),i.aabb.displayObject=e,i.aabb.minX=u,i.aabb.minY=c,i.aabb.maxX=f,i.aabb.maxY=v}if(i.aabb&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.minX)&&!isNaN(i.aabb.minY))return i.aabb}}},{key:"syncRTree",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!(!t&&(this.syncing||this.syncTasks.size===0))){this.syncing=!0;var i=[],a=new Set,s=function(l){if(!a.has(l)&&l.renderable){var u=e.syncNode(l,t);u&&(i.push(u),a.add(l))}};this.syncTasks.forEach(function(o,l){o&&l.forEach(s);for(var u=l;u;)s(u),u=u.parentElement}),this.rBush.load(i),i.length=0,this.syncing=!1}}}])}();pK.tag="Prepare";function pPe(r){return!!r.document}var q2=function(r){return r.READY="ready",r.BEFORE_RENDER="beforerender",r.RERENDER="rerender",r.AFTER_RENDER="afterrender",r.BEFORE_DESTROY="beforedestroy",r.AFTER_DESTROY="afterdestroy",r.RESIZE="resize",r.DIRTY_RECTANGLE="dirtyrectangle",r.RENDERER_CHANGED="rendererchanged",r}({}),yPe=500,xPe=.1,EPe=1e3,bPe=new Iv(yu.MOUNTED),kPe=new Iv(yu.UNMOUNTED),wPe=new Iv(q2.BEFORE_RENDER),SPe=new Iv(q2.RERENDER),TPe=new Iv(q2.AFTER_RENDER),CPe=null;var eT=function(r){function n(e,t,i,a){var s;return ri(this,n),s=_d(this,n,[e]),s.currentTime=i,s.timelineTime=a,s.target=t,s.type="finish",s.bubbles=!1,s.currentTarget=t,s.defaultPrevented=!1,s.eventPhase=s.AT_TARGET,s.timeStamp=Date.now(),s.currentTime=i,s.timelineTime=a,s}return md(n,r),ii(n)}(q1),yK=0,xK=function(){function r(n,e){var t;ri(this,r),this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._playbackRate=1,this._inTimeline=!0,this.effect=n,n.animation=this,this.timeline=e,this.id="".concat(yK++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number((t=this.effect)===null||t===void 0?void 0:t.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return ii(r,[{key:"pending",get:function(){return this._startTime===null&&!this._paused&&this.playbackRate!==0||this.currentTimePending}},{key:"playState",get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"}},{key:"ready",get:function(){var e=this;return this.readyPromise||(this.timeline.animationsWithPromises.indexOf(this)===-1&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(t,i){e.resolveReadyPromise=function(){t(e)},e.rejectReadyPromise=function(){i(new Error)}}),this.pending||this.resolveReadyPromise()),this.readyPromise}},{key:"finished",get:function(){var e=this;return this.finishedPromise||(this.timeline.animationsWithPromises.indexOf(this)===-1&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(t,i){e.resolveFinishedPromise=function(){t(e)},e.rejectFinishedPromise=function(){i(new Error)}}),this.playState==="finished"&&this.resolveFinishedPromise()),this.finishedPromise}},{key:"currentTime",get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(e){if(e=Number(e),!isNaN(e)){if(this.timeline.restart(),!this._paused&&this._startTime!==null){var t;this._startTime=Number((t=this.timeline)===null||t===void 0?void 0:t.currentTime)-e/this.playbackRate}this.currentTimePending=!1,this._currentTime!==e&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(e,!0),this.timeline.applyDirtiedAnimation(this))}}},{key:"startTime",get:function(){return this._startTime},set:function(e){if(e!==null){if(this.updatePromises(),e=Number(e),isNaN(e)||this._paused||this._idle)return;this._startTime=e,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()}}},{key:"playbackRate",get:function(){return this._playbackRate},set:function(e){if(e!==this._playbackRate){this.updatePromises();var t=this.currentTime;this._playbackRate=e,this.startTime=null,this.playState!=="paused"&&this.playState!=="idle"&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),t!==null&&(this.currentTime=t),this.updatePromises()}}},{key:"_isFinished",get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)}},{key:"totalDuration",get:function(){return this._totalDuration}},{key:"_needsTick",get:function(){return this.pending||this.playState==="running"||!this._finishedFlag}},{key:"updatePromises",value:function(){var e=this.oldPlayState,t=this.pending?"pending":this.playState;return this.readyPromise&&t!==e&&(t==="idle"?(this.rejectReadyPromise(),this.readyPromise=void 0):e==="pending"?this.resolveReadyPromise():t==="pending"&&(this.readyPromise=void 0)),this.finishedPromise&&t!==e&&(t==="idle"?(this.rejectFinishedPromise(),this.finishedPromise=void 0):t==="finished"?this.resolveFinishedPromise():e==="finished"&&(this.finishedPromise=void 0)),this.oldPlayState=t,this.readyPromise||this.finishedPromise}},{key:"play",value:function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),this.timeline.animations.indexOf(this)===-1&&this.timeline.animations.push(this),this.updatePromises()}},{key:"pause",value:function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),!this._isFinished&&!this._paused&&!this._idle?this.currentTimePending=!0:this._idle&&(this.rewind(),this._idle=!1),this._startTime=null,this._paused=!0,this.updatePromises()}},{key:"finish",value:function(){this.updatePromises(),!this._idle&&(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())}},{key:"cancel",value:function(){var e=this;if(this.updatePromises(),!!this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises(),this.oncancel)){var t=new eT(null,this,this.currentTime,null);setTimeout(function(){e.oncancel(t)})}}},{key:"reverse",value:function(){this.updatePromises();var e=this.currentTime;this.playbackRate*=-1,this.play(),e!==null&&(this.currentTime=e),this.updatePromises()}},{key:"updatePlaybackRate",value:function(e){this.playbackRate=e}},{key:"targetAnimations",value:function(){var e,t=(e=this.effect)===null||e===void 0?void 0:e.target;return t.getAnimations()}},{key:"markTarget",value:function(){var e=this.targetAnimations();e.indexOf(this)===-1&&e.push(this)}},{key:"unmarkTarget",value:function(){var e=this.targetAnimations(),t=e.indexOf(this);t!==-1&&e.splice(t,1)}},{key:"tick",value:function(e,t){!this._idle&&!this._paused&&(this._startTime===null?t&&(this.startTime=e-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((e-this._startTime)*this.playbackRate)),t&&(this.currentTimePending=!1,this.fireEvents(e))}},{key:"rewind",value:function(){if(this.playbackRate>=0)this.currentTime=0;else if(this._totalDuration<1/0)this.currentTime=this._totalDuration;else throw new Error("Unable to rewind negative playback rate animation with infinite duration")}},{key:"persist",value:function(){throw new Error(Lu)}},{key:"addEventListener",value:function(e,t,i){throw new Error(Lu)}},{key:"removeEventListener",value:function(e,t,i){throw new Error(Lu)}},{key:"dispatchEvent",value:function(e){throw new Error(Lu)}},{key:"commitStyles",value:function(){throw new Error(Lu)}},{key:"ensureAlive",value:function(){if(this.playbackRate<0&&this.currentTime===0){var e;this._inEffect=!!((e=this.effect)!==null&&e!==void 0&&e.update(-1))}else{var t;this._inEffect=!!((t=this.effect)!==null&&t!==void 0&&t.update(this.currentTime))}!this._inTimeline&&(this._inEffect||!this._finishedFlag)&&(this._inTimeline=!0,this.timeline.animations.push(this))}},{key:"tickCurrentTime",value:function(e,t){e!==this._currentTime&&(this._currentTime=e,this._isFinished&&!t&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())}},{key:"fireEvents",value:function(e){var t=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var i=new eT(null,this,this.currentTime,e);setTimeout(function(){t.onfinish&&t.onfinish(i)})}this._finishedFlag=!0}}else{if(this.onframe&&this.playState==="running"){var a=new eT(null,this,this.currentTime,e);this.onframe(a)}this._finishedFlag=!1}}}])}(),EK=4,bK=.001,kK=1e-7,wK=10,sy=11,rE=1/(sy-1),SK=typeof Float32Array=="function",HL=function(n,e){return 1-3*e+3*n},WL=function(n,e){return 3*e-6*n},YL=function(n){return 3*n},iE=function(n,e,t){return((HL(e,t)*n+WL(e,t))*n+YL(e))*n},ZL=function(n,e,t){return 3*HL(e,t)*n*n+2*WL(e,t)*n+YL(e)},TK=function(n,e,t,i,a){var s,o,l=0;do o=e+(t-e)/2,s=iE(o,i,a)-n,s>0?t=o:e=o;while(Math.abs(s)>kK&&++l<wK);return o},CK=function(n,e,t,i){for(var a=0;a<EK;++a){var s=ZL(e,t,i);if(s===0)return e;var o=iE(e,t,i)-n;e-=o/s}return e},tT=function(n,e,t,i){if(!(n>=0&&n<=1&&t>=0&&t<=1))throw new Error("bezier x values must be in [0, 1] range");if(n===e&&t===i)return function(l){return l};for(var a=SK?new Float32Array(sy):new Array(sy),s=0;s<sy;++s)a[s]=iE(s*rE,n,t);var o=function(u){for(var c=0,d=1,h=sy-1;d!==h&&a[d]<=u;++d)c+=rE;--d;var f=(u-a[d])/(a[d+1]-a[d]),v=c+f*rE,g=ZL(v,n,t);return g>=bK?CK(u,v,n,t):g===0?v:TK(u,c,c+rE,n,t)};return function(l){return l===0||l===1?l:iE(o(l),e,i)}},MK=function(n){return n=n.replace(/([A-Z])/g,function(e){return"-".concat(e.toLowerCase())}),n.charAt(0)==="-"?n.substring(1):n},aE=function(n){return Math.pow(n,2)},sE=function(n){return Math.pow(n,3)},oE=function(n){return Math.pow(n,4)},lE=function(n){return Math.pow(n,5)},uE=function(n){return Math.pow(n,6)},cE=function(n){return 1-Math.cos(n*Math.PI/2)},dE=function(n){return 1-Math.sqrt(1-n*n)},hE=function(n){return n*n*(3*n-2)},fE=function(n){for(var e,t=4;n<((e=Math.pow(2,--t))-1)/11;);return 1/Math.pow(4,3-t)-7.5625*Math.pow((e*3-2)/22-n,2)},vE=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],t=Ic(e,2),i=t[0],a=i===void 0?1:i,s=t[1],o=s===void 0?.5:s,l=(0,O.Z)(Number(a),1,10),u=(0,O.Z)(Number(o),.1,2);return n===0||n===1?n:-l*Math.pow(2,10*(n-1))*Math.sin((n-1-u/(Math.PI*2)*Math.asin(1/l))*(Math.PI*2)/u)},oy=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],t=arguments.length>2?arguments[2]:void 0,i=Ic(e,4),a=i[0],s=a===void 0?1:a,o=i[1],l=o===void 0?100:o,u=i[2],c=u===void 0?10:u,d=i[3],h=d===void 0?0:d;s=(0,O.Z)(s,.1,1e3),l=(0,O.Z)(l,.1,1e3),c=(0,O.Z)(c,.1,1e3),h=(0,O.Z)(h,.1,1e3);var f=Math.sqrt(l/s),v=c/(2*Math.sqrt(l*s)),g=v<1?f*Math.sqrt(1-v*v):0,m=1,y=v<1?(v*f+-h)/g:-h+f,w=t?t*n/1e3:n;return v<1?w=Math.exp(-w*v*f)*(m*Math.cos(g*w)+y*Math.sin(g*w)):w=(m+y*w)*Math.exp(-w*f),n===0||n===1?n:1-w},nT=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],t=e,i=Ic(t,2),a=i[0],s=a===void 0?10:a,o=i[1],l=o==="start"?Math.ceil:Math.floor;return l((0,O.Z)(n,0,1)*s)/s},XL=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],t=Ic(e,4),i=t[0],a=t[1],s=t[2],o=t[3];return tT(i,a,s,o)(n)},gE=tT(.42,0,1,1),Jd=function(n){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;return 1-n(1-e,t,i)}},Qd=function(n){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;return e<.5?n(e*2,t,i)/2:1-n(e*-2+2,t,i)/2}},qd=function(n){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;return e<.5?(1-n(1-e*2,t,i))/2:(n(e*2-1,t,i)+1)/2}},KL={steps:nT,"step-start":function(n){return nT(n,[1,"start"])},"step-end":function(n){return nT(n,[1,"end"])},linear:function(n){return n},"cubic-bezier":XL,ease:function(n){return XL(n,[.25,.1,.25,1])},in:gE,out:Jd(gE),"in-out":Qd(gE),"out-in":qd(gE),"in-quad":aE,"out-quad":Jd(aE),"in-out-quad":Qd(aE),"out-in-quad":qd(aE),"in-cubic":sE,"out-cubic":Jd(sE),"in-out-cubic":Qd(sE),"out-in-cubic":qd(sE),"in-quart":oE,"out-quart":Jd(oE),"in-out-quart":Qd(oE),"out-in-quart":qd(oE),"in-quint":lE,"out-quint":Jd(lE),"in-out-quint":Qd(lE),"out-in-quint":qd(lE),"in-expo":uE,"out-expo":Jd(uE),"in-out-expo":Qd(uE),"out-in-expo":qd(uE),"in-sine":cE,"out-sine":Jd(cE),"in-out-sine":Qd(cE),"out-in-sine":qd(cE),"in-circ":dE,"out-circ":Jd(dE),"in-out-circ":Qd(dE),"out-in-circ":qd(dE),"in-back":hE,"out-back":Jd(hE),"in-out-back":Qd(hE),"out-in-back":qd(hE),"in-bounce":fE,"out-bounce":Jd(fE),"in-out-bounce":Qd(fE),"out-in-bounce":qd(fE),"in-elastic":vE,"out-elastic":Jd(vE),"in-out-elastic":Qd(vE),"out-in-elastic":qd(vE),spring:oy,"spring-in":oy,"spring-out":Jd(oy),"spring-in-out":Qd(oy),"spring-out-in":qd(oy)},PK=function(n){return MK(n).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()},NK=function(n){return KL[PK(n)]||KL.linear},OK=function(n){return n},RK=1,AK=.5,JL=0;function QL(r,n){return function(e){if(e>=1)return 1;var t=1/r;return e+=n*t,e-e%t}}var _E="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",LK=new RegExp("cubic-bezier\\(".concat(_E,",").concat(_E,",").concat(_E,",").concat(_E,"\\)")),IK=/steps\(\s*(\d+)\s*\)/,DK=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function rT(r){var n=LK.exec(r);if(n)return tT.apply(void 0,Uf(n.slice(1).map(Number)));var e=IK.exec(r);if(e)return QL(Number(e[1]),JL);var t=DK.exec(r);return t?QL(Number(t[1]),{start:RK,middle:AK,end:JL}[t[2]]):NK(r)}function FK(r){return Math.abs(BK(r)/(r.playbackRate||1))}function BK(r){var n;return r.duration===0||r.iterations===0?0:(r.duration==="auto"?0:Number(r.duration))*((n=r.iterations)!==null&&n!==void 0?n:1)}var qL=0,iT=1,mE=2,eI=3;function $K(r,n,e){if(n===null)return qL;var t=e.endTime;return n<Math.min(e.delay,t)?iT:n>=Math.min(e.delay+r+e.endDelay,t)?mE:eI}function GK(r,n,e,t,i){switch(t){case iT:return n==="backwards"||n==="both"?0:null;case eI:return e-i;case mE:return n==="forwards"||n==="both"?r:null;case qL:return null}}function zK(r,n,e,t,i){var a=i;return r===0?n!==iT&&(a+=e):a+=t/r,a}function VK(r,n,e,t,i,a){var s=r===1/0?n%1:r%1;return s===0&&e===mE&&t!==0&&(i!==0||a===0)&&(s=1),s}function UK(r,n,e,t){return r===mE&&n===1/0?1/0:e===1?Math.floor(t)-1:Math.floor(t)}function jK(r,n,e){var t=r;if(r!=="normal"&&r!=="reverse"){var i=n;r==="alternate-reverse"&&(i+=1),t="normal",i!==1/0&&i%2!==0&&(t="reverse")}return t==="normal"?e:1-e}function HK(r,n,e){var t=$K(r,n,e),i=GK(r,e.fill,n,t,e.delay);if(i===null)return null;var a=e.duration==="auto"?0:e.duration,s=zK(a,t,e.iterations,i,e.iterationStart),o=VK(s,e.iterationStart,t,e.iterations,i,a),l=UK(t,e.iterations,o,s),u=jK(e.direction,l,o);return e.currentIteration=l,e.progress=u,e.easingFunction(u)}function WK(r,n,e){var t=YK(r,n),i=ZK(t,e);return function(a,s){if(s!==null)i.filter(function(l){return s>=l.applyFrom&&s<l.applyTo}).forEach(function(l){var u=s-l.startOffset,c=l.endOffset-l.startOffset,d=c===0?0:u/c;a.setAttribute(l.property,l.interpolation(d),!1,!1)});else for(var o in t)tI(o)&&a.setAttribute(o,null)}}function tI(r){return r!=="offset"&&r!=="easing"&&r!=="composite"&&r!=="computedOffset"}function YK(r,n){for(var e={},t=0;t<r.length;t++)for(var i in r[t])if(tI(i)){var a={offset:r[t].offset,computedOffset:r[t].computedOffset,easing:r[t].easing,easingFunction:rT(r[t].easing)||n.easingFunction,value:r[t][i]};e[i]=e[i]||[],e[i].push(a)}return e}function ZK(r,n){var e=[];for(var t in r)for(var i=r[t],a=0;a<i.length-1;a++){var s=a,o=a+1,l=i[s].computedOffset,u=i[o].computedOffset,c=l,d=u;a===0&&(c=-1/0,u===0&&(o=s)),a===i.length-2&&(d=1/0,l===1&&(s=o)),e.push({applyFrom:c,applyTo:d,startOffset:i[s].computedOffset,endOffset:i[o].computedOffset,easingFunction:i[s].easingFunction,property:t,interpolation:XK(t,i[s].value,i[o].value,n)})}return e.sort(function(h,f){return h.startOffset-f.startOffset}),e}var nI=function(n,e,t){return function(i){var a=rI(n,e,i);return(0,pe.Z)(a)?a:t(a)}};function XK(r,n,e,t){var i=ML[r];if(i&&i.syntax&&i.int){var a=ga.styleValueRegistry.getPropertySyntax(i.syntax);if(a){var s=a.parser,o=s?s(n,t):n,l=s?s(e,t):e,u=a.mixer(o,l,t);if(u){var c=nI.apply(void 0,Uf(u));return function(d){return d===0?n:d===1?e:c(d)}}}}return nI(!1,!0,function(d){return d?e:n})}function rI(r,n,e){if(typeof r=="number"&&typeof n=="number")return r*(1-e)+n*e;if(typeof r=="boolean"&&typeof n=="boolean"||typeof r=="string"&&typeof n=="string")return e<.5?r:n;if(Array.isArray(r)&&Array.isArray(n)){for(var t=r.length,i=n.length,a=Math.max(t,i),s=[],o=0;o<a;o++)s.push(rI(r[o<t?o:t-1],n[o<i?o:i-1],e));return s}throw new Error("Mismatched interpolation arguments ".concat(r,":").concat(n))}var KK=function(){function r(){ri(this,r),this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=OK,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}return ii(r,[{key:"easing",get:function(){return this._easing},set:function(e){this.easingFunction=rT(e),this._easing=e}}])}();function JK(r){var n=[];for(var e in r)if(!(e in["easing","offset","composite"])){var t=r[e];Array.isArray(t)||(t=[t]);for(var i=t.length,a=0;a<i;a++){if(!n[a]){var s={};"offset"in r&&(s.offset=Number(r.offset)),"easing"in r&&(s.easing=r.easing),"composite"in r&&(s.composite=r.composite),n[a]=s}t[a]!==void 0&&t[a]!==null&&(n[a][e]=t[a])}}return n.sort(function(o,l){return(o.computedOffset||0)-(l.computedOffset||0)}),n}function iI(r,n){if(r===null)return[];Array.isArray(r)||(r=JK(r));for(var e=r.map(function(l){var u={};n!=null&&n.composite&&(u.composite="auto");for(var c in l){var d=l[c];if(c==="offset"){if(d!==null){if(d=Number(d),!isFinite(d))throw new Error("Keyframe offsets must be numbers.");if(d<0||d>1)throw new Error("Keyframe offsets must be between 0 and 1.");u.computedOffset=d}}else if(c==="composite"&&["replace","add","accumulate","auto"].indexOf(d)===-1)throw new Error("".concat(d," compositing is not supported"));u[c]=d}return u.offset===void 0&&(u.offset=null),u.easing===void 0&&(u.easing=(n==null?void 0:n.easing)||"linear"),u.composite===void 0&&(u.composite="auto"),u}),t=!0,i=-1/0,a=0;a<e.length;a++){var s=e[a].offset;if((0,xe.Z)(s))t=!1;else{if(s<i)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=s}}e=e.filter(function(l){return Number(l.offset)>=0&&Number(l.offset)<=1});function o(){var l,u=e,c=u.length;if(e[c-1].computedOffset=Number((l=e[c-1].offset)!==null&&l!==void 0?l:1),c>1){var d;e[0].computedOffset=Number((d=e[0].offset)!==null&&d!==void 0?d:0)}for(var h=0,f=Number(e[0].computedOffset),v=1;v<c;v++){var g=e[v].computedOffset;if(!(0,xe.Z)(g)&&!(0,xe.Z)(f)){for(var m=1;m<v-h;m++)e[h+m].computedOffset=f+(Number(g)-f)*m/(v-h);h=v,f=Number(g)}}}return t||o(),e}var QK="backwards|forwards|both|none".split("|"),qK="reverse|alternate|alternate-reverse".split("|");function eJ(r,n){var e=new KK;return n&&(e.fill="both",e.duration="auto"),typeof r=="number"&&!isNaN(r)?e.duration=r:r!==void 0&&Object.keys(r).forEach(function(t){if(r[t]!==void 0&&r[t]!==null&&r[t]!=="auto"){if((typeof e[t]=="number"||t==="duration")&&(typeof r[t]!="number"||isNaN(r[t]))||t==="fill"&&QK.indexOf(r[t])===-1||t==="direction"&&qK.indexOf(r[t])===-1)return;e[t]=r[t]}}),e}function tJ(r,n){var e;return r=nJ((e=r)!==null&&e!==void 0?e:{duration:"auto"}),eJ(r,n)}function nJ(r){return typeof r=="number"&&(isNaN(r)?r={duration:"auto"}:r={duration:r}),r}var rJ=function(){function r(n,e,t){var i=this;ri(this,r),this.composite="replace",this.iterationComposite="replace",this.target=n,this.timing=tJ(t,!1),this.timing.effect=this,this.timing.activeDuration=FK(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=iI(e,this.timing),this.interpolations=WK(this.normalizedKeyframes,this.timing,this.target);var a=ga.globalThis.Proxy;this.computedTiming=a?new a(this.timing,{get:function(o,l){return l==="duration"?o.duration==="auto"?0:o.duration:l==="fill"?o.fill==="auto"?"none":o.fill:l==="localTime"?i.animation&&i.animation.currentTime||null:l==="currentIteration"?!i.animation||i.animation.playState!=="running"?null:o.currentIteration||0:l==="progress"?!i.animation||i.animation.playState!=="running"?null:o.progress||0:o[l]},set:function(){return!0}}):this.timing}return ii(r,[{key:"applyInterpolations",value:function(){this.interpolations(this.target,Number(this.timeFraction))}},{key:"update",value:function(e){return e===null?!1:(this.timeFraction=HK(this.timing.activeDuration,e,this.timing),this.timeFraction!==null)}},{key:"getKeyframes",value:function(){return this.normalizedKeyframes}},{key:"setKeyframes",value:function(e){this.normalizedKeyframes=iI(e)}},{key:"getComputedTiming",value:function(){return this.computedTiming}},{key:"getTiming",value:function(){return this.timing}},{key:"updateTiming",value:function(e){var t=this;Object.keys(e||{}).forEach(function(i){t.timing[i]=e[i]})}}])}();function aI(r,n){return Number(r.id)-Number(n.id)}var iJ=function(){function r(n){var e=this;ri(this,r),this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.webAnimationsNextTick=function(t){e.currentTime=t,e.discardAnimations(),e.animations.length===0?e.timelineTicking=!1:e.requestAnimationFrame(e.webAnimationsNextTick)},this.processRafCallbacks=function(t){var i=e.rafCallbacks;e.rafCallbacks=[],t<Number(e.currentTime)&&(t=Number(e.currentTime)),e.animations.sort(aI),e.animations=e.tick(t,!0,e.animations)[0],i.forEach(function(a){a[1](t)}),e.applyPendingEffects()},this.document=n}return ii(r,[{key:"getAnimations",value:function(){return this.discardAnimations(),this.animations.slice()}},{key:"isTicking",value:function(){return this.inTick}},{key:"play",value:function(e,t,i){var a=new rJ(e,t,i),s=new xK(a,this);return this.animations.push(s),this.restartWebAnimationsNextTick(),s.updatePromises(),s.play(),s.updatePromises(),s}},{key:"applyDirtiedAnimation",value:function(e){var t=this;if(!this.inTick){e.markTarget();var i=e.targetAnimations();i.sort(aI);var a=this.tick(Number(this.currentTime),!1,i.slice())[1];a.forEach(function(s){var o=t.animations.indexOf(s);o!==-1&&t.animations.splice(o,1)}),this.applyPendingEffects()}}},{key:"restart",value:function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame(function(){}),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame}},{key:"destroy",value:function(){this.document.defaultView.cancelAnimationFrame(this.frameId)}},{key:"applyPendingEffects",value:function(){this.pendingEffects.forEach(function(e){e==null||e.applyInterpolations()}),this.pendingEffects=[]}},{key:"updateAnimationsPromises",value:function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(e){return e.updatePromises()})}},{key:"discardAnimations",value:function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(e){return e.playState!=="finished"&&e.playState!=="idle"})}},{key:"restartWebAnimationsNextTick",value:function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))}},{key:"rAF",value:function(e){var t=this.rafId++;return this.rafCallbacks.length===0&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([t,e]),t}},{key:"requestAnimationFrame",value:function(e){var t=this;return this.rAF(function(i){t.updateAnimationsPromises(),e(i),t.updateAnimationsPromises()})}},{key:"tick",value:function(e,t,i){var a=this,s,o;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=e,this.ticking=!1;var l=[],u=[],c=[],d=[];return i.forEach(function(h){h.tick(e,t),h._inEffect?(u.push(h.effect),h.markTarget()):(l.push(h.effect),h.unmarkTarget()),h._needsTick&&(a.ticking=!0);var f=h._inEffect||h._needsTick;h._inTimeline=f,f?c.push(h):d.push(h)}),(s=this.pendingEffects).push.apply(s,l),(o=this.pendingEffects).push.apply(o,u),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[c,d]}}])}();ga.EasingFunction=rT,ga.AnimationTimeline=iJ;var pE=k(83914),Ml=k(30335);const aJ={duration:500},sJ={duration:1e3,easing:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",iterations:1,fill:"both"},MPe={CHANGE:"change"};var ko;(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"})(ko||(ko={}));var $c;(function(r){r.DRAW="draw",r.COLLAPSE="collapse",r.EXPAND="expand",r.TRANSFORM="transform"})($c||($c={}));var Dv;(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"})(Dv||(Dv={}));var T_;(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"})(T_||(T_={}));var un;(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"})(un||(un={}));var lp;(function(r){r.KEY_DOWN="keydown",r.KEY_UP="keyup"})(lp||(lp={}));var yE;(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"})(yE||(yE={}));var qn;(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"})(qn||(qn={}));var pg;(function(r){r.UNDO="undo",r.REDO="redo",r.CANCEL="cancel",r.ADD="add",r.CLEAR="clear",r.CHANGE="change"})(pg||(pg={}));var eh;(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"})(eh||(eh={}));const Ls="combo",Hh="tree";var ly;(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"})(ly||(ly={}));const aT={animation:{},behavior:{},combo:{},edge:{},layout:{},node:{},palette:{},theme:{},plugin:{},transform:{},shape:{}};function Fv(r,n){var e;const t=(e=aT[r])===null||e===void 0?void 0:e[n];if(t)return t}function PPe(r){return EXTENSION_REGISTRY[r]}const oJ="5.0.27",lJ="G6";function Bv(r){return`[${lJ} v${oJ}] ${r}`}const Gc={mute:!1,debug:r=>{!Gc.mute&&console.debug(Bv(r))},info:r=>{!Gc.mute&&console.info(Bv(r))},warn:r=>{!Gc.mute&&console.warn(Bv(r))},error:r=>{!Gc.mute&&console.error(Bv(r))}};function sI(r){const{theme:n}=r;if(!n)return{};const e=Fv(ly.THEME,n);return e||(Gc.warn(`The theme of ${n} is not registered.`),{})}function sT(r,n){if(Array.isArray(r)&&r.length===0)return null;const e=Array.isArray(r)?r[0]:r,t=Array.isArray(r)?r.slice(1):n||[];return new Proxy(e,{get(i,a){return typeof i[a]=="function"&&!["onframe","onfinish"].includes(a)?(...s)=>{i[a](...s),t.forEach(o=>{var l;return(l=o[a])===null||l===void 0?void 0:l.call(o,...s)})}:a==="finished"?Promise.all([e.finished,...t.map(s=>s.finished)]):Reflect.get(i,a)},set(i,a,s){return["onframe","onfinish"].includes(a)||t.forEach(o=>{o[a]=s}),Reflect.set(i,a,s)}})}function oT(r){const n=r.reduce((t,i)=>(Object.entries(i).forEach(([a,s])=>{t[a]===void 0?t[a]=[s]:t[a].push(s)}),t),{});Object.entries(n).forEach(([t,i])=>{(i.length!==r.length||i.some(a=>(0,xe.Z)(a))||i.every(a=>!["sourceNode","targetNode","childrenNode"].includes(t)&&(0,Ml.Z)(a,i[0])))&&delete n[t]});const e=Object.entries(n).reduce((t,[i,a])=>(a.forEach((s,o)=>{t[o]?t[o][i]=s:t[o]={[i]:s}}),t),[]);return r.length!==0&&e.length===0&&e.push({_:0},{_:0}),e}function uy(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 oI(r,n){const{animation:e}=r;if(e===!1||n===!1)return!1;const t=Object.assign({},aJ);return(0,Gs.Z)(e)&&Object.assign(t,e),(0,Gs.Z)(n)&&Object.assign(t,n),t}function uJ(r){if(typeof r=="string"){const n=Fv(ly.ANIMATION,r);return n||(Gc.warn(`The animation of ${r} is not registered.`),[])}return r}function cJ(r,n,e,t){var i,a;const{animation:s}=r,o=(i=r==null?void 0:r[n])===null||i===void 0?void 0:i.animation;if(o===!1)return[];const l=o==null?void 0:o[e];if(l===!1)return[];if(s===!1||t===!1)return[];const u=(a=sI(r)[n])===null||a===void 0?void 0:a.animation,c=(h=[])=>uJ(h).map(f=>Object.assign(Object.assign(Object.assign(Object.assign({},sJ),(0,Gs.Z)(s)&&s),f),(0,Gs.Z)(t)&&t));if(l)return c(l);if(!u)return[];const d=u[e];return d===!1?[]:c(d)}function lI(r,n,e,t){if(Array.isArray(t)){let a=!1;const s=t.map(o=>o[0]==="translate"?(a=!0,["translate",r,n]):o[0]==="translate3d"?(a=!0,["translate3d",r,n,e]):o);return a||s.splice(0,0,e===0?["translate",r,n]:["translate3d",r,n,e]),s}const i=t?t.replace(/translate(3d)?\([^)]*\)/g,""):"";return e===0?`translate(${r}, ${n})${i}`:`translate3d(${r}, ${n}, ${e})${i}`}var dJ=function(r,n){var e={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&n.indexOf(t)<0&&(e[t]=r[t]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(r);i<t.length;i++)n.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(e[t[i]]=r[t[i]]);return e};const hJ=(r,n,e)=>{if(!e.length)return null;const[t,i]=n,a=u=>{var c;if(u){const d=r.getShape(u);if(!d)return null;const h=`get${(0,pE.Z)(u)}Style`,f=((c=r==null?void 0:r[h])===null||c===void 0?void 0:c.bind(r))||(m=>m),v=(f==null?void 0:f(t))||{},g=(f==null?void 0:f(i))||{};return{shape:d,fromStyle:v,toStyle:g}}else return{shape:r,fromStyle:t,toStyle:i}};let s;const o=e.map(u=>{var{fields:c,shape:d,states:h}=u,f=dJ(u,["fields","shape","states"]);const v=a(d);if(!v)return null;const{shape:g,fromStyle:m,toStyle:y}=v,w=[{},{}];if(c.forEach(G=>{var x,_;Object.assign(w[0],{[G]:(x=m[G])!==null&&x!==void 0?x:uy(G)}),Object.assign(w[1],{[G]:(_=y[G])!==null&&_!==void 0?_:uy(G)})}),w.some(G=>Object.keys(G).some(x=>["x","y","z"].includes(x)))){const{x:G=0,y:x=0,z:_=0,transform:p=""}=g.attributes||{};w.forEach(b=>{b.transform=lI(b.x||G,b.y||x,b.z||_,p)})}const T=g.animate(oT(w),f);return d===void 0&&(s=T),T}).filter(Boolean),l=s||(o==null?void 0:o[0]);return l?sT(l,o.filter(u=>u!==u)):null},fJ=[{fields:["opacity"]}],vJ=[{fields:["x","y"]}],uI=[{fields:["x","y"]}],gJ=uI,cI=[{fields:["sourceNode","targetNode"]}],_J=cI,dI=[{fields:["childrenNode","x","y"]}],mJ=dI,NPe=[{fields:["childrenNode","x","y"]}];var xE=k(73584),hI=k(99711),up=k(83207);function pJ(r){return"source"in r&&"target"in r}function yJ(r){return r.length===2}function OPe(r){return r.length===3}function cp(r){return r instanceof Float32Array?!0:Array.isArray(r)&&(r.length===2||r.length===3)?r.every(n=>typeof n=="number"):!1}function Xf(r,n,e){return r>=n&&r<=e}function Kf(r=0){if(Array.isArray(r)){const[n=0,e=n,t=n,i=e]=r;return[n,e,t,i]}return[r,r,r,r]}function xJ(r=0){const n=Kf(r);return n[0]+n[2]}function RPe(r=0){const n=Kf(r);return n[1]+n[3]}function Jf(r){return r.max[0]-r.min[0]}function Qf(r){return r.max[1]-r.min[1]}function yg(r){return[Jf(r),Qf(r)]}function xg(r,n){const e=cp(r)?lT(r):r.getShape("key").getBounds();return n?Eg(e,n):e}function lT(r){const[n,e,t=0]=r,i=new hl;return i.setMinMax([n,e,t],[n,e,t]),i}function Eg(r,n){const[e,t,i,a]=Kf(n),[s,o,l]=r.min,[u,c,d]=r.max,h=new hl;return h.setMinMax([s-a,o-e,l],[u+t,c+i,d]),h}function cy(r){if(r.length===0)return new hl;if(r.length===1)return r[0];const n=new hl;n.setMinMax(r[0].min,r[0].max);for(let e=1;e<r.length;e++){const t=r[e];n.setMinMax([Math.min(n.min[0],t.min[0]),Math.min(n.min[1],t.min[1]),Math.min(n.min[2],t.min[2])],[Math.max(n.max[0],t.max[0]),Math.max(n.max[1],t.max[1]),Math.max(n.max[2],t.max[2])])}return n}function EJ(r,n){const[e,t]=r.min,[i,a]=r.max,[s,o]=n.min,[l,u]=n.max;return e>=s&&i<=l&&t>=o&&a<=u}function Wh(r,n){return Xf(r[0],n.min[0],n.max[0])&&Xf(r[1],n.min[1],n.max[1])}function fI(r,n,e=!1){const{min:[t,i],max:[a,s]}=n,o=(r[1]===i||r[1]===s)&&(e||Xf(r[0],t,a)),l=(r[0]===t||r[0]===a)&&(e||Xf(r[1],i,s));return o||l}function bJ(r,n){return!Wh(r,n)}function EE(r,n){const{center:e}=n;return r[0]===e[0]&&r[1]===e[1]}function dy(r,n){const[e,t]=r,[i,a]=n.min,[s,o]=n.max,l=e-i,u=s-e,c=t-a,d=o-t,h=Math.min(l,u,c,d);return h===l?"left":h===u?"right":h===c?"top":h===d?"bottom":"left"}function C_(r,n){const e=(0,up.Z)(r);if(Wh(r,n))switch(dy(r,n)){case"left":e[0]=n.min[0];break;case"right":e[0]=n.max[0];break;case"top":e[1]=n.min[1];break;case"bottom":e[1]=n.max[1];break}else{const[t,i]=r,[a,s]=n.min,[o,l]=n.max;e[0]=Xf(t,a,o)?t:t<a?a:o,e[1]=Xf(i,s,l)?i:i<s?s:l}return e}function kJ(r,n){const{center:e}=r,[t,i]=yg(r),a=n==="up"||n==="down"?e[0]:n==="right"?e[0]-t/6:e[0]+t/6,s=n==="left"||n==="right"?e[1]:n==="down"?e[1]-i/6:e[1]+i/6;return[a,s]}function wJ(r,n){let[e,t]=yg(r);return[e,t]=n==="up"||n==="down"?[e,t]:[t,e],(Math.pow(t,2)-Math.pow(Math.sqrt(Math.pow(e/2,2)+Math.pow(t,2))-e/2,2))/(2*t)}function SJ(r){const{min:[n,e],max:[t,i]}=r,a=[n,i],s=[t,i],o=[t,e],l=[n,e];return[[a,s],[s,o],[o,l],[l,a]]}var uT=k(73686);function Ut(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(Bv("The datum does not have available id."))}function bE(r){return r.combo}function vI(r,n){const e={nodes:(r.nodes||[]).map(Ut),edges:(r.edges||[]).map(Ut),combos:(r.combos||[]).map(Ut)};return n?Object.values(e).flat():e}const gI=(r,n,e)=>{var t;switch(e.type){case"degree":{const i=new Map;return(t=r.nodes)===null||t===void 0||t.forEach(a=>{const s=n(Ut(a),e.direction).length;i.set(Ut(a),s)}),i}case"betweenness":return TJ(r,e.directed,e.weightPropertyName);case"closeness":return CJ(r,e.directed,e.weightPropertyName);case"eigenvector":return PJ(r,e.directed);case"pagerank":return MJ(r,e.epsilon,e.linkProb);default:return _I(r)}},_I=r=>{var n;const e=new Map;return(n=r.nodes)===null||n===void 0||n.forEach(t=>{e.set(Ut(t),0)}),e},TJ=(r,n,e)=>{const t=_I(r),{nodes:i=[]}=r;return i.forEach(a=>{i.forEach(s=>{if(a!==s){const{allPath:o}=(0,uT.ni)(r,Ut(a),Ut(s),n,e),l=o.length;o.flat().forEach(u=>{u!==Ut(a)&&u!==Ut(s)&&t.set(u,t.get(u)+1/l)})}})}),t},CJ=(r,n,e)=>{const t=new Map,{nodes:i=[]}=r;return i.forEach(a=>{const s=i.reduce((o,l)=>{if(a!==l){const{length:u}=(0,uT.ni)(r,Ut(a),Ut(l),n,e);o+=u}return o},0);t.set(Ut(a),1/s)}),t},MJ=(r,n,e)=>{var t;const i=new Map,a=(0,uT.EF)(r,n,e);return(t=r.nodes)===null||t===void 0||t.forEach(s=>{i.set(Ut(s),a[Ut(s)])}),i},PJ=(r,n)=>{const{nodes:e=[]}=r,t=NJ(r,n),i=OJ(t,e.length),a=new Map;return e.forEach((s,o)=>{a.set(Ut(s),i[o])}),a},NJ=(r,n)=>{const{nodes:e=[],edges:t=[]}=r,i=Array(e.length).fill(null).map(()=>Array(e.length).fill(0));return t.forEach(({source:a,target:s})=>{const o=e.findIndex(u=>Ut(u)===a),l=e.findIndex(u=>Ut(u)===s);n?i[o][l]=1:(i[o][l]=1,i[l][o]=1)}),i},OJ=(r,n,e=100,t=1e-6)=>{let i=Array(n).fill(1),a=1/0;for(let s=0;s<e&&a>t;s++){const o=Array(n).fill(0);for(let u=0;u<n;u++)for(let c=0;c<n;c++)o[u]+=r[u][c]*i[c];const l=Math.sqrt(o.reduce((u,c)=>u+c*c,0));for(let u=0;u<n;u++)o[u]/=l;a=Math.sqrt(o.reduce((u,c,d)=>u+(c-i[d])*c,0)),i=o}return i};function bg(r,n,e,t=Ml.Z){const i=new Map(r.map(h=>[e(h),h])),a=new Map(n.map(h=>[e(h),h])),s=new Set(i.keys()),o=new Set(a.keys()),l=[],u=[],c=[],d=[];return o.forEach(h=>{s.has(h)?t(i.get(h),a.get(h))?d.push(a.get(h)):u.push(a.get(h)):l.push(a.get(h))}),s.forEach(h=>{o.has(h)||c.push(i.get(h))}),{enter:l,exit:c,keep:d,update:u}}const hy=new WeakMap;function M_(r,n,e=!1,t){if(n===void 0)return;const i=(a,s=n)=>{const o=(l=s)=>a.childNodes.forEach(u=>i(u,l));if(t&&!t(a))return o();if(!e&&a===r)r.style.visibility=n,hy.delete(r),o(n);else{hy.has(a)||hy.set(a,a.style.visibility);const l=s==="hidden"||RJ(a)==="hidden"?"hidden":"visible";a.style.visibility=l,o(l)}};i(r)}function RJ(r){return hy.has(r)?hy.get(r):r.style.visibility}function AJ(r,n,e){const t={},i=a=>(a in t||(t[a]=0),`${n}-${a}-${t[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 cT{constructor(n){this.extensions=[],this.extensionMap={},this.context=n}setExtensions(n){const e=AJ(this.context.graph,this.category,n),{enter:t,update:i,exit:a,keep:s}=bg(this.extensions,e,o=>o.key);this.createExtensions(t),this.updateExtensions([...i,...s]),this.destroyExtensions(a),this.extensions=e}createExtension(n){const{category:e}=this,{key:t,type:i}=n,a=Fv(e,i);if(!a)return Gc.warn(`The extension ${i} of ${e} is not registered.`);const s=new a(this.context,n);this.extensionMap[t]=s}createExtensions(n){n.forEach(e=>this.createExtension(e))}updateExtension(n){const{key:e}=n,t=this.extensionMap[e];t&&t.update(n)}updateExtensions(n){n.forEach(e=>this.updateExtension(e))}destroyExtension(n){const e=this.extensionMap[n];e&&(e.destroy(),delete this.extensionMap[n])}destroyExtensions(n){n.forEach(({key:e})=>this.destroyExtension(e))}destroy(){Object.values(this.extensionMap).forEach(n=>n.destroy()),this.context={},this.extensions=[],this.extensionMap={}}}class dT{constructor(n,e){this.events=[],this.destroyed=!1,this.context=n,this.options=e}update(n){this.options=Object.assign(this.options,n)}destroy(){this.context={},this.options={},this.destroyed=!0}}class yd extends dT{}class kE extends yd{constructor(n,e){super(n,Object.assign({},kE.defaultOptions,e)),this.isOverlapping=(t,i)=>i.some(a=>t.intersects(a)),this.occupiedBounds=[],this.detectLabelCollision=t=>{const i=this.context.viewport,a={show:[],hide:[]};return this.occupiedBounds=[],t.forEach(s=>{const o=s.getShape("label").getRenderBounds();i.isInViewport(o,!0)&&!this.isOverlapping(o,this.occupiedBounds)?(a.show.push(s),this.occupiedBounds.push(Eg(o,this.options.padding))):a.hide.push(s)}),a},this.hideLabelIfExceedViewport=(t,i)=>{const{exit:a}=bg(t,i,s=>s.id);a==null||a.forEach(this.hideLabel)},this.nodeCentralities=new Map,this.sortNodesByCentrality=(t,i)=>{const{model:a}=this.context,s=a.getData(),o=a.getRelatedEdgesData.bind(a);return t.map(u=>(this.nodeCentralities.has(u.id)||(this.nodeCentralities=gI(s,o,i)),{node:u,centrality:this.nodeCentralities.get(u.id)})).sort((u,c)=>c.centrality-u.centrality).map(u=>u.node)},this.sortLabelElementsInView=t=>{const{sort:i,sortNode:a,sortCombo:s,sortEdge:o}=this.options,{model:l}=this.context;if((0,Be.Z)(i))return t.sort((g,m)=>i(l.getElementDataById(g.id),l.getElementDataById(m.id)));const{node:u=[],edge:c=[],combo:d=[]}=(0,xE.Z)(t,g=>g.type),h=(0,Be.Z)(s)?d.sort((g,m)=>s(...l.getComboData([g.id,m.id]))):d,f=(0,Be.Z)(a)?u.sort((g,m)=>a(...l.getNodeData([g.id,m.id]))):this.sortNodesByCentrality(u,a),v=(0,Be.Z)(o)?c.sort((g,m)=>o(...l.getEdgeData([g.id,m.id]))):c;return[...h,...f,...v]},this.labelElementsInView=[],this.onToggleVisibility=t=>{if(!this.validate(t)){this.hiddenElements.size>0&&(this.hiddenElements.forEach(this.showLabel),this.hiddenElements.clear());return}const i=this.getLabelElementsInView();this.hideLabelIfExceedViewport(this.labelElementsInView,i),this.labelElementsInView=i;const a=this.sortLabelElementsInView(this.labelElementsInView),{show:s,hide:o}=this.detectLabelCollision(a);for(let l=s.length-1;l>=0;l--)this.showLabel(s[l]);o.forEach(this.hideLabel)},this.hiddenElements=new Map,this.hideLabel=t=>{const i=t.getShape("label");i&&M_(i,"hidden"),this.hiddenElements.set(t.id,t)},this.showLabel=t=>{const i=t.getShape("label");i&&M_(i,"visible"),t.toFront(),this.hiddenElements.delete(t.id)},this.onTransform=(0,hI.Z)(this.onToggleVisibility,this.options.throttle,{leading:!0}),this.bindEvents()}update(n){this.unbindEvents(),super.update(n),this.bindEvents(),this.onToggleVisibility({})}get labelElements(){const e=Object.values(this.context.element.elementMap).filter(t=>t.isVisible()&&t.getShape("label"));return Object.fromEntries(e.map(t=>[t.id,t]))}getLabelElementsInView(){const n=this.context.viewport;return Object.values(this.labelElements).filter(e=>n.isInViewport(e.getShape("key").getRenderBounds()))}bindEvents(){const{graph:n}=this.context;n.on(qn.AFTER_DRAW,this.onToggleVisibility),n.on(qn.AFTER_LAYOUT,this.onToggleVisibility),n.on(qn.AFTER_TRANSFORM,this.onTransform)}unbindEvents(){const{graph:n}=this.context;n.off(qn.AFTER_DRAW,this.onToggleVisibility),n.off(qn.AFTER_LAYOUT,this.onToggleVisibility),n.off(qn.AFTER_TRANSFORM,this.onTransform)}validate(n){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,Be.Z)(e)?e(n):!!e}destroy(){this.unbindEvents(),super.destroy()}}kE.defaultOptions={enable:!0,throttle:100,padding:0,sortNode:{type:"degree"}};var xd=k(83787);const mI=[0,0,0];function Ji(r,n){return r.map((e,t)=>e+n[t])}function Cs(r,n){return r.map((e,t)=>e-n[t])}function $v(r,n){return typeof n=="number"?r.map(e=>e*n):r.map((e,t)=>e*n[t])}function Yh(r,n){return typeof n=="number"?r.map(e=>e/n):r.map((e,t)=>e/n[t])}function LJ(r,n){return r.reduce((e,t,i)=>e+t*n[i],0)}function IJ(r,n){const e=fy(r),t=fy(n);return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function kg(r,n){return r.map(e=>e*n)}function js(r,n){return Math.sqrt(r.reduce((e,t,i)=>e+Math.pow(t-n[i]||0,2),0))}function wE(r,n){return r.reduce((e,t,i)=>e+Math.abs(t-n[i]),0)}function Gv(r){const n=r.reduce((e,t)=>e+Math.pow(t,2),0);return r.map(e=>e/Math.sqrt(n))}function hT(r,n,e=!1){const t=r[0]*n[1]-r[1]*n[0];let i=Math.acos($v(r,n).reduce((a,s)=>a+s,0)/(js(r,mI)*js(n,mI)));return e&&t<0&&(i=2*Math.PI-i),i}function APe(r,n){return r.every((e,t)=>e===n[t])}function SE(r,n=!0){return n?[-r[1],r[0]]:[r[1],-r[0]]}function DJ(r,n){return r.map(e=>e%n)}function P_(r){return[r[0],r[1]]}function fy(r){return yJ(r)?[r[0],r[1],0]:r}function pI(r){const[n,e]=r;return!n&&!e?0:Math.atan2(e,n)}function yI(r,n){const[e,t]=r,[i,a]=n,s=Cs(e,t),o=Cs(i,a);return IJ(s,o).every(l=>l===0)}function fT(r,n,e=!1){if(yI(r,n))return;const[t,i]=r,[a,s]=n,o=((t[0]-a[0])*(a[1]-s[1])-(t[1]-a[1])*(a[0]-s[0]))/((t[0]-i[0])*(a[1]-s[1])-(t[1]-i[1])*(a[0]-s[0])),l=s[0]-a[0]?(t[0]-a[0]+o*(i[0]-t[0]))/(s[0]-a[0]):(t[1]-a[1]+o*(i[1]-t[1]))/(s[1]-a[1]);if(!(!e&&(!Xf(o,0,1)||!Xf(l,0,1))))return[t[0]+o*(i[0]-t[0]),t[1]+o*(i[1]-t[1])]}function xI(r){if(Array.isArray(r))return Xf(r[0],0,1)&&Xf(r[1],0,1)?r:[.5,.5];const n=r.split("-"),e=n.includes("left")?0:n.includes("right")?1:.5,t=n.includes("top")?0:n.includes("bottom")?1:.5;return[e,t]}function Iu(r){const{x:n=0,y:e=0,z:t=0}=r.style||{};return[+n,+e,+t]}function FJ(r){const{x:n,y:e,z:t}=r.style||{};return n!==void 0||e!==void 0||t!==void 0}function EI(r,n){const[e,t]=n,{min:i,max:a}=r;return[i[0]+e*(a[0]-i[0]),i[1]+t*(a[1]-i[1])]}function zv(r,n="center"){const e=xI(n);return EI(r,e)}function LPe(r,n){const e=parseAnchor(n);return EI(r,e)}const IPe=r=>{const[n,e]=r;return{left:Math.min(n[0],e[0]),right:Math.max(n[0],e[0]),top:Math.min(n[1],e[1]),bottom:Math.max(n[1],e[1])}};function Du(r){var n;return[r.x,r.y,(n=r.z)!==null&&n!==void 0?n:0]}function Zh(r){var n;return{x:r[0],y:r[1],z:(n=r[2])!==null&&n!==void 0?n:0}}function DPe(r){return r.sort((n,e)=>n[0]-e[0]||n[1]-e[1])}function FPe(r){const n=new Set;return r.filter(e=>{const t=e.join(",");return n.has(t)?!1:(n.add(t),!0)})}function vy(r,n=0){return r.map(e=>parseFloat(e.toFixed(n)))}function wg(r,n,e,t=!1){if((0,Ml.Z)(r,n))return r;const i=t?Cs(r,n):Cs(n,r),a=Gv(i),s=[a[0]*e,a[1]*e];return Ji(P_(r),s)}function bI(r,n){return r[1]===n[1]}function BJ(r,n){return r[0]===n[0]}function $J(r,n){return bI(r,n)||BJ(r,n)}function GJ(r,n,e){return yI([r,n],[n,e])}function kI(r,n){return[2*n[0]-r[0],2*n[1]-r[1]]}function wI(r,n,e,t=!0,i=!1){for(let a=0;a<e.length;a++){let s=e[a],o=e[(a+1)%e.length];t&&(s=Ji(n,s),o=Ji(n,o));const l=i?kI(r,n):r,u=fT([n,l],[s,o]);if(u)return{point:u,line:[s,o]}}return{point:n,line:void 0}}function zJ(r,n,e,t){const i=r[0],a=r[1];let s=!1;e===void 0&&(e=0),t===void 0&&(t=n.length);const o=t-e;for(let l=0,u=o-1;l<o;u=l++){const c=n[l+e][0],d=n[l+e][1],h=n[u+e][0],f=n[u+e][1];d>a!=f>a&&i<(h-c)*(a-d)/(f-d)+c&&(s=!s)}return s}function VJ(r,n,e=!1){const t=zv(n,"center"),i=[zv(n,"left-top"),zv(n,"right-top"),zv(n,"right-bottom"),zv(n,"left-bottom")];return wI(r,t,i,!1,e).point}function TE(r,n,e=!1){const t=n.center,i=e?kI(r,t):r,a=Cs(i,n.center),s=Math.atan2(a[1],a[0]);if(isNaN(s))return t;const o=Jf(n)/2,l=Qf(n)/2,u=t[0]+o*Math.cos(s),c=t[1]+l*Math.sin(s);return[u,c]}function UJ(r,n){let e=1/0,t=[r[0],n[0]];return r.forEach(i=>{n.forEach(a=>{const s=js(i,a);s<e&&(e=s,t=[i,a])})}),t}function jJ(r,n){let e=1/0,t=[[0,0],[0,0]];return n.forEach(i=>{const a=HJ(r,i);a<e&&(e=a,t=i)}),t}function HJ(r,n){const e=SI(r,n);return js(r,e)}function SI(r,n){const[e,t]=n[0],[i,a]=n[1],[s,o]=r,l=i-e,u=a-t;if(l===0&&u===0)return[e,t];let c=((s-e)*l+(o-t)*u)/(l*l+u*u);c>1?c=1:c<0&&(c=0);const d=e+c*l,h=t+c*u;return[d,h]}function WJ(r){const n=r.reduce((e,t)=>Ji(e,t),[0,0]);return Yh(n,r.length)}function TI(r,n=!0){const e=WJ(r);return r.sort(([t,i],[a,s])=>{const o=Math.atan2(i-e[1],t-e[0]),l=Math.atan2(s-e[1],a-e[0]);return n?l-o:o-l})}function CI(r,n){return[r,[r[0],n[1]],n,[n[0],r[1]]]}const MI=r=>r.map(n=>(0,Ze.Z)(n)?n.toLocaleLowerCase():n);class dp{constructor(n){this.map=new Map,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(un.WHEEL,e)},this.onDrag=e=>{this.triggerExtendKey(un.DRAG,e)},this.onFocus=()=>{this.recordKey.clear()},this.emitter=n,this.bindEvents()}bind(n,e){n.length!==0&&this.map.set(n,e)}unbind(n,e){this.map.forEach((t,i)=>{(0,Ml.Z)(i,n)&&(!e||e===t)&&this.map.delete(i)})}unbindAll(){this.map.clear()}match(n){const e=MI(Array.from(this.recordKey)).sort(),t=MI(n).sort();return(0,Ml.Z)(e,t)}bindEvents(){const{emitter:n}=this;n.on(un.KEY_DOWN,this.onKeyDown),n.on(un.KEY_UP,this.onKeyUp),n.on(un.WHEEL,this.onWheel),n.on(un.DRAG,this.onDrag),window.addEventListener("focus",this.onFocus)}trigger(n){this.map.forEach((e,t)=>{this.match(t)&&e(n)})}triggerExtendKey(n,e){this.map.forEach((t,i)=>{i.includes(n)&&(0,Ml.Z)(Array.from(this.recordKey),i.filter(a=>a!==n))&&t(e)})}destroy(){this.unbindAll(),this.emitter.off(un.KEY_DOWN,this.onKeyDown),this.emitter.off(un.KEY_UP,this.onKeyUp),this.emitter.off(un.WHEEL,this.onWheel),this.emitter.off(un.DRAG,this.onDrag),window.removeEventListener("blur",this.onFocus)}}class gy extends yd{constructor(n,e){super(n,(0,xd.Z)({},gy.defaultOptions,e)),this.shortcut=new dp(n.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(n){if(!this.validate(n)||!this.isKeydown()||this.startPoint)return;const{canvas:e,graph:t}=this.context,i=Object.assign({},this.options.style);this.options.style.lineWidth&&(i.lineWidth=+this.options.style.lineWidth/t.getZoom()),this.rectShape=new zf({id:"g6-brush-select",style:i}),e.appendChild(this.rectShape),this.startPoint=[n.canvas.x,n.canvas.y]}onPointerMove(n){var e;if(!this.startPoint)return;const{immediately:t,mode:i}=this.options;this.endPoint=CE(n),(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])}),t&&i==="default"&&this.updateElementsStates(CI(this.startPoint,this.endPoint))}onPointerUp(n){if(this.startPoint){if(!this.endPoint){this.clearBrush();return}this.endPoint=CE(n),this.updateElementsStates(CI(this.startPoint,this.endPoint)),this.clearBrush()}}clearStates(){this.endPoint||this.clearElementsStates()}clearElementsStates(){const{graph:n}=this.context,e=Object.values(n.getData()).reduce((t,i)=>Object.assign({},t,i.reduce((a,s)=>(a[Ut(s)]=[],a),{})),{});n.setElementState(e,this.options.animation)}updateElementsStates(n){const{graph:e}=this.context,{enableElements:t,state:i,mode:a,onSelect:s}=this.options,o=this.selector(e,n,t);let l={};switch(a){case"union":o.forEach(u=>{l[u]=[...e.getElementState(u),i]});break;case"diff":o.forEach(u=>{const c=e.getElementState(u);l[u]=c.includes(i)?c.filter(d=>d!==i):[...c,i]});break;case"intersect":o.forEach(u=>{const c=e.getElementState(u);l[u]=c.includes(i)?[i]:[]});break;case"default":default:o.forEach(u=>{l[u]=[i]});break}(0,Be.Z)(s)&&(l=s(l)),e.setElementState(l,this.options.animation)}selector(n,e,t){if(!t||t.length===0)return[];const i=[],a=n.getData();if(t.forEach(s=>{a[`${s}s`].forEach(o=>{const l=Ut(o);n.getElementVisibility(l)!=="hidden"&&zJ(n.getElementPosition(l),e)&&i.push(l)})}),t.includes("edge")){const s=a.edges;s==null||s.forEach(o=>{const{source:l,target:u}=o;i.includes(l)&&i.includes(u)&&i.push(Ut(o))})}return i}clearBrush(){var n;(n=this.rectShape)===null||n===void 0||n.remove(),this.rectShape=void 0,this.startPoint=void 0,this.endPoint=void 0}isKeydown(){const{trigger:n}=this.options,e=Array.isArray(n)?n:[n];return this.shortcut.match(e.filter(t=>t!=="drag"))}validate(n){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,Be.Z)(e)?e(n):!!e}bindEvents(){const{graph:n}=this.context;n.on(un.POINTER_DOWN,this.onPointerDown),n.on(un.POINTER_MOVE,this.onPointerMove),n.on(un.POINTER_UP,this.onPointerUp),n.on(Dv.CLICK,this.clearStates)}unbindEvents(){const{graph:n}=this.context;n.off(un.POINTER_DOWN,this.onPointerDown),n.off(un.POINTER_MOVE,this.onPointerMove),n.off(un.POINTER_UP,this.onPointerUp),n.off(Dv.CLICK,this.clearStates)}update(n){this.unbindEvents(),this.options=(0,xd.Z)(this.options,n),this.bindEvents()}destroy(){this.unbindEvents(),super.destroy()}}gy.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 CE=r=>[r.canvas.x,r.canvas.y],Vv=.8,N_=["node","edge","combo"];function O_(r,n,e,t,i=0){t==="TB"&&n(r,i);const a=e(r);if(a)for(const s of a)O_(s,n,e,t,i+1);t==="BT"&&n(r,i)}function YJ(r,n,e){const t=[[r,0]];for(;t.length;){const[i,a]=t.shift();n(i,a);const s=e(i);if(s)for(const o of s)t.push([o,a+1])}}function PI(r,n,e,t,i="both"){if(n==="combo"||n==="node")return vT(r,e,t,i);const a=r.getEdgeData(e);if(!a)return[];const s=vT(r,a.source,t-1,i),o=vT(r,a.target,t-1,i);return Array.from(new Set([...s,...o,e]))}function vT(r,n,e,t="both"){const i=new Set,a=new Set,s=new Set;return YJ(n,(o,l)=>{l>e||(s.add(o),r.getRelatedEdgesData(o,t).forEach(u=>{const c=Ut(u);!a.has(c)&&l<e&&(s.add(c),a.add(c))}))},o=>r.getRelatedEdgesData(o,t).map(l=>l.source===o?l.target:l.source).filter(l=>i.has(l)?!1:(i.add(l),!0))),Array.from(s)}function gT(r){return r.states||[]}var ME=function(r,n,e,t){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(t.next(c))}catch(d){s(d)}}function l(c){try{u(t.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((t=t.apply(r,n||[])).next())})};class PE extends yd{constructor(n,e){super(n,Object.assign({},PE.defaultOptions,e)),this.onClickSelect=t=>ME(this,void 0,void 0,function*(){var i,a;this.validate(t)&&(yield this.updateState(t),(a=(i=this.options).onClick)===null||a===void 0||a.call(i,t))}),this.onClickCanvas=t=>ME(this,void 0,void 0,function*(){var i,a;this.validate(t)&&(yield this.clearState(),(a=(i=this.options).onClick)===null||a===void 0||a.call(i,t))}),this.shortcut=new dp(n.graph),this.bindEvents()}bindEvents(){const{graph:n}=this.context;this.unbindEvents(),N_.forEach(e=>{n.on(`${e}:${un.CLICK}`,this.onClickSelect)}),n.on(Dv.CLICK,this.onClickCanvas)}get isMultipleSelect(){const{multiple:n,trigger:e}=this.options;return n&&this.shortcut.match(e)}getNeighborIds(n){const{target:e,targetType:t}=n,{graph:i}=this.context,{degree:a}=this.options;return PI(i,t,e.id,typeof a=="function"?a(n):a).filter(s=>s!==e.id)}updateState(n){return ME(this,void 0,void 0,function*(){const{state:e,unselectedState:t,neighborState:i,animation:a}=this.options;if(!e&&!i&&!t)return;const{target:s}=n,{graph:o}=this.context,l=o.getElementData(s.id),u=gT(l).includes(e)?"unselect":"select",c={},d=this.isMultipleSelect,h=[s.id],f=this.getNeighborIds(n);if(d)if(Object.assign(c,this.getDataStates()),u==="select"){const v=(g,m)=>{g.forEach(y=>{const w=new Set(o.getElementState(y));w.add(m),w.delete(t),c[y]=Array.from(w)})};v(h,e),v(f,i),t&&Object.keys(c).forEach(g=>{const m=c[g];!m.includes(e)&&!m.includes(i)&&!m.includes(t)&&c[g].push(t)})}else{const v=c[s.id];c[s.id]=v.filter(g=>g!==e&&g!==i),v.includes(t)||c[s.id].push(t),f.forEach(g=>{c[g]=c[g].filter(m=>m!==i),c[g].includes(e)||c[g].push(t)})}else if(u==="select"){Object.assign(c,this.getClearStates(!!t));const v=(g,m)=>{g.forEach(y=>{c[y]||(c[y]=o.getElementState(y)),c[y].push(m)})};v(h,e),v(f,i),t&&Object.keys(c).forEach(g=>{!h.includes(g)&&!f.includes(g)&&c[g].push(t)})}else Object.assign(c,this.getClearStates());yield o.setElementState(c,a)})}getDataStates(){const{graph:n}=this.context,{nodes:e,edges:t,combos:i}=n.getData(),a={};return[...e,...t,...i].forEach(s=>{a[Ut(s)]=gT(s)}),a}getClearStates(n=!1){const{graph:e}=this.context,{state:t,unselectedState:i,neighborState:a}=this.options,s=new Set([t,i,a]),{nodes:o,edges:l,combos:u}=e.getData(),c={};return[...o,...l,...u].forEach(d=>{const h=gT(d),f=h.filter(v=>!s.has(v));(n||f.length!==h.length)&&(c[Ut(d)]=f)}),c}clearState(){return ME(this,void 0,void 0,function*(){const{graph:n}=this.context;yield n.setElementState(this.getClearStates(),this.options.animation)})}validate(n){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,Be.Z)(e)?e(n):!!e}unbindEvents(){const{graph:n}=this.context;N_.forEach(e=>{n.off(`${e}:${un.CLICK}`,this.onClickSelect)}),n.off(Dv.CLICK,this.onClickCanvas)}destroy(){this.unbindEvents(),super.destroy()}}PE.defaultOptions={animation:!0,enable:!0,multiple:!1,trigger:["shift"],state:"selected",neighborState:"selected",unselectedState:void 0,degree:0};function Ed(r){var n;return!!(!((n=r.style)===null||n===void 0)&&n.collapsed)}var nc=k(53032),hp=k(17829),ZJ=k(73576);function _y(r,n){if(!r.startsWith(n))return!1;const e=r[n.length];return e>="A"&&e<="Z"}function NI(r,n){return`${n}${(0,pE.Z)(r)}`}function OI(r,n,e=!0){if(!n||!_y(r,n))return r;const t=r.slice(n.length);return e?(0,ZJ.Z)(t):t}function Wl(r,n){const e=Object.entries(r).reduce((t,[i,a])=>(i==="className"||i==="class"||_y(i,n)&&Object.assign(t,{[OI(i,n)]:a}),t),{});if("opacity"in r){const t=NI("opacity",n),i=r.opacity;if(t in r){const a=r[t];Object.assign(e,{opacity:i*a})}else Object.assign(e,{opacity:i})}return e}function _T(r,n){const e=n.length;return Object.keys(r).reduce((t,i)=>{if(i.startsWith(n)){const a=i.slice(e);t[a]=r[i]}return t},{})}function mT(r,n){const e=typeof n=="string"?[n]:n,t={};return Object.keys(r).forEach(i=>{e.find(a=>i.startsWith(a))||(t[i]=r[i])}),t}function BPe(r,n,e){return Object.entries(r).reduce((t,[i,a])=>(_y(i,n)?t[NI(OI(i,n,!1),e)]=a:t[i]=a,t),{})}function th(r=0){if(typeof r=="number")return[r,r,r];const[n,e=n,t=n]=r;return[n,e,t]}var XJ=function(r,n){var e={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&n.indexOf(t)<0&&(e[t]=r[t]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(r);i<t.length;i++)n.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(e[t[i]]=r[t[i]]);return e};function RI(r,n){const{datum:e,graph:t}=n;return typeof r=="function"?r.call(t,e):Object.fromEntries(Object.entries(r).map(([i,a])=>typeof a=="function"?[i,a.call(t,e)]:[i,a]))}function xu(r,n){const e=(r==null?void 0:r.style)||{},t=(n==null?void 0:n.style)||{};return Object.assign({},r,n,{style:Object.assign({},e,t)})}function KJ(r){const{x:n,y:e,z:t,class:i,className:a,transform:s,transformOrigin:o,context:l,zIndex:u,visibility:c}=r;return XJ(r,["x","y","z","class","className","transform","transformOrigin","context","zIndex","visibility"])}const pT=new WeakMap;function Xh(r,n,e){pT.has(r)||pT.set(r,{});const t=pT.get(r);if(!t[n])return t[n]=e,!0;const i=t[n];return AI(i,e)?!1:(t[n]=e,!0)}const AI=(r,n,e=2)=>{if(typeof r!="object"||typeof n!="object")return r===n;const t=Object.keys(r),i=Object.keys(n);if(t.length!==i.length)return!1;for(const a of t){const s=r[a],o=n[a];if(e>1&&typeof s=="object"&&typeof o=="object"){if(!AI(s,o,e-1))return!1}else if(s!==o)return!1}return!0};function JJ(r,n){const e=th(r);let t={};return n.text&&!n.fontSize&&(t={fontSize:Math.min(...e)*.5}),n.src&&(!n.width||!n.height)&&(t={width:e[0]*.5,height:e[1]*.5}),t}function LI(r){if(r)return typeof r=="string"||typeof r=="function"||Array.isArray(r)?{type:"group",field:n=>n.id,color:r,invert:!1}:r}function QJ(r,n){if(!n)return{};const{type:e,color:t,field:i,invert:a}=n,s=l=>{const u=typeof t=="string"?Fv("palette",t):t;if(typeof u=="function"){const c={};return l.forEach(([d,h])=>{c[d]=u(a?1-h:h)}),c}else if(Array.isArray(u)){const c=a?[...u].reverse():u,d={};return l.forEach(([h,f])=>{d[h]=c[f%u.length]}),d}return{}},o=(l,u)=>{var c;return typeof l=="string"?(c=u.data)===null||c===void 0?void 0:c[l]:l==null?void 0:l(u)};if(e==="group"){const l=(0,xE.Z)(r,h=>{if(!i)return"default";const f=o(i,h);return f?String(f):"default"}),u=Object.keys(l),c=s(u.map((h,f)=>[h,f])),d={};return Object.entries(l).forEach(([h,f])=>{f.forEach(v=>{d[Ut(v)]=c[h]})}),d}else if(e==="value"){const[l,u]=r.reduce(([d,h],f)=>{const v=o(i,f);if(typeof v!="number")throw new Error(Bv(`Palette field ${i} is not a number`));return[Math.min(d,v),Math.max(h,v)]},[1/0,-1/0]),c=u-l;return s(r.map(d=>[d.id,(o(i,d)-l)/c]))}}function II(r){const n=typeof r=="string"?Fv("palette",r):r;if(typeof n!="function")return n}function DI(r,n){let e=2*r;return typeof n=="string"?e=r*Number(n.replace("%",""))/100:typeof n=="number"&&(e=n),isNaN(e)&&(e=2*r),e}function FI(r,n,e=1,t=!1){const i=t?e:1,a=(r.max[0]-r.min[0])*i;return DI(a,n)}function qJ(r,n,e=1){const t=js(r[0],r[1])*e;return DI(t,n)}var my=k(95904);class py extends BW{constructor(n){super(n),this.shapeMap={},this.animateMap={},this.transformPosition(this.attributes),this.render(this.attributes,this),this.setVisibility(),this.bindEvents()}get parsedAttributes(){return this.attributes}upsert(n,e,t,i,a){var s,o,l,u,c,d,h,f;const v=this.shapeMap[n];if(t===!1){v&&((s=a==null?void 0:a.beforeDestroy)===null||s===void 0||s.call(a,v),i.removeChild(v),delete this.shapeMap[n],(o=a==null?void 0:a.afterDestroy)===null||o===void 0||o.call(a,v));return}const g=typeof e=="string"?Fv(ly.SHAPE,e):e;if(!g)throw new Error(Bv(`Shape ${e} not found`));if(!v||v.destroyed||!(v instanceof g)){v&&((l=a==null?void 0:a.beforeDestroy)===null||l===void 0||l.call(a,v),v==null||v.destroy(),(u=a==null?void 0:a.afterDestroy)===null||u===void 0||u.call(a,v)),(c=a==null?void 0:a.beforeCreate)===null||c===void 0||c.call(a);const m=new g({className:n,style:t});return i.appendChild(m),this.shapeMap[n]=m,(d=a==null?void 0:a.afterCreate)===null||d===void 0||d.call(a,m),m}return(h=a==null?void 0:a.beforeUpdate)===null||h===void 0||h.call(a,v),LM(v,t),(f=a==null?void 0:a.afterUpdate)===null||f===void 0||f.call(a,v),v}transformPosition(n){if("x"in n||"y"in n||"z"in n){const{x:e=0,y:t=0,z:i=0,transform:a}=n;this.style.transform=lI(+e,+t,+i,a)}}update(n={}){const e=Object.assign({},this.attributes,n);this.attr(e),this.render(e,this),this.transformPosition(e),this.setVisibility()}bindEvents(){}getGraphicStyle(n){return KJ(n)}get compositeShapes(){return[["badges","badge-"],["ports","port-"]]}animate(n,e){if(n.length===0)return null;const t=[];if(n[0].x!==void 0||n[0].y!==void 0||n[0].z!==void 0){const{x:a=0,y:s=0,z:o=0}=this.attributes;n.forEach(l=>{const{x:u=a,y:c=s,z:d=o}=l;Object.assign(l,{transform:d?[["translate3d",u,c,d]]:[["translate",u,c]]})})}const i=super.animate(n,e);if(i&&(yT(this,i),t.push(i)),Array.isArray(n)&&n.length>0){const a=["transform","transformOrigin","x","y","z","zIndex"];if(Object.keys(n[0]).some(s=>!a.includes(s))){Object.entries(this.shapeMap).forEach(([o,l])=>{const u=`get${(0,pE.Z)(o)}Style`,c=this[u];if((0,Be.Z)(c)){const d=n.map(f=>c.call(this,Object.assign(Object.assign({},this.attributes),f))),h=l.animate(oT(d),e);h&&(yT(l,h),t.push(h))}});const s=(o,l)=>{if(!(0,my.Z)(o)){const u=`get${(0,pE.Z)(l)}Style`,c=this[u];if((0,Be.Z)(c)){const d=n.map(h=>c.call(this,Object.assign(Object.assign({},this.attributes),h)));Object.entries(d[0]).map(([h])=>{const f=d.map(g=>g[h]),v=o[h];if(v){const g=v.animate(oT(f),e);g&&(yT(v,g),t.push(g))}})}}};this.compositeShapes.forEach(([o,l])=>{const u=_T(this.shapeMap,l);s(u,o)})}}return sT(t)}getShape(n){return this.shapeMap[n]}setVisibility(){const{visibility:n}=this.attributes;M_(this,n,!0)}destroy(){this.shapeMap={},this.animateMap={},super.destroy()}}function yT(r,n){n==null||n.finished.then(()=>{const e=r.activeAnimations.findIndex(t=>t===n);e>-1&&r.activeAnimations.splice(e,1)})}var eQ=function(r,n){var e={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&n.indexOf(t)<0&&(e[t]=r[t]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(r);i<t.length;i++)n.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(e[t[i]]=r[t[i]]);return e};class Sg extends py{constructor(n){super(xu({style:Sg.defaultStyleProps},n))}isTextStyle(n){return _y(n,"label")}isBackgroundStyle(n){return _y(n,"background")}getTextStyle(n){const e=this.getGraphicStyle(n),{padding:t}=e,i=eQ(e,["padding"]);return mT(i,"background")}getBackgroundStyle(n){if(n.background===!1)return!1;const e=this.getGraphicStyle(n),{wordWrap:t,wordWrapWidth:i,padding:a}=e,s=Wl(e,"background"),{min:[o,l],center:[u,c],halfExtents:[d,h]}=this.shapeMap.text.getGeometryBounds(),[f,v,g,m]=Kf(a),y=d*2+m+v,{width:w,height:T}=s;w&&T?Object.assign(s,{x:u-Number(w)/2,y:c-Number(T)/2}):Object.assign(s,{x:o-m,y:l-f,width:t?Math.min(y,i+m+v):y,height:h*2+f+g});const{radius:G}=s;if(typeof G=="string"&&G.endsWith("%")){const x=Number(G.replace("%",""))/100;s.radius=Math.min(+s.width,+s.height)*x}return s}render(n=this.parsedAttributes,e=this){this.upsert("text",Z0,this.getTextStyle(n),e),this.upsert("background",zf,this.getBackgroundStyle(n),e)}getGeometryBounds(){return(this.getShape("background")||this.getShape("text")).getGeometryBounds()}}Sg.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 fp extends py{constructor(n){super(xu({style:fp.defaultStyleProps},n))}getBadgeStyle(n){return this.getGraphicStyle(n)}render(n=this.parsedAttributes,e=this){this.upsert("label",Sg,this.getBadgeStyle(n),e)}getGeometryBounds(){const n=this.getShape("label");return(n.getShape("background")||n.getShape("text")).getGeometryBounds()}}fp.defaultStyleProps={padding:[2,4,2,4],fontSize:10,wordWrap:!1,backgroundRadius:"50%",backgroundOpacity:1};function tQ(r,n=!0){const e=[];return r.forEach((t,i)=>{e.push([i===0?"M":"L",...t])}),n&&e.push(["Z"]),e}const BI={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 nQ(r){const n=r.replace(/[\n\r]/g,"").replace(/-/g," -").replace(/(\d*\.)(\d+)(?=\.)/g,"$1$2 ").trim().split(/\s*,|\s+/),e=[];let t="",i={};for(;n.length>0;){let a=n.shift();a in BI?t=a:n.unshift(a),i={type:t},BI[t].forEach(l=>{a=n.shift(),i[l]=a}),t==="M"?t="L":t==="m"&&(t="l");const[s,...o]=Object.values(i);e.push([s,...o.map(Number)])}return e}function rQ(r){const n=[];return(typeof r=="string"?nQ(r):r).forEach(t=>{const i=t[0];if(i==="Z"){n.push(n[0]);return}if(i!=="A")for(let a=1;a<t.length;a=a+2)n.push([t[a],t[a+1],0]);else{const a=t.length;n.push([t[a-2],t[a-1],0])}}),n}const $I=r=>{if(r.length<2)return[["M",0,0],["L",0,0]];const n=r[0],e=r[1],t=r[r.length-1],i=r[r.length-2];r.unshift(i,t),r.push(n,e);const a=[["M",t[0],t[1]]];for(let s=1;s<r.length-2;s+=1){const[o,l]=r[s-1],[u,c]=r[s],[d,h]=r[s+1],[f,v]=s!==r.length-2?r[s+2]:[d,h],g=u+(d-o)/6,m=c+(h-l)/6,y=d-(f-u)/6,w=h-(v-c)/6;a.push(["C",g,m,y,w,d,h])}return a};function iQ(r,n,e,t,i,a,s){const[o,l]=zv(r,n),u={textAlign:n==="left"?"right":n==="right"?"left":"center",textBaseline:n==="top"?"bottom":n==="bottom"?"top":"middle",transform:[["translate",o+e,l+t]]};if(n==="center"||!i)return u;const c=rQ(a);if(!c||c.length<=3)return u;const d=c.map((v,g)=>{const m=v,y=c[(g+1)%c.length];return(0,Ml.Z)(m,y)?null:[m,y]}).filter(Boolean),h=jJ([o,l],d),f=SI([o,l],h);if(f&&h&&(u.transform=[["translate",f[0]+e,f[1]+t]],s)){const v=Math.atan((h[0][1]-h[1][1])/(h[0][0]-h[1][0]));u.transform.push(["rotate",v/Math.PI*180]),u.textAlign="center",(n==="right"||n==="left")&&(v>0?u.textBaseline=n==="right"?"bottom":"top":u.textBaseline=n==="right"?"top":"bottom")}return u}var aQ=function(r,n){var e={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&n.indexOf(t)<0&&(e[t]=r[t]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(r);i<t.length;i++)n.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(e[t[i]]=r[t[i]]);return e};class yy extends py{constructor(n){super(xu({style:yy.defaultStyleProps},n))}getLabelStyle(n){if(!n.label||!n.d||n.d.length===0)return!1;const e=Wl(this.getGraphicStyle(n),"label"),{maxWidth:t,offsetX:i,offsetY:a,autoRotate:s,placement:o,closeToPath:l}=e,u=aQ(e,["maxWidth","offsetX","offsetY","autoRotate","placement","closeToPath"]),c=this.shapeMap.key,d=c==null?void 0:c.getRenderBounds();return Object.assign(iQ(d,o,i,a,l,n.d,s),{wordWrapWidth:FI(d,t)},u)}getKeyStyle(n){return this.getGraphicStyle(n)}render(n,e){this.upsert("key",gg,this.getKeyStyle(n),e),this.upsert("label",Sg,this.getLabelStyle(n),e)}}yy.defaultStyleProps={label:!0,labelPlacement:"bottom",labelCloseToPath:!0,labelAutoRotate:!0,labelOffsetX:0,labelOffsetY:0};function sQ(r){const n=[],e=t=>{t!=null&&t.children.length&&t.children.forEach(i=>{n.push(i),e(i)})};return e(r),n}function oQ(r){const n=[];let e=r.parentNode;for(;e;)n.push(e),e=e.parentNode;return n}class xT extends b2{constructor(n){super(n),this.onMounted=()=>{this.handleRadius()},this.onAttrModified=()=>{this.handleRadius()},vp=this,this.isMutationObserved=!0,this.addEventListener(Hl.MOUNTED,this.onMounted),this.addEventListener(Hl.ATTR_MODIFIED,this.onAttrModified)}handleRadius(){const{radius:n,clipPath:e,width:t=0,height:i=0}=this.attributes;if(n&&t&&i){const[a,s]=this.getBounds().min,o={x:a,y:s,radius:n,width:t,height:i};if(e)Object.assign(this.parsedStyle.clipPath.style,o);else{const l=new zf({style:o});this.style.clipPath=l}}else e&&(this.style.clipPath=null)}}const ET=new WeakMap;let vp=null;const bT=r=>{if(vp&&oQ(vp).includes(r)){const n=ET.get(r);n?n.includes(vp)||n.push(vp):ET.set(r,[vp])}},kT=r=>{const n=ET.get(r);n&&n.forEach(e=>e.handleRadius())};class GI extends py{constructor(n){super(n)}isImage(){const{src:n}=this.attributes;return!!n}getIconStyle(n=this.attributes){const{width:e=0,height:t=0}=n,i=this.getGraphicStyle(n);return this.isImage()?Object.assign({x:-e/2,y:-t/2},i):Object.assign({textBaseline:"middle",textAlign:"center"},i)}render(n=this.attributes,e=this){this.upsert("icon",this.isImage()?xT:Z0,this.getIconStyle(n),e)}}class zI extends py{get context(){return this.attributes.context}get parsedAttributes(){return this.attributes}onframe(){}animate(n,e){const t=super.animate(n,e);return t&&(t.onframe=()=>this.onframe(),t.finished.then(()=>this.onframe())),t}}var NE=function(r,n){var e={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&n.indexOf(t)<0&&(e[t]=r[t]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(r);i<t.length;i++)n.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(e[t[i]]=r[t[i]]);return e};class Kh extends zI{constructor(n){super(xu({style:Kh.defaultStyleProps},n)),this.type="node"}getSize(n=this.attributes){const{size:e}=n;return th(e)}getKeyStyle(n){const e=this.getGraphicStyle(n);return Object.assign(mT(e,["label","halo","icon","badge","port"]))}getLabelStyle(n){if(n.label===!1||!n.labelText)return!1;const e=Wl(this.getGraphicStyle(n),"label"),{placement:t,maxWidth:i,offsetX:a,offsetY:s}=e,o=NE(e,["placement","maxWidth","offsetX","offsetY"]),l=this.getShape("key").getLocalBounds();return Object.assign(a5(l,t,a,s),{wordWrapWidth:FI(l,i)},o)}getHaloStyle(n){if(n.halo===!1)return!1;const e=this.getKeyStyle(n),{fill:t}=e,i=NE(e,["fill"]),a=Wl(this.getGraphicStyle(n),"halo");return Object.assign(Object.assign(Object.assign({},i),{stroke:t}),a)}getIconStyle(n){if(n.icon===!1||!n.iconText&&!n.iconSrc)return!1;const e=Wl(this.getGraphicStyle(n),"icon");return Object.assign(JJ(n.size,e),e)}getBadgesStyle(n){var e;const t=_T(this.shapeMap,"badge-"),i={};if(Object.keys(t).forEach(d=>{i[d]=!1}),n.badge===!1||!(!((e=n.badges)===null||e===void 0)&&e.length))return i;const{badges:a=[],badgePalette:s,opacity:o=1}=n,l=NE(n,["badges","badgePalette","opacity"]),u=II(s),c=Wl(this.getGraphicStyle(l),"badge");return a.forEach((d,h)=>{i[h]=Object.assign(Object.assign({backgroundFill:u?u[h%(u==null?void 0:u.length)]:void 0,opacity:o},c),this.getBadgeStyle(d))}),i}getBadgeStyle(n){const e=this.getShape("key"),{placement:t="top",offsetX:i,offsetY:a}=n,s=NE(n,["placement","offsetX","offsetY"]),o=a5(e.getLocalBounds(),t,i,a,!0);return Object.assign(Object.assign({},o),s)}getPortsStyle(n){var e;const t=this.getPorts(),i={};if(Object.keys(t).forEach(o=>{i[o]=!1}),n.port===!1||!(!((e=n.ports)===null||e===void 0)&&e.length))return i;const a=Wl(this.getGraphicStyle(n),"port"),{ports:s=[]}=n;return s.forEach((o,l)=>{const u=o.key||l,c=Object.assign(Object.assign({},a),o);if(n5(c))i[u]=!1;else{const[d,h]=this.getPortXY(n,o);i[u]=Object.assign({transform:[["translate",d,h]]},c)}}),i}getPortXY(n,e){const{placement:t="left"}=e,i=this.getShape("key");return OM(lQ(this.context,i),t)}getPorts(){return _T(this.shapeMap,"port-")}getCenter(){return this.getShape("key").getBounds().center}getIntersectPoint(n,e=!1){const t=this.getShape("key").getBounds();return VJ(n,t,e)}drawHaloShape(n,e){const t=this.getHaloStyle(n);if(!Xh(this,"halo",t))return;const i=this.getShape("key");this.upsert("halo",i.constructor,t,e)}drawIconShape(n,e){const t=this.getIconStyle(n);Xh(this,"icon",t)&&(this.upsert("icon",GI,t,e),bT(this))}drawBadgeShapes(n,e){const t=this.getBadgesStyle(n);Object.keys(t).forEach(i=>{const a=t[i];Xh(this,`badge-${i}`,a)&&this.upsert(`badge-${i}`,fp,a,e)})}drawPortShapes(n,e){const t=this.getPortsStyle(n);Object.keys(t).forEach(i=>{const a=t[i],s=`port-${i}`;Xh(this,s,a)&&this.upsert(s,W0,a,e)})}drawLabelShape(n,e){const t=this.getLabelStyle(n);Xh(this,"label",t)&&this.upsert("label",Sg,t,e)}_drawKeyShape(n,e){return this.drawKeyShape(n,e)}render(n=this.parsedAttributes,e=this){this._drawKeyShape(n,e),this.getShape("key")&&(this.drawHaloShape(n,e),this.drawIconShape(n,e),this.drawBadgeShapes(n,e),this.drawLabelShape(n,e),this.drawPortShapes(n,e))}update(n){super.update(n),n&&("x"in n||"y"in n||"z"in n)&&kT(this)}onframe(){this.drawBadgeShapes(this.parsedAttributes,this),this.drawLabelShape(this.parsedAttributes,this)}}Kh.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 lQ(r,n){if(!r)return n.getLocalBounds();const e=r.canvas.getLayer(),t=n.cloneNode();M_(t,"hidden"),e.appendChild(t);const i=t.getLocalBounds();return e.removeChild(t),i}class R_ extends Kh{constructor(n){super(xu({style:R_.defaultStyleProps},n))}drawKeyShape(n,e){return this.upsert("key",W0,this.getKeyStyle(n),e)}getKeyStyle(n){const e=super.getKeyStyle(n);return Object.assign(Object.assign({},e),{r:Math.min(...this.getSize(n))/2})}getIconStyle(n){const e=super.getIconStyle(n),{r:t}=this.getShape("key").attributes,i=t*2*Vv;return e?Object.assign({width:i,height:i},e):!1}getIntersectPoint(n,e=!1){const t=this.getShape("key").getBounds();return TE(n,t,e)}}R_.defaultStyleProps={size:32};class OE extends Kh{constructor(n){super(n)}get parsedAttributes(){return this.attributes}drawKeyShape(n,e){return this.upsert("key",D1,this.getKeyStyle(n),e)}getKeyStyle(n){const e=super.getKeyStyle(n);return Object.assign(Object.assign({},e),{points:this.getPoints(n)})}getIntersectPoint(n,e=!1){var t,i;const{points:a}=this.getShape("key").attributes,s=[+(((t=this.attributes)===null||t===void 0?void 0:t.x)||0),+(((i=this.attributes)===null||i===void 0?void 0:i.y)||0)];return wI(n,s,a,!0,e).point}}class uQ extends OE{constructor(n){super(n)}getPoints(n){const[e,t]=this.getSize(n);return Ade(e,t)}}var cQ=function(r,n){var e={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&n.indexOf(t)<0&&(e[t]=r[t]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(r);i<t.length;i++)n.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(e[t[i]]=r[t[i]]);return e};class RE extends R_{constructor(n){super(xu({style:RE.defaultStyleProps},n))}parseOuterR(){const{size:n}=this.parsedAttributes;return Math.min(...th(n))/2}parseInnerR(){const{innerR:n}=this.parsedAttributes;return(0,Ze.Z)(n)?parseInt(n)/100*this.parseOuterR():n}drawDonutShape(n,e){const{donuts:t}=n;if(!(t!=null&&t.length))return;const i=t.map(d=>(0,pe.Z)(d)?{value:d}:d),a=Wl(this.getGraphicStyle(n),"donut"),s=II(n.donutPalette);if(!s)return;const o=i.reduce((d,h)=>{var f;return d+((f=h.value)!==null&&f!==void 0?f:0)},0),l=this.parseOuterR(),u=this.parseInnerR();let c=0;i.forEach((d,h)=>{const{value:f=0,color:v=s[h%s.length]}=d,g=cQ(d,["value","color"]),m=(o===0?1/i.length:f/o)*360;this.upsert(`round${h}`,gg,Object.assign(Object.assign(Object.assign({},a),{d:fQ(l,u,c,c+m),fill:v}),g),e),c+=m})}render(n,e=this){super.render(n,e),this.drawDonutShape(n,e)}}RE.defaultStyleProps={innerR:"50%",donuts:[],donutPalette:"tableau"};const AE=(r,n,e,t)=>[r+Math.sin(t)*e,n-Math.cos(t)*e],dQ=(r,n,e,t)=>t<=0||e<=t?[["M",r-e,n],["A",e,e,0,1,1,r+e,n],["A",e,e,0,1,1,r-e,n],["Z"]]:[["M",r-e,n],["A",e,e,0,1,1,r+e,n],["A",e,e,0,1,1,r-e,n],["Z"],["M",r+t,n],["A",t,t,0,1,0,r-t,n],["A",t,t,0,1,0,r+t,n],["Z"]],hQ=(r,n,e,t,i,a)=>{const[s,o]=[i/360*2*Math.PI,a/360*2*Math.PI],l=[AE(r,n,t,s),AE(r,n,e,s),AE(r,n,e,o),AE(r,n,t,o)],u=o-s>Math.PI?1:0;return[["M",l[0][0],l[0][1]],["L",l[1][0],l[1][1]],["A",e,e,0,u,1,l[2][0],l[2][1]],["L",l[3][0],l[3][1]],["A",t,t,0,u,0,l[0][0],l[0][1]],["Z"]]},fQ=(r=0,n=0,e,t)=>{const[i,a]=[0,0];return Math.abs(e-t)%360<1e-6?dQ(i,a,r,n):hQ(i,a,r,n,e,t)};class LE extends Kh{constructor(n){super(xu({style:LE.defaultStyleProps},n))}drawKeyShape(n,e){return this.upsert("key",x2,this.getKeyStyle(n),e)}getKeyStyle(n){const e=super.getKeyStyle(n),[t,i]=this.getSize(n);return Object.assign(Object.assign({},e),{rx:t/2,ry:i/2})}getIconStyle(n){const e=super.getIconStyle(n),{rx:t,ry:i}=this.getShape("key").attributes,a=Math.min(+t,+i)*2*Vv;return e?Object.assign({width:a,height:a},e):!1}getIntersectPoint(n,e=!1){const t=this.getShape("key").getBounds();return TE(n,t,e)}}LE.defaultStyleProps={size:[45,35]};class vQ extends OE{constructor(n){super(n)}getOuterR(n){return n.outerR||Math.min(...this.getSize(n))/2}getPoints(n){return Ide(this.getOuterR(n))}getIconStyle(n){const e=super.getIconStyle(n),t=this.getOuterR(n)*Vv;return e?Object.assign({width:t,height:t},e):!1}}function Tg(r){"@babel/helpers - typeof";return Tg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Tg(r)}function gQ(r,n){if(Tg(r)!="object"||!r)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var t=e.call(r,n||"default");if(Tg(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(r)}function VI(r){var n=gQ(r,"string");return Tg(n)=="symbol"?n:n+""}function UI(r,n){for(var e=0;e<n.length;e++){var t=n[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,VI(t.key),t)}}function Vn(r,n,e){return n&&UI(r.prototype,n),e&&UI(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function Un(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}function gp(r){return gp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},gp(r)}function jI(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(n){}return(jI=function(){return!!r})()}function _Q(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function mQ(r,n){if(n&&(Tg(n)=="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _Q(r)}function Ba(r,n,e){return n=gp(n),mQ(r,jI()?Reflect.construct(n,e||[],gp(r).constructor):n.apply(r,e))}function wT(r,n){return wT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},wT(r,n)}function $a(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(n&&n.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),n&&wT(r,n)}function xr(r,n,e){return(n=VI(n))in r?Object.defineProperty(r,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[n]=e,r}function HI(r,n){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);n&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),e.push.apply(e,t)}return e}function Oa(r){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?HI(Object(e),!0).forEach(function(t){xr(r,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):HI(Object(e)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))})}return r}function ST(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=Array(n);e<n;e++)t[e]=r[e];return t}function pQ(r){if(Array.isArray(r))return ST(r)}function yQ(r){if(typeof Symbol!="undefined"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function TT(r,n){if(r){if(typeof r=="string")return ST(r,n);var e={}.toString.call(r).slice(8,-1);return e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set"?Array.from(r):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?ST(r,n):void 0}}function xQ(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vl(r){return pQ(r)||yQ(r)||TT(r)||xQ()}function EQ(r){if(Array.isArray(r))return r}function bQ(r,n){var e=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(e!=null){var t,i,a,s,o=[],l=!0,u=!1;try{if(a=(e=e.call(r)).next,n===0){if(Object(e)!==e)return;l=!1}else for(;!(l=(t=a.call(e)).done)&&(o.push(t.value),o.length!==n);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&e.return!=null&&(s=e.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function kQ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aa(r,n){return EQ(r)||bQ(r,n)||TT(r,n)||kQ()}var Uv=k(44078);function wQ(r,n){for(;!{}.hasOwnProperty.call(r,n)&&(r=gp(r))!==null;);return r}function CT(){return CT=typeof Reflect!="undefined"&&Reflect.get?Reflect.get.bind():function(r,n,e){var t=wQ(r,n);if(t){var i=Object.getOwnPropertyDescriptor(t,n);return i.get?i.get.call(arguments.length<3?r:e):i.value}},CT.apply(null,arguments)}function WI(r,n,e,t){var i=CT(gp(1&t?r.prototype:r),n,e);return 2&t&&typeof i=="function"?function(a){return i.apply(e,a)}:i}function MT(r,n,e){r.prototype=n.prototype=e,e.constructor=r}function YI(r,n){var e=Object.create(r.prototype);for(var t in n)e[t]=n[t];return e}function xy(){}var Ey=.7,IE=1/Ey,_p="\\s*([+-]?\\d+)\\s*",by="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",qf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",SQ=/^#([0-9a-f]{3,8})$/,TQ=new RegExp(`^rgb\\(${_p},${_p},${_p}\\)$`),CQ=new RegExp(`^rgb\\(${qf},${qf},${qf}\\)$`),MQ=new RegExp(`^rgba\\(${_p},${_p},${_p},${by}\\)$`),PQ=new RegExp(`^rgba\\(${qf},${qf},${qf},${by}\\)$`),NQ=new RegExp(`^hsl\\(${by},${qf},${qf}\\)$`),OQ=new RegExp(`^hsla\\(${by},${qf},${qf},${by}\\)$`),ZI={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};MT(xy,DE,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:XI,formatHex:XI,formatHex8:RQ,formatHsl:AQ,formatRgb:KI,toString:KI});function XI(){return this.rgb().formatHex()}function RQ(){return this.rgb().formatHex8()}function AQ(){return tD(this).formatHsl()}function KI(){return this.rgb().formatRgb()}function DE(r){var n,e;return r=(r+"").trim().toLowerCase(),(n=SQ.exec(r))?(e=n[1].length,n=parseInt(n[1],16),e===6?JI(n):e===3?new zc(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):e===8?FE(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):e===4?FE(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=TQ.exec(r))?new zc(n[1],n[2],n[3],1):(n=CQ.exec(r))?new zc(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=MQ.exec(r))?FE(n[1],n[2],n[3],n[4]):(n=PQ.exec(r))?FE(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=NQ.exec(r))?eD(n[1],n[2]/100,n[3]/100,1):(n=OQ.exec(r))?eD(n[1],n[2]/100,n[3]/100,n[4]):ZI.hasOwnProperty(r)?JI(ZI[r]):r==="transparent"?new zc(NaN,NaN,NaN,0):null}function JI(r){return new zc(r>>16&255,r>>8&255,r&255,1)}function FE(r,n,e,t){return t<=0&&(r=n=e=NaN),new zc(r,n,e,t)}function LQ(r){return r instanceof xy||(r=DE(r)),r?(r=r.rgb(),new zc(r.r,r.g,r.b,r.opacity)):new zc}function IQ(r,n,e,t){return arguments.length===1?LQ(r):new zc(r,n,e,t==null?1:t)}function zc(r,n,e,t){this.r=+r,this.g=+n,this.b=+e,this.opacity=+t}MT(zc,IQ,YI(xy,{brighter(r){return r=r==null?IE:Math.pow(IE,r),new zc(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?Ey:Math.pow(Ey,r),new zc(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new zc(A_(this.r),A_(this.g),A_(this.b),BE(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:QI,formatHex:QI,formatHex8:DQ,formatRgb:qI,toString:qI}));function QI(){return`#${L_(this.r)}${L_(this.g)}${L_(this.b)}`}function DQ(){return`#${L_(this.r)}${L_(this.g)}${L_(this.b)}${L_((isNaN(this.opacity)?1:this.opacity)*255)}`}function qI(){const r=BE(this.opacity);return`${r===1?"rgb(":"rgba("}${A_(this.r)}, ${A_(this.g)}, ${A_(this.b)}${r===1?")":`, ${r})`}`}function BE(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function A_(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function L_(r){return r=A_(r),(r<16?"0":"")+r.toString(16)}function eD(r,n,e,t){return t<=0?r=n=e=NaN:e<=0||e>=1?r=n=NaN:n<=0&&(r=NaN),new Jh(r,n,e,t)}function tD(r){if(r instanceof Jh)return new Jh(r.h,r.s,r.l,r.opacity);if(r instanceof xy||(r=DE(r)),!r)return new Jh;if(r instanceof Jh)return r;r=r.rgb();var n=r.r/255,e=r.g/255,t=r.b/255,i=Math.min(n,e,t),a=Math.max(n,e,t),s=NaN,o=a-i,l=(a+i)/2;return o?(n===a?s=(e-t)/o+(e<t)*6:e===a?s=(t-n)/o+2:s=(n-e)/o+4,o/=l<.5?a+i:2-a-i,s*=60):o=l>0&&l<1?0:s,new Jh(s,o,l,r.opacity)}function FQ(r,n,e,t){return arguments.length===1?tD(r):new Jh(r,n,e,t==null?1:t)}function Jh(r,n,e,t){this.h=+r,this.s=+n,this.l=+e,this.opacity=+t}MT(Jh,FQ,YI(xy,{brighter(r){return r=r==null?IE:Math.pow(IE,r),new Jh(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?Ey:Math.pow(Ey,r),new Jh(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,n=isNaN(r)||isNaN(this.s)?0:this.s,e=this.l,t=e+(e<.5?e:1-e)*n,i=2*e-t;return new zc(PT(r>=240?r-240:r+120,i,t),PT(r,i,t),PT(r<120?r+240:r-120,i,t),this.opacity)},clamp(){return new Jh(nD(this.h),$E(this.s),$E(this.l),BE(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const r=BE(this.opacity);return`${r===1?"hsl(":"hsla("}${nD(this.h)}, ${$E(this.s)*100}%, ${$E(this.l)*100}%${r===1?")":`, ${r})`}`}}));function nD(r){return r=(r||0)%360,r<0?r+360:r}function $E(r){return Math.max(0,Math.min(1,r||0))}function PT(r,n,e){return(r<60?n+(e-n)*r/60:r<180?e:r<240?n+(e-n)*(240-r)/60:n)*255}function I_(r,n){var e=typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(!e){if(Array.isArray(r)||(e=TT(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:i}}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 a,s=!0,o=!1;return{s:function(){e=e.call(r)},n:function(){var u=e.next();return s=u.done,u},e:function(u){o=!0,a=u},f:function(){try{s||e.return==null||e.return()}finally{if(o)throw a}}}}function BQ(r,n){if(r==null)return{};var e={};for(var t in r)if({}.hasOwnProperty.call(r,t)){if(n.includes(t))continue;e[t]=r[t]}return e}function mp(r,n){if(r==null)return{};var e,t,i=BQ(r,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(t=0;t<a.length;t++)e=a[t],n.includes(e)||{}.propertyIsEnumerable.call(r,e)&&(i[e]=r[e])}return i}var $Q=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof k.g!="undefined"?k.g:typeof self!="undefined"?self:{},rD={exports:{}};(function(r,n){(function(e,t){r.exports=t()})($Q,function(){function e(x,_,p,b,R){t(x,_,p||0,b||x.length-1,R||a)}function t(x,_,p,b,R){for(;b>p;){if(b-p>600){var B=b-p+1,j=_-p+1,Z=Math.log(B),te=.5*Math.exp(2*Z/3),le=.5*Math.sqrt(Z*te*(B-te)/B)*(j-B/2<0?-1:1),ue=Math.max(p,Math.floor(_-j*te/B+le)),se=Math.min(b,Math.floor(_+(B-j)*te/B+le));t(x,_,ue,se,R)}var V=x[_],ee=p,he=b;for(i(x,p,_),R(x[b],V)>0&&i(x,p,b);ee<he;){for(i(x,ee,he),ee++,he--;R(x[ee],V)<0;)ee++;for(;R(x[he],V)>0;)he--}R(x[p],V)===0?i(x,p,he):(he++,i(x,he,b)),he<=_&&(p=he+1),_<=he&&(b=he-1)}}function i(x,_,p){var b=x[_];x[_]=x[p],x[p]=b}function a(x,_){return x<_?-1:x>_?1:0}var s=function(_){_===void 0&&(_=9),this._maxEntries=Math.max(4,_),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()};s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(_){var p=this.data,b=[];if(!w(_,p))return b;for(var R=this.toBBox,B=[];p;){for(var j=0;j<p.children.length;j++){var Z=p.children[j],te=p.leaf?R(Z):Z;w(_,te)&&(p.leaf?b.push(Z):y(_,te)?this._all(Z,b):B.push(Z))}p=B.pop()}return b},s.prototype.collides=function(_){var p=this.data;if(!w(_,p))return!1;for(var b=[];p;){for(var R=0;R<p.children.length;R++){var B=p.children[R],j=p.leaf?this.toBBox(B):B;if(w(_,j)){if(p.leaf||y(_,j))return!0;b.push(B)}}p=b.pop()}return!1},s.prototype.load=function(_){if(!(_&&_.length))return this;if(_.length<this._minEntries){for(var p=0;p<_.length;p++)this.insert(_[p]);return this}var b=this._build(_.slice(),0,_.length-1,0);if(!this.data.children.length)this.data=b;else if(this.data.height===b.height)this._splitRoot(this.data,b);else{if(this.data.height<b.height){var R=this.data;this.data=b,b=R}this._insert(b,this.data.height-b.height-1,!0)}return this},s.prototype.insert=function(_){return _&&this._insert(_,this.data.height-1),this},s.prototype.clear=function(){return this.data=T([]),this},s.prototype.remove=function(_,p){if(!_)return this;for(var b=this.data,R=this.toBBox(_),B=[],j=[],Z,te,le;b||B.length;){if(b||(b=B.pop(),te=B[B.length-1],Z=j.pop(),le=!0),b.leaf){var ue=o(_,b.children,p);if(ue!==-1)return b.children.splice(ue,1),B.push(b),this._condense(B),this}!le&&!b.leaf&&y(b,R)?(B.push(b),j.push(Z),Z=0,te=b,b=b.children[0]):te?(Z++,b=te.children[Z],le=!1):b=null}return this},s.prototype.toBBox=function(_){return _},s.prototype.compareMinX=function(_,p){return _.minX-p.minX},s.prototype.compareMinY=function(_,p){return _.minY-p.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(_){return this.data=_,this},s.prototype._all=function(_,p){for(var b=[];_;)_.leaf?p.push.apply(p,_.children):b.push.apply(b,_.children),_=b.pop();return p},s.prototype._build=function(_,p,b,R){var B=b-p+1,j=this._maxEntries,Z;if(B<=j)return Z=T(_.slice(p,b+1)),l(Z,this.toBBox),Z;R||(R=Math.ceil(Math.log(B)/Math.log(j)),j=Math.ceil(B/Math.pow(j,R-1))),Z=T([]),Z.leaf=!1,Z.height=R;var te=Math.ceil(B/j),le=te*Math.ceil(Math.sqrt(j));G(_,p,b,le,this.compareMinX);for(var ue=p;ue<=b;ue+=le){var se=Math.min(ue+le-1,b);G(_,ue,se,te,this.compareMinY);for(var V=ue;V<=se;V+=te){var ee=Math.min(V+te-1,se);Z.children.push(this._build(_,V,ee,R-1))}}return l(Z,this.toBBox),Z},s.prototype._chooseSubtree=function(_,p,b,R){for(;R.push(p),!(p.leaf||R.length-1===b);){for(var B=1/0,j=1/0,Z=void 0,te=0;te<p.children.length;te++){var le=p.children[te],ue=f(le),se=g(_,le)-ue;se<j?(j=se,B=ue<B?ue:B,Z=le):se===j&&ue<B&&(B=ue,Z=le)}p=Z||p.children[0]}return p},s.prototype._insert=function(_,p,b){var R=b?_:this.toBBox(_),B=[],j=this._chooseSubtree(R,this.data,p,B);for(j.children.push(_),c(j,R);p>=0&&B[p].children.length>this._maxEntries;)this._split(B,p),p--;this._adjustParentBBoxes(R,B,p)},s.prototype._split=function(_,p){var b=_[p],R=b.children.length,B=this._minEntries;this._chooseSplitAxis(b,B,R);var j=this._chooseSplitIndex(b,B,R),Z=T(b.children.splice(j,b.children.length-j));Z.height=b.height,Z.leaf=b.leaf,l(b,this.toBBox),l(Z,this.toBBox),p?_[p-1].children.push(Z):this._splitRoot(b,Z)},s.prototype._splitRoot=function(_,p){this.data=T([_,p]),this.data.height=_.height+1,this.data.leaf=!1,l(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(_,p,b){for(var R,B=1/0,j=1/0,Z=p;Z<=b-p;Z++){var te=u(_,0,Z,this.toBBox),le=u(_,Z,b,this.toBBox),ue=m(te,le),se=f(te)+f(le);ue<B?(B=ue,R=Z,j=se<j?se:j):ue===B&&se<j&&(j=se,R=Z)}return R||b-p},s.prototype._chooseSplitAxis=function(_,p,b){var R=_.leaf?this.compareMinX:d,B=_.leaf?this.compareMinY:h,j=this._allDistMargin(_,p,b,R),Z=this._allDistMargin(_,p,b,B);j<Z&&_.children.sort(R)},s.prototype._allDistMargin=function(_,p,b,R){_.children.sort(R);for(var B=this.toBBox,j=u(_,0,p,B),Z=u(_,b-p,b,B),te=v(j)+v(Z),le=p;le<b-p;le++){var ue=_.children[le];c(j,_.leaf?B(ue):ue),te+=v(j)}for(var se=b-p-1;se>=p;se--){var V=_.children[se];c(Z,_.leaf?B(V):V),te+=v(Z)}return te},s.prototype._adjustParentBBoxes=function(_,p,b){for(var R=b;R>=0;R--)c(p[R],_)},s.prototype._condense=function(_){for(var p=_.length-1,b=void 0;p>=0;p--)_[p].children.length===0?p>0?(b=_[p-1].children,b.splice(b.indexOf(_[p]),1)):this.clear():l(_[p],this.toBBox)};function o(x,_,p){if(!p)return _.indexOf(x);for(var b=0;b<_.length;b++)if(p(x,_[b]))return b;return-1}function l(x,_){u(x,0,x.children.length,_,x)}function u(x,_,p,b,R){R||(R=T(null)),R.minX=1/0,R.minY=1/0,R.maxX=-1/0,R.maxY=-1/0;for(var B=_;B<p;B++){var j=x.children[B];c(R,x.leaf?b(j):j)}return R}function c(x,_){return x.minX=Math.min(x.minX,_.minX),x.minY=Math.min(x.minY,_.minY),x.maxX=Math.max(x.maxX,_.maxX),x.maxY=Math.max(x.maxY,_.maxY),x}function d(x,_){return x.minX-_.minX}function h(x,_){return x.minY-_.minY}function f(x){return(x.maxX-x.minX)*(x.maxY-x.minY)}function v(x){return x.maxX-x.minX+(x.maxY-x.minY)}function g(x,_){return(Math.max(_.maxX,x.maxX)-Math.min(_.minX,x.minX))*(Math.max(_.maxY,x.maxY)-Math.min(_.minY,x.minY))}function m(x,_){var p=Math.max(x.minX,_.minX),b=Math.max(x.minY,_.minY),R=Math.min(x.maxX,_.maxX),B=Math.min(x.maxY,_.maxY);return Math.max(0,R-p)*Math.max(0,B-b)}function y(x,_){return x.minX<=_.minX&&x.minY<=_.minY&&_.maxX<=x.maxX&&_.maxY<=x.maxY}function w(x,_){return _.minX<=x.maxX&&_.minY<=x.maxY&&_.maxX>=x.minX&&_.maxY>=x.minY}function T(x){return{children:x,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function G(x,_,p,b,R){for(var B=[_,p];B.length;)if(p=B.pop(),_=B.pop(),!(p-_<=b)){var j=_+Math.ceil((p-_)/b/2)*b;e(x,j,_,p,R),B.push(_,j,j,p)}}return s})})(rD);var $Pe=rD.exports,on=function(r){return r.GROUP="g",r.FRAGMENT="fragment",r.CIRCLE="circle",r.ELLIPSE="ellipse",r.IMAGE="image",r.RECT="rect",r.LINE="line",r.POLYLINE="polyline",r.POLYGON="polygon",r.TEXT="text",r.PATH="path",r.HTML="html",r.MESH="mesh",r}({}),GE=function(r){return r[r.ZERO=0]="ZERO",r[r.NEGATIVE_ONE=1]="NEGATIVE_ONE",r}({}),ky=function(){function r(){Un(this,r),this.plugins=[]}return Vn(r,[{key:"addRenderingPlugin",value:function(e){this.plugins.push(e),this.context.renderingPlugins.push(e)}},{key:"removeAllRenderingPlugins",value:function(){var e=this;this.plugins.forEach(function(t){var i=e.context.renderingPlugins.indexOf(t);i>=0&&e.context.renderingPlugins.splice(i,1)})}}])}(),GQ=function(){function r(n){Un(this,r),this.clipSpaceNearZ=GE.NEGATIVE_ONE,this.plugins=[],this.config=Oa({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableSizeAttenuation:!0,enableRenderingOptimization:!1},n)}return Vn(r,[{key:"registerPlugin",value:function(e){var t=this.plugins.findIndex(function(i){return i===e});t===-1&&this.plugins.push(e)}},{key:"unregisterPlugin",value:function(e){var t=this.plugins.findIndex(function(i){return i===e});t>-1&&this.plugins.splice(t,1)}},{key:"getPlugins",value:function(){return this.plugins}},{key:"getPlugin",value:function(e){return this.plugins.find(function(t){return t.name===e})}},{key:"getConfig",value:function(){return this.config}},{key:"setConfig",value:function(e){Object.assign(this.config,e)}}])}(),NT=E.IH,pp=E.JG,zQ=E.Fp,VQ=E.VV,iD=E.bA,OT=E.lu,au=function(){function r(){Un(this,r),this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return Vn(r,[{key:"update",value:function(e,t){pp(this.center,e),pp(this.halfExtents,t),OT(this.min,this.center,this.halfExtents),NT(this.max,this.center,this.halfExtents)}},{key:"setMinMax",value:function(e,t){NT(this.center,t,e),iD(this.center,this.center,.5),OT(this.halfExtents,t,e),iD(this.halfExtents,this.halfExtents,.5),pp(this.min,e),pp(this.max,t)}},{key:"getMin",value:function(){return this.min}},{key:"getMax",value:function(){return this.max}},{key:"add",value:function(e){if(!r.isEmpty(e)){if(r.isEmpty(this)){this.setMinMax(e.getMin(),e.getMax());return}var t=this.center,i=t[0],a=t[1],s=t[2],o=this.halfExtents,l=o[0],u=o[1],c=o[2],d=i-l,h=i+l,f=a-u,v=a+u,g=s-c,m=s+c,y=e.center,w=y[0],T=y[1],G=y[2],x=e.halfExtents,_=x[0],p=x[1],b=x[2],R=w-_,B=w+_,j=T-p,Z=T+p,te=G-b,le=G+b;R<d&&(d=R),B>h&&(h=B),j<f&&(f=j),Z>v&&(v=Z),te<g&&(g=te),le>m&&(m=le),t[0]=(d+h)*.5,t[1]=(f+v)*.5,t[2]=(g+m)*.5,o[0]=(h-d)*.5,o[1]=(v-f)*.5,o[2]=(m-g)*.5,this.min[0]=d,this.min[1]=f,this.min[2]=g,this.max[0]=h,this.max[1]=v,this.max[2]=m}}},{key:"setFromTransformedAABB",value:function(e,t){var i=this.center,a=this.halfExtents,s=e.center,o=e.halfExtents,l=t[0],u=t[4],c=t[8],d=t[1],h=t[5],f=t[9],v=t[2],g=t[6],m=t[10],y=Math.abs(l),w=Math.abs(u),T=Math.abs(c),G=Math.abs(d),x=Math.abs(h),_=Math.abs(f),p=Math.abs(v),b=Math.abs(g),R=Math.abs(m);i[0]=t[12]+l*s[0]+u*s[1]+c*s[2],i[1]=t[13]+d*s[0]+h*s[1]+f*s[2],i[2]=t[14]+v*s[0]+g*s[1]+m*s[2],a[0]=y*o[0]+w*o[1]+T*o[2],a[1]=G*o[0]+x*o[1]+_*o[2],a[2]=p*o[0]+b*o[1]+R*o[2],OT(this.min,i,a),NT(this.max,i,a)}},{key:"intersects",value:function(e){var t=this.getMax(),i=this.getMin(),a=e.getMax(),s=e.getMin();return i[0]<=a[0]&&t[0]>=s[0]&&i[1]<=a[1]&&t[1]>=s[1]&&i[2]<=a[2]&&t[2]>=s[2]}},{key:"intersection",value:function(e){if(!this.intersects(e))return null;var t=new r,i=zQ([0,0,0],this.getMin(),e.getMin()),a=VQ([0,0,0],this.getMax(),e.getMax());return t.setMinMax(i,a),t}},{key:"getNegativeFarPoint",value:function(e){return e.pnVertexFlag===273?pp([0,0,0],this.min):e.pnVertexFlag===272?[this.min[0],this.min[1],this.max[2]]:e.pnVertexFlag===257?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===256?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===17?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===16?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===1?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]}},{key:"getPositiveFarPoint",value:function(e){return e.pnVertexFlag===273?pp([0,0,0],this.max):e.pnVertexFlag===272?[this.max[0],this.max[1],this.min[2]]:e.pnVertexFlag===257?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===256?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===17?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===16?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===1?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]}}],[{key:"isEmpty",value:function(e){return!e||e.halfExtents[0]===0&&e.halfExtents[1]===0&&e.halfExtents[2]===0}}])}(),UQ=function(){function r(n,e){Un(this,r),this.distance=n||0,this.normal=e||E.al(0,1,0),this.updatePNVertexFlag()}return Vn(r,[{key:"updatePNVertexFlag",value:function(){this.pnVertexFlag=(+(this.normal[0]>=0)<<8)+(+(this.normal[1]>=0)<<4)+ +(this.normal[2]>=0)}},{key:"distanceToPoint",value:function(e){return E.AK(e,this.normal)-this.distance}},{key:"normalize",value:function(){var e=1/E.Zh(this.normal);E.bA(this.normal,this.normal,e),this.distance*=e}},{key:"intersectsLine",value:function(e,t,i){var a=this.distanceToPoint(e),s=this.distanceToPoint(t),o=a/(a-s),l=o>=0&&o<=1;return l&&i&&E.t7(i,e,t,o),l}}])}(),GPe=function(r){return r[r.OUTSIDE=4294967295]="OUTSIDE",r[r.INSIDE=0]="INSIDE",r[r.INDETERMINATE=2147483647]="INDETERMINATE",r}({}),jQ=function(){function r(n){if(Un(this,r),this.planes=[],n)this.planes=n;else for(var e=0;e<6;e++)this.planes.push(new UQ)}return Vn(r,[{key:"extractFromVPMatrix",value:function(e){var t=aa(e,16),i=t[0],a=t[1],s=t[2],o=t[3],l=t[4],u=t[5],c=t[6],d=t[7],h=t[8],f=t[9],v=t[10],g=t[11],m=t[12],y=t[13],w=t[14],T=t[15];E.t8(this.planes[0].normal,o-i,d-l,g-h),this.planes[0].distance=T-m,E.t8(this.planes[1].normal,o+i,d+l,g+h),this.planes[1].distance=T+m,E.t8(this.planes[2].normal,o+a,d+u,g+f),this.planes[2].distance=T+y,E.t8(this.planes[3].normal,o-a,d-u,g-f),this.planes[3].distance=T-y,E.t8(this.planes[4].normal,o-s,d-c,g-v),this.planes[4].distance=T-w,E.t8(this.planes[5].normal,o+s,d+c,g+v),this.planes[5].distance=T+w,this.planes.forEach(function(G){G.normalize(),G.updatePNVertexFlag()})}}])}(),bd=function(){function r(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Un(this,r),this.x=0,this.y=0,this.x=n,this.y=e}return Vn(r,[{key:"clone",value:function(){return new r(this.x,this.y)}},{key:"copyFrom",value:function(e){this.x=e.x,this.y=e.y}}])}(),yp=function(){function r(n,e,t,i){Un(this,r),this.x=n,this.y=e,this.width=t,this.height=i,this.left=n,this.right=n+t,this.top=e,this.bottom=e+i}return Vn(r,[{key:"toJSON",value:function(){}}],[{key:"fromRect",value:function(e){return new r(e.x,e.y,e.width,e.height)}},{key:"applyTransform",value:function(e,t){var i=me.al(e.x,e.y,0,1),a=me.al(e.x+e.width,e.y,0,1),s=me.al(e.x,e.y+e.height,0,1),o=me.al(e.x+e.width,e.y+e.height,0,1),l=me.Ue(),u=me.Ue(),c=me.Ue(),d=me.Ue();me.fF(l,i,t),me.fF(u,a,t),me.fF(c,s,t),me.fF(d,o,t);var h=Math.min(l[0],u[0],c[0],d[0]),f=Math.min(l[1],u[1],c[1],d[1]),v=Math.max(l[0],u[0],c[0],d[0]),g=Math.max(l[1],u[1],c[1],d[1]);return r.fromRect({x:h,y:f,width:v-h,height:g-f})}}])}(),Yo="Method not implemented.",zPe="Use document.documentElement instead.",HQ="Cannot append a destroyed element.";function RT(r){return r===void 0?0:r>360||r<-360?r%360:r}var AT=E.Ue();function Vc(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;return Array.isArray(r)&&r.length===3?t?E.d9(r):E.JG(AT,r):(0,pe.Z)(r)?t?E.al(r,n,e):E.t8(AT,r,n,e):t?E.al(r[0],r[1]||n,r[2]||e):E.t8(AT,r[0],r[1]||n,r[2]||e)}var WQ=Math.PI/180;function Hs(r){return r*WQ}var YQ=180/Math.PI;function nh(r){return r*YQ}var ZQ=.9;function VPe(r){return r%=400,r<0&&(r+=400),r*ZQ}function UPe(r){return r/360}function XQ(r){return 360*r}var zE=Math.PI/2;function KQ(r,n){var e=n[0],t=n[1],i=n[2],a=n[3],s=e*e,o=t*t,l=i*i,u=a*a,c=s+o+l+u,d=e*a-t*i;return d>.499995*c?(r[0]=zE,r[1]=2*Math.atan2(t,e),r[2]=0):d<-.499995*c?(r[0]=-zE,r[1]=2*Math.atan2(t,e),r[2]=0):(r[0]=Math.asin(2*(e*i-a*t)),r[1]=Math.atan2(2*(e*a+t*i),1-2*(l+u)),r[2]=Math.atan2(2*(e*t+i*a),1-2*(o+l))),r}function JQ(r,n){var e,t,i=L.getScaling(E.Ue(),n),a=aa(i,3),s=a[0],o=a[1],l=a[2],u=Math.asin(-n[2]/s);return u<zE?u>-zE?(e=Math.atan2(n[6]/o,n[10]/l),t=Math.atan2(n[1]/s,n[0]/s)):(t=0,e=-Math.atan2(n[4]/o,n[5]/o)):(t=0,e=Math.atan2(n[4]/o,n[5]/o)),r[0]=e,r[1]=u,r[2]=t,r}function LT(r,n){return n.length===16?JQ(r,n):KQ(r,n)}function QQ(r,n,e,t,i){var a=Math.cos(r),s=Math.sin(r);return Ke.al(t*a,i*s,0,-t*s,i*a,0,n,e,1)}function qQ(r,n,e,t,i,a,s){var o=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1,l=2*a,u=e-n,c=t-i,d=l/u,h=l/c,f=(e+n)/u,v=(t+i)/c,g,m,y=s-a,w=s*a;return o?(g=-s/y,m=-w/y):(g=-(s+a)/y,m=-2*w/y),r[0]=d,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=h,r[6]=0,r[7]=0,r[8]=f,r[9]=v,r[10]=g,r[11]=-1,r[12]=0,r[13]=0,r[14]=m,r[15]=0,r}function aD(r){var n=r[0],e=r[1],t=r[3],i=r[4],a=Math.sqrt(n*n+e*e),s=Math.sqrt(t*t+i*i),o=n*i-e*t;if(o<0&&(n<i?a=-a:s=-s),a){var l=1/a;n*=l,e*=l}if(s){var u=1/s;t*=u,i*=u}var c=Math.atan2(e,n),d=nh(c);return[r[6],r[7],a,s,d]}var ev=L.create(),Qh=L.create(),wy=me.Ue(),Bi=[E.Ue(),E.Ue(),E.Ue()],sD=E.Ue();function eq(r,n,e,t,i,a){if(!tq(ev,r)||(L.copy(Qh,ev),Qh[3]=0,Qh[7]=0,Qh[11]=0,Qh[15]=1,Math.abs(L.determinant(Qh))<1e-8))return!1;var s=ev[3],o=ev[7],l=ev[11],u=ev[12],c=ev[13],d=ev[14],h=ev[15];if(s!==0||o!==0||l!==0){wy[0]=s,wy[1]=o,wy[2]=l,wy[3]=h;var f=L.invert(Qh,Qh);if(!f)return!1;L.transpose(Qh,Qh),me.fF(i,wy,Qh)}else i[0]=i[1]=i[2]=0,i[3]=1;if(n[0]=u,n[1]=c,n[2]=d,nq(Bi,ev),e[0]=E.kE(Bi[0]),E.Fv(Bi[0],Bi[0]),t[0]=E.AK(Bi[0],Bi[1]),IT(Bi[1],Bi[1],Bi[0],1,-t[0]),e[1]=E.kE(Bi[1]),E.Fv(Bi[1],Bi[1]),t[0]/=e[1],t[1]=E.AK(Bi[0],Bi[2]),IT(Bi[2],Bi[2],Bi[0],1,-t[1]),t[2]=E.AK(Bi[1],Bi[2]),IT(Bi[2],Bi[2],Bi[1],1,-t[2]),e[2]=E.kE(Bi[2]),E.Fv(Bi[2],Bi[2]),t[1]/=e[2],t[2]/=e[2],E.kC(sD,Bi[1],Bi[2]),E.AK(Bi[0],sD)<0)for(var v=0;v<3;v++)e[v]*=-1,Bi[v][0]*=-1,Bi[v][1]*=-1,Bi[v][2]*=-1;return a[0]=.5*Math.sqrt(Math.max(1+Bi[0][0]-Bi[1][1]-Bi[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-Bi[0][0]+Bi[1][1]-Bi[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-Bi[0][0]-Bi[1][1]+Bi[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+Bi[0][0]+Bi[1][1]+Bi[2][2],0)),Bi[2][1]>Bi[1][2]&&(a[0]=-a[0]),Bi[0][2]>Bi[2][0]&&(a[1]=-a[1]),Bi[1][0]>Bi[0][1]&&(a[2]=-a[2]),!0}function tq(r,n){var e=n[15];if(e===0)return!1;for(var t=1/e,i=0;i<16;i++)r[i]=n[i]*t;return!0}function nq(r,n){r[0][0]=n[0],r[0][1]=n[1],r[0][2]=n[2],r[1][0]=n[4],r[1][1]=n[5],r[1][2]=n[6],r[2][0]=n[8],r[2][1]=n[9],r[2][2]=n[10]}function IT(r,n,e,t,i){r[0]=n[0]*t+e[0]*i,r[1]=n[1]*t+e[1]*i,r[2]=n[2]*t+e[2]*i}var Pl=function(r){return r[r.ORBITING=0]="ORBITING",r[r.EXPLORING=1]="EXPLORING",r[r.TRACKING=2]="TRACKING",r}({}),oD=function(r){return r[r.DEFAULT=0]="DEFAULT",r[r.ROTATIONAL=1]="ROTATIONAL",r[r.TRANSLATIONAL=2]="TRANSLATIONAL",r[r.CINEMATIC=3]="CINEMATIC",r}({}),qh=function(r){return r[r.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",r[r.PERSPECTIVE=1]="PERSPECTIVE",r}({}),rq={UPDATED:"updated"},lD=2e-4,iq=function(){function r(){Un(this,r),this.clipSpaceNearZ=GE.NEGATIVE_ONE,this.eventEmitter=new Se.Z,this.matrix=L.create(),this.right=E.al(1,0,0),this.up=E.al(0,1,0),this.forward=E.al(0,0,1),this.position=E.al(0,0,1),this.focalPoint=E.al(0,0,0),this.distanceVector=E.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=L.create(),this.projectionMatrixInverse=L.create(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=Pl.EXPLORING,this.trackingMode=oD.DEFAULT,this.projectionMode=qh.PERSPECTIVE,this.frustum=new jQ,this.orthoMatrix=L.create()}return Vn(r,[{key:"isOrtho",value:function(){return this.projectionMode===qh.ORTHOGRAPHIC}},{key:"getProjectionMode",value:function(){return this.projectionMode}},{key:"getPerspective",value:function(){return this.jitteredProjectionMatrix||this.projectionMatrix}},{key:"getPerspectiveInverse",value:function(){return this.projectionMatrixInverse}},{key:"getFrustum",value:function(){return this.frustum}},{key:"getPosition",value:function(){return this.position}},{key:"getFocalPoint",value:function(){return this.focalPoint}},{key:"getDollyingStep",value:function(){return this.dollyingStep}},{key:"getNear",value:function(){return this.near}},{key:"getFar",value:function(){return this.far}},{key:"getZoom",value:function(){return this.zoom}},{key:"getOrthoMatrix",value:function(){return this.orthoMatrix}},{key:"getView",value:function(){return this.view}},{key:"setEnableUpdate",value:function(e){this.enableUpdate=e}},{key:"setType",value:function(e,t){return this.type=e,this.type===Pl.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===Pl.TRACKING&&t!==void 0&&this.setTrackingMode(t),this}},{key:"setProjectionMode",value:function(e){return this.projectionMode=e,this}},{key:"setTrackingMode",value:function(e){if(this.type!==Pl.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=e,this}},{key:"setWorldRotation",value:function(e){return this.rotateWorld=e,this._getAngles(),this}},{key:"getViewTransform",value:function(){return L.invert(L.create(),this.matrix)}},{key:"getWorldTransform",value:function(){return this.matrix}},{key:"jitterProjectionMatrix",value:function(e,t){var i=L.fromTranslation(L.create(),[e,t,0]);this.jitteredProjectionMatrix=L.multiply(L.create(),i,this.projectionMatrix)}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0}},{key:"setMatrix",value:function(e){return this.matrix=e,this._update(),this}},{key:"setProjectionMatrix",value:function(e){this.projectionMatrix=e}},{key:"setFov",value:function(e){return this.setPerspective(this.near,this.far,e,this.aspect),this}},{key:"setAspect",value:function(e){return this.setPerspective(this.near,this.far,this.fov,e),this}},{key:"setNear",value:function(e){return this.projectionMode===qh.PERSPECTIVE?this.setPerspective(e,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,e,this.far),this}},{key:"setFar",value:function(e){return this.projectionMode===qh.PERSPECTIVE?this.setPerspective(this.near,e,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,e),this}},{key:"setViewOffset",value:function(e,t,i,a,s,o){return this.aspect=e/t,this.view===void 0&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=a,this.view.width=s,this.view.height=o,this.projectionMode===qh.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===qh.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"setZoom",value:function(e){return this.zoom=e,this.projectionMode===qh.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===qh.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this}},{key:"setZoomByViewportPoint",value:function(e,t){var i=this.canvas.viewport2Canvas({x:t[0],y:t[1]}),a=i.x,s=i.y,o=this.roll;this.rotate(0,0,-o),this.setPosition(a,s),this.setFocalPoint(a,s),this.setZoom(e),this.rotate(0,0,o);var l=this.canvas.viewport2Canvas({x:t[0],y:t[1]}),u=l.x,c=l.y,d=E.al(u-a,c-s,0),h=E.AK(d,this.right)/E.kE(this.right),f=E.AK(d,this.up)/E.kE(this.up),v=this.getPosition(),g=aa(v,2),m=g[0],y=g[1],w=this.getFocalPoint(),T=aa(w,2),G=T[0],x=T[1];return this.setPosition(m-h,y-f),this.setFocalPoint(G-h,x-f),this}},{key:"setPerspective",value:function(e,t,i,a){var s;this.projectionMode=qh.PERSPECTIVE,this.fov=i,this.near=e,this.far=t,this.aspect=a;var o=this.near*Math.tan(Hs(.5*this.fov))/this.zoom,l=2*o,u=this.aspect*l,c=-.5*u;if((s=this.view)!==null&&s!==void 0&&s.enabled){var d=this.view.fullWidth,h=this.view.fullHeight;c+=this.view.offsetX*u/d,o-=this.view.offsetY*l/h,u*=this.view.width/d,l*=this.view.height/h}return qQ(this.projectionMatrix,c,c+u,o-l,o,e,this.far,this.clipSpaceNearZ===GE.ZERO),L.invert(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this}},{key:"setOrthographic",value:function(e,t,i,a,s,o){var l;this.projectionMode=qh.ORTHOGRAPHIC,this.rright=t,this.left=e,this.top=i,this.bottom=a,this.near=s,this.far=o;var u=(this.rright-this.left)/(2*this.zoom),c=(this.top-this.bottom)/(2*this.zoom),d=(this.rright+this.left)/2,h=(this.top+this.bottom)/2,f=d-u,v=d+u,g=h+c,m=h-c;if((l=this.view)!==null&&l!==void 0&&l.enabled){var y=(this.rright-this.left)/this.view.fullWidth/this.zoom,w=(this.top-this.bottom)/this.view.fullHeight/this.zoom;f+=y*this.view.offsetX,v=f+y*this.view.width,g-=w*this.view.offsetY,m=g-w*this.view.height}return this.clipSpaceNearZ===GE.NEGATIVE_ONE?L.ortho(this.projectionMatrix,f,v,g,m,s,o):L.orthoZO(this.projectionMatrix,f,v,g,m,s,o),L.invert(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this}},{key:"setPosition",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.position[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.position[2],a=Vc(e,t,i);return this._setPosition(a),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this}},{key:"setFocalPoint",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.focalPoint[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.focalPoint[2],a=E.al(0,1,0);if(this.focalPoint=Vc(e,t,i),this.trackingMode===oD.CINEMATIC){var s=E.$X(E.Ue(),this.focalPoint,this.position);e=s[0],t=s[1],i=s[2];var o=E.kE(s),l=nh(Math.asin(t/o)),u=90+nh(Math.atan2(i,e)),c=L.create();L.rotateY(c,c,Hs(u)),L.rotateX(c,c,Hs(l)),a=E.fF(E.Ue(),[0,1,0],c)}return L.invert(this.matrix,L.lookAt(L.create(),this.position,this.focalPoint,a)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this}},{key:"getDistance",value:function(){return this.distance}},{key:"getDistanceVector",value:function(){return this.distanceVector}},{key:"setDistance",value:function(e){if(this.distance===e||e<0)return this;this.distance=e,this.distance<lD&&(this.distance=lD),this.dollyingStep=this.distance/100;var t=E.Ue();e=this.distance;var i=this.forward,a=this.focalPoint;return t[0]=e*i[0]+a[0],t[1]=e*i[1]+a[1],t[2]=e*i[2]+a[2],this._setPosition(t),this.triggerUpdate(),this}},{key:"setMaxDistance",value:function(e){return this.maxDistance=e,this}},{key:"setMinDistance",value:function(e){return this.minDistance=e,this}},{key:"setAzimuth",value:function(e){return this.azimuth=RT(e),this.computeMatrix(),this._getAxes(),this.type===Pl.ORBITING||this.type===Pl.EXPLORING?this._getPosition():this.type===Pl.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getAzimuth",value:function(){return this.azimuth}},{key:"setElevation",value:function(e){return this.elevation=RT(e),this.computeMatrix(),this._getAxes(),this.type===Pl.ORBITING||this.type===Pl.EXPLORING?this._getPosition():this.type===Pl.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getElevation",value:function(){return this.elevation}},{key:"setRoll",value:function(e){return this.roll=RT(e),this.computeMatrix(),this._getAxes(),this.type===Pl.ORBITING||this.type===Pl.EXPLORING?this._getPosition():this.type===Pl.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getRoll",value:function(){return this.roll}},{key:"_update",value:function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()}},{key:"computeMatrix",value:function(){var e=X.yY(X.Ue(),[0,0,1],Hs(this.roll));L.identity(this.matrix);var t=X.yY(X.Ue(),[1,0,0],Hs((this.rotateWorld&&this.type!==Pl.TRACKING||this.type===Pl.TRACKING?1:-1)*this.elevation)),i=X.yY(X.Ue(),[0,1,0],Hs((this.rotateWorld&&this.type!==Pl.TRACKING||this.type===Pl.TRACKING?1:-1)*this.azimuth)),a=X.Jp(X.Ue(),i,t);a=X.Jp(X.Ue(),a,e);var s=L.fromQuat(L.create(),a);this.type===Pl.ORBITING||this.type===Pl.EXPLORING?(L.translate(this.matrix,this.matrix,this.focalPoint),L.multiply(this.matrix,this.matrix,s),L.translate(this.matrix,this.matrix,[0,0,this.distance])):this.type===Pl.TRACKING&&(L.translate(this.matrix,this.matrix,this.position),L.multiply(this.matrix,this.matrix,s))}},{key:"_setPosition",value:function(e,t,i){this.position=Vc(e,t,i);var a=this.matrix;a[12]=this.position[0],a[13]=this.position[1],a[14]=this.position[2],a[15]=1,this._getOrthoMatrix()}},{key:"_getAxes",value:function(){E.JG(this.right,Vc(me.fF(me.Ue(),[1,0,0,0],this.matrix))),E.JG(this.up,Vc(me.fF(me.Ue(),[0,1,0,0],this.matrix))),E.JG(this.forward,Vc(me.fF(me.Ue(),[0,0,1,0],this.matrix))),E.Fv(this.right,this.right),E.Fv(this.up,this.up),E.Fv(this.forward,this.forward)}},{key:"_getAngles",value:function(){var e=this.distanceVector[0],t=this.distanceVector[1],i=this.distanceVector[2],a=E.kE(this.distanceVector);if(a===0){this.elevation=0,this.azimuth=0;return}this.type===Pl.TRACKING?(this.elevation=nh(Math.asin(t/a)),this.azimuth=nh(Math.atan2(-e,-i))):this.rotateWorld?(this.elevation=nh(Math.asin(t/a)),this.azimuth=nh(Math.atan2(-e,-i))):(this.elevation=-nh(Math.asin(t/a)),this.azimuth=-nh(Math.atan2(-e,-i)))}},{key:"_getPosition",value:function(){E.JG(this.position,Vc(me.fF(me.Ue(),[0,0,0,1],this.matrix))),this._getDistance()}},{key:"_getFocalPoint",value:function(){E.kK(this.distanceVector,[0,0,-this.distance],Ke.xO(Ke.Ue(),this.matrix)),E.IH(this.focalPoint,this.position,this.distanceVector),this._getDistance()}},{key:"_getDistance",value:function(){this.distanceVector=E.$X(E.Ue(),this.focalPoint,this.position),this.distance=E.kE(this.distanceVector),this.dollyingStep=this.distance/100}},{key:"_getOrthoMatrix",value:function(){if(this.projectionMode===qh.ORTHOGRAPHIC){var e=this.position,t=X.yY(X.Ue(),[0,0,1],-this.roll*Math.PI/180);L.fromRotationTranslationScaleOrigin(this.orthoMatrix,t,E.al((this.rright-this.left)/2-e[0],(this.top-this.bottom)/2-e[1],0),E.al(this.zoom,this.zoom,1),e)}}},{key:"triggerUpdate",value:function(){if(this.enableUpdate){var e=this.getViewTransform(),t=L.multiply(L.create(),this.getPerspective(),e);this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(rq.UPDATED)}}},{key:"rotate",value:function(e,t,i){throw new Error(Yo)}},{key:"pan",value:function(e,t){throw new Error(Yo)}},{key:"dolly",value:function(e){throw new Error(Yo)}},{key:"createLandmark",value:function(e,t){throw new Error(Yo)}},{key:"gotoLandmark",value:function(e,t){throw new Error(Yo)}},{key:"cancelLandmarkAnimation",value:function(){throw new Error(Yo)}}])}(),aq=function(r){return r[r.Standard=0]="Standard",r}({}),DT=function(r){return r[r.ADDED=0]="ADDED",r[r.REMOVED=1]="REMOVED",r[r.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED",r}({}),uD={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new yp(0,0,0,0)},jn=function(r){return r.COORDINATE="<coordinate>",r.COLOR="<color>",r.PAINT="<paint>",r.NUMBER="<number>",r.ANGLE="<angle>",r.OPACITY_VALUE="<opacity-value>",r.SHADOW_BLUR="<shadow-blur>",r.LENGTH="<length>",r.PERCENTAGE="<percentage>",r.LENGTH_PERCENTAGE="<length> | <percentage>",r.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",r.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",r.LIST_OF_POINTS="<list-of-points>",r.PATH="<path>",r.FILTER="<filter>",r.Z_INDEX="<z-index>",r.OFFSET_DISTANCE="<offset-distance>",r.DEFINED_PATH="<defined-path>",r.MARKER="<marker>",r.TRANSFORM="<transform>",r.TRANSFORM_ORIGIN="<transform-origin>",r.TEXT="<text>",r.TEXT_TRANSFORM="<text-transform>",r}({});function fc(r,n){if(typeof r!="function"||n!=null&&typeof n!="function")throw new TypeError("Expected a function");var e=function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var o=n?n.apply(this,a):a[0],l=e.cache;if(l.has(o))return l.get(o);var u=r.apply(this,a);return e.cache=l.set(o,u)||l,u};return e.cache=new(fc.Cache||Map),e}fc.Cache=Map;var Xn=function(r){return r[r.kUnknown=0]="kUnknown",r[r.kNumber=1]="kNumber",r[r.kPercentage=2]="kPercentage",r[r.kEms=3]="kEms",r[r.kPixels=4]="kPixels",r[r.kRems=5]="kRems",r[r.kDegrees=6]="kDegrees",r[r.kRadians=7]="kRadians",r[r.kGradians=8]="kGradians",r[r.kTurns=9]="kTurns",r[r.kMilliseconds=10]="kMilliseconds",r[r.kSeconds=11]="kSeconds",r[r.kInteger=12]="kInteger",r}({}),ef=function(r){return r[r.kUNumber=0]="kUNumber",r[r.kUPercent=1]="kUPercent",r[r.kULength=2]="kULength",r[r.kUAngle=3]="kUAngle",r[r.kUTime=4]="kUTime",r[r.kUOther=5]="kUOther",r}({}),sq=function(r){return r[r.kYes=0]="kYes",r[r.kNo=1]="kNo",r}({}),oq=function(r){return r[r.kYes=0]="kYes",r[r.kNo=1]="kNo",r}({}),lq=[{name:"em",unit_type:Xn.kEms},{name:"px",unit_type:Xn.kPixels},{name:"deg",unit_type:Xn.kDegrees},{name:"rad",unit_type:Xn.kRadians},{name:"grad",unit_type:Xn.kGradians},{name:"ms",unit_type:Xn.kMilliseconds},{name:"s",unit_type:Xn.kSeconds},{name:"rem",unit_type:Xn.kRems},{name:"turn",unit_type:Xn.kTurns}],xp=function(r){return r[r.kUnknownType=0]="kUnknownType",r[r.kUnparsedType=1]="kUnparsedType",r[r.kKeywordType=2]="kKeywordType",r[r.kUnitType=3]="kUnitType",r[r.kSumType=4]="kSumType",r[r.kProductType=5]="kProductType",r[r.kNegateType=6]="kNegateType",r[r.kInvertType=7]="kInvertType",r[r.kMinType=8]="kMinType",r[r.kMaxType=9]="kMaxType",r[r.kClampType=10]="kClampType",r[r.kTransformType=11]="kTransformType",r[r.kPositionType=12]="kPositionType",r[r.kURLImageType=13]="kURLImageType",r[r.kColorType=14]="kColorType",r[r.kUnsupportedColorType=15]="kUnsupportedColorType",r}({}),uq=function(n){return lq.find(function(e){return e.name===n}).unit_type},cq=function(n){return n?n==="number"?Xn.kNumber:n==="percent"||n==="%"?Xn.kPercentage:uq(n):Xn.kUnknown},dq=function(n){switch(n){case Xn.kNumber:case Xn.kInteger:return ef.kUNumber;case Xn.kPercentage:return ef.kUPercent;case Xn.kPixels:return ef.kULength;case Xn.kMilliseconds:case Xn.kSeconds:return ef.kUTime;case Xn.kDegrees:case Xn.kRadians:case Xn.kGradians:case Xn.kTurns:return ef.kUAngle;default:return ef.kUOther}},hq=function(n){switch(n){case ef.kUNumber:return Xn.kNumber;case ef.kULength:return Xn.kPixels;case ef.kUPercent:return Xn.kPercentage;case ef.kUTime:return Xn.kSeconds;case ef.kUAngle:return Xn.kDegrees;default:return Xn.kUnknown}},cD=function(n){var e=1;switch(n){case Xn.kPixels:case Xn.kDegrees:case Xn.kSeconds:break;case Xn.kMilliseconds:e=.001;break;case Xn.kRadians:e=180/Math.PI;break;case Xn.kGradians:e=.9;break;case Xn.kTurns:e=360;break}return e},FT=function(n){switch(n){case Xn.kNumber:case Xn.kInteger:return"";case Xn.kPercentage:return"%";case Xn.kEms:return"em";case Xn.kRems:return"rem";case Xn.kPixels:return"px";case Xn.kDegrees:return"deg";case Xn.kRadians:return"rad";case Xn.kGradians:return"grad";case Xn.kMilliseconds:return"ms";case Xn.kSeconds:return"s";case Xn.kTurns:return"turn"}return""},VE=function(){function r(){Un(this,r)}return Vn(r,[{key:"toString",value:function(){return this.buildCSSText(sq.kNo,oq.kNo,"")}},{key:"isNumericValue",value:function(){return this.getType()>=xp.kUnitType&&this.getType()<=xp.kClampType}}],[{key:"isAngle",value:function(e){return e===Xn.kDegrees||e===Xn.kRadians||e===Xn.kGradians||e===Xn.kTurns}},{key:"isLength",value:function(e){return e>=Xn.kEms&&e<Xn.kDegrees}},{key:"isRelativeUnit",value:function(e){return e===Xn.kPercentage||e===Xn.kEms||e===Xn.kRems}},{key:"isTime",value:function(e){return e===Xn.kSeconds||e===Xn.kMilliseconds}}])}(),fq=function(r){function n(e){var t;return Un(this,n),t=Ba(this,n),t.colorSpace=e,t}return $a(n,r),Vn(n,[{key:"getType",value:function(){return xp.kColorType}},{key:"to",value:function(t){return this}}])}(VE),Cg=function(r){return r[r.Constant=0]="Constant",r[r.LinearGradient=1]="LinearGradient",r[r.RadialGradient=2]="RadialGradient",r}({}),UE=function(r){function n(e,t){var i;return Un(this,n),i=Ba(this,n),i.type=e,i.value=t,i}return $a(n,r),Vn(n,[{key:"clone",value:function(){return new n(this.type,this.value)}},{key:"buildCSSText",value:function(t,i,a){return a}},{key:"getType",value:function(){return xp.kColorType}}])}(VE),rh=function(r){function n(e){var t;return Un(this,n),t=Ba(this,n),t.value=e,t}return $a(n,r),Vn(n,[{key:"clone",value:function(){return new n(this.value)}},{key:"getType",value:function(){return xp.kKeywordType}},{key:"buildCSSText",value:function(t,i,a){return a+this.value}}])}(VE),vq=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",t="";return Number.isFinite(n)?t="NaN":n>0?t="infinity":t="-infinity",t+=e},BT=function(n){return hq(dq(n))},hs=function(r){function n(e){var t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xn.kNumber;Un(this,n),t=Ba(this,n);var a;return typeof i=="string"?a=cq(i):a=i,t.unit=a,t.value=e,t}return $a(n,r),Vn(n,[{key:"clone",value:function(){return new n(this.value,this.unit)}},{key:"equals",value:function(t){var i=t;return this.value===i.value&&this.unit===i.unit}},{key:"getType",value:function(){return xp.kUnitType}},{key:"convertTo",value:function(t){if(this.unit===t)return new n(this.value,this.unit);var i=BT(this.unit);if(i!==BT(t)||i===Xn.kUnknown)return null;var a=cD(this.unit)/cD(t);return new n(this.value*a,t)}},{key:"buildCSSText",value:function(t,i,a){var s;switch(this.unit){case Xn.kUnknown:break;case Xn.kInteger:s=Number(this.value).toFixed(0);break;case Xn.kNumber:case Xn.kPercentage:case Xn.kEms:case Xn.kRems:case Xn.kPixels:case Xn.kDegrees:case Xn.kRadians:case Xn.kGradians:case Xn.kMilliseconds:case Xn.kSeconds:case Xn.kTurns:{var o=-999999,l=999999,u=this.value,c=FT(this.unit);if(u<o||u>l){var d=FT(this.unit);!Number.isFinite(u)||Number.isNaN(u)?s=vq(u,d):s=u+(d||"")}else s="".concat(u).concat(c)}}return a+=s,a}}])}(VE),tf=new hs(0,"px");new hs(1,"px");var D_=new hs(0,"deg"),$T=function(r){function n(e,t,i){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;return Un(this,n),a=Ba(this,n,["rgb"]),a.r=e,a.g=t,a.b=i,a.alpha=s,a.isNone=o,a}return $a(n,r),Vn(n,[{key:"clone",value:function(){return new n(this.r,this.g,this.b,this.alpha)}},{key:"buildCSSText",value:function(t,i,a){return"".concat(a,"rgba(").concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")}}])}(fq),dD=new rh("unset"),gq=new rh("initial"),_q=new rh("inherit"),GT={"":dD,unset:dD,initial:gq,inherit:_q},mq=function(n){return GT[n]||(GT[n]=new rh(n)),GT[n]},hD=new $T(0,0,0,0,!0),fD=new $T(0,0,0,0),pq=fc(function(r,n,e,t){return new $T(r,n,e,t)},function(r,n,e,t){return"rgba(".concat(r,",").concat(n,",").concat(e,",").concat(t,")")}),wo=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xn.kNumber;return new hs(n,e)};new hs(50,"%");function yq(r){var n=r.type,e=r.value;return n==="hex"?"#".concat(e):n==="literal"?e:n==="rgb"?"rgb(".concat(e.join(","),")"):"rgba(".concat(e.join(","),")")}var xq=function(){var r={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},n="";function e(V){throw new Error("".concat(n,": ").concat(V))}function t(){var V=i();return n.length>0&&e("Invalid input not EOF"),V}function i(){return T(a)}function a(){return s("linear-gradient",r.linearGradient,l)||s("repeating-linear-gradient",r.repeatingLinearGradient,l)||s("radial-gradient",r.radialGradient,d)||s("repeating-radial-gradient",r.repeatingRadialGradient,d)||s("conic-gradient",r.conicGradient,d)}function s(V,ee,he){return o(ee,function(ut){var ct=he();return ct&&(ue(r.comma)||e("Missing comma before color stops")),{type:V,orientation:ct,colorStops:T(G)}})}function o(V,ee){var he=ue(V);if(he){ue(r.startCall)||e("Missing (");var ut=ee(he);return ue(r.endCall)||e("Missing )"),ut}}function l(){return u()||c()}function u(){return le("directional",r.sideOrCorner,1)}function c(){return le("angular",r.angleValue,1)}function d(){var V,ee=h(),he;return ee&&(V=[],V.push(ee),he=n,ue(r.comma)&&(ee=h(),ee?V.push(ee):n=he)),V}function h(){var V=f()||v();if(V)V.at=m();else{var ee=g();if(ee){V=ee;var he=m();he&&(V.at=he)}else{var ut=y();ut&&(V={type:"default-radial",at:ut})}}return V}function f(){var V=le("shape",/^(circle)/i,0);return V&&(V.style=te()||g()),V}function v(){var V=le("shape",/^(ellipse)/i,0);return V&&(V.style=j()||g()),V}function g(){return le("extent-keyword",r.extentKeywords,1)}function m(){if(le("position",/^at/,0)){var V=y();return V||e("Missing positioning value"),V}}function y(){var V=w();if(V.x||V.y)return{type:"position",value:V}}function w(){return{x:j(),y:j()}}function T(V){var ee=V(),he=[];if(ee)for(he.push(ee);ue(r.comma);)ee=V(),ee?he.push(ee):e("One extra comma");return he}function G(){var V=x();return V||e("Expected color definition"),V.length=j(),V}function x(){return p()||R()||b()||_()}function _(){return le("literal",r.literalColor,0)}function p(){return le("hex",r.hexColor,1)}function b(){return o(r.rgbColor,function(){return{type:"rgb",value:T(B)}})}function R(){return o(r.rgbaColor,function(){return{type:"rgba",value:T(B)}})}function B(){return ue(r.number)[1]}function j(){return le("%",r.percentageValue,1)||Z()||te()}function Z(){return le("position-keyword",r.positionKeywords,1)}function te(){return le("px",r.pixelValue,1)||le("em",r.emValue,1)}function le(V,ee,he){var ut=ue(ee);if(ut)return{type:V,value:ut[he]}}function ue(V){var ee=/^[\n\r\t\s]+/.exec(n);ee&&se(ee[0].length);var he=V.exec(n);return he&&se(he[0].length),he}function se(V){n=n.substring(V)}return function(V){return n=V,t()}}();function Eq(r,n,e,t){var i=Hs(t.value),a=0,s=0,o=a+n/2,l=s+e/2,u=Math.abs(n*Math.cos(i))+Math.abs(e*Math.sin(i)),c=r[0]+o-Math.cos(i)*u/2,d=r[1]+l-Math.sin(i)*u/2,h=r[0]+o+Math.cos(i)*u/2,f=r[1]+l+Math.sin(i)*u/2;return{x1:c,y1:d,x2:h,y2:f}}function bq(r,n,e,t,i,a){var s=t.value,o=i.value;t.unit===Xn.kPercentage&&(s=t.value/100*n),i.unit===Xn.kPercentage&&(o=i.value/100*e);var l=Math.max((0,Uv.y)([0,0],[s,o]),(0,Uv.y)([0,e],[s,o]),(0,Uv.y)([n,e],[s,o]),(0,Uv.y)([n,0],[s,o]));return a&&(a instanceof hs?l=a.value:a instanceof rh&&(a.value==="closest-side"?l=Math.min(s,n-s,o,e-o):a.value==="farthest-side"?l=Math.max(s,n-s,o,e-o):a.value==="closest-corner"&&(l=Math.min((0,Uv.y)([0,0],[s,o]),(0,Uv.y)([0,e],[s,o]),(0,Uv.y)([n,e],[s,o]),(0,Uv.y)([n,0],[s,o]))))),{x:s+r[0],y:o+r[1],r:l}}var kq=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,wq=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,Sq=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,vD=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function Tq(r){var n,e=r.length;if(r[e-1].length=(n=r[e-1].length)!==null&&n!==void 0?n:{type:"%",value:"100"},e>1){var t;r[0].length=(t=r[0].length)!==null&&t!==void 0?t:{type:"%",value:"0"}}for(var i=0,a=Number(r[0].length.value),s=1;s<e;s++){var o,l=(o=r[s].length)===null||o===void 0?void 0:o.value;if(!(0,xe.Z)(l)&&!(0,xe.Z)(a)){for(var u=1;u<s-i;u++)r[i+u].length={type:"%",value:"".concat(a+(Number(l)-a)*u/(s-i))};i=s,a=Number(l)}}}var Cq={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},Mq=fc(function(r){var n;return r.type==="angular"?n=Number(r.value):n=Cq[r.value]||0,wo(n,"deg")}),Pq=fc(function(r){var n=50,e=50,t="%",i="%";if((r==null?void 0:r.type)==="position"){var a=r.value,s=a.x,o=a.y;(s==null?void 0:s.type)==="position-keyword"&&(s.value==="left"?n=0:s.value==="center"?n=50:s.value==="right"?n=100:s.value==="top"?e=0:s.value==="bottom"&&(e=100)),(o==null?void 0:o.type)==="position-keyword"&&(o.value==="left"?n=0:o.value==="center"?e=50:o.value==="right"?n=100:o.value==="top"?e=0:o.value==="bottom"&&(e=100)),((s==null?void 0:s.type)==="px"||(s==null?void 0:s.type)==="%"||(s==null?void 0:s.type)==="em")&&(t=s==null?void 0:s.type,n=Number(s.value)),((o==null?void 0:o.type)==="px"||(o==null?void 0:o.type)==="%"||(o==null?void 0:o.type)==="em")&&(i=o==null?void 0:o.type,e=Number(o.value))}return{cx:wo(n,t),cy:wo(e,i)}}),Nq=fc(function(r){if(r.indexOf("linear")>-1||r.indexOf("radial")>-1){var n=xq(r);return n.map(function(o){var l=o.type,u=o.orientation,c=o.colorStops;Tq(c);var d=c.map(function(T){return{offset:wo(Number(T.length.value),"%"),color:yq(T)}});if(l==="linear-gradient")return new UE(Cg.LinearGradient,{angle:u?Mq(u):D_,steps:d});if(l==="radial-gradient"&&(u||(u=[{type:"shape",value:"circle"}]),u[0].type==="shape"&&u[0].value==="circle")){var h=Pq(u[0].at),f=h.cx,v=h.cy,g;if(u[0].style){var m=u[0].style,y=m.type,w=m.value;y==="extent-keyword"?g=mq(w):g=wo(w,y)}return new UE(Cg.RadialGradient,{cx:f,cy:v,size:g,steps:d})}})}var e=r[0];if(r[1]==="("||r[2]==="("){if(e==="l"){var t=kq.exec(r);if(t){var i,a=((i=t[2].match(vD))===null||i===void 0?void 0:i.map(function(o){return o.split(":")}))||[];return[new UE(Cg.LinearGradient,{angle:wo(parseFloat(t[1]),"deg"),steps:a.map(function(o){var l=aa(o,2),u=l[0],c=l[1];return{offset:wo(Number(u)*100,"%"),color:c}})})]}}else if(e==="r"){var s=Oq(r);if(s)if((0,Ze.Z)(s))r=s;else return[new UE(Cg.RadialGradient,s)]}else if(e==="p")return Rq(r)}});function Oq(r){var n=wq.exec(r);if(n){var e,t=((e=n[4].match(vD))===null||e===void 0?void 0:e.map(function(i){return i.split(":")}))||[];return{cx:wo(50,"%"),cy:wo(50,"%"),steps:t.map(function(i){var a=aa(i,2),s=a[0],o=a[1];return{offset:wo(Number(s)*100,"%"),color:o}})}}return null}function Rq(r){var n=Sq.exec(r);if(n){var e=n[1],t=n[2];switch(e){case"a":e="repeat";break;case"x":e="repeat-x";break;case"y":e="repeat-y";break;case"n":e="no-repeat";break;default:e="no-repeat"}return{image:t,repetition:e}}return null}function jPe(r){return!!r.type&&!!r.value}function Sy(r){return r&&!!r.image}function gD(r){return r&&!(0,xe.Z)(r.r)&&!(0,xe.Z)(r.g)&&!(0,xe.Z)(r.b)}var Ty=fc(function(r){if(Sy(r))return Oa({repetition:"repeat"},r);if((0,xe.Z)(r)&&(r=""),r==="transparent")return fD;if(r==="currentColor")r="black";else if(r==="none")return hD;var n=Nq(r);if(n)return n;var e=DE(r),t=[0,0,0,0];return e!==null&&(t[0]=e.r||0,t[1]=e.g||0,t[2]=e.b||0,t[3]=e.opacity),pq.apply(void 0,t)});function Aq(r,n){if(!(!gD(r)||!gD(n)))return[[Number(r.r),Number(r.g),Number(r.b),Number(r.alpha)],[Number(n.r),Number(n.g),Number(n.b),Number(n.alpha)],function(e){var t=e.slice();if(t[3])for(var i=0;i<3;i++)t[i]=Math.round((0,O.Z)(t[i],0,255));return t[3]=(0,O.Z)(t[3],0,1),"rgba(".concat(t.join(","),")")}]}function Cy(r,n){if((0,xe.Z)(n))return wo(0,"px");if(n="".concat(n).trim().toLowerCase(),isFinite(Number(n))){if("px".search(r)>=0)return wo(Number(n),"px");if("deg".search(r)>=0)return wo(Number(n),"deg")}var e=[];n=n.replace(r,function(i){return e.push(i),"U".concat(i)});var t="U(".concat(r.source,")");return e.map(function(i){return wo(Number(n.replace(new RegExp("U".concat(i),"g"),"").replace(new RegExp(t,"g"),"*0")),i)})[0]}var _D=function(n){return Cy(new RegExp("px","g"),n)},Lq=fc(_D),Iq=function(n){return Cy(new RegExp("%","g"),n)};fc(Iq);var mD=function(n){return(0,pe.Z)(n)||isFinite(Number(n))?wo(Number(n)||0,"px"):Cy(new RegExp("px|%|em|rem","g"),n)},zT=fc(mD),pD=function(n){return Cy(new RegExp("deg|rad|grad|turn","g"),n)},Dq=fc(pD);function Fq(r,n,e,t){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a="",s=r.value||0,o=n.value||0,l=BT(r.unit),u=r.convertTo(l),c=n.convertTo(l);return u&&c?(s=u.value,o=c.value,a=FT(r.unit)):(hs.isLength(r.unit)||hs.isLength(n.unit))&&(s=kd(r,i,e),o=kd(n,i,e),a="px"),[s,o,function(d){return t&&(d=Math.max(d,0)),d+a}]}function Uc(r){var n=0;return r.unit===Xn.kDegrees?n=r.value:r.unit===Xn.kRadians?n=nh(Number(r.value)):r.unit===Xn.kTurns?n=XQ(Number(r.value)):r.value&&(n=r.value),n}function yD(r,n){var e;return Array.isArray(r)?e=r.map(function(t){return Number(t)}):(0,Ze.Z)(r)?e=r.split(" ").map(function(t){return Number(t)}):(0,pe.Z)(r)&&(e=[r]),n===2?e.length===1?[e[0],e[0]]:[e[0],e[1]]:e.length===1?[e[0],e[0],e[0],e[0]]:e.length===2?[e[0],e[1],e[0],e[1]]:e.length===3?[e[0],e[1],e[2],e[1]]:[e[0],e[1],e[2],e[3]]}function kd(r,n,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(r.unit===Xn.kPixels)return Number(r.value);if(r.unit===Xn.kPercentage&&e){var i=e.nodeName===on.GROUP?e.getLocalBounds():e.getGeometryBounds();return(t?i.min[n]:0)+r.value/100*i.halfExtents[n]*2}return 0}var Bq=function(n){return Cy(/deg|rad|grad|turn|px|%/g,n)},$q=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function Gq(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(r=r.toLowerCase().trim(),r==="none")return[];for(var n=/\s*([\w-]+)\(([^)]*)\)/g,e=[],t,i=0;t=n.exec(r);){if(t.index!==i)return[];if(i=t.index+t[0].length,$q.indexOf(t[1])>-1&&e.push({name:t[1],params:t[2].split(" ").map(function(a){return Bq(a)||Ty(a)})}),n.lastIndex===r.length)return e}return[]}function xD(r){return r.toString()}var ED=function(n){return typeof n=="number"?wo(n):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(n)?wo(Number(n)):wo(0)},VT=fc(ED);fc(function(r){return(0,Ze.Z)(r)?r.split(" ").map(VT):r.map(VT)});function UT(r,n){return[r,n,xD]}function jT(r,n){return function(e,t){return[e,t,function(i){return xD((0,O.Z)(i,r,n))}]}}function bD(r,n){if(r.length===n.length)return[r,n,function(e){return e}]}function HT(r){return r.parsedStyle.d.totalLength===0&&(r.parsedStyle.d.totalLength=(0,Um.D)(r.parsedStyle.d.absolutePath)),r.parsedStyle.d.totalLength}function zq(r){return r.parsedStyle.points.totalLength===0&&(r.parsedStyle.points.totalLength=(0,Nt.hE)(r.parsedStyle.points.points)),r.parsedStyle.points.totalLength}function Vq(r){for(var n=0;n<r.length;n++){var e=r[n-1],t=r[n],i=t[0];if(i==="M"&&e){var a=e[0],s=[t[1],t[2]],o=void 0;a==="L"||a==="M"?o=[e[1],e[2]]:(a==="C"||a==="A"||a==="Q")&&(o=[e[e.length-2],e[e.length-1]]),o&&jE(s,o)&&(r.splice(n,1),n--)}}}function Uq(r){for(var n=!1,e=r.length,t=0;t<e;t++){var i=r[t],a=i[0];if(a==="C"||a==="A"||a==="Q"){n=!0;break}}return n}function jq(r){for(var n=[],e=[],t=[],i=0;i<r.length;i++){var a=r[i],s=a[0];s==="M"?(t.length&&(e.push(t),t=[]),t.push([a[1],a[2]])):s==="Z"?t.length&&(n.push(t),t=[]):t.push([a[1],a[2]])}return t.length>0&&e.push(t),{polygons:n,polylines:e}}function jE(r,n){return r[0]===n[0]&&r[1]===n[1]}function Hq(r,n){for(var e=[],t=[],i=[],a=0;a<r.length;a++){var s=r[a],o=s.currentPoint,l=s.params,u=s.prePoint,c=void 0;switch(s.command){case"Q":c=(0,Nt.x4)(u[0],u[1],l[1],l[2],l[3],l[4]);break;case"C":c=(0,Nt.l5)(u[0],u[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var d=s.arcParams;c=(0,Nt.vp)(d.cx,d.cy,d.rx,d.ry,d.xRotation,d.startAngle,d.endAngle);break;default:e.push(o[0]),t.push(o[1]);break}c&&(s.box=c,e.push(c.x,c.x+c.width),t.push(c.y,c.y+c.height)),n&&(s.command==="L"||s.command==="M")&&s.prePoint&&s.nextPoint&&i.push(s)}e=e.filter(function(G){return!Number.isNaN(G)&&G!==1/0&&G!==-1/0}),t=t.filter(function(G){return!Number.isNaN(G)&&G!==1/0&&G!==-1/0});var h=(0,ne.Z)(e),f=(0,ne.Z)(t),v=(0,qe.Z)(e),g=(0,qe.Z)(t);if(i.length===0)return{x:h,y:f,width:v-h,height:g-f};for(var m=0;m<i.length;m++){var y=i[m],w=y.currentPoint,T=void 0;w[0]===h?(T=HE(y,n),h-=T.xExtra):w[0]===v&&(T=HE(y,n),v+=T.xExtra),w[1]===f?(T=HE(y,n),f-=T.yExtra):w[1]===g&&(T=HE(y,n),g+=T.yExtra)}return{x:h,y:f,width:v-h,height:g-f}}function HE(r,n){var e=r.prePoint,t=r.currentPoint,i=r.nextPoint,a=Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2),s=Math.pow(t[0]-i[0],2)+Math.pow(t[1]-i[1],2),o=Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2),l=Math.acos((a+s-o)/(2*Math.sqrt(a)*Math.sqrt(s)));if(!l||Math.sin(l)===0||(0,dt.Z)(l,0))return{xExtra:0,yExtra:0};var u=Math.abs(Math.atan2(i[1]-t[1],i[0]-t[0])),c=Math.abs(Math.atan2(i[0]-t[0],i[1]-t[1]));u=u>Math.PI/2?Math.PI-u:u,c=c>Math.PI/2?Math.PI-c:c;var d={xExtra:Math.cos(l/2-u)*(n/2*(1/Math.sin(l/2)))-n/2||0,yExtra:Math.cos(c-l/2)*(n/2*(1/Math.sin(l/2)))-n/2||0};return d}function kD(r,n){return[n[0]+(n[0]-r[0]),n[1]+(n[1]-r[1])]}var wD=function(n,e){var t=n.x*e.x+n.y*e.y,i=Math.sqrt((Math.pow(n.x,2)+Math.pow(n.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2))),a=n.x*e.y-n.y*e.x<0?-1:1,s=a*Math.acos(t/i);return s},SD=function(n,e,t,i,a,s,o,l){e=Math.abs(e),t=Math.abs(t),i=(0,nt.Z)(i,360);var u=Hs(i);if(n.x===o.x&&n.y===o.y)return{x:n.x,y:n.y,ellipticalArcAngle:0};if(e===0||t===0)return{x:0,y:0,ellipticalArcAngle:0};var c=(n.x-o.x)/2,d=(n.y-o.y)/2,h={x:Math.cos(u)*c+Math.sin(u)*d,y:-Math.sin(u)*c+Math.cos(u)*d},f=Math.pow(h.x,2)/Math.pow(e,2)+Math.pow(h.y,2)/Math.pow(t,2);f>1&&(e*=Math.sqrt(f),t*=Math.sqrt(f));var v=Math.pow(e,2)*Math.pow(t,2)-Math.pow(e,2)*Math.pow(h.y,2)-Math.pow(t,2)*Math.pow(h.x,2),g=Math.pow(e,2)*Math.pow(h.y,2)+Math.pow(t,2)*Math.pow(h.x,2),m=v/g;m=m<0?0:m;var y=(a!==s?1:-1)*Math.sqrt(m),w={x:y*(e*h.y/t),y:y*(-(t*h.x)/e)},T={x:Math.cos(u)*w.x-Math.sin(u)*w.y+(n.x+o.x)/2,y:Math.sin(u)*w.x+Math.cos(u)*w.y+(n.y+o.y)/2},G={x:(h.x-w.x)/e,y:(h.y-w.y)/t},x=wD({x:1,y:0},G),_={x:(-h.x-w.x)/e,y:(-h.y-w.y)/t},p=wD(G,_);!s&&p>0?p-=2*Math.PI:s&&p<0&&(p+=2*Math.PI),p%=2*Math.PI;var b=x+p*l,R=e*Math.cos(b),B=t*Math.sin(b),j={x:Math.cos(u)*R-Math.sin(u)*B+T.x,y:Math.sin(u)*R+Math.cos(u)*B+T.y,ellipticalArcStartAngle:x,ellipticalArcEndAngle:x+p,ellipticalArcAngle:b,ellipticalArcCenter:T,resultantRx:e,resultantRy:t};return j};function Wq(r){for(var n=[],e=null,t=null,i=null,a=0,s=r.length,o=0;o<s;o++){var l=r[o];t=r[o+1];var u=l[0],c={command:u,prePoint:e,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(u){case"M":i=[l[1],l[2]],a=o;break;case"A":var d=Yq(e,l);c.arcParams=d;break}if(u==="Z")e=i,t=r[a+1];else{var h=l.length;e=[l[h-2],l[h-1]]}t&&t[0]==="Z"&&(t=r[a],n[a]&&(n[a].prePoint=e)),c.currentPoint=e,n[a]&&jE(e,n[a].currentPoint)&&(n[a].prePoint=c.prePoint);var f=t?[t[t.length-2],t[t.length-1]]:null;c.nextPoint=f;var v=c.prePoint;if(["L","H","V"].includes(u))c.startTangent=[v[0]-e[0],v[1]-e[1]],c.endTangent=[e[0]-v[0],e[1]-v[1]];else if(u==="Q"){var g=[l[1],l[2]];c.startTangent=[v[0]-g[0],v[1]-g[1]],c.endTangent=[e[0]-g[0],e[1]-g[1]]}else if(u==="T"){var m=n[o-1],y=kD(m.currentPoint,v);m.command==="Q"?(c.command="Q",c.startTangent=[v[0]-y[0],v[1]-y[1]],c.endTangent=[e[0]-y[0],e[1]-y[1]]):(c.command="TL",c.startTangent=[v[0]-e[0],v[1]-e[1]],c.endTangent=[e[0]-v[0],e[1]-v[1]])}else if(u==="C"){var w=[l[1],l[2]],T=[l[3],l[4]];c.startTangent=[v[0]-w[0],v[1]-w[1]],c.endTangent=[e[0]-T[0],e[1]-T[1]],c.startTangent[0]===0&&c.startTangent[1]===0&&(c.startTangent=[w[0]-T[0],w[1]-T[1]]),c.endTangent[0]===0&&c.endTangent[1]===0&&(c.endTangent=[T[0]-w[0],T[1]-w[1]])}else if(u==="S"){var G=n[o-1],x=kD(G.currentPoint,v),_=[l[1],l[2]];G.command==="C"?(c.command="C",c.startTangent=[v[0]-x[0],v[1]-x[1]],c.endTangent=[e[0]-_[0],e[1]-_[1]]):(c.command="SQ",c.startTangent=[v[0]-_[0],v[1]-_[1]],c.endTangent=[e[0]-_[0],e[1]-_[1]])}else if(u==="A"){var p=TD(c,0),b=p.x,R=p.y,B=TD(c,1,!1),j=B.x,Z=B.y;c.startTangent=[b,R],c.endTangent=[j,Z]}n.push(c)}return n}function TD(r,n){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,t=r.arcParams,i=t.rx,a=i===void 0?0:i,s=t.ry,o=s===void 0?0:s,l=t.xRotation,u=t.arcFlag,c=t.sweepFlag,d=SD({x:r.prePoint[0],y:r.prePoint[1]},a,o,l,!!u,!!c,{x:r.currentPoint[0],y:r.currentPoint[1]},n),h=SD({x:r.prePoint[0],y:r.prePoint[1]},a,o,l,!!u,!!c,{x:r.currentPoint[0],y:r.currentPoint[1]},e?n+.005:n-.005),f=h.x-d.x,v=h.y-d.y,g=Math.sqrt(f*f+v*v);return{x:-f/g,y:-v/g}}function WE(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function WT(r,n){return WE(r)*WE(n)?(r[0]*n[0]+r[1]*n[1])/(WE(r)*WE(n)):1}function CD(r,n){return(r[0]*n[1]<r[1]*n[0]?-1:1)*Math.acos(WT(r,n))}function Yq(r,n){var e=n[1],t=n[2],i=(0,nt.Z)(Hs(n[3]),Math.PI*2),a=n[4],s=n[5],o=r[0],l=r[1],u=n[6],c=n[7],d=Math.cos(i)*(o-u)/2+Math.sin(i)*(l-c)/2,h=-1*Math.sin(i)*(o-u)/2+Math.cos(i)*(l-c)/2,f=d*d/(e*e)+h*h/(t*t);f>1&&(e*=Math.sqrt(f),t*=Math.sqrt(f));var v=e*e*(h*h)+t*t*(d*d),g=v?Math.sqrt((e*e*(t*t)-v)/v):1;a===s&&(g*=-1),isNaN(g)&&(g=0);var m=t?g*e*h/t:0,y=e?g*-t*d/e:0,w=(o+u)/2+Math.cos(i)*m-Math.sin(i)*y,T=(l+c)/2+Math.sin(i)*m+Math.cos(i)*y,G=[(d-m)/e,(h-y)/t],x=[(-1*d-m)/e,(-1*h-y)/t],_=CD([1,0],G),p=CD(G,x);return WT(G,x)<=-1&&(p=Math.PI),WT(G,x)>=1&&(p=0),s===0&&p>0&&(p-=2*Math.PI),s===1&&p<0&&(p+=2*Math.PI),{cx:w,cy:T,rx:jE(r,[u,c])?0:e,ry:jE(r,[u,c])?0:t,startAngle:_,endAngle:_+p,xRotation:i,arcFlag:a,sweepFlag:s}}function Zq(r,n,e){return r.reduce(function(t,i){var a="";if(i[0]==="M"||i[0]==="L"){var s=vec3.fromValues(i[1],i[2],0);e&&vec3.transformMat4(s,s,e),a="".concat(i[0]).concat(s[0],",").concat(s[1])}else if(i[0]==="Z")a=i[0];else if(i[0]==="C"){var o=vec3.fromValues(i[1],i[2],0),l=vec3.fromValues(i[3],i[4],0),u=vec3.fromValues(i[5],i[6],0);e&&(vec3.transformMat4(o,o,e),vec3.transformMat4(l,l,e),vec3.transformMat4(u,u,e)),a="".concat(i[0]).concat(o[0],",").concat(o[1],",").concat(l[0],",").concat(l[1],",").concat(u[0],",").concat(u[1])}else if(i[0]==="A"){var c=vec3.fromValues(i[6],i[7],0);e&&vec3.transformMat4(c,c,e),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],",").concat(i[5],",").concat(c[0],",").concat(c[1])}else if(i[0]==="Q"){var d=vec3.fromValues(i[1],i[2],0),h=vec3.fromValues(i[3],i[4],0);e&&(vec3.transformMat4(d,d,e),vec3.transformMat4(h,h,e)),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],"}")}return t+=a},"")}function Xq(r,n,e,t){return[["M",r,n],["L",e,t]]}function MD(r,n,e,t){var i=(-1+Math.sqrt(2))/3*4,a=r*i,s=n*i,o=e-r,l=e+r,u=t-n,c=t+n;return[["M",o,t],["C",o,t-s,e-a,u,e,u],["C",e+a,u,l,t-s,l,t],["C",l,t+s,e+a,c,e,c],["C",e-a,c,o,t+s,o,t],["Z"]]}function Kq(r,n){var e=r.map(function(t,i){return[i===0?"M":"L",t[0],t[1]]});return n&&e.push(["Z"]),e}function Jq(r,n,e,t,i){if(i){var a=_slicedToArray(i,4),s=a[0],o=a[1],l=a[2],u=a[3],c=r>0?1:-1,d=n>0?1:-1,h=c+d!==0?1:0;return[["M",c*s+e,t],["L",r-c*o+e,t],o?["A",o,o,0,0,h,r+e,d*o+t]:null,["L",r+e,n-d*l+t],l?["A",l,l,0,0,h,r+e-c*l,n+t]:null,["L",e+c*u,n+t],u?["A",u,u,0,0,h,e,n+t-d*u]:null,["L",e,d*s+t],s?["A",s,s,0,0,h,c*s+e,t]:null,["Z"]].filter(function(f){return f})}return[["M",e,t],["L",e+r,t],["L",e+r,t+n],["L",e,t+n],["Z"]]}function HPe(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r.getLocalTransform(),e=[];switch(r.nodeName){case on.LINE:var t=r.parsedStyle,i=t.x1,a=i===void 0?0:i,s=t.y1,o=s===void 0?0:s,l=t.x2,u=l===void 0?0:l,c=t.y2,d=c===void 0?0:c;e=Xq(a,o,u,d);break;case on.CIRCLE:{var h=r.parsedStyle,f=h.r,v=f===void 0?0:f,g=h.cx,m=g===void 0?0:g,y=h.cy,w=y===void 0?0:y;e=MD(v,v,m,w);break}case on.ELLIPSE:{var T=r.parsedStyle,G=T.rx,x=G===void 0?0:G,_=T.ry,p=_===void 0?0:_,b=T.cx,R=b===void 0?0:b,B=T.cy,j=B===void 0?0:B;e=MD(x,p,R,j);break}case on.POLYLINE:case on.POLYGON:var Z=r.parsedStyle.points;e=Kq(Z.points,r.nodeName===on.POLYGON);break;case on.RECT:var te=r.parsedStyle,le=te.width,ue=le===void 0?0:le,se=te.height,V=se===void 0?0:se,ee=te.x,he=ee===void 0?0:ee,ut=te.y,ct=ut===void 0?0:ut,Lt=te.radius,vn=Lt&&Lt.some(function(rn){return rn!==0});e=Jq(ue,V,he,ct,vn&&Lt.map(function(rn){return clamp(rn,0,Math.min(Math.abs(ue)/2,Math.abs(V)/2))}));break;case on.PATH:var tn=r.parsedStyle.d.absolutePath;e=_toConsumableArray(tn);break}if(e.length)return Zq(e,r,n)}function WPe(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a=r.map(function(s,o){var l=s[0],u=r[o+1],c=o===0&&(n!==0||e!==0),d=(o===r.length-1||u&&(u[0]==="M"||u[0]==="Z"))&&t!==0&&i!==0,h=c?[n,e]:[0,0],f=_slicedToArray(h,2),v=f[0],g=f[1],m=d?[t,i]:[0,0],y=_slicedToArray(m,2),w=y[0],T=y[1];switch(l){case"M":return"M ".concat(s[1]+v,",").concat(s[2]+g);case"L":return"L ".concat(s[1]+w,",").concat(s[2]+T);case"Q":return"Q ".concat(s[1]," ").concat(s[2],",").concat(s[3]+w," ").concat(s[4]+T);case"C":return"C ".concat(s[1]," ").concat(s[2],",").concat(s[3]," ").concat(s[4],",").concat(s[5]+w," ").concat(s[6]+T);case"A":return"A ".concat(s[1]," ").concat(s[2]," ").concat(s[3]," ").concat(s[4]," ").concat(s[5]," ").concat(s[6]+w," ").concat(s[7]+T);case"Z":return"Z";default:return null}}).filter(function(s){return s!==null}).join(" ");return~a.indexOf("NaN")?"":a}var PD=function(n){if(n===""||Array.isArray(n)&&n.length===0)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var e;try{e=(0,xt.A)(n)}catch(f){e=(0,xt.A)(""),console.error("[g]: Invalid SVG Path definition: ".concat(n))}Vq(e);var t=Uq(e),i=jq(e),a=i.polygons,s=i.polylines,o=Wq(e),l=Hq(o,0),u=l.x,c=l.y,d=l.width,h=l.height;return{absolutePath:e,hasArc:t,segments:o,polygons:a,polylines:s,totalLength:0,rect:{x:Number.isFinite(u)?u:0,y:Number.isFinite(c)?c:0,width:Number.isFinite(d)?d:0,height:Number.isFinite(h)?h:0}}},Qq=fc(PD);function ND(r){return(0,Ze.Z)(r)?Qq(r):PD(r)}function qq(r,n,e){var t=r.curve,i=n.curve;(!t||t.length===0)&&(t=(0,bt.Y)(r.absolutePath,!1),r.curve=t),(!i||i.length===0)&&(i=(0,bt.Y)(n.absolutePath,!1),n.curve=i);var a=[t,i];t.length!==i.length&&(a=(0,wt.x)(t,i));var s=(0,we.b)(a[0])!==(0,we.b)(a[1])?(0,oe.G)(a[0]):(0,Fe.U)(a[0]);return[s,(0,Ye.g)(a[1],s),function(o){return o}]}function eee(r,n){var e;return(0,Ze.Z)(r)?e=r.split(" ").map(function(t){var i=t.split(","),a=aa(i,2),s=a[0],o=a[1];return[Number(s),Number(o)]}):e=r,{points:e,totalLength:0,segments:[]}}function tee(r,n){return[r.points,n.points,function(e){return e}]}var Zo=null,Ep=/\s*(\w+)\(([^)]*)\)/g;function jc(r){return function(n){var e=0;return r.map(function(t){return t===Zo?n[e++]:t})}}function F_(r){return r}var My={matrix:["NNNNNN",[Zo,Zo,0,0,Zo,Zo,0,0,0,0,1,0,Zo,Zo,0,1],F_],matrix3d:["NNNNNNNNNNNNNNNN",F_],rotate:["A"],rotateX:["A"],rotateY:["A"],rotateZ:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",jc([Zo,Zo,new hs(1)]),F_],scaleX:["N",jc([Zo,new hs(1),new hs(1)]),jc([Zo,new hs(1)])],scaleY:["N",jc([new hs(1),Zo,new hs(1)]),jc([new hs(1),Zo])],scaleZ:["N",jc([new hs(1),new hs(1),Zo])],scale3d:["NNN",F_],skew:["Aa",null,F_],skewX:["A",null,jc([Zo,D_])],skewY:["A",null,jc([D_,Zo])],translate:["Tt",jc([Zo,Zo,tf]),F_],translateX:["T",jc([Zo,tf,tf]),jc([Zo,tf])],translateY:["T",jc([tf,Zo,tf]),jc([tf,Zo])],translateZ:["L",jc([tf,tf,Zo])],translate3d:["TTL",F_]};function OD(r){for(var n=[],e=r.length,t=0;t<e;t++){var i=r[t],a=i[0],s=i.slice(1);a==="translate"||a==="skew"?s.length===1&&s.push(0):a==="scale"&&s.length===1&&s.push(s[0]);var o=My[a];if(!o)return[];var l=s.map(function(u){return wo(u)});n.push({t:a,d:l})}return n}function RD(r){if(Array.isArray(r))return OD(r);if(r=(r||"none").trim(),r==="none")return[];var n=[],e,t=0;for(Ep.lastIndex=0;e=Ep.exec(r);){if(e.index!==t)return[];t=e.index+e[0].length;var i=e[1],a=My[i];if(!a)return[];var s=e[2].split(","),o=a[0];if(o.length<s.length)return[];for(var l=[],u=0;u<o.length;u++){var c=s[u],d=o[u],h=void 0;if(c?h={A:function(v){return v.trim()==="0"?D_:Dq(v)},N:VT,T:zT,L:Lq}[d.toUpperCase()](c):h={a:D_,n:l[0],t:tf}[d],h===void 0)return[];l.push(h)}if(n.push({t:i,d:l}),Ep.lastIndex===r.length)return n}return[]}function nee(r){if(Array.isArray(r))return OD(r);if(r=(r||"none").trim(),r==="none")return[];var n=[],e,t=0;for(Ep.lastIndex=0;e=Ep.exec(r);){if(e.index!==t)return[];t=e.index+e[0].length;var i=e[1],a=My[i];if(!a)return[];var s=e[2].split(","),o=a[0];if(o.length<s.length)return[];for(var l=[],u=0;u<o.length;u++){var c=s[u],d=o[u],h=void 0;if(c?h={A:function(v){return v.trim()==="0"?D_:pD(v)},N:ED,T:mD,L:_D}[d.toUpperCase()](c):h={a:D_,n:l[0],t:tf}[d],h===void 0)return[];l.push(h)}if(n.push({t:i,d:l}),Ep.lastIndex===r.length)return n}return[]}function ree(r){var n,e,t,i;switch(r.t){case"rotateX":return i=Hs(Uc(r.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotateY":return i=Hs(Uc(r.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotateZ":return i=Hs(Uc(r.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":n=r.d[0].value,e=r.d[1].value,t=r.d[2].value,i=Hs(Uc(r.d[3]));var a=n*n+e*e+t*t;if(a===0)n=1,e=0,t=0;else if(a!==1){var s=Math.sqrt(a);n/=s,e/=s,t/=s}var o=Math.sin(i/2),l=o*Math.cos(i/2),u=o*o;return[1-2*(e*e+t*t)*u,2*(n*e*u+t*l),2*(n*t*u-e*l),0,2*(n*e*u-t*l),1-2*(n*n+t*t)*u,2*(e*t*u+n*l),0,2*(n*t*u+e*l),2*(e*t*u-n*l),1-2*(n*n+e*e)*u,0,0,0,0,1];case"scale":return[r.d[0].value,0,0,0,0,r.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scaleX":return[r.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaleY":return[1,0,0,0,0,r.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scaleZ":return[1,0,0,0,0,1,0,0,0,0,r.d[0].value,0,0,0,0,1];case"scale3d":return[r.d[0].value,0,0,0,0,r.d[1].value,0,0,0,0,r.d[2].value,0,0,0,0,1];case"skew":var c=Hs(Uc(r.d[0])),d=Hs(Uc(r.d[1]));return[1,Math.tan(d),0,0,Math.tan(c),1,0,0,0,0,1,0,0,0,0,1];case"skewX":return i=Hs(Uc(r.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewY":return i=Hs(Uc(r.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return n=kd(r.d[0],0,null)||0,e=kd(r.d[1],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,e,0,1];case"translateX":return n=kd(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,0,0,1];case"translateY":return e=kd(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,e,0,1];case"translateZ":return t=kd(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,t,1];case"translate3d":return n=kd(r.d[0],0,null)||0,e=kd(r.d[1],0,null)||0,t=kd(r.d[2],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,e,t,1];case"perspective":var h=kd(r.d[0],0,null)||0,f=h?-1/h:0;return[1,0,0,0,0,1,0,0,0,0,1,f,0,0,0,1];case"matrix":return[r.d[0].value,r.d[1].value,0,0,r.d[2].value,r.d[3].value,0,0,0,0,1,0,r.d[4].value,r.d[5].value,0,1];case"matrix3d":return r.d.map(function(v){return v.value})}}function iee(r,n){return[r[0]*n[0]+r[4]*n[1]+r[8]*n[2]+r[12]*n[3],r[1]*n[0]+r[5]*n[1]+r[9]*n[2]+r[13]*n[3],r[2]*n[0]+r[6]*n[1]+r[10]*n[2]+r[14]*n[3],r[3]*n[0]+r[7]*n[1]+r[11]*n[2]+r[15]*n[3],r[0]*n[4]+r[4]*n[5]+r[8]*n[6]+r[12]*n[7],r[1]*n[4]+r[5]*n[5]+r[9]*n[6]+r[13]*n[7],r[2]*n[4]+r[6]*n[5]+r[10]*n[6]+r[14]*n[7],r[3]*n[4]+r[7]*n[5]+r[11]*n[6]+r[15]*n[7],r[0]*n[8]+r[4]*n[9]+r[8]*n[10]+r[12]*n[11],r[1]*n[8]+r[5]*n[9]+r[9]*n[10]+r[13]*n[11],r[2]*n[8]+r[6]*n[9]+r[10]*n[10]+r[14]*n[11],r[3]*n[8]+r[7]*n[9]+r[11]*n[10]+r[15]*n[11],r[0]*n[12]+r[4]*n[13]+r[8]*n[14]+r[12]*n[15],r[1]*n[12]+r[5]*n[13]+r[9]*n[14]+r[13]*n[15],r[2]*n[12]+r[6]*n[13]+r[10]*n[14]+r[14]*n[15],r[3]*n[12]+r[7]*n[13]+r[11]*n[14]+r[15]*n[15]]}function aee(r){return r.length===0?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:r.map(ree).reduce(iee)}function AD(r){var n=[0,0,0],e=[1,1,1],t=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return eq(aee(r),n,e,t,i,a),[[n,e,t,a,i]]}var see=function(){function r(t,i){for(var a=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],s=0;s<4;s++)for(var o=0;o<4;o++)for(var l=0;l<4;l++)a[s][o]+=i[s][l]*t[l][o];return a}function n(t){return t[0][2]===0&&t[0][3]===0&&t[1][2]===0&&t[1][3]===0&&t[2][0]===0&&t[2][1]===0&&t[2][2]===1&&t[2][3]===0&&t[3][2]===0&&t[3][3]===1}function e(t,i,a,s,o){for(var l=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],u=0;u<4;u++)l[u][3]=o[u];for(var c=0;c<3;c++)for(var d=0;d<3;d++)l[3][c]+=t[d]*l[d][c];var h=s[0],f=s[1],v=s[2],g=s[3],m=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];m[0][0]=1-2*(f*f+v*v),m[0][1]=2*(h*f-v*g),m[0][2]=2*(h*v+f*g),m[1][0]=2*(h*f+v*g),m[1][1]=1-2*(h*h+v*v),m[1][2]=2*(f*v-h*g),m[2][0]=2*(h*v-f*g),m[2][1]=2*(f*v+h*g),m[2][2]=1-2*(h*h+f*f),l=r(l,m);var y=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];a[2]&&(y[2][1]=a[2],l=r(l,y)),a[1]&&(y[2][1]=0,y[2][0]=a[0],l=r(l,y)),a[0]&&(y[2][0]=0,y[1][0]=a[0],l=r(l,y));for(var w=0;w<3;w++)for(var T=0;T<3;T++)l[w][T]*=i[w];return n(l)?[l[0][0],l[0][1],l[1][0],l[1][1],l[3][0],l[3][1]]:l[0].concat(l[1],l[2],l[3])}return e}();function oee(r){return r.toFixed(6).replace(".000000","")}function YT(r,n){var e,t;return r.decompositionPair!==n&&(r.decompositionPair=n,e=AD(r)),n.decompositionPair!==r&&(n.decompositionPair=r,t=AD(n)),e[0]===null||t[0]===null?[[!1],[!0],function(i){return i?n[0].d:r[0].d}]:(e[0].push(0),t[0].push(1),[e,t,function(i){var a=uee(e[0][3],t[0][3],i[5]),s=see(i[0],i[1],i[2],a,i[4]),o=s.map(oee).join(",");return o}])}function lee(r,n){for(var e=0,t=0;t<r.length;t++)e+=r[t]*n[t];return e}function uee(r,n,e){var t=lee(r,n);t=(0,O.Z)(t,-1,1);var i=[];if(t===1)i=r;else for(var a=Math.acos(t),s=Math.sin(e*a)*1/Math.sqrt(1-t*t),o=0;o<4;o++)i.push(r[o]*(Math.cos(e*a)-t*s)+n[o]*s);return i}function ZT(r){return r.replace(/[XY]/,"")}function XT(r){return r.replace(/(X|Y|Z|3d)?$/,"3d")}var cee=function(n,e){return n==="perspective"&&e==="perspective"||(n==="matrix"||n==="matrix3d")&&(e==="matrix"||e==="matrix3d")};function dee(r,n,e){var t=!1;if(!r.length||!n.length){r.length||(t=!0,r=n,n=[]);for(var i=function(){var j=r[a],Z=j.t,te=j.d,le=Z.substring(0,5)==="scale"?1:0;n.push({t:Z,d:te.map(function(ue){return typeof ue=="number"?wo(le):wo(le,ue.unit)})})},a=0;a<r.length;a++)i()}var s=[],o=[],l=[];if(r.length!==n.length){var u=YT(r,n);s=[u[0]],o=[u[1]],l=[["matrix",[u[2]]]]}else for(var c=0;c<r.length;c++){var d=r[c].t,h=n[c].t,f=r[c].d,v=n[c].d,g=My[d],m=My[h],y=void 0;if(cee(d,h)){var w=YT([r[c]],[n[c]]);s.push(w[0]),o.push(w[1]),l.push(["matrix",[w[2]]]);continue}else if(d===h)y=d;else if(g[2]&&m[2]&&ZT(d)===ZT(h))y=ZT(d),f=g[2](f),v=m[2](v);else if(g[1]&&m[1]&&XT(d)===XT(h))y=XT(d),f=g[1](f),v=m[1](v);else{var T=YT(r,n);s=[T[0]],o=[T[1]],l=[["matrix",[T[2]]]];break}for(var G=[],x=[],_=[],p=0;p<f.length;p++){var b=Fq(f[p],v[p],e,!1,p);G[p]=b[0],x[p]=b[1],_.push(b[2])}s.push(G),o.push(x),l.push([y,_])}if(t){var R=s;s=o,o=R}return[s,o,function(B){return B.map(function(j,Z){var te=j.map(function(le,ue){return l[Z][1][ue](le)}).join(",");return l[Z][0]==="matrix"&&te.split(",").length===16&&(l[Z][0]="matrix3d"),l[Z][0]==="matrix3d"&&te.split(",").length===6&&(l[Z][0]="matrix"),"".concat(l[Z][0],"(").concat(te,")")}).join(" ")}]}var hee=fc(function(r){if((0,Ze.Z)(r)){if(r==="text-anchor")return[wo(0,"px"),wo(0,"px")];var n=r.split(" ");return n.length===1&&(n[0]==="top"||n[0]==="bottom"?(n[1]=n[0],n[0]="center"):n[1]="center"),n.length!==2?null:[zT(LD(n[0])),zT(LD(n[1]))]}return[wo(r[0]||0,"px"),wo(r[1]||0,"px")]});function LD(r){return r==="center"?"50%":r==="left"||r==="top"?"0%":r==="right"||r==="bottom"?"100%":r}var ID=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:jn.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:jn.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:jn.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:jn.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:jn.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:jn.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:jn.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:jn.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:jn.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:jn.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:jn.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:jn.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:jn.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:jn.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:jn.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:jn.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:jn.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:jn.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:jn.FILTER},{n:"clipPath",syntax:jn.DEFINED_PATH},{n:"textPath",syntax:jn.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:jn.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:jn.TRANSFORM},{n:"transformOrigin",p:100,d:"0 0",l:!0,syntax:jn.TRANSFORM_ORIGIN},{n:"cx",int:!0,l:!0,d:"0",syntax:jn.COORDINATE},{n:"cy",int:!0,l:!0,d:"0",syntax:jn.COORDINATE},{n:"cz",int:!0,l:!0,d:"0",syntax:jn.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:jn.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:jn.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:jn.LENGTH_PERCENTAGE},{n:"x",int:!0,l:!0,d:"0",syntax:jn.COORDINATE},{n:"y",int:!0,l:!0,d:"0",syntax:jn.COORDINATE},{n:"z",int:!0,l:!0,d:"0",syntax:jn.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:jn.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:jn.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:jn.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:jn.COORDINATE},{n:"y1",int:!0,l:!0,syntax:jn.COORDINATE},{n:"z1",int:!0,l:!0,syntax:jn.COORDINATE},{n:"x2",int:!0,l:!0,syntax:jn.COORDINATE},{n:"y2",int:!0,l:!0,syntax:jn.COORDINATE},{n:"z2",int:!0,l:!0,syntax:jn.COORDINATE},{n:"d",int:!0,l:!0,d:"",syntax:jn.PATH,p:50},{n:"points",int:!0,l:!0,syntax:jn.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:jn.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:jn.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:jn.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:jn.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:jn.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:jn.NUMBER,d:function(n){return n===on.PATH||n===on.POLYGON||n===on.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:jn.MARKER},{n:"markerEnd",syntax:jn.MARKER},{n:"markerMid",syntax:jn.MARKER},{n:"markerStartOffset",syntax:jn.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:jn.LENGTH,l:!0,int:!0,d:"0"}],fee=new Set(ID.filter(function(r){return!!r.l}).map(function(r){return r.n})),vee={},gee=function(){function r(n){var e=this;Un(this,r),this.runtime=n,ID.forEach(function(t){e.registerMetadata(t)})}return Vn(r,[{key:"registerMetadata",value:function(e){[e.n].concat(vl(e.a||[])).forEach(function(t){vee[t]=e})}},{key:"getPropertySyntax",value:function(e){return this.runtime.CSSPropertySyntaxFactory[e]}},{key:"processProperties",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0};Object.assign(e.attributes,t);var a=e.parsedStyle.clipPath,s=e.parsedStyle.offsetPath;_ee(e,t);var o=!!i.forceUpdateGeometry;if(!o){for(var l in t)if(fee.has(l)){o=!0;break}}var u=DD(e);u.has("fill")&&t.fill&&(e.parsedStyle.fill=Ty(t.fill)),u.has("stroke")&&t.stroke&&(e.parsedStyle.stroke=Ty(t.stroke)),u.has("shadowColor")&&t.shadowColor&&(e.parsedStyle.shadowColor=Ty(t.shadowColor)),u.has("filter")&&t.filter&&(e.parsedStyle.filter=Gq(t.filter)),u.has("radius")&&!(0,xe.Z)(t.radius)&&(e.parsedStyle.radius=yD(t.radius,4)),u.has("lineDash")&&!(0,xe.Z)(t.lineDash)&&(e.parsedStyle.lineDash=yD(t.lineDash,2)),u.has("points")&&t.points&&(e.parsedStyle.points=eee(t.points)),u.has("d")&&t.d===""&&(e.parsedStyle.d=Oa({},uD)),u.has("d")&&t.d&&(e.parsedStyle.d=ND(t.d)),u.has("textTransform")&&t.textTransform&&this.runtime.CSSPropertySyntaxFactory[jn.TEXT_TRANSFORM].calculator(null,null,{value:t.textTransform},e,null),u.has("clipPath")&&!(0,ie.Z)(t.clipPath)&&this.runtime.CSSPropertySyntaxFactory[jn.DEFINED_PATH].calculator("clipPath",a,t.clipPath,e,this.runtime),u.has("offsetPath")&&t.offsetPath&&this.runtime.CSSPropertySyntaxFactory[jn.DEFINED_PATH].calculator("offsetPath",s,t.offsetPath,e,this.runtime),u.has("transform")&&t.transform&&(e.parsedStyle.transform=RD(t.transform)),u.has("transformOrigin")&&t.transformOrigin&&(e.parsedStyle.transformOrigin=hee(t.transformOrigin)),u.has("markerStart")&&t.markerStart&&(e.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory[jn.MARKER].calculator(null,t.markerStart,t.markerStart,null,null)),u.has("markerEnd")&&t.markerEnd&&(e.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory[jn.MARKER].calculator(null,t.markerEnd,t.markerEnd,null,null)),u.has("markerMid")&&t.markerMid&&(e.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory[jn.MARKER].calculator("",t.markerMid,t.markerMid,null,null)),u.has("zIndex")&&!(0,xe.Z)(t.zIndex)&&this.runtime.CSSPropertySyntaxFactory[jn.Z_INDEX].postProcessor(e),u.has("offsetDistance")&&!(0,xe.Z)(t.offsetDistance)&&this.runtime.CSSPropertySyntaxFactory[jn.OFFSET_DISTANCE].postProcessor(e),u.has("transform")&&t.transform&&this.runtime.CSSPropertySyntaxFactory[jn.TRANSFORM].postProcessor(e),u.has("transformOrigin")&&t.transformOrigin&&this.runtime.CSSPropertySyntaxFactory[jn.TRANSFORM_ORIGIN].postProcessor(e),o&&(e.geometry.dirty=!0,e.renderable.boundsDirty=!0,e.renderable.renderBoundsDirty=!0,i.forceUpdateGeometry||this.runtime.sceneGraphService.dirtifyToRoot(e))}},{key:"updateGeometry",value:function(e){var t=e.nodeName,i=this.runtime.geometryUpdaterFactory[t];if(i){var a=e.geometry;a.contentBounds||(a.contentBounds=new au),a.renderBounds||(a.renderBounds=new au);var s=e.parsedStyle,o=i.update(s,e),l=o.cx,u=l===void 0?0:l,c=o.cy,d=c===void 0?0:c,h=o.cz,f=h===void 0?0:h,v=o.hwidth,g=v===void 0?0:v,m=o.hheight,y=m===void 0?0:m,w=o.hdepth,T=w===void 0?0:w,G=[Math.abs(g),Math.abs(y),T],x=s.stroke,_=s.lineWidth,p=_===void 0?1:_,b=s.increasedLineWidthForHitTesting,R=b===void 0?0:b,B=s.shadowType,j=B===void 0?"outer":B,Z=s.shadowColor,te=s.filter,le=te===void 0?[]:te,ue=s.transformOrigin,se=[u,d,f];a.contentBounds.update(se,G);var V=t===on.POLYLINE||t===on.POLYGON||t===on.PATH?Math.SQRT2:.5,ee=x&&!x.isNone;if(ee){var he=((p||0)+(R||0))*V;G[0]+=he,G[1]+=he}if(a.renderBounds.update(se,G),Z&&j&&j!=="inner"){var ut=a.renderBounds,ct=ut.min,Lt=ut.max,vn=s.shadowBlur,tn=s.shadowOffsetX,rn=s.shadowOffsetY,mn=vn||0,ar=tn||0,gi=rn||0,kr=ct[0]-mn+ar,Ta=Lt[0]+mn+ar,Wa=ct[1]-mn+gi,la=Lt[1]+mn+gi;ct[0]=Math.min(ct[0],kr),Lt[0]=Math.max(Lt[0],Ta),ct[1]=Math.min(ct[1],Wa),Lt[1]=Math.max(Lt[1],la),a.renderBounds.setMinMax(ct,Lt)}le.forEach(function(so){var oo=so.name,qi=so.params;if(oo==="blur"){var lo=qi[0].value;a.renderBounds.update(a.renderBounds.center,E.IH(a.renderBounds.halfExtents,a.renderBounds.halfExtents,[lo,lo,0]))}else if(oo==="drop-shadow"){var uo=qi[0].value,co=qi[1].value,ea=qi[2].value,ho=a.renderBounds,Rr=ho.min,Ar=ho.max,Gu=Rr[0]-ea+uo,zu=Ar[0]+ea+uo,Vu=Rr[1]-ea+co,Uu=Ar[1]+ea+co;Rr[0]=Math.min(Rr[0],Gu),Ar[0]=Math.max(Ar[0],zu),Rr[1]=Math.min(Rr[1],Vu),Ar[1]=Math.max(Ar[1],Uu),a.renderBounds.setMinMax(Rr,Ar)}}),e.geometry.dirty=!1;var ys=g<0,Jl=y<0,xs=(ys?-1:1)*(ue?kd(ue[0],0,e,!0):0),Es=(Jl?-1:1)*(ue?kd(ue[1],1,e,!0):0);(xs||Es)&&e.setOrigin(xs,Es)}}},{key:"updateSizeAttenuation",value:function(e,t){e.style.isSizeAttenuation?(e.style.rawLineWidth||(e.style.rawLineWidth=e.style.lineWidth),e.style.lineWidth=(e.style.rawLineWidth||1)/t,e.nodeName===on.CIRCLE&&(e.style.rawR||(e.style.rawR=e.style.r),e.style.r=(e.style.rawR||1)/t)):(e.style.rawLineWidth&&(e.style.lineWidth=e.style.rawLineWidth,delete e.style.rawLineWidth),e.nodeName===on.CIRCLE&&e.style.rawR&&(e.style.r=e.style.rawR,delete e.style.rawR))}}])}();function _ee(r,n){var e=DD(r);for(var t in n)e.has(t)&&(r.parsedStyle[t]=n[t])}function DD(r){return r.constructor.PARSED_STYLE_LIST}var mee=function(){function r(){Un(this,r),this.mixer=UT}return Vn(r,[{key:"calculator",value:function(e,t,i,a){return Uc(i)}}])}(),pee=function(){function r(){Un(this,r)}return Vn(r,[{key:"calculator",value:function(e,t,i,a,s){return i instanceof rh&&(i=null),s.sceneGraphService.updateDisplayObjectDependency(e,t,i,a),e==="clipPath"&&a.forEach(function(o){o.childNodes.length===0&&s.sceneGraphService.dirtifyToRoot(o)}),i}}])}(),yee=function(){function r(){Un(this,r),this.parser=Ty,this.mixer=Aq}return Vn(r,[{key:"calculator",value:function(e,t,i,a){return i instanceof rh?i.value==="none"?hD:fD:i}}])}(),xee=function(){function r(){Un(this,r)}return Vn(r,[{key:"calculator",value:function(e,t,i){return i instanceof rh?[]:i}}])}();function FD(r){var n=r.parsedStyle,e=n.fontSize;return(0,xe.Z)(e)?null:e}var KT=function(){function r(){Un(this,r),this.mixer=UT}return Vn(r,[{key:"calculator",value:function(e,t,i,a,s){if((0,pe.Z)(i))return i;if(hs.isRelativeUnit(i.unit)){if(i.unit===Xn.kPercentage)return 0;if(i.unit===Xn.kEms){if(a.parentNode){var o=FD(a.parentNode);if(o)return o*=i.value,o}return 0}if(i.unit===Xn.kRems){var l;if(a!=null&&(l=a.ownerDocument)!==null&&l!==void 0&&l.documentElement){var u=FD(a.ownerDocument.documentElement);if(u)return u*=i.value,u}return 0}}else return i.value}}])}(),Eee=function(){function r(){Un(this,r),this.mixer=bD}return Vn(r,[{key:"calculator",value:function(e,t,i){return i.map(function(a){return a.value})}}])}(),bee=function(){function r(){Un(this,r),this.mixer=bD}return Vn(r,[{key:"calculator",value:function(e,t,i){return i.map(function(a){return a.value})}}])}(),kee=function(){function r(){Un(this,r)}return Vn(r,[{key:"calculator",value:function(e,t,i,a){var s;i instanceof rh&&(i=null);var o=(s=i)===null||s===void 0?void 0:s.cloneNode(!0);return o&&(o.style.isMarker=!0),o}}])}(),wee=function(){function r(){Un(this,r),this.mixer=UT}return Vn(r,[{key:"calculator",value:function(e,t,i){return i.value}}])}(),See=function(){function r(){Un(this,r),this.mixer=jT(0,1)}return Vn(r,[{key:"calculator",value:function(e,t,i){return i.value}},{key:"postProcessor",value:function(e){var t=e.parsedStyle,i=t.offsetPath,a=t.offsetDistance;if(i){var s=i.nodeName;if(s===on.LINE||s===on.PATH||s===on.POLYLINE){var o=i.getPoint(a);o&&e.setLocalPosition(o.x,o.y)}}}}])}(),Tee=function(){function r(){Un(this,r),this.mixer=jT(0,1)}return Vn(r,[{key:"calculator",value:function(e,t,i){return i.value}}])}(),Cee=function(){function r(){Un(this,r),this.parser=ND,this.mixer=qq}return Vn(r,[{key:"calculator",value:function(e,t,i){return i instanceof rh&&i.value==="unset"?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new yp(0,0,0,0)}:i}}])}(),Mee=Vn(function r(){Un(this,r),this.mixer=tee}),Pee=function(r){function n(){var e;Un(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ba(this,n,[].concat(i)),e.mixer=jT(0,1/0),e}return $a(n,r),Vn(n)}(KT),Nee=function(){function r(){Un(this,r)}return Vn(r,[{key:"calculator",value:function(e,t,i,a){return i instanceof rh?i.value==="unset"?"":i.value:"".concat(i)}},{key:"postProcessor",value:function(e){e.nodeValue="".concat(e.parsedStyle.text)||""}}])}(),Oee=function(){function r(){Un(this,r)}return Vn(r,[{key:"calculator",value:function(e,t,i,a){var s=a.getAttribute("text");if(s){var o=s;i.value==="capitalize"?o=s.charAt(0).toUpperCase()+s.slice(1):i.value==="lowercase"?o=s.toLowerCase():i.value==="uppercase"&&(o=s.toUpperCase()),a.parsedStyle.text=o}return i.value}}])}(),YPe=function(n){return Object.fromEntries(Object.entries(n).filter(function(e){var t=_slicedToArray(e,2),i=t[1];return i!==void 0}))},JT=new WeakMap;function ZPe(r,n,e){if(r){var t=typeof r=="string"?document.getElementById(r):r;JT.has(t)&&JT.get(t).destroy(e),JT.set(t,n)}}var YE=typeof window!="undefined"&&typeof window.document!="undefined";function XPe(r){return!!r.getAttribute}function KPe(r,n){for(var e=0,t=r.length;e<t;){var i=e+t>>>1;Ree(r[i],n)<0?e=i+1:t=i}return e}function Ree(r,n){var e=Number(r.parsedStyle.zIndex||0),t=Number(n.parsedStyle.zIndex||0);if(e===t){var i=r.parentNode;if(i){var a=i.childNodes||[];return a.indexOf(r)-a.indexOf(n)}}return e-t}function BD(r){var n=r;do{var e,t=(e=n.parsedStyle)===null||e===void 0?void 0:e.clipPath;if(t)return n;n=n.parentElement}while(n!==null);return null}var $D="px";function Aee(r,n,e){YE&&r.style&&(r.style.width=n+$D,r.style.height=e+$D)}function GD(r,n){if(YE)return document.defaultView.getComputedStyle(r,null).getPropertyValue(n)}function JPe(r){var n=GD(r,"width");return n==="auto"?r.offsetWidth:parseFloat(n)}function QPe(r){var n=GD(r,"height");return n==="auto"?r.offsetHeight:parseFloat(n)}var Lee=1,Iee={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},Dee=typeof performance=="object"&&performance.now?performance:Date;function QT(r){return r.nodeName===on.FRAGMENT?!0:r.getRootNode().nodeName===on.FRAGMENT}function B_(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"auto",n=arguments.length>1?arguments[1]:void 0,e=arguments.length>2?arguments[2]:void 0,t=!1,i=!1,a=!!n&&!n.isNone,s=!!e&&!e.isNone;return r==="visiblepainted"||r==="painted"||r==="auto"?(t=a,i=s):r==="visiblefill"||r==="fill"?t=!0:r==="visiblestroke"||r==="stroke"?i=!0:(r==="visible"||r==="all")&&(t=!0,i=!0),[t,i]}var Fee=1,Bee=function(){return Fee++},tv=typeof self=="object"&&self.self===self?self:typeof k.g=="object"&&k.g.global===k.g?k.g:{},$ee=Date.now(),Gee=function(){return tv.performance&&typeof tv.performance.now=="function"?tv.performance.now():Date.now()-$ee},Py={},zD=Date.now(),zee=function(n){if(typeof n!="function")throw new TypeError("".concat(n," is not a function"));var e=Date.now(),t=e-zD,i=t>16?0:16-t,a=Bee();return Py[a]=n,Object.keys(Py).length>1||setTimeout(function(){zD=e;var s=Py;Py={},Object.keys(s).forEach(function(o){return s[o](Gee())})},i),a},Vee=function(n){delete Py[n]},Uee=["","webkit","moz","ms","o"],VD=function(n){return typeof n!="string"?zee:n===""?tv.requestAnimationFrame:tv["".concat(n,"RequestAnimationFrame")]},jee=function(n){return typeof n!="string"?Vee:n===""?tv.cancelAnimationFrame:tv["".concat(n,"CancelAnimationFrame")]||tv["".concat(n,"CancelRequestAnimationFrame")]},Hee=function(n,e){for(var t=0;n[t]!==void 0;){if(e(n[t]))return n[t];t+=1}},UD=Hee(Uee,function(r){return!!VD(r)}),jD=VD(UD),Wee=jee(UD);tv.requestAnimationFrame=jD,tv.cancelAnimationFrame=Wee;var qPe=null,eNe=null,tNe=null,nNe=null,Yee=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Zee=/([\"\'])[^\'\"]+\1/;function Xee(r){for(var n=r.fontSize,e=n===void 0?16:n,t=r.fontFamily,i=t===void 0?"sans-serif":t,a=r.fontStyle,s=a===void 0?"normal":a,o=r.fontVariant,l=o===void 0?"normal":o,u=r.fontWeight,c=u===void 0?"normal":u,d=(0,pe.Z)(e)&&"".concat(e,"px")||"16px",h=i.split(","),f=h.length-1;f>=0;f--){var v=h[f].trim();!Zee.test(v)&&Yee.indexOf(v)<0&&(v='"'.concat(v,'"')),h[f]=v}return"".concat(s," ").concat(l," ").concat(c," ").concat(d," ").concat(h.join(","))}function qT(r,n,e){return L.identity(r),r[4]=Math.tan(n),r[1]=Math.tan(e),r}var Nl=L.create(),Kee=L.create(),Jee={scale:function(n){L.fromScaling(Nl,[n[0].value,n[1].value,1])},scaleX:function(n){L.fromScaling(Nl,[n[0].value,1,1])},scaleY:function(n){L.fromScaling(Nl,[1,n[0].value,1])},scaleZ:function(n){L.fromScaling(Nl,[1,1,n[0].value])},scale3d:function(n){L.fromScaling(Nl,[n[0].value,n[1].value,n[2].value])},translate:function(n){L.fromTranslation(Nl,[n[0].value,n[1].value,0])},translateX:function(n){L.fromTranslation(Nl,[n[0].value,0,0])},translateY:function(n){L.fromTranslation(Nl,[0,n[0].value,0])},translateZ:function(n){L.fromTranslation(Nl,[0,0,n[0].value])},translate3d:function(n){L.fromTranslation(Nl,[n[0].value,n[1].value,n[2].value])},rotate:function(n){L.fromZRotation(Nl,Hs(Uc(n[0])))},rotateX:function(n){L.fromXRotation(Nl,Hs(Uc(n[0])))},rotateY:function(n){L.fromYRotation(Nl,Hs(Uc(n[0])))},rotateZ:function(n){L.fromZRotation(Nl,Hs(Uc(n[0])))},rotate3d:function(n){L.fromRotation(Nl,Hs(Uc(n[3])),[n[0].value,n[1].value,n[2].value])},skew:function(n){qT(Nl,Hs(n[0].value),Hs(n[1].value))},skewX:function(n){qT(Nl,Hs(n[0].value),0)},skewY:function(n){qT(Nl,0,Hs(n[0].value))},matrix:function(n){L.set(Nl,n[0].value,n[1].value,0,0,n[2].value,n[3].value,0,0,0,0,1,0,n[4].value,n[5].value,0,1)},matrix3d:function(n){L.set.apply(L,[Nl].concat(vl(n.map(function(e){return e.value}))))}},Qee=E.al(1,1,1),qee=E.Ue(),HD={translate:function(n,e){lr.sceneGraphService.setLocalScale(n,Qee,!1),lr.sceneGraphService.setLocalEulerAngles(n,qee,void 0,void 0,!1),lr.sceneGraphService.setLocalPosition(n,[e[0].value,e[1].value,0],!1),lr.sceneGraphService.dirtifyLocal(n,n.transformable)}};function WD(r,n){if(r.length){if(r.length===1&&HD[r[0].t]){HD[r[0].t](n,r[0].d);return}for(var e=L.identity(Kee),t=0;t<r.length;t++){var i=r[t],a=i.t,s=i.d,o=Jee[a];o&&(o(s),L.mul(e,e,Nl))}n.setLocalTransform(e)}else n.resetLocalTransform();return n.getLocalTransform()}var ete=function(){function r(){Un(this,r),this.parser=nee,this.mixer=dee}return Vn(r,[{key:"calculator",value:function(e,t,i,a){return i instanceof rh?[]:i}},{key:"postProcessor",value:function(e){WD(e.parsedStyle.transform,e)}}])}(),tte=function(){function r(){Un(this,r)}return Vn(r,[{key:"postProcessor",value:function(e){var t=e.parsedStyle.transformOrigin;t[0].unit===Xn.kPixels&&t[1].unit===Xn.kPixels?e.setOrigin(t[0].value,t[1].value):e.getGeometryBounds()}}])}(),nte=function(){function r(){Un(this,r)}return Vn(r,[{key:"calculator",value:function(e,t,i,a){return i.value}},{key:"postProcessor",value:function(e){if(e.parentNode){var t=e.parentNode,i=t.renderable,a=t.sortable;i&&(i.dirty=!0),a&&(a.dirty=!0,a.dirtyReason=DT.Z_INDEX_CHANGED)}}}])}(),rte=function(){function r(){Un(this,r)}return Vn(r,[{key:"update",value:function(e,t){var i=e.cx,a=i===void 0?0:i,s=e.cy,o=s===void 0?0:s,l=e.r,u=l===void 0?0:l;return{cx:a,cy:o,hwidth:u,hheight:u}}}])}(),ite=function(){function r(){Un(this,r)}return Vn(r,[{key:"update",value:function(e,t){var i=e.cx,a=i===void 0?0:i,s=e.cy,o=s===void 0?0:s,l=e.rx,u=l===void 0?0:l,c=e.ry,d=c===void 0?0:c;return{cx:a,cy:o,hwidth:u,hheight:d}}}])}(),ate=function(){function r(){Un(this,r)}return Vn(r,[{key:"update",value:function(e){var t=e.x1,i=e.y1,a=e.x2,s=e.y2,o=Math.min(t,a),l=Math.max(t,a),u=Math.min(i,s),c=Math.max(i,s),d=l-o,h=c-u,f=d/2,v=h/2;return{cx:o+f,cy:u+v,hwidth:f,hheight:v}}}])}(),ste=function(){function r(){Un(this,r)}return Vn(r,[{key:"update",value:function(e){var t=e.d,i=t.rect,a=i.x,s=i.y,o=i.width,l=i.height,u=o/2,c=l/2;return{cx:a+u,cy:s+c,hwidth:u,hheight:c}}}])}(),ote=function(){function r(){Un(this,r)}return Vn(r,[{key:"update",value:function(e){if(e.points&&(0,Ie.Z)(e.points.points)){var t=e.points.points,i=Math.min.apply(Math,vl(t.map(function(h){return h[0]}))),a=Math.max.apply(Math,vl(t.map(function(h){return h[0]}))),s=Math.min.apply(Math,vl(t.map(function(h){return h[1]}))),o=Math.max.apply(Math,vl(t.map(function(h){return h[1]}))),l=a-i,u=o-s,c=l/2,d=u/2;return{cx:i+c,cy:s+d,hwidth:c,hheight:d}}return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),lte=function(){function r(){Un(this,r)}return Vn(r,[{key:"update",value:function(e,t){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s,l=e.src,u=e.width,c=u===void 0?0:u,d=e.height,h=d===void 0?0:d,f=c,v=h;return l&&!(0,Ze.Z)(l)&&(f||(f=l.width,e.width=f),v||(v=l.height,e.height=v)),{cx:a+f/2,cy:o+v/2,hwidth:f/2,hheight:v/2}}}])}(),ute=function(){function r(n){Un(this,r),this.globalRuntime=n}return Vn(r,[{key:"isReadyToMeasure",value:function(e,t){var i=e.text;return i}},{key:"update",value:function(e,t){var i,a=e.text,s=e.textAlign,o=s===void 0?"start":s,l=e.lineWidth,u=l===void 0?1:l,c=e.textBaseline,d=c===void 0?"alphabetic":c,h=e.dx,f=h===void 0?0:h,v=e.dy,g=v===void 0?0:v,m=e.x,y=m===void 0?0:m,w=e.y,T=w===void 0?0:w;if(!this.isReadyToMeasure(e,t))return e.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{hwidth:0,hheight:0,cx:0,cy:0};var G=(t==null||(i=t.ownerDocument)===null||i===void 0||(i=i.defaultView)===null||i===void 0?void 0:i.getConfig())||{},x=G.offscreenCanvas,_=this.globalRuntime.textService.measureText(a,e,x);e.metrics=_;var p=_.width,b=_.height,R=p/2,B=b/2,j=y+R;o==="center"||o==="middle"?j+=u/2-R:(o==="right"||o==="end")&&(j+=u-R*2);var Z=T-B;return d==="middle"?Z+=B:d==="top"||d==="hanging"?Z+=B*2:d==="alphabetic"||(d==="bottom"||d==="ideographic")&&(Z+=0),f&&(j+=f),g&&(Z+=g),{cx:j,cy:Z,hwidth:R,hheight:B}}}])}(),cte=function(){function r(){Un(this,r)}return Vn(r,[{key:"update",value:function(e,t){return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),dte=function(){function r(){Un(this,r)}return Vn(r,[{key:"update",value:function(e,t){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s,l=e.width,u=l===void 0?0:l,c=e.height,d=c===void 0?0:c;return{cx:a+u/2,cy:o+d/2,hwidth:u/2,hheight:d/2}}}])}();function rNe(r){return!!r.type}var eC=function(){function r(n){Un(this,r),this.eventPhase=r.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new bd,this.page=new bd,this.canvas=new bd,this.viewport=new bd,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=n}return Vn(r,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"composedPath",value:function(){return this.manager&&(!this.path||this.path[0]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}},{key:"propagationPath",get:function(){return this.composedPath()}},{key:"preventDefault",value:function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}},{key:"stopImmediatePropagation",value:function(){this.propagationImmediatelyStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"initEvent",value:function(){}},{key:"initUIEvent",value:function(){}},{key:"clone",value:function(){throw new Error(Yo)}}])}(),YD=function(r){function n(){var e;Un(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ba(this,n,[].concat(i)),e.client=new bd,e.movement=new bd,e.offset=new bd,e.global=new bd,e.screen=new bd,e}return $a(n,r),Vn(n,[{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(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)}},{key:"initMouseEvent",value:function(){throw new Error(Yo)}}])}(eC),hte=function(r){function n(){var e;Un(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ba(this,n,[].concat(i)),e.width=0,e.height=0,e.isPrimary=!1,e}return $a(n,r),Vn(n,[{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)}}])}(YD),fte=function(r){function n(){return Un(this,n),Ba(this,n,arguments)}return $a(n,r),Vn(n,[{key:"clone",value:function(){return this.manager.cloneWheelEvent(this)}}])}(YD),nv=function(r){function n(e,t){var i;return Un(this,n),i=Ba(this,n,[null]),i.type=e,i.detail=t,Object.assign(i,t),i}return $a(n,r),Vn(n)}(eC),ZD=new WeakMap,vte=function(){function r(){Un(this,r),this.emitter=new Se.Z}return Vn(r,[{key:"on",value:function(e,t,i){return this.addEventListener(e,t,i),this}},{key:"addEventListener",value:function(e,t,i){var a=!1,s=!1;if((0,je.Z)(i))a=i;else if(i){var o=i.capture;a=o===void 0?!1:o;var l=i.once;s=l===void 0?!1:l}a&&(e+="capture"),t=(0,Be.Z)(t)?t:t.handleEvent;var u=(0,Be.Z)(t)?void 0:t;return s?this.emitter.once(e,t,u):this.emitter.on(e,t,u),this}},{key:"off",value:function(e,t,i){return e?this.removeEventListener(e,t,i):this.removeAllEventListeners(),this}},{key:"removeAllEventListeners",value:function(){var e;(e=this.emitter)===null||e===void 0||e.removeAllListeners()}},{key:"removeEventListener",value:function(e,t,i){var a;if(!this.emitter)return this;var s=(0,je.Z)(i)?i:i==null?void 0:i.capture;s&&(e+="capture"),t=(0,Be.Z)(t)?t:(a=t)===null||a===void 0?void 0:a.handleEvent;var o=(0,Be.Z)(t)?void 0:t;return this.emitter.off(e,t,o),this}},{key:"emit",value:function(e,t){this.dispatchEvent(new nv(e,t))}},{key:"dispatchEvent",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=ZD.get(this);if(!i){var a;this.document?i=this:this.defaultView?i=this.defaultView:i=(a=this.ownerDocument)===null||a===void 0?void 0:a.defaultView,i&&ZD.set(this,i)}if(i){if(e.manager=i.getEventService(),!e.manager)return!1;e.defaultPrevented=!1,e.path?e.path.length=0:e.page=[],t||(e.target=this),e.manager.dispatchEvent(e,e.type,t)}else this.emitter.emit(e.type,e);return!e.defaultPrevented}}])}(),Mg=function(r){function n(){var e;Un(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ba(this,n,[].concat(i)),e.shadow=!1,e.ownerDocument=null,e.isConnected=!1,e.baseURI="",e.childNodes=[],e.nodeType=0,e.nodeName="",e.nodeValue=null,e.parentNode=null,e}return $a(n,r),Vn(n,[{key:"textContent",get:function(){var t="";this.nodeName===on.TEXT&&(t+=this.style.text);var i=I_(this.childNodes),a;try{for(i.s();!(a=i.n()).done;){var s=a.value;s.nodeName===on.TEXT?t+=s.nodeValue:t+=s.textContent}}catch(o){i.e(o)}finally{i.f()}return t},set:function(t){var i=this;this.childNodes.slice().forEach(function(a){i.removeChild(a)}),this.nodeName===on.TEXT&&(this.style.text="".concat(t))}},{key:"getRootNode",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this}},{key:"hasChildNodes",value:function(){return this.childNodes.length>0}},{key:"isDefaultNamespace",value:function(t){throw new Error(Yo)}},{key:"lookupNamespaceURI",value:function(t){throw new Error(Yo)}},{key:"lookupPrefix",value:function(t){throw new Error(Yo)}},{key:"normalize",value:function(){throw new Error(Yo)}},{key:"isEqualNode",value:function(t){return this===t}},{key:"isSameNode",value:function(t){return this.isEqualNode(t)}},{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(t){if(t===this)return 0;for(var i=t,a=this,s=[i],o=[a];(l=i.parentNode)!==null&&l!==void 0?l:a.parentNode;){var l;i=i.parentNode?(s.push(i.parentNode),i.parentNode):i,a=a.parentNode?(o.push(a.parentNode),a.parentNode):a}if(i!==a)return n.DOCUMENT_POSITION_DISCONNECTED|n.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|n.DOCUMENT_POSITION_PRECEDING;var u=s.length>o.length?s:o,c=u===s?o:s;if(u[u.length-c.length]===c[0])return u===s?n.DOCUMENT_POSITION_CONTAINED_BY|n.DOCUMENT_POSITION_FOLLOWING:n.DOCUMENT_POSITION_CONTAINS|n.DOCUMENT_POSITION_PRECEDING;for(var d=u.length-c.length,h=c.length-1;h>=0;h--){var f=c[h],v=u[d+h];if(v!==f){var g=f.parentNode.childNodes;return g.indexOf(f)<g.indexOf(v)?c===s?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING:u===s?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING}}return n.DOCUMENT_POSITION_FOLLOWING}},{key:"contain",value:function(t){return this.contains(t)}},{key:"contains",value:function(t){for(var i=t;i&&this!==i;)i=i.parentNode;return!!i}},{key:"getAncestor",value:function(t){for(var i=this;t>0&&i;)i=i.parentNode,t--;return i}},{key:"forEach",value:function(t){for(var i=[this];i.length>0;){var a=i.pop(),s=t(a);if(s===!1)break;for(var o=a.childNodes.length-1;o>=0;o--)i.push(a.childNodes[o])}}}],[{key:"isNode",value:function(t){return!!t.childNodes}}])}(vte);Mg.DOCUMENT_POSITION_DISCONNECTED=1,Mg.DOCUMENT_POSITION_PRECEDING=2,Mg.DOCUMENT_POSITION_FOLLOWING=4,Mg.DOCUMENT_POSITION_CONTAINS=8,Mg.DOCUMENT_POSITION_CONTAINED_BY=16,Mg.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;var iNe=2048,aNe=null,tC=function(){function r(){Un(this,r)}return Vn(r,[{key:"getOrCreateCanvas",value:function(e,t){if(this.canvas)return this.canvas;if(e||lr.offscreenCanvas)this.canvas=e||lr.offscreenCanvas,this.context=this.canvas.getContext("2d",Oa({willReadFrequently:!0},t));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",Oa({willReadFrequently:!0},t)),(!this.context||!this.context.measureText)&&(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(i){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",Oa({willReadFrequently:!0},t))}return this.canvas.width=10,this.canvas.height=10,this.canvas}},{key:"getOrCreateContext",value:function(e,t){return this.context?this.context:(this.getOrCreateCanvas(e,t),this.context)}}],[{key:"createCanvas",value:function(){try{return new window.OffscreenCanvas(0,0)}catch(e){}try{return document.createElement("canvas")}catch(e){}return null}}])}(),gte=function(r){return r[r.CAMERA_CHANGED=0]="CAMERA_CHANGED",r[r.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",r[r.NONE=2]="NONE",r}({}),sNe=null,_te=/\[\s*(.*)=(.*)\s*\]/,mte=function(){function r(){Un(this,r)}return Vn(r,[{key:"selectOne",value:function(e,t){var i=this;if(e.startsWith("."))return t.find(function(l){return((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(e))>-1});if(e.startsWith("#"))return t.find(function(l){return l.id===i.getIdOrClassname(e)});if(e.startsWith("[")){var a=this.getAttribute(e),s=a.name,o=a.value;return s?t.find(function(l){return t!==l&&(s==="name"?l.name===o:i.attributeToString(l,s)===o)}):null}return t.find(function(l){return t!==l&&l.nodeName===e})}},{key:"selectAll",value:function(e,t){var i=this;if(e.startsWith("."))return t.findAll(function(l){return t!==l&&((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(e))>-1});if(e.startsWith("#"))return t.findAll(function(l){return t!==l&&l.id===i.getIdOrClassname(e)});if(e.startsWith("[")){var a=this.getAttribute(e),s=a.name,o=a.value;return s?t.findAll(function(l){return t!==l&&(s==="name"?l.name===o:i.attributeToString(l,s)===o)}):[]}return t.findAll(function(l){return t!==l&&l.nodeName===e})}},{key:"is",value:function(e,t){if(e.startsWith("."))return t.className===this.getIdOrClassname(e);if(e.startsWith("#"))return t.id===this.getIdOrClassname(e);if(e.startsWith("[")){var i=this.getAttribute(e),a=i.name,s=i.value;return a==="name"?t.name===s:this.attributeToString(t,a)===s}return t.nodeName===e}},{key:"getIdOrClassname",value:function(e){return e.substring(1)}},{key:"getAttribute",value:function(e){var t=e.match(_te),i="",a="";return t&&t.length>2&&(i=t[1].replace(/"/g,""),a=t[2].replace(/"/g,"")),{name:i,value:a}}},{key:"attributeToString",value:function(e,t){if(!e.getAttribute)return"";var i=e.getAttribute(t);return(0,xe.Z)(i)?"":i.toString?i.toString():""}}])}(),Is=function(r){return r.REPARENT="reparent",r.DESTROY="destroy",r.ATTR_MODIFIED="DOMAttrModified",r.INSERTED="DOMNodeInserted",r.REMOVED="removed",r.MOUNTED="DOMNodeInsertedIntoDocument",r.UNMOUNTED="DOMNodeRemovedFromDocument",r.BOUNDS_CHANGED="bounds-changed",r.CULLED="culled",r}({}),rv=function(r){function n(e,t,i,a,s,o,l,u){var c;return Un(this,n),c=Ba(this,n,[null]),c.relatedNode=t,c.prevValue=i,c.newValue=a,c.attrName=s,c.attrChange=o,c.prevParsedValue=l,c.newParsedValue=u,c.type=e,c}return $a(n,r),Vn(n)}(eC);rv.ADDITION=2,rv.MODIFICATION=1,rv.REMOVAL=3;function XD(r){var n=r.renderable;n&&(n.renderBoundsDirty=!0,n.boundsDirty=!0)}var pte=new rv(Is.REPARENT,null,"","","",0,"",""),yte=ot.Ue(),ZE=E.Ue(),xte=E.al(1,1,1),Ete=L.create(),bte=ot.Ue(),Pg=E.Ue(),bp=L.create(),Ng=X.Ue(),kte=E.Ue(),wte=X.Ue(),Ste=E.Ue(),Ny=E.Ue(),$_=E.Ue(),XE=L.create(),KD=X.Ue(),JD=X.Ue(),KE=X.Ue(),nC={affectChildren:!0},Tte=function(){function r(n){Un(this,r),this.pendingEvents=new Map,this.boundsChangedEvent=new nv(Is.BOUNDS_CHANGED),this.displayObjectDependencyMap=new WeakMap,this.runtime=n}return Vn(r,[{key:"matches",value:function(e,t){return this.runtime.sceneGraphSelector.is(e,t)}},{key:"querySelector",value:function(e,t){return this.runtime.sceneGraphSelector.selectOne(e,t)}},{key:"querySelectorAll",value:function(e,t){return this.runtime.sceneGraphSelector.selectAll(e,t)}},{key:"attach",value:function(e,t,i){var a,s=!1;e.parentNode&&(s=e.parentNode!==t,this.detach(e));var o=e.nodeName===on.FRAGMENT,l=QT(t);e.parentNode=t;var u=o?e.childNodes:[e];(0,pe.Z)(i)?u.forEach(function(f){t.childNodes.splice(i,0,f),f.parentNode=t}):u.forEach(function(f){t.childNodes.push(f),f.parentNode=t});var c=t,d=c.sortable;if((d!=null&&(a=d.sorted)!==null&&a!==void 0&&a.length||e.parsedStyle.zIndex)&&(d.dirtyChildren.indexOf(e)===-1&&d.dirtyChildren.push(e),d.dirty=!0,d.dirtyReason=DT.ADDED),!l){if(o)this.dirtifyFragment(e);else{var h=e.transformable;h&&this.dirtifyWorld(e,h)}s&&e.dispatchEvent(pte)}}},{key:"detach",value:function(e){if(e.parentNode){var t,i,a=e.transformable,s=e.parentNode,o=s.sortable;(o!=null&&(t=o.sorted)!==null&&t!==void 0&&t.length||(i=e.style)!==null&&i!==void 0&&i.zIndex)&&(o.dirtyChildren.indexOf(e)===-1&&o.dirtyChildren.push(e),o.dirty=!0,o.dirtyReason=DT.REMOVED);var l=e.parentNode.childNodes.indexOf(e);l>-1&&e.parentNode.childNodes.splice(l,1),a&&this.dirtifyWorld(e,a),e.parentNode=null}}},{key:"getOrigin",value:function(e){return e.getGeometryBounds(),e.transformable.origin}},{key:"setOrigin",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=[t,i,a]);var s=e.transformable;if(!(t[0]===s.origin[0]&&t[1]===s.origin[1]&&t[2]===s.origin[2])){var o=s.origin;o[0]=t[0],o[1]=t[1],o[2]=t[2]||0,this.dirtifyLocal(e,s)}}},{key:"rotate",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;if(e.parentNode===null||!e.parentNode.transformable)this.rotateLocal(e,t);else{var o=Ng;X.Su(o,t[0],t[1],t[2]);var l=this.getRotation(e),u=this.getRotation(e.parentNode);X.JG(KE,u),X.U_(KE,KE),X.Jp(o,KE,o),X.Jp(s.localRotation,o,l),X.Fv(s.localRotation,s.localRotation),this.dirtifyLocal(e,s)}}},{key:"rotateLocal",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;X.Su(JD,t[0],t[1],t[2]),X.dC(s.localRotation,s.localRotation,JD),this.dirtifyLocal(e,s)}},{key:"setEulerAngles",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;if(e.parentNode===null||!e.parentNode.transformable)this.setLocalEulerAngles(e,t);else{X.Su(s.localRotation,t[0],t[1],t[2]);var o=this.getRotation(e.parentNode);X.JG(KD,X.U_(Ng,o)),X.dC(s.localRotation,s.localRotation,KD),this.dirtifyLocal(e,s)}}},{key:"setLocalEulerAngles",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;typeof t=="number"&&(t=E.al(t,i,a));var o=e.transformable;X.Su(o.localRotation,t[0],t[1],t[2]),s&&this.dirtifyLocal(e,o)}},{key:"translateLocal",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;E.fS(t,ZE)||(E.VC(t,t,s.localRotation),E.IH(s.localPosition,s.localPosition,t),this.dirtifyLocal(e,s))}},{key:"setPosition",value:function(e,t){var i,a=e.transformable;if($_[0]=t[0],$_[1]=t[1],$_[2]=(i=t[2])!==null&&i!==void 0?i:0,!E.fS(this.getPosition(e),$_)){if(E.JG(a.position,$_),e.parentNode===null||!e.parentNode.transformable)E.JG(a.localPosition,$_);else{var s=e.parentNode.transformable;L.copy(XE,s.worldTransform),L.invert(XE,XE),E.fF(a.localPosition,$_,XE)}this.dirtifyLocal(e,a)}}},{key:"setLocalPosition",value:function(e,t){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=e.transformable;Ny[0]=t[0],Ny[1]=t[1],Ny[2]=(i=t[2])!==null&&i!==void 0?i:0,!E.fS(s.localPosition,Ny)&&(E.JG(s.localPosition,Ny),a&&this.dirtifyLocal(e,s))}},{key:"scaleLocal",value:function(e,t){var i,a=e.transformable;E.Jp(a.localScale,a.localScale,E.t8(Pg,t[0],t[1],(i=t[2])!==null&&i!==void 0?i:1)),this.dirtifyLocal(e,a)}},{key:"setLocalScale",value:function(e,t){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=e.transformable;E.t8(Pg,t[0],t[1],(i=t[2])!==null&&i!==void 0?i:s.localScale[2]),!E.fS(Pg,s.localScale)&&(E.JG(s.localScale,Pg),a&&this.dirtifyLocal(e,s))}},{key:"translate",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.t8(Pg,t,i,a)),!E.fS(t,ZE)&&(E.IH(Pg,this.getPosition(e),t),this.setPosition(e,Pg))}},{key:"setRotation",value:function(e,t,i,a,s){var o=e.transformable;if(typeof t=="number"&&(t=X.al(t,i,a,s)),e.parentNode===null||!e.parentNode.transformable)this.setLocalRotation(e,t);else{var l=this.getRotation(e.parentNode);X.JG(Ng,l),X.U_(Ng,Ng),X.Jp(o.localRotation,Ng,t),X.Fv(o.localRotation,o.localRotation),this.dirtifyLocal(e,o)}}},{key:"setLocalRotation",value:function(e,t,i,a,s){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;typeof t=="number"&&(t=X.t8(Ng,t,i,a,s));var l=e.transformable;X.JG(l.localRotation,t),o&&this.dirtifyLocal(e,l)}},{key:"setLocalSkew",value:function(e,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;typeof t=="number"&&(t=ot.t8(bte,t,i));var s=e.transformable;ot.JG(s.localSkew,t),a&&this.dirtifyLocal(e,s)}},{key:"dirtifyLocal",value:function(e,t){QT(e)||t.localDirtyFlag||(t.localDirtyFlag=!0,t.dirtyFlag||this.dirtifyWorld(e,t))}},{key:"dirtifyWorld",value:function(e,t){t.dirtyFlag||this.unfreezeParentToRoot(e),this.dirtifyWorldInternal(e,t),this.dirtifyToRoot(e,!0)}},{key:"dirtifyFragment",value:function(e){var t=e.transformable;t&&(t.frozen=!1,t.dirtyFlag=!0,t.localDirtyFlag=!0);var i=e.renderable;i&&(i.renderBoundsDirty=!0,i.boundsDirty=!0,i.dirty=!0);for(var a=e.childNodes.length,s=0;s<a;s++)this.dirtifyFragment(e.childNodes[s]);e.nodeName===on.FRAGMENT&&this.pendingEvents.set(e,!1)}},{key:"triggerPendingEvents",value:function(){var e=this,t=new Set,i=function(s,o){!s.isConnected||t.has(s)||s.nodeName===on.FRAGMENT||(e.boundsChangedEvent.detail=o,e.boundsChangedEvent.target=s,s.isMutationObserved?s.dispatchEvent(e.boundsChangedEvent):s.ownerDocument.defaultView.dispatchEvent(e.boundsChangedEvent,!0),t.add(s))};this.pendingEvents.forEach(function(a,s){s.nodeName!==on.FRAGMENT&&(nC.affectChildren=a,a?s.forEach(function(o){i(o,nC)}):i(s,nC))}),t.clear(),this.clearPendingEvents()}},{key:"clearPendingEvents",value:function(){this.pendingEvents.clear()}},{key:"dirtifyToRoot",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=e;for(i.renderable&&(i.renderable.dirty=!0);i;)XD(i),i=i.parentNode;t&&e.forEach(function(a){XD(a)}),this.informDependentDisplayObjects(e),this.pendingEvents.set(e,t)}},{key:"updateDisplayObjectDependency",value:function(e,t,i,a){if(t&&t!==i){var s=this.displayObjectDependencyMap.get(t);if(s&&s[e]){var o=s[e].indexOf(a);s[e].splice(o,1)}}if(i){var l=this.displayObjectDependencyMap.get(i);l||(this.displayObjectDependencyMap.set(i,{}),l=this.displayObjectDependencyMap.get(i)),l[e]||(l[e]=[]),l[e].push(a)}}},{key:"informDependentDisplayObjects",value:function(e){var t=this,i=this.displayObjectDependencyMap.get(e);i&&Object.keys(i).forEach(function(a){i[a].forEach(function(s){t.dirtifyToRoot(s,!0),s.dispatchEvent(new rv(Is.ATTR_MODIFIED,s,t,t,a,rv.MODIFICATION,t,t)),s.isCustomElement&&s.isConnected&&s.attributeChangedCallback&&s.attributeChangedCallback(a,t,t)})})}},{key:"getPosition",value:function(e){var t=e.transformable;return L.getTranslation(t.position,this.getWorldTransform(e,t))}},{key:"getRotation",value:function(e){var t=e.transformable;return L.getRotation(t.rotation,this.getWorldTransform(e,t))}},{key:"getScale",value:function(e){var t=e.transformable;return L.getScaling(t.scaling,this.getWorldTransform(e,t))}},{key:"getWorldTransform",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.transformable;return!t.localDirtyFlag&&!t.dirtyFlag||(e.parentNode&&e.parentNode.transformable&&this.getWorldTransform(e.parentNode),this.sync(e,t)),t.worldTransform}},{key:"getLocalPosition",value:function(e){return e.transformable.localPosition}},{key:"getLocalRotation",value:function(e){return e.transformable.localRotation}},{key:"getLocalScale",value:function(e){return e.transformable.localScale}},{key:"getLocalSkew",value:function(e){return e.transformable.localSkew}},{key:"calcLocalTransform",value:function(e){var t=e.localSkew[0]!==0||e.localSkew[1]!==0;if(t){L.fromRotationTranslationScaleOrigin(e.localTransform,e.localRotation,e.localPosition,E.al(1,1,1),e.origin),(e.localSkew[0]!==0||e.localSkew[1]!==0)&&(L.identity(bp),bp[4]=Math.tan(e.localSkew[0]),bp[1]=Math.tan(e.localSkew[1]),L.multiply(e.localTransform,e.localTransform,bp));var i=L.fromRotationTranslationScaleOrigin(bp,X.t8(Ng,0,0,0,1),E.t8(Pg,1,1,1),e.localScale,e.origin);L.multiply(e.localTransform,e.localTransform,i)}else{var a=e.localTransform,s=e.localPosition,o=e.localRotation,l=e.localScale,u=e.origin,c=s[0]!==0||s[1]!==0||s[2]!==0,d=o[3]!==1||o[0]!==0||o[1]!==0||o[2]!==0,h=l[0]!==1||l[1]!==1||l[2]!==1,f=u[0]!==0||u[1]!==0||u[2]!==0;!d&&!h&&!f?c?L.fromTranslation(a,s):L.identity(a):L.fromRotationTranslationScaleOrigin(a,o,s,l,u)}}},{key:"getLocalTransform",value:function(e){var t=e.transformable;return t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.localTransform}},{key:"setLocalTransform",value:function(e,t){var i=L.getTranslation(kte,t),a=L.getRotation(wte,t),s=L.getScaling(Ste,t);this.setLocalScale(e,s,!1),this.setLocalPosition(e,i,!1),this.setLocalRotation(e,a,void 0,void 0,void 0,!1),this.dirtifyLocal(e,e.transformable)}},{key:"resetLocalTransform",value:function(e){this.setLocalScale(e,xte,!1),this.setLocalPosition(e,ZE,!1),this.setLocalEulerAngles(e,ZE,void 0,void 0,!1),this.setLocalSkew(e,yte,void 0,!1),this.dirtifyLocal(e,e.transformable)}},{key:"getTransformedGeometryBounds",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2?arguments[2]:void 0,a=this.getGeometryBounds(e,t);if(!au.isEmpty(a)){var s=i||new au;return s.setFromTransformedAABB(a,this.getWorldTransform(e)),s}return null}},{key:"getGeometryBounds",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=e,a=i.geometry;a.dirty&&lr.styleValueRegistry.updateGeometry(e);var s=t?a.renderBounds:a.contentBounds||null;return s||new au}},{key:"getBounds",value:function(e){var t=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=e,s=a.renderable;if(!s.boundsDirty&&!i&&s.bounds)return s.bounds;if(!s.renderBoundsDirty&&i&&s.renderBounds)return s.renderBounds;var o=i?s.renderBounds:s.bounds,l=this.getTransformedGeometryBounds(e,i,o),u=e.childNodes;if(u.forEach(function(h){var f=t.getBounds(h,i);f&&(l?l.add(f):(l=o||new au,l.update(f.center,f.halfExtents)))}),l||(l=new au),i){var c=BD(e);if(c){var d=c.parsedStyle.clipPath.getBounds(i);l?d&&(l=d.intersection(l)):l.update(d.center,d.halfExtents)}}return i?(s.renderBounds=l,s.renderBoundsDirty=!1):(s.bounds=l,s.boundsDirty=!1),l}},{key:"getLocalBounds",value:function(e){if(e.parentNode){var t=Ete;e.parentNode.transformable&&(t=L.invert(bp,this.getWorldTransform(e.parentNode)));var i=this.getBounds(e);if(!au.isEmpty(i)){var a=new au;return a.setFromTransformedAABB(i,t),a}}return this.getBounds(e)}},{key:"getBoundingClientRect",value:function(e){var t,i,a=this.getGeometryBounds(e);au.isEmpty(a)||(i=new au,i.setFromTransformedAABB(a,this.getWorldTransform(e)));var s=(t=e.ownerDocument)===null||t===void 0||(t=t.defaultView)===null||t===void 0?void 0:t.getContextService().getBoundingClientRect();if(i){var o=i.getMin(),l=aa(o,2),u=l[0],c=l[1],d=i.getMax(),h=aa(d,2),f=h[0],v=h[1];return new yp(u+((s==null?void 0:s.left)||0),c+((s==null?void 0:s.top)||0),f-u,v-c)}return new yp((s==null?void 0:s.left)||0,(s==null?void 0:s.top)||0,0,0)}},{key:"dirtifyWorldInternal",value:function(e,t){var i=this;if(!t.dirtyFlag){t.dirtyFlag=!0,t.frozen=!1,e.childNodes.forEach(function(o){var l=o.transformable;l.dirtyFlag||i.dirtifyWorldInternal(o,l)});var a=e,s=a.renderable;s&&(s.renderBoundsDirty=!0,s.boundsDirty=!0,s.dirty=!0)}}},{key:"syncHierarchy",value:function(e){var t=e.transformable;if(!t.frozen){t.frozen=!0,(t.localDirtyFlag||t.dirtyFlag)&&this.sync(e,t);for(var i=e.childNodes,a=0;a<i.length;a++)this.syncHierarchy(i[a])}}},{key:"sync",value:function(e,t){if(t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.dirtyFlag){var i=e.parentNode,a=i&&i.transformable;i===null||!a?L.copy(t.worldTransform,t.localTransform):L.multiply(t.worldTransform,a.worldTransform,t.localTransform),t.dirtyFlag=!1}}},{key:"unfreezeParentToRoot",value:function(e){for(var t=e.parentNode;t;){var i=t.transformable;i&&(i.frozen=!1),t=t.parentNode}}}])}(),G_={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]},QD=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,Cte=/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/,Mte=/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/,Pte=/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/,Nte=/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/,Ote=/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/,Rte=/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/,Ate=/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/,Lte=/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/,Ite=new RegExp("".concat(Cte.source,"|").concat(Pte.source,"|").concat(Ote.source,"|").concat(Ate.source)),Dte=new RegExp("".concat(Mte.source,"|").concat(Nte.source,"|").concat(Rte.source,"|").concat(Lte.source)),Fte=function(){function r(n){var e=this;Un(this,r),this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,i){return e.isBreakingSpace(i)?!1:!!(t&&(Dte.exec(i)||Ite.exec(t)))},this.trimByKinsokuShorui=function(t){var i=vl(t),a=i[i.length-2];if(!a)return t;var s=a[a.length-1];return i[i.length-2]=a.slice(0,-1),i[i.length-1]=s+i[i.length-1],i},this.runtime=n}return Vn(r,[{key:"measureFont",value:function(e,t){if(this.fontMetricsCache[e])return this.fontMetricsCache[e];var i={ascent:0,descent:0,fontSize:0},a=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(t),s=this.runtime.offscreenCanvasCreator.getOrCreateContext(t,{willReadFrequently:!0});s.font=e;var o=G_.MetricsString+G_.BaselineSymbol,l=Math.ceil(s.measureText(o).width),u=Math.ceil(s.measureText(G_.BaselineSymbol).width),c=G_.HeightMultiplier*u;u=u*G_.BaselineMultiplier|0,a.width=l,a.height=c,s.fillStyle="#f00",s.fillRect(0,0,l,c),s.font=e,s.textBaseline="alphabetic",s.fillStyle="#000",s.fillText(o,0,u);var d=s.getImageData(0,0,l||1,c||1).data,h=d.length,f=l*4,v=0,g=0,m=!1;for(v=0;v<u;++v){for(var y=0;y<f;y+=4)if(d[g+y]!==255){m=!0;break}if(!m)g+=f;else break}for(i.ascent=u-v,g=h-f,m=!1,v=c;v>u;--v){for(var w=0;w<f;w+=4)if(d[g+w]!==255){m=!0;break}if(!m)g-=f;else break}return i.descent=v-u,i.fontSize=i.ascent+i.descent,this.fontMetricsCache[e]=i,i}},{key:"measureText",value:function(e,t,i){var a=t.fontSize,s=a===void 0?16:a,o=t.wordWrap,l=o===void 0?!1:o,u=t.lineHeight,c=t.lineWidth,d=c===void 0?1:c,h=t.textBaseline,f=h===void 0?"alphabetic":h,v=t.textAlign,g=v===void 0?"start":v,m=t.letterSpacing,y=m===void 0?0:m,w=t.textPath;t.textPathSide,t.textPathStartOffset;var T=t.leading,G=T===void 0?0:T,x=Xee(t),_=this.measureFont(x,i);_.fontSize===0&&(_.fontSize=s,_.ascent=s);var p=this.runtime.offscreenCanvasCreator.getOrCreateContext(i);p.font=x,t.isOverflowing=!1;var b=l?this.wordWrap(e,t,i):e,R=b.split(/(?:\r\n|\r|\n)/),B=new Array(R.length),j=0;if(w){w.getTotalLength();for(var Z=0;Z<R.length;Z++)p.measureText(R[Z]).width+(R[Z].length-1)*y}else{for(var te=0;te<R.length;te++){var le=p.measureText(R[te]).width+(R[te].length-1)*y;B[te]=le,j=Math.max(j,le)}var ue=j+d,se=u||_.fontSize+d,V=Math.max(se,_.fontSize+d)+(R.length-1)*(se+G);se+=G;var ee=0;return f==="middle"?ee=-V/2:f==="bottom"||f==="alphabetic"||f==="ideographic"?ee=-V:(f==="top"||f==="hanging")&&(ee=0),{font:x,width:ue,height:V,lines:R,lineWidths:B,lineHeight:se,maxLineWidth:j,fontProperties:_,lineMetrics:B.map(function(he,ut){var ct=0;return g==="center"||g==="middle"?ct-=he/2:(g==="right"||g==="end")&&(ct-=he),new yp(ct-d/2,ee+ut*se,he+d,se)})}}}},{key:"wordWrap",value:function(e,t,i){var a=this,s=t.wordWrapWidth,o=s===void 0?0:s,l=t.letterSpacing,u=l===void 0?0:l,c=t.maxLines,d=c===void 0?1/0:c,h=t.textOverflow,f=this.runtime.offscreenCanvasCreator.getOrCreateContext(i),v=o+u,g="";h==="ellipsis"?g="...":h&&h!=="clip"&&(g=h);var m=[],y=0,w=0,T={},G=function(le){return a.getFromCache(le,u,T,f)},x=Array.from(g).reduce(function(te,le){return te+G(le)},0);function _(te){if(!(x<=0||x>v)){for(var le=m[te].length,ue=0,se=le,V=0;V<le;V++){var ee=G(m[te][V]);if(ue+ee+x>v){se=V;break}ue+=ee}m[te]=(m[te]||"").slice(0,se)+g}}for(var p=Array.from(e),b=0;b<p.length;b++){var R=p[b],B=e[b-1],j=e[b+1],Z=G(R);if(this.isNewline(R)){if(y++,y>=d){t.isOverflowing=!0,b<p.length-1&&_(y-1);break}w=0,m[y]="";continue}if(w>0&&w+Z>v){if(y+1>=d){t.isOverflowing=!0,_(y);break}if(y++,w=0,m[y]="",this.isBreakingSpace(R))continue;this.canBreakInLastChar(R)||(m=this.trimToBreakable(m),w=this.sumTextWidthByCache(m[y]||"",T)),this.shouldBreakByKinsokuShorui(R,j)&&(m=this.trimByKinsokuShorui(m),w+=G(B||""))}w+=Z,m[y]=(m[y]||"")+R}return m.join(`
|
|
|
`)}},{key:"isBreakingSpace",value:function(e){return typeof e!="string"?!1:G_.BreakingSpaces.indexOf(e.charCodeAt(0))>=0}},{key:"isNewline",value:function(e){return typeof e!="string"?!1:G_.Newlines.indexOf(e.charCodeAt(0))>=0}},{key:"trimToBreakable",value:function(e){var t=vl(e),i=t[t.length-2],a=this.findBreakableIndex(i);if(a===-1||!i)return t;var s=i.slice(a,a+1),o=this.isBreakingSpace(s),l=a+1,u=a+(o?0:1);return t[t.length-1]+=i.slice(l,i.length),t[t.length-2]=i.slice(0,u),t}},{key:"canBreakInLastChar",value:function(e){return!(e&&QD.test(e))}},{key:"sumTextWidthByCache",value:function(e,t){return e.split("").reduce(function(i,a){if(!t[a])throw Error("cannot count the word without cache");return i+t[a]},0)}},{key:"findBreakableIndex",value:function(e){for(var t=e.length-1;t>=0;t--)if(!QD.test(e[t]))return t;return-1}},{key:"getFromCache",value:function(e,t,i,a){var s=i[e];if(typeof s!="number"){var o=e.length*t;s=a.measureText(e).width+o,i[e]=s}return s}}])}(),lr={},Bte=function(r){var n=new lte,e=new ote;return r={},xr(xr(xr(xr(xr(xr(xr(xr(xr(xr(r,on.FRAGMENT,null),on.CIRCLE,new rte),on.ELLIPSE,new ite),on.RECT,n),on.IMAGE,n),on.GROUP,new cte),on.LINE,new ate),on.TEXT,new ute(lr)),on.POLYLINE,e),on.POLYGON,e),xr(xr(xr(r,on.PATH,new ste),on.HTML,new dte),on.MESH,null)}(),$te=function(r){var n=new yee,e=new KT;return r={},xr(xr(xr(xr(xr(xr(xr(xr(xr(xr(r,jn.PERCENTAGE,null),jn.NUMBER,new wee),jn.ANGLE,new mee),jn.DEFINED_PATH,new pee),jn.PAINT,n),jn.COLOR,n),jn.FILTER,new xee),jn.LENGTH,e),jn.LENGTH_PERCENTAGE,e),jn.LENGTH_PERCENTAGE_12,new Eee),xr(xr(xr(xr(xr(xr(xr(xr(xr(xr(r,jn.LENGTH_PERCENTAGE_14,new bee),jn.COORDINATE,new KT),jn.OFFSET_DISTANCE,new See),jn.OPACITY_VALUE,new Tee),jn.PATH,new Cee),jn.LIST_OF_POINTS,new Mee),jn.SHADOW_BLUR,new Pee),jn.TEXT,new Nee),jn.TEXT_TRANSFORM,new Oee),jn.TRANSFORM,new ete),xr(xr(xr(r,jn.TRANSFORM_ORIGIN,new tte),jn.Z_INDEX,new nte),jn.MARKER,new kee)}(),Gte=function(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof k.g!="undefined"?k.g:{}};lr.CameraContribution=iq,lr.AnimationTimeline=null,lr.EasingFunction=null,lr.offscreenCanvasCreator=new tC,lr.sceneGraphSelector=new mte,lr.sceneGraphService=new Tte(lr),lr.textService=new Fte(lr),lr.geometryUpdaterFactory=Bte,lr.CSSPropertySyntaxFactory=$te,lr.styleValueRegistry=new gee(lr),lr.layoutRegistry=null,lr.globalThis=Gte(),lr.enableStyleSyntax=!0,lr.enableSizeAttenuation=!1;var qD=0;function oNe(){qD=0}var e3=new rv(Is.INSERTED,null,"","","",0,"",""),t3=new rv(Is.REMOVED,null,"","","",0,"",""),zte=new nv(Is.DESTROY),Vte=function(r){function n(){var e;Un(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ba(this,n,[].concat(i)),e.entity=qD++,e.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},e.cullable={strategy:aq.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},e.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:[0,0,0],localRotation:[0,0,0,1],localScale:[1,1,1],localTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],localSkew:[0,0],position:[0,0,0],rotation:[0,0,0,1],scaling:[1,1,1],worldTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],origin:[0,0,0]},e.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},e.geometry={contentBounds:void 0,renderBounds:void 0,dirty:!0},e.rBushNode={aabb:void 0},e.namespaceURI="g",e.scrollLeft=0,e.scrollTop=0,e.clientTop=0,e.clientLeft=0,e.destroyed=!1,e.style={},e.computedStyle={},e.parsedStyle={},e.attributes={},e}return $a(n,r),Vn(n,[{key:"className",get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(t){return t!==""})}},{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 t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t+1]||null}return null}},{key:"previousSibling",get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t-1]||null}return null}},{key:"cloneNode",value:function(t){throw new Error(Yo)}},{key:"appendChild",value:function(t,i){var a;if(t.destroyed)throw new Error(HQ);return lr.sceneGraphService.attach(t,this,i),(a=this.ownerDocument)!==null&&a!==void 0&&a.defaultView&&(!QT(this)&&t.nodeName===on.FRAGMENT?this.ownerDocument.defaultView.mountFragment(t):this.ownerDocument.defaultView.mountChildren(t)),this.isMutationObserved&&(e3.relatedNode=this,t.dispatchEvent(e3)),t}},{key:"insertBefore",value:function(t,i){if(!i)this.appendChild(t);else{t.parentElement&&t.parentElement.removeChild(t);var a=this.childNodes.indexOf(i);a===-1?this.appendChild(t):this.appendChild(t,a)}return t}},{key:"replaceChild",value:function(t,i){var a=this.childNodes.indexOf(i);return this.removeChild(i),this.appendChild(t,a),i}},{key:"removeChild",value:function(t){var i;return t3.relatedNode=this,t.dispatchEvent(t3),(i=t.ownerDocument)!==null&&i!==void 0&&i.defaultView&&t.ownerDocument.defaultView.unmountChildren(t),lr.sceneGraphService.detach(t),t}},{key:"removeChildren",value:function(){for(var t=this.childNodes.length-1;t>=0;t--){var i=this.childNodes[t];this.removeChild(i)}}},{key:"destroyChildren",value:function(){for(var t=this.childNodes.length-1;t>=0;t--){var i=this.childNodes[t];i.childNodes.length>0&&i.destroyChildren(),i.destroy()}}},{key:"matches",value:function(t){return lr.sceneGraphService.matches(t,this)}},{key:"getElementById",value:function(t){return lr.sceneGraphService.querySelector("#".concat(t),this)}},{key:"getElementsByName",value:function(t){return lr.sceneGraphService.querySelectorAll('[name="'.concat(t,'"]'),this)}},{key:"getElementsByClassName",value:function(t){return lr.sceneGraphService.querySelectorAll(".".concat(t),this)}},{key:"getElementsByTagName",value:function(t){return lr.sceneGraphService.querySelectorAll(t,this)}},{key:"querySelector",value:function(t){return lr.sceneGraphService.querySelector(t,this)}},{key:"querySelectorAll",value:function(t){return lr.sceneGraphService.querySelectorAll(t,this)}},{key:"closest",value:function(t){var i=this;do{if(lr.sceneGraphService.matches(t,i))return i;i=i.parentElement}while(i!==null);return null}},{key:"find",value:function(t){var i=this,a=null;return this.forEach(function(s){return s!==i&&t(s)?(a=s,!1):!0}),a}},{key:"findAll",value:function(t){var i=this,a=[];return this.forEach(function(s){s!==i&&t(s)&&a.push(s)}),a}},{key:"after",value:function(){var t=this;if(this.parentNode){for(var i=this.parentNode.childNodes.indexOf(this),a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];s.forEach(function(l,u){var c;return(c=t.parentNode)===null||c===void 0?void 0:c.appendChild(l,i+u+1)})}}},{key:"before",value:function(){if(this.parentNode){for(var t,i=this.parentNode.childNodes.indexOf(this),a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];var l=s[0],u=s.slice(1);this.parentNode.appendChild(l,i),(t=l).after.apply(t,vl(u))}}},{key:"replaceWith",value:function(){this.after.apply(this,arguments),this.remove()}},{key:"append",value:function(){for(var t=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];a.forEach(function(o){return t.appendChild(o)})}},{key:"prepend",value:function(){for(var t=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];a.forEach(function(o,l){return t.appendChild(o,l)})}},{key:"replaceChildren",value:function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)}},{key:"remove",value:function(){return this.parentNode?this.parentNode.removeChild(this):this}},{key:"destroy",value:function(){this.destroyChildren(),this.dispatchEvent(zte),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0}},{key:"getGeometryBounds",value:function(){return lr.sceneGraphService.getGeometryBounds(this)}},{key:"getRenderBounds",value:function(){return lr.sceneGraphService.getBounds(this,!0)}},{key:"getBounds",value:function(){return lr.sceneGraphService.getBounds(this)}},{key:"getLocalBounds",value:function(){return lr.sceneGraphService.getLocalBounds(this)}},{key:"getBoundingClientRect",value:function(){return lr.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(t){if(typeof t!="symbol"){var i=this.attributes[t];return i}}},{key:"hasAttribute",value:function(t){return this.getAttributeNames().includes(t)}},{key:"hasAttributes",value:function(){return!!this.getAttributeNames().length}},{key:"removeAttribute",value:function(t){this.setAttribute(t,null),delete this.attributes[t]}},{key:"setAttribute",value:function(t,i,a,s){this.attributes[t]=i}},{key:"getAttributeNS",value:function(t,i){throw new Error(Yo)}},{key:"getAttributeNode",value:function(t){throw new Error(Yo)}},{key:"getAttributeNodeNS",value:function(t,i){throw new Error(Yo)}},{key:"hasAttributeNS",value:function(t,i){throw new Error(Yo)}},{key:"removeAttributeNS",value:function(t,i){throw new Error(Yo)}},{key:"removeAttributeNode",value:function(t){throw new Error(Yo)}},{key:"setAttributeNS",value:function(t,i,a){throw new Error(Yo)}},{key:"setAttributeNode",value:function(t){throw new Error(Yo)}},{key:"setAttributeNodeNS",value:function(t){throw new Error(Yo)}},{key:"toggleAttribute",value:function(t,i){throw new Error(Yo)}}])}(Mg);function Ga(r){return!!(r!=null&&r.nodeName)}var Ute=lr.globalThis.Proxy?lr.globalThis.Proxy:function(){},jv=new rv(Is.ATTR_MODIFIED,null,null,null,null,rv.MODIFICATION,null,null),Oy=E.Ue(),jte=X.Ue(),Ol=function(r){function n(e){var t;return Un(this,n),t=Ba(this,n),t.isCustomElement=!1,t.isMutationObserved=!1,t.activeAnimations=[],t.config=e,t.id=e.id||"",t.name=e.name||"",(e.className||e.class)&&(t.className=e.className||e.class),t.nodeName=e.type||on.GROUP,e.initialParsedStyle&&Object.assign(t.parsedStyle,e.initialParsedStyle),t.initAttributes(e.style),lr.enableStyleSyntax&&(t.style=new Ute({setProperty:function(a,s){t.setAttribute(a,s)},getPropertyValue:function(a){return t.getAttribute(a)},removeProperty:function(a){t.removeAttribute(a)},item:function(){return""}},{get:function(a,s){return a[s]!==void 0?a[s]:t.getAttribute(s)},set:function(a,s,o){return t.setAttribute(s,o),!0}})),t}return $a(n,r),Vn(n,[{key:"destroy",value:function(){WI(n,"destroy",this,3)([]),this.getAnimations().forEach(function(t){t.cancel()})}},{key:"cloneNode",value:function(t,i){var a=Oa({},this.attributes);for(var s in a){var o=a[s];Ga(o)&&s!=="clipPath"&&s!=="offsetPath"&&s!=="textPath"&&(a[s]=o.cloneNode(t)),i&&(a[s]=i(s,o))}var l=new this.constructor(Oa(Oa({},this.config),{},{style:a}));return l.setLocalTransform(this.getLocalTransform()),t&&this.children.forEach(function(u){if(!u.style.isMarker){var c=u.cloneNode(t);l.appendChild(c)}}),l}},{key:"initAttributes",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i={forceUpdateGeometry:!0};lr.styleValueRegistry.processProperties(this,t,i),this.renderable.dirty=!0}},{key:"setAttribute",value:function(t,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;(0,ie.Z)(i)||(a||i!==this.attributes[t])&&(this.internalSetAttribute(t,i,{memoize:s}),WI(n,"setAttribute",this,3)([t,i]))}},{key:"internalSetAttribute",value:function(t,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=this.renderable,o=this.attributes[t],l=this.parsedStyle[t];lr.styleValueRegistry.processProperties(this,xr({},t,i),a),s.dirty=!0;var u=this.parsedStyle[t];if(this.isConnected&&(jv.relatedNode=this,jv.prevValue=o,jv.newValue=i,jv.attrName=t,jv.prevParsedValue=l,jv.newParsedValue=u,this.isMutationObserved?this.dispatchEvent(jv):(jv.target=this,this.ownerDocument.defaultView.dispatchEvent(jv,!0))),this.isCustomElement&&this.isConnected||!this.isCustomElement){var c,d;(c=(d=this).attributeChangedCallback)===null||c===void 0||c.call(d,t,o,i,l,u)}}},{key:"getBBox",value:function(){var t=this.getBounds(),i=t.getMin(),a=aa(i,2),s=a[0],o=a[1],l=t.getMax(),u=aa(l,2),c=u[0],d=u[1];return new yp(s,o,c-s,d-o)}},{key:"setOrigin",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return lr.sceneGraphService.setOrigin(this,Vc(t,i,a,!1)),this}},{key:"getOrigin",value:function(){return lr.sceneGraphService.getOrigin(this)}},{key:"setPosition",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return lr.sceneGraphService.setPosition(this,Vc(t,i,a,!1)),this}},{key:"setLocalPosition",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return lr.sceneGraphService.setLocalPosition(this,Vc(t,i,a,!1)),this}},{key:"translate",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return lr.sceneGraphService.translate(this,Vc(t,i,a,!1)),this}},{key:"translateLocal",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return lr.sceneGraphService.translateLocal(this,Vc(t,i,a,!1)),this}},{key:"getPosition",value:function(){return lr.sceneGraphService.getPosition(this)}},{key:"getLocalPosition",value:function(){return lr.sceneGraphService.getLocalPosition(this)}},{key:"scale",value:function(t,i,a){return this.scaleLocal(t,i,a)}},{key:"scaleLocal",value:function(t,i,a){return typeof t=="number"&&(i=i||t,a=a||t,t=Vc(t,i,a,!1)),lr.sceneGraphService.scaleLocal(this,t),this}},{key:"setLocalScale",value:function(t,i,a){return typeof t=="number"&&(i=i||t,a=a||t,t=Vc(t,i,a,!1)),lr.sceneGraphService.setLocalScale(this,t),this}},{key:"getLocalScale",value:function(){return lr.sceneGraphService.getLocalScale(this)}},{key:"getScale",value:function(){return lr.sceneGraphService.getScale(this)}},{key:"getEulerAngles",value:function(){var t=LT(Oy,lr.sceneGraphService.getWorldTransform(this)),i=aa(t,3),a=i[2];return nh(a)}},{key:"getLocalEulerAngles",value:function(){var t=LT(Oy,lr.sceneGraphService.getLocalRotation(this)),i=aa(t,3),a=i[2];return nh(a)}},{key:"setEulerAngles",value:function(t){return lr.sceneGraphService.setEulerAngles(this,0,0,t),this}},{key:"setLocalEulerAngles",value:function(t){return lr.sceneGraphService.setLocalEulerAngles(this,0,0,t),this}},{key:"rotateLocal",value:function(t,i,a){return(0,xe.Z)(i)&&(0,xe.Z)(a)?lr.sceneGraphService.rotateLocal(this,0,0,t):lr.sceneGraphService.rotateLocal(this,t,i,a),this}},{key:"rotate",value:function(t,i,a){return(0,xe.Z)(i)&&(0,xe.Z)(a)?lr.sceneGraphService.rotate(this,0,0,t):lr.sceneGraphService.rotate(this,t,i,a),this}},{key:"setRotation",value:function(t,i,a,s){return lr.sceneGraphService.setRotation(this,t,i,a,s),this}},{key:"setLocalRotation",value:function(t,i,a,s){return lr.sceneGraphService.setLocalRotation(this,t,i,a,s),this}},{key:"setLocalSkew",value:function(t,i){return lr.sceneGraphService.setLocalSkew(this,t,i),this}},{key:"getRotation",value:function(){return lr.sceneGraphService.getRotation(this)}},{key:"getLocalRotation",value:function(){return lr.sceneGraphService.getLocalRotation(this)}},{key:"getLocalSkew",value:function(){return lr.sceneGraphService.getLocalSkew(this)}},{key:"getLocalTransform",value:function(){return lr.sceneGraphService.getLocalTransform(this)}},{key:"getWorldTransform",value:function(){return lr.sceneGraphService.getWorldTransform(this)}},{key:"setLocalTransform",value:function(t){return lr.sceneGraphService.setLocalTransform(this,t),this}},{key:"resetLocalTransform",value:function(){lr.sceneGraphService.resetLocalTransform(this)}},{key:"getAnimations",value:function(){return this.activeAnimations}},{key:"animate",value:function(t,i){var a,s=(a=this.ownerDocument)===null||a===void 0?void 0:a.timeline;return s?s.play(this,t,i):null}},{key:"isVisible",value:function(){var t;return((t=this.parsedStyle)===null||t===void 0?void 0:t.visibility)!=="hidden"}},{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}},{key:"isInteractive",value:function(){var t;return((t=this.parsedStyle)===null||t===void 0?void 0:t.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,vl(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})))+1),this}},{key:"toBack",value:function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,vl(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})))-1),this}},{key:"getConfig",value:function(){return this.config}},{key:"attr",value:function(){for(var t=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var o=a[0],l=a[1];return o?(0,Gs.Z)(o)?(Object.keys(o).forEach(function(u){t.setAttribute(u,o[u])}),this):a.length===2?(this.setAttribute(o,l),this):this.attributes[o]:this.attributes}},{key:"getMatrix",value:function(t){var i=t||this.getWorldTransform(),a=L.getTranslation(Oy,i),s=aa(a,2),o=s[0],l=s[1],u=L.getScaling(Oy,i),c=aa(u,2),d=c[0],h=c[1],f=L.getRotation(jte,i),v=LT(Oy,f),g=aa(v,3),m=g[0],y=g[2];return QQ(m||y,o,l,d,h)}},{key:"getLocalMatrix",value:function(){return this.getMatrix(this.getLocalTransform())}},{key:"setMatrix",value:function(t){var i=aD(t),a=aa(i,5),s=a[0],o=a[1],l=a[2],u=a[3],c=a[4];this.setEulerAngles(c).setPosition(s,o).setLocalScale(l,u)}},{key:"setLocalMatrix",value:function(t){var i=aD(t),a=aa(i,5),s=a[0],o=a[1],l=a[2],u=a[3],c=a[4];this.setLocalEulerAngles(c).setLocalPosition(s,o).setLocalScale(l,u)}},{key:"show",value:function(){this.forEach(function(t){t.style.visibility="visible"})}},{key:"hide",value:function(){this.forEach(function(t){t.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(t){return this.children[t]||null}},{key:"add",value:function(t,i){return this.appendChild(t,i)}},{key:"set",value:function(t,i){this.config[t]=i}},{key:"get",value:function(t){return this.config[t]}},{key:"moveTo",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(t,i,a),this}},{key:"move",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(t,i,a),this}},{key:"setZIndex",value:function(t){return this.style.zIndex=t,this}}])}(Vte);Ol.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 Hte=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Un(this,n),Ba(this,n,[Oa({type:on.CIRCLE},e)])}return $a(n,r),Vn(n)}(Ol);Hte.PARSED_STYLE_LIST=new Set([].concat(vl(Ol.PARSED_STYLE_LIST),["cx","cy","cz","r","isBillboard","isSizeAttenuation"]));var lNe=null,uNe=null,Wte=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Un(this,n),Ba(this,n,[Oa({type:on.ELLIPSE},e)])}return $a(n,r),Vn(n)}(Ol);Wte.PARSED_STYLE_LIST=new Set([].concat(vl(Ol.PARSED_STYLE_LIST),["cx","cy","cz","rx","ry","isBillboard","isSizeAttenuation"]));var cNe=null,Yte=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Un(this,n),Ba(this,n,[Oa({type:on.GROUP},e)])}return $a(n,r),Vn(n)}(Ol);Yte.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var Zte=["style"],Xte=function(r){function n(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.style,a=mp(t,Zte);return Un(this,n),e=Ba(this,n,[Oa({type:on.HTML,style:i},a)]),e.cullable.enable=!1,e}return $a(n,r),Vn(n,[{key:"getDomElement",value:function(){return this.parsedStyle.$el}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"getLocalBounds",value:function(){if(this.parentNode){var t=L.invert(L.create(),this.parentNode.getWorldTransform()),i=this.getBounds();if(!au.isEmpty(i)){var a=new au;return a.setFromTransformedAABB(i,t),a}}return this.getBounds()}}])}(Ol);Xte.PARSED_STYLE_LIST=new Set([].concat(vl(Ol.PARSED_STYLE_LIST),["x","y","$el","innerHTML","width","height"]));var Kte=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Un(this,n),Ba(this,n,[Oa({type:on.IMAGE},e)])}return $a(n,r),Vn(n)}(Ol);Kte.PARSED_STYLE_LIST=new Set([].concat(vl(Ol.PARSED_STYLE_LIST),["x","y","z","src","width","height","isBillboard","billboardRotation","isSizeAttenuation","keepAspectRatio"]));var Jte=["style"],Qte=function(r){function n(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.style,a=mp(t,Jte);Un(this,n),e=Ba(this,n,[Oa({type:on.LINE,style:Oa({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},i)},a)]),e.markerStartAngle=0,e.markerEndAngle=0;var s=e.parsedStyle,o=s.markerStart,l=s.markerEnd;return o&&Ga(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),l&&Ga(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return $a(n,r),Vn(n,[{key:"attributeChangedCallback",value:function(t,i,a,s,o){t==="x1"||t==="y1"||t==="x2"||t==="y2"||t==="markerStartOffset"||t==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):t==="markerStart"?(s&&Ga(s)&&(this.markerStartAngle=0,s.remove()),o&&Ga(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):t==="markerEnd"&&(s&&Ga(s)&&(this.markerEndAngle=0,s.remove()),o&&Ga(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1)))}},{key:"transformMarker",value:function(t){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=i.x1,c=i.x2,d=i.y1,h=i.y2,f=t?a:s;if(!(!f||!Ga(f))){var v=0,g,m,y,w,T,G;t?(y=u,w=d,g=c-u,m=h-d,T=o||0,G=this.markerStartAngle):(y=c,w=h,g=u-c,m=d-h,T=l||0,G=this.markerEndAngle),v=Math.atan2(m,g),f.setLocalEulerAngles(v*180/Math.PI+G),f.setLocalPosition(y+Math.cos(v)*T,w+Math.sin(v)*T)}}},{key:"getPoint",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle,s=a.x1,o=a.y1,l=a.x2,u=a.y2,c=(0,Nt.U4)(s,o,l,u,t),d=c.x,h=c.y,f=E.fF(E.Ue(),E.al(d,h,0),i?this.getWorldTransform():this.getLocalTransform());return new bd(f[0],f[1])}},{key:"getPointAtLength",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(t/this.getTotalLength(),i)}},{key:"getTotalLength",value:function(){var t=this.parsedStyle,i=t.x1,a=t.y1,s=t.x2,o=t.y2;return(0,Nt.Xk)(i,a,s,o)}}])}(Ol);Qte.PARSED_STYLE_LIST=new Set([].concat(vl(Ol.PARSED_STYLE_LIST),["x1","y1","x2","y2","z1","z2","isBillboard","isSizeAttenuation","markerStart","markerEnd","markerStartOffset","markerEndOffset"]));var qte=["style"],ene=function(r){function n(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.style,a=mp(t,qte);Un(this,n),e=Ba(this,n,[Oa({type:on.PATH,style:i,initialParsedStyle:{miterLimit:4,d:Oa({},uD)}},a)]),e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[];var s=e.parsedStyle,o=s.markerStart,l=s.markerEnd,u=s.markerMid;return o&&Ga(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),u&&Ga(u)&&e.placeMarkerMid(u),l&&Ga(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return $a(n,r),Vn(n,[{key:"attributeChangedCallback",value:function(t,i,a,s,o){t==="d"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):t==="markerStartOffset"||t==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):t==="markerStart"?(s&&Ga(s)&&(this.markerStartAngle=0,s.remove()),o&&Ga(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):t==="markerEnd"?(s&&Ga(s)&&(this.markerEndAngle=0,s.remove()),o&&Ga(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1))):t==="markerMid"&&this.placeMarkerMid(o)}},{key:"transformMarker",value:function(t){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=t?a:s;if(!(!u||!Ga(u))){var c=0,d,h,f,v,g,m;if(t){var y=this.getStartTangent(),w=aa(y,2),T=w[0],G=w[1];f=G[0],v=G[1],d=T[0]-G[0],h=T[1]-G[1],g=o||0,m=this.markerStartAngle}else{var x=this.getEndTangent(),_=aa(x,2),p=_[0],b=_[1];f=b[0],v=b[1],d=p[0]-b[0],h=p[1]-b[1],g=l||0,m=this.markerEndAngle}c=Math.atan2(h,d),u.setLocalEulerAngles(c*180/Math.PI+m),u.setLocalPosition(f+Math.cos(c)*g,v+Math.sin(c)*g)}}},{key:"placeMarkerMid",value:function(t){var i=this.parsedStyle.d.segments;if(this.markerMidList.forEach(function(c){c.remove()}),t&&Ga(t))for(var a=1;a<i.length-1;a++){var s=aa(i[a].currentPoint,2),o=s[0],l=s[1],u=a===1?t:t.cloneNode(!0);this.markerMidList.push(u),this.appendChild(u),u.setLocalPosition(o,l)}}},{key:"getTotalLength",value:function(){return HT(this)}},{key:"getPointAtLength",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle.d.absolutePath,s=(0,jm.r)(a,t),o=s.x,l=s.y,u=E.fF(E.Ue(),E.al(o,l,0),i?this.getWorldTransform():this.getLocalTransform());return new bd(u[0],u[1])}},{key:"getPoint",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPointAtLength(t*HT(this),i)}},{key:"getStartTangent",value:function(){var t=this.parsedStyle.d.segments,i=[];if(t.length>1){var a=t[0].currentPoint,s=t[1].currentPoint,o=t[1].startTangent;i=[],o?(i.push([a[0]-o[0],a[1]-o[1]]),i.push([a[0],a[1]])):(i.push([s[0],s[1]]),i.push([a[0],a[1]]))}return i}},{key:"getEndTangent",value:function(){var t=this.parsedStyle.d.segments,i=t.length,a=[];if(i>1){var s=t[i-2].currentPoint,o=t[i-1].currentPoint,l=t[i-1].endTangent;a=[],l?(a.push([o[0]-l[0],o[1]-l[1]]),a.push([o[0],o[1]])):(a.push([s[0],s[1]]),a.push([o[0],o[1]]))}return a}}])}(Ol);ene.PARSED_STYLE_LIST=new Set([].concat(vl(Ol.PARSED_STYLE_LIST),["d","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard","isSizeAttenuation"]));var tne=["style"],rC=function(r){function n(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.style,a=mp(t,tne);Un(this,n),e=Ba(this,n,[Oa({type:on.POLYGON,style:i,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},a)]),e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[];var s=e.parsedStyle,o=s.markerStart,l=s.markerEnd,u=s.markerMid;return o&&Ga(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),u&&Ga(u)&&e.placeMarkerMid(u),l&&Ga(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return $a(n,r),Vn(n,[{key:"attributeChangedCallback",value:function(t,i,a,s,o){t==="points"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):t==="markerStartOffset"||t==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):t==="markerStart"?(s&&Ga(s)&&(this.markerStartAngle=0,s.remove()),o&&Ga(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):t==="markerEnd"?(s&&Ga(s)&&(this.markerEndAngle=0,s.remove()),o&&Ga(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1))):t==="markerMid"&&this.placeMarkerMid(o)}},{key:"transformMarker",value:function(t){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=i.points,c=u||{},d=c.points,h=t?a:s;if(!(!h||!Ga(h)||!d)){var f=0,v,g,m,y,w,T;if(m=d[0][0],y=d[0][1],t)v=d[1][0]-d[0][0],g=d[1][1]-d[0][1],w=o||0,T=this.markerStartAngle;else{var G=d.length;this.parsedStyle.isClosed?(v=d[G-1][0]-d[0][0],g=d[G-1][1]-d[0][1]):(m=d[G-1][0],y=d[G-1][1],v=d[G-2][0]-d[G-1][0],g=d[G-2][1]-d[G-1][1]),w=l||0,T=this.markerEndAngle}f=Math.atan2(g,v),h.setLocalEulerAngles(f*180/Math.PI+T),h.setLocalPosition(m+Math.cos(f)*w,y+Math.sin(f)*w)}}},{key:"placeMarkerMid",value:function(t){var i=this.parsedStyle.points,a=i||{},s=a.points;if(this.markerMidList.forEach(function(d){d.remove()}),this.markerMidList=[],t&&Ga(t)&&s)for(var o=1;o<(this.parsedStyle.isClosed?s.length:s.length-1);o++){var l=s[o][0],u=s[o][1],c=o===1?t:t.cloneNode(!0);this.markerMidList.push(c),this.appendChild(c),c.setLocalPosition(l,u)}}}])}(Ol);rC.PARSED_STYLE_LIST=new Set([].concat(vl(Ol.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isClosed","isBillboard","isSizeAttenuation"]));var nne=["style"],rne=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.style,i=mp(e,nne);return Un(this,n),Ba(this,n,[Oa({type:on.POLYLINE,style:t,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},i)])}return $a(n,r),Vn(n,[{key:"getTotalLength",value:function(){return zq(this)}},{key:"getPointAtLength",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(t/this.getTotalLength(),i)}},{key:"getPoint",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle.points.points;if(this.parsedStyle.points.segments.length===0){var s=[],o=0,l,u,c=this.getTotalLength();a.forEach(function(y,w){a[w+1]&&(l=[0,0],l[0]=o/c,u=(0,Nt.Xk)(y[0],y[1],a[w+1][0],a[w+1][1]),o+=u,l[1]=o/c,s.push(l))}),this.parsedStyle.points.segments=s}var d=0,h=0;this.parsedStyle.points.segments.forEach(function(y,w){t>=y[0]&&t<=y[1]&&(d=(t-y[0])/(y[1]-y[0]),h=w)});var f=(0,Nt.U4)(a[h][0],a[h][1],a[h+1][0],a[h+1][1],d),v=f.x,g=f.y,m=E.fF(E.Ue(),E.al(v,g,0),i?this.getWorldTransform():this.getLocalTransform());return new bd(m[0],m[1])}},{key:"getStartTangent",value:function(){var t=this.parsedStyle.points.points,i=[];return i.push([t[1][0],t[1][1]]),i.push([t[0][0],t[0][1]]),i}},{key:"getEndTangent",value:function(){var t=this.parsedStyle.points.points,i=t.length-1,a=[];return a.push([t[i-1][0],t[i-1][1]]),a.push([t[i][0],t[i][1]]),a}}])}(rC);rne.PARSED_STYLE_LIST=new Set([].concat(vl(rC.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard"]));var ine=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Un(this,n),Ba(this,n,[Oa({type:on.RECT},e)])}return $a(n,r),Vn(n)}(Ol);ine.PARSED_STYLE_LIST=new Set([].concat(vl(Ol.PARSED_STYLE_LIST),["x","y","z","width","height","isBillboard","isSizeAttenuation","radius"]));var ane=["style"],sne=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.style,i=mp(e,ane);return Un(this,n),Ba(this,n,[Oa({type:on.TEXT,style:Oa({fill:"black"},t)},i)])}return $a(n,r),Vn(n,[{key:"getComputedTextLength",value:function(){var t;return this.getGeometryBounds(),((t=this.parsedStyle.metrics)===null||t===void 0?void 0:t.maxLineWidth)||0}},{key:"getLineBoundingRects",value:function(){var t;return this.getGeometryBounds(),((t=this.parsedStyle.metrics)===null||t===void 0?void 0:t.lineMetrics)||[]}},{key:"isOverflowing",value:function(){return this.getGeometryBounds(),!!this.parsedStyle.isOverflowing}}])}(Ol);sne.PARSED_STYLE_LIST=new Set([].concat(vl(Ol.PARSED_STYLE_LIST),["x","y","z","isBillboard","billboardRotation","isSizeAttenuation","text","textAlign","textBaseline","fontStyle","fontSize","fontFamily","fontWeight","fontVariant","lineHeight","letterSpacing","leading","wordWrap","wordWrapWidth","maxLines","textOverflow","isOverflowing","textPath","textDecorationLine","textDecorationColor","textDecorationStyle","textPathSide","textPathStartOffset","metrics","dx","dy"]));var dNe=null,hNe={number:function(n){return new hs(n)},percent:function(n){return new hs(n,"%")},px:function(n){return new hs(n,"px")},em:function(n){return new hs(n,"em")},rem:function(n){return new hs(n,"rem")},deg:function(n){return new hs(n,"deg")},grad:function(n){return new hs(n,"grad")},rad:function(n){return new hs(n,"rad")},turn:function(n){return new hs(n,"turn")},s:function(n){return new hs(n,"s")},ms:function(n){return new hs(n,"ms")},registerProperty:function(n){var e=n.name,t=n.inherits,i=n.interpolable,a=n.initialValue,s=n.syntax;lr.styleValueRegistry.registerMetadata({n:e,inh:t,int:i,d:a,syntax:s})},registerLayout:function(n,e){lr.layoutRegistry.registerLayout(n,e)}},fNe=null,one=function(){function r(n){Un(this,r),this.strategies=n}return Vn(r,[{key:"apply",value:function(e){var t=e.camera,i=e.renderingService,a=e.renderingContext,s=this.strategies;i.hooks.cull.tap(r.tag,function(o){if(o){var l=o.cullable;return s.length===0?l.visible=a.unculledEntities.indexOf(o.entity)>-1:l.visible=s.every(function(u){return u.isVisible(t,o)}),!o.isCulled()&&o.isVisible()?o:(o.dispatchEvent(new nv(Is.CULLED)),null)}return o}),i.hooks.afterRender.tap(r.tag,function(o){o.cullable.visibilityPlaneMask=-1})}}])}();one.tag="Culling";var lne=function(){function r(){var n=this;Un(this,r),this.autoPreventDefault=!1,this.rootPointerEvent=new hte(null),this.rootWheelEvent=new fte(null),this.onPointerMove=function(e){var t,i=(t=n.context.renderingContext.root)===null||t===void 0||(t=t.ownerDocument)===null||t===void 0?void 0:t.defaultView;if(!(i.supportsTouchEvents&&e.pointerType==="touch")){var a=n.normalizeToPointerEvent(e,i),s=I_(a),o;try{for(s.s();!(o=s.n()).done;){var l=o.value,u=n.bootstrapEvent(n.rootPointerEvent,l,i,e);n.context.eventService.mapEvent(u)}}catch(c){s.e(c)}finally{s.f()}n.setCursor(n.context.eventService.cursor)}},this.onClick=function(e){var t,i=(t=n.context.renderingContext.root)===null||t===void 0||(t=t.ownerDocument)===null||t===void 0?void 0:t.defaultView,a=n.normalizeToPointerEvent(e,i),s=I_(a),o;try{for(s.s();!(o=s.n()).done;){var l=o.value,u=n.bootstrapEvent(n.rootPointerEvent,l,i,e);n.context.eventService.mapEvent(u)}}catch(c){s.e(c)}finally{s.f()}n.setCursor(n.context.eventService.cursor)}}return Vn(r,[{key:"apply",value:function(e){var t=this;this.context=e;var i=e.renderingService,a=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(s){var o=t.context.renderingService.hooks.pickSync.call({position:s,picked:[],topmost:!0}),l=o.picked;return l[0]||null}),i.hooks.pointerWheel.tap(r.tag,function(s){var o=t.normalizeWheelEvent(s);t.context.eventService.mapEvent(o)}),i.hooks.pointerDown.tap(r.tag,function(s){if(!(a.supportsTouchEvents&&s.pointerType==="touch")){var o=t.normalizeToPointerEvent(s,a);if(t.autoPreventDefault&&o[0].isNormalized){var l=s.cancelable||!("cancelable"in s);l&&s.preventDefault()}var u=I_(o),c;try{for(u.s();!(c=u.n()).done;){var d=c.value,h=t.bootstrapEvent(t.rootPointerEvent,d,a,s);t.context.eventService.mapEvent(h)}}catch(f){u.e(f)}finally{u.f()}t.setCursor(t.context.eventService.cursor)}}),i.hooks.pointerUp.tap(r.tag,function(s){if(!(a.supportsTouchEvents&&s.pointerType==="touch")){var o=t.context.contextService.getDomElement(),l=t.context.eventService.isNativeEventFromCanvas(o,s),u=l?"":"outside",c=t.normalizeToPointerEvent(s,a),d=I_(c),h;try{for(d.s();!(h=d.n()).done;){var f=h.value,v=t.bootstrapEvent(t.rootPointerEvent,f,a,s);v.type+=u,t.context.eventService.mapEvent(v)}}catch(g){d.e(g)}finally{d.f()}t.setCursor(t.context.eventService.cursor)}}),i.hooks.pointerMove.tap(r.tag,this.onPointerMove),i.hooks.pointerOver.tap(r.tag,this.onPointerMove),i.hooks.pointerOut.tap(r.tag,this.onPointerMove),i.hooks.click.tap(r.tag,this.onClick),i.hooks.pointerCancel.tap(r.tag,function(s){var o=t.normalizeToPointerEvent(s,a),l=I_(o),u;try{for(l.s();!(u=l.n()).done;){var c=u.value,d=t.bootstrapEvent(t.rootPointerEvent,c,a,s);t.context.eventService.mapEvent(d)}}catch(h){l.e(h)}finally{l.f()}t.setCursor(t.context.eventService.cursor)})}},{key:"bootstrapEvent",value:function(e,t,i,a){e.view=i,e.originalEvent=null,e.nativeEvent=a,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this.transferMouseData(e,t);var s=this.context.eventService.client2Viewport({x:t.clientX,y:t.clientY}),o=s.x,l=s.y;e.viewport.x=o,e.viewport.y=l;var u=this.context.eventService.viewport2Canvas(e.viewport),c=u.x,d=u.y;return e.canvas.x=c,e.canvas.y=d,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.isTrusted=a.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=Iee[e.type]||e.type),e}},{key:"normalizeWheelEvent",value:function(e){var t=this.rootWheelEvent;this.transferMouseData(t,e),t.deltaMode=e.deltaMode,t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ;var i=this.context.eventService.client2Viewport({x:e.clientX,y:e.clientY}),a=i.x,s=i.y;t.viewport.x=a,t.viewport.y=s;var o=this.context.eventService.viewport2Canvas(t.viewport),l=o.x,u=o.y;return t.canvas.x=l,t.canvas.y=u,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.nativeEvent=e,t.type=e.type,t}},{key:"transferMouseData",value:function(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=Dee.now(),e.type=t.type,e.altKey=t.altKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.ctrlKey=t.ctrlKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.screen.x=t.screenX,e.screen.y=t.screenY,e.relatedTarget=null}},{key:"setCursor",value:function(e){this.context.contextService.applyCursorStyle(e||this.context.config.cursor||"default")}},{key:"normalizeToPointerEvent",value:function(e,t){var i=[];if(t.isTouchEvent(e))for(var a=0;a<e.changedTouches.length;a++){var s=e.changedTouches[a];(0,ie.Z)(s.button)&&(s.button=0),(0,ie.Z)(s.buttons)&&(s.buttons=1),(0,ie.Z)(s.isPrimary)&&(s.isPrimary=e.touches.length===1&&e.type==="touchstart"),(0,ie.Z)(s.width)&&(s.width=s.radiusX||1),(0,ie.Z)(s.height)&&(s.height=s.radiusY||1),(0,ie.Z)(s.tiltX)&&(s.tiltX=0),(0,ie.Z)(s.tiltY)&&(s.tiltY=0),(0,ie.Z)(s.pointerType)&&(s.pointerType="touch"),(0,ie.Z)(s.pointerId)&&(s.pointerId=s.identifier||0),(0,ie.Z)(s.pressure)&&(s.pressure=s.force||.5),(0,ie.Z)(s.twist)&&(s.twist=0),(0,ie.Z)(s.tangentialPressure)&&(s.tangentialPressure=0),s.isNormalized=!0,s.type=e.type,i.push(s)}else if(t.isMouseEvent(e)){var o=e;(0,ie.Z)(o.isPrimary)&&(o.isPrimary=!0),(0,ie.Z)(o.width)&&(o.width=1),(0,ie.Z)(o.height)&&(o.height=1),(0,ie.Z)(o.tiltX)&&(o.tiltX=0),(0,ie.Z)(o.tiltY)&&(o.tiltY=0),(0,ie.Z)(o.pointerType)&&(o.pointerType="mouse"),(0,ie.Z)(o.pointerId)&&(o.pointerId=Lee),(0,ie.Z)(o.pressure)&&(o.pressure=.5),(0,ie.Z)(o.twist)&&(o.twist=0),(0,ie.Z)(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,i.push(o)}else i.push(e);return i}}])}();lne.tag="Event";var vNe=[on.CIRCLE,on.ELLIPSE,on.IMAGE,on.RECT,on.LINE,on.POLYLINE,on.POLYGON,on.TEXT,on.PATH,on.HTML],gNe=null,une=function(){function r(){Un(this,r),this.syncTasks=new Map,this.isFirstTimeRendering=!0,this.syncing=!1,this.isFirstTimeRenderingFinished=!1}return Vn(r,[{key:"apply",value:function(e){var t=this,i,a=e.renderingService,s=e.renderingContext,o=e.rBushRoot,l=s.root.ownerDocument.defaultView;this.rBush=o;var u=function(g){var m=g.target;m.renderable.dirty=!0,a.dirtify()},c=function(g){t.syncTasks.set(g.target,g.detail.affectChildren),a.dirtify()},d=function(g){var m=g.target;lr.enableSizeAttenuation&&lr.styleValueRegistry.updateSizeAttenuation(m,l.getCamera().getZoom())},h=function(g){var m=g.target,y=m.rBushNode;y.aabb&&t.rBush.remove(y.aabb),t.syncTasks.delete(m),lr.sceneGraphService.dirtifyToRoot(m),a.dirtify()};a.hooks.init.tap(r.tag,function(){l.addEventListener(Is.MOUNTED,d),l.addEventListener(Is.UNMOUNTED,h),l.addEventListener(Is.ATTR_MODIFIED,u),l.addEventListener(Is.BOUNDS_CHANGED,c)}),a.hooks.destroy.tap(r.tag,function(){l.removeEventListener(Is.MOUNTED,d),l.removeEventListener(Is.UNMOUNTED,h),l.removeEventListener(Is.ATTR_MODIFIED,u),l.removeEventListener(Is.BOUNDS_CHANGED,c),t.syncTasks.clear()});var f=(i=lr.globalThis.requestIdleCallback)!==null&&i!==void 0?i:jD.bind(lr.globalThis);a.hooks.endFrame.tap(r.tag,function(){t.isFirstTimeRendering?(t.isFirstTimeRendering=!1,t.syncing=!0,f(function(){t.syncRTree(!0),t.isFirstTimeRenderingFinished=!0})):t.syncRTree()})}},{key:"syncNode",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.isConnected){var i=e.rBushNode;i.aabb&&this.rBush.remove(i.aabb);var a=e.getRenderBounds();if(a){var s=e.renderable;t&&(s.dirtyRenderBounds||(s.dirtyRenderBounds=new au),s.dirtyRenderBounds.update(a.center,a.halfExtents));var o=a.getMin(),l=aa(o,2),u=l[0],c=l[1],d=a.getMax(),h=aa(d,2),f=h[0],v=h[1];i.aabb||(i.aabb={}),i.aabb.displayObject=e,i.aabb.minX=u,i.aabb.minY=c,i.aabb.maxX=f,i.aabb.maxY=v}if(i.aabb&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.minX)&&!isNaN(i.aabb.minY))return i.aabb}}},{key:"syncRTree",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!(!t&&(this.syncing||this.syncTasks.size===0))){this.syncing=!0;var i=[],a=new Set,s=function(l){if(!a.has(l)&&l.renderable){var u=e.syncNode(l,t);u&&(i.push(u),a.add(l))}};this.syncTasks.forEach(function(o,l){o&&l.forEach(s);for(var u=l;u;)s(u),u=u.parentElement}),this.rBush.load(i),i.length=0,this.syncing=!1}}}])}();une.tag="Prepare";function _Ne(r){return!!r.document}var JE=function(r){return r.READY="ready",r.BEFORE_RENDER="beforerender",r.RERENDER="rerender",r.AFTER_RENDER="afterrender",r.BEFORE_DESTROY="beforedestroy",r.AFTER_DESTROY="afterdestroy",r.RESIZE="resize",r.DIRTY_RECTANGLE="dirtyrectangle",r.RENDERER_CHANGED="rendererchanged",r}({}),mNe=500,pNe=.1,yNe=1e3,xNe=new nv(Is.MOUNTED),ENe=new nv(Is.UNMOUNTED),bNe=new nv(JE.BEFORE_RENDER),kNe=new nv(JE.RERENDER),wNe=new nv(JE.AFTER_RENDER),SNe=null;function cne(r,n){var e=n.cx,t=e===void 0?0:e,i=n.cy,a=i===void 0?0:i,s=n.r;r.arc(t,a,s,0,Math.PI*2,!1)}function dne(r,n){var e=n.cx,t=e===void 0?0:e,i=n.cy,a=i===void 0?0:i,s=n.rx,o=n.ry;if(r.ellipse)r.ellipse(t,a,s,o,0,0,Math.PI*2,!1);else{var l=s>o?s:o,u=s>o?1:s/o,c=s>o?o/s:1;r.save(),r.scale(u,c),r.arc(t,a,l,0,Math.PI*2)}}function hne(r,n){var e=n.x1,t=n.y1,i=n.x2,a=n.y2,s=n.markerStart,o=n.markerEnd,l=n.markerStartOffset,u=n.markerEndOffset,c=0,d=0,h=0,f=0,v=0,g,m;s&&Ga(s)&&l&&(g=i-e,m=a-t,v=Math.atan2(m,g),c=Math.cos(v)*(l||0),d=Math.sin(v)*(l||0)),o&&Ga(o)&&u&&(g=e-i,m=t-a,v=Math.atan2(m,g),h=Math.cos(v)*(u||0),f=Math.sin(v)*(u||0)),r.moveTo(e+c,t+d),r.lineTo(i+h,a+f)}function fne(r,n){var e=n.markerStart,t=n.markerEnd,i=n.markerStartOffset,a=n.markerEndOffset,s=n.d,o=s.absolutePath,l=s.segments,u=0,c=0,d=0,h=0,f=0,v,g;if(e&&Ga(e)&&i){var m=e.parentNode.getStartTangent(),y=aa(m,2),w=y[0],T=y[1];v=w[0]-T[0],g=w[1]-T[1],f=Math.atan2(g,v),u=Math.cos(f)*(i||0),c=Math.sin(f)*(i||0)}if(t&&Ga(t)&&a){var G=t.parentNode.getEndTangent(),x=aa(G,2),_=x[0],p=x[1];v=_[0]-p[0],g=_[1]-p[1],f=Math.atan2(g,v),d=Math.cos(f)*(a||0),h=Math.sin(f)*(a||0)}for(var b=0;b<o.length;b++){var R=o[b],B=R[0],j=o[b+1],Z=b===0&&(u!==0||c!==0),te=(b===o.length-1||j&&(j[0]==="M"||j[0]==="Z"))&&d!==0&&h!==0,le=Z?[u,c]:[0,0],ue=aa(le,2),se=ue[0],V=ue[1],ee=te?[d,h]:[0,0],he=aa(ee,2),ut=he[0],ct=he[1];switch(B){case"M":r.moveTo(R[1]+se,R[2]+V);break;case"L":r.lineTo(R[1]+ut,R[2]+ct);break;case"Q":r.quadraticCurveTo(R[1],R[2],R[3]+ut,R[4]+ct);break;case"C":r.bezierCurveTo(R[1],R[2],R[3],R[4],R[5]+ut,R[6]+ct);break;case"A":{var Lt=l[b].arcParams,vn=Lt.cx,tn=Lt.cy,rn=Lt.rx,mn=Lt.ry,ar=Lt.startAngle,gi=Lt.endAngle,kr=Lt.xRotation,Ta=Lt.sweepFlag;if(r.ellipse)r.ellipse(vn,tn,rn,mn,kr,ar,gi,!!(1-Ta));else{var Wa=rn>mn?rn:mn,la=rn>mn?1:rn/mn,ys=rn>mn?mn/rn:1;r.translate(vn,tn),r.rotate(kr),r.scale(la,ys),r.arc(0,0,Wa,ar,gi,!!(1-Ta)),r.scale(1/la,1/ys),r.rotate(-kr),r.translate(-vn,-tn)}te&&r.lineTo(R[6]+d,R[7]+h);break}case"Z":r.closePath();break}}}function vne(r,n){var e=n.markerStart,t=n.markerEnd,i=n.markerStartOffset,a=n.markerEndOffset,s=n.points.points,o=s.length,l=s[0][0],u=s[0][1],c=s[o-1][0],d=s[o-1][1],h=0,f=0,v=0,g=0,m=0,y,w;e&&Ga(e)&&i&&(y=s[1][0]-s[0][0],w=s[1][1]-s[0][1],m=Math.atan2(w,y),h=Math.cos(m)*(i||0),f=Math.sin(m)*(i||0)),t&&Ga(t)&&a&&(y=s[o-1][0]-s[0][0],w=s[o-1][1]-s[0][1],m=Math.atan2(w,y),v=Math.cos(m)*(a||0),g=Math.sin(m)*(a||0)),r.moveTo(l+(h||v),u+(f||g));for(var T=1;T<o-1;T++){var G=s[T];r.lineTo(G[0],G[1])}r.lineTo(c,d)}function gne(r,n){var e=n.markerStart,t=n.markerEnd,i=n.markerStartOffset,a=n.markerEndOffset,s=n.points.points,o=s.length,l=s[0][0],u=s[0][1],c=s[o-1][0],d=s[o-1][1],h=0,f=0,v=0,g=0,m=0,y,w;e&&Ga(e)&&i&&(y=s[1][0]-s[0][0],w=s[1][1]-s[0][1],m=Math.atan2(w,y),h=Math.cos(m)*(i||0),f=Math.sin(m)*(i||0)),t&&Ga(t)&&a&&(y=s[o-2][0]-s[o-1][0],w=s[o-2][1]-s[o-1][1],m=Math.atan2(w,y),v=Math.cos(m)*(a||0),g=Math.sin(m)*(a||0)),r.moveTo(l+h,u+f);for(var T=1;T<o-1;T++){var G=s[T];r.lineTo(G[0],G[1])}r.lineTo(c+v,d+g)}function _ne(r,n){var e=n.x,t=e===void 0?0:e,i=n.y,a=i===void 0?0:i,s=n.radius,o=n.width,l=n.height,u=o,c=l,d=s&&s.some(function(x){return x!==0});if(!d)r.rect(t,a,u,c);else{var h=o>0?1:-1,f=l>0?1:-1,v=h+f===0,g=s.map(function(x){return(0,O.Z)(x,0,Math.min(Math.abs(u)/2,Math.abs(c)/2))}),m=aa(g,4),y=m[0],w=m[1],T=m[2],G=m[3];r.moveTo(h*y+t,a),r.lineTo(u-h*w+t,a),w!==0&&r.arc(u-h*w+t,f*w+a,w,-f*Math.PI/2,h>0?0:Math.PI,v),r.lineTo(u+t,c-f*T+a),T!==0&&r.arc(u-h*T+t,c-f*T+a,T,h>0?0:Math.PI,f>0?Math.PI/2:1.5*Math.PI,v),r.lineTo(h*G+t,c+a),G!==0&&r.arc(h*G+t,c-f*G+a,G,f>0?Math.PI/2:-Math.PI/2,h>0?Math.PI:0,v),r.lineTo(t,f*y+a),y!==0&&r.arc(h*y+t,f*y+a,y,h>0?Math.PI:0,f>0?Math.PI*1.5:Math.PI/2,v)}}var mne=function(r){function n(){var e;Un(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ba(this,n,[].concat(i)),e.name="canvas-path-generator",e}return $a(n,r),Vn(n,[{key:"init",value:function(){var t,i=(t={},xr(xr(xr(xr(xr(xr(xr(xr(xr(xr(t,on.CIRCLE,cne),on.ELLIPSE,dne),on.RECT,_ne),on.LINE,hne),on.POLYLINE,gne),on.POLYGON,vne),on.PATH,fne),on.TEXT,void 0),on.GROUP,void 0),on.IMAGE,void 0),xr(xr(xr(t,on.HTML,void 0),on.MESH,void 0),on.FRAGMENT,void 0));this.context.pathGeneratorFactory=i}},{key:"destroy",value:function(){delete this.context.pathGeneratorFactory}}])}(ky);function Hv(){"use strict";Hv=function(){return n};var r,n={},e=Object.prototype,t=e.hasOwnProperty,i=Object.defineProperty||function(se,V,ee){se[V]=ee.value},a=typeof Symbol=="function"?Symbol:{},s=a.iterator||"@@iterator",o=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(se,V,ee){return Object.defineProperty(se,V,{value:ee,enumerable:!0,configurable:!0,writable:!0}),se[V]}try{u({},"")}catch(se){u=function(ee,he,ut){return ee[he]=ut}}function c(se,V,ee,he){var ut=V&&V.prototype instanceof y?V:y,ct=Object.create(ut.prototype),Lt=new le(he||[]);return i(ct,"_invoke",{value:B(se,ee,Lt)}),ct}function d(se,V,ee){try{return{type:"normal",arg:se.call(V,ee)}}catch(he){return{type:"throw",arg:he}}}n.wrap=c;var h="suspendedStart",f="suspendedYield",v="executing",g="completed",m={};function y(){}function w(){}function T(){}var G={};u(G,s,function(){return this});var x=Object.getPrototypeOf,_=x&&x(x(ue([])));_&&_!==e&&t.call(_,s)&&(G=_);var p=T.prototype=y.prototype=Object.create(G);function b(se){["next","throw","return"].forEach(function(V){u(se,V,function(ee){return this._invoke(V,ee)})})}function R(se,V){function ee(ut,ct,Lt,vn){var tn=d(se[ut],se,ct);if(tn.type!=="throw"){var rn=tn.arg,mn=rn.value;return mn&&Tg(mn)=="object"&&t.call(mn,"__await")?V.resolve(mn.__await).then(function(ar){ee("next",ar,Lt,vn)},function(ar){ee("throw",ar,Lt,vn)}):V.resolve(mn).then(function(ar){rn.value=ar,Lt(rn)},function(ar){return ee("throw",ar,Lt,vn)})}vn(tn.arg)}var he;i(this,"_invoke",{value:function(ct,Lt){function vn(){return new V(function(tn,rn){ee(ct,Lt,tn,rn)})}return he=he?he.then(vn,vn):vn()}})}function B(se,V,ee){var he=h;return function(ut,ct){if(he===v)throw Error("Generator is already running");if(he===g){if(ut==="throw")throw ct;return{value:r,done:!0}}for(ee.method=ut,ee.arg=ct;;){var Lt=ee.delegate;if(Lt){var vn=j(Lt,ee);if(vn){if(vn===m)continue;return vn}}if(ee.method==="next")ee.sent=ee._sent=ee.arg;else if(ee.method==="throw"){if(he===h)throw he=g,ee.arg;ee.dispatchException(ee.arg)}else ee.method==="return"&&ee.abrupt("return",ee.arg);he=v;var tn=d(se,V,ee);if(tn.type==="normal"){if(he=ee.done?g:f,tn.arg===m)continue;return{value:tn.arg,done:ee.done}}tn.type==="throw"&&(he=g,ee.method="throw",ee.arg=tn.arg)}}}function j(se,V){var ee=V.method,he=se.iterator[ee];if(he===r)return V.delegate=null,ee==="throw"&&se.iterator.return&&(V.method="return",V.arg=r,j(se,V),V.method==="throw")||ee!=="return"&&(V.method="throw",V.arg=new TypeError("The iterator does not provide a '"+ee+"' method")),m;var ut=d(he,se.iterator,V.arg);if(ut.type==="throw")return V.method="throw",V.arg=ut.arg,V.delegate=null,m;var ct=ut.arg;return ct?ct.done?(V[se.resultName]=ct.value,V.next=se.nextLoc,V.method!=="return"&&(V.method="next",V.arg=r),V.delegate=null,m):ct:(V.method="throw",V.arg=new TypeError("iterator result is not an object"),V.delegate=null,m)}function Z(se){var V={tryLoc:se[0]};1 in se&&(V.catchLoc=se[1]),2 in se&&(V.finallyLoc=se[2],V.afterLoc=se[3]),this.tryEntries.push(V)}function te(se){var V=se.completion||{};V.type="normal",delete V.arg,se.completion=V}function le(se){this.tryEntries=[{tryLoc:"root"}],se.forEach(Z,this),this.reset(!0)}function ue(se){if(se||se===""){var V=se[s];if(V)return V.call(se);if(typeof se.next=="function")return se;if(!isNaN(se.length)){var ee=-1,he=function ut(){for(;++ee<se.length;)if(t.call(se,ee))return ut.value=se[ee],ut.done=!1,ut;return ut.value=r,ut.done=!0,ut};return he.next=he}}throw new TypeError(Tg(se)+" is not iterable")}return w.prototype=T,i(p,"constructor",{value:T,configurable:!0}),i(T,"constructor",{value:w,configurable:!0}),w.displayName=u(T,l,"GeneratorFunction"),n.isGeneratorFunction=function(se){var V=typeof se=="function"&&se.constructor;return!!V&&(V===w||(V.displayName||V.name)==="GeneratorFunction")},n.mark=function(se){return Object.setPrototypeOf?Object.setPrototypeOf(se,T):(se.__proto__=T,u(se,l,"GeneratorFunction")),se.prototype=Object.create(p),se},n.awrap=function(se){return{__await:se}},b(R.prototype),u(R.prototype,o,function(){return this}),n.AsyncIterator=R,n.async=function(se,V,ee,he,ut){ut===void 0&&(ut=Promise);var ct=new R(c(se,V,ee,he),ut);return n.isGeneratorFunction(V)?ct:ct.next().then(function(Lt){return Lt.done?Lt.value:ct.next()})},b(p),u(p,l,"Generator"),u(p,s,function(){return this}),u(p,"toString",function(){return"[object Generator]"}),n.keys=function(se){var V=Object(se),ee=[];for(var he in V)ee.push(he);return ee.reverse(),function ut(){for(;ee.length;){var ct=ee.pop();if(ct in V)return ut.value=ct,ut.done=!1,ut}return ut.done=!0,ut}},n.values=ue,le.prototype={constructor:le,reset:function(V){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(te),!V)for(var ee in this)ee.charAt(0)==="t"&&t.call(this,ee)&&!isNaN(+ee.slice(1))&&(this[ee]=r)},stop:function(){this.done=!0;var V=this.tryEntries[0].completion;if(V.type==="throw")throw V.arg;return this.rval},dispatchException:function(V){if(this.done)throw V;var ee=this;function he(rn,mn){return Lt.type="throw",Lt.arg=V,ee.next=rn,mn&&(ee.method="next",ee.arg=r),!!mn}for(var ut=this.tryEntries.length-1;ut>=0;--ut){var ct=this.tryEntries[ut],Lt=ct.completion;if(ct.tryLoc==="root")return he("end");if(ct.tryLoc<=this.prev){var vn=t.call(ct,"catchLoc"),tn=t.call(ct,"finallyLoc");if(vn&&tn){if(this.prev<ct.catchLoc)return he(ct.catchLoc,!0);if(this.prev<ct.finallyLoc)return he(ct.finallyLoc)}else if(vn){if(this.prev<ct.catchLoc)return he(ct.catchLoc,!0)}else{if(!tn)throw Error("try statement without catch or finally");if(this.prev<ct.finallyLoc)return he(ct.finallyLoc)}}}},abrupt:function(V,ee){for(var he=this.tryEntries.length-1;he>=0;--he){var ut=this.tryEntries[he];if(ut.tryLoc<=this.prev&&t.call(ut,"finallyLoc")&&this.prev<ut.finallyLoc){var ct=ut;break}}ct&&(V==="break"||V==="continue")&&ct.tryLoc<=ee&&ee<=ct.finallyLoc&&(ct=null);var Lt=ct?ct.completion:{};return Lt.type=V,Lt.arg=ee,ct?(this.method="next",this.next=ct.finallyLoc,m):this.complete(Lt)},complete:function(V,ee){if(V.type==="throw")throw V.arg;return V.type==="break"||V.type==="continue"?this.next=V.arg:V.type==="return"?(this.rval=this.arg=V.arg,this.method="return",this.next="end"):V.type==="normal"&&ee&&(this.next=ee),m},finish:function(V){for(var ee=this.tryEntries.length-1;ee>=0;--ee){var he=this.tryEntries[ee];if(he.finallyLoc===V)return this.complete(he.completion,he.afterLoc),te(he),m}},catch:function(V){for(var ee=this.tryEntries.length-1;ee>=0;--ee){var he=this.tryEntries[ee];if(he.tryLoc===V){var ut=he.completion;if(ut.type==="throw"){var ct=ut.arg;te(he)}return ct}}throw Error("illegal catch attempt")},delegateYield:function(V,ee,he){return this.delegate={iterator:ue(V),resultName:ee,nextLoc:he},this.method==="next"&&(this.arg=r),m}},n}function n3(r,n,e,t,i,a,s){try{var o=r[a](s),l=o.value}catch(u){return void e(u)}o.done?n(l):Promise.resolve(l).then(t,i)}function QE(r){return function(){var n=this,e=arguments;return new Promise(function(t,i){var a=r.apply(n,e);function s(l){n3(a,t,i,s,o,"next",l)}function o(l){n3(a,t,i,s,o,"throw",l)}s(void 0)})}}var pne=k(74873);var yne=E.Ue(),xne=E.Ue(),Ene=E.Ue(),bne=L.create(),r3=function(){function r(){var n=this;Un(this,r),this.isHit=function(e,t,i,a){var s=n.context.pointInPathPickerFactory[e.nodeName];if(s){var o=L.invert(bne,i),l=E.fF(xne,E.t8(Ene,t[0],t[1],0),o);if(s(e,new bd(l[0],l[1]),a,n.isPointInPath,n.context,n.runtime))return!0}return!1},this.isPointInPath=function(e,t){var i=n.runtime.offscreenCanvasCreator.getOrCreateContext(n.context.config.offscreenCanvas),a=n.context.pathGeneratorFactory[e.nodeName];return a&&(i.beginPath(),a(i,e.parsedStyle),i.closePath()),i.isPointInPath(t.x,t.y)}}return Vn(r,[{key:"apply",value:function(e,t){var i,a=this,s=e.renderingService,o=e.renderingContext;this.context=e,this.runtime=t;var l=(i=o.root)===null||i===void 0?void 0:i.ownerDocument;s.hooks.pick.tapPromise(r.tag,function(){var u=QE(Hv().mark(function c(d){return Hv().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",a.pick(l,d));case 1:case"end":return f.stop()}},c)}));return function(c){return u.apply(this,arguments)}}()),s.hooks.pickSync.tap(r.tag,function(u){return a.pick(l,u)})}},{key:"pick",value:function(e,t){var i=t.topmost,a=t.position,s=a.x,o=a.y,l=E.t8(yne,s,o,0),u=e.elementsFromBBox(l[0],l[1],l[0],l[1]),c=[],d=I_(u),h;try{for(d.s();!(h=d.n()).done;){var f=h.value,v=f.getWorldTransform(),g=this.isHit(f,l,v,!1);if(g){var m=BD(f);if(m){var y=m.parsedStyle.clipPath,w=this.isHit(y,l,y.getWorldTransform(),!0);if(w){if(i)return t.picked=[f],t;c.push(f)}}else{if(i)return t.picked=[f],t;c.push(f)}}}}catch(T){d.e(T)}finally{d.f()}return t.picked=c,t}}])}();r3.tag="CanvasPicker";function kne(r,n,e){var t=r.parsedStyle,i=t.cx,a=i===void 0?0:i,s=t.cy,o=s===void 0?0:s,l=t.r,u=t.fill,c=t.stroke,d=t.lineWidth,h=d===void 0?1:d,f=t.increasedLineWidthForHitTesting,v=f===void 0?0:f,g=t.pointerEvents,m=g===void 0?"auto":g,y=(h+v)/2,w=(0,Nt.TE)(a,o,n.x,n.y),T=B_(m,u,c),G=aa(T,2),x=G[0],_=G[1];return x&&_||e?w<=l+y:x?w<=l:_?w>=l-y&&w<=l+y:!1}function qE(r,n,e,t){return r/(e*e)+n/(t*t)}function wne(r,n,e){var t=r.parsedStyle,i=t.cx,a=i===void 0?0:i,s=t.cy,o=s===void 0?0:s,l=t.rx,u=t.ry,c=t.fill,d=t.stroke,h=t.lineWidth,f=h===void 0?1:h,v=t.increasedLineWidthForHitTesting,g=v===void 0?0:v,m=t.pointerEvents,y=m===void 0?"auto":m,w=n.x,T=n.y,G=B_(y,c,d),x=aa(G,2),_=x[0],p=x[1],b=(f+g)/2,R=(w-a)*(w-a),B=(T-o)*(T-o);return _&&p||e?qE(R,B,l+b,u+b)<=1:_?qE(R,B,l,u)<=1:p?qE(R,B,l-b,u-b)>=1&&qE(R,B,l+b,u+b)<=1:!1}function z_(r,n,e,t,i,a){return i>=r&&i<=r+e&&a>=n&&a<=n+t}function Sne(r,n,e,t,i,a,s){var o=i/2;return z_(r-o,n-o,e,i,a,s)||z_(r+e-o,n-o,i,t,a,s)||z_(r+o,n+t-o,e,i,a,s)||z_(r-o,n+o,i,t,a,s)}function eb(r,n,e,t,i,a,s,o){var l=(Math.atan2(o-n,s-r)+Math.PI*2)%(Math.PI*2),u={x:r+e*Math.cos(l),y:n+e*Math.sin(l)};return(0,Nt.TE)(u.x,u.y,s,o)<=a/2}function Og(r,n,e,t,i,a,s){var o=Math.min(r,e),l=Math.max(r,e),u=Math.min(n,t),c=Math.max(n,t),d=i/2;return a>=o-d&&a<=l+d&&s>=u-d&&s<=c+d?(0,Nt._x)(r,n,e,t,a,s)<=i/2:!1}function i3(r,n,e,t,i){var a=r.length;if(a<2)return!1;for(var s=0;s<a-1;s++){var o=r[s][0],l=r[s][1],u=r[s+1][0],c=r[s+1][1];if(Og(o,l,u,c,n,e,t))return!0}if(i){var d=r[0],h=r[a-1];if(Og(d[0],d[1],h[0],h[1],n,e,t))return!0}return!1}var Tne=1e-6;function iC(r){return Math.abs(r)<Tne?0:r<0?-1:1}function Cne(r,n,e){return(e[0]-r[0])*(n[1]-r[1])===(n[0]-r[0])*(e[1]-r[1])&&Math.min(r[0],n[0])<=e[0]&&e[0]<=Math.max(r[0],n[0])&&Math.min(r[1],n[1])<=e[1]&&e[1]<=Math.max(r[1],n[1])}function a3(r,n,e){var t=!1,i=r.length;if(i<=2)return!1;for(var a=0;a<i;a++){var s=r[a],o=r[(a+1)%i];if(Cne(s,o,[n,e]))return!0;iC(s[1]-e)>0!=iC(o[1]-e)>0&&iC(n-(e-s[1])*(s[0]-o[0])/(s[1]-o[1])-s[0])<0&&(t=!t)}return t}function s3(r,n,e){for(var t=!1,i=0;i<r.length;i++){var a=r[i];if(t=a3(a,n,e),t)break}return t}function Mne(r,n,e){var t=r.parsedStyle,i=t.x1,a=t.y1,s=t.x2,o=t.y2,l=t.lineWidth,u=l===void 0?1:l,c=t.increasedLineWidthForHitTesting,d=c===void 0?0:c,h=t.pointerEvents,f=h===void 0?"auto":h,v=t.fill,g=t.stroke,m=B_(f,v,g),y=aa(m,2),w=y[1];return!w&&!e||!u?!1:Og(i,a,s,o,u+d,n.x,n.y)}function Pne(r,n,e,t,i){for(var a=!1,s=n/2,o=0;o<r.length;o++){var l=r[o],u=l.currentPoint,c=l.params,d=l.prePoint,h=l.box;if(!(h&&!z_(h.x-s,h.y-s,h.width+n,h.height+n,e,t)))switch(l.command){case"L":case"Z":if(a=Og(d[0],d[1],u[0],u[1],n,e,t),a)return!0;break;case"Q":var f=(0,Nt.Y1)(d[0],d[1],c[1],c[2],c[3],c[4],e,t);if(a=f<=n/2,a)return!0;break;case"C":var v=(0,Nt.ph)(d[0],d[1],c[1],c[2],c[3],c[4],c[5],c[6],e,t,i);if(a=v<=n/2,a)return!0;break;case"A":l.cubicParams||(l.cubicParams=(0,pne.W)(d[0],d[1],c[1],c[2],c[3],c[4],c[5],c[6],c[7],void 0));for(var g=l.cubicParams,m=d,y=0;y<g.length;y+=6){var w=(0,Nt.ph)(m[0],m[1],g[y],g[y+1],g[y+2],g[y+3],g[y+4],g[y+5],e,t,i);if(m=[g[y+4],g[y+5]],a=w<=n/2,a)return!0}break}}return a}function Nne(r,n,e,t,i,a){var s=r.parsedStyle,o=s.lineWidth,l=o===void 0?1:o,u=s.increasedLineWidthForHitTesting,c=u===void 0?0:u,d=s.stroke,h=s.fill,f=s.d,v=s.pointerEvents,g=v===void 0?"auto":v,m=f.segments,y=f.hasArc,w=f.polylines,T=f.polygons,G=B_(g,(T==null?void 0:T.length)&&h,d),x=aa(G,2),_=x[0],p=x[1],b=HT(r),R=!1;return _||e?(y?R=t(r,n):R=s3(T,n.x,n.y)||s3(w,n.x,n.y),R):((p||e)&&(R=Pne(m,l+c,n.x,n.y,b)),R)}function One(r,n,e){var t=r.parsedStyle,i=t.stroke,a=t.fill,s=t.lineWidth,o=s===void 0?1:s,l=t.increasedLineWidthForHitTesting,u=l===void 0?0:l,c=t.points,d=t.pointerEvents,h=d===void 0?"auto":d,f=B_(h,a,i),v=aa(f,2),g=v[0],m=v[1],y=!1;return(m||e)&&(y=i3(c.points,o+u,n.x,n.y,!0)),!y&&(g||e)&&(y=a3(c.points,n.x,n.y)),y}function Rne(r,n,e){var t=r.parsedStyle,i=t.lineWidth,a=i===void 0?1:i,s=t.increasedLineWidthForHitTesting,o=s===void 0?0:s,l=t.points,u=t.pointerEvents,c=u===void 0?"auto":u,d=t.fill,h=t.stroke,f=B_(c,d,h),v=aa(f,2),g=v[1];return!g&&!e||!a?!1:i3(l.points,a+o,n.x,n.y,!1)}function Ane(r,n,e,t,i){var a=r.parsedStyle,s=a.radius,o=a.fill,l=a.stroke,u=a.lineWidth,c=u===void 0?1:u,d=a.increasedLineWidthForHitTesting,h=d===void 0?0:d,f=a.x,v=f===void 0?0:f,g=a.y,m=g===void 0?0:g,y=a.width,w=a.height,T=a.pointerEvents,G=T===void 0?"auto":T,x=B_(G,o,l),_=aa(x,2),p=_[0],b=_[1],R=s&&s.some(function(te){return te!==0}),B=c+h;if(R){var Z=!1;return(b||e)&&(Z=Lne(v,m,y,w,s.map(function(te){return(0,O.Z)(te,0,Math.min(Math.abs(y)/2,Math.abs(w)/2))}),B,n.x,n.y)),!Z&&(p||e)&&(Z=t(r,n)),Z}else{var j=B/2;if(p&&b||e)return z_(v-j,m-j,y+j,w+j,n.x,n.y);if(p)return z_(v,m,y,w,n.x,n.y);if(b)return Sne(v,m,y,w,B,n.x,n.y)}return!1}function Lne(r,n,e,t,i,a,s,o){var l=aa(i,4),u=l[0],c=l[1],d=l[2],h=l[3];return Og(r+u,n,r+e-c,n,a,s,o)||Og(r+e,n+c,r+e,n+t-d,a,s,o)||Og(r+e-d,n+t,r+h,n+t,a,s,o)||Og(r,n+t-h,r,n+u,a,s,o)||eb(r+e-c,n+c,c,1.5*Math.PI,2*Math.PI,a,s,o)||eb(r+e-d,n+t-d,d,0,.5*Math.PI,a,s,o)||eb(r+h,n+t-h,h,.5*Math.PI,Math.PI,a,s,o)||eb(r+u,n+u,u,Math.PI,1.5*Math.PI,a,s,o)}function Ine(r,n,e,t,i,a){var s=r.parsedStyle,o=s.pointerEvents,l=o===void 0?"auto":o,u=s.x,c=u===void 0?0:u,d=s.y,h=d===void 0?0:d,f=s.width,v=s.height;if(l==="non-transparent-pixel"){var g=i.config.offscreenCanvas,m=a.offscreenCanvasCreator.getOrCreateCanvas(g),y=a.offscreenCanvasCreator.getOrCreateContext(g,{willReadFrequently:!0});m.width=f,m.height=v,i.defaultStyleRendererFactory[on.IMAGE].render(y,Oa(Oa({},r.parsedStyle),{},{x:0,y:0}),r,void 0,void 0,void 0);var w=y.getImageData(n.x-c,n.y-h,1,1).data;return w.every(function(T){return T!==0})}return!0}function Dne(r,n,e,t){var i=r.getGeometryBounds();return n.x>=i.min[0]&&n.y>=i.min[1]&&n.x<=i.max[0]&&n.y<=i.max[1]}var Fne=function(r){function n(){var e;Un(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ba(this,n,[].concat(i)),e.name="canvas-picker",e}return $a(n,r),Vn(n,[{key:"init",value:function(){var t,i=(t={},xr(xr(xr(xr(xr(xr(xr(xr(xr(xr(t,on.CIRCLE,kne),on.ELLIPSE,wne),on.RECT,Ane),on.LINE,Mne),on.POLYLINE,Rne),on.POLYGON,One),on.PATH,Nne),on.TEXT,Dne),on.GROUP,null),on.IMAGE,Ine),xr(xr(t,on.HTML,null),on.MESH,null));this.context.pointInPathPickerFactory=i,this.addRenderingPlugin(new r3)}},{key:"destroy",value:function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()}}])}(ky);function iv(r,n){if(!{}.hasOwnProperty.call(r,n))throw new TypeError("attempted to use private field on non-instance");return r}var Bne=0;function $ne(r){return"__private_"+Bne+++"_"+r}var Gne=function(){function r(){Un(this,r),this.cacheStore=new Map}return Vn(r,[{key:"onRefAdded",value:function(e){}},{key:"has",value:function(e){return this.cacheStore.has(e)}},{key:"put",value:function(e,t,i){return this.cacheStore.has(e)?!1:(this.cacheStore.set(e,{value:t,counter:new Set([i])}),this.onRefAdded(i),!0)}},{key:"get",value:function(e,t){var i=this.cacheStore.get(e);return i?(i.counter.has(t)||(i.counter.add(t),this.onRefAdded(t)),i.value):null}},{key:"update",value:function(e,t,i){var a=this.cacheStore.get(e);return a?(a.value=Oa(Oa({},a.value),t),a.counter.has(i)||(a.counter.add(i),this.onRefAdded(i)),!0):!1}},{key:"release",value:function(e,t){var i=this.cacheStore.get(e);return i?(i.counter.delete(t),i.counter.size<=0&&this.cacheStore.delete(e),!0):!1}},{key:"releaseRef",value:function(e){var t=this;Array.from(this.cacheStore.keys()).forEach(function(i){t.release(i,e)})}},{key:"getSize",value:function(){return this.cacheStore.size}},{key:"clear",value:function(){this.cacheStore.clear()}}])}(),aC=[],sC=[],oC=function(){function r(){Un(this,r)}return Vn(r,null,[{key:"stop",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:r.api;r.rafId&&(e.cancelAnimationFrame(r.rafId),r.rafId=null)}},{key:"executeTask",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:r.api;aC.length<=0&&sC.length<=0||(sC.forEach(function(t){return t()}),sC=aC.splice(0,r.TASK_NUM_PER_FRAME),r.rafId=e.requestAnimationFrame(function(){r.executeTask(e)}))}},{key:"sliceImage",value:function(e,t,i,a){for(var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:r.api,l=e.naturalWidth||e.width,u=e.naturalHeight||e.height,c=t-s,d=i-s,h=Math.ceil(l/c),f=Math.ceil(u/d),v={tileSize:[t,i],gridSize:[f,h],tiles:Array(f).fill(null).map(function(){return Array(h).fill(null)})},g=function(w){for(var T=function(_){aC.push(function(){var p=_*c,b=w*d,R=[Math.min(t,l-p),Math.min(i,u-b)],B=R[0],j=R[1],Z=o.createCanvas();Z.width=t,Z.height=i;var te=Z.getContext("2d");te.drawImage(e,p,b,B,j,0,0,B,j),v.tiles[w][_]={x:p,y:b,tileX:_,tileY:w,data:Z},a()})},G=0;G<h;G++)T(G)},m=0;m<f;m++)g(m);return r.stop(),r.executeTask(),v}}])}();oC.TASK_NUM_PER_FRAME=10;var wd=new Gne;wd.onRefAdded=function(n){var e=this;n.addEventListener(Is.DESTROY,function(){e.releaseRef(n)},{once:!0})};var lC=function(){function r(n,e){Un(this,r),this.gradientCache={},this.patternCache={},this.context=n,this.runtime=e}return Vn(r,[{key:"getImageSync",value:function(e,t,i){var a=(0,Ze.Z)(e)?e:e.src;if(wd.has(a)){var s=wd.get(a,t);if(s.img.complete)return i==null||i(s),s}return this.getOrCreateImage(e,t).then(function(o){i==null||i(o)}).catch(function(){}),null}},{key:"getOrCreateImage",value:function(e,t){var i=(0,Ze.Z)(e)?e:e.src;if(!(0,Ze.Z)(e)&&!wd.has(i)){var a={img:e,size:[e.naturalWidth||e.width,e.naturalHeight||e.height],tileSize:tb(e)};wd.put(i,a,t)}if(wd.has(i)){var s=wd.get(i,t);return s.img.complete?Promise.resolve(s):new Promise(function(l,u){s.img.addEventListener("load",function(){s.size=[s.img.naturalWidth||s.img.width,s.img.naturalHeight||s.img.height],s.tileSize=tb(s.img),l(s)}),s.img.addEventListener("error",function(c){u(c)})})}var o=this.context.config.createImage;return new Promise(function(l,u){var c;if(o?c=o(i):YE&&(c=new window.Image),c){var d={img:c,size:[0,0],tileSize:tb(c)};wd.put(i,d,t),c.onload=function(){d.size=[c.naturalWidth||c.width,c.naturalHeight||c.height],d.tileSize=tb(d.img),l(d)},c.onerror=function(h){u(h)},c.crossOrigin="Anonymous",c.src=i}})}},{key:"createDownSampledImage",value:function(){var n=QE(Hv().mark(function t(i,a){var s,o,l,u,c,d,h,f,v,g,m,y,w,T;return Hv().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return x.next=2,this.getOrCreateImage(i,a);case 2:if(s=x.sent,typeof s.downSamplingRate=="undefined"){x.next=5;break}return x.abrupt("return",s);case 5:if(o=this.context.config.enableLargeImageOptimization,l=typeof o=="boolean"?{}:o,u=l.maxDownSampledImageSize,c=u===void 0?2048:u,d=l.downSamplingRateThreshold,h=d===void 0?.5:d,f=this.runtime.globalThis.createImageBitmap,v=aa(s.size,2),g=v[0],m=v[1],y=s.img,w=Math.min((c+c)/(g+m),Math.max(.01,Math.min(h,.5))),T=Oa(Oa({},s),{},{downSamplingRate:w}),wd.update(s.img.src,T,a),!f){x.next=25;break}return x.prev=14,x.next=17,f(s.img,{resizeWidth:g*w,resizeHeight:m*w});case 17:y=x.sent,x.next=23;break;case 20:x.prev=20,x.t0=x.catch(14),w=1;case 23:x.next=26;break;case 25:w=1;case 26:return T=Oa(Oa({},this.getImageSync(i,a)),{},{downSampled:y,downSamplingRate:w}),wd.update(s.img.src,T,a),x.abrupt("return",T);case 29:case"end":return x.stop()}},t,this,[[14,20]])}));function e(t,i){return n.apply(this,arguments)}return e}()},{key:"createImageTiles",value:function(){var n=QE(Hv().mark(function t(i,a,s,o){var l,u,c,d,h;return Hv().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,this.getOrCreateImage(i,o);case 2:return l=v.sent,u=o.ownerDocument.defaultView,c=u.requestAnimationFrame,d=u.cancelAnimationFrame,oC.api={requestAnimationFrame:c,cancelAnimationFrame:d,createCanvas:function(){return tC.createCanvas()}},h=Oa(Oa({},l),oC.sliceImage(l.img,l.tileSize[0],l.tileSize[0],s)),wd.update(l.img.src,h,o),v.abrupt("return",h);case 8:case"end":return v.stop()}},t,this)}));function e(t,i,a,s){return n.apply(this,arguments)}return e}()},{key:"releaseImage",value:function(e,t){wd.release((0,Ze.Z)(e)?e:e.src,t)}},{key:"releaseImageRef",value:function(e){wd.releaseRef(e)}},{key:"getOrCreatePatternSync",value:function(e,t,i,a,s,o,l){var u=this.generatePatternKey(t);if(u&&this.patternCache[u])return this.patternCache[u];var c=t.image,d=t.repetition,h=t.transform,f,v=!1;if((0,Ze.Z)(c)){var g=this.getImageSync(c,e,l);f=g==null?void 0:g.img}else a?(f=a,v=!0):f=c;var m=f&&i.createPattern(f,d);if(m){var y;h?y=WD(RD(h),new Ol({})):y=L.identity(L.create()),v&&L.scale(y,y,[1/s,1/s,1]),m.setTransform({a:y[0],b:y[1],c:y[4],d:y[5],e:y[12]+o[0],f:y[13]+o[1]})}return u&&m&&(this.patternCache[u]=m),m}},{key:"getOrCreateGradient",value:function(e,t){var i=this.generateGradientKey(e),a=e.type,s=e.steps,o=e.min,l=e.width,u=e.height,c=e.angle,d=e.cx,h=e.cy,f=e.size;if(this.gradientCache[i])return this.gradientCache[i];var v=null;if(a===Cg.LinearGradient){var g=Eq(o,l,u,c),m=g.x1,y=g.y1,w=g.x2,T=g.y2;v=t.createLinearGradient(m,y,w,T)}else if(a===Cg.RadialGradient){var G=bq(o,l,u,d,h,f),x=G.x,_=G.y,p=G.r;v=t.createRadialGradient(x,_,0,x,_,p)}return v&&(s.forEach(function(b){var R=b.offset,B=b.color;if(R.unit===Xn.kPercentage){var j;(j=v)===null||j===void 0||j.addColorStop(R.value/100,B.toString())}}),this.gradientCache[i]=v),this.gradientCache[i]}},{key:"generateGradientKey",value:function(e){var t=e.type,i=e.min,a=e.width,s=e.height,o=e.steps,l=e.angle,u=e.cx,c=e.cy,d=e.size;return"gradient-".concat(t,"-").concat((l==null?void 0:l.toString())||0,"-").concat((u==null?void 0:u.toString())||0,"-").concat((c==null?void 0:c.toString())||0,"-").concat((d==null?void 0:d.toString())||0,"-").concat(i[0],"-").concat(i[1],"-").concat(a,"-").concat(s,"-").concat(o.map(function(h){var f=h.offset,v=h.color;return"".concat(f).concat(v)}).join("-"))}},{key:"generatePatternKey",value:function(e){var t=e.image,i=e.repetition;if((0,Ze.Z)(t))return"pattern-".concat(t,"-").concat(i);if(t.nodeName==="rect")return"pattern-".concat(t.entity,"-").concat(i)}}])}();lC.isSupportTile=!!tC.createCanvas();function tb(r){if(!r.complete)return[0,0];var n=r.naturalWidth||r.width,e=r.naturalHeight||r.height,t=256;return[256,512].forEach(function(i){var a=Math.ceil(e/i),s=Math.ceil(n/i);a*s<1e3&&(t=i)}),[t,t]}var o3=function(){function r(){Un(this,r)}return Vn(r,[{key:"apply",value:function(e){var t=e.renderingService,i=e.renderingContext,a=e.imagePool,s=i.root.ownerDocument.defaultView,o=function(d,h,f){var v=d.parsedStyle,g=v.width,m=v.height;g&&!m?d.setAttribute("height",f/h*g):!g&&m&&d.setAttribute("width",h/f*m)},l=function(d){var h=d.target,f=h.nodeName,v=h.attributes;if(f===on.IMAGE){var g=v.src,m=v.keepAspectRatio;a.getImageSync(g,h,function(y){var w=y.img,T=w.width,G=w.height;m&&o(h,T,G),h.renderable.dirty=!0,t.dirtify()})}},u=function(d){var h=d.target,f=d.attrName,v=d.prevValue,g=d.newValue;h.nodeName!==on.IMAGE||f!=="src"||(v!==g&&a.releaseImage(v,h),(0,Ze.Z)(g)&&a.getOrCreateImage(g,h).then(function(m){var y=m.img,w=y.width,T=y.height;h.attributes.keepAspectRatio&&o(h,w,T),h.renderable.dirty=!0,t.dirtify()}).catch(function(){}))};t.hooks.init.tap(r.tag,function(){s.addEventListener(Is.MOUNTED,l),s.addEventListener(Is.ATTR_MODIFIED,u)}),t.hooks.destroy.tap(r.tag,function(){s.removeEventListener(Is.MOUNTED,l),s.removeEventListener(Is.ATTR_MODIFIED,u)})}}])}();o3.tag="LoadImage";var zne=function(r){function n(){var e;Un(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ba(this,n,[].concat(i)),e.name="image-loader",e}return $a(n,r),Vn(n,[{key:"init",value:function(t){this.context.imagePool=new lC(this.context,t),this.addRenderingPlugin(new o3)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(ky);var Rl=$ne("renderState"),l3=function(){function r(n){Un(this,r),this.removedRBushNodeAABBs=[],this.renderQueue=[],Object.defineProperty(this,Rl,{writable:!0,value:{restoreStack:[],prevObject:null,currentContext:new Map}}),this.clearFullScreenLastFrame=!1,this.clearFullScreen=!1,this.vpMatrix=L.create(),this.dprMatrix=L.create(),this.tmpMat4=L.create(),this.vec3a=E.Ue(),this.vec3b=E.Ue(),this.vec3c=E.Ue(),this.vec3d=E.Ue(),this.canvasRendererPluginOptions=n}return Vn(r,[{key:"apply",value:function(e,t){var i=this;this.context=e;var a=this.context,s=a.config,o=a.camera,l=a.renderingService,u=a.renderingContext,c=a.rBushRoot,d=a.pathGeneratorFactory,h=s.renderer.getConfig().enableRenderingOptimization;s.renderer.getConfig().enableDirtyCheck=!1,s.renderer.getConfig().enableDirtyRectangleRendering=!1,this.rBush=c,this.pathGeneratorFactory=d;var f=e.contextService,v=u.root.ownerDocument.defaultView,g=function(T){var G=T.target,x=G.rBushNode;x.aabb&&i.removedRBushNodeAABBs.push(x.aabb)},m=function(T){var G=T.target,x=G.rBushNode;x.aabb&&i.removedRBushNodeAABBs.push(x.aabb)};l.hooks.init.tap(r.tag,function(){v.addEventListener(Is.UNMOUNTED,g),v.addEventListener(Is.CULLED,m);var w=f.getDPR(),T=s.width,G=s.height,x=f.getContext();i.clearRect(x,0,0,T*w,G*w,s.background)}),l.hooks.destroy.tap(r.tag,function(){v.removeEventListener(Is.UNMOUNTED,g),v.removeEventListener(Is.CULLED,m),i.renderQueue=[],i.removedRBushNodeAABBs=[],iv(i,Rl)[Rl]={restoreStack:[],prevObject:null,currentContext:null}}),l.hooks.beginFrame.tap(r.tag,function(){var w,T=f.getContext(),G=f.getDPR(),x=s.width,_=s.height,p=i.canvasRendererPluginOptions,b=p.dirtyObjectNumThreshold,R=p.dirtyObjectRatioThreshold,B=l.getStats(),j=B.total,Z=B.rendered,te=Z/j;i.clearFullScreen=i.clearFullScreenLastFrame||!((w=v.context.renderingPlugins[1])!==null&&w!==void 0&&w.isFirstTimeRenderingFinished)||l.disableDirtyRectangleRendering()||Z>b&&te>R,T&&(typeof T.resetTransform=="function"?T.resetTransform():T.setTransform(1,0,0,1,0,0),i.clearFullScreen&&i.clearRect(T,0,0,x*G,_*G,s.background))});var y=function(T,G){for(var x=[T];x.length>0;){var _=x.pop();_.isVisible()&&!_.isCulled()&&(h?i.renderDisplayObjectOptimized(_,G,i.context,iv(i,Rl)[Rl],t):i.renderDisplayObject(_,G,i.context,iv(i,Rl)[Rl],t));for(var p=_.sortable.sorted||_.childNodes,b=p.length-1;b>=0;b--)x.push(p[b])}};l.hooks.endFrame.tap(r.tag,function(){if(u.root.childNodes.length===0){i.clearFullScreenLastFrame=!0;return}h=s.renderer.getConfig().enableRenderingOptimization,iv(i,Rl)[Rl]={restoreStack:[],prevObject:null,currentContext:iv(i,Rl)[Rl].currentContext},iv(i,Rl)[Rl].currentContext.clear(),i.clearFullScreenLastFrame=!1;var w=f.getContext(),T=f.getDPR();if(L.fromScaling(i.dprMatrix,[T,T,1]),L.multiply(i.vpMatrix,i.dprMatrix,o.getOrthoMatrix()),i.clearFullScreen)h?(w.save(),y(u.root,w),w.restore()):y(u.root,w),i.removedRBushNodeAABBs=[];else{var G=i.safeMergeAABB.apply(i,[i.mergeDirtyAABBs(i.renderQueue)].concat(vl(i.removedRBushNodeAABBs.map(function(rn){var mn=rn.minX,ar=rn.minY,gi=rn.maxX,kr=rn.maxY,Ta=new au;return Ta.setMinMax([mn,ar,0],[gi,kr,0]),Ta}))));if(i.removedRBushNodeAABBs=[],au.isEmpty(G)){i.renderQueue=[];return}var x=i.convertAABB2Rect(G),_=x.x,p=x.y,b=x.width,R=x.height,B=E.fF(i.vec3a,[_,p,0],i.vpMatrix),j=E.fF(i.vec3b,[_+b,p,0],i.vpMatrix),Z=E.fF(i.vec3c,[_,p+R,0],i.vpMatrix),te=E.fF(i.vec3d,[_+b,p+R,0],i.vpMatrix),le=Math.min(B[0],j[0],te[0],Z[0]),ue=Math.min(B[1],j[1],te[1],Z[1]),se=Math.max(B[0],j[0],te[0],Z[0]),V=Math.max(B[1],j[1],te[1],Z[1]),ee=Math.floor(le),he=Math.floor(ue),ut=Math.ceil(se-le),ct=Math.ceil(V-ue);w.save(),i.clearRect(w,ee,he,ut,ct,s.background),w.beginPath(),w.rect(ee,he,ut,ct),w.clip(),w.setTransform(i.vpMatrix[0],i.vpMatrix[1],i.vpMatrix[4],i.vpMatrix[5],i.vpMatrix[12],i.vpMatrix[13]);var Lt=s.renderer.getConfig(),vn=Lt.enableDirtyRectangleRenderingDebug;vn&&v.dispatchEvent(new nv(JE.DIRTY_RECTANGLE,{dirtyRect:{x:ee,y:he,width:ut,height:ct}}));var tn=i.searchDirtyObjects(G);tn.sort(function(rn,mn){return rn.sortable.renderOrder-mn.sortable.renderOrder}).forEach(function(rn){rn&&rn.isVisible()&&!rn.isCulled()&&i.renderDisplayObject(rn,w,i.context,iv(i,Rl)[Rl],t)}),w.restore(),i.renderQueue.forEach(function(rn){i.saveDirtyAABB(rn)}),i.renderQueue=[]}iv(i,Rl)[Rl].restoreStack.forEach(function(){w.restore()}),iv(i,Rl)[Rl].restoreStack=[]}),l.hooks.render.tap(r.tag,function(w){i.clearFullScreen||i.renderQueue.push(w)})}},{key:"clearRect",value:function(e,t,i,a,s,o){e.clearRect(t,i,a,s),o&&(e.fillStyle=o,e.fillRect(t,i,a,s))}},{key:"renderDisplayObjectOptimized",value:function(e,t,i,a,s){var o=e.nodeName,l=!1,u=!1,c=this.context.styleRendererFactory[o],d=this.pathGeneratorFactory[o],h=e.parsedStyle.clipPath;if(h){l=!a.prevObject||!L.exactEquals(h.getWorldTransform(),a.prevObject.getWorldTransform()),l&&(this.applyWorldTransform(t,h),a.prevObject=null);var f=this.pathGeneratorFactory[h.nodeName];f&&(t.save(),u=!0,t.beginPath(),f(t,h.parsedStyle),t.closePath(),t.clip())}if(c){l=!a.prevObject||!L.exactEquals(e.getWorldTransform(),a.prevObject.getWorldTransform()),l&&this.applyWorldTransform(t,e);var v=!a.prevObject;if(!v){var g=a.prevObject.nodeName;o===on.TEXT?v=g!==on.TEXT:o===on.IMAGE?v=g!==on.IMAGE:v=g===on.TEXT||g===on.IMAGE}c.applyStyleToContext(t,e,v,a),a.prevObject=e}d&&(t.beginPath(),d(t,e.parsedStyle),o!==on.LINE&&o!==on.PATH&&o!==on.POLYLINE&&t.closePath()),c&&c.drawToContext(t,e,iv(this,Rl)[Rl],this,s),u&&t.restore(),e.renderable.dirty=!1}},{key:"renderDisplayObject",value:function(e,t,i,a,s){var o=e.nodeName,l=a.restoreStack[a.restoreStack.length-1];l&&!(e.compareDocumentPosition(l)&Mg.DOCUMENT_POSITION_CONTAINS)&&(t.restore(),a.restoreStack.pop());var u=this.context.styleRendererFactory[o],c=this.pathGeneratorFactory[o],d=e.parsedStyle.clipPath;if(d){this.applyWorldTransform(t,d);var h=this.pathGeneratorFactory[d.nodeName];h&&(t.save(),a.restoreStack.push(e),t.beginPath(),h(t,d.parsedStyle),t.closePath(),t.clip())}u&&(this.applyWorldTransform(t,e),t.save(),this.applyAttributesToContext(t,e)),c&&(t.beginPath(),c(t,e.parsedStyle),o!==on.LINE&&o!==on.PATH&&o!==on.POLYLINE&&t.closePath()),u&&(u.render(t,e.parsedStyle,e,i,this,s),t.restore()),e.renderable.dirty=!1}},{key:"applyAttributesToContext",value:function(e,t){var i=t.parsedStyle,a=i.stroke,s=i.fill,o=i.opacity,l=i.lineDash,u=i.lineDashOffset;l&&e.setLineDash(l),(0,xe.Z)(u)||(e.lineDashOffset=u),(0,xe.Z)(o)||(e.globalAlpha*=o),!(0,xe.Z)(a)&&!Array.isArray(a)&&!a.isNone&&(e.strokeStyle=t.attributes.stroke),!(0,xe.Z)(s)&&!Array.isArray(s)&&!s.isNone&&(e.fillStyle=t.attributes.fill)}},{key:"convertAABB2Rect",value:function(e){var t=e.getMin(),i=e.getMax(),a=Math.floor(t[0]),s=Math.floor(t[1]),o=Math.ceil(i[0]),l=Math.ceil(i[1]),u=o-a,c=l-s;return{x:a,y:s,width:u,height:c}}},{key:"mergeDirtyAABBs",value:function(e){var t=new au;return e.forEach(function(i){var a=i.getRenderBounds();t.add(a);var s=i.renderable.dirtyRenderBounds;s&&t.add(s)}),t}},{key:"searchDirtyObjects",value:function(e){var t=e.getMin(),i=aa(t,2),a=i[0],s=i[1],o=e.getMax(),l=aa(o,2),u=l[0],c=l[1],d=this.rBush.search({minX:a,minY:s,maxX:u,maxY:c});return d.map(function(h){var f=h.displayObject;return f})}},{key:"saveDirtyAABB",value:function(e){var t=e.renderable;t.dirtyRenderBounds||(t.dirtyRenderBounds=new au);var i=e.getRenderBounds();i&&t.dirtyRenderBounds.update(i.center,i.halfExtents)}},{key:"applyWorldTransform",value:function(e,t,i){i?(L.copy(this.tmpMat4,t.getLocalTransform()),L.multiply(this.tmpMat4,i,this.tmpMat4),L.multiply(this.tmpMat4,this.vpMatrix,this.tmpMat4)):(L.copy(this.tmpMat4,t.getWorldTransform()),L.multiply(this.tmpMat4,this.vpMatrix,this.tmpMat4)),e.setTransform(this.tmpMat4[0],this.tmpMat4[1],this.tmpMat4[4],this.tmpMat4[5],this.tmpMat4[12],this.tmpMat4[13])}},{key:"safeMergeAABB",value:function(){for(var e=new au,t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return i.forEach(function(s){e.add(s)}),e}}])}();l3.tag="CanvasRenderer";function nb(r,n,e,t,i,a,s){var o,l;if(r.image.nodeName==="rect"){var u=r.image.parsedStyle,c=u.width,d=u.height;l=t.contextService.getDPR();var h=t.config.offscreenCanvas;o=a.offscreenCanvasCreator.getOrCreateCanvas(h),o.width=c*l,o.height=d*l;var f=a.offscreenCanvasCreator.getOrCreateContext(h),v={restoreStack:[],prevObject:null,currentContext:new Map};r.image.forEach(function(m){i.renderDisplayObject(m,f,t,v,a)}),v.restoreStack.forEach(function(){f.restore()})}var g=s.getOrCreatePatternSync(n,r,e,o,l,n.getGeometryBounds().min,function(){n.renderable.dirty=!0,t.renderingService.dirtify()});return g}function rb(r,n,e,t){var i;if(r.type===Cg.LinearGradient||r.type===Cg.RadialGradient){var a=n.getGeometryBounds(),s=a&&a.halfExtents[0]*2||1,o=a&&a.halfExtents[1]*2||1,l=a&&a.min||[0,0];i=t.getOrCreateGradient(Oa(Oa({type:r.type},r.value),{},{min:l,width:s,height:o}),e)}return i}var ib=["shadowBlur","shadowOffsetX","shadowOffsetY"],u3=["lineCap","lineJoin","miterLimit"],Yl={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},c3={};function Xo(r,n,e,t){var i=t.has(n)?t.get(n):Yl[n];return i!==e&&(n==="lineDash"?r.setLineDash(e):r[n]=e,t.set(n,e)),i}var Vne=function(){function r(n){Un(this,r),this.imagePool=n}return Vn(r,[{key:"applyAttributesToContext",value:function(e,t){}},{key:"render",value:function(e,t,i,a,s,o){}},{key:"applyCommonStyleToContext",value:function(e,t,i,a){var s=i?c3:a.prevObject.parsedStyle,o=t.parsedStyle;(i||o.opacity!==s.opacity)&&Xo(e,"globalAlpha",(0,xe.Z)(o.opacity)?Yl.globalAlpha:o.opacity,a.currentContext),(i||o.blend!==s.blend)&&Xo(e,"globalCompositeOperation",(0,xe.Z)(o.blend)?Yl.globalCompositeOperation:o.blend,a.currentContext)}},{key:"applyStrokeFillStyleToContext",value:function(e,t,i,a){var s=i?c3:a.prevObject.parsedStyle,o=t.parsedStyle,l=o.lineWidth,u=l===void 0?Yl.lineWidth:l,c=o.fill&&!o.fill.isNone,d=o.stroke&&!o.stroke.isNone&&u>0;if(d){if(i||t.attributes.stroke!==a.prevObject.attributes.stroke){var h=!(0,xe.Z)(o.stroke)&&!Array.isArray(o.stroke)&&!o.stroke.isNone?t.attributes.stroke:Yl.strokeStyle;Xo(e,"strokeStyle",h,a.currentContext)}(i||o.lineWidth!==s.lineWidth)&&Xo(e,"lineWidth",(0,xe.Z)(o.lineWidth)?Yl.lineWidth:o.lineWidth,a.currentContext),(i||o.lineDash!==s.lineDash)&&Xo(e,"lineDash",o.lineDash||Yl.lineDash,a.currentContext),(i||o.lineDashOffset!==s.lineDashOffset)&&Xo(e,"lineDashOffset",(0,xe.Z)(o.lineDashOffset)?Yl.lineDashOffset:o.lineDashOffset,a.currentContext);for(var f=0;f<u3.length;f++){var v=u3[f];(i||o[v]!==s[v])&&Xo(e,v,(0,xe.Z)(o[v])?Yl[v]:o[v],a.currentContext)}}if(c&&(i||t.attributes.fill!==a.prevObject.attributes.fill)){var g=!(0,xe.Z)(o.fill)&&!Array.isArray(o.fill)&&!o.fill.isNone?t.attributes.fill:Yl.fillStyle;Xo(e,"fillStyle",g,a.currentContext)}}},{key:"applyStyleToContext",value:function(e,t,i,a){var s=t.nodeName;this.applyCommonStyleToContext(e,t,i,a),s===on.IMAGE||this.applyStrokeFillStyleToContext(e,t,i,a)}},{key:"applyShadowAndFilterStyleToContext",value:function(e,t,i,a){var s=t.parsedStyle;if(i){Xo(e,"shadowColor",s.shadowColor.toString(),a.currentContext);for(var o=0;o<ib.length;o++){var l=ib[o];Xo(e,l,s[l]||Yl[l],a.currentContext)}}s.filter&&s.filter.length&&Xo(e,"filter",t.attributes.filter,a.currentContext)}},{key:"clearShadowAndFilterStyleForContext",value:function(e,t,i,a){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(t){Xo(e,"shadowColor",Yl.shadowColor,a.currentContext);for(var o=0;o<ib.length;o++){var l=ib[o];Xo(e,l,Yl[l],a.currentContext)}}if(i)if(t&&s){var u=e.filter;!(0,xe.Z)(u)&&u.indexOf("drop-shadow")>-1&&Xo(e,"filter",u.replace(/drop-shadow\([^)]*\)/,"").trim()||Yl.filter,a.currentContext)}else Xo(e,"filter",Yl.filter,a.currentContext)}},{key:"fillToContext",value:function(e,t,i,a,s){var o=this,l=t.parsedStyle,u=l.fill,c=l.fillRule,d=null;if(Array.isArray(u)&&u.length>0)u.forEach(function(f){var v,g=Xo(e,"fillStyle",rb(f,t,e,o.imagePool),i.currentContext);d=(v=d)!==null&&v!==void 0?v:g,c?e.fill(c):e.fill()});else{if(Sy(u)){var h=nb(u,t,e,t.ownerDocument.defaultView.context,a,s,this.imagePool);h&&(e.fillStyle=h,d=!0)}c?e.fill(c):e.fill()}d!==null&&Xo(e,"fillStyle",d,i.currentContext)}},{key:"strokeToContext",value:function(e,t,i,a,s){var o=this,l=t.parsedStyle.stroke,u=null;if(Array.isArray(l)&&l.length>0)l.forEach(function(f){var v,g=Xo(e,"strokeStyle",rb(f,t,e,o.imagePool),i.currentContext);u=(v=u)!==null&&v!==void 0?v:g,e.stroke()});else{if(Sy(l)){var c=nb(l,t,e,t.ownerDocument.defaultView.context,a,s,this.imagePool);if(c){var d,h=Xo(e,"strokeStyle",c,i.currentContext);u=(d=u)!==null&&d!==void 0?d:h}}e.stroke()}u!==null&&Xo(e,"strokeStyle",u,i.currentContext)}},{key:"drawToContext",value:function(e,t,i,a,s){var o,l=t.nodeName,u=t.parsedStyle,c=u.opacity,d=c===void 0?Yl.globalAlpha:c,h=u.fillOpacity,f=h===void 0?Yl.fillOpacity:h,v=u.strokeOpacity,g=v===void 0?Yl.strokeOpacity:v,m=u.lineWidth,y=m===void 0?Yl.lineWidth:m,w=u.fill&&!u.fill.isNone,T=u.stroke&&!u.stroke.isNone&&y>0;if(!(!w&&!T)){var G=!(0,xe.Z)(u.shadowColor)&&u.shadowBlur>0,x=u.shadowType==="inner",_=((o=u.fill)===null||o===void 0?void 0:o.alpha)===0,p=!!(u.filter&&u.filter.length),b=G&&T&&(l===on.PATH||l===on.LINE||l===on.POLYLINE||_||x),R=null;if(w){b||this.applyShadowAndFilterStyleToContext(e,t,G,i);var B=d*f;R=Xo(e,"globalAlpha",B,i.currentContext),this.fillToContext(e,t,i,a,s),b||this.clearShadowAndFilterStyleForContext(e,G,p,i)}if(T){var j=!1,Z=d*g,te=Xo(e,"globalAlpha",Z,i.currentContext);if(R=w?R:te,b&&(this.applyShadowAndFilterStyleToContext(e,t,G,i),j=!0,x)){var le=e.globalCompositeOperation;e.globalCompositeOperation="source-atop",this.strokeToContext(e,t,i,a,s),e.globalCompositeOperation=le,this.clearShadowAndFilterStyleForContext(e,G,p,i,!0)}this.strokeToContext(e,t,i,a,s),j&&this.clearShadowAndFilterStyleForContext(e,G,p,i)}R!==null&&Xo(e,"globalAlpha",R,i.currentContext)}}}])}(),uC=function(r){function n(){return Un(this,n),Ba(this,n,arguments)}return $a(n,r),Vn(n,[{key:"render",value:function(t,i,a,s,o,l){var u=i.fill,c=i.fillRule,d=i.opacity,h=d===void 0?1:d,f=i.fillOpacity,v=f===void 0?1:f,g=i.stroke,m=i.strokeOpacity,y=m===void 0?1:m,w=i.lineWidth,T=w===void 0?1:w,G=i.lineCap,x=i.lineJoin,_=i.shadowType,p=i.shadowColor,b=i.shadowBlur,R=i.filter,B=i.miterLimit,j=u&&!u.isNone,Z=g&&!g.isNone&&T>0,te=(u==null?void 0:u.alpha)===0,le=!!(R&&R.length),ue=!(0,xe.Z)(p)&&b>0,se=a.nodeName,V=_==="inner",ee=Z&&ue&&(se===on.PATH||se===on.LINE||se===on.POLYLINE||te||V);j&&(t.globalAlpha=h*v,ee||ab(a,t,ue),d3(t,a,u,c,s,o,l,this.imagePool),ee||this.clearShadowAndFilter(t,le,ue)),Z&&(t.globalAlpha=h*y,t.lineWidth=T,(0,xe.Z)(B)||(t.miterLimit=B),(0,xe.Z)(G)||(t.lineCap=G),(0,xe.Z)(x)||(t.lineJoin=x),ee&&(V&&(t.globalCompositeOperation="source-atop"),ab(a,t,!0),V&&(cC(t,a,g,s,o,l,this.imagePool),t.globalCompositeOperation=Yl.globalCompositeOperation,this.clearShadowAndFilter(t,le,!0))),cC(t,a,g,s,o,l,this.imagePool))}},{key:"clearShadowAndFilter",value:function(t,i,a){if(a&&(t.shadowColor="transparent",t.shadowBlur=0),i){var s=t.filter;!(0,xe.Z)(s)&&s.indexOf("drop-shadow")>-1&&(t.filter=s.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")}}}])}(Vne);function ab(r,n,e){var t=r.parsedStyle,i=t.filter,a=t.shadowColor,s=t.shadowBlur,o=t.shadowOffsetX,l=t.shadowOffsetY;i&&i.length&&(n.filter=r.style.filter),e&&(n.shadowColor=a.toString(),n.shadowBlur=s||0,n.shadowOffsetX=o||0,n.shadowOffsetY=l||0)}function d3(r,n,e,t,i,a,s,o){var l=arguments.length>8&&arguments[8]!==void 0?arguments[8]:!1;Array.isArray(e)?e.forEach(function(u){r.fillStyle=rb(u,n,r,o),l||(t?r.fill(t):r.fill())}):(Sy(e)&&(r.fillStyle=nb(e,n,r,i,a,s,o)),l||(t?r.fill(t):r.fill()))}function cC(r,n,e,t,i,a,s){var o=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1;Array.isArray(e)?e.forEach(function(l){r.strokeStyle=rb(l,n,r,s),o||r.stroke()}):(Sy(e)&&(r.strokeStyle=nb(e,n,r,t,i,a,s)),o||r.stroke())}function Une(r,n){var e=aa(r,4),t=e[0],i=e[1],a=e[2],s=e[3],o=aa(n,4),l=o[0],u=o[1],c=o[2],d=o[3],h=Math.max(t,l),f=Math.max(i,u),v=Math.min(t+a,l+c),g=Math.min(i+s,u+d);return v<=h||g<=f?null:[h,f,v-h,g-f]}function jne(r,n){var e=E.fF(E.Ue(),[r[0],r[1],0],n),t=E.fF(E.Ue(),[r[0]+r[2],r[1],0],n),i=E.fF(E.Ue(),[r[0],r[1]+r[3],0],n),a=E.fF(E.Ue(),[r[0]+r[2],r[1]+r[3],0],n);return[Math.min(e[0],t[0],i[0],a[0]),Math.min(e[1],t[1],i[1],a[1]),Math.max(e[0],t[0],i[0],a[0])-Math.min(e[0],t[0],i[0],a[0]),Math.max(e[1],t[1],i[1],a[1])-Math.min(e[1],t[1],i[1],a[1])]}var Hne=function(r){function n(){return Un(this,n),Ba(this,n,arguments)}return $a(n,r),Vn(n,[{key:"renderDownSampled",value:function(t,i,a,s){var o=s.src,l=s.imageCache;if(!l.downSampled){this.imagePool.createDownSampledImage(o,a).then(function(u){a.renderable.dirty=!0,a.ownerDocument.defaultView.context.renderingService.dirtify()}).catch(function(){});return}t.drawImage(l.downSampled,Math.floor(s.drawRect[0]),Math.floor(s.drawRect[1]),Math.ceil(s.drawRect[2]),Math.ceil(s.drawRect[3]))}},{key:"renderTile",value:function(t,i,a,s){var o=s.src,l=s.imageCache,u=s.imageRect,c=s.drawRect,d=l.size,h=t.getTransform(),f=h.a,v=h.b,g=h.c,m=h.d,y=h.e,w=h.f;if(t.resetTransform(),!(l!=null&&l.gridSize)){this.imagePool.createImageTiles(o,[],function(){a.renderable.dirty=!0,a.ownerDocument.defaultView.context.renderingService.dirtify()},a).catch(function(){});return}for(var T=[d[0]/u[2],d[1]/u[3]],G=[l.tileSize[0]/T[0],l.tileSize[1]/T[1]],x=[Math.floor((c[0]-u[0])/G[0]),Math.ceil((c[0]+c[2]-u[0])/G[0])],_=x[0],p=x[1],b=[Math.floor((c[1]-u[1])/G[1]),Math.ceil((c[1]+c[3]-u[1])/G[1])],R=b[0],B=b[1],j=R;j<=B;j++)for(var Z=_;Z<=p;Z++){var te=l.tiles[j][Z];if(te){var le=[Math.floor(u[0]+te.tileX*G[0]),Math.floor(u[1]+te.tileY*G[1]),Math.ceil(G[0]),Math.ceil(G[1])];t.drawImage(te.data,le[0],le[1],le[2],le[3])}}t.setTransform(f,v,g,m,y,w)}},{key:"render",value:function(t,i,a){var s=i.x,o=s===void 0?0:s,l=i.y,u=l===void 0?0:l,c=i.width,d=i.height,h=i.src,f=i.shadowColor,v=i.shadowBlur,g=this.imagePool.getImageSync(h,a),m=g==null?void 0:g.img,y=c,w=d;if(m){y||(y=m.width),w||(w=m.height);var T=!(0,xe.Z)(f)&&v>0;ab(a,t,T);try{var G=a.ownerDocument.defaultView.getContextService().getDomElement(),x=G.width,_=G.height,p=t.getTransform(),b=p.a,R=p.b,B=p.c,j=p.d,Z=p.e,te=p.f,le=L.fromValues(b,B,0,0,R,j,0,0,0,0,1,0,Z,te,0,1),ue=jne([o,u,y,w],le),se=Une([0,0,x,_],ue);if(!se)return;if(!a.ownerDocument.defaultView.getConfig().enableLargeImageOptimization){n.renderFull(t,i,a,{image:m,drawRect:[o,u,y,w]});return}var V=ue[2]/g.size[0];if(V<(g.downSamplingRate||.5)){this.renderDownSampled(t,i,a,{src:h,imageCache:g,drawRect:[o,u,y,w]});return}if(!lC.isSupportTile){n.renderFull(t,i,a,{image:m,drawRect:[o,u,y,w]});return}this.renderTile(t,i,a,{src:h,imageCache:g,imageRect:ue,drawRect:se})}catch(ee){}}}},{key:"drawToContext",value:function(t,i,a,s,o){this.render(t,i.parsedStyle,i)}}],[{key:"renderFull",value:function(t,i,a,s){t.drawImage(s.image,Math.floor(s.drawRect[0]),Math.floor(s.drawRect[1]),Math.ceil(s.drawRect[2]),Math.ceil(s.drawRect[3]))}}])}(uC),Wne=function(r){function n(){return Un(this,n),Ba(this,n,arguments)}return $a(n,r),Vn(n,[{key:"render",value:function(t,i,a,s,o,l){a.getBounds();var u=i.lineWidth,c=u===void 0?1:u,d=i.textAlign,h=d===void 0?"start":d,f=i.textBaseline,v=f===void 0?"alphabetic":f,g=i.lineJoin,m=g===void 0?"miter":g,y=i.miterLimit,w=y===void 0?10:y,T=i.letterSpacing,G=T===void 0?0:T,x=i.stroke,_=i.fill,p=i.fillRule,b=i.fillOpacity,R=b===void 0?1:b,B=i.strokeOpacity,j=B===void 0?1:B,Z=i.opacity,te=Z===void 0?1:Z,le=i.metrics,ue=i.x,se=ue===void 0?0:ue,V=i.y,ee=V===void 0?0:V,he=i.dx,ut=i.dy,ct=i.shadowColor,Lt=i.shadowBlur,vn=le.font,tn=le.lines,rn=le.height,mn=le.lineHeight,ar=le.lineMetrics;t.font=vn,t.lineWidth=c,t.textAlign=h==="middle"?"center":h;var gi=v;gi==="alphabetic"&&(gi="bottom"),t.lineJoin=m,(0,xe.Z)(w)||(t.miterLimit=w);var kr=ee;v==="middle"?kr+=-rn/2-mn/2:v==="bottom"||v==="alphabetic"||v==="ideographic"?kr+=-rn:(v==="top"||v==="hanging")&&(kr+=-mn);var Ta=se+(he||0);kr+=ut||0,tn.length===1&&(gi==="bottom"?(gi="middle",kr-=.5*rn):gi==="top"&&(gi="middle",kr+=.5*rn)),t.textBaseline=gi;var Wa=!(0,xe.Z)(ct)&&Lt>0;ab(a,t,Wa);for(var la=0;la<tn.length;la++){var ys=c/2+Ta;kr+=mn,!(0,xe.Z)(x)&&!x.isNone&&c&&this.drawLetterSpacing(t,a,tn[la],ar[la],h,ys,kr,G,_,p,R,x,j,te,!0,s,o,l),(0,xe.Z)(_)||this.drawLetterSpacing(t,a,tn[la],ar[la],h,ys,kr,G,_,p,R,x,j,te,!1,s,o,l)}}},{key:"drawLetterSpacing",value:function(t,i,a,s,o,l,u,c,d,h,f,v,g,m,y,w,T,G){if(c===0){y?this.strokeText(t,i,a,l,u,v,g,w,T,G):this.fillText(t,i,a,l,u,d,h,f,m,w,T,G);return}var x=t.textAlign;t.textAlign="left";var _=l;o==="center"||o==="middle"?_=l-s.width/2:(o==="right"||o==="end")&&(_=l-s.width);for(var p=Array.from(a),b=t.measureText(a).width,R=0,B=0;B<p.length;++B){var j=p[B];y?this.strokeText(t,i,j,_,u,v,g,w,T,G):this.fillText(t,i,j,_,u,d,h,f,m,w,T,G),R=t.measureText(a.substring(B+1)).width,_+=b-R+c,b=R}t.textAlign=x}},{key:"fillText",value:function(t,i,a,s,o,l,u,c,d,h,f,v){d3(t,i,l,u,h,f,v,this.imagePool,!0);var g,m=!(0,xe.Z)(c)&&c!==1;m&&(g=t.globalAlpha,t.globalAlpha=c*d),t.fillText(a,s,o),m&&(t.globalAlpha=g)}},{key:"strokeText",value:function(t,i,a,s,o,l,u,c,d,h){cC(t,i,l,c,d,h,this.imagePool,!0);var f,v=!(0,xe.Z)(u)&&u!==1;v&&(f=t.globalAlpha,t.globalAlpha=u),t.strokeText(a,s,o),v&&(t.globalAlpha=f)}},{key:"drawToContext",value:function(t,i,a,s,o){this.render(t,i.parsedStyle,i,i.ownerDocument.defaultView.context,s,o)}}])}(uC),Yne=function(r){function n(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Un(this,n),e=Ba(this,n),e.name="canvas-renderer",e.options=t,e}return $a(n,r),Vn(n,[{key:"init",value:function(){var t,i=Oa({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),a=this.context.imagePool,s=new uC(a),o=(t={},xr(xr(xr(xr(xr(xr(xr(xr(xr(xr(t,on.CIRCLE,s),on.ELLIPSE,s),on.RECT,s),on.IMAGE,new Hne(a)),on.TEXT,new Wne(a)),on.LINE,s),on.POLYLINE,s),on.POLYGON,s),on.PATH,s),on.GROUP,void 0),xr(xr(xr(t,on.HTML,void 0),on.MESH,void 0),on.FRAGMENT,void 0));this.context.defaultStyleRendererFactory=o,this.context.styleRendererFactory=o,this.addRenderingPlugin(new l3(i))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory}}])}(ky);function Tr(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}function kp(r){"@babel/helpers - typeof";return kp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},kp(r)}function Zne(r,n){if(kp(r)!="object"||!r)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var t=e.call(r,n||"default");if(kp(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(r)}function h3(r){var n=Zne(r,"string");return kp(n)=="symbol"?n:n+""}function f3(r,n){for(var e=0;e<n.length;e++){var t=n[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,h3(t.key),t)}}function Cr(r,n,e){return n&&f3(r.prototype,n),e&&f3(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function wp(r){return wp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},wp(r)}function v3(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(n){}return(v3=function(){return!!r})()}function Xne(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Kne(r,n){if(n&&(kp(n)=="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Xne(r)}function Ws(r,n,e){return n=wp(n),Kne(r,v3()?Reflect.construct(n,e||[],wp(r).constructor):n.apply(r,e))}function dC(r,n){return dC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},dC(r,n)}function Ys(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(n&&n.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),n&&dC(r,n)}function _a(r,n,e){return(n=h3(n))in r?Object.defineProperty(r,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[n]=e,r}function g3(r,n){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);n&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),e.push.apply(e,t)}return e}function gl(r){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?g3(Object(e),!0).forEach(function(t){_a(r,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):g3(Object(e)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))})}return r}function hC(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=Array(n);e<n;e++)t[e]=r[e];return t}function Jne(r){if(Array.isArray(r))return hC(r)}function Qne(r){if(typeof Symbol!="undefined"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function fC(r,n){if(r){if(typeof r=="string")return hC(r,n);var e={}.toString.call(r).slice(8,-1);return e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set"?Array.from(r):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?hC(r,n):void 0}}function qne(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Al(r){return Jne(r)||Qne(r)||fC(r)||qne()}function ere(r){if(Array.isArray(r))return r}function tre(r,n){var e=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(e!=null){var t,i,a,s,o=[],l=!0,u=!1;try{if(a=(e=e.call(r)).next,n===0){if(Object(e)!==e)return;l=!1}else for(;!(l=(t=a.call(e)).done)&&(o.push(t.value),o.length!==n);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&e.return!=null&&(s=e.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function nre(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ko(r,n){return ere(r)||tre(r,n)||fC(r,n)||nre()}function rre(r,n){for(;!{}.hasOwnProperty.call(r,n)&&(r=wp(r))!==null;);return r}function vC(){return vC=typeof Reflect!="undefined"&&Reflect.get?Reflect.get.bind():function(r,n,e){var t=rre(r,n);if(t){var i=Object.getOwnPropertyDescriptor(t,n);return i.get?i.get.call(arguments.length<3?r:e):i.value}},vC.apply(null,arguments)}function _3(r,n,e,t){var i=vC(wp(1&t?r.prototype:r),n,e);return 2&t&&typeof i=="function"?function(a){return i.apply(e,a)}:i}function gC(r,n,e){r.prototype=n.prototype=e,e.constructor=r}function m3(r,n){var e=Object.create(r.prototype);for(var t in n)e[t]=n[t];return e}function Ry(){}var Ay=.7,sb=1/Ay,Sp="\\s*([+-]?\\d+)\\s*",Ly="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",av="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ire=/^#([0-9a-f]{3,8})$/,are=new RegExp(`^rgb\\(${Sp},${Sp},${Sp}\\)$`),sre=new RegExp(`^rgb\\(${av},${av},${av}\\)$`),ore=new RegExp(`^rgba\\(${Sp},${Sp},${Sp},${Ly}\\)$`),lre=new RegExp(`^rgba\\(${av},${av},${av},${Ly}\\)$`),ure=new RegExp(`^hsl\\(${Ly},${av},${av}\\)$`),cre=new RegExp(`^hsla\\(${Ly},${av},${av},${Ly}\\)$`),p3={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};gC(Ry,ob,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:y3,formatHex:y3,formatHex8:dre,formatHsl:hre,formatRgb:x3,toString:x3});function y3(){return this.rgb().formatHex()}function dre(){return this.rgb().formatHex8()}function hre(){return S3(this).formatHsl()}function x3(){return this.rgb().formatRgb()}function ob(r){var n,e;return r=(r+"").trim().toLowerCase(),(n=ire.exec(r))?(e=n[1].length,n=parseInt(n[1],16),e===6?E3(n):e===3?new Hc(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):e===8?lb(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):e===4?lb(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=are.exec(r))?new Hc(n[1],n[2],n[3],1):(n=sre.exec(r))?new Hc(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=ore.exec(r))?lb(n[1],n[2],n[3],n[4]):(n=lre.exec(r))?lb(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=ure.exec(r))?w3(n[1],n[2]/100,n[3]/100,1):(n=cre.exec(r))?w3(n[1],n[2]/100,n[3]/100,n[4]):p3.hasOwnProperty(r)?E3(p3[r]):r==="transparent"?new Hc(NaN,NaN,NaN,0):null}function E3(r){return new Hc(r>>16&255,r>>8&255,r&255,1)}function lb(r,n,e,t){return t<=0&&(r=n=e=NaN),new Hc(r,n,e,t)}function fre(r){return r instanceof Ry||(r=ob(r)),r?(r=r.rgb(),new Hc(r.r,r.g,r.b,r.opacity)):new Hc}function vre(r,n,e,t){return arguments.length===1?fre(r):new Hc(r,n,e,t==null?1:t)}function Hc(r,n,e,t){this.r=+r,this.g=+n,this.b=+e,this.opacity=+t}gC(Hc,vre,m3(Ry,{brighter(r){return r=r==null?sb:Math.pow(sb,r),new Hc(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?Ay:Math.pow(Ay,r),new Hc(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new Hc(V_(this.r),V_(this.g),V_(this.b),ub(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:b3,formatHex:b3,formatHex8:gre,formatRgb:k3,toString:k3}));function b3(){return`#${U_(this.r)}${U_(this.g)}${U_(this.b)}`}function gre(){return`#${U_(this.r)}${U_(this.g)}${U_(this.b)}${U_((isNaN(this.opacity)?1:this.opacity)*255)}`}function k3(){const r=ub(this.opacity);return`${r===1?"rgb(":"rgba("}${V_(this.r)}, ${V_(this.g)}, ${V_(this.b)}${r===1?")":`, ${r})`}`}function ub(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function V_(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function U_(r){return r=V_(r),(r<16?"0":"")+r.toString(16)}function w3(r,n,e,t){return t<=0?r=n=e=NaN:e<=0||e>=1?r=n=NaN:n<=0&&(r=NaN),new nf(r,n,e,t)}function S3(r){if(r instanceof nf)return new nf(r.h,r.s,r.l,r.opacity);if(r instanceof Ry||(r=ob(r)),!r)return new nf;if(r instanceof nf)return r;r=r.rgb();var n=r.r/255,e=r.g/255,t=r.b/255,i=Math.min(n,e,t),a=Math.max(n,e,t),s=NaN,o=a-i,l=(a+i)/2;return o?(n===a?s=(e-t)/o+(e<t)*6:e===a?s=(t-n)/o+2:s=(n-e)/o+4,o/=l<.5?a+i:2-a-i,s*=60):o=l>0&&l<1?0:s,new nf(s,o,l,r.opacity)}function _re(r,n,e,t){return arguments.length===1?S3(r):new nf(r,n,e,t==null?1:t)}function nf(r,n,e,t){this.h=+r,this.s=+n,this.l=+e,this.opacity=+t}gC(nf,_re,m3(Ry,{brighter(r){return r=r==null?sb:Math.pow(sb,r),new nf(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?Ay:Math.pow(Ay,r),new nf(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,n=isNaN(r)||isNaN(this.s)?0:this.s,e=this.l,t=e+(e<.5?e:1-e)*n,i=2*e-t;return new Hc(_C(r>=240?r-240:r+120,i,t),_C(r,i,t),_C(r<120?r+240:r-120,i,t),this.opacity)},clamp(){return new nf(T3(this.h),cb(this.s),cb(this.l),ub(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const r=ub(this.opacity);return`${r===1?"hsl(":"hsla("}${T3(this.h)}, ${cb(this.s)*100}%, ${cb(this.l)*100}%${r===1?")":`, ${r})`}`}}));function T3(r){return r=(r||0)%360,r<0?r+360:r}function cb(r){return Math.max(0,Math.min(1,r||0))}function _C(r,n,e){return(r<60?n+(e-n)*r/60:r<180?e:r<240?n+(e-n)*(240-r)/60:n)*255}function Tp(r,n){var e=typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(!e){if(Array.isArray(r)||(e=fC(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:i}}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 a,s=!0,o=!1;return{s:function(){e=e.call(r)},n:function(){var u=e.next();return s=u.done,u},e:function(u){o=!0,a=u},f:function(){try{s||e.return==null||e.return()}finally{if(o)throw a}}}}function mre(r,n){if(r==null)return{};var e={};for(var t in r)if({}.hasOwnProperty.call(r,t)){if(n.includes(t))continue;e[t]=r[t]}return e}function Cp(r,n){if(r==null)return{};var e,t,i=mre(r,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(t=0;t<a.length;t++)e=a[t],n.includes(e)||{}.propertyIsEnumerable.call(r,e)&&(i[e]=r[e])}return i}var pre=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof k.g!="undefined"?k.g:typeof self!="undefined"?self:{},C3={exports:{}};(function(r,n){(function(e,t){r.exports=t()})(pre,function(){function e(x,_,p,b,R){t(x,_,p||0,b||x.length-1,R||a)}function t(x,_,p,b,R){for(;b>p;){if(b-p>600){var B=b-p+1,j=_-p+1,Z=Math.log(B),te=.5*Math.exp(2*Z/3),le=.5*Math.sqrt(Z*te*(B-te)/B)*(j-B/2<0?-1:1),ue=Math.max(p,Math.floor(_-j*te/B+le)),se=Math.min(b,Math.floor(_+(B-j)*te/B+le));t(x,_,ue,se,R)}var V=x[_],ee=p,he=b;for(i(x,p,_),R(x[b],V)>0&&i(x,p,b);ee<he;){for(i(x,ee,he),ee++,he--;R(x[ee],V)<0;)ee++;for(;R(x[he],V)>0;)he--}R(x[p],V)===0?i(x,p,he):(he++,i(x,he,b)),he<=_&&(p=he+1),_<=he&&(b=he-1)}}function i(x,_,p){var b=x[_];x[_]=x[p],x[p]=b}function a(x,_){return x<_?-1:x>_?1:0}var s=function(_){_===void 0&&(_=9),this._maxEntries=Math.max(4,_),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()};s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(_){var p=this.data,b=[];if(!w(_,p))return b;for(var R=this.toBBox,B=[];p;){for(var j=0;j<p.children.length;j++){var Z=p.children[j],te=p.leaf?R(Z):Z;w(_,te)&&(p.leaf?b.push(Z):y(_,te)?this._all(Z,b):B.push(Z))}p=B.pop()}return b},s.prototype.collides=function(_){var p=this.data;if(!w(_,p))return!1;for(var b=[];p;){for(var R=0;R<p.children.length;R++){var B=p.children[R],j=p.leaf?this.toBBox(B):B;if(w(_,j)){if(p.leaf||y(_,j))return!0;b.push(B)}}p=b.pop()}return!1},s.prototype.load=function(_){if(!(_&&_.length))return this;if(_.length<this._minEntries){for(var p=0;p<_.length;p++)this.insert(_[p]);return this}var b=this._build(_.slice(),0,_.length-1,0);if(!this.data.children.length)this.data=b;else if(this.data.height===b.height)this._splitRoot(this.data,b);else{if(this.data.height<b.height){var R=this.data;this.data=b,b=R}this._insert(b,this.data.height-b.height-1,!0)}return this},s.prototype.insert=function(_){return _&&this._insert(_,this.data.height-1),this},s.prototype.clear=function(){return this.data=T([]),this},s.prototype.remove=function(_,p){if(!_)return this;for(var b=this.data,R=this.toBBox(_),B=[],j=[],Z,te,le;b||B.length;){if(b||(b=B.pop(),te=B[B.length-1],Z=j.pop(),le=!0),b.leaf){var ue=o(_,b.children,p);if(ue!==-1)return b.children.splice(ue,1),B.push(b),this._condense(B),this}!le&&!b.leaf&&y(b,R)?(B.push(b),j.push(Z),Z=0,te=b,b=b.children[0]):te?(Z++,b=te.children[Z],le=!1):b=null}return this},s.prototype.toBBox=function(_){return _},s.prototype.compareMinX=function(_,p){return _.minX-p.minX},s.prototype.compareMinY=function(_,p){return _.minY-p.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(_){return this.data=_,this},s.prototype._all=function(_,p){for(var b=[];_;)_.leaf?p.push.apply(p,_.children):b.push.apply(b,_.children),_=b.pop();return p},s.prototype._build=function(_,p,b,R){var B=b-p+1,j=this._maxEntries,Z;if(B<=j)return Z=T(_.slice(p,b+1)),l(Z,this.toBBox),Z;R||(R=Math.ceil(Math.log(B)/Math.log(j)),j=Math.ceil(B/Math.pow(j,R-1))),Z=T([]),Z.leaf=!1,Z.height=R;var te=Math.ceil(B/j),le=te*Math.ceil(Math.sqrt(j));G(_,p,b,le,this.compareMinX);for(var ue=p;ue<=b;ue+=le){var se=Math.min(ue+le-1,b);G(_,ue,se,te,this.compareMinY);for(var V=ue;V<=se;V+=te){var ee=Math.min(V+te-1,se);Z.children.push(this._build(_,V,ee,R-1))}}return l(Z,this.toBBox),Z},s.prototype._chooseSubtree=function(_,p,b,R){for(;R.push(p),!(p.leaf||R.length-1===b);){for(var B=1/0,j=1/0,Z=void 0,te=0;te<p.children.length;te++){var le=p.children[te],ue=f(le),se=g(_,le)-ue;se<j?(j=se,B=ue<B?ue:B,Z=le):se===j&&ue<B&&(B=ue,Z=le)}p=Z||p.children[0]}return p},s.prototype._insert=function(_,p,b){var R=b?_:this.toBBox(_),B=[],j=this._chooseSubtree(R,this.data,p,B);for(j.children.push(_),c(j,R);p>=0&&B[p].children.length>this._maxEntries;)this._split(B,p),p--;this._adjustParentBBoxes(R,B,p)},s.prototype._split=function(_,p){var b=_[p],R=b.children.length,B=this._minEntries;this._chooseSplitAxis(b,B,R);var j=this._chooseSplitIndex(b,B,R),Z=T(b.children.splice(j,b.children.length-j));Z.height=b.height,Z.leaf=b.leaf,l(b,this.toBBox),l(Z,this.toBBox),p?_[p-1].children.push(Z):this._splitRoot(b,Z)},s.prototype._splitRoot=function(_,p){this.data=T([_,p]),this.data.height=_.height+1,this.data.leaf=!1,l(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(_,p,b){for(var R,B=1/0,j=1/0,Z=p;Z<=b-p;Z++){var te=u(_,0,Z,this.toBBox),le=u(_,Z,b,this.toBBox),ue=m(te,le),se=f(te)+f(le);ue<B?(B=ue,R=Z,j=se<j?se:j):ue===B&&se<j&&(j=se,R=Z)}return R||b-p},s.prototype._chooseSplitAxis=function(_,p,b){var R=_.leaf?this.compareMinX:d,B=_.leaf?this.compareMinY:h,j=this._allDistMargin(_,p,b,R),Z=this._allDistMargin(_,p,b,B);j<Z&&_.children.sort(R)},s.prototype._allDistMargin=function(_,p,b,R){_.children.sort(R);for(var B=this.toBBox,j=u(_,0,p,B),Z=u(_,b-p,b,B),te=v(j)+v(Z),le=p;le<b-p;le++){var ue=_.children[le];c(j,_.leaf?B(ue):ue),te+=v(j)}for(var se=b-p-1;se>=p;se--){var V=_.children[se];c(Z,_.leaf?B(V):V),te+=v(Z)}return te},s.prototype._adjustParentBBoxes=function(_,p,b){for(var R=b;R>=0;R--)c(p[R],_)},s.prototype._condense=function(_){for(var p=_.length-1,b=void 0;p>=0;p--)_[p].children.length===0?p>0?(b=_[p-1].children,b.splice(b.indexOf(_[p]),1)):this.clear():l(_[p],this.toBBox)};function o(x,_,p){if(!p)return _.indexOf(x);for(var b=0;b<_.length;b++)if(p(x,_[b]))return b;return-1}function l(x,_){u(x,0,x.children.length,_,x)}function u(x,_,p,b,R){R||(R=T(null)),R.minX=1/0,R.minY=1/0,R.maxX=-1/0,R.maxY=-1/0;for(var B=_;B<p;B++){var j=x.children[B];c(R,x.leaf?b(j):j)}return R}function c(x,_){return x.minX=Math.min(x.minX,_.minX),x.minY=Math.min(x.minY,_.minY),x.maxX=Math.max(x.maxX,_.maxX),x.maxY=Math.max(x.maxY,_.maxY),x}function d(x,_){return x.minX-_.minX}function h(x,_){return x.minY-_.minY}function f(x){return(x.maxX-x.minX)*(x.maxY-x.minY)}function v(x){return x.maxX-x.minX+(x.maxY-x.minY)}function g(x,_){return(Math.max(_.maxX,x.maxX)-Math.min(_.minX,x.minX))*(Math.max(_.maxY,x.maxY)-Math.min(_.minY,x.minY))}function m(x,_){var p=Math.max(x.minX,_.minX),b=Math.max(x.minY,_.minY),R=Math.min(x.maxX,_.maxX),B=Math.min(x.maxY,_.maxY);return Math.max(0,R-p)*Math.max(0,B-b)}function y(x,_){return x.minX<=_.minX&&x.minY<=_.minY&&_.maxX<=x.maxX&&_.maxY<=x.maxY}function w(x,_){return _.minX<=x.maxX&&_.minY<=x.maxY&&_.maxX>=x.minX&&_.maxY>=x.minY}function T(x){return{children:x,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function G(x,_,p,b,R){for(var B=[_,p];B.length;)if(p=B.pop(),_=B.pop(),!(p-_<=b)){var j=_+Math.ceil((p-_)/b/2)*b;e(x,j,_,p,R),B.push(_,j,j,p)}}return s})})(C3);var TNe=C3.exports,Wr=function(r){return r.GROUP="g",r.FRAGMENT="fragment",r.CIRCLE="circle",r.ELLIPSE="ellipse",r.IMAGE="image",r.RECT="rect",r.LINE="line",r.POLYLINE="polyline",r.POLYGON="polygon",r.TEXT="text",r.PATH="path",r.HTML="html",r.MESH="mesh",r}({}),mC=function(r){return r[r.ZERO=0]="ZERO",r[r.NEGATIVE_ONE=1]="NEGATIVE_ONE",r}({}),yre=function(){function r(){Tr(this,r),this.plugins=[]}return Cr(r,[{key:"addRenderingPlugin",value:function(e){this.plugins.push(e),this.context.renderingPlugins.push(e)}},{key:"removeAllRenderingPlugins",value:function(){var e=this;this.plugins.forEach(function(t){var i=e.context.renderingPlugins.indexOf(t);i>=0&&e.context.renderingPlugins.splice(i,1)})}}])}(),CNe=null,pC=E.IH,Mp=E.JG,xre=E.Fp,Ere=E.VV,M3=E.bA,yC=E.lu,Wc=function(){function r(){Tr(this,r),this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return Cr(r,[{key:"update",value:function(e,t){Mp(this.center,e),Mp(this.halfExtents,t),yC(this.min,this.center,this.halfExtents),pC(this.max,this.center,this.halfExtents)}},{key:"setMinMax",value:function(e,t){pC(this.center,t,e),M3(this.center,this.center,.5),yC(this.halfExtents,t,e),M3(this.halfExtents,this.halfExtents,.5),Mp(this.min,e),Mp(this.max,t)}},{key:"getMin",value:function(){return this.min}},{key:"getMax",value:function(){return this.max}},{key:"add",value:function(e){if(!r.isEmpty(e)){if(r.isEmpty(this)){this.setMinMax(e.getMin(),e.getMax());return}var t=this.center,i=t[0],a=t[1],s=t[2],o=this.halfExtents,l=o[0],u=o[1],c=o[2],d=i-l,h=i+l,f=a-u,v=a+u,g=s-c,m=s+c,y=e.center,w=y[0],T=y[1],G=y[2],x=e.halfExtents,_=x[0],p=x[1],b=x[2],R=w-_,B=w+_,j=T-p,Z=T+p,te=G-b,le=G+b;R<d&&(d=R),B>h&&(h=B),j<f&&(f=j),Z>v&&(v=Z),te<g&&(g=te),le>m&&(m=le),t[0]=(d+h)*.5,t[1]=(f+v)*.5,t[2]=(g+m)*.5,o[0]=(h-d)*.5,o[1]=(v-f)*.5,o[2]=(m-g)*.5,this.min[0]=d,this.min[1]=f,this.min[2]=g,this.max[0]=h,this.max[1]=v,this.max[2]=m}}},{key:"setFromTransformedAABB",value:function(e,t){var i=this.center,a=this.halfExtents,s=e.center,o=e.halfExtents,l=t[0],u=t[4],c=t[8],d=t[1],h=t[5],f=t[9],v=t[2],g=t[6],m=t[10],y=Math.abs(l),w=Math.abs(u),T=Math.abs(c),G=Math.abs(d),x=Math.abs(h),_=Math.abs(f),p=Math.abs(v),b=Math.abs(g),R=Math.abs(m);i[0]=t[12]+l*s[0]+u*s[1]+c*s[2],i[1]=t[13]+d*s[0]+h*s[1]+f*s[2],i[2]=t[14]+v*s[0]+g*s[1]+m*s[2],a[0]=y*o[0]+w*o[1]+T*o[2],a[1]=G*o[0]+x*o[1]+_*o[2],a[2]=p*o[0]+b*o[1]+R*o[2],yC(this.min,i,a),pC(this.max,i,a)}},{key:"intersects",value:function(e){var t=this.getMax(),i=this.getMin(),a=e.getMax(),s=e.getMin();return i[0]<=a[0]&&t[0]>=s[0]&&i[1]<=a[1]&&t[1]>=s[1]&&i[2]<=a[2]&&t[2]>=s[2]}},{key:"intersection",value:function(e){if(!this.intersects(e))return null;var t=new r,i=xre([0,0,0],this.getMin(),e.getMin()),a=Ere([0,0,0],this.getMax(),e.getMax());return t.setMinMax(i,a),t}},{key:"getNegativeFarPoint",value:function(e){return e.pnVertexFlag===273?Mp([0,0,0],this.min):e.pnVertexFlag===272?[this.min[0],this.min[1],this.max[2]]:e.pnVertexFlag===257?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===256?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===17?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===16?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===1?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]}},{key:"getPositiveFarPoint",value:function(e){return e.pnVertexFlag===273?Mp([0,0,0],this.max):e.pnVertexFlag===272?[this.max[0],this.max[1],this.min[2]]:e.pnVertexFlag===257?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===256?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===17?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===16?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===1?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]}}],[{key:"isEmpty",value:function(e){return!e||e.halfExtents[0]===0&&e.halfExtents[1]===0&&e.halfExtents[2]===0}}])}(),bre=function(){function r(n,e){Tr(this,r),this.distance=n||0,this.normal=e||E.al(0,1,0),this.updatePNVertexFlag()}return Cr(r,[{key:"updatePNVertexFlag",value:function(){this.pnVertexFlag=(+(this.normal[0]>=0)<<8)+(+(this.normal[1]>=0)<<4)+ +(this.normal[2]>=0)}},{key:"distanceToPoint",value:function(e){return E.AK(e,this.normal)-this.distance}},{key:"normalize",value:function(){var e=1/E.Zh(this.normal);E.bA(this.normal,this.normal,e),this.distance*=e}},{key:"intersectsLine",value:function(e,t,i){var a=this.distanceToPoint(e),s=this.distanceToPoint(t),o=a/(a-s),l=o>=0&&o<=1;return l&&i&&E.t7(i,e,t,o),l}}])}(),MNe=function(r){return r[r.OUTSIDE=4294967295]="OUTSIDE",r[r.INSIDE=0]="INSIDE",r[r.INDETERMINATE=2147483647]="INDETERMINATE",r}({}),kre=function(){function r(n){if(Tr(this,r),this.planes=[],n)this.planes=n;else for(var e=0;e<6;e++)this.planes.push(new bre)}return Cr(r,[{key:"extractFromVPMatrix",value:function(e){var t=Ko(e,16),i=t[0],a=t[1],s=t[2],o=t[3],l=t[4],u=t[5],c=t[6],d=t[7],h=t[8],f=t[9],v=t[10],g=t[11],m=t[12],y=t[13],w=t[14],T=t[15];E.t8(this.planes[0].normal,o-i,d-l,g-h),this.planes[0].distance=T-m,E.t8(this.planes[1].normal,o+i,d+l,g+h),this.planes[1].distance=T+m,E.t8(this.planes[2].normal,o+a,d+u,g+f),this.planes[2].distance=T+y,E.t8(this.planes[3].normal,o-a,d-u,g-f),this.planes[3].distance=T-y,E.t8(this.planes[4].normal,o-s,d-c,g-v),this.planes[4].distance=T-w,E.t8(this.planes[5].normal,o+s,d+c,g+v),this.planes[5].distance=T+w,this.planes.forEach(function(G){G.normalize(),G.updatePNVertexFlag()})}}])}(),ih=function(){function r(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Tr(this,r),this.x=0,this.y=0,this.x=n,this.y=e}return Cr(r,[{key:"clone",value:function(){return new r(this.x,this.y)}},{key:"copyFrom",value:function(e){this.x=e.x,this.y=e.y}}])}(),Pp=function(){function r(n,e,t,i){Tr(this,r),this.x=n,this.y=e,this.width=t,this.height=i,this.left=n,this.right=n+t,this.top=e,this.bottom=e+i}return Cr(r,[{key:"toJSON",value:function(){}}],[{key:"fromRect",value:function(e){return new r(e.x,e.y,e.width,e.height)}},{key:"applyTransform",value:function(e,t){var i=me.al(e.x,e.y,0,1),a=me.al(e.x+e.width,e.y,0,1),s=me.al(e.x,e.y+e.height,0,1),o=me.al(e.x+e.width,e.y+e.height,0,1),l=me.Ue(),u=me.Ue(),c=me.Ue(),d=me.Ue();me.fF(l,i,t),me.fF(u,a,t),me.fF(c,s,t),me.fF(d,o,t);var h=Math.min(l[0],u[0],c[0],d[0]),f=Math.min(l[1],u[1],c[1],d[1]),v=Math.max(l[0],u[0],c[0],d[0]),g=Math.max(l[1],u[1],c[1],d[1]);return r.fromRect({x:h,y:f,width:v-h,height:g-f})}}])}(),Jo="Method not implemented.",PNe="Use document.documentElement instead.",wre="Cannot append a destroyed element.";function xC(r){return r===void 0?0:r>360||r<-360?r%360:r}var EC=E.Ue();function Yc(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;return Array.isArray(r)&&r.length===3?t?E.d9(r):E.JG(EC,r):(0,pe.Z)(r)?t?E.al(r,n,e):E.t8(EC,r,n,e):t?E.al(r[0],r[1]||n,r[2]||e):E.t8(EC,r[0],r[1]||n,r[2]||e)}var Sre=Math.PI/180;function Zs(r){return r*Sre}var Tre=180/Math.PI;function ah(r){return r*Tre}var Cre=.9;function NNe(r){return r%=400,r<0&&(r+=400),r*Cre}function ONe(r){return r/360}function Mre(r){return 360*r}var db=Math.PI/2;function Pre(r,n){var e=n[0],t=n[1],i=n[2],a=n[3],s=e*e,o=t*t,l=i*i,u=a*a,c=s+o+l+u,d=e*a-t*i;return d>.499995*c?(r[0]=db,r[1]=2*Math.atan2(t,e),r[2]=0):d<-.499995*c?(r[0]=-db,r[1]=2*Math.atan2(t,e),r[2]=0):(r[0]=Math.asin(2*(e*i-a*t)),r[1]=Math.atan2(2*(e*a+t*i),1-2*(l+u)),r[2]=Math.atan2(2*(e*t+i*a),1-2*(o+l))),r}function Nre(r,n){var e,t,i=L.getScaling(E.Ue(),n),a=Ko(i,3),s=a[0],o=a[1],l=a[2],u=Math.asin(-n[2]/s);return u<db?u>-db?(e=Math.atan2(n[6]/o,n[10]/l),t=Math.atan2(n[1]/s,n[0]/s)):(t=0,e=-Math.atan2(n[4]/o,n[5]/o)):(t=0,e=Math.atan2(n[4]/o,n[5]/o)),r[0]=e,r[1]=u,r[2]=t,r}function bC(r,n){return n.length===16?Nre(r,n):Pre(r,n)}function Ore(r,n,e,t,i){var a=Math.cos(r),s=Math.sin(r);return Ke.al(t*a,i*s,0,-t*s,i*a,0,n,e,1)}function Rre(r,n,e,t,i,a,s){var o=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1,l=2*a,u=e-n,c=t-i,d=l/u,h=l/c,f=(e+n)/u,v=(t+i)/c,g,m,y=s-a,w=s*a;return o?(g=-s/y,m=-w/y):(g=-(s+a)/y,m=-2*w/y),r[0]=d,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=h,r[6]=0,r[7]=0,r[8]=f,r[9]=v,r[10]=g,r[11]=-1,r[12]=0,r[13]=0,r[14]=m,r[15]=0,r}function P3(r){var n=r[0],e=r[1],t=r[3],i=r[4],a=Math.sqrt(n*n+e*e),s=Math.sqrt(t*t+i*i),o=n*i-e*t;if(o<0&&(n<i?a=-a:s=-s),a){var l=1/a;n*=l,e*=l}if(s){var u=1/s;t*=u,i*=u}var c=Math.atan2(e,n),d=ah(c);return[r[6],r[7],a,s,d]}var sv=L.create(),rf=L.create(),Iy=me.Ue(),$i=[E.Ue(),E.Ue(),E.Ue()],N3=E.Ue();function Are(r,n,e,t,i,a){if(!Lre(sv,r)||(L.copy(rf,sv),rf[3]=0,rf[7]=0,rf[11]=0,rf[15]=1,Math.abs(L.determinant(rf))<1e-8))return!1;var s=sv[3],o=sv[7],l=sv[11],u=sv[12],c=sv[13],d=sv[14],h=sv[15];if(s!==0||o!==0||l!==0){Iy[0]=s,Iy[1]=o,Iy[2]=l,Iy[3]=h;var f=L.invert(rf,rf);if(!f)return!1;L.transpose(rf,rf),me.fF(i,Iy,rf)}else i[0]=i[1]=i[2]=0,i[3]=1;if(n[0]=u,n[1]=c,n[2]=d,Ire($i,sv),e[0]=E.kE($i[0]),E.Fv($i[0],$i[0]),t[0]=E.AK($i[0],$i[1]),kC($i[1],$i[1],$i[0],1,-t[0]),e[1]=E.kE($i[1]),E.Fv($i[1],$i[1]),t[0]/=e[1],t[1]=E.AK($i[0],$i[2]),kC($i[2],$i[2],$i[0],1,-t[1]),t[2]=E.AK($i[1],$i[2]),kC($i[2],$i[2],$i[1],1,-t[2]),e[2]=E.kE($i[2]),E.Fv($i[2],$i[2]),t[1]/=e[2],t[2]/=e[2],E.kC(N3,$i[1],$i[2]),E.AK($i[0],N3)<0)for(var v=0;v<3;v++)e[v]*=-1,$i[v][0]*=-1,$i[v][1]*=-1,$i[v][2]*=-1;return a[0]=.5*Math.sqrt(Math.max(1+$i[0][0]-$i[1][1]-$i[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-$i[0][0]+$i[1][1]-$i[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-$i[0][0]-$i[1][1]+$i[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+$i[0][0]+$i[1][1]+$i[2][2],0)),$i[2][1]>$i[1][2]&&(a[0]=-a[0]),$i[0][2]>$i[2][0]&&(a[1]=-a[1]),$i[1][0]>$i[0][1]&&(a[2]=-a[2]),!0}function Lre(r,n){var e=n[15];if(e===0)return!1;for(var t=1/e,i=0;i<16;i++)r[i]=n[i]*t;return!0}function Ire(r,n){r[0][0]=n[0],r[0][1]=n[1],r[0][2]=n[2],r[1][0]=n[4],r[1][1]=n[5],r[1][2]=n[6],r[2][0]=n[8],r[2][1]=n[9],r[2][2]=n[10]}function kC(r,n,e,t,i){r[0]=n[0]*t+e[0]*i,r[1]=n[1]*t+e[1]*i,r[2]=n[2]*t+e[2]*i}var Ll=function(r){return r[r.ORBITING=0]="ORBITING",r[r.EXPLORING=1]="EXPLORING",r[r.TRACKING=2]="TRACKING",r}({}),O3=function(r){return r[r.DEFAULT=0]="DEFAULT",r[r.ROTATIONAL=1]="ROTATIONAL",r[r.TRANSLATIONAL=2]="TRANSLATIONAL",r[r.CINEMATIC=3]="CINEMATIC",r}({}),af=function(r){return r[r.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",r[r.PERSPECTIVE=1]="PERSPECTIVE",r}({}),Dre={UPDATED:"updated"},R3=2e-4,Fre=function(){function r(){Tr(this,r),this.clipSpaceNearZ=mC.NEGATIVE_ONE,this.eventEmitter=new Se.Z,this.matrix=L.create(),this.right=E.al(1,0,0),this.up=E.al(0,1,0),this.forward=E.al(0,0,1),this.position=E.al(0,0,1),this.focalPoint=E.al(0,0,0),this.distanceVector=E.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=L.create(),this.projectionMatrixInverse=L.create(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=Ll.EXPLORING,this.trackingMode=O3.DEFAULT,this.projectionMode=af.PERSPECTIVE,this.frustum=new kre,this.orthoMatrix=L.create()}return Cr(r,[{key:"isOrtho",value:function(){return this.projectionMode===af.ORTHOGRAPHIC}},{key:"getProjectionMode",value:function(){return this.projectionMode}},{key:"getPerspective",value:function(){return this.jitteredProjectionMatrix||this.projectionMatrix}},{key:"getPerspectiveInverse",value:function(){return this.projectionMatrixInverse}},{key:"getFrustum",value:function(){return this.frustum}},{key:"getPosition",value:function(){return this.position}},{key:"getFocalPoint",value:function(){return this.focalPoint}},{key:"getDollyingStep",value:function(){return this.dollyingStep}},{key:"getNear",value:function(){return this.near}},{key:"getFar",value:function(){return this.far}},{key:"getZoom",value:function(){return this.zoom}},{key:"getOrthoMatrix",value:function(){return this.orthoMatrix}},{key:"getView",value:function(){return this.view}},{key:"setEnableUpdate",value:function(e){this.enableUpdate=e}},{key:"setType",value:function(e,t){return this.type=e,this.type===Ll.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===Ll.TRACKING&&t!==void 0&&this.setTrackingMode(t),this}},{key:"setProjectionMode",value:function(e){return this.projectionMode=e,this}},{key:"setTrackingMode",value:function(e){if(this.type!==Ll.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=e,this}},{key:"setWorldRotation",value:function(e){return this.rotateWorld=e,this._getAngles(),this}},{key:"getViewTransform",value:function(){return L.invert(L.create(),this.matrix)}},{key:"getWorldTransform",value:function(){return this.matrix}},{key:"jitterProjectionMatrix",value:function(e,t){var i=L.fromTranslation(L.create(),[e,t,0]);this.jitteredProjectionMatrix=L.multiply(L.create(),i,this.projectionMatrix)}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0}},{key:"setMatrix",value:function(e){return this.matrix=e,this._update(),this}},{key:"setProjectionMatrix",value:function(e){this.projectionMatrix=e}},{key:"setFov",value:function(e){return this.setPerspective(this.near,this.far,e,this.aspect),this}},{key:"setAspect",value:function(e){return this.setPerspective(this.near,this.far,this.fov,e),this}},{key:"setNear",value:function(e){return this.projectionMode===af.PERSPECTIVE?this.setPerspective(e,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,e,this.far),this}},{key:"setFar",value:function(e){return this.projectionMode===af.PERSPECTIVE?this.setPerspective(this.near,e,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,e),this}},{key:"setViewOffset",value:function(e,t,i,a,s,o){return this.aspect=e/t,this.view===void 0&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=a,this.view.width=s,this.view.height=o,this.projectionMode===af.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===af.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"setZoom",value:function(e){return this.zoom=e,this.projectionMode===af.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===af.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this}},{key:"setZoomByViewportPoint",value:function(e,t){var i=this.canvas.viewport2Canvas({x:t[0],y:t[1]}),a=i.x,s=i.y,o=this.roll;this.rotate(0,0,-o),this.setPosition(a,s),this.setFocalPoint(a,s),this.setZoom(e),this.rotate(0,0,o);var l=this.canvas.viewport2Canvas({x:t[0],y:t[1]}),u=l.x,c=l.y,d=E.al(u-a,c-s,0),h=E.AK(d,this.right)/E.kE(this.right),f=E.AK(d,this.up)/E.kE(this.up),v=this.getPosition(),g=Ko(v,2),m=g[0],y=g[1],w=this.getFocalPoint(),T=Ko(w,2),G=T[0],x=T[1];return this.setPosition(m-h,y-f),this.setFocalPoint(G-h,x-f),this}},{key:"setPerspective",value:function(e,t,i,a){var s;this.projectionMode=af.PERSPECTIVE,this.fov=i,this.near=e,this.far=t,this.aspect=a;var o=this.near*Math.tan(Zs(.5*this.fov))/this.zoom,l=2*o,u=this.aspect*l,c=-.5*u;if((s=this.view)!==null&&s!==void 0&&s.enabled){var d=this.view.fullWidth,h=this.view.fullHeight;c+=this.view.offsetX*u/d,o-=this.view.offsetY*l/h,u*=this.view.width/d,l*=this.view.height/h}return Rre(this.projectionMatrix,c,c+u,o-l,o,e,this.far,this.clipSpaceNearZ===mC.ZERO),L.invert(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this}},{key:"setOrthographic",value:function(e,t,i,a,s,o){var l;this.projectionMode=af.ORTHOGRAPHIC,this.rright=t,this.left=e,this.top=i,this.bottom=a,this.near=s,this.far=o;var u=(this.rright-this.left)/(2*this.zoom),c=(this.top-this.bottom)/(2*this.zoom),d=(this.rright+this.left)/2,h=(this.top+this.bottom)/2,f=d-u,v=d+u,g=h+c,m=h-c;if((l=this.view)!==null&&l!==void 0&&l.enabled){var y=(this.rright-this.left)/this.view.fullWidth/this.zoom,w=(this.top-this.bottom)/this.view.fullHeight/this.zoom;f+=y*this.view.offsetX,v=f+y*this.view.width,g-=w*this.view.offsetY,m=g-w*this.view.height}return this.clipSpaceNearZ===mC.NEGATIVE_ONE?L.ortho(this.projectionMatrix,f,v,g,m,s,o):L.orthoZO(this.projectionMatrix,f,v,g,m,s,o),L.invert(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this}},{key:"setPosition",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.position[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.position[2],a=Yc(e,t,i);return this._setPosition(a),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this}},{key:"setFocalPoint",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.focalPoint[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.focalPoint[2],a=E.al(0,1,0);if(this.focalPoint=Yc(e,t,i),this.trackingMode===O3.CINEMATIC){var s=E.$X(E.Ue(),this.focalPoint,this.position);e=s[0],t=s[1],i=s[2];var o=E.kE(s),l=ah(Math.asin(t/o)),u=90+ah(Math.atan2(i,e)),c=L.create();L.rotateY(c,c,Zs(u)),L.rotateX(c,c,Zs(l)),a=E.fF(E.Ue(),[0,1,0],c)}return L.invert(this.matrix,L.lookAt(L.create(),this.position,this.focalPoint,a)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this}},{key:"getDistance",value:function(){return this.distance}},{key:"getDistanceVector",value:function(){return this.distanceVector}},{key:"setDistance",value:function(e){if(this.distance===e||e<0)return this;this.distance=e,this.distance<R3&&(this.distance=R3),this.dollyingStep=this.distance/100;var t=E.Ue();e=this.distance;var i=this.forward,a=this.focalPoint;return t[0]=e*i[0]+a[0],t[1]=e*i[1]+a[1],t[2]=e*i[2]+a[2],this._setPosition(t),this.triggerUpdate(),this}},{key:"setMaxDistance",value:function(e){return this.maxDistance=e,this}},{key:"setMinDistance",value:function(e){return this.minDistance=e,this}},{key:"setAzimuth",value:function(e){return this.azimuth=xC(e),this.computeMatrix(),this._getAxes(),this.type===Ll.ORBITING||this.type===Ll.EXPLORING?this._getPosition():this.type===Ll.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getAzimuth",value:function(){return this.azimuth}},{key:"setElevation",value:function(e){return this.elevation=xC(e),this.computeMatrix(),this._getAxes(),this.type===Ll.ORBITING||this.type===Ll.EXPLORING?this._getPosition():this.type===Ll.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getElevation",value:function(){return this.elevation}},{key:"setRoll",value:function(e){return this.roll=xC(e),this.computeMatrix(),this._getAxes(),this.type===Ll.ORBITING||this.type===Ll.EXPLORING?this._getPosition():this.type===Ll.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getRoll",value:function(){return this.roll}},{key:"_update",value:function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()}},{key:"computeMatrix",value:function(){var e=X.yY(X.Ue(),[0,0,1],Zs(this.roll));L.identity(this.matrix);var t=X.yY(X.Ue(),[1,0,0],Zs((this.rotateWorld&&this.type!==Ll.TRACKING||this.type===Ll.TRACKING?1:-1)*this.elevation)),i=X.yY(X.Ue(),[0,1,0],Zs((this.rotateWorld&&this.type!==Ll.TRACKING||this.type===Ll.TRACKING?1:-1)*this.azimuth)),a=X.Jp(X.Ue(),i,t);a=X.Jp(X.Ue(),a,e);var s=L.fromQuat(L.create(),a);this.type===Ll.ORBITING||this.type===Ll.EXPLORING?(L.translate(this.matrix,this.matrix,this.focalPoint),L.multiply(this.matrix,this.matrix,s),L.translate(this.matrix,this.matrix,[0,0,this.distance])):this.type===Ll.TRACKING&&(L.translate(this.matrix,this.matrix,this.position),L.multiply(this.matrix,this.matrix,s))}},{key:"_setPosition",value:function(e,t,i){this.position=Yc(e,t,i);var a=this.matrix;a[12]=this.position[0],a[13]=this.position[1],a[14]=this.position[2],a[15]=1,this._getOrthoMatrix()}},{key:"_getAxes",value:function(){E.JG(this.right,Yc(me.fF(me.Ue(),[1,0,0,0],this.matrix))),E.JG(this.up,Yc(me.fF(me.Ue(),[0,1,0,0],this.matrix))),E.JG(this.forward,Yc(me.fF(me.Ue(),[0,0,1,0],this.matrix))),E.Fv(this.right,this.right),E.Fv(this.up,this.up),E.Fv(this.forward,this.forward)}},{key:"_getAngles",value:function(){var e=this.distanceVector[0],t=this.distanceVector[1],i=this.distanceVector[2],a=E.kE(this.distanceVector);if(a===0){this.elevation=0,this.azimuth=0;return}this.type===Ll.TRACKING?(this.elevation=ah(Math.asin(t/a)),this.azimuth=ah(Math.atan2(-e,-i))):this.rotateWorld?(this.elevation=ah(Math.asin(t/a)),this.azimuth=ah(Math.atan2(-e,-i))):(this.elevation=-ah(Math.asin(t/a)),this.azimuth=-ah(Math.atan2(-e,-i)))}},{key:"_getPosition",value:function(){E.JG(this.position,Yc(me.fF(me.Ue(),[0,0,0,1],this.matrix))),this._getDistance()}},{key:"_getFocalPoint",value:function(){E.kK(this.distanceVector,[0,0,-this.distance],Ke.xO(Ke.Ue(),this.matrix)),E.IH(this.focalPoint,this.position,this.distanceVector),this._getDistance()}},{key:"_getDistance",value:function(){this.distanceVector=E.$X(E.Ue(),this.focalPoint,this.position),this.distance=E.kE(this.distanceVector),this.dollyingStep=this.distance/100}},{key:"_getOrthoMatrix",value:function(){if(this.projectionMode===af.ORTHOGRAPHIC){var e=this.position,t=X.yY(X.Ue(),[0,0,1],-this.roll*Math.PI/180);L.fromRotationTranslationScaleOrigin(this.orthoMatrix,t,E.al((this.rright-this.left)/2-e[0],(this.top-this.bottom)/2-e[1],0),E.al(this.zoom,this.zoom,1),e)}}},{key:"triggerUpdate",value:function(){if(this.enableUpdate){var e=this.getViewTransform(),t=L.multiply(L.create(),this.getPerspective(),e);this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(Dre.UPDATED)}}},{key:"rotate",value:function(e,t,i){throw new Error(Jo)}},{key:"pan",value:function(e,t){throw new Error(Jo)}},{key:"dolly",value:function(e){throw new Error(Jo)}},{key:"createLandmark",value:function(e,t){throw new Error(Jo)}},{key:"gotoLandmark",value:function(e,t){throw new Error(Jo)}},{key:"cancelLandmarkAnimation",value:function(){throw new Error(Jo)}}])}(),Bre=function(r){return r[r.Standard=0]="Standard",r}({}),wC=function(r){return r[r.ADDED=0]="ADDED",r[r.REMOVED=1]="REMOVED",r[r.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED",r}({}),A3={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Pp(0,0,0,0)},Hn=function(r){return r.COORDINATE="<coordinate>",r.COLOR="<color>",r.PAINT="<paint>",r.NUMBER="<number>",r.ANGLE="<angle>",r.OPACITY_VALUE="<opacity-value>",r.SHADOW_BLUR="<shadow-blur>",r.LENGTH="<length>",r.PERCENTAGE="<percentage>",r.LENGTH_PERCENTAGE="<length> | <percentage>",r.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",r.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",r.LIST_OF_POINTS="<list-of-points>",r.PATH="<path>",r.FILTER="<filter>",r.Z_INDEX="<z-index>",r.OFFSET_DISTANCE="<offset-distance>",r.DEFINED_PATH="<defined-path>",r.MARKER="<marker>",r.TRANSFORM="<transform>",r.TRANSFORM_ORIGIN="<transform-origin>",r.TEXT="<text>",r.TEXT_TRANSFORM="<text-transform>",r}({});function vc(r,n){if(typeof r!="function"||n!=null&&typeof n!="function")throw new TypeError("Expected a function");var e=function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var o=n?n.apply(this,a):a[0],l=e.cache;if(l.has(o))return l.get(o);var u=r.apply(this,a);return e.cache=l.set(o,u)||l,u};return e.cache=new(vc.Cache||Map),e}vc.Cache=Map;var er=function(r){return r[r.kUnknown=0]="kUnknown",r[r.kNumber=1]="kNumber",r[r.kPercentage=2]="kPercentage",r[r.kEms=3]="kEms",r[r.kPixels=4]="kPixels",r[r.kRems=5]="kRems",r[r.kDegrees=6]="kDegrees",r[r.kRadians=7]="kRadians",r[r.kGradians=8]="kGradians",r[r.kTurns=9]="kTurns",r[r.kMilliseconds=10]="kMilliseconds",r[r.kSeconds=11]="kSeconds",r[r.kInteger=12]="kInteger",r}({}),sf=function(r){return r[r.kUNumber=0]="kUNumber",r[r.kUPercent=1]="kUPercent",r[r.kULength=2]="kULength",r[r.kUAngle=3]="kUAngle",r[r.kUTime=4]="kUTime",r[r.kUOther=5]="kUOther",r}({}),$re=function(r){return r[r.kYes=0]="kYes",r[r.kNo=1]="kNo",r}({}),Gre=function(r){return r[r.kYes=0]="kYes",r[r.kNo=1]="kNo",r}({}),zre=[{name:"em",unit_type:er.kEms},{name:"px",unit_type:er.kPixels},{name:"deg",unit_type:er.kDegrees},{name:"rad",unit_type:er.kRadians},{name:"grad",unit_type:er.kGradians},{name:"ms",unit_type:er.kMilliseconds},{name:"s",unit_type:er.kSeconds},{name:"rem",unit_type:er.kRems},{name:"turn",unit_type:er.kTurns}],Np=function(r){return r[r.kUnknownType=0]="kUnknownType",r[r.kUnparsedType=1]="kUnparsedType",r[r.kKeywordType=2]="kKeywordType",r[r.kUnitType=3]="kUnitType",r[r.kSumType=4]="kSumType",r[r.kProductType=5]="kProductType",r[r.kNegateType=6]="kNegateType",r[r.kInvertType=7]="kInvertType",r[r.kMinType=8]="kMinType",r[r.kMaxType=9]="kMaxType",r[r.kClampType=10]="kClampType",r[r.kTransformType=11]="kTransformType",r[r.kPositionType=12]="kPositionType",r[r.kURLImageType=13]="kURLImageType",r[r.kColorType=14]="kColorType",r[r.kUnsupportedColorType=15]="kUnsupportedColorType",r}({}),Vre=function(n){return zre.find(function(e){return e.name===n}).unit_type},Ure=function(n){return n?n==="number"?er.kNumber:n==="percent"||n==="%"?er.kPercentage:Vre(n):er.kUnknown},jre=function(n){switch(n){case er.kNumber:case er.kInteger:return sf.kUNumber;case er.kPercentage:return sf.kUPercent;case er.kPixels:return sf.kULength;case er.kMilliseconds:case er.kSeconds:return sf.kUTime;case er.kDegrees:case er.kRadians:case er.kGradians:case er.kTurns:return sf.kUAngle;default:return sf.kUOther}},Hre=function(n){switch(n){case sf.kUNumber:return er.kNumber;case sf.kULength:return er.kPixels;case sf.kUPercent:return er.kPercentage;case sf.kUTime:return er.kSeconds;case sf.kUAngle:return er.kDegrees;default:return er.kUnknown}},L3=function(n){var e=1;switch(n){case er.kPixels:case er.kDegrees:case er.kSeconds:break;case er.kMilliseconds:e=.001;break;case er.kRadians:e=180/Math.PI;break;case er.kGradians:e=.9;break;case er.kTurns:e=360;break}return e},SC=function(n){switch(n){case er.kNumber:case er.kInteger:return"";case er.kPercentage:return"%";case er.kEms:return"em";case er.kRems:return"rem";case er.kPixels:return"px";case er.kDegrees:return"deg";case er.kRadians:return"rad";case er.kGradians:return"grad";case er.kMilliseconds:return"ms";case er.kSeconds:return"s";case er.kTurns:return"turn"}return""},hb=function(){function r(){Tr(this,r)}return Cr(r,[{key:"toString",value:function(){return this.buildCSSText($re.kNo,Gre.kNo,"")}},{key:"isNumericValue",value:function(){return this.getType()>=Np.kUnitType&&this.getType()<=Np.kClampType}}],[{key:"isAngle",value:function(e){return e===er.kDegrees||e===er.kRadians||e===er.kGradians||e===er.kTurns}},{key:"isLength",value:function(e){return e>=er.kEms&&e<er.kDegrees}},{key:"isRelativeUnit",value:function(e){return e===er.kPercentage||e===er.kEms||e===er.kRems}},{key:"isTime",value:function(e){return e===er.kSeconds||e===er.kMilliseconds}}])}(),Wre=function(r){function n(e){var t;return Tr(this,n),t=Ws(this,n),t.colorSpace=e,t}return Ys(n,r),Cr(n,[{key:"getType",value:function(){return Np.kColorType}},{key:"to",value:function(t){return this}}])}(hb),fb=function(r){return r[r.Constant=0]="Constant",r[r.LinearGradient=1]="LinearGradient",r[r.RadialGradient=2]="RadialGradient",r}({}),vb=function(r){function n(e,t){var i;return Tr(this,n),i=Ws(this,n),i.type=e,i.value=t,i}return Ys(n,r),Cr(n,[{key:"clone",value:function(){return new n(this.type,this.value)}},{key:"buildCSSText",value:function(t,i,a){return a}},{key:"getType",value:function(){return Np.kColorType}}])}(hb),sh=function(r){function n(e){var t;return Tr(this,n),t=Ws(this,n),t.value=e,t}return Ys(n,r),Cr(n,[{key:"clone",value:function(){return new n(this.value)}},{key:"getType",value:function(){return Np.kKeywordType}},{key:"buildCSSText",value:function(t,i,a){return a+this.value}}])}(hb),Yre=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",t="";return Number.isFinite(n)?t="NaN":n>0?t="infinity":t="-infinity",t+=e},TC=function(n){return Hre(jre(n))},fs=function(r){function n(e){var t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:er.kNumber;Tr(this,n),t=Ws(this,n);var a;return typeof i=="string"?a=Ure(i):a=i,t.unit=a,t.value=e,t}return Ys(n,r),Cr(n,[{key:"clone",value:function(){return new n(this.value,this.unit)}},{key:"equals",value:function(t){var i=t;return this.value===i.value&&this.unit===i.unit}},{key:"getType",value:function(){return Np.kUnitType}},{key:"convertTo",value:function(t){if(this.unit===t)return new n(this.value,this.unit);var i=TC(this.unit);if(i!==TC(t)||i===er.kUnknown)return null;var a=L3(this.unit)/L3(t);return new n(this.value*a,t)}},{key:"buildCSSText",value:function(t,i,a){var s;switch(this.unit){case er.kUnknown:break;case er.kInteger:s=Number(this.value).toFixed(0);break;case er.kNumber:case er.kPercentage:case er.kEms:case er.kRems:case er.kPixels:case er.kDegrees:case er.kRadians:case er.kGradians:case er.kMilliseconds:case er.kSeconds:case er.kTurns:{var o=-999999,l=999999,u=this.value,c=SC(this.unit);if(u<o||u>l){var d=SC(this.unit);!Number.isFinite(u)||Number.isNaN(u)?s=Yre(u,d):s=u+(d||"")}else s="".concat(u).concat(c)}}return a+=s,a}}])}(hb),of=new fs(0,"px");new fs(1,"px");var j_=new fs(0,"deg"),CC=function(r){function n(e,t,i){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;return Tr(this,n),a=Ws(this,n,["rgb"]),a.r=e,a.g=t,a.b=i,a.alpha=s,a.isNone=o,a}return Ys(n,r),Cr(n,[{key:"clone",value:function(){return new n(this.r,this.g,this.b,this.alpha)}},{key:"buildCSSText",value:function(t,i,a){return"".concat(a,"rgba(").concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")}}])}(Wre),I3=new sh("unset"),Zre=new sh("initial"),Xre=new sh("inherit"),MC={"":I3,unset:I3,initial:Zre,inherit:Xre},Kre=function(n){return MC[n]||(MC[n]=new sh(n)),MC[n]},D3=new CC(0,0,0,0,!0),F3=new CC(0,0,0,0),Jre=vc(function(r,n,e,t){return new CC(r,n,e,t)},function(r,n,e,t){return"rgba(".concat(r,",").concat(n,",").concat(e,",").concat(t,")")}),So=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:er.kNumber;return new fs(n,e)};new fs(50,"%");function Qre(r){var n=r.type,e=r.value;return n==="hex"?"#".concat(e):n==="literal"?e:n==="rgb"?"rgb(".concat(e.join(","),")"):"rgba(".concat(e.join(","),")")}var qre=function(){var r={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},n="";function e(V){throw new Error("".concat(n,": ").concat(V))}function t(){var V=i();return n.length>0&&e("Invalid input not EOF"),V}function i(){return T(a)}function a(){return s("linear-gradient",r.linearGradient,l)||s("repeating-linear-gradient",r.repeatingLinearGradient,l)||s("radial-gradient",r.radialGradient,d)||s("repeating-radial-gradient",r.repeatingRadialGradient,d)||s("conic-gradient",r.conicGradient,d)}function s(V,ee,he){return o(ee,function(ut){var ct=he();return ct&&(ue(r.comma)||e("Missing comma before color stops")),{type:V,orientation:ct,colorStops:T(G)}})}function o(V,ee){var he=ue(V);if(he){ue(r.startCall)||e("Missing (");var ut=ee(he);return ue(r.endCall)||e("Missing )"),ut}}function l(){return u()||c()}function u(){return le("directional",r.sideOrCorner,1)}function c(){return le("angular",r.angleValue,1)}function d(){var V,ee=h(),he;return ee&&(V=[],V.push(ee),he=n,ue(r.comma)&&(ee=h(),ee?V.push(ee):n=he)),V}function h(){var V=f()||v();if(V)V.at=m();else{var ee=g();if(ee){V=ee;var he=m();he&&(V.at=he)}else{var ut=y();ut&&(V={type:"default-radial",at:ut})}}return V}function f(){var V=le("shape",/^(circle)/i,0);return V&&(V.style=te()||g()),V}function v(){var V=le("shape",/^(ellipse)/i,0);return V&&(V.style=j()||g()),V}function g(){return le("extent-keyword",r.extentKeywords,1)}function m(){if(le("position",/^at/,0)){var V=y();return V||e("Missing positioning value"),V}}function y(){var V=w();if(V.x||V.y)return{type:"position",value:V}}function w(){return{x:j(),y:j()}}function T(V){var ee=V(),he=[];if(ee)for(he.push(ee);ue(r.comma);)ee=V(),ee?he.push(ee):e("One extra comma");return he}function G(){var V=x();return V||e("Expected color definition"),V.length=j(),V}function x(){return p()||R()||b()||_()}function _(){return le("literal",r.literalColor,0)}function p(){return le("hex",r.hexColor,1)}function b(){return o(r.rgbColor,function(){return{type:"rgb",value:T(B)}})}function R(){return o(r.rgbaColor,function(){return{type:"rgba",value:T(B)}})}function B(){return ue(r.number)[1]}function j(){return le("%",r.percentageValue,1)||Z()||te()}function Z(){return le("position-keyword",r.positionKeywords,1)}function te(){return le("px",r.pixelValue,1)||le("em",r.emValue,1)}function le(V,ee,he){var ut=ue(ee);if(ut)return{type:V,value:ut[he]}}function ue(V){var ee=/^[\n\r\t\s]+/.exec(n);ee&&se(ee[0].length);var he=V.exec(n);return he&&se(he[0].length),he}function se(V){n=n.substring(V)}return function(V){return n=V,t()}}();function RNe(r,n,e,t){var i=Zs(t.value),a=0,s=0,o=a+n/2,l=s+e/2,u=Math.abs(n*Math.cos(i))+Math.abs(e*Math.sin(i)),c=r[0]+o-Math.cos(i)*u/2,d=r[1]+l-Math.sin(i)*u/2,h=r[0]+o+Math.cos(i)*u/2,f=r[1]+l+Math.sin(i)*u/2;return{x1:c,y1:d,x2:h,y2:f}}function ANe(r,n,e,t,i,a){var s=t.value,o=i.value;t.unit===er.kPercentage&&(s=t.value/100*n),i.unit===er.kPercentage&&(o=i.value/100*e);var l=Math.max(distanceSquareRoot([0,0],[s,o]),distanceSquareRoot([0,e],[s,o]),distanceSquareRoot([n,e],[s,o]),distanceSquareRoot([n,0],[s,o]));return a&&(a instanceof fs?l=a.value:a instanceof sh&&(a.value==="closest-side"?l=Math.min(s,n-s,o,e-o):a.value==="farthest-side"?l=Math.max(s,n-s,o,e-o):a.value==="closest-corner"&&(l=Math.min(distanceSquareRoot([0,0],[s,o]),distanceSquareRoot([0,e],[s,o]),distanceSquareRoot([n,e],[s,o]),distanceSquareRoot([n,0],[s,o]))))),{x:s+r[0],y:o+r[1],r:l}}var eie=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,tie=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,nie=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,B3=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function rie(r){var n,e=r.length;if(r[e-1].length=(n=r[e-1].length)!==null&&n!==void 0?n:{type:"%",value:"100"},e>1){var t;r[0].length=(t=r[0].length)!==null&&t!==void 0?t:{type:"%",value:"0"}}for(var i=0,a=Number(r[0].length.value),s=1;s<e;s++){var o,l=(o=r[s].length)===null||o===void 0?void 0:o.value;if(!(0,xe.Z)(l)&&!(0,xe.Z)(a)){for(var u=1;u<s-i;u++)r[i+u].length={type:"%",value:"".concat(a+(Number(l)-a)*u/(s-i))};i=s,a=Number(l)}}}var iie={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},aie=vc(function(r){var n;return r.type==="angular"?n=Number(r.value):n=iie[r.value]||0,So(n,"deg")}),sie=vc(function(r){var n=50,e=50,t="%",i="%";if((r==null?void 0:r.type)==="position"){var a=r.value,s=a.x,o=a.y;(s==null?void 0:s.type)==="position-keyword"&&(s.value==="left"?n=0:s.value==="center"?n=50:s.value==="right"?n=100:s.value==="top"?e=0:s.value==="bottom"&&(e=100)),(o==null?void 0:o.type)==="position-keyword"&&(o.value==="left"?n=0:o.value==="center"?e=50:o.value==="right"?n=100:o.value==="top"?e=0:o.value==="bottom"&&(e=100)),((s==null?void 0:s.type)==="px"||(s==null?void 0:s.type)==="%"||(s==null?void 0:s.type)==="em")&&(t=s==null?void 0:s.type,n=Number(s.value)),((o==null?void 0:o.type)==="px"||(o==null?void 0:o.type)==="%"||(o==null?void 0:o.type)==="em")&&(i=o==null?void 0:o.type,e=Number(o.value))}return{cx:So(n,t),cy:So(e,i)}}),oie=vc(function(r){if(r.indexOf("linear")>-1||r.indexOf("radial")>-1){var n=qre(r);return n.map(function(o){var l=o.type,u=o.orientation,c=o.colorStops;rie(c);var d=c.map(function(T){return{offset:So(Number(T.length.value),"%"),color:Qre(T)}});if(l==="linear-gradient")return new vb(fb.LinearGradient,{angle:u?aie(u):j_,steps:d});if(l==="radial-gradient"&&(u||(u=[{type:"shape",value:"circle"}]),u[0].type==="shape"&&u[0].value==="circle")){var h=sie(u[0].at),f=h.cx,v=h.cy,g;if(u[0].style){var m=u[0].style,y=m.type,w=m.value;y==="extent-keyword"?g=Kre(w):g=So(w,y)}return new vb(fb.RadialGradient,{cx:f,cy:v,size:g,steps:d})}})}var e=r[0];if(r[1]==="("||r[2]==="("){if(e==="l"){var t=eie.exec(r);if(t){var i,a=((i=t[2].match(B3))===null||i===void 0?void 0:i.map(function(o){return o.split(":")}))||[];return[new vb(fb.LinearGradient,{angle:So(parseFloat(t[1]),"deg"),steps:a.map(function(o){var l=Ko(o,2),u=l[0],c=l[1];return{offset:So(Number(u)*100,"%"),color:c}})})]}}else if(e==="r"){var s=lie(r);if(s)if((0,Ze.Z)(s))r=s;else return[new vb(fb.RadialGradient,s)]}else if(e==="p")return uie(r)}});function lie(r){var n=tie.exec(r);if(n){var e,t=((e=n[4].match(B3))===null||e===void 0?void 0:e.map(function(i){return i.split(":")}))||[];return{cx:So(50,"%"),cy:So(50,"%"),steps:t.map(function(i){var a=Ko(i,2),s=a[0],o=a[1];return{offset:So(Number(s)*100,"%"),color:o}})}}return null}function uie(r){var n=nie.exec(r);if(n){var e=n[1],t=n[2];switch(e){case"a":e="repeat";break;case"x":e="repeat-x";break;case"y":e="repeat-y";break;case"n":e="no-repeat";break;default:e="no-repeat"}return{image:t,repetition:e}}return null}function LNe(r){return!!r.type&&!!r.value}function cie(r){return r&&!!r.image}function $3(r){return r&&!(0,xe.Z)(r.r)&&!(0,xe.Z)(r.g)&&!(0,xe.Z)(r.b)}var Dy=vc(function(r){if(cie(r))return gl({repetition:"repeat"},r);if((0,xe.Z)(r)&&(r=""),r==="transparent")return F3;if(r==="currentColor")r="black";else if(r==="none")return D3;var n=oie(r);if(n)return n;var e=ob(r),t=[0,0,0,0];return e!==null&&(t[0]=e.r||0,t[1]=e.g||0,t[2]=e.b||0,t[3]=e.opacity),Jre.apply(void 0,t)});function die(r,n){if(!(!$3(r)||!$3(n)))return[[Number(r.r),Number(r.g),Number(r.b),Number(r.alpha)],[Number(n.r),Number(n.g),Number(n.b),Number(n.alpha)],function(e){var t=e.slice();if(t[3])for(var i=0;i<3;i++)t[i]=Math.round((0,O.Z)(t[i],0,255));return t[3]=(0,O.Z)(t[3],0,1),"rgba(".concat(t.join(","),")")}]}function Fy(r,n){if((0,xe.Z)(n))return So(0,"px");if(n="".concat(n).trim().toLowerCase(),isFinite(Number(n))){if("px".search(r)>=0)return So(Number(n),"px");if("deg".search(r)>=0)return So(Number(n),"deg")}var e=[];n=n.replace(r,function(i){return e.push(i),"U".concat(i)});var t="U(".concat(r.source,")");return e.map(function(i){return So(Number(n.replace(new RegExp("U".concat(i),"g"),"").replace(new RegExp(t,"g"),"*0")),i)})[0]}var G3=function(n){return Fy(new RegExp("px","g"),n)},hie=vc(G3),fie=function(n){return Fy(new RegExp("%","g"),n)};vc(fie);var z3=function(n){return(0,pe.Z)(n)||isFinite(Number(n))?So(Number(n)||0,"px"):Fy(new RegExp("px|%|em|rem","g"),n)},PC=vc(z3),V3=function(n){return Fy(new RegExp("deg|rad|grad|turn","g"),n)},vie=vc(V3);function gie(r,n,e,t){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a="",s=r.value||0,o=n.value||0,l=TC(r.unit),u=r.convertTo(l),c=n.convertTo(l);return u&&c?(s=u.value,o=c.value,a=SC(r.unit)):(fs.isLength(r.unit)||fs.isLength(n.unit))&&(s=Sd(r,i,e),o=Sd(n,i,e),a="px"),[s,o,function(d){return t&&(d=Math.max(d,0)),d+a}]}function Zc(r){var n=0;return r.unit===er.kDegrees?n=r.value:r.unit===er.kRadians?n=ah(Number(r.value)):r.unit===er.kTurns?n=Mre(Number(r.value)):r.value&&(n=r.value),n}function U3(r,n){var e;return Array.isArray(r)?e=r.map(function(t){return Number(t)}):(0,Ze.Z)(r)?e=r.split(" ").map(function(t){return Number(t)}):(0,pe.Z)(r)&&(e=[r]),n===2?e.length===1?[e[0],e[0]]:[e[0],e[1]]:e.length===1?[e[0],e[0],e[0],e[0]]:e.length===2?[e[0],e[1],e[0],e[1]]:e.length===3?[e[0],e[1],e[2],e[1]]:[e[0],e[1],e[2],e[3]]}function Sd(r,n,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(r.unit===er.kPixels)return Number(r.value);if(r.unit===er.kPercentage&&e){var i=e.nodeName===Wr.GROUP?e.getLocalBounds():e.getGeometryBounds();return(t?i.min[n]:0)+r.value/100*i.halfExtents[n]*2}return 0}var _ie=function(n){return Fy(/deg|rad|grad|turn|px|%/g,n)},mie=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function pie(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(r=r.toLowerCase().trim(),r==="none")return[];for(var n=/\s*([\w-]+)\(([^)]*)\)/g,e=[],t,i=0;t=n.exec(r);){if(t.index!==i)return[];if(i=t.index+t[0].length,mie.indexOf(t[1])>-1&&e.push({name:t[1],params:t[2].split(" ").map(function(a){return _ie(a)||Dy(a)})}),n.lastIndex===r.length)return e}return[]}function j3(r){return r.toString()}var H3=function(n){return typeof n=="number"?So(n):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(n)?So(Number(n)):So(0)},NC=vc(H3);vc(function(r){return(0,Ze.Z)(r)?r.split(" ").map(NC):r.map(NC)});function OC(r,n){return[r,n,j3]}function RC(r,n){return function(e,t){return[e,t,function(i){return j3((0,O.Z)(i,r,n))}]}}function W3(r,n){if(r.length===n.length)return[r,n,function(e){return e}]}function Y3(r){return r.parsedStyle.d.totalLength===0&&(r.parsedStyle.d.totalLength=(0,Um.D)(r.parsedStyle.d.absolutePath)),r.parsedStyle.d.totalLength}function yie(r){return r.parsedStyle.points.totalLength===0&&(r.parsedStyle.points.totalLength=(0,Nt.hE)(r.parsedStyle.points.points)),r.parsedStyle.points.totalLength}function xie(r){for(var n=0;n<r.length;n++){var e=r[n-1],t=r[n],i=t[0];if(i==="M"&&e){var a=e[0],s=[t[1],t[2]],o=void 0;a==="L"||a==="M"?o=[e[1],e[2]]:(a==="C"||a==="A"||a==="Q")&&(o=[e[e.length-2],e[e.length-1]]),o&&gb(s,o)&&(r.splice(n,1),n--)}}}function Eie(r){for(var n=!1,e=r.length,t=0;t<e;t++){var i=r[t],a=i[0];if(a==="C"||a==="A"||a==="Q"){n=!0;break}}return n}function bie(r){for(var n=[],e=[],t=[],i=0;i<r.length;i++){var a=r[i],s=a[0];s==="M"?(t.length&&(e.push(t),t=[]),t.push([a[1],a[2]])):s==="Z"?t.length&&(n.push(t),t=[]):t.push([a[1],a[2]])}return t.length>0&&e.push(t),{polygons:n,polylines:e}}function gb(r,n){return r[0]===n[0]&&r[1]===n[1]}function kie(r,n){for(var e=[],t=[],i=[],a=0;a<r.length;a++){var s=r[a],o=s.currentPoint,l=s.params,u=s.prePoint,c=void 0;switch(s.command){case"Q":c=(0,Nt.x4)(u[0],u[1],l[1],l[2],l[3],l[4]);break;case"C":c=(0,Nt.l5)(u[0],u[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var d=s.arcParams;c=(0,Nt.vp)(d.cx,d.cy,d.rx,d.ry,d.xRotation,d.startAngle,d.endAngle);break;default:e.push(o[0]),t.push(o[1]);break}c&&(s.box=c,e.push(c.x,c.x+c.width),t.push(c.y,c.y+c.height)),n&&(s.command==="L"||s.command==="M")&&s.prePoint&&s.nextPoint&&i.push(s)}e=e.filter(function(G){return!Number.isNaN(G)&&G!==1/0&&G!==-1/0}),t=t.filter(function(G){return!Number.isNaN(G)&&G!==1/0&&G!==-1/0});var h=(0,ne.Z)(e),f=(0,ne.Z)(t),v=(0,qe.Z)(e),g=(0,qe.Z)(t);if(i.length===0)return{x:h,y:f,width:v-h,height:g-f};for(var m=0;m<i.length;m++){var y=i[m],w=y.currentPoint,T=void 0;w[0]===h?(T=_b(y,n),h-=T.xExtra):w[0]===v&&(T=_b(y,n),v+=T.xExtra),w[1]===f?(T=_b(y,n),f-=T.yExtra):w[1]===g&&(T=_b(y,n),g+=T.yExtra)}return{x:h,y:f,width:v-h,height:g-f}}function _b(r,n){var e=r.prePoint,t=r.currentPoint,i=r.nextPoint,a=Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2),s=Math.pow(t[0]-i[0],2)+Math.pow(t[1]-i[1],2),o=Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2),l=Math.acos((a+s-o)/(2*Math.sqrt(a)*Math.sqrt(s)));if(!l||Math.sin(l)===0||(0,dt.Z)(l,0))return{xExtra:0,yExtra:0};var u=Math.abs(Math.atan2(i[1]-t[1],i[0]-t[0])),c=Math.abs(Math.atan2(i[0]-t[0],i[1]-t[1]));u=u>Math.PI/2?Math.PI-u:u,c=c>Math.PI/2?Math.PI-c:c;var d={xExtra:Math.cos(l/2-u)*(n/2*(1/Math.sin(l/2)))-n/2||0,yExtra:Math.cos(c-l/2)*(n/2*(1/Math.sin(l/2)))-n/2||0};return d}function Z3(r,n){return[n[0]+(n[0]-r[0]),n[1]+(n[1]-r[1])]}var X3=function(n,e){var t=n.x*e.x+n.y*e.y,i=Math.sqrt((Math.pow(n.x,2)+Math.pow(n.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2))),a=n.x*e.y-n.y*e.x<0?-1:1,s=a*Math.acos(t/i);return s},K3=function(n,e,t,i,a,s,o,l){e=Math.abs(e),t=Math.abs(t),i=(0,nt.Z)(i,360);var u=Zs(i);if(n.x===o.x&&n.y===o.y)return{x:n.x,y:n.y,ellipticalArcAngle:0};if(e===0||t===0)return{x:0,y:0,ellipticalArcAngle:0};var c=(n.x-o.x)/2,d=(n.y-o.y)/2,h={x:Math.cos(u)*c+Math.sin(u)*d,y:-Math.sin(u)*c+Math.cos(u)*d},f=Math.pow(h.x,2)/Math.pow(e,2)+Math.pow(h.y,2)/Math.pow(t,2);f>1&&(e*=Math.sqrt(f),t*=Math.sqrt(f));var v=Math.pow(e,2)*Math.pow(t,2)-Math.pow(e,2)*Math.pow(h.y,2)-Math.pow(t,2)*Math.pow(h.x,2),g=Math.pow(e,2)*Math.pow(h.y,2)+Math.pow(t,2)*Math.pow(h.x,2),m=v/g;m=m<0?0:m;var y=(a!==s?1:-1)*Math.sqrt(m),w={x:y*(e*h.y/t),y:y*(-(t*h.x)/e)},T={x:Math.cos(u)*w.x-Math.sin(u)*w.y+(n.x+o.x)/2,y:Math.sin(u)*w.x+Math.cos(u)*w.y+(n.y+o.y)/2},G={x:(h.x-w.x)/e,y:(h.y-w.y)/t},x=X3({x:1,y:0},G),_={x:(-h.x-w.x)/e,y:(-h.y-w.y)/t},p=X3(G,_);!s&&p>0?p-=2*Math.PI:s&&p<0&&(p+=2*Math.PI),p%=2*Math.PI;var b=x+p*l,R=e*Math.cos(b),B=t*Math.sin(b),j={x:Math.cos(u)*R-Math.sin(u)*B+T.x,y:Math.sin(u)*R+Math.cos(u)*B+T.y,ellipticalArcStartAngle:x,ellipticalArcEndAngle:x+p,ellipticalArcAngle:b,ellipticalArcCenter:T,resultantRx:e,resultantRy:t};return j};function wie(r){for(var n=[],e=null,t=null,i=null,a=0,s=r.length,o=0;o<s;o++){var l=r[o];t=r[o+1];var u=l[0],c={command:u,prePoint:e,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(u){case"M":i=[l[1],l[2]],a=o;break;case"A":var d=Sie(e,l);c.arcParams=d;break}if(u==="Z")e=i,t=r[a+1];else{var h=l.length;e=[l[h-2],l[h-1]]}t&&t[0]==="Z"&&(t=r[a],n[a]&&(n[a].prePoint=e)),c.currentPoint=e,n[a]&&gb(e,n[a].currentPoint)&&(n[a].prePoint=c.prePoint);var f=t?[t[t.length-2],t[t.length-1]]:null;c.nextPoint=f;var v=c.prePoint;if(["L","H","V"].includes(u))c.startTangent=[v[0]-e[0],v[1]-e[1]],c.endTangent=[e[0]-v[0],e[1]-v[1]];else if(u==="Q"){var g=[l[1],l[2]];c.startTangent=[v[0]-g[0],v[1]-g[1]],c.endTangent=[e[0]-g[0],e[1]-g[1]]}else if(u==="T"){var m=n[o-1],y=Z3(m.currentPoint,v);m.command==="Q"?(c.command="Q",c.startTangent=[v[0]-y[0],v[1]-y[1]],c.endTangent=[e[0]-y[0],e[1]-y[1]]):(c.command="TL",c.startTangent=[v[0]-e[0],v[1]-e[1]],c.endTangent=[e[0]-v[0],e[1]-v[1]])}else if(u==="C"){var w=[l[1],l[2]],T=[l[3],l[4]];c.startTangent=[v[0]-w[0],v[1]-w[1]],c.endTangent=[e[0]-T[0],e[1]-T[1]],c.startTangent[0]===0&&c.startTangent[1]===0&&(c.startTangent=[w[0]-T[0],w[1]-T[1]]),c.endTangent[0]===0&&c.endTangent[1]===0&&(c.endTangent=[T[0]-w[0],T[1]-w[1]])}else if(u==="S"){var G=n[o-1],x=Z3(G.currentPoint,v),_=[l[1],l[2]];G.command==="C"?(c.command="C",c.startTangent=[v[0]-x[0],v[1]-x[1]],c.endTangent=[e[0]-_[0],e[1]-_[1]]):(c.command="SQ",c.startTangent=[v[0]-_[0],v[1]-_[1]],c.endTangent=[e[0]-_[0],e[1]-_[1]])}else if(u==="A"){var p=J3(c,0),b=p.x,R=p.y,B=J3(c,1,!1),j=B.x,Z=B.y;c.startTangent=[b,R],c.endTangent=[j,Z]}n.push(c)}return n}function J3(r,n){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,t=r.arcParams,i=t.rx,a=i===void 0?0:i,s=t.ry,o=s===void 0?0:s,l=t.xRotation,u=t.arcFlag,c=t.sweepFlag,d=K3({x:r.prePoint[0],y:r.prePoint[1]},a,o,l,!!u,!!c,{x:r.currentPoint[0],y:r.currentPoint[1]},n),h=K3({x:r.prePoint[0],y:r.prePoint[1]},a,o,l,!!u,!!c,{x:r.currentPoint[0],y:r.currentPoint[1]},e?n+.005:n-.005),f=h.x-d.x,v=h.y-d.y,g=Math.sqrt(f*f+v*v);return{x:-f/g,y:-v/g}}function mb(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function AC(r,n){return mb(r)*mb(n)?(r[0]*n[0]+r[1]*n[1])/(mb(r)*mb(n)):1}function Q3(r,n){return(r[0]*n[1]<r[1]*n[0]?-1:1)*Math.acos(AC(r,n))}function Sie(r,n){var e=n[1],t=n[2],i=(0,nt.Z)(Zs(n[3]),Math.PI*2),a=n[4],s=n[5],o=r[0],l=r[1],u=n[6],c=n[7],d=Math.cos(i)*(o-u)/2+Math.sin(i)*(l-c)/2,h=-1*Math.sin(i)*(o-u)/2+Math.cos(i)*(l-c)/2,f=d*d/(e*e)+h*h/(t*t);f>1&&(e*=Math.sqrt(f),t*=Math.sqrt(f));var v=e*e*(h*h)+t*t*(d*d),g=v?Math.sqrt((e*e*(t*t)-v)/v):1;a===s&&(g*=-1),isNaN(g)&&(g=0);var m=t?g*e*h/t:0,y=e?g*-t*d/e:0,w=(o+u)/2+Math.cos(i)*m-Math.sin(i)*y,T=(l+c)/2+Math.sin(i)*m+Math.cos(i)*y,G=[(d-m)/e,(h-y)/t],x=[(-1*d-m)/e,(-1*h-y)/t],_=Q3([1,0],G),p=Q3(G,x);return AC(G,x)<=-1&&(p=Math.PI),AC(G,x)>=1&&(p=0),s===0&&p>0&&(p-=2*Math.PI),s===1&&p<0&&(p+=2*Math.PI),{cx:w,cy:T,rx:gb(r,[u,c])?0:e,ry:gb(r,[u,c])?0:t,startAngle:_,endAngle:_+p,xRotation:i,arcFlag:a,sweepFlag:s}}function Tie(r,n,e){return r.reduce(function(t,i){var a="";if(i[0]==="M"||i[0]==="L"){var s=vec3.fromValues(i[1],i[2],0);e&&vec3.transformMat4(s,s,e),a="".concat(i[0]).concat(s[0],",").concat(s[1])}else if(i[0]==="Z")a=i[0];else if(i[0]==="C"){var o=vec3.fromValues(i[1],i[2],0),l=vec3.fromValues(i[3],i[4],0),u=vec3.fromValues(i[5],i[6],0);e&&(vec3.transformMat4(o,o,e),vec3.transformMat4(l,l,e),vec3.transformMat4(u,u,e)),a="".concat(i[0]).concat(o[0],",").concat(o[1],",").concat(l[0],",").concat(l[1],",").concat(u[0],",").concat(u[1])}else if(i[0]==="A"){var c=vec3.fromValues(i[6],i[7],0);e&&vec3.transformMat4(c,c,e),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],",").concat(i[5],",").concat(c[0],",").concat(c[1])}else if(i[0]==="Q"){var d=vec3.fromValues(i[1],i[2],0),h=vec3.fromValues(i[3],i[4],0);e&&(vec3.transformMat4(d,d,e),vec3.transformMat4(h,h,e)),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],"}")}return t+=a},"")}function Cie(r,n,e,t){return[["M",r,n],["L",e,t]]}function q3(r,n,e,t){var i=(-1+Math.sqrt(2))/3*4,a=r*i,s=n*i,o=e-r,l=e+r,u=t-n,c=t+n;return[["M",o,t],["C",o,t-s,e-a,u,e,u],["C",e+a,u,l,t-s,l,t],["C",l,t+s,e+a,c,e,c],["C",e-a,c,o,t+s,o,t],["Z"]]}function Mie(r,n){var e=r.map(function(t,i){return[i===0?"M":"L",t[0],t[1]]});return n&&e.push(["Z"]),e}function Pie(r,n,e,t,i){if(i){var a=_slicedToArray(i,4),s=a[0],o=a[1],l=a[2],u=a[3],c=r>0?1:-1,d=n>0?1:-1,h=c+d!==0?1:0;return[["M",c*s+e,t],["L",r-c*o+e,t],o?["A",o,o,0,0,h,r+e,d*o+t]:null,["L",r+e,n-d*l+t],l?["A",l,l,0,0,h,r+e-c*l,n+t]:null,["L",e+c*u,n+t],u?["A",u,u,0,0,h,e,n+t-d*u]:null,["L",e,d*s+t],s?["A",s,s,0,0,h,c*s+e,t]:null,["Z"]].filter(function(f){return f})}return[["M",e,t],["L",e+r,t],["L",e+r,t+n],["L",e,t+n],["Z"]]}function INe(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r.getLocalTransform(),e=[];switch(r.nodeName){case Wr.LINE:var t=r.parsedStyle,i=t.x1,a=i===void 0?0:i,s=t.y1,o=s===void 0?0:s,l=t.x2,u=l===void 0?0:l,c=t.y2,d=c===void 0?0:c;e=Cie(a,o,u,d);break;case Wr.CIRCLE:{var h=r.parsedStyle,f=h.r,v=f===void 0?0:f,g=h.cx,m=g===void 0?0:g,y=h.cy,w=y===void 0?0:y;e=q3(v,v,m,w);break}case Wr.ELLIPSE:{var T=r.parsedStyle,G=T.rx,x=G===void 0?0:G,_=T.ry,p=_===void 0?0:_,b=T.cx,R=b===void 0?0:b,B=T.cy,j=B===void 0?0:B;e=q3(x,p,R,j);break}case Wr.POLYLINE:case Wr.POLYGON:var Z=r.parsedStyle.points;e=Mie(Z.points,r.nodeName===Wr.POLYGON);break;case Wr.RECT:var te=r.parsedStyle,le=te.width,ue=le===void 0?0:le,se=te.height,V=se===void 0?0:se,ee=te.x,he=ee===void 0?0:ee,ut=te.y,ct=ut===void 0?0:ut,Lt=te.radius,vn=Lt&&Lt.some(function(rn){return rn!==0});e=Pie(ue,V,he,ct,vn&&Lt.map(function(rn){return clamp(rn,0,Math.min(Math.abs(ue)/2,Math.abs(V)/2))}));break;case Wr.PATH:var tn=r.parsedStyle.d.absolutePath;e=_toConsumableArray(tn);break}if(e.length)return Tie(e,r,n)}function DNe(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a=r.map(function(s,o){var l=s[0],u=r[o+1],c=o===0&&(n!==0||e!==0),d=(o===r.length-1||u&&(u[0]==="M"||u[0]==="Z"))&&t!==0&&i!==0,h=c?[n,e]:[0,0],f=_slicedToArray(h,2),v=f[0],g=f[1],m=d?[t,i]:[0,0],y=_slicedToArray(m,2),w=y[0],T=y[1];switch(l){case"M":return"M ".concat(s[1]+v,",").concat(s[2]+g);case"L":return"L ".concat(s[1]+w,",").concat(s[2]+T);case"Q":return"Q ".concat(s[1]," ").concat(s[2],",").concat(s[3]+w," ").concat(s[4]+T);case"C":return"C ".concat(s[1]," ").concat(s[2],",").concat(s[3]," ").concat(s[4],",").concat(s[5]+w," ").concat(s[6]+T);case"A":return"A ".concat(s[1]," ").concat(s[2]," ").concat(s[3]," ").concat(s[4]," ").concat(s[5]," ").concat(s[6]+w," ").concat(s[7]+T);case"Z":return"Z";default:return null}}).filter(function(s){return s!==null}).join(" ");return~a.indexOf("NaN")?"":a}var eF=function(n){if(n===""||Array.isArray(n)&&n.length===0)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var e;try{e=(0,xt.A)(n)}catch(f){e=(0,xt.A)(""),console.error("[g]: Invalid SVG Path definition: ".concat(n))}xie(e);var t=Eie(e),i=bie(e),a=i.polygons,s=i.polylines,o=wie(e),l=kie(o,0),u=l.x,c=l.y,d=l.width,h=l.height;return{absolutePath:e,hasArc:t,segments:o,polygons:a,polylines:s,totalLength:0,rect:{x:Number.isFinite(u)?u:0,y:Number.isFinite(c)?c:0,width:Number.isFinite(d)?d:0,height:Number.isFinite(h)?h:0}}},Nie=vc(eF);function tF(r){return(0,Ze.Z)(r)?Nie(r):eF(r)}function Oie(r,n,e){var t=r.curve,i=n.curve;(!t||t.length===0)&&(t=(0,bt.Y)(r.absolutePath,!1),r.curve=t),(!i||i.length===0)&&(i=(0,bt.Y)(n.absolutePath,!1),n.curve=i);var a=[t,i];t.length!==i.length&&(a=(0,wt.x)(t,i));var s=(0,we.b)(a[0])!==(0,we.b)(a[1])?(0,oe.G)(a[0]):(0,Fe.U)(a[0]);return[s,(0,Ye.g)(a[1],s),function(o){return o}]}function Rie(r,n){var e;return(0,Ze.Z)(r)?e=r.split(" ").map(function(t){var i=t.split(","),a=Ko(i,2),s=a[0],o=a[1];return[Number(s),Number(o)]}):e=r,{points:e,totalLength:0,segments:[]}}function Aie(r,n){return[r.points,n.points,function(e){return e}]}var Qo=null,Op=/\s*(\w+)\(([^)]*)\)/g;function Xc(r){return function(n){var e=0;return r.map(function(t){return t===Qo?n[e++]:t})}}function H_(r){return r}var By={matrix:["NNNNNN",[Qo,Qo,0,0,Qo,Qo,0,0,0,0,1,0,Qo,Qo,0,1],H_],matrix3d:["NNNNNNNNNNNNNNNN",H_],rotate:["A"],rotateX:["A"],rotateY:["A"],rotateZ:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",Xc([Qo,Qo,new fs(1)]),H_],scaleX:["N",Xc([Qo,new fs(1),new fs(1)]),Xc([Qo,new fs(1)])],scaleY:["N",Xc([new fs(1),Qo,new fs(1)]),Xc([new fs(1),Qo])],scaleZ:["N",Xc([new fs(1),new fs(1),Qo])],scale3d:["NNN",H_],skew:["Aa",null,H_],skewX:["A",null,Xc([Qo,j_])],skewY:["A",null,Xc([j_,Qo])],translate:["Tt",Xc([Qo,Qo,of]),H_],translateX:["T",Xc([Qo,of,of]),Xc([Qo,of])],translateY:["T",Xc([of,Qo,of]),Xc([of,Qo])],translateZ:["L",Xc([of,of,Qo])],translate3d:["TTL",H_]};function nF(r){for(var n=[],e=r.length,t=0;t<e;t++){var i=r[t],a=i[0],s=i.slice(1);a==="translate"||a==="skew"?s.length===1&&s.push(0):a==="scale"&&s.length===1&&s.push(s[0]);var o=By[a];if(!o)return[];var l=s.map(function(u){return So(u)});n.push({t:a,d:l})}return n}function Lie(r){if(Array.isArray(r))return nF(r);if(r=(r||"none").trim(),r==="none")return[];var n=[],e,t=0;for(Op.lastIndex=0;e=Op.exec(r);){if(e.index!==t)return[];t=e.index+e[0].length;var i=e[1],a=By[i];if(!a)return[];var s=e[2].split(","),o=a[0];if(o.length<s.length)return[];for(var l=[],u=0;u<o.length;u++){var c=s[u],d=o[u],h=void 0;if(c?h={A:function(v){return v.trim()==="0"?j_:vie(v)},N:NC,T:PC,L:hie}[d.toUpperCase()](c):h={a:j_,n:l[0],t:of}[d],h===void 0)return[];l.push(h)}if(n.push({t:i,d:l}),Op.lastIndex===r.length)return n}return[]}function Iie(r){if(Array.isArray(r))return nF(r);if(r=(r||"none").trim(),r==="none")return[];var n=[],e,t=0;for(Op.lastIndex=0;e=Op.exec(r);){if(e.index!==t)return[];t=e.index+e[0].length;var i=e[1],a=By[i];if(!a)return[];var s=e[2].split(","),o=a[0];if(o.length<s.length)return[];for(var l=[],u=0;u<o.length;u++){var c=s[u],d=o[u],h=void 0;if(c?h={A:function(v){return v.trim()==="0"?j_:V3(v)},N:H3,T:z3,L:G3}[d.toUpperCase()](c):h={a:j_,n:l[0],t:of}[d],h===void 0)return[];l.push(h)}if(n.push({t:i,d:l}),Op.lastIndex===r.length)return n}return[]}function Die(r){var n,e,t,i;switch(r.t){case"rotateX":return i=Zs(Zc(r.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotateY":return i=Zs(Zc(r.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotateZ":return i=Zs(Zc(r.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":n=r.d[0].value,e=r.d[1].value,t=r.d[2].value,i=Zs(Zc(r.d[3]));var a=n*n+e*e+t*t;if(a===0)n=1,e=0,t=0;else if(a!==1){var s=Math.sqrt(a);n/=s,e/=s,t/=s}var o=Math.sin(i/2),l=o*Math.cos(i/2),u=o*o;return[1-2*(e*e+t*t)*u,2*(n*e*u+t*l),2*(n*t*u-e*l),0,2*(n*e*u-t*l),1-2*(n*n+t*t)*u,2*(e*t*u+n*l),0,2*(n*t*u+e*l),2*(e*t*u-n*l),1-2*(n*n+e*e)*u,0,0,0,0,1];case"scale":return[r.d[0].value,0,0,0,0,r.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scaleX":return[r.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaleY":return[1,0,0,0,0,r.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scaleZ":return[1,0,0,0,0,1,0,0,0,0,r.d[0].value,0,0,0,0,1];case"scale3d":return[r.d[0].value,0,0,0,0,r.d[1].value,0,0,0,0,r.d[2].value,0,0,0,0,1];case"skew":var c=Zs(Zc(r.d[0])),d=Zs(Zc(r.d[1]));return[1,Math.tan(d),0,0,Math.tan(c),1,0,0,0,0,1,0,0,0,0,1];case"skewX":return i=Zs(Zc(r.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewY":return i=Zs(Zc(r.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return n=Sd(r.d[0],0,null)||0,e=Sd(r.d[1],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,e,0,1];case"translateX":return n=Sd(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,0,0,1];case"translateY":return e=Sd(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,e,0,1];case"translateZ":return t=Sd(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,t,1];case"translate3d":return n=Sd(r.d[0],0,null)||0,e=Sd(r.d[1],0,null)||0,t=Sd(r.d[2],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,e,t,1];case"perspective":var h=Sd(r.d[0],0,null)||0,f=h?-1/h:0;return[1,0,0,0,0,1,0,0,0,0,1,f,0,0,0,1];case"matrix":return[r.d[0].value,r.d[1].value,0,0,r.d[2].value,r.d[3].value,0,0,0,0,1,0,r.d[4].value,r.d[5].value,0,1];case"matrix3d":return r.d.map(function(v){return v.value})}}function Fie(r,n){return[r[0]*n[0]+r[4]*n[1]+r[8]*n[2]+r[12]*n[3],r[1]*n[0]+r[5]*n[1]+r[9]*n[2]+r[13]*n[3],r[2]*n[0]+r[6]*n[1]+r[10]*n[2]+r[14]*n[3],r[3]*n[0]+r[7]*n[1]+r[11]*n[2]+r[15]*n[3],r[0]*n[4]+r[4]*n[5]+r[8]*n[6]+r[12]*n[7],r[1]*n[4]+r[5]*n[5]+r[9]*n[6]+r[13]*n[7],r[2]*n[4]+r[6]*n[5]+r[10]*n[6]+r[14]*n[7],r[3]*n[4]+r[7]*n[5]+r[11]*n[6]+r[15]*n[7],r[0]*n[8]+r[4]*n[9]+r[8]*n[10]+r[12]*n[11],r[1]*n[8]+r[5]*n[9]+r[9]*n[10]+r[13]*n[11],r[2]*n[8]+r[6]*n[9]+r[10]*n[10]+r[14]*n[11],r[3]*n[8]+r[7]*n[9]+r[11]*n[10]+r[15]*n[11],r[0]*n[12]+r[4]*n[13]+r[8]*n[14]+r[12]*n[15],r[1]*n[12]+r[5]*n[13]+r[9]*n[14]+r[13]*n[15],r[2]*n[12]+r[6]*n[13]+r[10]*n[14]+r[14]*n[15],r[3]*n[12]+r[7]*n[13]+r[11]*n[14]+r[15]*n[15]]}function Bie(r){return r.length===0?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:r.map(Die).reduce(Fie)}function rF(r){var n=[0,0,0],e=[1,1,1],t=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return Are(Bie(r),n,e,t,i,a),[[n,e,t,a,i]]}var $ie=function(){function r(t,i){for(var a=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],s=0;s<4;s++)for(var o=0;o<4;o++)for(var l=0;l<4;l++)a[s][o]+=i[s][l]*t[l][o];return a}function n(t){return t[0][2]===0&&t[0][3]===0&&t[1][2]===0&&t[1][3]===0&&t[2][0]===0&&t[2][1]===0&&t[2][2]===1&&t[2][3]===0&&t[3][2]===0&&t[3][3]===1}function e(t,i,a,s,o){for(var l=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],u=0;u<4;u++)l[u][3]=o[u];for(var c=0;c<3;c++)for(var d=0;d<3;d++)l[3][c]+=t[d]*l[d][c];var h=s[0],f=s[1],v=s[2],g=s[3],m=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];m[0][0]=1-2*(f*f+v*v),m[0][1]=2*(h*f-v*g),m[0][2]=2*(h*v+f*g),m[1][0]=2*(h*f+v*g),m[1][1]=1-2*(h*h+v*v),m[1][2]=2*(f*v-h*g),m[2][0]=2*(h*v-f*g),m[2][1]=2*(f*v+h*g),m[2][2]=1-2*(h*h+f*f),l=r(l,m);var y=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];a[2]&&(y[2][1]=a[2],l=r(l,y)),a[1]&&(y[2][1]=0,y[2][0]=a[0],l=r(l,y)),a[0]&&(y[2][0]=0,y[1][0]=a[0],l=r(l,y));for(var w=0;w<3;w++)for(var T=0;T<3;T++)l[w][T]*=i[w];return n(l)?[l[0][0],l[0][1],l[1][0],l[1][1],l[3][0],l[3][1]]:l[0].concat(l[1],l[2],l[3])}return e}();function Gie(r){return r.toFixed(6).replace(".000000","")}function LC(r,n){var e,t;return r.decompositionPair!==n&&(r.decompositionPair=n,e=rF(r)),n.decompositionPair!==r&&(n.decompositionPair=r,t=rF(n)),e[0]===null||t[0]===null?[[!1],[!0],function(i){return i?n[0].d:r[0].d}]:(e[0].push(0),t[0].push(1),[e,t,function(i){var a=Vie(e[0][3],t[0][3],i[5]),s=$ie(i[0],i[1],i[2],a,i[4]),o=s.map(Gie).join(",");return o}])}function zie(r,n){for(var e=0,t=0;t<r.length;t++)e+=r[t]*n[t];return e}function Vie(r,n,e){var t=zie(r,n);t=(0,O.Z)(t,-1,1);var i=[];if(t===1)i=r;else for(var a=Math.acos(t),s=Math.sin(e*a)*1/Math.sqrt(1-t*t),o=0;o<4;o++)i.push(r[o]*(Math.cos(e*a)-t*s)+n[o]*s);return i}function IC(r){return r.replace(/[XY]/,"")}function DC(r){return r.replace(/(X|Y|Z|3d)?$/,"3d")}var Uie=function(n,e){return n==="perspective"&&e==="perspective"||(n==="matrix"||n==="matrix3d")&&(e==="matrix"||e==="matrix3d")};function jie(r,n,e){var t=!1;if(!r.length||!n.length){r.length||(t=!0,r=n,n=[]);for(var i=function(){var j=r[a],Z=j.t,te=j.d,le=Z.substring(0,5)==="scale"?1:0;n.push({t:Z,d:te.map(function(ue){return typeof ue=="number"?So(le):So(le,ue.unit)})})},a=0;a<r.length;a++)i()}var s=[],o=[],l=[];if(r.length!==n.length){var u=LC(r,n);s=[u[0]],o=[u[1]],l=[["matrix",[u[2]]]]}else for(var c=0;c<r.length;c++){var d=r[c].t,h=n[c].t,f=r[c].d,v=n[c].d,g=By[d],m=By[h],y=void 0;if(Uie(d,h)){var w=LC([r[c]],[n[c]]);s.push(w[0]),o.push(w[1]),l.push(["matrix",[w[2]]]);continue}else if(d===h)y=d;else if(g[2]&&m[2]&&IC(d)===IC(h))y=IC(d),f=g[2](f),v=m[2](v);else if(g[1]&&m[1]&&DC(d)===DC(h))y=DC(d),f=g[1](f),v=m[1](v);else{var T=LC(r,n);s=[T[0]],o=[T[1]],l=[["matrix",[T[2]]]];break}for(var G=[],x=[],_=[],p=0;p<f.length;p++){var b=gie(f[p],v[p],e,!1,p);G[p]=b[0],x[p]=b[1],_.push(b[2])}s.push(G),o.push(x),l.push([y,_])}if(t){var R=s;s=o,o=R}return[s,o,function(B){return B.map(function(j,Z){var te=j.map(function(le,ue){return l[Z][1][ue](le)}).join(",");return l[Z][0]==="matrix"&&te.split(",").length===16&&(l[Z][0]="matrix3d"),l[Z][0]==="matrix3d"&&te.split(",").length===6&&(l[Z][0]="matrix"),"".concat(l[Z][0],"(").concat(te,")")}).join(" ")}]}var Hie=vc(function(r){if((0,Ze.Z)(r)){if(r==="text-anchor")return[So(0,"px"),So(0,"px")];var n=r.split(" ");return n.length===1&&(n[0]==="top"||n[0]==="bottom"?(n[1]=n[0],n[0]="center"):n[1]="center"),n.length!==2?null:[PC(iF(n[0])),PC(iF(n[1]))]}return[So(r[0]||0,"px"),So(r[1]||0,"px")]});function iF(r){return r==="center"?"50%":r==="left"||r==="top"?"0%":r==="right"||r==="bottom"?"100%":r}var aF=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:Hn.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:Hn.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:Hn.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:Hn.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:Hn.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:Hn.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:Hn.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:Hn.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:Hn.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:Hn.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:Hn.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:Hn.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:Hn.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:Hn.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:Hn.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:Hn.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:Hn.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:Hn.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:Hn.FILTER},{n:"clipPath",syntax:Hn.DEFINED_PATH},{n:"textPath",syntax:Hn.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:Hn.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:Hn.TRANSFORM},{n:"transformOrigin",p:100,d:"0 0",l:!0,syntax:Hn.TRANSFORM_ORIGIN},{n:"cx",int:!0,l:!0,d:"0",syntax:Hn.COORDINATE},{n:"cy",int:!0,l:!0,d:"0",syntax:Hn.COORDINATE},{n:"cz",int:!0,l:!0,d:"0",syntax:Hn.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:Hn.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:Hn.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:Hn.LENGTH_PERCENTAGE},{n:"x",int:!0,l:!0,d:"0",syntax:Hn.COORDINATE},{n:"y",int:!0,l:!0,d:"0",syntax:Hn.COORDINATE},{n:"z",int:!0,l:!0,d:"0",syntax:Hn.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:Hn.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:Hn.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:Hn.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:Hn.COORDINATE},{n:"y1",int:!0,l:!0,syntax:Hn.COORDINATE},{n:"z1",int:!0,l:!0,syntax:Hn.COORDINATE},{n:"x2",int:!0,l:!0,syntax:Hn.COORDINATE},{n:"y2",int:!0,l:!0,syntax:Hn.COORDINATE},{n:"z2",int:!0,l:!0,syntax:Hn.COORDINATE},{n:"d",int:!0,l:!0,d:"",syntax:Hn.PATH,p:50},{n:"points",int:!0,l:!0,syntax:Hn.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:Hn.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:Hn.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:Hn.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:Hn.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:Hn.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:Hn.NUMBER,d:function(n){return n===Wr.PATH||n===Wr.POLYGON||n===Wr.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:Hn.MARKER},{n:"markerEnd",syntax:Hn.MARKER},{n:"markerMid",syntax:Hn.MARKER},{n:"markerStartOffset",syntax:Hn.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:Hn.LENGTH,l:!0,int:!0,d:"0"}],Wie=new Set(aF.filter(function(r){return!!r.l}).map(function(r){return r.n})),Yie={},Zie=function(){function r(n){var e=this;Tr(this,r),this.runtime=n,aF.forEach(function(t){e.registerMetadata(t)})}return Cr(r,[{key:"registerMetadata",value:function(e){[e.n].concat(Al(e.a||[])).forEach(function(t){Yie[t]=e})}},{key:"getPropertySyntax",value:function(e){return this.runtime.CSSPropertySyntaxFactory[e]}},{key:"processProperties",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0};Object.assign(e.attributes,t);var a=e.parsedStyle.clipPath,s=e.parsedStyle.offsetPath;Xie(e,t);var o=!!i.forceUpdateGeometry;if(!o){for(var l in t)if(Wie.has(l)){o=!0;break}}var u=sF(e);u.has("fill")&&t.fill&&(e.parsedStyle.fill=Dy(t.fill)),u.has("stroke")&&t.stroke&&(e.parsedStyle.stroke=Dy(t.stroke)),u.has("shadowColor")&&t.shadowColor&&(e.parsedStyle.shadowColor=Dy(t.shadowColor)),u.has("filter")&&t.filter&&(e.parsedStyle.filter=pie(t.filter)),u.has("radius")&&!(0,xe.Z)(t.radius)&&(e.parsedStyle.radius=U3(t.radius,4)),u.has("lineDash")&&!(0,xe.Z)(t.lineDash)&&(e.parsedStyle.lineDash=U3(t.lineDash,2)),u.has("points")&&t.points&&(e.parsedStyle.points=Rie(t.points)),u.has("d")&&t.d===""&&(e.parsedStyle.d=gl({},A3)),u.has("d")&&t.d&&(e.parsedStyle.d=tF(t.d)),u.has("textTransform")&&t.textTransform&&this.runtime.CSSPropertySyntaxFactory[Hn.TEXT_TRANSFORM].calculator(null,null,{value:t.textTransform},e,null),u.has("clipPath")&&!(0,ie.Z)(t.clipPath)&&this.runtime.CSSPropertySyntaxFactory[Hn.DEFINED_PATH].calculator("clipPath",a,t.clipPath,e,this.runtime),u.has("offsetPath")&&t.offsetPath&&this.runtime.CSSPropertySyntaxFactory[Hn.DEFINED_PATH].calculator("offsetPath",s,t.offsetPath,e,this.runtime),u.has("transform")&&t.transform&&(e.parsedStyle.transform=Lie(t.transform)),u.has("transformOrigin")&&t.transformOrigin&&(e.parsedStyle.transformOrigin=Hie(t.transformOrigin)),u.has("markerStart")&&t.markerStart&&(e.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory[Hn.MARKER].calculator(null,t.markerStart,t.markerStart,null,null)),u.has("markerEnd")&&t.markerEnd&&(e.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory[Hn.MARKER].calculator(null,t.markerEnd,t.markerEnd,null,null)),u.has("markerMid")&&t.markerMid&&(e.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory[Hn.MARKER].calculator("",t.markerMid,t.markerMid,null,null)),u.has("zIndex")&&!(0,xe.Z)(t.zIndex)&&this.runtime.CSSPropertySyntaxFactory[Hn.Z_INDEX].postProcessor(e),u.has("offsetDistance")&&!(0,xe.Z)(t.offsetDistance)&&this.runtime.CSSPropertySyntaxFactory[Hn.OFFSET_DISTANCE].postProcessor(e),u.has("transform")&&t.transform&&this.runtime.CSSPropertySyntaxFactory[Hn.TRANSFORM].postProcessor(e),u.has("transformOrigin")&&t.transformOrigin&&this.runtime.CSSPropertySyntaxFactory[Hn.TRANSFORM_ORIGIN].postProcessor(e),o&&(e.geometry.dirty=!0,e.renderable.boundsDirty=!0,e.renderable.renderBoundsDirty=!0,i.forceUpdateGeometry||this.runtime.sceneGraphService.dirtifyToRoot(e))}},{key:"updateGeometry",value:function(e){var t=e.nodeName,i=this.runtime.geometryUpdaterFactory[t];if(i){var a=e.geometry;a.contentBounds||(a.contentBounds=new Wc),a.renderBounds||(a.renderBounds=new Wc);var s=e.parsedStyle,o=i.update(s,e),l=o.cx,u=l===void 0?0:l,c=o.cy,d=c===void 0?0:c,h=o.cz,f=h===void 0?0:h,v=o.hwidth,g=v===void 0?0:v,m=o.hheight,y=m===void 0?0:m,w=o.hdepth,T=w===void 0?0:w,G=[Math.abs(g),Math.abs(y),T],x=s.stroke,_=s.lineWidth,p=_===void 0?1:_,b=s.increasedLineWidthForHitTesting,R=b===void 0?0:b,B=s.shadowType,j=B===void 0?"outer":B,Z=s.shadowColor,te=s.filter,le=te===void 0?[]:te,ue=s.transformOrigin,se=[u,d,f];a.contentBounds.update(se,G);var V=t===Wr.POLYLINE||t===Wr.POLYGON||t===Wr.PATH?Math.SQRT2:.5,ee=x&&!x.isNone;if(ee){var he=((p||0)+(R||0))*V;G[0]+=he,G[1]+=he}if(a.renderBounds.update(se,G),Z&&j&&j!=="inner"){var ut=a.renderBounds,ct=ut.min,Lt=ut.max,vn=s.shadowBlur,tn=s.shadowOffsetX,rn=s.shadowOffsetY,mn=vn||0,ar=tn||0,gi=rn||0,kr=ct[0]-mn+ar,Ta=Lt[0]+mn+ar,Wa=ct[1]-mn+gi,la=Lt[1]+mn+gi;ct[0]=Math.min(ct[0],kr),Lt[0]=Math.max(Lt[0],Ta),ct[1]=Math.min(ct[1],Wa),Lt[1]=Math.max(Lt[1],la),a.renderBounds.setMinMax(ct,Lt)}le.forEach(function(so){var oo=so.name,qi=so.params;if(oo==="blur"){var lo=qi[0].value;a.renderBounds.update(a.renderBounds.center,E.IH(a.renderBounds.halfExtents,a.renderBounds.halfExtents,[lo,lo,0]))}else if(oo==="drop-shadow"){var uo=qi[0].value,co=qi[1].value,ea=qi[2].value,ho=a.renderBounds,Rr=ho.min,Ar=ho.max,Gu=Rr[0]-ea+uo,zu=Ar[0]+ea+uo,Vu=Rr[1]-ea+co,Uu=Ar[1]+ea+co;Rr[0]=Math.min(Rr[0],Gu),Ar[0]=Math.max(Ar[0],zu),Rr[1]=Math.min(Rr[1],Vu),Ar[1]=Math.max(Ar[1],Uu),a.renderBounds.setMinMax(Rr,Ar)}}),e.geometry.dirty=!1;var ys=g<0,Jl=y<0,xs=(ys?-1:1)*(ue?Sd(ue[0],0,e,!0):0),Es=(Jl?-1:1)*(ue?Sd(ue[1],1,e,!0):0);(xs||Es)&&e.setOrigin(xs,Es)}}},{key:"updateSizeAttenuation",value:function(e,t){e.style.isSizeAttenuation?(e.style.rawLineWidth||(e.style.rawLineWidth=e.style.lineWidth),e.style.lineWidth=(e.style.rawLineWidth||1)/t,e.nodeName===Wr.CIRCLE&&(e.style.rawR||(e.style.rawR=e.style.r),e.style.r=(e.style.rawR||1)/t)):(e.style.rawLineWidth&&(e.style.lineWidth=e.style.rawLineWidth,delete e.style.rawLineWidth),e.nodeName===Wr.CIRCLE&&e.style.rawR&&(e.style.r=e.style.rawR,delete e.style.rawR))}}])}();function Xie(r,n){var e=sF(r);for(var t in n)e.has(t)&&(r.parsedStyle[t]=n[t])}function sF(r){return r.constructor.PARSED_STYLE_LIST}var Kie=function(){function r(){Tr(this,r),this.mixer=OC}return Cr(r,[{key:"calculator",value:function(e,t,i,a){return Zc(i)}}])}(),Jie=function(){function r(){Tr(this,r)}return Cr(r,[{key:"calculator",value:function(e,t,i,a,s){return i instanceof sh&&(i=null),s.sceneGraphService.updateDisplayObjectDependency(e,t,i,a),e==="clipPath"&&a.forEach(function(o){o.childNodes.length===0&&s.sceneGraphService.dirtifyToRoot(o)}),i}}])}(),Qie=function(){function r(){Tr(this,r),this.parser=Dy,this.mixer=die}return Cr(r,[{key:"calculator",value:function(e,t,i,a){return i instanceof sh?i.value==="none"?D3:F3:i}}])}(),qie=function(){function r(){Tr(this,r)}return Cr(r,[{key:"calculator",value:function(e,t,i){return i instanceof sh?[]:i}}])}();function oF(r){var n=r.parsedStyle,e=n.fontSize;return(0,xe.Z)(e)?null:e}var FC=function(){function r(){Tr(this,r),this.mixer=OC}return Cr(r,[{key:"calculator",value:function(e,t,i,a,s){if((0,pe.Z)(i))return i;if(fs.isRelativeUnit(i.unit)){if(i.unit===er.kPercentage)return 0;if(i.unit===er.kEms){if(a.parentNode){var o=oF(a.parentNode);if(o)return o*=i.value,o}return 0}if(i.unit===er.kRems){var l;if(a!=null&&(l=a.ownerDocument)!==null&&l!==void 0&&l.documentElement){var u=oF(a.ownerDocument.documentElement);if(u)return u*=i.value,u}return 0}}else return i.value}}])}(),eae=function(){function r(){Tr(this,r),this.mixer=W3}return Cr(r,[{key:"calculator",value:function(e,t,i){return i.map(function(a){return a.value})}}])}(),tae=function(){function r(){Tr(this,r),this.mixer=W3}return Cr(r,[{key:"calculator",value:function(e,t,i){return i.map(function(a){return a.value})}}])}(),nae=function(){function r(){Tr(this,r)}return Cr(r,[{key:"calculator",value:function(e,t,i,a){var s;i instanceof sh&&(i=null);var o=(s=i)===null||s===void 0?void 0:s.cloneNode(!0);return o&&(o.style.isMarker=!0),o}}])}(),rae=function(){function r(){Tr(this,r),this.mixer=OC}return Cr(r,[{key:"calculator",value:function(e,t,i){return i.value}}])}(),iae=function(){function r(){Tr(this,r),this.mixer=RC(0,1)}return Cr(r,[{key:"calculator",value:function(e,t,i){return i.value}},{key:"postProcessor",value:function(e){var t=e.parsedStyle,i=t.offsetPath,a=t.offsetDistance;if(i){var s=i.nodeName;if(s===Wr.LINE||s===Wr.PATH||s===Wr.POLYLINE){var o=i.getPoint(a);o&&e.setLocalPosition(o.x,o.y)}}}}])}(),aae=function(){function r(){Tr(this,r),this.mixer=RC(0,1)}return Cr(r,[{key:"calculator",value:function(e,t,i){return i.value}}])}(),sae=function(){function r(){Tr(this,r),this.parser=tF,this.mixer=Oie}return Cr(r,[{key:"calculator",value:function(e,t,i){return i instanceof sh&&i.value==="unset"?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Pp(0,0,0,0)}:i}}])}(),oae=Cr(function r(){Tr(this,r),this.mixer=Aie}),lae=function(r){function n(){var e;Tr(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ws(this,n,[].concat(i)),e.mixer=RC(0,1/0),e}return Ys(n,r),Cr(n)}(FC),uae=function(){function r(){Tr(this,r)}return Cr(r,[{key:"calculator",value:function(e,t,i,a){return i instanceof sh?i.value==="unset"?"":i.value:"".concat(i)}},{key:"postProcessor",value:function(e){e.nodeValue="".concat(e.parsedStyle.text)||""}}])}(),cae=function(){function r(){Tr(this,r)}return Cr(r,[{key:"calculator",value:function(e,t,i,a){var s=a.getAttribute("text");if(s){var o=s;i.value==="capitalize"?o=s.charAt(0).toUpperCase()+s.slice(1):i.value==="lowercase"?o=s.toLowerCase():i.value==="uppercase"&&(o=s.toUpperCase()),a.parsedStyle.text=o}return i.value}}])}(),FNe=function(n){return Object.fromEntries(Object.entries(n).filter(function(e){var t=_slicedToArray(e,2),i=t[1];return i!==void 0}))},BC=new WeakMap;function BNe(r,n,e){if(r){var t=typeof r=="string"?document.getElementById(r):r;BC.has(t)&&BC.get(t).destroy(e),BC.set(t,n)}}var lF=typeof window!="undefined"&&typeof window.document!="undefined";function $Ne(r){return!!r.getAttribute}function GNe(r,n){for(var e=0,t=r.length;e<t;){var i=e+t>>>1;dae(r[i],n)<0?e=i+1:t=i}return e}function dae(r,n){var e=Number(r.parsedStyle.zIndex||0),t=Number(n.parsedStyle.zIndex||0);if(e===t){var i=r.parentNode;if(i){var a=i.childNodes||[];return a.indexOf(r)-a.indexOf(n)}}return e-t}function hae(r){var n=r;do{var e,t=(e=n.parsedStyle)===null||e===void 0?void 0:e.clipPath;if(t)return n;n=n.parentElement}while(n!==null);return null}var uF="px";function zNe(r,n,e){lF&&r.style&&(r.style.width=n+uF,r.style.height=e+uF)}function cF(r,n){if(lF)return document.defaultView.getComputedStyle(r,null).getPropertyValue(n)}function VNe(r){var n=cF(r,"width");return n==="auto"?r.offsetWidth:parseFloat(n)}function UNe(r){var n=cF(r,"height");return n==="auto"?r.offsetHeight:parseFloat(n)}var fae=1,vae={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},gae=typeof performance=="object"&&performance.now?performance:Date;function $C(r){return r.nodeName===Wr.FRAGMENT?!0:r.getRootNode().nodeName===Wr.FRAGMENT}function jNe(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"auto",n=arguments.length>1?arguments[1]:void 0,e=arguments.length>2?arguments[2]:void 0,t=!1,i=!1,a=!!n&&!n.isNone,s=!!e&&!e.isNone;return r==="visiblepainted"||r==="painted"||r==="auto"?(t=a,i=s):r==="visiblefill"||r==="fill"?t=!0:r==="visiblestroke"||r==="stroke"?i=!0:(r==="visible"||r==="all")&&(t=!0,i=!0),[t,i]}var _ae=1,mae=function(){return _ae++},ov=typeof self=="object"&&self.self===self?self:typeof k.g=="object"&&k.g.global===k.g?k.g:{},pae=Date.now(),yae=function(){return ov.performance&&typeof ov.performance.now=="function"?ov.performance.now():Date.now()-pae},$y={},dF=Date.now(),xae=function(n){if(typeof n!="function")throw new TypeError("".concat(n," is not a function"));var e=Date.now(),t=e-dF,i=t>16?0:16-t,a=mae();return $y[a]=n,Object.keys($y).length>1||setTimeout(function(){dF=e;var s=$y;$y={},Object.keys(s).forEach(function(o){return s[o](yae())})},i),a},Eae=function(n){delete $y[n]},bae=["","webkit","moz","ms","o"],hF=function(n){return typeof n!="string"?xae:n===""?ov.requestAnimationFrame:ov["".concat(n,"RequestAnimationFrame")]},kae=function(n){return typeof n!="string"?Eae:n===""?ov.cancelAnimationFrame:ov["".concat(n,"CancelAnimationFrame")]||ov["".concat(n,"CancelRequestAnimationFrame")]},wae=function(n,e){for(var t=0;n[t]!==void 0;){if(e(n[t]))return n[t];t+=1}},fF=wae(bae,function(r){return!!hF(r)}),vF=hF(fF),Sae=kae(fF);ov.requestAnimationFrame=vF,ov.cancelAnimationFrame=Sae;var HNe=null,WNe=null,YNe=null,ZNe=null,Tae=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Cae=/([\"\'])[^\'\"]+\1/;function Mae(r){for(var n=r.fontSize,e=n===void 0?16:n,t=r.fontFamily,i=t===void 0?"sans-serif":t,a=r.fontStyle,s=a===void 0?"normal":a,o=r.fontVariant,l=o===void 0?"normal":o,u=r.fontWeight,c=u===void 0?"normal":u,d=(0,pe.Z)(e)&&"".concat(e,"px")||"16px",h=i.split(","),f=h.length-1;f>=0;f--){var v=h[f].trim();!Cae.test(v)&&Tae.indexOf(v)<0&&(v='"'.concat(v,'"')),h[f]=v}return"".concat(s," ").concat(l," ").concat(c," ").concat(d," ").concat(h.join(","))}function GC(r,n,e){return L.identity(r),r[4]=Math.tan(n),r[1]=Math.tan(e),r}var Il=L.create(),Pae=L.create(),Nae={scale:function(n){L.fromScaling(Il,[n[0].value,n[1].value,1])},scaleX:function(n){L.fromScaling(Il,[n[0].value,1,1])},scaleY:function(n){L.fromScaling(Il,[1,n[0].value,1])},scaleZ:function(n){L.fromScaling(Il,[1,1,n[0].value])},scale3d:function(n){L.fromScaling(Il,[n[0].value,n[1].value,n[2].value])},translate:function(n){L.fromTranslation(Il,[n[0].value,n[1].value,0])},translateX:function(n){L.fromTranslation(Il,[n[0].value,0,0])},translateY:function(n){L.fromTranslation(Il,[0,n[0].value,0])},translateZ:function(n){L.fromTranslation(Il,[0,0,n[0].value])},translate3d:function(n){L.fromTranslation(Il,[n[0].value,n[1].value,n[2].value])},rotate:function(n){L.fromZRotation(Il,Zs(Zc(n[0])))},rotateX:function(n){L.fromXRotation(Il,Zs(Zc(n[0])))},rotateY:function(n){L.fromYRotation(Il,Zs(Zc(n[0])))},rotateZ:function(n){L.fromZRotation(Il,Zs(Zc(n[0])))},rotate3d:function(n){L.fromRotation(Il,Zs(Zc(n[3])),[n[0].value,n[1].value,n[2].value])},skew:function(n){GC(Il,Zs(n[0].value),Zs(n[1].value))},skewX:function(n){GC(Il,Zs(n[0].value),0)},skewY:function(n){GC(Il,0,Zs(n[0].value))},matrix:function(n){L.set(Il,n[0].value,n[1].value,0,0,n[2].value,n[3].value,0,0,0,0,1,0,n[4].value,n[5].value,0,1)},matrix3d:function(n){L.set.apply(L,[Il].concat(Al(n.map(function(e){return e.value}))))}},Oae=E.al(1,1,1),Rae=E.Ue(),gF={translate:function(n,e){ur.sceneGraphService.setLocalScale(n,Oae,!1),ur.sceneGraphService.setLocalEulerAngles(n,Rae,void 0,void 0,!1),ur.sceneGraphService.setLocalPosition(n,[e[0].value,e[1].value,0],!1),ur.sceneGraphService.dirtifyLocal(n,n.transformable)}};function Aae(r,n){if(r.length){if(r.length===1&&gF[r[0].t]){gF[r[0].t](n,r[0].d);return}for(var e=L.identity(Pae),t=0;t<r.length;t++){var i=r[t],a=i.t,s=i.d,o=Nae[a];o&&(o(s),L.mul(e,e,Il))}n.setLocalTransform(e)}else n.resetLocalTransform();return n.getLocalTransform()}var Lae=function(){function r(){Tr(this,r),this.parser=Iie,this.mixer=jie}return Cr(r,[{key:"calculator",value:function(e,t,i,a){return i instanceof sh?[]:i}},{key:"postProcessor",value:function(e){Aae(e.parsedStyle.transform,e)}}])}(),Iae=function(){function r(){Tr(this,r)}return Cr(r,[{key:"postProcessor",value:function(e){var t=e.parsedStyle.transformOrigin;t[0].unit===er.kPixels&&t[1].unit===er.kPixels?e.setOrigin(t[0].value,t[1].value):e.getGeometryBounds()}}])}(),Dae=function(){function r(){Tr(this,r)}return Cr(r,[{key:"calculator",value:function(e,t,i,a){return i.value}},{key:"postProcessor",value:function(e){if(e.parentNode){var t=e.parentNode,i=t.renderable,a=t.sortable;i&&(i.dirty=!0),a&&(a.dirty=!0,a.dirtyReason=wC.Z_INDEX_CHANGED)}}}])}(),Fae=function(){function r(){Tr(this,r)}return Cr(r,[{key:"update",value:function(e,t){var i=e.cx,a=i===void 0?0:i,s=e.cy,o=s===void 0?0:s,l=e.r,u=l===void 0?0:l;return{cx:a,cy:o,hwidth:u,hheight:u}}}])}(),Bae=function(){function r(){Tr(this,r)}return Cr(r,[{key:"update",value:function(e,t){var i=e.cx,a=i===void 0?0:i,s=e.cy,o=s===void 0?0:s,l=e.rx,u=l===void 0?0:l,c=e.ry,d=c===void 0?0:c;return{cx:a,cy:o,hwidth:u,hheight:d}}}])}(),$ae=function(){function r(){Tr(this,r)}return Cr(r,[{key:"update",value:function(e){var t=e.x1,i=e.y1,a=e.x2,s=e.y2,o=Math.min(t,a),l=Math.max(t,a),u=Math.min(i,s),c=Math.max(i,s),d=l-o,h=c-u,f=d/2,v=h/2;return{cx:o+f,cy:u+v,hwidth:f,hheight:v}}}])}(),Gae=function(){function r(){Tr(this,r)}return Cr(r,[{key:"update",value:function(e){var t=e.d,i=t.rect,a=i.x,s=i.y,o=i.width,l=i.height,u=o/2,c=l/2;return{cx:a+u,cy:s+c,hwidth:u,hheight:c}}}])}(),zae=function(){function r(){Tr(this,r)}return Cr(r,[{key:"update",value:function(e){if(e.points&&(0,Ie.Z)(e.points.points)){var t=e.points.points,i=Math.min.apply(Math,Al(t.map(function(h){return h[0]}))),a=Math.max.apply(Math,Al(t.map(function(h){return h[0]}))),s=Math.min.apply(Math,Al(t.map(function(h){return h[1]}))),o=Math.max.apply(Math,Al(t.map(function(h){return h[1]}))),l=a-i,u=o-s,c=l/2,d=u/2;return{cx:i+c,cy:s+d,hwidth:c,hheight:d}}return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),Vae=function(){function r(){Tr(this,r)}return Cr(r,[{key:"update",value:function(e,t){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s,l=e.src,u=e.width,c=u===void 0?0:u,d=e.height,h=d===void 0?0:d,f=c,v=h;return l&&!(0,Ze.Z)(l)&&(f||(f=l.width,e.width=f),v||(v=l.height,e.height=v)),{cx:a+f/2,cy:o+v/2,hwidth:f/2,hheight:v/2}}}])}(),Uae=function(){function r(n){Tr(this,r),this.globalRuntime=n}return Cr(r,[{key:"isReadyToMeasure",value:function(e,t){var i=e.text;return i}},{key:"update",value:function(e,t){var i,a=e.text,s=e.textAlign,o=s===void 0?"start":s,l=e.lineWidth,u=l===void 0?1:l,c=e.textBaseline,d=c===void 0?"alphabetic":c,h=e.dx,f=h===void 0?0:h,v=e.dy,g=v===void 0?0:v,m=e.x,y=m===void 0?0:m,w=e.y,T=w===void 0?0:w;if(!this.isReadyToMeasure(e,t))return e.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{hwidth:0,hheight:0,cx:0,cy:0};var G=(t==null||(i=t.ownerDocument)===null||i===void 0||(i=i.defaultView)===null||i===void 0?void 0:i.getConfig())||{},x=G.offscreenCanvas,_=this.globalRuntime.textService.measureText(a,e,x);e.metrics=_;var p=_.width,b=_.height,R=p/2,B=b/2,j=y+R;o==="center"||o==="middle"?j+=u/2-R:(o==="right"||o==="end")&&(j+=u-R*2);var Z=T-B;return d==="middle"?Z+=B:d==="top"||d==="hanging"?Z+=B*2:d==="alphabetic"||(d==="bottom"||d==="ideographic")&&(Z+=0),f&&(j+=f),g&&(Z+=g),{cx:j,cy:Z,hwidth:R,hheight:B}}}])}(),jae=function(){function r(){Tr(this,r)}return Cr(r,[{key:"update",value:function(e,t){return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),Hae=function(){function r(){Tr(this,r)}return Cr(r,[{key:"update",value:function(e,t){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s,l=e.width,u=l===void 0?0:l,c=e.height,d=c===void 0?0:c;return{cx:a+u/2,cy:o+d/2,hwidth:u/2,hheight:d/2}}}])}();function XNe(r){return!!r.type}var zC=function(){function r(n){Tr(this,r),this.eventPhase=r.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new ih,this.page=new ih,this.canvas=new ih,this.viewport=new ih,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=n}return Cr(r,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"composedPath",value:function(){return this.manager&&(!this.path||this.path[0]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}},{key:"propagationPath",get:function(){return this.composedPath()}},{key:"preventDefault",value:function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}},{key:"stopImmediatePropagation",value:function(){this.propagationImmediatelyStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"initEvent",value:function(){}},{key:"initUIEvent",value:function(){}},{key:"clone",value:function(){throw new Error(Jo)}}])}(),_F=function(r){function n(){var e;Tr(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ws(this,n,[].concat(i)),e.client=new ih,e.movement=new ih,e.offset=new ih,e.global=new ih,e.screen=new ih,e}return Ys(n,r),Cr(n,[{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(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)}},{key:"initMouseEvent",value:function(){throw new Error(Jo)}}])}(zC),Wae=function(r){function n(){var e;Tr(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ws(this,n,[].concat(i)),e.width=0,e.height=0,e.isPrimary=!1,e}return Ys(n,r),Cr(n,[{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)}}])}(_F),Yae=function(r){function n(){return Tr(this,n),Ws(this,n,arguments)}return Ys(n,r),Cr(n,[{key:"clone",value:function(){return this.manager.cloneWheelEvent(this)}}])}(_F),Wv=function(r){function n(e,t){var i;return Tr(this,n),i=Ws(this,n,[null]),i.type=e,i.detail=t,Object.assign(i,t),i}return Ys(n,r),Cr(n)}(zC),mF=new WeakMap,Zae=function(){function r(){Tr(this,r),this.emitter=new Se.Z}return Cr(r,[{key:"on",value:function(e,t,i){return this.addEventListener(e,t,i),this}},{key:"addEventListener",value:function(e,t,i){var a=!1,s=!1;if((0,je.Z)(i))a=i;else if(i){var o=i.capture;a=o===void 0?!1:o;var l=i.once;s=l===void 0?!1:l}a&&(e+="capture"),t=(0,Be.Z)(t)?t:t.handleEvent;var u=(0,Be.Z)(t)?void 0:t;return s?this.emitter.once(e,t,u):this.emitter.on(e,t,u),this}},{key:"off",value:function(e,t,i){return e?this.removeEventListener(e,t,i):this.removeAllEventListeners(),this}},{key:"removeAllEventListeners",value:function(){var e;(e=this.emitter)===null||e===void 0||e.removeAllListeners()}},{key:"removeEventListener",value:function(e,t,i){var a;if(!this.emitter)return this;var s=(0,je.Z)(i)?i:i==null?void 0:i.capture;s&&(e+="capture"),t=(0,Be.Z)(t)?t:(a=t)===null||a===void 0?void 0:a.handleEvent;var o=(0,Be.Z)(t)?void 0:t;return this.emitter.off(e,t,o),this}},{key:"emit",value:function(e,t){this.dispatchEvent(new Wv(e,t))}},{key:"dispatchEvent",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=mF.get(this);if(!i){var a;this.document?i=this:this.defaultView?i=this.defaultView:i=(a=this.ownerDocument)===null||a===void 0?void 0:a.defaultView,i&&mF.set(this,i)}if(i){if(e.manager=i.getEventService(),!e.manager)return!1;e.defaultPrevented=!1,e.path?e.path.length=0:e.page=[],t||(e.target=this),e.manager.dispatchEvent(e,e.type,t)}else this.emitter.emit(e.type,e);return!e.defaultPrevented}}])}(),W_=function(r){function n(){var e;Tr(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ws(this,n,[].concat(i)),e.shadow=!1,e.ownerDocument=null,e.isConnected=!1,e.baseURI="",e.childNodes=[],e.nodeType=0,e.nodeName="",e.nodeValue=null,e.parentNode=null,e}return Ys(n,r),Cr(n,[{key:"textContent",get:function(){var t="";this.nodeName===Wr.TEXT&&(t+=this.style.text);var i=Tp(this.childNodes),a;try{for(i.s();!(a=i.n()).done;){var s=a.value;s.nodeName===Wr.TEXT?t+=s.nodeValue:t+=s.textContent}}catch(o){i.e(o)}finally{i.f()}return t},set:function(t){var i=this;this.childNodes.slice().forEach(function(a){i.removeChild(a)}),this.nodeName===Wr.TEXT&&(this.style.text="".concat(t))}},{key:"getRootNode",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this}},{key:"hasChildNodes",value:function(){return this.childNodes.length>0}},{key:"isDefaultNamespace",value:function(t){throw new Error(Jo)}},{key:"lookupNamespaceURI",value:function(t){throw new Error(Jo)}},{key:"lookupPrefix",value:function(t){throw new Error(Jo)}},{key:"normalize",value:function(){throw new Error(Jo)}},{key:"isEqualNode",value:function(t){return this===t}},{key:"isSameNode",value:function(t){return this.isEqualNode(t)}},{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(t){if(t===this)return 0;for(var i=t,a=this,s=[i],o=[a];(l=i.parentNode)!==null&&l!==void 0?l:a.parentNode;){var l;i=i.parentNode?(s.push(i.parentNode),i.parentNode):i,a=a.parentNode?(o.push(a.parentNode),a.parentNode):a}if(i!==a)return n.DOCUMENT_POSITION_DISCONNECTED|n.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|n.DOCUMENT_POSITION_PRECEDING;var u=s.length>o.length?s:o,c=u===s?o:s;if(u[u.length-c.length]===c[0])return u===s?n.DOCUMENT_POSITION_CONTAINED_BY|n.DOCUMENT_POSITION_FOLLOWING:n.DOCUMENT_POSITION_CONTAINS|n.DOCUMENT_POSITION_PRECEDING;for(var d=u.length-c.length,h=c.length-1;h>=0;h--){var f=c[h],v=u[d+h];if(v!==f){var g=f.parentNode.childNodes;return g.indexOf(f)<g.indexOf(v)?c===s?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING:u===s?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING}}return n.DOCUMENT_POSITION_FOLLOWING}},{key:"contain",value:function(t){return this.contains(t)}},{key:"contains",value:function(t){for(var i=t;i&&this!==i;)i=i.parentNode;return!!i}},{key:"getAncestor",value:function(t){for(var i=this;t>0&&i;)i=i.parentNode,t--;return i}},{key:"forEach",value:function(t){for(var i=[this];i.length>0;){var a=i.pop(),s=t(a);if(s===!1)break;for(var o=a.childNodes.length-1;o>=0;o--)i.push(a.childNodes[o])}}}],[{key:"isNode",value:function(t){return!!t.childNodes}}])}(Zae);W_.DOCUMENT_POSITION_DISCONNECTED=1,W_.DOCUMENT_POSITION_PRECEDING=2,W_.DOCUMENT_POSITION_FOLLOWING=4,W_.DOCUMENT_POSITION_CONTAINS=8,W_.DOCUMENT_POSITION_CONTAINED_BY=16,W_.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;var KNe=2048,JNe=null,Xae=function(){function r(){Tr(this,r)}return Cr(r,[{key:"getOrCreateCanvas",value:function(e,t){if(this.canvas)return this.canvas;if(e||ur.offscreenCanvas)this.canvas=e||ur.offscreenCanvas,this.context=this.canvas.getContext("2d",gl({willReadFrequently:!0},t));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",gl({willReadFrequently:!0},t)),(!this.context||!this.context.measureText)&&(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(i){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",gl({willReadFrequently:!0},t))}return this.canvas.width=10,this.canvas.height=10,this.canvas}},{key:"getOrCreateContext",value:function(e,t){return this.context?this.context:(this.getOrCreateCanvas(e,t),this.context)}}],[{key:"createCanvas",value:function(){try{return new window.OffscreenCanvas(0,0)}catch(e){}try{return document.createElement("canvas")}catch(e){}return null}}])}(),QNe=function(r){return r[r.CAMERA_CHANGED=0]="CAMERA_CHANGED",r[r.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",r[r.NONE=2]="NONE",r}({}),qNe=null,Kae=/\[\s*(.*)=(.*)\s*\]/,Jae=function(){function r(){Tr(this,r)}return Cr(r,[{key:"selectOne",value:function(e,t){var i=this;if(e.startsWith("."))return t.find(function(l){return((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(e))>-1});if(e.startsWith("#"))return t.find(function(l){return l.id===i.getIdOrClassname(e)});if(e.startsWith("[")){var a=this.getAttribute(e),s=a.name,o=a.value;return s?t.find(function(l){return t!==l&&(s==="name"?l.name===o:i.attributeToString(l,s)===o)}):null}return t.find(function(l){return t!==l&&l.nodeName===e})}},{key:"selectAll",value:function(e,t){var i=this;if(e.startsWith("."))return t.findAll(function(l){return t!==l&&((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(e))>-1});if(e.startsWith("#"))return t.findAll(function(l){return t!==l&&l.id===i.getIdOrClassname(e)});if(e.startsWith("[")){var a=this.getAttribute(e),s=a.name,o=a.value;return s?t.findAll(function(l){return t!==l&&(s==="name"?l.name===o:i.attributeToString(l,s)===o)}):[]}return t.findAll(function(l){return t!==l&&l.nodeName===e})}},{key:"is",value:function(e,t){if(e.startsWith("."))return t.className===this.getIdOrClassname(e);if(e.startsWith("#"))return t.id===this.getIdOrClassname(e);if(e.startsWith("[")){var i=this.getAttribute(e),a=i.name,s=i.value;return a==="name"?t.name===s:this.attributeToString(t,a)===s}return t.nodeName===e}},{key:"getIdOrClassname",value:function(e){return e.substring(1)}},{key:"getAttribute",value:function(e){var t=e.match(Kae),i="",a="";return t&&t.length>2&&(i=t[1].replace(/"/g,""),a=t[2].replace(/"/g,"")),{name:i,value:a}}},{key:"attributeToString",value:function(e,t){if(!e.getAttribute)return"";var i=e.getAttribute(t);return(0,xe.Z)(i)?"":i.toString?i.toString():""}}])}(),Eu=function(r){return r.REPARENT="reparent",r.DESTROY="destroy",r.ATTR_MODIFIED="DOMAttrModified",r.INSERTED="DOMNodeInserted",r.REMOVED="removed",r.MOUNTED="DOMNodeInsertedIntoDocument",r.UNMOUNTED="DOMNodeRemovedFromDocument",r.BOUNDS_CHANGED="bounds-changed",r.CULLED="culled",r}({}),lv=function(r){function n(e,t,i,a,s,o,l,u){var c;return Tr(this,n),c=Ws(this,n,[null]),c.relatedNode=t,c.prevValue=i,c.newValue=a,c.attrName=s,c.attrChange=o,c.prevParsedValue=l,c.newParsedValue=u,c.type=e,c}return Ys(n,r),Cr(n)}(zC);lv.ADDITION=2,lv.MODIFICATION=1,lv.REMOVAL=3;function pF(r){var n=r.renderable;n&&(n.renderBoundsDirty=!0,n.boundsDirty=!0)}var Qae=new lv(Eu.REPARENT,null,"","","",0,"",""),qae=ot.Ue(),pb=E.Ue(),ese=E.al(1,1,1),tse=L.create(),nse=ot.Ue(),Rg=E.Ue(),Rp=L.create(),Ag=X.Ue(),rse=E.Ue(),ise=X.Ue(),ase=E.Ue(),Gy=E.Ue(),Y_=E.Ue(),yb=L.create(),yF=X.Ue(),xF=X.Ue(),xb=X.Ue(),VC={affectChildren:!0},sse=function(){function r(n){Tr(this,r),this.pendingEvents=new Map,this.boundsChangedEvent=new Wv(Eu.BOUNDS_CHANGED),this.displayObjectDependencyMap=new WeakMap,this.runtime=n}return Cr(r,[{key:"matches",value:function(e,t){return this.runtime.sceneGraphSelector.is(e,t)}},{key:"querySelector",value:function(e,t){return this.runtime.sceneGraphSelector.selectOne(e,t)}},{key:"querySelectorAll",value:function(e,t){return this.runtime.sceneGraphSelector.selectAll(e,t)}},{key:"attach",value:function(e,t,i){var a,s=!1;e.parentNode&&(s=e.parentNode!==t,this.detach(e));var o=e.nodeName===Wr.FRAGMENT,l=$C(t);e.parentNode=t;var u=o?e.childNodes:[e];(0,pe.Z)(i)?u.forEach(function(f){t.childNodes.splice(i,0,f),f.parentNode=t}):u.forEach(function(f){t.childNodes.push(f),f.parentNode=t});var c=t,d=c.sortable;if((d!=null&&(a=d.sorted)!==null&&a!==void 0&&a.length||e.parsedStyle.zIndex)&&(d.dirtyChildren.indexOf(e)===-1&&d.dirtyChildren.push(e),d.dirty=!0,d.dirtyReason=wC.ADDED),!l){if(o)this.dirtifyFragment(e);else{var h=e.transformable;h&&this.dirtifyWorld(e,h)}s&&e.dispatchEvent(Qae)}}},{key:"detach",value:function(e){if(e.parentNode){var t,i,a=e.transformable,s=e.parentNode,o=s.sortable;(o!=null&&(t=o.sorted)!==null&&t!==void 0&&t.length||(i=e.style)!==null&&i!==void 0&&i.zIndex)&&(o.dirtyChildren.indexOf(e)===-1&&o.dirtyChildren.push(e),o.dirty=!0,o.dirtyReason=wC.REMOVED);var l=e.parentNode.childNodes.indexOf(e);l>-1&&e.parentNode.childNodes.splice(l,1),a&&this.dirtifyWorld(e,a),e.parentNode=null}}},{key:"getOrigin",value:function(e){return e.getGeometryBounds(),e.transformable.origin}},{key:"setOrigin",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=[t,i,a]);var s=e.transformable;if(!(t[0]===s.origin[0]&&t[1]===s.origin[1]&&t[2]===s.origin[2])){var o=s.origin;o[0]=t[0],o[1]=t[1],o[2]=t[2]||0,this.dirtifyLocal(e,s)}}},{key:"rotate",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;if(e.parentNode===null||!e.parentNode.transformable)this.rotateLocal(e,t);else{var o=Ag;X.Su(o,t[0],t[1],t[2]);var l=this.getRotation(e),u=this.getRotation(e.parentNode);X.JG(xb,u),X.U_(xb,xb),X.Jp(o,xb,o),X.Jp(s.localRotation,o,l),X.Fv(s.localRotation,s.localRotation),this.dirtifyLocal(e,s)}}},{key:"rotateLocal",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;X.Su(xF,t[0],t[1],t[2]),X.dC(s.localRotation,s.localRotation,xF),this.dirtifyLocal(e,s)}},{key:"setEulerAngles",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;if(e.parentNode===null||!e.parentNode.transformable)this.setLocalEulerAngles(e,t);else{X.Su(s.localRotation,t[0],t[1],t[2]);var o=this.getRotation(e.parentNode);X.JG(yF,X.U_(Ag,o)),X.dC(s.localRotation,s.localRotation,yF),this.dirtifyLocal(e,s)}}},{key:"setLocalEulerAngles",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;typeof t=="number"&&(t=E.al(t,i,a));var o=e.transformable;X.Su(o.localRotation,t[0],t[1],t[2]),s&&this.dirtifyLocal(e,o)}},{key:"translateLocal",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;E.fS(t,pb)||(E.VC(t,t,s.localRotation),E.IH(s.localPosition,s.localPosition,t),this.dirtifyLocal(e,s))}},{key:"setPosition",value:function(e,t){var i,a=e.transformable;if(Y_[0]=t[0],Y_[1]=t[1],Y_[2]=(i=t[2])!==null&&i!==void 0?i:0,!E.fS(this.getPosition(e),Y_)){if(E.JG(a.position,Y_),e.parentNode===null||!e.parentNode.transformable)E.JG(a.localPosition,Y_);else{var s=e.parentNode.transformable;L.copy(yb,s.worldTransform),L.invert(yb,yb),E.fF(a.localPosition,Y_,yb)}this.dirtifyLocal(e,a)}}},{key:"setLocalPosition",value:function(e,t){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=e.transformable;Gy[0]=t[0],Gy[1]=t[1],Gy[2]=(i=t[2])!==null&&i!==void 0?i:0,!E.fS(s.localPosition,Gy)&&(E.JG(s.localPosition,Gy),a&&this.dirtifyLocal(e,s))}},{key:"scaleLocal",value:function(e,t){var i,a=e.transformable;E.Jp(a.localScale,a.localScale,E.t8(Rg,t[0],t[1],(i=t[2])!==null&&i!==void 0?i:1)),this.dirtifyLocal(e,a)}},{key:"setLocalScale",value:function(e,t){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=e.transformable;E.t8(Rg,t[0],t[1],(i=t[2])!==null&&i!==void 0?i:s.localScale[2]),!E.fS(Rg,s.localScale)&&(E.JG(s.localScale,Rg),a&&this.dirtifyLocal(e,s))}},{key:"translate",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.t8(Rg,t,i,a)),!E.fS(t,pb)&&(E.IH(Rg,this.getPosition(e),t),this.setPosition(e,Rg))}},{key:"setRotation",value:function(e,t,i,a,s){var o=e.transformable;if(typeof t=="number"&&(t=X.al(t,i,a,s)),e.parentNode===null||!e.parentNode.transformable)this.setLocalRotation(e,t);else{var l=this.getRotation(e.parentNode);X.JG(Ag,l),X.U_(Ag,Ag),X.Jp(o.localRotation,Ag,t),X.Fv(o.localRotation,o.localRotation),this.dirtifyLocal(e,o)}}},{key:"setLocalRotation",value:function(e,t,i,a,s){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;typeof t=="number"&&(t=X.t8(Ag,t,i,a,s));var l=e.transformable;X.JG(l.localRotation,t),o&&this.dirtifyLocal(e,l)}},{key:"setLocalSkew",value:function(e,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;typeof t=="number"&&(t=ot.t8(nse,t,i));var s=e.transformable;ot.JG(s.localSkew,t),a&&this.dirtifyLocal(e,s)}},{key:"dirtifyLocal",value:function(e,t){$C(e)||t.localDirtyFlag||(t.localDirtyFlag=!0,t.dirtyFlag||this.dirtifyWorld(e,t))}},{key:"dirtifyWorld",value:function(e,t){t.dirtyFlag||this.unfreezeParentToRoot(e),this.dirtifyWorldInternal(e,t),this.dirtifyToRoot(e,!0)}},{key:"dirtifyFragment",value:function(e){var t=e.transformable;t&&(t.frozen=!1,t.dirtyFlag=!0,t.localDirtyFlag=!0);var i=e.renderable;i&&(i.renderBoundsDirty=!0,i.boundsDirty=!0,i.dirty=!0);for(var a=e.childNodes.length,s=0;s<a;s++)this.dirtifyFragment(e.childNodes[s]);e.nodeName===Wr.FRAGMENT&&this.pendingEvents.set(e,!1)}},{key:"triggerPendingEvents",value:function(){var e=this,t=new Set,i=function(s,o){!s.isConnected||t.has(s)||s.nodeName===Wr.FRAGMENT||(e.boundsChangedEvent.detail=o,e.boundsChangedEvent.target=s,s.isMutationObserved?s.dispatchEvent(e.boundsChangedEvent):s.ownerDocument.defaultView.dispatchEvent(e.boundsChangedEvent,!0),t.add(s))};this.pendingEvents.forEach(function(a,s){s.nodeName!==Wr.FRAGMENT&&(VC.affectChildren=a,a?s.forEach(function(o){i(o,VC)}):i(s,VC))}),t.clear(),this.clearPendingEvents()}},{key:"clearPendingEvents",value:function(){this.pendingEvents.clear()}},{key:"dirtifyToRoot",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=e;for(i.renderable&&(i.renderable.dirty=!0);i;)pF(i),i=i.parentNode;t&&e.forEach(function(a){pF(a)}),this.informDependentDisplayObjects(e),this.pendingEvents.set(e,t)}},{key:"updateDisplayObjectDependency",value:function(e,t,i,a){if(t&&t!==i){var s=this.displayObjectDependencyMap.get(t);if(s&&s[e]){var o=s[e].indexOf(a);s[e].splice(o,1)}}if(i){var l=this.displayObjectDependencyMap.get(i);l||(this.displayObjectDependencyMap.set(i,{}),l=this.displayObjectDependencyMap.get(i)),l[e]||(l[e]=[]),l[e].push(a)}}},{key:"informDependentDisplayObjects",value:function(e){var t=this,i=this.displayObjectDependencyMap.get(e);i&&Object.keys(i).forEach(function(a){i[a].forEach(function(s){t.dirtifyToRoot(s,!0),s.dispatchEvent(new lv(Eu.ATTR_MODIFIED,s,t,t,a,lv.MODIFICATION,t,t)),s.isCustomElement&&s.isConnected&&s.attributeChangedCallback&&s.attributeChangedCallback(a,t,t)})})}},{key:"getPosition",value:function(e){var t=e.transformable;return L.getTranslation(t.position,this.getWorldTransform(e,t))}},{key:"getRotation",value:function(e){var t=e.transformable;return L.getRotation(t.rotation,this.getWorldTransform(e,t))}},{key:"getScale",value:function(e){var t=e.transformable;return L.getScaling(t.scaling,this.getWorldTransform(e,t))}},{key:"getWorldTransform",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.transformable;return!t.localDirtyFlag&&!t.dirtyFlag||(e.parentNode&&e.parentNode.transformable&&this.getWorldTransform(e.parentNode),this.sync(e,t)),t.worldTransform}},{key:"getLocalPosition",value:function(e){return e.transformable.localPosition}},{key:"getLocalRotation",value:function(e){return e.transformable.localRotation}},{key:"getLocalScale",value:function(e){return e.transformable.localScale}},{key:"getLocalSkew",value:function(e){return e.transformable.localSkew}},{key:"calcLocalTransform",value:function(e){var t=e.localSkew[0]!==0||e.localSkew[1]!==0;if(t){L.fromRotationTranslationScaleOrigin(e.localTransform,e.localRotation,e.localPosition,E.al(1,1,1),e.origin),(e.localSkew[0]!==0||e.localSkew[1]!==0)&&(L.identity(Rp),Rp[4]=Math.tan(e.localSkew[0]),Rp[1]=Math.tan(e.localSkew[1]),L.multiply(e.localTransform,e.localTransform,Rp));var i=L.fromRotationTranslationScaleOrigin(Rp,X.t8(Ag,0,0,0,1),E.t8(Rg,1,1,1),e.localScale,e.origin);L.multiply(e.localTransform,e.localTransform,i)}else{var a=e.localTransform,s=e.localPosition,o=e.localRotation,l=e.localScale,u=e.origin,c=s[0]!==0||s[1]!==0||s[2]!==0,d=o[3]!==1||o[0]!==0||o[1]!==0||o[2]!==0,h=l[0]!==1||l[1]!==1||l[2]!==1,f=u[0]!==0||u[1]!==0||u[2]!==0;!d&&!h&&!f?c?L.fromTranslation(a,s):L.identity(a):L.fromRotationTranslationScaleOrigin(a,o,s,l,u)}}},{key:"getLocalTransform",value:function(e){var t=e.transformable;return t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.localTransform}},{key:"setLocalTransform",value:function(e,t){var i=L.getTranslation(rse,t),a=L.getRotation(ise,t),s=L.getScaling(ase,t);this.setLocalScale(e,s,!1),this.setLocalPosition(e,i,!1),this.setLocalRotation(e,a,void 0,void 0,void 0,!1),this.dirtifyLocal(e,e.transformable)}},{key:"resetLocalTransform",value:function(e){this.setLocalScale(e,ese,!1),this.setLocalPosition(e,pb,!1),this.setLocalEulerAngles(e,pb,void 0,void 0,!1),this.setLocalSkew(e,qae,void 0,!1),this.dirtifyLocal(e,e.transformable)}},{key:"getTransformedGeometryBounds",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2?arguments[2]:void 0,a=this.getGeometryBounds(e,t);if(!Wc.isEmpty(a)){var s=i||new Wc;return s.setFromTransformedAABB(a,this.getWorldTransform(e)),s}return null}},{key:"getGeometryBounds",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=e,a=i.geometry;a.dirty&&ur.styleValueRegistry.updateGeometry(e);var s=t?a.renderBounds:a.contentBounds||null;return s||new Wc}},{key:"getBounds",value:function(e){var t=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=e,s=a.renderable;if(!s.boundsDirty&&!i&&s.bounds)return s.bounds;if(!s.renderBoundsDirty&&i&&s.renderBounds)return s.renderBounds;var o=i?s.renderBounds:s.bounds,l=this.getTransformedGeometryBounds(e,i,o),u=e.childNodes;if(u.forEach(function(h){var f=t.getBounds(h,i);f&&(l?l.add(f):(l=o||new Wc,l.update(f.center,f.halfExtents)))}),l||(l=new Wc),i){var c=hae(e);if(c){var d=c.parsedStyle.clipPath.getBounds(i);l?d&&(l=d.intersection(l)):l.update(d.center,d.halfExtents)}}return i?(s.renderBounds=l,s.renderBoundsDirty=!1):(s.bounds=l,s.boundsDirty=!1),l}},{key:"getLocalBounds",value:function(e){if(e.parentNode){var t=tse;e.parentNode.transformable&&(t=L.invert(Rp,this.getWorldTransform(e.parentNode)));var i=this.getBounds(e);if(!Wc.isEmpty(i)){var a=new Wc;return a.setFromTransformedAABB(i,t),a}}return this.getBounds(e)}},{key:"getBoundingClientRect",value:function(e){var t,i,a=this.getGeometryBounds(e);Wc.isEmpty(a)||(i=new Wc,i.setFromTransformedAABB(a,this.getWorldTransform(e)));var s=(t=e.ownerDocument)===null||t===void 0||(t=t.defaultView)===null||t===void 0?void 0:t.getContextService().getBoundingClientRect();if(i){var o=i.getMin(),l=Ko(o,2),u=l[0],c=l[1],d=i.getMax(),h=Ko(d,2),f=h[0],v=h[1];return new Pp(u+((s==null?void 0:s.left)||0),c+((s==null?void 0:s.top)||0),f-u,v-c)}return new Pp((s==null?void 0:s.left)||0,(s==null?void 0:s.top)||0,0,0)}},{key:"dirtifyWorldInternal",value:function(e,t){var i=this;if(!t.dirtyFlag){t.dirtyFlag=!0,t.frozen=!1,e.childNodes.forEach(function(o){var l=o.transformable;l.dirtyFlag||i.dirtifyWorldInternal(o,l)});var a=e,s=a.renderable;s&&(s.renderBoundsDirty=!0,s.boundsDirty=!0,s.dirty=!0)}}},{key:"syncHierarchy",value:function(e){var t=e.transformable;if(!t.frozen){t.frozen=!0,(t.localDirtyFlag||t.dirtyFlag)&&this.sync(e,t);for(var i=e.childNodes,a=0;a<i.length;a++)this.syncHierarchy(i[a])}}},{key:"sync",value:function(e,t){if(t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.dirtyFlag){var i=e.parentNode,a=i&&i.transformable;i===null||!a?L.copy(t.worldTransform,t.localTransform):L.multiply(t.worldTransform,a.worldTransform,t.localTransform),t.dirtyFlag=!1}}},{key:"unfreezeParentToRoot",value:function(e){for(var t=e.parentNode;t;){var i=t.transformable;i&&(i.frozen=!1),t=t.parentNode}}}])}(),Z_={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]},EF=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,ose=/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/,lse=/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/,use=/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/,cse=/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/,dse=/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/,hse=/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/,fse=/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/,vse=/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/,gse=new RegExp("".concat(ose.source,"|").concat(use.source,"|").concat(dse.source,"|").concat(fse.source)),_se=new RegExp("".concat(lse.source,"|").concat(cse.source,"|").concat(hse.source,"|").concat(vse.source)),mse=function(){function r(n){var e=this;Tr(this,r),this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,i){return e.isBreakingSpace(i)?!1:!!(t&&(_se.exec(i)||gse.exec(t)))},this.trimByKinsokuShorui=function(t){var i=Al(t),a=i[i.length-2];if(!a)return t;var s=a[a.length-1];return i[i.length-2]=a.slice(0,-1),i[i.length-1]=s+i[i.length-1],i},this.runtime=n}return Cr(r,[{key:"measureFont",value:function(e,t){if(this.fontMetricsCache[e])return this.fontMetricsCache[e];var i={ascent:0,descent:0,fontSize:0},a=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(t),s=this.runtime.offscreenCanvasCreator.getOrCreateContext(t,{willReadFrequently:!0});s.font=e;var o=Z_.MetricsString+Z_.BaselineSymbol,l=Math.ceil(s.measureText(o).width),u=Math.ceil(s.measureText(Z_.BaselineSymbol).width),c=Z_.HeightMultiplier*u;u=u*Z_.BaselineMultiplier|0,a.width=l,a.height=c,s.fillStyle="#f00",s.fillRect(0,0,l,c),s.font=e,s.textBaseline="alphabetic",s.fillStyle="#000",s.fillText(o,0,u);var d=s.getImageData(0,0,l||1,c||1).data,h=d.length,f=l*4,v=0,g=0,m=!1;for(v=0;v<u;++v){for(var y=0;y<f;y+=4)if(d[g+y]!==255){m=!0;break}if(!m)g+=f;else break}for(i.ascent=u-v,g=h-f,m=!1,v=c;v>u;--v){for(var w=0;w<f;w+=4)if(d[g+w]!==255){m=!0;break}if(!m)g-=f;else break}return i.descent=v-u,i.fontSize=i.ascent+i.descent,this.fontMetricsCache[e]=i,i}},{key:"measureText",value:function(e,t,i){var a=t.fontSize,s=a===void 0?16:a,o=t.wordWrap,l=o===void 0?!1:o,u=t.lineHeight,c=t.lineWidth,d=c===void 0?1:c,h=t.textBaseline,f=h===void 0?"alphabetic":h,v=t.textAlign,g=v===void 0?"start":v,m=t.letterSpacing,y=m===void 0?0:m,w=t.textPath;t.textPathSide,t.textPathStartOffset;var T=t.leading,G=T===void 0?0:T,x=Mae(t),_=this.measureFont(x,i);_.fontSize===0&&(_.fontSize=s,_.ascent=s);var p=this.runtime.offscreenCanvasCreator.getOrCreateContext(i);p.font=x,t.isOverflowing=!1;var b=l?this.wordWrap(e,t,i):e,R=b.split(/(?:\r\n|\r|\n)/),B=new Array(R.length),j=0;if(w){w.getTotalLength();for(var Z=0;Z<R.length;Z++)p.measureText(R[Z]).width+(R[Z].length-1)*y}else{for(var te=0;te<R.length;te++){var le=p.measureText(R[te]).width+(R[te].length-1)*y;B[te]=le,j=Math.max(j,le)}var ue=j+d,se=u||_.fontSize+d,V=Math.max(se,_.fontSize+d)+(R.length-1)*(se+G);se+=G;var ee=0;return f==="middle"?ee=-V/2:f==="bottom"||f==="alphabetic"||f==="ideographic"?ee=-V:(f==="top"||f==="hanging")&&(ee=0),{font:x,width:ue,height:V,lines:R,lineWidths:B,lineHeight:se,maxLineWidth:j,fontProperties:_,lineMetrics:B.map(function(he,ut){var ct=0;return g==="center"||g==="middle"?ct-=he/2:(g==="right"||g==="end")&&(ct-=he),new Pp(ct-d/2,ee+ut*se,he+d,se)})}}}},{key:"wordWrap",value:function(e,t,i){var a=this,s=t.wordWrapWidth,o=s===void 0?0:s,l=t.letterSpacing,u=l===void 0?0:l,c=t.maxLines,d=c===void 0?1/0:c,h=t.textOverflow,f=this.runtime.offscreenCanvasCreator.getOrCreateContext(i),v=o+u,g="";h==="ellipsis"?g="...":h&&h!=="clip"&&(g=h);var m=[],y=0,w=0,T={},G=function(le){return a.getFromCache(le,u,T,f)},x=Array.from(g).reduce(function(te,le){return te+G(le)},0);function _(te){if(!(x<=0||x>v)){for(var le=m[te].length,ue=0,se=le,V=0;V<le;V++){var ee=G(m[te][V]);if(ue+ee+x>v){se=V;break}ue+=ee}m[te]=(m[te]||"").slice(0,se)+g}}for(var p=Array.from(e),b=0;b<p.length;b++){var R=p[b],B=e[b-1],j=e[b+1],Z=G(R);if(this.isNewline(R)){if(y++,y>=d){t.isOverflowing=!0,b<p.length-1&&_(y-1);break}w=0,m[y]="";continue}if(w>0&&w+Z>v){if(y+1>=d){t.isOverflowing=!0,_(y);break}if(y++,w=0,m[y]="",this.isBreakingSpace(R))continue;this.canBreakInLastChar(R)||(m=this.trimToBreakable(m),w=this.sumTextWidthByCache(m[y]||"",T)),this.shouldBreakByKinsokuShorui(R,j)&&(m=this.trimByKinsokuShorui(m),w+=G(B||""))}w+=Z,m[y]=(m[y]||"")+R}return m.join(`
|
|
|
`)}},{key:"isBreakingSpace",value:function(e){return typeof e!="string"?!1:Z_.BreakingSpaces.indexOf(e.charCodeAt(0))>=0}},{key:"isNewline",value:function(e){return typeof e!="string"?!1:Z_.Newlines.indexOf(e.charCodeAt(0))>=0}},{key:"trimToBreakable",value:function(e){var t=Al(e),i=t[t.length-2],a=this.findBreakableIndex(i);if(a===-1||!i)return t;var s=i.slice(a,a+1),o=this.isBreakingSpace(s),l=a+1,u=a+(o?0:1);return t[t.length-1]+=i.slice(l,i.length),t[t.length-2]=i.slice(0,u),t}},{key:"canBreakInLastChar",value:function(e){return!(e&&EF.test(e))}},{key:"sumTextWidthByCache",value:function(e,t){return e.split("").reduce(function(i,a){if(!t[a])throw Error("cannot count the word without cache");return i+t[a]},0)}},{key:"findBreakableIndex",value:function(e){for(var t=e.length-1;t>=0;t--)if(!EF.test(e[t]))return t;return-1}},{key:"getFromCache",value:function(e,t,i,a){var s=i[e];if(typeof s!="number"){var o=e.length*t;s=a.measureText(e).width+o,i[e]=s}return s}}])}(),ur={},pse=function(r){var n=new Vae,e=new zae;return r={},_a(_a(_a(_a(_a(_a(_a(_a(_a(_a(r,Wr.FRAGMENT,null),Wr.CIRCLE,new Fae),Wr.ELLIPSE,new Bae),Wr.RECT,n),Wr.IMAGE,n),Wr.GROUP,new jae),Wr.LINE,new $ae),Wr.TEXT,new Uae(ur)),Wr.POLYLINE,e),Wr.POLYGON,e),_a(_a(_a(r,Wr.PATH,new Gae),Wr.HTML,new Hae),Wr.MESH,null)}(),yse=function(r){var n=new Qie,e=new FC;return r={},_a(_a(_a(_a(_a(_a(_a(_a(_a(_a(r,Hn.PERCENTAGE,null),Hn.NUMBER,new rae),Hn.ANGLE,new Kie),Hn.DEFINED_PATH,new Jie),Hn.PAINT,n),Hn.COLOR,n),Hn.FILTER,new qie),Hn.LENGTH,e),Hn.LENGTH_PERCENTAGE,e),Hn.LENGTH_PERCENTAGE_12,new eae),_a(_a(_a(_a(_a(_a(_a(_a(_a(_a(r,Hn.LENGTH_PERCENTAGE_14,new tae),Hn.COORDINATE,new FC),Hn.OFFSET_DISTANCE,new iae),Hn.OPACITY_VALUE,new aae),Hn.PATH,new sae),Hn.LIST_OF_POINTS,new oae),Hn.SHADOW_BLUR,new lae),Hn.TEXT,new uae),Hn.TEXT_TRANSFORM,new cae),Hn.TRANSFORM,new Lae),_a(_a(_a(r,Hn.TRANSFORM_ORIGIN,new Iae),Hn.Z_INDEX,new Dae),Hn.MARKER,new nae)}(),xse=function(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof k.g!="undefined"?k.g:{}};ur.CameraContribution=Fre,ur.AnimationTimeline=null,ur.EasingFunction=null,ur.offscreenCanvasCreator=new Xae,ur.sceneGraphSelector=new Jae,ur.sceneGraphService=new sse(ur),ur.textService=new mse(ur),ur.geometryUpdaterFactory=pse,ur.CSSPropertySyntaxFactory=yse,ur.styleValueRegistry=new Zie(ur),ur.layoutRegistry=null,ur.globalThis=xse(),ur.enableStyleSyntax=!0,ur.enableSizeAttenuation=!1;var bF=0;function eOe(){bF=0}var kF=new lv(Eu.INSERTED,null,"","","",0,"",""),wF=new lv(Eu.REMOVED,null,"","","",0,"",""),Ese=new Wv(Eu.DESTROY),bse=function(r){function n(){var e;Tr(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ws(this,n,[].concat(i)),e.entity=bF++,e.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},e.cullable={strategy:Bre.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},e.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:[0,0,0],localRotation:[0,0,0,1],localScale:[1,1,1],localTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],localSkew:[0,0],position:[0,0,0],rotation:[0,0,0,1],scaling:[1,1,1],worldTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],origin:[0,0,0]},e.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},e.geometry={contentBounds:void 0,renderBounds:void 0,dirty:!0},e.rBushNode={aabb:void 0},e.namespaceURI="g",e.scrollLeft=0,e.scrollTop=0,e.clientTop=0,e.clientLeft=0,e.destroyed=!1,e.style={},e.computedStyle={},e.parsedStyle={},e.attributes={},e}return Ys(n,r),Cr(n,[{key:"className",get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(t){return t!==""})}},{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 t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t+1]||null}return null}},{key:"previousSibling",get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t-1]||null}return null}},{key:"cloneNode",value:function(t){throw new Error(Jo)}},{key:"appendChild",value:function(t,i){var a;if(t.destroyed)throw new Error(wre);return ur.sceneGraphService.attach(t,this,i),(a=this.ownerDocument)!==null&&a!==void 0&&a.defaultView&&(!$C(this)&&t.nodeName===Wr.FRAGMENT?this.ownerDocument.defaultView.mountFragment(t):this.ownerDocument.defaultView.mountChildren(t)),this.isMutationObserved&&(kF.relatedNode=this,t.dispatchEvent(kF)),t}},{key:"insertBefore",value:function(t,i){if(!i)this.appendChild(t);else{t.parentElement&&t.parentElement.removeChild(t);var a=this.childNodes.indexOf(i);a===-1?this.appendChild(t):this.appendChild(t,a)}return t}},{key:"replaceChild",value:function(t,i){var a=this.childNodes.indexOf(i);return this.removeChild(i),this.appendChild(t,a),i}},{key:"removeChild",value:function(t){var i;return wF.relatedNode=this,t.dispatchEvent(wF),(i=t.ownerDocument)!==null&&i!==void 0&&i.defaultView&&t.ownerDocument.defaultView.unmountChildren(t),ur.sceneGraphService.detach(t),t}},{key:"removeChildren",value:function(){for(var t=this.childNodes.length-1;t>=0;t--){var i=this.childNodes[t];this.removeChild(i)}}},{key:"destroyChildren",value:function(){for(var t=this.childNodes.length-1;t>=0;t--){var i=this.childNodes[t];i.childNodes.length>0&&i.destroyChildren(),i.destroy()}}},{key:"matches",value:function(t){return ur.sceneGraphService.matches(t,this)}},{key:"getElementById",value:function(t){return ur.sceneGraphService.querySelector("#".concat(t),this)}},{key:"getElementsByName",value:function(t){return ur.sceneGraphService.querySelectorAll('[name="'.concat(t,'"]'),this)}},{key:"getElementsByClassName",value:function(t){return ur.sceneGraphService.querySelectorAll(".".concat(t),this)}},{key:"getElementsByTagName",value:function(t){return ur.sceneGraphService.querySelectorAll(t,this)}},{key:"querySelector",value:function(t){return ur.sceneGraphService.querySelector(t,this)}},{key:"querySelectorAll",value:function(t){return ur.sceneGraphService.querySelectorAll(t,this)}},{key:"closest",value:function(t){var i=this;do{if(ur.sceneGraphService.matches(t,i))return i;i=i.parentElement}while(i!==null);return null}},{key:"find",value:function(t){var i=this,a=null;return this.forEach(function(s){return s!==i&&t(s)?(a=s,!1):!0}),a}},{key:"findAll",value:function(t){var i=this,a=[];return this.forEach(function(s){s!==i&&t(s)&&a.push(s)}),a}},{key:"after",value:function(){var t=this;if(this.parentNode){for(var i=this.parentNode.childNodes.indexOf(this),a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];s.forEach(function(l,u){var c;return(c=t.parentNode)===null||c===void 0?void 0:c.appendChild(l,i+u+1)})}}},{key:"before",value:function(){if(this.parentNode){for(var t,i=this.parentNode.childNodes.indexOf(this),a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];var l=s[0],u=s.slice(1);this.parentNode.appendChild(l,i),(t=l).after.apply(t,Al(u))}}},{key:"replaceWith",value:function(){this.after.apply(this,arguments),this.remove()}},{key:"append",value:function(){for(var t=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];a.forEach(function(o){return t.appendChild(o)})}},{key:"prepend",value:function(){for(var t=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];a.forEach(function(o,l){return t.appendChild(o,l)})}},{key:"replaceChildren",value:function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)}},{key:"remove",value:function(){return this.parentNode?this.parentNode.removeChild(this):this}},{key:"destroy",value:function(){this.destroyChildren(),this.dispatchEvent(Ese),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0}},{key:"getGeometryBounds",value:function(){return ur.sceneGraphService.getGeometryBounds(this)}},{key:"getRenderBounds",value:function(){return ur.sceneGraphService.getBounds(this,!0)}},{key:"getBounds",value:function(){return ur.sceneGraphService.getBounds(this)}},{key:"getLocalBounds",value:function(){return ur.sceneGraphService.getLocalBounds(this)}},{key:"getBoundingClientRect",value:function(){return ur.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(t){if(typeof t!="symbol"){var i=this.attributes[t];return i}}},{key:"hasAttribute",value:function(t){return this.getAttributeNames().includes(t)}},{key:"hasAttributes",value:function(){return!!this.getAttributeNames().length}},{key:"removeAttribute",value:function(t){this.setAttribute(t,null),delete this.attributes[t]}},{key:"setAttribute",value:function(t,i,a,s){this.attributes[t]=i}},{key:"getAttributeNS",value:function(t,i){throw new Error(Jo)}},{key:"getAttributeNode",value:function(t){throw new Error(Jo)}},{key:"getAttributeNodeNS",value:function(t,i){throw new Error(Jo)}},{key:"hasAttributeNS",value:function(t,i){throw new Error(Jo)}},{key:"removeAttributeNS",value:function(t,i){throw new Error(Jo)}},{key:"removeAttributeNode",value:function(t){throw new Error(Jo)}},{key:"setAttributeNS",value:function(t,i,a){throw new Error(Jo)}},{key:"setAttributeNode",value:function(t){throw new Error(Jo)}},{key:"setAttributeNodeNS",value:function(t){throw new Error(Jo)}},{key:"toggleAttribute",value:function(t,i){throw new Error(Jo)}}])}(W_);function Xs(r){return!!(r!=null&&r.nodeName)}var kse=ur.globalThis.Proxy?ur.globalThis.Proxy:function(){},Yv=new lv(Eu.ATTR_MODIFIED,null,null,null,null,lv.MODIFICATION,null,null),zy=E.Ue(),wse=X.Ue(),Zl=function(r){function n(e){var t;return Tr(this,n),t=Ws(this,n),t.isCustomElement=!1,t.isMutationObserved=!1,t.activeAnimations=[],t.config=e,t.id=e.id||"",t.name=e.name||"",(e.className||e.class)&&(t.className=e.className||e.class),t.nodeName=e.type||Wr.GROUP,e.initialParsedStyle&&Object.assign(t.parsedStyle,e.initialParsedStyle),t.initAttributes(e.style),ur.enableStyleSyntax&&(t.style=new kse({setProperty:function(a,s){t.setAttribute(a,s)},getPropertyValue:function(a){return t.getAttribute(a)},removeProperty:function(a){t.removeAttribute(a)},item:function(){return""}},{get:function(a,s){return a[s]!==void 0?a[s]:t.getAttribute(s)},set:function(a,s,o){return t.setAttribute(s,o),!0}})),t}return Ys(n,r),Cr(n,[{key:"destroy",value:function(){_3(n,"destroy",this,3)([]),this.getAnimations().forEach(function(t){t.cancel()})}},{key:"cloneNode",value:function(t,i){var a=gl({},this.attributes);for(var s in a){var o=a[s];Xs(o)&&s!=="clipPath"&&s!=="offsetPath"&&s!=="textPath"&&(a[s]=o.cloneNode(t)),i&&(a[s]=i(s,o))}var l=new this.constructor(gl(gl({},this.config),{},{style:a}));return l.setLocalTransform(this.getLocalTransform()),t&&this.children.forEach(function(u){if(!u.style.isMarker){var c=u.cloneNode(t);l.appendChild(c)}}),l}},{key:"initAttributes",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i={forceUpdateGeometry:!0};ur.styleValueRegistry.processProperties(this,t,i),this.renderable.dirty=!0}},{key:"setAttribute",value:function(t,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;(0,ie.Z)(i)||(a||i!==this.attributes[t])&&(this.internalSetAttribute(t,i,{memoize:s}),_3(n,"setAttribute",this,3)([t,i]))}},{key:"internalSetAttribute",value:function(t,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=this.renderable,o=this.attributes[t],l=this.parsedStyle[t];ur.styleValueRegistry.processProperties(this,_a({},t,i),a),s.dirty=!0;var u=this.parsedStyle[t];if(this.isConnected&&(Yv.relatedNode=this,Yv.prevValue=o,Yv.newValue=i,Yv.attrName=t,Yv.prevParsedValue=l,Yv.newParsedValue=u,this.isMutationObserved?this.dispatchEvent(Yv):(Yv.target=this,this.ownerDocument.defaultView.dispatchEvent(Yv,!0))),this.isCustomElement&&this.isConnected||!this.isCustomElement){var c,d;(c=(d=this).attributeChangedCallback)===null||c===void 0||c.call(d,t,o,i,l,u)}}},{key:"getBBox",value:function(){var t=this.getBounds(),i=t.getMin(),a=Ko(i,2),s=a[0],o=a[1],l=t.getMax(),u=Ko(l,2),c=u[0],d=u[1];return new Pp(s,o,c-s,d-o)}},{key:"setOrigin",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return ur.sceneGraphService.setOrigin(this,Yc(t,i,a,!1)),this}},{key:"getOrigin",value:function(){return ur.sceneGraphService.getOrigin(this)}},{key:"setPosition",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return ur.sceneGraphService.setPosition(this,Yc(t,i,a,!1)),this}},{key:"setLocalPosition",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return ur.sceneGraphService.setLocalPosition(this,Yc(t,i,a,!1)),this}},{key:"translate",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return ur.sceneGraphService.translate(this,Yc(t,i,a,!1)),this}},{key:"translateLocal",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return ur.sceneGraphService.translateLocal(this,Yc(t,i,a,!1)),this}},{key:"getPosition",value:function(){return ur.sceneGraphService.getPosition(this)}},{key:"getLocalPosition",value:function(){return ur.sceneGraphService.getLocalPosition(this)}},{key:"scale",value:function(t,i,a){return this.scaleLocal(t,i,a)}},{key:"scaleLocal",value:function(t,i,a){return typeof t=="number"&&(i=i||t,a=a||t,t=Yc(t,i,a,!1)),ur.sceneGraphService.scaleLocal(this,t),this}},{key:"setLocalScale",value:function(t,i,a){return typeof t=="number"&&(i=i||t,a=a||t,t=Yc(t,i,a,!1)),ur.sceneGraphService.setLocalScale(this,t),this}},{key:"getLocalScale",value:function(){return ur.sceneGraphService.getLocalScale(this)}},{key:"getScale",value:function(){return ur.sceneGraphService.getScale(this)}},{key:"getEulerAngles",value:function(){var t=bC(zy,ur.sceneGraphService.getWorldTransform(this)),i=Ko(t,3),a=i[2];return ah(a)}},{key:"getLocalEulerAngles",value:function(){var t=bC(zy,ur.sceneGraphService.getLocalRotation(this)),i=Ko(t,3),a=i[2];return ah(a)}},{key:"setEulerAngles",value:function(t){return ur.sceneGraphService.setEulerAngles(this,0,0,t),this}},{key:"setLocalEulerAngles",value:function(t){return ur.sceneGraphService.setLocalEulerAngles(this,0,0,t),this}},{key:"rotateLocal",value:function(t,i,a){return(0,xe.Z)(i)&&(0,xe.Z)(a)?ur.sceneGraphService.rotateLocal(this,0,0,t):ur.sceneGraphService.rotateLocal(this,t,i,a),this}},{key:"rotate",value:function(t,i,a){return(0,xe.Z)(i)&&(0,xe.Z)(a)?ur.sceneGraphService.rotate(this,0,0,t):ur.sceneGraphService.rotate(this,t,i,a),this}},{key:"setRotation",value:function(t,i,a,s){return ur.sceneGraphService.setRotation(this,t,i,a,s),this}},{key:"setLocalRotation",value:function(t,i,a,s){return ur.sceneGraphService.setLocalRotation(this,t,i,a,s),this}},{key:"setLocalSkew",value:function(t,i){return ur.sceneGraphService.setLocalSkew(this,t,i),this}},{key:"getRotation",value:function(){return ur.sceneGraphService.getRotation(this)}},{key:"getLocalRotation",value:function(){return ur.sceneGraphService.getLocalRotation(this)}},{key:"getLocalSkew",value:function(){return ur.sceneGraphService.getLocalSkew(this)}},{key:"getLocalTransform",value:function(){return ur.sceneGraphService.getLocalTransform(this)}},{key:"getWorldTransform",value:function(){return ur.sceneGraphService.getWorldTransform(this)}},{key:"setLocalTransform",value:function(t){return ur.sceneGraphService.setLocalTransform(this,t),this}},{key:"resetLocalTransform",value:function(){ur.sceneGraphService.resetLocalTransform(this)}},{key:"getAnimations",value:function(){return this.activeAnimations}},{key:"animate",value:function(t,i){var a,s=(a=this.ownerDocument)===null||a===void 0?void 0:a.timeline;return s?s.play(this,t,i):null}},{key:"isVisible",value:function(){var t;return((t=this.parsedStyle)===null||t===void 0?void 0:t.visibility)!=="hidden"}},{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}},{key:"isInteractive",value:function(){var t;return((t=this.parsedStyle)===null||t===void 0?void 0:t.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,Al(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})))+1),this}},{key:"toBack",value:function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,Al(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})))-1),this}},{key:"getConfig",value:function(){return this.config}},{key:"attr",value:function(){for(var t=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var o=a[0],l=a[1];return o?(0,Gs.Z)(o)?(Object.keys(o).forEach(function(u){t.setAttribute(u,o[u])}),this):a.length===2?(this.setAttribute(o,l),this):this.attributes[o]:this.attributes}},{key:"getMatrix",value:function(t){var i=t||this.getWorldTransform(),a=L.getTranslation(zy,i),s=Ko(a,2),o=s[0],l=s[1],u=L.getScaling(zy,i),c=Ko(u,2),d=c[0],h=c[1],f=L.getRotation(wse,i),v=bC(zy,f),g=Ko(v,3),m=g[0],y=g[2];return Ore(m||y,o,l,d,h)}},{key:"getLocalMatrix",value:function(){return this.getMatrix(this.getLocalTransform())}},{key:"setMatrix",value:function(t){var i=P3(t),a=Ko(i,5),s=a[0],o=a[1],l=a[2],u=a[3],c=a[4];this.setEulerAngles(c).setPosition(s,o).setLocalScale(l,u)}},{key:"setLocalMatrix",value:function(t){var i=P3(t),a=Ko(i,5),s=a[0],o=a[1],l=a[2],u=a[3],c=a[4];this.setLocalEulerAngles(c).setLocalPosition(s,o).setLocalScale(l,u)}},{key:"show",value:function(){this.forEach(function(t){t.style.visibility="visible"})}},{key:"hide",value:function(){this.forEach(function(t){t.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(t){return this.children[t]||null}},{key:"add",value:function(t,i){return this.appendChild(t,i)}},{key:"set",value:function(t,i){this.config[t]=i}},{key:"get",value:function(t){return this.config[t]}},{key:"moveTo",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(t,i,a),this}},{key:"move",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(t,i,a),this}},{key:"setZIndex",value:function(t){return this.style.zIndex=t,this}}])}(bse);Zl.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 Sse=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Tr(this,n),Ws(this,n,[gl({type:Wr.CIRCLE},e)])}return Ys(n,r),Cr(n)}(Zl);Sse.PARSED_STYLE_LIST=new Set([].concat(Al(Zl.PARSED_STYLE_LIST),["cx","cy","cz","r","isBillboard","isSizeAttenuation"]));var tOe=null,nOe=null,Tse=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Tr(this,n),Ws(this,n,[gl({type:Wr.ELLIPSE},e)])}return Ys(n,r),Cr(n)}(Zl);Tse.PARSED_STYLE_LIST=new Set([].concat(Al(Zl.PARSED_STYLE_LIST),["cx","cy","cz","rx","ry","isBillboard","isSizeAttenuation"]));var rOe=null,Cse=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Tr(this,n),Ws(this,n,[gl({type:Wr.GROUP},e)])}return Ys(n,r),Cr(n)}(Zl);Cse.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var Mse=["style"],Pse=function(r){function n(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.style,a=Cp(t,Mse);return Tr(this,n),e=Ws(this,n,[gl({type:Wr.HTML,style:i},a)]),e.cullable.enable=!1,e}return Ys(n,r),Cr(n,[{key:"getDomElement",value:function(){return this.parsedStyle.$el}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"getLocalBounds",value:function(){if(this.parentNode){var t=L.invert(L.create(),this.parentNode.getWorldTransform()),i=this.getBounds();if(!Wc.isEmpty(i)){var a=new Wc;return a.setFromTransformedAABB(i,t),a}}return this.getBounds()}}])}(Zl);Pse.PARSED_STYLE_LIST=new Set([].concat(Al(Zl.PARSED_STYLE_LIST),["x","y","$el","innerHTML","width","height"]));var Nse=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Tr(this,n),Ws(this,n,[gl({type:Wr.IMAGE},e)])}return Ys(n,r),Cr(n)}(Zl);Nse.PARSED_STYLE_LIST=new Set([].concat(Al(Zl.PARSED_STYLE_LIST),["x","y","z","src","width","height","isBillboard","billboardRotation","isSizeAttenuation","keepAspectRatio"]));var Ose=["style"],Rse=function(r){function n(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.style,a=Cp(t,Ose);Tr(this,n),e=Ws(this,n,[gl({type:Wr.LINE,style:gl({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},i)},a)]),e.markerStartAngle=0,e.markerEndAngle=0;var s=e.parsedStyle,o=s.markerStart,l=s.markerEnd;return o&&Xs(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),l&&Xs(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return Ys(n,r),Cr(n,[{key:"attributeChangedCallback",value:function(t,i,a,s,o){t==="x1"||t==="y1"||t==="x2"||t==="y2"||t==="markerStartOffset"||t==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):t==="markerStart"?(s&&Xs(s)&&(this.markerStartAngle=0,s.remove()),o&&Xs(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):t==="markerEnd"&&(s&&Xs(s)&&(this.markerEndAngle=0,s.remove()),o&&Xs(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1)))}},{key:"transformMarker",value:function(t){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=i.x1,c=i.x2,d=i.y1,h=i.y2,f=t?a:s;if(!(!f||!Xs(f))){var v=0,g,m,y,w,T,G;t?(y=u,w=d,g=c-u,m=h-d,T=o||0,G=this.markerStartAngle):(y=c,w=h,g=u-c,m=d-h,T=l||0,G=this.markerEndAngle),v=Math.atan2(m,g),f.setLocalEulerAngles(v*180/Math.PI+G),f.setLocalPosition(y+Math.cos(v)*T,w+Math.sin(v)*T)}}},{key:"getPoint",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle,s=a.x1,o=a.y1,l=a.x2,u=a.y2,c=(0,Nt.U4)(s,o,l,u,t),d=c.x,h=c.y,f=E.fF(E.Ue(),E.al(d,h,0),i?this.getWorldTransform():this.getLocalTransform());return new ih(f[0],f[1])}},{key:"getPointAtLength",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(t/this.getTotalLength(),i)}},{key:"getTotalLength",value:function(){var t=this.parsedStyle,i=t.x1,a=t.y1,s=t.x2,o=t.y2;return(0,Nt.Xk)(i,a,s,o)}}])}(Zl);Rse.PARSED_STYLE_LIST=new Set([].concat(Al(Zl.PARSED_STYLE_LIST),["x1","y1","x2","y2","z1","z2","isBillboard","isSizeAttenuation","markerStart","markerEnd","markerStartOffset","markerEndOffset"]));var Ase=["style"],Lse=function(r){function n(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.style,a=Cp(t,Ase);Tr(this,n),e=Ws(this,n,[gl({type:Wr.PATH,style:i,initialParsedStyle:{miterLimit:4,d:gl({},A3)}},a)]),e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[];var s=e.parsedStyle,o=s.markerStart,l=s.markerEnd,u=s.markerMid;return o&&Xs(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),u&&Xs(u)&&e.placeMarkerMid(u),l&&Xs(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return Ys(n,r),Cr(n,[{key:"attributeChangedCallback",value:function(t,i,a,s,o){t==="d"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):t==="markerStartOffset"||t==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):t==="markerStart"?(s&&Xs(s)&&(this.markerStartAngle=0,s.remove()),o&&Xs(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):t==="markerEnd"?(s&&Xs(s)&&(this.markerEndAngle=0,s.remove()),o&&Xs(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1))):t==="markerMid"&&this.placeMarkerMid(o)}},{key:"transformMarker",value:function(t){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=t?a:s;if(!(!u||!Xs(u))){var c=0,d,h,f,v,g,m;if(t){var y=this.getStartTangent(),w=Ko(y,2),T=w[0],G=w[1];f=G[0],v=G[1],d=T[0]-G[0],h=T[1]-G[1],g=o||0,m=this.markerStartAngle}else{var x=this.getEndTangent(),_=Ko(x,2),p=_[0],b=_[1];f=b[0],v=b[1],d=p[0]-b[0],h=p[1]-b[1],g=l||0,m=this.markerEndAngle}c=Math.atan2(h,d),u.setLocalEulerAngles(c*180/Math.PI+m),u.setLocalPosition(f+Math.cos(c)*g,v+Math.sin(c)*g)}}},{key:"placeMarkerMid",value:function(t){var i=this.parsedStyle.d.segments;if(this.markerMidList.forEach(function(c){c.remove()}),t&&Xs(t))for(var a=1;a<i.length-1;a++){var s=Ko(i[a].currentPoint,2),o=s[0],l=s[1],u=a===1?t:t.cloneNode(!0);this.markerMidList.push(u),this.appendChild(u),u.setLocalPosition(o,l)}}},{key:"getTotalLength",value:function(){return Y3(this)}},{key:"getPointAtLength",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle.d.absolutePath,s=(0,jm.r)(a,t),o=s.x,l=s.y,u=E.fF(E.Ue(),E.al(o,l,0),i?this.getWorldTransform():this.getLocalTransform());return new ih(u[0],u[1])}},{key:"getPoint",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPointAtLength(t*Y3(this),i)}},{key:"getStartTangent",value:function(){var t=this.parsedStyle.d.segments,i=[];if(t.length>1){var a=t[0].currentPoint,s=t[1].currentPoint,o=t[1].startTangent;i=[],o?(i.push([a[0]-o[0],a[1]-o[1]]),i.push([a[0],a[1]])):(i.push([s[0],s[1]]),i.push([a[0],a[1]]))}return i}},{key:"getEndTangent",value:function(){var t=this.parsedStyle.d.segments,i=t.length,a=[];if(i>1){var s=t[i-2].currentPoint,o=t[i-1].currentPoint,l=t[i-1].endTangent;a=[],l?(a.push([o[0]-l[0],o[1]-l[1]]),a.push([o[0],o[1]])):(a.push([s[0],s[1]]),a.push([o[0],o[1]]))}return a}}])}(Zl);Lse.PARSED_STYLE_LIST=new Set([].concat(Al(Zl.PARSED_STYLE_LIST),["d","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard","isSizeAttenuation"]));var Ise=["style"],UC=function(r){function n(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.style,a=Cp(t,Ise);Tr(this,n),e=Ws(this,n,[gl({type:Wr.POLYGON,style:i,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},a)]),e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[];var s=e.parsedStyle,o=s.markerStart,l=s.markerEnd,u=s.markerMid;return o&&Xs(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),u&&Xs(u)&&e.placeMarkerMid(u),l&&Xs(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return Ys(n,r),Cr(n,[{key:"attributeChangedCallback",value:function(t,i,a,s,o){t==="points"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):t==="markerStartOffset"||t==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):t==="markerStart"?(s&&Xs(s)&&(this.markerStartAngle=0,s.remove()),o&&Xs(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):t==="markerEnd"?(s&&Xs(s)&&(this.markerEndAngle=0,s.remove()),o&&Xs(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1))):t==="markerMid"&&this.placeMarkerMid(o)}},{key:"transformMarker",value:function(t){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=i.points,c=u||{},d=c.points,h=t?a:s;if(!(!h||!Xs(h)||!d)){var f=0,v,g,m,y,w,T;if(m=d[0][0],y=d[0][1],t)v=d[1][0]-d[0][0],g=d[1][1]-d[0][1],w=o||0,T=this.markerStartAngle;else{var G=d.length;this.parsedStyle.isClosed?(v=d[G-1][0]-d[0][0],g=d[G-1][1]-d[0][1]):(m=d[G-1][0],y=d[G-1][1],v=d[G-2][0]-d[G-1][0],g=d[G-2][1]-d[G-1][1]),w=l||0,T=this.markerEndAngle}f=Math.atan2(g,v),h.setLocalEulerAngles(f*180/Math.PI+T),h.setLocalPosition(m+Math.cos(f)*w,y+Math.sin(f)*w)}}},{key:"placeMarkerMid",value:function(t){var i=this.parsedStyle.points,a=i||{},s=a.points;if(this.markerMidList.forEach(function(d){d.remove()}),this.markerMidList=[],t&&Xs(t)&&s)for(var o=1;o<(this.parsedStyle.isClosed?s.length:s.length-1);o++){var l=s[o][0],u=s[o][1],c=o===1?t:t.cloneNode(!0);this.markerMidList.push(c),this.appendChild(c),c.setLocalPosition(l,u)}}}])}(Zl);UC.PARSED_STYLE_LIST=new Set([].concat(Al(Zl.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isClosed","isBillboard","isSizeAttenuation"]));var Dse=["style"],Fse=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.style,i=Cp(e,Dse);return Tr(this,n),Ws(this,n,[gl({type:Wr.POLYLINE,style:t,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},i)])}return Ys(n,r),Cr(n,[{key:"getTotalLength",value:function(){return yie(this)}},{key:"getPointAtLength",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(t/this.getTotalLength(),i)}},{key:"getPoint",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle.points.points;if(this.parsedStyle.points.segments.length===0){var s=[],o=0,l,u,c=this.getTotalLength();a.forEach(function(y,w){a[w+1]&&(l=[0,0],l[0]=o/c,u=(0,Nt.Xk)(y[0],y[1],a[w+1][0],a[w+1][1]),o+=u,l[1]=o/c,s.push(l))}),this.parsedStyle.points.segments=s}var d=0,h=0;this.parsedStyle.points.segments.forEach(function(y,w){t>=y[0]&&t<=y[1]&&(d=(t-y[0])/(y[1]-y[0]),h=w)});var f=(0,Nt.U4)(a[h][0],a[h][1],a[h+1][0],a[h+1][1],d),v=f.x,g=f.y,m=E.fF(E.Ue(),E.al(v,g,0),i?this.getWorldTransform():this.getLocalTransform());return new ih(m[0],m[1])}},{key:"getStartTangent",value:function(){var t=this.parsedStyle.points.points,i=[];return i.push([t[1][0],t[1][1]]),i.push([t[0][0],t[0][1]]),i}},{key:"getEndTangent",value:function(){var t=this.parsedStyle.points.points,i=t.length-1,a=[];return a.push([t[i-1][0],t[i-1][1]]),a.push([t[i][0],t[i][1]]),a}}])}(UC);Fse.PARSED_STYLE_LIST=new Set([].concat(Al(UC.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard"]));var Bse=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Tr(this,n),Ws(this,n,[gl({type:Wr.RECT},e)])}return Ys(n,r),Cr(n)}(Zl);Bse.PARSED_STYLE_LIST=new Set([].concat(Al(Zl.PARSED_STYLE_LIST),["x","y","z","width","height","isBillboard","isSizeAttenuation","radius"]));var $se=["style"],Gse=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.style,i=Cp(e,$se);return Tr(this,n),Ws(this,n,[gl({type:Wr.TEXT,style:gl({fill:"black"},t)},i)])}return Ys(n,r),Cr(n,[{key:"getComputedTextLength",value:function(){var t;return this.getGeometryBounds(),((t=this.parsedStyle.metrics)===null||t===void 0?void 0:t.maxLineWidth)||0}},{key:"getLineBoundingRects",value:function(){var t;return this.getGeometryBounds(),((t=this.parsedStyle.metrics)===null||t===void 0?void 0:t.lineMetrics)||[]}},{key:"isOverflowing",value:function(){return this.getGeometryBounds(),!!this.parsedStyle.isOverflowing}}])}(Zl);Gse.PARSED_STYLE_LIST=new Set([].concat(Al(Zl.PARSED_STYLE_LIST),["x","y","z","isBillboard","billboardRotation","isSizeAttenuation","text","textAlign","textBaseline","fontStyle","fontSize","fontFamily","fontWeight","fontVariant","lineHeight","letterSpacing","leading","wordWrap","wordWrapWidth","maxLines","textOverflow","isOverflowing","textPath","textDecorationLine","textDecorationColor","textDecorationStyle","textPathSide","textPathStartOffset","metrics","dx","dy"]));var iOe=null,aOe={number:function(n){return new fs(n)},percent:function(n){return new fs(n,"%")},px:function(n){return new fs(n,"px")},em:function(n){return new fs(n,"em")},rem:function(n){return new fs(n,"rem")},deg:function(n){return new fs(n,"deg")},grad:function(n){return new fs(n,"grad")},rad:function(n){return new fs(n,"rad")},turn:function(n){return new fs(n,"turn")},s:function(n){return new fs(n,"s")},ms:function(n){return new fs(n,"ms")},registerProperty:function(n){var e=n.name,t=n.inherits,i=n.interpolable,a=n.initialValue,s=n.syntax;ur.styleValueRegistry.registerMetadata({n:e,inh:t,int:i,d:a,syntax:s})},registerLayout:function(n,e){ur.layoutRegistry.registerLayout(n,e)}},sOe=null,zse=function(){function r(n){Tr(this,r),this.strategies=n}return Cr(r,[{key:"apply",value:function(e){var t=e.camera,i=e.renderingService,a=e.renderingContext,s=this.strategies;i.hooks.cull.tap(r.tag,function(o){if(o){var l=o.cullable;return s.length===0?l.visible=a.unculledEntities.indexOf(o.entity)>-1:l.visible=s.every(function(u){return u.isVisible(t,o)}),!o.isCulled()&&o.isVisible()?o:(o.dispatchEvent(new Wv(Eu.CULLED)),null)}return o}),i.hooks.afterRender.tap(r.tag,function(o){o.cullable.visibilityPlaneMask=-1})}}])}();zse.tag="Culling";var Vse=function(){function r(){var n=this;Tr(this,r),this.autoPreventDefault=!1,this.rootPointerEvent=new Wae(null),this.rootWheelEvent=new Yae(null),this.onPointerMove=function(e){var t,i=(t=n.context.renderingContext.root)===null||t===void 0||(t=t.ownerDocument)===null||t===void 0?void 0:t.defaultView;if(!(i.supportsTouchEvents&&e.pointerType==="touch")){var a=n.normalizeToPointerEvent(e,i),s=Tp(a),o;try{for(s.s();!(o=s.n()).done;){var l=o.value,u=n.bootstrapEvent(n.rootPointerEvent,l,i,e);n.context.eventService.mapEvent(u)}}catch(c){s.e(c)}finally{s.f()}n.setCursor(n.context.eventService.cursor)}},this.onClick=function(e){var t,i=(t=n.context.renderingContext.root)===null||t===void 0||(t=t.ownerDocument)===null||t===void 0?void 0:t.defaultView,a=n.normalizeToPointerEvent(e,i),s=Tp(a),o;try{for(s.s();!(o=s.n()).done;){var l=o.value,u=n.bootstrapEvent(n.rootPointerEvent,l,i,e);n.context.eventService.mapEvent(u)}}catch(c){s.e(c)}finally{s.f()}n.setCursor(n.context.eventService.cursor)}}return Cr(r,[{key:"apply",value:function(e){var t=this;this.context=e;var i=e.renderingService,a=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(s){var o=t.context.renderingService.hooks.pickSync.call({position:s,picked:[],topmost:!0}),l=o.picked;return l[0]||null}),i.hooks.pointerWheel.tap(r.tag,function(s){var o=t.normalizeWheelEvent(s);t.context.eventService.mapEvent(o)}),i.hooks.pointerDown.tap(r.tag,function(s){if(!(a.supportsTouchEvents&&s.pointerType==="touch")){var o=t.normalizeToPointerEvent(s,a);if(t.autoPreventDefault&&o[0].isNormalized){var l=s.cancelable||!("cancelable"in s);l&&s.preventDefault()}var u=Tp(o),c;try{for(u.s();!(c=u.n()).done;){var d=c.value,h=t.bootstrapEvent(t.rootPointerEvent,d,a,s);t.context.eventService.mapEvent(h)}}catch(f){u.e(f)}finally{u.f()}t.setCursor(t.context.eventService.cursor)}}),i.hooks.pointerUp.tap(r.tag,function(s){if(!(a.supportsTouchEvents&&s.pointerType==="touch")){var o=t.context.contextService.getDomElement(),l=t.context.eventService.isNativeEventFromCanvas(o,s),u=l?"":"outside",c=t.normalizeToPointerEvent(s,a),d=Tp(c),h;try{for(d.s();!(h=d.n()).done;){var f=h.value,v=t.bootstrapEvent(t.rootPointerEvent,f,a,s);v.type+=u,t.context.eventService.mapEvent(v)}}catch(g){d.e(g)}finally{d.f()}t.setCursor(t.context.eventService.cursor)}}),i.hooks.pointerMove.tap(r.tag,this.onPointerMove),i.hooks.pointerOver.tap(r.tag,this.onPointerMove),i.hooks.pointerOut.tap(r.tag,this.onPointerMove),i.hooks.click.tap(r.tag,this.onClick),i.hooks.pointerCancel.tap(r.tag,function(s){var o=t.normalizeToPointerEvent(s,a),l=Tp(o),u;try{for(l.s();!(u=l.n()).done;){var c=u.value,d=t.bootstrapEvent(t.rootPointerEvent,c,a,s);t.context.eventService.mapEvent(d)}}catch(h){l.e(h)}finally{l.f()}t.setCursor(t.context.eventService.cursor)})}},{key:"bootstrapEvent",value:function(e,t,i,a){e.view=i,e.originalEvent=null,e.nativeEvent=a,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this.transferMouseData(e,t);var s=this.context.eventService.client2Viewport({x:t.clientX,y:t.clientY}),o=s.x,l=s.y;e.viewport.x=o,e.viewport.y=l;var u=this.context.eventService.viewport2Canvas(e.viewport),c=u.x,d=u.y;return e.canvas.x=c,e.canvas.y=d,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.isTrusted=a.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=vae[e.type]||e.type),e}},{key:"normalizeWheelEvent",value:function(e){var t=this.rootWheelEvent;this.transferMouseData(t,e),t.deltaMode=e.deltaMode,t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ;var i=this.context.eventService.client2Viewport({x:e.clientX,y:e.clientY}),a=i.x,s=i.y;t.viewport.x=a,t.viewport.y=s;var o=this.context.eventService.viewport2Canvas(t.viewport),l=o.x,u=o.y;return t.canvas.x=l,t.canvas.y=u,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.nativeEvent=e,t.type=e.type,t}},{key:"transferMouseData",value:function(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=gae.now(),e.type=t.type,e.altKey=t.altKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.ctrlKey=t.ctrlKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.screen.x=t.screenX,e.screen.y=t.screenY,e.relatedTarget=null}},{key:"setCursor",value:function(e){this.context.contextService.applyCursorStyle(e||this.context.config.cursor||"default")}},{key:"normalizeToPointerEvent",value:function(e,t){var i=[];if(t.isTouchEvent(e))for(var a=0;a<e.changedTouches.length;a++){var s=e.changedTouches[a];(0,ie.Z)(s.button)&&(s.button=0),(0,ie.Z)(s.buttons)&&(s.buttons=1),(0,ie.Z)(s.isPrimary)&&(s.isPrimary=e.touches.length===1&&e.type==="touchstart"),(0,ie.Z)(s.width)&&(s.width=s.radiusX||1),(0,ie.Z)(s.height)&&(s.height=s.radiusY||1),(0,ie.Z)(s.tiltX)&&(s.tiltX=0),(0,ie.Z)(s.tiltY)&&(s.tiltY=0),(0,ie.Z)(s.pointerType)&&(s.pointerType="touch"),(0,ie.Z)(s.pointerId)&&(s.pointerId=s.identifier||0),(0,ie.Z)(s.pressure)&&(s.pressure=s.force||.5),(0,ie.Z)(s.twist)&&(s.twist=0),(0,ie.Z)(s.tangentialPressure)&&(s.tangentialPressure=0),s.isNormalized=!0,s.type=e.type,i.push(s)}else if(t.isMouseEvent(e)){var o=e;(0,ie.Z)(o.isPrimary)&&(o.isPrimary=!0),(0,ie.Z)(o.width)&&(o.width=1),(0,ie.Z)(o.height)&&(o.height=1),(0,ie.Z)(o.tiltX)&&(o.tiltX=0),(0,ie.Z)(o.tiltY)&&(o.tiltY=0),(0,ie.Z)(o.pointerType)&&(o.pointerType="mouse"),(0,ie.Z)(o.pointerId)&&(o.pointerId=fae),(0,ie.Z)(o.pressure)&&(o.pressure=.5),(0,ie.Z)(o.twist)&&(o.twist=0),(0,ie.Z)(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,i.push(o)}else i.push(e);return i}}])}();Vse.tag="Event";var oOe=[Wr.CIRCLE,Wr.ELLIPSE,Wr.IMAGE,Wr.RECT,Wr.LINE,Wr.POLYLINE,Wr.POLYGON,Wr.TEXT,Wr.PATH,Wr.HTML],lOe=null,Use=function(){function r(){Tr(this,r),this.syncTasks=new Map,this.isFirstTimeRendering=!0,this.syncing=!1,this.isFirstTimeRenderingFinished=!1}return Cr(r,[{key:"apply",value:function(e){var t=this,i,a=e.renderingService,s=e.renderingContext,o=e.rBushRoot,l=s.root.ownerDocument.defaultView;this.rBush=o;var u=function(g){var m=g.target;m.renderable.dirty=!0,a.dirtify()},c=function(g){t.syncTasks.set(g.target,g.detail.affectChildren),a.dirtify()},d=function(g){var m=g.target;ur.enableSizeAttenuation&&ur.styleValueRegistry.updateSizeAttenuation(m,l.getCamera().getZoom())},h=function(g){var m=g.target,y=m.rBushNode;y.aabb&&t.rBush.remove(y.aabb),t.syncTasks.delete(m),ur.sceneGraphService.dirtifyToRoot(m),a.dirtify()};a.hooks.init.tap(r.tag,function(){l.addEventListener(Eu.MOUNTED,d),l.addEventListener(Eu.UNMOUNTED,h),l.addEventListener(Eu.ATTR_MODIFIED,u),l.addEventListener(Eu.BOUNDS_CHANGED,c)}),a.hooks.destroy.tap(r.tag,function(){l.removeEventListener(Eu.MOUNTED,d),l.removeEventListener(Eu.UNMOUNTED,h),l.removeEventListener(Eu.ATTR_MODIFIED,u),l.removeEventListener(Eu.BOUNDS_CHANGED,c),t.syncTasks.clear()});var f=(i=ur.globalThis.requestIdleCallback)!==null&&i!==void 0?i:vF.bind(ur.globalThis);a.hooks.endFrame.tap(r.tag,function(){t.isFirstTimeRendering?(t.isFirstTimeRendering=!1,t.syncing=!0,f(function(){t.syncRTree(!0),t.isFirstTimeRenderingFinished=!0})):t.syncRTree()})}},{key:"syncNode",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.isConnected){var i=e.rBushNode;i.aabb&&this.rBush.remove(i.aabb);var a=e.getRenderBounds();if(a){var s=e.renderable;t&&(s.dirtyRenderBounds||(s.dirtyRenderBounds=new Wc),s.dirtyRenderBounds.update(a.center,a.halfExtents));var o=a.getMin(),l=Ko(o,2),u=l[0],c=l[1],d=a.getMax(),h=Ko(d,2),f=h[0],v=h[1];i.aabb||(i.aabb={}),i.aabb.displayObject=e,i.aabb.minX=u,i.aabb.minY=c,i.aabb.maxX=f,i.aabb.maxY=v}if(i.aabb&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.minX)&&!isNaN(i.aabb.minY))return i.aabb}}},{key:"syncRTree",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!(!t&&(this.syncing||this.syncTasks.size===0))){this.syncing=!0;var i=[],a=new Set,s=function(l){if(!a.has(l)&&l.renderable){var u=e.syncNode(l,t);u&&(i.push(u),a.add(l))}};this.syncTasks.forEach(function(o,l){o&&l.forEach(s);for(var u=l;u;)s(u),u=u.parentElement}),this.rBush.load(i),i.length=0,this.syncing=!1}}}])}();Use.tag="Prepare";function uOe(r){return!!r.document}var jC=function(r){return r.READY="ready",r.BEFORE_RENDER="beforerender",r.RERENDER="rerender",r.AFTER_RENDER="afterrender",r.BEFORE_DESTROY="beforedestroy",r.AFTER_DESTROY="afterdestroy",r.RESIZE="resize",r.DIRTY_RECTANGLE="dirtyrectangle",r.RENDERER_CHANGED="rendererchanged",r}({}),cOe=500,dOe=.1,hOe=1e3,fOe=new Wv(Eu.MOUNTED),vOe=new Wv(Eu.UNMOUNTED),gOe=new Wv(jC.BEFORE_RENDER),_Oe=new Wv(jC.RERENDER),mOe=new Wv(jC.AFTER_RENDER),pOe=null;var SF=function(){function r(){Tr(this,r)}return Cr(r,[{key:"apply",value:function(e,t){var i=this,a=e.renderingService,s=e.renderingContext,o=e.config;this.context=e;var l=s.root.ownerDocument.defaultView,u=function(b){a.hooks.pointerMove.call(b)},c=function(b){a.hooks.pointerUp.call(b)},d=function(b){a.hooks.pointerDown.call(b)},h=function(b){a.hooks.pointerOver.call(b)},f=function(b){a.hooks.pointerOut.call(b)},v=function(b){a.hooks.pointerCancel.call(b)},g=function(b){a.hooks.pointerWheel.call(b)},m=function(b){a.hooks.click.call(b)},y=function(b){t.globalThis.document.addEventListener("pointermove",u,!0),b.addEventListener("pointerdown",d,!0),b.addEventListener("pointerleave",f,!0),b.addEventListener("pointerover",h,!0),t.globalThis.addEventListener("pointerup",c,!0),t.globalThis.addEventListener("pointercancel",v,!0)},w=function(b){b.addEventListener("touchstart",d,!0),b.addEventListener("touchend",c,!0),b.addEventListener("touchmove",u,!0),b.addEventListener("touchcancel",v,!0)},T=function(b){t.globalThis.document.addEventListener("mousemove",u,!0),b.addEventListener("mousedown",d,!0),b.addEventListener("mouseout",f,!0),b.addEventListener("mouseover",h,!0),t.globalThis.addEventListener("mouseup",c,!0)},G=function(b){t.globalThis.document.removeEventListener("pointermove",u,!0),b.removeEventListener("pointerdown",d,!0),b.removeEventListener("pointerleave",f,!0),b.removeEventListener("pointerover",h,!0),t.globalThis.removeEventListener("pointerup",c,!0),t.globalThis.removeEventListener("pointercancel",v,!0)},x=function(b){b.removeEventListener("touchstart",d,!0),b.removeEventListener("touchend",c,!0),b.removeEventListener("touchmove",u,!0),b.removeEventListener("touchcancel",v,!0)},_=function(b){t.globalThis.document.removeEventListener("mousemove",u,!0),b.removeEventListener("mousedown",d,!0),b.removeEventListener("mouseout",f,!0),b.removeEventListener("mouseover",h,!0),t.globalThis.removeEventListener("mouseup",c,!0)};a.hooks.init.tap(r.tag,function(){var p=i.context.contextService.getDomElement();t.globalThis.navigator.msPointerEnabled?(p.style.msContentZooming="none",p.style.msTouchAction="none"):l.supportsPointerEvents&&(p.style.touchAction="none"),l.supportsPointerEvents?y(p):T(p),l.supportsTouchEvents&&w(p),o.useNativeClickEvent&&p.addEventListener("click",m,!0),p.addEventListener("wheel",g,{passive:!0,capture:!0})}),a.hooks.destroy.tap(r.tag,function(){var p=i.context.contextService.getDomElement();t.globalThis.navigator.msPointerEnabled?(p.style.msContentZooming="",p.style.msTouchAction=""):l.supportsPointerEvents&&(p.style.touchAction=""),l.supportsPointerEvents?G(p):_(p),l.supportsTouchEvents&&x(p),o.useNativeClickEvent&&p.removeEventListener("click",m,!0),p.removeEventListener("wheel",g,!0)})}}])}();SF.tag="DOMInteraction";var jse=function(r){function n(){var e;Tr(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ws(this,n,[].concat(i)),e.name="dom-interaction",e}return Ys(n,r),Cr(n,[{key:"init",value:function(){this.addRenderingPlugin(new SF)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(yre);function Mr(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}function Ap(r){"@babel/helpers - typeof";return Ap=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ap(r)}function Hse(r,n){if(Ap(r)!="object"||!r)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var t=e.call(r,n||"default");if(Ap(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(r)}function TF(r){var n=Hse(r,"string");return Ap(n)=="symbol"?n:n+""}function CF(r,n){for(var e=0;e<n.length;e++){var t=n[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,TF(t.key),t)}}function Pr(r,n,e){return n&&CF(r.prototype,n),e&&CF(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function Lp(r){return Lp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Lp(r)}function MF(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(n){}return(MF=function(){return!!r})()}function Wse(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Yse(r,n){if(n&&(Ap(n)=="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Wse(r)}function Ks(r,n,e){return n=Lp(n),Yse(r,MF()?Reflect.construct(n,e||[],Lp(r).constructor):n.apply(r,e))}function HC(r,n){return HC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},HC(r,n)}function Js(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(n&&n.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),n&&HC(r,n)}function ma(r,n,e){return(n=TF(n))in r?Object.defineProperty(r,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[n]=e,r}function PF(r,n){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);n&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),e.push.apply(e,t)}return e}function _l(r){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?PF(Object(e),!0).forEach(function(t){ma(r,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):PF(Object(e)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))})}return r}function WC(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=Array(n);e<n;e++)t[e]=r[e];return t}function Zse(r){if(Array.isArray(r))return WC(r)}function Xse(r){if(typeof Symbol!="undefined"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function YC(r,n){if(r){if(typeof r=="string")return WC(r,n);var e={}.toString.call(r).slice(8,-1);return e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set"?Array.from(r):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?WC(r,n):void 0}}function Kse(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dl(r){return Zse(r)||Xse(r)||YC(r)||Kse()}function Jse(r){if(Array.isArray(r))return r}function Qse(r,n){var e=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(e!=null){var t,i,a,s,o=[],l=!0,u=!1;try{if(a=(e=e.call(r)).next,n===0){if(Object(e)!==e)return;l=!1}else for(;!(l=(t=a.call(e)).done)&&(o.push(t.value),o.length!==n);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&e.return!=null&&(s=e.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function qse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qo(r,n){return Jse(r)||Qse(r,n)||YC(r,n)||qse()}function eoe(r,n){for(;!{}.hasOwnProperty.call(r,n)&&(r=Lp(r))!==null;);return r}function ZC(){return ZC=typeof Reflect!="undefined"&&Reflect.get?Reflect.get.bind():function(r,n,e){var t=eoe(r,n);if(t){var i=Object.getOwnPropertyDescriptor(t,n);return i.get?i.get.call(arguments.length<3?r:e):i.value}},ZC.apply(null,arguments)}function NF(r,n,e,t){var i=ZC(Lp(1&t?r.prototype:r),n,e);return 2&t&&typeof i=="function"?function(a){return i.apply(e,a)}:i}function XC(r,n,e){r.prototype=n.prototype=e,e.constructor=r}function OF(r,n){var e=Object.create(r.prototype);for(var t in n)e[t]=n[t];return e}function Vy(){}var Uy=.7,Eb=1/Uy,Ip="\\s*([+-]?\\d+)\\s*",jy="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",uv="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",toe=/^#([0-9a-f]{3,8})$/,noe=new RegExp(`^rgb\\(${Ip},${Ip},${Ip}\\)$`),roe=new RegExp(`^rgb\\(${uv},${uv},${uv}\\)$`),ioe=new RegExp(`^rgba\\(${Ip},${Ip},${Ip},${jy}\\)$`),aoe=new RegExp(`^rgba\\(${uv},${uv},${uv},${jy}\\)$`),soe=new RegExp(`^hsl\\(${jy},${uv},${uv}\\)$`),ooe=new RegExp(`^hsla\\(${jy},${uv},${uv},${jy}\\)$`),RF={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};XC(Vy,bb,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:AF,formatHex:AF,formatHex8:loe,formatHsl:uoe,formatRgb:LF,toString:LF});function AF(){return this.rgb().formatHex()}function loe(){return this.rgb().formatHex8()}function uoe(){return $F(this).formatHsl()}function LF(){return this.rgb().formatRgb()}function bb(r){var n,e;return r=(r+"").trim().toLowerCase(),(n=toe.exec(r))?(e=n[1].length,n=parseInt(n[1],16),e===6?IF(n):e===3?new Kc(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):e===8?kb(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):e===4?kb(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=noe.exec(r))?new Kc(n[1],n[2],n[3],1):(n=roe.exec(r))?new Kc(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=ioe.exec(r))?kb(n[1],n[2],n[3],n[4]):(n=aoe.exec(r))?kb(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=soe.exec(r))?BF(n[1],n[2]/100,n[3]/100,1):(n=ooe.exec(r))?BF(n[1],n[2]/100,n[3]/100,n[4]):RF.hasOwnProperty(r)?IF(RF[r]):r==="transparent"?new Kc(NaN,NaN,NaN,0):null}function IF(r){return new Kc(r>>16&255,r>>8&255,r&255,1)}function kb(r,n,e,t){return t<=0&&(r=n=e=NaN),new Kc(r,n,e,t)}function coe(r){return r instanceof Vy||(r=bb(r)),r?(r=r.rgb(),new Kc(r.r,r.g,r.b,r.opacity)):new Kc}function doe(r,n,e,t){return arguments.length===1?coe(r):new Kc(r,n,e,t==null?1:t)}function Kc(r,n,e,t){this.r=+r,this.g=+n,this.b=+e,this.opacity=+t}XC(Kc,doe,OF(Vy,{brighter(r){return r=r==null?Eb:Math.pow(Eb,r),new Kc(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?Uy:Math.pow(Uy,r),new Kc(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new Kc(X_(this.r),X_(this.g),X_(this.b),wb(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:DF,formatHex:DF,formatHex8:hoe,formatRgb:FF,toString:FF}));function DF(){return`#${K_(this.r)}${K_(this.g)}${K_(this.b)}`}function hoe(){return`#${K_(this.r)}${K_(this.g)}${K_(this.b)}${K_((isNaN(this.opacity)?1:this.opacity)*255)}`}function FF(){const r=wb(this.opacity);return`${r===1?"rgb(":"rgba("}${X_(this.r)}, ${X_(this.g)}, ${X_(this.b)}${r===1?")":`, ${r})`}`}function wb(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function X_(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function K_(r){return r=X_(r),(r<16?"0":"")+r.toString(16)}function BF(r,n,e,t){return t<=0?r=n=e=NaN:e<=0||e>=1?r=n=NaN:n<=0&&(r=NaN),new lf(r,n,e,t)}function $F(r){if(r instanceof lf)return new lf(r.h,r.s,r.l,r.opacity);if(r instanceof Vy||(r=bb(r)),!r)return new lf;if(r instanceof lf)return r;r=r.rgb();var n=r.r/255,e=r.g/255,t=r.b/255,i=Math.min(n,e,t),a=Math.max(n,e,t),s=NaN,o=a-i,l=(a+i)/2;return o?(n===a?s=(e-t)/o+(e<t)*6:e===a?s=(t-n)/o+2:s=(n-e)/o+4,o/=l<.5?a+i:2-a-i,s*=60):o=l>0&&l<1?0:s,new lf(s,o,l,r.opacity)}function foe(r,n,e,t){return arguments.length===1?$F(r):new lf(r,n,e,t==null?1:t)}function lf(r,n,e,t){this.h=+r,this.s=+n,this.l=+e,this.opacity=+t}XC(lf,foe,OF(Vy,{brighter(r){return r=r==null?Eb:Math.pow(Eb,r),new lf(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?Uy:Math.pow(Uy,r),new lf(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,n=isNaN(r)||isNaN(this.s)?0:this.s,e=this.l,t=e+(e<.5?e:1-e)*n,i=2*e-t;return new Kc(KC(r>=240?r-240:r+120,i,t),KC(r,i,t),KC(r<120?r+240:r-120,i,t),this.opacity)},clamp(){return new lf(GF(this.h),Sb(this.s),Sb(this.l),wb(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const r=wb(this.opacity);return`${r===1?"hsl(":"hsla("}${GF(this.h)}, ${Sb(this.s)*100}%, ${Sb(this.l)*100}%${r===1?")":`, ${r})`}`}}));function GF(r){return r=(r||0)%360,r<0?r+360:r}function Sb(r){return Math.max(0,Math.min(1,r||0))}function KC(r,n,e){return(r<60?n+(e-n)*r/60:r<180?e:r<240?n+(e-n)*(240-r)/60:n)*255}function Dp(r,n){var e=typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(!e){if(Array.isArray(r)||(e=YC(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:i}}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 a,s=!0,o=!1;return{s:function(){e=e.call(r)},n:function(){var u=e.next();return s=u.done,u},e:function(u){o=!0,a=u},f:function(){try{s||e.return==null||e.return()}finally{if(o)throw a}}}}function voe(r,n){if(r==null)return{};var e={};for(var t in r)if({}.hasOwnProperty.call(r,t)){if(n.includes(t))continue;e[t]=r[t]}return e}function Fp(r,n){if(r==null)return{};var e,t,i=voe(r,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(t=0;t<a.length;t++)e=a[t],n.includes(e)||{}.propertyIsEnumerable.call(r,e)&&(i[e]=r[e])}return i}var goe=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof k.g!="undefined"?k.g:typeof self!="undefined"?self:{},zF={exports:{}};(function(r,n){(function(e,t){r.exports=t()})(goe,function(){function e(x,_,p,b,R){t(x,_,p||0,b||x.length-1,R||a)}function t(x,_,p,b,R){for(;b>p;){if(b-p>600){var B=b-p+1,j=_-p+1,Z=Math.log(B),te=.5*Math.exp(2*Z/3),le=.5*Math.sqrt(Z*te*(B-te)/B)*(j-B/2<0?-1:1),ue=Math.max(p,Math.floor(_-j*te/B+le)),se=Math.min(b,Math.floor(_+(B-j)*te/B+le));t(x,_,ue,se,R)}var V=x[_],ee=p,he=b;for(i(x,p,_),R(x[b],V)>0&&i(x,p,b);ee<he;){for(i(x,ee,he),ee++,he--;R(x[ee],V)<0;)ee++;for(;R(x[he],V)>0;)he--}R(x[p],V)===0?i(x,p,he):(he++,i(x,he,b)),he<=_&&(p=he+1),_<=he&&(b=he-1)}}function i(x,_,p){var b=x[_];x[_]=x[p],x[p]=b}function a(x,_){return x<_?-1:x>_?1:0}var s=function(_){_===void 0&&(_=9),this._maxEntries=Math.max(4,_),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()};s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(_){var p=this.data,b=[];if(!w(_,p))return b;for(var R=this.toBBox,B=[];p;){for(var j=0;j<p.children.length;j++){var Z=p.children[j],te=p.leaf?R(Z):Z;w(_,te)&&(p.leaf?b.push(Z):y(_,te)?this._all(Z,b):B.push(Z))}p=B.pop()}return b},s.prototype.collides=function(_){var p=this.data;if(!w(_,p))return!1;for(var b=[];p;){for(var R=0;R<p.children.length;R++){var B=p.children[R],j=p.leaf?this.toBBox(B):B;if(w(_,j)){if(p.leaf||y(_,j))return!0;b.push(B)}}p=b.pop()}return!1},s.prototype.load=function(_){if(!(_&&_.length))return this;if(_.length<this._minEntries){for(var p=0;p<_.length;p++)this.insert(_[p]);return this}var b=this._build(_.slice(),0,_.length-1,0);if(!this.data.children.length)this.data=b;else if(this.data.height===b.height)this._splitRoot(this.data,b);else{if(this.data.height<b.height){var R=this.data;this.data=b,b=R}this._insert(b,this.data.height-b.height-1,!0)}return this},s.prototype.insert=function(_){return _&&this._insert(_,this.data.height-1),this},s.prototype.clear=function(){return this.data=T([]),this},s.prototype.remove=function(_,p){if(!_)return this;for(var b=this.data,R=this.toBBox(_),B=[],j=[],Z,te,le;b||B.length;){if(b||(b=B.pop(),te=B[B.length-1],Z=j.pop(),le=!0),b.leaf){var ue=o(_,b.children,p);if(ue!==-1)return b.children.splice(ue,1),B.push(b),this._condense(B),this}!le&&!b.leaf&&y(b,R)?(B.push(b),j.push(Z),Z=0,te=b,b=b.children[0]):te?(Z++,b=te.children[Z],le=!1):b=null}return this},s.prototype.toBBox=function(_){return _},s.prototype.compareMinX=function(_,p){return _.minX-p.minX},s.prototype.compareMinY=function(_,p){return _.minY-p.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(_){return this.data=_,this},s.prototype._all=function(_,p){for(var b=[];_;)_.leaf?p.push.apply(p,_.children):b.push.apply(b,_.children),_=b.pop();return p},s.prototype._build=function(_,p,b,R){var B=b-p+1,j=this._maxEntries,Z;if(B<=j)return Z=T(_.slice(p,b+1)),l(Z,this.toBBox),Z;R||(R=Math.ceil(Math.log(B)/Math.log(j)),j=Math.ceil(B/Math.pow(j,R-1))),Z=T([]),Z.leaf=!1,Z.height=R;var te=Math.ceil(B/j),le=te*Math.ceil(Math.sqrt(j));G(_,p,b,le,this.compareMinX);for(var ue=p;ue<=b;ue+=le){var se=Math.min(ue+le-1,b);G(_,ue,se,te,this.compareMinY);for(var V=ue;V<=se;V+=te){var ee=Math.min(V+te-1,se);Z.children.push(this._build(_,V,ee,R-1))}}return l(Z,this.toBBox),Z},s.prototype._chooseSubtree=function(_,p,b,R){for(;R.push(p),!(p.leaf||R.length-1===b);){for(var B=1/0,j=1/0,Z=void 0,te=0;te<p.children.length;te++){var le=p.children[te],ue=f(le),se=g(_,le)-ue;se<j?(j=se,B=ue<B?ue:B,Z=le):se===j&&ue<B&&(B=ue,Z=le)}p=Z||p.children[0]}return p},s.prototype._insert=function(_,p,b){var R=b?_:this.toBBox(_),B=[],j=this._chooseSubtree(R,this.data,p,B);for(j.children.push(_),c(j,R);p>=0&&B[p].children.length>this._maxEntries;)this._split(B,p),p--;this._adjustParentBBoxes(R,B,p)},s.prototype._split=function(_,p){var b=_[p],R=b.children.length,B=this._minEntries;this._chooseSplitAxis(b,B,R);var j=this._chooseSplitIndex(b,B,R),Z=T(b.children.splice(j,b.children.length-j));Z.height=b.height,Z.leaf=b.leaf,l(b,this.toBBox),l(Z,this.toBBox),p?_[p-1].children.push(Z):this._splitRoot(b,Z)},s.prototype._splitRoot=function(_,p){this.data=T([_,p]),this.data.height=_.height+1,this.data.leaf=!1,l(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(_,p,b){for(var R,B=1/0,j=1/0,Z=p;Z<=b-p;Z++){var te=u(_,0,Z,this.toBBox),le=u(_,Z,b,this.toBBox),ue=m(te,le),se=f(te)+f(le);ue<B?(B=ue,R=Z,j=se<j?se:j):ue===B&&se<j&&(j=se,R=Z)}return R||b-p},s.prototype._chooseSplitAxis=function(_,p,b){var R=_.leaf?this.compareMinX:d,B=_.leaf?this.compareMinY:h,j=this._allDistMargin(_,p,b,R),Z=this._allDistMargin(_,p,b,B);j<Z&&_.children.sort(R)},s.prototype._allDistMargin=function(_,p,b,R){_.children.sort(R);for(var B=this.toBBox,j=u(_,0,p,B),Z=u(_,b-p,b,B),te=v(j)+v(Z),le=p;le<b-p;le++){var ue=_.children[le];c(j,_.leaf?B(ue):ue),te+=v(j)}for(var se=b-p-1;se>=p;se--){var V=_.children[se];c(Z,_.leaf?B(V):V),te+=v(Z)}return te},s.prototype._adjustParentBBoxes=function(_,p,b){for(var R=b;R>=0;R--)c(p[R],_)},s.prototype._condense=function(_){for(var p=_.length-1,b=void 0;p>=0;p--)_[p].children.length===0?p>0?(b=_[p-1].children,b.splice(b.indexOf(_[p]),1)):this.clear():l(_[p],this.toBBox)};function o(x,_,p){if(!p)return _.indexOf(x);for(var b=0;b<_.length;b++)if(p(x,_[b]))return b;return-1}function l(x,_){u(x,0,x.children.length,_,x)}function u(x,_,p,b,R){R||(R=T(null)),R.minX=1/0,R.minY=1/0,R.maxX=-1/0,R.maxY=-1/0;for(var B=_;B<p;B++){var j=x.children[B];c(R,x.leaf?b(j):j)}return R}function c(x,_){return x.minX=Math.min(x.minX,_.minX),x.minY=Math.min(x.minY,_.minY),x.maxX=Math.max(x.maxX,_.maxX),x.maxY=Math.max(x.maxY,_.maxY),x}function d(x,_){return x.minX-_.minX}function h(x,_){return x.minY-_.minY}function f(x){return(x.maxX-x.minX)*(x.maxY-x.minY)}function v(x){return x.maxX-x.minX+(x.maxY-x.minY)}function g(x,_){return(Math.max(_.maxX,x.maxX)-Math.min(_.minX,x.minX))*(Math.max(_.maxY,x.maxY)-Math.min(_.minY,x.minY))}function m(x,_){var p=Math.max(x.minX,_.minX),b=Math.max(x.minY,_.minY),R=Math.min(x.maxX,_.maxX),B=Math.min(x.maxY,_.maxY);return Math.max(0,R-p)*Math.max(0,B-b)}function y(x,_){return x.minX<=_.minX&&x.minY<=_.minY&&_.maxX<=x.maxX&&_.maxY<=x.maxY}function w(x,_){return _.minX<=x.maxX&&_.minY<=x.maxY&&_.maxX>=x.minX&&_.maxY>=x.minY}function T(x){return{children:x,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function G(x,_,p,b,R){for(var B=[_,p];B.length;)if(p=B.pop(),_=B.pop(),!(p-_<=b)){var j=_+Math.ceil((p-_)/b/2)*b;e(x,j,_,p,R),B.push(_,j,j,p)}}return s})})(zF);var yOe=zF.exports,Ir=function(r){return r.GROUP="g",r.FRAGMENT="fragment",r.CIRCLE="circle",r.ELLIPSE="ellipse",r.IMAGE="image",r.RECT="rect",r.LINE="line",r.POLYLINE="polyline",r.POLYGON="polygon",r.TEXT="text",r.PATH="path",r.HTML="html",r.MESH="mesh",r}({}),JC=function(r){return r[r.ZERO=0]="ZERO",r[r.NEGATIVE_ONE=1]="NEGATIVE_ONE",r}({}),_oe=function(){function r(){Mr(this,r),this.plugins=[]}return Pr(r,[{key:"addRenderingPlugin",value:function(e){this.plugins.push(e),this.context.renderingPlugins.push(e)}},{key:"removeAllRenderingPlugins",value:function(){var e=this;this.plugins.forEach(function(t){var i=e.context.renderingPlugins.indexOf(t);i>=0&&e.context.renderingPlugins.splice(i,1)})}}])}(),xOe=null,QC=E.IH,Bp=E.JG,moe=E.Fp,poe=E.VV,VF=E.bA,qC=E.lu,Jc=function(){function r(){Mr(this,r),this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return Pr(r,[{key:"update",value:function(e,t){Bp(this.center,e),Bp(this.halfExtents,t),qC(this.min,this.center,this.halfExtents),QC(this.max,this.center,this.halfExtents)}},{key:"setMinMax",value:function(e,t){QC(this.center,t,e),VF(this.center,this.center,.5),qC(this.halfExtents,t,e),VF(this.halfExtents,this.halfExtents,.5),Bp(this.min,e),Bp(this.max,t)}},{key:"getMin",value:function(){return this.min}},{key:"getMax",value:function(){return this.max}},{key:"add",value:function(e){if(!r.isEmpty(e)){if(r.isEmpty(this)){this.setMinMax(e.getMin(),e.getMax());return}var t=this.center,i=t[0],a=t[1],s=t[2],o=this.halfExtents,l=o[0],u=o[1],c=o[2],d=i-l,h=i+l,f=a-u,v=a+u,g=s-c,m=s+c,y=e.center,w=y[0],T=y[1],G=y[2],x=e.halfExtents,_=x[0],p=x[1],b=x[2],R=w-_,B=w+_,j=T-p,Z=T+p,te=G-b,le=G+b;R<d&&(d=R),B>h&&(h=B),j<f&&(f=j),Z>v&&(v=Z),te<g&&(g=te),le>m&&(m=le),t[0]=(d+h)*.5,t[1]=(f+v)*.5,t[2]=(g+m)*.5,o[0]=(h-d)*.5,o[1]=(v-f)*.5,o[2]=(m-g)*.5,this.min[0]=d,this.min[1]=f,this.min[2]=g,this.max[0]=h,this.max[1]=v,this.max[2]=m}}},{key:"setFromTransformedAABB",value:function(e,t){var i=this.center,a=this.halfExtents,s=e.center,o=e.halfExtents,l=t[0],u=t[4],c=t[8],d=t[1],h=t[5],f=t[9],v=t[2],g=t[6],m=t[10],y=Math.abs(l),w=Math.abs(u),T=Math.abs(c),G=Math.abs(d),x=Math.abs(h),_=Math.abs(f),p=Math.abs(v),b=Math.abs(g),R=Math.abs(m);i[0]=t[12]+l*s[0]+u*s[1]+c*s[2],i[1]=t[13]+d*s[0]+h*s[1]+f*s[2],i[2]=t[14]+v*s[0]+g*s[1]+m*s[2],a[0]=y*o[0]+w*o[1]+T*o[2],a[1]=G*o[0]+x*o[1]+_*o[2],a[2]=p*o[0]+b*o[1]+R*o[2],qC(this.min,i,a),QC(this.max,i,a)}},{key:"intersects",value:function(e){var t=this.getMax(),i=this.getMin(),a=e.getMax(),s=e.getMin();return i[0]<=a[0]&&t[0]>=s[0]&&i[1]<=a[1]&&t[1]>=s[1]&&i[2]<=a[2]&&t[2]>=s[2]}},{key:"intersection",value:function(e){if(!this.intersects(e))return null;var t=new r,i=moe([0,0,0],this.getMin(),e.getMin()),a=poe([0,0,0],this.getMax(),e.getMax());return t.setMinMax(i,a),t}},{key:"getNegativeFarPoint",value:function(e){return e.pnVertexFlag===273?Bp([0,0,0],this.min):e.pnVertexFlag===272?[this.min[0],this.min[1],this.max[2]]:e.pnVertexFlag===257?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===256?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===17?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===16?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===1?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]}},{key:"getPositiveFarPoint",value:function(e){return e.pnVertexFlag===273?Bp([0,0,0],this.max):e.pnVertexFlag===272?[this.max[0],this.max[1],this.min[2]]:e.pnVertexFlag===257?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===256?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===17?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===16?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===1?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]}}],[{key:"isEmpty",value:function(e){return!e||e.halfExtents[0]===0&&e.halfExtents[1]===0&&e.halfExtents[2]===0}}])}(),yoe=function(){function r(n,e){Mr(this,r),this.distance=n||0,this.normal=e||E.al(0,1,0),this.updatePNVertexFlag()}return Pr(r,[{key:"updatePNVertexFlag",value:function(){this.pnVertexFlag=(+(this.normal[0]>=0)<<8)+(+(this.normal[1]>=0)<<4)+ +(this.normal[2]>=0)}},{key:"distanceToPoint",value:function(e){return E.AK(e,this.normal)-this.distance}},{key:"normalize",value:function(){var e=1/E.Zh(this.normal);E.bA(this.normal,this.normal,e),this.distance*=e}},{key:"intersectsLine",value:function(e,t,i){var a=this.distanceToPoint(e),s=this.distanceToPoint(t),o=a/(a-s),l=o>=0&&o<=1;return l&&i&&E.t7(i,e,t,o),l}}])}(),EOe=function(r){return r[r.OUTSIDE=4294967295]="OUTSIDE",r[r.INSIDE=0]="INSIDE",r[r.INDETERMINATE=2147483647]="INDETERMINATE",r}({}),xoe=function(){function r(n){if(Mr(this,r),this.planes=[],n)this.planes=n;else for(var e=0;e<6;e++)this.planes.push(new yoe)}return Pr(r,[{key:"extractFromVPMatrix",value:function(e){var t=qo(e,16),i=t[0],a=t[1],s=t[2],o=t[3],l=t[4],u=t[5],c=t[6],d=t[7],h=t[8],f=t[9],v=t[10],g=t[11],m=t[12],y=t[13],w=t[14],T=t[15];E.t8(this.planes[0].normal,o-i,d-l,g-h),this.planes[0].distance=T-m,E.t8(this.planes[1].normal,o+i,d+l,g+h),this.planes[1].distance=T+m,E.t8(this.planes[2].normal,o+a,d+u,g+f),this.planes[2].distance=T+y,E.t8(this.planes[3].normal,o-a,d-u,g-f),this.planes[3].distance=T-y,E.t8(this.planes[4].normal,o-s,d-c,g-v),this.planes[4].distance=T-w,E.t8(this.planes[5].normal,o+s,d+c,g+v),this.planes[5].distance=T+w,this.planes.forEach(function(G){G.normalize(),G.updatePNVertexFlag()})}}])}(),oh=function(){function r(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Mr(this,r),this.x=0,this.y=0,this.x=n,this.y=e}return Pr(r,[{key:"clone",value:function(){return new r(this.x,this.y)}},{key:"copyFrom",value:function(e){this.x=e.x,this.y=e.y}}])}(),$p=function(){function r(n,e,t,i){Mr(this,r),this.x=n,this.y=e,this.width=t,this.height=i,this.left=n,this.right=n+t,this.top=e,this.bottom=e+i}return Pr(r,[{key:"toJSON",value:function(){}}],[{key:"fromRect",value:function(e){return new r(e.x,e.y,e.width,e.height)}},{key:"applyTransform",value:function(e,t){var i=me.al(e.x,e.y,0,1),a=me.al(e.x+e.width,e.y,0,1),s=me.al(e.x,e.y+e.height,0,1),o=me.al(e.x+e.width,e.y+e.height,0,1),l=me.Ue(),u=me.Ue(),c=me.Ue(),d=me.Ue();me.fF(l,i,t),me.fF(u,a,t),me.fF(c,s,t),me.fF(d,o,t);var h=Math.min(l[0],u[0],c[0],d[0]),f=Math.min(l[1],u[1],c[1],d[1]),v=Math.max(l[0],u[0],c[0],d[0]),g=Math.max(l[1],u[1],c[1],d[1]);return r.fromRect({x:h,y:f,width:v-h,height:g-f})}}])}(),el="Method not implemented.",bOe="Use document.documentElement instead.",Eoe="Cannot append a destroyed element.";function eM(r){return r===void 0?0:r>360||r<-360?r%360:r}var tM=E.Ue();function Qc(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;return Array.isArray(r)&&r.length===3?t?E.d9(r):E.JG(tM,r):(0,pe.Z)(r)?t?E.al(r,n,e):E.t8(tM,r,n,e):t?E.al(r[0],r[1]||n,r[2]||e):E.t8(tM,r[0],r[1]||n,r[2]||e)}var boe=Math.PI/180;function Qs(r){return r*boe}var koe=180/Math.PI;function lh(r){return r*koe}var woe=.9;function kOe(r){return r%=400,r<0&&(r+=400),r*woe}function wOe(r){return r/360}function Soe(r){return 360*r}var Tb=Math.PI/2;function Toe(r,n){var e=n[0],t=n[1],i=n[2],a=n[3],s=e*e,o=t*t,l=i*i,u=a*a,c=s+o+l+u,d=e*a-t*i;return d>.499995*c?(r[0]=Tb,r[1]=2*Math.atan2(t,e),r[2]=0):d<-.499995*c?(r[0]=-Tb,r[1]=2*Math.atan2(t,e),r[2]=0):(r[0]=Math.asin(2*(e*i-a*t)),r[1]=Math.atan2(2*(e*a+t*i),1-2*(l+u)),r[2]=Math.atan2(2*(e*t+i*a),1-2*(o+l))),r}function Coe(r,n){var e,t,i=L.getScaling(E.Ue(),n),a=qo(i,3),s=a[0],o=a[1],l=a[2],u=Math.asin(-n[2]/s);return u<Tb?u>-Tb?(e=Math.atan2(n[6]/o,n[10]/l),t=Math.atan2(n[1]/s,n[0]/s)):(t=0,e=-Math.atan2(n[4]/o,n[5]/o)):(t=0,e=Math.atan2(n[4]/o,n[5]/o)),r[0]=e,r[1]=u,r[2]=t,r}function nM(r,n){return n.length===16?Coe(r,n):Toe(r,n)}function Moe(r,n,e,t,i){var a=Math.cos(r),s=Math.sin(r);return Ke.al(t*a,i*s,0,-t*s,i*a,0,n,e,1)}function Poe(r,n,e,t,i,a,s){var o=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1,l=2*a,u=e-n,c=t-i,d=l/u,h=l/c,f=(e+n)/u,v=(t+i)/c,g,m,y=s-a,w=s*a;return o?(g=-s/y,m=-w/y):(g=-(s+a)/y,m=-2*w/y),r[0]=d,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=h,r[6]=0,r[7]=0,r[8]=f,r[9]=v,r[10]=g,r[11]=-1,r[12]=0,r[13]=0,r[14]=m,r[15]=0,r}function UF(r){var n=r[0],e=r[1],t=r[3],i=r[4],a=Math.sqrt(n*n+e*e),s=Math.sqrt(t*t+i*i),o=n*i-e*t;if(o<0&&(n<i?a=-a:s=-s),a){var l=1/a;n*=l,e*=l}if(s){var u=1/s;t*=u,i*=u}var c=Math.atan2(e,n),d=lh(c);return[r[6],r[7],a,s,d]}var cv=L.create(),uf=L.create(),Hy=me.Ue(),Gi=[E.Ue(),E.Ue(),E.Ue()],jF=E.Ue();function Noe(r,n,e,t,i,a){if(!Ooe(cv,r)||(L.copy(uf,cv),uf[3]=0,uf[7]=0,uf[11]=0,uf[15]=1,Math.abs(L.determinant(uf))<1e-8))return!1;var s=cv[3],o=cv[7],l=cv[11],u=cv[12],c=cv[13],d=cv[14],h=cv[15];if(s!==0||o!==0||l!==0){Hy[0]=s,Hy[1]=o,Hy[2]=l,Hy[3]=h;var f=L.invert(uf,uf);if(!f)return!1;L.transpose(uf,uf),me.fF(i,Hy,uf)}else i[0]=i[1]=i[2]=0,i[3]=1;if(n[0]=u,n[1]=c,n[2]=d,Roe(Gi,cv),e[0]=E.kE(Gi[0]),E.Fv(Gi[0],Gi[0]),t[0]=E.AK(Gi[0],Gi[1]),rM(Gi[1],Gi[1],Gi[0],1,-t[0]),e[1]=E.kE(Gi[1]),E.Fv(Gi[1],Gi[1]),t[0]/=e[1],t[1]=E.AK(Gi[0],Gi[2]),rM(Gi[2],Gi[2],Gi[0],1,-t[1]),t[2]=E.AK(Gi[1],Gi[2]),rM(Gi[2],Gi[2],Gi[1],1,-t[2]),e[2]=E.kE(Gi[2]),E.Fv(Gi[2],Gi[2]),t[1]/=e[2],t[2]/=e[2],E.kC(jF,Gi[1],Gi[2]),E.AK(Gi[0],jF)<0)for(var v=0;v<3;v++)e[v]*=-1,Gi[v][0]*=-1,Gi[v][1]*=-1,Gi[v][2]*=-1;return a[0]=.5*Math.sqrt(Math.max(1+Gi[0][0]-Gi[1][1]-Gi[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-Gi[0][0]+Gi[1][1]-Gi[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-Gi[0][0]-Gi[1][1]+Gi[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+Gi[0][0]+Gi[1][1]+Gi[2][2],0)),Gi[2][1]>Gi[1][2]&&(a[0]=-a[0]),Gi[0][2]>Gi[2][0]&&(a[1]=-a[1]),Gi[1][0]>Gi[0][1]&&(a[2]=-a[2]),!0}function Ooe(r,n){var e=n[15];if(e===0)return!1;for(var t=1/e,i=0;i<16;i++)r[i]=n[i]*t;return!0}function Roe(r,n){r[0][0]=n[0],r[0][1]=n[1],r[0][2]=n[2],r[1][0]=n[4],r[1][1]=n[5],r[1][2]=n[6],r[2][0]=n[8],r[2][1]=n[9],r[2][2]=n[10]}function rM(r,n,e,t,i){r[0]=n[0]*t+e[0]*i,r[1]=n[1]*t+e[1]*i,r[2]=n[2]*t+e[2]*i}var Fl=function(r){return r[r.ORBITING=0]="ORBITING",r[r.EXPLORING=1]="EXPLORING",r[r.TRACKING=2]="TRACKING",r}({}),HF=function(r){return r[r.DEFAULT=0]="DEFAULT",r[r.ROTATIONAL=1]="ROTATIONAL",r[r.TRANSLATIONAL=2]="TRANSLATIONAL",r[r.CINEMATIC=3]="CINEMATIC",r}({}),cf=function(r){return r[r.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",r[r.PERSPECTIVE=1]="PERSPECTIVE",r}({}),Aoe={UPDATED:"updated"},WF=2e-4,Loe=function(){function r(){Mr(this,r),this.clipSpaceNearZ=JC.NEGATIVE_ONE,this.eventEmitter=new Se.Z,this.matrix=L.create(),this.right=E.al(1,0,0),this.up=E.al(0,1,0),this.forward=E.al(0,0,1),this.position=E.al(0,0,1),this.focalPoint=E.al(0,0,0),this.distanceVector=E.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=L.create(),this.projectionMatrixInverse=L.create(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=Fl.EXPLORING,this.trackingMode=HF.DEFAULT,this.projectionMode=cf.PERSPECTIVE,this.frustum=new xoe,this.orthoMatrix=L.create()}return Pr(r,[{key:"isOrtho",value:function(){return this.projectionMode===cf.ORTHOGRAPHIC}},{key:"getProjectionMode",value:function(){return this.projectionMode}},{key:"getPerspective",value:function(){return this.jitteredProjectionMatrix||this.projectionMatrix}},{key:"getPerspectiveInverse",value:function(){return this.projectionMatrixInverse}},{key:"getFrustum",value:function(){return this.frustum}},{key:"getPosition",value:function(){return this.position}},{key:"getFocalPoint",value:function(){return this.focalPoint}},{key:"getDollyingStep",value:function(){return this.dollyingStep}},{key:"getNear",value:function(){return this.near}},{key:"getFar",value:function(){return this.far}},{key:"getZoom",value:function(){return this.zoom}},{key:"getOrthoMatrix",value:function(){return this.orthoMatrix}},{key:"getView",value:function(){return this.view}},{key:"setEnableUpdate",value:function(e){this.enableUpdate=e}},{key:"setType",value:function(e,t){return this.type=e,this.type===Fl.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===Fl.TRACKING&&t!==void 0&&this.setTrackingMode(t),this}},{key:"setProjectionMode",value:function(e){return this.projectionMode=e,this}},{key:"setTrackingMode",value:function(e){if(this.type!==Fl.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=e,this}},{key:"setWorldRotation",value:function(e){return this.rotateWorld=e,this._getAngles(),this}},{key:"getViewTransform",value:function(){return L.invert(L.create(),this.matrix)}},{key:"getWorldTransform",value:function(){return this.matrix}},{key:"jitterProjectionMatrix",value:function(e,t){var i=L.fromTranslation(L.create(),[e,t,0]);this.jitteredProjectionMatrix=L.multiply(L.create(),i,this.projectionMatrix)}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0}},{key:"setMatrix",value:function(e){return this.matrix=e,this._update(),this}},{key:"setProjectionMatrix",value:function(e){this.projectionMatrix=e}},{key:"setFov",value:function(e){return this.setPerspective(this.near,this.far,e,this.aspect),this}},{key:"setAspect",value:function(e){return this.setPerspective(this.near,this.far,this.fov,e),this}},{key:"setNear",value:function(e){return this.projectionMode===cf.PERSPECTIVE?this.setPerspective(e,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,e,this.far),this}},{key:"setFar",value:function(e){return this.projectionMode===cf.PERSPECTIVE?this.setPerspective(this.near,e,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,e),this}},{key:"setViewOffset",value:function(e,t,i,a,s,o){return this.aspect=e/t,this.view===void 0&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=a,this.view.width=s,this.view.height=o,this.projectionMode===cf.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===cf.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"setZoom",value:function(e){return this.zoom=e,this.projectionMode===cf.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===cf.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this}},{key:"setZoomByViewportPoint",value:function(e,t){var i=this.canvas.viewport2Canvas({x:t[0],y:t[1]}),a=i.x,s=i.y,o=this.roll;this.rotate(0,0,-o),this.setPosition(a,s),this.setFocalPoint(a,s),this.setZoom(e),this.rotate(0,0,o);var l=this.canvas.viewport2Canvas({x:t[0],y:t[1]}),u=l.x,c=l.y,d=E.al(u-a,c-s,0),h=E.AK(d,this.right)/E.kE(this.right),f=E.AK(d,this.up)/E.kE(this.up),v=this.getPosition(),g=qo(v,2),m=g[0],y=g[1],w=this.getFocalPoint(),T=qo(w,2),G=T[0],x=T[1];return this.setPosition(m-h,y-f),this.setFocalPoint(G-h,x-f),this}},{key:"setPerspective",value:function(e,t,i,a){var s;this.projectionMode=cf.PERSPECTIVE,this.fov=i,this.near=e,this.far=t,this.aspect=a;var o=this.near*Math.tan(Qs(.5*this.fov))/this.zoom,l=2*o,u=this.aspect*l,c=-.5*u;if((s=this.view)!==null&&s!==void 0&&s.enabled){var d=this.view.fullWidth,h=this.view.fullHeight;c+=this.view.offsetX*u/d,o-=this.view.offsetY*l/h,u*=this.view.width/d,l*=this.view.height/h}return Poe(this.projectionMatrix,c,c+u,o-l,o,e,this.far,this.clipSpaceNearZ===JC.ZERO),L.invert(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this}},{key:"setOrthographic",value:function(e,t,i,a,s,o){var l;this.projectionMode=cf.ORTHOGRAPHIC,this.rright=t,this.left=e,this.top=i,this.bottom=a,this.near=s,this.far=o;var u=(this.rright-this.left)/(2*this.zoom),c=(this.top-this.bottom)/(2*this.zoom),d=(this.rright+this.left)/2,h=(this.top+this.bottom)/2,f=d-u,v=d+u,g=h+c,m=h-c;if((l=this.view)!==null&&l!==void 0&&l.enabled){var y=(this.rright-this.left)/this.view.fullWidth/this.zoom,w=(this.top-this.bottom)/this.view.fullHeight/this.zoom;f+=y*this.view.offsetX,v=f+y*this.view.width,g-=w*this.view.offsetY,m=g-w*this.view.height}return this.clipSpaceNearZ===JC.NEGATIVE_ONE?L.ortho(this.projectionMatrix,f,v,g,m,s,o):L.orthoZO(this.projectionMatrix,f,v,g,m,s,o),L.invert(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this}},{key:"setPosition",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.position[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.position[2],a=Qc(e,t,i);return this._setPosition(a),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this}},{key:"setFocalPoint",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.focalPoint[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.focalPoint[2],a=E.al(0,1,0);if(this.focalPoint=Qc(e,t,i),this.trackingMode===HF.CINEMATIC){var s=E.$X(E.Ue(),this.focalPoint,this.position);e=s[0],t=s[1],i=s[2];var o=E.kE(s),l=lh(Math.asin(t/o)),u=90+lh(Math.atan2(i,e)),c=L.create();L.rotateY(c,c,Qs(u)),L.rotateX(c,c,Qs(l)),a=E.fF(E.Ue(),[0,1,0],c)}return L.invert(this.matrix,L.lookAt(L.create(),this.position,this.focalPoint,a)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this}},{key:"getDistance",value:function(){return this.distance}},{key:"getDistanceVector",value:function(){return this.distanceVector}},{key:"setDistance",value:function(e){if(this.distance===e||e<0)return this;this.distance=e,this.distance<WF&&(this.distance=WF),this.dollyingStep=this.distance/100;var t=E.Ue();e=this.distance;var i=this.forward,a=this.focalPoint;return t[0]=e*i[0]+a[0],t[1]=e*i[1]+a[1],t[2]=e*i[2]+a[2],this._setPosition(t),this.triggerUpdate(),this}},{key:"setMaxDistance",value:function(e){return this.maxDistance=e,this}},{key:"setMinDistance",value:function(e){return this.minDistance=e,this}},{key:"setAzimuth",value:function(e){return this.azimuth=eM(e),this.computeMatrix(),this._getAxes(),this.type===Fl.ORBITING||this.type===Fl.EXPLORING?this._getPosition():this.type===Fl.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getAzimuth",value:function(){return this.azimuth}},{key:"setElevation",value:function(e){return this.elevation=eM(e),this.computeMatrix(),this._getAxes(),this.type===Fl.ORBITING||this.type===Fl.EXPLORING?this._getPosition():this.type===Fl.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getElevation",value:function(){return this.elevation}},{key:"setRoll",value:function(e){return this.roll=eM(e),this.computeMatrix(),this._getAxes(),this.type===Fl.ORBITING||this.type===Fl.EXPLORING?this._getPosition():this.type===Fl.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getRoll",value:function(){return this.roll}},{key:"_update",value:function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()}},{key:"computeMatrix",value:function(){var e=X.yY(X.Ue(),[0,0,1],Qs(this.roll));L.identity(this.matrix);var t=X.yY(X.Ue(),[1,0,0],Qs((this.rotateWorld&&this.type!==Fl.TRACKING||this.type===Fl.TRACKING?1:-1)*this.elevation)),i=X.yY(X.Ue(),[0,1,0],Qs((this.rotateWorld&&this.type!==Fl.TRACKING||this.type===Fl.TRACKING?1:-1)*this.azimuth)),a=X.Jp(X.Ue(),i,t);a=X.Jp(X.Ue(),a,e);var s=L.fromQuat(L.create(),a);this.type===Fl.ORBITING||this.type===Fl.EXPLORING?(L.translate(this.matrix,this.matrix,this.focalPoint),L.multiply(this.matrix,this.matrix,s),L.translate(this.matrix,this.matrix,[0,0,this.distance])):this.type===Fl.TRACKING&&(L.translate(this.matrix,this.matrix,this.position),L.multiply(this.matrix,this.matrix,s))}},{key:"_setPosition",value:function(e,t,i){this.position=Qc(e,t,i);var a=this.matrix;a[12]=this.position[0],a[13]=this.position[1],a[14]=this.position[2],a[15]=1,this._getOrthoMatrix()}},{key:"_getAxes",value:function(){E.JG(this.right,Qc(me.fF(me.Ue(),[1,0,0,0],this.matrix))),E.JG(this.up,Qc(me.fF(me.Ue(),[0,1,0,0],this.matrix))),E.JG(this.forward,Qc(me.fF(me.Ue(),[0,0,1,0],this.matrix))),E.Fv(this.right,this.right),E.Fv(this.up,this.up),E.Fv(this.forward,this.forward)}},{key:"_getAngles",value:function(){var e=this.distanceVector[0],t=this.distanceVector[1],i=this.distanceVector[2],a=E.kE(this.distanceVector);if(a===0){this.elevation=0,this.azimuth=0;return}this.type===Fl.TRACKING?(this.elevation=lh(Math.asin(t/a)),this.azimuth=lh(Math.atan2(-e,-i))):this.rotateWorld?(this.elevation=lh(Math.asin(t/a)),this.azimuth=lh(Math.atan2(-e,-i))):(this.elevation=-lh(Math.asin(t/a)),this.azimuth=-lh(Math.atan2(-e,-i)))}},{key:"_getPosition",value:function(){E.JG(this.position,Qc(me.fF(me.Ue(),[0,0,0,1],this.matrix))),this._getDistance()}},{key:"_getFocalPoint",value:function(){E.kK(this.distanceVector,[0,0,-this.distance],Ke.xO(Ke.Ue(),this.matrix)),E.IH(this.focalPoint,this.position,this.distanceVector),this._getDistance()}},{key:"_getDistance",value:function(){this.distanceVector=E.$X(E.Ue(),this.focalPoint,this.position),this.distance=E.kE(this.distanceVector),this.dollyingStep=this.distance/100}},{key:"_getOrthoMatrix",value:function(){if(this.projectionMode===cf.ORTHOGRAPHIC){var e=this.position,t=X.yY(X.Ue(),[0,0,1],-this.roll*Math.PI/180);L.fromRotationTranslationScaleOrigin(this.orthoMatrix,t,E.al((this.rright-this.left)/2-e[0],(this.top-this.bottom)/2-e[1],0),E.al(this.zoom,this.zoom,1),e)}}},{key:"triggerUpdate",value:function(){if(this.enableUpdate){var e=this.getViewTransform(),t=L.multiply(L.create(),this.getPerspective(),e);this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(Aoe.UPDATED)}}},{key:"rotate",value:function(e,t,i){throw new Error(el)}},{key:"pan",value:function(e,t){throw new Error(el)}},{key:"dolly",value:function(e){throw new Error(el)}},{key:"createLandmark",value:function(e,t){throw new Error(el)}},{key:"gotoLandmark",value:function(e,t){throw new Error(el)}},{key:"cancelLandmarkAnimation",value:function(){throw new Error(el)}}])}(),Ioe=function(r){return r[r.Standard=0]="Standard",r}({}),iM=function(r){return r[r.ADDED=0]="ADDED",r[r.REMOVED=1]="REMOVED",r[r.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED",r}({}),YF={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new $p(0,0,0,0)},Wn=function(r){return r.COORDINATE="<coordinate>",r.COLOR="<color>",r.PAINT="<paint>",r.NUMBER="<number>",r.ANGLE="<angle>",r.OPACITY_VALUE="<opacity-value>",r.SHADOW_BLUR="<shadow-blur>",r.LENGTH="<length>",r.PERCENTAGE="<percentage>",r.LENGTH_PERCENTAGE="<length> | <percentage>",r.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",r.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",r.LIST_OF_POINTS="<list-of-points>",r.PATH="<path>",r.FILTER="<filter>",r.Z_INDEX="<z-index>",r.OFFSET_DISTANCE="<offset-distance>",r.DEFINED_PATH="<defined-path>",r.MARKER="<marker>",r.TRANSFORM="<transform>",r.TRANSFORM_ORIGIN="<transform-origin>",r.TEXT="<text>",r.TEXT_TRANSFORM="<text-transform>",r}({});function gc(r,n){if(typeof r!="function"||n!=null&&typeof n!="function")throw new TypeError("Expected a function");var e=function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var o=n?n.apply(this,a):a[0],l=e.cache;if(l.has(o))return l.get(o);var u=r.apply(this,a);return e.cache=l.set(o,u)||l,u};return e.cache=new(gc.Cache||Map),e}gc.Cache=Map;var tr=function(r){return r[r.kUnknown=0]="kUnknown",r[r.kNumber=1]="kNumber",r[r.kPercentage=2]="kPercentage",r[r.kEms=3]="kEms",r[r.kPixels=4]="kPixels",r[r.kRems=5]="kRems",r[r.kDegrees=6]="kDegrees",r[r.kRadians=7]="kRadians",r[r.kGradians=8]="kGradians",r[r.kTurns=9]="kTurns",r[r.kMilliseconds=10]="kMilliseconds",r[r.kSeconds=11]="kSeconds",r[r.kInteger=12]="kInteger",r}({}),df=function(r){return r[r.kUNumber=0]="kUNumber",r[r.kUPercent=1]="kUPercent",r[r.kULength=2]="kULength",r[r.kUAngle=3]="kUAngle",r[r.kUTime=4]="kUTime",r[r.kUOther=5]="kUOther",r}({}),Doe=function(r){return r[r.kYes=0]="kYes",r[r.kNo=1]="kNo",r}({}),Foe=function(r){return r[r.kYes=0]="kYes",r[r.kNo=1]="kNo",r}({}),Boe=[{name:"em",unit_type:tr.kEms},{name:"px",unit_type:tr.kPixels},{name:"deg",unit_type:tr.kDegrees},{name:"rad",unit_type:tr.kRadians},{name:"grad",unit_type:tr.kGradians},{name:"ms",unit_type:tr.kMilliseconds},{name:"s",unit_type:tr.kSeconds},{name:"rem",unit_type:tr.kRems},{name:"turn",unit_type:tr.kTurns}],Gp=function(r){return r[r.kUnknownType=0]="kUnknownType",r[r.kUnparsedType=1]="kUnparsedType",r[r.kKeywordType=2]="kKeywordType",r[r.kUnitType=3]="kUnitType",r[r.kSumType=4]="kSumType",r[r.kProductType=5]="kProductType",r[r.kNegateType=6]="kNegateType",r[r.kInvertType=7]="kInvertType",r[r.kMinType=8]="kMinType",r[r.kMaxType=9]="kMaxType",r[r.kClampType=10]="kClampType",r[r.kTransformType=11]="kTransformType",r[r.kPositionType=12]="kPositionType",r[r.kURLImageType=13]="kURLImageType",r[r.kColorType=14]="kColorType",r[r.kUnsupportedColorType=15]="kUnsupportedColorType",r}({}),$oe=function(n){return Boe.find(function(e){return e.name===n}).unit_type},Goe=function(n){return n?n==="number"?tr.kNumber:n==="percent"||n==="%"?tr.kPercentage:$oe(n):tr.kUnknown},zoe=function(n){switch(n){case tr.kNumber:case tr.kInteger:return df.kUNumber;case tr.kPercentage:return df.kUPercent;case tr.kPixels:return df.kULength;case tr.kMilliseconds:case tr.kSeconds:return df.kUTime;case tr.kDegrees:case tr.kRadians:case tr.kGradians:case tr.kTurns:return df.kUAngle;default:return df.kUOther}},Voe=function(n){switch(n){case df.kUNumber:return tr.kNumber;case df.kULength:return tr.kPixels;case df.kUPercent:return tr.kPercentage;case df.kUTime:return tr.kSeconds;case df.kUAngle:return tr.kDegrees;default:return tr.kUnknown}},ZF=function(n){var e=1;switch(n){case tr.kPixels:case tr.kDegrees:case tr.kSeconds:break;case tr.kMilliseconds:e=.001;break;case tr.kRadians:e=180/Math.PI;break;case tr.kGradians:e=.9;break;case tr.kTurns:e=360;break}return e},aM=function(n){switch(n){case tr.kNumber:case tr.kInteger:return"";case tr.kPercentage:return"%";case tr.kEms:return"em";case tr.kRems:return"rem";case tr.kPixels:return"px";case tr.kDegrees:return"deg";case tr.kRadians:return"rad";case tr.kGradians:return"grad";case tr.kMilliseconds:return"ms";case tr.kSeconds:return"s";case tr.kTurns:return"turn"}return""},Cb=function(){function r(){Mr(this,r)}return Pr(r,[{key:"toString",value:function(){return this.buildCSSText(Doe.kNo,Foe.kNo,"")}},{key:"isNumericValue",value:function(){return this.getType()>=Gp.kUnitType&&this.getType()<=Gp.kClampType}}],[{key:"isAngle",value:function(e){return e===tr.kDegrees||e===tr.kRadians||e===tr.kGradians||e===tr.kTurns}},{key:"isLength",value:function(e){return e>=tr.kEms&&e<tr.kDegrees}},{key:"isRelativeUnit",value:function(e){return e===tr.kPercentage||e===tr.kEms||e===tr.kRems}},{key:"isTime",value:function(e){return e===tr.kSeconds||e===tr.kMilliseconds}}])}(),Uoe=function(r){function n(e){var t;return Mr(this,n),t=Ks(this,n),t.colorSpace=e,t}return Js(n,r),Pr(n,[{key:"getType",value:function(){return Gp.kColorType}},{key:"to",value:function(t){return this}}])}(Cb),Mb=function(r){return r[r.Constant=0]="Constant",r[r.LinearGradient=1]="LinearGradient",r[r.RadialGradient=2]="RadialGradient",r}({}),Pb=function(r){function n(e,t){var i;return Mr(this,n),i=Ks(this,n),i.type=e,i.value=t,i}return Js(n,r),Pr(n,[{key:"clone",value:function(){return new n(this.type,this.value)}},{key:"buildCSSText",value:function(t,i,a){return a}},{key:"getType",value:function(){return Gp.kColorType}}])}(Cb),uh=function(r){function n(e){var t;return Mr(this,n),t=Ks(this,n),t.value=e,t}return Js(n,r),Pr(n,[{key:"clone",value:function(){return new n(this.value)}},{key:"getType",value:function(){return Gp.kKeywordType}},{key:"buildCSSText",value:function(t,i,a){return a+this.value}}])}(Cb),joe=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",t="";return Number.isFinite(n)?t="NaN":n>0?t="infinity":t="-infinity",t+=e},sM=function(n){return Voe(zoe(n))},vs=function(r){function n(e){var t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:tr.kNumber;Mr(this,n),t=Ks(this,n);var a;return typeof i=="string"?a=Goe(i):a=i,t.unit=a,t.value=e,t}return Js(n,r),Pr(n,[{key:"clone",value:function(){return new n(this.value,this.unit)}},{key:"equals",value:function(t){var i=t;return this.value===i.value&&this.unit===i.unit}},{key:"getType",value:function(){return Gp.kUnitType}},{key:"convertTo",value:function(t){if(this.unit===t)return new n(this.value,this.unit);var i=sM(this.unit);if(i!==sM(t)||i===tr.kUnknown)return null;var a=ZF(this.unit)/ZF(t);return new n(this.value*a,t)}},{key:"buildCSSText",value:function(t,i,a){var s;switch(this.unit){case tr.kUnknown:break;case tr.kInteger:s=Number(this.value).toFixed(0);break;case tr.kNumber:case tr.kPercentage:case tr.kEms:case tr.kRems:case tr.kPixels:case tr.kDegrees:case tr.kRadians:case tr.kGradians:case tr.kMilliseconds:case tr.kSeconds:case tr.kTurns:{var o=-999999,l=999999,u=this.value,c=aM(this.unit);if(u<o||u>l){var d=aM(this.unit);!Number.isFinite(u)||Number.isNaN(u)?s=joe(u,d):s=u+(d||"")}else s="".concat(u).concat(c)}}return a+=s,a}}])}(Cb),hf=new vs(0,"px");new vs(1,"px");var J_=new vs(0,"deg"),oM=function(r){function n(e,t,i){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;return Mr(this,n),a=Ks(this,n,["rgb"]),a.r=e,a.g=t,a.b=i,a.alpha=s,a.isNone=o,a}return Js(n,r),Pr(n,[{key:"clone",value:function(){return new n(this.r,this.g,this.b,this.alpha)}},{key:"buildCSSText",value:function(t,i,a){return"".concat(a,"rgba(").concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")}}])}(Uoe),XF=new uh("unset"),Hoe=new uh("initial"),Woe=new uh("inherit"),lM={"":XF,unset:XF,initial:Hoe,inherit:Woe},Yoe=function(n){return lM[n]||(lM[n]=new uh(n)),lM[n]},KF=new oM(0,0,0,0,!0),JF=new oM(0,0,0,0),Zoe=gc(function(r,n,e,t){return new oM(r,n,e,t)},function(r,n,e,t){return"rgba(".concat(r,",").concat(n,",").concat(e,",").concat(t,")")}),To=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:tr.kNumber;return new vs(n,e)};new vs(50,"%");function Xoe(r){var n=r.type,e=r.value;return n==="hex"?"#".concat(e):n==="literal"?e:n==="rgb"?"rgb(".concat(e.join(","),")"):"rgba(".concat(e.join(","),")")}var Koe=function(){var r={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},n="";function e(V){throw new Error("".concat(n,": ").concat(V))}function t(){var V=i();return n.length>0&&e("Invalid input not EOF"),V}function i(){return T(a)}function a(){return s("linear-gradient",r.linearGradient,l)||s("repeating-linear-gradient",r.repeatingLinearGradient,l)||s("radial-gradient",r.radialGradient,d)||s("repeating-radial-gradient",r.repeatingRadialGradient,d)||s("conic-gradient",r.conicGradient,d)}function s(V,ee,he){return o(ee,function(ut){var ct=he();return ct&&(ue(r.comma)||e("Missing comma before color stops")),{type:V,orientation:ct,colorStops:T(G)}})}function o(V,ee){var he=ue(V);if(he){ue(r.startCall)||e("Missing (");var ut=ee(he);return ue(r.endCall)||e("Missing )"),ut}}function l(){return u()||c()}function u(){return le("directional",r.sideOrCorner,1)}function c(){return le("angular",r.angleValue,1)}function d(){var V,ee=h(),he;return ee&&(V=[],V.push(ee),he=n,ue(r.comma)&&(ee=h(),ee?V.push(ee):n=he)),V}function h(){var V=f()||v();if(V)V.at=m();else{var ee=g();if(ee){V=ee;var he=m();he&&(V.at=he)}else{var ut=y();ut&&(V={type:"default-radial",at:ut})}}return V}function f(){var V=le("shape",/^(circle)/i,0);return V&&(V.style=te()||g()),V}function v(){var V=le("shape",/^(ellipse)/i,0);return V&&(V.style=j()||g()),V}function g(){return le("extent-keyword",r.extentKeywords,1)}function m(){if(le("position",/^at/,0)){var V=y();return V||e("Missing positioning value"),V}}function y(){var V=w();if(V.x||V.y)return{type:"position",value:V}}function w(){return{x:j(),y:j()}}function T(V){var ee=V(),he=[];if(ee)for(he.push(ee);ue(r.comma);)ee=V(),ee?he.push(ee):e("One extra comma");return he}function G(){var V=x();return V||e("Expected color definition"),V.length=j(),V}function x(){return p()||R()||b()||_()}function _(){return le("literal",r.literalColor,0)}function p(){return le("hex",r.hexColor,1)}function b(){return o(r.rgbColor,function(){return{type:"rgb",value:T(B)}})}function R(){return o(r.rgbaColor,function(){return{type:"rgba",value:T(B)}})}function B(){return ue(r.number)[1]}function j(){return le("%",r.percentageValue,1)||Z()||te()}function Z(){return le("position-keyword",r.positionKeywords,1)}function te(){return le("px",r.pixelValue,1)||le("em",r.emValue,1)}function le(V,ee,he){var ut=ue(ee);if(ut)return{type:V,value:ut[he]}}function ue(V){var ee=/^[\n\r\t\s]+/.exec(n);ee&&se(ee[0].length);var he=V.exec(n);return he&&se(he[0].length),he}function se(V){n=n.substring(V)}return function(V){return n=V,t()}}();function SOe(r,n,e,t){var i=Qs(t.value),a=0,s=0,o=a+n/2,l=s+e/2,u=Math.abs(n*Math.cos(i))+Math.abs(e*Math.sin(i)),c=r[0]+o-Math.cos(i)*u/2,d=r[1]+l-Math.sin(i)*u/2,h=r[0]+o+Math.cos(i)*u/2,f=r[1]+l+Math.sin(i)*u/2;return{x1:c,y1:d,x2:h,y2:f}}function TOe(r,n,e,t,i,a){var s=t.value,o=i.value;t.unit===tr.kPercentage&&(s=t.value/100*n),i.unit===tr.kPercentage&&(o=i.value/100*e);var l=Math.max(distanceSquareRoot([0,0],[s,o]),distanceSquareRoot([0,e],[s,o]),distanceSquareRoot([n,e],[s,o]),distanceSquareRoot([n,0],[s,o]));return a&&(a instanceof vs?l=a.value:a instanceof uh&&(a.value==="closest-side"?l=Math.min(s,n-s,o,e-o):a.value==="farthest-side"?l=Math.max(s,n-s,o,e-o):a.value==="closest-corner"&&(l=Math.min(distanceSquareRoot([0,0],[s,o]),distanceSquareRoot([0,e],[s,o]),distanceSquareRoot([n,e],[s,o]),distanceSquareRoot([n,0],[s,o]))))),{x:s+r[0],y:o+r[1],r:l}}var Joe=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Qoe=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,qoe=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,QF=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function ele(r){var n,e=r.length;if(r[e-1].length=(n=r[e-1].length)!==null&&n!==void 0?n:{type:"%",value:"100"},e>1){var t;r[0].length=(t=r[0].length)!==null&&t!==void 0?t:{type:"%",value:"0"}}for(var i=0,a=Number(r[0].length.value),s=1;s<e;s++){var o,l=(o=r[s].length)===null||o===void 0?void 0:o.value;if(!(0,xe.Z)(l)&&!(0,xe.Z)(a)){for(var u=1;u<s-i;u++)r[i+u].length={type:"%",value:"".concat(a+(Number(l)-a)*u/(s-i))};i=s,a=Number(l)}}}var tle={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},nle=gc(function(r){var n;return r.type==="angular"?n=Number(r.value):n=tle[r.value]||0,To(n,"deg")}),rle=gc(function(r){var n=50,e=50,t="%",i="%";if((r==null?void 0:r.type)==="position"){var a=r.value,s=a.x,o=a.y;(s==null?void 0:s.type)==="position-keyword"&&(s.value==="left"?n=0:s.value==="center"?n=50:s.value==="right"?n=100:s.value==="top"?e=0:s.value==="bottom"&&(e=100)),(o==null?void 0:o.type)==="position-keyword"&&(o.value==="left"?n=0:o.value==="center"?e=50:o.value==="right"?n=100:o.value==="top"?e=0:o.value==="bottom"&&(e=100)),((s==null?void 0:s.type)==="px"||(s==null?void 0:s.type)==="%"||(s==null?void 0:s.type)==="em")&&(t=s==null?void 0:s.type,n=Number(s.value)),((o==null?void 0:o.type)==="px"||(o==null?void 0:o.type)==="%"||(o==null?void 0:o.type)==="em")&&(i=o==null?void 0:o.type,e=Number(o.value))}return{cx:To(n,t),cy:To(e,i)}}),ile=gc(function(r){if(r.indexOf("linear")>-1||r.indexOf("radial")>-1){var n=Koe(r);return n.map(function(o){var l=o.type,u=o.orientation,c=o.colorStops;ele(c);var d=c.map(function(T){return{offset:To(Number(T.length.value),"%"),color:Xoe(T)}});if(l==="linear-gradient")return new Pb(Mb.LinearGradient,{angle:u?nle(u):J_,steps:d});if(l==="radial-gradient"&&(u||(u=[{type:"shape",value:"circle"}]),u[0].type==="shape"&&u[0].value==="circle")){var h=rle(u[0].at),f=h.cx,v=h.cy,g;if(u[0].style){var m=u[0].style,y=m.type,w=m.value;y==="extent-keyword"?g=Yoe(w):g=To(w,y)}return new Pb(Mb.RadialGradient,{cx:f,cy:v,size:g,steps:d})}})}var e=r[0];if(r[1]==="("||r[2]==="("){if(e==="l"){var t=Joe.exec(r);if(t){var i,a=((i=t[2].match(QF))===null||i===void 0?void 0:i.map(function(o){return o.split(":")}))||[];return[new Pb(Mb.LinearGradient,{angle:To(parseFloat(t[1]),"deg"),steps:a.map(function(o){var l=qo(o,2),u=l[0],c=l[1];return{offset:To(Number(u)*100,"%"),color:c}})})]}}else if(e==="r"){var s=ale(r);if(s)if((0,Ze.Z)(s))r=s;else return[new Pb(Mb.RadialGradient,s)]}else if(e==="p")return sle(r)}});function ale(r){var n=Qoe.exec(r);if(n){var e,t=((e=n[4].match(QF))===null||e===void 0?void 0:e.map(function(i){return i.split(":")}))||[];return{cx:To(50,"%"),cy:To(50,"%"),steps:t.map(function(i){var a=qo(i,2),s=a[0],o=a[1];return{offset:To(Number(s)*100,"%"),color:o}})}}return null}function sle(r){var n=qoe.exec(r);if(n){var e=n[1],t=n[2];switch(e){case"a":e="repeat";break;case"x":e="repeat-x";break;case"y":e="repeat-y";break;case"n":e="no-repeat";break;default:e="no-repeat"}return{image:t,repetition:e}}return null}function COe(r){return!!r.type&&!!r.value}function uM(r){return r&&!!r.image}function Nb(r){return r&&!(0,xe.Z)(r.r)&&!(0,xe.Z)(r.g)&&!(0,xe.Z)(r.b)}var Wy=gc(function(r){if(uM(r))return _l({repetition:"repeat"},r);if((0,xe.Z)(r)&&(r=""),r==="transparent")return JF;if(r==="currentColor")r="black";else if(r==="none")return KF;var n=ile(r);if(n)return n;var e=bb(r),t=[0,0,0,0];return e!==null&&(t[0]=e.r||0,t[1]=e.g||0,t[2]=e.b||0,t[3]=e.opacity),Zoe.apply(void 0,t)});function ole(r,n){if(!(!Nb(r)||!Nb(n)))return[[Number(r.r),Number(r.g),Number(r.b),Number(r.alpha)],[Number(n.r),Number(n.g),Number(n.b),Number(n.alpha)],function(e){var t=e.slice();if(t[3])for(var i=0;i<3;i++)t[i]=Math.round((0,O.Z)(t[i],0,255));return t[3]=(0,O.Z)(t[3],0,1),"rgba(".concat(t.join(","),")")}]}function Yy(r,n){if((0,xe.Z)(n))return To(0,"px");if(n="".concat(n).trim().toLowerCase(),isFinite(Number(n))){if("px".search(r)>=0)return To(Number(n),"px");if("deg".search(r)>=0)return To(Number(n),"deg")}var e=[];n=n.replace(r,function(i){return e.push(i),"U".concat(i)});var t="U(".concat(r.source,")");return e.map(function(i){return To(Number(n.replace(new RegExp("U".concat(i),"g"),"").replace(new RegExp(t,"g"),"*0")),i)})[0]}var qF=function(n){return Yy(new RegExp("px","g"),n)},lle=gc(qF),ule=function(n){return Yy(new RegExp("%","g"),n)};gc(ule);var e4=function(n){return(0,pe.Z)(n)||isFinite(Number(n))?To(Number(n)||0,"px"):Yy(new RegExp("px|%|em|rem","g"),n)},cM=gc(e4),t4=function(n){return Yy(new RegExp("deg|rad|grad|turn","g"),n)},cle=gc(t4);function dle(r,n,e,t){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a="",s=r.value||0,o=n.value||0,l=sM(r.unit),u=r.convertTo(l),c=n.convertTo(l);return u&&c?(s=u.value,o=c.value,a=aM(r.unit)):(vs.isLength(r.unit)||vs.isLength(n.unit))&&(s=Td(r,i,e),o=Td(n,i,e),a="px"),[s,o,function(d){return t&&(d=Math.max(d,0)),d+a}]}function qc(r){var n=0;return r.unit===tr.kDegrees?n=r.value:r.unit===tr.kRadians?n=lh(Number(r.value)):r.unit===tr.kTurns?n=Soe(Number(r.value)):r.value&&(n=r.value),n}function n4(r,n){var e;return Array.isArray(r)?e=r.map(function(t){return Number(t)}):(0,Ze.Z)(r)?e=r.split(" ").map(function(t){return Number(t)}):(0,pe.Z)(r)&&(e=[r]),n===2?e.length===1?[e[0],e[0]]:[e[0],e[1]]:e.length===1?[e[0],e[0],e[0],e[0]]:e.length===2?[e[0],e[1],e[0],e[1]]:e.length===3?[e[0],e[1],e[2],e[1]]:[e[0],e[1],e[2],e[3]]}function Td(r,n,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(r.unit===tr.kPixels)return Number(r.value);if(r.unit===tr.kPercentage&&e){var i=e.nodeName===Ir.GROUP?e.getLocalBounds():e.getGeometryBounds();return(t?i.min[n]:0)+r.value/100*i.halfExtents[n]*2}return 0}var hle=function(n){return Yy(/deg|rad|grad|turn|px|%/g,n)},fle=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function vle(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(r=r.toLowerCase().trim(),r==="none")return[];for(var n=/\s*([\w-]+)\(([^)]*)\)/g,e=[],t,i=0;t=n.exec(r);){if(t.index!==i)return[];if(i=t.index+t[0].length,fle.indexOf(t[1])>-1&&e.push({name:t[1],params:t[2].split(" ").map(function(a){return hle(a)||Wy(a)})}),n.lastIndex===r.length)return e}return[]}function r4(r){return r.toString()}var i4=function(n){return typeof n=="number"?To(n):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(n)?To(Number(n)):To(0)},dM=gc(i4);gc(function(r){return(0,Ze.Z)(r)?r.split(" ").map(dM):r.map(dM)});function hM(r,n){return[r,n,r4]}function fM(r,n){return function(e,t){return[e,t,function(i){return r4((0,O.Z)(i,r,n))}]}}function a4(r,n){if(r.length===n.length)return[r,n,function(e){return e}]}function s4(r){return r.parsedStyle.d.totalLength===0&&(r.parsedStyle.d.totalLength=(0,Um.D)(r.parsedStyle.d.absolutePath)),r.parsedStyle.d.totalLength}function gle(r){return r.parsedStyle.points.totalLength===0&&(r.parsedStyle.points.totalLength=(0,Nt.hE)(r.parsedStyle.points.points)),r.parsedStyle.points.totalLength}function _le(r){for(var n=0;n<r.length;n++){var e=r[n-1],t=r[n],i=t[0];if(i==="M"&&e){var a=e[0],s=[t[1],t[2]],o=void 0;a==="L"||a==="M"?o=[e[1],e[2]]:(a==="C"||a==="A"||a==="Q")&&(o=[e[e.length-2],e[e.length-1]]),o&&Ob(s,o)&&(r.splice(n,1),n--)}}}function mle(r){for(var n=!1,e=r.length,t=0;t<e;t++){var i=r[t],a=i[0];if(a==="C"||a==="A"||a==="Q"){n=!0;break}}return n}function ple(r){for(var n=[],e=[],t=[],i=0;i<r.length;i++){var a=r[i],s=a[0];s==="M"?(t.length&&(e.push(t),t=[]),t.push([a[1],a[2]])):s==="Z"?t.length&&(n.push(t),t=[]):t.push([a[1],a[2]])}return t.length>0&&e.push(t),{polygons:n,polylines:e}}function Ob(r,n){return r[0]===n[0]&&r[1]===n[1]}function yle(r,n){for(var e=[],t=[],i=[],a=0;a<r.length;a++){var s=r[a],o=s.currentPoint,l=s.params,u=s.prePoint,c=void 0;switch(s.command){case"Q":c=(0,Nt.x4)(u[0],u[1],l[1],l[2],l[3],l[4]);break;case"C":c=(0,Nt.l5)(u[0],u[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var d=s.arcParams;c=(0,Nt.vp)(d.cx,d.cy,d.rx,d.ry,d.xRotation,d.startAngle,d.endAngle);break;default:e.push(o[0]),t.push(o[1]);break}c&&(s.box=c,e.push(c.x,c.x+c.width),t.push(c.y,c.y+c.height)),n&&(s.command==="L"||s.command==="M")&&s.prePoint&&s.nextPoint&&i.push(s)}e=e.filter(function(G){return!Number.isNaN(G)&&G!==1/0&&G!==-1/0}),t=t.filter(function(G){return!Number.isNaN(G)&&G!==1/0&&G!==-1/0});var h=(0,ne.Z)(e),f=(0,ne.Z)(t),v=(0,qe.Z)(e),g=(0,qe.Z)(t);if(i.length===0)return{x:h,y:f,width:v-h,height:g-f};for(var m=0;m<i.length;m++){var y=i[m],w=y.currentPoint,T=void 0;w[0]===h?(T=Rb(y,n),h-=T.xExtra):w[0]===v&&(T=Rb(y,n),v+=T.xExtra),w[1]===f?(T=Rb(y,n),f-=T.yExtra):w[1]===g&&(T=Rb(y,n),g+=T.yExtra)}return{x:h,y:f,width:v-h,height:g-f}}function Rb(r,n){var e=r.prePoint,t=r.currentPoint,i=r.nextPoint,a=Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2),s=Math.pow(t[0]-i[0],2)+Math.pow(t[1]-i[1],2),o=Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2),l=Math.acos((a+s-o)/(2*Math.sqrt(a)*Math.sqrt(s)));if(!l||Math.sin(l)===0||(0,dt.Z)(l,0))return{xExtra:0,yExtra:0};var u=Math.abs(Math.atan2(i[1]-t[1],i[0]-t[0])),c=Math.abs(Math.atan2(i[0]-t[0],i[1]-t[1]));u=u>Math.PI/2?Math.PI-u:u,c=c>Math.PI/2?Math.PI-c:c;var d={xExtra:Math.cos(l/2-u)*(n/2*(1/Math.sin(l/2)))-n/2||0,yExtra:Math.cos(c-l/2)*(n/2*(1/Math.sin(l/2)))-n/2||0};return d}function o4(r,n){return[n[0]+(n[0]-r[0]),n[1]+(n[1]-r[1])]}var l4=function(n,e){var t=n.x*e.x+n.y*e.y,i=Math.sqrt((Math.pow(n.x,2)+Math.pow(n.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2))),a=n.x*e.y-n.y*e.x<0?-1:1,s=a*Math.acos(t/i);return s},u4=function(n,e,t,i,a,s,o,l){e=Math.abs(e),t=Math.abs(t),i=(0,nt.Z)(i,360);var u=Qs(i);if(n.x===o.x&&n.y===o.y)return{x:n.x,y:n.y,ellipticalArcAngle:0};if(e===0||t===0)return{x:0,y:0,ellipticalArcAngle:0};var c=(n.x-o.x)/2,d=(n.y-o.y)/2,h={x:Math.cos(u)*c+Math.sin(u)*d,y:-Math.sin(u)*c+Math.cos(u)*d},f=Math.pow(h.x,2)/Math.pow(e,2)+Math.pow(h.y,2)/Math.pow(t,2);f>1&&(e*=Math.sqrt(f),t*=Math.sqrt(f));var v=Math.pow(e,2)*Math.pow(t,2)-Math.pow(e,2)*Math.pow(h.y,2)-Math.pow(t,2)*Math.pow(h.x,2),g=Math.pow(e,2)*Math.pow(h.y,2)+Math.pow(t,2)*Math.pow(h.x,2),m=v/g;m=m<0?0:m;var y=(a!==s?1:-1)*Math.sqrt(m),w={x:y*(e*h.y/t),y:y*(-(t*h.x)/e)},T={x:Math.cos(u)*w.x-Math.sin(u)*w.y+(n.x+o.x)/2,y:Math.sin(u)*w.x+Math.cos(u)*w.y+(n.y+o.y)/2},G={x:(h.x-w.x)/e,y:(h.y-w.y)/t},x=l4({x:1,y:0},G),_={x:(-h.x-w.x)/e,y:(-h.y-w.y)/t},p=l4(G,_);!s&&p>0?p-=2*Math.PI:s&&p<0&&(p+=2*Math.PI),p%=2*Math.PI;var b=x+p*l,R=e*Math.cos(b),B=t*Math.sin(b),j={x:Math.cos(u)*R-Math.sin(u)*B+T.x,y:Math.sin(u)*R+Math.cos(u)*B+T.y,ellipticalArcStartAngle:x,ellipticalArcEndAngle:x+p,ellipticalArcAngle:b,ellipticalArcCenter:T,resultantRx:e,resultantRy:t};return j};function xle(r){for(var n=[],e=null,t=null,i=null,a=0,s=r.length,o=0;o<s;o++){var l=r[o];t=r[o+1];var u=l[0],c={command:u,prePoint:e,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(u){case"M":i=[l[1],l[2]],a=o;break;case"A":var d=Ele(e,l);c.arcParams=d;break}if(u==="Z")e=i,t=r[a+1];else{var h=l.length;e=[l[h-2],l[h-1]]}t&&t[0]==="Z"&&(t=r[a],n[a]&&(n[a].prePoint=e)),c.currentPoint=e,n[a]&&Ob(e,n[a].currentPoint)&&(n[a].prePoint=c.prePoint);var f=t?[t[t.length-2],t[t.length-1]]:null;c.nextPoint=f;var v=c.prePoint;if(["L","H","V"].includes(u))c.startTangent=[v[0]-e[0],v[1]-e[1]],c.endTangent=[e[0]-v[0],e[1]-v[1]];else if(u==="Q"){var g=[l[1],l[2]];c.startTangent=[v[0]-g[0],v[1]-g[1]],c.endTangent=[e[0]-g[0],e[1]-g[1]]}else if(u==="T"){var m=n[o-1],y=o4(m.currentPoint,v);m.command==="Q"?(c.command="Q",c.startTangent=[v[0]-y[0],v[1]-y[1]],c.endTangent=[e[0]-y[0],e[1]-y[1]]):(c.command="TL",c.startTangent=[v[0]-e[0],v[1]-e[1]],c.endTangent=[e[0]-v[0],e[1]-v[1]])}else if(u==="C"){var w=[l[1],l[2]],T=[l[3],l[4]];c.startTangent=[v[0]-w[0],v[1]-w[1]],c.endTangent=[e[0]-T[0],e[1]-T[1]],c.startTangent[0]===0&&c.startTangent[1]===0&&(c.startTangent=[w[0]-T[0],w[1]-T[1]]),c.endTangent[0]===0&&c.endTangent[1]===0&&(c.endTangent=[T[0]-w[0],T[1]-w[1]])}else if(u==="S"){var G=n[o-1],x=o4(G.currentPoint,v),_=[l[1],l[2]];G.command==="C"?(c.command="C",c.startTangent=[v[0]-x[0],v[1]-x[1]],c.endTangent=[e[0]-_[0],e[1]-_[1]]):(c.command="SQ",c.startTangent=[v[0]-_[0],v[1]-_[1]],c.endTangent=[e[0]-_[0],e[1]-_[1]])}else if(u==="A"){var p=c4(c,0),b=p.x,R=p.y,B=c4(c,1,!1),j=B.x,Z=B.y;c.startTangent=[b,R],c.endTangent=[j,Z]}n.push(c)}return n}function c4(r,n){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,t=r.arcParams,i=t.rx,a=i===void 0?0:i,s=t.ry,o=s===void 0?0:s,l=t.xRotation,u=t.arcFlag,c=t.sweepFlag,d=u4({x:r.prePoint[0],y:r.prePoint[1]},a,o,l,!!u,!!c,{x:r.currentPoint[0],y:r.currentPoint[1]},n),h=u4({x:r.prePoint[0],y:r.prePoint[1]},a,o,l,!!u,!!c,{x:r.currentPoint[0],y:r.currentPoint[1]},e?n+.005:n-.005),f=h.x-d.x,v=h.y-d.y,g=Math.sqrt(f*f+v*v);return{x:-f/g,y:-v/g}}function Ab(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function vM(r,n){return Ab(r)*Ab(n)?(r[0]*n[0]+r[1]*n[1])/(Ab(r)*Ab(n)):1}function d4(r,n){return(r[0]*n[1]<r[1]*n[0]?-1:1)*Math.acos(vM(r,n))}function Ele(r,n){var e=n[1],t=n[2],i=(0,nt.Z)(Qs(n[3]),Math.PI*2),a=n[4],s=n[5],o=r[0],l=r[1],u=n[6],c=n[7],d=Math.cos(i)*(o-u)/2+Math.sin(i)*(l-c)/2,h=-1*Math.sin(i)*(o-u)/2+Math.cos(i)*(l-c)/2,f=d*d/(e*e)+h*h/(t*t);f>1&&(e*=Math.sqrt(f),t*=Math.sqrt(f));var v=e*e*(h*h)+t*t*(d*d),g=v?Math.sqrt((e*e*(t*t)-v)/v):1;a===s&&(g*=-1),isNaN(g)&&(g=0);var m=t?g*e*h/t:0,y=e?g*-t*d/e:0,w=(o+u)/2+Math.cos(i)*m-Math.sin(i)*y,T=(l+c)/2+Math.sin(i)*m+Math.cos(i)*y,G=[(d-m)/e,(h-y)/t],x=[(-1*d-m)/e,(-1*h-y)/t],_=d4([1,0],G),p=d4(G,x);return vM(G,x)<=-1&&(p=Math.PI),vM(G,x)>=1&&(p=0),s===0&&p>0&&(p-=2*Math.PI),s===1&&p<0&&(p+=2*Math.PI),{cx:w,cy:T,rx:Ob(r,[u,c])?0:e,ry:Ob(r,[u,c])?0:t,startAngle:_,endAngle:_+p,xRotation:i,arcFlag:a,sweepFlag:s}}function ble(r,n,e){return r.reduce(function(t,i){var a="";if(i[0]==="M"||i[0]==="L"){var s=vec3.fromValues(i[1],i[2],0);e&&vec3.transformMat4(s,s,e),a="".concat(i[0]).concat(s[0],",").concat(s[1])}else if(i[0]==="Z")a=i[0];else if(i[0]==="C"){var o=vec3.fromValues(i[1],i[2],0),l=vec3.fromValues(i[3],i[4],0),u=vec3.fromValues(i[5],i[6],0);e&&(vec3.transformMat4(o,o,e),vec3.transformMat4(l,l,e),vec3.transformMat4(u,u,e)),a="".concat(i[0]).concat(o[0],",").concat(o[1],",").concat(l[0],",").concat(l[1],",").concat(u[0],",").concat(u[1])}else if(i[0]==="A"){var c=vec3.fromValues(i[6],i[7],0);e&&vec3.transformMat4(c,c,e),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],",").concat(i[5],",").concat(c[0],",").concat(c[1])}else if(i[0]==="Q"){var d=vec3.fromValues(i[1],i[2],0),h=vec3.fromValues(i[3],i[4],0);e&&(vec3.transformMat4(d,d,e),vec3.transformMat4(h,h,e)),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],"}")}return t+=a},"")}function kle(r,n,e,t){return[["M",r,n],["L",e,t]]}function h4(r,n,e,t){var i=(-1+Math.sqrt(2))/3*4,a=r*i,s=n*i,o=e-r,l=e+r,u=t-n,c=t+n;return[["M",o,t],["C",o,t-s,e-a,u,e,u],["C",e+a,u,l,t-s,l,t],["C",l,t+s,e+a,c,e,c],["C",e-a,c,o,t+s,o,t],["Z"]]}function wle(r,n){var e=r.map(function(t,i){return[i===0?"M":"L",t[0],t[1]]});return n&&e.push(["Z"]),e}function Sle(r,n,e,t,i){if(i){var a=_slicedToArray(i,4),s=a[0],o=a[1],l=a[2],u=a[3],c=r>0?1:-1,d=n>0?1:-1,h=c+d!==0?1:0;return[["M",c*s+e,t],["L",r-c*o+e,t],o?["A",o,o,0,0,h,r+e,d*o+t]:null,["L",r+e,n-d*l+t],l?["A",l,l,0,0,h,r+e-c*l,n+t]:null,["L",e+c*u,n+t],u?["A",u,u,0,0,h,e,n+t-d*u]:null,["L",e,d*s+t],s?["A",s,s,0,0,h,c*s+e,t]:null,["Z"]].filter(function(f){return f})}return[["M",e,t],["L",e+r,t],["L",e+r,t+n],["L",e,t+n],["Z"]]}function MOe(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r.getLocalTransform(),e=[];switch(r.nodeName){case Ir.LINE:var t=r.parsedStyle,i=t.x1,a=i===void 0?0:i,s=t.y1,o=s===void 0?0:s,l=t.x2,u=l===void 0?0:l,c=t.y2,d=c===void 0?0:c;e=kle(a,o,u,d);break;case Ir.CIRCLE:{var h=r.parsedStyle,f=h.r,v=f===void 0?0:f,g=h.cx,m=g===void 0?0:g,y=h.cy,w=y===void 0?0:y;e=h4(v,v,m,w);break}case Ir.ELLIPSE:{var T=r.parsedStyle,G=T.rx,x=G===void 0?0:G,_=T.ry,p=_===void 0?0:_,b=T.cx,R=b===void 0?0:b,B=T.cy,j=B===void 0?0:B;e=h4(x,p,R,j);break}case Ir.POLYLINE:case Ir.POLYGON:var Z=r.parsedStyle.points;e=wle(Z.points,r.nodeName===Ir.POLYGON);break;case Ir.RECT:var te=r.parsedStyle,le=te.width,ue=le===void 0?0:le,se=te.height,V=se===void 0?0:se,ee=te.x,he=ee===void 0?0:ee,ut=te.y,ct=ut===void 0?0:ut,Lt=te.radius,vn=Lt&&Lt.some(function(rn){return rn!==0});e=Sle(ue,V,he,ct,vn&&Lt.map(function(rn){return clamp(rn,0,Math.min(Math.abs(ue)/2,Math.abs(V)/2))}));break;case Ir.PATH:var tn=r.parsedStyle.d.absolutePath;e=_toConsumableArray(tn);break}if(e.length)return ble(e,r,n)}function POe(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a=r.map(function(s,o){var l=s[0],u=r[o+1],c=o===0&&(n!==0||e!==0),d=(o===r.length-1||u&&(u[0]==="M"||u[0]==="Z"))&&t!==0&&i!==0,h=c?[n,e]:[0,0],f=_slicedToArray(h,2),v=f[0],g=f[1],m=d?[t,i]:[0,0],y=_slicedToArray(m,2),w=y[0],T=y[1];switch(l){case"M":return"M ".concat(s[1]+v,",").concat(s[2]+g);case"L":return"L ".concat(s[1]+w,",").concat(s[2]+T);case"Q":return"Q ".concat(s[1]," ").concat(s[2],",").concat(s[3]+w," ").concat(s[4]+T);case"C":return"C ".concat(s[1]," ").concat(s[2],",").concat(s[3]," ").concat(s[4],",").concat(s[5]+w," ").concat(s[6]+T);case"A":return"A ".concat(s[1]," ").concat(s[2]," ").concat(s[3]," ").concat(s[4]," ").concat(s[5]," ").concat(s[6]+w," ").concat(s[7]+T);case"Z":return"Z";default:return null}}).filter(function(s){return s!==null}).join(" ");return~a.indexOf("NaN")?"":a}var f4=function(n){if(n===""||Array.isArray(n)&&n.length===0)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var e;try{e=(0,xt.A)(n)}catch(f){e=(0,xt.A)(""),console.error("[g]: Invalid SVG Path definition: ".concat(n))}_le(e);var t=mle(e),i=ple(e),a=i.polygons,s=i.polylines,o=xle(e),l=yle(o,0),u=l.x,c=l.y,d=l.width,h=l.height;return{absolutePath:e,hasArc:t,segments:o,polygons:a,polylines:s,totalLength:0,rect:{x:Number.isFinite(u)?u:0,y:Number.isFinite(c)?c:0,width:Number.isFinite(d)?d:0,height:Number.isFinite(h)?h:0}}},Tle=gc(f4);function v4(r){return(0,Ze.Z)(r)?Tle(r):f4(r)}function Cle(r,n,e){var t=r.curve,i=n.curve;(!t||t.length===0)&&(t=(0,bt.Y)(r.absolutePath,!1),r.curve=t),(!i||i.length===0)&&(i=(0,bt.Y)(n.absolutePath,!1),n.curve=i);var a=[t,i];t.length!==i.length&&(a=(0,wt.x)(t,i));var s=(0,we.b)(a[0])!==(0,we.b)(a[1])?(0,oe.G)(a[0]):(0,Fe.U)(a[0]);return[s,(0,Ye.g)(a[1],s),function(o){return o}]}function Mle(r,n){var e;return(0,Ze.Z)(r)?e=r.split(" ").map(function(t){var i=t.split(","),a=qo(i,2),s=a[0],o=a[1];return[Number(s),Number(o)]}):e=r,{points:e,totalLength:0,segments:[]}}function Ple(r,n){return[r.points,n.points,function(e){return e}]}var tl=null,zp=/\s*(\w+)\(([^)]*)\)/g;function ed(r){return function(n){var e=0;return r.map(function(t){return t===tl?n[e++]:t})}}function Q_(r){return r}var Zy={matrix:["NNNNNN",[tl,tl,0,0,tl,tl,0,0,0,0,1,0,tl,tl,0,1],Q_],matrix3d:["NNNNNNNNNNNNNNNN",Q_],rotate:["A"],rotateX:["A"],rotateY:["A"],rotateZ:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",ed([tl,tl,new vs(1)]),Q_],scaleX:["N",ed([tl,new vs(1),new vs(1)]),ed([tl,new vs(1)])],scaleY:["N",ed([new vs(1),tl,new vs(1)]),ed([new vs(1),tl])],scaleZ:["N",ed([new vs(1),new vs(1),tl])],scale3d:["NNN",Q_],skew:["Aa",null,Q_],skewX:["A",null,ed([tl,J_])],skewY:["A",null,ed([J_,tl])],translate:["Tt",ed([tl,tl,hf]),Q_],translateX:["T",ed([tl,hf,hf]),ed([tl,hf])],translateY:["T",ed([hf,tl,hf]),ed([hf,tl])],translateZ:["L",ed([hf,hf,tl])],translate3d:["TTL",Q_]};function g4(r){for(var n=[],e=r.length,t=0;t<e;t++){var i=r[t],a=i[0],s=i.slice(1);a==="translate"||a==="skew"?s.length===1&&s.push(0):a==="scale"&&s.length===1&&s.push(s[0]);var o=Zy[a];if(!o)return[];var l=s.map(function(u){return To(u)});n.push({t:a,d:l})}return n}function Nle(r){if(Array.isArray(r))return g4(r);if(r=(r||"none").trim(),r==="none")return[];var n=[],e,t=0;for(zp.lastIndex=0;e=zp.exec(r);){if(e.index!==t)return[];t=e.index+e[0].length;var i=e[1],a=Zy[i];if(!a)return[];var s=e[2].split(","),o=a[0];if(o.length<s.length)return[];for(var l=[],u=0;u<o.length;u++){var c=s[u],d=o[u],h=void 0;if(c?h={A:function(v){return v.trim()==="0"?J_:cle(v)},N:dM,T:cM,L:lle}[d.toUpperCase()](c):h={a:J_,n:l[0],t:hf}[d],h===void 0)return[];l.push(h)}if(n.push({t:i,d:l}),zp.lastIndex===r.length)return n}return[]}function Ole(r){if(Array.isArray(r))return g4(r);if(r=(r||"none").trim(),r==="none")return[];var n=[],e,t=0;for(zp.lastIndex=0;e=zp.exec(r);){if(e.index!==t)return[];t=e.index+e[0].length;var i=e[1],a=Zy[i];if(!a)return[];var s=e[2].split(","),o=a[0];if(o.length<s.length)return[];for(var l=[],u=0;u<o.length;u++){var c=s[u],d=o[u],h=void 0;if(c?h={A:function(v){return v.trim()==="0"?J_:t4(v)},N:i4,T:e4,L:qF}[d.toUpperCase()](c):h={a:J_,n:l[0],t:hf}[d],h===void 0)return[];l.push(h)}if(n.push({t:i,d:l}),zp.lastIndex===r.length)return n}return[]}function Rle(r){var n,e,t,i;switch(r.t){case"rotateX":return i=Qs(qc(r.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotateY":return i=Qs(qc(r.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotateZ":return i=Qs(qc(r.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":n=r.d[0].value,e=r.d[1].value,t=r.d[2].value,i=Qs(qc(r.d[3]));var a=n*n+e*e+t*t;if(a===0)n=1,e=0,t=0;else if(a!==1){var s=Math.sqrt(a);n/=s,e/=s,t/=s}var o=Math.sin(i/2),l=o*Math.cos(i/2),u=o*o;return[1-2*(e*e+t*t)*u,2*(n*e*u+t*l),2*(n*t*u-e*l),0,2*(n*e*u-t*l),1-2*(n*n+t*t)*u,2*(e*t*u+n*l),0,2*(n*t*u+e*l),2*(e*t*u-n*l),1-2*(n*n+e*e)*u,0,0,0,0,1];case"scale":return[r.d[0].value,0,0,0,0,r.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scaleX":return[r.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaleY":return[1,0,0,0,0,r.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scaleZ":return[1,0,0,0,0,1,0,0,0,0,r.d[0].value,0,0,0,0,1];case"scale3d":return[r.d[0].value,0,0,0,0,r.d[1].value,0,0,0,0,r.d[2].value,0,0,0,0,1];case"skew":var c=Qs(qc(r.d[0])),d=Qs(qc(r.d[1]));return[1,Math.tan(d),0,0,Math.tan(c),1,0,0,0,0,1,0,0,0,0,1];case"skewX":return i=Qs(qc(r.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewY":return i=Qs(qc(r.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return n=Td(r.d[0],0,null)||0,e=Td(r.d[1],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,e,0,1];case"translateX":return n=Td(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,0,0,1];case"translateY":return e=Td(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,e,0,1];case"translateZ":return t=Td(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,t,1];case"translate3d":return n=Td(r.d[0],0,null)||0,e=Td(r.d[1],0,null)||0,t=Td(r.d[2],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,e,t,1];case"perspective":var h=Td(r.d[0],0,null)||0,f=h?-1/h:0;return[1,0,0,0,0,1,0,0,0,0,1,f,0,0,0,1];case"matrix":return[r.d[0].value,r.d[1].value,0,0,r.d[2].value,r.d[3].value,0,0,0,0,1,0,r.d[4].value,r.d[5].value,0,1];case"matrix3d":return r.d.map(function(v){return v.value})}}function Ale(r,n){return[r[0]*n[0]+r[4]*n[1]+r[8]*n[2]+r[12]*n[3],r[1]*n[0]+r[5]*n[1]+r[9]*n[2]+r[13]*n[3],r[2]*n[0]+r[6]*n[1]+r[10]*n[2]+r[14]*n[3],r[3]*n[0]+r[7]*n[1]+r[11]*n[2]+r[15]*n[3],r[0]*n[4]+r[4]*n[5]+r[8]*n[6]+r[12]*n[7],r[1]*n[4]+r[5]*n[5]+r[9]*n[6]+r[13]*n[7],r[2]*n[4]+r[6]*n[5]+r[10]*n[6]+r[14]*n[7],r[3]*n[4]+r[7]*n[5]+r[11]*n[6]+r[15]*n[7],r[0]*n[8]+r[4]*n[9]+r[8]*n[10]+r[12]*n[11],r[1]*n[8]+r[5]*n[9]+r[9]*n[10]+r[13]*n[11],r[2]*n[8]+r[6]*n[9]+r[10]*n[10]+r[14]*n[11],r[3]*n[8]+r[7]*n[9]+r[11]*n[10]+r[15]*n[11],r[0]*n[12]+r[4]*n[13]+r[8]*n[14]+r[12]*n[15],r[1]*n[12]+r[5]*n[13]+r[9]*n[14]+r[13]*n[15],r[2]*n[12]+r[6]*n[13]+r[10]*n[14]+r[14]*n[15],r[3]*n[12]+r[7]*n[13]+r[11]*n[14]+r[15]*n[15]]}function Lle(r){return r.length===0?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:r.map(Rle).reduce(Ale)}function _4(r){var n=[0,0,0],e=[1,1,1],t=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return Noe(Lle(r),n,e,t,i,a),[[n,e,t,a,i]]}var Ile=function(){function r(t,i){for(var a=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],s=0;s<4;s++)for(var o=0;o<4;o++)for(var l=0;l<4;l++)a[s][o]+=i[s][l]*t[l][o];return a}function n(t){return t[0][2]===0&&t[0][3]===0&&t[1][2]===0&&t[1][3]===0&&t[2][0]===0&&t[2][1]===0&&t[2][2]===1&&t[2][3]===0&&t[3][2]===0&&t[3][3]===1}function e(t,i,a,s,o){for(var l=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],u=0;u<4;u++)l[u][3]=o[u];for(var c=0;c<3;c++)for(var d=0;d<3;d++)l[3][c]+=t[d]*l[d][c];var h=s[0],f=s[1],v=s[2],g=s[3],m=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];m[0][0]=1-2*(f*f+v*v),m[0][1]=2*(h*f-v*g),m[0][2]=2*(h*v+f*g),m[1][0]=2*(h*f+v*g),m[1][1]=1-2*(h*h+v*v),m[1][2]=2*(f*v-h*g),m[2][0]=2*(h*v-f*g),m[2][1]=2*(f*v+h*g),m[2][2]=1-2*(h*h+f*f),l=r(l,m);var y=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];a[2]&&(y[2][1]=a[2],l=r(l,y)),a[1]&&(y[2][1]=0,y[2][0]=a[0],l=r(l,y)),a[0]&&(y[2][0]=0,y[1][0]=a[0],l=r(l,y));for(var w=0;w<3;w++)for(var T=0;T<3;T++)l[w][T]*=i[w];return n(l)?[l[0][0],l[0][1],l[1][0],l[1][1],l[3][0],l[3][1]]:l[0].concat(l[1],l[2],l[3])}return e}();function Dle(r){return r.toFixed(6).replace(".000000","")}function gM(r,n){var e,t;return r.decompositionPair!==n&&(r.decompositionPair=n,e=_4(r)),n.decompositionPair!==r&&(n.decompositionPair=r,t=_4(n)),e[0]===null||t[0]===null?[[!1],[!0],function(i){return i?n[0].d:r[0].d}]:(e[0].push(0),t[0].push(1),[e,t,function(i){var a=Ble(e[0][3],t[0][3],i[5]),s=Ile(i[0],i[1],i[2],a,i[4]),o=s.map(Dle).join(",");return o}])}function Fle(r,n){for(var e=0,t=0;t<r.length;t++)e+=r[t]*n[t];return e}function Ble(r,n,e){var t=Fle(r,n);t=(0,O.Z)(t,-1,1);var i=[];if(t===1)i=r;else for(var a=Math.acos(t),s=Math.sin(e*a)*1/Math.sqrt(1-t*t),o=0;o<4;o++)i.push(r[o]*(Math.cos(e*a)-t*s)+n[o]*s);return i}function _M(r){return r.replace(/[XY]/,"")}function mM(r){return r.replace(/(X|Y|Z|3d)?$/,"3d")}var $le=function(n,e){return n==="perspective"&&e==="perspective"||(n==="matrix"||n==="matrix3d")&&(e==="matrix"||e==="matrix3d")};function Gle(r,n,e){var t=!1;if(!r.length||!n.length){r.length||(t=!0,r=n,n=[]);for(var i=function(){var j=r[a],Z=j.t,te=j.d,le=Z.substring(0,5)==="scale"?1:0;n.push({t:Z,d:te.map(function(ue){return typeof ue=="number"?To(le):To(le,ue.unit)})})},a=0;a<r.length;a++)i()}var s=[],o=[],l=[];if(r.length!==n.length){var u=gM(r,n);s=[u[0]],o=[u[1]],l=[["matrix",[u[2]]]]}else for(var c=0;c<r.length;c++){var d=r[c].t,h=n[c].t,f=r[c].d,v=n[c].d,g=Zy[d],m=Zy[h],y=void 0;if($le(d,h)){var w=gM([r[c]],[n[c]]);s.push(w[0]),o.push(w[1]),l.push(["matrix",[w[2]]]);continue}else if(d===h)y=d;else if(g[2]&&m[2]&&_M(d)===_M(h))y=_M(d),f=g[2](f),v=m[2](v);else if(g[1]&&m[1]&&mM(d)===mM(h))y=mM(d),f=g[1](f),v=m[1](v);else{var T=gM(r,n);s=[T[0]],o=[T[1]],l=[["matrix",[T[2]]]];break}for(var G=[],x=[],_=[],p=0;p<f.length;p++){var b=dle(f[p],v[p],e,!1,p);G[p]=b[0],x[p]=b[1],_.push(b[2])}s.push(G),o.push(x),l.push([y,_])}if(t){var R=s;s=o,o=R}return[s,o,function(B){return B.map(function(j,Z){var te=j.map(function(le,ue){return l[Z][1][ue](le)}).join(",");return l[Z][0]==="matrix"&&te.split(",").length===16&&(l[Z][0]="matrix3d"),l[Z][0]==="matrix3d"&&te.split(",").length===6&&(l[Z][0]="matrix"),"".concat(l[Z][0],"(").concat(te,")")}).join(" ")}]}var zle=gc(function(r){if((0,Ze.Z)(r)){if(r==="text-anchor")return[To(0,"px"),To(0,"px")];var n=r.split(" ");return n.length===1&&(n[0]==="top"||n[0]==="bottom"?(n[1]=n[0],n[0]="center"):n[1]="center"),n.length!==2?null:[cM(m4(n[0])),cM(m4(n[1]))]}return[To(r[0]||0,"px"),To(r[1]||0,"px")]});function m4(r){return r==="center"?"50%":r==="left"||r==="top"?"0%":r==="right"||r==="bottom"?"100%":r}var p4=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:Wn.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:Wn.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:Wn.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:Wn.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:Wn.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:Wn.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:Wn.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:Wn.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:Wn.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:Wn.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:Wn.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:Wn.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:Wn.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:Wn.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:Wn.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:Wn.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:Wn.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:Wn.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:Wn.FILTER},{n:"clipPath",syntax:Wn.DEFINED_PATH},{n:"textPath",syntax:Wn.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:Wn.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:Wn.TRANSFORM},{n:"transformOrigin",p:100,d:"0 0",l:!0,syntax:Wn.TRANSFORM_ORIGIN},{n:"cx",int:!0,l:!0,d:"0",syntax:Wn.COORDINATE},{n:"cy",int:!0,l:!0,d:"0",syntax:Wn.COORDINATE},{n:"cz",int:!0,l:!0,d:"0",syntax:Wn.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:Wn.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:Wn.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:Wn.LENGTH_PERCENTAGE},{n:"x",int:!0,l:!0,d:"0",syntax:Wn.COORDINATE},{n:"y",int:!0,l:!0,d:"0",syntax:Wn.COORDINATE},{n:"z",int:!0,l:!0,d:"0",syntax:Wn.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:Wn.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:Wn.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:Wn.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:Wn.COORDINATE},{n:"y1",int:!0,l:!0,syntax:Wn.COORDINATE},{n:"z1",int:!0,l:!0,syntax:Wn.COORDINATE},{n:"x2",int:!0,l:!0,syntax:Wn.COORDINATE},{n:"y2",int:!0,l:!0,syntax:Wn.COORDINATE},{n:"z2",int:!0,l:!0,syntax:Wn.COORDINATE},{n:"d",int:!0,l:!0,d:"",syntax:Wn.PATH,p:50},{n:"points",int:!0,l:!0,syntax:Wn.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:Wn.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:Wn.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:Wn.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:Wn.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:Wn.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:Wn.NUMBER,d:function(n){return n===Ir.PATH||n===Ir.POLYGON||n===Ir.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:Wn.MARKER},{n:"markerEnd",syntax:Wn.MARKER},{n:"markerMid",syntax:Wn.MARKER},{n:"markerStartOffset",syntax:Wn.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:Wn.LENGTH,l:!0,int:!0,d:"0"}],Vle=new Set(p4.filter(function(r){return!!r.l}).map(function(r){return r.n})),Ule={},jle=function(){function r(n){var e=this;Mr(this,r),this.runtime=n,p4.forEach(function(t){e.registerMetadata(t)})}return Pr(r,[{key:"registerMetadata",value:function(e){[e.n].concat(Dl(e.a||[])).forEach(function(t){Ule[t]=e})}},{key:"getPropertySyntax",value:function(e){return this.runtime.CSSPropertySyntaxFactory[e]}},{key:"processProperties",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0};Object.assign(e.attributes,t);var a=e.parsedStyle.clipPath,s=e.parsedStyle.offsetPath;Hle(e,t);var o=!!i.forceUpdateGeometry;if(!o){for(var l in t)if(Vle.has(l)){o=!0;break}}var u=y4(e);u.has("fill")&&t.fill&&(e.parsedStyle.fill=Wy(t.fill)),u.has("stroke")&&t.stroke&&(e.parsedStyle.stroke=Wy(t.stroke)),u.has("shadowColor")&&t.shadowColor&&(e.parsedStyle.shadowColor=Wy(t.shadowColor)),u.has("filter")&&t.filter&&(e.parsedStyle.filter=vle(t.filter)),u.has("radius")&&!(0,xe.Z)(t.radius)&&(e.parsedStyle.radius=n4(t.radius,4)),u.has("lineDash")&&!(0,xe.Z)(t.lineDash)&&(e.parsedStyle.lineDash=n4(t.lineDash,2)),u.has("points")&&t.points&&(e.parsedStyle.points=Mle(t.points)),u.has("d")&&t.d===""&&(e.parsedStyle.d=_l({},YF)),u.has("d")&&t.d&&(e.parsedStyle.d=v4(t.d)),u.has("textTransform")&&t.textTransform&&this.runtime.CSSPropertySyntaxFactory[Wn.TEXT_TRANSFORM].calculator(null,null,{value:t.textTransform},e,null),u.has("clipPath")&&!(0,ie.Z)(t.clipPath)&&this.runtime.CSSPropertySyntaxFactory[Wn.DEFINED_PATH].calculator("clipPath",a,t.clipPath,e,this.runtime),u.has("offsetPath")&&t.offsetPath&&this.runtime.CSSPropertySyntaxFactory[Wn.DEFINED_PATH].calculator("offsetPath",s,t.offsetPath,e,this.runtime),u.has("transform")&&t.transform&&(e.parsedStyle.transform=Nle(t.transform)),u.has("transformOrigin")&&t.transformOrigin&&(e.parsedStyle.transformOrigin=zle(t.transformOrigin)),u.has("markerStart")&&t.markerStart&&(e.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory[Wn.MARKER].calculator(null,t.markerStart,t.markerStart,null,null)),u.has("markerEnd")&&t.markerEnd&&(e.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory[Wn.MARKER].calculator(null,t.markerEnd,t.markerEnd,null,null)),u.has("markerMid")&&t.markerMid&&(e.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory[Wn.MARKER].calculator("",t.markerMid,t.markerMid,null,null)),u.has("zIndex")&&!(0,xe.Z)(t.zIndex)&&this.runtime.CSSPropertySyntaxFactory[Wn.Z_INDEX].postProcessor(e),u.has("offsetDistance")&&!(0,xe.Z)(t.offsetDistance)&&this.runtime.CSSPropertySyntaxFactory[Wn.OFFSET_DISTANCE].postProcessor(e),u.has("transform")&&t.transform&&this.runtime.CSSPropertySyntaxFactory[Wn.TRANSFORM].postProcessor(e),u.has("transformOrigin")&&t.transformOrigin&&this.runtime.CSSPropertySyntaxFactory[Wn.TRANSFORM_ORIGIN].postProcessor(e),o&&(e.geometry.dirty=!0,e.renderable.boundsDirty=!0,e.renderable.renderBoundsDirty=!0,i.forceUpdateGeometry||this.runtime.sceneGraphService.dirtifyToRoot(e))}},{key:"updateGeometry",value:function(e){var t=e.nodeName,i=this.runtime.geometryUpdaterFactory[t];if(i){var a=e.geometry;a.contentBounds||(a.contentBounds=new Jc),a.renderBounds||(a.renderBounds=new Jc);var s=e.parsedStyle,o=i.update(s,e),l=o.cx,u=l===void 0?0:l,c=o.cy,d=c===void 0?0:c,h=o.cz,f=h===void 0?0:h,v=o.hwidth,g=v===void 0?0:v,m=o.hheight,y=m===void 0?0:m,w=o.hdepth,T=w===void 0?0:w,G=[Math.abs(g),Math.abs(y),T],x=s.stroke,_=s.lineWidth,p=_===void 0?1:_,b=s.increasedLineWidthForHitTesting,R=b===void 0?0:b,B=s.shadowType,j=B===void 0?"outer":B,Z=s.shadowColor,te=s.filter,le=te===void 0?[]:te,ue=s.transformOrigin,se=[u,d,f];a.contentBounds.update(se,G);var V=t===Ir.POLYLINE||t===Ir.POLYGON||t===Ir.PATH?Math.SQRT2:.5,ee=x&&!x.isNone;if(ee){var he=((p||0)+(R||0))*V;G[0]+=he,G[1]+=he}if(a.renderBounds.update(se,G),Z&&j&&j!=="inner"){var ut=a.renderBounds,ct=ut.min,Lt=ut.max,vn=s.shadowBlur,tn=s.shadowOffsetX,rn=s.shadowOffsetY,mn=vn||0,ar=tn||0,gi=rn||0,kr=ct[0]-mn+ar,Ta=Lt[0]+mn+ar,Wa=ct[1]-mn+gi,la=Lt[1]+mn+gi;ct[0]=Math.min(ct[0],kr),Lt[0]=Math.max(Lt[0],Ta),ct[1]=Math.min(ct[1],Wa),Lt[1]=Math.max(Lt[1],la),a.renderBounds.setMinMax(ct,Lt)}le.forEach(function(so){var oo=so.name,qi=so.params;if(oo==="blur"){var lo=qi[0].value;a.renderBounds.update(a.renderBounds.center,E.IH(a.renderBounds.halfExtents,a.renderBounds.halfExtents,[lo,lo,0]))}else if(oo==="drop-shadow"){var uo=qi[0].value,co=qi[1].value,ea=qi[2].value,ho=a.renderBounds,Rr=ho.min,Ar=ho.max,Gu=Rr[0]-ea+uo,zu=Ar[0]+ea+uo,Vu=Rr[1]-ea+co,Uu=Ar[1]+ea+co;Rr[0]=Math.min(Rr[0],Gu),Ar[0]=Math.max(Ar[0],zu),Rr[1]=Math.min(Rr[1],Vu),Ar[1]=Math.max(Ar[1],Uu),a.renderBounds.setMinMax(Rr,Ar)}}),e.geometry.dirty=!1;var ys=g<0,Jl=y<0,xs=(ys?-1:1)*(ue?Td(ue[0],0,e,!0):0),Es=(Jl?-1:1)*(ue?Td(ue[1],1,e,!0):0);(xs||Es)&&e.setOrigin(xs,Es)}}},{key:"updateSizeAttenuation",value:function(e,t){e.style.isSizeAttenuation?(e.style.rawLineWidth||(e.style.rawLineWidth=e.style.lineWidth),e.style.lineWidth=(e.style.rawLineWidth||1)/t,e.nodeName===Ir.CIRCLE&&(e.style.rawR||(e.style.rawR=e.style.r),e.style.r=(e.style.rawR||1)/t)):(e.style.rawLineWidth&&(e.style.lineWidth=e.style.rawLineWidth,delete e.style.rawLineWidth),e.nodeName===Ir.CIRCLE&&e.style.rawR&&(e.style.r=e.style.rawR,delete e.style.rawR))}}])}();function Hle(r,n){var e=y4(r);for(var t in n)e.has(t)&&(r.parsedStyle[t]=n[t])}function y4(r){return r.constructor.PARSED_STYLE_LIST}var Wle=function(){function r(){Mr(this,r),this.mixer=hM}return Pr(r,[{key:"calculator",value:function(e,t,i,a){return qc(i)}}])}(),Yle=function(){function r(){Mr(this,r)}return Pr(r,[{key:"calculator",value:function(e,t,i,a,s){return i instanceof uh&&(i=null),s.sceneGraphService.updateDisplayObjectDependency(e,t,i,a),e==="clipPath"&&a.forEach(function(o){o.childNodes.length===0&&s.sceneGraphService.dirtifyToRoot(o)}),i}}])}(),Zle=function(){function r(){Mr(this,r),this.parser=Wy,this.mixer=ole}return Pr(r,[{key:"calculator",value:function(e,t,i,a){return i instanceof uh?i.value==="none"?KF:JF:i}}])}(),Xle=function(){function r(){Mr(this,r)}return Pr(r,[{key:"calculator",value:function(e,t,i){return i instanceof uh?[]:i}}])}();function x4(r){var n=r.parsedStyle,e=n.fontSize;return(0,xe.Z)(e)?null:e}var pM=function(){function r(){Mr(this,r),this.mixer=hM}return Pr(r,[{key:"calculator",value:function(e,t,i,a,s){if((0,pe.Z)(i))return i;if(vs.isRelativeUnit(i.unit)){if(i.unit===tr.kPercentage)return 0;if(i.unit===tr.kEms){if(a.parentNode){var o=x4(a.parentNode);if(o)return o*=i.value,o}return 0}if(i.unit===tr.kRems){var l;if(a!=null&&(l=a.ownerDocument)!==null&&l!==void 0&&l.documentElement){var u=x4(a.ownerDocument.documentElement);if(u)return u*=i.value,u}return 0}}else return i.value}}])}(),Kle=function(){function r(){Mr(this,r),this.mixer=a4}return Pr(r,[{key:"calculator",value:function(e,t,i){return i.map(function(a){return a.value})}}])}(),Jle=function(){function r(){Mr(this,r),this.mixer=a4}return Pr(r,[{key:"calculator",value:function(e,t,i){return i.map(function(a){return a.value})}}])}(),Qle=function(){function r(){Mr(this,r)}return Pr(r,[{key:"calculator",value:function(e,t,i,a){var s;i instanceof uh&&(i=null);var o=(s=i)===null||s===void 0?void 0:s.cloneNode(!0);return o&&(o.style.isMarker=!0),o}}])}(),qle=function(){function r(){Mr(this,r),this.mixer=hM}return Pr(r,[{key:"calculator",value:function(e,t,i){return i.value}}])}(),eue=function(){function r(){Mr(this,r),this.mixer=fM(0,1)}return Pr(r,[{key:"calculator",value:function(e,t,i){return i.value}},{key:"postProcessor",value:function(e){var t=e.parsedStyle,i=t.offsetPath,a=t.offsetDistance;if(i){var s=i.nodeName;if(s===Ir.LINE||s===Ir.PATH||s===Ir.POLYLINE){var o=i.getPoint(a);o&&e.setLocalPosition(o.x,o.y)}}}}])}(),tue=function(){function r(){Mr(this,r),this.mixer=fM(0,1)}return Pr(r,[{key:"calculator",value:function(e,t,i){return i.value}}])}(),nue=function(){function r(){Mr(this,r),this.parser=v4,this.mixer=Cle}return Pr(r,[{key:"calculator",value:function(e,t,i){return i instanceof uh&&i.value==="unset"?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new $p(0,0,0,0)}:i}}])}(),rue=Pr(function r(){Mr(this,r),this.mixer=Ple}),iue=function(r){function n(){var e;Mr(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ks(this,n,[].concat(i)),e.mixer=fM(0,1/0),e}return Js(n,r),Pr(n)}(pM),aue=function(){function r(){Mr(this,r)}return Pr(r,[{key:"calculator",value:function(e,t,i,a){return i instanceof uh?i.value==="unset"?"":i.value:"".concat(i)}},{key:"postProcessor",value:function(e){e.nodeValue="".concat(e.parsedStyle.text)||""}}])}(),sue=function(){function r(){Mr(this,r)}return Pr(r,[{key:"calculator",value:function(e,t,i,a){var s=a.getAttribute("text");if(s){var o=s;i.value==="capitalize"?o=s.charAt(0).toUpperCase()+s.slice(1):i.value==="lowercase"?o=s.toLowerCase():i.value==="uppercase"&&(o=s.toUpperCase()),a.parsedStyle.text=o}return i.value}}])}(),NOe=function(n){return Object.fromEntries(Object.entries(n).filter(function(e){var t=_slicedToArray(e,2),i=t[1];return i!==void 0}))},yM=new WeakMap;function OOe(r,n,e){if(r){var t=typeof r=="string"?document.getElementById(r):r;yM.has(t)&&yM.get(t).destroy(e),yM.set(t,n)}}var E4=typeof window!="undefined"&&typeof window.document!="undefined";function ROe(r){return!!r.getAttribute}function AOe(r,n){for(var e=0,t=r.length;e<t;){var i=e+t>>>1;oue(r[i],n)<0?e=i+1:t=i}return e}function oue(r,n){var e=Number(r.parsedStyle.zIndex||0),t=Number(n.parsedStyle.zIndex||0);if(e===t){var i=r.parentNode;if(i){var a=i.childNodes||[];return a.indexOf(r)-a.indexOf(n)}}return e-t}function lue(r){var n=r;do{var e,t=(e=n.parsedStyle)===null||e===void 0?void 0:e.clipPath;if(t)return n;n=n.parentElement}while(n!==null);return null}var b4="px";function LOe(r,n,e){E4&&r.style&&(r.style.width=n+b4,r.style.height=e+b4)}function k4(r,n){if(E4)return document.defaultView.getComputedStyle(r,null).getPropertyValue(n)}function IOe(r){var n=k4(r,"width");return n==="auto"?r.offsetWidth:parseFloat(n)}function DOe(r){var n=k4(r,"height");return n==="auto"?r.offsetHeight:parseFloat(n)}var uue=1,cue={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},due=typeof performance=="object"&&performance.now?performance:Date;function xM(r){return r.nodeName===Ir.FRAGMENT?!0:r.getRootNode().nodeName===Ir.FRAGMENT}function FOe(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"auto",n=arguments.length>1?arguments[1]:void 0,e=arguments.length>2?arguments[2]:void 0,t=!1,i=!1,a=!!n&&!n.isNone,s=!!e&&!e.isNone;return r==="visiblepainted"||r==="painted"||r==="auto"?(t=a,i=s):r==="visiblefill"||r==="fill"?t=!0:r==="visiblestroke"||r==="stroke"?i=!0:(r==="visible"||r==="all")&&(t=!0,i=!0),[t,i]}var hue=1,fue=function(){return hue++},dv=typeof self=="object"&&self.self===self?self:typeof k.g=="object"&&k.g.global===k.g?k.g:{},vue=Date.now(),gue=function(){return dv.performance&&typeof dv.performance.now=="function"?dv.performance.now():Date.now()-vue},Xy={},w4=Date.now(),_ue=function(n){if(typeof n!="function")throw new TypeError("".concat(n," is not a function"));var e=Date.now(),t=e-w4,i=t>16?0:16-t,a=fue();return Xy[a]=n,Object.keys(Xy).length>1||setTimeout(function(){w4=e;var s=Xy;Xy={},Object.keys(s).forEach(function(o){return s[o](gue())})},i),a},mue=function(n){delete Xy[n]},pue=["","webkit","moz","ms","o"],S4=function(n){return typeof n!="string"?_ue:n===""?dv.requestAnimationFrame:dv["".concat(n,"RequestAnimationFrame")]},yue=function(n){return typeof n!="string"?mue:n===""?dv.cancelAnimationFrame:dv["".concat(n,"CancelAnimationFrame")]||dv["".concat(n,"CancelRequestAnimationFrame")]},xue=function(n,e){for(var t=0;n[t]!==void 0;){if(e(n[t]))return n[t];t+=1}},T4=xue(pue,function(r){return!!S4(r)}),C4=S4(T4),Eue=yue(T4);dv.requestAnimationFrame=C4,dv.cancelAnimationFrame=Eue;var BOe=null,$Oe=null,GOe=null,zOe=null,bue=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],kue=/([\"\'])[^\'\"]+\1/;function wue(r){for(var n=r.fontSize,e=n===void 0?16:n,t=r.fontFamily,i=t===void 0?"sans-serif":t,a=r.fontStyle,s=a===void 0?"normal":a,o=r.fontVariant,l=o===void 0?"normal":o,u=r.fontWeight,c=u===void 0?"normal":u,d=(0,pe.Z)(e)&&"".concat(e,"px")||"16px",h=i.split(","),f=h.length-1;f>=0;f--){var v=h[f].trim();!kue.test(v)&&bue.indexOf(v)<0&&(v='"'.concat(v,'"')),h[f]=v}return"".concat(s," ").concat(l," ").concat(c," ").concat(d," ").concat(h.join(","))}function EM(r,n,e){return L.identity(r),r[4]=Math.tan(n),r[1]=Math.tan(e),r}var Bl=L.create(),Sue=L.create(),Tue={scale:function(n){L.fromScaling(Bl,[n[0].value,n[1].value,1])},scaleX:function(n){L.fromScaling(Bl,[n[0].value,1,1])},scaleY:function(n){L.fromScaling(Bl,[1,n[0].value,1])},scaleZ:function(n){L.fromScaling(Bl,[1,1,n[0].value])},scale3d:function(n){L.fromScaling(Bl,[n[0].value,n[1].value,n[2].value])},translate:function(n){L.fromTranslation(Bl,[n[0].value,n[1].value,0])},translateX:function(n){L.fromTranslation(Bl,[n[0].value,0,0])},translateY:function(n){L.fromTranslation(Bl,[0,n[0].value,0])},translateZ:function(n){L.fromTranslation(Bl,[0,0,n[0].value])},translate3d:function(n){L.fromTranslation(Bl,[n[0].value,n[1].value,n[2].value])},rotate:function(n){L.fromZRotation(Bl,Qs(qc(n[0])))},rotateX:function(n){L.fromXRotation(Bl,Qs(qc(n[0])))},rotateY:function(n){L.fromYRotation(Bl,Qs(qc(n[0])))},rotateZ:function(n){L.fromZRotation(Bl,Qs(qc(n[0])))},rotate3d:function(n){L.fromRotation(Bl,Qs(qc(n[3])),[n[0].value,n[1].value,n[2].value])},skew:function(n){EM(Bl,Qs(n[0].value),Qs(n[1].value))},skewX:function(n){EM(Bl,Qs(n[0].value),0)},skewY:function(n){EM(Bl,0,Qs(n[0].value))},matrix:function(n){L.set(Bl,n[0].value,n[1].value,0,0,n[2].value,n[3].value,0,0,0,0,1,0,n[4].value,n[5].value,0,1)},matrix3d:function(n){L.set.apply(L,[Bl].concat(Dl(n.map(function(e){return e.value}))))}},Cue=E.al(1,1,1),Mue=E.Ue(),M4={translate:function(n,e){cr.sceneGraphService.setLocalScale(n,Cue,!1),cr.sceneGraphService.setLocalEulerAngles(n,Mue,void 0,void 0,!1),cr.sceneGraphService.setLocalPosition(n,[e[0].value,e[1].value,0],!1),cr.sceneGraphService.dirtifyLocal(n,n.transformable)}};function Pue(r,n){if(r.length){if(r.length===1&&M4[r[0].t]){M4[r[0].t](n,r[0].d);return}for(var e=L.identity(Sue),t=0;t<r.length;t++){var i=r[t],a=i.t,s=i.d,o=Tue[a];o&&(o(s),L.mul(e,e,Bl))}n.setLocalTransform(e)}else n.resetLocalTransform();return n.getLocalTransform()}var Nue=function(){function r(){Mr(this,r),this.parser=Ole,this.mixer=Gle}return Pr(r,[{key:"calculator",value:function(e,t,i,a){return i instanceof uh?[]:i}},{key:"postProcessor",value:function(e){Pue(e.parsedStyle.transform,e)}}])}(),Oue=function(){function r(){Mr(this,r)}return Pr(r,[{key:"postProcessor",value:function(e){var t=e.parsedStyle.transformOrigin;t[0].unit===tr.kPixels&&t[1].unit===tr.kPixels?e.setOrigin(t[0].value,t[1].value):e.getGeometryBounds()}}])}(),Rue=function(){function r(){Mr(this,r)}return Pr(r,[{key:"calculator",value:function(e,t,i,a){return i.value}},{key:"postProcessor",value:function(e){if(e.parentNode){var t=e.parentNode,i=t.renderable,a=t.sortable;i&&(i.dirty=!0),a&&(a.dirty=!0,a.dirtyReason=iM.Z_INDEX_CHANGED)}}}])}(),Aue=function(){function r(){Mr(this,r)}return Pr(r,[{key:"update",value:function(e,t){var i=e.cx,a=i===void 0?0:i,s=e.cy,o=s===void 0?0:s,l=e.r,u=l===void 0?0:l;return{cx:a,cy:o,hwidth:u,hheight:u}}}])}(),Lue=function(){function r(){Mr(this,r)}return Pr(r,[{key:"update",value:function(e,t){var i=e.cx,a=i===void 0?0:i,s=e.cy,o=s===void 0?0:s,l=e.rx,u=l===void 0?0:l,c=e.ry,d=c===void 0?0:c;return{cx:a,cy:o,hwidth:u,hheight:d}}}])}(),Iue=function(){function r(){Mr(this,r)}return Pr(r,[{key:"update",value:function(e){var t=e.x1,i=e.y1,a=e.x2,s=e.y2,o=Math.min(t,a),l=Math.max(t,a),u=Math.min(i,s),c=Math.max(i,s),d=l-o,h=c-u,f=d/2,v=h/2;return{cx:o+f,cy:u+v,hwidth:f,hheight:v}}}])}(),Due=function(){function r(){Mr(this,r)}return Pr(r,[{key:"update",value:function(e){var t=e.d,i=t.rect,a=i.x,s=i.y,o=i.width,l=i.height,u=o/2,c=l/2;return{cx:a+u,cy:s+c,hwidth:u,hheight:c}}}])}(),Fue=function(){function r(){Mr(this,r)}return Pr(r,[{key:"update",value:function(e){if(e.points&&(0,Ie.Z)(e.points.points)){var t=e.points.points,i=Math.min.apply(Math,Dl(t.map(function(h){return h[0]}))),a=Math.max.apply(Math,Dl(t.map(function(h){return h[0]}))),s=Math.min.apply(Math,Dl(t.map(function(h){return h[1]}))),o=Math.max.apply(Math,Dl(t.map(function(h){return h[1]}))),l=a-i,u=o-s,c=l/2,d=u/2;return{cx:i+c,cy:s+d,hwidth:c,hheight:d}}return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),Bue=function(){function r(){Mr(this,r)}return Pr(r,[{key:"update",value:function(e,t){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s,l=e.src,u=e.width,c=u===void 0?0:u,d=e.height,h=d===void 0?0:d,f=c,v=h;return l&&!(0,Ze.Z)(l)&&(f||(f=l.width,e.width=f),v||(v=l.height,e.height=v)),{cx:a+f/2,cy:o+v/2,hwidth:f/2,hheight:v/2}}}])}(),$ue=function(){function r(n){Mr(this,r),this.globalRuntime=n}return Pr(r,[{key:"isReadyToMeasure",value:function(e,t){var i=e.text;return i}},{key:"update",value:function(e,t){var i,a=e.text,s=e.textAlign,o=s===void 0?"start":s,l=e.lineWidth,u=l===void 0?1:l,c=e.textBaseline,d=c===void 0?"alphabetic":c,h=e.dx,f=h===void 0?0:h,v=e.dy,g=v===void 0?0:v,m=e.x,y=m===void 0?0:m,w=e.y,T=w===void 0?0:w;if(!this.isReadyToMeasure(e,t))return e.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{hwidth:0,hheight:0,cx:0,cy:0};var G=(t==null||(i=t.ownerDocument)===null||i===void 0||(i=i.defaultView)===null||i===void 0?void 0:i.getConfig())||{},x=G.offscreenCanvas,_=this.globalRuntime.textService.measureText(a,e,x);e.metrics=_;var p=_.width,b=_.height,R=p/2,B=b/2,j=y+R;o==="center"||o==="middle"?j+=u/2-R:(o==="right"||o==="end")&&(j+=u-R*2);var Z=T-B;return d==="middle"?Z+=B:d==="top"||d==="hanging"?Z+=B*2:d==="alphabetic"||(d==="bottom"||d==="ideographic")&&(Z+=0),f&&(j+=f),g&&(Z+=g),{cx:j,cy:Z,hwidth:R,hheight:B}}}])}(),Gue=function(){function r(){Mr(this,r)}return Pr(r,[{key:"update",value:function(e,t){return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),zue=function(){function r(){Mr(this,r)}return Pr(r,[{key:"update",value:function(e,t){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s,l=e.width,u=l===void 0?0:l,c=e.height,d=c===void 0?0:c;return{cx:a+u/2,cy:o+d/2,hwidth:u/2,hheight:d/2}}}])}();function VOe(r){return!!r.type}var bM=function(){function r(n){Mr(this,r),this.eventPhase=r.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new oh,this.page=new oh,this.canvas=new oh,this.viewport=new oh,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=n}return Pr(r,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"composedPath",value:function(){return this.manager&&(!this.path||this.path[0]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}},{key:"propagationPath",get:function(){return this.composedPath()}},{key:"preventDefault",value:function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}},{key:"stopImmediatePropagation",value:function(){this.propagationImmediatelyStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"initEvent",value:function(){}},{key:"initUIEvent",value:function(){}},{key:"clone",value:function(){throw new Error(el)}}])}(),P4=function(r){function n(){var e;Mr(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ks(this,n,[].concat(i)),e.client=new oh,e.movement=new oh,e.offset=new oh,e.global=new oh,e.screen=new oh,e}return Js(n,r),Pr(n,[{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(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)}},{key:"initMouseEvent",value:function(){throw new Error(el)}}])}(bM),Vue=function(r){function n(){var e;Mr(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ks(this,n,[].concat(i)),e.width=0,e.height=0,e.isPrimary=!1,e}return Js(n,r),Pr(n,[{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)}}])}(P4),Uue=function(r){function n(){return Mr(this,n),Ks(this,n,arguments)}return Js(n,r),Pr(n,[{key:"clone",value:function(){return this.manager.cloneWheelEvent(this)}}])}(P4),Zv=function(r){function n(e,t){var i;return Mr(this,n),i=Ks(this,n,[null]),i.type=e,i.detail=t,Object.assign(i,t),i}return Js(n,r),Pr(n)}(bM),N4=new WeakMap,jue=function(){function r(){Mr(this,r),this.emitter=new Se.Z}return Pr(r,[{key:"on",value:function(e,t,i){return this.addEventListener(e,t,i),this}},{key:"addEventListener",value:function(e,t,i){var a=!1,s=!1;if((0,je.Z)(i))a=i;else if(i){var o=i.capture;a=o===void 0?!1:o;var l=i.once;s=l===void 0?!1:l}a&&(e+="capture"),t=(0,Be.Z)(t)?t:t.handleEvent;var u=(0,Be.Z)(t)?void 0:t;return s?this.emitter.once(e,t,u):this.emitter.on(e,t,u),this}},{key:"off",value:function(e,t,i){return e?this.removeEventListener(e,t,i):this.removeAllEventListeners(),this}},{key:"removeAllEventListeners",value:function(){var e;(e=this.emitter)===null||e===void 0||e.removeAllListeners()}},{key:"removeEventListener",value:function(e,t,i){var a;if(!this.emitter)return this;var s=(0,je.Z)(i)?i:i==null?void 0:i.capture;s&&(e+="capture"),t=(0,Be.Z)(t)?t:(a=t)===null||a===void 0?void 0:a.handleEvent;var o=(0,Be.Z)(t)?void 0:t;return this.emitter.off(e,t,o),this}},{key:"emit",value:function(e,t){this.dispatchEvent(new Zv(e,t))}},{key:"dispatchEvent",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=N4.get(this);if(!i){var a;this.document?i=this:this.defaultView?i=this.defaultView:i=(a=this.ownerDocument)===null||a===void 0?void 0:a.defaultView,i&&N4.set(this,i)}if(i){if(e.manager=i.getEventService(),!e.manager)return!1;e.defaultPrevented=!1,e.path?e.path.length=0:e.page=[],t||(e.target=this),e.manager.dispatchEvent(e,e.type,t)}else this.emitter.emit(e.type,e);return!e.defaultPrevented}}])}(),q_=function(r){function n(){var e;Mr(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ks(this,n,[].concat(i)),e.shadow=!1,e.ownerDocument=null,e.isConnected=!1,e.baseURI="",e.childNodes=[],e.nodeType=0,e.nodeName="",e.nodeValue=null,e.parentNode=null,e}return Js(n,r),Pr(n,[{key:"textContent",get:function(){var t="";this.nodeName===Ir.TEXT&&(t+=this.style.text);var i=Dp(this.childNodes),a;try{for(i.s();!(a=i.n()).done;){var s=a.value;s.nodeName===Ir.TEXT?t+=s.nodeValue:t+=s.textContent}}catch(o){i.e(o)}finally{i.f()}return t},set:function(t){var i=this;this.childNodes.slice().forEach(function(a){i.removeChild(a)}),this.nodeName===Ir.TEXT&&(this.style.text="".concat(t))}},{key:"getRootNode",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this}},{key:"hasChildNodes",value:function(){return this.childNodes.length>0}},{key:"isDefaultNamespace",value:function(t){throw new Error(el)}},{key:"lookupNamespaceURI",value:function(t){throw new Error(el)}},{key:"lookupPrefix",value:function(t){throw new Error(el)}},{key:"normalize",value:function(){throw new Error(el)}},{key:"isEqualNode",value:function(t){return this===t}},{key:"isSameNode",value:function(t){return this.isEqualNode(t)}},{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(t){if(t===this)return 0;for(var i=t,a=this,s=[i],o=[a];(l=i.parentNode)!==null&&l!==void 0?l:a.parentNode;){var l;i=i.parentNode?(s.push(i.parentNode),i.parentNode):i,a=a.parentNode?(o.push(a.parentNode),a.parentNode):a}if(i!==a)return n.DOCUMENT_POSITION_DISCONNECTED|n.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|n.DOCUMENT_POSITION_PRECEDING;var u=s.length>o.length?s:o,c=u===s?o:s;if(u[u.length-c.length]===c[0])return u===s?n.DOCUMENT_POSITION_CONTAINED_BY|n.DOCUMENT_POSITION_FOLLOWING:n.DOCUMENT_POSITION_CONTAINS|n.DOCUMENT_POSITION_PRECEDING;for(var d=u.length-c.length,h=c.length-1;h>=0;h--){var f=c[h],v=u[d+h];if(v!==f){var g=f.parentNode.childNodes;return g.indexOf(f)<g.indexOf(v)?c===s?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING:u===s?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING}}return n.DOCUMENT_POSITION_FOLLOWING}},{key:"contain",value:function(t){return this.contains(t)}},{key:"contains",value:function(t){for(var i=t;i&&this!==i;)i=i.parentNode;return!!i}},{key:"getAncestor",value:function(t){for(var i=this;t>0&&i;)i=i.parentNode,t--;return i}},{key:"forEach",value:function(t){for(var i=[this];i.length>0;){var a=i.pop(),s=t(a);if(s===!1)break;for(var o=a.childNodes.length-1;o>=0;o--)i.push(a.childNodes[o])}}}],[{key:"isNode",value:function(t){return!!t.childNodes}}])}(jue);q_.DOCUMENT_POSITION_DISCONNECTED=1,q_.DOCUMENT_POSITION_PRECEDING=2,q_.DOCUMENT_POSITION_FOLLOWING=4,q_.DOCUMENT_POSITION_CONTAINS=8,q_.DOCUMENT_POSITION_CONTAINED_BY=16,q_.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;var UOe=2048,jOe=null,Hue=function(){function r(){Mr(this,r)}return Pr(r,[{key:"getOrCreateCanvas",value:function(e,t){if(this.canvas)return this.canvas;if(e||cr.offscreenCanvas)this.canvas=e||cr.offscreenCanvas,this.context=this.canvas.getContext("2d",_l({willReadFrequently:!0},t));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",_l({willReadFrequently:!0},t)),(!this.context||!this.context.measureText)&&(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(i){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",_l({willReadFrequently:!0},t))}return this.canvas.width=10,this.canvas.height=10,this.canvas}},{key:"getOrCreateContext",value:function(e,t){return this.context?this.context:(this.getOrCreateCanvas(e,t),this.context)}}],[{key:"createCanvas",value:function(){try{return new window.OffscreenCanvas(0,0)}catch(e){}try{return document.createElement("canvas")}catch(e){}return null}}])}(),Wue=function(r){return r[r.CAMERA_CHANGED=0]="CAMERA_CHANGED",r[r.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",r[r.NONE=2]="NONE",r}({}),HOe=null,Yue=/\[\s*(.*)=(.*)\s*\]/,Zue=function(){function r(){Mr(this,r)}return Pr(r,[{key:"selectOne",value:function(e,t){var i=this;if(e.startsWith("."))return t.find(function(l){return((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(e))>-1});if(e.startsWith("#"))return t.find(function(l){return l.id===i.getIdOrClassname(e)});if(e.startsWith("[")){var a=this.getAttribute(e),s=a.name,o=a.value;return s?t.find(function(l){return t!==l&&(s==="name"?l.name===o:i.attributeToString(l,s)===o)}):null}return t.find(function(l){return t!==l&&l.nodeName===e})}},{key:"selectAll",value:function(e,t){var i=this;if(e.startsWith("."))return t.findAll(function(l){return t!==l&&((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(e))>-1});if(e.startsWith("#"))return t.findAll(function(l){return t!==l&&l.id===i.getIdOrClassname(e)});if(e.startsWith("[")){var a=this.getAttribute(e),s=a.name,o=a.value;return s?t.findAll(function(l){return t!==l&&(s==="name"?l.name===o:i.attributeToString(l,s)===o)}):[]}return t.findAll(function(l){return t!==l&&l.nodeName===e})}},{key:"is",value:function(e,t){if(e.startsWith("."))return t.className===this.getIdOrClassname(e);if(e.startsWith("#"))return t.id===this.getIdOrClassname(e);if(e.startsWith("[")){var i=this.getAttribute(e),a=i.name,s=i.value;return a==="name"?t.name===s:this.attributeToString(t,a)===s}return t.nodeName===e}},{key:"getIdOrClassname",value:function(e){return e.substring(1)}},{key:"getAttribute",value:function(e){var t=e.match(Yue),i="",a="";return t&&t.length>2&&(i=t[1].replace(/"/g,""),a=t[2].replace(/"/g,"")),{name:i,value:a}}},{key:"attributeToString",value:function(e,t){if(!e.getAttribute)return"";var i=e.getAttribute(t);return(0,xe.Z)(i)?"":i.toString?i.toString():""}}])}(),qs=function(r){return r.REPARENT="reparent",r.DESTROY="destroy",r.ATTR_MODIFIED="DOMAttrModified",r.INSERTED="DOMNodeInserted",r.REMOVED="removed",r.MOUNTED="DOMNodeInsertedIntoDocument",r.UNMOUNTED="DOMNodeRemovedFromDocument",r.BOUNDS_CHANGED="bounds-changed",r.CULLED="culled",r}({}),hv=function(r){function n(e,t,i,a,s,o,l,u){var c;return Mr(this,n),c=Ks(this,n,[null]),c.relatedNode=t,c.prevValue=i,c.newValue=a,c.attrName=s,c.attrChange=o,c.prevParsedValue=l,c.newParsedValue=u,c.type=e,c}return Js(n,r),Pr(n)}(bM);hv.ADDITION=2,hv.MODIFICATION=1,hv.REMOVAL=3;function O4(r){var n=r.renderable;n&&(n.renderBoundsDirty=!0,n.boundsDirty=!0)}var Xue=new hv(qs.REPARENT,null,"","","",0,"",""),Kue=ot.Ue(),Lb=E.Ue(),Jue=E.al(1,1,1),Que=L.create(),que=ot.Ue(),Lg=E.Ue(),Vp=L.create(),Ig=X.Ue(),ece=E.Ue(),tce=X.Ue(),nce=E.Ue(),Ky=E.Ue(),em=E.Ue(),Ib=L.create(),R4=X.Ue(),A4=X.Ue(),Db=X.Ue(),kM={affectChildren:!0},rce=function(){function r(n){Mr(this,r),this.pendingEvents=new Map,this.boundsChangedEvent=new Zv(qs.BOUNDS_CHANGED),this.displayObjectDependencyMap=new WeakMap,this.runtime=n}return Pr(r,[{key:"matches",value:function(e,t){return this.runtime.sceneGraphSelector.is(e,t)}},{key:"querySelector",value:function(e,t){return this.runtime.sceneGraphSelector.selectOne(e,t)}},{key:"querySelectorAll",value:function(e,t){return this.runtime.sceneGraphSelector.selectAll(e,t)}},{key:"attach",value:function(e,t,i){var a,s=!1;e.parentNode&&(s=e.parentNode!==t,this.detach(e));var o=e.nodeName===Ir.FRAGMENT,l=xM(t);e.parentNode=t;var u=o?e.childNodes:[e];(0,pe.Z)(i)?u.forEach(function(f){t.childNodes.splice(i,0,f),f.parentNode=t}):u.forEach(function(f){t.childNodes.push(f),f.parentNode=t});var c=t,d=c.sortable;if((d!=null&&(a=d.sorted)!==null&&a!==void 0&&a.length||e.parsedStyle.zIndex)&&(d.dirtyChildren.indexOf(e)===-1&&d.dirtyChildren.push(e),d.dirty=!0,d.dirtyReason=iM.ADDED),!l){if(o)this.dirtifyFragment(e);else{var h=e.transformable;h&&this.dirtifyWorld(e,h)}s&&e.dispatchEvent(Xue)}}},{key:"detach",value:function(e){if(e.parentNode){var t,i,a=e.transformable,s=e.parentNode,o=s.sortable;(o!=null&&(t=o.sorted)!==null&&t!==void 0&&t.length||(i=e.style)!==null&&i!==void 0&&i.zIndex)&&(o.dirtyChildren.indexOf(e)===-1&&o.dirtyChildren.push(e),o.dirty=!0,o.dirtyReason=iM.REMOVED);var l=e.parentNode.childNodes.indexOf(e);l>-1&&e.parentNode.childNodes.splice(l,1),a&&this.dirtifyWorld(e,a),e.parentNode=null}}},{key:"getOrigin",value:function(e){return e.getGeometryBounds(),e.transformable.origin}},{key:"setOrigin",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=[t,i,a]);var s=e.transformable;if(!(t[0]===s.origin[0]&&t[1]===s.origin[1]&&t[2]===s.origin[2])){var o=s.origin;o[0]=t[0],o[1]=t[1],o[2]=t[2]||0,this.dirtifyLocal(e,s)}}},{key:"rotate",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;if(e.parentNode===null||!e.parentNode.transformable)this.rotateLocal(e,t);else{var o=Ig;X.Su(o,t[0],t[1],t[2]);var l=this.getRotation(e),u=this.getRotation(e.parentNode);X.JG(Db,u),X.U_(Db,Db),X.Jp(o,Db,o),X.Jp(s.localRotation,o,l),X.Fv(s.localRotation,s.localRotation),this.dirtifyLocal(e,s)}}},{key:"rotateLocal",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;X.Su(A4,t[0],t[1],t[2]),X.dC(s.localRotation,s.localRotation,A4),this.dirtifyLocal(e,s)}},{key:"setEulerAngles",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;if(e.parentNode===null||!e.parentNode.transformable)this.setLocalEulerAngles(e,t);else{X.Su(s.localRotation,t[0],t[1],t[2]);var o=this.getRotation(e.parentNode);X.JG(R4,X.U_(Ig,o)),X.dC(s.localRotation,s.localRotation,R4),this.dirtifyLocal(e,s)}}},{key:"setLocalEulerAngles",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;typeof t=="number"&&(t=E.al(t,i,a));var o=e.transformable;X.Su(o.localRotation,t[0],t[1],t[2]),s&&this.dirtifyLocal(e,o)}},{key:"translateLocal",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;E.fS(t,Lb)||(E.VC(t,t,s.localRotation),E.IH(s.localPosition,s.localPosition,t),this.dirtifyLocal(e,s))}},{key:"setPosition",value:function(e,t){var i,a=e.transformable;if(em[0]=t[0],em[1]=t[1],em[2]=(i=t[2])!==null&&i!==void 0?i:0,!E.fS(this.getPosition(e),em)){if(E.JG(a.position,em),e.parentNode===null||!e.parentNode.transformable)E.JG(a.localPosition,em);else{var s=e.parentNode.transformable;L.copy(Ib,s.worldTransform),L.invert(Ib,Ib),E.fF(a.localPosition,em,Ib)}this.dirtifyLocal(e,a)}}},{key:"setLocalPosition",value:function(e,t){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=e.transformable;Ky[0]=t[0],Ky[1]=t[1],Ky[2]=(i=t[2])!==null&&i!==void 0?i:0,!E.fS(s.localPosition,Ky)&&(E.JG(s.localPosition,Ky),a&&this.dirtifyLocal(e,s))}},{key:"scaleLocal",value:function(e,t){var i,a=e.transformable;E.Jp(a.localScale,a.localScale,E.t8(Lg,t[0],t[1],(i=t[2])!==null&&i!==void 0?i:1)),this.dirtifyLocal(e,a)}},{key:"setLocalScale",value:function(e,t){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=e.transformable;E.t8(Lg,t[0],t[1],(i=t[2])!==null&&i!==void 0?i:s.localScale[2]),!E.fS(Lg,s.localScale)&&(E.JG(s.localScale,Lg),a&&this.dirtifyLocal(e,s))}},{key:"translate",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.t8(Lg,t,i,a)),!E.fS(t,Lb)&&(E.IH(Lg,this.getPosition(e),t),this.setPosition(e,Lg))}},{key:"setRotation",value:function(e,t,i,a,s){var o=e.transformable;if(typeof t=="number"&&(t=X.al(t,i,a,s)),e.parentNode===null||!e.parentNode.transformable)this.setLocalRotation(e,t);else{var l=this.getRotation(e.parentNode);X.JG(Ig,l),X.U_(Ig,Ig),X.Jp(o.localRotation,Ig,t),X.Fv(o.localRotation,o.localRotation),this.dirtifyLocal(e,o)}}},{key:"setLocalRotation",value:function(e,t,i,a,s){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;typeof t=="number"&&(t=X.t8(Ig,t,i,a,s));var l=e.transformable;X.JG(l.localRotation,t),o&&this.dirtifyLocal(e,l)}},{key:"setLocalSkew",value:function(e,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;typeof t=="number"&&(t=ot.t8(que,t,i));var s=e.transformable;ot.JG(s.localSkew,t),a&&this.dirtifyLocal(e,s)}},{key:"dirtifyLocal",value:function(e,t){xM(e)||t.localDirtyFlag||(t.localDirtyFlag=!0,t.dirtyFlag||this.dirtifyWorld(e,t))}},{key:"dirtifyWorld",value:function(e,t){t.dirtyFlag||this.unfreezeParentToRoot(e),this.dirtifyWorldInternal(e,t),this.dirtifyToRoot(e,!0)}},{key:"dirtifyFragment",value:function(e){var t=e.transformable;t&&(t.frozen=!1,t.dirtyFlag=!0,t.localDirtyFlag=!0);var i=e.renderable;i&&(i.renderBoundsDirty=!0,i.boundsDirty=!0,i.dirty=!0);for(var a=e.childNodes.length,s=0;s<a;s++)this.dirtifyFragment(e.childNodes[s]);e.nodeName===Ir.FRAGMENT&&this.pendingEvents.set(e,!1)}},{key:"triggerPendingEvents",value:function(){var e=this,t=new Set,i=function(s,o){!s.isConnected||t.has(s)||s.nodeName===Ir.FRAGMENT||(e.boundsChangedEvent.detail=o,e.boundsChangedEvent.target=s,s.isMutationObserved?s.dispatchEvent(e.boundsChangedEvent):s.ownerDocument.defaultView.dispatchEvent(e.boundsChangedEvent,!0),t.add(s))};this.pendingEvents.forEach(function(a,s){s.nodeName!==Ir.FRAGMENT&&(kM.affectChildren=a,a?s.forEach(function(o){i(o,kM)}):i(s,kM))}),t.clear(),this.clearPendingEvents()}},{key:"clearPendingEvents",value:function(){this.pendingEvents.clear()}},{key:"dirtifyToRoot",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=e;for(i.renderable&&(i.renderable.dirty=!0);i;)O4(i),i=i.parentNode;t&&e.forEach(function(a){O4(a)}),this.informDependentDisplayObjects(e),this.pendingEvents.set(e,t)}},{key:"updateDisplayObjectDependency",value:function(e,t,i,a){if(t&&t!==i){var s=this.displayObjectDependencyMap.get(t);if(s&&s[e]){var o=s[e].indexOf(a);s[e].splice(o,1)}}if(i){var l=this.displayObjectDependencyMap.get(i);l||(this.displayObjectDependencyMap.set(i,{}),l=this.displayObjectDependencyMap.get(i)),l[e]||(l[e]=[]),l[e].push(a)}}},{key:"informDependentDisplayObjects",value:function(e){var t=this,i=this.displayObjectDependencyMap.get(e);i&&Object.keys(i).forEach(function(a){i[a].forEach(function(s){t.dirtifyToRoot(s,!0),s.dispatchEvent(new hv(qs.ATTR_MODIFIED,s,t,t,a,hv.MODIFICATION,t,t)),s.isCustomElement&&s.isConnected&&s.attributeChangedCallback&&s.attributeChangedCallback(a,t,t)})})}},{key:"getPosition",value:function(e){var t=e.transformable;return L.getTranslation(t.position,this.getWorldTransform(e,t))}},{key:"getRotation",value:function(e){var t=e.transformable;return L.getRotation(t.rotation,this.getWorldTransform(e,t))}},{key:"getScale",value:function(e){var t=e.transformable;return L.getScaling(t.scaling,this.getWorldTransform(e,t))}},{key:"getWorldTransform",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.transformable;return!t.localDirtyFlag&&!t.dirtyFlag||(e.parentNode&&e.parentNode.transformable&&this.getWorldTransform(e.parentNode),this.sync(e,t)),t.worldTransform}},{key:"getLocalPosition",value:function(e){return e.transformable.localPosition}},{key:"getLocalRotation",value:function(e){return e.transformable.localRotation}},{key:"getLocalScale",value:function(e){return e.transformable.localScale}},{key:"getLocalSkew",value:function(e){return e.transformable.localSkew}},{key:"calcLocalTransform",value:function(e){var t=e.localSkew[0]!==0||e.localSkew[1]!==0;if(t){L.fromRotationTranslationScaleOrigin(e.localTransform,e.localRotation,e.localPosition,E.al(1,1,1),e.origin),(e.localSkew[0]!==0||e.localSkew[1]!==0)&&(L.identity(Vp),Vp[4]=Math.tan(e.localSkew[0]),Vp[1]=Math.tan(e.localSkew[1]),L.multiply(e.localTransform,e.localTransform,Vp));var i=L.fromRotationTranslationScaleOrigin(Vp,X.t8(Ig,0,0,0,1),E.t8(Lg,1,1,1),e.localScale,e.origin);L.multiply(e.localTransform,e.localTransform,i)}else{var a=e.localTransform,s=e.localPosition,o=e.localRotation,l=e.localScale,u=e.origin,c=s[0]!==0||s[1]!==0||s[2]!==0,d=o[3]!==1||o[0]!==0||o[1]!==0||o[2]!==0,h=l[0]!==1||l[1]!==1||l[2]!==1,f=u[0]!==0||u[1]!==0||u[2]!==0;!d&&!h&&!f?c?L.fromTranslation(a,s):L.identity(a):L.fromRotationTranslationScaleOrigin(a,o,s,l,u)}}},{key:"getLocalTransform",value:function(e){var t=e.transformable;return t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.localTransform}},{key:"setLocalTransform",value:function(e,t){var i=L.getTranslation(ece,t),a=L.getRotation(tce,t),s=L.getScaling(nce,t);this.setLocalScale(e,s,!1),this.setLocalPosition(e,i,!1),this.setLocalRotation(e,a,void 0,void 0,void 0,!1),this.dirtifyLocal(e,e.transformable)}},{key:"resetLocalTransform",value:function(e){this.setLocalScale(e,Jue,!1),this.setLocalPosition(e,Lb,!1),this.setLocalEulerAngles(e,Lb,void 0,void 0,!1),this.setLocalSkew(e,Kue,void 0,!1),this.dirtifyLocal(e,e.transformable)}},{key:"getTransformedGeometryBounds",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2?arguments[2]:void 0,a=this.getGeometryBounds(e,t);if(!Jc.isEmpty(a)){var s=i||new Jc;return s.setFromTransformedAABB(a,this.getWorldTransform(e)),s}return null}},{key:"getGeometryBounds",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=e,a=i.geometry;a.dirty&&cr.styleValueRegistry.updateGeometry(e);var s=t?a.renderBounds:a.contentBounds||null;return s||new Jc}},{key:"getBounds",value:function(e){var t=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=e,s=a.renderable;if(!s.boundsDirty&&!i&&s.bounds)return s.bounds;if(!s.renderBoundsDirty&&i&&s.renderBounds)return s.renderBounds;var o=i?s.renderBounds:s.bounds,l=this.getTransformedGeometryBounds(e,i,o),u=e.childNodes;if(u.forEach(function(h){var f=t.getBounds(h,i);f&&(l?l.add(f):(l=o||new Jc,l.update(f.center,f.halfExtents)))}),l||(l=new Jc),i){var c=lue(e);if(c){var d=c.parsedStyle.clipPath.getBounds(i);l?d&&(l=d.intersection(l)):l.update(d.center,d.halfExtents)}}return i?(s.renderBounds=l,s.renderBoundsDirty=!1):(s.bounds=l,s.boundsDirty=!1),l}},{key:"getLocalBounds",value:function(e){if(e.parentNode){var t=Que;e.parentNode.transformable&&(t=L.invert(Vp,this.getWorldTransform(e.parentNode)));var i=this.getBounds(e);if(!Jc.isEmpty(i)){var a=new Jc;return a.setFromTransformedAABB(i,t),a}}return this.getBounds(e)}},{key:"getBoundingClientRect",value:function(e){var t,i,a=this.getGeometryBounds(e);Jc.isEmpty(a)||(i=new Jc,i.setFromTransformedAABB(a,this.getWorldTransform(e)));var s=(t=e.ownerDocument)===null||t===void 0||(t=t.defaultView)===null||t===void 0?void 0:t.getContextService().getBoundingClientRect();if(i){var o=i.getMin(),l=qo(o,2),u=l[0],c=l[1],d=i.getMax(),h=qo(d,2),f=h[0],v=h[1];return new $p(u+((s==null?void 0:s.left)||0),c+((s==null?void 0:s.top)||0),f-u,v-c)}return new $p((s==null?void 0:s.left)||0,(s==null?void 0:s.top)||0,0,0)}},{key:"dirtifyWorldInternal",value:function(e,t){var i=this;if(!t.dirtyFlag){t.dirtyFlag=!0,t.frozen=!1,e.childNodes.forEach(function(o){var l=o.transformable;l.dirtyFlag||i.dirtifyWorldInternal(o,l)});var a=e,s=a.renderable;s&&(s.renderBoundsDirty=!0,s.boundsDirty=!0,s.dirty=!0)}}},{key:"syncHierarchy",value:function(e){var t=e.transformable;if(!t.frozen){t.frozen=!0,(t.localDirtyFlag||t.dirtyFlag)&&this.sync(e,t);for(var i=e.childNodes,a=0;a<i.length;a++)this.syncHierarchy(i[a])}}},{key:"sync",value:function(e,t){if(t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.dirtyFlag){var i=e.parentNode,a=i&&i.transformable;i===null||!a?L.copy(t.worldTransform,t.localTransform):L.multiply(t.worldTransform,a.worldTransform,t.localTransform),t.dirtyFlag=!1}}},{key:"unfreezeParentToRoot",value:function(e){for(var t=e.parentNode;t;){var i=t.transformable;i&&(i.frozen=!1),t=t.parentNode}}}])}(),tm={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]},L4=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,ice=/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/,ace=/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/,sce=/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/,oce=/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/,lce=/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/,uce=/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/,cce=/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/,dce=/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/,hce=new RegExp("".concat(ice.source,"|").concat(sce.source,"|").concat(lce.source,"|").concat(cce.source)),fce=new RegExp("".concat(ace.source,"|").concat(oce.source,"|").concat(uce.source,"|").concat(dce.source)),vce=function(){function r(n){var e=this;Mr(this,r),this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,i){return e.isBreakingSpace(i)?!1:!!(t&&(fce.exec(i)||hce.exec(t)))},this.trimByKinsokuShorui=function(t){var i=Dl(t),a=i[i.length-2];if(!a)return t;var s=a[a.length-1];return i[i.length-2]=a.slice(0,-1),i[i.length-1]=s+i[i.length-1],i},this.runtime=n}return Pr(r,[{key:"measureFont",value:function(e,t){if(this.fontMetricsCache[e])return this.fontMetricsCache[e];var i={ascent:0,descent:0,fontSize:0},a=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(t),s=this.runtime.offscreenCanvasCreator.getOrCreateContext(t,{willReadFrequently:!0});s.font=e;var o=tm.MetricsString+tm.BaselineSymbol,l=Math.ceil(s.measureText(o).width),u=Math.ceil(s.measureText(tm.BaselineSymbol).width),c=tm.HeightMultiplier*u;u=u*tm.BaselineMultiplier|0,a.width=l,a.height=c,s.fillStyle="#f00",s.fillRect(0,0,l,c),s.font=e,s.textBaseline="alphabetic",s.fillStyle="#000",s.fillText(o,0,u);var d=s.getImageData(0,0,l||1,c||1).data,h=d.length,f=l*4,v=0,g=0,m=!1;for(v=0;v<u;++v){for(var y=0;y<f;y+=4)if(d[g+y]!==255){m=!0;break}if(!m)g+=f;else break}for(i.ascent=u-v,g=h-f,m=!1,v=c;v>u;--v){for(var w=0;w<f;w+=4)if(d[g+w]!==255){m=!0;break}if(!m)g-=f;else break}return i.descent=v-u,i.fontSize=i.ascent+i.descent,this.fontMetricsCache[e]=i,i}},{key:"measureText",value:function(e,t,i){var a=t.fontSize,s=a===void 0?16:a,o=t.wordWrap,l=o===void 0?!1:o,u=t.lineHeight,c=t.lineWidth,d=c===void 0?1:c,h=t.textBaseline,f=h===void 0?"alphabetic":h,v=t.textAlign,g=v===void 0?"start":v,m=t.letterSpacing,y=m===void 0?0:m,w=t.textPath;t.textPathSide,t.textPathStartOffset;var T=t.leading,G=T===void 0?0:T,x=wue(t),_=this.measureFont(x,i);_.fontSize===0&&(_.fontSize=s,_.ascent=s);var p=this.runtime.offscreenCanvasCreator.getOrCreateContext(i);p.font=x,t.isOverflowing=!1;var b=l?this.wordWrap(e,t,i):e,R=b.split(/(?:\r\n|\r|\n)/),B=new Array(R.length),j=0;if(w){w.getTotalLength();for(var Z=0;Z<R.length;Z++)p.measureText(R[Z]).width+(R[Z].length-1)*y}else{for(var te=0;te<R.length;te++){var le=p.measureText(R[te]).width+(R[te].length-1)*y;B[te]=le,j=Math.max(j,le)}var ue=j+d,se=u||_.fontSize+d,V=Math.max(se,_.fontSize+d)+(R.length-1)*(se+G);se+=G;var ee=0;return f==="middle"?ee=-V/2:f==="bottom"||f==="alphabetic"||f==="ideographic"?ee=-V:(f==="top"||f==="hanging")&&(ee=0),{font:x,width:ue,height:V,lines:R,lineWidths:B,lineHeight:se,maxLineWidth:j,fontProperties:_,lineMetrics:B.map(function(he,ut){var ct=0;return g==="center"||g==="middle"?ct-=he/2:(g==="right"||g==="end")&&(ct-=he),new $p(ct-d/2,ee+ut*se,he+d,se)})}}}},{key:"wordWrap",value:function(e,t,i){var a=this,s=t.wordWrapWidth,o=s===void 0?0:s,l=t.letterSpacing,u=l===void 0?0:l,c=t.maxLines,d=c===void 0?1/0:c,h=t.textOverflow,f=this.runtime.offscreenCanvasCreator.getOrCreateContext(i),v=o+u,g="";h==="ellipsis"?g="...":h&&h!=="clip"&&(g=h);var m=[],y=0,w=0,T={},G=function(le){return a.getFromCache(le,u,T,f)},x=Array.from(g).reduce(function(te,le){return te+G(le)},0);function _(te){if(!(x<=0||x>v)){for(var le=m[te].length,ue=0,se=le,V=0;V<le;V++){var ee=G(m[te][V]);if(ue+ee+x>v){se=V;break}ue+=ee}m[te]=(m[te]||"").slice(0,se)+g}}for(var p=Array.from(e),b=0;b<p.length;b++){var R=p[b],B=e[b-1],j=e[b+1],Z=G(R);if(this.isNewline(R)){if(y++,y>=d){t.isOverflowing=!0,b<p.length-1&&_(y-1);break}w=0,m[y]="";continue}if(w>0&&w+Z>v){if(y+1>=d){t.isOverflowing=!0,_(y);break}if(y++,w=0,m[y]="",this.isBreakingSpace(R))continue;this.canBreakInLastChar(R)||(m=this.trimToBreakable(m),w=this.sumTextWidthByCache(m[y]||"",T)),this.shouldBreakByKinsokuShorui(R,j)&&(m=this.trimByKinsokuShorui(m),w+=G(B||""))}w+=Z,m[y]=(m[y]||"")+R}return m.join(`
|
|
|
`)}},{key:"isBreakingSpace",value:function(e){return typeof e!="string"?!1:tm.BreakingSpaces.indexOf(e.charCodeAt(0))>=0}},{key:"isNewline",value:function(e){return typeof e!="string"?!1:tm.Newlines.indexOf(e.charCodeAt(0))>=0}},{key:"trimToBreakable",value:function(e){var t=Dl(e),i=t[t.length-2],a=this.findBreakableIndex(i);if(a===-1||!i)return t;var s=i.slice(a,a+1),o=this.isBreakingSpace(s),l=a+1,u=a+(o?0:1);return t[t.length-1]+=i.slice(l,i.length),t[t.length-2]=i.slice(0,u),t}},{key:"canBreakInLastChar",value:function(e){return!(e&&L4.test(e))}},{key:"sumTextWidthByCache",value:function(e,t){return e.split("").reduce(function(i,a){if(!t[a])throw Error("cannot count the word without cache");return i+t[a]},0)}},{key:"findBreakableIndex",value:function(e){for(var t=e.length-1;t>=0;t--)if(!L4.test(e[t]))return t;return-1}},{key:"getFromCache",value:function(e,t,i,a){var s=i[e];if(typeof s!="number"){var o=e.length*t;s=a.measureText(e).width+o,i[e]=s}return s}}])}(),cr={},gce=function(r){var n=new Bue,e=new Fue;return r={},ma(ma(ma(ma(ma(ma(ma(ma(ma(ma(r,Ir.FRAGMENT,null),Ir.CIRCLE,new Aue),Ir.ELLIPSE,new Lue),Ir.RECT,n),Ir.IMAGE,n),Ir.GROUP,new Gue),Ir.LINE,new Iue),Ir.TEXT,new $ue(cr)),Ir.POLYLINE,e),Ir.POLYGON,e),ma(ma(ma(r,Ir.PATH,new Due),Ir.HTML,new zue),Ir.MESH,null)}(),_ce=function(r){var n=new Zle,e=new pM;return r={},ma(ma(ma(ma(ma(ma(ma(ma(ma(ma(r,Wn.PERCENTAGE,null),Wn.NUMBER,new qle),Wn.ANGLE,new Wle),Wn.DEFINED_PATH,new Yle),Wn.PAINT,n),Wn.COLOR,n),Wn.FILTER,new Xle),Wn.LENGTH,e),Wn.LENGTH_PERCENTAGE,e),Wn.LENGTH_PERCENTAGE_12,new Kle),ma(ma(ma(ma(ma(ma(ma(ma(ma(ma(r,Wn.LENGTH_PERCENTAGE_14,new Jle),Wn.COORDINATE,new pM),Wn.OFFSET_DISTANCE,new eue),Wn.OPACITY_VALUE,new tue),Wn.PATH,new nue),Wn.LIST_OF_POINTS,new rue),Wn.SHADOW_BLUR,new iue),Wn.TEXT,new aue),Wn.TEXT_TRANSFORM,new sue),Wn.TRANSFORM,new Nue),ma(ma(ma(r,Wn.TRANSFORM_ORIGIN,new Oue),Wn.Z_INDEX,new Rue),Wn.MARKER,new Qle)}(),mce=function(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof k.g!="undefined"?k.g:{}};cr.CameraContribution=Loe,cr.AnimationTimeline=null,cr.EasingFunction=null,cr.offscreenCanvasCreator=new Hue,cr.sceneGraphSelector=new Zue,cr.sceneGraphService=new rce(cr),cr.textService=new vce(cr),cr.geometryUpdaterFactory=gce,cr.CSSPropertySyntaxFactory=_ce,cr.styleValueRegistry=new jle(cr),cr.layoutRegistry=null,cr.globalThis=mce(),cr.enableStyleSyntax=!0,cr.enableSizeAttenuation=!1;var I4=0;function WOe(){I4=0}var D4=new hv(qs.INSERTED,null,"","","",0,"",""),F4=new hv(qs.REMOVED,null,"","","",0,"",""),pce=new Zv(qs.DESTROY),yce=function(r){function n(){var e;Mr(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ks(this,n,[].concat(i)),e.entity=I4++,e.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},e.cullable={strategy:Ioe.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},e.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:[0,0,0],localRotation:[0,0,0,1],localScale:[1,1,1],localTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],localSkew:[0,0],position:[0,0,0],rotation:[0,0,0,1],scaling:[1,1,1],worldTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],origin:[0,0,0]},e.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},e.geometry={contentBounds:void 0,renderBounds:void 0,dirty:!0},e.rBushNode={aabb:void 0},e.namespaceURI="g",e.scrollLeft=0,e.scrollTop=0,e.clientTop=0,e.clientLeft=0,e.destroyed=!1,e.style={},e.computedStyle={},e.parsedStyle={},e.attributes={},e}return Js(n,r),Pr(n,[{key:"className",get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(t){return t!==""})}},{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 t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t+1]||null}return null}},{key:"previousSibling",get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t-1]||null}return null}},{key:"cloneNode",value:function(t){throw new Error(el)}},{key:"appendChild",value:function(t,i){var a;if(t.destroyed)throw new Error(Eoe);return cr.sceneGraphService.attach(t,this,i),(a=this.ownerDocument)!==null&&a!==void 0&&a.defaultView&&(!xM(this)&&t.nodeName===Ir.FRAGMENT?this.ownerDocument.defaultView.mountFragment(t):this.ownerDocument.defaultView.mountChildren(t)),this.isMutationObserved&&(D4.relatedNode=this,t.dispatchEvent(D4)),t}},{key:"insertBefore",value:function(t,i){if(!i)this.appendChild(t);else{t.parentElement&&t.parentElement.removeChild(t);var a=this.childNodes.indexOf(i);a===-1?this.appendChild(t):this.appendChild(t,a)}return t}},{key:"replaceChild",value:function(t,i){var a=this.childNodes.indexOf(i);return this.removeChild(i),this.appendChild(t,a),i}},{key:"removeChild",value:function(t){var i;return F4.relatedNode=this,t.dispatchEvent(F4),(i=t.ownerDocument)!==null&&i!==void 0&&i.defaultView&&t.ownerDocument.defaultView.unmountChildren(t),cr.sceneGraphService.detach(t),t}},{key:"removeChildren",value:function(){for(var t=this.childNodes.length-1;t>=0;t--){var i=this.childNodes[t];this.removeChild(i)}}},{key:"destroyChildren",value:function(){for(var t=this.childNodes.length-1;t>=0;t--){var i=this.childNodes[t];i.childNodes.length>0&&i.destroyChildren(),i.destroy()}}},{key:"matches",value:function(t){return cr.sceneGraphService.matches(t,this)}},{key:"getElementById",value:function(t){return cr.sceneGraphService.querySelector("#".concat(t),this)}},{key:"getElementsByName",value:function(t){return cr.sceneGraphService.querySelectorAll('[name="'.concat(t,'"]'),this)}},{key:"getElementsByClassName",value:function(t){return cr.sceneGraphService.querySelectorAll(".".concat(t),this)}},{key:"getElementsByTagName",value:function(t){return cr.sceneGraphService.querySelectorAll(t,this)}},{key:"querySelector",value:function(t){return cr.sceneGraphService.querySelector(t,this)}},{key:"querySelectorAll",value:function(t){return cr.sceneGraphService.querySelectorAll(t,this)}},{key:"closest",value:function(t){var i=this;do{if(cr.sceneGraphService.matches(t,i))return i;i=i.parentElement}while(i!==null);return null}},{key:"find",value:function(t){var i=this,a=null;return this.forEach(function(s){return s!==i&&t(s)?(a=s,!1):!0}),a}},{key:"findAll",value:function(t){var i=this,a=[];return this.forEach(function(s){s!==i&&t(s)&&a.push(s)}),a}},{key:"after",value:function(){var t=this;if(this.parentNode){for(var i=this.parentNode.childNodes.indexOf(this),a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];s.forEach(function(l,u){var c;return(c=t.parentNode)===null||c===void 0?void 0:c.appendChild(l,i+u+1)})}}},{key:"before",value:function(){if(this.parentNode){for(var t,i=this.parentNode.childNodes.indexOf(this),a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];var l=s[0],u=s.slice(1);this.parentNode.appendChild(l,i),(t=l).after.apply(t,Dl(u))}}},{key:"replaceWith",value:function(){this.after.apply(this,arguments),this.remove()}},{key:"append",value:function(){for(var t=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];a.forEach(function(o){return t.appendChild(o)})}},{key:"prepend",value:function(){for(var t=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];a.forEach(function(o,l){return t.appendChild(o,l)})}},{key:"replaceChildren",value:function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)}},{key:"remove",value:function(){return this.parentNode?this.parentNode.removeChild(this):this}},{key:"destroy",value:function(){this.destroyChildren(),this.dispatchEvent(pce),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0}},{key:"getGeometryBounds",value:function(){return cr.sceneGraphService.getGeometryBounds(this)}},{key:"getRenderBounds",value:function(){return cr.sceneGraphService.getBounds(this,!0)}},{key:"getBounds",value:function(){return cr.sceneGraphService.getBounds(this)}},{key:"getLocalBounds",value:function(){return cr.sceneGraphService.getLocalBounds(this)}},{key:"getBoundingClientRect",value:function(){return cr.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(t){if(typeof t!="symbol"){var i=this.attributes[t];return i}}},{key:"hasAttribute",value:function(t){return this.getAttributeNames().includes(t)}},{key:"hasAttributes",value:function(){return!!this.getAttributeNames().length}},{key:"removeAttribute",value:function(t){this.setAttribute(t,null),delete this.attributes[t]}},{key:"setAttribute",value:function(t,i,a,s){this.attributes[t]=i}},{key:"getAttributeNS",value:function(t,i){throw new Error(el)}},{key:"getAttributeNode",value:function(t){throw new Error(el)}},{key:"getAttributeNodeNS",value:function(t,i){throw new Error(el)}},{key:"hasAttributeNS",value:function(t,i){throw new Error(el)}},{key:"removeAttributeNS",value:function(t,i){throw new Error(el)}},{key:"removeAttributeNode",value:function(t){throw new Error(el)}},{key:"setAttributeNS",value:function(t,i,a){throw new Error(el)}},{key:"setAttributeNode",value:function(t){throw new Error(el)}},{key:"setAttributeNodeNS",value:function(t){throw new Error(el)}},{key:"toggleAttribute",value:function(t,i){throw new Error(el)}}])}(q_);function eo(r){return!!(r!=null&&r.nodeName)}var xce=cr.globalThis.Proxy?cr.globalThis.Proxy:function(){},Xv=new hv(qs.ATTR_MODIFIED,null,null,null,null,hv.MODIFICATION,null,null),Jy=E.Ue(),Ece=X.Ue(),Xl=function(r){function n(e){var t;return Mr(this,n),t=Ks(this,n),t.isCustomElement=!1,t.isMutationObserved=!1,t.activeAnimations=[],t.config=e,t.id=e.id||"",t.name=e.name||"",(e.className||e.class)&&(t.className=e.className||e.class),t.nodeName=e.type||Ir.GROUP,e.initialParsedStyle&&Object.assign(t.parsedStyle,e.initialParsedStyle),t.initAttributes(e.style),cr.enableStyleSyntax&&(t.style=new xce({setProperty:function(a,s){t.setAttribute(a,s)},getPropertyValue:function(a){return t.getAttribute(a)},removeProperty:function(a){t.removeAttribute(a)},item:function(){return""}},{get:function(a,s){return a[s]!==void 0?a[s]:t.getAttribute(s)},set:function(a,s,o){return t.setAttribute(s,o),!0}})),t}return Js(n,r),Pr(n,[{key:"destroy",value:function(){NF(n,"destroy",this,3)([]),this.getAnimations().forEach(function(t){t.cancel()})}},{key:"cloneNode",value:function(t,i){var a=_l({},this.attributes);for(var s in a){var o=a[s];eo(o)&&s!=="clipPath"&&s!=="offsetPath"&&s!=="textPath"&&(a[s]=o.cloneNode(t)),i&&(a[s]=i(s,o))}var l=new this.constructor(_l(_l({},this.config),{},{style:a}));return l.setLocalTransform(this.getLocalTransform()),t&&this.children.forEach(function(u){if(!u.style.isMarker){var c=u.cloneNode(t);l.appendChild(c)}}),l}},{key:"initAttributes",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i={forceUpdateGeometry:!0};cr.styleValueRegistry.processProperties(this,t,i),this.renderable.dirty=!0}},{key:"setAttribute",value:function(t,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;(0,ie.Z)(i)||(a||i!==this.attributes[t])&&(this.internalSetAttribute(t,i,{memoize:s}),NF(n,"setAttribute",this,3)([t,i]))}},{key:"internalSetAttribute",value:function(t,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=this.renderable,o=this.attributes[t],l=this.parsedStyle[t];cr.styleValueRegistry.processProperties(this,ma({},t,i),a),s.dirty=!0;var u=this.parsedStyle[t];if(this.isConnected&&(Xv.relatedNode=this,Xv.prevValue=o,Xv.newValue=i,Xv.attrName=t,Xv.prevParsedValue=l,Xv.newParsedValue=u,this.isMutationObserved?this.dispatchEvent(Xv):(Xv.target=this,this.ownerDocument.defaultView.dispatchEvent(Xv,!0))),this.isCustomElement&&this.isConnected||!this.isCustomElement){var c,d;(c=(d=this).attributeChangedCallback)===null||c===void 0||c.call(d,t,o,i,l,u)}}},{key:"getBBox",value:function(){var t=this.getBounds(),i=t.getMin(),a=qo(i,2),s=a[0],o=a[1],l=t.getMax(),u=qo(l,2),c=u[0],d=u[1];return new $p(s,o,c-s,d-o)}},{key:"setOrigin",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return cr.sceneGraphService.setOrigin(this,Qc(t,i,a,!1)),this}},{key:"getOrigin",value:function(){return cr.sceneGraphService.getOrigin(this)}},{key:"setPosition",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return cr.sceneGraphService.setPosition(this,Qc(t,i,a,!1)),this}},{key:"setLocalPosition",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return cr.sceneGraphService.setLocalPosition(this,Qc(t,i,a,!1)),this}},{key:"translate",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return cr.sceneGraphService.translate(this,Qc(t,i,a,!1)),this}},{key:"translateLocal",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return cr.sceneGraphService.translateLocal(this,Qc(t,i,a,!1)),this}},{key:"getPosition",value:function(){return cr.sceneGraphService.getPosition(this)}},{key:"getLocalPosition",value:function(){return cr.sceneGraphService.getLocalPosition(this)}},{key:"scale",value:function(t,i,a){return this.scaleLocal(t,i,a)}},{key:"scaleLocal",value:function(t,i,a){return typeof t=="number"&&(i=i||t,a=a||t,t=Qc(t,i,a,!1)),cr.sceneGraphService.scaleLocal(this,t),this}},{key:"setLocalScale",value:function(t,i,a){return typeof t=="number"&&(i=i||t,a=a||t,t=Qc(t,i,a,!1)),cr.sceneGraphService.setLocalScale(this,t),this}},{key:"getLocalScale",value:function(){return cr.sceneGraphService.getLocalScale(this)}},{key:"getScale",value:function(){return cr.sceneGraphService.getScale(this)}},{key:"getEulerAngles",value:function(){var t=nM(Jy,cr.sceneGraphService.getWorldTransform(this)),i=qo(t,3),a=i[2];return lh(a)}},{key:"getLocalEulerAngles",value:function(){var t=nM(Jy,cr.sceneGraphService.getLocalRotation(this)),i=qo(t,3),a=i[2];return lh(a)}},{key:"setEulerAngles",value:function(t){return cr.sceneGraphService.setEulerAngles(this,0,0,t),this}},{key:"setLocalEulerAngles",value:function(t){return cr.sceneGraphService.setLocalEulerAngles(this,0,0,t),this}},{key:"rotateLocal",value:function(t,i,a){return(0,xe.Z)(i)&&(0,xe.Z)(a)?cr.sceneGraphService.rotateLocal(this,0,0,t):cr.sceneGraphService.rotateLocal(this,t,i,a),this}},{key:"rotate",value:function(t,i,a){return(0,xe.Z)(i)&&(0,xe.Z)(a)?cr.sceneGraphService.rotate(this,0,0,t):cr.sceneGraphService.rotate(this,t,i,a),this}},{key:"setRotation",value:function(t,i,a,s){return cr.sceneGraphService.setRotation(this,t,i,a,s),this}},{key:"setLocalRotation",value:function(t,i,a,s){return cr.sceneGraphService.setLocalRotation(this,t,i,a,s),this}},{key:"setLocalSkew",value:function(t,i){return cr.sceneGraphService.setLocalSkew(this,t,i),this}},{key:"getRotation",value:function(){return cr.sceneGraphService.getRotation(this)}},{key:"getLocalRotation",value:function(){return cr.sceneGraphService.getLocalRotation(this)}},{key:"getLocalSkew",value:function(){return cr.sceneGraphService.getLocalSkew(this)}},{key:"getLocalTransform",value:function(){return cr.sceneGraphService.getLocalTransform(this)}},{key:"getWorldTransform",value:function(){return cr.sceneGraphService.getWorldTransform(this)}},{key:"setLocalTransform",value:function(t){return cr.sceneGraphService.setLocalTransform(this,t),this}},{key:"resetLocalTransform",value:function(){cr.sceneGraphService.resetLocalTransform(this)}},{key:"getAnimations",value:function(){return this.activeAnimations}},{key:"animate",value:function(t,i){var a,s=(a=this.ownerDocument)===null||a===void 0?void 0:a.timeline;return s?s.play(this,t,i):null}},{key:"isVisible",value:function(){var t;return((t=this.parsedStyle)===null||t===void 0?void 0:t.visibility)!=="hidden"}},{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}},{key:"isInteractive",value:function(){var t;return((t=this.parsedStyle)===null||t===void 0?void 0:t.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,Dl(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})))+1),this}},{key:"toBack",value:function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,Dl(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})))-1),this}},{key:"getConfig",value:function(){return this.config}},{key:"attr",value:function(){for(var t=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var o=a[0],l=a[1];return o?(0,Gs.Z)(o)?(Object.keys(o).forEach(function(u){t.setAttribute(u,o[u])}),this):a.length===2?(this.setAttribute(o,l),this):this.attributes[o]:this.attributes}},{key:"getMatrix",value:function(t){var i=t||this.getWorldTransform(),a=L.getTranslation(Jy,i),s=qo(a,2),o=s[0],l=s[1],u=L.getScaling(Jy,i),c=qo(u,2),d=c[0],h=c[1],f=L.getRotation(Ece,i),v=nM(Jy,f),g=qo(v,3),m=g[0],y=g[2];return Moe(m||y,o,l,d,h)}},{key:"getLocalMatrix",value:function(){return this.getMatrix(this.getLocalTransform())}},{key:"setMatrix",value:function(t){var i=UF(t),a=qo(i,5),s=a[0],o=a[1],l=a[2],u=a[3],c=a[4];this.setEulerAngles(c).setPosition(s,o).setLocalScale(l,u)}},{key:"setLocalMatrix",value:function(t){var i=UF(t),a=qo(i,5),s=a[0],o=a[1],l=a[2],u=a[3],c=a[4];this.setLocalEulerAngles(c).setLocalPosition(s,o).setLocalScale(l,u)}},{key:"show",value:function(){this.forEach(function(t){t.style.visibility="visible"})}},{key:"hide",value:function(){this.forEach(function(t){t.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(t){return this.children[t]||null}},{key:"add",value:function(t,i){return this.appendChild(t,i)}},{key:"set",value:function(t,i){this.config[t]=i}},{key:"get",value:function(t){return this.config[t]}},{key:"moveTo",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(t,i,a),this}},{key:"move",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(t,i,a),this}},{key:"setZIndex",value:function(t){return this.style.zIndex=t,this}}])}(yce);Xl.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 bce=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Mr(this,n),Ks(this,n,[_l({type:Ir.CIRCLE},e)])}return Js(n,r),Pr(n)}(Xl);bce.PARSED_STYLE_LIST=new Set([].concat(Dl(Xl.PARSED_STYLE_LIST),["cx","cy","cz","r","isBillboard","isSizeAttenuation"]));var YOe=null,ZOe=null,kce=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Mr(this,n),Ks(this,n,[_l({type:Ir.ELLIPSE},e)])}return Js(n,r),Pr(n)}(Xl);kce.PARSED_STYLE_LIST=new Set([].concat(Dl(Xl.PARSED_STYLE_LIST),["cx","cy","cz","rx","ry","isBillboard","isSizeAttenuation"]));var XOe=null,wce=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Mr(this,n),Ks(this,n,[_l({type:Ir.GROUP},e)])}return Js(n,r),Pr(n)}(Xl);wce.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var Sce=["style"],Tce=function(r){function n(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.style,a=Fp(t,Sce);return Mr(this,n),e=Ks(this,n,[_l({type:Ir.HTML,style:i},a)]),e.cullable.enable=!1,e}return Js(n,r),Pr(n,[{key:"getDomElement",value:function(){return this.parsedStyle.$el}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"getLocalBounds",value:function(){if(this.parentNode){var t=L.invert(L.create(),this.parentNode.getWorldTransform()),i=this.getBounds();if(!Jc.isEmpty(i)){var a=new Jc;return a.setFromTransformedAABB(i,t),a}}return this.getBounds()}}])}(Xl);Tce.PARSED_STYLE_LIST=new Set([].concat(Dl(Xl.PARSED_STYLE_LIST),["x","y","$el","innerHTML","width","height"]));var Cce=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Mr(this,n),Ks(this,n,[_l({type:Ir.IMAGE},e)])}return Js(n,r),Pr(n)}(Xl);Cce.PARSED_STYLE_LIST=new Set([].concat(Dl(Xl.PARSED_STYLE_LIST),["x","y","z","src","width","height","isBillboard","billboardRotation","isSizeAttenuation","keepAspectRatio"]));var Mce=["style"],Pce=function(r){function n(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.style,a=Fp(t,Mce);Mr(this,n),e=Ks(this,n,[_l({type:Ir.LINE,style:_l({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},i)},a)]),e.markerStartAngle=0,e.markerEndAngle=0;var s=e.parsedStyle,o=s.markerStart,l=s.markerEnd;return o&&eo(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),l&&eo(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return Js(n,r),Pr(n,[{key:"attributeChangedCallback",value:function(t,i,a,s,o){t==="x1"||t==="y1"||t==="x2"||t==="y2"||t==="markerStartOffset"||t==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):t==="markerStart"?(s&&eo(s)&&(this.markerStartAngle=0,s.remove()),o&&eo(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):t==="markerEnd"&&(s&&eo(s)&&(this.markerEndAngle=0,s.remove()),o&&eo(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1)))}},{key:"transformMarker",value:function(t){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=i.x1,c=i.x2,d=i.y1,h=i.y2,f=t?a:s;if(!(!f||!eo(f))){var v=0,g,m,y,w,T,G;t?(y=u,w=d,g=c-u,m=h-d,T=o||0,G=this.markerStartAngle):(y=c,w=h,g=u-c,m=d-h,T=l||0,G=this.markerEndAngle),v=Math.atan2(m,g),f.setLocalEulerAngles(v*180/Math.PI+G),f.setLocalPosition(y+Math.cos(v)*T,w+Math.sin(v)*T)}}},{key:"getPoint",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle,s=a.x1,o=a.y1,l=a.x2,u=a.y2,c=(0,Nt.U4)(s,o,l,u,t),d=c.x,h=c.y,f=E.fF(E.Ue(),E.al(d,h,0),i?this.getWorldTransform():this.getLocalTransform());return new oh(f[0],f[1])}},{key:"getPointAtLength",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(t/this.getTotalLength(),i)}},{key:"getTotalLength",value:function(){var t=this.parsedStyle,i=t.x1,a=t.y1,s=t.x2,o=t.y2;return(0,Nt.Xk)(i,a,s,o)}}])}(Xl);Pce.PARSED_STYLE_LIST=new Set([].concat(Dl(Xl.PARSED_STYLE_LIST),["x1","y1","x2","y2","z1","z2","isBillboard","isSizeAttenuation","markerStart","markerEnd","markerStartOffset","markerEndOffset"]));var Nce=["style"],Oce=function(r){function n(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.style,a=Fp(t,Nce);Mr(this,n),e=Ks(this,n,[_l({type:Ir.PATH,style:i,initialParsedStyle:{miterLimit:4,d:_l({},YF)}},a)]),e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[];var s=e.parsedStyle,o=s.markerStart,l=s.markerEnd,u=s.markerMid;return o&&eo(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),u&&eo(u)&&e.placeMarkerMid(u),l&&eo(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return Js(n,r),Pr(n,[{key:"attributeChangedCallback",value:function(t,i,a,s,o){t==="d"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):t==="markerStartOffset"||t==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):t==="markerStart"?(s&&eo(s)&&(this.markerStartAngle=0,s.remove()),o&&eo(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):t==="markerEnd"?(s&&eo(s)&&(this.markerEndAngle=0,s.remove()),o&&eo(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1))):t==="markerMid"&&this.placeMarkerMid(o)}},{key:"transformMarker",value:function(t){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=t?a:s;if(!(!u||!eo(u))){var c=0,d,h,f,v,g,m;if(t){var y=this.getStartTangent(),w=qo(y,2),T=w[0],G=w[1];f=G[0],v=G[1],d=T[0]-G[0],h=T[1]-G[1],g=o||0,m=this.markerStartAngle}else{var x=this.getEndTangent(),_=qo(x,2),p=_[0],b=_[1];f=b[0],v=b[1],d=p[0]-b[0],h=p[1]-b[1],g=l||0,m=this.markerEndAngle}c=Math.atan2(h,d),u.setLocalEulerAngles(c*180/Math.PI+m),u.setLocalPosition(f+Math.cos(c)*g,v+Math.sin(c)*g)}}},{key:"placeMarkerMid",value:function(t){var i=this.parsedStyle.d.segments;if(this.markerMidList.forEach(function(c){c.remove()}),t&&eo(t))for(var a=1;a<i.length-1;a++){var s=qo(i[a].currentPoint,2),o=s[0],l=s[1],u=a===1?t:t.cloneNode(!0);this.markerMidList.push(u),this.appendChild(u),u.setLocalPosition(o,l)}}},{key:"getTotalLength",value:function(){return s4(this)}},{key:"getPointAtLength",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle.d.absolutePath,s=(0,jm.r)(a,t),o=s.x,l=s.y,u=E.fF(E.Ue(),E.al(o,l,0),i?this.getWorldTransform():this.getLocalTransform());return new oh(u[0],u[1])}},{key:"getPoint",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPointAtLength(t*s4(this),i)}},{key:"getStartTangent",value:function(){var t=this.parsedStyle.d.segments,i=[];if(t.length>1){var a=t[0].currentPoint,s=t[1].currentPoint,o=t[1].startTangent;i=[],o?(i.push([a[0]-o[0],a[1]-o[1]]),i.push([a[0],a[1]])):(i.push([s[0],s[1]]),i.push([a[0],a[1]]))}return i}},{key:"getEndTangent",value:function(){var t=this.parsedStyle.d.segments,i=t.length,a=[];if(i>1){var s=t[i-2].currentPoint,o=t[i-1].currentPoint,l=t[i-1].endTangent;a=[],l?(a.push([o[0]-l[0],o[1]-l[1]]),a.push([o[0],o[1]])):(a.push([s[0],s[1]]),a.push([o[0],o[1]]))}return a}}])}(Xl);Oce.PARSED_STYLE_LIST=new Set([].concat(Dl(Xl.PARSED_STYLE_LIST),["d","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard","isSizeAttenuation"]));var Rce=["style"],wM=function(r){function n(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.style,a=Fp(t,Rce);Mr(this,n),e=Ks(this,n,[_l({type:Ir.POLYGON,style:i,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},a)]),e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[];var s=e.parsedStyle,o=s.markerStart,l=s.markerEnd,u=s.markerMid;return o&&eo(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),u&&eo(u)&&e.placeMarkerMid(u),l&&eo(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return Js(n,r),Pr(n,[{key:"attributeChangedCallback",value:function(t,i,a,s,o){t==="points"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):t==="markerStartOffset"||t==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):t==="markerStart"?(s&&eo(s)&&(this.markerStartAngle=0,s.remove()),o&&eo(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):t==="markerEnd"?(s&&eo(s)&&(this.markerEndAngle=0,s.remove()),o&&eo(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1))):t==="markerMid"&&this.placeMarkerMid(o)}},{key:"transformMarker",value:function(t){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=i.points,c=u||{},d=c.points,h=t?a:s;if(!(!h||!eo(h)||!d)){var f=0,v,g,m,y,w,T;if(m=d[0][0],y=d[0][1],t)v=d[1][0]-d[0][0],g=d[1][1]-d[0][1],w=o||0,T=this.markerStartAngle;else{var G=d.length;this.parsedStyle.isClosed?(v=d[G-1][0]-d[0][0],g=d[G-1][1]-d[0][1]):(m=d[G-1][0],y=d[G-1][1],v=d[G-2][0]-d[G-1][0],g=d[G-2][1]-d[G-1][1]),w=l||0,T=this.markerEndAngle}f=Math.atan2(g,v),h.setLocalEulerAngles(f*180/Math.PI+T),h.setLocalPosition(m+Math.cos(f)*w,y+Math.sin(f)*w)}}},{key:"placeMarkerMid",value:function(t){var i=this.parsedStyle.points,a=i||{},s=a.points;if(this.markerMidList.forEach(function(d){d.remove()}),this.markerMidList=[],t&&eo(t)&&s)for(var o=1;o<(this.parsedStyle.isClosed?s.length:s.length-1);o++){var l=s[o][0],u=s[o][1],c=o===1?t:t.cloneNode(!0);this.markerMidList.push(c),this.appendChild(c),c.setLocalPosition(l,u)}}}])}(Xl);wM.PARSED_STYLE_LIST=new Set([].concat(Dl(Xl.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isClosed","isBillboard","isSizeAttenuation"]));var Ace=["style"],Lce=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.style,i=Fp(e,Ace);return Mr(this,n),Ks(this,n,[_l({type:Ir.POLYLINE,style:t,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},i)])}return Js(n,r),Pr(n,[{key:"getTotalLength",value:function(){return gle(this)}},{key:"getPointAtLength",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(t/this.getTotalLength(),i)}},{key:"getPoint",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle.points.points;if(this.parsedStyle.points.segments.length===0){var s=[],o=0,l,u,c=this.getTotalLength();a.forEach(function(y,w){a[w+1]&&(l=[0,0],l[0]=o/c,u=(0,Nt.Xk)(y[0],y[1],a[w+1][0],a[w+1][1]),o+=u,l[1]=o/c,s.push(l))}),this.parsedStyle.points.segments=s}var d=0,h=0;this.parsedStyle.points.segments.forEach(function(y,w){t>=y[0]&&t<=y[1]&&(d=(t-y[0])/(y[1]-y[0]),h=w)});var f=(0,Nt.U4)(a[h][0],a[h][1],a[h+1][0],a[h+1][1],d),v=f.x,g=f.y,m=E.fF(E.Ue(),E.al(v,g,0),i?this.getWorldTransform():this.getLocalTransform());return new oh(m[0],m[1])}},{key:"getStartTangent",value:function(){var t=this.parsedStyle.points.points,i=[];return i.push([t[1][0],t[1][1]]),i.push([t[0][0],t[0][1]]),i}},{key:"getEndTangent",value:function(){var t=this.parsedStyle.points.points,i=t.length-1,a=[];return a.push([t[i-1][0],t[i-1][1]]),a.push([t[i][0],t[i][1]]),a}}])}(wM);Lce.PARSED_STYLE_LIST=new Set([].concat(Dl(wM.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard"]));var Ice=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Mr(this,n),Ks(this,n,[_l({type:Ir.RECT},e)])}return Js(n,r),Pr(n)}(Xl);Ice.PARSED_STYLE_LIST=new Set([].concat(Dl(Xl.PARSED_STYLE_LIST),["x","y","z","width","height","isBillboard","isSizeAttenuation","radius"]));var Dce=["style"],Fce=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.style,i=Fp(e,Dce);return Mr(this,n),Ks(this,n,[_l({type:Ir.TEXT,style:_l({fill:"black"},t)},i)])}return Js(n,r),Pr(n,[{key:"getComputedTextLength",value:function(){var t;return this.getGeometryBounds(),((t=this.parsedStyle.metrics)===null||t===void 0?void 0:t.maxLineWidth)||0}},{key:"getLineBoundingRects",value:function(){var t;return this.getGeometryBounds(),((t=this.parsedStyle.metrics)===null||t===void 0?void 0:t.lineMetrics)||[]}},{key:"isOverflowing",value:function(){return this.getGeometryBounds(),!!this.parsedStyle.isOverflowing}}])}(Xl);Fce.PARSED_STYLE_LIST=new Set([].concat(Dl(Xl.PARSED_STYLE_LIST),["x","y","z","isBillboard","billboardRotation","isSizeAttenuation","text","textAlign","textBaseline","fontStyle","fontSize","fontFamily","fontWeight","fontVariant","lineHeight","letterSpacing","leading","wordWrap","wordWrapWidth","maxLines","textOverflow","isOverflowing","textPath","textDecorationLine","textDecorationColor","textDecorationStyle","textPathSide","textPathStartOffset","metrics","dx","dy"]));var KOe=null,JOe={number:function(n){return new vs(n)},percent:function(n){return new vs(n,"%")},px:function(n){return new vs(n,"px")},em:function(n){return new vs(n,"em")},rem:function(n){return new vs(n,"rem")},deg:function(n){return new vs(n,"deg")},grad:function(n){return new vs(n,"grad")},rad:function(n){return new vs(n,"rad")},turn:function(n){return new vs(n,"turn")},s:function(n){return new vs(n,"s")},ms:function(n){return new vs(n,"ms")},registerProperty:function(n){var e=n.name,t=n.inherits,i=n.interpolable,a=n.initialValue,s=n.syntax;cr.styleValueRegistry.registerMetadata({n:e,inh:t,int:i,d:a,syntax:s})},registerLayout:function(n,e){cr.layoutRegistry.registerLayout(n,e)}},QOe=null,Bce=function(){function r(n){Mr(this,r),this.strategies=n}return Pr(r,[{key:"apply",value:function(e){var t=e.camera,i=e.renderingService,a=e.renderingContext,s=this.strategies;i.hooks.cull.tap(r.tag,function(o){if(o){var l=o.cullable;return s.length===0?l.visible=a.unculledEntities.indexOf(o.entity)>-1:l.visible=s.every(function(u){return u.isVisible(t,o)}),!o.isCulled()&&o.isVisible()?o:(o.dispatchEvent(new Zv(qs.CULLED)),null)}return o}),i.hooks.afterRender.tap(r.tag,function(o){o.cullable.visibilityPlaneMask=-1})}}])}();Bce.tag="Culling";var $ce=function(){function r(){var n=this;Mr(this,r),this.autoPreventDefault=!1,this.rootPointerEvent=new Vue(null),this.rootWheelEvent=new Uue(null),this.onPointerMove=function(e){var t,i=(t=n.context.renderingContext.root)===null||t===void 0||(t=t.ownerDocument)===null||t===void 0?void 0:t.defaultView;if(!(i.supportsTouchEvents&&e.pointerType==="touch")){var a=n.normalizeToPointerEvent(e,i),s=Dp(a),o;try{for(s.s();!(o=s.n()).done;){var l=o.value,u=n.bootstrapEvent(n.rootPointerEvent,l,i,e);n.context.eventService.mapEvent(u)}}catch(c){s.e(c)}finally{s.f()}n.setCursor(n.context.eventService.cursor)}},this.onClick=function(e){var t,i=(t=n.context.renderingContext.root)===null||t===void 0||(t=t.ownerDocument)===null||t===void 0?void 0:t.defaultView,a=n.normalizeToPointerEvent(e,i),s=Dp(a),o;try{for(s.s();!(o=s.n()).done;){var l=o.value,u=n.bootstrapEvent(n.rootPointerEvent,l,i,e);n.context.eventService.mapEvent(u)}}catch(c){s.e(c)}finally{s.f()}n.setCursor(n.context.eventService.cursor)}}return Pr(r,[{key:"apply",value:function(e){var t=this;this.context=e;var i=e.renderingService,a=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(s){var o=t.context.renderingService.hooks.pickSync.call({position:s,picked:[],topmost:!0}),l=o.picked;return l[0]||null}),i.hooks.pointerWheel.tap(r.tag,function(s){var o=t.normalizeWheelEvent(s);t.context.eventService.mapEvent(o)}),i.hooks.pointerDown.tap(r.tag,function(s){if(!(a.supportsTouchEvents&&s.pointerType==="touch")){var o=t.normalizeToPointerEvent(s,a);if(t.autoPreventDefault&&o[0].isNormalized){var l=s.cancelable||!("cancelable"in s);l&&s.preventDefault()}var u=Dp(o),c;try{for(u.s();!(c=u.n()).done;){var d=c.value,h=t.bootstrapEvent(t.rootPointerEvent,d,a,s);t.context.eventService.mapEvent(h)}}catch(f){u.e(f)}finally{u.f()}t.setCursor(t.context.eventService.cursor)}}),i.hooks.pointerUp.tap(r.tag,function(s){if(!(a.supportsTouchEvents&&s.pointerType==="touch")){var o=t.context.contextService.getDomElement(),l=t.context.eventService.isNativeEventFromCanvas(o,s),u=l?"":"outside",c=t.normalizeToPointerEvent(s,a),d=Dp(c),h;try{for(d.s();!(h=d.n()).done;){var f=h.value,v=t.bootstrapEvent(t.rootPointerEvent,f,a,s);v.type+=u,t.context.eventService.mapEvent(v)}}catch(g){d.e(g)}finally{d.f()}t.setCursor(t.context.eventService.cursor)}}),i.hooks.pointerMove.tap(r.tag,this.onPointerMove),i.hooks.pointerOver.tap(r.tag,this.onPointerMove),i.hooks.pointerOut.tap(r.tag,this.onPointerMove),i.hooks.click.tap(r.tag,this.onClick),i.hooks.pointerCancel.tap(r.tag,function(s){var o=t.normalizeToPointerEvent(s,a),l=Dp(o),u;try{for(l.s();!(u=l.n()).done;){var c=u.value,d=t.bootstrapEvent(t.rootPointerEvent,c,a,s);t.context.eventService.mapEvent(d)}}catch(h){l.e(h)}finally{l.f()}t.setCursor(t.context.eventService.cursor)})}},{key:"bootstrapEvent",value:function(e,t,i,a){e.view=i,e.originalEvent=null,e.nativeEvent=a,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this.transferMouseData(e,t);var s=this.context.eventService.client2Viewport({x:t.clientX,y:t.clientY}),o=s.x,l=s.y;e.viewport.x=o,e.viewport.y=l;var u=this.context.eventService.viewport2Canvas(e.viewport),c=u.x,d=u.y;return e.canvas.x=c,e.canvas.y=d,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.isTrusted=a.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=cue[e.type]||e.type),e}},{key:"normalizeWheelEvent",value:function(e){var t=this.rootWheelEvent;this.transferMouseData(t,e),t.deltaMode=e.deltaMode,t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ;var i=this.context.eventService.client2Viewport({x:e.clientX,y:e.clientY}),a=i.x,s=i.y;t.viewport.x=a,t.viewport.y=s;var o=this.context.eventService.viewport2Canvas(t.viewport),l=o.x,u=o.y;return t.canvas.x=l,t.canvas.y=u,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.nativeEvent=e,t.type=e.type,t}},{key:"transferMouseData",value:function(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=due.now(),e.type=t.type,e.altKey=t.altKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.ctrlKey=t.ctrlKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.screen.x=t.screenX,e.screen.y=t.screenY,e.relatedTarget=null}},{key:"setCursor",value:function(e){this.context.contextService.applyCursorStyle(e||this.context.config.cursor||"default")}},{key:"normalizeToPointerEvent",value:function(e,t){var i=[];if(t.isTouchEvent(e))for(var a=0;a<e.changedTouches.length;a++){var s=e.changedTouches[a];(0,ie.Z)(s.button)&&(s.button=0),(0,ie.Z)(s.buttons)&&(s.buttons=1),(0,ie.Z)(s.isPrimary)&&(s.isPrimary=e.touches.length===1&&e.type==="touchstart"),(0,ie.Z)(s.width)&&(s.width=s.radiusX||1),(0,ie.Z)(s.height)&&(s.height=s.radiusY||1),(0,ie.Z)(s.tiltX)&&(s.tiltX=0),(0,ie.Z)(s.tiltY)&&(s.tiltY=0),(0,ie.Z)(s.pointerType)&&(s.pointerType="touch"),(0,ie.Z)(s.pointerId)&&(s.pointerId=s.identifier||0),(0,ie.Z)(s.pressure)&&(s.pressure=s.force||.5),(0,ie.Z)(s.twist)&&(s.twist=0),(0,ie.Z)(s.tangentialPressure)&&(s.tangentialPressure=0),s.isNormalized=!0,s.type=e.type,i.push(s)}else if(t.isMouseEvent(e)){var o=e;(0,ie.Z)(o.isPrimary)&&(o.isPrimary=!0),(0,ie.Z)(o.width)&&(o.width=1),(0,ie.Z)(o.height)&&(o.height=1),(0,ie.Z)(o.tiltX)&&(o.tiltX=0),(0,ie.Z)(o.tiltY)&&(o.tiltY=0),(0,ie.Z)(o.pointerType)&&(o.pointerType="mouse"),(0,ie.Z)(o.pointerId)&&(o.pointerId=uue),(0,ie.Z)(o.pressure)&&(o.pressure=.5),(0,ie.Z)(o.twist)&&(o.twist=0),(0,ie.Z)(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,i.push(o)}else i.push(e);return i}}])}();$ce.tag="Event";var qOe=[Ir.CIRCLE,Ir.ELLIPSE,Ir.IMAGE,Ir.RECT,Ir.LINE,Ir.POLYLINE,Ir.POLYGON,Ir.TEXT,Ir.PATH,Ir.HTML],eRe=null,Gce=function(){function r(){Mr(this,r),this.syncTasks=new Map,this.isFirstTimeRendering=!0,this.syncing=!1,this.isFirstTimeRenderingFinished=!1}return Pr(r,[{key:"apply",value:function(e){var t=this,i,a=e.renderingService,s=e.renderingContext,o=e.rBushRoot,l=s.root.ownerDocument.defaultView;this.rBush=o;var u=function(g){var m=g.target;m.renderable.dirty=!0,a.dirtify()},c=function(g){t.syncTasks.set(g.target,g.detail.affectChildren),a.dirtify()},d=function(g){var m=g.target;cr.enableSizeAttenuation&&cr.styleValueRegistry.updateSizeAttenuation(m,l.getCamera().getZoom())},h=function(g){var m=g.target,y=m.rBushNode;y.aabb&&t.rBush.remove(y.aabb),t.syncTasks.delete(m),cr.sceneGraphService.dirtifyToRoot(m),a.dirtify()};a.hooks.init.tap(r.tag,function(){l.addEventListener(qs.MOUNTED,d),l.addEventListener(qs.UNMOUNTED,h),l.addEventListener(qs.ATTR_MODIFIED,u),l.addEventListener(qs.BOUNDS_CHANGED,c)}),a.hooks.destroy.tap(r.tag,function(){l.removeEventListener(qs.MOUNTED,d),l.removeEventListener(qs.UNMOUNTED,h),l.removeEventListener(qs.ATTR_MODIFIED,u),l.removeEventListener(qs.BOUNDS_CHANGED,c),t.syncTasks.clear()});var f=(i=cr.globalThis.requestIdleCallback)!==null&&i!==void 0?i:C4.bind(cr.globalThis);a.hooks.endFrame.tap(r.tag,function(){t.isFirstTimeRendering?(t.isFirstTimeRendering=!1,t.syncing=!0,f(function(){t.syncRTree(!0),t.isFirstTimeRenderingFinished=!0})):t.syncRTree()})}},{key:"syncNode",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.isConnected){var i=e.rBushNode;i.aabb&&this.rBush.remove(i.aabb);var a=e.getRenderBounds();if(a){var s=e.renderable;t&&(s.dirtyRenderBounds||(s.dirtyRenderBounds=new Jc),s.dirtyRenderBounds.update(a.center,a.halfExtents));var o=a.getMin(),l=qo(o,2),u=l[0],c=l[1],d=a.getMax(),h=qo(d,2),f=h[0],v=h[1];i.aabb||(i.aabb={}),i.aabb.displayObject=e,i.aabb.minX=u,i.aabb.minY=c,i.aabb.maxX=f,i.aabb.maxY=v}if(i.aabb&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.minX)&&!isNaN(i.aabb.minY))return i.aabb}}},{key:"syncRTree",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!(!t&&(this.syncing||this.syncTasks.size===0))){this.syncing=!0;var i=[],a=new Set,s=function(l){if(!a.has(l)&&l.renderable){var u=e.syncNode(l,t);u&&(i.push(u),a.add(l))}};this.syncTasks.forEach(function(o,l){o&&l.forEach(s);for(var u=l;u;)s(u),u=u.parentElement}),this.rBush.load(i),i.length=0,this.syncing=!1}}}])}();Gce.tag="Prepare";function tRe(r){return!!r.document}var Qy=function(r){return r.READY="ready",r.BEFORE_RENDER="beforerender",r.RERENDER="rerender",r.AFTER_RENDER="afterrender",r.BEFORE_DESTROY="beforedestroy",r.AFTER_DESTROY="afterdestroy",r.RESIZE="resize",r.DIRTY_RECTANGLE="dirtyrectangle",r.RENDERER_CHANGED="rendererchanged",r}({}),nRe=500,rRe=.1,iRe=1e3,aRe=new Zv(qs.MOUNTED),sRe=new Zv(qs.UNMOUNTED),oRe=new Zv(Qy.BEFORE_RENDER),lRe=new Zv(Qy.RERENDER),uRe=new Zv(Qy.AFTER_RENDER),cRe=null;var zce="g-canvas-camera",B4=function(){function r(){Mr(this,r),this.displayObjectHTMLElementMap=new WeakMap}return Pr(r,[{key:"joinTransformMatrix",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0,0,0];return"matrix(".concat([e[0],e[1],e[4],e[5],e[12]+t[0],e[13]+t[1]].join(","),")")}},{key:"apply",value:function(e,t){var i=this,a=e.camera,s=e.renderingContext,o=e.renderingService;this.context=e;var l=s.root.ownerDocument.defaultView,u=l.context.eventService.nativeHTMLMap,c=function(y,w){w.style.transform=i.joinTransformMatrix(y.getWorldTransform(),y.getOrigin())},d=function(y){var w=y.target;if(w.nodeName===Ir.HTML){i.$camera||(i.$camera=i.createCamera(a));var T=i.getOrCreateEl(w);i.$camera.appendChild(T),Object.keys(w.attributes).forEach(function(G){i.updateAttribute(G,w)}),c(w,T),u.set(T,w)}},h=function(y){var w=y.target;if(w.nodeName===Ir.HTML&&i.$camera){var T=i.getOrCreateEl(w);T&&(T.remove(),u.delete(T))}},f=function(y){var w=y.target;if(w.nodeName===Ir.HTML){var T=y.attrName;i.updateAttribute(T,w)}},v=function(y){var w=y.target,T=w.nodeName===Ir.FRAGMENT?w.childNodes:[w];T.forEach(function(G){if(G.nodeName===Ir.HTML){var x=i.getOrCreateEl(G);c(G,x)}})},g=function(){if(i.$camera){var y=i.context.config,w=y.width,T=y.height;i.$camera.parentElement.style.width="".concat(w||0,"px"),i.$camera.parentElement.style.height="".concat(T||0,"px")}};o.hooks.init.tap(r.tag,function(){l.addEventListener(Qy.RESIZE,g),l.addEventListener(qs.MOUNTED,d),l.addEventListener(qs.UNMOUNTED,h),l.addEventListener(qs.ATTR_MODIFIED,f),l.addEventListener(qs.BOUNDS_CHANGED,v)}),o.hooks.endFrame.tap(r.tag,function(){i.$camera&&s.renderReasons.has(Wue.CAMERA_CHANGED)&&(i.$camera.style.transform=i.joinTransformMatrix(a.getOrthoMatrix()))}),o.hooks.destroy.tap(r.tag,function(){i.$camera&&i.$camera.remove(),l.removeEventListener(Qy.RESIZE,g),l.removeEventListener(qs.MOUNTED,d),l.removeEventListener(qs.UNMOUNTED,h),l.removeEventListener(qs.ATTR_MODIFIED,f),l.removeEventListener(qs.BOUNDS_CHANGED,v)})}},{key:"createCamera",value:function(e){var t=this.context.config,i=t.document,a=t.width,s=t.height,o=this.context.contextService.getDomElement(),l=o.parentNode;if(l){var u=zce,c=l.querySelector("#".concat(u));if(!c){var d=(i||document).createElement("div");d.style.overflow="hidden",d.style.pointerEvents="none",d.style.position="absolute",d.style.left="0px",d.style.top="0px",d.style.width="".concat(a||0,"px"),d.style.height="".concat(s||0,"px");var h=(i||document).createElement("div");c=h,h.id=u,h.style.position="absolute",h.style.left="".concat(o.offsetLeft||0,"px"),h.style.top="".concat(o.offsetTop||0,"px"),h.style.transformOrigin="left top",h.style.transform=this.joinTransformMatrix(e.getOrthoMatrix()),h.style.pointerEvents="none",h.style.width="100%",h.style.height="100%",d.appendChild(h),l.appendChild(d)}return c}return null}},{key:"getOrCreateEl",value:function(e){var t=this.context.config.document,i=this.displayObjectHTMLElementMap.get(e);return i||(i=(t||document).createElement("div"),e.parsedStyle.$el=i,this.displayObjectHTMLElementMap.set(e,i),e.id&&(i.id=e.id),e.name&&i.setAttribute("name",e.name),e.className&&(i.className=e.className),i.style.position="absolute",i.style["will-change"]="transform",i.style.transform=this.joinTransformMatrix(e.getWorldTransform(),e.getOrigin())),i}},{key:"updateAttribute",value:function(e,t){var i=this.getOrCreateEl(t);switch(e){case"innerHTML":var a=t.parsedStyle.innerHTML;(0,Ze.Z)(a)?i.innerHTML=a:(i.innerHTML="",i.appendChild(a));break;case"x":i.style.left="".concat(t.parsedStyle.x,"px");break;case"y":i.style.top="".concat(t.parsedStyle.y,"px");break;case"transformOrigin":var s=t.parsedStyle.transformOrigin;i.style["transform-origin"]="".concat(s[0].buildCSSText(null,null,"")," ").concat(s[1].buildCSSText(null,null,""));break;case"width":var o=t.parsedStyle.width;i.style.width=(0,pe.Z)(o)?"".concat(o,"px"):o.toString();break;case"height":var l=t.parsedStyle.height;i.style.height=(0,pe.Z)(l)?"".concat(l,"px"):l.toString();break;case"zIndex":var u=t.parsedStyle.zIndex;i.style["z-index"]="".concat(u);break;case"visibility":var c=t.parsedStyle.visibility;i.style.visibility=c;break;case"pointerEvents":var d=t.parsedStyle.pointerEvents,h=d===void 0?"auto":d;i.style.pointerEvents=h;break;case"opacity":var f=t.parsedStyle.opacity;i.style.opacity="".concat(f);break;case"fill":var v=t.parsedStyle.fill,g="";Nb(v)?v.isNone?g="transparent":g=t.getAttribute("fill"):Array.isArray(v)?g=t.getAttribute("fill"):uM(v),i.style.background=g;break;case"stroke":var m=t.parsedStyle.stroke,y="";Nb(m)?m.isNone?y="transparent":y=t.getAttribute("stroke"):Array.isArray(m)?y=t.getAttribute("stroke"):uM(m),i.style["border-color"]=y,i.style["border-style"]="solid";break;case"lineWidth":var w=t.parsedStyle.lineWidth;i.style["border-width"]="".concat(w||0,"px");break;case"lineDash":i.style["border-style"]="dashed";break;case"filter":var T=t.style.filter;i.style.filter=T;break;default:!(0,xe.Z)(t.style[e])&&t.style[e]!==""&&(i.style[e]=t.style[e])}}}])}();B4.tag="HTMLRendering";var Vce=function(r){function n(){var e;Mr(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ks(this,n,[].concat(i)),e.name="html-renderer",e}return Js(n,r),Pr(n,[{key:"init",value:function(){this.addRenderingPlugin(new B4)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(_oe);var Uce=function(){function r(n){Un(this,r),this.renderingContext=n.renderingContext,this.canvasConfig=n.config}return Vn(r,[{key:"init",value:function(){var e=this.canvasConfig,t=e.container,i=e.canvas;if(i)this.$canvas=i,t&&i.parentElement!==t&&t.appendChild(i),this.$container=i.parentElement,this.canvasConfig.container=this.$container;else if(t&&(this.$container=(0,Ze.Z)(t)?document.getElementById(t):t,this.$container)){var a=document.createElement("canvas");this.$container.appendChild(a),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=a}this.context=this.$canvas.getContext("2d"),this.resize(this.canvasConfig.width,this.canvasConfig.height)}},{key:"getContext",value:function(){return this.context}},{key:"getDomElement",value:function(){return this.$canvas}},{key:"getDPR",value:function(){return this.dpr}},{key:"getBoundingClientRect",value:function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()}},{key:"destroy",value:function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)}},{key:"resize",value:function(e,t){var i=this.canvasConfig.devicePixelRatio,a=i||YE&&window.devicePixelRatio||1;a=a>=1?Math.ceil(a):1,this.dpr=a,this.$canvas&&(this.$canvas.width=this.dpr*e,this.$canvas.height=this.dpr*t,Aee(this.$canvas,e,t)),this.renderingContext.renderReasons.add(gte.CAMERA_CHANGED)}},{key:"applyCursorStyle",value:function(e){this.$container&&this.$container.style&&(this.$container.style.cursor=e)}},{key:"toDataURL",value:function(){var n=QE(Hv().mark(function t(){var i,a,s,o=arguments;return Hv().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return i=o.length>0&&o[0]!==void 0?o[0]:{},a=i.type,s=i.encoderOptions,u.abrupt("return",this.context.canvas.toDataURL(a,s));case 3:case"end":return u.stop()}},t,this)}));function e(){return n.apply(this,arguments)}return e}()}])}(),jce=function(r){function n(){var e;Un(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ba(this,n,[].concat(i)),e.name="canvas-context-register",e}return $a(n,r),Vn(n,[{key:"init",value:function(){this.context.ContextService=Uce}},{key:"destroy",value:function(){delete this.context.ContextService}}])}(ky),qy=function(r){function n(e){var t;return Un(this,n),t=Ba(this,n,[e]),t.registerPlugin(new jce),t.registerPlugin(new zne),t.registerPlugin(new mne),t.registerPlugin(new Yne),t.registerPlugin(new jse),t.registerPlugin(new Fne),t.registerPlugin(new Vce),t}return $a(n,r),Vn(n)}(GQ),nm=k(23413),Hce=function(r,n){var e={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&n.indexOf(t)<0&&(e[t]=r[t]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(r);i<t.length;i++)n.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(e[t[i]]=r[t[i]]);return e};class Fb extends Kh{constructor(n){super(Object.assign(Object.assign({},n),{style:Object.assign({},Fb.defaultStyleProps,n.style)})),this.rootPointerEvent=new N1(null),this.forwardEvents=e=>{const t=this.context.canvas,i=t.context.renderingContext.root.ownerDocument.defaultView;this.normalizeToPointerEvent(e,i).forEach(s=>{const o=this.bootstrapEvent(this.rootPointerEvent,s,i,e);(0,hp.Z)(t.context.eventService,"mappingTable.pointerupoutside",[]),t.context.eventService.mapEvent(o)})}}get eventService(){return this.context.canvas.context.eventService}get events(){return[un.CLICK,un.POINTER_DOWN,un.POINTER_MOVE,un.POINTER_UP,un.POINTER_OVER,un.POINTER_LEAVE]}getDomElement(){return this.getShape("key").getDomElement()}getKeyStyle(n){const e=(0,nm.Z)(n,["dx","dy","innerHTML","pointerEvents","cursor"]),{dx:t=0,dy:i=0}=e,a=Hce(e,["dx","dy"]),[s,o]=this.getSize(n);return Object.assign(Object.assign({x:t,y:i},a),{width:s,height:o})}drawKeyShape(n,e){const t=this.getKeyStyle(n),{x:i,y:a,width:s=0,height:o=0}=t,l=this.upsert("key-container",zf,{x:i,y:a,width:s,height:o,opacity:0},e);return this.upsert("key",E2,t,l)}connectedCallback(){if(!(this.context.canvas.getRenderer("main")instanceof qy))return;const t=this.getDomElement();this.events.forEach(i=>{t.addEventListener(i,this.forwardEvents)})}attributeChangedCallback(n,e,t){n==="zIndex"&&e!==t&&(this.getDomElement().style.zIndex=t)}destroy(){const n=this.getDomElement();this.events.forEach(e=>{n.removeEventListener(e,this.forwardEvents)}),super.destroy()}normalizeToPointerEvent(n,e){const t=[];if(e.isTouchEvent(n))for(let i=0;i<n.changedTouches.length;i++){const a=n.changedTouches[i];(0,ie.Z)(a.button)&&(a.button=0),(0,ie.Z)(a.buttons)&&(a.buttons=1),(0,ie.Z)(a.isPrimary)&&(a.isPrimary=n.touches.length===1&&n.type==="touchstart"),(0,ie.Z)(a.width)&&(a.width=a.radiusX||1),(0,ie.Z)(a.height)&&(a.height=a.radiusY||1),(0,ie.Z)(a.tiltX)&&(a.tiltX=0),(0,ie.Z)(a.tiltY)&&(a.tiltY=0),(0,ie.Z)(a.pointerType)&&(a.pointerType="touch"),(0,ie.Z)(a.pointerId)&&(a.pointerId=a.identifier||0),(0,ie.Z)(a.pressure)&&(a.pressure=a.force||.5),(0,ie.Z)(a.twist)&&(a.twist=0),(0,ie.Z)(a.tangentialPressure)&&(a.tangentialPressure=0),a.isNormalized=!0,a.type=n.type,t.push(a)}else if(e.isMouseEvent(n)){const i=n;(0,ie.Z)(i.isPrimary)&&(i.isPrimary=!0),(0,ie.Z)(i.width)&&(i.width=1),(0,ie.Z)(i.height)&&(i.height=1),(0,ie.Z)(i.tiltX)&&(i.tiltX=0),(0,ie.Z)(i.tiltY)&&(i.tiltY=0),(0,ie.Z)(i.pointerType)&&(i.pointerType="mouse"),(0,ie.Z)(i.pointerId)&&(i.pointerId=1),(0,ie.Z)(i.pressure)&&(i.pressure=.5),(0,ie.Z)(i.twist)&&(i.twist=0),(0,ie.Z)(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,t.push(i)}else t.push(n);return t}transferMouseData(n,e){n.isTrusted=e.isTrusted,n.srcElement=e.srcElement,n.timeStamp=performance.now(),n.type=e.type,n.altKey=e.altKey,n.metaKey=e.metaKey,n.shiftKey=e.shiftKey,n.ctrlKey=e.ctrlKey,n.button=e.button,n.buttons=e.buttons,n.client.x=e.clientX,n.client.y=e.clientY,n.movement.x=e.movementX,n.movement.y=e.movementY,n.page.x=e.pageX,n.page.y=e.pageY,n.screen.x=e.screenX,n.screen.y=e.screenY,n.relatedTarget=null}bootstrapEvent(n,e,t,i){n.view=t,n.originalEvent=null,n.nativeEvent=i,n.pointerId=e.pointerId,n.width=e.width,n.height=e.height,n.isPrimary=e.isPrimary,n.pointerType=e.pointerType,n.pressure=e.pressure,n.tangentialPressure=e.tangentialPressure,n.tiltX=e.tiltX,n.tiltY=e.tiltY,n.twist=e.twist,this.transferMouseData(n,e);const{x:a,y:s}=this.getViewportXY(e);n.viewport.x=a,n.viewport.y=s;const[o,l]=this.context.canvas.getCanvasByViewport([a,s]);return n.canvas.x=o,n.canvas.y=l,n.global.copyFrom(n.canvas),n.offset.copyFrom(n.canvas),n.isTrusted=i.isTrusted,n.type==="pointerleave"&&(n.type="pointerout"),n}getViewportXY(n){let e,t;const{offsetX:i,offsetY:a,clientX:s,clientY:o}=n;if(this.context.canvas.context.config.supportsCSSTransform&&!(0,xe.Z)(i)&&!(0,xe.Z)(a))e=i,t=a;else{const l=this.eventService.client2Viewport({x:s,y:o});e=l.x,t=l.y}return{x:e,y:t}}onframe(){super.onframe();const{opacity:n}=this.attributes;this.getDomElement().style.opacity=`${n}`}}Fb.defaultStyleProps={size:[160,80],halo:!1,icon:!1,label:!1,pointerEvents:"auto"};var $4=function(r,n){var e={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&n.indexOf(t)<0&&(e[t]=r[t]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(r);i<t.length;i++)n.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(e[t[i]]=r[t[i]]);return e};class Bb extends Kh{constructor(n){super(xu({style:Bb.defaultStyleProps},n))}getKeyStyle(n){const[e,t]=this.getSize(n),i=super.getKeyStyle(n),{fillOpacity:a,opacity:s=a}=i,o=$4(i,["fillOpacity","opacity"]);return Object.assign(Object.assign({opacity:s},o),{width:e,height:t,x:-e/2,y:-t/2})}getHaloStyle(n){if(n.halo===!1)return!1;const e=this.getShape("key").attributes,{fill:t,stroke:i}=e,a=$4(e,["fill","stroke"]),s=Wl(this.getGraphicStyle(n),"halo"),o=Number(s.lineWidth),[l,u]=Ji(this.getSize(n),[o,o]);return Object.assign(Object.assign({},s),{width:l,height:u,fill:"transparent",x:-l/2,y:-u/2})}getIconStyle(n){const e=super.getIconStyle(n),[t,i]=this.getSize(n);return e?Object.assign({width:t*Vv,height:i*Vv},e):!1}drawKeyShape(n,e){const t=this.upsert("key",xT,this.getKeyStyle(n),e);return bT(this),t}drawHaloShape(n,e){this.upsert("halo",zf,this.getHaloStyle(n),e)}update(n){super.update(n),n&&("x"in n||"y"in n||"z"in n)&&kT(this)}}Bb.defaultStyleProps={size:32};class Wce extends Kh{constructor(n){super(n)}getKeyStyle(n){const[e,t]=this.getSize(n);return Object.assign(Object.assign({},super.getKeyStyle(n)),{width:e,height:t,x:-e/2,y:-t/2})}getIconStyle(n){const e=super.getIconStyle(n),{width:t,height:i}=this.getShape("key").attributes;return e?Object.assign({width:t*Vv,height:i*Vv},e):!1}drawKeyShape(n,e){return this.upsert("key",zf,this.getKeyStyle(n),e)}}class Yce extends OE{constructor(n){super(n)}getInnerR(n){return n.innerR||this.getOuterR(n)*3/8}getOuterR(n){return Math.min(...this.getSize(n))/2}getPoints(n){return Pde(this.getOuterR(n),this.getInnerR(n))}getIconStyle(n){const e=super.getIconStyle(n),t=this.getInnerR(n)*2*Vv;return e?Object.assign({width:t,height:t},e):!1}getPortXY(n,e){const{placement:t="top"}=e,i=this.getShape("key").getLocalBounds(),a=Nde(this.getOuterR(n),this.getInnerR(n));return OM(i,t,a,!1)}}class $b extends OE{constructor(n){super(xu({style:$b.defaultStyleProps},n))}getPoints(n){const{direction:e}=n,[t,i]=this.getSize(n);return Ode(t,i,e)}getPortXY(n,e){const{direction:t}=n,{placement:i="top"}=e,a=this.getShape("key").getLocalBounds(),[s,o]=this.getSize(n),l=Rde(s,o,t);return OM(a,i,l,!1)}getIconStyle(n){const{icon:e,iconText:t,iconSrc:i,direction:a}=n;if(e===!1||(0,my.Z)(t||i))return!1;const s=Wl(this.getGraphicStyle(n),"icon"),o=this.getShape("key").getLocalBounds(),[l,u]=kJ(o,a),c=wJ(o,a)*2*Vv;return Object.assign({x:l,y:u,width:c,height:c},s)}}$b.defaultStyleProps={size:40,direction:"up"};var G4=function(r,n){var e={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&n.indexOf(t)<0&&(e[t]=r[t]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(r);i<t.length;i++)n.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(e[t[i]]=r[t[i]]);return e};class Up extends Kh{constructor(n){super(xu({style:Up.defaultStyleProps},n)),this.type="combo",this.updateComboPosition(this.parsedAttributes)}getKeySize(n){const{collapsed:e,childrenNode:t=[]}=n;return t.length===0?this.getEmptyKeySize(n):e?this.getCollapsedKeySize(n):this.getExpandedKeySize(n)}getEmptyKeySize(n){const{padding:e,collapsedSize:t}=n,[i,a,s,o]=Kf(e);return Ji(th(t),[o+a,i+s,0])}getCollapsedKeySize(n){return th(n.collapsedSize)}getExpandedKeySize(n){const e=this.getContentBBox(n);return[Jf(e),Qf(e),0]}getContentBBox(n){const{context:e,childrenNode:t=[],padding:i}=n,a=t.map(o=>e.element.getElement(o)).filter(Boolean);if(a.length===0){const o=new hl,{x:l=0,y:u=0,size:c}=n,[d,h]=th(c);return o.setMinMax([l-d/2,u-h/2,0],[l+d/2,u+h/2,0]),o}const s=cy(a.map(o=>o.getBounds()));return i?Eg(s,i):s}drawCollapsedMarkerShape(n,e){const t=this.getCollapsedMarkerStyle(n);Xh(this,"collapsedMarker",t)&&(this.upsert("collapsed-marker",GI,t,e),bT(this))}getCollapsedMarkerStyle(n){if(!n.collapsed||!n.collapsedMarker)return!1;const e=Wl(this.getGraphicStyle(n),"collapsedMarker"),{type:t}=e,i=G4(e,["type"]),a=this.getShape("key"),[s,o]=zv(a.getLocalBounds(),"center"),l=Object.assign(Object.assign({},i),{x:s,y:o});if(t){const u=this.getCollapsedMarkerText(t,n);Object.assign(l,{text:u})}return l}getCollapsedMarkerText(n,e){const{context:t,childrenData:i=[]}=e,{model:a}=t;return n==="descendant-count"?a.getDescendantsData(this.id).length.toString():n==="child-count"?i.length.toString():n==="node-count"?a.getDescendantsData(this.id).filter(s=>a.getElementType(Ut(s))==="node").length.toString():(0,Be.Z)(n)?n(i):""}getComboZIndex(n){return(this.context.model.getAncestorsData(this.id,Ls)||[]).length}getComboPosition(n){const{x:e=0,y:t=0,collapsed:i,context:a,childrenData:s=[]}=n;if(s.length===0)return[+e,+t,0];if(i){const{model:o}=a,l=o.getDescendantsData(this.id).filter(u=>!o.isCombo(Ut(u)));if(l.length>0&&l.some(FJ)){const u=l.reduce((c,d)=>Ji(c,Iu(d)),[0,0,0]);return Yh(u,l.length)}return[+e,+t,0]}return this.getContentBBox(n).center}getComboStyle(n){const{zIndex:e=this.getComboZIndex(n)}=n,[t,i]=this.getComboPosition(n);return{x:t,y:i,transform:[["translate",t,i]],zIndex:e}}updateComboPosition(n){const e=this.getComboStyle(n);Object.assign(this.style,e);const{x:t,y:i}=e;this.context.model.syncComboDatum({id:this.id,style:{x:t,y:i}}),kT(this)}render(n,e=this){super.render(n,e),this.drawCollapsedMarkerShape(n,e)}update(n={}){super.update(n),this.updateComboPosition(this.parsedAttributes)}onframe(){super.onframe(),this.attributes.collapsed||this.updateComboPosition(this.parsedAttributes),this.drawKeyShape(this.parsedAttributes,this)}animate(n,e){const t=super.animate(this.attributes.collapsed?n:n.map(i=>{var{x:a,y:s,z:o,transform:l}=i,u=G4(i,["x","y","z","transform"]);return u}),e);return t&&new Proxy(t,{set:(i,a,s)=>(a==="currentTime"&&Promise.resolve().then(()=>this.onframe()),Reflect.set(i,a,s))})}}Up.defaultStyleProps={childrenNode:[],droppable:!0,draggable:!0,collapsed:!1,collapsedSize:32,collapsedMarker:!0,collapsedMarkerZIndex:1,collapsedMarkerFontSize:12,collapsedMarkerTextAlign:"center",collapsedMarkerTextBaseline:"middle",collapsedMarkerType:"child-count"};class Zce extends Up{constructor(n){super(n)}drawKeyShape(n,e){return this.upsert("key",W0,this.getKeyStyle(n),e)}getKeyStyle(n){const{collapsed:e}=n,t=super.getKeyStyle(n),[i]=this.getKeySize(n);return Object.assign(Object.assign(Object.assign({},t),e&&Wl(t,"collapsed")),{r:i/2})}getCollapsedKeySize(n){const[e,t]=th(n.collapsedSize),i=Math.max(e,t)/2;return[i*2,i*2,0]}getExpandedKeySize(n){const e=this.getContentBBox(n),[t,i]=yg(e),a=Math.sqrt(Math.pow(t,2)+Math.pow(i,2))/2;return[a*2,a*2,0]}getIntersectPoint(n,e=!1){const t=this.getShape("key").getBounds();return TE(n,t,e)}}class Xce extends Up{constructor(n){super(n)}drawKeyShape(n,e){return this.upsert("key",zf,this.getKeyStyle(n),e)}getKeyStyle(n){const e=super.getKeyStyle(n),[t,i]=this.getKeySize(n);return Object.assign(Object.assign(Object.assign({},e),n.collapsed&&Wl(e,"collapsed")),{width:t,height:i,x:-t/2,y:-i/2})}}var Kce=k(50814);const Jce={padding:10};function z4(r,n,e,t,i,a){const{padding:s}=Object.assign(Jce,a),o=xg(e,s),l=xg(t,s),u=[r,...i,n];let c=null;const d=[];for(let h=0,f=u.length;h<f-1;h++){const v=h+1,g=u[h],m=u[v],y=$J(g,m);let w=null;if(h===0)if(v===f-1)if(o.intersects(l))w=TM(g,m,o,l);else if(!EE(g,o)&&!EE(m,l)){const T=C_(g,o),G=C_(m,l);w=U4(T,G,_c(T,G)),w.points.unshift(T),w.points.push(G)}else y||(w=qce(g,m,o,l));else Wh(m,o)?w=TM(g,m,o,xg(m,s),c):y||(w=Gb(g,m,o));else v===f-1?Wh(g,l)?w=TM(g,m,xg(g,s),l,c):y||(w=j4(g,m,l,c)):y||(w=U4(g,m,c));w?(d.push(...w.points),c=w.direction):c=_c(g,m),v<f-1&&d.push(m)}return d.map(P_)}const Qce={N:"S",S:"N",W:"E",E:"W"},V4={N:-Math.PI/2,S:Math.PI/2,E:0,W:Math.PI};function _c(r,n){const[e,t]=r,[i,a]=n;return e===i?t>a?"N":"S":t===a?e>i?"W":"E":null}function SM(r,n){return n==="N"||n==="S"?Qf(r):Jf(r)}function U4(r,n,e){const t=[r[0],n[1]],i=[n[0],r[1]],a=_c(r,t),s=_c(r,i),o=e?Qce[e]:null,l=a===e||a!==o&&s!==e?t:i;return{points:[l],direction:_c(l,n)}}function Gb(r,n,e){if(EE(r,e)){const t=ex(r,n,e);return{points:[t],direction:_c(t,n)}}else{const t=C_(r,e),a=["left","right"].includes(dy(r,e))?[n[0],t[1]]:[t[0],n[1]];return{points:[a],direction:_c(a,n)}}}function j4(r,n,e,t){const i=EE(n,e)?n:C_(n,e),a=[[i[0],r[1]],[r[0],i[1]]],s=a.filter(l=>bJ(l,e)&&!fI(l,e,!0)),o=s.filter(l=>_c(l,r)!==t);if(o.length>0){const l=o.find(u=>_c(r,u)===t)||o[0];return{points:[l],direction:_c(l,n)}}else{const l=(0,Kce.Z)(a,s)[0],u=wg(n,l,SM(e,t)/2);return{points:[ex(u,r,e),u],direction:_c(u,n)}}}function qce(r,n,e,t){let i=Gb(r,n,e);const a=fy(i.points[0]);if(Wh(a,t)){i=Gb(n,r,t);const s=fy(i.points[0]);if(Wh(s,e)){const o=wg(r,a,SM(e,_c(r,a))/2),l=wg(n,s,SM(t,_c(n,s))/2),u=[(o[0]+l[0])/2,(o[1]+l[1])/2],c=Gb(r,u,e),d=j4(u,n,t,c.direction);i.points=[c.points[0],d.points[0]],i.direction=d.direction}}return i}function TM(r,n,e,t,i){const s=cy([e,t]),o=js(n,s.center)>js(r,s.center),[l,u]=o?[n,r]:[r,n],c=Qf(s)+Jf(s);let d;if(i){const v=[l[0]+c*Math.cos(V4[i]),l[1]+c*Math.sin(V4[i])];d=wg(C_(v,s),v,.01)}else d=wg(C_(l,s),l,-.01);let h=ex(d,u,s),f=[vy(d,2),vy(h,2)];if((0,Ml.Z)(vy(d),vy(h))){const v=hT(Cs(d,l),[1,0,0])+Math.PI/2;h=[u[0]+c*Math.cos(v),u[1]+c*Math.sin(v),0],h=vy(wg(C_(h,s),u,-.01),2);const g=ex(d,h,s);f=[d,g,h]}return{points:o?f.reverse():f,direction:_c(o?d:h,n)}}function ex(r,n,e){let t=[r[0],n[1]];return Wh(t,e)&&(t=[n[0],r[1]]),t}function H4(r,n,e,t,i){let l=typeof n=="number"?n:.5;n==="start"&&(l=0),n==="end"&&(l=.99);const u=Du(r.getPoint(l)),c=Du(r.getPoint(l+.01));let d=n==="start"?"left":n==="end"?"right":"center";if(bI(u,c)||!e){const[y,w]=W4(r,l,t,i);return{transform:[["translate",y,w]],textAlign:d}}let h=Math.atan2(c[1]-u[1],c[0]-u[0]);c[0]<u[0]&&(d=d==="center"?d:d==="left"?"right":"left",t*=-1,h+=Math.PI);const[v,g]=W4(r,l,t,i,h),m=[["translate",v,g],["rotate",h/Math.PI*180]];return{textAlign:d,transform:m}}function ede(r,n,e,t,i){var a,s;const o=((a=r.badge)===null||a===void 0?void 0:a.getGeometryBounds().halfExtents[0])*2||0,l=((s=r.label)===null||s===void 0?void 0:s.getGeometryBounds().halfExtents[0])*2||0;return H4(r.key,e,!0,(l?(l/2+o/2)*(n==="suffix"?1:-1):0)+t,i)}function W4(r,n,e,t,i){const[a,s]=Du(r.getPoint(n));let o=e,l=t;return i&&(o=e*Math.cos(i)-t*Math.sin(i),l=e*Math.sin(i)+t*Math.cos(i)),[a+o,s+l]}function CM(r,n,e,t){if((0,Ml.Z)(r,n))return r;const i=Cs(n,r),a=[r[0]+e*i[0],r[1]+e*i[1]],s=Gv(SE(i,!1));return a[0]+=t*s[0],a[1]+=t*s[1],a}function tde(r){return(0,pe.Z)(r)?[r,-r]:r}function nde(r){return(0,pe.Z)(r)?[r,1-r]:r}function rde(r,n,e){return[["M",r[0],r[1]],["Q",e[0],e[1],n[0],n[1]]]}function Y4(r,n,e){return[["M",r[0],r[1]],["C",e[0][0],e[0][1],e[1][0],e[1][1],n[0],n[1]]]}function MM(r,n=0,e=!1){const t=r[0],i=r[r.length-1],a=r.slice(1,r.length-1),s=[["M",t[0],t[1]]];return a.forEach((o,l)=>{const u=a[l-1]||t,c=a[l+1]||i;if(!GJ(u,o,c)&&n){const[d,h]=ide(u,o,c,n);s.push(["L",d[0],d[1]],["Q",o[0],o[1],h[0],h[1]],["L",h[0],h[1]])}else s.push(["L",o[0],o[1]])}),s.push(["L",i[0],i[1]]),e&&s.push(["Z"]),s}function ide(r,n,e,t){const i=wE(r,n),a=wE(e,n),s=Math.min(t,Math.min(i,a)/2),o=[n[0]-s/i*(n[0]-r[0]),n[1]-s/i*(n[1]-r[1])],l=[n[0]-s/a*(n[0]-e[0]),n[1]-s/a*(n[1]-e[1])];return[o,l]}const ade=r=>{const n=Math.PI/2,e=Qf(r)/2,t=Jf(r)/2,i=Math.atan2(e,t)/2,a=Math.atan2(t,e)/2;return{top:[-n-a,-n+a],"top-right":[-n+a,-i],"right-top":[-n+a,-i],right:[-i,i],"bottom-right":[i,n-a],"right-bottom":[i,n-a],bottom:[n-a,n+a],"bottom-left":[n+a,Math.PI-i],"left-bottom":[n+a,Math.PI-i],left:[Math.PI-i,Math.PI+i],"top-left":[Math.PI+i,-n-a],"left-top":[Math.PI+i,-n-a]}};function Z4(r,n,e,t,i){const a=xg(r),s=r.getCenter();let o=t&&Fg(t),l=i&&Fg(i);if(!o||!l){const u=ade(a),c=u[n][0],d=u[n][1],[h,f]=yg(a),v=Math.max(h,f),g=Ji(s,[v*Math.cos(c),v*Math.sin(c),0]),m=Ji(s,[v*Math.cos(d),v*Math.sin(d),0]);o=AM(r,g),l=AM(r,m),e||([o,l]=[l,o])}return[o,l]}function sde(r,n,e,t,i,a){const s=r.getPorts()[i||a],o=r.getPorts()[a||i];let[l,u]=Z4(r,n,e,s,o);const c=ode(r,l,u,t);return s&&(l=nx(s,c[0])),o&&(u=nx(o,c[c.length-1])),Y4(l,u,c)}function ode(r,n,e,t){const i=r.getCenter();if((0,Ml.Z)(n,e)){const a=Cs(n,i),s=[t*Math.sign(a[0])||t/2,t*Math.sign(a[1])||-t/2,0];return[Ji(n,s),Ji(e,$v(s,[1,-1,1]))]}return[wg(i,n,js(i,n)+t),wg(i,e,js(i,e)+t)]}function lde(r,n,e,t,i,a,s){const o=RM(r),l=o[a||s],u=o[s||a];let[c,d]=Z4(r,e,t,l,u);const h=ude(r,c,d,i);return l&&(c=nx(l,h[0])),u&&(d=nx(u,h[h.length-1])),MM([c,...h,d],n)}function ude(r,n,e,t){const i=[],a=xg(r);if((0,Ml.Z)(n,e))switch(dy(n,a)){case"left":i.push([n[0]-t,n[1]]),i.push([n[0]-t,n[1]+t]),i.push([n[0],n[1]+t]);break;case"right":i.push([n[0]+t,n[1]]),i.push([n[0]+t,n[1]+t]),i.push([n[0],n[1]+t]);break;case"top":i.push([n[0],n[1]-t]),i.push([n[0]+t,n[1]-t]),i.push([n[0]+t,n[1]]);break;case"bottom":i.push([n[0],n[1]+t]),i.push([n[0]+t,n[1]+t]),i.push([n[0]+t,n[1]]);break}else{const s=dy(n,a),o=dy(e,a);if(s===o){const l=s;let u,c;switch(l){case"left":u=Math.min(n[0],e[0])-t,i.push([u,n[1]]),i.push([u,e[1]]);break;case"right":u=Math.max(n[0],e[0])+t,i.push([u,n[1]]),i.push([u,e[1]]);break;case"top":c=Math.min(n[1],e[1])-t,i.push([n[0],c]),i.push([e[0],c]);break;case"bottom":c=Math.max(n[1],e[1])+t,i.push([n[0],c]),i.push([e[0],c]);break}}else{const l=(h,f)=>({left:[f[0]-t,f[1]],right:[f[0]+t,f[1]],top:[f[0],f[1]-t],bottom:[f[0],f[1]+t]})[h],u=l(s,n),c=l(o,e),d=ex(u,c,a);i.push(u,d,c)}}return i}function PM(r,n){const e=new Set,t=new Set,i=new Set;return r.forEach(a=>{n(a).forEach(o=>{e.add(o),r.includes(o.source)&&r.includes(o.target)?t.add(o):i.add(o)})}),{edges:Array.from(e),internal:Array.from(t),external:Array.from(i)}}function X4(r,n){const e=[];let t=r;for(;t;){e.push(t);const i=n(Ut(t));if(i)t=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(Ed);return e[i]||e.at(-1)}return r}function cde(r,n){return n||(r<4?10:r===4?12:r*2.5)}const dde=(r,n)=>{const e=Math.max(r,n)/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"]]},K4=(r,n)=>[["M",-r/2,0],["L",r/2,-n/2],["L",r/2,n/2],["Z"]],hde=(r,n)=>[["M",-r/2,0],["L",0,-n/2],["L",r/2,0],["L",0,n/2],["Z"]],fde=(r,n)=>[["M",-r/2,0],["L",r/2,-n/2],["L",4*r/5-r/2,0],["L",r/2,n/2],["Z"]],vde=(r,n)=>[["M",-r/2,-n/2],["L",r/2,-n/2],["L",r/2,n/2],["L",-r/2,n/2],["Z"]],gde=(r,n)=>{const e=r/2,t=r/7,i=r-t;return[["M",-e,0],["L",0,-n/2],["L",0,n/2],["Z"],["M",i-e,-n/2],["L",i+t-e,-n/2],["L",i+t-e,n/2],["L",i-e,n/2],["Z"]]},_de=(r,n)=>[["M",r/2,-n/2],["L",-r/2,0],["L",r/2,0],["L",-r/2,0],["L",r/2,n/2]];var zb=function(r,n){var e={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&n.indexOf(t)<0&&(e[t]=r[t]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(r);i<t.length;i++)n.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(e[t[i]]=r[t[i]]);return e};class Dg extends zI{constructor(n){super(xu({style:Dg.defaultStyleProps},n)),this.type="edge"}get sourceNode(){const{context:n,sourceNode:e}=this.parsedAttributes;return n.element.getElement(e)}get targetNode(){const{context:n,targetNode:e}=this.parsedAttributes;return n.element.getElement(e)}getKeyStyle(n){const e=this.getGraphicStyle(n),{loop:t}=e,i=zb(e,["loop"]),{sourceNode:a,targetNode:s}=this,o=t&&Sde(a,s)?this.getLoopPath(n):this.getKeyPath(n);return Object.assign({d:o},mT(i,["halo","label","startArrow","endArrow"]))}getLoopPath(n){const{sourcePort:e,targetPort:t}=n,i=this.sourceNode,a=xg(i),s=Math.max(Jf(a),Qf(a)),{placement:o,clockwise:l,dist:u=s}=Wl(this.getGraphicStyle(n),"loop");return sde(i,o,l,u,e,t)}getEndpoints(n,e=!0,t=[]){const{sourcePort:i,targetPort:a}=n,{sourceNode:s,targetNode:o}=this,[l,u]=Cde(s,o,i,a);if(!e){const f=l?Fg(l):s.getCenter(),v=u?Fg(u):o.getCenter();return[f,v]}const c=typeof t=="function"?t():t,d=i5(l||s,c[0]||u||o),h=i5(u||o,c[c.length-1]||l||s);return[d,h]}getHaloStyle(n){if(n.halo===!1)return!1;const e=this.getKeyStyle(n),t=Wl(this.getGraphicStyle(n),"halo");return Object.assign(Object.assign({},e),t)}getLabelStyle(n){if(n.label===!1||!n.labelText)return!1;const e=Wl(this.getGraphicStyle(n),"label"),{placement:t,offsetX:i,offsetY:a,autoRotate:s,maxWidth:o}=e,l=zb(e,["placement","offsetX","offsetY","autoRotate","maxWidth"]),u=H4(this.shapeMap.key,t,s,i,a),c=this.shapeMap.key.getLocalBounds(),d=qJ([c.min,c.max],o);return Object.assign({wordWrapWidth:d},u,l)}getBadgeStyle(n){if(n.badge===!1||!n.badgeText)return!1;const e=Wl(n,"badge"),{offsetX:t,offsetY:i,placement:a}=e,s=zb(e,["offsetX","offsetY","placement"]);return Object.assign(s,ede(this.shapeMap,a,n.labelPlacement,t,i))}drawArrow(n,e){var t;const i=e==="start",s=n[e==="start"?"startArrow":"endArrow"],o=this.shapeMap.key;if(s){const l=this.getArrowStyle(n,i);if(!Xh(this,`arrow-${e}`,l))return;const[u,c,d]=i?["markerStart","markerStartOffset","startArrowOffset"]:["markerEnd","markerEndOffset","endArrowOffset"],h=o.parsedStyle[u];if(h)h.attr(l);else{const f=l.src?b2:gg,v=new f({style:l});o.style[u]=v}o.style[c]=n[d]||l.width/2+ +l.lineWidth}else{const l=i?"markerStart":"markerEnd";(t=o.style[l])===null||t===void 0||t.destroy(),o.style[l]=null}}getArrowStyle(n,e){const t=this.getShape("key").attributes,i=e?"startArrow":"endArrow",a=Wl(this.getGraphicStyle(n),i),{size:s,type:o}=a,l=zb(a,["size","type"]),[u,c]=th(cde(t.lineWidth,s)),h=((0,Be.Z)(o)?o:M[o]||K4)(u,c);return Object.assign((0,nm.Z)(t,["stroke","strokeOpacity","fillOpacity"]),{width:u,height:c},Object.assign({},h&&{d:h,fill:o==="simple"?"":t.stroke}),l)}drawLabelShape(n,e){const t=this.getLabelStyle(n);Xh(this,"label",t)&&this.upsert("label",Sg,t,e)}drawHaloShape(n,e){const t=this.getHaloStyle(n);Xh(this,"halo",t)&&this.upsert("halo",gg,t,e)}drawBadgeShape(n,e){const t=this.getBadgeStyle(n);Xh(this,"badge",t)&&this.upsert("badge",fp,t,e)}drawSourceArrow(n){this.drawArrow(n,"start")}drawTargetArrow(n){this.drawArrow(n,"end")}drawKeyShape(n,e){const t=this.getKeyStyle(n);if(Xh(this,"key",t))return this.upsert("key",gg,t,e)}render(n=this.parsedAttributes,e=this){this.drawKeyShape(n,e),this.getShape("key")&&(this.drawSourceArrow(n),this.drawTargetArrow(n),this.drawLabelShape(n,e),this.drawHaloShape(n,e),this.drawBadgeShape(n,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(n,e){const t=super.animate(n,e);return t&&new Proxy(t,{set:(i,a,s)=>(a==="currentTime"&&Promise.resolve().then(()=>this.onframe()),Reflect.set(i,a,s))})}}Dg.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 rm extends Dg{constructor(n){super(xu({style:rm.defaultStyleProps},n))}getKeyPath(n){const[e,t]=this.getEndpoints(n),{controlPoints:i,curvePosition:a,curveOffset:s}=n,o=this.getControlPoints(e,t,nde(a),tde(s),i);return Y4(e,t,o)}getControlPoints(n,e,t,i,a){return(a==null?void 0:a.length)===2?a:[CM(n,e,t[0],i[0]),CM(n,e,t[1],i[1])]}}rm.defaultStyleProps={curvePosition:.5,curveOffset:20};class Vb extends rm{constructor(n){super(xu({style:Vb.defaultStyleProps},n))}getControlPoints(n,e,t,i){const a=e[0]-n[0];return[[n[0]+a*t[0]+i[0],n[1]],[e[0]-a*t[1]+i[1],e[1]]]}}Vb.defaultStyleProps={curvePosition:[.5,.5],curveOffset:[0,0]};class Ub extends rm{constructor(n){super(xu({style:Ub.defaultStyleProps},n))}get ref(){return this.context.model.getRootsData()[0]}getEndpoints(n){if(this.sourceNode.id===this.ref.id)return super.getEndpoints(n);const e=Iu(this.ref),t=this.sourceNode.getIntersectPoint(e,!0),i=this.targetNode.getIntersectPoint(e);return[t,i]}toRadialCoordinate(n){const e=Iu(this.ref),t=js(n,e),i=pI(Cs(n,e));return[t,i]}getControlPoints(n,e,t,i){const[a,s]=this.toRadialCoordinate(n),[o]=this.toRadialCoordinate(e),l=o-a;return[[n[0]+(l*t[0]+i[0])*Math.cos(s),n[1]+(l*t[0]+i[0])*Math.sin(s)],[e[0]-(l*t[1]-i[0])*Math.cos(s),e[1]-(l*t[1]-i[0])*Math.sin(s)]]}}Ub.defaultStyleProps={curvePosition:.5,curveOffset:20};class jb extends rm{constructor(n){super(xu({style:jb.defaultStyleProps},n))}getControlPoints(n,e,t,i){const a=e[1]-n[1];return[[n[0],n[1]+a*t[0]+i[0]],[e[0],e[1]-a*t[1]+i[1]]]}}jb.defaultStyleProps={curvePosition:[.5,.5],curveOffset:[0,0]};class Hb extends Dg{constructor(n){super(xu({style:Hb.defaultStyleProps},n))}getKeyPath(n){const[e,t]=this.getEndpoints(n);return[["M",e[0],e[1]],["L",t[0],t[1]]]}}Hb.defaultStyleProps={};const mde={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:wE},Kv=r=>`${Math.round(r[0])}|||${Math.round(r[1])}`;function im(r,n){const e=t=>Math.round(t/n);return(0,pe.Z)(r)?e(r):r.map(e)}function pde(r,n){const e=Math.abs(r-n);return e>Math.PI?2*Math.PI-e:e}function J4(r,n){const e=n[0]-r[0],t=n[1]-r[1];return!e&&!t?0:Math.atan2(t,e)}function Q4(r,n,e,t){const i=J4(r,n),a=e[Kv(r)],o=J4(a||t,r);return pde(o,i)}const yde=(r,n)=>{const{offset:e,gridSize:t}=n,i={};return r.forEach(a=>{if(!a||a.destroyed||!a.isVisible())return;const s=Eg(a.getRenderBounds(),e);for(let o=im(s.min[0],t);o<=im(s.max[0],t);o+=1)for(let l=im(s.min[1],t);l<=im(s.max[1],t);l+=1)i[`${o}|||${l}`]=!0}),i};function q4(r,n,e){return Math.min(...n.map(t=>e(r,t)))}function xde(r,n,e){let t=r[0],i=e(r[0],n);for(let a=0;a<r.length;a++){const s=r[a],o=e(s,n);o<i&&(t=s,i=o)}return t}const e5=(r,n,e,t)=>{if(!n)return[r];const{directionMap:i,offset:a}=t,s=Eg(n.getRenderBounds(),a),o=Object.keys(i).reduce((l,u)=>{if(e.includes(u)){const c=i[u],[d,h]=yg(s),f=[r[0]+c.stepX*d,r[1]+c.stepY*h],v=SJ(s);for(let g=0;g<v.length;g++){const m=fT([r,f],v[g]);m&&fI(m,s)&&l.push(m)}}return l},[]);return Wh(r,s)||o.push(r),o.map(l=>im(l,t.gridSize))},Ede=(r,n,e,t,i,a,s)=>{const o=[];let l=[a[0]===t[0]?t[0]:r[0]*s,a[1]===t[1]?t[1]:r[1]*s];o.unshift(l);let u=r,c=n[Kv(u)];for(;c;){const f=c,v=u;Q4(f,v,n,e)&&(l=[f[0]===v[0]?l[0]:f[0]*s,f[1]===v[1]?l[1]:f[1]*s],o.unshift(l)),c=n[Kv(f)],u=f}const d=i.map(f=>[f[0]*s,f[1]*s]),h=xde(d,l,wE);return o.unshift(h),o};function bde(r,n,e,t){const i=P_(r.getCenter()),a=P_(n.getCenter()),s=Object.assign(mde,t),{gridSize:o}=s,l=s.enableObstacleAvoidance?e:[r,n],u=yde(l,s),c=im(i,o),d=im(a,o),h=e5(i,r,s.startDirections,s),f=e5(a,n,s.endDirections,s);h.forEach(b=>delete u[Kv(b)]),f.forEach(b=>delete u[Kv(b)]);const v={},g={},m={},y={},w={},T=new kde;for(let b=0;b<h.length;b++){const R=h[b],B=Kv(R);v[B]=R,y[B]=0,w[B]=q4(R,f,s.distFunc),T.add({id:B,value:w[B]})}const G=f.map(b=>Kv(b));let x=s.maximumLoops,_,p=1/0;for(const[b,R]of Object.entries(v))w[b]<=p&&(p=w[b],_=R);for(;Object.keys(v).length>0&&x>0;){const b=T.minId(!1);if(b)_=v[b];else break;const R=Kv(_);if(G.includes(R))return Ede(_,m,c,a,h,d,o);delete v[R],T.remove(R),g[R]=!0;for(const B of Object.values(s.directionMap)){const j=Ji(_,[B.stepX,B.stepY]),Z=Kv(j);if(g[Z])continue;const te=Q4(_,j,m,c);if(te>s.maxAllowedDirectionChange||u[Z])continue;v[Z]||(v[Z]=j);const le=s.penalties[te],ue=s.distFunc(_,j)+(isNaN(le)?o:le),se=y[R]+ue,V=y[Z];V&&se>=V||(m[Z]=_,y[Z]=se,w[Z]=se+q4(j,f,s.distFunc),T.add({id:Z,value:w[Z]}))}x-=1}return[]}class kde{constructor(){this.arr=[],this.map={},this.arr=[],this.map={}}_innerAdd(n,e){let t=0,i=e-1;for(;i-t>1;){const a=Math.floor((t+i)/2);if(this.arr[a].value>n.value)i=a;else if(this.arr[a].value<n.value)t=a;else{this.arr.splice(a,0,n),this.map[n.id]=!0;return}}this.arr.splice(i,0,n),this.map[n.id]=!0}add(n){delete this.map[n.id];const e=this.arr.length;if(!e||this.arr[e-1].value<n.value){this.arr.push(n),this.map[n.id]=!0;return}this._innerAdd(n,e)}remove(n){this.map[n]&&delete this.map[n]}_clearAndGetMinId(){let n;for(let e=this.arr.length-1;e>=0;e--)this.map[this.arr[e].id]?n=this.arr[e].id:this.arr.splice(e,1);return n}_findFirstId(){for(;this.arr.length;){const n=this.arr.shift();if(this.map[n.id])return n.id}}minId(n){return n?this._clearAndGetMinId():this._findFirstId()}}class Wb extends Dg{constructor(n){super(xu({style:Wb.defaultStyleProps},n))}getControlPoints(n){const{router:e}=n,{sourceNode:t,targetNode:i}=this,[a,s]=this.getEndpoints(n,!1);let o=[];if(!e)o=n.controlPoints;else if(e.type==="shortest-path"){const l=this.context.element.getNodes();o=bde(t,i,l,e),o.length||(o=z4(a,s,t,i,n.controlPoints,{padding:e.offset}))}else e.type==="orth"&&(o=z4(a,s,t,i,n.controlPoints,e));return o}getPoints(n){const e=this.getControlPoints(n),[t,i]=this.getEndpoints(n,!0,e);return[t,...e,i]}getKeyPath(n){const e=this.getPoints(n);return MM(e,n.radius)}getLoopPath(n){const{sourcePort:e,targetPort:t,radius:i}=n,a=this.sourceNode,s=xg(a),o=Math.max(Jf(s),Qf(s))/4,{placement:l,clockwise:u,dist:c=o}=Wl(this.getGraphicStyle(n),"loop");return lde(a,i,l,u,c,e,t)}}Wb.defaultStyleProps={radius:0,controlPoints:[],router:!1};class Yb extends Dg{constructor(n){super(xu({style:Yb.defaultStyleProps},n))}getKeyPath(n){const{curvePosition:e,curveOffset:t}=n,[i,a]=this.getEndpoints(n),s=n.controlPoint||CM(i,a,e,t);return rde(i,a,s)}}Yb.defaultStyleProps={curvePosition:.5,curveOffset:30};function tx(r){return r instanceof Kh&&r.type==="node"}function t5(r){return r instanceof Dg}function NM(r){return r instanceof Up}function wde(r){return tx(r)||t5(r)||NM(r)}function Sde(r,n){return!r||!n?!1:r===n}const Tde={top:[.5,0],right:[1,.5],bottom:[.5,1],left:[0,.5],default:[.5,.5]};function OM(r,n,e=Tde,t=!0){const i=[.5,.5],a=(0,Ze.Z)(n)?(0,nc.Z)(e,n.toLocaleLowerCase(),i):n;if(!t&&(0,Ze.Z)(n))return a;const[s,o]=a||i;return[r.min[0]+Jf(r)*s,r.min[1]+Qf(r)*o]}function RM(r){if(!r)return{};const n=r.getPorts();return(r.attributes.ports||[]).forEach((t,i)=>{var a;const{key:s,placement:o}=t;n5(t)&&(n[a=s||i]||(n[a]=zv(r.getShape("key").getBounds(),o)))}),n}function n5(r){const{r:n}=r;return!n||Number(n)===0}function Fg(r){return cp(r)?r:r.getPosition()}function Cde(r,n,e,t){const i=r5(r,n,e,t),a=r5(n,r,t,e);return[i,a]}function r5(r,n,e,t){const i=RM(r);if(e)return i[e];const a=Object.values(i);if(a.length===0)return;const s=a.map(u=>Fg(u)),o=Mde(n,t),[l]=UJ(s,o);return a.find(u=>Fg(u)===l)}function Mde(r,n){const e=RM(r);if(n)return[Fg(e[n])];const t=Object.values(e);return t.length>0?t.map(i=>Fg(i)):[r.getCenter()]}function i5(r,n){return NM(r)||tx(r)?AM(r,n):nx(r,n)}function nx(r,n){if(!r||!n)return[0,0,0];if(cp(r))return r;if(r.attributes.linkToCenter)return r.getPosition();const e=cp(n)?n:tx(n)?n.getCenter():n.getPosition();return TE(e,r.getBounds())}function AM(r,n){if(!r||!n)return[0,0,0];const e=cp(n)?n:tx(n)?n.getCenter():n.getPosition();return r.getIntersectPoint(e)||r.getCenter()}function a5(r,n="bottom",e=0,t=0,i=!1){const a=n.split("-"),[s,o]=zv(r,n),l=a.includes("left")?"right":a.includes("right")?"left":"center";let u=a.includes("top")?"bottom":a.includes("bottom")?"top":"middle";return i&&(u=u==="top"?"bottom":u==="bottom"?"top":u),{transform:[["translate",s+e,o+t]],textBaseline:u,textAlign:l}}function Pde(r,n){return[[0,-r],[n*Math.cos(3*Math.PI/10),-n*Math.sin(3*Math.PI/10)],[r*Math.cos(Math.PI/10),-r*Math.sin(Math.PI/10)],[n*Math.cos(Math.PI/10),n*Math.sin(Math.PI/10)],[r*Math.cos(3*Math.PI/10),r*Math.sin(3*Math.PI/10)],[0,n],[-r*Math.cos(3*Math.PI/10),r*Math.sin(3*Math.PI/10)],[-n*Math.cos(Math.PI/10),n*Math.sin(Math.PI/10)],[-r*Math.cos(Math.PI/10),-r*Math.sin(Math.PI/10)],[-n*Math.cos(3*Math.PI/10),-n*Math.sin(3*Math.PI/10)]]}function Nde(r,n){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,n],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 Ode(r,n,e){const t=n/2,i=r/2,a={up:[[-i,t],[i,t],[0,-t]],left:[[-i,0],[i,t],[i,-t]],right:[[-i,t],[-i,-t],[i,0]],down:[[-i,-t],[i,-t],[0,t]]};return a[e]||a.up}function Rde(r,n,e){const t=n/2,i=r/2,a={};return e==="down"?(a.bottom=a.default=[0,t],a.right=[i,-t],a.left=[-i,-t]):e==="left"?(a.top=[i,-t],a.bottom=[i,t],a.left=a.default=[-i,0]):e==="right"?(a.top=[-i,-t],a.bottom=[-i,t],a.right=a.default=[i,0]):(a.left=[-i,t],a.top=a.default=[0,-t],a.right=[i,t]),a}function dRe(r,n){return[[r/2,-n/2],[r/2,n/2],[-r/2,n/2],[-r/2,-n/2]]}function Ade(r,n){return[[0,-n/2],[r/2,0],[0,n/2],[-r/2,0]]}function Lde(r){return(0,nc.Z)(r,["style","visibility"])!=="hidden"}function LM(r,n){"update"in r?r.update(n):r.attr(n)}function Ide(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 Dde(r){(0,hp.Z)(r,"__to_be_destroyed__",!0)}function Zb(r){return(0,nc.Z)(r,"__to_be_destroyed__",!1)}var Fde=function(r,n,e,t){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(t.next(c))}catch(d){s(d)}}function l(c){try{u(t.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((t=t.apply(r,n||[])).next())})};class Xb extends yd{constructor(n,e){super(n,Object.assign({},Xb.defaultOptions,e)),this.onCollapseExpand=t=>Fde(this,void 0,void 0,function*(){if(!this.validate(t))return;const{target:i}=t;if(!wde(i))return;const a=i.id,{model:s,graph:o}=this.context,l=s.getElementDataById(a);if(!l)return!1;const{onCollapse:u,onExpand:c,animation:d}=this.options;Ed(l)?(yield o.expandElement(a,d),c==null||c(a)):(yield o.collapseElement(a,d),u==null||u(a))}),this.bindEvents()}update(n){this.unbindEvents(),super.update(n),this.bindEvents()}bindEvents(){const{graph:n}=this.context,{trigger:e}=this.options;n.on(`node:${e}`,this.onCollapseExpand),n.on(`combo:${e}`,this.onCollapseExpand)}unbindEvents(){const{graph:n}=this.context,{trigger:e}=this.options;n.off(`node:${e}`,this.onCollapseExpand),n.off(`combo:${e}`,this.onCollapseExpand)}validate(n){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,Be.Z)(e)?e(n):!!e}destroy(){this.unbindEvents(),super.destroy()}}Xb.defaultOptions={enable:!0,animation:!0,trigger:un.DBLCLICK};var Bde=k(71701),Kb=function(r,n,e,t){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(t.next(c))}catch(d){s(d)}}function l(c){try{u(t.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((t=t.apply(r,n||[])).next())})};const $de="g6-create-edge-assist-edge-id",Jb="g6-create-edge-assist-node-id";class Qb extends yd{constructor(n,e){super(n,Object.assign({},Qb.defaultOptions,e)),this.drop=t=>Kb(this,void 0,void 0,function*(){const{targetType:i}=t;["combo","node"].includes(i)&&this.source?yield this.handleCreateEdge(t):yield this.cancelEdge()}),this.handleCreateEdge=t=>Kb(this,void 0,void 0,function*(){var i,a,s;if(!this.validate(t))return;const{graph:o,canvas:l,batch:u,element:c}=this.context,{style:d}=this.options;if(this.source){this.createEdge(t),yield this.cancelEdge();return}u.startBatch(),l.setCursor("crosshair"),this.source=this.getSelectedNodeIDs([t.target.id])[0];const h=o.getElementData(this.source);o.addNodeData([{id:Jb,style:{visibility:"hidden",ports:[{key:"port-1",placement:[.5,.5]}],x:(i=h.style)===null||i===void 0?void 0:i.x,y:(a=h.style)===null||a===void 0?void 0:a.y}}]),o.addEdgeData([{id:$de,source:this.source,target:Jb,style:Object.assign({pointerEvents:"none"},d)}]),yield(s=c.draw({animation:!1}))===null||s===void 0?void 0:s.finished}),this.updateAssistEdge=t=>Kb(this,void 0,void 0,function*(){var i;if(!this.source)return;const{model:a,element:s}=this.context;a.translateNodeTo(Jb,[t.canvas.x,t.canvas.y]),yield(i=s.draw({animation:!1,silence:!0}))===null||i===void 0?void 0:i.finished}),this.createEdge=t=>{var i,a;const{graph:s}=this.context,{style:o,onFinish:l,onCreate:u}=this.options;if(((i=t.target)===null||i===void 0?void 0:i.id)===void 0||this.source===void 0)return;const d=(a=this.getSelectedNodeIDs([t.target.id]))===null||a===void 0?void 0:a[0],h=`${this.source}-${d}-${(0,Bde.Z)()}`,f=u({id:h,source:this.source,target:d,style:o});s.addEdgeData([f]),l(f)},this.cancelEdge=()=>Kb(this,void 0,void 0,function*(){var t;if(!this.source)return;const{graph:i,element:a,batch:s}=this.context;i.removeNodeData([Jb]),this.source=void 0,yield(t=a.draw({animation:!1}))===null||t===void 0?void 0:t.finished,s.endBatch()}),this.bindEvents()}update(n){super.update(n),this.bindEvents()}bindEvents(){const{graph:n}=this.context,{trigger:e}=this.options;this.unbindEvents(),e==="click"?(n.on(eh.CLICK,this.handleCreateEdge),n.on(T_.CLICK,this.handleCreateEdge),n.on(Dv.CLICK,this.cancelEdge),n.on(yE.CLICK,this.cancelEdge)):(n.on(eh.DRAG_START,this.handleCreateEdge),n.on(T_.DRAG_START,this.handleCreateEdge),n.on(un.POINTER_UP,this.drop)),n.on(un.POINTER_MOVE,this.updateAssistEdge)}getSelectedNodeIDs(n){return Array.from(new Set(this.context.graph.getElementDataByState("node",this.options.state).map(e=>e.id).concat(n)))}validate(n){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,Be.Z)(e)?e(n):!!e}unbindEvents(){const{graph:n}=this.context;n.off(eh.CLICK,this.handleCreateEdge),n.off(T_.CLICK,this.handleCreateEdge),n.off(Dv.CLICK,this.cancelEdge),n.off(yE.CLICK,this.cancelEdge),n.off(eh.DRAG_START,this.handleCreateEdge),n.off(T_.DRAG_START,this.handleCreateEdge),n.off(un.POINTER_UP,this.drop),n.off(un.POINTER_MOVE,this.updateAssistEdge)}destroy(){this.unbindEvents(),super.destroy()}}Qb.defaultOptions={animation:!0,enable:!0,style:{},trigger:"drag",onCreate:r=>r,onFinish:()=>{}};var rx=k(68040),s5=function(r,n,e,t){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(t.next(c))}catch(d){s(d)}}function l(c){try{u(t.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((t=t.apply(r,n||[])).next())})};class qb extends yd{constructor(n,e){super(n,Object.assign({},qb.defaultOptions,e)),this.isDragging=!1,this.onDragStart=t=>{this.validate(t)&&(this.isDragging=!0,this.context.canvas.setCursor("grabbing"))},this.onDrag=t=>{if(!this.isDragging)return;const{x:i,y:a}=t.movement;i|a&&this.translate([i,a],!1)},this.onDragEnd=()=>{var t,i;this.isDragging=!1,this.context.canvas.setCursor(this.defaultCursor),(i=(t=this.options).onFinish)===null||i===void 0||i.call(t)},this.invokeOnFinish=(0,rx.Z)(()=>{var t,i;(i=(t=this.options).onFinish)===null||i===void 0||i.call(t)},300),this.shortcut=new dp(n.graph),this.bindEvents(),this.defaultCursor=this.context.canvas.getConfig().cursor||"default"}update(n){this.unbindEvents(),super.update(n),this.bindEvents()}bindEvents(){const{trigger:n}=this.options;if((0,Gs.Z)(n)){const{up:e=[],down:t=[],left:i=[],right:a=[]}=n;this.shortcut.bind(e,s=>this.onTranslate([0,1],s)),this.shortcut.bind(t,s=>this.onTranslate([0,-1],s)),this.shortcut.bind(i,s=>this.onTranslate([1,0],s)),this.shortcut.bind(a,s=>this.onTranslate([-1,0],s))}else{const{graph:e}=this.context;e.on(un.DRAG_START,this.onDragStart),e.on(un.DRAG,this.onDrag),e.on(un.DRAG_END,this.onDragEnd)}}onTranslate(n,e){return s5(this,void 0,void 0,function*(){if(!this.validate(e))return;const{sensitivity:t}=this.options,i=t*-1;yield this.translate($v(n,i),this.options.animation),this.invokeOnFinish()})}translate(n,e){return s5(this,void 0,void 0,function*(){n=this.clampByDirection(n),n=this.clampByRange(n),yield this.context.graph.translateBy(n,e)})}clampByDirection([n,e]){const{direction:t}=this.options;return t==="x"?e=0:t==="y"&&(n=0),[n,e]}clampByRange([n,e]){const{viewport:t,canvas:i}=this.context,[a,s]=i.getSize(),[o,l,u,c]=Kf(this.options.range),d=[s*o,a*l,s*u,a*c],h=Eg(lT(t.getCanvasCenter()),d),f=Cs(t.getViewportCenter(),[n,e,0]);if(!Wh(f,h)){const{min:[v,g],max:[m,y]}=h;(f[0]<v&&n>0||f[0]>m&&n<0)&&(n=0),(f[1]<g&&e>0||f[1]>y&&e<0)&&(e=0)}return[n,e]}validate(n){if(this.destroyed)return!1;const{enable:e}=this.options;return typeof e=="function"?e(n):!!e}unbindEvents(){this.shortcut.unbindAll();const{graph:n}=this.context;n.off(un.DRAG_START,this.onDragStart),n.off(un.DRAG,this.onDrag),n.off(un.DRAG_END,this.onDragEnd)}destroy(){this.shortcut.destroy(),this.unbindEvents(),this.context.canvas.setCursor(this.defaultCursor),super.destroy()}}qb.defaultOptions={enable:r=>"targetType"in r?r.targetType==="canvas":!0,sensitivity:10,direction:"both",range:1/0};var o5=function(r,n,e,t){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(t.next(c))}catch(d){s(d)}}function l(c){try{u(t.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((t=t.apply(r,n||[])).next())})};class ix extends yd{constructor(n,e){super(n,Object.assign({},ix.defaultOptions,e)),this.enable=!1,this.enableElements=["node","combo"],this.target=[],this.shadowOrigin=[0,0],this.hiddenEdges=[],this.isDragging=!1,this.onDrop=t=>o5(this,void 0,void 0,function*(){var i;if(this.options.dropEffect!=="link")return;const{model:a,element:s}=this.context,o=t.target.id;this.target.forEach(l=>{const u=a.getParentData(l,Ls);u&&Ut(u)===o&&a.refreshComboData(o),a.setParent(l,o,Ls)}),yield(i=s==null?void 0:s.draw({animation:!0}))===null||i===void 0?void 0:i.finished}),this.setCursor=t=>{if(this.isDragging)return;const{type:i}=t,{canvas:a}=this.context,{cursor:s}=this.options;i===un.POINTER_ENTER?a.setCursor((s==null?void 0:s.grab)||"grab"):a.setCursor((s==null?void 0:s.default)||"default")},this.onDragStart=this.onDragStart.bind(this),this.onDrag=this.onDrag.bind(this),this.onDragEnd=this.onDragEnd.bind(this),this.onDrop=this.onDrop.bind(this),this.bindEvents()}update(n){this.unbindEvents(),super.update(n),this.bindEvents()}bindEvents(){const{graph:n,canvas:e}=this.context,t=e.getLayer().getContextService().$canvas;t&&(t.addEventListener("blur",this.onDragEnd),t.addEventListener("contextmenu",this.onDragEnd)),this.enableElements.forEach(i=>{n.on(`${i}:${un.DRAG_START}`,this.onDragStart),n.on(`${i}:${un.DRAG}`,this.onDrag),n.on(`${i}:${un.DRAG_END}`,this.onDragEnd),n.on(`${i}:${un.POINTER_ENTER}`,this.setCursor),n.on(`${i}:${un.POINTER_LEAVE}`,this.setCursor)}),["link"].includes(this.options.dropEffect)&&(n.on(T_.DROP,this.onDrop),n.on(Dv.DROP,this.onDrop))}getSelectedNodeIDs(n){return Array.from(new Set(this.context.graph.getElementDataByState("node",this.options.state).map(e=>e.id).concat(n)))}getDelta(n){const e=this.context.graph.getZoom();return Yh([n.dx,n.dy],e)}onDragStart(n){var e;if(this.enable=this.validate(n),!this.enable)return;const{batch:t,canvas:i}=this.context;i.setCursor(((e=this.options.cursor)===null||e===void 0?void 0:e.grabbing)||"grabbing"),this.isDragging=!0,t.startBatch(),this.target=this.getSelectedNodeIDs([n.target.id]),this.hideEdge(),this.context.graph.frontElement(this.target),this.options.shadow&&this.createShadow(this.target)}onDrag(n){if(!this.enable)return;const e=this.getDelta(n);this.options.shadow?this.moveShadow(e):this.moveElement(this.target,e)}onDragEnd(){var n,e,t;if(this.enable=!1,this.options.shadow){if(!this.shadow)return;this.shadow.style.visibility="hidden";const{x:s=0,y:o=0}=this.shadow.attributes,[l,u]=Cs([+s,+o],this.shadowOrigin);this.moveElement(this.target,[l,u])}this.showEdges(),(e=(n=this.options).onFinish)===null||e===void 0||e.call(n,this.target);const{batch:i,canvas:a}=this.context;i.endBatch(),a.setCursor(((t=this.options.cursor)===null||t===void 0?void 0:t.grab)||"grab"),this.isDragging=!1,this.target=[]}validate(n){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,Be.Z)(e)?e(n):!!e}moveElement(n,e){return o5(this,void 0,void 0,function*(){const{graph:t,model:i}=this.context,{dropEffect:a}=this.options;a==="move"&&n.forEach(s=>i.refreshComboData(s)),t.translateElementBy(Object.fromEntries(n.map(s=>[s,e])),!1)})}moveShadow(n){if(!this.shadow)return;const{x:e=0,y:t=0}=this.shadow.attributes,[i,a]=n;this.shadow.attr({x:+e+i,y:+t+a})}createShadow(n){const e=Wl(this.options,"shadow"),t=cy(n.map(u=>this.context.element.getElement(u).getBounds())),[i,a]=t.min;this.shadowOrigin=[i,a];const[s,o]=yg(t),l={width:s,height:o,x:i,y:a};this.shadow?this.shadow.attr(Object.assign(Object.assign(Object.assign({},e),l),{visibility:"visible"})):(this.shadow=new zf({style:Object.assign(Object.assign(Object.assign({$layer:"transient"},e),l),{pointerEvents:"none"})}),this.context.canvas.appendChild(this.shadow))}showEdges(){this.options.shadow||this.hiddenEdges.length===0||(this.context.graph.showElement(this.hiddenEdges),this.hiddenEdges=[])}hideEdge(){const{hideEdge:n,shadow:e}=this.options;if(n==="none"||e)return;const{graph:t}=this.context;n==="all"?this.hiddenEdges=t.getEdgeData().map(Ut):this.hiddenEdges=Array.from(new Set(this.target.map(i=>t.getRelatedEdgesData(i,n).map(Ut)).flat())),t.hideElement(this.hiddenEdges)}unbindEvents(){const{graph:n,canvas:e}=this.context,t=e.getLayer().getContextService().$canvas;t&&(t.removeEventListener("blur",this.onDragEnd),t.removeEventListener("contextmenu",this.onDragEnd)),this.enableElements.forEach(i=>{n.off(`${i}:${un.DRAG_START}`,this.onDragStart),n.off(`${i}:${un.DRAG}`,this.onDrag),n.off(`${i}:${un.DRAG_END}`,this.onDragEnd),n.off(`${i}:${un.POINTER_ENTER}`,this.setCursor),n.off(`${i}:${un.POINTER_LEAVE}`,this.setCursor)}),n.off(`combo:${un.DROP}`,this.onDrop),n.off(`canvas:${un.DROP}`,this.onDrop)}destroy(){var n;this.unbindEvents(),(n=this.shadow)===null||n===void 0||n.destroy(),super.destroy()}}ix.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 su=k(44326);class l5{constructor(n,e){this.context=n,this.options=e||{}}}var Gde=function(r,n,e,t){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(t.next(c))}catch(d){s(d)}}function l(c){try{u(t.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((t=t.apply(r,n||[])).next())})},zde=function(r,n){var e={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&n.indexOf(t)<0&&(e[t]=r[t]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(r);i<t.length;i++)n.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(e[t[i]]=r[t[i]]);return e};function hRe(r){const{type:n}=r;return!!(["comboCombined","comboForce"].includes(n)||n==="antv-dagre"&&r.sortByCombo)}function Vde(r){const{type:n}=r;return["compact-box","mindmap","dendrogram","indented"].includes(n)}function fRe(r){return isNumber(r.x)&&isNumber(r.y)}function ek(r){const{nodes:n,edges:e}=r,t={nodes:[],edges:[],combos:[]};return n.forEach(i=>{const a=i.data._isCombo?t.combos:t.nodes,{x:s,y:o,z:l=0}=i.data;a==null||a.push({id:i.id,style:{x:s,y:o,z:l}})}),e.forEach(i=>{const{id:a,source:s,target:o,data:{points:l=[],controlPoints:u=l.slice(1,l.length-1)}}=i;t.edges.push({id:a,source:s,target:o,style:Object.assign({},u!=null&&u.length?{controlPoints:u.map(Du)}:{})})}),t}function Ude(r,n){class e extends l5{constructor(i,a){if(super(i,a),this.instance=new r({}),this.id=this.instance.id,"stop"in this.instance&&"tick"in this.instance){const s=this.instance;this.stop=s.stop.bind(s),this.tick=o=>{const l=s.tick(o);return ek(l)}}}execute(i,a){return Gde(this,void 0,void 0,function*(){return ek(yield this.instance.execute(this.graphData2LayoutModel(i),this.transformOptions((0,xd.Z)({},this.options,a))))})}transformOptions(i){const{onTick:a}=i;return a&&(i.onTick=s=>a(ek(s))),i}graphData2LayoutModel(i){const{nodes:a=[],edges:s=[],combos:o=[]}=i,l=a.map(f=>{const v=Ut(f),{data:g,style:m,combo:y}=f,w=zde(f,["data","style","combo"]),T={id:v,data:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},g),{data:g}),y?{parentId:y}:{}),{style:m}),w)};return m!=null&&m.x&&Object.assign(T.data,{x:m.x}),m!=null&&m.y&&Object.assign(T.data,{y:m.y}),m!=null&&m.z&&Object.assign(T.data,{z:m.z}),T}),u=new Map(l.map(f=>[f.id,f])),c=s.filter(f=>{const{source:v,target:g}=f;return u.has(v)&&u.has(g)}).map(f=>{const{source:v,target:g,data:m,style:y}=f;return{id:Ut(f),source:v,target:g,data:Object.assign({},m),style:Object.assign({},y)}}),d=o.map(f=>({id:Ut(f),data:Object.assign({_isCombo:!0},f.data),style:Object.assign({},f.style)})),h=new su.k({nodes:[...l,...d],edges:c});return n.model.model.hasTreeStructure(Ls)&&(h.attachTreeStructure(Ls),l.forEach(f=>{const v=n.model.model.getParent(f.id,Ls);v&&h.hasNode(v.id)&&h.setParent(f.id,v.id,Ls)})),h}}return e}function IM(r,n,...e){if(n in r)return r[n](...e);if("instance"in r){const t=r.instance;if(n in t)return t[n](...e)}return null}function u5(r,n){if(n in r)return r[n];if("instance"in r){const e=r.instance;if(n in e)return e[n]}return null}var jde=function(r,n,e,t){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(t.next(c))}catch(d){s(d)}}function l(c){try{u(t.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((t=t.apply(r,n||[])).next())})};class Hde extends ix{get forceLayoutInstance(){return this.context.layout.getLayoutInstance().find(n=>["d3-force","d3-force-3d"].includes(n==null?void 0:n.id))}validate(n){return this.context.layout?this.forceLayoutInstance?super.validate(n):(Gc.warn("DragElementForce only works with d3-force or d3-force-3d layout"),!1):!1}moveElement(n,e){return jde(this,void 0,void 0,function*(){const t=this.forceLayoutInstance;this.context.graph.getNodeData(n).forEach((i,a)=>{const{x:s=0,y:o=0}=i.style||{};t&&IM(t,"setFixedPosition",n[a],[...Ji([+s,+o],e)])})})}onDragStart(n){if(this.enable=this.validate(n),!this.enable)return;this.target=this.getSelectedNodeIDs([n.target.id]),this.hideEdge(),this.context.graph.frontElement(this.target);const e=this.forceLayoutInstance;e&&u5(e,"simulation").alphaTarget(.3).restart(),this.context.graph.getNodeData(this.target).forEach(t=>{const{x:i=0,y:a=0}=t.style||{};e&&IM(e,"setFixedPosition",Ut(t),[+i,+a])})}onDrag(n){if(!this.enable)return;const e=this.getDelta(n);this.moveElement(this.target,e)}onDragEnd(){const n=this.forceLayoutInstance;n&&u5(n,"simulation").alphaTarget(0),this.context.graph.getNodeData(this.target).forEach(e=>{n&&IM(n,"setFixedPosition",Ut(e),[null,null,null])})}}var c5=function(r,n,e,t){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(t.next(c))}catch(d){s(d)}}function l(c){try{u(t.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((t=t.apply(r,n||[])).next())})};class tk extends yd{constructor(n,e){super(n,Object.assign({},tk.defaultOptions,e)),this.isZoomEvent=t=>!!(t.data&&"scale"in t.data),this.relatedEdgeToUpdate=new Set,this.zoom=this.context.graph.getZoom(),this.fixElementSize=t=>c5(this,void 0,void 0,function*(){if(!this.validate(t))return;const{graph:i}=this.context,{state:a,nodeFilter:s,edgeFilter:o,comboFilter:l}=this.options,u=(a?i.getElementDataByState("node",a):i.getNodeData()).filter(s),c=(a?i.getElementDataByState("edge",a):i.getEdgeData()).filter(o),d=(a?i.getElementDataByState("combo",a):i.getComboData()).filter(l),h=this.isZoomEvent(t)?this.zoom=Math.max(.01,Math.min(t.data.scale,10)):this.zoom,f=[...u,...d];f.length>0&&f.forEach(v=>this.fixNodeLike(v,h)),this.updateRelatedEdges(),c.length>0&&c.forEach(v=>this.fixEdge(v,h))}),this.cachedStyles=new Map,this.getOriginalFieldValue=(t,i,a)=>{var s;const o=this.cachedStyles.get(t)||[],l=((s=o.find(u=>u.shape===i))===null||s===void 0?void 0:s.style)||{};return a in l||(l[a]=i.attributes[a],this.cachedStyles.set(t,[...o.filter(u=>u.shape!==i),{shape:i,style:l}])),l[a]},this.scaleEntireElement=(t,i,a)=>{i.setLocalScale(1/a);const s=this.cachedStyles.get(t)||[];s.push({shape:i}),this.cachedStyles.set(t,s)},this.scaleSpecificShapes=(t,i,a)=>{const s=sQ(t);(Array.isArray(a)?a:[a]).forEach(l=>{const{shape:u,fields:c}=l,d=typeof u=="function"?u(s):t.getShape(u);if(d){if(!c){this.scaleEntireElement(t.id,d,i);return}c.forEach(h=>{const f=this.getOriginalFieldValue(t.id,d,h);(0,pe.Z)(f)&&(d.style[h]=f/i)})}})},this.skipIfExceedViewport=t=>{const{viewport:i}=this.context;return!(i!=null&&i.isInViewport(t.getRenderBounds(),!1,30))},this.fixNodeLike=(t,i)=>{const a=Ut(t),{element:s,model:o}=this.context,l=s.getElement(a);if(!l||this.skipIfExceedViewport(l))return;o.getRelatedEdgesData(a).forEach(d=>this.relatedEdgeToUpdate.add(Ut(d)));const c=this.options[l.type];if(!c){this.scaleEntireElement(a,l,i);return}this.scaleSpecificShapes(l,i,c)},this.fixEdge=(t,i)=>{const a=Ut(t),s=this.context.element.getElement(a);if(!s||this.skipIfExceedViewport(s))return;const o=this.options.edge;if(!o){s.style.transformOrigin="center",this.scaleEntireElement(a,s,i);return}this.scaleSpecificShapes(s,i,o)},this.updateRelatedEdges=()=>{const{element:t}=this.context;this.relatedEdgeToUpdate.size>0&&this.relatedEdgeToUpdate.forEach(i=>{const a=t.getElement(i);a==null||a.update({})}),this.relatedEdgeToUpdate.clear()},this.resetTransform=()=>c5(this,void 0,void 0,function*(){this.options.reset?this.restoreCachedStyles():this.fixElementSize({data:{scale:this.zoom}})}),this.bindEvents()}restoreCachedStyles(){if(this.cachedStyles.size>0){this.cachedStyles.forEach(i=>{i.forEach(({shape:a,style:s})=>{if((0,my.Z)(s))a.setLocalScale(1);else{if(this.options.state)return;Object.entries(s).forEach(([o,l])=>a.style[o]=l)}})});const{graph:n,element:e}=this.context,t=Object.keys(Object.fromEntries(this.cachedStyles)).filter(i=>i&&n.getElementType(i)==="node");if(t.length>0){const i=new Set;t.forEach(a=>{n.getRelatedEdgesData(a).forEach(s=>i.add(Ut(s)))}),i.forEach(a=>{const s=e==null?void 0:e.getElement(a);s==null||s.update({})})}}}bindEvents(){const{graph:n}=this.context;n.on(qn.AFTER_DRAW,this.resetTransform),n.on(qn.AFTER_TRANSFORM,this.fixElementSize)}unbindEvents(){const{graph:n}=this.context;n.off(qn.AFTER_DRAW,this.resetTransform),n.off(qn.AFTER_TRANSFORM,this.fixElementSize)}validate(n){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,Be.Z)(e)?e(n):!!e}destroy(){this.unbindEvents(),super.destroy()}}tk.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 Wde=function(r,n,e,t){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(t.next(c))}catch(d){s(d)}}function l(c){try{u(t.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((t=t.apply(r,n||[])).next())})};class nk extends yd{constructor(n,e){super(n,Object.assign({},nk.defaultOptions,e)),this.focus=t=>Wde(this,void 0,void 0,function*(){if(!this.validate(t))return;const{graph:i}=this.context;yield i.focusElement(t.target.id,this.options.animation)}),this.bindEvents()}bindEvents(){const{graph:n}=this.context;this.unbindEvents(),N_.forEach(e=>{n.on(`${e}:${un.CLICK}`,this.focus)})}validate(n){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,Be.Z)(e)?e(n):!!e}unbindEvents(){const{graph:n}=this.context;N_.forEach(e=>{n.off(`${e}:${un.CLICK}`,this.focus)})}destroy(){this.unbindEvents(),super.destroy()}}nk.defaultOptions={animation:{easing:"ease-in",duration:500},enable:!0};class rk extends yd{constructor(n,e){super(n,Object.assign({},rk.defaultOptions,e)),this.isFrozen=!1,this.toggleFrozen=t=>{this.isFrozen=t.type==="dragstart"},this.hoverElement=t=>{if(!this.validate(t))return;const i=t.type===un.POINTER_ENTER;this.updateElementsState(t,i);const{onHover:a,onHoverEnd:s}=this.options;i?a==null||a(t):s==null||s(t)},this.updateElementsState=(t,i)=>{if(!this.options.state&&!this.options.inactiveState)return;const{graph:a}=this.context,{state:s,animation:o,inactiveState:l}=this.options,u=this.getActiveIds(t),c={};if(s&&Object.assign(c,this.getElementsState(u,s,i)),l){const d=vI(a.getData(),!0).filter(h=>!u.includes(h));Object.assign(c,this.getElementsState(d,l,i))}a.setElementState(c,o)},this.getElementsState=(t,i,a)=>{const{graph:s}=this.context,o={};return t.forEach(l=>{const u=s.getElementState(l);a?o[l]=u.includes(i)?u:[...u,i]:o[l]=u.filter(c=>c!==i)}),o},this.bindEvents()}bindEvents(){const{graph:n}=this.context;this.unbindEvents(),N_.forEach(t=>{n.on(`${t}:${un.POINTER_ENTER}`,this.hoverElement),n.on(`${t}:${un.POINTER_LEAVE}`,this.hoverElement)});const e=this.context.canvas.document;e.addEventListener(`${un.DRAG_START}`,this.toggleFrozen),e.addEventListener(`${un.DRAG_END}`,this.toggleFrozen)}getActiveIds(n){const{graph:e}=this.context,{degree:t,direction:i}=this.options,a=n.target.id;return t?PI(e,n.targetType,a,typeof t=="function"?t(n):t,i):[a]}validate(n){if(this.destroyed||this.isFrozen||Zb(n.target)||this.context.graph.isCollapsingExpanding)return!1;const{enable:e}=this.options;return(0,Be.Z)(e)?e(n):!!e}unbindEvents(){const{graph:n}=this.context;N_.forEach(t=>{n.off(`${t}:${un.POINTER_ENTER}`,this.hoverElement),n.off(`${t}:${un.POINTER_LEAVE}`,this.hoverElement)});const e=this.context.canvas.document;e.removeEventListener(`${un.DRAG_START}`,this.toggleFrozen),e.removeEventListener(`${un.DRAG_END}`,this.toggleFrozen)}destroy(){this.unbindEvents(),super.destroy()}}rk.defaultOptions={animation:!1,enable:!0,degree:0,direction:"both",state:"active",inactiveState:void 0};class Yde extends gy{onPointerDown(n){if(!super.validate(n)||!super.isKeydown()||this.points)return;const{canvas:e}=this.context;this.pathShape=new gg({id:"g6-lasso-select",style:this.options.style}),e.appendChild(this.pathShape),this.points=[CE(n)]}onPointerMove(n){var e;if(!this.points)return;const{immediately:t,mode:i}=this.options;this.points.push(CE(n)),(e=this.pathShape)===null||e===void 0||e.setAttribute("d",tQ(this.points)),t&&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 n;(n=this.pathShape)===null||n===void 0||n.remove(),this.pathShape=void 0,this.points=void 0}}class ik extends yd{constructor(n,e){super(n,Object.assign({},ik.defaultOptions,e)),this.hiddenShapes=[],this.isVisible=!0,this.setElementsVisibility=(t,i,a)=>{t.filter(Boolean).forEach(s=>{i==="hidden"&&!s.isVisible()?this.hiddenShapes.push(s):i==="visible"&&this.hiddenShapes.includes(s)?this.hiddenShapes.splice(this.hiddenShapes.indexOf(s),1):M_(s,i,!1,a)})},this.filterShapes=(t,i)=>{if((0,Be.Z)(i))return s=>!i(t,s);const a=i==null?void 0:i[t];return s=>s.className?!(a!=null&&a.includes(s.className)):!0},this.hideShapes=t=>{if(!this.validate(t)||!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,rx.Z)(t=>{if(!this.validate(t)||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:n}=this.context;n.on(qn.BEFORE_TRANSFORM,this.hideShapes),n.on(qn.AFTER_TRANSFORM,this.showShapes)}unbindEvents(){const{graph:n}=this.context;n.off(qn.BEFORE_TRANSFORM,this.hideShapes),n.off(qn.AFTER_TRANSFORM,this.showShapes)}validate(n){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,Be.Z)(e)?e(n):!!e}update(n){this.unbindEvents(),super.update(n),this.bindEvents()}destroy(){this.unbindEvents(),super.destroy()}}ik.defaultOptions={enable:!0,debounce:200,shapes:r=>r==="node"};var d5=function(r,n,e,t){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(t.next(c))}catch(d){s(d)}}function l(c){try{u(t.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((t=t.apply(r,n||[])).next())})};class ak extends yd{constructor(n,e){super(n,Object.assign({},ak.defaultOptions,e)),this.onWheel=t=>d5(this,void 0,void 0,function*(){this.options.preventDefault&&t.preventDefault();const i=t.deltaX,a=t.deltaY;yield this.scroll([-i,-a],t)}),this.shortcut=new dp(n.graph),this.bindEvents()}update(n){super.update(n),this.bindEvents()}bindEvents(){var n,e;const{trigger:t}=this.options;if(this.shortcut.unbindAll(),(0,Gs.Z)(t)){(n=this.graphDom)===null||n===void 0||n.removeEventListener(un.WHEEL,this.onWheel);const{up:i=[],down:a=[],left:s=[],right:o=[]}=t;this.shortcut.bind(i,l=>this.scroll([0,-10],l)),this.shortcut.bind(a,l=>this.scroll([0,10],l)),this.shortcut.bind(s,l=>this.scroll([-10,0],l)),this.shortcut.bind(o,l=>this.scroll([10,0],l))}else(e=this.graphDom)===null||e===void 0||e.addEventListener(un.WHEEL,this.onWheel,{passive:!1})}get graphDom(){return this.context.graph.getCanvas().getContextService().getDomElement()}formatDisplacement(n){const{sensitivity:e}=this.options;return n=$v(n,e),n=this.clampByDirection(n),n=this.clampByRange(n),n}clampByDirection([n,e]){const{direction:t}=this.options;return t==="x"?e=0:t==="y"&&(n=0),[n,e]}clampByRange([n,e]){const{viewport:t,canvas:i}=this.context,[a,s]=i.getSize(),[o,l,u,c]=Kf(this.options.range),d=[s*o,a*l,s*u,a*c],h=Eg(lT(t.getCanvasCenter()),d),f=Cs(t.getViewportCenter(),[n,e,0]);if(!Wh(f,h)){const{min:[v,g],max:[m,y]}=h;(f[0]<v&&n>0||f[0]>m&&n<0)&&(n=0),(f[1]<g&&e>0||f[1]>y&&e<0)&&(e=0)}return[n,e]}scroll(n,e){return d5(this,void 0,void 0,function*(){if(!this.validate(e))return;const{onFinish:t}=this.options,i=this.context.graph,a=this.formatDisplacement(n);yield i.translateBy(a,!1),t==null||t()})}validate(n){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,Be.Z)(e)?e(n):!!e}destroy(){var n;this.shortcut.destroy(),(n=this.graphDom)===null||n===void 0||n.removeEventListener(un.WHEEL,this.onWheel),super.destroy()}}ak.defaultOptions={enable:!0,sensitivity:1,preventDefault:!0,range:1/0};var h5=function(r,n,e,t){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(t.next(c))}catch(d){s(d)}}function l(c){try{u(t.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((t=t.apply(r,n||[])).next())})};class sk extends yd{constructor(n,e){super(n,Object.assign({},sk.defaultOptions,e)),this.zoom=(t,i,a)=>h5(this,void 0,void 0,function*(){if(!this.validate(i))return;const{graph:s}=this.context;let o;"viewport"in i&&(o=Du(i.viewport));const{sensitivity:l,onFinish:u}=this.options,c=1+(0,O.Z)(t,-50,50)*l/100,d=s.getZoom();yield s.zoomTo(d*c,a,o),u==null||u()}),this.onReset=()=>h5(this,void 0,void 0,function*(){yield this.context.graph.zoomTo(1,this.options.animation)}),this.preventDefault=t=>{this.options.preventDefault&&t.preventDefault()},this.shortcut=new dp(n.graph),this.bindEvents()}update(n){super.update(n),this.bindEvents()}bindEvents(){var n;const{trigger:e}=this.options;if(this.shortcut.unbindAll(),Array.isArray(e)&&((n=this.context.canvas.getContainer())===null||n===void 0||n.addEventListener(un.WHEEL,this.preventDefault),this.shortcut.bind([...e,un.WHEEL],t=>{const{deltaX:i,deltaY:a}=t;this.zoom(-(a!=null?a:i),t,!1)})),typeof e=="object"){const{zoomIn:t=[],zoomOut:i=[],reset:a=[]}=e;this.shortcut.bind(t,s=>this.zoom(10,s,this.options.animation)),this.shortcut.bind(i,s=>this.zoom(-10,s,this.options.animation)),this.shortcut.bind(a,this.onReset)}}validate(n){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,Be.Z)(e)?e(n):!!e}destroy(){var n;this.shortcut.destroy(),(n=this.context.canvas.getContainer())===null||n===void 0||n.removeEventListener(un.WHEEL,this.preventDefault),super.destroy()}}sk.defaultOptions={animation:{duration:200},enable:!0,sensitivity:1,trigger:[],preventDefault:!0};var ok=k(81746),DM=function(r,n){return DM=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},DM(r,n)};function vRe(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");DM(r,n);function e(){this.constructor=r}r.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}var f5=function(){return f5=Object.assign||function(n){for(var e,t=1,i=arguments.length;t<i;t++){e=arguments[t];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=e[a])}return n},f5.apply(this,arguments)};function v5(r,n){var e={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&n.indexOf(t)<0&&(e[t]=r[t]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(r);i<t.length;i++)n.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(e[t[i]]=r[t[i]]);return e}function gRe(r,n,e,t){var i=arguments.length,a=i<3?n:t===null?t=Object.getOwnPropertyDescriptor(n,e):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,n,e,t);else for(var o=r.length-1;o>=0;o--)(s=r[o])&&(a=(i<3?s(a):i>3?s(n,e,a):s(n,e))||a);return i>3&&a&&Object.defineProperty(n,e,a),a}function _Re(r,n){return function(e,t){n(e,t,r)}}function mRe(r,n,e,t,i,a){function s(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}for(var o=t.kind,l=o==="getter"?"get":o==="setter"?"set":"value",u=!n&&r?t.static?r:r.prototype:null,c=n||(u?Object.getOwnPropertyDescriptor(u,t.name):{}),d,h=!1,f=e.length-1;f>=0;f--){var v={};for(var g in t)v[g]=g==="access"?{}:t[g];for(var g in t.access)v.access[g]=t.access[g];v.addInitializer=function(y){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(y||null))};var m=(0,e[f])(o==="accessor"?{get:c.get,set:c.set}:c[l],v);if(o==="accessor"){if(m===void 0)continue;if(m===null||typeof m!="object")throw new TypeError("Object expected");(d=s(m.get))&&(c.get=d),(d=s(m.set))&&(c.set=d),(d=s(m.init))&&i.push(d)}else(d=s(m))&&(o==="field"?i.push(d):c[l]=d)}u&&Object.defineProperty(u,t.name,c),h=!0}function pRe(r,n,e){for(var t=arguments.length>2,i=0;i<n.length;i++)e=t?n[i].call(r,e):n[i].call(r);return t?e:void 0}function yRe(r){return typeof r=="symbol"?r:"".concat(r)}function xRe(r,n,e){return typeof n=="symbol"&&(n=n.description?"[".concat(n.description,"]"):""),Object.defineProperty(r,"name",{configurable:!0,value:e?"".concat(e," ",n):n})}function ERe(r,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,n)}function ia(r,n,e,t){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(t.next(c))}catch(d){s(d)}}function l(c){try{u(t.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((t=t.apply(r,n||[])).next())})}function bRe(r,n){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},t,i,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(u){return function(c){return l([u,c])}}function l(u){if(t)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(e=0)),e;)try{if(t=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return e.label++,{value:u[1],done:!1};case 5:e.label++,i=u[1],u=[0];continue;case 7:u=e.ops.pop(),e.trys.pop();continue;default:if(a=e.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){e=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){e.label=u[1];break}if(u[0]===6&&e.label<a[1]){e.label=a[1],a=u;break}if(a&&e.label<a[2]){e.label=a[2],e.ops.push(u);break}a[2]&&e.ops.pop(),e.trys.pop();continue}u=n.call(r,e)}catch(c){u=[6,c],i=0}finally{t=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var g5=Object.create?function(r,n,e,t){t===void 0&&(t=e);var i=Object.getOwnPropertyDescriptor(n,e);(!i||("get"in i?!n.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(r,t,i)}:function(r,n,e,t){t===void 0&&(t=e),r[t]=n[e]};function kRe(r,n){for(var e in r)e!=="default"&&!Object.prototype.hasOwnProperty.call(n,e)&&g5(n,r,e)}function _5(r){var n=typeof Symbol=="function"&&Symbol.iterator,e=n&&r[n],t=0;if(e)return e.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&t>=r.length&&(r=void 0),{value:r&&r[t++],done:!r}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function Zde(r,n){var e=typeof Symbol=="function"&&r[Symbol.iterator];if(!e)return r;var t=e.call(r),i,a=[],s;try{for(;(n===void 0||n-- >0)&&!(i=t.next()).done;)a.push(i.value)}catch(o){s={error:o}}finally{try{i&&!i.done&&(e=t.return)&&e.call(t)}finally{if(s)throw s.error}}return a}function wRe(){for(var r=[],n=0;n<arguments.length;n++)r=r.concat(Zde(arguments[n]));return r}function SRe(){for(var r=0,n=0,e=arguments.length;n<e;n++)r+=arguments[n].length;for(var t=Array(r),i=0,n=0;n<e;n++)for(var a=arguments[n],s=0,o=a.length;s<o;s++,i++)t[i]=a[s];return t}function TRe(r,n,e){if(e||arguments.length===2)for(var t=0,i=n.length,a;t<i;t++)(a||!(t in n))&&(a||(a=Array.prototype.slice.call(n,0,t)),a[t]=n[t]);return r.concat(a||Array.prototype.slice.call(n))}function lk(r){return this instanceof lk?(this.v=r,this):new lk(r)}function CRe(r,n,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e.apply(r,n||[]),i,a=[];return i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i;function s(h){t[h]&&(i[h]=function(f){return new Promise(function(v,g){a.push([h,f,v,g])>1||o(h,f)})})}function o(h,f){try{l(t[h](f))}catch(v){d(a[0][3],v)}}function l(h){h.value instanceof lk?Promise.resolve(h.value.v).then(u,c):d(a[0][2],h)}function u(h){o("next",h)}function c(h){o("throw",h)}function d(h,f){h(f),a.shift(),a.length&&o(a[0][0],a[0][1])}}function MRe(r){var n,e;return n={},t("next"),t("throw",function(i){throw i}),t("return"),n[Symbol.iterator]=function(){return this},n;function t(i,a){n[i]=r[i]?function(s){return(e=!e)?{value:lk(r[i](s)),done:!1}:a?a(s):s}:a}}function PRe(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r[Symbol.asyncIterator],e;return n?n.call(r):(r=typeof _5=="function"?_5(r):r[Symbol.iterator](),e={},t("next"),t("throw"),t("return"),e[Symbol.asyncIterator]=function(){return this},e);function t(a){e[a]=r[a]&&function(s){return new Promise(function(o,l){s=r[a](s),i(o,l,s.done,s.value)})}}function i(a,s,o,l){Promise.resolve(l).then(function(u){a({value:u,done:o})},s)}}function NRe(r,n){return Object.defineProperty?Object.defineProperty(r,"raw",{value:n}):r.raw=n,r}var Xde=Object.create?function(r,n){Object.defineProperty(r,"default",{enumerable:!0,value:n})}:function(r,n){r.default=n};function ORe(r){if(r&&r.__esModule)return r;var n={};if(r!=null)for(var e in r)e!=="default"&&Object.prototype.hasOwnProperty.call(r,e)&&g5(n,r,e);return Xde(n,r),n}function RRe(r){return r&&r.__esModule?r:{default:r}}function ARe(r,n,e,t){if(e==="a"&&!t)throw new TypeError("Private accessor was defined without a getter");if(typeof n=="function"?r!==n||!t:!n.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?t:e==="a"?t.call(r):t?t.value:n.get(r)}function LRe(r,n,e,t,i){if(t==="m")throw new TypeError("Private method is not writable");if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof n=="function"?r!==n||!i:!n.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t==="a"?i.call(r,e):i?i.value=e:n.set(r,e),e}function IRe(r,n){if(n===null||typeof n!="object"&&typeof n!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof r=="function"?n===r:r.has(n)}const Kde=(r,n)=>{if(r!=="next"&&r!=="prev")return n},m5=r=>{r.prev.next=r.next,r.next.prev=r.prev,delete r.next,delete r.prev};class Jde{constructor(){const n={};n.prev=n,n.next=n.prev,this.shortcut=n}dequeue(){const n=this.shortcut,e=n.prev;if(e&&e!==n)return m5(e),e}enqueue(n){const e=this.shortcut;n.prev&&n.next&&m5(n),n.next=e.next,e.next.prev=n,e.next=n,n.prev=e}toString(){const n=[],e=this.shortcut;let t=e.prev;for(;t!==e;)n.push(JSON.stringify(t,Kde)),t=t==null?void 0:t.prev;return`[${n.join(", ")}]`}}class Qde extends Jde{}const qde=()=>1,ehe=(r,n)=>{var e;if(r.getAllNodes().length<=1)return[];const t=nhe(r,n||qde);return(e=the(t.graph,t.buckets,t.zeroIdx).map(a=>r.getRelatedEdges(a.v,"out").filter(({target:s})=>s===a.w)))===null||e===void 0?void 0:e.flat()},the=(r,n,e)=>{let t=[];const i=n[n.length-1],a=n[0];let s;for(;r.getAllNodes().length;){for(;s=a.dequeue();)FM(r,n,e,s);for(;s=i.dequeue();)FM(r,n,e,s);if(r.getAllNodes().length){for(let o=n.length-2;o>0;--o)if(s=n[o].dequeue(),s){t=t.concat(FM(r,n,e,s,!0));break}}}return t},FM=(r,n,e,t,i)=>{var a,s;const o=[];return r.hasNode(t.v)&&((a=r.getRelatedEdges(t.v,"in"))===null||a===void 0||a.forEach(l=>{const u=l.data.weight,c=r.getNode(l.source);i&&o.push({v:l.source,w:l.target,in:0,out:0}),c.data.out===void 0&&(c.data.out=0),c.data.out-=u,BM(n,e,Object.assign({v:c.id},c.data))}),(s=r.getRelatedEdges(t.v,"out"))===null||s===void 0||s.forEach(l=>{const u=l.data.weight,c=l.target,d=r.getNode(c);d.data.in===void 0&&(d.data.in=0),d.data.in-=u,BM(n,e,Object.assign({v:d.id},d.data))}),r.removeNode(t.v)),i?o:void 0},nhe=(r,n)=>{const e=new su.k;let t=0,i=0;r.getAllNodes().forEach(l=>{e.addNode({id:l.id,data:{v:l.id,in:0,out:0}})}),r.getAllEdges().forEach(l=>{const u=e.getRelatedEdges(l.source,"out").find(d=>d.target===l.target),c=(n==null?void 0:n(l))||1;u?e.updateEdgeData(u==null?void 0:u.id,Object.assign(Object.assign({},u.data),{weight:u.data.weight+c})):e.addEdge({id:l.id,source:l.source,target:l.target,data:{weight:c}}),i=Math.max(i,e.getNode(l.source).data.out+=c),t=Math.max(t,e.getNode(l.target).data.in+=c)});const a=[],s=i+t+3;for(let l=0;l<s;l++)a.push(new Qde);const o=t+1;return e.getAllNodes().forEach(l=>{BM(a,o,Object.assign({v:l.id},e.getNode(l.id).data))}),{buckets:a,zeroIdx:o,graph:e}},BM=(r,n,e)=>{e.out?e.in?r[e.out-e.in+n].enqueue(e):r[r.length-1].enqueue(e):r[0].enqueue(e)},rhe=(r,n)=>{const t=n==="greedy"?ehe(r,(i=>a=>a.data.weight||1)(r)):ihe(r);t==null||t.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)})})},ihe=r=>{const n=[],e={},t={},i=a=>{t[a]||(t[a]=!0,e[a]=!0,r.getRelatedEdges(a,"out").forEach(s=>{e[s.target]?n.push(s):i(s.target)}),delete e[a])};return r.getAllNodes().forEach(a=>i(a.id)),n},ahe=r=>{r.getAllEdges().forEach(n=>{const e=n.data;if(e.reversed){r.removeEdge(n.id);const t=e.forwardName;delete e.reversed,delete e.forwardName,r.addEdge({id:n.id,source:n.target,target:n.source,data:Object.assign(Object.assign({},e),{forwardName:t})})}})},she=(r,n)=>Number(r)-Number(n),jp=(r,n,e,t)=>{let i;do i=`${t}${Math.random()}`;while(r.hasNode(i));return e.dummy=n,r.addNode({id:i,data:e}),i},ohe=r=>{const n=new su.k;return r.getAllNodes().forEach(e=>{n.addNode(Object.assign({},e))}),r.getAllEdges().forEach(e=>{const t=n.getRelatedEdges(e.source,"out").find(i=>i.target===e.target);t?n.updateEdgeData(t==null?void 0:t.id,Object.assign(Object.assign({},t.data),{weight:t.data.weight+e.data.weight||0,minlen:Math.max(t.data.minlen,e.data.minlen||1)})):n.addEdge({id:e.id,source:e.source,target:e.target,data:{weight:e.data.weight||0,minlen:e.data.minlen||1}})}),n},p5=r=>{const n=new su.k;return r.getAllNodes().forEach(e=>{r.getChildren(e.id).length||n.addNode(Object.assign({},e))}),r.getAllEdges().forEach(e=>{n.addEdge(e)}),n},y5=(r,n)=>r==null?void 0:r.reduce((e,t,i)=>(e[t]=n[i],e),{}),DRe=r=>{const n={};return r.getAllNodes().forEach(e=>{const t={};r.getRelatedEdges(e.id,"out").forEach(i=>{t[i.target]=(t[i.target]||0)+(i.data.weight||0)}),n[e.id]=t}),n},FRe=r=>{const n=r.getAllNodes(),e=n.map(t=>{const i={};return r.getRelatedEdges(t.id,"in").forEach(a=>{i[a.source]=(i[a.source]||0)+a.data.weight}),i});return y5(n.map(t=>t.id),e)},x5=(r,n)=>{const e=Number(r.x),t=Number(r.y),i=Number(n.x)-e,a=Number(n.y)-t;let s=Number(r.width)/2,o=Number(r.height)/2;if(!i&&!a)return{x:0,y:0};let l,u;return Math.abs(a)*s>Math.abs(i)*o?(a<0&&(o=-o),l=o*i/a,u=o):(i<0&&(s=-s),l=s,u=s*a/i),{x:e+l,y:t+u}},ax=r=>{const n=[],e=b5(r)+1;for(let t=0;t<e;t++)n.push([]);r.getAllNodes().forEach(t=>{const i=t.data.rank;i!==void 0&&n[i]&&n[i].push(t.id)});for(let t=0;t<e;t++)n[t]=n[t].sort((i,a)=>she(r.getNode(i).data.order,r.getNode(a).data.order));return n},lhe=r=>{const n=r.getAllNodes().filter(t=>t.data.rank!==void 0).map(t=>t.data.rank),e=Math.min(...n);r.getAllNodes().forEach(t=>{t.data.hasOwnProperty("rank")&&e!==1/0&&(t.data.rank-=e)})},uhe=(r,n=0)=>{const e=r.getAllNodes(),t=e.filter(o=>o.data.rank!==void 0).map(o=>o.data.rank),i=Math.min(...t),a=[];e.forEach(o=>{const l=(o.data.rank||0)-i;a[l]||(a[l]=[]),a[l].push(o.id)});let s=0;for(let o=0;o<a.length;o++){const l=a[o];l===void 0?o%n!==0&&(s-=1):s&&(l==null||l.forEach(u=>{const c=r.getNode(u);c&&(c.data.rank=c.data.rank||0,c.data.rank+=s)}))}},E5=(r,n,e,t)=>{const i={width:0,height:0};return(0,pe.Z)(e)&&(0,pe.Z)(t)&&(i.rank=e,i.order=t),jp(r,"border",i,n)},b5=r=>{let n;return r.getAllNodes().forEach(e=>{const t=e.data.rank;t!==void 0&&(n===void 0||t>n)&&(n=t)}),n||(n=0),n},che=(r,n)=>{const e={lhs:[],rhs:[]};return r==null||r.forEach(t=>{n(t)?e.lhs.push(t):e.rhs.push(t)}),e},$M=(r,n)=>r.reduce((e,t)=>{const i=n(e),a=n(t);return i>a?t:e}),k5=(r,n,e,t,i,a)=>{t.includes(n.id)||(t.push(n.id),e||a.push(n.id),i(n.id).forEach(s=>k5(r,s,e,t,i,a)),e&&a.push(n.id))},w5=(r,n,e,t)=>{const i=Array.isArray(n)?n:[n],a=l=>t?r.getSuccessors(l):r.getNeighbors(l),s=[],o=[];return i.forEach(l=>{if(r.hasNode(l.id))k5(r,l,e==="post",o,a,s);else throw new Error(`Graph does not have node: ${l}`)}),s},dhe=r=>{const n=e=>{const t=r.getChildren(e),i=r.getNode(e);if(t!=null&&t.length&&t.forEach(a=>n(a.id)),i.data.hasOwnProperty("minRank")){i.data.borderLeft=[],i.data.borderRight=[];for(let a=i.data.minRank,s=i.data.maxRank+1;a<s;a+=1)S5(r,"borderLeft","_bl",e,i,a),S5(r,"borderRight","_br",e,i,a)}};r.getRoots().forEach(e=>n(e.id))},S5=(r,n,e,t,i,a)=>{const s={rank:a,borderType:n,width:0,height:0},o=i.data[n][a-1],l=jp(r,"border",s,e);i.data[n][a]=l,r.setParent(l,t),o&&r.addEdge({id:`e${Math.random()}`,source:o,target:l,data:{weight:1}})},hhe=(r,n)=>{const e=n.toLowerCase();(e==="lr"||e==="rl")&&T5(r)},fhe=(r,n)=>{const e=n.toLowerCase();(e==="bt"||e==="rl")&&vhe(r),(e==="lr"||e==="rl")&&(ghe(r),T5(r))},T5=r=>{r.getAllNodes().forEach(n=>{C5(n)}),r.getAllEdges().forEach(n=>{C5(n)})},C5=r=>{const n=r.data.width;r.data.width=r.data.height,r.data.height=n},vhe=r=>{r.getAllNodes().forEach(n=>{GM(n.data)}),r.getAllEdges().forEach(n=>{var e;(e=n.data.points)===null||e===void 0||e.forEach(t=>GM(t)),n.data.hasOwnProperty("y")&&GM(n.data)})},GM=r=>{r!=null&&r.y&&(r.y=-r.y)},ghe=r=>{r.getAllNodes().forEach(n=>{zM(n.data)}),r.getAllEdges().forEach(n=>{var e;(e=n.data.points)===null||e===void 0||e.forEach(t=>zM(t)),n.data.hasOwnProperty("x")&&zM(n.data)})},zM=r=>{const n=r.x;r.x=r.y,r.y=n},_he=r=>{const n=jp(r,"root",{},"_root"),e=mhe(r);let t=Math.max(...Object.values(e));Math.abs(t)===1/0&&(t=1);const i=t-1,a=2*i+1;r.getAllEdges().forEach(o=>{o.data.minlen*=a});const s=phe(r)+1;return r.getRoots().forEach(o=>{M5(r,n,a,s,i,e,o.id)}),{nestingRoot:n,nodeRankFactor:a}},M5=(r,n,e,t,i,a,s)=>{const o=r.getChildren(s);if(!(o!=null&&o.length)){s!==n&&r.addEdge({id:`e${Math.random()}`,source:n,target:s,data:{weight:0,minlen:e}});return}const l=E5(r,"_bt"),u=E5(r,"_bb"),c=r.getNode(s);r.setParent(l,s),c.data.borderTop=l,r.setParent(u,s),c.data.borderBottom=u,o==null||o.forEach(d=>{M5(r,n,e,t,i,a,d.id);const h=d.data.borderTop?d.data.borderTop:d.id,f=d.data.borderBottom?d.data.borderBottom:d.id,v=d.data.borderTop?t:2*t,g=h!==f?1:i-a[s]+1;r.addEdge({id:`e${Math.random()}`,source:l,target:h,data:{minlen:g,weight:v,nestingEdge:!0}}),r.addEdge({id:`e${Math.random()}`,source:f,target:u,data:{minlen:g,weight:v,nestingEdge:!0}})}),r.getParent(s)||r.addEdge({id:`e${Math.random()}`,source:n,target:l,data:{weight:0,minlen:i+a[s]}})},mhe=r=>{const n={},e=(t,i)=>{const a=r.getChildren(t);a==null||a.forEach(s=>e(s.id,i+1)),n[t]=i};return r.getRoots().forEach(t=>e(t.id,1)),n},phe=r=>{let n=0;return r.getAllEdges().forEach(e=>{n+=e.data.weight}),n},yhe=(r,n)=>{n&&r.removeNode(n),r.getAllEdges().forEach(e=>{e.data.nestingEdge&&r.removeEdge(e.id)})},xhe="edge",P5="edge-label",Ehe=(r,n)=>{r.getAllEdges().forEach(e=>bhe(r,e,n))},bhe=(r,n,e)=>{let t=n.source,i=r.getNode(t).data.rank;const a=n.target,s=r.getNode(a).data.rank,o=n.data.labelRank;if(s===i+1)return;r.removeEdge(n.id);let l,u,c;for(c=0,++i;i<s;++c,++i)n.data.points=[],u={originalEdge:n,width:0,height:0,rank:i},l=jp(r,xhe,u,"_d"),i===o&&(u.width=n.data.width,u.height=n.data.height,u.dummy=P5,u.labelpos=n.data.labelpos),r.addEdge({id:`e${Math.random()}`,source:t,target:l,data:{weight:n.data.weight}}),c===0&&e.push(l),t=l;r.addEdge({id:`e${Math.random()}`,source:t,target:a,data:{weight:n.data.weight}})},khe=(r,n)=>{n.forEach(e=>{let t=r.getNode(e);const{data:i}=t,a=i.originalEdge;let s;a&&r.addEdge(a);let o=e;for(;t.data.dummy;)s=r.getSuccessors(o)[0],r.removeNode(o),a.data.points.push({x:t.data.x,y:t.data.y}),t.data.dummy===P5&&(a.data.x=t.data.x,a.data.y=t.data.y,a.data.width=t.data.width,a.data.height=t.data.height),o=s.id,t=r.getNode(o)})},whe=(r,n,e)=>{const t={};let i;e==null||e.forEach(a=>{let s=r.getParent(a),o,l;for(;s;){if(o=r.getParent(s.id),o?(l=t[o.id],t[o.id]=s.id):(l=i,i=s.id),l&&l!==s.id){n.hasNode(l)||n.addNode({id:l,data:{}}),n.hasNode(s.id)||n.addNode({id:s.id,data:{}}),n.hasEdge(`e${l}-${s.id}`)||n.addEdge({id:`e${l}-${s.id}`,source:l,target:s.id,data:{}});return}s=o}})},She=(r,n,e)=>{const t=The(r),i=new su.k({tree:[{id:t,children:[],data:{}}]});return r.getAllNodes().forEach(a=>{const s=r.getParent(a.id);(a.data.rank===n||a.data.minRank<=n&&n<=a.data.maxRank)&&(i.hasNode(a.id)||i.addNode(Object.assign({},a)),s!=null&&s.id&&!i.hasNode(s==null?void 0:s.id)&&i.addNode(Object.assign({},s)),i.setParent(a.id,(s==null?void 0:s.id)||t),r.getRelatedEdges(a.id,e).forEach(o=>{const l=o.source===a.id?o.target:o.source;i.hasNode(l)||i.addNode(Object.assign({},r.getNode(l)));const u=i.getRelatedEdges(l,"out").find(({target:d})=>d===a.id),c=u!==void 0?u.data.weight:0;u?i.updateEdgeData(u.id,Object.assign(Object.assign({},u.data),{weight:o.data.weight+c})):i.addEdge({id:o.id,source:l,target:a.id,data:{weight:o.data.weight+c}})}),a.data.hasOwnProperty("minRank")&&i.updateNodeData(a.id,Object.assign(Object.assign({},a.data),{borderLeft:a.data.borderLeft[n],borderRight:a.data.borderRight[n]})))}),i},The=r=>{let n;for(;r.hasNode(n=`_root${Math.random()}`););return n},Che=(r,n,e)=>{const t=y5(e,e.map((c,d)=>d)),a=n.map(c=>{const d=r.getRelatedEdges(c,"out").map(h=>({pos:t[h.target]||0,weight:h.data.weight}));return d==null?void 0:d.sort((h,f)=>h.pos-f.pos)}).flat().filter(c=>c!==void 0);let s=1;for(;s<e.length;)s<<=1;const o=2*s-1;s-=1;const l=Array(o).fill(0,0,o);let u=0;return a==null||a.forEach(c=>{if(c){let d=c.pos+s;l[d]+=c.weight;let h=0;for(;d>0;)d%2&&(h+=l[d+1]),d=d-1>>1,l[d]+=c.weight;u+=c.weight*h}}),u},N5=(r,n)=>{let e=0;for(let t=1;t<(n==null?void 0:n.length);t+=1)e+=Che(r,n[t-1],n[t]);return e},O5=r=>{const n={},e=r.getAllNodes(),t=e.map(u=>{var c;return(c=u.data.rank)!==null&&c!==void 0?c:-1/0}),i=Math.max(...t),a=[];for(let u=0;u<i+1;u++)a.push([]);const s=e.sort((u,c)=>r.getNode(u.id).data.rank-r.getNode(c.id).data.rank),l=s.filter(u=>r.getNode(u.id).data.fixorder!==void 0).sort((u,c)=>r.getNode(u.id).data.fixorder-r.getNode(c.id).data.fixorder);return l==null||l.forEach(u=>{isNaN(r.getNode(u.id).data.rank)||a[r.getNode(u.id).data.rank].push(u.id),n[u.id]=!0}),s==null||s.forEach(u=>r.dfsTree(u.id,c=>{if(n.hasOwnProperty(c.id))return!0;n[c.id]=!0,isNaN(c.data.rank)||a[c.data.rank].push(c.id)})),a},Mhe=(r,n)=>n.map(e=>{const t=r.getRelatedEdges(e,"in");if(!(t!=null&&t.length))return{v:e};const i={sum:0,weight:0};return t==null||t.forEach(a=>{const s=r.getNode(a.source);i.sum+=a.data.weight*s.data.order,i.weight+=a.data.weight}),{v:e,barycenter:i.sum/i.weight,weight:i.weight}}),Phe=(r,n)=>{var e,t,i;const a={};r==null||r.forEach((o,l)=>{a[o.v]={i:l,indegree:0,in:[],out:[],vs:[o.v]};const u=a[o.v];o.barycenter!==void 0&&(u.barycenter=o.barycenter,u.weight=o.weight)}),(e=n.getAllEdges())===null||e===void 0||e.forEach(o=>{const l=a[o.source],u=a[o.target];l!==void 0&&u!==void 0&&(u.indegree++,l.out.push(a[o.target]))});const s=(i=(t=Object.values(a)).filter)===null||i===void 0?void 0:i.call(t,o=>!o.indegree);return Nhe(s)},Nhe=r=>{var n,e;const t=[],i=l=>u=>{u.merged||(u.barycenter===void 0||l.barycenter===void 0||u.barycenter>=l.barycenter)&&Ohe(l,u)},a=l=>u=>{u.in.push(l),--u.indegree===0&&r.push(u)};for(;r!=null&&r.length;){const l=r.pop();t.push(l),(n=l.in.reverse())===null||n===void 0||n.forEach(u=>i(l)(u)),(e=l.out)===null||e===void 0||e.forEach(u=>a(l)(u))}const s=t.filter(l=>!l.merged),o=["vs","i","barycenter","weight"];return s.map(l=>{const u={};return o==null||o.forEach(c=>{l[c]!==void 0&&(u[c]=l[c])}),u})},Ohe=(r,n)=>{var e;let t=0,i=0;r.weight&&(t+=r.barycenter*r.weight,i+=r.weight),n.weight&&(t+=n.barycenter*n.weight,i+=n.weight),r.vs=(e=n.vs)===null||e===void 0?void 0:e.concat(r.vs),r.barycenter=t/i,r.weight=i,r.i=Math.min(n.i,r.i),n.merged=!0};var Rhe=Phe;const Ahe=(r,n,e,t)=>{const i=che(r,h=>{const f=h.hasOwnProperty("fixorder")&&!isNaN(h.fixorder);return t?!f&&h.hasOwnProperty("barycenter"):f||h.hasOwnProperty("barycenter")}),a=i.lhs,s=i.rhs.sort((h,f)=>-h.i- -f.i),o=[];let l=0,u=0,c=0;a==null||a.sort(Lhe(!!n,!!e)),c=R5(o,s,c),a==null||a.forEach(h=>{var f;c+=(f=h.vs)===null||f===void 0?void 0:f.length,o.push(h.vs),l+=h.barycenter*h.weight,u+=h.weight,c=R5(o,s,c)});const d={vs:o.flat()};return u&&(d.barycenter=l/u,d.weight=u),d},R5=(r,n,e)=>{let t=e,i;for(;n.length&&(i=n[n.length-1]).i<=t;)n.pop(),r==null||r.push(i.vs),t++;return t},Lhe=(r,n)=>(e,t)=>{if(e.fixorder!==void 0&&t.fixorder!==void 0)return e.fixorder-t.fixorder;if(e.barycenter<t.barycenter)return-1;if(e.barycenter>t.barycenter)return 1;if(n&&e.order!==void 0&&t.order!==void 0){if(e.order<t.order)return-1;if(e.order>t.order)return 1}return r?t.i-e.i:e.i-t.i},A5=(r,n,e,t,i,a)=>{var s,o,l,u;let c=r.getChildren(n).map(w=>w.id);const d=r.getNode(n),h=d?d.data.borderLeft:void 0,f=d?d.data.borderRight:void 0,v={};h&&(c=c==null?void 0:c.filter(w=>w!==h&&w!==f));const g=Mhe(r,c||[]);g==null||g.forEach(w=>{var T;if(!((T=r.getChildren(w.v))===null||T===void 0)&&T.length){const G=A5(r,w.v,e,t,a);v[w.v]=G,G.hasOwnProperty("barycenter")&&Dhe(w,G)}});const m=Rhe(g,e);Ihe(m,v),(s=m.filter(w=>w.vs.length>0))===null||s===void 0||s.forEach(w=>{const T=r.getNode(w.vs[0]);T&&(w.fixorder=T.data.fixorder,w.order=T.data.order)});const y=Ahe(m,t,i,a);if(h&&(y.vs=[h,y.vs,f].flat(),!((o=r.getPredecessors(h))===null||o===void 0)&&o.length)){const w=r.getNode(((l=r.getPredecessors(h))===null||l===void 0?void 0:l[0].id)||""),T=r.getNode(((u=r.getPredecessors(f))===null||u===void 0?void 0:u[0].id)||"");y.hasOwnProperty("barycenter")||(y.barycenter=0,y.weight=0),y.barycenter=(y.barycenter*y.weight+w.data.order+T.data.order)/(y.weight+2),y.weight+=2}return y},Ihe=(r,n)=>{r==null||r.forEach(e=>{var t;const i=(t=e.vs)===null||t===void 0?void 0:t.map(a=>n[a]?n[a].vs:a);e.vs=i.flat()})},Dhe=(r,n)=>{r.barycenter!==void 0?(r.barycenter=(r.barycenter*r.weight+n.barycenter*n.weight)/(r.weight+n.weight),r.weight+=n.weight):(r.barycenter=n.barycenter,r.weight=n.weight)},Fhe=(r,n)=>{const e=b5(r),t=[],i=[];for(let c=1;c<e+1;c++)t.push(c);for(let c=e-1;c>-1;c--)i.push(c);const a=L5(r,t,"in"),s=L5(r,i,"out");let o=O5(r);VM(r,o);let l=Number.POSITIVE_INFINITY,u;for(let c=0,d=0;d<4;++c,++d){I5(c%2?a:s,c%4>=2,!1,n),o=ax(r);const h=N5(r,o);h<l&&(d=0,u=(0,up.Z)(o),l=h)}o=O5(r),VM(r,o);for(let c=0,d=0;d<4;++c,++d){I5(c%2?a:s,c%4>=2,!0,n),o=ax(r);const h=N5(r,o);h<l&&(d=0,u=(0,up.Z)(o),l=h)}VM(r,u)},L5=(r,n,e)=>n.map(t=>She(r,t,e)),I5=(r,n,e,t)=>{const i=new su.k;r==null||r.forEach(a=>{var s;const o=a.getRoots()[0].id,l=A5(a,o,i,n,e,t);for(let u=0;u<((s=l.vs)===null||s===void 0?void 0:s.length);u++){const c=a.getNode(l.vs[u]);c&&(c.data.order=u)}whe(a,i,l.vs)})},VM=(r,n)=>{n==null||n.forEach(e=>{e==null||e.forEach((t,i)=>{r.getNode(t).data.order=i})})},Bhe=(r,n)=>{const t=r.getAllNodes().filter(s=>{var o;return!(!((o=r.getChildren(s.id))===null||o===void 0)&&o.length)}).map(s=>s.data.rank),i=Math.max(...t),a=[];for(let s=0;s<i+1;s++)a[s]=[];n==null||n.forEach(s=>{const o=r.getNode(s);!o||o.data.dummy||isNaN(o.data.rank)||(o.data.fixorder=a[o.data.rank].length,a[o.data.rank].push(s))})},$he=r=>{const n={};let e=0;const t=i=>{const a=e;r.getChildren(i).forEach(s=>t(s.id)),n[i]={low:a,lim:e++}};return r.getRoots().forEach(i=>t(i.id)),n},Ghe=(r,n,e,t)=>{var i,a;const s=[],o=[],l=Math.min(n[e].low,n[t].low),u=Math.max(n[e].lim,n[t].lim);let c,d;c=e;do c=(i=r.getParent(c))===null||i===void 0?void 0:i.id,s.push(c);while(c&&(n[c].low>l||u>n[c].lim));for(d=c,c=t;c&&c!==d;)o.push(c),c=(a=r.getParent(c))===null||a===void 0?void 0:a.id;return{lca:d,path:s.concat(o.reverse())}},zhe=(r,n)=>{const e=$he(r);n.forEach(t=>{var i,a;let s=t,o=r.getNode(s);const l=o.data.originalEdge;if(!l)return;const u=Ghe(r,e,l.source,l.target),c=u.path,d=u.lca;let h=0,f=c[h],v=!0;for(;s!==l.target;){if(o=r.getNode(s),v){for(;f!==d&&((i=r.getNode(f))===null||i===void 0?void 0:i.data.maxRank)<o.data.rank;)h++,f=c[h];f===d&&(v=!1)}if(!v){for(;h<c.length-1&&((a=r.getNode(c[h+1]))===null||a===void 0?void 0:a.data.minRank)<=o.data.rank;)h++;f=c[h]}r.hasNode(f)&&r.setParent(s,f),s=r.getSuccessors(s)[0].id}})},D5=(r,n)=>{const e={},t=(i,a)=>{let s=0,o=0;const l=i.length,u=a==null?void 0:a[(a==null?void 0:a.length)-1];return a==null||a.forEach((c,d)=>{var h;const f=Vhe(r,c),v=f?r.getNode(f.id).data.order:l;(f||c===u)&&((h=a.slice(o,d+1))===null||h===void 0||h.forEach(g=>{var m;(m=r.getPredecessors(g))===null||m===void 0||m.forEach(y=>{var w;const T=r.getNode(y.id),G=T.data.order;(G<s||v<G)&&!(T.data.dummy&&(!((w=r.getNode(g))===null||w===void 0)&&w.data.dummy))&&B5(e,y.id,g)})}),o=d+1,s=v)}),a};return n!=null&&n.length&&n.reduce(t),e},F5=(r,n)=>{const e={};function t(o,l,u,c,d){var h,f;let v;for(let g=l;g<u;g++)v=o[g],!((h=r.getNode(v))===null||h===void 0)&&h.data.dummy&&((f=r.getPredecessors(v))===null||f===void 0||f.forEach(m=>{const y=r.getNode(m.id);y.data.dummy&&(y.data.order<c||y.data.order>d)&&B5(e,m.id,v)}))}function i(o){return JSON.stringify(o.slice(1))}function a(o,l){const u=i(o);l.get(u)||(t(...o),l.set(u,!0))}const s=(o,l)=>{let u=-1,c,d=0;const h=new Map;return l==null||l.forEach((f,v)=>{var g;if(((g=r.getNode(f))===null||g===void 0?void 0:g.data.dummy)==="border"){const m=r.getPredecessors(f)||[];m.length&&(c=r.getNode(m[0].id).data.order,a([l,d,v,u,c],h),d=v,u=c)}a([l,d,l.length,c,o.length],h)}),l};return n!=null&&n.length&&n.reduce(s),e},Vhe=(r,n)=>{var e,t;if(!((e=r.getNode(n))===null||e===void 0)&&e.data.dummy)return(t=r.getPredecessors(n))===null||t===void 0?void 0:t.find(i=>r.getNode(i.id).data.dummy)},B5=(r,n,e)=>{let t=n,i=e;if(t>i){const s=t;t=i,i=s}let a=r[t];a||(r[t]=a={}),a[i]=!0},Uhe=(r,n,e)=>{let t=n,i=e;if(t>i){const a=n;t=i,i=a}return!!r[t]},$5=(r,n,e,t)=>{const i={},a={},s={};return n==null||n.forEach(o=>{o==null||o.forEach((l,u)=>{i[l]=l,a[l]=l,s[l]=u})}),n==null||n.forEach(o=>{let l=-1;o==null||o.forEach(u=>{let c=t(u).map(d=>d.id);if(c.length){c=c.sort((h,f)=>s[h]-s[f]);const d=(c.length-1)/2;for(let h=Math.floor(d),f=Math.ceil(d);h<=f;++h){const v=c[h];a[u]===u&&l<s[v]&&!Uhe(e,u,v)&&(a[v]=u,a[u]=i[u]=i[v],l=s[v])}}})}),{root:i,align:a}},G5=(r,n,e,t,i,a,s)=>{var o;const l={},u=jhe(r,n,e,i,a,s),c=s?"borderLeft":"borderRight",d=(v,g)=>{let m=u.getAllNodes(),y=m.pop();const w={};for(;y;)w[y.id]?v(y.id):(w[y.id]=!0,m.push(y),m=m.concat(g(y.id))),y=m.pop()},h=v=>{l[v]=(u.getRelatedEdges(v,"in")||[]).reduce((g,m)=>Math.max(g,(l[m.source]||0)+m.data.weight),0)},f=v=>{const g=(u.getRelatedEdges(v,"out")||[]).reduce((y,w)=>Math.min(y,(l[w.target]||0)-w.data.weight),Number.POSITIVE_INFINITY),m=r.getNode(v);g!==Number.POSITIVE_INFINITY&&m.data.borderType!==c&&(l[v]=Math.max(l[v],g))};return d(h,u.getPredecessors.bind(u)),d(f,u.getSuccessors.bind(u)),(o=Object.values(t))===null||o===void 0||o.forEach(v=>{l[v]=l[e[v]]}),l},jhe=(r,n,e,t,i,a)=>{const s=new su.k,o=Hhe(t,i,a);return n==null||n.forEach(l=>{let u;l==null||l.forEach(c=>{const d=e[c];if(s.hasNode(d)||s.addNode({id:d,data:{}}),u){const h=e[u],f=s.getRelatedEdges(h,"out").find(v=>v.target===d);f?s.updateEdgeData(f.id,Object.assign(Object.assign({},f.data),{weight:Math.max(o(r,c,u),f.data.weight||0)})):s.addEdge({id:`e${Math.random()}`,source:h,target:d,data:{weight:Math.max(o(r,c,u),0)}})}u=c})}),s},z5=(r,n)=>$M(Object.values(n),e=>{var t;let i=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;return(t=Object.keys(e))===null||t===void 0||t.forEach(s=>{const o=e[s],l=Whe(r,s)/2;i=Math.max(o+l,i),a=Math.min(o-l,a)}),i-a});function V5(r,n){const e=Object.values(n),t=Math.min(...e),i=Math.max(...e);["u","d"].forEach(a=>{["l","r"].forEach(s=>{const o=a+s,l=r[o];let u;if(l===n)return;const c=Object.values(l);u=s==="l"?t-Math.min(...c):i-Math.max(...c),u&&(r[o]={},Object.keys(l).forEach(d=>{r[o][d]=l[d]+u}))})})}const U5=(r,n)=>{const e={};return Object.keys(r.ul).forEach(t=>{if(n)e[t]=r[n.toLowerCase()][t];else{const i=Object.values(r).map(a=>a[t]);e[t]=(i[0]+i[1])/2}}),e},BRe=(r,n)=>{const{align:e,nodesep:t=0,edgesep:i=0}=n||{},a=buildLayerMatrix(r),s=Object.assign(D5(r,a),F5(r,a)),o={};let l;["u","d"].forEach(c=>{l=c==="u"?a:Object.values(a).reverse(),["l","r"].forEach(d=>{d==="r"&&(l=l.map(g=>Object.values(g).reverse()));const h=(c==="u"?r.getPredecessors:r.getSuccessors).bind(r),f=$5(r,l,s,h),v=G5(r,l,f.root,f.align,t,i,d==="r");d==="r"&&Object.keys(v).forEach(g=>{v[g]=-v[g]}),o[c+d]=v})});const u=z5(r,o);return V5(o,u),U5(o,e)},Hhe=(r,n,e)=>(t,i,a)=>{const s=t.getNode(i),o=t.getNode(a);let l=0,u=0;if(l+=s.data.width/2,s.data.hasOwnProperty("labelpos"))switch((s.data.labelpos||"").toLowerCase()){case"l":u=-s.data.width/2;break;case"r":u=s.data.width/2;break}if(u&&(l+=e?u:-u),u=0,l+=(s.data.dummy?n:r)/2,l+=(o.data.dummy?n:r)/2,l+=o.data.width/2,o.data.labelpos)switch((o.data.labelpos||"").toLowerCase()){case"l":u=o.data.width/2;break;case"r":u=-o.data.width/2;break}return u&&(l+=e?u:-u),u=0,l},Whe=(r,n)=>r.getNode(n).data.width||0,Yhe=(r,n)=>{const{ranksep:e=0}=n||{},t=ax(r);let i=0;t==null||t.forEach(a=>{const s=a.map(l=>r.getNode(l).data.height),o=Math.max(...s,0);a==null||a.forEach(l=>{r.getNode(l).data.y=i+o/2}),i+=o+e})},Zhe=(r,n)=>{const{align:e,nodesep:t=0,edgesep:i=0}=n||{},a=ax(r),s=Object.assign(D5(r,a),F5(r,a)),o={};let l=[];["u","d"].forEach(c=>{l=c==="u"?a:Object.values(a).reverse(),["l","r"].forEach(d=>{d==="r"&&(l=l.map(g=>Object.values(g).reverse()));const h=(c==="u"?r.getPredecessors:r.getSuccessors).bind(r),f=$5(r,l,s,h),v=G5(r,l,f.root,f.align,t,i,d==="r");d==="r"&&Object.keys(v).forEach(g=>v[g]=-v[g]),o[c+d]=v})});const u=z5(r,o);return u&&V5(o,u),U5(o,e)},Xhe=(r,n)=>{var e;const t=p5(r);Yhe(t,n);const i=Zhe(t,n);(e=Object.keys(i))===null||e===void 0||e.forEach(a=>{t.getNode(a).data.x=i[a]})},j5=r=>{const n={},e=t=>{var i;const a=r.getNode(t);if(!a)return 0;if(n[t])return a.data.rank;n[t]=!0;let s;return(i=r.getRelatedEdges(t,"out"))===null||i===void 0||i.forEach(o=>{const l=e(o.target),u=o.data.minlen,c=l-u;c&&(s===void 0||c<s)&&(s=c)}),s||(s=0),a.data.rank=s,s};r.getAllNodes().filter(t=>r.getRelatedEdges(t.id,"in").length===0).forEach(t=>e(t.id))},Khe=r=>{const n={};let e;const t=s=>{var o;const l=r.getNode(s);if(!l)return 0;if(n[s])return l.data.rank;n[s]=!0;let u;return(o=r.getRelatedEdges(s,"out"))===null||o===void 0||o.forEach(c=>{const d=t(c.target),h=c.data.minlen,f=d-h;f&&(u===void 0||f<u)&&(u=f)}),u||(u=0),(e===void 0||u<e)&&(e=u),l.data.rank=u,u};r.getAllNodes().filter(s=>r.getRelatedEdges(s.id,"in").length===0).forEach(s=>{s&&t(s.id)}),e===void 0&&(e=0);const i={},a=(s,o)=>{var l;const u=r.getNode(s),c=isNaN(u.data.layer)?o:u.data.layer;(u.data.rank===void 0||u.data.rank<c)&&(u.data.rank=c),!i[s]&&(i[s]=!0,(l=r.getRelatedEdges(s,"out"))===null||l===void 0||l.forEach(d=>{a(d.target,c+d.data.minlen)}))};r.getAllNodes().forEach(s=>{const o=s.data;o&&(isNaN(o.layer)?o.rank-=e:a(s.id,o.layer))})},Bg=(r,n)=>r.getNode(n.target).data.rank-r.getNode(n.source).data.rank-n.data.minlen,Jhe=r=>{const n=new su.k({tree:[]}),e=r.getAllNodes()[0],t=r.getAllNodes().length;n.addNode(e);let i,a;for(;Qhe(n,r)<t;)i=H5(n,r),a=n.hasNode(i.source)?Bg(r,i):-Bg(r,i),W5(n,r,a);return n},Qhe=(r,n)=>{const e=t=>{n.getRelatedEdges(t,"both").forEach(i=>{const a=i.source,s=t===a?i.target:a;!r.hasNode(s)&&!Bg(n,i)&&(r.addNode({id:s,data:{}}),r.addEdge({id:i.id,source:t,target:s,data:{}}),e(s))})};return r.getAllNodes().forEach(t=>e(t.id)),r.getAllNodes().length},qhe=r=>{const n=new su.k({tree:[]}),e=r.getAllNodes()[0],t=r.getAllNodes().length;n.addNode(e);let i,a;for(;efe(n,r)<t;)i=H5(n,r),a=n.hasNode(i.source)?Bg(r,i):-Bg(r,i),W5(n,r,a);return n},efe=(r,n)=>{const e=t=>{var i;(i=n.getRelatedEdges(t,"both"))===null||i===void 0||i.forEach(a=>{const s=a.source,o=t===s?a.target:s;!r.hasNode(o)&&(n.getNode(o).data.layer!==void 0||!Bg(n,a))&&(r.addNode({id:o,data:{}}),r.addEdge({id:a.id,source:t,target:o,data:{}}),e(o))})};return r.getAllNodes().forEach(t=>e(t.id)),r.getAllNodes().length},H5=(r,n)=>$M(n.getAllEdges(),e=>r.hasNode(e.source)!==r.hasNode(e.target)?Bg(n,e):1/0),W5=(r,n,e)=>{r.getAllNodes().forEach(t=>{const i=n.getNode(t.id);i.data.rank||(i.data.rank=0),i.data.rank+=e})},tfe=r=>{const n=ohe(r);j5(n);const e=Jhe(n);Z5(e),Y5(e,n);let t,i;for(;t=ife(e);)i=afe(e,n,t),sfe(e,n,t,i)},Y5=(r,n)=>{let e=w5(r,r.getAllNodes(),"post",!1);e=e.slice(0,(e==null?void 0:e.length)-1),e.forEach(t=>{nfe(r,n,t)})},nfe=(r,n,e)=>{const i=r.getNode(e).data.parent,a=r.getRelatedEdges(e,"both").find(s=>s.target===i||s.source===i);a.data.cutvalue=rfe(r,n,e)},rfe=(r,n,e)=>{const i=r.getNode(e).data.parent;let a=!0,s=n.getRelatedEdges(e,"out").find(l=>l.target===i),o=0;return s||(a=!1,s=n.getRelatedEdges(i,"out").find(l=>l.target===e)),o=s.data.weight,n.getRelatedEdges(e,"both").forEach(l=>{const u=l.source===e,c=u?l.target:l.source;if(c!==i){const d=u===a,h=l.data.weight;if(o+=d?h:-h,lfe(r,e,c)){const f=r.getRelatedEdges(e,"both").find(v=>v.source===c||v.target===c).data.cutvalue;o+=d?-f:f}}}),o},Z5=(r,n=r.getAllNodes()[0].id)=>{X5(r,{},1,n)},X5=(r,n,e,t,i)=>{var a;const s=e;let o=e;const l=r.getNode(t);return n[t]=!0,(a=r.getNeighbors(t))===null||a===void 0||a.forEach(u=>{n[u.id]||(o=X5(r,n,o,u.id,t))}),l.data.low=s,l.data.lim=o++,i?l.data.parent=i:delete l.data.parent,o},ife=r=>r.getAllEdges().find(n=>n.data.cutvalue<0),afe=(r,n,e)=>{let t=e.source,i=e.target;n.getRelatedEdges(t,"out").find(c=>c.target===i)||(t=e.target,i=e.source);const a=r.getNode(t),s=r.getNode(i);let o=a,l=!1;a.data.lim>s.data.lim&&(o=s,l=!0);const u=n.getAllEdges().filter(c=>l===K5(r.getNode(c.source),o)&&l!==K5(r.getNode(c.target),o));return $M(u,c=>Bg(n,c))},sfe=(r,n,e,t)=>{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:t.source,target:t.target,data:{}}),Z5(r),Y5(r,n),ofe(r,n)},ofe=(r,n)=>{const e=r.getAllNodes().find(i=>!i.data.parent);let t=w5(r,e,"pre",!1);t=t.slice(1),t.forEach(i=>{const a=r.getNode(i).data.parent;let s=n.getRelatedEdges(i,"out").find(l=>l.target===a),o=!1;!s&&n.hasNode(a)&&(s=n.getRelatedEdges(a,"out").find(l=>l.target===i),o=!0),n.getNode(i).data.rank=(n.hasNode(a)&&n.getNode(a).data.rank||0)+(o?s==null?void 0:s.data.minlen:-(s==null?void 0:s.data.minlen))})},lfe=(r,n,e)=>r.getRelatedEdges(n,"both").find(t=>t.source===e||t.target===e),K5=(r,n)=>n.data.low<=r.data.lim&&r.data.lim<=n.data.lim,ufe=(r,n)=>{switch(n){case"network-simplex":dfe(r);break;case"tight-tree":J5(r);break;case"longest-path":cfe(r);break;default:J5(r)}},cfe=j5,J5=r=>{Khe(r),qhe(r)},dfe=r=>{tfe(r)},hfe=(r,n)=>{const{edgeLabelSpace:e,keepNodeOrder:t,prevGraph:i,rankdir:a,ranksep:s}=n;!t&&i&&vfe(r,i);const o=xfe(r);e&&(n.ranksep=Efe(o,{rankdir:a,ranksep:s}));let l;try{l=ffe(o,n)}catch(u){if(u.message==="Not possible to find intersection inside of the rectangle"){console.error(`The following error may be caused by improper layer setting, please make sure your manual layer setting does not violate the graph's structure:
|
|
|
`,u);return}throw u}return gfe(r,o),l},ffe=(r,n)=>{const{acyclicer:e,ranker:t,rankdir:i="tb",nodeOrder:a,keepNodeOrder:s,align:o,nodesep:l=50,edgesep:u=20,ranksep:c=50}=n;Nfe(r),rhe(r,e);const{nestingRoot:d,nodeRankFactor:h}=_he(r);ufe(p5(r),t),bfe(r),uhe(r,h),yhe(r,d),lhe(r),kfe(r),wfe(r);const f=[];Ehe(r,f),zhe(r,f),dhe(r),s&&Bhe(r,a),Fhe(r,s),Ofe(r),hhe(r,i),Xhe(r,{align:o,nodesep:l,edgesep:u,ranksep:c}),Rfe(r),Pfe(r),khe(r,f),Cfe(r),fhe(r,i);const{width:v,height:g}=Sfe(r);return Tfe(r),Mfe(r),ahe(r),{width:v,height:g}},vfe=(r,n)=>{r.getAllNodes().forEach(e=>{const t=r.getNode(e.id);if(n.hasNode(e.id)){const i=n.getNode(e.id);t.data.fixorder=i.data._order,delete i.data._order}else delete t.data.fixorder})},gfe=(r,n)=>{r.getAllNodes().forEach(e=>{var t;const i=r.getNode(e.id);if(i){const a=n.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,!((t=n.getChildren(e.id))===null||t===void 0)&&t.length&&(i.data.width=a.data.width,i.data.height=a.data.height)}}),r.getAllEdges().forEach(e=>{const t=r.getEdge(e.id),i=n.getEdge(e.id);t.data.points=i?i.data.points:[],i&&i.data.hasOwnProperty("x")&&(t.data.x=i.data.x,t.data.y=i.data.y)})},_fe=["width","height","layer","fixorder"],mfe={width:0,height:0},pfe=["minlen","weight","width","height","labeloffset"],yfe={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},UM=["labelpos"],xfe=r=>{const n=new su.k({tree:[]});return r.getAllNodes().forEach(e=>{const t=q5(r.getNode(e.id).data),i=Object.assign(Object.assign({},mfe),t),a=Q5(i,_fe);n.hasNode(e.id)||n.addNode({id:e.id,data:Object.assign({},a)});const s=r.hasTreeStructure("combo")?r.getParent(e.id,"combo"):r.getParent(e.id);(0,xe.Z)(s)||(n.hasNode(s.id)||n.addNode(Object.assign({},s)),n.setParent(e.id,s.id))}),r.getAllEdges().forEach(e=>{const t=q5(r.getEdge(e.id).data),i={};UM==null||UM.forEach(a=>{t[a]!==void 0&&(i[a]=t[a])}),n.addEdge({id:e.id,source:e.source,target:e.target,data:Object.assign({},yfe,Q5(t,pfe),i)})}),n},Efe=(r,n)=>{const{ranksep:e=0,rankdir:t}=n;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"&&(t==="TB"||t==="BT"?i.data.width+=i.data.labeloffset:i.data.height+=i.data.labeloffset)}),e/2},bfe=r=>{r.getAllEdges().forEach(n=>{if(n.data.width&&n.data.height){const e=r.getNode(n.source),t=r.getNode(n.target),i={e:n,rank:(t.data.rank-e.data.rank)/2+e.data.rank};jp(r,"edge-proxy",i,"_ep")}})},kfe=r=>{let n=0;return r.getAllNodes().forEach(e=>{var t,i;e.data.borderTop&&(e.data.minRank=(t=r.getNode(e.data.borderTop))===null||t===void 0?void 0:t.data.rank,e.data.maxRank=(i=r.getNode(e.data.borderBottom))===null||i===void 0?void 0:i.data.rank,n=Math.max(n,e.data.maxRank||-1/0))}),n},wfe=r=>{r.getAllNodes().forEach(n=>{n.data.dummy==="edge-proxy"&&(r.getEdge(n.data.e.id).data.labelRank=n.data.rank,r.removeNode(n.id))})},Sfe=(r,n)=>{let e,t=0,i,a=0;const{marginx:s=0,marginy:o=0}=n||{},l=u=>{if(!u.data)return;const c=u.data.x,d=u.data.y,h=u.data.width,f=u.data.height;!isNaN(c)&&!isNaN(h)&&(e===void 0&&(e=c-h/2),e=Math.min(e,c-h/2),t=Math.max(t,c+h/2)),!isNaN(d)&&!isNaN(f)&&(i===void 0&&(i=d-f/2),i=Math.min(i,d-f/2),a=Math.max(a,d+f/2))};return r.getAllNodes().forEach(u=>{l(u)}),r.getAllEdges().forEach(u=>{u!=null&&u.data.hasOwnProperty("x")&&l(u)}),e-=s,i-=o,r.getAllNodes().forEach(u=>{u.data.x-=e,u.data.y-=i}),r.getAllEdges().forEach(u=>{var c;(c=u.data.points)===null||c===void 0||c.forEach(d=>{d.x-=e,d.y-=i}),u.data.hasOwnProperty("x")&&(u.data.x-=e),u.data.hasOwnProperty("y")&&(u.data.y-=i)}),{width:t-e+s,height:a-i+o}},Tfe=r=>{r.getAllEdges().forEach(n=>{const e=r.getNode(n.source),t=r.getNode(n.target);let i,a;n.data.points?(i=n.data.points[0],a=n.data.points[n.data.points.length-1]):(n.data.points=[],i={x:t.data.x,y:t.data.y},a={x:e.data.x,y:e.data.y}),n.data.points.unshift(x5(e.data,i)),n.data.points.push(x5(t.data,a))})},Cfe=r=>{r.getAllEdges().forEach(n=>{if(n.data.hasOwnProperty("x"))switch((n.data.labelpos==="l"||n.data.labelpos==="r")&&(n.data.width-=n.data.labeloffset),n.data.labelpos){case"l":n.data.x-=n.data.width/2+n.data.labeloffset;break;case"r":n.data.x+=n.data.width/2+n.data.labeloffset;break}})},Mfe=r=>{r.getAllEdges().forEach(n=>{var e;n.data.reversed&&((e=n.data.points)===null||e===void 0||e.reverse())})},Pfe=r=>{r.getAllNodes().forEach(n=>{var e,t,i;if(!((e=r.getChildren(n.id))===null||e===void 0)&&e.length){const a=r.getNode(n.id),s=r.getNode(a.data.borderTop),o=r.getNode(a.data.borderBottom),l=r.getNode(a.data.borderLeft[((t=a.data.borderLeft)===null||t===void 0?void 0:t.length)-1]),u=r.getNode(a.data.borderRight[((i=a.data.borderRight)===null||i===void 0?void 0:i.length)-1]);a.data.width=Math.abs((u==null?void 0:u.data.x)-(l==null?void 0:l.data.x))||10,a.data.height=Math.abs((o==null?void 0:o.data.y)-(s==null?void 0:s.data.y))||10,a.data.x=((l==null?void 0:l.data.x)||0)+a.data.width/2,a.data.y=((s==null?void 0:s.data.y)||0)+a.data.height/2}}),r.getAllNodes().forEach(n=>{n.data.dummy==="border"&&r.removeNode(n.id)})},Nfe=r=>{r.getAllEdges().forEach(n=>{if(n.source===n.target){const e=r.getNode(n.source);e.data.selfEdges||(e.data.selfEdges=[]),e.data.selfEdges.push(n),r.removeEdge(n.id)}})},Ofe=r=>{const n=ax(r);n==null||n.forEach(e=>{let t=0;e==null||e.forEach((i,a)=>{var s;const o=r.getNode(i);o.data.order=a+t,(s=o.data.selfEdges)===null||s===void 0||s.forEach(l=>{jp(r,"selfedge",{width:l.data.width,height:l.data.height,rank:o.data.rank,order:a+ ++t,e:l},"_se")}),delete o.data.selfEdges})})},Rfe=r=>{r.getAllNodes().forEach(n=>{const e=r.getNode(n.id);if(e.data.dummy==="selfedge"){const t=r.getNode(e.data.e.source),i=t.data.x+t.data.width/2,a=t.data.y,s=e.data.x-i,o=t.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(n.id),e.data.e.data.points=[{x:i+2*s/3,y:a-o},{x:i+5*s/6,y:a-o},{y:a,x:i+s},{x:i+5*s/6,y:a+o},{x:i+2*s/3,y:a+o}],e.data.e.data.x=e.data.x,e.data.e.data.y=e.data.y}})},Q5=(r,n)=>{const e={};return n==null||n.forEach(t=>{r[t]!==void 0&&(e[t]=+r[t])}),e},q5=(r={})=>{const n={};return Object.keys(r).forEach(e=>{n[e.toLowerCase()]=r[e]}),n};function $g(r,n){let e;return(0,Be.Z)(n)?e=n:(0,pe.Z)(n)?e=()=>n:e=()=>r,e}function eB(r,n,e=!0){return!n&&n!==0?t=>{const{size:i}=t.data||{};return i?Array.isArray(i)?i[0]>i[1]?i[0]:i[1]:(0,Gs.Z)(i)?i.width>i.height?i.width:i.height:i:r}:(0,Be.Z)(n)?n:(0,pe.Z)(n)?()=>n:Array.isArray(n)?()=>{if(e){const t=Math.max(...n);return isNaN(t)?r:t}return n}:(0,Gs.Z)(n)?()=>{if(e){const t=Math.max(n.width,n.height);return isNaN(t)?r:t}return[n.width,n.height]}:()=>r}const tB=(r,n)=>{let e,t;return(0,pe.Z)(n)?t=()=>n:(0,Be.Z)(n)?t=n:t=()=>0,r?Array.isArray(r)?e=i=>(r[0]>r[1]?r[0]:r[1])+t(i):(0,Be.Z)(r)?e=r:e=i=>r+t(i):e=i=>{var a,s;if(!((a=i.data)===null||a===void 0)&&a.bboxSize)return Math.max(i.data.bboxSize[0],i.data.bboxSize[1])+t(i);if(!((s=i.data)===null||s===void 0)&&s.size){if(Array.isArray(i.data.size))return Math.max(i.data.size[0],i.data.size[1])+t(i);const o=i.data.size;return(0,Gs.Z)(o)?(o.width>o.height?o.width:o.height)+t(i):o+t(i)}return 10+t(i)},e},jM=r=>{if(r===null)return r;if(r instanceof Date)return new Date(r.getTime());if(r instanceof Array){const n=[];return r.forEach(e=>{n.push(e)}),n.map(e=>jM(e))}if(typeof r=="object"){const n={};return Object.keys(r).forEach(e=>{n[e]=jM(r[e])}),n}return r},Cd=(r,n)=>{const e=jM(r);return e.data=e.data||{},n&&((0,pe.Z)(e.data.x)||(e.data.x=Math.random()*n[0]),(0,pe.Z)(e.data.y)||(e.data.y=Math.random()*n[1])),e},Afe={rankdir:"TB",nodesep:50,ranksep:50,edgeLabelSpace:!0,ranker:"tight-tree",controlPoints:!1,radial:!1,focusNode:null};class Lfe{constructor(n={}){this.options=n,this.id="antv-dagre",this.options=Object.assign(Object.assign({},Afe),n)}execute(n,e){return ia(this,void 0,void 0,function*(){return this.genericDagreLayout(!1,n,e)})}assign(n,e){return ia(this,void 0,void 0,function*(){yield this.genericDagreLayout(!0,n,e)})}genericDagreLayout(n,e,t){return ia(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),t),{nodeSize:a,align:s,rankdir:o="TB",ranksep:l,nodesep:u,ranksepFunc:c,nodesepFunc:d,edgeLabelSpace:h,ranker:f,nodeOrder:v,begin:g,controlPoints:m,radial:y,sortByCombo:w,preset:T}=i,G=new su.k({tree:[]}),x=$g(l||50,c),_=$g(u||50,d);let p=_,b=x;(o==="LR"||o==="RL")&&(p=x,b=_);const R=tB(a,void 0),B=e.getAllNodes(),j=e.getAllEdges();B.forEach(ee=>{const he=R(ee),ut=b(ee),ct=p(ee),Lt=he+2*ct,vn=he+2*ut,tn=ee.data.layer;(0,pe.Z)(tn)?G.addNode({id:ee.id,data:{width:Lt,height:vn,layer:tn}}):G.addNode({id:ee.id,data:{width:Lt,height:vn}})}),w&&(G.attachTreeStructure("combo"),B.forEach(ee=>{const{parentId:he}=ee.data;he!==void 0&&G.hasNode(he)&&G.setParent(ee.id,he,"combo")})),j.forEach(ee=>{G.addEdge({id:ee.id,source:ee.source,target:ee.target,data:{weight:ee.data.weight||1}})});let Z;T!=null&&T.length&&(Z=new su.k({nodes:T})),hfe(G,{prevGraph:Z,edgeLabelSpace:h,keepNodeOrder:!!v,nodeOrder:v||[],acyclicer:"greedy",ranker:f,rankdir:o,nodesep:u,align:s});const te=[0,0];if(g){let ee=1/0,he=1/0;G.getAllNodes().forEach(ut=>{ee>ut.data.x&&(ee=ut.data.x),he>ut.data.y&&(he=ut.data.y)}),G.getAllEdges().forEach(ut=>{var ct;(ct=ut.data.points)===null||ct===void 0||ct.forEach(Lt=>{ee>Lt.x&&(ee=Lt.x),he>Lt.y&&(he=Lt.y)})}),te[0]=g[0]-ee,te[1]=g[1]-he}const le=o==="LR"||o==="RL";if(!y){const ee=new Set,ut=o==="BT"||o==="RL"?(tn,rn)=>rn-tn:(tn,rn)=>tn-rn;G.getAllNodes().forEach(tn=>{tn.data.x=tn.data.x+te[0],tn.data.y=tn.data.y+te[1],ee.add(le?tn.data.x:tn.data.y)});const ct=Array.from(ee).sort(ut),Lt=le?(tn,rn)=>tn.x!==rn.x:(tn,rn)=>tn.y!==rn.y,vn=le?(tn,rn,mn)=>{const ar=Math.max(rn.y,mn.y),gi=Math.min(rn.y,mn.y);return tn.filter(kr=>kr.y<=ar&&kr.y>=gi)}:(tn,rn,mn)=>{const ar=Math.max(rn.x,mn.x),gi=Math.min(rn.x,mn.x);return tn.filter(kr=>kr.x<=ar&&kr.x>=gi)};G.getAllEdges().forEach((tn,rn)=>{var mn;h&&m&&tn.data.type!=="loop"&&(tn.data.controlPoints=Ife((mn=tn.data.points)===null||mn===void 0?void 0:mn.map(({x:ar,y:gi})=>({x:ar+te[0],y:gi+te[1]})),G.getNode(tn.source),G.getNode(tn.target),ct,le,Lt,vn))})}let ue=[];ue=G.getAllNodes().map(ee=>Cd(ee));const se=G.getAllEdges();return n&&(ue.forEach(ee=>{e.mergeNodeData(ee.id,{x:ee.data.x,y:ee.data.y})}),se.forEach(ee=>{e.mergeEdgeData(ee.id,{controlPoints:ee.data.controlPoints})})),{nodes:ue,edges:se}})}}const Ife=(r,n,e,t,i,a,s)=>{let o=(r==null?void 0:r.slice(1,r.length-1))||[];if(n&&e){let{x:l,y:u}=n.data,{x:c,y:d}=e.data;if(i&&(l=n.data.y,u=n.data.x,c=e.data.y,d=e.data.x),d!==u&&l!==c){const h=t.indexOf(u),f=t[h+1];if(f){const m=o[0],y=i?{x:(u+f)/2,y:(m==null?void 0:m.y)||c}:{x:(m==null?void 0:m.x)||c,y:(u+f)/2};(!m||a(m,y))&&o.unshift(y)}const v=t.indexOf(d),g=Math.abs(v-h);if(g===1)o=s(o,n.data,e.data),o.length||o.push(i?{x:(u+d)/2,y:l}:{x:l,y:(u+d)/2});else if(g>1){const m=t[v-1];if(m){const y=o[o.length-1],w=i?{x:(d+m)/2,y:(y==null?void 0:y.y)||c}:{x:(y==null?void 0:y.x)||l,y:(d+m)/2};(!y||a(y,w))&&o.push(w)}}}}return o},am=(r,n,e)=>{const t=r.getAllNodes(),i=r.getAllEdges();if(!(t!=null&&t.length))return{nodes:[],edges:i};if(t.length===1)return n&&r.mergeNodeData(t[0].id,{x:e[0],y:e[1]}),{nodes:[Object.assign(Object.assign({},t[0]),{data:Object.assign(Object.assign({},t[0].data),{x:e[0],y:e[1]})})],edges:i}},Dfe={radius:null,startRadius:null,endRadius:null,startAngle:0,endAngle:2*Math.PI,clockwise:!0,divisions:1,ordering:null,angleRatio:1};class Ffe{constructor(n={}){this.options=n,this.id="circular",this.options=Object.assign(Object.assign({},Dfe),n)}execute(n,e){return ia(this,void 0,void 0,function*(){return this.genericCircularLayout(!1,n,e)})}assign(n,e){return ia(this,void 0,void 0,function*(){yield this.genericCircularLayout(!0,n,e)})}genericCircularLayout(n,e,t){return ia(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),t),{width:a,height:s,center:o,divisions:l,startAngle:u=0,endAngle:c=2*Math.PI,angleRatio:d,ordering:h,clockwise:f,nodeSpacing:v,nodeSize:g}=i,m=e.getAllNodes(),y=e.getAllEdges(),[w,T,G]=$fe(a,s,o),x=m==null?void 0:m.length;if(!x||x===1)return am(e,n,G);const _=(c-u)/x;let{radius:p,startRadius:b,endRadius:R}=i;if(v){const le=$g(10,v),ue=eB(10,g);let se=-1/0;m.forEach(ee=>{const he=ue(ee);se<he&&(se=he)});let V=0;m.forEach((ee,he)=>{he===0?V+=se||10:V+=(le(ee)||0)+(se||10)}),p=V/(2*Math.PI)}else!p&&!b&&!R?p=Math.min(T,w)/2:!b&&R?b=R:b&&!R&&(R=b);const B=_*d;let j=[];h==="topology"?j=nB(e,m):h==="topology-directed"?j=nB(e,m,!0):h==="degree"?j=Bfe(e,m):j=m.map(le=>Cd(le));const Z=Math.ceil(x/l);for(let le=0;le<x;++le){let ue=p;!ue&&b!==null&&R!==null&&(ue=b+le*(R-b)/(x-1)),ue||(ue=10+le*100/(x-1));let se=u+le%Z*B+2*Math.PI/l*Math.floor(le/Z);f||(se=c-le%Z*B-2*Math.PI/l*Math.floor(le/Z)),j[le].data.x=G[0]+Math.cos(se)*ue,j[le].data.y=G[1]+Math.sin(se)*ue}return n&&j.forEach(le=>{e.mergeNodeData(le.id,{x:le.data.x,y:le.data.y})}),{nodes:j,edges:y}})}}const nB=(r,n,e=!1)=>{const t=[Cd(n[0])],i={},a=n.length;i[n[0].id]=!0;let s=0;return n.forEach((o,l)=>{if(l!==0)if((l===a-1||r.getDegree(o.id,"both")!==r.getDegree(n[l+1].id,"both")||r.areNeighbors(t[s].id,o.id))&&!i[o.id])t.push(Cd(o)),i[o.id]=!0,s++;else{const u=e?r.getSuccessors(t[s].id):r.getNeighbors(t[s].id);let c=!1;for(let h=0;h<u.length;h++){const f=u[h];if(r.getDegree(f.id)===r.getDegree(o.id)&&!i[f.id]){t.push(Cd(f)),i[f.id]=!0,c=!0;break}}let d=0;for(;!c&&(i[n[d].id]||(t.push(Cd(n[d])),i[n[d].id]=!0,c=!0),d++,d!==a););}}),t};function Bfe(r,n){const e=[];return n.forEach((t,i)=>{e.push(Cd(t))}),e.sort((t,i)=>r.getDegree(t.id,"both")-r.getDegree(i.id,"both")),e}const $fe=(r,n,e)=>{let t=r,i=n,a=e;return!t&&typeof window!="undefined"&&(t=window.innerWidth),!i&&typeof window!="undefined"&&(i=window.innerHeight),a||(a=[t/2,i/2]),[t,i,a]},mc=Array.isArray,Gfe={nodeSize:30,nodeSpacing:10,preventOverlap:!1,sweep:void 0,equidistant:!1,startAngle:3/2*Math.PI,clockwise:!0,maxLevelDiff:void 0,sortBy:"degree"};class HM{constructor(n={}){this.options=n,this.id="concentric",this.options=Object.assign(Object.assign({},Gfe),n)}execute(n,e){return ia(this,void 0,void 0,function*(){return this.genericConcentricLayout(!1,n,e)})}assign(n,e){return ia(this,void 0,void 0,function*(){yield this.genericConcentricLayout(!0,n,e)})}genericConcentricLayout(n,e,t){return ia(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),t),{center:a,width:s,height:o,sortBy:l,maxLevelDiff:u,sweep:c,clockwise:d,equidistant:h,preventOverlap:f,startAngle:v=3/2*Math.PI,nodeSize:g,nodeSpacing:m}=i,y=e.getAllNodes(),w=e.getAllEdges(),T=!s&&typeof window!="undefined"?window.innerWidth:s,G=!o&&typeof window!="undefined"?window.innerHeight:o,x=a||[T/2,G/2];if(!(y!=null&&y.length)||y.length===1)return am(e,n,x);const _=[];let p,b=0;mc(g)?p=Math.max(g[0],g[1]):(0,Be.Z)(g)?(p=-1/0,y.forEach(ee=>{const he=g(ee);he>p&&(p=he)})):p=g,mc(m)?b=Math.max(m[0],m[1]):(0,pe.Z)(m)&&(b=m),y.forEach(ee=>{const he=Cd(ee);_.push(he);let ut=p;const{data:ct}=he;mc(ct.size)?ut=Math.max(ct.size[0],ct.size[1]):(0,pe.Z)(ct.size)?ut=ct.size:(0,Gs.Z)(ct.size)&&(ut=Math.max(ct.size.width,ct.size.height)),p=Math.max(p,ut),(0,Be.Z)(m)&&(b=Math.max(m(ee),b))});const R={};_.forEach((ee,he)=>{R[ee.id]=he});let B=l;(!(0,Ze.Z)(B)||_[0].data[B]===void 0)&&(B="degree"),B==="degree"?_.sort((ee,he)=>e.getDegree(he.id,"both")-e.getDegree(ee.id,"both")):_.sort((ee,he)=>he.data[B]-ee.data[B]);const j=_[0],Z=(u||(B==="degree"?e.getDegree(j.id,"both"):j.data[B]))/4,te=[{nodes:[]}];let le=te[0];_.forEach(ee=>{if(le.nodes.length>0){const he=Math.abs(B==="degree"?e.getDegree(le.nodes[0].id,"both")-e.getDegree(ee.id,"both"):le.nodes[0].data[B]-ee.data[B]);Z&&he>=Z&&(le={nodes:[]},te.push(le))}le.nodes.push(ee)});let ue=p+b;if(!f){const ee=te.length>0&&te[0].nodes.length>1,ut=(Math.min(T,G)/2-ue)/(te.length+(ee?1:0));ue=Math.min(ue,ut)}let se=0;if(te.forEach(ee=>{const he=c===void 0?2*Math.PI-2*Math.PI/ee.nodes.length:c;if(ee.dTheta=he/Math.max(1,ee.nodes.length-1),ee.nodes.length>1&&f){const ut=Math.cos(ee.dTheta)-Math.cos(0),ct=Math.sin(ee.dTheta)-Math.sin(0),Lt=Math.sqrt(ue*ue/(ut*ut+ct*ct));se=Math.max(Lt,se)}ee.r=se,se+=ue}),h){let ee=0,he=0;for(let ut=0;ut<te.length;ut++){const Lt=(te[ut].r||0)-he;ee=Math.max(ee,Lt)}he=0,te.forEach((ut,ct)=>{ct===0&&(he=ut.r||0),ut.r=he,he+=ee})}return te.forEach(ee=>{const he=ee.dTheta||0,ut=ee.r||0;ee.nodes.forEach((ct,Lt)=>{const vn=v+(d?1:-1)*he*Lt;ct.data.x=x[0]+ut*Math.cos(vn),ct.data.y=x[1]+ut*Math.sin(vn)})}),n&&_.forEach(ee=>e.mergeNodeData(ee.id,{x:ee.data.x,y:ee.data.y})),{nodes:_,edges:w}})}}var zfe=k(46632),Vfe=k(67217);const Ufe=.81,WM=.1;function jfe(r,n,e,t,i=2){const a=n/e,s=r.getAllNodes(),o=s.map((c,d)=>{const{nodeStrength:h,x:f,y:v,z:g,size:m}=c.data;return{x:f,y:v,z:g,size:m,index:d,id:c.id,vx:0,vy:0,vz:0,weight:a*h}}),l=(i===2?(0,zfe.Z)(o,c=>c.x,c=>c.y):(0,Vfe.Z)(o,c=>c.x,c=>c.y,c=>c.z)).visitAfter(Hfe),u=new Map;return o.forEach(c=>{u.set(c.id,c),Yfe(c,l,i)}),o.map((c,d)=>{const{id:h,data:f}=s[d],{mass:v=1}=f;t[h]={x:c.vx/v,y:c.vy/v,z:c.vz/v}}),t}function Hfe(r){let n=0,e=0,t=0,i=0,a=0;const s=r.length;if(s){for(let o=0;o<s;o++){const l=r[o];l&&l.weight&&(n+=l.weight,e+=l.x*l.weight,t+=l.y*l.weight,i+=l.z*l.weight,a+=l.size*l.weight)}r.x=e/n,r.y=t/n,r.z=i/n,r.size=a/n,r.weight=n}else{const o=r;r.x=o.data.x,r.y=o.data.y,r.z=o.data.z,r.size=o.data.size,r.weight=o.data.weight}}const Wfe=(r,n,e,t,i,a,s)=>{var o;if(((o=r.data)===null||o===void 0?void 0:o.id)===a.id)return;const l=[e,t,i][s-1],u=a.x-r.x||WM,c=a.y-r.y||WM,d=a.z-r.z||WM,h=[u,c,d],f=l-n;let v=0;for(let y=0;y<s;y++)v+=h[y]*h[y];const m=Math.sqrt(v)*v;if(f*f*Ufe<v){const y=r.weight/m;return a.vx+=u*y,a.vy+=c*y,a.vz+=d*y,!0}if(r.length)return!1;if(r.data!==a){const y=r.data.weight/m;a.vx+=u*y,a.vy+=c*y,a.vz+=d*y}};function Yfe(r,n,e){n.visit((t,i,a,s,o)=>Wfe(t,i,a,s,o,r,e))}const Zfe={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 rB{constructor(n={}){this.options=n,this.id="force",this.timeInterval=0,this.judgingDistance=0,this.running=!1,this.options=Object.assign(Object.assign({},Zfe),n)}execute(n,e){return ia(this,void 0,void 0,function*(){return this.genericForceLayout(!1,n,e)})}assign(n,e){return ia(this,void 0,void 0,function*(){yield this.genericForceLayout(!0,n,e)})}stop(){this.timeInterval&&typeof window!="undefined"&&window.clearInterval(this.timeInterval),this.running=!1}tick(n=this.options.maxIteration||1){if(this.lastResult)return this.lastResult;for(let t=0;(this.judgingDistance>this.lastOptions.minMovement||t<1)&&t<n;t++)this.runOneStep(this.lastCalcGraph,this.lastGraph,t,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(t=>this.lastGraph.mergeNodeData(t.id,{x:t.data.x,y:t.data.y,z:this.options.dimensions===3?t.data.z:void 0})),e}genericForceLayout(n,e,t){return ia(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),t),a=e.getAllNodes(),s=e.getAllEdges(),o=this.formatOptions(i,e),{dimensions:l,width:u,height:c,nodeSize:d,getMass:h,nodeStrength:f,edgeStrength:v,linkDistance:g}=o,m=a.map((b,R)=>Object.assign(Object.assign({},b),{data:Object.assign(Object.assign({},b.data),{x:(0,pe.Z)(b.data.x)?b.data.x:Math.random()*u,y:(0,pe.Z)(b.data.y)?b.data.y:Math.random()*c,z:(0,pe.Z)(b.data.z)?b.data.z:Math.random()*Math.sqrt(u*c),size:d(b)||30,mass:h(b),nodeStrength:f(b)})})),y=s.map(b=>Object.assign(Object.assign({},b),{data:Object.assign(Object.assign({},b.data),{edgeStrength:v(b),linkDistance:g(b,e.getNode(b.source),e.getNode(b.target))})}));if(!(a!=null&&a.length))return this.lastResult={nodes:[],edges:s},{nodes:[],edges:s};const w={};a.forEach((b,R)=>{w[b.id]={x:0,y:0,z:0}});const T=new su.k({nodes:m,edges:y});this.formatCentripetal(o,T);const{maxIteration:G,minMovement:x,onTick:_}=o;if(this.lastLayoutNodes=m,this.lastLayoutEdges=y,this.lastAssign=n,this.lastGraph=e,this.lastCalcGraph=T,this.lastOptions=o,this.lastVelMap=w,typeof window=="undefined")return;let p=0;return new Promise(b=>{this.timeInterval=window.setInterval(()=>{(!a||!this.running)&&b({nodes:YM(e,m),edges:s}),this.runOneStep(T,e,p,w,o),this.updatePosition(e,T,w,o),n&&m.forEach(R=>e.mergeNodeData(R.id,{x:R.data.x,y:R.data.y,z:l===3?R.data.z:void 0})),_==null||_({nodes:YM(e,m),edges:s}),p++,(p>=G||this.judgingDistance<x)&&(window.clearInterval(this.timeInterval),b({nodes:YM(e,m),edges:s}))},0),this.running=!0})})}formatOptions(n,e){const t=Object.assign({},n),{width:i,height:a,getMass:s,nodeSize:o}=n;t.width=!i&&typeof window!="undefined"?window.innerWidth:i,t.height=!a&&typeof window!="undefined"?window.innerHeight:a,n.center||(t.center=[t.width/2,t.height/2]),s||(t.getMass=d=>{let h=1;(0,pe.Z)(d==null?void 0:d.data.mass)&&(h=d==null?void 0:d.data.mass);const f=e.getDegree(d.id,"both");return!f||f<5?h:f*5*h});const l=$g(0,n.nodeSpacing);let u;o?(0,Be.Z)(o)?u=d=>o(d)+l(d):mc(o)?u=d=>{const h=o;return Math.max(h[0],h[1])+l(d)}:u=d=>o+l(d):u=d=>{const{size:h}=(d==null?void 0:d.data)||{};return h?mc(h)?Math.max(h[0],h[1])+l(d):(0,Gs.Z)(h)?Math.max(h.width,h.height)+l(d):h+l(d):10+l(d)},t.nodeSize=u;const c=n.linkDistance?$g(1,n.linkDistance):d=>1+t.nodeSize(e.getNode(d.source))+t.nodeSize(e.getNode(d.target));return t.linkDistance=c,t.nodeStrength=$g(1,n.nodeStrength),t.edgeStrength=$g(1,n.edgeStrength),t}formatCentripetal(n,e){const{dimensions:t,centripetalOptions:i,center:a,clusterNodeStrength:s,leafCluster:o,clustering:l,nodeClusterBy:u}=n,c=e.getAllNodes(),d=i||{leaf:2,single:2,others:1,center:y=>({x:a[0],y:a[1],z:t===3?a[2]:void 0})};typeof s!="function"&&(n.clusterNodeStrength=y=>s);let h,f;if(o&&u&&(h=iB(e,u),f=Array.from(new Set(c==null?void 0:c.map(y=>y.data[u])))||[],n.centripetalOptions=Object.assign(d,{single:100,leaf:y=>{const{siblingLeaves:w,sameTypeLeaves:T}=h[y.id]||{};return(T==null?void 0:T.length)===(w==null?void 0:w.length)||(f==null?void 0:f.length)===1?1:n.clusterNodeStrength(y)},others:1,center:y=>{const w=e.getDegree(y.id,"both");if(!w)return{x:100,y:100,z:0};let T;if(w===1){const{sameTypeLeaves:G=[]}=h[y.id]||{};G.length===1?T=void 0:G.length>1&&(T=aB(G))}else T=void 0;return{x:T==null?void 0:T.x,y:T==null?void 0:T.y,z:T==null?void 0:T.z}}})),l&&u){h||(h=iB(e,u)),f||(f=Array.from(new Set(c.map(w=>w.data[u])))),f=f.filter(w=>w!==void 0);const y={};f.forEach(w=>{const T=c.filter(G=>G.data[u]===w).map(G=>e.getNode(G.id));y[w]=aB(T)}),n.centripetalOptions=Object.assign(d,{single:w=>n.clusterNodeStrength(w),leaf:w=>n.clusterNodeStrength(w),others:w=>n.clusterNodeStrength(w),center:w=>{const T=y[w.data[u]];return{x:T==null?void 0:T.x,y:T==null?void 0:T.y,z:T==null?void 0:T.z}}})}const{leaf:v,single:g,others:m}=n.centripetalOptions||{};v&&typeof v!="function"&&(n.centripetalOptions.leaf=()=>v),g&&typeof g!="function"&&(n.centripetalOptions.single=()=>g),m&&typeof m!="function"&&(n.centripetalOptions.others=()=>m)}runOneStep(n,e,t,i,a){const s={},o=n.getAllNodes(),l=n.getAllEdges();if(!(o!=null&&o.length))return;const{monitor:u}=a;if(this.calRepulsive(n,s,a),l&&this.calAttractive(n,s,a),this.calGravity(n,e,s,a),this.updateVelocity(n,s,i,a),u){const c=this.calTotalEnergy(s,o);u({energy:c,nodes:e.getAllNodes(),edges:e.getAllEdges(),iterations:t})}}calTotalEnergy(n,e){if(!(e!=null&&e.length))return 0;let t=0;return e.forEach((i,a)=>{const s=n[i.id].x,o=n[i.id].y,l=this.options.dimensions===3?n[i.id].z:0,u=s*s+o*o+l*l,{mass:c=1}=i.data;t+=c*u*.5}),t}calRepulsive(n,e,t){const{dimensions:i,factor:a,coulombDisScale:s}=t;jfe(n,a,s*s,e,i)}calAttractive(n,e,t){const{dimensions:i,nodeSize:a}=t;n.getAllEdges().forEach((s,o)=>{const{source:l,target:u}=s,c=n.getNode(l),d=n.getNode(u);if(!c||!d)return;let h=d.data.x-c.data.x,f=d.data.y-c.data.y,v=i===3?d.data.z-c.data.z:0;!h&&!f&&(h=Math.random()*.01,f=Math.random()*.01,i===3&&!v&&(v=Math.random()*.01));const g=Math.sqrt(h*h+f*f+v*v);if(g<a(c)+a(d))return;const m=h/g,y=f/g,w=v/g,{linkDistance:T=200,edgeStrength:G=200}=s.data||{},_=(T-g)*G,p=c.data.mass||1,b=d.data.mass||1,R=1/p,B=1/b,j=m*_,Z=y*_,te=w*_;e[l].x-=j*R,e[l].y-=Z*R,e[l].z-=te*R,e[u].x+=j*B,e[u].y+=Z*B,e[u].z+=te*B})}calGravity(n,e,t,i){const{getCenter:a}=i,s=n.getAllNodes(),o=e.getAllNodes(),l=e.getAllEdges(),{width:u,height:c,center:d,gravity:h,centripetalOptions:f}=i;s&&s.forEach(v=>{const{id:g,data:m}=v,{mass:y,x:w,y:T,z:G}=m,x=e.getNode(g);let _=0,p=0,b=0,R=h;const B=n.getDegree(g,"in"),j=n.getDegree(g,"out"),Z=n.getDegree(g,"both"),te=a==null?void 0:a(x,Z);if(te){const[le,ue,se]=te;_=w-le,p=T-ue,R=se}else _=w-d[0],p=T-d[1],b=G-d[2];if(R&&(t[g].x-=R*_/y,t[g].y-=R*p/y,t[g].z-=R*b/y),f){const{leaf:le,single:ue,others:se,center:V}=f,{x:ee,y:he,z:ut,centerStrength:ct}=(V==null?void 0:V(x,o,l,u,c))||{x:0,y:0,z:0,centerStrength:0};if(!(0,pe.Z)(ee)||!(0,pe.Z)(he))return;const Lt=(w-ee)/y,vn=(T-he)/y,tn=(G-ut)/y;if(ct&&(t[g].x-=ct*Lt,t[g].y-=ct*vn,t[g].z-=ct*tn),Z===0){const mn=ue(x);if(!mn)return;t[g].x-=mn*Lt,t[g].y-=mn*vn,t[g].z-=mn*tn;return}if(B===0||j===0){const mn=le(x,o,l);if(!mn)return;t[g].x-=mn*Lt,t[g].y-=mn*vn,t[g].z-=mn*tn;return}const rn=se(x);if(!rn)return;t[g].x-=rn*Lt,t[g].y-=rn*vn,t[g].z-=rn*tn}})}updateVelocity(n,e,t,i){const{damping:a,maxSpeed:s,interval:o,dimensions:l}=i,u=n.getAllNodes();u!=null&&u.length&&u.forEach(c=>{const{id:d}=c;let h=(t[d].x+e[d].x*o)*a||.01,f=(t[d].y+e[d].y*o)*a||.01,v=l===3?(t[d].z+e[d].z*o)*a||.01:0;const g=Math.sqrt(h*h+f*f+v*v);if(g>s){const m=s/g;h=m*h,f=m*f,v=m*v}t[d]={x:h,y:f,z:v}})}updatePosition(n,e,t,i){const{distanceThresholdMode:a,interval:s,dimensions:o}=i,l=e.getAllNodes();if(!(l!=null&&l.length)){this.judgingDistance=0;return}let u=0;a==="max"?this.judgingDistance=-1/0:a==="min"&&(this.judgingDistance=1/0),l.forEach(c=>{const{id:d}=c,h=n.getNode(d);if((0,pe.Z)(h.data.fx)&&(0,pe.Z)(h.data.fy)){e.mergeNodeData(d,{x:h.data.fx,y:h.data.fy,z:o===3?h.data.fz:void 0});return}const f=t[d].x*s,v=t[d].y*s,g=o===3?t[d].z*s:0;e.mergeNodeData(d,{x:c.data.x+f,y:c.data.y+v,z:c.data.z+g});const m=Math.sqrt(f*f+v*v+g*g);switch(a){case"max":this.judgingDistance<m&&(this.judgingDistance=m);break;case"min":this.judgingDistance>m&&(this.judgingDistance=m);break;default:u=u+m;break}}),(!a||a==="mean")&&(this.judgingDistance=u/l.length)}}const iB=(r,n)=>{const e=r.getAllNodes();if(!(e!=null&&e.length))return{};const t={};return e.forEach((i,a)=>{r.getDegree(i.id,"both")===1&&(t[i.id]=Xfe(r,"leaf",i,n))}),t},Xfe=(r,n,e,t)=>{const i=r.getDegree(e.id,"in"),a=r.getDegree(e.id,"out");let s=e,o=[];i===0?(s=r.getSuccessors(e.id)[0],o=r.getNeighbors(s.id)):a===0&&(s=r.getPredecessors(e.id)[0],o=r.getNeighbors(s.id)),o=o.filter(u=>r.getDegree(u.id,"in")===0||r.getDegree(u.id,"out")===0);const l=Kfe(r,n,t,e,o);return{coreNode:s,siblingLeaves:o,sameTypeLeaves:l}},Kfe=(r,n,e,t,i)=>{const a=t.data[e]||"";let s=(i==null?void 0:i.filter(o=>o.data[e]===a))||[];return n==="leaf"&&(s=s.filter(o=>r.getDegree(o.id,"in")===0||r.getDegree(o.id,"out")===0)),s},aB=r=>{const n={x:0,y:0};r.forEach(t=>{const{x:i,y:a}=t.data;n.x+=i||0,n.y+=a||0});const e=r.length||1;return{x:n.x/e,y:n.y/e}},YM=(r,n)=>n.map(e=>{const{id:t,data:i}=e,a=r.getNode(t);return Object.assign(Object.assign({},a),{data:Object.assign(Object.assign({},a.data),{x:i.x,y:i.y,z:i.z})})});var fv=k(92770);const sB=r=>{const n=[],e=r.length;for(let t=0;t<e;t+=1){n[t]=[];for(let i=0;i<e;i+=1)t===i?n[t][i]=0:r[t][i]===0||!r[t][i]?n[t][i]=1/0:n[t][i]=r[t][i]}for(let t=0;t<e;t+=1)for(let i=0;i<e;i+=1)for(let a=0;a<e;a+=1)n[i][a]>n[i][t]+n[t][a]&&(n[i][a]=n[i][t]+n[t][a]);return n},oB=(r,n)=>{const{nodes:e,edges:t}=r,i=[],a={};if(!e)throw new Error("invalid nodes data!");return e&&e.forEach((s,o)=>{a[s.id]=o;const l=[];i.push(l)}),t==null||t.forEach(s=>{const{source:o,target:l}=s,u=a[o],c=a[l];u===void 0||c===void 0||(i[u][c]=1,n||(i[c][u]=1))}),i},Jfe=(r,n)=>{const e=[];return r.forEach(t=>{const i=[];t.forEach(a=>{i.push(a*n)}),e.push(i)}),e},Qfe=r=>{let n=1/0,e=1/0,t=-1/0,i=-1/0;return r.forEach(a=>{let s=a.data.size;mc(s)?s.length===1&&(s=[s[0],s[0]]):(0,pe.Z)(s)?s=[s,s]:(s===void 0||isNaN(s))&&(s=[30,30]);const o=[s[0]/2,s[1]/2],l=a.data.x-o[0],u=a.data.x+o[0],c=a.data.y-o[1],d=a.data.y+o[1];n>l&&(n=l),e>c&&(e=c),t<u&&(t=u),i<d&&(i=d)}),{minX:n,minY:e,maxX:t,maxY:i}},lB=(r,n)=>Math.sqrt((r.x-n.x)*(r.x-n.x)+(r.y-n.y)*(r.y-n.y)),ZM=(r,n,e,t="TB",i,a={})=>{if(!(n!=null&&n.length))return;const{stopBranchFn:s,stopAllFn:o}=a;for(let l=0;l<n.length;l++){const u=n[l];if(r.hasNode(u.id)&&!(s!=null&&s(u))){if(o!=null&&o(u))return;t==="TB"&&e(u),ZM(r,r.getChildren(u.id,i),e,t,i,a),t!=="TB"&&e(u)}}},qfe={center:[0,0],linkDistance:50};class uB{constructor(n={}){this.options=n,this.id="mds",this.options=Object.assign(Object.assign({},qfe),n)}execute(n,e){return ia(this,void 0,void 0,function*(){return this.genericMDSLayout(!1,n,e)})}assign(n,e){return ia(this,void 0,void 0,function*(){yield this.genericMDSLayout(!0,n,e)})}genericMDSLayout(n,e,t){return ia(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),t),{center:a=[0,0],linkDistance:s=50}=i,o=e.getAllNodes(),l=e.getAllEdges();if(!(o!=null&&o.length)||o.length===1)return am(e,n,a);const u=oB({nodes:o,edges:l},!1),c=sB(u);eve(c);const d=Jfe(c,s),h=tve(d),f=[];return h.forEach((g,m)=>{const y=Cd(o[m]);y.data.x=g[0]+a[0],y.data.y=g[1]+a[1],f.push(y)}),n&&f.forEach(g=>e.mergeNodeData(g.id,{x:g.data.x,y:g.data.y})),{nodes:f,edges:l}})}}const eve=r=>{let n=-999999;r.forEach(e=>{e.forEach(t=>{t!==1/0&&n<t&&(n=t)})}),r.forEach((e,t)=>{e.forEach((i,a)=>{i===1/0&&(r[t][a]=n)})})},tve=r=>{const e=fv.y3.mul(fv.y3.pow(r,2),-.5),t=e.mean("row"),i=e.mean("column"),a=e.mean();e.add(a).subRowVector(t).subColumnVector(i);const s=new fv.Sc(e),o=fv.y3.sqrt(s.diagonalMatrix).diagonal();return s.leftSingularVectors.toJSON().map(l=>fv.y3.mul([l],[o]).toJSON()[0].splice(0,2))};function XM(r){return!!r.tick&&!!r.stop}const nve={gForce:!0,force2:!0,d3force:!0,fruchterman:!0,forceAtlas2:!0,force:!0,"graphin-force":!0},rve={center:[0,0],comboPadding:10,treeKey:"combo"};class ive{constructor(n={}){this.options=n,this.id="comboCombined",this.options=Object.assign(Object.assign({},rve),n)}execute(n,e){return ia(this,void 0,void 0,function*(){return this.genericComboCombinedLayout(!1,n,e)})}assign(n,e){return ia(this,void 0,void 0,function*(){yield this.genericComboCombinedLayout(!0,n,e)})}genericComboCombinedLayout(n,e,t){return ia(this,void 0,void 0,function*(){const i=this.initVals(Object.assign(Object.assign({},this.options),t)),{center:a,treeKey:s,outerLayout:o}=i,l=e.getAllNodes().filter(b=>!b.data._isCombo),u=e.getAllNodes().filter(b=>b.data._isCombo),c=e.getAllEdges(),d=l==null?void 0:l.length;if(!d||d===1)return am(e,n,a);const h=[],f=new Map;l.forEach(b=>{f.set(b.id,b)});const v=new Map;u.forEach(b=>{v.set(b.id,b)});const g=new Map,m=this.getInnerGraphs(e,s,f,v,c,i,g);yield Promise.all(m);const y=new Map,w=[],T=new Map;let G=!0;e.getRoots(s).forEach(b=>{const R=g.get(b.id),B=v.get(b.id)||f.get(b.id),j={id:b.id,data:Object.assign(Object.assign({},b.data),{x:R.data.x||B.data.x,y:R.data.y||B.data.y,fx:R.data.fx||B.data.fx,fy:R.data.fy||B.data.fy,mass:R.data.mass||B.data.mass,size:R.data.size})};w.push(j),y.set(b.id,!0),!isNaN(j.data.x)&&j.data.x!==0&&!isNaN(j.data.y)&&j.data.y!==0?G=!1:(j.data.x=Math.random()*100,j.data.y=Math.random()*100),ZM(e,[b],Z=>{Z.id!==b.id&&T.set(Z.id,b.id)},"TB",s)});const x=[];c.forEach(b=>{const R=T.get(b.source)||b.source,B=T.get(b.target)||b.target;R!==B&&y.has(R)&&y.has(B)&&x.push({id:b.id,source:R,target:B,data:{}})});let _;if(w!=null&&w.length){if(w.length===1)w[0].data.x=a[0],w[0].data.y=a[1];else{const b=new su.k({nodes:w,edges:x}),R=o||new rB;G&&nve[R.id]&&(yield(w.length<100?new uB:new HM).assign(b));const B=Object.assign({center:a,kg:5,preventOverlap:!0,animate:!1},R.id==="force"?{gravity:1,factor:4,linkDistance:(j,Z,te)=>{const le=Math.max(...Z.data.size)||32,ue=Math.max(...te.data.size)||32;return le/2+ue/2+200}}:{});_=yield cB(R,b,B)}g.forEach(b=>{var R;const B=_.nodes.find(te=>te.id===b.id);if(B){const{x:te,y:le}=B.data;b.data.visited=!0,b.data.x=te,b.data.y=le,h.push({id:b.id,data:{x:te,y:le}})}const{x:j,y:Z}=b.data;(R=b.data.nodes)===null||R===void 0||R.forEach(te=>{h.push({id:te.id,data:{x:te.data.x+j,y:te.data.y+Z}})})}),g.forEach(({data:b})=>{const{x:R,y:B,visited:j,nodes:Z}=b;Z==null||Z.forEach(te=>{if(!j){const le=h.find(ue=>ue.id===te.id);le.data.x+=R||0,le.data.y+=B||0}})})}return n&&h.forEach(b=>{e.mergeNodeData(b.id,{x:b.data.x,y:b.data.y})}),{nodes:h,edges:c}})}initVals(n){const e=Object.assign({},n),{nodeSize:t,spacing:i,comboPadding:a}=n;let s,o;if((0,pe.Z)(i)?o=()=>i:(0,Be.Z)(i)?o=i:o=()=>0,e.spacing=o,!t)s=u=>{const c=o(u);return u.size?mc(u.size)?((u.size[0]>u.size[1]?u.size[0]:u.size[1])+c)/2:(0,Gs.Z)(u.size)?((u.size.width>u.size.height?u.size.width:u.size.height)+c)/2:(u.size+c)/2:32+c/2};else if((0,Be.Z)(t))s=u=>{const c=t(u),d=o(u);return mc(u.size)?((u.size[0]>u.size[1]?u.size[0]:u.size[1])+d)/2:((c||32)+d)/2};else if(mc(t)){const c=(t[0]>t[1]?t[0]:t[1])/2;s=d=>c+o(d)/2}else{const u=t/2;s=c=>u+o(c)/2}e.nodeSize=s;let l;return(0,pe.Z)(a)?l=()=>a:mc(a)?l=()=>Math.max.apply(null,a):(0,Be.Z)(a)?l=a:l=()=>0,e.comboPadding=l,e}getInnerGraphs(n,e,t,i,a,s,o){const{nodeSize:l,comboPadding:u,spacing:c,innerLayout:d}=s,h=d||new HM({}),f={center:[0,0],preventOverlap:!0,nodeSpacing:c},v=[],g=m=>{let y=(u==null?void 0:u(m))||10;return mc(y)&&(y=Math.max(...y)),{size:y?[y*2,y*2]:[30,30],padding:y}};return n.getRoots(e).forEach(m=>{o.set(m.id,{id:m.id,data:{nodes:[],size:g(m).size}});let y=Promise.resolve();ZM(n,[m],w=>{var T;if(!w.data._isCombo)return;const{size:G,padding:x}=g(w);if(!(!((T=n.getChildren(w.id,e))===null||T===void 0)&&T.length))o.set(w.id,{id:w.id,data:Object.assign(Object.assign({},w.data),{size:G})});else{const _=o.get(w.id);o.set(w.id,{id:w.id,data:Object.assign({nodes:[]},_==null?void 0:_.data)});const p=new Map,b=n.getChildren(w.id,e).map(j=>{if(j.data._isCombo)return o.has(j.id)||o.set(j.id,{id:j.id,data:Object.assign({},j.data)}),p.set(j.id,!0),o.get(j.id);const Z=t.get(j.id)||i.get(j.id);return p.set(j.id,!0),{id:j.id,data:Object.assign(Object.assign({},Z.data),j.data)}}),R={nodes:b,edges:a.filter(j=>p.has(j.source)&&p.has(j.target))};let B=1/0;b.forEach(j=>{var Z;let{size:te}=j.data;te||(te=((Z=o.get(j.id))===null||Z===void 0?void 0:Z.data.size)||(l==null?void 0:l(j))||[30,30]),(0,pe.Z)(te)&&(te=[te,te]);const[le,ue]=te;B>le&&(B=le),B>ue&&(B=ue),j.data.size=te}),y=y.then(()=>ia(this,void 0,void 0,function*(){const j=new su.k(R);yield cB(h,j,f,!0);const{minX:Z,minY:te,maxX:le,maxY:ue}=Qfe(b),se={x:(le+Z)/2,y:(ue+te)/2};R.nodes.forEach(ee=>{ee.data.x-=se.x,ee.data.y-=se.y});const V=[Math.max(le-Z,B)+x*2,Math.max(ue-te,B)+x*2];o.get(w.id).data.size=V,o.get(w.id).data.nodes=b}))}return!0},"BT",e),v.push(y)}),v}}function cB(r,n,e,t){var i;return ia(this,void 0,void 0,function*(){return XM(r)?(r.execute(n,e),r.stop(),r.tick((i=e.iterations)!==null&&i!==void 0?i:300)):t?yield r.assign(n,e):yield r.execute(n,e)})}var ave=k(56561),sve=k(65475),ove=k(46846),lve=k(89281),uve=k(61217),cve=k(70341),dve=k(12688),hve=k(80616);class fve{constructor(n){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:ave.Z,manyBody:sve.Z,center:ove.Z,collide:lve.Z,radial:uve.Z,x:cve.Z,y:dve.Z},this.options={link:{id:e=>e.id},manyBody:{},center:{x:0,y:0}},this.context={options:{},assign:!1,nodes:[],edges:[]},(0,xd.Z)(this.options,n),this.options.forceSimulation&&(this.simulation=this.options.forceSimulation)}execute(n,e){return ia(this,void 0,void 0,function*(){return this.genericLayout(!1,n,e)})}assign(n,e){return ia(this,void 0,void 0,function*(){yield this.genericLayout(!0,n,e)})}stop(){this.simulation.stop()}tick(n){return this.simulation.tick(n),this.getResult()}restart(){this.simulation.restart()}setFixedPosition(n,e){const t=this.context.nodes.find(i=>i.id===n);t&&e.forEach((i,a)=>{if(typeof i=="number"||i===null){const s=["fx","fy","fz"][a];t[s]=i}})}getOptions(n){var e,t;const i=(0,xd.Z)({},this.options,n);return i.collide&&((e=i.collide)===null||e===void 0?void 0:e.radius)===void 0&&(i.collide=i.collide||{},i.collide.radius=(t=i.nodeSize)!==null&&t!==void 0?t: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(n,e,t){var i;return ia(this,void 0,void 0,function*(){const a=this.getOptions(t),s=e.getAllNodes().map(({id:c,data:d})=>Object.assign(Object.assign({id:c},d),(0,nm.Z)(d.data,this.config.inputNodeAttrs))),o=e.getAllEdges().map(c=>Object.assign({},c));Object.assign(this.context,{assign:n,nodes:s,edges:o,graph:e});const l=new Promise(c=>{this.resolver=c}),u=this.setSimulation(a);return u.nodes(s),(i=u.force("link"))===null||i===void 0||i.links(o),l})}getResult(){const{assign:n,nodes:e,edges:t,graph:i}=this.context,a=e.map(o=>({id:o.id,data:Object.assign(Object.assign({},o.data),(0,nm.Z)(o,this.config.outputNodeAttrs))})),s=t.map(({id:o,source:l,target:u,data:c})=>({id:o,source:typeof l=="object"?l.id:l,target:typeof u=="object"?u.id:u,data:c}));return n&&a.forEach(o=>i.mergeNodeData(o.id,o.data)),{nodes:a,edges:s}}initSimulation(){return(0,hve.Z)()}setSimulation(n){const e=this.simulation||this.options.forceSimulation||this.initSimulation();return this.simulation||(this.simulation=e.on("tick",()=>{var t;return(t=n.onTick)===null||t===void 0?void 0:t.call(n,this.getResult())}).on("end",()=>{var t;return(t=this.resolver)===null||t===void 0?void 0:t.call(this,this.getResult())})),dB(e,this.config.simulationAttrs.map(t=>[t,n[t]])),Object.entries(this.forceMap).forEach(([t,i])=>{const a=t;if(n[t]){let s=e.force(a);s||(s=i(),e.force(a,s)),dB(s,Object.entries(n[a]))}else e.force(a,null)}),e}}const dB=(r,n)=>n.reduce((e,[t,i])=>!e[t]||i===void 0?e:e[t].call(r,i),r);var hB=k(70681),vve=k.n(hB);function gve(r){if(!r)return[0,0,0];if((0,pe.Z)(r))return[r,r,r];if(r.length===0)return[0,0,0];const[n,e=n,t=n]=r;return[n,e,t]}class uk{constructor(n){this.id="dagre",this.options={},Object.assign(this.options,uk.defaultOptions,n)}execute(n,e){return ia(this,void 0,void 0,function*(){return this.genericDagreLayout(!1,n,Object.assign(Object.assign({},this.options),e))})}assign(n,e){return ia(this,void 0,void 0,function*(){yield this.genericDagreLayout(!0,n,Object.assign(Object.assign({},this.options),e))})}genericDagreLayout(n,e,t){return ia(this,void 0,void 0,function*(){const{nodeSize:i}=t,a=new hB.graphlib.Graph;a.setGraph(t),a.setDefaultEdgeLabel(()=>({}));const s=e.getAllNodes(),o=e.getAllEdges();[...s,...o].some(({id:u})=>(0,pe.Z)(u))&&console.error("Dagre layout only support string id, it will convert number to string."),e.getAllNodes().forEach(u=>{const{id:c}=u,d=Object.assign({},u.data);if(i!==void 0){const[h,f]=gve((0,Be.Z)(i)?i(u):i);Object.assign(d,{width:h,height:f})}a.setNode(c.toString(),d)}),e.getAllEdges().forEach(({id:u,source:c,target:d})=>{a.setEdge(c.toString(),d.toString(),{id:u})}),vve().layout(a);const l={nodes:[],edges:[]};return a.nodes().forEach(u=>{const c=a.node(u);l.nodes.push({id:u,data:c}),n&&e.mergeNodeData(u,c)}),a.edges().forEach(u=>{const c=a.edge(u),{id:d}=c,h=v5(c,["id"]),{v:f,w:v}=u;l.edges.push({id:d,source:f,target:v,data:h}),n&&e.mergeEdgeData(d,h)}),l})}}uk.defaultOptions={};class KM{constructor(n){this.id=n.id||0,this.rx=n.rx,this.ry=n.ry,this.fx=0,this.fy=0,this.mass=n.mass,this.degree=n.degree,this.g=n.g||0}distanceTo(n){const e=this.rx-n.rx,t=this.ry-n.ry;return Math.hypot(e,t)}setPos(n,e){this.rx=n,this.ry=e}resetForce(){this.fx=0,this.fy=0}addForce(n){const e=n.rx-this.rx,t=n.ry-this.ry;let i=Math.hypot(e,t);i=i<1e-4?1e-4:i;const a=this.g*(this.degree+1)*(n.degree+1)/i;this.fx+=a*e/i,this.fy+=a*t/i}in(n){return n.contains(this.rx,this.ry)}add(n){const e=this.mass+n.mass,t=(this.rx*this.mass+n.rx*n.mass)/e,i=(this.ry*this.mass+n.ry*n.mass)/e,a=this.degree+n.degree,s={rx:t,ry:i,mass:e,degree:a};return new KM(s)}}class Hp{constructor(n){this.xmid=n.xmid,this.ymid=n.ymid,this.length=n.length,this.massCenter=n.massCenter||[0,0],this.mass=n.mass||1}getLength(){return this.length}contains(n,e){const t=this.length/2;return n<=this.xmid+t&&n>=this.xmid-t&&e<=this.ymid+t&&e>=this.ymid-t}NW(){const n=this.xmid-this.length/4,e=this.ymid+this.length/4,t=this.length/2,i={xmid:n,ymid:e,length:t};return new Hp(i)}NE(){const n=this.xmid+this.length/4,e=this.ymid+this.length/4,t=this.length/2,i={xmid:n,ymid:e,length:t};return new Hp(i)}SW(){const n=this.xmid-this.length/4,e=this.ymid-this.length/4,t=this.length/2,i={xmid:n,ymid:e,length:t};return new Hp(i)}SE(){const n=this.xmid+this.length/4,e=this.ymid-this.length/4,t=this.length/2,i={xmid:n,ymid:e,length:t};return new Hp(i)}}class Wp{constructor(n){this.body=null,this.quad=null,this.NW=null,this.NE=null,this.SW=null,this.SE=null,this.theta=.5,n!=null&&(this.quad=n)}insert(n){if(this.body==null){this.body=n;return}this._isExternal()?(this.quad&&(this.NW=new Wp(this.quad.NW()),this.NE=new Wp(this.quad.NE()),this.SW=new Wp(this.quad.SW()),this.SE=new Wp(this.quad.SE())),this._putBody(this.body),this._putBody(n),this.body=this.body.add(n)):(this.body=this.body.add(n),this._putBody(n))}_putBody(n){this.quad&&(n.in(this.quad.NW())&&this.NW?this.NW.insert(n):n.in(this.quad.NE())&&this.NE?this.NE.insert(n):n.in(this.quad.SW())&&this.SW?this.SW.insert(n):n.in(this.quad.SE())&&this.SE&&this.SE.insert(n))}_isExternal(){return this.NW==null&&this.NE==null&&this.SW==null&&this.SE==null}updateForce(n){if(!(this.body==null||n===this.body))if(this._isExternal())n.addForce(this.body);else{const e=this.quad?this.quad.getLength():0,t=this.body.distanceTo(n);e/t<this.theta?n.addForce(this.body):(this.NW&&this.NW.updateForce(n),this.NE&&this.NE.updateForce(n),this.SW&&this.SW.updateForce(n),this.SE&&this.SE.updateForce(n))}}}const _ve={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 mve{constructor(n={}){this.options=n,this.id="forceAtlas2",this.options=Object.assign(Object.assign({},_ve),n)}execute(n,e){return ia(this,void 0,void 0,function*(){return this.genericForceAtlas2Layout(!1,n,e)})}assign(n,e){return ia(this,void 0,void 0,function*(){yield this.genericForceAtlas2Layout(!0,n,e)})}genericForceAtlas2Layout(n,e,t){return ia(this,void 0,void 0,function*(){const i=e.getAllEdges(),a=e.getAllNodes(),s=this.formatOptions(t,a.length),{width:o,height:l,prune:u,maxIteration:c,nodeSize:d,center:h}=s;if(!(a!=null&&a.length)||a.length===1)return am(e,n,h);const f=a.map(y=>Cd(y,[o,l])),v=i.filter(y=>{const{source:w,target:T}=y;return w!==T}),g=new su.k({nodes:f,edges:v}),m=this.getSizes(g,e,d);if(this.run(g,e,c,m,n,s),u){for(let w=0;w<v.length;w+=1){const{source:T,target:G}=v[w],x=g.getDegree(T),_=g.getDegree(T);if(x<=1){const p=g.getNode(G);g.mergeNodeData(T,{x:p.data.x,y:p.data.y})}else if(_<=1){const p=g.getNode(T);g.mergeNodeData(G,{x:p.data.x,y:p.data.y})}}const y=Object.assign(Object.assign({},s),{prune:!1,barnesHut:!1});this.run(g,e,100,m,n,y)}return{nodes:f,edges:i}})}getSizes(n,e,t){const i=n.getAllNodes(),a={};for(let s=0;s<i.length;s+=1){const{id:o,data:l}=i[s];if(a[o]=10,(0,pe.Z)(l.size))a[o]=l.size;else if(mc(l.size))isNaN(l.size[0])||(a[o]=Math.max(l.size[0])),isNaN(l.size[1])||(a[o]=Math.max(l.size[1]));else if((0,Gs.Z)(l.size))a[o]=Math.max(l.size.width,l.size.height);else if((0,Be.Z)(t)){const u=e.getNode(o),c=t(u);mc(c)?a[o]=Math.max(...c):a[o]=c}else mc(t)?a[o]=Math.max(...t):(0,pe.Z)(t)&&(a[o]=t)}return a}formatOptions(n={},e){const t=Object.assign(Object.assign({},this.options),n),{center:i,width:a,height:s,barnesHut:o,prune:l,maxIteration:u,kr:c,kg:d}=t;return t.width=!a&&typeof window!="undefined"?window.innerWidth:a,t.height=!s&&typeof window!="undefined"?window.innerHeight:s,t.center=i||[t.width/2,t.height/2],o===void 0&&e>250&&(t.barnesHut=!0),l===void 0&&e>100&&(t.prune=!0),u===0&&!l?(t.maxIteration=250,e<=200&&e>100?t.maxIteration=1e3:e>200&&(t.maxIteration=1200)):u===0&&l&&(t.maxIteration=100,e<=200&&e>100?t.maxIteration=500:e>200&&(t.maxIteration=950)),c||(t.kr=50,e>100&&e<=500?t.kr=20:e>500&&(t.kr=1)),d||(t.kg=20,e>100&&e<=500?t.kg=10:e>500&&(t.kg=1)),t}run(n,e,t,i,a,s){const{kr:o,barnesHut:l,onTick:u}=s,c=n.getAllNodes();let d=0,h=t;const f={},v={},g={};for(let m=0;m<c.length;m+=1){const{data:y,id:w}=c[m];if(f[w]=[0,0],l){const T={id:m,rx:y.x,ry:y.y,mass:1,g:o,degree:n.getDegree(w)};g[w]=new KM(T)}}for(;h>0;)d=this.oneStep(n,{iter:h,preventOverlapIters:50,krPrime:100,sg:d,forces:f,preForces:v,bodies:g,sizes:i},s),h--,u==null||u({nodes:c,edges:e.getAllEdges()});return n}oneStep(n,e,t){const{iter:i,preventOverlapIters:a,krPrime:s,sg:o,preForces:l,bodies:u,sizes:c}=e;let{forces:d}=e;const{preventOverlap:h,barnesHut:f}=t,v=n.getAllNodes();for(let g=0;g<v.length;g+=1){const{id:m}=v[g];l[m]=[...d[m]],d[m]=[0,0]}return d=this.getAttrForces(n,i,a,c,d,t),f&&(h&&i>a||!h)?d=this.getOptRepGraForces(n,d,u,t):d=this.getRepGraForces(n,i,a,d,s,c,t),this.updatePos(n,d,l,o,t)}getAttrForces(n,e,t,i,a,s){const{preventOverlap:o,dissuadeHubs:l,mode:u,prune:c}=s,d=n.getAllEdges();for(let h=0;h<d.length;h+=1){const{source:f,target:v}=d[h],g=n.getNode(f),m=n.getNode(v),y=n.getDegree(f),w=n.getDegree(v);if(c&&(y<=1||w<=1))continue;const T=[m.data.x-g.data.x,m.data.y-g.data.y];let G=Math.hypot(T[0],T[1]);G=G<1e-4?1e-4:G,T[0]=T[0]/G,T[1]=T[1]/G,o&&e<t&&(G=G-i[f]-i[v]);let x=G,_=x;u==="linlog"&&(x=Math.log(1+G),_=x),l&&(x=G/y,_=G/w),o&&e<t&&G<=0?(x=0,_=0):o&&e<t&&G>0&&(x=G,_=G),a[f][0]+=x*T[0],a[v][0]-=_*T[0],a[f][1]+=x*T[1],a[v][1]-=_*T[1]}return a}getOptRepGraForces(n,e,t,i){const{kg:a,center:s,prune:o}=i,l=n.getAllNodes(),u=l.length;let c=9e10,d=-9e10,h=9e10,f=-9e10;for(let w=0;w<u;w+=1){const{id:T,data:G}=l[w];o&&n.getDegree(T)<=1||(t[T].setPos(G.x,G.y),G.x>=d&&(d=G.x),G.x<=c&&(c=G.x),G.y>=f&&(f=G.y),G.y<=h&&(h=G.y))}const v=Math.max(d-c,f-h),g={xmid:(d+c)/2,ymid:(f+h)/2,length:v,massCenter:s,mass:u},m=new Hp(g),y=new Wp(m);for(let w=0;w<u;w+=1){const{id:T}=l[w];o&&n.getDegree(T)<=1||t[T].in(m)&&y.insert(t[T])}for(let w=0;w<u;w+=1){const{id:T,data:G}=l[w],x=n.getDegree(T);if(o&&x<=1)continue;t[T].resetForce(),y.updateForce(t[T]),e[T][0]-=t[T].fx,e[T][1]-=t[T].fy;const _=[G.x-s[0],G.y-s[1]];let p=Math.hypot(_[0],_[1]);p=p<1e-4?1e-4:p,_[0]=_[0]/p,_[1]=_[1]/p;const b=a*(x+1);e[T][0]-=b*_[0],e[T][1]-=b*_[1]}return e}getRepGraForces(n,e,t,i,a,s,o){const{preventOverlap:l,kr:u,kg:c,center:d,prune:h}=o,f=n.getAllNodes(),v=f.length;for(let g=0;g<v;g+=1){const m=f[g],y=n.getDegree(m.id);for(let x=g+1;x<v;x+=1){const _=f[x],p=n.getDegree(_.id);if(h&&(y<=1||p<=1))continue;const b=[_.data.x-m.data.x,_.data.y-m.data.y];let R=Math.hypot(b[0],b[1]);R=R<1e-4?1e-4:R,b[0]=b[0]/R,b[1]=b[1]/R,l&&e<t&&(R=R-s[m.id]-s[_.id]);let B=u*(y+1)*(p+1)/R;l&&e<t&&R<0?B=a*(y+1)*(p+1):l&&e<t&&R===0?B=0:l&&e<t&&R>0&&(B=u*(y+1)*(p+1)/R),i[m.id][0]-=B*b[0],i[_.id][0]+=B*b[0],i[m.id][1]-=B*b[1],i[_.id][1]+=B*b[1]}const w=[m.data.x-d[0],m.data.y-d[1]],T=Math.hypot(w[0],w[1]);w[0]=w[0]/T,w[1]=w[1]/T;const G=c*(y+1);i[m.id][0]-=G*w[0],i[m.id][1]-=G*w[1]}return i}updatePos(n,e,t,i,a){const{ks:s,tao:o,prune:l,ksmax:u}=a,c=n.getAllNodes(),d=c.length,h=[],f=[];let v=0,g=0,m=i;for(let w=0;w<d;w+=1){const{id:T}=c[w],G=n.getDegree(T);if(l&&G<=1)continue;const x=[e[T][0]-t[T][0],e[T][1]-t[T][1]],_=Math.hypot(x[0],x[1]),p=[e[T][0]+t[T][0],e[T][1]+t[T][1]],b=Math.hypot(p[0],p[1]);h[w]=_,f[w]=b/2,v+=(G+1)*h[w],g+=(G+1)*f[w]}const y=m;m=o*g/v,y!==0&&(m=m>1.5*y?1.5*y:m);for(let w=0;w<d;w+=1){const{id:T,data:G}=c[w],x=n.getDegree(T);if(l&&x<=1||(0,pe.Z)(G.fx)&&(0,pe.Z)(G.fy))continue;let _=s*m/(1+m*Math.sqrt(h[w])),p=Math.hypot(e[T][0],e[T][1]);p=p<1e-4?1e-4:p;const b=u/p;_=_>b?b:_;const R=_*e[T][0],B=_*e[T][1];n.mergeNodeData(T,{x:G.x+R,y:G.y+B})}return m}}const pve={maxIteration:1e3,gravity:10,speed:5,clustering:!1,clusterGravity:10,width:300,height:300,nodeClusterBy:"cluster"},yve=800;class xve{constructor(n={}){this.options=n,this.id="fruchterman",this.timeInterval=0,this.running=!1,this.options=Object.assign(Object.assign({},pve),n)}execute(n,e){return ia(this,void 0,void 0,function*(){return this.genericFruchtermanLayout(!1,n,e)})}assign(n,e){return ia(this,void 0,void 0,function*(){yield this.genericFruchtermanLayout(!0,n,e)})}stop(){this.timeInterval&&typeof window!="undefined"&&window.clearInterval(this.timeInterval),this.running=!1}tick(n=this.options.maxIteration||1){if(this.lastResult)return this.lastResult;for(let t=0;t<n;t++)this.runOneStep(this.lastGraph,this.lastClusterMap,this.lastOptions);const e={nodes:this.lastLayoutNodes,edges:this.lastLayoutEdges};return this.lastAssign&&e.nodes.forEach(t=>this.lastGraph.mergeNodeData(t.id,{x:t.data.x,y:t.data.y,z:this.options.dimensions===3?t.data.z:void 0})),e}genericFruchtermanLayout(n,e,t){return ia(this,void 0,void 0,function*(){if(this.running)return;const i=this.formatOptions(t),{dimensions:a,width:s,height:o,center:l,clustering:u,nodeClusterBy:c,maxIteration:d,onTick:h}=i,f=e.getAllNodes(),v=e.getAllEdges();if(!(f!=null&&f.length)){const T={nodes:[],edges:v};return this.lastResult=T,T}if(f.length===1){n&&e.mergeNodeData(f[0].id,{x:l[0],y:l[1],z:a===3?l[2]:void 0});const T={nodes:[Object.assign(Object.assign({},f[0]),{data:Object.assign(Object.assign({},f[0].data),{x:l[0],y:l[1],z:a===3?l[2]:void 0})})],edges:v};return this.lastResult=T,T}const g=f.map(T=>Cd(T,[s,o])),m=new su.k({nodes:g,edges:v}),y={};if(u&&g.forEach(T=>{const G=T.data[c];y[G]||(y[G]={name:G,cx:0,cy:0,count:0})}),this.lastLayoutNodes=g,this.lastLayoutEdges=v,this.lastAssign=n,this.lastGraph=m,this.lastOptions=i,this.lastClusterMap=y,typeof window=="undefined")return;let w=0;return new Promise(T=>{this.timeInterval=window.setInterval(()=>{if(!this.running){T({nodes:g,edges:v});return}this.runOneStep(m,y,i),n&&g.forEach(({id:G,data:x})=>e.mergeNodeData(G,{x:x.x,y:x.y,z:a===3?x.z:void 0})),h==null||h({nodes:g,edges:v}),w++,w>=d&&(window.clearInterval(this.timeInterval),T({nodes:g,edges:v}))},0),this.running=!0})})}formatOptions(n={}){const e=Object.assign(Object.assign({},this.options),n),{clustering:t,nodeClusterBy:i}=e,{center:a,width:s,height:o}=e;return e.width=!s&&typeof window!="undefined"?window.innerWidth:s,e.height=!o&&typeof window!="undefined"?window.innerHeight:o,e.center=a||[e.width/2,e.height/2],e.clustering=t&&!!i,e}runOneStep(n,e,t){const{dimensions:i,height:a,width:s,gravity:o,center:l,speed:u,clustering:c,nodeClusterBy:d,clusterGravity:h}=t,f=a*s,v=Math.sqrt(f)/10,g=n.getAllNodes(),m=f/(g.length+1),y=Math.sqrt(m),w={};if(this.applyCalculate(n,w,y,m),c){for(const G in e)e[G].cx=0,e[G].cy=0,e[G].count=0;g.forEach(G=>{const{data:x}=G,_=e[x[d]];(0,pe.Z)(x.x)&&(_.cx+=x.x),(0,pe.Z)(x.y)&&(_.cy+=x.y),_.count++});for(const G in e)e[G].cx/=e[G].count,e[G].cy/=e[G].count;const T=h||o;g.forEach((G,x)=>{const{id:_,data:p}=G;if(!(0,pe.Z)(p.x)||!(0,pe.Z)(p.y))return;const b=e[p[d]],R=Math.sqrt((p.x-b.cx)*(p.x-b.cx)+(p.y-b.cy)*(p.y-b.cy)),B=y*T;w[_].x-=B*(p.x-b.cx)/R,w[_].y-=B*(p.y-b.cy)/R})}g.forEach((T,G)=>{const{id:x,data:_}=T;if(!(0,pe.Z)(_.x)||!(0,pe.Z)(_.y))return;const p=.01*y*o;w[x].x-=p*(_.x-l[0]),w[x].y-=p*(_.y-l[1]),i===3&&(w[x].z-=p*(_.z-l[2]))}),g.forEach((T,G)=>{const{id:x,data:_}=T;if((0,pe.Z)(_.fx)&&(0,pe.Z)(_.fy)){_.x=_.fx,_.y=_.fy,i===3&&(_.z=_.fz);return}if(!(0,pe.Z)(_.x)||!(0,pe.Z)(_.y))return;const p=Math.sqrt(w[x].x*w[x].x+w[x].y*w[x].y+(i===3?w[x].z*w[x].z:0));if(p>0){const b=Math.min(v*(u/yve),p);n.mergeNodeData(x,{x:_.x+w[x].x/p*b,y:_.y+w[x].y/p*b,z:i===3?_.z+w[x].z/p*b:void 0})}})}applyCalculate(n,e,t,i){this.calRepulsive(n,e,i),this.calAttractive(n,e,t)}calRepulsive(n,e,t){const i=n.getAllNodes();i.forEach(({data:a,id:s},o)=>{e[s]={x:0,y:0,z:0},i.forEach(({data:l,id:u},c)=>{if(o<=c||!(0,pe.Z)(a.x)||!(0,pe.Z)(l.x)||!(0,pe.Z)(a.y)||!(0,pe.Z)(l.y))return;let d=a.x-l.x,h=a.y-l.y,f=this.options.dimensions===3?a.z-l.z:0,v=d*d+h*h+f*f;v===0&&(v=1,d=.01,h=.01,f=.01);const g=t/v,m=d*g,y=h*g,w=f*g;e[s].x+=m,e[s].y+=y,e[u].x-=m,e[u].y-=y,this.options.dimensions===3&&(e[s].z+=w,e[u].z-=w)})})}calAttractive(n,e,t){n.getAllEdges().forEach(a=>{const{source:s,target:o}=a;if(!s||!o||s===o)return;const{data:l}=n.getNode(s),{data:u}=n.getNode(o);if(!(0,pe.Z)(u.x)||!(0,pe.Z)(l.x)||!(0,pe.Z)(u.y)||!(0,pe.Z)(l.y))return;const c=u.x-l.x,d=u.y-l.y,h=this.options.dimensions===3?u.z-l.z:0,f=Math.sqrt(c*c+d*d+h*h)/t,v=c*f,g=d*f,m=h*f;e[s].x+=v,e[s].y+=g,e[o].x-=v,e[o].y-=g,this.options.dimensions===3&&(e[s].z+=m,e[o].z-=m)})}}const Eve={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 bve{constructor(n={}){this.options=n,this.id="grid",this.options=Object.assign(Object.assign({},Eve),n)}execute(n,e){return ia(this,void 0,void 0,function*(){return this.genericGridLayout(!1,n,e)})}assign(n,e){return ia(this,void 0,void 0,function*(){yield this.genericGridLayout(!0,n,e)})}genericGridLayout(n,e,t){return ia(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),t),{begin:a=[0,0],condense:s,preventOverlapPadding:o,preventOverlap:l,rows:u,cols:c,nodeSpacing:d,nodeSize:h,width:f,height:v,position:g}=i;let{sortBy:m}=i;const y=e.getAllNodes(),w=e.getAllEdges(),T=y==null?void 0:y.length;if(!T||T===1)return am(e,n,a);const G=y.map(ue=>Cd(ue));m!=="id"&&(!(0,Ze.Z)(m)||G[0].data[m]===void 0)&&(m="degree"),m==="degree"?G.sort((ue,se)=>e.getDegree(se.id,"both")-e.getDegree(ue.id,"both")):m==="id"?G.sort((ue,se)=>(0,pe.Z)(se.id)&&(0,pe.Z)(ue.id)?se.id-ue.id:`${ue.id}`.localeCompare(`${se.id}`)):G.sort((ue,se)=>se.data[m]-ue.data[m]);const x=!f&&typeof window!="undefined"?window.innerWidth:f,_=!v&&typeof window!="undefined"?window.innerHeight:v,p=T,b={rows:u,cols:c};if(u!=null&&c!=null)b.rows=u,b.cols=c;else if(u!=null&&c==null)b.rows=u,b.cols=Math.ceil(p/b.rows);else if(u==null&&c!=null)b.cols=c,b.rows=Math.ceil(p/b.cols);else{const ue=Math.sqrt(p*_/x);b.rows=Math.round(ue),b.cols=Math.round(x/_*ue)}if(b.rows=Math.max(b.rows,1),b.cols=Math.max(b.cols,1),b.cols*b.rows>p){const ue=ck(b),se=dk(b);(ue-1)*se>=p?ck(b,ue-1):(se-1)*ue>=p&&dk(b,se-1)}else for(;b.cols*b.rows<p;){const ue=ck(b),se=dk(b);(se+1)*ue>=p?dk(b,se+1):ck(b,ue+1)}let R=s?0:x/b.cols,B=s?0:_/b.rows;if(l||d){const ue=$g(10,d),se=eB(30,h,!1);G.forEach(V=>{(!V.data.x||!V.data.y)&&(V.data.x=0,V.data.y=0);const ee=e.getNode(V.id),he=se(ee)||30;let ut,ct;mc(he)?(ut=he[0],ct=he[1]):(ut=he,ct=he);const Lt=ue!==void 0?ue(V):o,vn=ut+Lt,tn=ct+Lt;R=Math.max(R,vn),B=Math.max(B,tn)})}const j={},Z={row:0,col:0},te={};for(let ue=0;ue<G.length;ue++){const se=G[ue];let V;if(g&&(V=g(e.getNode(se.id))),V&&(V.row!==void 0||V.col!==void 0)){const ee={row:V.row,col:V.col};if(ee.col===void 0)for(ee.col=0;JM(j,ee);)ee.col++;else if(ee.row===void 0)for(ee.row=0;JM(j,ee);)ee.row++;te[se.id]=ee,fB(j,ee)}kve(se,a,R,B,te,b,Z,j)}const le={nodes:G,edges:w};return n&&G.forEach(ue=>{e.mergeNodeData(ue.id,{x:ue.data.x,y:ue.data.y})}),le})}}const ck=(r,n)=>{let e;const t=r.rows||5,i=r.cols||5;return n==null?e=Math.min(t,i):Math.min(t,i)===r.rows?r.rows=n:r.cols=n,e},dk=(r,n)=>{let e;const t=r.rows||5,i=r.cols||5;return n==null?e=Math.max(t,i):Math.max(t,i)===r.rows?r.rows=n:r.cols=n,e},JM=(r,n)=>r[`c-${n.row}-${n.col}`]||!1,fB=(r,n)=>r[`c-${n.row}-${n.col}`]=!0,vB=(r,n)=>{const e=r.cols||5;n.col++,n.col>=e&&(n.col=0,n.row++)},kve=(r,n,e,t,i,a,s,o)=>{let l,u;const c=i[r.id];if(c)l=c.col*e+e/2+n[0],u=c.row*t+t/2+n[1];else{for(;JM(o,s);)vB(a,s);l=s.col*e+e/2+n[0],u=s.row*t+t/2+n[1],fB(o,s),vB(a,s)}r.data.x=l,r.data.y=u},wve=(r,n,e)=>{try{const t=fv.y3.mul(fv.y3.pow(n,2),-.5),i=t.mean("row"),a=t.mean("column"),s=t.mean();t.add(s).subRowVector(i).subColumnVector(a);const o=new fv.Sc(t),l=fv.y3.sqrt(o.diagonalMatrix).diagonal();return o.leftSingularVectors.toJSON().map(u=>fv.y3.mul([u],[l]).toJSON()[0].splice(0,r))}catch(t){const i=[];for(let a=0;a<n.length;a++){const s=Math.random()*e,o=Math.random()*e;i.push([s,o])}return i}},Sve=800,Tve={iterations:10,height:10,width:10,speed:100,gravity:10,k:5},Cve=(r,n)=>{const e=Object.assign(Object.assign({},Tve),n),{positions:t,iterations:i,width:a,k:s,speed:o=100,strictRadial:l,focusIdx:u,radii:c=[],nodeSizeFunc:d}=e,h=r.getAllNodes(),f=[],v=a/10;for(let g=0;g<i;g++)t.forEach((m,y)=>{f[y]={x:0,y:0}}),Mve(h,t,f,s,c,d),Pve(t,f,o,l,u,v,a,c);return t},Mve=(r,n,e,t,i,a)=>{n.forEach((s,o)=>{e[o]={x:0,y:0},n.forEach((l,u)=>{if(o===u||i[o]!==i[u])return;let c=s.x-l.x,d=s.y-l.y,h=Math.sqrt(c*c+d*d);if(h===0){h=1;const f=o>u?1:-1;c=.01*f,d=.01*f}if(h<a(r[o])/2+a(r[u])/2){const f=t*t/h;e[o].x+=c/h*f,e[o].y+=d/h*f}})})},Pve=(r,n,e,t,i,a,s,o)=>{const l=a||s/10;return t&&n.forEach((u,c)=>{const d=r[c].x-r[i].x,h=r[c].y-r[i].y,f=Math.sqrt(d*d+h*h);let v=h/f,g=-d/f;const m=Math.sqrt(u.x*u.x+u.y*u.y);let y=Math.acos((v*u.x+g*u.y)/m);y>Math.PI/2&&(y-=Math.PI/2,v*=-1,g*=-1);const w=Math.cos(y)*m;u.x=v*w,u.y=g*w}),r.forEach((u,c)=>{if(c===i)return;const d=Math.sqrt(n[c].x*n[c].x+n[c].y*n[c].y);if(d>0&&c!==i){const h=Math.min(l*(e/Sve),d);if(u.x+=n[c].x/d*h,u.y+=n[c].y/d*h,t){let f=u.x-r[i].x,v=u.y-r[i].y;const g=Math.sqrt(f*f+v*v);f=f/g*o[c],v=v/g*o[c],u.x=r[i].x+f,u.y=r[i].y+v}}}),r},Nve={maxIteration:1e3,focusNode:null,unitRadius:null,linkDistance:50,preventOverlap:!1,strictRadial:!0,maxPreventOverlapIteration:200,sortStrength:10};class Ove{constructor(n={}){this.options=n,this.id="radial",this.options=Object.assign(Object.assign({},Nve),n)}execute(n,e){return ia(this,void 0,void 0,function*(){return this.genericRadialLayout(!1,n,e)})}assign(n,e){return ia(this,void 0,void 0,function*(){yield this.genericRadialLayout(!0,n,e)})}genericRadialLayout(n,e,t){return ia(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),t),{width:a,height:s,center:o,focusNode:l,unitRadius:u,nodeSize:c,nodeSpacing:d,strictRadial:h,preventOverlap:f,maxPreventOverlapIteration:v,sortBy:g,linkDistance:m=50,sortStrength:y=10,maxIteration:w=1e3}=i,T=e.getAllNodes(),G=e.getAllEdges(),x=!a&&typeof window!="undefined"?window.innerWidth:a,_=!s&&typeof window!="undefined"?window.innerHeight:s,p=o||[x/2,_/2];if(!(T!=null&&T.length)||T.length===1)return am(e,n,p);let b=T[0];if((0,Ze.Z)(l)){for(let ar=0;ar<T.length;ar++)if(T[ar].id===l){b=T[ar];break}}else b=l||T[0];const R=Lve(T,b.id),B=oB({nodes:T,edges:G},!1),j=sB(B),Z=Dve(j,R);Ive(j,R,Z+1);const te=j[R];let le=x-p[0]>p[0]?p[0]:x-p[0],ue=_-p[1]>p[1]?p[1]:_-p[1];le===0&&(le=x/2),ue===0&&(ue=_/2);const se=Math.min(le,ue),V=Math.max(...te),ee=[],he=u||se/V;te.forEach((ar,gi)=>{ee[gi]=ar*he});const ut=Rve(T,j,m,ee,he,g,y),ct=Ave(ut),Lt=wve(m,ut,m);let vn=Lt.map(([ar,gi])=>({x:(isNaN(ar)?Math.random()*m:ar)-Lt[R][0],y:(isNaN(gi)?Math.random()*m:gi)-Lt[R][1]}));this.run(w,vn,ct,ut,ee,R);let tn;if(f){tn=tB(c,d);const ar={nodes:T,nodeSizeFunc:tn,positions:vn,radii:ee,height:_,width:x,strictRadial:!!h,focusIdx:R,iterations:v||200,k:vn.length/4.5};vn=Cve(e,ar)}const rn=[];return vn.forEach((ar,gi)=>{const kr=Cd(T[gi]);kr.data.x=ar.x+p[0],kr.data.y=ar.y+p[1],rn.push(kr)}),n&&rn.forEach(ar=>e.mergeNodeData(ar.id,{x:ar.data.x,y:ar.data.y})),{nodes:rn,edges:G}})}run(n,e,t,i,a,s){for(let o=0;o<=n;o++){const l=o/n;this.oneIteration(l,e,a,i,t,s)}}oneIteration(n,e,t,i,a,s){const o=1-n;e.forEach((l,u)=>{const c=lB(l,{x:0,y:0}),d=c===0?0:1/c;if(u===s)return;let h=0,f=0,v=0;e.forEach((m,y)=>{if(u===y)return;const w=lB(l,m),T=w===0?0:1/w,G=i[y][u];v+=a[u][y],h+=a[u][y]*(m.x+G*(l.x-m.x)*T),f+=a[u][y]*(m.y+G*(l.y-m.y)*T)});const g=t[u]===0?0:1/t[u];v*=o,v+=n*g*g,h*=o,h+=n*g*l.x*d,l.x=h/v,f*=o,f+=n*g*l.y*d,l.y=f/v})}}const Rve=(r,n,e,t,i,a,s)=>{if(!r)return[];const o=[];if(n){const l={};n.forEach((u,c)=>{const d=[];u.forEach((h,f)=>{var v,g;if(c===f)d.push(0);else if(t[c]===t[f])if(a==="data")d.push(h*(Math.abs(c-f)*s)/(t[c]/i));else if(a){let m,y;if(l[r[c].id])m=l[r[c].id];else{const w=(a==="id"?r[c].id:(v=r[c].data)===null||v===void 0?void 0:v[a])||0;(0,Ze.Z)(w)?m=w.charCodeAt(0):m=w,l[r[c].id]=m}if(l[r[f].id])y=l[r[f].id];else{const w=(a==="id"?r[f].id:(g=r[f].data)===null||g===void 0?void 0:g[a])||0;(0,Ze.Z)(w)?y=w.charCodeAt(0):y=w,l[r[f].id]=y}d.push(h*(Math.abs(m-y)*s)/(t[c]/i))}else d.push(h*e/(t[c]/i));else{const m=(e+i)/2;d.push(h*m)}}),o.push(d)})}return o},Ave=r=>{const n=r.length,e=r[0].length,t=[];for(let i=0;i<n;i++){const a=[];for(let s=0;s<e;s++)r[i][s]!==0?a.push(1/(r[i][s]*r[i][s])):a.push(0);t.push(a)}return t},Lve=(r,n)=>{let e=-1;return r.forEach((t,i)=>{t.id===n&&(e=i)}),Math.max(e,0)},Ive=(r,n,e)=>{const t=r.length;for(let i=0;i<t;i++)if(r[n][i]===1/0){r[n][i]=e,r[i][n]=e;for(let a=0;a<t;a++)r[i][a]!==1/0&&r[n][a]===1/0&&(r[n][a]=e+r[i][a],r[a][n]=e+r[i][a])}for(let i=0;i<t;i++)if(i!==n){for(let a=0;a<t;a++)if(r[i][a]===1/0){let s=Math.abs(r[n][i]-r[n][a]);s=s===0?1:s,r[i][a]=s}}},Dve=(r,n)=>{let e=0;for(let t=0;t<r[n].length;t++)r[n][t]!==1/0&&(e=r[n][t]>e?r[n][t]:e);return e},Fve={center:[0,0],width:300,height:300};class Bve{constructor(n={}){this.options=n,this.id="random",this.options=Object.assign(Object.assign({},Fve),n)}execute(n,e){return ia(this,void 0,void 0,function*(){return this.genericRandomLayout(!1,n,e)})}assign(n,e){return ia(this,void 0,void 0,function*(){yield this.genericRandomLayout(!0,n,e)})}genericRandomLayout(n,e,t){return ia(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),t),{center:a,width:s,height:o}=i,l=e.getAllNodes(),u=.9,c=!s&&typeof window!="undefined"?window.innerWidth:s,d=!o&&typeof window!="undefined"?window.innerHeight:o,h=a||[c/2,d/2],f=[];return l&&l.forEach(g=>{f.push({id:g.id,data:{x:(Math.random()-.5)*u*c+h[0],y:(Math.random()-.5)*u*d+h[1]}})}),n&&f.forEach(g=>e.mergeNodeData(g.id,{x:g.data.x,y:g.data.y})),{nodes:f,edges:e.getAllEdges()}})}}const $ve=["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)"],Gve=["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)"],zve=["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)"],Vve=["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)"],Uve=["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 QM=k(35278);const Yp=r=>r?parseInt(r):0;function jve(r){const n=getComputedStyle(r),e=r.clientWidth||Yp(n.width),t=r.clientHeight||Yp(n.height),i=Yp(n.paddingLeft)+Yp(n.paddingRight),a=Yp(n.paddingTop)+Yp(n.paddingBottom);return[e-i,t-a]}function gB(r){let n=640,e=480;const[t,i]=jve(r);n=t||n,e=i||e;const a=1,s=1;return[Math.max((0,pe.Z)(n)?n:a,a),Math.max((0,pe.Z)(e)?e:s,s)]}function sx(r,n=!0,e){const t=document.createElement("div");return t.setAttribute("class",`g6-${r}`),Object.assign(t.style,{position:"absolute",display:"block"}),n&&Object.assign(t.style,{inset:"0px",height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none"}),e&&Object.assign(t.style,e),t}function qM(r,n="div",e={},t="",i=document.body){const a=document.getElementById(r);a&&a.remove();const s=document.createElement(n);return s.innerHTML=t,s.id=r,Object.assign(s.style,e),i.appendChild(s),s}function Hve(r,n){const e=r.firstChild;e?r.insertBefore(n,e):r.appendChild(n)}class Fu extends dT{}var Wve=function(r,n,e,t){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(t.next(c))}catch(d){s(d)}}function l(c){try{u(t.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((t=t.apply(r,n||[])).next())})};class hk extends Fu{constructor(n,e){super(n,Object.assign({},hk.defaultOptions,e)),this.$element=sx("background"),this.context.canvas.getContainer().prepend(this.$element),this.update(e)}update(n){const e=Object.create(null,{update:{get:()=>super.update}});return Wve(this,void 0,void 0,function*(){e.update.call(this,n),Object.assign(this.$element.style,(0,QM.Z)(this.options,["key","type"]))})}destroy(){super.destroy(),this.$element.remove()}}hk.defaultOptions={transition:"background 0.5s",backgroundSize:"cover"};var Zp=k(89558),Yve=function(r,n){var e={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&n.indexOf(t)<0&&(e[t]=r[t]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(r);i<t.length;i++)n.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(e[t[i]]=r[t[i]]);return e};class fk extends Fu{constructor(n,e){super(n,(0,xd.Z)({},fk.defaultOptions,e)),this.members=new Map,this.avoidMembers=new Map,this.bubbleSetOptions={},this.drawBubbleSets=()=>{const{style:t,bubbleSetOptions:i}=this.parseOptions();(0,Ml.Z)(this.bubbleSetOptions,i)||this.init(),this.bubbleSetOptions=Object.assign({},i);const a=Object.assign(Object.assign({},t),{d:this.getPath()});this.shape?this.shape.update(a):(this.shape=new yy({style:a}),this.context.canvas.appendChild(this.shape))},this.updateBubbleSetsPath=t=>{if(!this.shape)return;const i=Ut(t.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=t=>{const{graph:i}=this.context,a=this.options.members,s=[...this.members.keys()],o=this.options.avoidMembers,l=[...this.avoidMembers.keys()];if(!t&&(0,Ml.Z)(a,s)&&(0,Ml.Z)(o,l))return this.path;const{enter:u=[],exit:c=[]}=bg(s,a,m=>m),{enter:d=[],exit:h=[]}=bg(l,o,m=>m);t&&(c.push(t),u.push(t));const f=(m,y,w)=>{m.forEach(T=>{const G=w?this.members:this.avoidMembers,x=w?"pushMember":"pushNonMember",_=w?"removeMember":"removeNonMember";if(y){let p;i.getElementType(T)==="edge"?([p]=Xve(i,T),this.bubbleSets.pushEdge(p)):([p]=Zve(i,T),this.bubbleSets[x](p)),G.set(T,p)}else{const p=G.get(T);p&&(i.getElementType(T)==="edge"?this.bubbleSets.removeEdge(p):this.bubbleSets[_](p),G.delete(T))}})};f(c,!1,!0),f(u,!0,!0),f(h,!1,!1),f(d,!0,!1);const g=this.bubbleSets.compute().sample(8).simplify(0).bSplines().simplify(0);return this.path=$I(g.points.map(Du)),this.path},this.bindEvents(),this.bubbleSets=new Zp.CF(this.options)}bindEvents(){this.context.graph.on(qn.AFTER_RENDER,this.drawBubbleSets),this.context.graph.on(qn.AFTER_ELEMENT_UPDATE,this.updateBubbleSetsPath)}init(){this.bubbleSets=new Zp.CF(this.options),this.members=new Map,this.avoidMembers=new Map}parseOptions(){const n=this.options,{type:e,key:t,members:i,avoidMembers:a}=n,s=Yve(n,["type","key","members","avoidMembers"]),o=Object.keys(s).reduce((l,u)=>(u in Zp.vC?l.bubbleSetOptions[u]=s[u]:l.style[u]=s[u],l),{style:{},bubbleSetOptions:{}});return Object.assign({type:e,key:t,members:i,avoidMembers:a},o)}addMember(n){const e=Array.isArray(n)?n:[n];e.some(t=>this.options.avoidMembers.includes(t))&&(this.options.avoidMembers=this.options.avoidMembers.filter(t=>!e.includes(t))),this.options.members=[...new Set([...this.options.members,...e])],this.drawBubbleSets()}removeMember(n){const e=Array.isArray(n)?n:[n];this.options.members=this.options.members.filter(t=>!e.includes(t)),this.drawBubbleSets()}updateMember(n){this.options.members=(0,Be.Z)(n)?n(this.options.members):n,this.drawBubbleSets()}getMember(){return this.options.members}addAvoidMember(n){const e=Array.isArray(n)?n:[n];e.some(t=>this.options.members.includes(t))&&(this.options.members=this.options.members.filter(t=>!e.includes(t))),this.options.avoidMembers=[...new Set([...this.options.avoidMembers,...e])],this.drawBubbleSets()}removeAvoidMember(n){const e=Array.isArray(n)?n:[n];this.options.avoidMembers.some(t=>e.includes(t))&&(this.options.avoidMembers=this.options.avoidMembers.filter(t=>!e.includes(t)),this.drawBubbleSets())}updateAvoidMember(n){this.options.avoidMembers=Array.isArray(n)?n:[n],this.drawBubbleSets()}getAvoidMember(){return this.options.avoidMembers}destroy(){this.context.graph.off(qn.AFTER_RENDER,this.drawBubbleSets),this.context.graph.off(qn.AFTER_ELEMENT_UPDATE,this.updateBubbleSetsPath),this.shape.destroy(),super.destroy()}}fk.defaultOptions=Object.assign({members:[],avoidMembers:[],fill:"lightblue",fillOpacity:.2,stroke:"blue",strokeOpacity:.2},Zp.vC);const Zve=(r,n)=>(Array.isArray(n)?n:[n]).map(t=>{const i=r.getElementRenderBounds(t);return new Zp.Ae(i.min[0],i.min[1],Jf(i),Qf(i))}),Xve=(r,n)=>(Array.isArray(n)?n:[n]).map(t=>{const i=r.getEdgeData(t),a=r.getElementPosition(i.source),s=r.getElementPosition(i.target);return Zp.x1.from({x1:a[0],y1:a[1],x2:s[0],y2:s[1]})});class $Re extends null{constructor(n,e){super(n,e),this.setOptions=t=>{const i={cameraType:"setType",near:"setNear",far:"setFar",fov:"setFov",aspect:"setAspect",projectionMode:"setProjectionMode",distance:"setDistance",minDistance:"setMinDistance",maxDistance:"setMaxDistance",roll:"setRoll",elevation:"setElevation",azimuth:"setAzimuth"},a=(s,o)=>{switch(s){case"projectionMode":return o==="perspective"?1:0;case"cameraType":return{orbiting:0,exploring:1,tracking:2}[o];case"aspect":return typeof o=="number"?o:this.getCanvasAspect();default:return o}};Object.entries(i).forEach(([s,o])=>{const l=t[s];if(l!==void 0){const u=a(s,l);this.context.canvas.getCamera()[o](u)}})},this.bindEvents()}update(n){this.setOptions(n),super.update(n)}bindEvents(){this.context.graph.once(GraphEvent.BEFORE_DRAW,()=>this.setOptions(this.options))}getCanvasAspect(){const[n,e]=this.context.viewport.getCanvasSize();return n/e}}function Kve(r){return`
|
|
|
<ul class="g6-contextmenu-ul">
|
|
|
${r.map(n=>`<li class="g6-contextmenu-li" value="${n.value}">${n.name}</li>`).join("")}
|
|
|
</ul>
|
|
|
`}const Jve=`
|
|
|
.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 _B=function(r,n,e,t){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(t.next(c))}catch(d){s(d)}}function l(c){try{u(t.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((t=t.apply(r,n||[])).next())})};class vk extends Fu{constructor(n,e){super(n,Object.assign({},vk.defaultOptions,e)),this.targetElement=null,this.onTriggerEvent=t=>{var i;(i=t.preventDefault)===null||i===void 0||i.call(t),this.show(t)},this.onMenuItemClick=t=>{const{onClick:i,trigger:a}=this.options;if(t.target instanceof HTMLElement&&t.target.className.includes("g6-contextmenu-li")){const s=t.target.getAttribute("value");i==null||i(s,t.target,this.targetElement),this.hide()}a!=="click"&&this.hide()},this.initElement(),this.update(e)}initElement(){this.$element=sx("contextmenu",!1,{zIndex:"99"});const{className:n}=this.options;n&&this.$element.classList.add(n),this.context.canvas.getContainer().appendChild(this.$element),qM("g6-contextmenu-css","style",{},Jve,document.head)}show(n){return _B(this,void 0,void 0,function*(){const{enable:e,offset:t}=this.options;if(typeof e=="function"&&!e(n)||!e){this.hide();return}const i=yield this.getDOMContent(n);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=`${n.client.x-a.left+t[0]}px`,this.$element.style.top=`${n.client.y-a.top+t[1]}px`,this.$element.style.display="block",this.targetElement=n.target})}hide(){this.$element.style.display="none",this.targetElement=null}update(n){this.unbindEvents(),super.update(n),this.bindEvents()}destroy(){this.unbindEvents(),super.destroy(),this.$element.remove()}getDOMContent(n){return _B(this,void 0,void 0,function*(){const{getContent:e,getItems:t}=this.options;return t?Kve(yield t(n)):yield e(n)})}bindEvents(){const{graph:n}=this.context,{trigger:e}=this.options;n.on(`canvas:${e}`,this.onTriggerEvent),n.on(`node:${e}`,this.onTriggerEvent),n.on(`edge:${e}`,this.onTriggerEvent),n.on(`combo:${e}`,this.onTriggerEvent),document.addEventListener("click",this.onMenuItemClick)}unbindEvents(){const{graph:n}=this.context,{trigger:e}=this.options;n.off(`canvas:${e}`,this.onTriggerEvent),n.off(`node:${e}`,this.onTriggerEvent),n.off(`edge:${e}`,this.onTriggerEvent),n.off(`combo:${e}`,this.onTriggerEvent),document.removeEventListener("click",this.onMenuItemClick)}}vk.defaultOptions={trigger:"contextmenu",offset:[4,4],loadingContent:'<div class="g6-contextmenu-loading">Loading...</div>',getContent:()=>"It is a empty context menu.",enable:()=>!0};class gk extends Fu{constructor(n,e){super(n,Object.assign({},gk.defaultOptions,e)),this.edgeBundles={},this.edgePoints={},this.onBundle=()=>{const{model:t,element:i}=this.context,a=t.getEdgeData();this.divideEdges(this.options.divisions);const{cycles:s,iterRate:o,divRate:l}=this.options;let{lambda:u,divisions:c,iterations:d}=this.options;for(let h=0;h<s;h++){for(let f=0;f<d;f++){const v={};a.forEach(g=>{var m;if(g.source===g.target)return;const y=Ut(g);v[y]=this.getEdgeForces(g,c,u);for(let w=0;w<c+1;w++)(m=this.edgePoints)[y]||(m[y]=[]),this.edgePoints[y][w]=Ji(this.edgePoints[y][w],v[y][w])})}u/=2,c*=l,d*=o,this.divideEdges(c)}a.forEach(h=>{const f=Ut(h),v=i.getElement(f);v==null||v.update({d:MM(this.edgePoints[f])})})},this.bindEvents()}get nodeMap(){const n=this.context.model.getNodeData();return Object.fromEntries(n.map(e=>[Ut(e),P_(Iu(e))]))}divideEdges(n){this.context.model.getEdgeData().forEach(t=>{var i;const a=Ut(t);(i=this.edgePoints)[a]||(i[a]=[]);const s=this.nodeMap[t.source],o=this.nodeMap[t.target];if(n===1)this.edgePoints[a].push(s),this.edgePoints[a].push(Yh(Ji(s,o),2)),this.edgePoints[a].push(o);else{const u=(this.edgePoints[a].length===0?js(s,o):nge(this.edgePoints[a]))/(n+1);let c=u;const d=[s];for(let h=1;h<this.edgePoints[a].length;h++){const f=this.edgePoints[a][h-1],v=this.edgePoints[a][h];let g=js(v,f);for(;g>c;){const m=c/g,y=Ji(f,$v(Cs(v,f),m));d.push(y),g-=c,c=u}c-=g}d.push(o),this.edgePoints[a]=d}})}getVectorPosition(n){const e=this.nodeMap[n.source],t=this.nodeMap[n.target],[i,a]=Cs(t,e),s=js(e,t);return{source:e,target:t,vx:i,vy:a,length:s}}measureEdgeCompatibility(n,e){const t=this.getVectorPosition(n),i=this.getVectorPosition(e),a=Qve(t,i),s=qve(t,i),o=ege(t,i),l=tge(t,i);return a*s*o*l}getEdgeBundles(){const n={},e=this.options.bundleThreshold,t=this.context.model.getEdgeData();return t.forEach((i,a)=>{t.forEach((s,o)=>{var l,u;if(o<=a)return;this.measureEdgeCompatibility(i,s)>=e&&(n[l=Ut(i)]||(n[l]=[]),n[Ut(i)].push(s),n[u=Ut(s)]||(n[u]=[]),n[Ut(s)].push(i))})}),n}getSpringForce(n,e){const{pre:t,cur:i,next:a}=n;return $v(Cs(Ji(t,a),$v(i,2)),e)}getElectrostaticForce(n,e){(0,my.Z)(this.edgeBundles)&&(this.edgeBundles=this.getEdgeBundles());const t=this.edgeBundles[Ut(e)];let i=[0,0];return t==null||t.forEach(a=>{const s=this.edgePoints[Ut(a)][n],o=this.edgePoints[Ut(e)][n],l=Cs(s,o),u=js(s,o);i=Ji(i,$v(l,1/u))}),i}getEdgeForces(n,e,t){const i=this.nodeMap[n.source],a=this.nodeMap[n.target],s=this.options.K/(js(i,a)*(e+1)),o=[[0,0]],l=Ut(n);for(let u=1;u<e;u++){const c=this.getSpringForce({pre:this.edgePoints[l][u-1],cur:this.edgePoints[l][u],next:this.edgePoints[l][u+1]||[0,0]},s),d=this.getElectrostaticForce(u,n);o.push($v(Ji(c,d),t))}return o.push([0,0]),o}bindEvents(){const{graph:n}=this.context;n.on(qn.AFTER_RENDER,this.onBundle)}unbindEvents(){const{graph:n}=this.context;n.off(qn.AFTER_RENDER,this.onBundle)}destroy(){this.unbindEvents(),super.destroy()}}gk.defaultOptions={K:.1,lambda:.1,divisions:1,divRate:2,cycles:6,iterations:90,iterRate:2/3,bundleThreshold:.6};const Qve=(r,n)=>Math.abs(LJ([r.vx,r.vy],[n.vx,n.vy])/(r.length*n.length)),qve=(r,n)=>{const e=(r.length+n.length)/2;return 2/(e/Math.min(r.length,n.length)+Math.max(r.length,n.length)/e)},ege=(r,n)=>{const e=(r.length+n.length)/2,t=Yh(Ji(r.source,r.target),2),i=Yh(Ji(n.source,n.target),2);return e/(e+js(t,i))},mB=(r,n)=>{if(n.source[0]===n.target[0])return[n.source[0],r[1]];if(n.source[1]===n.target[1])return[r[0],n.source[1]];const e=(n.source[1]-n.target[1])/(n.source[0]-n.target[0]),t=(e*e*n.source[0]+e*(r[1]-n.source[1])+r[0])/(e*e+1),i=e*(t-n.source[0])+n.source[1];return[t,i]},pB=(r,n)=>{const e=mB(n.source,r),t=mB(n.target,r),i=Yh(Ji(e,t),2),a=Yh(Ji(r.source,r.target),2);return js(e,t)===0?0:Math.max(0,1-2*js(a,i)/js(e,t))},tge=(r,n)=>Math.min(pB(r,n),pB(n,r)),nge=r=>{let n=0;for(let e=1;e<r.length;e++)n+=js(r[e],r[e-1]);return n},rge={fill:"#fff",fillOpacity:1,lineWidth:1,stroke:"#000",strokeOpacity:.8},yB=.05;class _k extends Fu{constructor(n,e){super(n,Object.assign({},_k.defaultOptions,e)),this.shapes=new Map,this.r=this.options.r,this.onEdgeFilter=t=>{if(this.options.trigger==="drag"&&this.isLensOn)return;const i=Du(t.canvas);this.renderLens(i),this.renderFocusElements()},this.renderLens=t=>{const i=Object.assign({},rge,this.options.style);this.isLensOn||(this.lens=new R_({style:i}),this.canvas.appendChild(this.lens)),Object.assign(i,Zh(t),{size:this.r*2}),this.lens.update(i)},this.getFilterData=()=>{const{filter:t}=this.options,{model:i}=this.context,a=i.getData();if(!t)return a;const{nodes:s,edges:o,combos:l}=a;return{nodes:s.filter(u=>t(Ut(u),"node")),edges:o.filter(u=>t(Ut(u),"edge")),combos:l.filter(u=>t(Ut(u),"combo"))}},this.getFocusElements=t=>{const{nodes:i,edges:a}=this.getFilterData(),s=i.filter(u=>js(Iu(u),t)<this.r),o=s.map(u=>Ut(u)),l=a.filter(u=>{const{source:c,target:d}=u,h=o.includes(c),f=o.includes(d);switch(this.options.nodeType){case"both":return h&&f;case"either":return h!==f;case"source":return h&&!f;case"target":return!h&&f;default:return!1}});return{nodes:s,edges:l}},this.renderFocusElements=()=>{const{element:t,graph:i}=this.context;if(!this.isLensOn)return;const a=this.lens.getCenter(),{nodes:s,edges:o}=this.getFocusElements(a),l=new Set,u=c=>{const d=Ut(c);l.add(d);const h=t.getElement(d);if(!h)return;const f=this.shapes.get(d)||h.cloneNode();f.setPosition(h.getPosition()),f.id=h.id,this.shapes.has(d)?Object.entries(h.attributes).forEach(([m,y])=>{f.style[m]!==y&&(f.style[m]=y)}):(this.canvas.appendChild(f),this.shapes.set(d,f));const v=i.getElementType(d),g=this.getElementStyle(v,c);f.update(g)};s.forEach(u),o.forEach(u),this.shapes.forEach((c,d)=>{l.has(d)||(c.destroy(),this.shapes.delete(d))})},this.scaleRByWheel=t=>{var i;this.options.preventDefault&&t.preventDefault();const{clientX:a,clientY:s,deltaX:o,deltaY:l}=t,{graph:u,canvas:c}=this.context,d=u.getCanvasByClient([a,s]),h=(i=this.lens)===null||i===void 0?void 0:i.getCenter();if(!this.isLensOn||js(d,h)>this.r)return;const{maxR:f,minR:v}=this.options,g=o+l>0?1/(1-yB):1-yB,m=Math.min(...c.getSize())/2;this.r=Math.max(v||0,Math.min(f||m,this.r*g)),this.renderLens(h),this.renderFocusElements()},this.isLensDragging=!1,this.onDragStart=t=>{var i;const a=Du(t.canvas),s=(i=this.lens)===null||i===void 0?void 0:i.getCenter();!this.isLensOn||js(a,s)>this.r||(this.isLensDragging=!0)},this.onDrag=t=>{if(!this.isLensDragging)return;const i=Du(t.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(n,e){const t=n==="node"?this.options.nodeStyle:this.options.edgeStyle;return typeof t=="function"?t(e):t}get graphDom(){return this.context.graph.getCanvas().getContextService().getDomElement()}bindEvents(){var n;const{graph:e}=this.context,{trigger:t,scaleRBy:i}=this.options,a=e.getCanvas().getLayer();["click","drag"].includes(t)&&a.addEventListener(un.CLICK,this.onEdgeFilter),t==="pointermove"?a.addEventListener(un.POINTER_MOVE,this.onEdgeFilter):t==="drag"&&(a.addEventListener(un.DRAG_START,this.onDragStart),a.addEventListener(un.DRAG,this.onDrag),a.addEventListener(un.DRAG_END,this.onDragEnd)),i==="wheel"&&((n=this.graphDom)===null||n===void 0||n.addEventListener(un.WHEEL,this.scaleRByWheel,{passive:!1}))}unbindEvents(){var n;const{graph:e}=this.context,{trigger:t,scaleRBy:i}=this.options,a=e.getCanvas().getLayer();["click","drag"].includes(t)&&a.removeEventListener(un.CLICK,this.onEdgeFilter),t==="pointermove"?a.removeEventListener(un.POINTER_MOVE,this.onEdgeFilter):t==="drag"&&(a.removeEventListener(un.DRAG_START,this.onDragStart),a.removeEventListener(un.DRAG,this.onDrag),a.removeEventListener(un.DRAG_END,this.onDragEnd)),i==="wheel"&&((n=this.graphDom)===null||n===void 0||n.removeEventListener(un.WHEEL,this.scaleRByWheel))}update(n){this.unbindEvents(),super.update(n),this.bindEvents()}destroy(){this.unbindEvents(),this.isLensOn&&this.lens.destroy(),this.shapes.forEach((n,e)=>{n.destroy(),this.shapes.delete(e)}),super.destroy()}}_k.defaultOptions={trigger:"pointermove",r:60,nodeType:"both",filter:()=>!0,style:{lineWidth:2},nodeStyle:{label:!1},edgeStyle:{label:!0},scaleRBy:"wheel",preventDefault:!0};const ige={fill:"#ccc",fillOpacity:.1,lineWidth:2,stroke:"#000",strokeOpacity:.8,labelFontSize:12},xB=.05,EB=.1;class mk extends Fu{constructor(n,e){super(n,Object.assign({},mk.defaultOptions,e)),this.r=this.options.r,this.d=this.options.d,this.onCreateFisheye=t=>{if(this.options.trigger==="drag"&&this.isLensOn)return;const i=Du(t.canvas);this.onMagnify(i)},this.onMagnify=t=>{t.some(isNaN)||(this.renderLens(t),this.renderFocusElements())},this.renderLens=t=>{const i=Object.assign({},ige,this.options.style);this.isLensOn||(this.lens=new R_({style:i}),this.canvas.appendChild(this.lens)),Object.assign(i,Zh(t),{size:this.r*2,label:this.options.showDPercent,labelText:this.getDPercent()}),this.lens.update(i)},this.getDPercent=()=>{const{minD:t,maxD:i}=this.options;return`${Math.round((this.d-t)/(i-t)*100)}%`},this.prevMagnifiedStyleMap=new Map,this.prevOriginStyleMap=new Map,this.renderFocusElements=()=>{if(!this.isLensOn)return;const{graph:t}=this.context,i=this.lens.getCenter(),a=(this.d+1)*this.r,s=new Map,o=new Map;t.getNodeData().forEach(u=>{const c=Iu(u),d=js(c,i);if(d>this.r)return;const h=a*d/(this.d*d+this.r),[f,v]=c,[g,m]=i,y=(f-g)/d,w=(v-m)/d,T=[g+h*y,m+h*w],G=Ut(u),x=this.getNodeStyle(u),_=(0,nm.Z)(t.getElementRenderStyle(G),Object.keys(x));s.set(G,Object.assign(Object.assign({},Zh(T)),x)),o.set(G,Object.assign(Object.assign({},Zh(c)),_))}),this.updateStyle(s,o)},this.getNodeStyle=t=>{const{nodeStyle:i}=this.options;return typeof i=="function"?i(t):i},this.updateStyle=(t,i)=>{const{graph:a,element:s}=this.context,{enter:o,exit:l,keep:u}=bg(Array.from(this.prevMagnifiedStyleMap.keys()),Array.from(t.keys()),h=>h),c=new Set,d=(h,f)=>{const v=s.getElement(h);v==null||v.update(f),a.getRelatedEdgesData(h).forEach(g=>{c.add(Ut(g))})};[...o,...u].forEach(h=>{d(h,t.get(h))}),l.forEach(h=>{d(h,this.prevOriginStyleMap.get(h)),this.prevOriginStyleMap.delete(h)}),c.forEach(h=>{const f=s.getElement(h);f==null||f.update({})}),this.prevMagnifiedStyleMap=t,i.forEach((h,f)=>{this.prevOriginStyleMap.has(f)||this.prevOriginStyleMap.set(f,h)})},this.isWheelValid=t=>{if(this.options.preventDefault&&t.preventDefault(),!this.isLensOn)return!1;const{clientX:i,clientY:a}=t,s=this.context.graph.getCanvasByClient([i,a]),o=this.lens.getCenter();return!(js(s,o)>this.r)},this.scaleR=t=>{const{maxR:i,minR:a}=this.options,s=t?1/(1-xB):1-xB,o=Math.min(...this.context.canvas.getSize())/2;this.r=Math.max(a||0,Math.min(i||o,this.r*s))},this.scaleD=t=>{const{maxD:i,minD:a}=this.options,s=t?this.d+EB:this.d-EB;this.d=Math.max(a,Math.min(i,s))},this.scaleRByWheel=t=>{if(!this.isWheelValid(t))return;const{deltaX:i,deltaY:a}=t;this.scaleR(i+a>0);const s=this.lens.getCenter();this.onMagnify(s)},this.scaleDByWheel=t=>{if(!this.isWheelValid(t))return;const{deltaX:i,deltaY:a}=t;this.scaleD(i+a>0);const s=this.lens.getCenter();this.onMagnify(s)},this.isDragValid=t=>{if(this.options.preventDefault&&t.preventDefault(),!this.isLensOn)return!1;const i=Du(t.canvas),a=this.lens.getCenter();return!(js(i,a)>this.r)},this.isLensDragging=!1,this.onDragStart=t=>{this.isDragValid(t)&&(this.isLensDragging=!0)},this.onDrag=t=>{if(!this.isLensDragging)return;const i=Du(t.canvas);this.onMagnify(i)},this.onDragEnd=()=>{this.isLensDragging=!1},this.scaleRByDrag=t=>{if(!this.isLensDragging)return;const{dx:i,dy:a}=t;this.scaleR(i-a>0);const s=this.lens.getCenter();this.onMagnify(s)},this.scaleDByDrag=t=>{if(!this.isLensDragging)return;const{dx:i,dy:a}=t;this.scaleD(i-a>0);const s=this.lens.getCenter();this.onMagnify(s)},this.bindEvents()}get canvas(){return this.context.canvas.getLayer("transient")}get isLensOn(){return this.lens&&!this.lens.destroyed}get graphDom(){return this.context.graph.getCanvas().getContextService().getDomElement()}bindEvents(){var n;const{graph:e}=this.context,{trigger:t,scaleRBy:i,scaleDBy:a}=this.options,s=e.getCanvas().getLayer();if(["click","drag"].includes(t)&&s.addEventListener(un.CLICK,this.onCreateFisheye),t==="pointermove"&&s.addEventListener(un.POINTER_MOVE,this.onCreateFisheye),t==="drag"||i==="drag"||a==="drag"){s.addEventListener(un.DRAG_START,this.onDragStart),s.addEventListener(un.DRAG_END,this.onDragEnd);const o=t==="drag"?this.onDrag:i==="drag"?this.scaleRByDrag:this.scaleDByDrag;s.addEventListener(un.DRAG,o)}if(i==="wheel"||a==="wheel"){const o=i==="wheel"?this.scaleRByWheel:this.scaleDByWheel;(n=this.graphDom)===null||n===void 0||n.addEventListener(un.WHEEL,o,{passive:!1})}}unbindEvents(){var n;const{graph:e}=this.context,{trigger:t,scaleRBy:i,scaleDBy:a}=this.options,s=e.getCanvas().getLayer();if(["click","drag"].includes(t)&&s.removeEventListener(un.CLICK,this.onCreateFisheye),t==="pointermove"&&s.removeEventListener(un.POINTER_MOVE,this.onCreateFisheye),t==="drag"||i==="drag"||a==="drag"){s.removeEventListener(un.DRAG_START,this.onDragStart),s.removeEventListener(un.DRAG_END,this.onDragEnd);const o=t==="drag"?this.onDrag:i==="drag"?this.scaleRByDrag:this.scaleDByDrag;s.removeEventListener(un.DRAG,o)}if(i==="wheel"||a==="wheel"){const o=i==="wheel"?this.scaleRByWheel:this.scaleDByWheel;(n=this.graphDom)===null||n===void 0||n.removeEventListener(un.WHEEL,o)}}update(n){this.unbindEvents(),super.update(n),this.bindEvents()}destroy(){var n;this.unbindEvents(),this.isLensOn&&((n=this.lens)===null||n===void 0||n.destroy()),this.prevMagnifiedStyleMap.clear(),this.prevOriginStyleMap.clear(),super.destroy()}}mk.defaultOptions={trigger:"pointermove",r:120,d:1.5,maxD:5,minD:0,showDPercent:!0,style:{},nodeStyle:{label:!0},preventDefault:!0};class pk extends Fu{constructor(n,e){super(n,Object.assign({},pk.defaultOptions,e)),this.$el=this.context.canvas.getContainer(),this.graphSize=[0,0],this.onFullscreenChange=()=>{var t,i,a,s;const o=!!document.fullscreenElement;this.options.autoFit&&this.setGraphSize(o),o?(i=(t=this.options).onEnter)===null||i===void 0||i.call(t):(s=(a=this.options).onExit)===null||s===void 0||s.call(a)},this.shortcut=new dp(n.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:n=[],exit:e=[]}=this.options.trigger;this.shortcut.bind(n,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(n=!0){let e,t;n?(e=window.screen.width,t=window.screen.height,this.graphSize=this.context.graph.getSize()):[e,t]=this.graphSize,this.context.graph.setSize(e,t),this.context.graph.render()}request(){document.fullscreenElement||!age()||this.$el.requestFullscreen().catch(n=>{Gc.warn(`Error attempting to enable full-screen: ${n.message} (${n.name})`)})}exit(){document.fullscreenElement&&document.exitFullscreen()}update(n){this.unbindEvents(),super.update(n),this.bindEvents()}destroy(){this.exit(),this.style.remove(),super.destroy()}}pk.defaultOptions={trigger:{},autoFit:!0};function age(){return document.fullscreenEnabled||Reflect.get(document,"webkitFullscreenEnabled")||Reflect.get(document,"mozFullscreenEnabled")||Reflect.get(document,"msFullscreenEnabled")}class yk extends Fu{constructor(n,e){super(n,Object.assign({},yk.defaultOptions,e)),this.$element=sx("grid-line"),this.offset=[0,0],this.onTransform=i=>{if(!this.options.follow)return;const{data:{translate:a}}=i;a&&this.updateOffset(a)};const t=this.context.canvas.getContainer();Hve(t,this.$element),this.updateStyle(),this.bindEvents()}update(n){super.update(n),this.updateStyle()}bindEvents(){const{graph:n}=this.context;n.on(qn.AFTER_TRANSFORM,this.onTransform)}updateStyle(){const{size:n,stroke:e,lineWidth:t,border:i,borderLineWidth:a,borderStroke:s,borderStyle:o}=this.options;Object.assign(this.$element.style,{border:i?`${a}px ${o} ${s}`:"none",backgroundImage:`linear-gradient(${e} ${t}px, transparent ${t}px), linear-gradient(90deg, ${e} ${t}px, transparent ${t}px)`,backgroundSize:`${n}px ${n}px`})}updateOffset(n){this.offset=DJ(Ji(this.offset,n),this.options.size),this.$element.style.backgroundPosition=`${this.offset[0]}px ${this.offset[1]}px`}destroy(){this.context.graph.off(qn.AFTER_TRANSFORM,this.onTransform),this.$element.remove(),super.destroy()}}yk.defaultOptions={border:!0,borderLineWidth:1,borderStroke:"#eee",borderStyle:"solid",lineWidth:1,size:20,stroke:"#eee"};var eP=k(90494);function tP(r){const n={Added:new Map,Updated:new Map,Removed:new Map};return r.forEach(e=>{const{type:t,value:i}=e,a=Ut(i);if(t==="NodeAdded"||t==="EdgeAdded"||t==="ComboAdded")n.Added.set(a,e);else if(t==="NodeUpdated"||t==="EdgeUpdated"||t==="ComboUpdated")if(n.Added.has(a))n.Added.set(a,{type:t.replace("Updated","Added"),value:i});else if(n.Updated.has(a)){const{original:s}=n.Updated.get(a);n.Updated.set(a,{type:t,value:i,original:s})}else n.Removed.has(a)||n.Updated.set(a,e);else(t==="NodeRemoved"||t==="EdgeRemoved"||t==="ComboRemoved")&&(n.Added.has(a)?n.Added.delete(a):(n.Updated.has(a)&&n.Updated.delete(a),n.Removed.set(a,e)))}),[...Array.from(n.Added.values()),...Array.from(n.Updated.values()),...Array.from(n.Removed.values())]}function bB(r){const{NodeAdded:n=[],NodeUpdated:e=[],NodeRemoved:t=[],EdgeAdded:i=[],EdgeUpdated:a=[],EdgeRemoved:s=[],ComboAdded:o=[],ComboUpdated:l=[],ComboRemoved:u=[]}=(0,xE.Z)(r,c=>c.type);return{add:{nodes:n,edges:i,combos:o},update:{nodes:e,edges:a,combos:l},remove:{nodes:t,edges:s,combos:u}}}function kB(r,n){for(const e in r)(0,Gs.Z)(r[e])&&!Array.isArray(r[e])&&r[e]!==null?(n[e]||(n[e]={}),kB(r[e],n[e])):n[e]===void 0&&(n[e]=uy(e))}function sge(r,n=!1,e){const t={animation:n,current:{add:{},update:{},remove:{}},original:{add:{},update:{},remove:{}}},{add:i,update:a,remove:s}=bB(tP(r));return["nodes","edges","combos"].forEach(o=>{a[o]&&a[o].forEach(l=>{var u,c;const d=Object.assign({},l.value);let h=Object.assign({},l.original);if(e){const f=e.graph.getElementType(Ut(l.original)),v=f==="edge"?"stroke":"fill",g=e.element.getElementComputedStyle(f,l.original);h=Object.assign(Object.assign({},l.original),{style:Object.assign({[v]:g[v]},l.original.style)})}kB(d,h),(u=t.current.update)[o]||(u[o]=[]),t.current.update[o].push(d),(c=t.original.update)[o]||(c[o]=[]),t.original.update[o].push(h)}),i[o]&&i[o].forEach(l=>{var u,c;const d=Object.assign({},l.value);(u=t.current.add)[o]||(u[o]=[]),t.current.add[o].push(d),(c=t.original.remove)[o]||(c[o]=[]),t.original.remove[o].push(d)}),s[o]&&s[o].forEach(l=>{var u,c;const d=Object.assign({},l.value);(u=t.current.remove)[o]||(u[o]=[]),t.current.remove[o].push(d),(c=t.original.add)[o]||(c[o]=[]),t.original.add[o].push(d)})}),t}class xk extends Fu{constructor(n,e){super(n,Object.assign({},xk.defaultOptions,e)),this.batchChanges=null,this.batchAnimation=!1,this.undoStack=[],this.redoStack=[],this.freezed=!1,this.executeCommand=(i,a=!0)=>{var s,o,l;this.freezed=!0,(o=(s=this.options).executeCommand)===null||o===void 0||o.call(s,i);const u=a?i.original:i.current;this.context.graph.addData(u.add),this.context.graph.updateData(u.update),this.context.graph.removeData(vI(u.remove,!1)),(l=this.context.element)===null||l===void 0||l.draw({silence:!0,animation:i.animation}),this.freezed=!1},this.addCommand=i=>{var a;if(!this.freezed){if(i.type===qn.AFTER_DRAW){const{dataChanges:s=[],animation:o=!0}=i.data;if(!((a=this.context.batch)===null||a===void 0)&&a.isBatching){if(!this.batchChanges)return;this.batchChanges.push(s),this.batchAnimation&&(this.batchAnimation=o);return}this.batchChanges=[s],this.batchAnimation=o}this.undoStackPush(sge(this.batchChanges.flat(),this.batchAnimation,this.context)),this.notify(pg.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 eP.Z;const{graph:t}=this.context;t.on(qn.AFTER_DRAW,this.addCommand),t.on(qn.BATCH_START,this.initBatchCommand),t.on(qn.BATCH_END,this.addCommand)}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}undo(){var n,e,t,i;const a=this.undoStack.pop();if(a){if(this.executeCommand(a),((e=(n=this.options).beforeAddCommand)===null||e===void 0?void 0:e.call(n,a,!1))===!1)return;this.redoStack.push(a),(i=(t=this.options).afterAddCommand)===null||i===void 0||i.call(t,a,!1),this.notify(pg.UNDO,a)}return this}redo(){const n=this.redoStack.pop();return n&&(this.executeCommand(n,!1),this.undoStackPush(n),this.notify(pg.REDO,n)),this}undoAndCancel(){const n=this.undoStack.pop();return n&&(this.executeCommand(n,!1),this.redoStack=[],this.notify(pg.CANCEL,n)),this}undoStackPush(n){var e,t,i,a;const{stackSize:s}=this.options;s!==0&&this.undoStack.length>=s&&this.undoStack.shift(),((t=(e=this.options).beforeAddCommand)===null||t===void 0?void 0:t.call(e,n,!0))!==!1&&(this.undoStack.push(n),(a=(i=this.options).afterAddCommand)===null||a===void 0||a.call(i,n,!0))}clear(){this.undoStack=[],this.redoStack=[],this.batchChanges=null,this.batchAnimation=!1,this.notify(pg.CLEAR,null)}notify(n,e){this.emitter.emit(n,{cmd:e}),this.emitter.emit(pg.CHANGE,{cmd:e})}on(n,e){this.emitter.on(n,e)}destroy(){const{graph:n}=this.context;n.off(qn.AFTER_DRAW,this.addCommand),n.off(qn.BATCH_START,this.initBatchCommand),n.off(qn.BATCH_END,this.addCommand),this.emitter.off(),super.destroy(),this.undoStack=[],this.redoStack=[]}}xk.defaultOptions={stackSize:0};var oge=k(1344),lge=k.n(oge);function uge(r,n,e){if(r.length===1)return cge(r[0],n,e);if(r.length===2)return dge(r,n,e);switch(e){case"smooth":return fge(r,n);case"sharp":return vge(r,n);case"rounded":default:return hge(r,n)}}const cge=(r,n,e)=>{if(e==="sharp")return[["M",r[0]-n,r[1]-n],["L",r[0]+n,r[1]-n],["L",r[0]+n,r[1]+n],["L",r[0]-n,r[1]+n],["Z"]];const t=[n,n,0,0,0];return[["M",r[0],r[1]-n],["A",...t,r[0],r[1]+n],["A",...t,r[0],r[1]-n]]},dge=(r,n,e)=>{const t=[n,n,0,0,0],i=e==="sharp"?Ji(r[0],kg(Gv(Cs(r[0],r[1])),n)):r[0],a=e==="sharp"?Ji(r[1],kg(Gv(Cs(r[1],r[0])),n)):r[1],s=kg(Gv(SE(Cs(i,a),!1)),n),o=kg(s,-1),l=Ji(i,s),u=Ji(a,s),c=Ji(a,o),d=Ji(i,o);return e==="sharp"?[["M",l[0],l[1]],["L",u[0],u[1]],["L",c[0],c[1]],["L",d[0],d[1]],["Z"]]:[["M",l[0],l[1]],["L",u[0],u[1]],["A",...t,c[0],c[1]],["L",d[0],d[1]],["A",...t,l[0],l[1]]]},hge=(r,n)=>{const e=TI(r).map((o,l)=>{const u=(l-2+r.length)%r.length,c=(l-1+r.length)%r.length,d=(l+1)%r.length,h=r[u],f=r[c],v=r[d],g=Cs(h,f),m=Cs(f,o),y=Cs(o,v),w=(p,b)=>hT(p,b,!0)<Math.PI,T=w(g,m),G=w(m,y),x=p=>kg(Gv(SE(p,!1)),n),_=x(m);return[{p:P_(T?Ji(f,x(g)):Ji(f,_)),concave:T&&f},{p:P_(G?Ji(o,x(y)):Ji(o,_)),concave:G&&o}]}),t=[n,n,0,0,0],i=e.findIndex((o,l)=>!e[(l-1+e.length)%e.length][0].concave&&!e[(l-1+e.length)%e.length][1].concave&&!o[0].concave&&!o[0].concave&&!o[1].concave),a=e.slice(i).concat(e.slice(0,i));let s=[];return a.flatMap((o,l)=>{const u=[],c=a[e.length-1];return l===0&&u.push(["M",...c[1].p]),o[0].concave?s.push(o[0].p,o[1].p):u.push(["A",...t,...o[0].p]),o[1].concave?s.unshift(o[1].p):u.push(["L",...o[1].p]),s.length===3&&(u.pop(),u.push(["C",...s.flat()]),s=[]),u})},fge=(r,n)=>{const e=TI(r).map((t,i)=>{const a=r[(i+1)%r.length];return{p:t,v:Gv(Cs(a,t))}});return e.forEach((t,i)=>{const a=i>0?i-1:r.length-1,s=e[a].v,o=Gv(Ji(s,kg(t.v,hT(s,t.v,!0)<Math.PI?1:-1)));t.p=Ji(t.p,kg(o,n))}),$I(e.map(t=>t.p))},vge=(r,n)=>{const t=r.map((a,s)=>{const o=r[s===0?r.length-1:s-1],l=fy(kg(Gv(SE(Cs(o,a),!1)),n));return[Ji(o,l),Ji(a,l)]}).flat();return t.map((a,s)=>{if(s%2===0)return null;const o=[t[(s-1)%t.length],t[s%t.length]],l=[t[(s+1)%t.length],t[(s+2)%t.length]];return fT(o,l,!0)}).filter(Boolean).map((a,s)=>[s===0?"M":"L",a[0],a[1]]).concat([["Z"]])};var gge=function(r,n){var e={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&n.indexOf(t)<0&&(e[t]=r[t]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(r);i<t.length;i++)n.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(e[t[i]]=r[t[i]]);return e};class Ek extends Fu{constructor(n,e){super(n,Object.assign({},Ek.defaultOptions,e)),this.hullMemberIds=[],this.drawHull=()=>{if(!this.shape)this.shape=new yy({style:this.getHullStyle()}),this.context.canvas.appendChild(this.shape);else{const t=!(0,Ml.Z)(this.optionsCache,this.options);this.shape.update(this.getHullStyle(t))}this.optionsCache=Object.assign({},this.options)},this.updateHullPath=t=>{this.shape&&this.options.members.includes(Ut(t.data))&&this.shape.update({d:this.getHullPath(!0)})},this.getHullPath=(t=!1)=>{const{graph:i}=this.context,a=this.getMember();if(a.length===0)return"";const s=a.map(u=>i.getNodeData(u)),o=lge()(s.map(Iu),this.options.concavity).slice(1).reverse(),l=o.flatMap(u=>s.filter(c=>(0,Ml.Z)(Iu(c),u)).map(Ut));return(0,Ml.Z)(l,this.hullMemberIds)&&!t?this.path:(this.hullMemberIds=l,this.path=uge(o,this.getPadding(),this.options.corner),this.path)},this.bindEvents()}bindEvents(){this.context.graph.on(qn.AFTER_RENDER,this.drawHull),this.context.graph.on(qn.AFTER_ELEMENT_UPDATE,this.updateHullPath)}getHullStyle(n){const e=this.options,{members:t,padding:i,corner:a}=e,s=gge(e,["members","padding","corner"]);return Object.assign(Object.assign({},s),{d:this.getHullPath(n)})}getPadding(){const{graph:n}=this.context;return this.hullMemberIds.reduce((t,i)=>{const{halfExtents:a}=n.getElementRenderBounds(i),s=Math.max(a[0],a[1]);return Math.max(t,s)},0)+this.options.padding}addMember(n){const e=Array.isArray(n)?n:[n];this.options.members=[...new Set([...this.options.members,...e])],this.shape.update({d:this.getHullPath()})}removeMember(n){const e=Array.isArray(n)?n:[n];this.options.members=this.options.members.filter(t=>!e.includes(t)),e.some(t=>this.hullMemberIds.includes(t))&&this.shape.update({d:this.getHullPath()})}updateMember(n){this.options.members=(0,Be.Z)(n)?n(this.options.members):n,this.shape.update(this.getHullStyle(!0))}getMember(){return this.options.members}destroy(){this.context.graph.off(qn.AFTER_DRAW,this.drawHull),this.shape.destroy(),this.hullMemberIds=[],super.destroy()}}Ek.defaultOptions={members:[],padding:10,corner:"rounded",concavity:1/0,fill:"lightblue",fillOpacity:.2,labelOpacity:1,stroke:"blue",strokeOpacity:.2};var Pe=k(97582);function Xp(r){"@babel/helpers - typeof";return Xp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Xp(r)}function _ge(r,n){if(Xp(r)!="object"||!r)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var t=e.call(r,n||"default");if(Xp(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(r)}function wB(r){var n=_ge(r,"string");return Xp(n)=="symbol"?n:n+""}function pa(r,n,e){return(n=wB(n))in r?Object.defineProperty(r,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[n]=e,r}function SB(r,n){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);n&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),e.push.apply(e,t)}return e}function nl(r){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?SB(Object(e),!0).forEach(function(t){pa(r,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):SB(Object(e)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))})}return r}function Er(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}function TB(r,n){for(var e=0;e<n.length;e++){var t=n[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,wB(t.key),t)}}function br(r,n,e){return n&&TB(r.prototype,n),e&&TB(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function nP(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=Array(n);e<n;e++)t[e]=r[e];return t}function mge(r){if(Array.isArray(r))return nP(r)}function pge(r){if(typeof Symbol!="undefined"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function rP(r,n){if(r){if(typeof r=="string")return nP(r,n);var e={}.toString.call(r).slice(8,-1);return e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set"?Array.from(r):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?nP(r,n):void 0}}function yge(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rl(r){return mge(r)||pge(r)||rP(r)||yge()}function Kp(r){return Kp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Kp(r)}function CB(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(n){}return(CB=function(){return!!r})()}function xge(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Ege(r,n){if(n&&(Xp(n)=="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xge(r)}function Ms(r,n,e){return n=Kp(n),Ege(r,CB()?Reflect.construct(n,e||[],Kp(r).constructor):n.apply(r,e))}function iP(r,n){return iP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},iP(r,n)}function Ps(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(n&&n.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),n&&iP(r,n)}function bge(r){if(Array.isArray(r))return r}function kge(r,n){var e=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(e!=null){var t,i,a,s,o=[],l=!0,u=!1;try{if(a=(e=e.call(r)).next,n===0){if(Object(e)!==e)return;l=!1}else for(;!(l=(t=a.call(e)).done)&&(o.push(t.value),o.length!==n);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&e.return!=null&&(s=e.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function wge(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ds(r,n){return bge(r)||kge(r,n)||rP(r,n)||wge()}function Sge(r,n){for(;!{}.hasOwnProperty.call(r,n)&&(r=Kp(r))!==null;);return r}function aP(){return aP=typeof Reflect!="undefined"&&Reflect.get?Reflect.get.bind():function(r,n,e){var t=Sge(r,n);if(t){var i=Object.getOwnPropertyDescriptor(t,n);return i.get?i.get.call(arguments.length<3?r:e):i.value}},aP.apply(null,arguments)}function MB(r,n,e,t){var i=aP(Kp(1&t?r.prototype:r),n,e);return 2&t&&typeof i=="function"?function(a){return i.apply(e,a)}:i}function sP(r,n,e){r.prototype=n.prototype=e,e.constructor=r}function PB(r,n){var e=Object.create(r.prototype);for(var t in n)e[t]=n[t];return e}function ox(){}var lx=.7,bk=1/lx,Jp="\\s*([+-]?\\d+)\\s*",ux="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",vv="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Tge=/^#([0-9a-f]{3,8})$/,Cge=new RegExp(`^rgb\\(${Jp},${Jp},${Jp}\\)$`),Mge=new RegExp(`^rgb\\(${vv},${vv},${vv}\\)$`),Pge=new RegExp(`^rgba\\(${Jp},${Jp},${Jp},${ux}\\)$`),Nge=new RegExp(`^rgba\\(${vv},${vv},${vv},${ux}\\)$`),Oge=new RegExp(`^hsl\\(${ux},${vv},${vv}\\)$`),Rge=new RegExp(`^hsla\\(${ux},${vv},${vv},${ux}\\)$`),NB={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};sP(ox,kk,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:OB,formatHex:OB,formatHex8:Age,formatHsl:Lge,formatRgb:RB,toString:RB});function OB(){return this.rgb().formatHex()}function Age(){return this.rgb().formatHex8()}function Lge(){return FB(this).formatHsl()}function RB(){return this.rgb().formatRgb()}function kk(r){var n,e;return r=(r+"").trim().toLowerCase(),(n=Tge.exec(r))?(e=n[1].length,n=parseInt(n[1],16),e===6?AB(n):e===3?new td(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):e===8?wk(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):e===4?wk(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=Cge.exec(r))?new td(n[1],n[2],n[3],1):(n=Mge.exec(r))?new td(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=Pge.exec(r))?wk(n[1],n[2],n[3],n[4]):(n=Nge.exec(r))?wk(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=Oge.exec(r))?DB(n[1],n[2]/100,n[3]/100,1):(n=Rge.exec(r))?DB(n[1],n[2]/100,n[3]/100,n[4]):NB.hasOwnProperty(r)?AB(NB[r]):r==="transparent"?new td(NaN,NaN,NaN,0):null}function AB(r){return new td(r>>16&255,r>>8&255,r&255,1)}function wk(r,n,e,t){return t<=0&&(r=n=e=NaN),new td(r,n,e,t)}function Ige(r){return r instanceof ox||(r=kk(r)),r?(r=r.rgb(),new td(r.r,r.g,r.b,r.opacity)):new td}function Dge(r,n,e,t){return arguments.length===1?Ige(r):new td(r,n,e,t==null?1:t)}function td(r,n,e,t){this.r=+r,this.g=+n,this.b=+e,this.opacity=+t}sP(td,Dge,PB(ox,{brighter(r){return r=r==null?bk:Math.pow(bk,r),new td(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?lx:Math.pow(lx,r),new td(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new td(sm(this.r),sm(this.g),sm(this.b),Sk(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:LB,formatHex:LB,formatHex8:Fge,formatRgb:IB,toString:IB}));function LB(){return`#${om(this.r)}${om(this.g)}${om(this.b)}`}function Fge(){return`#${om(this.r)}${om(this.g)}${om(this.b)}${om((isNaN(this.opacity)?1:this.opacity)*255)}`}function IB(){const r=Sk(this.opacity);return`${r===1?"rgb(":"rgba("}${sm(this.r)}, ${sm(this.g)}, ${sm(this.b)}${r===1?")":`, ${r})`}`}function Sk(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function sm(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function om(r){return r=sm(r),(r<16?"0":"")+r.toString(16)}function DB(r,n,e,t){return t<=0?r=n=e=NaN:e<=0||e>=1?r=n=NaN:n<=0&&(r=NaN),new ff(r,n,e,t)}function FB(r){if(r instanceof ff)return new ff(r.h,r.s,r.l,r.opacity);if(r instanceof ox||(r=kk(r)),!r)return new ff;if(r instanceof ff)return r;r=r.rgb();var n=r.r/255,e=r.g/255,t=r.b/255,i=Math.min(n,e,t),a=Math.max(n,e,t),s=NaN,o=a-i,l=(a+i)/2;return o?(n===a?s=(e-t)/o+(e<t)*6:e===a?s=(t-n)/o+2:s=(n-e)/o+4,o/=l<.5?a+i:2-a-i,s*=60):o=l>0&&l<1?0:s,new ff(s,o,l,r.opacity)}function Bge(r,n,e,t){return arguments.length===1?FB(r):new ff(r,n,e,t==null?1:t)}function ff(r,n,e,t){this.h=+r,this.s=+n,this.l=+e,this.opacity=+t}sP(ff,Bge,PB(ox,{brighter(r){return r=r==null?bk:Math.pow(bk,r),new ff(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?lx:Math.pow(lx,r),new ff(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,n=isNaN(r)||isNaN(this.s)?0:this.s,e=this.l,t=e+(e<.5?e:1-e)*n,i=2*e-t;return new td(oP(r>=240?r-240:r+120,i,t),oP(r,i,t),oP(r<120?r+240:r-120,i,t),this.opacity)},clamp(){return new ff(BB(this.h),Tk(this.s),Tk(this.l),Sk(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const r=Sk(this.opacity);return`${r===1?"hsl(":"hsla("}${BB(this.h)}, ${Tk(this.s)*100}%, ${Tk(this.l)*100}%${r===1?")":`, ${r})`}`}}));function BB(r){return r=(r||0)%360,r<0?r+360:r}function Tk(r){return Math.max(0,Math.min(1,r||0))}function oP(r,n,e){return(r<60?n+(e-n)*r/60:r<180?e:r<240?n+(e-n)*(240-r)/60:n)*255}function Qp(r,n){var e=typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(!e){if(Array.isArray(r)||(e=rP(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:i}}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 a,s=!0,o=!1;return{s:function(){e=e.call(r)},n:function(){var u=e.next();return s=u.done,u},e:function(u){o=!0,a=u},f:function(){try{s||e.return==null||e.return()}finally{if(o)throw a}}}}function $ge(r,n){if(r==null)return{};var e={};for(var t in r)if({}.hasOwnProperty.call(r,t)){if(n.includes(t))continue;e[t]=r[t]}return e}function lm(r,n){if(r==null)return{};var e,t,i=$ge(r,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(t=0;t<a.length;t++)e=a[t],n.includes(e)||{}.propertyIsEnumerable.call(r,e)&&(i[e]=r[e])}return i}var Gge=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof k.g!="undefined"?k.g:typeof self!="undefined"?self:{},$B={exports:{}};(function(r,n){(function(e,t){r.exports=t()})(Gge,function(){function e(x,_,p,b,R){t(x,_,p||0,b||x.length-1,R||a)}function t(x,_,p,b,R){for(;b>p;){if(b-p>600){var B=b-p+1,j=_-p+1,Z=Math.log(B),te=.5*Math.exp(2*Z/3),le=.5*Math.sqrt(Z*te*(B-te)/B)*(j-B/2<0?-1:1),ue=Math.max(p,Math.floor(_-j*te/B+le)),se=Math.min(b,Math.floor(_+(B-j)*te/B+le));t(x,_,ue,se,R)}var V=x[_],ee=p,he=b;for(i(x,p,_),R(x[b],V)>0&&i(x,p,b);ee<he;){for(i(x,ee,he),ee++,he--;R(x[ee],V)<0;)ee++;for(;R(x[he],V)>0;)he--}R(x[p],V)===0?i(x,p,he):(he++,i(x,he,b)),he<=_&&(p=he+1),_<=he&&(b=he-1)}}function i(x,_,p){var b=x[_];x[_]=x[p],x[p]=b}function a(x,_){return x<_?-1:x>_?1:0}var s=function(_){_===void 0&&(_=9),this._maxEntries=Math.max(4,_),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()};s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(_){var p=this.data,b=[];if(!w(_,p))return b;for(var R=this.toBBox,B=[];p;){for(var j=0;j<p.children.length;j++){var Z=p.children[j],te=p.leaf?R(Z):Z;w(_,te)&&(p.leaf?b.push(Z):y(_,te)?this._all(Z,b):B.push(Z))}p=B.pop()}return b},s.prototype.collides=function(_){var p=this.data;if(!w(_,p))return!1;for(var b=[];p;){for(var R=0;R<p.children.length;R++){var B=p.children[R],j=p.leaf?this.toBBox(B):B;if(w(_,j)){if(p.leaf||y(_,j))return!0;b.push(B)}}p=b.pop()}return!1},s.prototype.load=function(_){if(!(_&&_.length))return this;if(_.length<this._minEntries){for(var p=0;p<_.length;p++)this.insert(_[p]);return this}var b=this._build(_.slice(),0,_.length-1,0);if(!this.data.children.length)this.data=b;else if(this.data.height===b.height)this._splitRoot(this.data,b);else{if(this.data.height<b.height){var R=this.data;this.data=b,b=R}this._insert(b,this.data.height-b.height-1,!0)}return this},s.prototype.insert=function(_){return _&&this._insert(_,this.data.height-1),this},s.prototype.clear=function(){return this.data=T([]),this},s.prototype.remove=function(_,p){if(!_)return this;for(var b=this.data,R=this.toBBox(_),B=[],j=[],Z,te,le;b||B.length;){if(b||(b=B.pop(),te=B[B.length-1],Z=j.pop(),le=!0),b.leaf){var ue=o(_,b.children,p);if(ue!==-1)return b.children.splice(ue,1),B.push(b),this._condense(B),this}!le&&!b.leaf&&y(b,R)?(B.push(b),j.push(Z),Z=0,te=b,b=b.children[0]):te?(Z++,b=te.children[Z],le=!1):b=null}return this},s.prototype.toBBox=function(_){return _},s.prototype.compareMinX=function(_,p){return _.minX-p.minX},s.prototype.compareMinY=function(_,p){return _.minY-p.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(_){return this.data=_,this},s.prototype._all=function(_,p){for(var b=[];_;)_.leaf?p.push.apply(p,_.children):b.push.apply(b,_.children),_=b.pop();return p},s.prototype._build=function(_,p,b,R){var B=b-p+1,j=this._maxEntries,Z;if(B<=j)return Z=T(_.slice(p,b+1)),l(Z,this.toBBox),Z;R||(R=Math.ceil(Math.log(B)/Math.log(j)),j=Math.ceil(B/Math.pow(j,R-1))),Z=T([]),Z.leaf=!1,Z.height=R;var te=Math.ceil(B/j),le=te*Math.ceil(Math.sqrt(j));G(_,p,b,le,this.compareMinX);for(var ue=p;ue<=b;ue+=le){var se=Math.min(ue+le-1,b);G(_,ue,se,te,this.compareMinY);for(var V=ue;V<=se;V+=te){var ee=Math.min(V+te-1,se);Z.children.push(this._build(_,V,ee,R-1))}}return l(Z,this.toBBox),Z},s.prototype._chooseSubtree=function(_,p,b,R){for(;R.push(p),!(p.leaf||R.length-1===b);){for(var B=1/0,j=1/0,Z=void 0,te=0;te<p.children.length;te++){var le=p.children[te],ue=f(le),se=g(_,le)-ue;se<j?(j=se,B=ue<B?ue:B,Z=le):se===j&&ue<B&&(B=ue,Z=le)}p=Z||p.children[0]}return p},s.prototype._insert=function(_,p,b){var R=b?_:this.toBBox(_),B=[],j=this._chooseSubtree(R,this.data,p,B);for(j.children.push(_),c(j,R);p>=0&&B[p].children.length>this._maxEntries;)this._split(B,p),p--;this._adjustParentBBoxes(R,B,p)},s.prototype._split=function(_,p){var b=_[p],R=b.children.length,B=this._minEntries;this._chooseSplitAxis(b,B,R);var j=this._chooseSplitIndex(b,B,R),Z=T(b.children.splice(j,b.children.length-j));Z.height=b.height,Z.leaf=b.leaf,l(b,this.toBBox),l(Z,this.toBBox),p?_[p-1].children.push(Z):this._splitRoot(b,Z)},s.prototype._splitRoot=function(_,p){this.data=T([_,p]),this.data.height=_.height+1,this.data.leaf=!1,l(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(_,p,b){for(var R,B=1/0,j=1/0,Z=p;Z<=b-p;Z++){var te=u(_,0,Z,this.toBBox),le=u(_,Z,b,this.toBBox),ue=m(te,le),se=f(te)+f(le);ue<B?(B=ue,R=Z,j=se<j?se:j):ue===B&&se<j&&(j=se,R=Z)}return R||b-p},s.prototype._chooseSplitAxis=function(_,p,b){var R=_.leaf?this.compareMinX:d,B=_.leaf?this.compareMinY:h,j=this._allDistMargin(_,p,b,R),Z=this._allDistMargin(_,p,b,B);j<Z&&_.children.sort(R)},s.prototype._allDistMargin=function(_,p,b,R){_.children.sort(R);for(var B=this.toBBox,j=u(_,0,p,B),Z=u(_,b-p,b,B),te=v(j)+v(Z),le=p;le<b-p;le++){var ue=_.children[le];c(j,_.leaf?B(ue):ue),te+=v(j)}for(var se=b-p-1;se>=p;se--){var V=_.children[se];c(Z,_.leaf?B(V):V),te+=v(Z)}return te},s.prototype._adjustParentBBoxes=function(_,p,b){for(var R=b;R>=0;R--)c(p[R],_)},s.prototype._condense=function(_){for(var p=_.length-1,b=void 0;p>=0;p--)_[p].children.length===0?p>0?(b=_[p-1].children,b.splice(b.indexOf(_[p]),1)):this.clear():l(_[p],this.toBBox)};function o(x,_,p){if(!p)return _.indexOf(x);for(var b=0;b<_.length;b++)if(p(x,_[b]))return b;return-1}function l(x,_){u(x,0,x.children.length,_,x)}function u(x,_,p,b,R){R||(R=T(null)),R.minX=1/0,R.minY=1/0,R.maxX=-1/0,R.maxY=-1/0;for(var B=_;B<p;B++){var j=x.children[B];c(R,x.leaf?b(j):j)}return R}function c(x,_){return x.minX=Math.min(x.minX,_.minX),x.minY=Math.min(x.minY,_.minY),x.maxX=Math.max(x.maxX,_.maxX),x.maxY=Math.max(x.maxY,_.maxY),x}function d(x,_){return x.minX-_.minX}function h(x,_){return x.minY-_.minY}function f(x){return(x.maxX-x.minX)*(x.maxY-x.minY)}function v(x){return x.maxX-x.minX+(x.maxY-x.minY)}function g(x,_){return(Math.max(_.maxX,x.maxX)-Math.min(_.minX,x.minX))*(Math.max(_.maxY,x.maxY)-Math.min(_.minY,x.minY))}function m(x,_){var p=Math.max(x.minX,_.minX),b=Math.max(x.minY,_.minY),R=Math.min(x.maxX,_.maxX),B=Math.min(x.maxY,_.maxY);return Math.max(0,R-p)*Math.max(0,B-b)}function y(x,_){return x.minX<=_.minX&&x.minY<=_.minY&&_.maxX<=x.maxX&&_.maxY<=x.maxY}function w(x,_){return _.minX<=x.maxX&&_.minY<=x.maxY&&_.maxX>=x.minX&&_.maxY>=x.minY}function T(x){return{children:x,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function G(x,_,p,b,R){for(var B=[_,p];B.length;)if(p=B.pop(),_=B.pop(),!(p-_<=b)){var j=_+Math.ceil((p-_)/b/2)*b;e(x,j,_,p,R),B.push(_,j,j,p)}}return s})})($B);var GRe=$B.exports,Yr=function(r){return r.GROUP="g",r.FRAGMENT="fragment",r.CIRCLE="circle",r.ELLIPSE="ellipse",r.IMAGE="image",r.RECT="rect",r.LINE="line",r.POLYLINE="polyline",r.POLYGON="polygon",r.TEXT="text",r.PATH="path",r.HTML="html",r.MESH="mesh",r}({}),lP=function(r){return r[r.ZERO=0]="ZERO",r[r.NEGATIVE_ONE=1]="NEGATIVE_ONE",r}({}),zRe=null,VRe=null,uP=E.IH,qp=E.JG,zge=E.Fp,Vge=E.VV,GB=E.bA,cP=E.lu,nd=function(){function r(){Er(this,r),this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return br(r,[{key:"update",value:function(e,t){qp(this.center,e),qp(this.halfExtents,t),cP(this.min,this.center,this.halfExtents),uP(this.max,this.center,this.halfExtents)}},{key:"setMinMax",value:function(e,t){uP(this.center,t,e),GB(this.center,this.center,.5),cP(this.halfExtents,t,e),GB(this.halfExtents,this.halfExtents,.5),qp(this.min,e),qp(this.max,t)}},{key:"getMin",value:function(){return this.min}},{key:"getMax",value:function(){return this.max}},{key:"add",value:function(e){if(!r.isEmpty(e)){if(r.isEmpty(this)){this.setMinMax(e.getMin(),e.getMax());return}var t=this.center,i=t[0],a=t[1],s=t[2],o=this.halfExtents,l=o[0],u=o[1],c=o[2],d=i-l,h=i+l,f=a-u,v=a+u,g=s-c,m=s+c,y=e.center,w=y[0],T=y[1],G=y[2],x=e.halfExtents,_=x[0],p=x[1],b=x[2],R=w-_,B=w+_,j=T-p,Z=T+p,te=G-b,le=G+b;R<d&&(d=R),B>h&&(h=B),j<f&&(f=j),Z>v&&(v=Z),te<g&&(g=te),le>m&&(m=le),t[0]=(d+h)*.5,t[1]=(f+v)*.5,t[2]=(g+m)*.5,o[0]=(h-d)*.5,o[1]=(v-f)*.5,o[2]=(m-g)*.5,this.min[0]=d,this.min[1]=f,this.min[2]=g,this.max[0]=h,this.max[1]=v,this.max[2]=m}}},{key:"setFromTransformedAABB",value:function(e,t){var i=this.center,a=this.halfExtents,s=e.center,o=e.halfExtents,l=t[0],u=t[4],c=t[8],d=t[1],h=t[5],f=t[9],v=t[2],g=t[6],m=t[10],y=Math.abs(l),w=Math.abs(u),T=Math.abs(c),G=Math.abs(d),x=Math.abs(h),_=Math.abs(f),p=Math.abs(v),b=Math.abs(g),R=Math.abs(m);i[0]=t[12]+l*s[0]+u*s[1]+c*s[2],i[1]=t[13]+d*s[0]+h*s[1]+f*s[2],i[2]=t[14]+v*s[0]+g*s[1]+m*s[2],a[0]=y*o[0]+w*o[1]+T*o[2],a[1]=G*o[0]+x*o[1]+_*o[2],a[2]=p*o[0]+b*o[1]+R*o[2],cP(this.min,i,a),uP(this.max,i,a)}},{key:"intersects",value:function(e){var t=this.getMax(),i=this.getMin(),a=e.getMax(),s=e.getMin();return i[0]<=a[0]&&t[0]>=s[0]&&i[1]<=a[1]&&t[1]>=s[1]&&i[2]<=a[2]&&t[2]>=s[2]}},{key:"intersection",value:function(e){if(!this.intersects(e))return null;var t=new r,i=zge([0,0,0],this.getMin(),e.getMin()),a=Vge([0,0,0],this.getMax(),e.getMax());return t.setMinMax(i,a),t}},{key:"getNegativeFarPoint",value:function(e){return e.pnVertexFlag===273?qp([0,0,0],this.min):e.pnVertexFlag===272?[this.min[0],this.min[1],this.max[2]]:e.pnVertexFlag===257?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===256?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===17?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===16?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===1?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]}},{key:"getPositiveFarPoint",value:function(e){return e.pnVertexFlag===273?qp([0,0,0],this.max):e.pnVertexFlag===272?[this.max[0],this.max[1],this.min[2]]:e.pnVertexFlag===257?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===256?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===17?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===16?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===1?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]}}],[{key:"isEmpty",value:function(e){return!e||e.halfExtents[0]===0&&e.halfExtents[1]===0&&e.halfExtents[2]===0}}])}(),Uge=function(){function r(n,e){Er(this,r),this.distance=n||0,this.normal=e||E.al(0,1,0),this.updatePNVertexFlag()}return br(r,[{key:"updatePNVertexFlag",value:function(){this.pnVertexFlag=(+(this.normal[0]>=0)<<8)+(+(this.normal[1]>=0)<<4)+ +(this.normal[2]>=0)}},{key:"distanceToPoint",value:function(e){return E.AK(e,this.normal)-this.distance}},{key:"normalize",value:function(){var e=1/E.Zh(this.normal);E.bA(this.normal,this.normal,e),this.distance*=e}},{key:"intersectsLine",value:function(e,t,i){var a=this.distanceToPoint(e),s=this.distanceToPoint(t),o=a/(a-s),l=o>=0&&o<=1;return l&&i&&E.t7(i,e,t,o),l}}])}(),URe=function(r){return r[r.OUTSIDE=4294967295]="OUTSIDE",r[r.INSIDE=0]="INSIDE",r[r.INDETERMINATE=2147483647]="INDETERMINATE",r}({}),jge=function(){function r(n){if(Er(this,r),this.planes=[],n)this.planes=n;else for(var e=0;e<6;e++)this.planes.push(new Uge)}return br(r,[{key:"extractFromVPMatrix",value:function(e){var t=Ds(e,16),i=t[0],a=t[1],s=t[2],o=t[3],l=t[4],u=t[5],c=t[6],d=t[7],h=t[8],f=t[9],v=t[10],g=t[11],m=t[12],y=t[13],w=t[14],T=t[15];E.t8(this.planes[0].normal,o-i,d-l,g-h),this.planes[0].distance=T-m,E.t8(this.planes[1].normal,o+i,d+l,g+h),this.planes[1].distance=T+m,E.t8(this.planes[2].normal,o+a,d+u,g+f),this.planes[2].distance=T+y,E.t8(this.planes[3].normal,o-a,d-u,g-f),this.planes[3].distance=T-y,E.t8(this.planes[4].normal,o-s,d-c,g-v),this.planes[4].distance=T-w,E.t8(this.planes[5].normal,o+s,d+c,g+v),this.planes[5].distance=T+w,this.planes.forEach(function(G){G.normalize(),G.updatePNVertexFlag()})}}])}(),ch=function(){function r(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Er(this,r),this.x=0,this.y=0,this.x=n,this.y=e}return br(r,[{key:"clone",value:function(){return new r(this.x,this.y)}},{key:"copyFrom",value:function(e){this.x=e.x,this.y=e.y}}])}(),e0=function(){function r(n,e,t,i){Er(this,r),this.x=n,this.y=e,this.width=t,this.height=i,this.left=n,this.right=n+t,this.top=e,this.bottom=e+i}return br(r,[{key:"toJSON",value:function(){}}],[{key:"fromRect",value:function(e){return new r(e.x,e.y,e.width,e.height)}},{key:"applyTransform",value:function(e,t){var i=me.al(e.x,e.y,0,1),a=me.al(e.x+e.width,e.y,0,1),s=me.al(e.x,e.y+e.height,0,1),o=me.al(e.x+e.width,e.y+e.height,0,1),l=me.Ue(),u=me.Ue(),c=me.Ue(),d=me.Ue();me.fF(l,i,t),me.fF(u,a,t),me.fF(c,s,t),me.fF(d,o,t);var h=Math.min(l[0],u[0],c[0],d[0]),f=Math.min(l[1],u[1],c[1],d[1]),v=Math.max(l[0],u[0],c[0],d[0]),g=Math.max(l[1],u[1],c[1],d[1]);return r.fromRect({x:h,y:f,width:v-h,height:g-f})}}])}(),Ns="Method not implemented.",jRe="Use document.documentElement instead.",Hge="Cannot append a destroyed element.";function t0(r){return r===void 0?0:r>360||r<-360?r%360:r}var dP=E.Ue();function pc(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;return Array.isArray(r)&&r.length===3?t?E.d9(r):E.JG(dP,r):(0,pe.Z)(r)?t?E.al(r,n,e):E.t8(dP,r,n,e):t?E.al(r[0],r[1]||n,r[2]||e):E.t8(dP,r[0],r[1]||n,r[2]||e)}var Wge=Math.PI/180;function gs(r){return r*Wge}var Yge=180/Math.PI;function dh(r){return r*Yge}var Zge=.9;function HRe(r){return r%=400,r<0&&(r+=400),r*Zge}function WRe(r){return r/360}function Xge(r){return 360*r}var Ck=Math.PI/2;function Kge(r,n){var e=n[0],t=n[1],i=n[2],a=n[3],s=e*e,o=t*t,l=i*i,u=a*a,c=s+o+l+u,d=e*a-t*i;return d>.499995*c?(r[0]=Ck,r[1]=2*Math.atan2(t,e),r[2]=0):d<-.499995*c?(r[0]=-Ck,r[1]=2*Math.atan2(t,e),r[2]=0):(r[0]=Math.asin(2*(e*i-a*t)),r[1]=Math.atan2(2*(e*a+t*i),1-2*(l+u)),r[2]=Math.atan2(2*(e*t+i*a),1-2*(o+l))),r}function Jge(r,n){var e,t,i=L.getScaling(E.Ue(),n),a=Ds(i,3),s=a[0],o=a[1],l=a[2],u=Math.asin(-n[2]/s);return u<Ck?u>-Ck?(e=Math.atan2(n[6]/o,n[10]/l),t=Math.atan2(n[1]/s,n[0]/s)):(t=0,e=-Math.atan2(n[4]/o,n[5]/o)):(t=0,e=Math.atan2(n[4]/o,n[5]/o)),r[0]=e,r[1]=u,r[2]=t,r}function hP(r,n){return n.length===16?Jge(r,n):Kge(r,n)}function Qge(r,n,e,t,i){var a=Math.cos(r),s=Math.sin(r);return Ke.al(t*a,i*s,0,-t*s,i*a,0,n,e,1)}function qge(r,n,e,t,i,a,s){var o=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1,l=2*a,u=e-n,c=t-i,d=l/u,h=l/c,f=(e+n)/u,v=(t+i)/c,g,m,y=s-a,w=s*a;return o?(g=-s/y,m=-w/y):(g=-(s+a)/y,m=-2*w/y),r[0]=d,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=h,r[6]=0,r[7]=0,r[8]=f,r[9]=v,r[10]=g,r[11]=-1,r[12]=0,r[13]=0,r[14]=m,r[15]=0,r}function zB(r){var n=r[0],e=r[1],t=r[3],i=r[4],a=Math.sqrt(n*n+e*e),s=Math.sqrt(t*t+i*i),o=n*i-e*t;if(o<0&&(n<i?a=-a:s=-s),a){var l=1/a;n*=l,e*=l}if(s){var u=1/s;t*=u,i*=u}var c=Math.atan2(e,n),d=dh(c);return[r[6],r[7],a,s,d]}var gv=L.create(),vf=L.create(),cx=me.Ue(),zi=[E.Ue(),E.Ue(),E.Ue()],VB=E.Ue();function e_e(r,n,e,t,i,a){if(!t_e(gv,r)||(L.copy(vf,gv),vf[3]=0,vf[7]=0,vf[11]=0,vf[15]=1,Math.abs(L.determinant(vf))<1e-8))return!1;var s=gv[3],o=gv[7],l=gv[11],u=gv[12],c=gv[13],d=gv[14],h=gv[15];if(s!==0||o!==0||l!==0){cx[0]=s,cx[1]=o,cx[2]=l,cx[3]=h;var f=L.invert(vf,vf);if(!f)return!1;L.transpose(vf,vf),me.fF(i,cx,vf)}else i[0]=i[1]=i[2]=0,i[3]=1;if(n[0]=u,n[1]=c,n[2]=d,n_e(zi,gv),e[0]=E.kE(zi[0]),E.Fv(zi[0],zi[0]),t[0]=E.AK(zi[0],zi[1]),fP(zi[1],zi[1],zi[0],1,-t[0]),e[1]=E.kE(zi[1]),E.Fv(zi[1],zi[1]),t[0]/=e[1],t[1]=E.AK(zi[0],zi[2]),fP(zi[2],zi[2],zi[0],1,-t[1]),t[2]=E.AK(zi[1],zi[2]),fP(zi[2],zi[2],zi[1],1,-t[2]),e[2]=E.kE(zi[2]),E.Fv(zi[2],zi[2]),t[1]/=e[2],t[2]/=e[2],E.kC(VB,zi[1],zi[2]),E.AK(zi[0],VB)<0)for(var v=0;v<3;v++)e[v]*=-1,zi[v][0]*=-1,zi[v][1]*=-1,zi[v][2]*=-1;return a[0]=.5*Math.sqrt(Math.max(1+zi[0][0]-zi[1][1]-zi[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-zi[0][0]+zi[1][1]-zi[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-zi[0][0]-zi[1][1]+zi[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+zi[0][0]+zi[1][1]+zi[2][2],0)),zi[2][1]>zi[1][2]&&(a[0]=-a[0]),zi[0][2]>zi[2][0]&&(a[1]=-a[1]),zi[1][0]>zi[0][1]&&(a[2]=-a[2]),!0}function t_e(r,n){var e=n[15];if(e===0)return!1;for(var t=1/e,i=0;i<16;i++)r[i]=n[i]*t;return!0}function n_e(r,n){r[0][0]=n[0],r[0][1]=n[1],r[0][2]=n[2],r[1][0]=n[4],r[1][1]=n[5],r[1][2]=n[6],r[2][0]=n[8],r[2][1]=n[9],r[2][2]=n[10]}function fP(r,n,e,t,i){r[0]=n[0]*t+e[0]*i,r[1]=n[1]*t+e[1]*i,r[2]=n[2]*t+e[2]*i}var Os=function(r){return r[r.ORBITING=0]="ORBITING",r[r.EXPLORING=1]="EXPLORING",r[r.TRACKING=2]="TRACKING",r}({}),UB=function(r){return r[r.DEFAULT=0]="DEFAULT",r[r.ROTATIONAL=1]="ROTATIONAL",r[r.TRANSLATIONAL=2]="TRANSLATIONAL",r[r.CINEMATIC=3]="CINEMATIC",r}({}),gf=function(r){return r[r.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",r[r.PERSPECTIVE=1]="PERSPECTIVE",r}({}),r_e={UPDATED:"updated"},jB=2e-4,HB=function(){function r(){Er(this,r),this.clipSpaceNearZ=lP.NEGATIVE_ONE,this.eventEmitter=new Se.Z,this.matrix=L.create(),this.right=E.al(1,0,0),this.up=E.al(0,1,0),this.forward=E.al(0,0,1),this.position=E.al(0,0,1),this.focalPoint=E.al(0,0,0),this.distanceVector=E.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=L.create(),this.projectionMatrixInverse=L.create(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=Os.EXPLORING,this.trackingMode=UB.DEFAULT,this.projectionMode=gf.PERSPECTIVE,this.frustum=new jge,this.orthoMatrix=L.create()}return br(r,[{key:"isOrtho",value:function(){return this.projectionMode===gf.ORTHOGRAPHIC}},{key:"getProjectionMode",value:function(){return this.projectionMode}},{key:"getPerspective",value:function(){return this.jitteredProjectionMatrix||this.projectionMatrix}},{key:"getPerspectiveInverse",value:function(){return this.projectionMatrixInverse}},{key:"getFrustum",value:function(){return this.frustum}},{key:"getPosition",value:function(){return this.position}},{key:"getFocalPoint",value:function(){return this.focalPoint}},{key:"getDollyingStep",value:function(){return this.dollyingStep}},{key:"getNear",value:function(){return this.near}},{key:"getFar",value:function(){return this.far}},{key:"getZoom",value:function(){return this.zoom}},{key:"getOrthoMatrix",value:function(){return this.orthoMatrix}},{key:"getView",value:function(){return this.view}},{key:"setEnableUpdate",value:function(e){this.enableUpdate=e}},{key:"setType",value:function(e,t){return this.type=e,this.type===Os.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===Os.TRACKING&&t!==void 0&&this.setTrackingMode(t),this}},{key:"setProjectionMode",value:function(e){return this.projectionMode=e,this}},{key:"setTrackingMode",value:function(e){if(this.type!==Os.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=e,this}},{key:"setWorldRotation",value:function(e){return this.rotateWorld=e,this._getAngles(),this}},{key:"getViewTransform",value:function(){return L.invert(L.create(),this.matrix)}},{key:"getWorldTransform",value:function(){return this.matrix}},{key:"jitterProjectionMatrix",value:function(e,t){var i=L.fromTranslation(L.create(),[e,t,0]);this.jitteredProjectionMatrix=L.multiply(L.create(),i,this.projectionMatrix)}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0}},{key:"setMatrix",value:function(e){return this.matrix=e,this._update(),this}},{key:"setProjectionMatrix",value:function(e){this.projectionMatrix=e}},{key:"setFov",value:function(e){return this.setPerspective(this.near,this.far,e,this.aspect),this}},{key:"setAspect",value:function(e){return this.setPerspective(this.near,this.far,this.fov,e),this}},{key:"setNear",value:function(e){return this.projectionMode===gf.PERSPECTIVE?this.setPerspective(e,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,e,this.far),this}},{key:"setFar",value:function(e){return this.projectionMode===gf.PERSPECTIVE?this.setPerspective(this.near,e,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,e),this}},{key:"setViewOffset",value:function(e,t,i,a,s,o){return this.aspect=e/t,this.view===void 0&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=a,this.view.width=s,this.view.height=o,this.projectionMode===gf.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===gf.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"setZoom",value:function(e){return this.zoom=e,this.projectionMode===gf.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===gf.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this}},{key:"setZoomByViewportPoint",value:function(e,t){var i=this.canvas.viewport2Canvas({x:t[0],y:t[1]}),a=i.x,s=i.y,o=this.roll;this.rotate(0,0,-o),this.setPosition(a,s),this.setFocalPoint(a,s),this.setZoom(e),this.rotate(0,0,o);var l=this.canvas.viewport2Canvas({x:t[0],y:t[1]}),u=l.x,c=l.y,d=E.al(u-a,c-s,0),h=E.AK(d,this.right)/E.kE(this.right),f=E.AK(d,this.up)/E.kE(this.up),v=this.getPosition(),g=Ds(v,2),m=g[0],y=g[1],w=this.getFocalPoint(),T=Ds(w,2),G=T[0],x=T[1];return this.setPosition(m-h,y-f),this.setFocalPoint(G-h,x-f),this}},{key:"setPerspective",value:function(e,t,i,a){var s;this.projectionMode=gf.PERSPECTIVE,this.fov=i,this.near=e,this.far=t,this.aspect=a;var o=this.near*Math.tan(gs(.5*this.fov))/this.zoom,l=2*o,u=this.aspect*l,c=-.5*u;if((s=this.view)!==null&&s!==void 0&&s.enabled){var d=this.view.fullWidth,h=this.view.fullHeight;c+=this.view.offsetX*u/d,o-=this.view.offsetY*l/h,u*=this.view.width/d,l*=this.view.height/h}return qge(this.projectionMatrix,c,c+u,o-l,o,e,this.far,this.clipSpaceNearZ===lP.ZERO),L.invert(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this}},{key:"setOrthographic",value:function(e,t,i,a,s,o){var l;this.projectionMode=gf.ORTHOGRAPHIC,this.rright=t,this.left=e,this.top=i,this.bottom=a,this.near=s,this.far=o;var u=(this.rright-this.left)/(2*this.zoom),c=(this.top-this.bottom)/(2*this.zoom),d=(this.rright+this.left)/2,h=(this.top+this.bottom)/2,f=d-u,v=d+u,g=h+c,m=h-c;if((l=this.view)!==null&&l!==void 0&&l.enabled){var y=(this.rright-this.left)/this.view.fullWidth/this.zoom,w=(this.top-this.bottom)/this.view.fullHeight/this.zoom;f+=y*this.view.offsetX,v=f+y*this.view.width,g-=w*this.view.offsetY,m=g-w*this.view.height}return this.clipSpaceNearZ===lP.NEGATIVE_ONE?L.ortho(this.projectionMatrix,f,v,g,m,s,o):L.orthoZO(this.projectionMatrix,f,v,g,m,s,o),L.invert(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this}},{key:"setPosition",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.position[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.position[2],a=pc(e,t,i);return this._setPosition(a),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this}},{key:"setFocalPoint",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.focalPoint[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.focalPoint[2],a=E.al(0,1,0);if(this.focalPoint=pc(e,t,i),this.trackingMode===UB.CINEMATIC){var s=E.$X(E.Ue(),this.focalPoint,this.position);e=s[0],t=s[1],i=s[2];var o=E.kE(s),l=dh(Math.asin(t/o)),u=90+dh(Math.atan2(i,e)),c=L.create();L.rotateY(c,c,gs(u)),L.rotateX(c,c,gs(l)),a=E.fF(E.Ue(),[0,1,0],c)}return L.invert(this.matrix,L.lookAt(L.create(),this.position,this.focalPoint,a)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this}},{key:"getDistance",value:function(){return this.distance}},{key:"getDistanceVector",value:function(){return this.distanceVector}},{key:"setDistance",value:function(e){if(this.distance===e||e<0)return this;this.distance=e,this.distance<jB&&(this.distance=jB),this.dollyingStep=this.distance/100;var t=E.Ue();e=this.distance;var i=this.forward,a=this.focalPoint;return t[0]=e*i[0]+a[0],t[1]=e*i[1]+a[1],t[2]=e*i[2]+a[2],this._setPosition(t),this.triggerUpdate(),this}},{key:"setMaxDistance",value:function(e){return this.maxDistance=e,this}},{key:"setMinDistance",value:function(e){return this.minDistance=e,this}},{key:"setAzimuth",value:function(e){return this.azimuth=t0(e),this.computeMatrix(),this._getAxes(),this.type===Os.ORBITING||this.type===Os.EXPLORING?this._getPosition():this.type===Os.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getAzimuth",value:function(){return this.azimuth}},{key:"setElevation",value:function(e){return this.elevation=t0(e),this.computeMatrix(),this._getAxes(),this.type===Os.ORBITING||this.type===Os.EXPLORING?this._getPosition():this.type===Os.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getElevation",value:function(){return this.elevation}},{key:"setRoll",value:function(e){return this.roll=t0(e),this.computeMatrix(),this._getAxes(),this.type===Os.ORBITING||this.type===Os.EXPLORING?this._getPosition():this.type===Os.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getRoll",value:function(){return this.roll}},{key:"_update",value:function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()}},{key:"computeMatrix",value:function(){var e=X.yY(X.Ue(),[0,0,1],gs(this.roll));L.identity(this.matrix);var t=X.yY(X.Ue(),[1,0,0],gs((this.rotateWorld&&this.type!==Os.TRACKING||this.type===Os.TRACKING?1:-1)*this.elevation)),i=X.yY(X.Ue(),[0,1,0],gs((this.rotateWorld&&this.type!==Os.TRACKING||this.type===Os.TRACKING?1:-1)*this.azimuth)),a=X.Jp(X.Ue(),i,t);a=X.Jp(X.Ue(),a,e);var s=L.fromQuat(L.create(),a);this.type===Os.ORBITING||this.type===Os.EXPLORING?(L.translate(this.matrix,this.matrix,this.focalPoint),L.multiply(this.matrix,this.matrix,s),L.translate(this.matrix,this.matrix,[0,0,this.distance])):this.type===Os.TRACKING&&(L.translate(this.matrix,this.matrix,this.position),L.multiply(this.matrix,this.matrix,s))}},{key:"_setPosition",value:function(e,t,i){this.position=pc(e,t,i);var a=this.matrix;a[12]=this.position[0],a[13]=this.position[1],a[14]=this.position[2],a[15]=1,this._getOrthoMatrix()}},{key:"_getAxes",value:function(){E.JG(this.right,pc(me.fF(me.Ue(),[1,0,0,0],this.matrix))),E.JG(this.up,pc(me.fF(me.Ue(),[0,1,0,0],this.matrix))),E.JG(this.forward,pc(me.fF(me.Ue(),[0,0,1,0],this.matrix))),E.Fv(this.right,this.right),E.Fv(this.up,this.up),E.Fv(this.forward,this.forward)}},{key:"_getAngles",value:function(){var e=this.distanceVector[0],t=this.distanceVector[1],i=this.distanceVector[2],a=E.kE(this.distanceVector);if(a===0){this.elevation=0,this.azimuth=0;return}this.type===Os.TRACKING?(this.elevation=dh(Math.asin(t/a)),this.azimuth=dh(Math.atan2(-e,-i))):this.rotateWorld?(this.elevation=dh(Math.asin(t/a)),this.azimuth=dh(Math.atan2(-e,-i))):(this.elevation=-dh(Math.asin(t/a)),this.azimuth=-dh(Math.atan2(-e,-i)))}},{key:"_getPosition",value:function(){E.JG(this.position,pc(me.fF(me.Ue(),[0,0,0,1],this.matrix))),this._getDistance()}},{key:"_getFocalPoint",value:function(){E.kK(this.distanceVector,[0,0,-this.distance],Ke.xO(Ke.Ue(),this.matrix)),E.IH(this.focalPoint,this.position,this.distanceVector),this._getDistance()}},{key:"_getDistance",value:function(){this.distanceVector=E.$X(E.Ue(),this.focalPoint,this.position),this.distance=E.kE(this.distanceVector),this.dollyingStep=this.distance/100}},{key:"_getOrthoMatrix",value:function(){if(this.projectionMode===gf.ORTHOGRAPHIC){var e=this.position,t=X.yY(X.Ue(),[0,0,1],-this.roll*Math.PI/180);L.fromRotationTranslationScaleOrigin(this.orthoMatrix,t,E.al((this.rright-this.left)/2-e[0],(this.top-this.bottom)/2-e[1],0),E.al(this.zoom,this.zoom,1),e)}}},{key:"triggerUpdate",value:function(){if(this.enableUpdate){var e=this.getViewTransform(),t=L.multiply(L.create(),this.getPerspective(),e);this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(r_e.UPDATED)}}},{key:"rotate",value:function(e,t,i){throw new Error(Ns)}},{key:"pan",value:function(e,t){throw new Error(Ns)}},{key:"dolly",value:function(e){throw new Error(Ns)}},{key:"createLandmark",value:function(e,t){throw new Error(Ns)}},{key:"gotoLandmark",value:function(e,t){throw new Error(Ns)}},{key:"cancelLandmarkAnimation",value:function(){throw new Error(Ns)}}])}(),i_e=function(r){return r[r.Standard=0]="Standard",r}({}),vP=function(r){return r[r.ADDED=0]="ADDED",r[r.REMOVED=1]="REMOVED",r[r.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED",r}({}),WB={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new e0(0,0,0,0)},Yn=function(r){return r.COORDINATE="<coordinate>",r.COLOR="<color>",r.PAINT="<paint>",r.NUMBER="<number>",r.ANGLE="<angle>",r.OPACITY_VALUE="<opacity-value>",r.SHADOW_BLUR="<shadow-blur>",r.LENGTH="<length>",r.PERCENTAGE="<percentage>",r.LENGTH_PERCENTAGE="<length> | <percentage>",r.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",r.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",r.LIST_OF_POINTS="<list-of-points>",r.PATH="<path>",r.FILTER="<filter>",r.Z_INDEX="<z-index>",r.OFFSET_DISTANCE="<offset-distance>",r.DEFINED_PATH="<defined-path>",r.MARKER="<marker>",r.TRANSFORM="<transform>",r.TRANSFORM_ORIGIN="<transform-origin>",r.TEXT="<text>",r.TEXT_TRANSFORM="<text-transform>",r}({});function yc(r,n){if(typeof r!="function"||n!=null&&typeof n!="function")throw new TypeError("Expected a function");var e=function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var o=n?n.apply(this,a):a[0],l=e.cache;if(l.has(o))return l.get(o);var u=r.apply(this,a);return e.cache=l.set(o,u)||l,u};return e.cache=new(yc.Cache||Map),e}yc.Cache=Map;var nr=function(r){return r[r.kUnknown=0]="kUnknown",r[r.kNumber=1]="kNumber",r[r.kPercentage=2]="kPercentage",r[r.kEms=3]="kEms",r[r.kPixels=4]="kPixels",r[r.kRems=5]="kRems",r[r.kDegrees=6]="kDegrees",r[r.kRadians=7]="kRadians",r[r.kGradians=8]="kGradians",r[r.kTurns=9]="kTurns",r[r.kMilliseconds=10]="kMilliseconds",r[r.kSeconds=11]="kSeconds",r[r.kInteger=12]="kInteger",r}({}),_f=function(r){return r[r.kUNumber=0]="kUNumber",r[r.kUPercent=1]="kUPercent",r[r.kULength=2]="kULength",r[r.kUAngle=3]="kUAngle",r[r.kUTime=4]="kUTime",r[r.kUOther=5]="kUOther",r}({}),a_e=function(r){return r[r.kYes=0]="kYes",r[r.kNo=1]="kNo",r}({}),s_e=function(r){return r[r.kYes=0]="kYes",r[r.kNo=1]="kNo",r}({}),o_e=[{name:"em",unit_type:nr.kEms},{name:"px",unit_type:nr.kPixels},{name:"deg",unit_type:nr.kDegrees},{name:"rad",unit_type:nr.kRadians},{name:"grad",unit_type:nr.kGradians},{name:"ms",unit_type:nr.kMilliseconds},{name:"s",unit_type:nr.kSeconds},{name:"rem",unit_type:nr.kRems},{name:"turn",unit_type:nr.kTurns}],n0=function(r){return r[r.kUnknownType=0]="kUnknownType",r[r.kUnparsedType=1]="kUnparsedType",r[r.kKeywordType=2]="kKeywordType",r[r.kUnitType=3]="kUnitType",r[r.kSumType=4]="kSumType",r[r.kProductType=5]="kProductType",r[r.kNegateType=6]="kNegateType",r[r.kInvertType=7]="kInvertType",r[r.kMinType=8]="kMinType",r[r.kMaxType=9]="kMaxType",r[r.kClampType=10]="kClampType",r[r.kTransformType=11]="kTransformType",r[r.kPositionType=12]="kPositionType",r[r.kURLImageType=13]="kURLImageType",r[r.kColorType=14]="kColorType",r[r.kUnsupportedColorType=15]="kUnsupportedColorType",r}({}),l_e=function(n){return o_e.find(function(e){return e.name===n}).unit_type},u_e=function(n){return n?n==="number"?nr.kNumber:n==="percent"||n==="%"?nr.kPercentage:l_e(n):nr.kUnknown},c_e=function(n){switch(n){case nr.kNumber:case nr.kInteger:return _f.kUNumber;case nr.kPercentage:return _f.kUPercent;case nr.kPixels:return _f.kULength;case nr.kMilliseconds:case nr.kSeconds:return _f.kUTime;case nr.kDegrees:case nr.kRadians:case nr.kGradians:case nr.kTurns:return _f.kUAngle;default:return _f.kUOther}},d_e=function(n){switch(n){case _f.kUNumber:return nr.kNumber;case _f.kULength:return nr.kPixels;case _f.kUPercent:return nr.kPercentage;case _f.kUTime:return nr.kSeconds;case _f.kUAngle:return nr.kDegrees;default:return nr.kUnknown}},YB=function(n){var e=1;switch(n){case nr.kPixels:case nr.kDegrees:case nr.kSeconds:break;case nr.kMilliseconds:e=.001;break;case nr.kRadians:e=180/Math.PI;break;case nr.kGradians:e=.9;break;case nr.kTurns:e=360;break}return e},gP=function(n){switch(n){case nr.kNumber:case nr.kInteger:return"";case nr.kPercentage:return"%";case nr.kEms:return"em";case nr.kRems:return"rem";case nr.kPixels:return"px";case nr.kDegrees:return"deg";case nr.kRadians:return"rad";case nr.kGradians:return"grad";case nr.kMilliseconds:return"ms";case nr.kSeconds:return"s";case nr.kTurns:return"turn"}return""},Mk=function(){function r(){Er(this,r)}return br(r,[{key:"toString",value:function(){return this.buildCSSText(a_e.kNo,s_e.kNo,"")}},{key:"isNumericValue",value:function(){return this.getType()>=n0.kUnitType&&this.getType()<=n0.kClampType}}],[{key:"isAngle",value:function(e){return e===nr.kDegrees||e===nr.kRadians||e===nr.kGradians||e===nr.kTurns}},{key:"isLength",value:function(e){return e>=nr.kEms&&e<nr.kDegrees}},{key:"isRelativeUnit",value:function(e){return e===nr.kPercentage||e===nr.kEms||e===nr.kRems}},{key:"isTime",value:function(e){return e===nr.kSeconds||e===nr.kMilliseconds}}])}(),h_e=function(r){function n(e){var t;return Er(this,n),t=Ms(this,n),t.colorSpace=e,t}return Ps(n,r),br(n,[{key:"getType",value:function(){return n0.kColorType}},{key:"to",value:function(t){return this}}])}(Mk),Pk=function(r){return r[r.Constant=0]="Constant",r[r.LinearGradient=1]="LinearGradient",r[r.RadialGradient=2]="RadialGradient",r}({}),Nk=function(r){function n(e,t){var i;return Er(this,n),i=Ms(this,n),i.type=e,i.value=t,i}return Ps(n,r),br(n,[{key:"clone",value:function(){return new n(this.type,this.value)}},{key:"buildCSSText",value:function(t,i,a){return a}},{key:"getType",value:function(){return n0.kColorType}}])}(Mk),hh=function(r){function n(e){var t;return Er(this,n),t=Ms(this,n),t.value=e,t}return Ps(n,r),br(n,[{key:"clone",value:function(){return new n(this.value)}},{key:"getType",value:function(){return n0.kKeywordType}},{key:"buildCSSText",value:function(t,i,a){return a+this.value}}])}(Mk),f_e=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",t="";return Number.isFinite(n)?t="NaN":n>0?t="infinity":t="-infinity",t+=e},_P=function(n){return d_e(c_e(n))},_s=function(r){function n(e){var t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:nr.kNumber;Er(this,n),t=Ms(this,n);var a;return typeof i=="string"?a=u_e(i):a=i,t.unit=a,t.value=e,t}return Ps(n,r),br(n,[{key:"clone",value:function(){return new n(this.value,this.unit)}},{key:"equals",value:function(t){var i=t;return this.value===i.value&&this.unit===i.unit}},{key:"getType",value:function(){return n0.kUnitType}},{key:"convertTo",value:function(t){if(this.unit===t)return new n(this.value,this.unit);var i=_P(this.unit);if(i!==_P(t)||i===nr.kUnknown)return null;var a=YB(this.unit)/YB(t);return new n(this.value*a,t)}},{key:"buildCSSText",value:function(t,i,a){var s;switch(this.unit){case nr.kUnknown:break;case nr.kInteger:s=Number(this.value).toFixed(0);break;case nr.kNumber:case nr.kPercentage:case nr.kEms:case nr.kRems:case nr.kPixels:case nr.kDegrees:case nr.kRadians:case nr.kGradians:case nr.kMilliseconds:case nr.kSeconds:case nr.kTurns:{var o=-999999,l=999999,u=this.value,c=gP(this.unit);if(u<o||u>l){var d=gP(this.unit);!Number.isFinite(u)||Number.isNaN(u)?s=f_e(u,d):s=u+(d||"")}else s="".concat(u).concat(c)}}return a+=s,a}}])}(Mk),mf=new _s(0,"px");new _s(1,"px");var um=new _s(0,"deg"),mP=function(r){function n(e,t,i){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;return Er(this,n),a=Ms(this,n,["rgb"]),a.r=e,a.g=t,a.b=i,a.alpha=s,a.isNone=o,a}return Ps(n,r),br(n,[{key:"clone",value:function(){return new n(this.r,this.g,this.b,this.alpha)}},{key:"buildCSSText",value:function(t,i,a){return"".concat(a,"rgba(").concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")}}])}(h_e),ZB=new hh("unset"),v_e=new hh("initial"),g_e=new hh("inherit"),pP={"":ZB,unset:ZB,initial:v_e,inherit:g_e},__e=function(n){return pP[n]||(pP[n]=new hh(n)),pP[n]},XB=new mP(0,0,0,0,!0),KB=new mP(0,0,0,0),m_e=yc(function(r,n,e,t){return new mP(r,n,e,t)},function(r,n,e,t){return"rgba(".concat(r,",").concat(n,",").concat(e,",").concat(t,")")}),Co=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:nr.kNumber;return new _s(n,e)};new _s(50,"%");function p_e(r){var n=r.type,e=r.value;return n==="hex"?"#".concat(e):n==="literal"?e:n==="rgb"?"rgb(".concat(e.join(","),")"):"rgba(".concat(e.join(","),")")}var y_e=function(){var r={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},n="";function e(V){throw new Error("".concat(n,": ").concat(V))}function t(){var V=i();return n.length>0&&e("Invalid input not EOF"),V}function i(){return T(a)}function a(){return s("linear-gradient",r.linearGradient,l)||s("repeating-linear-gradient",r.repeatingLinearGradient,l)||s("radial-gradient",r.radialGradient,d)||s("repeating-radial-gradient",r.repeatingRadialGradient,d)||s("conic-gradient",r.conicGradient,d)}function s(V,ee,he){return o(ee,function(ut){var ct=he();return ct&&(ue(r.comma)||e("Missing comma before color stops")),{type:V,orientation:ct,colorStops:T(G)}})}function o(V,ee){var he=ue(V);if(he){ue(r.startCall)||e("Missing (");var ut=ee(he);return ue(r.endCall)||e("Missing )"),ut}}function l(){return u()||c()}function u(){return le("directional",r.sideOrCorner,1)}function c(){return le("angular",r.angleValue,1)}function d(){var V,ee=h(),he;return ee&&(V=[],V.push(ee),he=n,ue(r.comma)&&(ee=h(),ee?V.push(ee):n=he)),V}function h(){var V=f()||v();if(V)V.at=m();else{var ee=g();if(ee){V=ee;var he=m();he&&(V.at=he)}else{var ut=y();ut&&(V={type:"default-radial",at:ut})}}return V}function f(){var V=le("shape",/^(circle)/i,0);return V&&(V.style=te()||g()),V}function v(){var V=le("shape",/^(ellipse)/i,0);return V&&(V.style=j()||g()),V}function g(){return le("extent-keyword",r.extentKeywords,1)}function m(){if(le("position",/^at/,0)){var V=y();return V||e("Missing positioning value"),V}}function y(){var V=w();if(V.x||V.y)return{type:"position",value:V}}function w(){return{x:j(),y:j()}}function T(V){var ee=V(),he=[];if(ee)for(he.push(ee);ue(r.comma);)ee=V(),ee?he.push(ee):e("One extra comma");return he}function G(){var V=x();return V||e("Expected color definition"),V.length=j(),V}function x(){return p()||R()||b()||_()}function _(){return le("literal",r.literalColor,0)}function p(){return le("hex",r.hexColor,1)}function b(){return o(r.rgbColor,function(){return{type:"rgb",value:T(B)}})}function R(){return o(r.rgbaColor,function(){return{type:"rgba",value:T(B)}})}function B(){return ue(r.number)[1]}function j(){return le("%",r.percentageValue,1)||Z()||te()}function Z(){return le("position-keyword",r.positionKeywords,1)}function te(){return le("px",r.pixelValue,1)||le("em",r.emValue,1)}function le(V,ee,he){var ut=ue(ee);if(ut)return{type:V,value:ut[he]}}function ue(V){var ee=/^[\n\r\t\s]+/.exec(n);ee&&se(ee[0].length);var he=V.exec(n);return he&&se(he[0].length),he}function se(V){n=n.substring(V)}return function(V){return n=V,t()}}();function YRe(r,n,e,t){var i=gs(t.value),a=0,s=0,o=a+n/2,l=s+e/2,u=Math.abs(n*Math.cos(i))+Math.abs(e*Math.sin(i)),c=r[0]+o-Math.cos(i)*u/2,d=r[1]+l-Math.sin(i)*u/2,h=r[0]+o+Math.cos(i)*u/2,f=r[1]+l+Math.sin(i)*u/2;return{x1:c,y1:d,x2:h,y2:f}}function ZRe(r,n,e,t,i,a){var s=t.value,o=i.value;t.unit===nr.kPercentage&&(s=t.value/100*n),i.unit===nr.kPercentage&&(o=i.value/100*e);var l=Math.max(distanceSquareRoot([0,0],[s,o]),distanceSquareRoot([0,e],[s,o]),distanceSquareRoot([n,e],[s,o]),distanceSquareRoot([n,0],[s,o]));return a&&(a instanceof _s?l=a.value:a instanceof hh&&(a.value==="closest-side"?l=Math.min(s,n-s,o,e-o):a.value==="farthest-side"?l=Math.max(s,n-s,o,e-o):a.value==="closest-corner"&&(l=Math.min(distanceSquareRoot([0,0],[s,o]),distanceSquareRoot([0,e],[s,o]),distanceSquareRoot([n,e],[s,o]),distanceSquareRoot([n,0],[s,o]))))),{x:s+r[0],y:o+r[1],r:l}}var x_e=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,E_e=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,b_e=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,JB=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function k_e(r){var n,e=r.length;if(r[e-1].length=(n=r[e-1].length)!==null&&n!==void 0?n:{type:"%",value:"100"},e>1){var t;r[0].length=(t=r[0].length)!==null&&t!==void 0?t:{type:"%",value:"0"}}for(var i=0,a=Number(r[0].length.value),s=1;s<e;s++){var o,l=(o=r[s].length)===null||o===void 0?void 0:o.value;if(!(0,xe.Z)(l)&&!(0,xe.Z)(a)){for(var u=1;u<s-i;u++)r[i+u].length={type:"%",value:"".concat(a+(Number(l)-a)*u/(s-i))};i=s,a=Number(l)}}}var w_e={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},S_e=yc(function(r){var n;return r.type==="angular"?n=Number(r.value):n=w_e[r.value]||0,Co(n,"deg")}),T_e=yc(function(r){var n=50,e=50,t="%",i="%";if((r==null?void 0:r.type)==="position"){var a=r.value,s=a.x,o=a.y;(s==null?void 0:s.type)==="position-keyword"&&(s.value==="left"?n=0:s.value==="center"?n=50:s.value==="right"?n=100:s.value==="top"?e=0:s.value==="bottom"&&(e=100)),(o==null?void 0:o.type)==="position-keyword"&&(o.value==="left"?n=0:o.value==="center"?e=50:o.value==="right"?n=100:o.value==="top"?e=0:o.value==="bottom"&&(e=100)),((s==null?void 0:s.type)==="px"||(s==null?void 0:s.type)==="%"||(s==null?void 0:s.type)==="em")&&(t=s==null?void 0:s.type,n=Number(s.value)),((o==null?void 0:o.type)==="px"||(o==null?void 0:o.type)==="%"||(o==null?void 0:o.type)==="em")&&(i=o==null?void 0:o.type,e=Number(o.value))}return{cx:Co(n,t),cy:Co(e,i)}}),C_e=yc(function(r){if(r.indexOf("linear")>-1||r.indexOf("radial")>-1){var n=y_e(r);return n.map(function(o){var l=o.type,u=o.orientation,c=o.colorStops;k_e(c);var d=c.map(function(T){return{offset:Co(Number(T.length.value),"%"),color:p_e(T)}});if(l==="linear-gradient")return new Nk(Pk.LinearGradient,{angle:u?S_e(u):um,steps:d});if(l==="radial-gradient"&&(u||(u=[{type:"shape",value:"circle"}]),u[0].type==="shape"&&u[0].value==="circle")){var h=T_e(u[0].at),f=h.cx,v=h.cy,g;if(u[0].style){var m=u[0].style,y=m.type,w=m.value;y==="extent-keyword"?g=__e(w):g=Co(w,y)}return new Nk(Pk.RadialGradient,{cx:f,cy:v,size:g,steps:d})}})}var e=r[0];if(r[1]==="("||r[2]==="("){if(e==="l"){var t=x_e.exec(r);if(t){var i,a=((i=t[2].match(JB))===null||i===void 0?void 0:i.map(function(o){return o.split(":")}))||[];return[new Nk(Pk.LinearGradient,{angle:Co(parseFloat(t[1]),"deg"),steps:a.map(function(o){var l=Ds(o,2),u=l[0],c=l[1];return{offset:Co(Number(u)*100,"%"),color:c}})})]}}else if(e==="r"){var s=M_e(r);if(s)if((0,Ze.Z)(s))r=s;else return[new Nk(Pk.RadialGradient,s)]}else if(e==="p")return P_e(r)}});function M_e(r){var n=E_e.exec(r);if(n){var e,t=((e=n[4].match(JB))===null||e===void 0?void 0:e.map(function(i){return i.split(":")}))||[];return{cx:Co(50,"%"),cy:Co(50,"%"),steps:t.map(function(i){var a=Ds(i,2),s=a[0],o=a[1];return{offset:Co(Number(s)*100,"%"),color:o}})}}return null}function P_e(r){var n=b_e.exec(r);if(n){var e=n[1],t=n[2];switch(e){case"a":e="repeat";break;case"x":e="repeat-x";break;case"y":e="repeat-y";break;case"n":e="no-repeat";break;default:e="no-repeat"}return{image:t,repetition:e}}return null}function XRe(r){return!!r.type&&!!r.value}function N_e(r){return r&&!!r.image}function QB(r){return r&&!(0,xe.Z)(r.r)&&!(0,xe.Z)(r.g)&&!(0,xe.Z)(r.b)}var dx=yc(function(r){if(N_e(r))return nl({repetition:"repeat"},r);if((0,xe.Z)(r)&&(r=""),r==="transparent")return KB;if(r==="currentColor")r="black";else if(r==="none")return XB;var n=C_e(r);if(n)return n;var e=kk(r),t=[0,0,0,0];return e!==null&&(t[0]=e.r||0,t[1]=e.g||0,t[2]=e.b||0,t[3]=e.opacity),m_e.apply(void 0,t)});function O_e(r,n){if(!(!QB(r)||!QB(n)))return[[Number(r.r),Number(r.g),Number(r.b),Number(r.alpha)],[Number(n.r),Number(n.g),Number(n.b),Number(n.alpha)],function(e){var t=e.slice();if(t[3])for(var i=0;i<3;i++)t[i]=Math.round((0,O.Z)(t[i],0,255));return t[3]=(0,O.Z)(t[3],0,1),"rgba(".concat(t.join(","),")")}]}function hx(r,n){if((0,xe.Z)(n))return Co(0,"px");if(n="".concat(n).trim().toLowerCase(),isFinite(Number(n))){if("px".search(r)>=0)return Co(Number(n),"px");if("deg".search(r)>=0)return Co(Number(n),"deg")}var e=[];n=n.replace(r,function(i){return e.push(i),"U".concat(i)});var t="U(".concat(r.source,")");return e.map(function(i){return Co(Number(n.replace(new RegExp("U".concat(i),"g"),"").replace(new RegExp(t,"g"),"*0")),i)})[0]}var qB=function(n){return hx(new RegExp("px","g"),n)},R_e=yc(qB),A_e=function(n){return hx(new RegExp("%","g"),n)};yc(A_e);var e6=function(n){return(0,pe.Z)(n)||isFinite(Number(n))?Co(Number(n)||0,"px"):hx(new RegExp("px|%|em|rem","g"),n)},yP=yc(e6),t6=function(n){return hx(new RegExp("deg|rad|grad|turn","g"),n)},L_e=yc(t6);function I_e(r,n,e,t){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a="",s=r.value||0,o=n.value||0,l=_P(r.unit),u=r.convertTo(l),c=n.convertTo(l);return u&&c?(s=u.value,o=c.value,a=gP(r.unit)):(_s.isLength(r.unit)||_s.isLength(n.unit))&&(s=Md(r,i,e),o=Md(n,i,e),a="px"),[s,o,function(d){return t&&(d=Math.max(d,0)),d+a}]}function rd(r){var n=0;return r.unit===nr.kDegrees?n=r.value:r.unit===nr.kRadians?n=dh(Number(r.value)):r.unit===nr.kTurns?n=Xge(Number(r.value)):r.value&&(n=r.value),n}function n6(r,n){var e;return Array.isArray(r)?e=r.map(function(t){return Number(t)}):(0,Ze.Z)(r)?e=r.split(" ").map(function(t){return Number(t)}):(0,pe.Z)(r)&&(e=[r]),n===2?e.length===1?[e[0],e[0]]:[e[0],e[1]]:e.length===1?[e[0],e[0],e[0],e[0]]:e.length===2?[e[0],e[1],e[0],e[1]]:e.length===3?[e[0],e[1],e[2],e[1]]:[e[0],e[1],e[2],e[3]]}function Md(r,n,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(r.unit===nr.kPixels)return Number(r.value);if(r.unit===nr.kPercentage&&e){var i=e.nodeName===Yr.GROUP?e.getLocalBounds():e.getGeometryBounds();return(t?i.min[n]:0)+r.value/100*i.halfExtents[n]*2}return 0}var D_e=function(n){return hx(/deg|rad|grad|turn|px|%/g,n)},F_e=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function B_e(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(r=r.toLowerCase().trim(),r==="none")return[];for(var n=/\s*([\w-]+)\(([^)]*)\)/g,e=[],t,i=0;t=n.exec(r);){if(t.index!==i)return[];if(i=t.index+t[0].length,F_e.indexOf(t[1])>-1&&e.push({name:t[1],params:t[2].split(" ").map(function(a){return D_e(a)||dx(a)})}),n.lastIndex===r.length)return e}return[]}function r6(r){return r.toString()}var i6=function(n){return typeof n=="number"?Co(n):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(n)?Co(Number(n)):Co(0)},xP=yc(i6);yc(function(r){return(0,Ze.Z)(r)?r.split(" ").map(xP):r.map(xP)});function EP(r,n){return[r,n,r6]}function bP(r,n){return function(e,t){return[e,t,function(i){return r6((0,O.Z)(i,r,n))}]}}function a6(r,n){if(r.length===n.length)return[r,n,function(e){return e}]}function s6(r){return r.parsedStyle.d.totalLength===0&&(r.parsedStyle.d.totalLength=(0,Um.D)(r.parsedStyle.d.absolutePath)),r.parsedStyle.d.totalLength}function $_e(r){return r.parsedStyle.points.totalLength===0&&(r.parsedStyle.points.totalLength=(0,Nt.hE)(r.parsedStyle.points.points)),r.parsedStyle.points.totalLength}function G_e(r){for(var n=0;n<r.length;n++){var e=r[n-1],t=r[n],i=t[0];if(i==="M"&&e){var a=e[0],s=[t[1],t[2]],o=void 0;a==="L"||a==="M"?o=[e[1],e[2]]:(a==="C"||a==="A"||a==="Q")&&(o=[e[e.length-2],e[e.length-1]]),o&&Ok(s,o)&&(r.splice(n,1),n--)}}}function z_e(r){for(var n=!1,e=r.length,t=0;t<e;t++){var i=r[t],a=i[0];if(a==="C"||a==="A"||a==="Q"){n=!0;break}}return n}function V_e(r){for(var n=[],e=[],t=[],i=0;i<r.length;i++){var a=r[i],s=a[0];s==="M"?(t.length&&(e.push(t),t=[]),t.push([a[1],a[2]])):s==="Z"?t.length&&(n.push(t),t=[]):t.push([a[1],a[2]])}return t.length>0&&e.push(t),{polygons:n,polylines:e}}function Ok(r,n){return r[0]===n[0]&&r[1]===n[1]}function U_e(r,n){for(var e=[],t=[],i=[],a=0;a<r.length;a++){var s=r[a],o=s.currentPoint,l=s.params,u=s.prePoint,c=void 0;switch(s.command){case"Q":c=(0,Nt.x4)(u[0],u[1],l[1],l[2],l[3],l[4]);break;case"C":c=(0,Nt.l5)(u[0],u[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var d=s.arcParams;c=(0,Nt.vp)(d.cx,d.cy,d.rx,d.ry,d.xRotation,d.startAngle,d.endAngle);break;default:e.push(o[0]),t.push(o[1]);break}c&&(s.box=c,e.push(c.x,c.x+c.width),t.push(c.y,c.y+c.height)),n&&(s.command==="L"||s.command==="M")&&s.prePoint&&s.nextPoint&&i.push(s)}e=e.filter(function(G){return!Number.isNaN(G)&&G!==1/0&&G!==-1/0}),t=t.filter(function(G){return!Number.isNaN(G)&&G!==1/0&&G!==-1/0});var h=(0,ne.Z)(e),f=(0,ne.Z)(t),v=(0,qe.Z)(e),g=(0,qe.Z)(t);if(i.length===0)return{x:h,y:f,width:v-h,height:g-f};for(var m=0;m<i.length;m++){var y=i[m],w=y.currentPoint,T=void 0;w[0]===h?(T=Rk(y,n),h-=T.xExtra):w[0]===v&&(T=Rk(y,n),v+=T.xExtra),w[1]===f?(T=Rk(y,n),f-=T.yExtra):w[1]===g&&(T=Rk(y,n),g+=T.yExtra)}return{x:h,y:f,width:v-h,height:g-f}}function Rk(r,n){var e=r.prePoint,t=r.currentPoint,i=r.nextPoint,a=Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2),s=Math.pow(t[0]-i[0],2)+Math.pow(t[1]-i[1],2),o=Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2),l=Math.acos((a+s-o)/(2*Math.sqrt(a)*Math.sqrt(s)));if(!l||Math.sin(l)===0||(0,dt.Z)(l,0))return{xExtra:0,yExtra:0};var u=Math.abs(Math.atan2(i[1]-t[1],i[0]-t[0])),c=Math.abs(Math.atan2(i[0]-t[0],i[1]-t[1]));u=u>Math.PI/2?Math.PI-u:u,c=c>Math.PI/2?Math.PI-c:c;var d={xExtra:Math.cos(l/2-u)*(n/2*(1/Math.sin(l/2)))-n/2||0,yExtra:Math.cos(c-l/2)*(n/2*(1/Math.sin(l/2)))-n/2||0};return d}function o6(r,n){return[n[0]+(n[0]-r[0]),n[1]+(n[1]-r[1])]}var l6=function(n,e){var t=n.x*e.x+n.y*e.y,i=Math.sqrt((Math.pow(n.x,2)+Math.pow(n.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2))),a=n.x*e.y-n.y*e.x<0?-1:1,s=a*Math.acos(t/i);return s},u6=function(n,e,t,i,a,s,o,l){e=Math.abs(e),t=Math.abs(t),i=(0,nt.Z)(i,360);var u=gs(i);if(n.x===o.x&&n.y===o.y)return{x:n.x,y:n.y,ellipticalArcAngle:0};if(e===0||t===0)return{x:0,y:0,ellipticalArcAngle:0};var c=(n.x-o.x)/2,d=(n.y-o.y)/2,h={x:Math.cos(u)*c+Math.sin(u)*d,y:-Math.sin(u)*c+Math.cos(u)*d},f=Math.pow(h.x,2)/Math.pow(e,2)+Math.pow(h.y,2)/Math.pow(t,2);f>1&&(e*=Math.sqrt(f),t*=Math.sqrt(f));var v=Math.pow(e,2)*Math.pow(t,2)-Math.pow(e,2)*Math.pow(h.y,2)-Math.pow(t,2)*Math.pow(h.x,2),g=Math.pow(e,2)*Math.pow(h.y,2)+Math.pow(t,2)*Math.pow(h.x,2),m=v/g;m=m<0?0:m;var y=(a!==s?1:-1)*Math.sqrt(m),w={x:y*(e*h.y/t),y:y*(-(t*h.x)/e)},T={x:Math.cos(u)*w.x-Math.sin(u)*w.y+(n.x+o.x)/2,y:Math.sin(u)*w.x+Math.cos(u)*w.y+(n.y+o.y)/2},G={x:(h.x-w.x)/e,y:(h.y-w.y)/t},x=l6({x:1,y:0},G),_={x:(-h.x-w.x)/e,y:(-h.y-w.y)/t},p=l6(G,_);!s&&p>0?p-=2*Math.PI:s&&p<0&&(p+=2*Math.PI),p%=2*Math.PI;var b=x+p*l,R=e*Math.cos(b),B=t*Math.sin(b),j={x:Math.cos(u)*R-Math.sin(u)*B+T.x,y:Math.sin(u)*R+Math.cos(u)*B+T.y,ellipticalArcStartAngle:x,ellipticalArcEndAngle:x+p,ellipticalArcAngle:b,ellipticalArcCenter:T,resultantRx:e,resultantRy:t};return j};function j_e(r){for(var n=[],e=null,t=null,i=null,a=0,s=r.length,o=0;o<s;o++){var l=r[o];t=r[o+1];var u=l[0],c={command:u,prePoint:e,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(u){case"M":i=[l[1],l[2]],a=o;break;case"A":var d=H_e(e,l);c.arcParams=d;break}if(u==="Z")e=i,t=r[a+1];else{var h=l.length;e=[l[h-2],l[h-1]]}t&&t[0]==="Z"&&(t=r[a],n[a]&&(n[a].prePoint=e)),c.currentPoint=e,n[a]&&Ok(e,n[a].currentPoint)&&(n[a].prePoint=c.prePoint);var f=t?[t[t.length-2],t[t.length-1]]:null;c.nextPoint=f;var v=c.prePoint;if(["L","H","V"].includes(u))c.startTangent=[v[0]-e[0],v[1]-e[1]],c.endTangent=[e[0]-v[0],e[1]-v[1]];else if(u==="Q"){var g=[l[1],l[2]];c.startTangent=[v[0]-g[0],v[1]-g[1]],c.endTangent=[e[0]-g[0],e[1]-g[1]]}else if(u==="T"){var m=n[o-1],y=o6(m.currentPoint,v);m.command==="Q"?(c.command="Q",c.startTangent=[v[0]-y[0],v[1]-y[1]],c.endTangent=[e[0]-y[0],e[1]-y[1]]):(c.command="TL",c.startTangent=[v[0]-e[0],v[1]-e[1]],c.endTangent=[e[0]-v[0],e[1]-v[1]])}else if(u==="C"){var w=[l[1],l[2]],T=[l[3],l[4]];c.startTangent=[v[0]-w[0],v[1]-w[1]],c.endTangent=[e[0]-T[0],e[1]-T[1]],c.startTangent[0]===0&&c.startTangent[1]===0&&(c.startTangent=[w[0]-T[0],w[1]-T[1]]),c.endTangent[0]===0&&c.endTangent[1]===0&&(c.endTangent=[T[0]-w[0],T[1]-w[1]])}else if(u==="S"){var G=n[o-1],x=o6(G.currentPoint,v),_=[l[1],l[2]];G.command==="C"?(c.command="C",c.startTangent=[v[0]-x[0],v[1]-x[1]],c.endTangent=[e[0]-_[0],e[1]-_[1]]):(c.command="SQ",c.startTangent=[v[0]-_[0],v[1]-_[1]],c.endTangent=[e[0]-_[0],e[1]-_[1]])}else if(u==="A"){var p=c6(c,0),b=p.x,R=p.y,B=c6(c,1,!1),j=B.x,Z=B.y;c.startTangent=[b,R],c.endTangent=[j,Z]}n.push(c)}return n}function c6(r,n){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,t=r.arcParams,i=t.rx,a=i===void 0?0:i,s=t.ry,o=s===void 0?0:s,l=t.xRotation,u=t.arcFlag,c=t.sweepFlag,d=u6({x:r.prePoint[0],y:r.prePoint[1]},a,o,l,!!u,!!c,{x:r.currentPoint[0],y:r.currentPoint[1]},n),h=u6({x:r.prePoint[0],y:r.prePoint[1]},a,o,l,!!u,!!c,{x:r.currentPoint[0],y:r.currentPoint[1]},e?n+.005:n-.005),f=h.x-d.x,v=h.y-d.y,g=Math.sqrt(f*f+v*v);return{x:-f/g,y:-v/g}}function Ak(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function kP(r,n){return Ak(r)*Ak(n)?(r[0]*n[0]+r[1]*n[1])/(Ak(r)*Ak(n)):1}function d6(r,n){return(r[0]*n[1]<r[1]*n[0]?-1:1)*Math.acos(kP(r,n))}function H_e(r,n){var e=n[1],t=n[2],i=(0,nt.Z)(gs(n[3]),Math.PI*2),a=n[4],s=n[5],o=r[0],l=r[1],u=n[6],c=n[7],d=Math.cos(i)*(o-u)/2+Math.sin(i)*(l-c)/2,h=-1*Math.sin(i)*(o-u)/2+Math.cos(i)*(l-c)/2,f=d*d/(e*e)+h*h/(t*t);f>1&&(e*=Math.sqrt(f),t*=Math.sqrt(f));var v=e*e*(h*h)+t*t*(d*d),g=v?Math.sqrt((e*e*(t*t)-v)/v):1;a===s&&(g*=-1),isNaN(g)&&(g=0);var m=t?g*e*h/t:0,y=e?g*-t*d/e:0,w=(o+u)/2+Math.cos(i)*m-Math.sin(i)*y,T=(l+c)/2+Math.sin(i)*m+Math.cos(i)*y,G=[(d-m)/e,(h-y)/t],x=[(-1*d-m)/e,(-1*h-y)/t],_=d6([1,0],G),p=d6(G,x);return kP(G,x)<=-1&&(p=Math.PI),kP(G,x)>=1&&(p=0),s===0&&p>0&&(p-=2*Math.PI),s===1&&p<0&&(p+=2*Math.PI),{cx:w,cy:T,rx:Ok(r,[u,c])?0:e,ry:Ok(r,[u,c])?0:t,startAngle:_,endAngle:_+p,xRotation:i,arcFlag:a,sweepFlag:s}}function W_e(r,n,e){return r.reduce(function(t,i){var a="";if(i[0]==="M"||i[0]==="L"){var s=vec3.fromValues(i[1],i[2],0);e&&vec3.transformMat4(s,s,e),a="".concat(i[0]).concat(s[0],",").concat(s[1])}else if(i[0]==="Z")a=i[0];else if(i[0]==="C"){var o=vec3.fromValues(i[1],i[2],0),l=vec3.fromValues(i[3],i[4],0),u=vec3.fromValues(i[5],i[6],0);e&&(vec3.transformMat4(o,o,e),vec3.transformMat4(l,l,e),vec3.transformMat4(u,u,e)),a="".concat(i[0]).concat(o[0],",").concat(o[1],",").concat(l[0],",").concat(l[1],",").concat(u[0],",").concat(u[1])}else if(i[0]==="A"){var c=vec3.fromValues(i[6],i[7],0);e&&vec3.transformMat4(c,c,e),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],",").concat(i[5],",").concat(c[0],",").concat(c[1])}else if(i[0]==="Q"){var d=vec3.fromValues(i[1],i[2],0),h=vec3.fromValues(i[3],i[4],0);e&&(vec3.transformMat4(d,d,e),vec3.transformMat4(h,h,e)),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],"}")}return t+=a},"")}function Y_e(r,n,e,t){return[["M",r,n],["L",e,t]]}function h6(r,n,e,t){var i=(-1+Math.sqrt(2))/3*4,a=r*i,s=n*i,o=e-r,l=e+r,u=t-n,c=t+n;return[["M",o,t],["C",o,t-s,e-a,u,e,u],["C",e+a,u,l,t-s,l,t],["C",l,t+s,e+a,c,e,c],["C",e-a,c,o,t+s,o,t],["Z"]]}function Z_e(r,n){var e=r.map(function(t,i){return[i===0?"M":"L",t[0],t[1]]});return n&&e.push(["Z"]),e}function X_e(r,n,e,t,i){if(i){var a=_slicedToArray(i,4),s=a[0],o=a[1],l=a[2],u=a[3],c=r>0?1:-1,d=n>0?1:-1,h=c+d!==0?1:0;return[["M",c*s+e,t],["L",r-c*o+e,t],o?["A",o,o,0,0,h,r+e,d*o+t]:null,["L",r+e,n-d*l+t],l?["A",l,l,0,0,h,r+e-c*l,n+t]:null,["L",e+c*u,n+t],u?["A",u,u,0,0,h,e,n+t-d*u]:null,["L",e,d*s+t],s?["A",s,s,0,0,h,c*s+e,t]:null,["Z"]].filter(function(f){return f})}return[["M",e,t],["L",e+r,t],["L",e+r,t+n],["L",e,t+n],["Z"]]}function KRe(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r.getLocalTransform(),e=[];switch(r.nodeName){case Yr.LINE:var t=r.parsedStyle,i=t.x1,a=i===void 0?0:i,s=t.y1,o=s===void 0?0:s,l=t.x2,u=l===void 0?0:l,c=t.y2,d=c===void 0?0:c;e=Y_e(a,o,u,d);break;case Yr.CIRCLE:{var h=r.parsedStyle,f=h.r,v=f===void 0?0:f,g=h.cx,m=g===void 0?0:g,y=h.cy,w=y===void 0?0:y;e=h6(v,v,m,w);break}case Yr.ELLIPSE:{var T=r.parsedStyle,G=T.rx,x=G===void 0?0:G,_=T.ry,p=_===void 0?0:_,b=T.cx,R=b===void 0?0:b,B=T.cy,j=B===void 0?0:B;e=h6(x,p,R,j);break}case Yr.POLYLINE:case Yr.POLYGON:var Z=r.parsedStyle.points;e=Z_e(Z.points,r.nodeName===Yr.POLYGON);break;case Yr.RECT:var te=r.parsedStyle,le=te.width,ue=le===void 0?0:le,se=te.height,V=se===void 0?0:se,ee=te.x,he=ee===void 0?0:ee,ut=te.y,ct=ut===void 0?0:ut,Lt=te.radius,vn=Lt&&Lt.some(function(rn){return rn!==0});e=X_e(ue,V,he,ct,vn&&Lt.map(function(rn){return clamp(rn,0,Math.min(Math.abs(ue)/2,Math.abs(V)/2))}));break;case Yr.PATH:var tn=r.parsedStyle.d.absolutePath;e=_toConsumableArray(tn);break}if(e.length)return W_e(e,r,n)}function JRe(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a=r.map(function(s,o){var l=s[0],u=r[o+1],c=o===0&&(n!==0||e!==0),d=(o===r.length-1||u&&(u[0]==="M"||u[0]==="Z"))&&t!==0&&i!==0,h=c?[n,e]:[0,0],f=_slicedToArray(h,2),v=f[0],g=f[1],m=d?[t,i]:[0,0],y=_slicedToArray(m,2),w=y[0],T=y[1];switch(l){case"M":return"M ".concat(s[1]+v,",").concat(s[2]+g);case"L":return"L ".concat(s[1]+w,",").concat(s[2]+T);case"Q":return"Q ".concat(s[1]," ").concat(s[2],",").concat(s[3]+w," ").concat(s[4]+T);case"C":return"C ".concat(s[1]," ").concat(s[2],",").concat(s[3]," ").concat(s[4],",").concat(s[5]+w," ").concat(s[6]+T);case"A":return"A ".concat(s[1]," ").concat(s[2]," ").concat(s[3]," ").concat(s[4]," ").concat(s[5]," ").concat(s[6]+w," ").concat(s[7]+T);case"Z":return"Z";default:return null}}).filter(function(s){return s!==null}).join(" ");return~a.indexOf("NaN")?"":a}var f6=function(n){if(n===""||Array.isArray(n)&&n.length===0)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var e;try{e=(0,xt.A)(n)}catch(f){e=(0,xt.A)(""),console.error("[g]: Invalid SVG Path definition: ".concat(n))}G_e(e);var t=z_e(e),i=V_e(e),a=i.polygons,s=i.polylines,o=j_e(e),l=U_e(o,0),u=l.x,c=l.y,d=l.width,h=l.height;return{absolutePath:e,hasArc:t,segments:o,polygons:a,polylines:s,totalLength:0,rect:{x:Number.isFinite(u)?u:0,y:Number.isFinite(c)?c:0,width:Number.isFinite(d)?d:0,height:Number.isFinite(h)?h:0}}},K_e=yc(f6);function v6(r){return(0,Ze.Z)(r)?K_e(r):f6(r)}function J_e(r,n,e){var t=r.curve,i=n.curve;(!t||t.length===0)&&(t=(0,bt.Y)(r.absolutePath,!1),r.curve=t),(!i||i.length===0)&&(i=(0,bt.Y)(n.absolutePath,!1),n.curve=i);var a=[t,i];t.length!==i.length&&(a=(0,wt.x)(t,i));var s=(0,we.b)(a[0])!==(0,we.b)(a[1])?(0,oe.G)(a[0]):(0,Fe.U)(a[0]);return[s,(0,Ye.g)(a[1],s),function(o){return o}]}function Q_e(r,n){var e;return(0,Ze.Z)(r)?e=r.split(" ").map(function(t){var i=t.split(","),a=Ds(i,2),s=a[0],o=a[1];return[Number(s),Number(o)]}):e=r,{points:e,totalLength:0,segments:[]}}function q_e(r,n){return[r.points,n.points,function(e){return e}]}var il=null,r0=/\s*(\w+)\(([^)]*)\)/g;function id(r){return function(n){var e=0;return r.map(function(t){return t===il?n[e++]:t})}}function cm(r){return r}var fx={matrix:["NNNNNN",[il,il,0,0,il,il,0,0,0,0,1,0,il,il,0,1],cm],matrix3d:["NNNNNNNNNNNNNNNN",cm],rotate:["A"],rotateX:["A"],rotateY:["A"],rotateZ:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",id([il,il,new _s(1)]),cm],scaleX:["N",id([il,new _s(1),new _s(1)]),id([il,new _s(1)])],scaleY:["N",id([new _s(1),il,new _s(1)]),id([new _s(1),il])],scaleZ:["N",id([new _s(1),new _s(1),il])],scale3d:["NNN",cm],skew:["Aa",null,cm],skewX:["A",null,id([il,um])],skewY:["A",null,id([um,il])],translate:["Tt",id([il,il,mf]),cm],translateX:["T",id([il,mf,mf]),id([il,mf])],translateY:["T",id([mf,il,mf]),id([mf,il])],translateZ:["L",id([mf,mf,il])],translate3d:["TTL",cm]};function g6(r){for(var n=[],e=r.length,t=0;t<e;t++){var i=r[t],a=i[0],s=i.slice(1);a==="translate"||a==="skew"?s.length===1&&s.push(0):a==="scale"&&s.length===1&&s.push(s[0]);var o=fx[a];if(!o)return[];var l=s.map(function(u){return Co(u)});n.push({t:a,d:l})}return n}function eme(r){if(Array.isArray(r))return g6(r);if(r=(r||"none").trim(),r==="none")return[];var n=[],e,t=0;for(r0.lastIndex=0;e=r0.exec(r);){if(e.index!==t)return[];t=e.index+e[0].length;var i=e[1],a=fx[i];if(!a)return[];var s=e[2].split(","),o=a[0];if(o.length<s.length)return[];for(var l=[],u=0;u<o.length;u++){var c=s[u],d=o[u],h=void 0;if(c?h={A:function(v){return v.trim()==="0"?um:L_e(v)},N:xP,T:yP,L:R_e}[d.toUpperCase()](c):h={a:um,n:l[0],t:mf}[d],h===void 0)return[];l.push(h)}if(n.push({t:i,d:l}),r0.lastIndex===r.length)return n}return[]}function tme(r){if(Array.isArray(r))return g6(r);if(r=(r||"none").trim(),r==="none")return[];var n=[],e,t=0;for(r0.lastIndex=0;e=r0.exec(r);){if(e.index!==t)return[];t=e.index+e[0].length;var i=e[1],a=fx[i];if(!a)return[];var s=e[2].split(","),o=a[0];if(o.length<s.length)return[];for(var l=[],u=0;u<o.length;u++){var c=s[u],d=o[u],h=void 0;if(c?h={A:function(v){return v.trim()==="0"?um:t6(v)},N:i6,T:e6,L:qB}[d.toUpperCase()](c):h={a:um,n:l[0],t:mf}[d],h===void 0)return[];l.push(h)}if(n.push({t:i,d:l}),r0.lastIndex===r.length)return n}return[]}function nme(r){var n,e,t,i;switch(r.t){case"rotateX":return i=gs(rd(r.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotateY":return i=gs(rd(r.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotateZ":return i=gs(rd(r.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":n=r.d[0].value,e=r.d[1].value,t=r.d[2].value,i=gs(rd(r.d[3]));var a=n*n+e*e+t*t;if(a===0)n=1,e=0,t=0;else if(a!==1){var s=Math.sqrt(a);n/=s,e/=s,t/=s}var o=Math.sin(i/2),l=o*Math.cos(i/2),u=o*o;return[1-2*(e*e+t*t)*u,2*(n*e*u+t*l),2*(n*t*u-e*l),0,2*(n*e*u-t*l),1-2*(n*n+t*t)*u,2*(e*t*u+n*l),0,2*(n*t*u+e*l),2*(e*t*u-n*l),1-2*(n*n+e*e)*u,0,0,0,0,1];case"scale":return[r.d[0].value,0,0,0,0,r.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scaleX":return[r.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaleY":return[1,0,0,0,0,r.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scaleZ":return[1,0,0,0,0,1,0,0,0,0,r.d[0].value,0,0,0,0,1];case"scale3d":return[r.d[0].value,0,0,0,0,r.d[1].value,0,0,0,0,r.d[2].value,0,0,0,0,1];case"skew":var c=gs(rd(r.d[0])),d=gs(rd(r.d[1]));return[1,Math.tan(d),0,0,Math.tan(c),1,0,0,0,0,1,0,0,0,0,1];case"skewX":return i=gs(rd(r.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewY":return i=gs(rd(r.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return n=Md(r.d[0],0,null)||0,e=Md(r.d[1],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,e,0,1];case"translateX":return n=Md(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,0,0,1];case"translateY":return e=Md(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,e,0,1];case"translateZ":return t=Md(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,t,1];case"translate3d":return n=Md(r.d[0],0,null)||0,e=Md(r.d[1],0,null)||0,t=Md(r.d[2],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,e,t,1];case"perspective":var h=Md(r.d[0],0,null)||0,f=h?-1/h:0;return[1,0,0,0,0,1,0,0,0,0,1,f,0,0,0,1];case"matrix":return[r.d[0].value,r.d[1].value,0,0,r.d[2].value,r.d[3].value,0,0,0,0,1,0,r.d[4].value,r.d[5].value,0,1];case"matrix3d":return r.d.map(function(v){return v.value})}}function rme(r,n){return[r[0]*n[0]+r[4]*n[1]+r[8]*n[2]+r[12]*n[3],r[1]*n[0]+r[5]*n[1]+r[9]*n[2]+r[13]*n[3],r[2]*n[0]+r[6]*n[1]+r[10]*n[2]+r[14]*n[3],r[3]*n[0]+r[7]*n[1]+r[11]*n[2]+r[15]*n[3],r[0]*n[4]+r[4]*n[5]+r[8]*n[6]+r[12]*n[7],r[1]*n[4]+r[5]*n[5]+r[9]*n[6]+r[13]*n[7],r[2]*n[4]+r[6]*n[5]+r[10]*n[6]+r[14]*n[7],r[3]*n[4]+r[7]*n[5]+r[11]*n[6]+r[15]*n[7],r[0]*n[8]+r[4]*n[9]+r[8]*n[10]+r[12]*n[11],r[1]*n[8]+r[5]*n[9]+r[9]*n[10]+r[13]*n[11],r[2]*n[8]+r[6]*n[9]+r[10]*n[10]+r[14]*n[11],r[3]*n[8]+r[7]*n[9]+r[11]*n[10]+r[15]*n[11],r[0]*n[12]+r[4]*n[13]+r[8]*n[14]+r[12]*n[15],r[1]*n[12]+r[5]*n[13]+r[9]*n[14]+r[13]*n[15],r[2]*n[12]+r[6]*n[13]+r[10]*n[14]+r[14]*n[15],r[3]*n[12]+r[7]*n[13]+r[11]*n[14]+r[15]*n[15]]}function ime(r){return r.length===0?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:r.map(nme).reduce(rme)}function _6(r){var n=[0,0,0],e=[1,1,1],t=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return e_e(ime(r),n,e,t,i,a),[[n,e,t,a,i]]}var ame=function(){function r(t,i){for(var a=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],s=0;s<4;s++)for(var o=0;o<4;o++)for(var l=0;l<4;l++)a[s][o]+=i[s][l]*t[l][o];return a}function n(t){return t[0][2]===0&&t[0][3]===0&&t[1][2]===0&&t[1][3]===0&&t[2][0]===0&&t[2][1]===0&&t[2][2]===1&&t[2][3]===0&&t[3][2]===0&&t[3][3]===1}function e(t,i,a,s,o){for(var l=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],u=0;u<4;u++)l[u][3]=o[u];for(var c=0;c<3;c++)for(var d=0;d<3;d++)l[3][c]+=t[d]*l[d][c];var h=s[0],f=s[1],v=s[2],g=s[3],m=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];m[0][0]=1-2*(f*f+v*v),m[0][1]=2*(h*f-v*g),m[0][2]=2*(h*v+f*g),m[1][0]=2*(h*f+v*g),m[1][1]=1-2*(h*h+v*v),m[1][2]=2*(f*v-h*g),m[2][0]=2*(h*v-f*g),m[2][1]=2*(f*v+h*g),m[2][2]=1-2*(h*h+f*f),l=r(l,m);var y=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];a[2]&&(y[2][1]=a[2],l=r(l,y)),a[1]&&(y[2][1]=0,y[2][0]=a[0],l=r(l,y)),a[0]&&(y[2][0]=0,y[1][0]=a[0],l=r(l,y));for(var w=0;w<3;w++)for(var T=0;T<3;T++)l[w][T]*=i[w];return n(l)?[l[0][0],l[0][1],l[1][0],l[1][1],l[3][0],l[3][1]]:l[0].concat(l[1],l[2],l[3])}return e}();function sme(r){return r.toFixed(6).replace(".000000","")}function wP(r,n){var e,t;return r.decompositionPair!==n&&(r.decompositionPair=n,e=_6(r)),n.decompositionPair!==r&&(n.decompositionPair=r,t=_6(n)),e[0]===null||t[0]===null?[[!1],[!0],function(i){return i?n[0].d:r[0].d}]:(e[0].push(0),t[0].push(1),[e,t,function(i){var a=lme(e[0][3],t[0][3],i[5]),s=ame(i[0],i[1],i[2],a,i[4]),o=s.map(sme).join(",");return o}])}function ome(r,n){for(var e=0,t=0;t<r.length;t++)e+=r[t]*n[t];return e}function lme(r,n,e){var t=ome(r,n);t=(0,O.Z)(t,-1,1);var i=[];if(t===1)i=r;else for(var a=Math.acos(t),s=Math.sin(e*a)*1/Math.sqrt(1-t*t),o=0;o<4;o++)i.push(r[o]*(Math.cos(e*a)-t*s)+n[o]*s);return i}function SP(r){return r.replace(/[XY]/,"")}function TP(r){return r.replace(/(X|Y|Z|3d)?$/,"3d")}var ume=function(n,e){return n==="perspective"&&e==="perspective"||(n==="matrix"||n==="matrix3d")&&(e==="matrix"||e==="matrix3d")};function cme(r,n,e){var t=!1;if(!r.length||!n.length){r.length||(t=!0,r=n,n=[]);for(var i=function(){var j=r[a],Z=j.t,te=j.d,le=Z.substring(0,5)==="scale"?1:0;n.push({t:Z,d:te.map(function(ue){return typeof ue=="number"?Co(le):Co(le,ue.unit)})})},a=0;a<r.length;a++)i()}var s=[],o=[],l=[];if(r.length!==n.length){var u=wP(r,n);s=[u[0]],o=[u[1]],l=[["matrix",[u[2]]]]}else for(var c=0;c<r.length;c++){var d=r[c].t,h=n[c].t,f=r[c].d,v=n[c].d,g=fx[d],m=fx[h],y=void 0;if(ume(d,h)){var w=wP([r[c]],[n[c]]);s.push(w[0]),o.push(w[1]),l.push(["matrix",[w[2]]]);continue}else if(d===h)y=d;else if(g[2]&&m[2]&&SP(d)===SP(h))y=SP(d),f=g[2](f),v=m[2](v);else if(g[1]&&m[1]&&TP(d)===TP(h))y=TP(d),f=g[1](f),v=m[1](v);else{var T=wP(r,n);s=[T[0]],o=[T[1]],l=[["matrix",[T[2]]]];break}for(var G=[],x=[],_=[],p=0;p<f.length;p++){var b=I_e(f[p],v[p],e,!1,p);G[p]=b[0],x[p]=b[1],_.push(b[2])}s.push(G),o.push(x),l.push([y,_])}if(t){var R=s;s=o,o=R}return[s,o,function(B){return B.map(function(j,Z){var te=j.map(function(le,ue){return l[Z][1][ue](le)}).join(",");return l[Z][0]==="matrix"&&te.split(",").length===16&&(l[Z][0]="matrix3d"),l[Z][0]==="matrix3d"&&te.split(",").length===6&&(l[Z][0]="matrix"),"".concat(l[Z][0],"(").concat(te,")")}).join(" ")}]}var dme=yc(function(r){if((0,Ze.Z)(r)){if(r==="text-anchor")return[Co(0,"px"),Co(0,"px")];var n=r.split(" ");return n.length===1&&(n[0]==="top"||n[0]==="bottom"?(n[1]=n[0],n[0]="center"):n[1]="center"),n.length!==2?null:[yP(m6(n[0])),yP(m6(n[1]))]}return[Co(r[0]||0,"px"),Co(r[1]||0,"px")]});function m6(r){return r==="center"?"50%":r==="left"||r==="top"?"0%":r==="right"||r==="bottom"?"100%":r}var p6=[{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(n){return n===Yr.PATH||n===Yr.POLYGON||n===Yr.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"}],hme=new Set(p6.filter(function(r){return!!r.l}).map(function(r){return r.n})),y6={},fme=function(){function r(n){var e=this;Er(this,r),this.runtime=n,p6.forEach(function(t){e.registerMetadata(t)})}return br(r,[{key:"registerMetadata",value:function(e){[e.n].concat(rl(e.a||[])).forEach(function(t){y6[t]=e})}},{key:"getPropertySyntax",value:function(e){return this.runtime.CSSPropertySyntaxFactory[e]}},{key:"processProperties",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0};Object.assign(e.attributes,t);var a=e.parsedStyle.clipPath,s=e.parsedStyle.offsetPath;vme(e,t);var o=!!i.forceUpdateGeometry;if(!o){for(var l in t)if(hme.has(l)){o=!0;break}}var u=x6(e);u.has("fill")&&t.fill&&(e.parsedStyle.fill=dx(t.fill)),u.has("stroke")&&t.stroke&&(e.parsedStyle.stroke=dx(t.stroke)),u.has("shadowColor")&&t.shadowColor&&(e.parsedStyle.shadowColor=dx(t.shadowColor)),u.has("filter")&&t.filter&&(e.parsedStyle.filter=B_e(t.filter)),u.has("radius")&&!(0,xe.Z)(t.radius)&&(e.parsedStyle.radius=n6(t.radius,4)),u.has("lineDash")&&!(0,xe.Z)(t.lineDash)&&(e.parsedStyle.lineDash=n6(t.lineDash,2)),u.has("points")&&t.points&&(e.parsedStyle.points=Q_e(t.points)),u.has("d")&&t.d===""&&(e.parsedStyle.d=nl({},WB)),u.has("d")&&t.d&&(e.parsedStyle.d=v6(t.d)),u.has("textTransform")&&t.textTransform&&this.runtime.CSSPropertySyntaxFactory[Yn.TEXT_TRANSFORM].calculator(null,null,{value:t.textTransform},e,null),u.has("clipPath")&&!(0,ie.Z)(t.clipPath)&&this.runtime.CSSPropertySyntaxFactory[Yn.DEFINED_PATH].calculator("clipPath",a,t.clipPath,e,this.runtime),u.has("offsetPath")&&t.offsetPath&&this.runtime.CSSPropertySyntaxFactory[Yn.DEFINED_PATH].calculator("offsetPath",s,t.offsetPath,e,this.runtime),u.has("transform")&&t.transform&&(e.parsedStyle.transform=eme(t.transform)),u.has("transformOrigin")&&t.transformOrigin&&(e.parsedStyle.transformOrigin=dme(t.transformOrigin)),u.has("markerStart")&&t.markerStart&&(e.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory[Yn.MARKER].calculator(null,t.markerStart,t.markerStart,null,null)),u.has("markerEnd")&&t.markerEnd&&(e.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory[Yn.MARKER].calculator(null,t.markerEnd,t.markerEnd,null,null)),u.has("markerMid")&&t.markerMid&&(e.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory[Yn.MARKER].calculator("",t.markerMid,t.markerMid,null,null)),u.has("zIndex")&&!(0,xe.Z)(t.zIndex)&&this.runtime.CSSPropertySyntaxFactory[Yn.Z_INDEX].postProcessor(e),u.has("offsetDistance")&&!(0,xe.Z)(t.offsetDistance)&&this.runtime.CSSPropertySyntaxFactory[Yn.OFFSET_DISTANCE].postProcessor(e),u.has("transform")&&t.transform&&this.runtime.CSSPropertySyntaxFactory[Yn.TRANSFORM].postProcessor(e),u.has("transformOrigin")&&t.transformOrigin&&this.runtime.CSSPropertySyntaxFactory[Yn.TRANSFORM_ORIGIN].postProcessor(e),o&&(e.geometry.dirty=!0,e.renderable.boundsDirty=!0,e.renderable.renderBoundsDirty=!0,i.forceUpdateGeometry||this.runtime.sceneGraphService.dirtifyToRoot(e))}},{key:"updateGeometry",value:function(e){var t=e.nodeName,i=this.runtime.geometryUpdaterFactory[t];if(i){var a=e.geometry;a.contentBounds||(a.contentBounds=new nd),a.renderBounds||(a.renderBounds=new nd);var s=e.parsedStyle,o=i.update(s,e),l=o.cx,u=l===void 0?0:l,c=o.cy,d=c===void 0?0:c,h=o.cz,f=h===void 0?0:h,v=o.hwidth,g=v===void 0?0:v,m=o.hheight,y=m===void 0?0:m,w=o.hdepth,T=w===void 0?0:w,G=[Math.abs(g),Math.abs(y),T],x=s.stroke,_=s.lineWidth,p=_===void 0?1:_,b=s.increasedLineWidthForHitTesting,R=b===void 0?0:b,B=s.shadowType,j=B===void 0?"outer":B,Z=s.shadowColor,te=s.filter,le=te===void 0?[]:te,ue=s.transformOrigin,se=[u,d,f];a.contentBounds.update(se,G);var V=t===Yr.POLYLINE||t===Yr.POLYGON||t===Yr.PATH?Math.SQRT2:.5,ee=x&&!x.isNone;if(ee){var he=((p||0)+(R||0))*V;G[0]+=he,G[1]+=he}if(a.renderBounds.update(se,G),Z&&j&&j!=="inner"){var ut=a.renderBounds,ct=ut.min,Lt=ut.max,vn=s.shadowBlur,tn=s.shadowOffsetX,rn=s.shadowOffsetY,mn=vn||0,ar=tn||0,gi=rn||0,kr=ct[0]-mn+ar,Ta=Lt[0]+mn+ar,Wa=ct[1]-mn+gi,la=Lt[1]+mn+gi;ct[0]=Math.min(ct[0],kr),Lt[0]=Math.max(Lt[0],Ta),ct[1]=Math.min(ct[1],Wa),Lt[1]=Math.max(Lt[1],la),a.renderBounds.setMinMax(ct,Lt)}le.forEach(function(so){var oo=so.name,qi=so.params;if(oo==="blur"){var lo=qi[0].value;a.renderBounds.update(a.renderBounds.center,E.IH(a.renderBounds.halfExtents,a.renderBounds.halfExtents,[lo,lo,0]))}else if(oo==="drop-shadow"){var uo=qi[0].value,co=qi[1].value,ea=qi[2].value,ho=a.renderBounds,Rr=ho.min,Ar=ho.max,Gu=Rr[0]-ea+uo,zu=Ar[0]+ea+uo,Vu=Rr[1]-ea+co,Uu=Ar[1]+ea+co;Rr[0]=Math.min(Rr[0],Gu),Ar[0]=Math.max(Ar[0],zu),Rr[1]=Math.min(Rr[1],Vu),Ar[1]=Math.max(Ar[1],Uu),a.renderBounds.setMinMax(Rr,Ar)}}),e.geometry.dirty=!1;var ys=g<0,Jl=y<0,xs=(ys?-1:1)*(ue?Md(ue[0],0,e,!0):0),Es=(Jl?-1:1)*(ue?Md(ue[1],1,e,!0):0);(xs||Es)&&e.setOrigin(xs,Es)}}},{key:"updateSizeAttenuation",value:function(e,t){e.style.isSizeAttenuation?(e.style.rawLineWidth||(e.style.rawLineWidth=e.style.lineWidth),e.style.lineWidth=(e.style.rawLineWidth||1)/t,e.nodeName===Yr.CIRCLE&&(e.style.rawR||(e.style.rawR=e.style.r),e.style.r=(e.style.rawR||1)/t)):(e.style.rawLineWidth&&(e.style.lineWidth=e.style.rawLineWidth,delete e.style.rawLineWidth),e.nodeName===Yr.CIRCLE&&e.style.rawR&&(e.style.r=e.style.rawR,delete e.style.rawR))}}])}();function vme(r,n){var e=x6(r);for(var t in n)e.has(t)&&(r.parsedStyle[t]=n[t])}function x6(r){return r.constructor.PARSED_STYLE_LIST}var gme=function(){function r(){Er(this,r),this.mixer=EP}return br(r,[{key:"calculator",value:function(e,t,i,a){return rd(i)}}])}(),_me=function(){function r(){Er(this,r)}return br(r,[{key:"calculator",value:function(e,t,i,a,s){return i instanceof hh&&(i=null),s.sceneGraphService.updateDisplayObjectDependency(e,t,i,a),e==="clipPath"&&a.forEach(function(o){o.childNodes.length===0&&s.sceneGraphService.dirtifyToRoot(o)}),i}}])}(),mme=function(){function r(){Er(this,r),this.parser=dx,this.mixer=O_e}return br(r,[{key:"calculator",value:function(e,t,i,a){return i instanceof hh?i.value==="none"?XB:KB:i}}])}(),pme=function(){function r(){Er(this,r)}return br(r,[{key:"calculator",value:function(e,t,i){return i instanceof hh?[]:i}}])}();function E6(r){var n=r.parsedStyle,e=n.fontSize;return(0,xe.Z)(e)?null:e}var CP=function(){function r(){Er(this,r),this.mixer=EP}return br(r,[{key:"calculator",value:function(e,t,i,a,s){if((0,pe.Z)(i))return i;if(_s.isRelativeUnit(i.unit)){if(i.unit===nr.kPercentage)return 0;if(i.unit===nr.kEms){if(a.parentNode){var o=E6(a.parentNode);if(o)return o*=i.value,o}return 0}if(i.unit===nr.kRems){var l;if(a!=null&&(l=a.ownerDocument)!==null&&l!==void 0&&l.documentElement){var u=E6(a.ownerDocument.documentElement);if(u)return u*=i.value,u}return 0}}else return i.value}}])}(),yme=function(){function r(){Er(this,r),this.mixer=a6}return br(r,[{key:"calculator",value:function(e,t,i){return i.map(function(a){return a.value})}}])}(),xme=function(){function r(){Er(this,r),this.mixer=a6}return br(r,[{key:"calculator",value:function(e,t,i){return i.map(function(a){return a.value})}}])}(),Eme=function(){function r(){Er(this,r)}return br(r,[{key:"calculator",value:function(e,t,i,a){var s;i instanceof hh&&(i=null);var o=(s=i)===null||s===void 0?void 0:s.cloneNode(!0);return o&&(o.style.isMarker=!0),o}}])}(),bme=function(){function r(){Er(this,r),this.mixer=EP}return br(r,[{key:"calculator",value:function(e,t,i){return i.value}}])}(),kme=function(){function r(){Er(this,r),this.mixer=bP(0,1)}return br(r,[{key:"calculator",value:function(e,t,i){return i.value}},{key:"postProcessor",value:function(e){var t=e.parsedStyle,i=t.offsetPath,a=t.offsetDistance;if(i){var s=i.nodeName;if(s===Yr.LINE||s===Yr.PATH||s===Yr.POLYLINE){var o=i.getPoint(a);o&&e.setLocalPosition(o.x,o.y)}}}}])}(),wme=function(){function r(){Er(this,r),this.mixer=bP(0,1)}return br(r,[{key:"calculator",value:function(e,t,i){return i.value}}])}(),Sme=function(){function r(){Er(this,r),this.parser=v6,this.mixer=J_e}return br(r,[{key:"calculator",value:function(e,t,i){return i instanceof hh&&i.value==="unset"?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new e0(0,0,0,0)}:i}}])}(),Tme=br(function r(){Er(this,r),this.mixer=q_e}),Cme=function(r){function n(){var e;Er(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ms(this,n,[].concat(i)),e.mixer=bP(0,1/0),e}return Ps(n,r),br(n)}(CP),Mme=function(){function r(){Er(this,r)}return br(r,[{key:"calculator",value:function(e,t,i,a){return i instanceof hh?i.value==="unset"?"":i.value:"".concat(i)}},{key:"postProcessor",value:function(e){e.nodeValue="".concat(e.parsedStyle.text)||""}}])}(),Pme=function(){function r(){Er(this,r)}return br(r,[{key:"calculator",value:function(e,t,i,a){var s=a.getAttribute("text");if(s){var o=s;i.value==="capitalize"?o=s.charAt(0).toUpperCase()+s.slice(1):i.value==="lowercase"?o=s.toLowerCase():i.value==="uppercase"&&(o=s.toUpperCase()),a.parsedStyle.text=o}return i.value}}])}(),QRe=function(n){return Object.fromEntries(Object.entries(n).filter(function(e){var t=_slicedToArray(e,2),i=t[1];return i!==void 0}))},MP=new WeakMap;function qRe(r,n,e){if(r){var t=typeof r=="string"?document.getElementById(r):r;MP.has(t)&&MP.get(t).destroy(e),MP.set(t,n)}}var b6=typeof window!="undefined"&&typeof window.document!="undefined";function eAe(r){return!!r.getAttribute}function tAe(r,n){for(var e=0,t=r.length;e<t;){var i=e+t>>>1;Nme(r[i],n)<0?e=i+1:t=i}return e}function Nme(r,n){var e=Number(r.parsedStyle.zIndex||0),t=Number(n.parsedStyle.zIndex||0);if(e===t){var i=r.parentNode;if(i){var a=i.childNodes||[];return a.indexOf(r)-a.indexOf(n)}}return e-t}function Ome(r){var n=r;do{var e,t=(e=n.parsedStyle)===null||e===void 0?void 0:e.clipPath;if(t)return n;n=n.parentElement}while(n!==null);return null}var k6="px";function nAe(r,n,e){b6&&r.style&&(r.style.width=n+k6,r.style.height=e+k6)}function w6(r,n){if(b6)return document.defaultView.getComputedStyle(r,null).getPropertyValue(n)}function rAe(r){var n=w6(r,"width");return n==="auto"?r.offsetWidth:parseFloat(n)}function iAe(r){var n=w6(r,"height");return n==="auto"?r.offsetHeight:parseFloat(n)}var Rme=1,Ame={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},Lme=typeof performance=="object"&&performance.now?performance:Date;function PP(r){return r.nodeName===Yr.FRAGMENT?!0:r.getRootNode().nodeName===Yr.FRAGMENT}function aAe(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"auto",n=arguments.length>1?arguments[1]:void 0,e=arguments.length>2?arguments[2]:void 0,t=!1,i=!1,a=!!n&&!n.isNone,s=!!e&&!e.isNone;return r==="visiblepainted"||r==="painted"||r==="auto"?(t=a,i=s):r==="visiblefill"||r==="fill"?t=!0:r==="visiblestroke"||r==="stroke"?i=!0:(r==="visible"||r==="all")&&(t=!0,i=!0),[t,i]}var Ime=1,Dme=function(){return Ime++},_v=typeof self=="object"&&self.self===self?self:typeof k.g=="object"&&k.g.global===k.g?k.g:{},Fme=Date.now(),Bme=function(){return _v.performance&&typeof _v.performance.now=="function"?_v.performance.now():Date.now()-Fme},vx={},S6=Date.now(),$me=function(n){if(typeof n!="function")throw new TypeError("".concat(n," is not a function"));var e=Date.now(),t=e-S6,i=t>16?0:16-t,a=Dme();return vx[a]=n,Object.keys(vx).length>1||setTimeout(function(){S6=e;var s=vx;vx={},Object.keys(s).forEach(function(o){return s[o](Bme())})},i),a},Gme=function(n){delete vx[n]},zme=["","webkit","moz","ms","o"],T6=function(n){return typeof n!="string"?$me:n===""?_v.requestAnimationFrame:_v["".concat(n,"RequestAnimationFrame")]},Vme=function(n){return typeof n!="string"?Gme:n===""?_v.cancelAnimationFrame:_v["".concat(n,"CancelAnimationFrame")]||_v["".concat(n,"CancelRequestAnimationFrame")]},Ume=function(n,e){for(var t=0;n[t]!==void 0;){if(e(n[t]))return n[t];t+=1}},C6=Ume(zme,function(r){return!!T6(r)}),M6=T6(C6),jme=Vme(C6);_v.requestAnimationFrame=M6,_v.cancelAnimationFrame=jme;var sAe=null,oAe=null,lAe=null,uAe=null,Hme=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Wme=/([\"\'])[^\'\"]+\1/;function Yme(r){for(var n=r.fontSize,e=n===void 0?16:n,t=r.fontFamily,i=t===void 0?"sans-serif":t,a=r.fontStyle,s=a===void 0?"normal":a,o=r.fontVariant,l=o===void 0?"normal":o,u=r.fontWeight,c=u===void 0?"normal":u,d=(0,pe.Z)(e)&&"".concat(e,"px")||"16px",h=i.split(","),f=h.length-1;f>=0;f--){var v=h[f].trim();!Wme.test(v)&&Hme.indexOf(v)<0&&(v='"'.concat(v,'"')),h[f]=v}return"".concat(s," ").concat(l," ").concat(c," ").concat(d," ").concat(h.join(","))}function NP(r,n,e){return L.identity(r),r[4]=Math.tan(n),r[1]=Math.tan(e),r}var $l=L.create(),Zme=L.create(),Xme={scale:function(n){L.fromScaling($l,[n[0].value,n[1].value,1])},scaleX:function(n){L.fromScaling($l,[n[0].value,1,1])},scaleY:function(n){L.fromScaling($l,[1,n[0].value,1])},scaleZ:function(n){L.fromScaling($l,[1,1,n[0].value])},scale3d:function(n){L.fromScaling($l,[n[0].value,n[1].value,n[2].value])},translate:function(n){L.fromTranslation($l,[n[0].value,n[1].value,0])},translateX:function(n){L.fromTranslation($l,[n[0].value,0,0])},translateY:function(n){L.fromTranslation($l,[0,n[0].value,0])},translateZ:function(n){L.fromTranslation($l,[0,0,n[0].value])},translate3d:function(n){L.fromTranslation($l,[n[0].value,n[1].value,n[2].value])},rotate:function(n){L.fromZRotation($l,gs(rd(n[0])))},rotateX:function(n){L.fromXRotation($l,gs(rd(n[0])))},rotateY:function(n){L.fromYRotation($l,gs(rd(n[0])))},rotateZ:function(n){L.fromZRotation($l,gs(rd(n[0])))},rotate3d:function(n){L.fromRotation($l,gs(rd(n[3])),[n[0].value,n[1].value,n[2].value])},skew:function(n){NP($l,gs(n[0].value),gs(n[1].value))},skewX:function(n){NP($l,gs(n[0].value),0)},skewY:function(n){NP($l,0,gs(n[0].value))},matrix:function(n){L.set($l,n[0].value,n[1].value,0,0,n[2].value,n[3].value,0,0,0,0,1,0,n[4].value,n[5].value,0,1)},matrix3d:function(n){L.set.apply(L,[$l].concat(rl(n.map(function(e){return e.value}))))}},Kme=E.al(1,1,1),Jme=E.Ue(),P6={translate:function(n,e){Dn.sceneGraphService.setLocalScale(n,Kme,!1),Dn.sceneGraphService.setLocalEulerAngles(n,Jme,void 0,void 0,!1),Dn.sceneGraphService.setLocalPosition(n,[e[0].value,e[1].value,0],!1),Dn.sceneGraphService.dirtifyLocal(n,n.transformable)}};function Qme(r,n){if(r.length){if(r.length===1&&P6[r[0].t]){P6[r[0].t](n,r[0].d);return}for(var e=L.identity(Zme),t=0;t<r.length;t++){var i=r[t],a=i.t,s=i.d,o=Xme[a];o&&(o(s),L.mul(e,e,$l))}n.setLocalTransform(e)}else n.resetLocalTransform();return n.getLocalTransform()}var qme=function(){function r(){Er(this,r),this.parser=tme,this.mixer=cme}return br(r,[{key:"calculator",value:function(e,t,i,a){return i instanceof hh?[]:i}},{key:"postProcessor",value:function(e){Qme(e.parsedStyle.transform,e)}}])}(),epe=function(){function r(){Er(this,r)}return br(r,[{key:"postProcessor",value:function(e){var t=e.parsedStyle.transformOrigin;t[0].unit===nr.kPixels&&t[1].unit===nr.kPixels?e.setOrigin(t[0].value,t[1].value):e.getGeometryBounds()}}])}(),tpe=function(){function r(){Er(this,r)}return br(r,[{key:"calculator",value:function(e,t,i,a){return i.value}},{key:"postProcessor",value:function(e){if(e.parentNode){var t=e.parentNode,i=t.renderable,a=t.sortable;i&&(i.dirty=!0),a&&(a.dirty=!0,a.dirtyReason=vP.Z_INDEX_CHANGED)}}}])}(),npe=function(){function r(){Er(this,r)}return br(r,[{key:"update",value:function(e,t){var i=e.cx,a=i===void 0?0:i,s=e.cy,o=s===void 0?0:s,l=e.r,u=l===void 0?0:l;return{cx:a,cy:o,hwidth:u,hheight:u}}}])}(),rpe=function(){function r(){Er(this,r)}return br(r,[{key:"update",value:function(e,t){var i=e.cx,a=i===void 0?0:i,s=e.cy,o=s===void 0?0:s,l=e.rx,u=l===void 0?0:l,c=e.ry,d=c===void 0?0:c;return{cx:a,cy:o,hwidth:u,hheight:d}}}])}(),ipe=function(){function r(){Er(this,r)}return br(r,[{key:"update",value:function(e){var t=e.x1,i=e.y1,a=e.x2,s=e.y2,o=Math.min(t,a),l=Math.max(t,a),u=Math.min(i,s),c=Math.max(i,s),d=l-o,h=c-u,f=d/2,v=h/2;return{cx:o+f,cy:u+v,hwidth:f,hheight:v}}}])}(),ape=function(){function r(){Er(this,r)}return br(r,[{key:"update",value:function(e){var t=e.d,i=t.rect,a=i.x,s=i.y,o=i.width,l=i.height,u=o/2,c=l/2;return{cx:a+u,cy:s+c,hwidth:u,hheight:c}}}])}(),spe=function(){function r(){Er(this,r)}return br(r,[{key:"update",value:function(e){if(e.points&&(0,Ie.Z)(e.points.points)){var t=e.points.points,i=Math.min.apply(Math,rl(t.map(function(h){return h[0]}))),a=Math.max.apply(Math,rl(t.map(function(h){return h[0]}))),s=Math.min.apply(Math,rl(t.map(function(h){return h[1]}))),o=Math.max.apply(Math,rl(t.map(function(h){return h[1]}))),l=a-i,u=o-s,c=l/2,d=u/2;return{cx:i+c,cy:s+d,hwidth:c,hheight:d}}return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),ope=function(){function r(){Er(this,r)}return br(r,[{key:"update",value:function(e,t){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s,l=e.src,u=e.width,c=u===void 0?0:u,d=e.height,h=d===void 0?0:d,f=c,v=h;return l&&!(0,Ze.Z)(l)&&(f||(f=l.width,e.width=f),v||(v=l.height,e.height=v)),{cx:a+f/2,cy:o+v/2,hwidth:f/2,hheight:v/2}}}])}(),lpe=function(){function r(n){Er(this,r),this.globalRuntime=n}return br(r,[{key:"isReadyToMeasure",value:function(e,t){var i=e.text;return i}},{key:"update",value:function(e,t){var i,a=e.text,s=e.textAlign,o=s===void 0?"start":s,l=e.lineWidth,u=l===void 0?1:l,c=e.textBaseline,d=c===void 0?"alphabetic":c,h=e.dx,f=h===void 0?0:h,v=e.dy,g=v===void 0?0:v,m=e.x,y=m===void 0?0:m,w=e.y,T=w===void 0?0:w;if(!this.isReadyToMeasure(e,t))return e.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{hwidth:0,hheight:0,cx:0,cy:0};var G=(t==null||(i=t.ownerDocument)===null||i===void 0||(i=i.defaultView)===null||i===void 0?void 0:i.getConfig())||{},x=G.offscreenCanvas,_=this.globalRuntime.textService.measureText(a,e,x);e.metrics=_;var p=_.width,b=_.height,R=p/2,B=b/2,j=y+R;o==="center"||o==="middle"?j+=u/2-R:(o==="right"||o==="end")&&(j+=u-R*2);var Z=T-B;return d==="middle"?Z+=B:d==="top"||d==="hanging"?Z+=B*2:d==="alphabetic"||(d==="bottom"||d==="ideographic")&&(Z+=0),f&&(j+=f),g&&(Z+=g),{cx:j,cy:Z,hwidth:R,hheight:B}}}])}(),upe=function(){function r(){Er(this,r)}return br(r,[{key:"update",value:function(e,t){return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),cpe=function(){function r(){Er(this,r)}return br(r,[{key:"update",value:function(e,t){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s,l=e.width,u=l===void 0?0:l,c=e.height,d=c===void 0?0:c;return{cx:a+u/2,cy:o+d/2,hwidth:u/2,hheight:d/2}}}])}();function cAe(r){return!!r.type}var Lk=function(){function r(n){Er(this,r),this.eventPhase=r.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new ch,this.page=new ch,this.canvas=new ch,this.viewport=new ch,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=n}return br(r,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"composedPath",value:function(){return this.manager&&(!this.path||this.path[0]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}},{key:"propagationPath",get:function(){return this.composedPath()}},{key:"preventDefault",value:function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}},{key:"stopImmediatePropagation",value:function(){this.propagationImmediatelyStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"initEvent",value:function(){}},{key:"initUIEvent",value:function(){}},{key:"clone",value:function(){throw new Error(Ns)}}])}(),N6=function(r){function n(){var e;Er(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ms(this,n,[].concat(i)),e.client=new ch,e.movement=new ch,e.offset=new ch,e.global=new ch,e.screen=new ch,e}return Ps(n,r),br(n,[{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(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)}},{key:"initMouseEvent",value:function(){throw new Error(Ns)}}])}(Lk),dpe=function(r){function n(){var e;Er(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ms(this,n,[].concat(i)),e.width=0,e.height=0,e.isPrimary=!1,e}return Ps(n,r),br(n,[{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)}}])}(N6),hpe=function(r){function n(){return Er(this,n),Ms(this,n,arguments)}return Ps(n,r),br(n,[{key:"clone",value:function(){return this.manager.cloneWheelEvent(this)}}])}(N6),Pd=function(r){function n(e,t){var i;return Er(this,n),i=Ms(this,n,[null]),i.type=e,i.detail=t,Object.assign(i,t),i}return Ps(n,r),br(n)}(Lk),O6=new WeakMap,fpe=function(){function r(){Er(this,r),this.emitter=new Se.Z}return br(r,[{key:"on",value:function(e,t,i){return this.addEventListener(e,t,i),this}},{key:"addEventListener",value:function(e,t,i){var a=!1,s=!1;if((0,je.Z)(i))a=i;else if(i){var o=i.capture;a=o===void 0?!1:o;var l=i.once;s=l===void 0?!1:l}a&&(e+="capture"),t=(0,Be.Z)(t)?t:t.handleEvent;var u=(0,Be.Z)(t)?void 0:t;return s?this.emitter.once(e,t,u):this.emitter.on(e,t,u),this}},{key:"off",value:function(e,t,i){return e?this.removeEventListener(e,t,i):this.removeAllEventListeners(),this}},{key:"removeAllEventListeners",value:function(){var e;(e=this.emitter)===null||e===void 0||e.removeAllListeners()}},{key:"removeEventListener",value:function(e,t,i){var a;if(!this.emitter)return this;var s=(0,je.Z)(i)?i:i==null?void 0:i.capture;s&&(e+="capture"),t=(0,Be.Z)(t)?t:(a=t)===null||a===void 0?void 0:a.handleEvent;var o=(0,Be.Z)(t)?void 0:t;return this.emitter.off(e,t,o),this}},{key:"emit",value:function(e,t){this.dispatchEvent(new Pd(e,t))}},{key:"dispatchEvent",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=O6.get(this);if(!i){var a;this.document?i=this:this.defaultView?i=this.defaultView:i=(a=this.ownerDocument)===null||a===void 0?void 0:a.defaultView,i&&O6.set(this,i)}if(i){if(e.manager=i.getEventService(),!e.manager)return!1;e.defaultPrevented=!1,e.path?e.path.length=0:e.page=[],t||(e.target=this),e.manager.dispatchEvent(e,e.type,t)}else this.emitter.emit(e.type,e);return!e.defaultPrevented}}])}(),dm=function(r){function n(){var e;Er(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ms(this,n,[].concat(i)),e.shadow=!1,e.ownerDocument=null,e.isConnected=!1,e.baseURI="",e.childNodes=[],e.nodeType=0,e.nodeName="",e.nodeValue=null,e.parentNode=null,e}return Ps(n,r),br(n,[{key:"textContent",get:function(){var t="";this.nodeName===Yr.TEXT&&(t+=this.style.text);var i=Qp(this.childNodes),a;try{for(i.s();!(a=i.n()).done;){var s=a.value;s.nodeName===Yr.TEXT?t+=s.nodeValue:t+=s.textContent}}catch(o){i.e(o)}finally{i.f()}return t},set:function(t){var i=this;this.childNodes.slice().forEach(function(a){i.removeChild(a)}),this.nodeName===Yr.TEXT&&(this.style.text="".concat(t))}},{key:"getRootNode",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this}},{key:"hasChildNodes",value:function(){return this.childNodes.length>0}},{key:"isDefaultNamespace",value:function(t){throw new Error(Ns)}},{key:"lookupNamespaceURI",value:function(t){throw new Error(Ns)}},{key:"lookupPrefix",value:function(t){throw new Error(Ns)}},{key:"normalize",value:function(){throw new Error(Ns)}},{key:"isEqualNode",value:function(t){return this===t}},{key:"isSameNode",value:function(t){return this.isEqualNode(t)}},{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(t){if(t===this)return 0;for(var i=t,a=this,s=[i],o=[a];(l=i.parentNode)!==null&&l!==void 0?l:a.parentNode;){var l;i=i.parentNode?(s.push(i.parentNode),i.parentNode):i,a=a.parentNode?(o.push(a.parentNode),a.parentNode):a}if(i!==a)return n.DOCUMENT_POSITION_DISCONNECTED|n.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|n.DOCUMENT_POSITION_PRECEDING;var u=s.length>o.length?s:o,c=u===s?o:s;if(u[u.length-c.length]===c[0])return u===s?n.DOCUMENT_POSITION_CONTAINED_BY|n.DOCUMENT_POSITION_FOLLOWING:n.DOCUMENT_POSITION_CONTAINS|n.DOCUMENT_POSITION_PRECEDING;for(var d=u.length-c.length,h=c.length-1;h>=0;h--){var f=c[h],v=u[d+h];if(v!==f){var g=f.parentNode.childNodes;return g.indexOf(f)<g.indexOf(v)?c===s?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING:u===s?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING}}return n.DOCUMENT_POSITION_FOLLOWING}},{key:"contain",value:function(t){return this.contains(t)}},{key:"contains",value:function(t){for(var i=t;i&&this!==i;)i=i.parentNode;return!!i}},{key:"getAncestor",value:function(t){for(var i=this;t>0&&i;)i=i.parentNode,t--;return i}},{key:"forEach",value:function(t){for(var i=[this];i.length>0;){var a=i.pop(),s=t(a);if(s===!1)break;for(var o=a.childNodes.length-1;o>=0;o--)i.push(a.childNodes[o])}}}],[{key:"isNode",value:function(t){return!!t.childNodes}}])}(fpe);dm.DOCUMENT_POSITION_DISCONNECTED=1,dm.DOCUMENT_POSITION_PRECEDING=2,dm.DOCUMENT_POSITION_FOLLOWING=4,dm.DOCUMENT_POSITION_CONTAINS=8,dm.DOCUMENT_POSITION_CONTAINED_BY=16,dm.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;var dAe=2048,hAe=null,vpe=function(){function r(){Er(this,r)}return br(r,[{key:"getOrCreateCanvas",value:function(e,t){if(this.canvas)return this.canvas;if(e||Dn.offscreenCanvas)this.canvas=e||Dn.offscreenCanvas,this.context=this.canvas.getContext("2d",nl({willReadFrequently:!0},t));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",nl({willReadFrequently:!0},t)),(!this.context||!this.context.measureText)&&(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(i){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",nl({willReadFrequently:!0},t))}return this.canvas.width=10,this.canvas.height=10,this.canvas}},{key:"getOrCreateContext",value:function(e,t){return this.context?this.context:(this.getOrCreateCanvas(e,t),this.context)}}],[{key:"createCanvas",value:function(){try{return new window.OffscreenCanvas(0,0)}catch(e){}try{return document.createElement("canvas")}catch(e){}return null}}])}(),fAe=function(r){return r[r.CAMERA_CHANGED=0]="CAMERA_CHANGED",r[r.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",r[r.NONE=2]="NONE",r}({}),vAe=null,gpe=/\[\s*(.*)=(.*)\s*\]/,_pe=function(){function r(){Er(this,r)}return br(r,[{key:"selectOne",value:function(e,t){var i=this;if(e.startsWith("."))return t.find(function(l){return((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(e))>-1});if(e.startsWith("#"))return t.find(function(l){return l.id===i.getIdOrClassname(e)});if(e.startsWith("[")){var a=this.getAttribute(e),s=a.name,o=a.value;return s?t.find(function(l){return t!==l&&(s==="name"?l.name===o:i.attributeToString(l,s)===o)}):null}return t.find(function(l){return t!==l&&l.nodeName===e})}},{key:"selectAll",value:function(e,t){var i=this;if(e.startsWith("."))return t.findAll(function(l){return t!==l&&((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(e))>-1});if(e.startsWith("#"))return t.findAll(function(l){return t!==l&&l.id===i.getIdOrClassname(e)});if(e.startsWith("[")){var a=this.getAttribute(e),s=a.name,o=a.value;return s?t.findAll(function(l){return t!==l&&(s==="name"?l.name===o:i.attributeToString(l,s)===o)}):[]}return t.findAll(function(l){return t!==l&&l.nodeName===e})}},{key:"is",value:function(e,t){if(e.startsWith("."))return t.className===this.getIdOrClassname(e);if(e.startsWith("#"))return t.id===this.getIdOrClassname(e);if(e.startsWith("[")){var i=this.getAttribute(e),a=i.name,s=i.value;return a==="name"?t.name===s:this.attributeToString(t,a)===s}return t.nodeName===e}},{key:"getIdOrClassname",value:function(e){return e.substring(1)}},{key:"getAttribute",value:function(e){var t=e.match(gpe),i="",a="";return t&&t.length>2&&(i=t[1].replace(/"/g,""),a=t[2].replace(/"/g,"")),{name:i,value:a}}},{key:"attributeToString",value:function(e,t){if(!e.getAttribute)return"";var i=e.getAttribute(t);return(0,xe.Z)(i)?"":i.toString?i.toString():""}}])}(),Mo=function(r){return r.REPARENT="reparent",r.DESTROY="destroy",r.ATTR_MODIFIED="DOMAttrModified",r.INSERTED="DOMNodeInserted",r.REMOVED="removed",r.MOUNTED="DOMNodeInsertedIntoDocument",r.UNMOUNTED="DOMNodeRemovedFromDocument",r.BOUNDS_CHANGED="bounds-changed",r.CULLED="culled",r}({}),mv=function(r){function n(e,t,i,a,s,o,l,u){var c;return Er(this,n),c=Ms(this,n,[null]),c.relatedNode=t,c.prevValue=i,c.newValue=a,c.attrName=s,c.attrChange=o,c.prevParsedValue=l,c.newParsedValue=u,c.type=e,c}return Ps(n,r),br(n)}(Lk);mv.ADDITION=2,mv.MODIFICATION=1,mv.REMOVAL=3;function R6(r){var n=r.renderable;n&&(n.renderBoundsDirty=!0,n.boundsDirty=!0)}var mpe=new mv(Mo.REPARENT,null,"","","",0,"",""),ppe=ot.Ue(),Ik=E.Ue(),ype=E.al(1,1,1),xpe=L.create(),Epe=ot.Ue(),Gg=E.Ue(),i0=L.create(),zg=X.Ue(),bpe=E.Ue(),kpe=X.Ue(),wpe=E.Ue(),gx=E.Ue(),hm=E.Ue(),Dk=L.create(),A6=X.Ue(),L6=X.Ue(),Fk=X.Ue(),OP={affectChildren:!0},Spe=function(){function r(n){Er(this,r),this.pendingEvents=new Map,this.boundsChangedEvent=new Pd(Mo.BOUNDS_CHANGED),this.displayObjectDependencyMap=new WeakMap,this.runtime=n}return br(r,[{key:"matches",value:function(e,t){return this.runtime.sceneGraphSelector.is(e,t)}},{key:"querySelector",value:function(e,t){return this.runtime.sceneGraphSelector.selectOne(e,t)}},{key:"querySelectorAll",value:function(e,t){return this.runtime.sceneGraphSelector.selectAll(e,t)}},{key:"attach",value:function(e,t,i){var a,s=!1;e.parentNode&&(s=e.parentNode!==t,this.detach(e));var o=e.nodeName===Yr.FRAGMENT,l=PP(t);e.parentNode=t;var u=o?e.childNodes:[e];(0,pe.Z)(i)?u.forEach(function(f){t.childNodes.splice(i,0,f),f.parentNode=t}):u.forEach(function(f){t.childNodes.push(f),f.parentNode=t});var c=t,d=c.sortable;if((d!=null&&(a=d.sorted)!==null&&a!==void 0&&a.length||e.parsedStyle.zIndex)&&(d.dirtyChildren.indexOf(e)===-1&&d.dirtyChildren.push(e),d.dirty=!0,d.dirtyReason=vP.ADDED),!l){if(o)this.dirtifyFragment(e);else{var h=e.transformable;h&&this.dirtifyWorld(e,h)}s&&e.dispatchEvent(mpe)}}},{key:"detach",value:function(e){if(e.parentNode){var t,i,a=e.transformable,s=e.parentNode,o=s.sortable;(o!=null&&(t=o.sorted)!==null&&t!==void 0&&t.length||(i=e.style)!==null&&i!==void 0&&i.zIndex)&&(o.dirtyChildren.indexOf(e)===-1&&o.dirtyChildren.push(e),o.dirty=!0,o.dirtyReason=vP.REMOVED);var l=e.parentNode.childNodes.indexOf(e);l>-1&&e.parentNode.childNodes.splice(l,1),a&&this.dirtifyWorld(e,a),e.parentNode=null}}},{key:"getOrigin",value:function(e){return e.getGeometryBounds(),e.transformable.origin}},{key:"setOrigin",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=[t,i,a]);var s=e.transformable;if(!(t[0]===s.origin[0]&&t[1]===s.origin[1]&&t[2]===s.origin[2])){var o=s.origin;o[0]=t[0],o[1]=t[1],o[2]=t[2]||0,this.dirtifyLocal(e,s)}}},{key:"rotate",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;if(e.parentNode===null||!e.parentNode.transformable)this.rotateLocal(e,t);else{var o=zg;X.Su(o,t[0],t[1],t[2]);var l=this.getRotation(e),u=this.getRotation(e.parentNode);X.JG(Fk,u),X.U_(Fk,Fk),X.Jp(o,Fk,o),X.Jp(s.localRotation,o,l),X.Fv(s.localRotation,s.localRotation),this.dirtifyLocal(e,s)}}},{key:"rotateLocal",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;X.Su(L6,t[0],t[1],t[2]),X.dC(s.localRotation,s.localRotation,L6),this.dirtifyLocal(e,s)}},{key:"setEulerAngles",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;if(e.parentNode===null||!e.parentNode.transformable)this.setLocalEulerAngles(e,t);else{X.Su(s.localRotation,t[0],t[1],t[2]);var o=this.getRotation(e.parentNode);X.JG(A6,X.U_(zg,o)),X.dC(s.localRotation,s.localRotation,A6),this.dirtifyLocal(e,s)}}},{key:"setLocalEulerAngles",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;typeof t=="number"&&(t=E.al(t,i,a));var o=e.transformable;X.Su(o.localRotation,t[0],t[1],t[2]),s&&this.dirtifyLocal(e,o)}},{key:"translateLocal",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;E.fS(t,Ik)||(E.VC(t,t,s.localRotation),E.IH(s.localPosition,s.localPosition,t),this.dirtifyLocal(e,s))}},{key:"setPosition",value:function(e,t){var i,a=e.transformable;if(hm[0]=t[0],hm[1]=t[1],hm[2]=(i=t[2])!==null&&i!==void 0?i:0,!E.fS(this.getPosition(e),hm)){if(E.JG(a.position,hm),e.parentNode===null||!e.parentNode.transformable)E.JG(a.localPosition,hm);else{var s=e.parentNode.transformable;L.copy(Dk,s.worldTransform),L.invert(Dk,Dk),E.fF(a.localPosition,hm,Dk)}this.dirtifyLocal(e,a)}}},{key:"setLocalPosition",value:function(e,t){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=e.transformable;gx[0]=t[0],gx[1]=t[1],gx[2]=(i=t[2])!==null&&i!==void 0?i:0,!E.fS(s.localPosition,gx)&&(E.JG(s.localPosition,gx),a&&this.dirtifyLocal(e,s))}},{key:"scaleLocal",value:function(e,t){var i,a=e.transformable;E.Jp(a.localScale,a.localScale,E.t8(Gg,t[0],t[1],(i=t[2])!==null&&i!==void 0?i:1)),this.dirtifyLocal(e,a)}},{key:"setLocalScale",value:function(e,t){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=e.transformable;E.t8(Gg,t[0],t[1],(i=t[2])!==null&&i!==void 0?i:s.localScale[2]),!E.fS(Gg,s.localScale)&&(E.JG(s.localScale,Gg),a&&this.dirtifyLocal(e,s))}},{key:"translate",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.t8(Gg,t,i,a)),!E.fS(t,Ik)&&(E.IH(Gg,this.getPosition(e),t),this.setPosition(e,Gg))}},{key:"setRotation",value:function(e,t,i,a,s){var o=e.transformable;if(typeof t=="number"&&(t=X.al(t,i,a,s)),e.parentNode===null||!e.parentNode.transformable)this.setLocalRotation(e,t);else{var l=this.getRotation(e.parentNode);X.JG(zg,l),X.U_(zg,zg),X.Jp(o.localRotation,zg,t),X.Fv(o.localRotation,o.localRotation),this.dirtifyLocal(e,o)}}},{key:"setLocalRotation",value:function(e,t,i,a,s){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;typeof t=="number"&&(t=X.t8(zg,t,i,a,s));var l=e.transformable;X.JG(l.localRotation,t),o&&this.dirtifyLocal(e,l)}},{key:"setLocalSkew",value:function(e,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;typeof t=="number"&&(t=ot.t8(Epe,t,i));var s=e.transformable;ot.JG(s.localSkew,t),a&&this.dirtifyLocal(e,s)}},{key:"dirtifyLocal",value:function(e,t){PP(e)||t.localDirtyFlag||(t.localDirtyFlag=!0,t.dirtyFlag||this.dirtifyWorld(e,t))}},{key:"dirtifyWorld",value:function(e,t){t.dirtyFlag||this.unfreezeParentToRoot(e),this.dirtifyWorldInternal(e,t),this.dirtifyToRoot(e,!0)}},{key:"dirtifyFragment",value:function(e){var t=e.transformable;t&&(t.frozen=!1,t.dirtyFlag=!0,t.localDirtyFlag=!0);var i=e.renderable;i&&(i.renderBoundsDirty=!0,i.boundsDirty=!0,i.dirty=!0);for(var a=e.childNodes.length,s=0;s<a;s++)this.dirtifyFragment(e.childNodes[s]);e.nodeName===Yr.FRAGMENT&&this.pendingEvents.set(e,!1)}},{key:"triggerPendingEvents",value:function(){var e=this,t=new Set,i=function(s,o){!s.isConnected||t.has(s)||s.nodeName===Yr.FRAGMENT||(e.boundsChangedEvent.detail=o,e.boundsChangedEvent.target=s,s.isMutationObserved?s.dispatchEvent(e.boundsChangedEvent):s.ownerDocument.defaultView.dispatchEvent(e.boundsChangedEvent,!0),t.add(s))};this.pendingEvents.forEach(function(a,s){s.nodeName!==Yr.FRAGMENT&&(OP.affectChildren=a,a?s.forEach(function(o){i(o,OP)}):i(s,OP))}),t.clear(),this.clearPendingEvents()}},{key:"clearPendingEvents",value:function(){this.pendingEvents.clear()}},{key:"dirtifyToRoot",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=e;for(i.renderable&&(i.renderable.dirty=!0);i;)R6(i),i=i.parentNode;t&&e.forEach(function(a){R6(a)}),this.informDependentDisplayObjects(e),this.pendingEvents.set(e,t)}},{key:"updateDisplayObjectDependency",value:function(e,t,i,a){if(t&&t!==i){var s=this.displayObjectDependencyMap.get(t);if(s&&s[e]){var o=s[e].indexOf(a);s[e].splice(o,1)}}if(i){var l=this.displayObjectDependencyMap.get(i);l||(this.displayObjectDependencyMap.set(i,{}),l=this.displayObjectDependencyMap.get(i)),l[e]||(l[e]=[]),l[e].push(a)}}},{key:"informDependentDisplayObjects",value:function(e){var t=this,i=this.displayObjectDependencyMap.get(e);i&&Object.keys(i).forEach(function(a){i[a].forEach(function(s){t.dirtifyToRoot(s,!0),s.dispatchEvent(new mv(Mo.ATTR_MODIFIED,s,t,t,a,mv.MODIFICATION,t,t)),s.isCustomElement&&s.isConnected&&s.attributeChangedCallback&&s.attributeChangedCallback(a,t,t)})})}},{key:"getPosition",value:function(e){var t=e.transformable;return L.getTranslation(t.position,this.getWorldTransform(e,t))}},{key:"getRotation",value:function(e){var t=e.transformable;return L.getRotation(t.rotation,this.getWorldTransform(e,t))}},{key:"getScale",value:function(e){var t=e.transformable;return L.getScaling(t.scaling,this.getWorldTransform(e,t))}},{key:"getWorldTransform",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.transformable;return!t.localDirtyFlag&&!t.dirtyFlag||(e.parentNode&&e.parentNode.transformable&&this.getWorldTransform(e.parentNode),this.sync(e,t)),t.worldTransform}},{key:"getLocalPosition",value:function(e){return e.transformable.localPosition}},{key:"getLocalRotation",value:function(e){return e.transformable.localRotation}},{key:"getLocalScale",value:function(e){return e.transformable.localScale}},{key:"getLocalSkew",value:function(e){return e.transformable.localSkew}},{key:"calcLocalTransform",value:function(e){var t=e.localSkew[0]!==0||e.localSkew[1]!==0;if(t){L.fromRotationTranslationScaleOrigin(e.localTransform,e.localRotation,e.localPosition,E.al(1,1,1),e.origin),(e.localSkew[0]!==0||e.localSkew[1]!==0)&&(L.identity(i0),i0[4]=Math.tan(e.localSkew[0]),i0[1]=Math.tan(e.localSkew[1]),L.multiply(e.localTransform,e.localTransform,i0));var i=L.fromRotationTranslationScaleOrigin(i0,X.t8(zg,0,0,0,1),E.t8(Gg,1,1,1),e.localScale,e.origin);L.multiply(e.localTransform,e.localTransform,i)}else{var a=e.localTransform,s=e.localPosition,o=e.localRotation,l=e.localScale,u=e.origin,c=s[0]!==0||s[1]!==0||s[2]!==0,d=o[3]!==1||o[0]!==0||o[1]!==0||o[2]!==0,h=l[0]!==1||l[1]!==1||l[2]!==1,f=u[0]!==0||u[1]!==0||u[2]!==0;!d&&!h&&!f?c?L.fromTranslation(a,s):L.identity(a):L.fromRotationTranslationScaleOrigin(a,o,s,l,u)}}},{key:"getLocalTransform",value:function(e){var t=e.transformable;return t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.localTransform}},{key:"setLocalTransform",value:function(e,t){var i=L.getTranslation(bpe,t),a=L.getRotation(kpe,t),s=L.getScaling(wpe,t);this.setLocalScale(e,s,!1),this.setLocalPosition(e,i,!1),this.setLocalRotation(e,a,void 0,void 0,void 0,!1),this.dirtifyLocal(e,e.transformable)}},{key:"resetLocalTransform",value:function(e){this.setLocalScale(e,ype,!1),this.setLocalPosition(e,Ik,!1),this.setLocalEulerAngles(e,Ik,void 0,void 0,!1),this.setLocalSkew(e,ppe,void 0,!1),this.dirtifyLocal(e,e.transformable)}},{key:"getTransformedGeometryBounds",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2?arguments[2]:void 0,a=this.getGeometryBounds(e,t);if(!nd.isEmpty(a)){var s=i||new nd;return s.setFromTransformedAABB(a,this.getWorldTransform(e)),s}return null}},{key:"getGeometryBounds",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=e,a=i.geometry;a.dirty&&Dn.styleValueRegistry.updateGeometry(e);var s=t?a.renderBounds:a.contentBounds||null;return s||new nd}},{key:"getBounds",value:function(e){var t=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=e,s=a.renderable;if(!s.boundsDirty&&!i&&s.bounds)return s.bounds;if(!s.renderBoundsDirty&&i&&s.renderBounds)return s.renderBounds;var o=i?s.renderBounds:s.bounds,l=this.getTransformedGeometryBounds(e,i,o),u=e.childNodes;if(u.forEach(function(h){var f=t.getBounds(h,i);f&&(l?l.add(f):(l=o||new nd,l.update(f.center,f.halfExtents)))}),l||(l=new nd),i){var c=Ome(e);if(c){var d=c.parsedStyle.clipPath.getBounds(i);l?d&&(l=d.intersection(l)):l.update(d.center,d.halfExtents)}}return i?(s.renderBounds=l,s.renderBoundsDirty=!1):(s.bounds=l,s.boundsDirty=!1),l}},{key:"getLocalBounds",value:function(e){if(e.parentNode){var t=xpe;e.parentNode.transformable&&(t=L.invert(i0,this.getWorldTransform(e.parentNode)));var i=this.getBounds(e);if(!nd.isEmpty(i)){var a=new nd;return a.setFromTransformedAABB(i,t),a}}return this.getBounds(e)}},{key:"getBoundingClientRect",value:function(e){var t,i,a=this.getGeometryBounds(e);nd.isEmpty(a)||(i=new nd,i.setFromTransformedAABB(a,this.getWorldTransform(e)));var s=(t=e.ownerDocument)===null||t===void 0||(t=t.defaultView)===null||t===void 0?void 0:t.getContextService().getBoundingClientRect();if(i){var o=i.getMin(),l=Ds(o,2),u=l[0],c=l[1],d=i.getMax(),h=Ds(d,2),f=h[0],v=h[1];return new e0(u+((s==null?void 0:s.left)||0),c+((s==null?void 0:s.top)||0),f-u,v-c)}return new e0((s==null?void 0:s.left)||0,(s==null?void 0:s.top)||0,0,0)}},{key:"dirtifyWorldInternal",value:function(e,t){var i=this;if(!t.dirtyFlag){t.dirtyFlag=!0,t.frozen=!1,e.childNodes.forEach(function(o){var l=o.transformable;l.dirtyFlag||i.dirtifyWorldInternal(o,l)});var a=e,s=a.renderable;s&&(s.renderBoundsDirty=!0,s.boundsDirty=!0,s.dirty=!0)}}},{key:"syncHierarchy",value:function(e){var t=e.transformable;if(!t.frozen){t.frozen=!0,(t.localDirtyFlag||t.dirtyFlag)&&this.sync(e,t);for(var i=e.childNodes,a=0;a<i.length;a++)this.syncHierarchy(i[a])}}},{key:"sync",value:function(e,t){if(t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.dirtyFlag){var i=e.parentNode,a=i&&i.transformable;i===null||!a?L.copy(t.worldTransform,t.localTransform):L.multiply(t.worldTransform,a.worldTransform,t.localTransform),t.dirtyFlag=!1}}},{key:"unfreezeParentToRoot",value:function(e){for(var t=e.parentNode;t;){var i=t.transformable;i&&(i.frozen=!1),t=t.parentNode}}}])}(),fm={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]},I6=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,Tpe=/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/,Cpe=/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/,Mpe=/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/,Ppe=/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/,Npe=/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/,Ope=/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/,Rpe=/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/,Ape=/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/,Lpe=new RegExp("".concat(Tpe.source,"|").concat(Mpe.source,"|").concat(Npe.source,"|").concat(Rpe.source)),Ipe=new RegExp("".concat(Cpe.source,"|").concat(Ppe.source,"|").concat(Ope.source,"|").concat(Ape.source)),Dpe=function(){function r(n){var e=this;Er(this,r),this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,i){return e.isBreakingSpace(i)?!1:!!(t&&(Ipe.exec(i)||Lpe.exec(t)))},this.trimByKinsokuShorui=function(t){var i=rl(t),a=i[i.length-2];if(!a)return t;var s=a[a.length-1];return i[i.length-2]=a.slice(0,-1),i[i.length-1]=s+i[i.length-1],i},this.runtime=n}return br(r,[{key:"measureFont",value:function(e,t){if(this.fontMetricsCache[e])return this.fontMetricsCache[e];var i={ascent:0,descent:0,fontSize:0},a=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(t),s=this.runtime.offscreenCanvasCreator.getOrCreateContext(t,{willReadFrequently:!0});s.font=e;var o=fm.MetricsString+fm.BaselineSymbol,l=Math.ceil(s.measureText(o).width),u=Math.ceil(s.measureText(fm.BaselineSymbol).width),c=fm.HeightMultiplier*u;u=u*fm.BaselineMultiplier|0,a.width=l,a.height=c,s.fillStyle="#f00",s.fillRect(0,0,l,c),s.font=e,s.textBaseline="alphabetic",s.fillStyle="#000",s.fillText(o,0,u);var d=s.getImageData(0,0,l||1,c||1).data,h=d.length,f=l*4,v=0,g=0,m=!1;for(v=0;v<u;++v){for(var y=0;y<f;y+=4)if(d[g+y]!==255){m=!0;break}if(!m)g+=f;else break}for(i.ascent=u-v,g=h-f,m=!1,v=c;v>u;--v){for(var w=0;w<f;w+=4)if(d[g+w]!==255){m=!0;break}if(!m)g-=f;else break}return i.descent=v-u,i.fontSize=i.ascent+i.descent,this.fontMetricsCache[e]=i,i}},{key:"measureText",value:function(e,t,i){var a=t.fontSize,s=a===void 0?16:a,o=t.wordWrap,l=o===void 0?!1:o,u=t.lineHeight,c=t.lineWidth,d=c===void 0?1:c,h=t.textBaseline,f=h===void 0?"alphabetic":h,v=t.textAlign,g=v===void 0?"start":v,m=t.letterSpacing,y=m===void 0?0:m,w=t.textPath;t.textPathSide,t.textPathStartOffset;var T=t.leading,G=T===void 0?0:T,x=Yme(t),_=this.measureFont(x,i);_.fontSize===0&&(_.fontSize=s,_.ascent=s);var p=this.runtime.offscreenCanvasCreator.getOrCreateContext(i);p.font=x,t.isOverflowing=!1;var b=l?this.wordWrap(e,t,i):e,R=b.split(/(?:\r\n|\r|\n)/),B=new Array(R.length),j=0;if(w){w.getTotalLength();for(var Z=0;Z<R.length;Z++)p.measureText(R[Z]).width+(R[Z].length-1)*y}else{for(var te=0;te<R.length;te++){var le=p.measureText(R[te]).width+(R[te].length-1)*y;B[te]=le,j=Math.max(j,le)}var ue=j+d,se=u||_.fontSize+d,V=Math.max(se,_.fontSize+d)+(R.length-1)*(se+G);se+=G;var ee=0;return f==="middle"?ee=-V/2:f==="bottom"||f==="alphabetic"||f==="ideographic"?ee=-V:(f==="top"||f==="hanging")&&(ee=0),{font:x,width:ue,height:V,lines:R,lineWidths:B,lineHeight:se,maxLineWidth:j,fontProperties:_,lineMetrics:B.map(function(he,ut){var ct=0;return g==="center"||g==="middle"?ct-=he/2:(g==="right"||g==="end")&&(ct-=he),new e0(ct-d/2,ee+ut*se,he+d,se)})}}}},{key:"wordWrap",value:function(e,t,i){var a=this,s=t.wordWrapWidth,o=s===void 0?0:s,l=t.letterSpacing,u=l===void 0?0:l,c=t.maxLines,d=c===void 0?1/0:c,h=t.textOverflow,f=this.runtime.offscreenCanvasCreator.getOrCreateContext(i),v=o+u,g="";h==="ellipsis"?g="...":h&&h!=="clip"&&(g=h);var m=[],y=0,w=0,T={},G=function(le){return a.getFromCache(le,u,T,f)},x=Array.from(g).reduce(function(te,le){return te+G(le)},0);function _(te){if(!(x<=0||x>v)){for(var le=m[te].length,ue=0,se=le,V=0;V<le;V++){var ee=G(m[te][V]);if(ue+ee+x>v){se=V;break}ue+=ee}m[te]=(m[te]||"").slice(0,se)+g}}for(var p=Array.from(e),b=0;b<p.length;b++){var R=p[b],B=e[b-1],j=e[b+1],Z=G(R);if(this.isNewline(R)){if(y++,y>=d){t.isOverflowing=!0,b<p.length-1&&_(y-1);break}w=0,m[y]="";continue}if(w>0&&w+Z>v){if(y+1>=d){t.isOverflowing=!0,_(y);break}if(y++,w=0,m[y]="",this.isBreakingSpace(R))continue;this.canBreakInLastChar(R)||(m=this.trimToBreakable(m),w=this.sumTextWidthByCache(m[y]||"",T)),this.shouldBreakByKinsokuShorui(R,j)&&(m=this.trimByKinsokuShorui(m),w+=G(B||""))}w+=Z,m[y]=(m[y]||"")+R}return m.join(`
|
|
|
`)}},{key:"isBreakingSpace",value:function(e){return typeof e!="string"?!1:fm.BreakingSpaces.indexOf(e.charCodeAt(0))>=0}},{key:"isNewline",value:function(e){return typeof e!="string"?!1:fm.Newlines.indexOf(e.charCodeAt(0))>=0}},{key:"trimToBreakable",value:function(e){var t=rl(e),i=t[t.length-2],a=this.findBreakableIndex(i);if(a===-1||!i)return t;var s=i.slice(a,a+1),o=this.isBreakingSpace(s),l=a+1,u=a+(o?0:1);return t[t.length-1]+=i.slice(l,i.length),t[t.length-2]=i.slice(0,u),t}},{key:"canBreakInLastChar",value:function(e){return!(e&&I6.test(e))}},{key:"sumTextWidthByCache",value:function(e,t){return e.split("").reduce(function(i,a){if(!t[a])throw Error("cannot count the word without cache");return i+t[a]},0)}},{key:"findBreakableIndex",value:function(e){for(var t=e.length-1;t>=0;t--)if(!I6.test(e[t]))return t;return-1}},{key:"getFromCache",value:function(e,t,i,a){var s=i[e];if(typeof s!="number"){var o=e.length*t;s=a.measureText(e).width+o,i[e]=s}return s}}])}(),Dn={},Fpe=function(r){var n=new ope,e=new spe;return r={},pa(pa(pa(pa(pa(pa(pa(pa(pa(pa(r,Yr.FRAGMENT,null),Yr.CIRCLE,new npe),Yr.ELLIPSE,new rpe),Yr.RECT,n),Yr.IMAGE,n),Yr.GROUP,new upe),Yr.LINE,new ipe),Yr.TEXT,new lpe(Dn)),Yr.POLYLINE,e),Yr.POLYGON,e),pa(pa(pa(r,Yr.PATH,new ape),Yr.HTML,new cpe),Yr.MESH,null)}(),Bpe=function(r){var n=new mme,e=new CP;return r={},pa(pa(pa(pa(pa(pa(pa(pa(pa(pa(r,Yn.PERCENTAGE,null),Yn.NUMBER,new bme),Yn.ANGLE,new gme),Yn.DEFINED_PATH,new _me),Yn.PAINT,n),Yn.COLOR,n),Yn.FILTER,new pme),Yn.LENGTH,e),Yn.LENGTH_PERCENTAGE,e),Yn.LENGTH_PERCENTAGE_12,new yme),pa(pa(pa(pa(pa(pa(pa(pa(pa(pa(r,Yn.LENGTH_PERCENTAGE_14,new xme),Yn.COORDINATE,new CP),Yn.OFFSET_DISTANCE,new kme),Yn.OPACITY_VALUE,new wme),Yn.PATH,new Sme),Yn.LIST_OF_POINTS,new Tme),Yn.SHADOW_BLUR,new Cme),Yn.TEXT,new Mme),Yn.TEXT_TRANSFORM,new Pme),Yn.TRANSFORM,new qme),pa(pa(pa(r,Yn.TRANSFORM_ORIGIN,new epe),Yn.Z_INDEX,new tpe),Yn.MARKER,new Eme)}(),$pe=function(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof k.g!="undefined"?k.g:{}};Dn.CameraContribution=HB,Dn.AnimationTimeline=null,Dn.EasingFunction=null,Dn.offscreenCanvasCreator=new vpe,Dn.sceneGraphSelector=new _pe,Dn.sceneGraphService=new Spe(Dn),Dn.textService=new Dpe(Dn),Dn.geometryUpdaterFactory=Fpe,Dn.CSSPropertySyntaxFactory=Bpe,Dn.styleValueRegistry=new fme(Dn),Dn.layoutRegistry=null,Dn.globalThis=$pe(),Dn.enableStyleSyntax=!0,Dn.enableSizeAttenuation=!1;var D6=0;function gAe(){D6=0}var F6=new mv(Mo.INSERTED,null,"","","",0,"",""),B6=new mv(Mo.REMOVED,null,"","","",0,"",""),Gpe=new Pd(Mo.DESTROY),zpe=function(r){function n(){var e;Er(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ms(this,n,[].concat(i)),e.entity=D6++,e.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},e.cullable={strategy:i_e.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},e.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:[0,0,0],localRotation:[0,0,0,1],localScale:[1,1,1],localTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],localSkew:[0,0],position:[0,0,0],rotation:[0,0,0,1],scaling:[1,1,1],worldTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],origin:[0,0,0]},e.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},e.geometry={contentBounds:void 0,renderBounds:void 0,dirty:!0},e.rBushNode={aabb:void 0},e.namespaceURI="g",e.scrollLeft=0,e.scrollTop=0,e.clientTop=0,e.clientLeft=0,e.destroyed=!1,e.style={},e.computedStyle={},e.parsedStyle={},e.attributes={},e}return Ps(n,r),br(n,[{key:"className",get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(t){return t!==""})}},{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 t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t+1]||null}return null}},{key:"previousSibling",get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t-1]||null}return null}},{key:"cloneNode",value:function(t){throw new Error(Ns)}},{key:"appendChild",value:function(t,i){var a;if(t.destroyed)throw new Error(Hge);return Dn.sceneGraphService.attach(t,this,i),(a=this.ownerDocument)!==null&&a!==void 0&&a.defaultView&&(!PP(this)&&t.nodeName===Yr.FRAGMENT?this.ownerDocument.defaultView.mountFragment(t):this.ownerDocument.defaultView.mountChildren(t)),this.isMutationObserved&&(F6.relatedNode=this,t.dispatchEvent(F6)),t}},{key:"insertBefore",value:function(t,i){if(!i)this.appendChild(t);else{t.parentElement&&t.parentElement.removeChild(t);var a=this.childNodes.indexOf(i);a===-1?this.appendChild(t):this.appendChild(t,a)}return t}},{key:"replaceChild",value:function(t,i){var a=this.childNodes.indexOf(i);return this.removeChild(i),this.appendChild(t,a),i}},{key:"removeChild",value:function(t){var i;return B6.relatedNode=this,t.dispatchEvent(B6),(i=t.ownerDocument)!==null&&i!==void 0&&i.defaultView&&t.ownerDocument.defaultView.unmountChildren(t),Dn.sceneGraphService.detach(t),t}},{key:"removeChildren",value:function(){for(var t=this.childNodes.length-1;t>=0;t--){var i=this.childNodes[t];this.removeChild(i)}}},{key:"destroyChildren",value:function(){for(var t=this.childNodes.length-1;t>=0;t--){var i=this.childNodes[t];i.childNodes.length>0&&i.destroyChildren(),i.destroy()}}},{key:"matches",value:function(t){return Dn.sceneGraphService.matches(t,this)}},{key:"getElementById",value:function(t){return Dn.sceneGraphService.querySelector("#".concat(t),this)}},{key:"getElementsByName",value:function(t){return Dn.sceneGraphService.querySelectorAll('[name="'.concat(t,'"]'),this)}},{key:"getElementsByClassName",value:function(t){return Dn.sceneGraphService.querySelectorAll(".".concat(t),this)}},{key:"getElementsByTagName",value:function(t){return Dn.sceneGraphService.querySelectorAll(t,this)}},{key:"querySelector",value:function(t){return Dn.sceneGraphService.querySelector(t,this)}},{key:"querySelectorAll",value:function(t){return Dn.sceneGraphService.querySelectorAll(t,this)}},{key:"closest",value:function(t){var i=this;do{if(Dn.sceneGraphService.matches(t,i))return i;i=i.parentElement}while(i!==null);return null}},{key:"find",value:function(t){var i=this,a=null;return this.forEach(function(s){return s!==i&&t(s)?(a=s,!1):!0}),a}},{key:"findAll",value:function(t){var i=this,a=[];return this.forEach(function(s){s!==i&&t(s)&&a.push(s)}),a}},{key:"after",value:function(){var t=this;if(this.parentNode){for(var i=this.parentNode.childNodes.indexOf(this),a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];s.forEach(function(l,u){var c;return(c=t.parentNode)===null||c===void 0?void 0:c.appendChild(l,i+u+1)})}}},{key:"before",value:function(){if(this.parentNode){for(var t,i=this.parentNode.childNodes.indexOf(this),a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];var l=s[0],u=s.slice(1);this.parentNode.appendChild(l,i),(t=l).after.apply(t,rl(u))}}},{key:"replaceWith",value:function(){this.after.apply(this,arguments),this.remove()}},{key:"append",value:function(){for(var t=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];a.forEach(function(o){return t.appendChild(o)})}},{key:"prepend",value:function(){for(var t=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];a.forEach(function(o,l){return t.appendChild(o,l)})}},{key:"replaceChildren",value:function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)}},{key:"remove",value:function(){return this.parentNode?this.parentNode.removeChild(this):this}},{key:"destroy",value:function(){this.destroyChildren(),this.dispatchEvent(Gpe),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0}},{key:"getGeometryBounds",value:function(){return Dn.sceneGraphService.getGeometryBounds(this)}},{key:"getRenderBounds",value:function(){return Dn.sceneGraphService.getBounds(this,!0)}},{key:"getBounds",value:function(){return Dn.sceneGraphService.getBounds(this)}},{key:"getLocalBounds",value:function(){return Dn.sceneGraphService.getLocalBounds(this)}},{key:"getBoundingClientRect",value:function(){return Dn.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(t){if(typeof t!="symbol"){var i=this.attributes[t];return i}}},{key:"hasAttribute",value:function(t){return this.getAttributeNames().includes(t)}},{key:"hasAttributes",value:function(){return!!this.getAttributeNames().length}},{key:"removeAttribute",value:function(t){this.setAttribute(t,null),delete this.attributes[t]}},{key:"setAttribute",value:function(t,i,a,s){this.attributes[t]=i}},{key:"getAttributeNS",value:function(t,i){throw new Error(Ns)}},{key:"getAttributeNode",value:function(t){throw new Error(Ns)}},{key:"getAttributeNodeNS",value:function(t,i){throw new Error(Ns)}},{key:"hasAttributeNS",value:function(t,i){throw new Error(Ns)}},{key:"removeAttributeNS",value:function(t,i){throw new Error(Ns)}},{key:"removeAttributeNode",value:function(t){throw new Error(Ns)}},{key:"setAttributeNS",value:function(t,i,a){throw new Error(Ns)}},{key:"setAttributeNode",value:function(t){throw new Error(Ns)}},{key:"setAttributeNodeNS",value:function(t){throw new Error(Ns)}},{key:"toggleAttribute",value:function(t,i){throw new Error(Ns)}}])}(dm);function to(r){return!!(r!=null&&r.nodeName)}var Vpe=Dn.globalThis.Proxy?Dn.globalThis.Proxy:function(){},Jv=new mv(Mo.ATTR_MODIFIED,null,null,null,null,mv.MODIFICATION,null,null),_x=E.Ue(),Upe=X.Ue(),al=function(r){function n(e){var t;return Er(this,n),t=Ms(this,n),t.isCustomElement=!1,t.isMutationObserved=!1,t.activeAnimations=[],t.config=e,t.id=e.id||"",t.name=e.name||"",(e.className||e.class)&&(t.className=e.className||e.class),t.nodeName=e.type||Yr.GROUP,e.initialParsedStyle&&Object.assign(t.parsedStyle,e.initialParsedStyle),t.initAttributes(e.style),Dn.enableStyleSyntax&&(t.style=new Vpe({setProperty:function(a,s){t.setAttribute(a,s)},getPropertyValue:function(a){return t.getAttribute(a)},removeProperty:function(a){t.removeAttribute(a)},item:function(){return""}},{get:function(a,s){return a[s]!==void 0?a[s]:t.getAttribute(s)},set:function(a,s,o){return t.setAttribute(s,o),!0}})),t}return Ps(n,r),br(n,[{key:"destroy",value:function(){MB(n,"destroy",this,3)([]),this.getAnimations().forEach(function(t){t.cancel()})}},{key:"cloneNode",value:function(t,i){var a=nl({},this.attributes);for(var s in a){var o=a[s];to(o)&&s!=="clipPath"&&s!=="offsetPath"&&s!=="textPath"&&(a[s]=o.cloneNode(t)),i&&(a[s]=i(s,o))}var l=new this.constructor(nl(nl({},this.config),{},{style:a}));return l.setLocalTransform(this.getLocalTransform()),t&&this.children.forEach(function(u){if(!u.style.isMarker){var c=u.cloneNode(t);l.appendChild(c)}}),l}},{key:"initAttributes",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i={forceUpdateGeometry:!0};Dn.styleValueRegistry.processProperties(this,t,i),this.renderable.dirty=!0}},{key:"setAttribute",value:function(t,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;(0,ie.Z)(i)||(a||i!==this.attributes[t])&&(this.internalSetAttribute(t,i,{memoize:s}),MB(n,"setAttribute",this,3)([t,i]))}},{key:"internalSetAttribute",value:function(t,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=this.renderable,o=this.attributes[t],l=this.parsedStyle[t];Dn.styleValueRegistry.processProperties(this,pa({},t,i),a),s.dirty=!0;var u=this.parsedStyle[t];if(this.isConnected&&(Jv.relatedNode=this,Jv.prevValue=o,Jv.newValue=i,Jv.attrName=t,Jv.prevParsedValue=l,Jv.newParsedValue=u,this.isMutationObserved?this.dispatchEvent(Jv):(Jv.target=this,this.ownerDocument.defaultView.dispatchEvent(Jv,!0))),this.isCustomElement&&this.isConnected||!this.isCustomElement){var c,d;(c=(d=this).attributeChangedCallback)===null||c===void 0||c.call(d,t,o,i,l,u)}}},{key:"getBBox",value:function(){var t=this.getBounds(),i=t.getMin(),a=Ds(i,2),s=a[0],o=a[1],l=t.getMax(),u=Ds(l,2),c=u[0],d=u[1];return new e0(s,o,c-s,d-o)}},{key:"setOrigin",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return Dn.sceneGraphService.setOrigin(this,pc(t,i,a,!1)),this}},{key:"getOrigin",value:function(){return Dn.sceneGraphService.getOrigin(this)}},{key:"setPosition",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return Dn.sceneGraphService.setPosition(this,pc(t,i,a,!1)),this}},{key:"setLocalPosition",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return Dn.sceneGraphService.setLocalPosition(this,pc(t,i,a,!1)),this}},{key:"translate",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return Dn.sceneGraphService.translate(this,pc(t,i,a,!1)),this}},{key:"translateLocal",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return Dn.sceneGraphService.translateLocal(this,pc(t,i,a,!1)),this}},{key:"getPosition",value:function(){return Dn.sceneGraphService.getPosition(this)}},{key:"getLocalPosition",value:function(){return Dn.sceneGraphService.getLocalPosition(this)}},{key:"scale",value:function(t,i,a){return this.scaleLocal(t,i,a)}},{key:"scaleLocal",value:function(t,i,a){return typeof t=="number"&&(i=i||t,a=a||t,t=pc(t,i,a,!1)),Dn.sceneGraphService.scaleLocal(this,t),this}},{key:"setLocalScale",value:function(t,i,a){return typeof t=="number"&&(i=i||t,a=a||t,t=pc(t,i,a,!1)),Dn.sceneGraphService.setLocalScale(this,t),this}},{key:"getLocalScale",value:function(){return Dn.sceneGraphService.getLocalScale(this)}},{key:"getScale",value:function(){return Dn.sceneGraphService.getScale(this)}},{key:"getEulerAngles",value:function(){var t=hP(_x,Dn.sceneGraphService.getWorldTransform(this)),i=Ds(t,3),a=i[2];return dh(a)}},{key:"getLocalEulerAngles",value:function(){var t=hP(_x,Dn.sceneGraphService.getLocalRotation(this)),i=Ds(t,3),a=i[2];return dh(a)}},{key:"setEulerAngles",value:function(t){return Dn.sceneGraphService.setEulerAngles(this,0,0,t),this}},{key:"setLocalEulerAngles",value:function(t){return Dn.sceneGraphService.setLocalEulerAngles(this,0,0,t),this}},{key:"rotateLocal",value:function(t,i,a){return(0,xe.Z)(i)&&(0,xe.Z)(a)?Dn.sceneGraphService.rotateLocal(this,0,0,t):Dn.sceneGraphService.rotateLocal(this,t,i,a),this}},{key:"rotate",value:function(t,i,a){return(0,xe.Z)(i)&&(0,xe.Z)(a)?Dn.sceneGraphService.rotate(this,0,0,t):Dn.sceneGraphService.rotate(this,t,i,a),this}},{key:"setRotation",value:function(t,i,a,s){return Dn.sceneGraphService.setRotation(this,t,i,a,s),this}},{key:"setLocalRotation",value:function(t,i,a,s){return Dn.sceneGraphService.setLocalRotation(this,t,i,a,s),this}},{key:"setLocalSkew",value:function(t,i){return Dn.sceneGraphService.setLocalSkew(this,t,i),this}},{key:"getRotation",value:function(){return Dn.sceneGraphService.getRotation(this)}},{key:"getLocalRotation",value:function(){return Dn.sceneGraphService.getLocalRotation(this)}},{key:"getLocalSkew",value:function(){return Dn.sceneGraphService.getLocalSkew(this)}},{key:"getLocalTransform",value:function(){return Dn.sceneGraphService.getLocalTransform(this)}},{key:"getWorldTransform",value:function(){return Dn.sceneGraphService.getWorldTransform(this)}},{key:"setLocalTransform",value:function(t){return Dn.sceneGraphService.setLocalTransform(this,t),this}},{key:"resetLocalTransform",value:function(){Dn.sceneGraphService.resetLocalTransform(this)}},{key:"getAnimations",value:function(){return this.activeAnimations}},{key:"animate",value:function(t,i){var a,s=(a=this.ownerDocument)===null||a===void 0?void 0:a.timeline;return s?s.play(this,t,i):null}},{key:"isVisible",value:function(){var t;return((t=this.parsedStyle)===null||t===void 0?void 0:t.visibility)!=="hidden"}},{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}},{key:"isInteractive",value:function(){var t;return((t=this.parsedStyle)===null||t===void 0?void 0:t.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,rl(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})))+1),this}},{key:"toBack",value:function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,rl(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})))-1),this}},{key:"getConfig",value:function(){return this.config}},{key:"attr",value:function(){for(var t=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var o=a[0],l=a[1];return o?(0,Gs.Z)(o)?(Object.keys(o).forEach(function(u){t.setAttribute(u,o[u])}),this):a.length===2?(this.setAttribute(o,l),this):this.attributes[o]:this.attributes}},{key:"getMatrix",value:function(t){var i=t||this.getWorldTransform(),a=L.getTranslation(_x,i),s=Ds(a,2),o=s[0],l=s[1],u=L.getScaling(_x,i),c=Ds(u,2),d=c[0],h=c[1],f=L.getRotation(Upe,i),v=hP(_x,f),g=Ds(v,3),m=g[0],y=g[2];return Qge(m||y,o,l,d,h)}},{key:"getLocalMatrix",value:function(){return this.getMatrix(this.getLocalTransform())}},{key:"setMatrix",value:function(t){var i=zB(t),a=Ds(i,5),s=a[0],o=a[1],l=a[2],u=a[3],c=a[4];this.setEulerAngles(c).setPosition(s,o).setLocalScale(l,u)}},{key:"setLocalMatrix",value:function(t){var i=zB(t),a=Ds(i,5),s=a[0],o=a[1],l=a[2],u=a[3],c=a[4];this.setLocalEulerAngles(c).setLocalPosition(s,o).setLocalScale(l,u)}},{key:"show",value:function(){this.forEach(function(t){t.style.visibility="visible"})}},{key:"hide",value:function(){this.forEach(function(t){t.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(t){return this.children[t]||null}},{key:"add",value:function(t,i){return this.appendChild(t,i)}},{key:"set",value:function(t,i){this.config[t]=i}},{key:"get",value:function(t){return this.config[t]}},{key:"moveTo",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(t,i,a),this}},{key:"move",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(t,i,a),this}},{key:"setZIndex",value:function(t){return this.style.zIndex=t,this}}])}(zpe);al.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 Bk=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Er(this,n),Ms(this,n,[nl({type:Yr.CIRCLE},e)])}return Ps(n,r),br(n)}(al);Bk.PARSED_STYLE_LIST=new Set([].concat(rl(al.PARSED_STYLE_LIST),["cx","cy","cz","r","isBillboard","isSizeAttenuation"]));var jpe=["style"],Hpe=function(r){function n(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.style,a=lm(t,jpe);return Er(this,n),e=Ms(this,n,[nl({style:i},a)]),e.isCustomElement=!0,e}return Ps(n,r),br(n)}(al),$6=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Er(this,n),Ms(this,n,[nl({type:Yr.ELLIPSE},e)])}return Ps(n,r),br(n)}(al);$6.PARSED_STYLE_LIST=new Set([].concat(rl(al.PARSED_STYLE_LIST),["cx","cy","cz","rx","ry","isBillboard","isSizeAttenuation"]));var _Ae=null,xc=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Er(this,n),Ms(this,n,[nl({type:Yr.GROUP},e)])}return Ps(n,r),br(n)}(al);xc.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var Wpe=["style"],G6=function(r){function n(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.style,a=lm(t,Wpe);return Er(this,n),e=Ms(this,n,[nl({type:Yr.HTML,style:i},a)]),e.cullable.enable=!1,e}return Ps(n,r),br(n,[{key:"getDomElement",value:function(){return this.parsedStyle.$el}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"getLocalBounds",value:function(){if(this.parentNode){var t=L.invert(L.create(),this.parentNode.getWorldTransform()),i=this.getBounds();if(!nd.isEmpty(i)){var a=new nd;return a.setFromTransformedAABB(i,t),a}}return this.getBounds()}}])}(al);G6.PARSED_STYLE_LIST=new Set([].concat(rl(al.PARSED_STYLE_LIST),["x","y","$el","innerHTML","width","height"]));var z6=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Er(this,n),Ms(this,n,[nl({type:Yr.IMAGE},e)])}return Ps(n,r),br(n)}(al);z6.PARSED_STYLE_LIST=new Set([].concat(rl(al.PARSED_STYLE_LIST),["x","y","z","src","width","height","isBillboard","billboardRotation","isSizeAttenuation","keepAspectRatio"]));var Ype=["style"],RP=function(r){function n(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.style,a=lm(t,Ype);Er(this,n),e=Ms(this,n,[nl({type:Yr.LINE,style:nl({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},i)},a)]),e.markerStartAngle=0,e.markerEndAngle=0;var s=e.parsedStyle,o=s.markerStart,l=s.markerEnd;return o&&to(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),l&&to(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return Ps(n,r),br(n,[{key:"attributeChangedCallback",value:function(t,i,a,s,o){t==="x1"||t==="y1"||t==="x2"||t==="y2"||t==="markerStartOffset"||t==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):t==="markerStart"?(s&&to(s)&&(this.markerStartAngle=0,s.remove()),o&&to(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):t==="markerEnd"&&(s&&to(s)&&(this.markerEndAngle=0,s.remove()),o&&to(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1)))}},{key:"transformMarker",value:function(t){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=i.x1,c=i.x2,d=i.y1,h=i.y2,f=t?a:s;if(!(!f||!to(f))){var v=0,g,m,y,w,T,G;t?(y=u,w=d,g=c-u,m=h-d,T=o||0,G=this.markerStartAngle):(y=c,w=h,g=u-c,m=d-h,T=l||0,G=this.markerEndAngle),v=Math.atan2(m,g),f.setLocalEulerAngles(v*180/Math.PI+G),f.setLocalPosition(y+Math.cos(v)*T,w+Math.sin(v)*T)}}},{key:"getPoint",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle,s=a.x1,o=a.y1,l=a.x2,u=a.y2,c=(0,Nt.U4)(s,o,l,u,t),d=c.x,h=c.y,f=E.fF(E.Ue(),E.al(d,h,0),i?this.getWorldTransform():this.getLocalTransform());return new ch(f[0],f[1])}},{key:"getPointAtLength",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(t/this.getTotalLength(),i)}},{key:"getTotalLength",value:function(){var t=this.parsedStyle,i=t.x1,a=t.y1,s=t.x2,o=t.y2;return(0,Nt.Xk)(i,a,s,o)}}])}(al);RP.PARSED_STYLE_LIST=new Set([].concat(rl(al.PARSED_STYLE_LIST),["x1","y1","x2","y2","z1","z2","isBillboard","isSizeAttenuation","markerStart","markerEnd","markerStartOffset","markerEndOffset"]));var Zpe=["style"],$k=function(r){function n(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.style,a=lm(t,Zpe);Er(this,n),e=Ms(this,n,[nl({type:Yr.PATH,style:i,initialParsedStyle:{miterLimit:4,d:nl({},WB)}},a)]),e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[];var s=e.parsedStyle,o=s.markerStart,l=s.markerEnd,u=s.markerMid;return o&&to(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),u&&to(u)&&e.placeMarkerMid(u),l&&to(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return Ps(n,r),br(n,[{key:"attributeChangedCallback",value:function(t,i,a,s,o){t==="d"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):t==="markerStartOffset"||t==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):t==="markerStart"?(s&&to(s)&&(this.markerStartAngle=0,s.remove()),o&&to(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):t==="markerEnd"?(s&&to(s)&&(this.markerEndAngle=0,s.remove()),o&&to(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1))):t==="markerMid"&&this.placeMarkerMid(o)}},{key:"transformMarker",value:function(t){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=t?a:s;if(!(!u||!to(u))){var c=0,d,h,f,v,g,m;if(t){var y=this.getStartTangent(),w=Ds(y,2),T=w[0],G=w[1];f=G[0],v=G[1],d=T[0]-G[0],h=T[1]-G[1],g=o||0,m=this.markerStartAngle}else{var x=this.getEndTangent(),_=Ds(x,2),p=_[0],b=_[1];f=b[0],v=b[1],d=p[0]-b[0],h=p[1]-b[1],g=l||0,m=this.markerEndAngle}c=Math.atan2(h,d),u.setLocalEulerAngles(c*180/Math.PI+m),u.setLocalPosition(f+Math.cos(c)*g,v+Math.sin(c)*g)}}},{key:"placeMarkerMid",value:function(t){var i=this.parsedStyle.d.segments;if(this.markerMidList.forEach(function(c){c.remove()}),t&&to(t))for(var a=1;a<i.length-1;a++){var s=Ds(i[a].currentPoint,2),o=s[0],l=s[1],u=a===1?t:t.cloneNode(!0);this.markerMidList.push(u),this.appendChild(u),u.setLocalPosition(o,l)}}},{key:"getTotalLength",value:function(){return s6(this)}},{key:"getPointAtLength",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle.d.absolutePath,s=(0,jm.r)(a,t),o=s.x,l=s.y,u=E.fF(E.Ue(),E.al(o,l,0),i?this.getWorldTransform():this.getLocalTransform());return new ch(u[0],u[1])}},{key:"getPoint",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPointAtLength(t*s6(this),i)}},{key:"getStartTangent",value:function(){var t=this.parsedStyle.d.segments,i=[];if(t.length>1){var a=t[0].currentPoint,s=t[1].currentPoint,o=t[1].startTangent;i=[],o?(i.push([a[0]-o[0],a[1]-o[1]]),i.push([a[0],a[1]])):(i.push([s[0],s[1]]),i.push([a[0],a[1]]))}return i}},{key:"getEndTangent",value:function(){var t=this.parsedStyle.d.segments,i=t.length,a=[];if(i>1){var s=t[i-2].currentPoint,o=t[i-1].currentPoint,l=t[i-1].endTangent;a=[],l?(a.push([o[0]-l[0],o[1]-l[1]]),a.push([o[0],o[1]])):(a.push([s[0],s[1]]),a.push([o[0],o[1]]))}return a}}])}(al);$k.PARSED_STYLE_LIST=new Set([].concat(rl(al.PARSED_STYLE_LIST),["d","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard","isSizeAttenuation"]));var Xpe=["style"],Gk=function(r){function n(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.style,a=lm(t,Xpe);Er(this,n),e=Ms(this,n,[nl({type:Yr.POLYGON,style:i,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},a)]),e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[];var s=e.parsedStyle,o=s.markerStart,l=s.markerEnd,u=s.markerMid;return o&&to(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),u&&to(u)&&e.placeMarkerMid(u),l&&to(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return Ps(n,r),br(n,[{key:"attributeChangedCallback",value:function(t,i,a,s,o){t==="points"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):t==="markerStartOffset"||t==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):t==="markerStart"?(s&&to(s)&&(this.markerStartAngle=0,s.remove()),o&&to(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):t==="markerEnd"?(s&&to(s)&&(this.markerEndAngle=0,s.remove()),o&&to(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1))):t==="markerMid"&&this.placeMarkerMid(o)}},{key:"transformMarker",value:function(t){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=i.points,c=u||{},d=c.points,h=t?a:s;if(!(!h||!to(h)||!d)){var f=0,v,g,m,y,w,T;if(m=d[0][0],y=d[0][1],t)v=d[1][0]-d[0][0],g=d[1][1]-d[0][1],w=o||0,T=this.markerStartAngle;else{var G=d.length;this.parsedStyle.isClosed?(v=d[G-1][0]-d[0][0],g=d[G-1][1]-d[0][1]):(m=d[G-1][0],y=d[G-1][1],v=d[G-2][0]-d[G-1][0],g=d[G-2][1]-d[G-1][1]),w=l||0,T=this.markerEndAngle}f=Math.atan2(g,v),h.setLocalEulerAngles(f*180/Math.PI+T),h.setLocalPosition(m+Math.cos(f)*w,y+Math.sin(f)*w)}}},{key:"placeMarkerMid",value:function(t){var i=this.parsedStyle.points,a=i||{},s=a.points;if(this.markerMidList.forEach(function(d){d.remove()}),this.markerMidList=[],t&&to(t)&&s)for(var o=1;o<(this.parsedStyle.isClosed?s.length:s.length-1);o++){var l=s[o][0],u=s[o][1],c=o===1?t:t.cloneNode(!0);this.markerMidList.push(c),this.appendChild(c),c.setLocalPosition(l,u)}}}])}(al);Gk.PARSED_STYLE_LIST=new Set([].concat(rl(al.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isClosed","isBillboard","isSizeAttenuation"]));var Kpe=["style"],V6=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.style,i=lm(e,Kpe);return Er(this,n),Ms(this,n,[nl({type:Yr.POLYLINE,style:t,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},i)])}return Ps(n,r),br(n,[{key:"getTotalLength",value:function(){return $_e(this)}},{key:"getPointAtLength",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(t/this.getTotalLength(),i)}},{key:"getPoint",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle.points.points;if(this.parsedStyle.points.segments.length===0){var s=[],o=0,l,u,c=this.getTotalLength();a.forEach(function(y,w){a[w+1]&&(l=[0,0],l[0]=o/c,u=(0,Nt.Xk)(y[0],y[1],a[w+1][0],a[w+1][1]),o+=u,l[1]=o/c,s.push(l))}),this.parsedStyle.points.segments=s}var d=0,h=0;this.parsedStyle.points.segments.forEach(function(y,w){t>=y[0]&&t<=y[1]&&(d=(t-y[0])/(y[1]-y[0]),h=w)});var f=(0,Nt.U4)(a[h][0],a[h][1],a[h+1][0],a[h+1][1],d),v=f.x,g=f.y,m=E.fF(E.Ue(),E.al(v,g,0),i?this.getWorldTransform():this.getLocalTransform());return new ch(m[0],m[1])}},{key:"getStartTangent",value:function(){var t=this.parsedStyle.points.points,i=[];return i.push([t[1][0],t[1][1]]),i.push([t[0][0],t[0][1]]),i}},{key:"getEndTangent",value:function(){var t=this.parsedStyle.points.points,i=t.length-1,a=[];return a.push([t[i-1][0],t[i-1][1]]),a.push([t[i][0],t[i][1]]),a}}])}(Gk);V6.PARSED_STYLE_LIST=new Set([].concat(rl(Gk.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard"]));var vm=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Er(this,n),Ms(this,n,[nl({type:Yr.RECT},e)])}return Ps(n,r),br(n)}(al);vm.PARSED_STYLE_LIST=new Set([].concat(rl(al.PARSED_STYLE_LIST),["x","y","z","width","height","isBillboard","isSizeAttenuation","radius"]));var Jpe=["style"],U6=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.style,i=lm(e,Jpe);return Er(this,n),Ms(this,n,[nl({type:Yr.TEXT,style:nl({fill:"black"},t)},i)])}return Ps(n,r),br(n,[{key:"getComputedTextLength",value:function(){var t;return this.getGeometryBounds(),((t=this.parsedStyle.metrics)===null||t===void 0?void 0:t.maxLineWidth)||0}},{key:"getLineBoundingRects",value:function(){var t;return this.getGeometryBounds(),((t=this.parsedStyle.metrics)===null||t===void 0?void 0:t.lineMetrics)||[]}},{key:"isOverflowing",value:function(){return this.getGeometryBounds(),!!this.parsedStyle.isOverflowing}}])}(al);U6.PARSED_STYLE_LIST=new Set([].concat(rl(al.PARSED_STYLE_LIST),["x","y","z","isBillboard","billboardRotation","isSizeAttenuation","text","textAlign","textBaseline","fontStyle","fontSize","fontFamily","fontWeight","fontVariant","lineHeight","letterSpacing","leading","wordWrap","wordWrapWidth","maxLines","textOverflow","isOverflowing","textPath","textDecorationLine","textDecorationColor","textDecorationStyle","textPathSide","textPathStartOffset","metrics","dx","dy"]));var mAe=null,pAe={number:function(n){return new _s(n)},percent:function(n){return new _s(n,"%")},px:function(n){return new _s(n,"px")},em:function(n){return new _s(n,"em")},rem:function(n){return new _s(n,"rem")},deg:function(n){return new _s(n,"deg")},grad:function(n){return new _s(n,"grad")},rad:function(n){return new _s(n,"rad")},turn:function(n){return new _s(n,"turn")},s:function(n){return new _s(n,"s")},ms:function(n){return new _s(n,"ms")},registerProperty:function(n){var e=n.name,t=n.inherits,i=n.interpolable,a=n.initialValue,s=n.syntax;Dn.styleValueRegistry.registerMetadata({n:e,inh:t,int:i,d:a,syntax:s})},registerLayout:function(n,e){Dn.layoutRegistry.registerLayout(n,e)}},yAe=null,Qpe=function(){function r(n){Er(this,r),this.strategies=n}return br(r,[{key:"apply",value:function(e){var t=e.camera,i=e.renderingService,a=e.renderingContext,s=this.strategies;i.hooks.cull.tap(r.tag,function(o){if(o){var l=o.cullable;return s.length===0?l.visible=a.unculledEntities.indexOf(o.entity)>-1:l.visible=s.every(function(u){return u.isVisible(t,o)}),!o.isCulled()&&o.isVisible()?o:(o.dispatchEvent(new Pd(Mo.CULLED)),null)}return o}),i.hooks.afterRender.tap(r.tag,function(o){o.cullable.visibilityPlaneMask=-1})}}])}();Qpe.tag="Culling";var qpe=function(){function r(){var n=this;Er(this,r),this.autoPreventDefault=!1,this.rootPointerEvent=new dpe(null),this.rootWheelEvent=new hpe(null),this.onPointerMove=function(e){var t,i=(t=n.context.renderingContext.root)===null||t===void 0||(t=t.ownerDocument)===null||t===void 0?void 0:t.defaultView;if(!(i.supportsTouchEvents&&e.pointerType==="touch")){var a=n.normalizeToPointerEvent(e,i),s=Qp(a),o;try{for(s.s();!(o=s.n()).done;){var l=o.value,u=n.bootstrapEvent(n.rootPointerEvent,l,i,e);n.context.eventService.mapEvent(u)}}catch(c){s.e(c)}finally{s.f()}n.setCursor(n.context.eventService.cursor)}},this.onClick=function(e){var t,i=(t=n.context.renderingContext.root)===null||t===void 0||(t=t.ownerDocument)===null||t===void 0?void 0:t.defaultView,a=n.normalizeToPointerEvent(e,i),s=Qp(a),o;try{for(s.s();!(o=s.n()).done;){var l=o.value,u=n.bootstrapEvent(n.rootPointerEvent,l,i,e);n.context.eventService.mapEvent(u)}}catch(c){s.e(c)}finally{s.f()}n.setCursor(n.context.eventService.cursor)}}return br(r,[{key:"apply",value:function(e){var t=this;this.context=e;var i=e.renderingService,a=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(s){var o=t.context.renderingService.hooks.pickSync.call({position:s,picked:[],topmost:!0}),l=o.picked;return l[0]||null}),i.hooks.pointerWheel.tap(r.tag,function(s){var o=t.normalizeWheelEvent(s);t.context.eventService.mapEvent(o)}),i.hooks.pointerDown.tap(r.tag,function(s){if(!(a.supportsTouchEvents&&s.pointerType==="touch")){var o=t.normalizeToPointerEvent(s,a);if(t.autoPreventDefault&&o[0].isNormalized){var l=s.cancelable||!("cancelable"in s);l&&s.preventDefault()}var u=Qp(o),c;try{for(u.s();!(c=u.n()).done;){var d=c.value,h=t.bootstrapEvent(t.rootPointerEvent,d,a,s);t.context.eventService.mapEvent(h)}}catch(f){u.e(f)}finally{u.f()}t.setCursor(t.context.eventService.cursor)}}),i.hooks.pointerUp.tap(r.tag,function(s){if(!(a.supportsTouchEvents&&s.pointerType==="touch")){var o=t.context.contextService.getDomElement(),l=t.context.eventService.isNativeEventFromCanvas(o,s),u=l?"":"outside",c=t.normalizeToPointerEvent(s,a),d=Qp(c),h;try{for(d.s();!(h=d.n()).done;){var f=h.value,v=t.bootstrapEvent(t.rootPointerEvent,f,a,s);v.type+=u,t.context.eventService.mapEvent(v)}}catch(g){d.e(g)}finally{d.f()}t.setCursor(t.context.eventService.cursor)}}),i.hooks.pointerMove.tap(r.tag,this.onPointerMove),i.hooks.pointerOver.tap(r.tag,this.onPointerMove),i.hooks.pointerOut.tap(r.tag,this.onPointerMove),i.hooks.click.tap(r.tag,this.onClick),i.hooks.pointerCancel.tap(r.tag,function(s){var o=t.normalizeToPointerEvent(s,a),l=Qp(o),u;try{for(l.s();!(u=l.n()).done;){var c=u.value,d=t.bootstrapEvent(t.rootPointerEvent,c,a,s);t.context.eventService.mapEvent(d)}}catch(h){l.e(h)}finally{l.f()}t.setCursor(t.context.eventService.cursor)})}},{key:"bootstrapEvent",value:function(e,t,i,a){e.view=i,e.originalEvent=null,e.nativeEvent=a,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this.transferMouseData(e,t);var s=this.context.eventService.client2Viewport({x:t.clientX,y:t.clientY}),o=s.x,l=s.y;e.viewport.x=o,e.viewport.y=l;var u=this.context.eventService.viewport2Canvas(e.viewport),c=u.x,d=u.y;return e.canvas.x=c,e.canvas.y=d,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.isTrusted=a.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=Ame[e.type]||e.type),e}},{key:"normalizeWheelEvent",value:function(e){var t=this.rootWheelEvent;this.transferMouseData(t,e),t.deltaMode=e.deltaMode,t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ;var i=this.context.eventService.client2Viewport({x:e.clientX,y:e.clientY}),a=i.x,s=i.y;t.viewport.x=a,t.viewport.y=s;var o=this.context.eventService.viewport2Canvas(t.viewport),l=o.x,u=o.y;return t.canvas.x=l,t.canvas.y=u,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.nativeEvent=e,t.type=e.type,t}},{key:"transferMouseData",value:function(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=Lme.now(),e.type=t.type,e.altKey=t.altKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.ctrlKey=t.ctrlKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.screen.x=t.screenX,e.screen.y=t.screenY,e.relatedTarget=null}},{key:"setCursor",value:function(e){this.context.contextService.applyCursorStyle(e||this.context.config.cursor||"default")}},{key:"normalizeToPointerEvent",value:function(e,t){var i=[];if(t.isTouchEvent(e))for(var a=0;a<e.changedTouches.length;a++){var s=e.changedTouches[a];(0,ie.Z)(s.button)&&(s.button=0),(0,ie.Z)(s.buttons)&&(s.buttons=1),(0,ie.Z)(s.isPrimary)&&(s.isPrimary=e.touches.length===1&&e.type==="touchstart"),(0,ie.Z)(s.width)&&(s.width=s.radiusX||1),(0,ie.Z)(s.height)&&(s.height=s.radiusY||1),(0,ie.Z)(s.tiltX)&&(s.tiltX=0),(0,ie.Z)(s.tiltY)&&(s.tiltY=0),(0,ie.Z)(s.pointerType)&&(s.pointerType="touch"),(0,ie.Z)(s.pointerId)&&(s.pointerId=s.identifier||0),(0,ie.Z)(s.pressure)&&(s.pressure=s.force||.5),(0,ie.Z)(s.twist)&&(s.twist=0),(0,ie.Z)(s.tangentialPressure)&&(s.tangentialPressure=0),s.isNormalized=!0,s.type=e.type,i.push(s)}else if(t.isMouseEvent(e)){var o=e;(0,ie.Z)(o.isPrimary)&&(o.isPrimary=!0),(0,ie.Z)(o.width)&&(o.width=1),(0,ie.Z)(o.height)&&(o.height=1),(0,ie.Z)(o.tiltX)&&(o.tiltX=0),(0,ie.Z)(o.tiltY)&&(o.tiltY=0),(0,ie.Z)(o.pointerType)&&(o.pointerType="mouse"),(0,ie.Z)(o.pointerId)&&(o.pointerId=Rme),(0,ie.Z)(o.pressure)&&(o.pressure=.5),(0,ie.Z)(o.twist)&&(o.twist=0),(0,ie.Z)(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,i.push(o)}else i.push(e);return i}}])}();qpe.tag="Event";var xAe=[Yr.CIRCLE,Yr.ELLIPSE,Yr.IMAGE,Yr.RECT,Yr.LINE,Yr.POLYLINE,Yr.POLYGON,Yr.TEXT,Yr.PATH,Yr.HTML],EAe=null,e0e=function(){function r(){Er(this,r),this.syncTasks=new Map,this.isFirstTimeRendering=!0,this.syncing=!1,this.isFirstTimeRenderingFinished=!1}return br(r,[{key:"apply",value:function(e){var t=this,i,a=e.renderingService,s=e.renderingContext,o=e.rBushRoot,l=s.root.ownerDocument.defaultView;this.rBush=o;var u=function(g){var m=g.target;m.renderable.dirty=!0,a.dirtify()},c=function(g){t.syncTasks.set(g.target,g.detail.affectChildren),a.dirtify()},d=function(g){var m=g.target;Dn.enableSizeAttenuation&&Dn.styleValueRegistry.updateSizeAttenuation(m,l.getCamera().getZoom())},h=function(g){var m=g.target,y=m.rBushNode;y.aabb&&t.rBush.remove(y.aabb),t.syncTasks.delete(m),Dn.sceneGraphService.dirtifyToRoot(m),a.dirtify()};a.hooks.init.tap(r.tag,function(){l.addEventListener(Mo.MOUNTED,d),l.addEventListener(Mo.UNMOUNTED,h),l.addEventListener(Mo.ATTR_MODIFIED,u),l.addEventListener(Mo.BOUNDS_CHANGED,c)}),a.hooks.destroy.tap(r.tag,function(){l.removeEventListener(Mo.MOUNTED,d),l.removeEventListener(Mo.UNMOUNTED,h),l.removeEventListener(Mo.ATTR_MODIFIED,u),l.removeEventListener(Mo.BOUNDS_CHANGED,c),t.syncTasks.clear()});var f=(i=Dn.globalThis.requestIdleCallback)!==null&&i!==void 0?i:M6.bind(Dn.globalThis);a.hooks.endFrame.tap(r.tag,function(){t.isFirstTimeRendering?(t.isFirstTimeRendering=!1,t.syncing=!0,f(function(){t.syncRTree(!0),t.isFirstTimeRenderingFinished=!0})):t.syncRTree()})}},{key:"syncNode",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.isConnected){var i=e.rBushNode;i.aabb&&this.rBush.remove(i.aabb);var a=e.getRenderBounds();if(a){var s=e.renderable;t&&(s.dirtyRenderBounds||(s.dirtyRenderBounds=new nd),s.dirtyRenderBounds.update(a.center,a.halfExtents));var o=a.getMin(),l=Ds(o,2),u=l[0],c=l[1],d=a.getMax(),h=Ds(d,2),f=h[0],v=h[1];i.aabb||(i.aabb={}),i.aabb.displayObject=e,i.aabb.minX=u,i.aabb.minY=c,i.aabb.maxX=f,i.aabb.maxY=v}if(i.aabb&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.minX)&&!isNaN(i.aabb.minY))return i.aabb}}},{key:"syncRTree",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!(!t&&(this.syncing||this.syncTasks.size===0))){this.syncing=!0;var i=[],a=new Set,s=function(l){if(!a.has(l)&&l.renderable){var u=e.syncNode(l,t);u&&(i.push(u),a.add(l))}};this.syncTasks.forEach(function(o,l){o&&l.forEach(s);for(var u=l;u;)s(u),u=u.parentElement}),this.rBush.load(i),i.length=0,this.syncing=!1}}}])}();e0e.tag="Prepare";function bAe(r){return!!r.document}var AP=function(r){return r.READY="ready",r.BEFORE_RENDER="beforerender",r.RERENDER="rerender",r.AFTER_RENDER="afterrender",r.BEFORE_DESTROY="beforedestroy",r.AFTER_DESTROY="afterdestroy",r.RESIZE="resize",r.DIRTY_RECTANGLE="dirtyrectangle",r.RENDERER_CHANGED="rendererchanged",r}({}),kAe=500,wAe=.1,SAe=1e3,TAe=new Pd(Mo.MOUNTED),CAe=new Pd(Mo.UNMOUNTED),MAe=new Pd(AP.BEFORE_RENDER),PAe=new Pd(AP.RERENDER),NAe=new Pd(AP.AFTER_RENDER),OAe=null;var t0e=function(r){function n(){var e;Er(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=Ms(this,n,[].concat(i)),e.landmarks=[],e}return Ps(n,r),br(n,[{key:"rotate",value:function(t,i,a){if(this.relElevation=t0(i),this.relAzimuth=t0(t),this.relRoll=t0(a),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===Os.EXPLORING){var s=X.yY(X.Ue(),[1,0,0],gs((this.rotateWorld?1:-1)*this.relElevation)),o=X.yY(X.Ue(),[0,1,0],gs((this.rotateWorld?1:-1)*this.relAzimuth)),l=X.yY(X.Ue(),[0,0,1],gs(this.relRoll)),u=X.Jp(X.Ue(),o,s);u=X.Jp(X.Ue(),u,l);var c=L.fromQuat(L.create(),u);L.translate(this.matrix,this.matrix,[0,0,-this.distance]),L.multiply(this.matrix,this.matrix,c),L.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===Os.ORBITING||this.type===Os.EXPLORING?this._getPosition():this.type===Os.TRACKING&&this._getFocalPoint(),this._update(),this}},{key:"pan",value:function(t,i){var a=pc(t,i,0),s=E.d9(this.position);return E.IH(s,s,E.bA(E.Ue(),this.right,a[0])),E.IH(s,s,E.bA(E.Ue(),this.up,a[1])),this._setPosition(s),this.triggerUpdate(),this}},{key:"dolly",value:function(t){var i=this.forward,a=E.d9(this.position),s=t*this.dollyingStep,o=this.distance+t*this.dollyingStep;return s=Math.max(Math.min(o,this.maxDistance),this.minDistance)-this.distance,a[0]+=s*i[0],a[1]+=s*i[1],a[2]+=s*i[2],this._setPosition(a),this.type===Os.ORBITING||this.type===Os.EXPLORING?this._getDistance():this.type===Os.TRACKING&&E.IH(this.focalPoint,a,this.distanceVector),this.triggerUpdate(),this}},{key:"cancelLandmarkAnimation",value:function(){this.landmarkAnimationID!==void 0&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID)}},{key:"createLandmark",value:function(t){var i,a,s,o,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=l.position,c=u===void 0?this.position:u,d=l.focalPoint,h=d===void 0?this.focalPoint:d,f=l.roll,v=l.zoom,g=new Dn.CameraContribution;g.setType(this.type,void 0),g.setPosition(c[0],(i=c[1])!==null&&i!==void 0?i:this.position[1],(a=c[2])!==null&&a!==void 0?a:this.position[2]),g.setFocalPoint(h[0],(s=h[1])!==null&&s!==void 0?s:this.focalPoint[1],(o=h[2])!==null&&o!==void 0?o:this.focalPoint[2]),g.setRoll(f!=null?f:this.roll),g.setZoom(v!=null?v:this.zoom);var m={name:t,matrix:L.clone(g.getWorldTransform()),right:E.d9(g.right),up:E.d9(g.up),forward:E.d9(g.forward),position:E.d9(g.getPosition()),focalPoint:E.d9(g.getFocalPoint()),distanceVector:E.d9(g.getDistanceVector()),distance:g.getDistance(),dollyingStep:g.getDollyingStep(),azimuth:g.getAzimuth(),elevation:g.getElevation(),roll:g.getRoll(),relAzimuth:g.relAzimuth,relElevation:g.relElevation,relRoll:g.relRoll,zoom:g.getZoom()};return this.landmarks.push(m),m}},{key:"gotoLandmark",value:function(t){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=(0,Ze.Z)(t)?this.landmarks.find(function(j){return j.name===t}):t;if(s){var o=(0,pe.Z)(a)?{duration:a}:a,l=o.easing,u=l===void 0?"linear":l,c=o.duration,d=c===void 0?100:c,h=o.easingFunction,f=h===void 0?void 0:h,v=o.onfinish,g=v===void 0?void 0:v,m=o.onframe,y=m===void 0?void 0:m,w=.01;this.cancelLandmarkAnimation();var T=s.position,G=s.focalPoint,x=s.zoom,_=s.roll,p=f||Dn.EasingFunction(u),b,R=function(){i.setFocalPoint(G),i.setPosition(T),i.setRoll(_),i.setZoom(x),i.computeMatrix(),i.triggerUpdate(),g==null||g()};if(d===0)return R();var B=function(Z){b===void 0&&(b=Z);var te=Z-b;if(te>=d){R();return}var le=p(te/d),ue=E.Ue(),se=E.Ue(),V=1,ee=0;E.t7(ue,i.focalPoint,G,le),E.t7(se,i.position,T,le),ee=i.roll*(1-le)+_*le,V=i.zoom*(1-le)+x*le,i.setFocalPoint(ue),i.setPosition(se),i.setRoll(ee),i.setZoom(V);var he=E.TK(ue,G)+E.TK(se,T);if(he<=w&&x===void 0&&_===void 0)return R();i.computeMatrix(),i.triggerUpdate(),te<d&&(y==null||y(le),i.landmarkAnimationID=i.canvas.requestAnimationFrame(B))};this.canvas.requestAnimationFrame(B)}}}])}(HB);Dn.CameraContribution=t0e;var j6=null,RAe=0,H6=new WeakMap,AAe=null,LAe=null,zk,Qv;function IAe(r,n){return zk=new j6(r,n)}function DAe(r){return Qv||(Qv=j6.copy(zk),Qv.oldValue=r,Qv)}function FAe(){zk=Qv=void 0}function n0e(r){return r===Qv||r===zk}function BAe(r,n){return r===n?r:Qv&&n0e(r)?Qv:null}function r0e(r){r.nodes.forEach(function(n){var e=H6.get(n);e&&e.forEach(function(t){t.observer===r&&t.removeTransientObservers()})})}function $Ae(r,n){for(var e=r;e;e=e.parentNode){var t=H6.get(e);if(t)for(var i=0;i<t.length;i++){var a=t[i],s=a.options;if(!(e!==r&&!s.subtree)){var o=n(s);o&&a.enqueue(o)}}}}var LP=!1,IP=null;function GAe(r){IP.push(r),LP||(LP=!0,typeof runtime.globalThis!="undefined"?runtime.globalThis.setTimeout(DP):DP())}function DP(){LP=!1;var r=IP;IP=[],r.sort(function(e,t){return e.uid-t.uid});var n=!1;r.forEach(function(e){var t=e.takeRecords();r0e(e),t.length&&(e.callback(t,e),n=!0)}),n&&DP()}var FP=function(r){function n(e,t,i,a){var s;return Er(this,n),s=Ms(this,n,[e]),s.currentTime=i,s.timelineTime=a,s.target=t,s.type="finish",s.bubbles=!1,s.currentTarget=t,s.defaultPrevented=!1,s.eventPhase=s.AT_TARGET,s.timeStamp=Date.now(),s.currentTime=i,s.timelineTime=a,s}return Ps(n,r),br(n)}(Lk),i0e=0,a0e=function(){function r(n,e){var t;Er(this,r),this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._playbackRate=1,this._inTimeline=!0,this.effect=n,n.animation=this,this.timeline=e,this.id="".concat(i0e++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number((t=this.effect)===null||t===void 0?void 0:t.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return br(r,[{key:"pending",get:function(){return this._startTime===null&&!this._paused&&this.playbackRate!==0||this.currentTimePending}},{key:"playState",get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"}},{key:"ready",get:function(){var e=this;return this.readyPromise||(this.timeline.animationsWithPromises.indexOf(this)===-1&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(t,i){e.resolveReadyPromise=function(){t(e)},e.rejectReadyPromise=function(){i(new Error)}}),this.pending||this.resolveReadyPromise()),this.readyPromise}},{key:"finished",get:function(){var e=this;return this.finishedPromise||(this.timeline.animationsWithPromises.indexOf(this)===-1&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(t,i){e.resolveFinishedPromise=function(){t(e)},e.rejectFinishedPromise=function(){i(new Error)}}),this.playState==="finished"&&this.resolveFinishedPromise()),this.finishedPromise}},{key:"currentTime",get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(e){if(e=Number(e),!isNaN(e)){if(this.timeline.restart(),!this._paused&&this._startTime!==null){var t;this._startTime=Number((t=this.timeline)===null||t===void 0?void 0:t.currentTime)-e/this.playbackRate}this.currentTimePending=!1,this._currentTime!==e&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(e,!0),this.timeline.applyDirtiedAnimation(this))}}},{key:"startTime",get:function(){return this._startTime},set:function(e){if(e!==null){if(this.updatePromises(),e=Number(e),isNaN(e)||this._paused||this._idle)return;this._startTime=e,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()}}},{key:"playbackRate",get:function(){return this._playbackRate},set:function(e){if(e!==this._playbackRate){this.updatePromises();var t=this.currentTime;this._playbackRate=e,this.startTime=null,this.playState!=="paused"&&this.playState!=="idle"&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),t!==null&&(this.currentTime=t),this.updatePromises()}}},{key:"_isFinished",get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)}},{key:"totalDuration",get:function(){return this._totalDuration}},{key:"_needsTick",get:function(){return this.pending||this.playState==="running"||!this._finishedFlag}},{key:"updatePromises",value:function(){var e=this.oldPlayState,t=this.pending?"pending":this.playState;return this.readyPromise&&t!==e&&(t==="idle"?(this.rejectReadyPromise(),this.readyPromise=void 0):e==="pending"?this.resolveReadyPromise():t==="pending"&&(this.readyPromise=void 0)),this.finishedPromise&&t!==e&&(t==="idle"?(this.rejectFinishedPromise(),this.finishedPromise=void 0):t==="finished"?this.resolveFinishedPromise():e==="finished"&&(this.finishedPromise=void 0)),this.oldPlayState=t,this.readyPromise||this.finishedPromise}},{key:"play",value:function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),this.timeline.animations.indexOf(this)===-1&&this.timeline.animations.push(this),this.updatePromises()}},{key:"pause",value:function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),!this._isFinished&&!this._paused&&!this._idle?this.currentTimePending=!0:this._idle&&(this.rewind(),this._idle=!1),this._startTime=null,this._paused=!0,this.updatePromises()}},{key:"finish",value:function(){this.updatePromises(),!this._idle&&(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())}},{key:"cancel",value:function(){var e=this;if(this.updatePromises(),!!this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises(),this.oncancel)){var t=new FP(null,this,this.currentTime,null);setTimeout(function(){e.oncancel(t)})}}},{key:"reverse",value:function(){this.updatePromises();var e=this.currentTime;this.playbackRate*=-1,this.play(),e!==null&&(this.currentTime=e),this.updatePromises()}},{key:"updatePlaybackRate",value:function(e){this.playbackRate=e}},{key:"targetAnimations",value:function(){var e,t=(e=this.effect)===null||e===void 0?void 0:e.target;return t.getAnimations()}},{key:"markTarget",value:function(){var e=this.targetAnimations();e.indexOf(this)===-1&&e.push(this)}},{key:"unmarkTarget",value:function(){var e=this.targetAnimations(),t=e.indexOf(this);t!==-1&&e.splice(t,1)}},{key:"tick",value:function(e,t){!this._idle&&!this._paused&&(this._startTime===null?t&&(this.startTime=e-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((e-this._startTime)*this.playbackRate)),t&&(this.currentTimePending=!1,this.fireEvents(e))}},{key:"rewind",value:function(){if(this.playbackRate>=0)this.currentTime=0;else if(this._totalDuration<1/0)this.currentTime=this._totalDuration;else throw new Error("Unable to rewind negative playback rate animation with infinite duration")}},{key:"persist",value:function(){throw new Error(Ns)}},{key:"addEventListener",value:function(e,t,i){throw new Error(Ns)}},{key:"removeEventListener",value:function(e,t,i){throw new Error(Ns)}},{key:"dispatchEvent",value:function(e){throw new Error(Ns)}},{key:"commitStyles",value:function(){throw new Error(Ns)}},{key:"ensureAlive",value:function(){if(this.playbackRate<0&&this.currentTime===0){var e;this._inEffect=!!((e=this.effect)!==null&&e!==void 0&&e.update(-1))}else{var t;this._inEffect=!!((t=this.effect)!==null&&t!==void 0&&t.update(this.currentTime))}!this._inTimeline&&(this._inEffect||!this._finishedFlag)&&(this._inTimeline=!0,this.timeline.animations.push(this))}},{key:"tickCurrentTime",value:function(e,t){e!==this._currentTime&&(this._currentTime=e,this._isFinished&&!t&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())}},{key:"fireEvents",value:function(e){var t=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var i=new FP(null,this,this.currentTime,e);setTimeout(function(){t.onfinish&&t.onfinish(i)})}this._finishedFlag=!0}}else{if(this.onframe&&this.playState==="running"){var a=new FP(null,this,this.currentTime,e);this.onframe(a)}this._finishedFlag=!1}}}])}(),s0e=4,o0e=.001,l0e=1e-7,u0e=10,mx=11,Vk=1/(mx-1),c0e=typeof Float32Array=="function",W6=function(n,e){return 1-3*e+3*n},Y6=function(n,e){return 3*e-6*n},Z6=function(n){return 3*n},Uk=function(n,e,t){return((W6(e,t)*n+Y6(e,t))*n+Z6(e))*n},X6=function(n,e,t){return 3*W6(e,t)*n*n+2*Y6(e,t)*n+Z6(e)},d0e=function(n,e,t,i,a){var s,o,l=0;do o=e+(t-e)/2,s=Uk(o,i,a)-n,s>0?t=o:e=o;while(Math.abs(s)>l0e&&++l<u0e);return o},h0e=function(n,e,t,i){for(var a=0;a<s0e;++a){var s=X6(e,t,i);if(s===0)return e;var o=Uk(e,t,i)-n;e-=o/s}return e},BP=function(n,e,t,i){if(!(n>=0&&n<=1&&t>=0&&t<=1))throw new Error("bezier x values must be in [0, 1] range");if(n===e&&t===i)return function(l){return l};for(var a=c0e?new Float32Array(mx):new Array(mx),s=0;s<mx;++s)a[s]=Uk(s*Vk,n,t);var o=function(u){for(var c=0,d=1,h=mx-1;d!==h&&a[d]<=u;++d)c+=Vk;--d;var f=(u-a[d])/(a[d+1]-a[d]),v=c+f*Vk,g=X6(v,n,t);return g>=o0e?h0e(u,v,n,t):g===0?v:d0e(u,c,c+Vk,n,t)};return function(l){return l===0||l===1?l:Uk(o(l),e,i)}},f0e=function(n){return n=n.replace(/([A-Z])/g,function(e){return"-".concat(e.toLowerCase())}),n.charAt(0)==="-"?n.substring(1):n},jk=function(n){return Math.pow(n,2)},Hk=function(n){return Math.pow(n,3)},Wk=function(n){return Math.pow(n,4)},Yk=function(n){return Math.pow(n,5)},Zk=function(n){return Math.pow(n,6)},Xk=function(n){return 1-Math.cos(n*Math.PI/2)},Kk=function(n){return 1-Math.sqrt(1-n*n)},Jk=function(n){return n*n*(3*n-2)},Qk=function(n){for(var e,t=4;n<((e=Math.pow(2,--t))-1)/11;);return 1/Math.pow(4,3-t)-7.5625*Math.pow((e*3-2)/22-n,2)},qk=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],t=Ds(e,2),i=t[0],a=i===void 0?1:i,s=t[1],o=s===void 0?.5:s,l=(0,O.Z)(Number(a),1,10),u=(0,O.Z)(Number(o),.1,2);return n===0||n===1?n:-l*Math.pow(2,10*(n-1))*Math.sin((n-1-u/(Math.PI*2)*Math.asin(1/l))*(Math.PI*2)/u)},px=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],t=arguments.length>2?arguments[2]:void 0,i=Ds(e,4),a=i[0],s=a===void 0?1:a,o=i[1],l=o===void 0?100:o,u=i[2],c=u===void 0?10:u,d=i[3],h=d===void 0?0:d;s=(0,O.Z)(s,.1,1e3),l=(0,O.Z)(l,.1,1e3),c=(0,O.Z)(c,.1,1e3),h=(0,O.Z)(h,.1,1e3);var f=Math.sqrt(l/s),v=c/(2*Math.sqrt(l*s)),g=v<1?f*Math.sqrt(1-v*v):0,m=1,y=v<1?(v*f+-h)/g:-h+f,w=t?t*n/1e3:n;return v<1?w=Math.exp(-w*v*f)*(m*Math.cos(g*w)+y*Math.sin(g*w)):w=(m+y*w)*Math.exp(-w*f),n===0||n===1?n:1-w},$P=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],t=e,i=Ds(t,2),a=i[0],s=a===void 0?10:a,o=i[1],l=o==="start"?Math.ceil:Math.floor;return l((0,O.Z)(n,0,1)*s)/s},K6=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],t=Ds(e,4),i=t[0],a=t[1],s=t[2],o=t[3];return BP(i,a,s,o)(n)},ew=BP(.42,0,1,1),fh=function(n){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;return 1-n(1-e,t,i)}},vh=function(n){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;return e<.5?n(e*2,t,i)/2:1-n(e*-2+2,t,i)/2}},gh=function(n){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;return e<.5?(1-n(1-e*2,t,i))/2:(n(e*2-1,t,i)+1)/2}},J6={steps:$P,"step-start":function(n){return $P(n,[1,"start"])},"step-end":function(n){return $P(n,[1,"end"])},linear:function(n){return n},"cubic-bezier":K6,ease:function(n){return K6(n,[.25,.1,.25,1])},in:ew,out:fh(ew),"in-out":vh(ew),"out-in":gh(ew),"in-quad":jk,"out-quad":fh(jk),"in-out-quad":vh(jk),"out-in-quad":gh(jk),"in-cubic":Hk,"out-cubic":fh(Hk),"in-out-cubic":vh(Hk),"out-in-cubic":gh(Hk),"in-quart":Wk,"out-quart":fh(Wk),"in-out-quart":vh(Wk),"out-in-quart":gh(Wk),"in-quint":Yk,"out-quint":fh(Yk),"in-out-quint":vh(Yk),"out-in-quint":gh(Yk),"in-expo":Zk,"out-expo":fh(Zk),"in-out-expo":vh(Zk),"out-in-expo":gh(Zk),"in-sine":Xk,"out-sine":fh(Xk),"in-out-sine":vh(Xk),"out-in-sine":gh(Xk),"in-circ":Kk,"out-circ":fh(Kk),"in-out-circ":vh(Kk),"out-in-circ":gh(Kk),"in-back":Jk,"out-back":fh(Jk),"in-out-back":vh(Jk),"out-in-back":gh(Jk),"in-bounce":Qk,"out-bounce":fh(Qk),"in-out-bounce":vh(Qk),"out-in-bounce":gh(Qk),"in-elastic":qk,"out-elastic":fh(qk),"in-out-elastic":vh(qk),"out-in-elastic":gh(qk),spring:px,"spring-in":px,"spring-out":fh(px),"spring-in-out":vh(px),"spring-out-in":gh(px)},v0e=function(n){return f0e(n).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()},g0e=function(n){return J6[v0e(n)]||J6.linear},_0e=function(n){return n},m0e=1,p0e=.5,Q6=0;function q6(r,n){return function(e){if(e>=1)return 1;var t=1/r;return e+=n*t,e-e%t}}var tw="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",y0e=new RegExp("cubic-bezier\\(".concat(tw,",").concat(tw,",").concat(tw,",").concat(tw,"\\)")),x0e=/steps\(\s*(\d+)\s*\)/,E0e=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function GP(r){var n=y0e.exec(r);if(n)return BP.apply(void 0,rl(n.slice(1).map(Number)));var e=x0e.exec(r);if(e)return q6(Number(e[1]),Q6);var t=E0e.exec(r);return t?q6(Number(t[1]),{start:m0e,middle:p0e,end:Q6}[t[2]]):g0e(r)}function b0e(r){return Math.abs(k0e(r)/(r.playbackRate||1))}function k0e(r){var n;return r.duration===0||r.iterations===0?0:(r.duration==="auto"?0:Number(r.duration))*((n=r.iterations)!==null&&n!==void 0?n:1)}var e$=0,zP=1,nw=2,t$=3;function w0e(r,n,e){if(n===null)return e$;var t=e.endTime;return n<Math.min(e.delay,t)?zP:n>=Math.min(e.delay+r+e.endDelay,t)?nw:t$}function S0e(r,n,e,t,i){switch(t){case zP:return n==="backwards"||n==="both"?0:null;case t$:return e-i;case nw:return n==="forwards"||n==="both"?r:null;case e$:return null}}function T0e(r,n,e,t,i){var a=i;return r===0?n!==zP&&(a+=e):a+=t/r,a}function C0e(r,n,e,t,i,a){var s=r===1/0?n%1:r%1;return s===0&&e===nw&&t!==0&&(i!==0||a===0)&&(s=1),s}function M0e(r,n,e,t){return r===nw&&n===1/0?1/0:e===1?Math.floor(t)-1:Math.floor(t)}function P0e(r,n,e){var t=r;if(r!=="normal"&&r!=="reverse"){var i=n;r==="alternate-reverse"&&(i+=1),t="normal",i!==1/0&&i%2!==0&&(t="reverse")}return t==="normal"?e:1-e}function N0e(r,n,e){var t=w0e(r,n,e),i=S0e(r,e.fill,n,t,e.delay);if(i===null)return null;var a=e.duration==="auto"?0:e.duration,s=T0e(a,t,e.iterations,i,e.iterationStart),o=C0e(s,e.iterationStart,t,e.iterations,i,a),l=M0e(t,e.iterations,o,s),u=P0e(e.direction,l,o);return e.currentIteration=l,e.progress=u,e.easingFunction(u)}function O0e(r,n,e){var t=R0e(r,n),i=A0e(t,e);return function(a,s){if(s!==null)i.filter(function(l){return s>=l.applyFrom&&s<l.applyTo}).forEach(function(l){var u=s-l.startOffset,c=l.endOffset-l.startOffset,d=c===0?0:u/c;a.setAttribute(l.property,l.interpolation(d),!1,!1)});else for(var o in t)n$(o)&&a.setAttribute(o,null)}}function n$(r){return r!=="offset"&&r!=="easing"&&r!=="composite"&&r!=="computedOffset"}function R0e(r,n){for(var e={},t=0;t<r.length;t++)for(var i in r[t])if(n$(i)){var a={offset:r[t].offset,computedOffset:r[t].computedOffset,easing:r[t].easing,easingFunction:GP(r[t].easing)||n.easingFunction,value:r[t][i]};e[i]=e[i]||[],e[i].push(a)}return e}function A0e(r,n){var e=[];for(var t in r)for(var i=r[t],a=0;a<i.length-1;a++){var s=a,o=a+1,l=i[s].computedOffset,u=i[o].computedOffset,c=l,d=u;a===0&&(c=-1/0,u===0&&(o=s)),a===i.length-2&&(d=1/0,l===1&&(s=o)),e.push({applyFrom:c,applyTo:d,startOffset:i[s].computedOffset,endOffset:i[o].computedOffset,easingFunction:i[s].easingFunction,property:t,interpolation:L0e(t,i[s].value,i[o].value,n)})}return e.sort(function(h,f){return h.startOffset-f.startOffset}),e}var r$=function(n,e,t){return function(i){var a=i$(n,e,i);return(0,pe.Z)(a)?a:t(a)}};function L0e(r,n,e,t){var i=y6[r];if(i&&i.syntax&&i.int){var a=Dn.styleValueRegistry.getPropertySyntax(i.syntax);if(a){var s=a.parser,o=s?s(n,t):n,l=s?s(e,t):e,u=a.mixer(o,l,t);if(u){var c=r$.apply(void 0,rl(u));return function(d){return d===0?n:d===1?e:c(d)}}}}return r$(!1,!0,function(d){return d?e:n})}function i$(r,n,e){if(typeof r=="number"&&typeof n=="number")return r*(1-e)+n*e;if(typeof r=="boolean"&&typeof n=="boolean"||typeof r=="string"&&typeof n=="string")return e<.5?r:n;if(Array.isArray(r)&&Array.isArray(n)){for(var t=r.length,i=n.length,a=Math.max(t,i),s=[],o=0;o<a;o++)s.push(i$(r[o<t?o:t-1],n[o<i?o:i-1],e));return s}throw new Error("Mismatched interpolation arguments ".concat(r,":").concat(n))}var I0e=function(){function r(){Er(this,r),this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=_0e,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}return br(r,[{key:"easing",get:function(){return this._easing},set:function(e){this.easingFunction=GP(e),this._easing=e}}])}();function D0e(r){var n=[];for(var e in r)if(!(e in["easing","offset","composite"])){var t=r[e];Array.isArray(t)||(t=[t]);for(var i=t.length,a=0;a<i;a++){if(!n[a]){var s={};"offset"in r&&(s.offset=Number(r.offset)),"easing"in r&&(s.easing=r.easing),"composite"in r&&(s.composite=r.composite),n[a]=s}t[a]!==void 0&&t[a]!==null&&(n[a][e]=t[a])}}return n.sort(function(o,l){return(o.computedOffset||0)-(l.computedOffset||0)}),n}function a$(r,n){if(r===null)return[];Array.isArray(r)||(r=D0e(r));for(var e=r.map(function(l){var u={};n!=null&&n.composite&&(u.composite="auto");for(var c in l){var d=l[c];if(c==="offset"){if(d!==null){if(d=Number(d),!isFinite(d))throw new Error("Keyframe offsets must be numbers.");if(d<0||d>1)throw new Error("Keyframe offsets must be between 0 and 1.");u.computedOffset=d}}else if(c==="composite"&&["replace","add","accumulate","auto"].indexOf(d)===-1)throw new Error("".concat(d," compositing is not supported"));u[c]=d}return u.offset===void 0&&(u.offset=null),u.easing===void 0&&(u.easing=(n==null?void 0:n.easing)||"linear"),u.composite===void 0&&(u.composite="auto"),u}),t=!0,i=-1/0,a=0;a<e.length;a++){var s=e[a].offset;if((0,xe.Z)(s))t=!1;else{if(s<i)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=s}}e=e.filter(function(l){return Number(l.offset)>=0&&Number(l.offset)<=1});function o(){var l,u=e,c=u.length;if(e[c-1].computedOffset=Number((l=e[c-1].offset)!==null&&l!==void 0?l:1),c>1){var d;e[0].computedOffset=Number((d=e[0].offset)!==null&&d!==void 0?d:0)}for(var h=0,f=Number(e[0].computedOffset),v=1;v<c;v++){var g=e[v].computedOffset;if(!(0,xe.Z)(g)&&!(0,xe.Z)(f)){for(var m=1;m<v-h;m++)e[h+m].computedOffset=f+(Number(g)-f)*m/(v-h);h=v,f=Number(g)}}}return t||o(),e}var F0e="backwards|forwards|both|none".split("|"),B0e="reverse|alternate|alternate-reverse".split("|");function $0e(r,n){var e=new I0e;return n&&(e.fill="both",e.duration="auto"),typeof r=="number"&&!isNaN(r)?e.duration=r:r!==void 0&&Object.keys(r).forEach(function(t){if(r[t]!==void 0&&r[t]!==null&&r[t]!=="auto"){if((typeof e[t]=="number"||t==="duration")&&(typeof r[t]!="number"||isNaN(r[t]))||t==="fill"&&F0e.indexOf(r[t])===-1||t==="direction"&&B0e.indexOf(r[t])===-1)return;e[t]=r[t]}}),e}function G0e(r,n){var e;return r=z0e((e=r)!==null&&e!==void 0?e:{duration:"auto"}),$0e(r,n)}function z0e(r){return typeof r=="number"&&(isNaN(r)?r={duration:"auto"}:r={duration:r}),r}var V0e=function(){function r(n,e,t){var i=this;Er(this,r),this.composite="replace",this.iterationComposite="replace",this.target=n,this.timing=G0e(t,!1),this.timing.effect=this,this.timing.activeDuration=b0e(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=a$(e,this.timing),this.interpolations=O0e(this.normalizedKeyframes,this.timing,this.target);var a=Dn.globalThis.Proxy;this.computedTiming=a?new a(this.timing,{get:function(o,l){return l==="duration"?o.duration==="auto"?0:o.duration:l==="fill"?o.fill==="auto"?"none":o.fill:l==="localTime"?i.animation&&i.animation.currentTime||null:l==="currentIteration"?!i.animation||i.animation.playState!=="running"?null:o.currentIteration||0:l==="progress"?!i.animation||i.animation.playState!=="running"?null:o.progress||0:o[l]},set:function(){return!0}}):this.timing}return br(r,[{key:"applyInterpolations",value:function(){this.interpolations(this.target,Number(this.timeFraction))}},{key:"update",value:function(e){return e===null?!1:(this.timeFraction=N0e(this.timing.activeDuration,e,this.timing),this.timeFraction!==null)}},{key:"getKeyframes",value:function(){return this.normalizedKeyframes}},{key:"setKeyframes",value:function(e){this.normalizedKeyframes=a$(e)}},{key:"getComputedTiming",value:function(){return this.computedTiming}},{key:"getTiming",value:function(){return this.timing}},{key:"updateTiming",value:function(e){var t=this;Object.keys(e||{}).forEach(function(i){t.timing[i]=e[i]})}}])}();function s$(r,n){return Number(r.id)-Number(n.id)}var U0e=function(){function r(n){var e=this;Er(this,r),this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.webAnimationsNextTick=function(t){e.currentTime=t,e.discardAnimations(),e.animations.length===0?e.timelineTicking=!1:e.requestAnimationFrame(e.webAnimationsNextTick)},this.processRafCallbacks=function(t){var i=e.rafCallbacks;e.rafCallbacks=[],t<Number(e.currentTime)&&(t=Number(e.currentTime)),e.animations.sort(s$),e.animations=e.tick(t,!0,e.animations)[0],i.forEach(function(a){a[1](t)}),e.applyPendingEffects()},this.document=n}return br(r,[{key:"getAnimations",value:function(){return this.discardAnimations(),this.animations.slice()}},{key:"isTicking",value:function(){return this.inTick}},{key:"play",value:function(e,t,i){var a=new V0e(e,t,i),s=new a0e(a,this);return this.animations.push(s),this.restartWebAnimationsNextTick(),s.updatePromises(),s.play(),s.updatePromises(),s}},{key:"applyDirtiedAnimation",value:function(e){var t=this;if(!this.inTick){e.markTarget();var i=e.targetAnimations();i.sort(s$);var a=this.tick(Number(this.currentTime),!1,i.slice())[1];a.forEach(function(s){var o=t.animations.indexOf(s);o!==-1&&t.animations.splice(o,1)}),this.applyPendingEffects()}}},{key:"restart",value:function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame(function(){}),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame}},{key:"destroy",value:function(){this.document.defaultView.cancelAnimationFrame(this.frameId)}},{key:"applyPendingEffects",value:function(){this.pendingEffects.forEach(function(e){e==null||e.applyInterpolations()}),this.pendingEffects=[]}},{key:"updateAnimationsPromises",value:function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(e){return e.updatePromises()})}},{key:"discardAnimations",value:function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(e){return e.playState!=="finished"&&e.playState!=="idle"})}},{key:"restartWebAnimationsNextTick",value:function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))}},{key:"rAF",value:function(e){var t=this.rafId++;return this.rafCallbacks.length===0&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([t,e]),t}},{key:"requestAnimationFrame",value:function(e){var t=this;return this.rAF(function(i){t.updateAnimationsPromises(),e(i),t.updateAnimationsPromises()})}},{key:"tick",value:function(e,t,i){var a=this,s,o;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=e,this.ticking=!1;var l=[],u=[],c=[],d=[];return i.forEach(function(h){h.tick(e,t),h._inEffect?(u.push(h.effect),h.markTarget()):(l.push(h.effect),h.unmarkTarget()),h._needsTick&&(a.ticking=!0);var f=h._inEffect||h._needsTick;h._inTimeline=f,f?c.push(h):d.push(h)}),(s=this.pendingEffects).push.apply(s,l),(o=this.pendingEffects).push.apply(o,u),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[c,d]}}])}();Dn.EasingFunction=GP,Dn.AnimationTimeline=U0e;var sl=function(){function r(n,e,t,i){n===void 0&&(n=0),e===void 0&&(e=0),t===void 0&&(t=0),i===void 0&&(i=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=n,this.y=e,this.width=t,this.height=i}return Object.defineProperty(r.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),r.fromRect=function(n){return new r(n.x,n.y,n.width,n.height)},r.prototype.toJSON=function(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.top,right:this.right,bottom:this.bottom,left:this.left}},r.prototype.isPointIn=function(n,e){return n>=this.left&&n<=this.right&&e>=this.top&&e<=this.bottom},r}();function zAe(r){var n=r.getRenderBounds(),e=__read(n.min,2),t=e[0],i=e[1],a=__read(n.max,2),s=a[0],o=a[1],l=s-t,u=o-i;return new sl(t,i,l,u)}function o$(r){for(var n=1/0,e=1/0,t=-1/0,i=-1/0,a=0;a<r.length;a++){var s=r[a],o=s.x,l=s.y,u=s.width,c=s.height,d=(0,Pe.CR)([o+u,l+c],2),h=d[0],f=d[1];o<n&&(n=o),l<e&&(e=l),h>t&&(t=h),f>i&&(i=f)}return new sl(n,e,t-n,i-e)}var j0e=function(r,n,e){var t=r.width,i=r.height,a=e.flexDirection,s=a===void 0?"row":a,o=e.flexWrap,l=o===void 0?"nowrap":o,u=e.justifyContent,c=u===void 0?"flex-start":u,d=e.alignContent,h=d===void 0?"flex-start":d,f=e.alignItems,v=f===void 0?"flex-start":f,g=s==="row",m=s==="row"||s==="column",y=g?m?[1,0]:[-1,0]:m?[0,1]:[0,-1],w=(0,Pe.CR)([0,0],2),T=w[0],G=w[1],x=n.map(function(te){var le,ue=te.width,se=te.height,V=(0,Pe.CR)([T,G],2),ee=V[0],he=V[1];return le=(0,Pe.CR)([T+ue*y[0],G+se*y[1]],2),T=le[0],G=le[1],new sl(ee,he,ue,se)}),_=o$(x),p={"flex-start":0,"flex-end":g?t-_.width:i-_.height,center:g?(t-_.width)/2:(i-_.height)/2},b=x.map(function(te){var le=te.x,ue=te.y,se=sl.fromRect(te);return se.x=g?le+p[c]:le,se.y=g?ue:ue+p[c],se}),R=o$(b),B=function(te){var le=(0,Pe.CR)(g?["height",i]:["width",t],2),ue=le[0],se=le[1];switch(v){case"flex-start":return 0;case"flex-end":return se-te[ue];case"center":return se/2-te[ue]/2;default:return 0}},j=b.map(function(te){var le=te.x,ue=te.y,se=sl.fromRect(te);return se.x=g?le:le+B(se),se.y=g?ue+B(se):ue,se}),Z=j.map(function(te){var le,ue,se=sl.fromRect(te);return se.x+=(le=r.x)!==null&&le!==void 0?le:0,se.y+=(ue=r.y)!==null&&ue!==void 0?ue:0,se});return Z},H0e=function(r,n,e){return[]},W0e=function(r,n,e){if(n.length===0)return[];var t={flex:j0e,grid:H0e},i=e.display in t?t[e.display]:null;return(i==null?void 0:i.call(null,r,n,e))||[]};function Gl(r){if((0,pe.Z)(r))return[r,r,r,r];if((0,Ie.Z)(r)){var n=r.length;if(n===1)return[r[0],r[0],r[0],r[0]];if(n===2)return[r[0],r[1],r[0],r[1]];if(n===3)return[r[0],r[1],r[2],r[1]];if(n===4)return r}return[0,0,0,0]}var Y0e=function(r){(0,Pe.ZT)(n,r);function n(e){var t=r.call(this,e)||this;t.layoutEvents=[Mo.BOUNDS_CHANGED,Mo.INSERTED,Mo.REMOVED],t.$margin=Gl(0),t.$padding=Gl(0);var i=e.style||{},a=i.margin,s=a===void 0?0:a,o=i.padding,l=o===void 0?0:o;return t.margin=s,t.padding=l,t.isMutationObserved=!0,t.bindEvents(),t}return Object.defineProperty(n.prototype,"margin",{get:function(){return this.$margin},set:function(e){this.$margin=Gl(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"padding",{get:function(){return this.$padding},set:function(e){this.$padding=Gl(e)},enumerable:!1,configurable:!0}),n.prototype.getBBox=function(){var e=this.attributes,t=e.x,i=t===void 0?0:t,a=e.y,s=a===void 0?0:a,o=e.width,l=e.height,u=(0,Pe.CR)(this.$margin,4),c=u[0],d=u[1],h=u[2],f=u[3];return new sl(i-f,s-c,o+f+d,l+c+h)},n.prototype.appendChild=function(e,t){return e.isMutationObserved=!0,r.prototype.appendChild.call(this,e,t),e},n.prototype.getAvailableSpace=function(){var e=this.attributes,t=e.width,i=e.height,a=(0,Pe.CR)(this.$padding,4),s=a[0],o=a[1],l=a[2],u=a[3],c=(0,Pe.CR)(this.$margin,4),d=c[0],h=c[3];return new sl(u+h,s+d,t-u-o,i-s-l)},n.prototype.layout=function(){if(!(!this.attributes.display||!this.isConnected)&&!this.children.some(function(s){return!s.isConnected}))try{var e=this.attributes,t=e.x,i=e.y;this.style.transform="translate(".concat(t,", ").concat(i,")");var a=W0e(this.getAvailableSpace(),this.children.map(function(s){return s.getBBox()}),this.attributes);this.children.forEach(function(s,o){var l=a[o],u=l.x,c=l.y;s.style.transform="translate(".concat(u,", ").concat(c,")")})}catch(s){}},n.prototype.bindEvents=function(){var e=this;this.layoutEvents.forEach(function(t){e.addEventListener(t,function(i){i.target&&(i.target.isMutationObserved=!0,e.layout())})})},n.prototype.attributeChangedCallback=function(e,t,i){e==="margin"?this.margin=i:e==="padding"&&(this.padding=i),this.layout()},n}(xc);function l$(r,n){n(r),r.children&&r.children.forEach(function(e){e&&l$(e,n)})}function yx(r){rw(r,!0)}function pf(r){rw(r,!1)}function rw(r,n){var e=n?"visible":"hidden";l$(r,function(t){t.attr("visibility",e)})}var u$=k(83845),Z0e=5,c$=function(r,n,e,t){e===void 0&&(e=0),t===void 0&&(t=Z0e),Object.entries(n).forEach(function(i){var a=(0,Pe.CR)(i,2),s=a[0],o=a[1],l=r;Object.prototype.hasOwnProperty.call(n,s)&&(o?(0,u$.Z)(o)?((0,u$.Z)(r[s])||(l[s]={}),e<t?c$(r[s],o,e+1,t):l[s]=n[s]):(0,Ie.Z)(o)?(l[s]=[],l[s]=l[s].concat(o)):l[s]=o:l[s]=o)})},bu=function(r){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];for(var t=0;t<n.length;t+=1)c$(r,n[t]);return r},X0e=function(r){(0,Pe.ZT)(n,r);function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=r.apply(this,(0,Pe.ev)([],(0,Pe.CR)(e),!1))||this;return i.isMutationObserved=!0,i.addEventListener(Mo.INSERTED,function(){pf(i)}),i}return n}(xc);function d$(r){var n=r.appendChild(new X0e({class:"offscreen"}));return pf(n),n}function K0e(r){for(var n=r;n;){if(n.className==="offscreen")return!0;n=n.parent}return!1}function J0e(){rw(this,this.attributes.visibility!=="hidden")}var ml=function(r){(0,Pe.ZT)(n,r);function n(e,t){t===void 0&&(t={});var i=r.call(this,bu({},{style:t},e))||this;return i.initialized=!1,i._defaultOptions=t,i}return Object.defineProperty(n.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=d$(this)),this._offscreen},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"defaultOptions",{get:function(){return this._defaultOptions},enumerable:!1,configurable:!0}),n.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this),this.initialized=!0},n.prototype.disconnectedCallback=function(){var e;(e=this._offscreen)===null||e===void 0||e.destroy()},n.prototype.attributeChangedCallback=function(e){e==="visibility"&&J0e.call(this)},n.prototype.update=function(e,t){var i;return this.attr(bu({},this.attributes,e||{})),(i=this.render)===null||i===void 0?void 0:i.call(this,this.attributes,this,t)},n.prototype.clear=function(){this.removeChildren()},n.prototype.bindEvents=function(e,t){},n.prototype.getSubShapeStyle=function(e){var t=e.x,i=e.y,a=e.transform,s=e.transformOrigin,o=e.class,l=e.className,u=e.zIndex,c=(0,Pe._T)(e,["x","y","transform","transformOrigin","class","className","zIndex"]);return c},n}(Hpe);function VP(r){return r.toString().charAt(0).toUpperCase()+r.toString().slice(1)}function Q0e(r){return r.toString().charAt(0).toLowerCase()+r.toString().slice(1)}function q0e(r,n){return"".concat(n).concat(VP(r))}function h$(r,n,e){var t;e===void 0&&(e=!0);var i=n||((t=r.match(/^([a-z][a-z0-9]+)/))===null||t===void 0?void 0:t[0])||"",a=r.replace(new RegExp("^(".concat(i,")")),"");return e?Q0e(a):a}function eye(r,n){Object.entries(n).forEach(function(e){var t=(0,Pe.CR)(e,2),i=t[0],a=t[1];(0,Pe.ev)([r],(0,Pe.CR)(r.querySelectorAll(i)),!1).filter(function(s){return s.matches(i)}).forEach(function(s){if(s){var o=s;o.style.cssText+=Object.entries(a).reduce(function(l,u){return"".concat(l).concat(u.join(":"),";")},"")}})})}var iw=function(r,n){if(!(r!=null&&r.startsWith(n)))return!1;var e=r[n.length];return e>="A"&&e<="Z"};function Zi(r,n,e){e===void 0&&(e=!1);var t={};return Object.entries(r).forEach(function(i){var a=(0,Pe.CR)(i,2),s=a[0],o=a[1];if(!(s==="className"||s==="class")){if(iw(s,"show")&&iw(h$(s,"show"),n)!==e)s===q0e(n,"show")?t[s]=o:t[s.replace(new RegExp(VP(n)),"")]=o;else if(!iw(s,"show")&&iw(s,n)!==e){var l=h$(s,n);l==="filter"&&typeof o=="function"||(t[l]=o)}}}),t}function a0(r,n){return Object.entries(r).reduce(function(e,t){var i=(0,Pe.CR)(t,2),a=i[0],s=i[1];return a.startsWith("show")?e["show".concat(n).concat(a.slice(4))]=s:e["".concat(n).concat(VP(a))]=s,e},{})}function qv(r,n){n===void 0&&(n=["x","y","class","className"]);var e=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],t={},i={};return Object.entries(r).forEach(function(a){var s=(0,Pe.CR)(a,2),o=s[0],l=s[1];n.includes(o)||(e.indexOf(o)!==-1?i[o]=l:t[o]=l)}),[t,i]}var UP=function(r){(0,Pe.ZT)(n,r);function n(e){e===void 0&&(e={});var t=e.style,i=(0,Pe._T)(e,["style"]);return r.call(this,(0,Pe.pi)({style:(0,Pe.pi)({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},t)},i))||this}return Object.defineProperty(n.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=d$(this)),this._offscreen},enumerable:!1,configurable:!0}),n.prototype.disconnectedCallback=function(){var e;(e=this._offscreen)===null||e===void 0||e.destroy()},n}(U6);function tye(r,n){var e=new Map;return r.forEach(function(t){var i=n(t);e.has(i)||e.set(i,[]),e.get(i).push(t)}),e}function nye(r){throw new Error(r)}var rye=function(){function r(i,a,s,o,l,u,c){i===void 0&&(i=null),a===void 0&&(a=null),s===void 0&&(s=null),o===void 0&&(o=null),l===void 0&&(l=[null,null,null,null,null]),u===void 0&&(u=[]),c===void 0&&(c=[]),n.add(this),this._elements=Array.from(i),this._data=a,this._parent=s,this._document=o,this._enter=l[0],this._update=l[1],this._exit=l[2],this._merge=l[3],this._split=l[4],this._transitions=u,this._facetElements=c}r.prototype.selectAll=function(i){var a=typeof i=="string"?this._parent.querySelectorAll(i):i;return new e(a,null,this._elements[0],this._document)},r.prototype.selectFacetAll=function(i){var a=typeof i=="string"?this._parent.querySelectorAll(i):i;return new e(this._elements,null,this._parent,this._document,void 0,void 0,a)},r.prototype.select=function(i){var a=typeof i=="string"?this._parent.querySelectorAll(i)[0]||null:i;return new e([a],null,a,this._document)},r.prototype.append=function(i){var a=this,s=typeof i=="function"?i:function(){return a.createElement(i)},o=[];if(this._data!==null){for(var l=0;l<this._data.length;l++){var u=this._data[l],c=(0,Pe.CR)(Array.isArray(u)?u:[u,null],2),d=c[0],h=c[1],f=s(d,l);f.__data__=d,h!==null&&(f.__fromElements__=h),this._parent.appendChild(f),o.push(f)}return new e(o,null,this._parent,this._document)}for(var l=0;l<this._elements.length;l++){var v=this._elements[l],d=v.__data__,f=s(d,l);v.appendChild(f),o.push(f)}return new e(o,null,o[0],this._document)},r.prototype.maybeAppend=function(i,a){var s=(0,Pe.Q_)(this,n,"m",t).call(this,i[0]==="#"?i:"#".concat(i),a);return s.attr("id",i),s},r.prototype.maybeAppendByClassName=function(i,a){var s=i.toString(),o=(0,Pe.Q_)(this,n,"m",t).call(this,s[0]==="."?s:".".concat(s),a);return o.attr("className",s),o},r.prototype.maybeAppendByName=function(i,a){var s=(0,Pe.Q_)(this,n,"m",t).call(this,'[name="'.concat(i,'"]'),a);return s.attr("name",i),s},r.prototype.data=function(i,a,s){var o,l;a===void 0&&(a=function(B){return B}),s===void 0&&(s=function(){return null});for(var u=[],c=[],d=new Set(this._elements),h=[],f=new Set,v=new Map(this._elements.map(function(B,j){return[a(B.__data__,j),B]})),g=new Map(this._facetElements.map(function(B,j){return[a(B.__data__,j),B]})),m=tye(this._elements,function(B){return s(B.__data__)}),y=0;y<i.length;y++){var w=i[y],T=a(w,y),G=s(w,y);if(v.has(T)){var x=v.get(T);x.__data__=w,x.__facet__=!1,c.push(x),d.delete(x),v.delete(T)}else if(g.has(T)){var x=g.get(T);x.__data__=w,x.__facet__=!0,c.push(x),g.delete(T)}else if(m.has(T)){var _=m.get(T);h.push([w,_]);try{for(var p=(o=void 0,(0,Pe.XA)(_)),b=p.next();!b.done;b=p.next()){var x=b.value;d.delete(x)}}catch(B){o={error:B}}finally{try{b&&!b.done&&(l=p.return)&&l.call(p)}finally{if(o)throw o.error}}m.delete(T)}else if(v.has(G)){var x=v.get(G);x.__toData__?x.__toData__.push(w):x.__toData__=[w],f.add(x),d.delete(x)}else u.push(w)}var R=[new e([],u,this._parent,this._document),new e(c,null,this._parent,this._document),new e(d,null,this._parent,this._document),new e([],h,this._parent,this._document),new e(f,null,this._parent,this._document)];return new e(this._elements,null,this._parent,this._document,R)},r.prototype.merge=function(i){var a=(0,Pe.ev)((0,Pe.ev)([],(0,Pe.CR)(this._elements),!1),(0,Pe.CR)(i._elements),!1),s=(0,Pe.ev)((0,Pe.ev)([],(0,Pe.CR)(this._transitions),!1),(0,Pe.CR)(i._transitions),!1);return new e(a,null,this._parent,this._document,void 0,s)},r.prototype.createElement=function(i){if(this._document)return this._document.createElement(i,{});var a=e.registry[i];return a?new a:nye("Unknown node type: ".concat(i))},r.prototype.join=function(i,a,s,o,l){i===void 0&&(i=function(v){return v}),a===void 0&&(a=function(v){return v}),s===void 0&&(s=function(v){return v.remove()}),o===void 0&&(o=function(v){return v}),l===void 0&&(l=function(v){return v.remove()});var u=i(this._enter),c=a(this._update),d=s(this._exit),h=o(this._merge),f=l(this._split);return c.merge(u).merge(d).merge(h).merge(f)},r.prototype.remove=function(){for(var i=function(o){var l=a._elements[o],u=a._transitions[o];u?u.then(function(){return l.remove()}):l.remove()},a=this,s=0;s<this._elements.length;s++)i(s);return new e([],null,this._parent,this._document,void 0,this._transitions)},r.prototype.each=function(i){for(var a=0;a<this._elements.length;a++){var s=this._elements[a],o=s.__data__;i.call(s,o,a)}return this},r.prototype.attr=function(i,a){var s=typeof a!="function"?function(){return a}:a;return this.each(function(o,l){a!==void 0&&(this[i]=s.call(this,o,l))})},r.prototype.style=function(i,a,s){s===void 0&&(s=!0);var o=typeof a!="function"||!s?function(){return a}:a;return this.each(function(l,u){a!==void 0&&(this.style[i]=o.call(this,l,u))})},r.prototype.styles=function(i,a){return i===void 0&&(i={}),a===void 0&&(a=!0),this.each(function(s,o){var l=this;Object.entries(i).forEach(function(u){var c=(0,Pe.CR)(u,2),d=c[0],h=c[1],f=typeof h!="function"||!a?function(){return h}:h;h!==void 0&&l.attr(d,f.call(l,s,o))})})},r.prototype.update=function(i,a){a===void 0&&(a=!0);var s=typeof i!="function"||!a?function(){return i}:i;return this.each(function(o,l){i&&this.update&&this.update(s.call(this,o,l))})},r.prototype.maybeUpdate=function(i,a){a===void 0&&(a=!0);var s=typeof i!="function"||!a?function(){return i}:i;return this.each(function(o,l){i&&this.update&&this.update(s.call(this,o,l))})},r.prototype.transition=function(i){var a=this._transitions;return this.each(function(s,o){a[o]=i.call(this,s,o)})},r.prototype.on=function(i,a){return this.each(function(){this.addEventListener(i,a)}),this},r.prototype.call=function(i){for(var a=[],s=1;s<arguments.length;s++)a[s-1]=arguments[s];return i.call.apply(i,(0,Pe.ev)([this._parent,this],(0,Pe.CR)(a),!1)),this},r.prototype.node=function(){return this._elements[0]},r.prototype.nodes=function(){return this._elements},r.prototype.transitions=function(){return this._transitions.filter(function(i){return!!i})},r.prototype.parent=function(){return this._parent};var n,e,t;return e=r,n=new WeakSet,t=function(a,s){var o=this._elements[0],l=o.querySelector(a);if(l)return new e([l],null,this._parent,this._document);var u=typeof s=="string"?this.createElement(s):s();return o.appendChild(u),new e([u],null,this._parent,this._document)},r.registry={g:xc,rect:vm,circle:Bk,path:$k,text:UP,ellipse:$6,image:z6,line:RP,polygon:Gk,polyline:V6,html:G6},r}();function Dr(r){return new rye([r],null,r,r.ownerDocument)}function iye(r,n,e){return r.querySelector(n)?Dr(r).select(n):Dr(r).append(e)}var yf=function(r,n){var e=function(i){return"".concat(n,"-").concat(i)},t=Object.fromEntries(Object.entries(r).map(function(i){var a=(0,Pe.CR)(i,2),s=a[0],o=a[1],l=e(o);return[s,{name:l,class:".".concat(l),id:"#".concat(l),toString:function(){return l}}]}));return Object.assign(t,{prefix:e}),t};function Nd(r,n,e,t,i){return t===void 0&&(t=!0),i===void 0&&(i=function(a){a.node().removeChildren()}),r?e(n):(t&&i(n),null)}var f$=yf({text:"text"},"title");function aw(r){return/\S+-\S+/g.test(r)?r.split("-").map(function(n){return n[0]}):r.length>2?[r[0]]:r.split("")}function aye(r,n){var e=r.attributes,t=e.position,i=e.spacing,a=e.inset,s=e.text,o=r.getBBox(),l=n.getBBox(),u=aw(t),c=(0,Pe.CR)(Gl(s?i:0),4),d=c[0],h=c[1],f=c[2],v=c[3],g=(0,Pe.CR)(Gl(a),4),m=g[0],y=g[1],w=g[2],T=g[3],G=(0,Pe.CR)([v+h,d+f],2),x=G[0],_=G[1],p=(0,Pe.CR)([T+y,m+w],2),b=p[0],R=p[1];if(u[0]==="l")return new sl(o.x,o.y,l.width+o.width+x+b,Math.max(l.height+R,o.height));if(u[0]==="t")return new sl(o.x,o.y,Math.max(l.width+b,o.width),l.height+o.height+_+R);var B=(0,Pe.CR)([n.attributes.width||l.width,n.attributes.height||l.height],2),j=B[0],Z=B[1];return new sl(l.x,l.y,j+o.width+x+b,Z+o.height+_+R)}function sye(r,n){var e=Object.entries(n).reduce(function(t,i){var a=(0,Pe.CR)(i,2),s=a[0],o=a[1],l=r.node().attr(s);return l||(t[s]=o),t},{});r.styles(e)}function oye(r){var n,e,t,i,a=r,s=a.width,o=a.height,l=a.position,u=(0,Pe.CR)([+s/2,+o/2],2),c=u[0],d=u[1],h=(0,Pe.CR)([+c,+d,"center","middle"],4),f=h[0],v=h[1],g=h[2],m=h[3],y=aw(l);return y.includes("l")&&(n=(0,Pe.CR)([0,"start"],2),f=n[0],g=n[1]),y.includes("r")&&(e=(0,Pe.CR)([+s,"end"],2),f=e[0],g=e[1]),y.includes("t")&&(t=(0,Pe.CR)([0,"top"],2),v=t[0],m=t[1]),y.includes("b")&&(i=(0,Pe.CR)([+o,"bottom"],2),v=i[0],m=i[1]),{x:f,y:v,textAlign:g,textBaseline:m}}var lye=function(r){(0,Pe.ZT)(n,r);function n(e){return r.call(this,e,{text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"top-left"})||this}return n.prototype.getAvailableSpace=function(){var e=this,t=this.attributes,i=t.width,a=t.height,s=t.position,o=t.spacing,l=t.inset,u=e.querySelector(f$.text.class);if(!u)return new sl(0,0,+i,+a);var c=u.getBBox(),d=c.width,h=c.height,f=(0,Pe.CR)(Gl(o),4),v=f[0],g=f[1],m=f[2],y=f[3],w=(0,Pe.CR)([0,0,+i,+a],4),T=w[0],G=w[1],x=w[2],_=w[3],p=aw(s);if(p.includes("i"))return new sl(T,G,x,_);p.forEach(function(se,V){var ee,he,ut,ct;se==="t"&&(ee=(0,Pe.CR)(V===0?[h+m,+a-h-m]:[0,+a],2),G=ee[0],_=ee[1]),se==="r"&&(he=(0,Pe.CR)([+i-d-y],1),x=he[0]),se==="b"&&(ut=(0,Pe.CR)([+a-h-v],1),_=ut[0]),se==="l"&&(ct=(0,Pe.CR)(V===0?[d+g,+i-d-g]:[0,+i],2),T=ct[0],x=ct[1])});var b=(0,Pe.CR)(Gl(l),4),R=b[0],B=b[1],j=b[2],Z=b[3],te=(0,Pe.CR)([Z+B,R+j],2),le=te[0],ue=te[1];return new sl(T+Z,G+R,x-le,_-ue)},n.prototype.getBBox=function(){return this.title?this.title.getBBox():new sl(0,0,0,0)},n.prototype.render=function(e,t){var i=this,a=e.width,s=e.height,o=e.position,l=e.spacing,u=(0,Pe._T)(e,["width","height","position","spacing"]),c=(0,Pe.CR)(qv(u),1),d=c[0],h=oye(e),f=h.x,v=h.y,g=h.textAlign,m=h.textBaseline;Nd(!!u.text,Dr(t),function(y){i.title=y.maybeAppendByClassName(f$.text,"text").styles(d).call(sye,{x:f,y:v,textAlign:g,textBaseline:m}).node()})},n}(ml),jP=k(13279);function _h(r,n){return(0,Be.Z)(r)?r.apply(void 0,(0,Pe.ev)([],(0,Pe.CR)(n),!1)):r}function uye(r,n){return r.reduce(function(e,t){return(e[t[n]]=e[t[n]]||[]).push(t),e},{})}function cye(r){return typeof r=="boolean"?!1:"enter"in r&&"update"in r&&"exit"in r}function v$(r){if(!r)return{enter:!1,update:!1,exit:!1};var n=["enter","update","exit"],e=Object.fromEntries(Object.entries(r).filter(function(t){var i=(0,Pe.CR)(t,1),a=i[0];return!n.includes(a)}));return Object.fromEntries(n.map(function(t){return cye(r)?r[t]===!1?[t,!1]:[t,(0,Pe.pi)((0,Pe.pi)({},r[t]),e)]:[t,e]}))}function s0(r,n){r?r.finished.then(n):n()}function dye(r,n){r.length===0?n():Promise.all(r.map(function(e){return e==null?void 0:e.finished})).then(n)}function g$(r,n){"update"in r?r.update(n):r.attr(n)}function _$(r,n,e){if(n.length===0)return null;if(!e){var t=n.slice(-1)[0];return g$(r,{style:t}),null}return r.animate(n,e)}function hye(r,n){return!(r.nodeName!=="text"||n.nodeName!=="text"||r.attributes.text!==n.attributes.text)}function fye(r,n,e,t){if(t===void 0&&(t="destroy"),hye(r,n))return r.remove(),[null];var i=function(){t==="destroy"?r.destroy():t==="hide"&&pf(r),n.isVisible()&&yx(n)};if(!e)return i(),[null];var a=e.duration,s=a===void 0?0:a,o=e.delay,l=o===void 0?0:o,u=Math.ceil(+s/2),c=+s/4,d=(0,Pe.CR)(r.getGeometryBounds().center,2),h=d[0],f=d[1],v=(0,Pe.CR)(n.getGeometryBounds().center,2),g=v[0],m=v[1],y=(0,Pe.CR)([(h+g)/2-h,(f+m)/2-f],2),w=y[0],T=y[1],G=r.style.opacity,x=G===void 0?1:G,_=n.style.opacity,p=_===void 0?1:_,b=r.style.transform||"",R=n.style.transform||"",B=r.animate([{opacity:x,transform:"translate(0, 0) ".concat(b)},{opacity:0,transform:"translate(".concat(w,", ").concat(T,") ").concat(b)}],(0,Pe.pi)((0,Pe.pi)({fill:"both"},e),{duration:l+u+c})),j=n.animate([{opacity:0,transform:"translate(".concat(-w,", ").concat(-T,") ").concat(R),offset:.01},{opacity:p,transform:"translate(0, 0) ".concat(R)}],(0,Pe.pi)((0,Pe.pi)({fill:"both"},e),{duration:u+c,delay:l+u-c}));return s0(j,i),[B,j]}function xf(r,n,e){var t={},i={};return Object.entries(n).forEach(function(a){var s=(0,Pe.CR)(a,2),o=s[0],l=s[1];if(!(0,xe.Z)(l)){var u=r.style[o]||r.parsedStyle[o]||0;u!==l&&(t[o]=u,i[o]=l)}}),e?_$(r,[t,i],(0,Pe.pi)({fill:"both"},e)):(g$(r,i),null)}function vye(r){var n;return((n=r[0])===null||n===void 0?void 0:n.map(function(e,t){return r.map(function(i){return i[t]})}))||[]}function HP(r,n,e){e===void 0&&(e=!1);var t=r.getBBox(),i=t.width,a=t.height,s=n/Math.max(i,a);return e&&(r.style.transform="scale(".concat(s,")")),s}var m$=function(r,n,e){return[["M",r-e,n],["A",e,e,0,1,0,r+e,n],["A",e,e,0,1,0,r-e,n],["Z"]]},gye=m$,_ye=function(r,n,e){return[["M",r-e,n-e],["L",r+e,n-e],["L",r+e,n+e],["L",r-e,n+e],["Z"]]},mye=function(r,n,e){return[["M",r-e,n],["L",r,n-e],["L",r+e,n],["L",r,n+e],["Z"]]},pye=function(r,n,e){var t=e*Math.sin(.3333333333333333*Math.PI);return[["M",r-e,n+t],["L",r,n-t],["L",r+e,n+t],["Z"]]},yye=function(r,n,e){var t=e*Math.sin(.3333333333333333*Math.PI);return[["M",r-e,n-t],["L",r+e,n-t],["L",r,n+t],["Z"]]},xye=function(r,n,e){var t=e/2*Math.sqrt(3);return[["M",r,n-e],["L",r+t,n-e/2],["L",r+t,n+e/2],["L",r,n+e],["L",r-t,n+e/2],["L",r-t,n-e/2],["Z"]]},Eye=function(r,n,e){var t=e-1.5;return[["M",r-e,n-t],["L",r+e,n+t],["L",r+e,n-t],["L",r-e,n+t],["Z"]]},p$=function(r,n,e){return[["M",r,n+e],["L",r,n-e]]},bye=function(r,n,e){return[["M",r-e,n-e],["L",r+e,n+e],["M",r+e,n-e],["L",r-e,n+e]]},kye=function(r,n,e){return[["M",r-e/2,n-e],["L",r+e/2,n-e],["M",r,n-e],["L",r,n+e],["M",r-e/2,n+e],["L",r+e/2,n+e]]},wye=function(r,n,e){return[["M",r-e,n],["L",r+e,n],["M",r,n-e],["L",r,n+e]]},Sye=function(r,n,e){return[["M",r-e,n],["L",r+e,n]]},y$=function(r,n,e){return[["M",r-e,n],["L",r+e,n]]},Tye=y$,Cye=function(r,n,e){return[["M",r-e,n],["A",e/2,e/2,0,1,1,r,n],["A",e/2,e/2,0,1,0,r+e,n]]},Mye=function(r,n,e){return[["M",r-e-1,n-2.5],["L",r,n-2.5],["L",r,n+2.5],["L",r+e+1,n+2.5]]},Pye=function(r,n,e){return[["M",r-e-1,n+2.5],["L",r,n+2.5],["L",r,n-2.5],["L",r+e+1,n-2.5]]},Nye=function(r,n,e){return[["M",r-(e+1),n+2.5],["L",r-e/2,n+2.5],["L",r-e/2,n-2.5],["L",r+e/2,n-2.5],["L",r+e/2,n+2.5],["L",r+e+1,n+2.5]]};function Oye(r,n){return[["M",r-5,n+2.5],["L",r-5,n],["L",r,n],["L",r,n-3],["L",r,n+3],["L",r+6.5,n+3]]}var Rye=function(r,n,e){return[["M",r-e,n-e],["L",r+e,n],["L",r-e,n+e],["Z"]]},mh=yf({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"),Aye=function(r){(0,Pe.ZT)(n,r);function n(e){var t=r.call(this,e,{x:0,y:0,animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonD:Rye(0,0,6),buttonSize:12,controllerPadding:5,controllerSpacing:5,formatter:function(i,a){return"".concat(i,"/").concat(a)},defaultPage:0,loop:!1,orientation:"horizontal",pageNumFill:"black",pageNumFontSize:12,pageNumTextAlign:"start",pageNumTextBaseline:"middle"})||this;return t.playState="idle",t.contentGroup=t.appendChild(new xc({class:mh.contentGroup.name})),t.playWindow=t.contentGroup.appendChild(new xc({class:mh.playWindow.name})),t.innerCurrPage=t.defaultPage,t}return Object.defineProperty(n.prototype,"defaultPage",{get:function(){var e=this.attributes.defaultPage;return(0,O.Z)(e,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"controllerShape",{get:function(){return this.totalPages>1?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"pageShape",{get:function(){var e=this.pageViews,t=(0,Pe.CR)(vye(e.map(function(d){var h=d.getBBox(),f=h.width,v=h.height;return[f,v]})).map(function(d){return Math.max.apply(Math,(0,Pe.ev)([],(0,Pe.CR)(d),!1))}),2),i=t[0],a=t[1],s=this.attributes,o=s.pageWidth,l=o===void 0?i:o,u=s.pageHeight,c=u===void 0?a:u;return{pageWidth:l,pageHeight:c}},enumerable:!1,configurable:!0}),n.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(n.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),n.prototype.getBBox=function(){var e=r.prototype.getBBox.call(this),t=e.x,i=e.y,a=this.controllerShape,s=this.pageShape,o=s.pageWidth,l=s.pageHeight;return new sl(t,i,o+a.width,l)},n.prototype.goTo=function(e){var t=this,i=this.attributes.animate,a=this,s=a.currPage,o=a.playState,l=a.playWindow,u=a.pageViews;if(o!=="idle"||e<0||u.length<=0||e>=u.length)return null;u[s].setLocalPosition(0,0),this.prepareFollowingPage(e);var c=(0,Pe.CR)(this.getFollowingPageDiff(e),2),d=c[0],h=c[1];this.playState="running";var f=_$(l,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-d,", ").concat(-h,")")}],i);return s0(f,function(){t.innerCurrPage=e,t.playState="idle",t.setVisiblePages([e]),t.updatePageInfo()}),f},n.prototype.prev=function(){var e=this.attributes.loop,t=this.pageViews.length,i=this.currPage;if(!e&&i<=0)return null;var a=e?(i-1+t)%t:(0,O.Z)(i-1,0,t);return this.goTo(a)},n.prototype.next=function(){var e=this.attributes.loop,t=this.pageViews.length,i=this.currPage;if(!e&&i>=t-1)return null;var a=e?(i+1)%t:(0,O.Z)(i+1,0,t);return this.goTo(a)},n.prototype.renderClipPath=function(e){var t=this.pageShape,i=t.pageWidth,a=t.pageHeight;if(!i||!a){this.contentGroup.style.clipPath=void 0;return}this.clipPath=e.maybeAppendByClassName(mh.clipPath,"rect").styles({width:i,height:a}),this.contentGroup.attr("clipPath",this.clipPath.node())},n.prototype.setVisiblePages=function(e){this.playWindow.children.forEach(function(t,i){e.includes(i)?yx(t):pf(t)})},n.prototype.adjustControllerLayout=function(){var e=this,t=e.prevBtnGroup,i=e.nextBtnGroup,a=e.pageInfoGroup,s=this.attributes,o=s.orientation,l=s.controllerPadding,u=a.getBBox(),c=u.width,d=u.height,h=(0,Pe.CR)(o==="horizontal"?[-180,0]:[-90,90],2),f=h[0],v=h[1];t.setLocalEulerAngles(f),i.setLocalEulerAngles(v);var g=t.getBBox(),m=g.width,y=g.height,w=i.getBBox(),T=w.width,G=w.height,x=Math.max(m,c,T),_=o==="horizontal"?{offset:[[0,0],[m/2+l,0],[m+c+l*2,0]],textAlign:"start"}:{offset:[[x/2,-y-l],[x/2,0],[x/2,G+l]],textAlign:"center"},p=(0,Pe.CR)(_.offset,3),b=(0,Pe.CR)(p[0],2),R=b[0],B=b[1],j=(0,Pe.CR)(p[1],2),Z=j[0],te=j[1],le=(0,Pe.CR)(p[2],2),ue=le[0],se=le[1],V=_.textAlign,ee=a.querySelector("text");ee&&(ee.style.textAlign=V),t.setLocalPosition(R,B),a.setLocalPosition(Z,te),i.setLocalPosition(ue,se)},n.prototype.updatePageInfo=function(){var e,t=this,i=t.currPage,a=t.pageViews,s=t.attributes.formatter;a.length<2||((e=this.pageInfoGroup.querySelector(mh.pageInfo.class))===null||e===void 0||e.attr("text",s(i+1,a.length)),this.adjustControllerLayout())},n.prototype.getFollowingPageDiff=function(e){var t=this.currPage;if(t===e)return[0,0];var i=this.attributes.orientation,a=this.pageShape,s=a.pageWidth,o=a.pageHeight,l=e<t?-1:1;return i==="horizontal"?[l*s,0]:[0,l*o]},n.prototype.prepareFollowingPage=function(e){var t=this,i=t.currPage,a=t.pageViews;if(this.setVisiblePages([e,i]),e!==i){var s=(0,Pe.CR)(this.getFollowingPageDiff(e),2),o=s[0],l=s[1];a[e].setLocalPosition(o,l)}},n.prototype.renderController=function(e){var t=this,i=this.attributes.controllerSpacing,a=this.pageShape,s=a.pageWidth,o=a.pageHeight,l=this.pageViews.length>=2,u=e.maybeAppendByClassName(mh.controller,"g");if(rw(u.node(),l),!!l){var c=Zi(this.attributes,"button"),d=Zi(this.attributes,"pageNum"),h=(0,Pe.CR)(qv(c),2),f=h[0],v=h[1],g=f.size,m=(0,Pe._T)(f,["size"]),y=!u.select(mh.prevBtnGroup.class).node(),w=u.maybeAppendByClassName(mh.prevBtnGroup,"g").styles(v);this.prevBtnGroup=w.node();var T=w.maybeAppendByClassName(mh.prevBtn,"path"),G=u.maybeAppendByClassName(mh.nextBtnGroup,"g").styles(v);this.nextBtnGroup=G.node();var x=G.maybeAppendByClassName(mh.nextBtn,"path");[T,x].forEach(function(p){p.styles((0,Pe.pi)((0,Pe.pi)({},m),{transformOrigin:"center"})),HP(p.node(),g,!0)});var _=u.maybeAppendByClassName(mh.pageInfoGroup,"g");this.pageInfoGroup=_.node(),_.maybeAppendByClassName(mh.pageInfo,"text").styles(d),this.updatePageInfo(),u.node().setLocalPosition(s+i,o/2),y&&(this.prevBtnGroup.addEventListener("click",function(){t.prev()}),this.nextBtnGroup.addEventListener("click",function(){t.next()}))}},n.prototype.render=function(e,t){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s;this.attr("transform","translate(".concat(a,", ").concat(o,")"));var l=Dr(t);this.renderClipPath(l),this.renderController(l),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},n.prototype.bindEvents=function(){var e=this,t=(0,rx.Z)(function(){return e.render(e.attributes,e)},50);this.playWindow.addEventListener(Mo.INSERTED,t),this.playWindow.addEventListener(Mo.REMOVED,t)},n}(ml);function Lye(r){var n="default";if((0,Gs.Z)(r)&&r instanceof Image)n="image";else if((0,Be.Z)(r))n="symbol";else if((0,Ze.Z)(r)){var e=new RegExp("data:(image|text)");r.match(e)?n="base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(r)?n="url":n="symbol"}return n}function Iye(r){var n=Lye(r);return["base64","url","image"].includes(n)?"image":r&&n==="symbol"?"path":null}var Rs=function(r){(0,Pe.ZT)(n,r);function n(){return r!==null&&r.apply(this,arguments)||this}return n.prototype.render=function(e,t){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s,l=this.getSubShapeStyle(e),u=l.symbol,c=l.size,d=c===void 0?16:c,h=(0,Pe._T)(l,["symbol","size"]),f=Iye(u);Nd(!!f,Dr(t),function(v){v.maybeAppendByClassName("marker",f).attr("className","marker ".concat(f,"-marker")).call(function(g){if(f==="image"){var m=d*2;g.styles({img:u,width:m,height:m,x:a-d,y:o-d})}else{var m=d/2,y=(0,Be.Z)(u)?u:n.getSymbol(u);g.styles((0,Pe.pi)({d:y==null?void 0:y(a,o,m)},h))}})})},n.MARKER_SYMBOL_MAP=new Map,n.registerSymbol=function(e,t){n.MARKER_SYMBOL_MAP.set(e,t)},n.getSymbol=function(e){return n.MARKER_SYMBOL_MAP.get(e)},n.getSymbols=function(){return Array.from(n.MARKER_SYMBOL_MAP.keys())},n}(ml);Rs.registerSymbol("cross",bye),Rs.registerSymbol("hyphen",Sye),Rs.registerSymbol("line",p$),Rs.registerSymbol("plus",wye),Rs.registerSymbol("tick",kye),Rs.registerSymbol("circle",m$),Rs.registerSymbol("point",gye),Rs.registerSymbol("bowtie",Eye),Rs.registerSymbol("hexagon",xye),Rs.registerSymbol("square",_ye),Rs.registerSymbol("diamond",mye),Rs.registerSymbol("triangle",pye),Rs.registerSymbol("triangle-down",yye),Rs.registerSymbol("line",p$),Rs.registerSymbol("dot",y$),Rs.registerSymbol("dash",Tye),Rs.registerSymbol("smooth",Cye),Rs.registerSymbol("hv",Mye),Rs.registerSymbol("vh",Pye),Rs.registerSymbol("hvh",Nye),Rs.registerSymbol("vhv",Oye);function VAe(r,n,e){var t=Math.round((r-e)/n);return e+t*n}function Dye(r,n,e){var t=1.4,i=t*e;return[["M",r-e,n-i],["L",r+e,n-i],["L",r+e,n+i],["L",r-e,n+i],["Z"]]}var x$=1.4,E$=.4;function Fye(r,n,e){var t=e,i=t*x$,a=t/2,s=t/6,o=r+i*E$;return[["M",r,n],["L",o,n+a],["L",r+i,n+a],["L",r+i,n-a],["L",o,n-a],["Z"],["M",o,n+s],["L",r+i-2,n+s],["M",o,n-s],["L",r+i-2,n-s]]}function Bye(r,n,e){var t=e,i=t*x$,a=t/2,s=t/6,o=n+i*E$;return[["M",r,n],["L",r-a,o],["L",r-a,n+i],["L",r+a,n+i],["L",r+a,o],["Z"],["M",r-s,o],["L",r-s,n+i-2],["M",r+s,o],["L",r+s,n+i-2]]}Rs.registerSymbol("hiddenHandle",Dye),Rs.registerSymbol("verticalHandle",Fye),Rs.registerSymbol("horizontalHandle",Bye);var UAe=function(r,n,e){return r===void 0&&(r="horizontal"),r==="horizontal"?n:e};function jAe(r,n,e,t){var i;t===void 0&&(t=4);var a=__read(r,2),s=a[0],o=a[1],l=__read(n,2),u=l[0],c=l[1],d=__read(e,2),h=d[0],f=d[1],v=__read([u,c],2),g=v[0],m=v[1],y=m-g;return g>m&&(i=__read([m,g],2),g=i[0],m=i[1]),y>o-s?[s,o]:g<s?h===s&&f===m?[s,m]:[s,y+s]:m>o?f===o&&h===g?[g,o]:[o-y,o]:[g,m]}function WP(r,n,e){return r===void 0&&(r="horizontal"),r==="horizontal"?n:e}function HAe(r){var n=r&&r.getRenderBounds();if(!n)return{width:0,height:0};var e=n.getMax(),t=n.getMin();return{width:e[0]-t[0],height:e[1]-t[1]}}function b$(r){var n=r.getLocalBounds(),e=n.min,t=n.max,i=(0,Pe.CR)([e,t],2),a=(0,Pe.CR)(i[0],2),s=a[0],o=a[1],l=(0,Pe.CR)(i[1],2),u=l[0],c=l[1];return{x:s,y:o,width:u-s,height:c-o,left:s,bottom:c,top:o,right:u}}function WAe(r,n){var e=select(r).append("text").node();return e.attr(__assign(__assign({},n),{visibility:"hidden"})),e}function $ye(r,n){var e=(0,Pe.CR)(r,2),t=e[0],i=e[1],a=(0,Pe.CR)(n,2),s=a[0],o=a[1];return t!==s&&i===o}function YAe(r,n){var e=__read(r,2),t=e[0],i=e[1],a=__read(n,2),s=a[0],o=a[1];return t===s&&i!==o}function Gye(r,n){var e,t,i=n.attributes;try{for(var a=(0,Pe.XA)(Object.entries(i)),s=a.next();!s.done;s=a.next()){var o=(0,Pe.CR)(s.value,2),l=o[0],u=o[1];l!=="id"&&l!=="className"&&r.attr(l,u)}}catch(c){e={error:c}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}}function eg(r){return typeof r=="function"?r():(0,Ze.Z)(r)||(0,pe.Z)(r)?new UP({style:{text:String(r)}}):r}var zye=k(92426),sw,YP;function ZAe(r){YP=r}var Vye=(0,zye.Z)(function(r,n){var e=n.fontSize,t=n.fontFamily,i=n.fontWeight,a=n.fontStyle,s=n.fontVariant;return YP?YP(r,e):(sw||(sw=Dn.offscreenCanvasCreator.getOrCreateContext(void 0)),sw.font=[a,s,i,"".concat(e,"px"),t].join(" "),sw.measureText(r).width)},function(r,n){return[r,Object.values(n||k$(r)).join()].join("")},4096),k$=function(r){var n=r.style.fontFamily||"sans-serif",e=r.style.fontWeight||"normal",t=r.style.fontStyle||"normal",i=r.style.fontVariant,a=r.style.fontSize;return a=typeof a=="object"?a.value:a,{fontSize:a,fontFamily:n,fontWeight:e,fontStyle:t,fontVariant:i}};function w$(r){return r.nodeName==="text"?r:r.nodeName==="g"&&r.children.length===1&&r.children[0].nodeName==="text"?r.children[0]:null}function S$(r,n){var e=w$(r);e&&e.attr(n)}function ZP(r,n,e){e===void 0&&(e="..."),S$(r,{wordWrap:!0,wordWrapWidth:n,maxLines:1,textOverflow:e})}var Od=yf({layout:"flex",markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label",valueGroup:"value-group",value:"value",backgroundGroup:"background-group",background:"background"},"legend-category-item");function Uye(r){var n=r.querySelector(Od.marker.class);return n?n.style:{}}var jye=function(r){(0,Pe.ZT)(n,r);function n(e){return r.call(this,e,{span:[1,1],marker:function(){return new Bk({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this}return Object.defineProperty(n.prototype,"showValue",{get:function(){var e=this.attributes.valueText;return e?typeof e=="string"||typeof e=="number"?e!=="":typeof e=="function"?!0:e.attr("text")!=="":!1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"actualSpace",{get:function(){var e=this.labelGroup,t=this.valueGroup,i=this.attributes.markerSize,a=e.node().getBBox(),s=a.width,o=a.height,l=t.node().getBBox(),u=l.width,c=l.height;return{markerWidth:i,labelWidth:s,valueWidth:u,height:Math.max(i,o,c)}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"span",{get:function(){var e=this.attributes.span;if(!e)return[1,1];var t=(0,Pe.CR)(Gl(e),2),i=t[0],a=t[1],s=this.showValue?a:0,o=i+s;return[i/o,s/o]},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shape",{get:function(){var e,t=this.attributes,i=t.markerSize,a=t.width,s=this.actualSpace,o=s.markerWidth,l=s.height,u=this.actualSpace,c=u.labelWidth,d=u.valueWidth,h=(0,Pe.CR)(this.spacing,2),f=h[0],v=h[1];if(a){var g=a-i-f-v,m=(0,Pe.CR)(this.span,2),y=m[0],w=m[1];e=(0,Pe.CR)([y*g,w*g],2),c=e[0],d=e[1]}var T=o+c+d+f+v;return{width:T,height:l,markerWidth:o,labelWidth:c,valueWidth:d}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"spacing",{get:function(){var e=this.attributes.spacing;if(!e)return[0,0];var t=(0,Pe.CR)(Gl(e),2),i=t[0],a=t[1];return this.showValue?[i,a]:[i,0]},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"layout",{get:function(){var e=this.shape,t=e.markerWidth,i=e.labelWidth,a=e.valueWidth,s=e.width,o=e.height,l=(0,Pe.CR)(this.spacing,2),u=l[0],c=l[1];return{height:o,width:s,markerWidth:t,labelWidth:i,valueWidth:a,position:[t/2,t+u,t+i+u+c]}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"scaleSize",{get:function(){var e=Uye(this.markerGroup.node()),t=this.attributes,i=t.markerSize,a=t.markerStrokeWidth,s=a===void 0?e.strokeWidth:a,o=t.markerLineWidth,l=o===void 0?e.lineWidth:o,u=t.markerStroke,c=u===void 0?e.stroke:u,d=+(s||l||(c?1:0))*Math.sqrt(2),h=this.markerGroup.node().getBBox(),f=h.width,v=h.height;return(1-d/Math.max(f,v))*i},enumerable:!1,configurable:!0}),n.prototype.renderMarker=function(e){var t=this,i=this.attributes.marker,a=Zi(this.attributes,"marker");this.markerGroup=e.maybeAppendByClassName(Od.markerGroup,"g").style("zIndex",0),Nd(!!i,this.markerGroup,function(){var s,o=t.markerGroup.node(),l=(s=o.childNodes)===null||s===void 0?void 0:s[0],u=typeof i=="string"?new Rs({style:{symbol:i},className:Od.marker.name}):i();l?u.nodeName===l.nodeName?l instanceof Rs?l.update((0,Pe.pi)((0,Pe.pi)({},a),{symbol:i})):(Gye(l,u),Dr(l).styles(a)):(l.remove(),Dr(u).attr("className",Od.marker.name).styles(a),o.appendChild(u)):(u instanceof Rs||Dr(u).attr("className",Od.marker.name).styles(a),o.appendChild(u)),t.markerGroup.node().scale(1/t.markerGroup.node().getScale()[0]);var c=HP(t.markerGroup.node(),t.scaleSize,!0);t.markerGroup.node().style._transform="scale(".concat(c,")")})},n.prototype.renderLabel=function(e){var t=Zi(this.attributes,"label"),i=t.text,a=(0,Pe._T)(t,["text"]);this.labelGroup=e.maybeAppendByClassName(Od.labelGroup,"g").style("zIndex",0),this.labelGroup.maybeAppendByClassName(Od.label,function(){return eg(i)}).styles(a)},n.prototype.renderValue=function(e){var t=this,i=Zi(this.attributes,"value"),a=i.text,s=(0,Pe._T)(i,["text"]);this.valueGroup=e.maybeAppendByClassName(Od.valueGroup,"g").style("zIndex",0),Nd(this.showValue,this.valueGroup,function(){t.valueGroup.maybeAppendByClassName(Od.value,function(){return eg(a)}).styles(s)})},n.prototype.renderBackground=function(e){var t=this.shape,i=t.width,a=t.height,s=Zi(this.attributes,"background");this.background=e.maybeAppendByClassName(Od.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(Od.background,"rect").styles((0,Pe.pi)({width:i,height:a},s))},n.prototype.adjustLayout=function(){var e=this.layout,t=e.labelWidth,i=e.valueWidth,a=e.height,s=(0,Pe.CR)(e.position,3),o=s[0],l=s[1],u=s[2],c=a/2;this.markerGroup.styles({transform:"translate(".concat(o,", ").concat(c,")").concat(this.markerGroup.node().style._transform)}),this.labelGroup.styles({transform:"translate(".concat(l,", ").concat(c,")")}),ZP(this.labelGroup.select(Od.label.class).node(),Math.ceil(t)),this.showValue&&(this.valueGroup.styles({transform:"translate(".concat(u,", ").concat(c,")")}),ZP(this.valueGroup.select(Od.value.class).node(),Math.ceil(i)))},n.prototype.render=function(e,t){var i=Dr(t),a=e.x,s=a===void 0?0:a,o=e.y,l=o===void 0?0:o;i.styles({transform:"translate(".concat(s,", ").concat(l,")")}),this.renderMarker(i),this.renderLabel(i),this.renderValue(i),this.renderBackground(i),this.adjustLayout()},n}(ml),gm=yf({page:"item-page",navigator:"navigator",item:"item"},"items"),T$=function(r,n,e){return e===void 0&&(e=!0),r?n(r):e},Hye=function(r){(0,Pe.ZT)(n,r);function n(e){var t=r.call(this,e,{data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orientation:"horizontal",click:jP.Z,mouseenter:jP.Z,mouseleave:jP.Z})||this;return t.navigatorShape=[0,0],t}return Object.defineProperty(n.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"grid",{get:function(){var e=this.attributes,t=e.gridRow,i=e.gridCol,a=e.data;if(!t&&!i)throw new Error("gridRow and gridCol can not be set null at the same time");return t&&i?[t,i]:t?[t,a.length]:[a.length,i]},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"renderData",{get:function(){var e=this.attributes,t=e.data,i=e.layout,a=Zi(this.attributes,"item"),s=t.map(function(o,l){var u=o.id,c=u===void 0?l:u,d=o.label,h=o.value;return{id:"".concat(c),index:l,style:(0,Pe.pi)({layout:i,labelText:d,valueText:h},Object.fromEntries(Object.entries(a).map(function(f){var v=(0,Pe.CR)(f,2),g=v[0],m=v[1];return[g,_h(m,[o,l,t])]})))}});return s},enumerable:!1,configurable:!0}),n.prototype.getGridLayout=function(){var e=this,t=this.attributes,i=t.orientation,a=t.width,s=t.rowPadding,o=t.colPadding,l=(0,Pe.CR)(this.navigatorShape,1),u=l[0],c=(0,Pe.CR)(this.grid,2),d=c[0],h=c[1],f=h*d,v=0;return this.pageViews.children.map(function(g,m){var y,w,T=Math.floor(m/f),G=m%f,x=e.ifHorizontal(h,d),_=[Math.floor(G/x),G%x];i==="vertical"&&_.reverse();var p=(0,Pe.CR)(_,2),b=p[0],R=p[1],B=(a-u-(h-1)*o)/h,j=g.getBBox().height,Z=(0,Pe.CR)([0,0],2),te=Z[0],le=Z[1];return i==="horizontal"?(y=(0,Pe.CR)([v,b*(j+s)],2),te=y[0],le=y[1],v=R===h-1?0:v+B+o):(w=(0,Pe.CR)([R*(B+o),v],2),te=w[0],le=w[1],v=b===d-1?0:v+j+s),{page:T,index:m,row:b,col:R,pageIndex:G,width:B,height:j,x:te,y:le}})},n.prototype.getFlexLayout=function(){var e=this.attributes,t=e.width,i=e.height,a=e.rowPadding,s=e.colPadding,o=(0,Pe.CR)(this.navigatorShape,1),l=o[0],u=(0,Pe.CR)(this.grid,2),c=u[0],d=u[1],h=(0,Pe.CR)([t-l,i],2),f=h[0],v=h[1],g=(0,Pe.CR)([0,0,0,0,0,0,0,0],8),m=g[0],y=g[1],w=g[2],T=g[3],G=g[4],x=g[5],_=g[6],p=g[7];return this.pageViews.children.map(function(b,R){var B,j,Z,te,le=b.getBBox(),ue=le.width,se=le.height,V=_===0?0:s,ee=_+V+ue;if(ee<=f&&T$(G,function(ut){return ut<d}))return B=(0,Pe.CR)([_+V,p,ee],3),m=B[0],y=B[1],_=B[2],{width:ue,height:se,x:m,y,page:w,index:R,pageIndex:T++,row:x,col:G++};j=(0,Pe.CR)([x+1,0,0,p+se+a],4),x=j[0],G=j[1],_=j[2],p=j[3];var he=p+se;return he<=v&&T$(x,function(ut){return ut<c})?(Z=(0,Pe.CR)([_,p,ue],3),m=Z[0],y=Z[1],_=Z[2],{width:ue,height:se,x:m,y,page:w,index:R,pageIndex:T++,row:x,col:G++}):(te=(0,Pe.CR)([0,0,ue,0,w+1,0,0,0],8),m=te[0],y=te[1],_=te[2],p=te[3],w=te[4],T=te[5],x=te[6],G=te[7],{width:ue,height:se,x:m,y,page:w,index:R,pageIndex:T++,row:x,col:G++})})},Object.defineProperty(n.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var e=this.attributes.layout==="grid"?this.getGridLayout:this.getFlexLayout,t=e.call(this);return t.slice(-1)[0].page>0?(this.navigatorShape=[55,0],e.call(this)):t},enumerable:!1,configurable:!0}),n.prototype.ifHorizontal=function(e,t){var i=this.attributes.orientation;return WP(i,e,t)},n.prototype.flattenPage=function(e){e.querySelectorAll(gm.item.class).forEach(function(t){e.appendChild(t)}),e.querySelectorAll(gm.page.class).forEach(function(t){var i=e.removeChild(t);i.destroy()})},n.prototype.renderItems=function(e){var t=this.attributes,i=t.click,a=t.mouseenter,s=t.mouseleave;this.flattenPage(e);var o=this.dispatchCustomEvent.bind(this);Dr(e).selectAll(gm.item.class).data(this.renderData,function(l){return l.id}).join(function(l){return l.append(function(u){var c=u.style;return new jye({style:c})}).attr("className",gm.item.name).on("click",function(){i==null||i(this),o("itemClick",{item:this})}).on("pointerenter",function(){a==null||a(this),o("itemMouseenter",{item:this})}).on("pointerleave",function(){s==null||s(this),o("itemMouseleave",{item:this})})},function(l){return l.each(function(u){var c=u.style;this.update(c)})},function(l){return l.remove()})},n.prototype.relayoutNavigator=function(){var e,t=this.attributes,i=t.layout,a=t.width,s=((e=this.pageViews.children[0])===null||e===void 0?void 0:e.getBBox().height)||0,o=(0,Pe.CR)(this.navigatorShape,2),l=o[0],u=o[1];this.navigator.update(i==="grid"?{pageWidth:a-l,pageHeight:s-u}:{})},n.prototype.adjustLayout=function(){var e=this,t=Object.entries(uye(this.itemsLayout,"page")).map(function(a){var s=(0,Pe.CR)(a,2),o=s[0],l=s[1];return{page:o,layouts:l}}),i=(0,Pe.ev)([],(0,Pe.CR)(this.navigator.getContainer().children),!1);t.forEach(function(a){var s=a.layouts,o=e.pageViews.appendChild(new xc({className:gm.page.name}));s.forEach(function(l){var u=l.x,c=l.y,d=l.index,h=l.width,f=l.height,v=i[d];o.appendChild(v),(0,hp.Z)(v,"__layout__",l),v.update({x:u,y:c,width:h,height:f})})}),this.relayoutNavigator()},n.prototype.renderNavigator=function(e){var t=this.attributes.orientation,i=Zi(this.attributes,"nav"),a=bu({orientation:t},i),s=this;return e.selectAll(gm.navigator.class).data(["nav"]).join(function(o){return o.append(function(){return new Aye({style:a})}).attr("className",gm.navigator.name).each(function(){s.navigator=this})},function(o){return o.each(function(){this.update(a)})},function(o){return o.remove()}),this.navigator},n.prototype.getBBox=function(){return this.navigator.getBBox()},n.prototype.render=function(e,t){var i=this.attributes.data;if(!(!i||i.length===0)){var a=this.renderNavigator(Dr(t));this.renderItems(a.getContainer()),this.adjustLayout()}},n.prototype.dispatchCustomEvent=function(e,t){var i=new Pd(e,{detail:t});this.dispatchEvent(i)},n}(ml),xx=yf({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),C$={showLabel:!0,formatter:function(r){return r.toString()},markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orientation:"vertical",spacing:0},XAe=function(r){(0,Pe.ZT)(n,r);function n(e){return r.call(this,e,C$)||this}return n.prototype.render=function(e,t){var i=Dr(t).maybeAppendByClassName(xx.markerGroup,"g");this.renderMarker(i);var a=Dr(t).maybeAppendByClassName(xx.labelGroup,"g");this.renderLabel(a)},n.prototype.renderMarker=function(e){var t=this,i=this.attributes,a=i.orientation,s=i.markerSymbol,o=s===void 0?WP(a,"horizontalHandle","verticalHandle"):s;Nd(!!o,e,function(l){var u=Zi(t.attributes,"marker"),c=(0,Pe.pi)({symbol:o},u);t.marker=l.maybeAppendByClassName(xx.marker,function(){return new Rs({style:c})}).update(c)})},n.prototype.renderLabel=function(e){var t=this,i=this.attributes,a=i.showLabel,s=i.orientation,o=i.spacing,l=o===void 0?0:o,u=i.formatter;Nd(a,e,function(c){var d,h=Zi(t.attributes,"label"),f=h.text,v=(0,Pe._T)(h,["text"]),g=((d=c.select(xx.marker.class))===null||d===void 0?void 0:d.node().getBBox())||{},m=g.width,y=m===void 0?0:m,w=g.height,T=w===void 0?0:w,G=(0,Pe.CR)(WP(s,[0,T+l,"center","top"],[y+l,0,"start","middle"]),4),x=G[0],_=G[1],p=G[2],b=G[3];c.maybeAppendByClassName(xx.label,"text").styles((0,Pe.pi)((0,Pe.pi)({},v),{x,y:_,text:u(f).toString(),textAlign:p,textBaseline:b}))})},n}(ml),M$={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},Wye=bu({},M$,{}),KAe=bu({},M$,a0(C$,"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"}),JAe=.01,QAe=.5,Ex=yf({title:"title",titleGroup:"title-group",items:"items",itemsGroup:"items-group",contentGroup:"content-group",ribbonGroup:"ribbon-group",ribbon:"ribbon",handlesGroup:"handles-group",handle:"handle",startHandle:"start-handle",endHandle:"end-handle",labelGroup:"label-group",label:"label",indicator:"indicator"},"legend"),Yye=function(r){(0,Pe.ZT)(n,r);function n(e){return r.call(this,e,Wye)||this}return n.prototype.renderTitle=function(e,t,i){var a=this.attributes,s=a.showTitle,o=a.titleText,l=Zi(this.attributes,"title"),u=(0,Pe.CR)(qv(l),2),c=u[0],d=u[1];this.titleGroup=e.maybeAppendByClassName(Ex.titleGroup,"g").styles(d);var h=(0,Pe.pi)((0,Pe.pi)({width:t,height:i},c),{text:s?o:""});this.title=this.titleGroup.maybeAppendByClassName(Ex.title,function(){return new lye({style:h})}).update(h)},n.prototype.renderItems=function(e,t){var i=t.x,a=t.y,s=t.width,o=t.height,l=Zi(this.attributes,"title",!0),u=(0,Pe.CR)(qv(l),2),c=u[0],d=u[1],h=(0,Pe.pi)((0,Pe.pi)({},c),{width:s,height:o,x:0,y:0});this.itemsGroup=e.maybeAppendByClassName(Ex.itemsGroup,"g").styles((0,Pe.pi)((0,Pe.pi)({},d),{transform:"translate(".concat(i,", ").concat(a,")")}));var f=this;this.itemsGroup.selectAll(Ex.items.class).data(["items"]).join(function(v){return v.append(function(){return new Hye({style:h})}).attr("className",Ex.items.name).each(function(){f.items=Dr(this)})},function(v){return v.update(h)},function(v){return v.remove()})},n.prototype.adjustLayout=function(){var e=this.attributes.showTitle;if(e){var t=this.title.node().getAvailableSpace(),i=t.x,a=t.y;this.itemsGroup.node().style.transform="translate(".concat(i,", ").concat(a,")")}},Object.defineProperty(n.prototype,"availableSpace",{get:function(){var e=this.attributes,t=e.showTitle,i=e.width,a=e.height;return t?this.title.node().getAvailableSpace():new sl(0,0,i,a)},enumerable:!1,configurable:!0}),n.prototype.getBBox=function(){var e,t,i=(e=this.title)===null||e===void 0?void 0:e.node(),a=(t=this.items)===null||t===void 0?void 0:t.node();return!i||!a?r.prototype.getBBox.call(this):aye(i,a)},n.prototype.render=function(e,t){var i=this.attributes,a=i.width,s=i.height,o=i.x,l=o===void 0?0:o,u=i.y,c=u===void 0?0:u,d=Dr(t);t.style.transform="translate(".concat(l,", ").concat(c,")"),this.renderTitle(d,a,s),this.renderItems(d,this.availableSpace),this.adjustLayout()},n}(ml),Zye=function(r,n){var e={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&n.indexOf(t)<0&&(e[t]=r[t]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(r);i<t.length;i++)n.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(e[t[i]]=r[t[i]]);return e};class ow extends Fu{constructor(n,e){super(n,Object.assign({},ow.defaultOptions,e)),this.typePrefix="__data__",this.element=null,this.draw=!1,this.fieldMap={node:new Map,edge:new Map,combo:new Map},this.selectedItems=[],this.bindEvents=()=>{const{graph:t}=this.context;t.on(qn.AFTER_DRAW,this.createElement)},this.changeState=(t,i)=>{const{graph:a}=this.context,{typePrefix:s}=this,o=(0,nc.Z)(t,[s,"id"]),l=(0,nc.Z)(t,[s,"style","labelText"]),[u]=o.split("__"),c=this.fieldMap[u].get(l)||[];a.setElementState(Object.fromEntries(c==null?void 0:c.map(d=>[d,i])))},this.click=t=>{if(this.options.trigger==="hover")return;const i=(0,nc.Z)(t,[this.typePrefix,"id"]);this.selectedItems.includes(i)?(this.selectedItems=this.selectedItems.filter(a=>a!==i),this.changeState(t,[])):(this.selectedItems.push(i),this.changeState(t,"selected"))},this.mouseleave=t=>{this.options.trigger!=="click"&&(this.selectedItems=[],this.changeState(t,[]))},this.mouseenter=t=>{if(this.options.trigger==="click")return;const i=(0,nc.Z)(t,[this.typePrefix,"id"]);this.selectedItems.includes(i)?this.selectedItems=this.selectedItems.filter(a=>a!==i):(this.selectedItems.push(i),this.changeState(t,"active"))},this.setFieldMap=(t,i,a)=>{if(!t)return;const s=this.fieldMap[a];if(s)if(!s.has(t))s.set(t,[i]);else{const o=s.get(t);o&&(o.push(i),s.set(t,o))}},this.getEvents=()=>({mouseenter:this.mouseenter,mouseleave:this.mouseleave,click:this.click}),this.getMarkerData=(t,i)=>{if(!t)return[];const{model:a,element:s,graph:o}=this.context,{nodes:l,edges:u,combos:c}=a.getData(),d={},h=y=>(0,Be.Z)(t)?t(y):t,f={node:"circle",edge:"line",combo:"rect"},v={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"},g=(y,w)=>s==null?void 0:s.getElementComputedStyle(y,w),m=(y,w)=>{y.forEach(T=>{const{id:G}=T,x=(0,nc.Z)(T,["data",h(T)]),_=(s==null?void 0:s.getElementType(w,T))||"circle",p=g(w,T),b=(w==="edge"?p==null?void 0:p.stroke:p==null?void 0:p.fill)||"#1783ff";G&&x&&x.replace(/\s+/g,"")&&(this.setFieldMap(x,G,w),d[x]||(d[x]={id:`${w}__${G}`,label:x,marker:v[_]||f[w],elementType:w,lineWidth:1,stroke:b,fill:b}))})};switch(i){case"node":m(l,"node");break;case"edge":m(u,"edge");break;case"combo":m(c,"combo");break;default:return[]}return Object.values(d)},this.layout=t=>{const i={flexDirection:"row",alignItems:"flex-end",justifyContent:"center"};let{flexDirection:a,alignItems:s,justifyContent:o}=i;const l={top:["row","flex-start","center"],bottom:["row","flex-end","center"],left:["column","flex-start","center"],right:["column","flex-end","center"]};return t in l&&([a,s,o]=l[t]),{display:"flex",flexDirection:a,justifyContent:o,alignItems:s}},this.createElement=()=>{if(this.draw){this.updateElement();return}const{canvas:t}=this.context,[i,a]=t.getSize(),s=this.options,{width:o=i,height:l=a,nodeField:u,edgeField:c,comboField:d,trigger:h,position:f}=s,v=Zye(s,["width","height","nodeField","edgeField","comboField","trigger","position"]),g=this.getMarkerData(u,"node"),m=this.getMarkerData(c,"edge"),y=this.getMarkerData(d,"combo"),w=[...g,...y,...m],T=this.layout(f),G=new Y0e({style:Object.assign({width:o,height:l},T)}),x=Object.assign({width:o,height:l,data:w,itemMarkerLineWidth:({lineWidth:p})=>p,itemMarker:({marker:p})=>p,itemMarkerStroke:({stroke:p})=>p,itemMarkerFill:({fill:p})=>p,gridCol:g.length},v,this.getEvents()),_=new Yye({className:"legend",style:x});G.appendChild(_),t.appendChild(G),this.element=G,this.draw=!0},this.bindEvents()}update(n){super.update(n),this.clear(),this.createElement()}clear(){var n;(n=this.element)===null||n===void 0||n.destroy(),this.element=null,this.draw=!1}updateElement(){if(!this.element)return;this.element.getChildByIndex(0).update({itemMarkerOpacity:({id:e})=>!this.selectedItems.length||this.selectedItems.includes(e)?1:.5,itemLabelOpacity:({id:e})=>!this.selectedItems.length||this.selectedItems.includes(e)?1:.5})}destroy(){this.clear(),this.context.graph.off(qn.AFTER_DRAW,this.createElement),super.destroy()}}ow.defaultOptions={position:"bottom",trigger:"hover",orientation:"horizontal",layout:"flex",itemSpacing:4,rowPadding:10,colPadding:10,itemMarkerSize:16,itemLabelFontSize:16};class lw extends Fu{constructor(n,e){super(n,Object.assign({},lw.defaultOptions,e)),this.onDraw=t=>{var i;!((i=t==null?void 0:t.data)===null||i===void 0)&&i.render||this.onRender()},this.shapes=new Map,this.landmarkMap=new Map,this.mask=null,this.isMaskDragging=!1,this.onMaskDragStart=t=>{this.mask&&(this.isMaskDragging=!0,this.mask.setPointerCapture(t.pointerId),this.mask.addEventListener("pointermove",this.onMaskDrag),this.mask.addEventListener("pointerup",this.onMaskDragEnd),this.mask.addEventListener("pointercancel",this.onMaskDragEnd))},this.onMaskDrag=t=>{if(!this.mask||!this.isMaskDragging)return;const{size:[i,a]}=this.options,{movementX:s,movementY:o}=t,{left:l,top:u,width:c,height:d}=this.mask.style,[,,h,f]=this.maskBBox;let v=parseInt(l)+s,g=parseInt(u)+o,m=parseInt(c),y=parseInt(d);v<0&&(v=0),g<0&&(g=0),v+m>i&&(v=Ug(i-m,0)),g+y>a&&(g=Ug(a-y,0)),m<h&&(s>0?(v=Ug(v-s,0),m=Vg(m+s,i)):s<0&&(m=Vg(m-s,i))),y<f&&(o>0?(g=Ug(g-o,0),y=Vg(y+o,a)):o<0&&(y=Vg(y-o,a))),Object.assign(this.mask.style,{left:v+"px",top:g+"px",width:m+"px",height:y+"px"});const w=parseInt(l)-v,T=parseInt(u)-g;if(w===0&&T===0)return;const G=this.context.canvas.getCamera().getZoom(),x=this.canvas.getCamera().getZoom(),_=G/x;this.context.graph.translateBy([w*_,T*_],!1)},this.onMaskDragEnd=t=>{this.mask&&(this.isMaskDragging=!1,this.mask.releasePointerCapture(t.pointerId),this.mask.removeEventListener("pointermove",this.onMaskDrag),this.mask.removeEventListener("pointerup",this.onMaskDragEnd),this.mask.removeEventListener("pointercancel",this.onMaskDragEnd))},this.onTransform=(0,hI.Z)(()=>{this.isMaskDragging||(this.updateMask(),this.setCamera())},32,{leading:!0}),this.setOnRender(),this.bindEvents()}update(n){this.unbindEvents(),super.update(n),"delay"in n&&this.setOnRender(),this.bindEvents()}setOnRender(){this.onRender=(0,rx.Z)(()=>{this.renderMinimap(),this.renderMask()},this.options.delay,!0)}bindEvents(){const{graph:n}=this.context;n.on(qn.AFTER_DRAW,this.onDraw),n.on(qn.AFTER_RENDER,this.onRender),n.on(qn.AFTER_TRANSFORM,this.onTransform)}unbindEvents(){const{graph:n}=this.context;n.off(qn.AFTER_DRAW,this.onDraw),n.off(qn.AFTER_RENDER,this.onRender),n.off(qn.AFTER_TRANSFORM,this.onTransform)}renderMinimap(){const n=this.getElements(),e=this.initCanvas();this.setShapes(e,n)}getElements(){const{filter:n}=this.options,{model:e}=this.context,t=e.getData();if(!n)return t;const{nodes:i,edges:a,combos:s}=t;return{nodes:i.filter(o=>n(Ut(o),"node")),edges:a.filter(o=>n(Ut(o),"edge")),combos:s.filter(o=>n(Ut(o),"combo"))}}setShapes(n,e){const{nodes:t,edges:i,combos:a}=e,{shape:s}=this.options,{element:o}=this.context;if(s==="key"){const u=new Set,c=d=>{const h=Ut(d);u.add(h);const f=o.getElement(h);if(!f)return;const v=f.getShape("key"),g=this.shapes.get(h)||v.cloneNode();g.setPosition(v.getPosition()),f.style.zIndex&&(g.style.zIndex=f.style.zIndex),g.id=f.id,this.shapes.has(h)?Object.entries(v.attributes).forEach(([m,y])=>{g.style[m]!==y&&(g.style[m]=y)}):(n.appendChild(g),this.shapes.set(h,g))};i.forEach(c),a.forEach(c),t.forEach(c),this.shapes.forEach((d,h)=>{u.has(h)||(n.removeChild(d),this.shapes.delete(h))});return}const l=(u,c)=>{const h=o.getElement(u).getPosition();return c.setPosition(h),c};n.removeChildren(),i.forEach(u=>n.appendChild(s(Ut(u),"edge"))),a.forEach(u=>{n.appendChild(l(Ut(u),s(Ut(u),"combo")))}),t.forEach(u=>{n.appendChild(l(Ut(u),s(Ut(u),"node")))})}calculatePosition(){const{position:n,size:[e,t]}=this.options,{canvas:i}=this.context,[a,s]=i.getSize(),[o,l]=xI(n);return[o*(a-e),l*(s-t)]}createContainer(){const{container:n,className:e,size:[t,i],containerStyle:a}=this.options;if(n)return typeof n=="string"?document.querySelector(n):n;const s=document.createElement("div");s.classList.add("g6-minimap"),e&&s.classList.add(e);const[o,l]=this.calculatePosition();return Object.assign(s.style,Object.assign({position:"absolute",left:o+"px",top:l+"px",width:t+"px",height:i+"px"},a)),this.context.canvas.getContainer().appendChild(s)}initCanvas(){const{renderer:n,size:[e,t]}=this.options;if(this.canvas){const{width:i,height:a}=this.canvas.getConfig();(e!==i||t!==a)&&this.canvas.resize(e,t),n&&this.canvas.setRenderer(n)}else{const i=document.createElement("div"),a=this.createContainer();this.container=a,a.appendChild(i),this.canvas=new $1({width:e,height:t,container:i,renderer:n||new qy})}return this.setCamera(),this.canvas}createLandmark(n,e,t){const i=`${n.join(",")}-${e.join(",")}-${t}`;if(this.landmarkMap.has(i))return this.landmarkMap.get(i);const s=this.canvas.getCamera().createLandmark(i,{position:n,focalPoint:e,zoom:t});return this.landmarkMap.set(i,s),s}setCamera(){var n;const{canvas:e}=this.context,t=(n=this.canvas)===null||n===void 0?void 0:n.getCamera();if(!t)return;const{size:[i,a],padding:s}=this.options,[o,l,u,c]=Kf(s),{min:d,max:h,center:f}=e.getBounds("elements"),v=h[0]-d[0],g=h[1]-d[1],m=i-c-l,y=a-o-u,w=m/v,T=y/g,G=Math.min(w,T),x=this.createLandmark(f,f,G);t.gotoLandmark(x,0)}get maskBBox(){const{canvas:n}=this.context,e=n.getSize(),t=n.getCanvasByViewport([0,0]),i=n.getCanvasByViewport(e),a=this.canvas.canvas2Viewport(Zh(t)),s=this.canvas.canvas2Viewport(Zh(i)),o=s.x-a.x,l=s.y-a.y;return[a.x,a.y,o,l]}calculateMaskBBox(){const{size:[n,e]}=this.options;let[t,i,a,s]=this.maskBBox;return t<0&&(a=Vg(a+t,n),t=0),i<0&&(s=Vg(s+i,e),i=0),t+a>n&&(a=Ug(n-t,0)),i+s>e&&(s=Ug(e-i,0)),[Vg(t,n),Vg(i,e),Ug(a,0),Ug(s,0)]}renderMask(){const{maskStyle:n}=this.options;this.mask||(this.mask=document.createElement("div"),this.mask.addEventListener("pointerdown",this.onMaskDragStart)),this.container.appendChild(this.mask),Object.assign(this.mask.style,Object.assign(Object.assign({},n),{cursor:"move",position:"absolute",pointerEvents:"auto"})),this.updateMask()}updateMask(){if(!this.mask)return;const[n,e,t,i]=this.calculateMaskBBox();Object.assign(this.mask.style,{top:e+"px",left:n+"px",width:t+"px",height:i+"px"})}destroy(){var n;this.unbindEvents(),this.canvas.destroy(),(n=this.mask)===null||n===void 0||n.remove(),super.destroy()}}lw.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 Vg=(r,n)=>Math.min(r,n),Ug=(r,n)=>Math.max(r,n);var XP=function(r,n,e,t){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(t.next(c))}catch(d){s(d)}}function l(c){try{u(t.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((t=t.apply(r,n||[])).next())})};const KP={x1:0,y1:0,x2:0,y2:0,visibility:"hidden"};class uw extends Fu{constructor(n,e){super(n,Object.assign({},uw.defaultOptions,e)),this.initSnapline=()=>{const t=this.context.canvas.getLayer("transient");this.horizontalLine||(this.horizontalLine=t.appendChild(new I1({style:Object.assign(Object.assign({},KP),this.options.horizontalLineStyle)}))),this.verticalLine||(this.verticalLine=t.appendChild(new I1({style:Object.assign(Object.assign({},KP),this.options.verticalLineStyle)})))},this.isHorizontalSticking=!1,this.isVerticalSticking=!1,this.enableStick=!0,this.autoSnapToLine=(t,i,a)=>XP(this,void 0,void 0,function*(){const{verticalX:s,horizontalY:o}=a,{tolerance:l}=this.options,{min:[u,c],max:[d,h],center:[f,v]}=i;let g=0,m=0;s!==null&&(rc(d,s)<l&&(g=s-d),rc(u,s)<l&&(g=s-u),rc(f,s)<l&&(g=s-f),g!==0&&(this.isVerticalSticking=!0)),o!==null&&(rc(h,o)<l&&(m=o-h),rc(c,o)<l&&(m=o-c),rc(v,o)<l&&(m=o-v),m!==0&&(this.isHorizontalSticking=!0)),(g!==0||m!==0)&&(yield this.context.graph.translateElementBy({[t]:[g,m]},!1))}),this.enableSnap=t=>{const{target:i}=t,a=.5;if(this.isHorizontalSticking||this.isVerticalSticking){const[s,o]=this.getDelta(t);if(this.isHorizontalSticking&&this.isVerticalSticking&&Math.abs(s)<=a&&Math.abs(o)<=a)return this.context.graph.translateElementBy({[i.id]:[-s,-o]},!1),!1;if(this.isHorizontalSticking&&Math.abs(o)<=a)return this.context.graph.translateElementBy({[i.id]:[0,-o]},!1),!1;if(this.isVerticalSticking&&Math.abs(s)<=a)return this.context.graph.translateElementBy({[i.id]:[-s,0]},!1),!1;this.isHorizontalSticking=!1,this.isVerticalSticking=!1,this.enableStick=!1,setTimeout(()=>{this.enableStick=!0},200)}return this.enableStick},this.calcSnaplineMetadata=(t,i)=>{const{tolerance:a,shape:s}=this.options,{min:[o,l],max:[u,c],center:[d,h]}=i;let f=null,v=null,g=null,m=null,y=null,w=null;return this.getNodes().some(T=>{if((0,Ml.Z)(t.id,T.id))return!1;const G=P$(T,s).getRenderBounds(),{min:[x,_],max:[p,b],center:[R,B]}=G;return f===null&&(rc(R,d)<a?f=R:rc(x,o)<a||rc(x,u)<a?f=x:(rc(p,u)<a||rc(p,o)<a)&&(f=p),f!==null&&(v=Math.min(_,l),g=Math.max(b,c))),m===null&&(rc(B,h)<a?m=B:rc(_,l)<a||rc(_,c)<a?m=_:(rc(b,c)<a||rc(b,l)<a)&&(m=b),m!==null&&(y=Math.min(x,o),w=Math.max(p,u))),f!==null&&m!==null}),{verticalX:f,verticalMinY:v,verticalMaxY:g,horizontalY:m,horizontalMinX:y,horizontalMaxX:w}},this.onDragStart=()=>{this.initSnapline()},this.onDrag=t=>XP(this,void 0,void 0,function*(){const{target:i}=t;if(this.options.autoSnap&&!this.enableSnap(t))return;const a=P$(i,this.options.shape).getRenderBounds(),s=this.calcSnaplineMetadata(i,a);this.hideSnapline(),(s.verticalX!==null||s.horizontalY!==null)&&this.updateSnapline(s),this.options.autoSnap&&(yield this.autoSnapToLine(i.id,a,s))}),this.onDragEnd=()=>{this.hideSnapline()},this.bindEvents()}getNodes(){var n;const{filter:e}=this.options,i=(((n=this.context.element)===null||n===void 0?void 0:n.getNodes())||[]).filter(a=>{var s;return Lde(a)&&((s=this.context.viewport)===null||s===void 0?void 0:s.isInViewport(a.getRenderBounds()))});return e?i.filter(a=>e(a)):i}hideSnapline(){this.horizontalLine.style.visibility="hidden",this.verticalLine.style.visibility="hidden"}getLineWidth(n){const{lineWidth:e}=this.options[`${n}LineStyle`];return+(e||KP.lineWidth||1)/this.context.graph.getZoom()}updateSnapline(n){const{verticalX:e,verticalMinY:t,verticalMaxY:i,horizontalY:a,horizontalMinX:s,horizontalMaxX:o}=n,[l,u]=this.context.canvas.getSize(),{offset:c}=this.options;a!==null?Object.assign(this.horizontalLine.style,{x1:c===1/0?0:s-c,y1:a,x2:c===1/0?l:o+c,y2:a,visibility:"visible",lineWidth:this.getLineWidth("horizontal")}):this.horizontalLine.style.visibility="hidden",e!==null?Object.assign(this.verticalLine.style,{x1:e,y1:c===1/0?0:t-c,x2:e,y2:c===1/0?u:i+c,visibility:"visible",lineWidth:this.getLineWidth("vertical")}):this.verticalLine.style.visibility="hidden"}getDelta(n){const e=this.context.graph.getZoom();return Yh([n.dx,n.dy],e)}bindEvents(){return XP(this,void 0,void 0,function*(){const{graph:n}=this.context;n.on(eh.DRAG_START,this.onDragStart),n.on(eh.DRAG,this.onDrag),n.on(eh.DRAG_END,this.onDragEnd)})}unbindEvents(){const{graph:n}=this.context;n.off(eh.DRAG_START,this.onDragStart),n.off(eh.DRAG,this.onDrag),n.off(eh.DRAG_END,this.onDragEnd)}destroyElements(){var n,e;(n=this.horizontalLine)===null||n===void 0||n.destroy(),(e=this.verticalLine)===null||e===void 0||e.destroy()}destroy(){this.destroyElements(),this.unbindEvents(),super.destroy()}}uw.defaultOptions={tolerance:5,offset:20,autoSnap:!0,shape:"key",verticalLineStyle:{stroke:"#1783FF"},horizontalLineStyle:{stroke:"#1783FF"},filter:()=>!0};const rc=(r,n)=>Math.abs(r-n),P$=(r,n)=>typeof n=="function"?n(r):r.getShape(n);var N$=null,Xye=null;function cw(r){return r instanceof Date?r:new Date(r)}function Kye(r){for(var n=__read(r,2),e=n[0],t=n[1],i=N$.indexOf(e),a=N$.indexOf(t),s="",o=i;o<=a;o+=1)if(s+=Xye[o],o<a){var l="-";o===2?l=" ":o>2&&(l=":"),s+=l}return s}function Ec(r,n){var e={YYYY:r.getFullYear(),MM:r.getMonth()+1,DD:r.getDate(),HH:r.getHours(),mm:r.getMinutes(),ss:r.getSeconds()},t=n;return Object.keys(e).forEach(function(i){var a=e[i];t=t.replace(i,i==="YYYY"?"".concat(a):"".concat(a).padStart(2,"0"))}),t}function qAe(r,n){return cw(r).getTime()-cw(n).getTime()}function eLe(r,n){var e=__read([cw(r),cw(n)],2),t=e[0],i=e[1];return t.getFullYear()!==i.getFullYear()?"year":t.getMonth()!==i.getMonth()?"month":t.getDay()!==i.getDay()?"day":t.getHours()!==i.getHours()?"hour":t.getMinutes()!==i.getMinutes()?"minute":"second"}function tLe(r,n){var e=new Date(r),t={year:function(i){i.setMonth(0),i.setHours(0,0,0,0)},month:function(i){i.setDate(1),i.setHours(0,0,0,0)},day:function(i){return i.setHours(0,0,0,0)},hour:function(i){return i.setMinutes(0,0,0)},minute:function(i){return i.setSeconds(0,0)},second:function(i){return i.setMilliseconds(0)}};return t[n](e),Ec(e,Kye(["year",n]))}function Jye(r,n){if(r.length<=n)return r;for(var e=Math.floor(r.length/n),t=[],i=0;i<r.length;i+=e)t.push(r[i]);return t}var JP={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 $k({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:[]},nLe=(0,xd.Z)({},JP,{style:{type:"arc"}}),rLe=(0,xd.Z)({},JP,{style:{}}),ms=yf({mainGroup:"main-group",gridGroup:"grid-group",grid:"grid",lineGroup:"line-group",line:"line",tickGroup:"tick-group",tick:"tick",tickItem:"tick-item",labelGroup:"label-group",label:"label",labelItem:"label-item",titleGroup:"title-group",title:"title",lineFirst:"line-first",lineSecond:"line-second"},"axis");function tg(r,n){return[r[0]*n,r[1]*n]}function bx(r,n){return[r[0]+n[0],r[1]+n[1]]}function QP(r,n){return[r[0]-n[0],r[1]-n[1]]}function _m(r,n){return[Math.min(r[0],n[0]),Math.min(r[1],n[1])]}function mm(r,n){return[Math.max(r[0],n[0]),Math.max(r[1],n[1])]}function kx(r,n){return Math.sqrt(Math.pow(r[0]-n[0],2)+Math.pow(r[1]-n[1],2))}function O$(r){if(r[0]===0&&r[1]===0)return[0,0];var n=Math.sqrt(Math.pow(r[0],2)+Math.pow(r[1],2));return[r[0]/n,r[1]/n]}function iLe(r,n,e){var t=__read(r,2),i=t[0],a=t[1],s=__read(n,2),o=s[0],l=s[1],u=i-o,c=a-l,d=Math.sin(e),h=Math.cos(e);return[u*h-c*d+o,u*d+c*h+l]}function Qye(r,n){return n?[r[1],-r[0]]:[-r[1],r[0]]}function o0(r){return r*Math.PI/180}function R$(r){return Number((r*180/Math.PI).toPrecision(5))}function dw(r,n){return r.style.opacity||(r.style.opacity=1),xf(r,{opacity:0},n)}var qye=["$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 exe(r){return qye.includes(r)}function A$(r){var n={};for(var e in r)exe(e)&&(n[e]=r[e]);return n}var l0=yf({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function L$(r){return r.reduce(function(n,e,t){return n.push((0,Pe.ev)([t===0?"M":"L"],(0,Pe.CR)(e),!1)),n},[])}function txe(r,n,e){var t=n.connect,i=t===void 0?"line":t,a=n.center;if(i==="line")return L$(r);if(!a)return[];var s=kx(r[0],a),o=e?0:1;return r.reduce(function(l,u,c){return c===0?l.push((0,Pe.ev)(["M"],(0,Pe.CR)(u),!1)):l.push((0,Pe.ev)(["A",s,s,0,0,o],(0,Pe.CR)(u),!1)),l},[])}function qP(r,n,e){return n.type==="surround"?txe(r,n,e):L$(r)}function nxe(r,n,e){var t=e.type,i=e.connect,a=e.center,s=e.closed,o=s?[["Z"]]:[],l=(0,Pe.CR)([qP(r,e),qP(n.slice().reverse(),e,!0)],2),u=l[0],c=l[1],d=(0,Pe.CR)([r[0],n.slice(-1)[0]],2),h=d[0],f=d[1],v=function(w,T){return[u,w,c,T,o].flat()};if(i==="line"||t==="surround")return v([(0,Pe.ev)(["L"],(0,Pe.CR)(f),!1)],[(0,Pe.ev)(["L"],(0,Pe.CR)(h),!1)]);if(!a)throw new Error("Arc grid need to specified center");var g=(0,Pe.CR)([kx(f,a),kx(h,a)],2),m=g[0],y=g[1];return v([(0,Pe.ev)(["A",m,m,0,0,1],(0,Pe.CR)(f),!1),(0,Pe.ev)(["L"],(0,Pe.CR)(f),!1)],[(0,Pe.ev)(["A",y,y,0,0,0],(0,Pe.CR)(h),!1),(0,Pe.ev)(["L"],(0,Pe.CR)(h),!1)])}function rxe(r,n,e,t){var i=e.animate,a=e.isBillboard,s=n.map(function(o,l){return{id:o.id||"grid-line-".concat(l),d:qP(o.points,e)}});return r.selectAll(l0.line.class).data(s,function(o){return o.id}).join(function(o){return o.append("path").each(function(l,u){var c=_h(A$((0,Pe.pi)({d:l.d},t)),[l,u,s]);this.attr((0,Pe.pi)({class:l0.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4],isBillboard:a},c))})},function(o){return o.transition(function(l,u){var c=_h(A$((0,Pe.pi)({d:l.d},t)),[l,u,s]);return xf(this,c,i.update)})},function(o){return o.transition(function(){var l=this,u=dw(this,i.exit);return s0(u,function(){return l.remove()}),u})}).transitions()}function ixe(r,n,e){var t=e.animate,i=e.connect,a=e.areaFill;if(n.length<2||!a||!i)return[];for(var s=Array.isArray(a)?a:[a,"transparent"],o=function(v){return s[v%s.length]},l=[],u=0;u<n.length-1;u++){var c=(0,Pe.CR)([n[u].points,n[u+1].points],2),d=c[0],h=c[1],f=nxe(d,h,e);l.push({d:f,fill:o(u)})}return r.selectAll(l0.region.class).data(l,function(v,g){return g}).join(function(v){return v.append("path").each(function(g,m){var y=_h(g,[g,m,l]);this.attr(y)}).attr("className",l0.region.name)},function(v){return v.transition(function(g,m){var y=_h(g,[g,m,l]);return xf(this,y,t.update)})},function(v){return v.transition(function(){var g=this,m=dw(this,t.exit);return s0(m,function(){return g.remove()}),m})}).transitions()}function axe(r){var n=r.data,e=n===void 0?[]:n,t=r.closed;return t?e.map(function(i){var a=i.points,s=(0,Pe.CR)(a,1),o=s[0];return(0,Pe.pi)((0,Pe.pi)({},i),{points:(0,Pe.ev)((0,Pe.ev)([],(0,Pe.CR)(a),!1),[o],!1)})}):e}var sxe=function(r){(0,Pe.ZT)(n,r);function n(){return r!==null&&r.apply(this,arguments)||this}return n.prototype.render=function(e,t){var i=e.type,a=e.center,s=e.areaFill,o=e.closed,l=(0,Pe._T)(e,["type","center","areaFill","closed"]),u=axe(e),c=Dr(t).maybeAppendByClassName(l0.lineGroup,"g"),d=Dr(t).maybeAppendByClassName(l0.regionGroup,"g"),h=rxe(c,u,e,l),f=ixe(d,u,e);return(0,Pe.ev)((0,Pe.ev)([],(0,Pe.CR)(h),!1),(0,Pe.CR)(f),!1)},n}(ml),oxe=function(r,n){return function(e){return r*(1-e)+n*e}};function lxe(r,n){var e=n?n.length:0,t=r?Math.min(e,r.length):0;return function(i){var a=new Array(t),s=new Array(e),o=0;for(o=0;o<t;++o)a[o]=eN(r[o],n[o]);for(;o<e;++o)s[o]=n[o];for(o=0;o<t;++o)s[o]=a[o](i);return s}}function uxe(r,n){r===void 0&&(r={}),n===void 0&&(n={});var e={},t={};return Object.entries(n).forEach(function(i){var a=(0,Pe.CR)(i,2),s=a[0],o=a[1];s in r?e[s]=eN(r[s],o):t[s]=o}),function(i){return Object.entries(e).forEach(function(a){var s=(0,Pe.CR)(a,2),o=s[0],l=s[1];return t[o]=l(i)}),t}}function eN(r,n){return typeof r=="number"&&typeof n=="number"?oxe(r,n):Array.isArray(r)&&Array.isArray(n)?lxe(r,n):typeof r=="object"&&typeof n=="object"?uxe(r,n):function(e){return r}}function cxe(r,n,e,t){if(!t)return r.attr("__keyframe_data__",e),null;var i=t.duration,a=i===void 0?0:i,s=eN(n,e),o=Math.ceil(+a/16),l=new Array(o).fill(0).map(function(u,c,d){return{__keyframe_data__:s(c/(d.length-1))}});return r.animate(l,(0,Pe.pi)({fill:"both"},t))}function I$(r,n){var e={},t=Array.isArray(n)?n:[n];for(var i in r)t.includes(i)||(e[i]=r[i]);return e}function D$(r,n){return Object.fromEntries(Object.entries(r).map(function(e){var t=(0,Pe.CR)(e,2),i=t[0],a=t[1];return[i,_h(a,n)]}))}function aLe(r){if(r.type==="linear"){var n=r.startPos,e=r.endPos;return __spreadArray(__spreadArray([],__read(n),!1),__read(e),!1)}var t=r.startAngle,i=r.endAngle,a=r.center,s=r.radius;return __spreadArray(__spreadArray([t,i],__read(a),!1),[s],!1)}function tN(r,n){return n&&(0,Be.Z)(n)?r.filter(n):r}function F$(r,n){var e=n.startAngle,t=n.endAngle;return(t-e)*r+e}function hw(r,n){if(n.type==="linear"){var e=(0,Pe.CR)(n.startPos,2),t=e[0],i=e[1],a=(0,Pe.CR)(n.endPos,2),s=a[0],o=a[1],l=(0,Pe.CR)([s-t,o-i],2),u=l[0],c=l[1];return O$([u,c])}var d=o0(F$(r,n));return[-Math.sin(d),Math.cos(d)]}function nN(r,n,e){var t=hw(r,e);return Qye(t,n!=="positive")}function wx(r,n){return nN(r,n.labelDirection,n)}function dxe(r,n){var e=(0,Pe.CR)(n.startPos,2),t=e[0],i=e[1],a=(0,Pe.CR)(n.endPos,2),s=a[0],o=a[1],l=(0,Pe.CR)([s-t,o-i],2),u=l[0],c=l[1];return[t+u*r,i+c*r]}function hxe(r,n){var e=n.radius,t=(0,Pe.CR)(n.center,2),i=t[0],a=t[1],s=o0(F$(r,n));return[i+e*Math.cos(s),a+e*Math.sin(s)]}function fw(r,n){return n.type==="linear"?dxe(r,n):hxe(r,n)}function B$(r){return hw(0,r)[1]===0}function $$(r){return hw(0,r)[0]===0}function G$(r,n){return n-r===360}function z$(r,n,e,t,i){var a=n-r,s=(0,Pe.CR)([i,i],2),o=s[0],l=s[1],u=(0,Pe.CR)([o0(r),o0(n)],2),c=u[0],d=u[1],h=function(B){return[e+i*Math.cos(B),t+i*Math.sin(B)]},f=(0,Pe.CR)(h(c),2),v=f[0],g=f[1],m=(0,Pe.CR)(h(d),2),y=m[0],w=m[1];if(G$(r,n)){var T=(d+c)/2,G=(0,Pe.CR)(h(T),2),x=G[0],_=G[1];return[["M",v,g],["A",o,l,0,1,0,x,_],["A",o,l,0,1,0,y,w]]}var p=a>180?1:0,b=r>n?0:1,R=!1;return R?"M".concat(e,",").concat(t,",L").concat(v,",").concat(g,",A").concat(o,",").concat(l,",0,").concat(p,",").concat(b,",").concat(y,",").concat(w,",L").concat(e,",").concat(t):"M".concat(v,",").concat(g,",A").concat(o,",").concat(l,",0,").concat(p,",").concat(b,",").concat(y,",").concat(w)}function fxe(r){var n=r.attributes,e=n.startAngle,t=n.endAngle,i=n.center,a=n.radius;return(0,Pe.ev)((0,Pe.ev)([e,t],(0,Pe.CR)(i),!1),[a],!1)}function vxe(r,n,e,t){var i=n.startAngle,a=n.endAngle,s=n.center,o=n.radius;return r.selectAll(ms.line.class).data([{d:z$.apply(void 0,(0,Pe.ev)((0,Pe.ev)([i,a],(0,Pe.CR)(s),!1),[o],!1))}],function(l,u){return u}).join(function(l){return l.append("path").attr("className",ms.line.name).styles(n).styles({d:function(u){return u.d}})},function(l){return l.transition(function(){var u=this,c=cxe(this,fxe(this),(0,Pe.ev)((0,Pe.ev)([i,a],(0,Pe.CR)(s),!1),[o],!1),t.update);if(c){var d=function(){var h=(0,nc.Z)(u.attributes,"__keyframe_data__");u.style.d=z$.apply(void 0,(0,Pe.ev)([],(0,Pe.CR)(h),!1))};c.onframe=d,c.onfinish=d}return c}).styles(n)},function(l){return l.remove()}).styles(e).transitions()}function gxe(r,n){var e=n.truncRange,t=n.truncShape,i=n.lineExtension}function _xe(r,n,e){e===void 0&&(e=[0,0]);var t=(0,Pe.CR)([r,n,e],3),i=(0,Pe.CR)(t[0],2),a=i[0],s=i[1],o=(0,Pe.CR)(t[1],2),l=o[0],u=o[1],c=(0,Pe.CR)(t[2],2),d=c[0],h=c[1],f=(0,Pe.CR)([l-a,u-s],2),v=f[0],g=f[1],m=Math.sqrt(Math.pow(v,2)+Math.pow(g,2)),y=(0,Pe.CR)([-d/m,h/m],2),w=y[0],T=y[1];return[w*v,w*g,T*v,T*g]}function V$(r){var n=(0,Pe.CR)(r,2),e=(0,Pe.CR)(n[0],2),t=e[0],i=e[1],a=(0,Pe.CR)(n[1],2),s=a[0],o=a[1];return{x1:t,y1:i,x2:s,y2:o}}function mxe(r,n,e,t){var i=n.showTrunc,a=n.startPos,s=n.endPos,o=n.truncRange,l=n.lineExtension,u=(0,Pe.CR)([a,s],2),c=(0,Pe.CR)(u[0],2),d=c[0],h=c[1],f=(0,Pe.CR)(u[1],2),v=f[0],g=f[1],m=(0,Pe.CR)(l?_xe(a,s,l):new Array(4).fill(0),4),y=m[0],w=m[1],T=m[2],G=m[3],x=function(ee){return r.selectAll(ms.line.class).data(ee,function(he,ut){return ut}).join(function(he){return he.append("line").attr("className",function(ut){return"".concat(ms.line.name," ").concat(ut.className)}).styles(e).transition(function(ut){return xf(this,V$(ut.line),!1)})},function(he){return he.styles(e).transition(function(ut){var ct=ut.line;return xf(this,V$(ct),t.update)})},function(he){return he.remove()}).transitions()};if(!i||!o)return x([{line:[[d+y,h+w],[v+T,g+G]],className:ms.line.name}]);var _=(0,Pe.CR)(o,2),p=_[0],b=_[1],R=v-d,B=g-h,j=(0,Pe.CR)([d+R*p,h+B*p],2),Z=j[0],te=j[1],le=(0,Pe.CR)([d+R*b,h+B*b],2),ue=le[0],se=le[1],V=x([{line:[[d+y,h+w],[Z,te]],className:ms.lineFirst.name},{line:[[ue,se],[v+T,g+G]],className:ms.lineSecond.name}]);return gxe(r,n),V}function pxe(r,n,e,t){var i=e.showArrow,a=e.showTrunc,s=e.lineArrow,o=e.lineArrowOffset,l=e.lineArrowSize,u;if(n==="arc"?u=r.select(ms.line.class):a?u=r.select(ms.lineSecond.class):u=r.select(ms.line.class),!i||!s||e.type==="arc"&&G$(e.startAngle,e.endAngle)){var c=u.node();c&&(c.style.markerEnd=void 0);return}var d=eg(s);d.attr(t),HP(d,l,!0),u.style("markerEnd",d).style("markerEndOffset",-o)}function yxe(r,n,e){var t=n.type,i,a=Zi(n,"line");return t==="linear"?i=mxe(r,n,I$(a,"arrow"),e):i=vxe(r,n,I$(a,"arrow"),e),pxe(r,t,n,a),i}function xxe(r,n){return nN(r,n.gridDirection,n)}function U$(r){var n=r.type,e=r.gridCenter;return n==="linear"?e:e||r.center}function Exe(r,n){var e=n.gridLength;return r.map(function(t,i){var a=t.value,s=(0,Pe.CR)(fw(a,n),2),o=s[0],l=s[1],u=(0,Pe.CR)(tg(xxe(a,n),e),2),c=u[0],d=u[1];return{id:i,points:[[o,l],[o+c,l+d]]}})}function bxe(r,n){var e=n.gridControlAngles,t=U$(n);if(!t)throw new Error("grid center is not provide");if(r.length<2)throw new Error("Invalid grid data");if(!e||e.length===0)throw new Error("Invalid gridControlAngles");var i=(0,Pe.CR)(t,2),a=i[0],s=i[1];return r.map(function(o,l){var u=o.value,c=(0,Pe.CR)(fw(u,n),2),d=c[0],h=c[1],f=(0,Pe.CR)([d-a,h-s],2),v=f[0],g=f[1],m=[];return e.forEach(function(y){var w=o0(y),T=(0,Pe.CR)([Math.cos(w),Math.sin(w)],2),G=T[0],x=T[1],_=v*G-g*x+a,p=v*x+g*G+s;m.push([_,p])}),{points:m,id:l}})}function kxe(r,n,e,t){var i=Zi(e,"grid"),a=i.type,s=i.areaFill,o=U$(e),l=tN(n,e.gridFilter),u=a==="segment"?Exe(l,e):bxe(l,e),c=(0,Pe.pi)((0,Pe.pi)({},i),{center:o,areaFill:(0,Be.Z)(s)?l.map(function(d,h){return _h(s,[d,h,l])}):s,animate:t,data:u});return r.selectAll(ms.grid.class).data([1]).join(function(d){return d.append(function(){return new sxe({style:c})}).attr("className",ms.grid.name)},function(d){return d.transition(function(){return this.update(c)})},function(d){return d.remove()}).transitions()}function Bu(r,n,e,t,i){return t===void 0&&(t=!0),i===void 0&&(i=!1),t&&r===n||i&&r===e?!0:r>n&&r<e}function wxe(r,n,e,t){e===void 0&&(e=2),t===void 0&&(t="top"),S$(r,{wordWrap:!0,wordWrapWidth:n,maxLines:e,textBaseline:t})}function Sxe(r,n,e){var t=r.getBBox(),i=t.width,a=t.height,s=(0,Pe.CR)([n,e].map(function(u,c){var d;return u.includes("%")?parseFloat(((d=u.match(/[+-]?([0-9]*[.])?[0-9]+/))===null||d===void 0?void 0:d[0])||"0")/100*(c===0?i:a):u}),2),o=s[0],l=s[1];return[o,l]}function j$(r,n){if(n)try{var e=/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,t=n.replace(e,function(i,a,s){return"translate(".concat(Sxe(r,a,s),")")});r.attr("transform",t)}catch(i){}}var H$=function(r){return r!==void 0&&r!=null&&!Number.isNaN(r)},rN=function(){function r(n,e,t,i){this.set(n,e,t,i)}return Object.defineProperty(r.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),r.prototype.rotatedPoints=function(n,e,t){var i=this,a=i.x1,s=i.y1,o=i.x2,l=i.y2,u=Math.cos(n),c=Math.sin(n),d=e-e*u+t*c,h=t-e*c-t*u,f=[[u*a-c*l+d,c*a+u*l+h],[u*o-c*l+d,c*o+u*l+h],[u*a-c*s+d,c*a+u*s+h],[u*o-c*s+d,c*o+u*s+h]];return f},r.prototype.set=function(n,e,t,i){return t<n?(this.x2=n,this.x1=t):(this.x1=n,this.x2=t),i<e?(this.y2=e,this.y1=i):(this.y1=e,this.y2=i),this},r.prototype.defined=function(n){return this[n]!==Number.MAX_VALUE&&this[n]!==-Number.MAX_VALUE},r}();function vw(r,n){var e=r.getEulerAngles()||0;r.setEulerAngles(0);var t=r.getBounds(),i=(0,Pe.CR)(t.min,2),a=i[0],s=i[1],o=(0,Pe.CR)(t.max,2),l=o[0],u=o[1],c=r.getBBox(),d=c.width,h=c.height,f=h,v=0,g=0,m=a,y=s,w=w$(r);if(w){f-=1.5;var T=w.style.textAlign,G=w.style.textBaseline;T==="center"?m=(a+l)/2:(T==="right"||T==="end")&&(m=l),G==="middle"?y=(s+u)/2:G==="bottom"&&(y=u)}var x=(0,Pe.CR)(Gl(n),4),_=x[0],p=_===void 0?0:_,b=x[1],R=b===void 0?0:b,B=x[2],j=B===void 0?p:B,Z=x[3],te=Z===void 0?R:Z,le=new rN((v+=a)-te,(g+=s)-p,v+d+R,g+f+j);return r.setEulerAngles(e),le.rotatedPoints(o0(e),m,y)}function Sx(r,n){return n[0]<=Math.max(r[0][0],r[1][0])&&n[0]<=Math.min(r[0][0],r[1][0])&&n[1]<=Math.max(r[0][1],r[1][1])&&n[1]<=Math.min(r[0][1],r[1][1])}function Tx(r,n,e){var t=(n[1]-r[1])*(e[0]-n[0])-(n[0]-r[0])*(e[1]-n[1]);return t===0?0:t<0?2:1}function Txe(r,n){var e=Tx(r[0],r[1],n[0]),t=Tx(r[0],r[1],n[1]),i=Tx(n[0],n[1],r[0]),a=Tx(n[0],n[1],r[1]);return!!(e!==t&&i!==a||e===0&&Sx(r,n[0])||t===0&&Sx(r,n[1])||i===0&&Sx(n,r[0])||a===0&&Sx(n,r[1]))}function Cxe(r,n){var e=r.length;if(e<3)return!1;var t=[n,[9999,n[1]]],i=0,a=0;do{var s=[r[a],r[(a+1)%e]];if(Txe(s,t)){if(Tx(s[0],n,s[1])===0)return Sx(s,n);i++}a=(a+1)%e}while(a!==0);return!!(i&1)}function Mxe(r,n){return n.every(function(e){return Cxe(r,e)})}function Pxe(r,n,e){var t=r.x1,i=r.x2,a=r.y1,s=r.y2,o=[[t,a],[i,a],[i,s],[t,s]],l=vw(n,e);return Mxe(o,l)}function W$(r,n){var e=(0,Pe.CR)(r,4),t=e[0],i=e[1],a=e[2],s=e[3],o=(0,Pe.CR)(n,4),l=o[0],u=o[1],c=o[2],d=o[3],h=a-t,f=s-i,v=c-l,g=d-u,m=h*g-v*f;if(m===0)return!1;var y=m>0,w=t-l,T=i-u,G=h*T-f*w;if(G<0===y)return!1;var x=v*T-g*w;return!(x<0===y||G>m===y||x>m===y)}function Y$(r,n){var e=[[r[0],r[1],r[2],r[3]],[r[2],r[3],r[4],r[5]],[r[4],r[5],r[6],r[7]],[r[6],r[7],r[0],r[1]]];return e.some(function(t){return W$(n,t)})}var sLe={lineToLine:W$,intersectBoxLine:Y$,getBounds:vw};function Nxe(r,n,e){var t,i,a=vw(r,e).flat(1),s=vw(n,e).flat(1),o=[[a[0],a[1],a[2],a[3]],[a[0],a[1],a[4],a[5]],[a[4],a[5],a[6],a[7]],[a[2],a[3],a[6],a[7]]];try{for(var l=(0,Pe.XA)(o),u=l.next();!u.done;u=l.next()){var c=u.value;if(Y$(s,c))return!0}}catch(d){t={error:d}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(t)throw t.error}}return!1}function Oxe(r,n){var e=r.type,t=r.labelDirection,i=r.crossSize;if(!i)return!1;if(e==="arc"){var a=r.center,s=r.radius,o=(0,Pe.CR)(a,2),l=o[0],u=o[1],c=t==="negative"?0:i,d=-s-c,h=s+c,f=(0,Pe.CR)(Gl(n),4),v=f[0],g=f[1],m=f[2],y=f[3];return new rN(l+d-y,u+d-v,l+h+g,u+h+m)}var w=(0,Pe.CR)(r.startPos,2),T=w[0],G=w[1],x=(0,Pe.CR)(r.endPos,2),_=x[0],p=x[1],b=(0,Pe.CR)($$(r)?[-n,0,n,0]:[0,n,0,-n],4),R=b[0],B=b[1],j=b[2],Z=b[3],te=wx(0,r),le=tg(te,i),ue=new rN(T,G,_,p);return ue.x1+=Z,ue.y1+=R,ue.x2+=B+le[0],ue.y2+=j+le[1],ue}function gw(r,n,e){var t,i,a=n.crossPadding,s=new Set,o=null,l=Oxe(n,a),u=function(v){return l?Pxe(l,v):!0},c=function(v,g){return!v||!v.firstChild?!0:!Nxe(v.firstChild,g.firstChild,Gl(e))};try{for(var d=(0,Pe.XA)(r),h=d.next();!h.done;h=d.next()){var f=h.value;u(f)?!o||c(o,f)?o=f:(s.add(o),s.add(f)):s.add(f)}}catch(v){t={error:v}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(t)throw t.error}}return Array.from(s)}function iN(r,n){return n===void 0&&(n={}),(0,xe.Z)(r)?0:typeof r=="number"?r:Math.floor(Vye(r,n))}function Rxe(r,n,e,t){if(!(r.length<=1)){var i=n.suffix,a=i===void 0?"...":i,s=n.minLength,o=n.maxLength,l=o===void 0?1/0:o,u=n.step,c=u===void 0?" ":u,d=n.margin,h=d===void 0?[0,0,0,0]:d,f=k$(t.getTextShape(r[0])),v=iN(c,f),g=s?iN(s,f):v,m=iN(l,f);((0,xe.Z)(m)||m===1/0)&&(m=Math.max.apply(null,r.map(function(le){return le.getBBox().width})));for(var y=r.slice(),w=(0,Pe.CR)(h,4),T=w[0],G=T===void 0?0:T,x=w[1],_=x===void 0?0:x,p=w[2],b=p===void 0?G:p,R=w[3],B=R===void 0?_:R,j=function(le){if(y.forEach(function(ue){t.ellipsis(t.getTextShape(ue),le,a)}),y=gw(r,e,h),y.length<1)return{value:void 0}},Z=m;Z>g+v;Z-=v){var te=j(Z);if(typeof te=="object")return te.value}}}var Axe={parity:function(r,n){var e=n.seq,t=e===void 0?2:e;return r.filter(function(i,a){return a%t?(pf(i),!1):!0})}},Lxe=function(r){return r.filter(H$)};function Ixe(r,n,e,t){var i=r.length,a=n.keepHeader,s=n.keepTail;if(!(i<=1||i===2&&a&&s)){var o=Axe.parity,l=function(T){return T.forEach(t.show),T},u=2,c=r.slice(),d=r.slice(),h=Math.min.apply(Math,(0,Pe.ev)([1],(0,Pe.CR)(r.map(function(T){return T.getBBox().width})),!1));if(e.type==="linear"&&(B$(e)||$$(e))){var f=b$(r[0]).left,v=b$(r[i-1]).right,g=Math.abs(v-f)||1;u=Math.max(Math.floor(i*h/g),u)}var m,y;for(a&&(m=c.splice(0,1)[0]),s&&(y=c.splice(-1,1)[0],c.reverse()),l(c);u<r.length&&gw(Lxe(y?(0,Pe.ev)((0,Pe.ev)([y],(0,Pe.CR)(d),!1),[m],!1):(0,Pe.ev)([m],(0,Pe.CR)(d),!1)),e,n==null?void 0:n.margin).length;){if(y&&!m&&u%2===0){var w=c.splice(0,1);w.forEach(t.hide)}else if(y&&m){var w=c.splice(0,1);w.forEach(t.hide)}d=o(l(c),{seq:u}),u++}}}function Dxe(r,n,e,t){var i,a,s=n.optionalAngles,o=s===void 0?[0,45,90]:s,l=n.margin,u=n.recoverWhenFailed,c=u===void 0?!0:u,d=r.map(function(y){return y.getLocalEulerAngles()}),h=function(){return gw(r,e,l).length<1},f=function(y){return r.forEach(function(w,T){var G=Array.isArray(y)?y[T]:y;t.rotate(w,+G)})};try{for(var v=(0,Pe.XA)(o),g=v.next();!g.done;g=v.next()){var m=g.value;if(f(m),h())return}}catch(y){i={error:y}}finally{try{g&&!g.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}c&&f(d)}function Fxe(r){var n=r.type,e=r.labelDirection;return n==="linear"&&B$(r)?e==="negative"?"bottom":"top":"middle"}function Bxe(r,n,e,t){var i=n.wordWrapWidth,a=i===void 0?50:i,s=n.maxLines,o=s===void 0?3:s,l=n.recoverWhenFailed,u=l===void 0?!0:l,c=n.margin,d=c===void 0?[0,0,0,0]:c,h=r.map(function(w){return w.attr("maxLines")||1}),f=Math.min.apply(Math,(0,Pe.ev)([],(0,Pe.CR)(h),!1)),v=function(){return gw(r,e,d).length<1},g=Fxe(e),m=function(w){return r.forEach(function(T,G){var x=Array.isArray(w)?w[G]:w;t.wrap(T,a,x,g)})};if(!(f>o)){for(var y=f;y<=o;y++)if(m(y),v())return;u&&m(h)}}var $xe=new Map([["hide",Ixe],["rotate",Dxe],["ellipsis",Rxe],["wrap",Bxe]]);function Gxe(r,n,e){return n.labelOverlap.length<1?!1:e==="hide"?!K0e(r[0]):e==="rotate"?!r.some(function(t){var i;return!!(!((i=t.attr("transform"))===null||i===void 0)&&i.includes("rotate"))}):e==="ellipsis"||e==="wrap"?r.filter(function(t){return t.querySelector("text")}).length>1:!0}function zxe(r,n,e){var t=n.labelOverlap,i=t===void 0?[]:t;i.length&&i.forEach(function(a){var s=a.type,o=$xe.get(s);Gxe(r,n,s)&&(o==null||o(r,a,n,e))})}function Vxe(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var e=function(t){return t==="positive"?-1:1};return r.reduce(function(t,i){return t*e(i)},1)}function Z$(r){for(var n=r;n<0;)n+=360;return Math.round(n%360)}function aN(r,n){var e=(0,Pe.CR)(r,2),t=e[0],i=e[1],a=(0,Pe.CR)(n,2),s=a[0],o=a[1],l=(0,Pe.CR)([t*s+i*o,t*o-i*s],2),u=l[0],c=l[1];return Math.atan2(c,u)}function Uxe(r){var n=(r+360)%180;return Bu(n,-90,90)||(n+=180),n}function jxe(r,n,e){var t,i=e.labelAlign,a=(t=n.style.transform)===null||t===void 0?void 0:t.includes("rotate");if(a)return n.getLocalEulerAngles();var s=0,o=wx(r.value,e),l=hw(r.value,e);return i==="horizontal"?0:(i==="perpendicular"?s=aN([1,0],o):s=aN([l[0]<0?-1:1,0],l),Uxe(R$(s)))}function X$(r,n,e){var t=e.type,i=e.labelAlign,a=wx(r,e),s=Z$(n),o=Z$(R$(aN([1,0],a))),l="center",u="middle";return t==="linear"?[90,270].includes(o)&&s===0?(l="center",u=a[1]===1?"top":"bottom"):!(o%180)&&[90,270].includes(s)?l="center":o===0?(Bu(s,0,90,!1,!0)||Bu(s,0,90)||Bu(s,270,360))&&(l="start"):o===90?Bu(s,0,90,!1,!0)?l="start":(Bu(s,90,180)||Bu(s,270,360))&&(l="end"):o===270?Bu(s,0,90,!1,!0)?l="end":(Bu(s,90,180)||Bu(s,270,360))&&(l="start"):o===180&&(s===90?l="start":(Bu(s,0,90)||Bu(s,270,360))&&(l="end")):i==="parallel"?Bu(o,0,180,!0)?u="top":u="bottom":i==="horizontal"?Bu(o,90,270,!1)?l="end":(Bu(o,270,360,!1)||Bu(o,0,90))&&(l="start"):i==="perpendicular"&&(Bu(o,90,270)?l="end":l="start"),{textAlign:l,textBaseline:u}}function Hxe(r,n,e){n.setLocalEulerAngles(r);var t=n.__data__.value,i=X$(t,r,e),a=n.querySelector(ms.labelItem.class);a&&J$(a,i)}function K$(r,n,e){var t=e.showTick,i=e.tickLength,a=e.tickDirection,s=e.labelDirection,o=e.labelSpacing,l=n.indexOf(r),u=_h(o,[r,l,n]),c=(0,Pe.CR)([wx(r.value,e),Vxe(s,a)],2),d=c[0],h=c[1],f=h===1?_h(t?i:0,[r,l,n]):0,v=(0,Pe.CR)(bx(tg(d,u+f),fw(r.value,e)),2),g=v[0],m=v[1];return{x:g,y:m}}function Wxe(r,n,e,t){var i=t.labelFormatter,a=(0,Be.Z)(i)?function(){return eg(_h(i,[r,n,e,wx(r.value,t)]))}:function(){return eg(r.label||"")};return a}function J$(r,n){r.nodeName==="text"&&r.attr(n)}function Q$(r){zxe(this.node().childNodes,r,{hide:pf,show:yx,rotate:function(n,e){Hxe(+e,n,r)},ellipsis:function(n,e,t){n&&ZP(n,e||1/0,t)},wrap:function(n,e,t){n&&wxe(n,e,t)},getTextShape:function(n){return n.querySelector("text")}})}function q$(r,n,e,t,i){var a=e.indexOf(n),s=Dr(r).append(Wxe(n,a,e,i)).attr("className",ms.labelItem.name).node(),o=(0,Pe.CR)(qv(D$(t,[n,a,e])),2),l=o[0],u=o[1],c=u.transform,d=(0,Pe._T)(u,["transform"]);j$(s,c);var h=jxe(n,s,i);return s.getLocalEulerAngles()||s.setLocalEulerAngles(h),J$(s,(0,Pe.pi)((0,Pe.pi)({},X$(n.value,h,i)),l)),r.attr(d),s}function Yxe(r,n,e,t){var i=tN(n,e.labelFilter),a=Zi(e,"label");return r.selectAll(ms.label.class).data(i,function(s,o){return o}).join(function(s){return s.append("g").attr("className",ms.label.name).transition(function(o){q$(this,o,n,a,e);var l=K$(o,n,e),u=l.x,c=l.y;return this.style.transform="translate(".concat(u,", ").concat(c,")"),null}).call(function(){Q$.call(r,e)})},function(s){return s.transition(function(o){var l=this.querySelector(ms.labelItem.class),u=q$(this,o,n,a,e),c=fye(l,u,t.update),d=K$(o,n,e),h=d.x,f=d.y,v=xf(this,{transform:"translate(".concat(h,", ").concat(f,")")},t.update);return(0,Pe.ev)((0,Pe.ev)([],(0,Pe.CR)(c),!1),[v],!1)}).call(function(o){var l=(0,nc.Z)(o,"_transitions").flat().filter(H$);dye(l,function(){Q$.call(r,e)})})},function(s){return s.transition(function(){var o=this,l=dw(this.childNodes[0],t.exit);return s0(l,function(){return Dr(o).remove()}),l})}).transitions()}function eG(r,n){return nN(r,n.tickDirection,n)}function Zxe(r,n){var e=(0,Pe.CR)(r,2),t=e[0],i=e[1];return[[0,0],[t*n,i*n]]}function Xxe(r,n,e,t,i){var a=i.tickLength,s=(0,Pe.CR)(Zxe(t,_h(a,[r,n,e])),2),o=(0,Pe.CR)(s[0],2),l=o[0],u=o[1],c=(0,Pe.CR)(s[1],2),d=c[0],h=c[1];return{x1:l,x2:d,y1:u,y2:h}}function Kxe(r,n,e,t,i){var a=i.tickFormatter,s=eG(n.value,i),o="line";return(0,Be.Z)(a)&&(o=function(){return _h(a,[n,e,t,s])}),r.append(o).attr("className",ms.tickItem.name)}function Jxe(r,n,e,t,i,a,s){var o=eG(r.value,a),l=Xxe(r,n,e,o,a),u=l.x1,c=l.x2,d=l.y1,h=l.y2,f=(0,Pe.CR)(qv(D$(s,[r,n,e,o])),2),v=f[0],g=f[1];t.node().nodeName==="line"&&t.styles((0,Pe.pi)({x1:u,x2:c,y1:d,y2:h},v)),i.attr(g),t.styles(v)}function tG(r,n,e,t,i,a){var s=Kxe(Dr(this),r,n,e,t);Jxe(r,n,e,s,this,t,i);var o=(0,Pe.CR)(fw(r.value,t),2),l=o[0],u=o[1];return xf(this,{transform:"translate(".concat(l,", ").concat(u,")")},a)}function Qxe(r,n,e,t){var i=tN(n,e.tickFilter),a=Zi(e,"tick");return r.selectAll(ms.tick.class).data(i,function(s){return s.id||s.label}).join(function(s){return s.append("g").attr("className",ms.tick.name).transition(function(o,l){return tG.call(this,o,l,i,e,a,!1)})},function(s){return s.transition(function(o,l){return this.removeChildren(),tG.call(this,o,l,i,e,a,t.update)})},function(s){return s.transition(function(){var o=this,l=dw(this.childNodes[0],t.exit);return s0(l,function(){return o.remove()}),l})}).transitions()}function qxe(r,n,e){var t=e.titlePosition,i=t===void 0?"lb":t,a=e.titleSpacing,s=aw(i),o=r.node().getLocalBounds(),l=(0,Pe.CR)(o.min,2),u=l[0],c=l[1],d=(0,Pe.CR)(o.halfExtents,2),h=d[0],f=d[1],v=(0,Pe.CR)(n.node().getLocalBounds().halfExtents,2),g=v[0],m=v[1],y=(0,Pe.CR)([u+h,c+f],2),w=y[0],T=y[1],G=(0,Pe.CR)(Gl(a),4),x=G[0],_=G[1],p=G[2],b=G[3];if(["start","end"].includes(i)&&e.type==="linear"){var R=e.startPos,B=e.endPos,j=(0,Pe.CR)(i==="start"?[R,B]:[B,R],2),Z=j[0],te=j[1],le=O$([-te[0]+Z[0],-te[1]+Z[1]]),ue=(0,Pe.CR)(tg(le,x),2),se=ue[0],V=ue[1];return{x:Z[0]+se,y:Z[1]+V}}return s.includes("t")&&(T-=f+m+x),s.includes("r")&&(w+=h+g+_),s.includes("l")&&(w-=h+g+b),s.includes("b")&&(T+=f+m+p),{x:w,y:T}}function e1e(r,n,e){var t=r.getGeometryBounds().halfExtents,i=t[1]*2;if(n==="vertical"){if(e==="left")return"rotate(-90) translate(0, ".concat(i/2,")");if(e==="right")return"rotate(-90) translate(0, -".concat(i/2,")")}return""}function nG(r,n,e,t,i){var a=Zi(t,"title"),s=(0,Pe.CR)(qv(a),2),o=s[0],l=s[1],u=l.transform,c=l.transformOrigin,d=(0,Pe._T)(l,["transform","transformOrigin"]);n.styles(d);var h=u||e1e(r.node(),o.direction,o.position);r.styles((0,Pe.pi)((0,Pe.pi)({},o),{transformOrigin:c})),j$(r.node(),h);var f=qxe(Dr(e._offscreen||e.querySelector(ms.mainGroup.class)),n,t),v=f.x,g=f.y,m=xf(n.node(),{transform:"translate(".concat(v,", ").concat(g,")")},i);return m}function t1e(r,n,e,t){var i=e.titleText;return r.selectAll(ms.title.class).data([{title:i}].filter(function(a){return!!a.title}),function(a,s){return a.title}).join(function(a){return a.append(function(){return eg(i)}).attr("className",ms.title.name).transition(function(){return nG(Dr(this),r,n,e,t.enter)})},function(a){return a.transition(function(){return nG(Dr(this),r,n,e,t.update)})},function(a){return a.remove()}).transitions()}function rG(r,n,e,t){var i=r.showLine,a=r.showTick,s=r.showLabel,o=n.maybeAppendByClassName(ms.lineGroup,"g"),l=Nd(i,o,function(f){return yxe(f,r,t)})||[],u=n.maybeAppendByClassName(ms.tickGroup,"g"),c=Nd(a,u,function(f){return Qxe(f,e,r,t)})||[],d=n.maybeAppendByClassName(ms.labelGroup,"g"),h=Nd(s,d,function(f){return Yxe(f,e,r,t)})||[];return(0,Pe.ev)((0,Pe.ev)((0,Pe.ev)([],(0,Pe.CR)(l),!1),(0,Pe.CR)(c),!1),(0,Pe.CR)(h),!1).filter(function(f){return!!f})}var n1e=function(r){(0,Pe.ZT)(n,r);function n(e){return r.call(this,e,JP)||this}return n.prototype.render=function(e,t,i){var a=this,s=e.titleText,o=e.data,l=e.animate,u=e.showTitle,c=e.showGrid,d=e.dataThreshold,h=e.truncRange,f=Jye(o,d).filter(function(x){var _=x.value;return!(h&&_>h[0]&&_<h[1])}),v=v$(i===void 0?l:i),g=Dr(t).maybeAppendByClassName(ms.gridGroup,"g"),m=Nd(c,g,function(x){return kxe(x,f,e,v)})||[],y=Dr(t).maybeAppendByClassName(ms.mainGroup,"g");s&&(!this.initialized&&v.enter||this.initialized&&v.update)&&rG(e,Dr(this.offscreenGroup),f,v$(!1));var w=rG(e,Dr(y.node()),f,v),T=Dr(t).maybeAppendByClassName(ms.titleGroup,"g"),G=Nd(u,T,function(x){return t1e(x,a,e,v)})||[];return(0,Pe.ev)((0,Pe.ev)((0,Pe.ev)([],(0,Pe.CR)(m),!1),(0,Pe.CR)(w),!1),(0,Pe.CR)(G),!1).flat().filter(function(x){return!!x})},n}(ml);function iG(r){var n=r.canvas,e=r.touches,t=r.offsetX,i=r.offsetY;if(n){var a=n.x,s=n.y;return[a,s]}if(e){var o=e[0],l=o.clientX,u=o.clientY;return[l,u]}return t&&i?[t,i]:[0,0]}function sN(r,n){return+r.toPrecision(n)}function oLe(r){return r.toLocaleString()}function lLe(r){return r.toExponential()}function uLe(r,n){return n===void 0&&(n=0),Math.abs(r)<1e3?String(r):"".concat(sN(r/1e3,n).toLocaleString(),"K")}var cLe=function(r,n,e){return r<0&&Number.isFinite(r)?n:e},dLe=function(r,n,e){return r>0&&Number.isFinite(r)?n:e},hLe=function(r,n){return r*n},fLe=function(r,n){return r/2+(n||0)/2},oN=k(53715),r1e=k(15278),i1e=function(r){(0,Pe.ZT)(n,r);function n(e){var t=this,i=e.style,a=(0,Pe._T)(e,["style"]);return t=r.call(this,(0,xd.Z)({},{type:"column"},(0,Pe.pi)({style:i},a)))||this,t.columnsGroup=new xc({name:"columns"}),t.appendChild(t.columnsGroup),t.render(),t}return n.prototype.render=function(){var e=this.attributes,t=e.columns,i=e.x,a=e.y;this.columnsGroup.style.transform="translate(".concat(i,", ").concat(a,")"),Dr(this.columnsGroup).selectAll(".column").data(t.flat()).join(function(s){return s.append("rect").attr("className","column").each(function(o){this.attr(o)})},function(s){return s.each(function(o){this.attr(o)})},function(s){return s.remove()})},n.prototype.update=function(e){this.attr(bu({},this.attributes,e)),this.render()},n.prototype.clear=function(){this.removeChildren()},n}(al),a1e=function(r){(0,Pe.ZT)(n,r);function n(e){var t=this,i=e.style,a=(0,Pe._T)(e,["style"]);return t=r.call(this,(0,xd.Z)({},{type:"lines"},(0,Pe.pi)({style:i},a)))||this,t.linesGroup=t.appendChild(new xc),t.areasGroup=t.appendChild(new xc),t.render(),t}return n.prototype.render=function(){var e=this.attributes,t=e.lines,i=e.areas,a=e.x,s=e.y;this.style.transform="translate(".concat(a,", ").concat(s,")"),t&&this.renderLines(t),i&&this.renderAreas(i)},n.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},n.prototype.update=function(e){this.attr(bu({},this.attributes,e)),this.render()},n.prototype.renderLines=function(e){Dr(this.linesGroup).selectAll(".line").data(e).join(function(t){return t.append("path").attr("className","line").each(function(i){this.attr(i)})},function(t){return t.each(function(i){this.attr(i)})},function(t){return t.remove()})},n.prototype.renderAreas=function(e){Dr(this.linesGroup).selectAll(".area").data(e).join(function(t){return t.append("path").attr("className","area").each(function(i){this.attr(i)})},function(t){return t.each(function(i){this.style(i)})},function(t){return t.remove()})},n}(al);function s1e(r,n,e,t){var i,a=[],s=!!t,o,l,u=[1/0,1/0],c=[-1/0,-1/0],d,h,f;if(s){i=(0,Pe.CR)(t,2),u=i[0],c=i[1];for(var v=0,g=r.length;v<g;v+=1){var m=r[v];u=_m(u,m),c=mm(c,m)}}for(var v=0,y=r.length;v<y;v+=1){var m=r[v];if(v===0&&!e)f=m;else if(v===y-1&&!e)h=m,a.push(f),a.push(h);else{var w=[v?v-1:y-1,v-1][e?0:1];o=r[w],l=r[e?(v+1)%y:v+1];var T=[0,0];T=QP(l,o),T=tg(T,n);var G=kx(m,o),x=kx(m,l),_=G+x;_!==0&&(G/=_,x/=_);var p=tg(T,-G),b=tg(T,x);h=bx(m,p),d=bx(m,b),d=_m(d,mm(l,m)),d=mm(d,_m(l,m)),p=QP(d,m),p=tg(p,-G/x),h=bx(m,p),h=_m(h,mm(o,m)),h=mm(h,_m(o,m)),b=QP(m,h),b=tg(b,x/G),d=bx(m,b),s&&(h=mm(h,u),h=_m(h,c),d=mm(d,u),d=_m(d,c)),a.push(f),a.push(h),f=d}}return e&&a.push(a.shift()),a}function o1e(r,n,e){var t;n===void 0&&(n=!1),e===void 0&&(e=[[0,0],[1,1]]);for(var i=!!n,a=[],s=0,o=r.length;s<o;s+=2)a.push([r[s],r[s+1]]);for(var l=s1e(a,.4,i,e),u=a.length,c=[],d,h,f,s=0;s<u-1;s+=1)d=l[s*2],h=l[s*2+1],f=a[s+1],c.push(["C",d[0],d[1],h[0],h[1],f[0],f[1]]);return i&&(d=l[u],h=l[u+1],t=(0,Pe.CR)(a,1),f=t[0],c.push(["C",d[0],d[1],h[0],h[1],f[0],f[1]])),c}function l1e(r,n){var e,t=n.x,i=n.y,a=(0,Pe.CR)(i.getOptions().range||[0,0],2),s=a[0],o=a[1];return o>s&&(e=(0,Pe.CR)([s,o],2),o=e[0],s=e[1]),r.map(function(l){var u=l.map(function(c,d){return[t.map(d),(0,O.Z)(i.map(c),o,s)]});return u})}function Cx(r,n){n===void 0&&(n=!1);var e=n?r.length-1:0,t=r.map(function(i,a){return(0,Pe.ev)([a===e?"M":"L"],(0,Pe.CR)(i),!1)});return n?t.reverse():t}function _w(r,n){if(n===void 0&&(n=!1),r.length<=2)return Cx(r);for(var e=[],t=r.length,i=0;i<t;i+=1){var a=n?r[t-i-1]:r[i];(0,Ml.Z)(a,e.slice(-2))||e.push.apply(e,(0,Pe.ev)([],(0,Pe.CR)(a),!1))}var s=o1e(e,!1);return n?s.unshift((0,Pe.ev)(["M"],(0,Pe.CR)(r[t-1]),!1)):s.unshift((0,Pe.ev)(["M"],(0,Pe.CR)(r[0]),!1)),s}function lN(r,n,e){var t=(0,up.Z)(r);return t.push(["L",n,e],["L",0,e],["Z"]),t}function u1e(r,n,e,t){return r.map(function(i){return lN(n?_w(i):Cx(i),e,t)})}function c1e(r,n,e){for(var t=[],i=r.length-1;i>=0;i-=1){var a=r[i],s=Cx(a),o=void 0;if(i===0)o=lN(s,n,e);else{var l=r[i-1],u=Cx(l,!0);u[0][0]="L",o=(0,Pe.ev)((0,Pe.ev)((0,Pe.ev)([],(0,Pe.CR)(s),!1),(0,Pe.CR)(u),!1),[["Z"]],!1)}t.push(o)}return t}function d1e(r,n,e){for(var t=[],i=r.length-1;i>=0;i-=1){var a=r[i],s=_w(a),o=void 0;if(i===0)o=lN(s,n,e);else{var l=r[i-1],u=_w(l,!0),c=a[0];u[0][0]="L",o=(0,Pe.ev)((0,Pe.ev)((0,Pe.ev)([],(0,Pe.CR)(s),!1),(0,Pe.CR)(u),!1),[(0,Pe.ev)(["M"],(0,Pe.CR)(c),!1),["Z"]],!1)}t.push(o)}return t}var h1e=k(89372),f1e=k(93442);function aG(r){return r.length===0?[0,0]:[(0,ne.Z)((0,h1e.Z)(r,function(n){return(0,ne.Z)(n)||0})),(0,qe.Z)((0,f1e.Z)(r,function(n){return(0,qe.Z)(n)||0}))]}function sG(r){for(var n=(0,up.Z)(r),e=n[0].length,t=(0,Pe.CR)([Array(e).fill(0),Array(e).fill(0)],2),i=t[0],a=t[1],s=0;s<n.length;s+=1)for(var o=n[s],l=0;l<e;l+=1)o[l]>=0?(o[l]+=i[l],i[l]=o[l]):(o[l]+=a[l],a[l]=o[l]);return n}var v1e=function(r){(0,Pe.ZT)(n,r);function n(e){return r.call(this,e,{type:"line",x:0,y:0,width:200,height:20,isStack:!1,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineLineWidth:1,areaOpacity:0,isGroup:!1,columnLineWidth:1,columnStroke:"#fff",scale:1,spacing:0})||this}return Object.defineProperty(n.prototype,"rawData",{get:function(){var e=this.attributes.data;if(!e||(e==null?void 0:e.length)===0)return[[]];var t=(0,up.Z)(e);return(0,pe.Z)(t[0])?[t]:t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"data",{get:function(){return this.attributes.isStack?sG(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"baseline",{get:function(){var e=this.scales.y,t=(0,Pe.CR)(e.getOptions().domain||[0,0],2),i=t[0],a=t[1];return a<0?e.map(a):e.map(i<0?0:i)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"containerShape",{get:function(){var e=this.attributes,t=e.width,i=e.height;return{width:t,height:i}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"linesStyle",{get:function(){var e=this,t=this.attributes,i=t.type,a=t.isStack,s=t.smooth;if(i!=="line")throw new Error("linesStyle can only be used in line type");var o=Zi(this.attributes,"area"),l=Zi(this.attributes,"line"),u=this.containerShape.width,c=this.data;if(c[0].length===0)return{lines:[],areas:[]};var d=this.scales,h=d.x,f=d.y,v=l1e(c,{type:"line",x:h,y:f}),g=[];if(o){var m=this.baseline;a?g=s?d1e(v,u,m):c1e(v,u,m):g=u1e(v,s,u,m)}return{lines:v.map(function(y,w){return(0,Pe.pi)({stroke:e.getColor(w),d:s?_w(y):Cx(y)},l)}),areas:g.map(function(y,w){return(0,Pe.pi)({d:y,fill:e.getColor(w)},o)})}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"columnsStyle",{get:function(){var e=this,t=Zi(this.attributes,"column"),i=this.attributes,a=i.isStack,s=i.type,o=i.scale;if(s!=="column")throw new Error("columnsStyle can only be used in column type");var l=this.containerShape.height,u=this.rawData;if(!u)return{columns:[]};a&&(u=sG(u));var c=this.createScales(u),d=c.x,h=c.y,f=(0,Pe.CR)(aG(u),2),v=f[0],g=f[1],m=new oN.b({domain:[0,g-(v>0?0:v)],range:[0,l*o]}),y=d.getBandWidth(),w=this.rawData;return{columns:u.map(function(T,G){return T.map(function(x,_){var p=y/u.length,b=function(){return{x:d.map(_)+p*G,y:x>=0?h.map(x):h.map(0),width:p,height:m.map(Math.abs(x))}},R=function(){return{x:d.map(_),y:h.map(x),width:y,height:m.map(w[G][_])}};return(0,Pe.pi)((0,Pe.pi)({fill:e.getColor(G)},t),a?R():b())})})}},enumerable:!1,configurable:!0}),n.prototype.render=function(e,t){iye(t,".container","rect").attr("className","container").node();var i=e.type,a=e.x,s=e.y,o="spark".concat(i),l=(0,Pe.pi)({x:a,y:s},i==="line"?this.linesStyle:this.columnsStyle);Dr(t).selectAll(".spark").data([i]).join(function(u){return u.append(function(c){return c==="line"?new a1e({className:o,style:l}):new i1e({className:o,style:l})}).attr("className","spark ".concat(o))},function(u){return u.update(l)},function(u){return u.remove()})},n.prototype.getColor=function(e){var t=this.attributes.color;return(0,Ie.Z)(t)?t[e%t.length]:(0,Be.Z)(t)?t.call(null,e):t},n.prototype.createScales=function(e){var t,i,a=this.attributes,s=a.type,o=a.scale,l=a.range,u=l===void 0?[]:l,c=a.spacing,d=this.containerShape,h=d.width,f=d.height,v=(0,Pe.CR)(aG(e),2),g=v[0],m=v[1],y=new oN.b({domain:[(t=u[0])!==null&&t!==void 0?t:g,(i=u[1])!==null&&i!==void 0?i:m],range:[f,f*(1-o)]});return s==="line"?{type:s,x:new oN.b({domain:[0,e[0].length-1],range:[0,h]}),y}:{type:s,x:new r1e.t({domain:e[0].map(function(w,T){return T}),range:[0,h],paddingInner:c,paddingOuter:c/2,align:.5}),y}},n.tag="sparkline",n}(ml),oG={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},lG={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},uG={x:0,y:0,orientation:"horizontal",showLabel:!0,type:"start"},pv=yf({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider"),jg=yf({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),g1e=function(r){(0,Pe.ZT)(n,r);function n(){return r!==null&&r.apply(this,arguments)||this}return n.prototype.render=function(e,t){var i=e.x,a=e.y,s=e.size,o=s===void 0?10:s,l=e.radius,u=l===void 0?o/4:l,c=e.orientation,d=(0,Pe._T)(e,["x","y","size","radius","orientation"]),h=o,f=h*2.4,v=Dr(t).maybeAppendByClassName(jg.iconRect,"rect").styles((0,Pe.pi)((0,Pe.pi)({},d),{width:h,height:f,radius:u,x:i-h/2,y:a-f/2,transformOrigin:"center"})),g=i+1/3*h-h/2,m=i+2/3*h-h/2,y=a+1/4*f-f/2,w=a+3/4*f-f/2;v.maybeAppendByClassName("".concat(jg.iconLine,"-1"),"line").styles((0,Pe.pi)({x1:g,x2:g,y1:y,y2:w},d)),v.maybeAppendByClassName("".concat(jg.iconLine,"-2"),"line").styles((0,Pe.pi)({x1:m,x2:m,y1:y,y2:w},d)),c==="vertical"&&(v.node().style.transform="rotate(90)")},n}(ml),_1e=function(r){(0,Pe.ZT)(n,r);function n(e){return r.call(this,e,uG)||this}return n.prototype.renderLabel=function(e){var t=this,i=this.attributes,a=i.x,s=i.y,o=i.showLabel,l=Zi(this.attributes,"label"),u=l.x,c=u===void 0?0:u,d=l.y,h=d===void 0?0:d,f=l.transform,v=l.transformOrigin,g=(0,Pe._T)(l,["x","y","transform","transformOrigin"]),m=(0,Pe.CR)(qv(g,[]),2),y=m[0],w=m[1],T=Dr(e).maybeAppendByClassName(jg.labelGroup,"g").styles(w),G=(0,Pe.pi)((0,Pe.pi)({},lG),y),x=G.text,_=(0,Pe._T)(G,["text"]);Nd(!!o,T,function(p){t.label=p.maybeAppendByClassName(jg.label,"text").styles((0,Pe.pi)((0,Pe.pi)({},_),{x:a+c,y:s+h,transform:f,transformOrigin:v,text:"".concat(x)})),t.label.on("mousedown",function(b){b.stopPropagation()}),t.label.on("touchstart",function(b){b.stopPropagation()})})},n.prototype.renderIcon=function(e){var t=this.attributes,i=t.x,a=t.y,s=t.orientation,o=t.type,l=(0,Pe.pi)((0,Pe.pi)({x:i,y:a,orientation:s},oG),Zi(this.attributes,"icon")),u=this.attributes.iconShape,c=u===void 0?function(){return new g1e({style:l})}:u,d=Dr(e).maybeAppendByClassName(jg.iconGroup,"g");d.selectAll(jg.icon.class).data([c]).join(function(h){return h.append(typeof c=="string"?c:function(){return c(o)}).attr("className",jg.icon.name)},function(h){return h.update(l)},function(h){return h.remove()})},n.prototype.render=function(e,t){this.renderIcon(t),this.renderLabel(t)},n}(ml),m1e=function(r){(0,Pe.ZT)(n,r);function n(e){var t=r.call(this,e,(0,Pe.pi)((0,Pe.pi)((0,Pe.pi)({x:0,y:0,animate:{duration:100,fill:"both"},brushable:!0,formatter:function(i){return i.toString()},handleSpacing:2,orientation:"horizontal",padding:0,autoFitLabel:!0,scrollable:!0,selectionFill:"#5B8FF9",selectionFillOpacity:.45,selectionZIndex:2,showHandle:!0,showLabel:!0,slidable:!0,trackFill:"#416180",trackLength:200,trackOpacity:.05,trackSize:20,trackZIndex:-1,values:[0,1],type:"range",selectionType:"select",handleIconOffset:0},a0(uG,"handle")),a0(oG,"handleIcon")),a0(lG,"handleLabel")))||this;return t.range=[0,1],t.onDragStart=function(i){return function(a){a.stopPropagation(),t.target=i,t.prevPos=t.getOrientVal(iG(a));var s=t.availableSpace,o=s.x,l=s.y,u=t.getBBox(),c=u.x,d=u.y;t.selectionStartPos=t.getRatio(t.prevPos-t.getOrientVal([o,l])-t.getOrientVal([+c,+d])),t.selectionWidth=0,document.addEventListener("pointermove",t.onDragging),document.addEventListener("pointerup",t.onDragEnd)}},t.onDragging=function(i){var a=t.attributes,s=a.slidable,o=a.brushable,l=a.type;i.stopPropagation();var u=t.getOrientVal(iG(i)),c=u-t.prevPos;if(c){var d=t.getRatio(c);switch(t.target){case"start":s&&t.setValuesOffset(d);break;case"end":s&&t.setValuesOffset(0,d);break;case"selection":s&&t.setValuesOffset(d,d);break;case"track":if(!o)return;t.selectionWidth+=d,l==="range"?t.innerSetValues([t.selectionStartPos,t.selectionStartPos+t.selectionWidth].sort(),!0):t.innerSetValues([0,t.selectionStartPos+t.selectionWidth],!0);break;default:break}t.prevPos=u}},t.onDragEnd=function(){document.removeEventListener("pointermove",t.onDragging),document.removeEventListener("pointermove",t.onDragging),document.removeEventListener("pointerup",t.onDragEnd),t.target="",t.updateHandlesPosition(!1)},t.onValueChange=function(i){var a=t.attributes,s=a.onChange,o=a.type,l=o==="range"?i:i[1],u=o==="range"?t.getValues():t.getValues()[1],c=new Pd("valuechange",{detail:{oldValue:l,value:u}});t.dispatchEvent(c),s==null||s(u)},t.selectionStartPos=0,t.selectionWidth=0,t.prevPos=0,t.target="",t}return Object.defineProperty(n.prototype,"values",{get:function(){return this.attributes.values},set:function(e){this.attributes.values=this.clampValues(e)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"sparklineStyle",{get:function(){var e=this.attributes.orientation;if(e!=="horizontal")return null;var t=Zi(this.attributes,"sparkline");return(0,Pe.pi)((0,Pe.pi)({zIndex:0},this.availableSpace),t)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shape",{get:function(){var e=this.attributes,t=e.trackLength,i=e.trackSize,a=(0,Pe.CR)(this.getOrientVal([[t,i],[i,t]]),2),s=a[0],o=a[1];return{width:s,height:o}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"availableSpace",{get:function(){var e=this.attributes,t=e.x,i=e.y,a=e.padding,s=(0,Pe.CR)(Gl(a),4),o=s[0],l=s[1],u=s[2],c=s[3],d=this.shape,h=d.width,f=d.height;return{x:c,y:o,width:h-(c+l),height:f-(o+u)}},enumerable:!1,configurable:!0}),n.prototype.getValues=function(){return this.values},n.prototype.setValues=function(e,t){e===void 0&&(e=[0,0]),t===void 0&&(t=!1),this.attributes.values=e;var i=t===!1?!1:this.attributes.animate;this.updateSelectionArea(i),this.updateHandlesPosition(i)},n.prototype.updateSelectionArea=function(e){var t=this.calcSelectionArea();this.foregroundGroup.selectAll(pv.selection.class).each(function(i,a){xf(this,t[a],e)})},n.prototype.updateHandlesPosition=function(e){this.attributes.showHandle&&(this.startHandle&&xf(this.startHandle,this.getHandleStyle("start"),e),this.endHandle&&xf(this.endHandle,this.getHandleStyle("end"),e))},n.prototype.innerSetValues=function(e,t){e===void 0&&(e=[0,0]),t===void 0&&(t=!1);var i=this.values,a=this.clampValues(e);this.attributes.values=a,this.setValues(a),t&&this.onValueChange(i)},n.prototype.renderTrack=function(e){var t=this.attributes,i=t.x,a=t.y,s=Zi(this.attributes,"track");this.trackShape=Dr(e).maybeAppendByClassName(pv.track,"rect").styles((0,Pe.pi)((0,Pe.pi)({x:i,y:a},this.shape),s))},n.prototype.renderBrushArea=function(e){var t=this.attributes,i=t.x,a=t.y,s=t.brushable;this.brushArea=Dr(e).maybeAppendByClassName(pv.brushArea,"rect").styles((0,Pe.pi)({x:i,y:a,fill:"transparent",cursor:s?"crosshair":"default"},this.shape))},n.prototype.renderSparkline=function(e){var t=this,i=this.attributes,a=i.x,s=i.y,o=i.orientation,l=Dr(e).maybeAppendByClassName(pv.sparklineGroup,"g");Nd(o==="horizontal",l,function(u){var c=(0,Pe.pi)((0,Pe.pi)({},t.sparklineStyle),{x:a,y:s});u.maybeAppendByClassName(pv.sparkline,function(){return new v1e({style:c})}).update(c)})},n.prototype.renderHandles=function(){var e=this,t,i=this.attributes,a=i.showHandle,s=i.type,o=s==="range"?["start","end"]:["end"],l=a?o:[],u=this;(t=this.foregroundGroup)===null||t===void 0||t.selectAll(pv.handle.class).data(l.map(function(c){return{type:c}}),function(c){return c.type}).join(function(c){return c.append(function(d){var h=d.type;return new _1e({style:e.getHandleStyle(h)})}).each(function(d){var h=d.type;this.attr("class","".concat(pv.handle.name," ").concat(h,"-handle"));var f="".concat(h,"Handle");u[f]=this,this.addEventListener("pointerdown",u.onDragStart(h))})},function(c){return c.each(function(d){var h=d.type;this.update(u.getHandleStyle(h))})},function(c){return c.each(function(d){var h=d.type,f="".concat(h,"Handle");u[f]=void 0}).remove()})},n.prototype.renderSelection=function(e){var t=this.attributes,i=t.x,a=t.y,s=t.type,o=t.selectionType;this.foregroundGroup=Dr(e).maybeAppendByClassName(pv.foreground,"g");var l=Zi(this.attributes,"selection"),u=function(d){return d.style("visibility",function(h){return h.show?"visible":"hidden"}).style("cursor",function(h){return o==="select"?"grab":o==="invert"?"crosshair":"default"}).styles((0,Pe.pi)((0,Pe.pi)({},l),{transform:"translate(".concat(i,", ").concat(a,")")}))},c=this;this.foregroundGroup.selectAll(pv.selection.class).data(s==="value"?[]:this.calcSelectionArea().map(function(d,h){return{style:(0,Pe.pi)({},d),index:h,show:o==="select"?h===1:h!==1}}),function(d){return d.index}).join(function(d){return d.append("rect").attr("className",pv.selection.name).call(u).each(function(h,f){var v=this;f===1?(c.selectionShape=Dr(this),this.on("pointerdown",function(g){v.attr("cursor","grabbing"),c.onDragStart("selection")(g)}),c.dispatchCustomEvent(this,"pointerenter","selectionMouseenter"),c.dispatchCustomEvent(this,"pointerleave","selectionMouseleave"),c.dispatchCustomEvent(this,"click","selectionClick"),this.addEventListener("pointerdown",function(){v.attr("cursor","grabbing")}),this.addEventListener("pointerup",function(){v.attr("cursor","pointer")}),this.addEventListener("pointerover",function(){v.attr("cursor","pointer")})):this.on("pointerdown",c.onDragStart("track"))})},function(d){return d.call(u)},function(d){return d.remove()}),this.updateSelectionArea(!1),this.renderHandles()},n.prototype.render=function(e,t){this.renderTrack(t),this.renderSparkline(t),this.renderBrushArea(t),this.renderSelection(t)},n.prototype.clampValues=function(e,t){var i;t===void 0&&(t=4);var a=(0,Pe.CR)(this.range,2),s=a[0],o=a[1],l=(0,Pe.CR)(this.getValues().map(function(m){return sN(m,t)}),2),u=l[0],c=l[1],d=Array.isArray(e)?e:[u,e!=null?e:c],h=(0,Pe.CR)((d||[u,c]).map(function(m){return sN(m,t)}),2),f=h[0],v=h[1];if(this.attributes.type==="value")return[0,(0,O.Z)(v,s,o)];f>v&&(i=(0,Pe.CR)([v,f],2),f=i[0],v=i[1]);var g=v-f;return g>o-s?[s,o]:f<s?u===s&&c===v?[s,v]:[s,g+s]:v>o?c===o&&u===f?[f,o]:[o-g,o]:[f,v]},n.prototype.calcSelectionArea=function(e){var t=(0,Pe.CR)(this.clampValues(e),2),i=t[0],a=t[1],s=this.availableSpace,o=s.x,l=s.y,u=s.width,c=s.height;return this.getOrientVal([[{y:l,height:c,x:o,width:i*u},{y:l,height:c,x:i*u+o,width:(a-i)*u},{y:l,height:c,x:a*u,width:(1-a)*u}],[{x:o,width:u,y:l,height:i*c},{x:o,width:u,y:i*c+l,height:(a-i)*c},{x:o,width:u,y:a*c,height:(1-a)*c}]])},n.prototype.calcHandlePosition=function(e){var t=this.attributes.handleIconOffset,i=this.availableSpace,a=i.x,s=i.y,o=i.width,l=i.height,u=(0,Pe.CR)(this.clampValues(),2),c=u[0],d=u[1],h=e==="start"?-t:t,f=(e==="start"?c:d)*this.getOrientVal([o,l])+h;return{x:a+this.getOrientVal([f,o/2]),y:s+this.getOrientVal([l/2,f])}},n.prototype.inferTextStyle=function(e){var t=this.attributes.orientation;return t==="horizontal"?{}:e==="start"?{transformOrigin:"left center",transform:"rotate(90)",textAlign:"start"}:e==="end"?{transformOrigin:"right center",transform:"rotate(90)",textAlign:"end"}:{}},n.prototype.calcHandleText=function(e){var t,i=this.attributes,a=i.type,s=i.orientation,o=i.formatter,l=i.autoFitLabel,u=Zi(this.attributes,"handle"),c=Zi(u,"label"),d=u.spacing,h=this.getHandleSize(),f=this.clampValues(),v=e==="start"?f[0]:f[1],g=o(v),m=new UP({style:(0,Pe.pi)((0,Pe.pi)((0,Pe.pi)({},c),this.inferTextStyle(e)),{text:g})}),y=m.getBBox(),w=y.width,T=y.height;if(m.destroy(),!l){if(a==="value")return{text:g,x:0,y:-T-d};var G=d+h+(s==="horizontal"?w/2:0);return t={text:g},t[s==="horizontal"?"x":"y"]=e==="start"?-G:G,t}var x=0,_=0,p=this.availableSpace,b=p.width,R=p.height,B=this.calcSelectionArea()[1],j=B.x,Z=B.y,te=B.width,le=B.height,ue=d+h;if(s==="horizontal"){var se=ue+w/2;if(e==="start"){var V=j-ue-w;x=V>0?-se:se}else{var ee=b-j-te-ue>w;x=ee?se:-se}}else{var he=ue,ut=T+ue;e==="start"?_=Z-h>T?-ut:he:_=R-(Z+le)-h>T?ut:-he}return{x,y:_,text:g}},n.prototype.getHandleLabelStyle=function(e){var t=Zi(this.attributes,"handleLabel");return(0,Pe.pi)((0,Pe.pi)((0,Pe.pi)({},t),this.calcHandleText(e)),this.inferTextStyle(e))},n.prototype.getHandleIconStyle=function(){var e=this.attributes.handleIconShape,t=Zi(this.attributes,"handleIcon"),i=this.getOrientVal(["ew-resize","ns-resize"]),a=this.getHandleSize();return(0,Pe.pi)({cursor:i,shape:e,size:a},t)},n.prototype.getHandleStyle=function(e){var t=this.attributes,i=t.x,a=t.y,s=t.showLabel,o=t.showLabelOnInteraction,l=t.orientation,u=this.calcHandlePosition(e),c=u.x,d=u.y,h=this.calcHandleText(e),f=s;return!s&&o&&(this.target?f=!0:f=!1),(0,Pe.pi)((0,Pe.pi)((0,Pe.pi)({},a0(this.getHandleIconStyle(),"icon")),a0((0,Pe.pi)((0,Pe.pi)({},this.getHandleLabelStyle(e)),h),"label")),{transform:"translate(".concat(c+i,", ").concat(d+a,")"),orientation:l,showLabel:f,type:e,zIndex:3})},n.prototype.getHandleSize=function(){var e=this.attributes,t=e.handleIconSize,i=e.width,a=e.height;return t||Math.floor((this.getOrientVal([+a,+i])+4)/2.4)},n.prototype.getOrientVal=function(e){var t=(0,Pe.CR)(e,2),i=t[0],a=t[1],s=this.attributes.orientation;return s==="horizontal"?i:a},n.prototype.setValuesOffset=function(e,t,i){t===void 0&&(t=0),i===void 0&&(i=!1);var a=this.attributes.type,s=(0,Pe.CR)(this.getValues(),2),o=s[0],l=s[1],u=a==="range"?e:0,c=[o+u,l+t].sort();i?this.setValues(c):this.innerSetValues(c,!0)},n.prototype.getRatio=function(e){var t=this.availableSpace,i=t.width,a=t.height;return e/this.getOrientVal([i,a])},n.prototype.dispatchCustomEvent=function(e,t,i){var a=this;e.on(t,function(s){s.stopPropagation(),a.dispatchEvent(new Pd(i,{detail:s}))})},n.prototype.bindEvents=function(){this.addEventListener("wheel",this.onScroll);var e=this.brushArea;this.dispatchCustomEvent(e,"click","trackClick"),this.dispatchCustomEvent(e,"pointerenter","trackMouseenter"),this.dispatchCustomEvent(e,"pointerleave","trackMouseleave"),e.on("pointerdown",this.onDragStart("track"))},n.prototype.onScroll=function(e){var t=this.attributes.scrollable;if(t){var i=e.deltaX,a=e.deltaY,s=a||i,o=this.getRatio(s);this.setValuesOffset(o,o,!0)}},n.tag="slider",n}(ml),p1e={backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333",backgroundZIndex:-1,formatter:function(r){return r.toString()},labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",padding:[2,4],position:"right",radius:0,zIndex:999},uN=yf({background:"background",labelGroup:"label-group",label:"label"},"indicator"),y1e=function(r){(0,Pe.ZT)(n,r);function n(e){var t=r.call(this,e,p1e)||this;return t.point=[0,0],t.group=t.appendChild(new xc({})),t.isMutationObserved=!0,t}return n.prototype.renderBackground=function(){if(this.label){var e=this.attributes,t=e.position,i=e.padding,a=(0,Pe.CR)(Gl(i),4),s=a[0],o=a[1],l=a[2],u=a[3],c=this.label.node().getLocalBounds(),d=c.min,h=c.max,f=new sl(d[0]-u,d[1]-s,h[0]+o-d[0]+u,h[1]+l-d[1]+s),v=this.getPath(t,f),g=Zi(this.attributes,"background");this.background=Dr(this.group).maybeAppendByClassName(uN.background,"path").styles((0,Pe.pi)((0,Pe.pi)({},g),{d:v})),this.group.appendChild(this.label.node())}},n.prototype.renderLabel=function(){var e=this.attributes,t=e.formatter,i=e.labelText,a=Zi(this.attributes,"label"),s=(0,Pe.CR)(qv(a),2),o=s[0],l=s[1],u=o.text,c=(0,Pe._T)(o,["text"]);if(this.label=Dr(this.group).maybeAppendByClassName(uN.labelGroup,"g").styles(l),!!i){var d=this.label.maybeAppendByClassName(uN.label,function(){return eg(t(i))}).style("text",t(i).toString());d.selectAll("text").styles(c)}},n.prototype.adjustLayout=function(){var e=(0,Pe.CR)(this.point,2),t=e[0],i=e[1],a=this.attributes,s=a.x,o=a.y;this.group.attr("transform","translate(".concat(s-t,", ").concat(o-i,")"))},n.prototype.getPath=function(e,t){var i=this.attributes.radius,a=t.x,s=t.y,o=t.width,l=t.height,u=[["M",a+i,s],["L",a+o-i,s],["A",i,i,0,0,1,a+o,s+i],["L",a+o,s+l-i],["A",i,i,0,0,1,a+o-i,s+l],["L",a+i,s+l],["A",i,i,0,0,1,a,s+l-i],["L",a,s+i],["A",i,i,0,0,1,a+i,s],["Z"]],c={top:4,right:6,bottom:0,left:2},d=c[e],h=this.createCorner([u[d].slice(-2),u[d+1].slice(-2)]);return u.splice.apply(u,(0,Pe.ev)([d+1,1],(0,Pe.CR)(h),!1)),u[0][0]="M",u},n.prototype.createCorner=function(e,t){t===void 0&&(t=10);var i=.8,a=$ye.apply(void 0,(0,Pe.ev)([],(0,Pe.CR)(e),!1)),s=(0,Pe.CR)(e,2),o=(0,Pe.CR)(s[0],2),l=o[0],u=o[1],c=(0,Pe.CR)(s[1],2),d=c[0],h=c[1],f=(0,Pe.CR)(a?[d-l,[l,d]]:[h-u,[u,h]],2),v=f[0],g=(0,Pe.CR)(f[1],2),m=g[0],y=g[1],w=v/2,T=v/Math.abs(v),G=t*T,x=G/2,_=G*Math.sqrt(3)/2*i,p=(0,Pe.CR)([m,m+w-x,m+w,m+w+x,y],5),b=p[0],R=p[1],B=p[2],j=p[3],Z=p[4];return a?(this.point=[B,u-_],[["L",b,u],["L",R,u],["L",B,u-_],["L",j,u],["L",Z,u]]):(this.point=[l+_,B],[["L",l,b],["L",l,R],["L",l+_,B],["L",l,j],["L",l,Z]])},n.prototype.applyVisibility=function(){var e=this.attributes.visibility;e==="hidden"?pf(this):yx(this)},n.prototype.bindEvents=function(){this.label.on(Mo.BOUNDS_CHANGED,this.renderBackground)},n.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout(),this.applyVisibility()},n}(ml),x1e=function(r){(0,Pe.ZT)(n,r);function n(e){var t=r.call(this,bu({},n.defaultOptions,e))||this;return t.hoverColor="#f5f5f5",t.selectedColor="#e6f7ff",t.background=t.appendChild(new vm({})),t.label=t.background.appendChild(new xc({})),t}return Object.defineProperty(n.prototype,"padding",{get:function(){return Gl(this.style.padding)},enumerable:!1,configurable:!0}),n.prototype.renderLabel=function(){var e=this.style,t=e.label,i=e.value,a=Zi(this.attributes,"label");Dr(this.label).maybeAppend(".label",function(){return eg(t)}).attr("className","label").styles(a),this.label.attr("__data__",i)},n.prototype.renderBackground=function(){var e=this.label.getBBox(),t=(0,Pe.CR)(this.padding,4),i=t[0],a=t[1],s=t[2],o=t[3],l=e.width,u=e.height,c=l+o+a,d=u+i+s,h=Zi(this.attributes,"background"),f=this.style,v=f.width,g=v===void 0?0:v,m=f.height,y=m===void 0?0:m,w=f.selected;this.background.attr((0,Pe.pi)((0,Pe.pi)({},h),{width:Math.max(c,g),height:Math.max(d,y),fill:w?this.selectedColor:"#fff"})),this.label.attr({transform:"translate(".concat(o,", ").concat((d-u)/2,")")})},n.prototype.render=function(){this.renderLabel(),this.renderBackground()},n.prototype.bindEvents=function(){var e=this;this.addEventListener("pointerenter",function(){e.style.selected||e.background.attr("fill",e.hoverColor)}),this.addEventListener("pointerleave",function(){e.style.selected||e.background.attr("fill",e.style.backgroundFill)});var t=this;this.addEventListener("click",function(){var i=e.style,a=i.label,s=i.value,o=i.onClick;o==null||o(s,{label:a,value:s},t)})},n.defaultOptions={style:{value:"",label:"",cursor:"pointer"}},n}(ml),E1e=function(r){(0,Pe.ZT)(n,r);function n(e){var t,i,a=r.call(this,bu({},n.defaultOptions,e))||this;a.currentValue=(t=n.defaultOptions.style)===null||t===void 0?void 0:t.defaultValue,a.isPointerInSelect=!1,a.select=a.appendChild(new vm({className:"select",style:{cursor:"pointer",width:0,height:0}})),a.dropdown=a.appendChild(new vm({className:"dropdown"}));var s=a.style.defaultValue;return s&&(!((i=a.style.options)===null||i===void 0)&&i.some(function(o){return o.value===s}))&&(a.currentValue=s),a}return n.prototype.setValue=function(e){this.currentValue=e,this.render()},n.prototype.getValue=function(){return this.currentValue},Object.defineProperty(n.prototype,"dropdownPadding",{get:function(){return Gl(this.style.dropdownPadding)},enumerable:!1,configurable:!0}),n.prototype.renderSelect=function(){var e=this,t,i=this.style,a=i.x,s=i.y,o=i.width,l=i.height,u=i.bordered,c=i.showDropdownIcon,d=Zi(this.attributes,"select"),h=Zi(this.attributes,"placeholder");this.select.attr((0,Pe.pi)((0,Pe.pi)({x:a,y:s,width:o,height:l},d),{fill:"#fff",strokeWidth:u?1:0}));var f=this.dropdownPadding,v=10;c&&Dr(this.select).maybeAppend(".dropdown-icon","path").style("d","M-5,-3.5 L0,3.5 L5,-3.5").style("transform","translate(".concat(a+o-v-f[1]-f[3],", ").concat(s+l/2,")")).style("lineWidth",1).style("stroke",this.select.style.stroke);var g=(t=this.style.options)===null||t===void 0?void 0:t.find(function(T){return T.value===e.currentValue}),m=(0,Pe.pi)({x:a+f[3]},h);Dr(this.select).selectAll(".placeholder").data(g?[]:[1]).join(function(T){return T.append("text").attr("className","placeholder").styles(m).style("y",function(){var G=this.getBBox();return s+(l-G.height)/2})},function(T){return T.styles(m)},function(T){return T.remove()});var y=Zi(this.attributes,"optionLabel"),w=(0,Pe.pi)({x:a+f[3]},y);Dr(this.select).selectAll(".value").data(g?[g]:[]).join(function(T){return T.append(function(G){return eg(G.label)}).attr("className","value").styles(w).style("y",function(){var G=this.getBBox();return s+(l-G.height)/2})},function(T){return T.styles(w)},function(T){return T.remove()})},n.prototype.renderDropdown=function(){var e=this,t,i,a=this.style,s=a.x,o=a.y,l=a.width,u=a.height,c=a.options,d=a.onSelect,h=a.open,f=Zi(this.attributes,"dropdown"),v=Zi(this.attributes,"option"),g=this.dropdownPadding;Dr(this.dropdown).maybeAppend(".dropdown-container","g").attr("className","dropdown-container").selectAll(".dropdown-item").data(c,function(w){return w.value}).join(function(w){return w.append(function(T){return new x1e({className:"dropdown-item",style:(0,Pe.pi)((0,Pe.pi)((0,Pe.pi)({},T),v),{width:l-g[1]-g[3],selected:T.value===e.currentValue,onClick:function(G,x,_){e.setValue(G),d==null||d(G,x,_),e.dispatchEvent(new Pd("change",{detail:{value:G,option:x,item:_}})),pf(e.dropdown)}})})}).each(function(T,G){var x,_=(x=this.parentNode)===null||x===void 0?void 0:x.children,p=_.reduce(function(b,R,B){return B<G&&(b+=R.getBBox().height),b},0);this.attr("transform","translate(".concat(g[3],", ").concat(g[0]+p,")"))})},function(w){return w.update(function(T){return{selected:T.value===e.currentValue}})},function(w){return w.remove()});var m=(i=(t=this.dropdown.getElementsByClassName("dropdown-container"))===null||t===void 0?void 0:t[0])===null||i===void 0?void 0:i.getBBox(),y=f.spacing;this.dropdown.attr((0,Pe.pi)({transform:"translate(".concat(s,", ").concat(o+u+y,")"),width:m.width+g[1]+g[3],height:m.height+g[0]+g[2]},f)),!h&&pf(this.dropdown)},n.prototype.render=function(){this.renderSelect(),this.renderDropdown()},n.prototype.bindEvents=function(){var e=this;this.addEventListener("click",function(t){t.stopPropagation()}),this.select.addEventListener("click",function(){e.dropdown.style.visibility==="visible"?pf(e.dropdown):yx(e.dropdown)}),this.addEventListener("pointerenter",function(){e.isPointerInSelect=!0}),this.addEventListener("pointerleave",function(){e.isPointerInSelect=!1}),document==null||document.addEventListener("click",function(){e.isPointerInSelect||pf(e.dropdown)})},n.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"}},n}(ml),Ef=function(r){(0,Pe.ZT)(n,r);function n(e){var t=r.call(this,bu({},{style:{backgroundOpacity:n.backgroundOpacities.default}},n.defaultOptions,e))||this;return t.showBackground=!0,t.background=t.appendChild(new vm({})),t.icon=t.appendChild(new xc({})),t}return Object.defineProperty(n.prototype,"label",{get:function(){return"BaseIcon"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"lineWidth",{get:function(){return Math.log10(this.attributes.size)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"padding",{get:function(){return Gl(this.attributes.size/5)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"iconSize",{get:function(){var e=this.attributes.size,t=(0,Pe.CR)(this.padding,4),i=t[0],a=t[1],s=t[2],o=t[3];return Math.max(e-Math.max(o+a,i+s),this.lineWidth*2+1)},enumerable:!1,configurable:!0}),n.prototype.renderBackground=function(){var e=this.attributes,t=e.x,i=e.y,a=e.size,s=a/2,o=Zi(this.attributes,"background");this.background.attr((0,Pe.pi)({x:t-s,y:i-s,width:a,height:a},o))},n.prototype.showIndicator=function(){if(this.label){var e=this.attributes.size,t=this.background.getBBox(),i=t.x,a=t.y;this.indicator.update({x:i+e/2,y:a-5,labelText:this.label,visibility:"visible"})}},n.prototype.hideIndicator=function(){this.indicator.update({visibility:"hidden"})},n.prototype.connectedCallback=function(){var e;r.prototype.connectedCallback.call(this);var t=this.attributes.size,i=this.background.getBBox(),a=i.x,s=i.y,o=(e=this.ownerDocument)===null||e===void 0?void 0:e.defaultView;o&&(this.indicator=o.appendChild(new y1e({style:{x:a+t/2,y:s-t/2,visibility:"hidden",position:"top",radius:3,zIndex:100}})))},n.prototype.disconnectedCallback=function(){this.indicator.destroy()},n.prototype.render=function(){this.renderIcon(),this.showBackground&&this.renderBackground()},n.prototype.bindEvents=function(){var e=this,t=this.attributes.onClick;if(this.addEventListener("click",function(){t==null||t(e)}),this.showBackground){var i=function(){return e.background.attr({opacity:n.backgroundOpacities.default})},a=function(){return e.background.attr({opacity:n.backgroundOpacities.hover})},s=function(){return e.background.attr({opacity:n.backgroundOpacities.active})};this.addEventListener("pointerenter",function(){a(),e.showIndicator()}),this.addEventListener("pointerleave",function(){i(),e.hideIndicator()}),this.addEventListener("pointerdown",function(){s()}),this.addEventListener("pointerup",function(){i()})}},n.tag="IconBase",n.defaultOptions={style:{x:0,y:0,size:10,color:"#565758",backgroundRadius:4,backgroundFill:"#e2e2e2"}},n.backgroundOpacities={default:0,hover:.8,active:1},n}(ml),Mx=function(r,n){return n===void 0&&(n="#565758"),new $k({style:{fill:n,d:"M ".concat(r,",").concat(r," L -").concat(r,",0 L ").concat(r,",-").concat(r," Z"),transformOrigin:"center"}})},b1e=function(r){(0,Pe.ZT)(n,r);function n(){return r!==null&&r.apply(this,arguments)||this}return n.prototype.arcPath=function(e,t,i){var a=(0,Pe.CR)([i,i],2),s=a[0],o=a[1],l=function(g){return[e+i*Math.cos(g),t+i*Math.sin(g)]},u=(0,Pe.CR)(l(-5/4*Math.PI),2),c=u[0],d=u[1],h=(0,Pe.CR)(l(1/4*Math.PI),2),f=h[0],v=h[1];return"M".concat(c,",").concat(d,",A").concat(s,",").concat(o,",0,1,1,").concat(f,",").concat(v)},Object.defineProperty(n.prototype,"label",{get:function(){return"\u91CD\u7F6E"},enumerable:!1,configurable:!0}),n.prototype.renderIcon=function(){var e=this.attributes,t=e.x,i=e.y,a=e.color,s=this.iconSize,o=this.lineWidth,l=o+.5;Dr(this.icon).maybeAppend(".reset","path").styles({stroke:a,lineWidth:o,d:this.arcPath(t,i,s/2-o),markerStart:Mx(l,a)})},n}(Ef),k1e=function(r){(0,Pe.ZT)(n,r);function n(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(n.prototype,"label",{get:function(){return"\u5FEB\u9000"},enumerable:!1,configurable:!0}),n.prototype.renderIcon=function(){var e=this.attributes,t=e.x,i=e.y,a=e.color,s=this.iconSize,o=s/2,l=s/2/Math.pow(3,.5),u=[[t,i],[t,i-l],[t-o,i],[t,i+l],[t,i],[t+o,i-l],[t+o,i+l],[t,i]];Dr(this.icon).maybeAppend(".backward","polygon").styles({points:u,fill:a})},n}(Ef),w1e=function(r){(0,Pe.ZT)(n,r);function n(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(n.prototype,"label",{get:function(){return"\u5FEB\u8FDB"},enumerable:!1,configurable:!0}),n.prototype.renderIcon=function(){var e=this.attributes,t=e.x,i=e.y,a=e.color,s=this.iconSize,o=s/2,l=s/2/Math.pow(3,.5),u=[[t,i],[t,i-l],[t+o,i],[t,i+l],[t,i],[t-o,i-l],[t-o,i+l],[t,i]];Dr(this.icon).maybeAppend(".forward","polygon").styles({points:u,fill:a})},n}(Ef),S1e=function(r){(0,Pe.ZT)(n,r);function n(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(n.prototype,"label",{get:function(){return"\u64AD\u653E"},enumerable:!1,configurable:!0}),n.prototype.renderIcon=function(){var e=this.attributes,t=e.x,i=e.y,a=e.color,s=this.iconSize,o=s/3*Math.pow(3,.5)*.8,l=[[t+o,i],[t-o/2,i-s/2*.8],[t-o/2,i+s/2*.8],[t+o,i]];Dr(this.icon).maybeAppend(".play","polygon").styles({points:l,fill:a})},n}(Ef),T1e=function(r){(0,Pe.ZT)(n,r);function n(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(n.prototype,"label",{get:function(){return"\u6682\u505C"},enumerable:!1,configurable:!0}),n.prototype.renderIcon=function(){var e=this.attributes,t=e.x,i=e.y,a=e.color,s=this.iconSize,o=s/3,l=[[t-o,i-s/2],[t-o,i+s/2],[t-o/2,i+s/2],[t-o/2,i-s/2],[t-o,i-s/2],[t+o/2,i-s/2],[t+o/2,i+s/2],[t+o,i+s/2],[t+o,i-s/2]];Dr(this.icon).maybeAppend(".pause","polygon").styles({points:l,fill:a})},n}(Ef),C1e=function(r){(0,Pe.ZT)(n,r);function n(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(n.prototype,"label",{get:function(){return"\u8303\u56F4\u65F6\u95F4"},enumerable:!1,configurable:!0}),n.prototype.renderIcon=function(){var e=this.attributes,t=e.x,i=e.y,a=e.color,s=this,o=s.iconSize,l=s.lineWidth,u=l;Dr(this.icon).maybeAppend(".left-line","line").styles({x1:t-o/2,y1:i-o/2,x2:t-o/2,y2:i+o/2,stroke:a,lineWidth:l}),Dr(this.icon).maybeAppend(".right-line","line").styles({x1:t+o/2,y1:i-o/2,x2:t+o/2,y2:i+o/2,stroke:a,lineWidth:l}),Dr(this.icon).maybeAppend(".left-arrow","line").styles({x1:t,y1:i,x2:t-o/2+u*2,y2:i,stroke:a,lineWidth:l,markerEnd:Mx(l*2,a)}),Dr(this.icon).maybeAppend(".right-arrow","line").styles({x1:t,y1:i,x2:t+o/2-u*2,y2:i,stroke:a,lineWidth:l,markerEnd:Mx(l*2,a)})},n}(Ef),M1e=function(r){(0,Pe.ZT)(n,r);function n(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(n.prototype,"label",{get:function(){return"\u5355\u4E00\u65F6\u95F4"},enumerable:!1,configurable:!0}),n.prototype.renderIcon=function(){var e=this.attributes,t=e.x,i=e.y,a=e.color,s=this,o=s.iconSize,l=s.lineWidth;Dr(this.icon).maybeAppend(".line","line").styles({x1:t,y1:i-o/2,x2:t,y2:i+o/2,stroke:a,lineWidth:l});var u=l;Dr(this.icon).maybeAppend(".left-arrow","line").styles({x1:t-o/2-u*2,y1:i,x2:t-u*2,y2:i,stroke:a,lineWidth:l,markerEnd:Mx(l*2,a)}),Dr(this.icon).maybeAppend(".right-arrow","line").styles({x1:t+o/2+u*2,y1:i,x2:t+u*2,y2:i,stroke:a,lineWidth:l,markerEnd:Mx(l*2,a)})},n}(Ef),cG=function(r){return[[-r/2,-r/2],[-r/2,r/2],[r/2,r/2]]},P1e=function(r){(0,Pe.ZT)(n,r);function n(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(n.prototype,"label",{get:function(){return"\u6298\u7EBF\u56FE"},enumerable:!1,configurable:!0}),n.prototype.renderIcon=function(){var e=this.attributes,t=e.x,i=e.y,a=e.color,s=this,o=s.iconSize,l=s.lineWidth,u=l,c=(o-u*2-l)/4,d=(o-u*2-l)/2,h=(0,Pe.CR)([t-o/2+u,i+o/2-u*2],2),f=h[0],v=h[1];Dr(this.icon).maybeAppend(".coordinate","polyline").styles({points:cG(o).map(function(g){var m=(0,Pe.CR)(g,2),y=m[0],w=m[1];return[y+t,w+i]}),stroke:a,lineWidth:l}),Dr(this.icon).maybeAppend(".line","polyline").styles({points:[[f,v],[f+c,v-d],[f+c*2,v],[f+c*4,v-d*2]],stroke:a,lineWidth:l})},n}(Ef),N1e=function(r){(0,Pe.ZT)(n,r);function n(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(n.prototype,"label",{get:function(){return"\u6761\u5F62\u56FE"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"data",{get:function(){return[1,4,2,4,3]},enumerable:!1,configurable:!0}),n.prototype.renderIcon=function(){var e=this.data,t=this.attributes,i=t.x,a=t.y,s=t.color,o=this,l=o.iconSize,u=o.lineWidth,c=u,d=(l-c)/e.length,h=(l-c*2)/4,f=(0,Pe.CR)([i-l/2+c*2,a+l/2-c],2),v=f[0],g=f[1];Dr(this.icon).maybeAppend(".coordinate","polyline").styles({points:cG(l).map(function(m){var y=(0,Pe.CR)(m,2),w=y[0],T=y[1];return[w+i,T+a]}),stroke:s,lineWidth:u}),Dr(this.icon).maybeAppend(".bars","g").selectAll(".column").data(this.data.map(function(m,y){return{value:m,index:y}})).join(function(m){return m.append("line").attr("className","column").style("x1",function(y){var w=y.index;return v+d*w}).style("y1",g).style("x2",function(y){var w=y.index;return v+d*w}).style("y2",function(y){var w=y.value;return g-h*w}).styles({y1:g,stroke:s,lineWidth:u})})},n}(Ef),O1e=function(r){(0,Pe.ZT)(n,r);function n(e){var t=r.call(this,bu({},{style:{color:"#d8d9d9"}},e))||this;return t.showBackground=!1,t}return n.prototype.renderIcon=function(){var e=this.attributes,t=e.x,i=e.y,a=e.color,s=this,o=s.iconSize,l=s.lineWidth;Dr(this.icon).maybeAppend(".split","line").styles({x1:t,y1:i-o/2,x2:t,y2:i+o/2,stroke:a,lineWidth:l})},n}(Ef),cN=function(r){(0,Pe.ZT)(n,r);function n(){var e=r.apply(this,(0,Pe.ev)([],(0,Pe.CR)(arguments),!1))||this;return e.showBackground=!1,e}return Object.defineProperty(n.prototype,"padding",{get:function(){return Gl(0)},enumerable:!1,configurable:!0}),n.prototype.renderIcon=function(){var e=this.iconSize,t=this.attributes,i=t.x,a=t.y,s=t.speed,o=s===void 0?1:s,l=(0,QM.Z)(this.attributes,["x","y","transform","transformOrigin","width","height","size","color","speed"]),u=(0,O.Z)(e,20,1/0),c=20,d=(0,Pe.pi)((0,Pe.pi)({},l),{x:i-u/2,y:a-c/2,width:u,height:c,defaultValue:o,bordered:!1,showDropdownIcon:!1,selectRadius:2,dropdownPadding:this.padding,dropdownRadius:2,dropdownSpacing:e/5,placeholderFontSize:e/2,optionPadding:0,optionLabelFontSize:e/2,optionBackgroundRadius:1,options:[{label:"1x",value:1},{label:"1.5x",value:1.5},{label:"2x",value:2}]});Dr(this.icon).maybeAppend(".speed",function(){return new E1e({style:d})}).attr("className","speed").each(function(){this.update(d)})},n.tag="SpeedSelect",n}(Ef),dN=function(r){(0,Pe.ZT)(n,r);function n(e){var t=r.call(this,e)||this;return t.icon=t.appendChild(new xc({})),t.currentType=t.attributes.type,t}return n.prototype.getType=function(){return this.currentType},n.prototype.render=function(){var e=this,t=this.attributes,i=t.onChange,a=(0,Pe._T)(t,["onChange"]);Dr(this.icon).selectAll(".icon").data([this.currentType]).join(function(s){return s.append(function(o){var l,u=(l=e.toggles.find(function(c){var d=(0,Pe.CR)(c,1),h=d[0];return h===o}))===null||l===void 0?void 0:l[1];if(!u)throw new Error("Invalid type: ".concat(o));return new u({})}).attr("className","icon").styles(a,!1).update({})},function(s){return s.styles({restStyles:a}).update({})},function(s){return s.remove()})},n.prototype.bindEvents=function(){var e=this,t=this.attributes.onChange;this.addEventListener("click",function(i){i.preventDefault(),i.stopPropagation();var a=(e.toggles.findIndex(function(o){var l=(0,Pe.CR)(o,1),u=l[0];return u===e.currentType})+1)%e.toggles.length,s=e.toggles[a][0];t==null||t(e.currentType),e.currentType=s,e.render()})},n.tag="ToggleIcon",n}(ml),hN=function(r){(0,Pe.ZT)(n,r);function n(e){var t=r.call(this,bu({},{style:{type:"play"}},e))||this;return t.toggles=[["play",S1e],["pause",T1e]],t}return n}(dN),fN=function(r){(0,Pe.ZT)(n,r);function n(e){var t=r.call(this,bu({},{style:{type:"range"}},e))||this;return t.toggles=[["range",C1e],["value",M1e]],t}return n}(dN),vN=function(r){(0,Pe.ZT)(n,r);function n(e){var t=r.call(this,bu({},{style:{type:"column"}},e))||this;return t.toggles=[["line",P1e],["column",N1e]],t}return n}(dN),R1e={reset:b1e,speed:cN,backward:k1e,playPause:hN,forward:w1e,selectionType:fN,chartType:vN,split:O1e},A1e=function(r){(0,Pe.ZT)(n,r);function n(e){var t=r.call(this,bu({},n.defaultOptions,e))||this;return t.background=t.appendChild(new vm({})),t.functions=t.appendChild(new xc({})),t}return Object.defineProperty(n.prototype,"padding",{get:function(){return Gl(this.attributes.padding)},enumerable:!1,configurable:!0}),n.prototype.renderBackground=function(){var e=this.style,t=e.x,i=e.y,a=e.width,s=e.height,o=Zi(this.attributes,"background");this.background.attr((0,Pe.pi)({x:t,y:i,width:a,height:s},o))},n.prototype.renderFunctions=function(){var e=this,t,i=this.attributes,a=i.functions,s=i.iconSize,o=i.iconSpacing,l=i.x,u=i.y,c=i.width,d=i.height,h=i.align,f=(0,Pe.CR)(this.padding,4),v=f[1],g=f[3],m=a.reduce(function(T,G){return T.length&&G.length?T.concat.apply(T,(0,Pe.ev)(["split"],(0,Pe.CR)(G),!1)):T.concat.apply(T,(0,Pe.ev)([],(0,Pe.CR)(G),!1))},[]),y=m.length*(s+o)-o,w={left:g+s/2,center:(c-y)/2+s/2,right:c-y-g-v+s/2}[h]||0;(t=this.speedSelect)===null||t===void 0||t.destroy(),this.functions.removeChildren(),m.forEach(function(T,G){var x,_=R1e[T],p={x:l+G*(s+o)+w,y:u+d/2,size:s};if(_===cN?(p.speed=e.attributes.speed,p.onSelect=function(R){return e.handleFunctionChange(T,{value:R})}):[hN,fN,vN].includes(_)?(p.onChange=function(R){return e.handleFunctionChange(T,{value:R})},_===hN&&(p.type=e.attributes.state==="play"?"pause":"play"),_===fN&&(p.type=e.attributes.selectionType==="range"?"value":"range"),_===vN&&(p.type=e.attributes.chartType==="line"?"column":"line")):p.onClick=function(){return e.handleFunctionChange(T,{value:T})},_===cN){var b=(x=e.ownerDocument)===null||x===void 0?void 0:x.defaultView;b&&(e.speedSelect=new _({style:(0,Pe.pi)((0,Pe.pi)({},p),{zIndex:100})}),b.appendChild(e.speedSelect))}else e.functions.appendChild(new _({style:p}))})},n.prototype.disconnectedCallback=function(){var e;r.prototype.disconnectedCallback.call(this),(e=this.speedSelect)===null||e===void 0||e.destroy()},n.prototype.render=function(){this.renderBackground(),this.renderFunctions()},n.prototype.handleFunctionChange=function(e,t){var i=this.attributes.onChange;i==null||i(e,t)},n.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"]]}},n}(ml),L1e=function(r){(0,Pe.ZT)(n,r);function n(e){var t=r.call(this,bu({},n.defaultOptions,e))||this;return t.bindEvents(),t}return n.prototype.bindEvents=function(){var e=this;this.addEventListener("mouseenter",function(){e.attr("lineWidth",Math.ceil(+(e.style.r||0)/2))}),this.addEventListener("mouseleave",function(){e.attr("lineWidth",0)})},n.defaultOptions={style:{r:5,fill:"#3f7cf7",lineWidth:0,stroke:"#3f7cf7",strokeOpacity:.5,cursor:"pointer"}},n}(Bk),I1e=function(r){(0,Pe.ZT)(n,r);function n(e){return r.call(this,bu({},n.defaultOptions,e))||this}return n.prototype.renderBackground=function(){var e=this.attributes,t=e.x,i=e.y,a=e.width,s=e.height,o=Zi(this.attributes,"background");Dr(this).maybeAppend("background","rect").attr("className","background").styles((0,Pe.pi)({x:t-a/2,y:i-s/2,width:a,height:s},o))},n.prototype.renderIcon=function(){var e=this.attributes,t=e.x,i=e.y,a=e.iconSize,s=Zi(this.attributes,"icon"),o=1,l=a/2;Dr(this).maybeAppend("icon-left-line","line").attr("className","icon-left-line").styles((0,Pe.pi)({x1:t-o,y1:i-l,x2:t-o,y2:i+l},s)),Dr(this).maybeAppend("icon-right-line","line").attr("className","icon-right-line").styles((0,Pe.pi)({x1:t+o,y1:i-l,x2:t+o,y2:i+l},s))},n.prototype.renderBorder=function(){var e=this.attributes,t=e.x,i=e.y,a=e.width,s=e.height,o=e.type,l=Zi(this.attributes,"border"),u=o==="start"?+a/2:-a/2;Dr(this).maybeAppend("border","line").attr("className","border").styles((0,Pe.pi)({x1:u+t,y1:i-s/2,x2:u+t,y2:i+s/2},l))},n.prototype.render=function(){this.renderBackground(),this.renderIcon(),this.renderBorder()},n.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}},n}(ml);function D1e(r,n){return typeof r=="number"?dG(r):F1e(r,n)}function F1e(r,n){var e=new Date(r);switch(n){case"half-hour":case"hour":case"four-hour":return[0,6,12,18].includes(e.getHours())&&e.getMinutes()===0?Ec(e,`HH:mm
|
|
|
YYYY-MM-DD`):Ec(e,"HH:mm");case"half-day":return e.getHours()<12?`AM
|
|
|
`.concat(Ec(e,"YYYY-MM-DD")):"PM";case"day":return[1,10,20].includes(e.getDate())?Ec(e,`DD
|
|
|
YYYY-MM`):Ec(e,"DD");case"week":return e.getDate()<=7?Ec(e,`DD
|
|
|
YYYY-MM`):Ec(e,"DD");case"month":return[0,6].includes(e.getMonth())?Ec(e,`MM\u6708
|
|
|
YYYY`):Ec(e,"MM\u6708");case"season":return[0].includes(e.getMonth())?Ec(e,`MM\u6708
|
|
|
YYYY`):Ec(e,"MM\u6708");case"year":return Ec(e,"YYYY");default:return Ec(e,"YYYY-MM-DD HH:mm")}}function dG(r){var n=String(Math.floor(r/3600)).padStart(2,"0"),e=String(Math.floor(r%3600/60)).padStart(2,"0"),t=String(Math.floor(r%60)).padStart(2,"0");return r<3600?"".concat(e,":").concat(t):"".concat(n,":").concat(e,":").concat(t)}var B1e=function(r){(0,Pe.ZT)(n,r);function n(e){var t=r.call(this,bu({},n.defaultOptions,e))||this;t.axis=t.appendChild(new n1e({style:{type:"linear",startPos:[0,0],endPos:[0,0],data:[],showArrow:!1,animate:!1}})),t.timeline=t.appendChild(new m1e({style:{onChange:function(d){t.handleSliderChange(d)}}})),t.controller=t.appendChild(new A1e({})),t.states={},t.handleSliderChange=function(d){var h=function(){var f=t.states.values;return Array.isArray(f)?(0,Pe.ev)([],(0,Pe.CR)(f),!1):f}();t.setBySliderValues(d),t.dispatchOnChange(h)};var i=t.attributes,a=i.selectionType,s=i.chartType,o=i.speed,l=i.state,u=i.playMode,c=i.values;return t.states={chartType:s,playMode:u,selectionType:a,speed:o,state:l},t.setByTimebarValues(c),t}return Object.defineProperty(n.prototype,"data",{get:function(){var e=this.attributes.data,t=function(i,a){return i.time<a.time?-1:i.time>a.time?1:0};return e.sort(t)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"space",{get:function(){var e=this.attributes,t=e.x,i=e.y,a=e.width,s=e.height,o=e.type,l=e.controllerHeight,u=(0,O.Z)(+s-l,0,+s),c=new sl(t,i+ +s-l,+a,l),d,h=0;o==="chart"?(h=35,d=new sl(t,i+u-h,+a,h)):d=new sl;var f=o==="time"?10:u,v=new sl(t,i+(o==="time"?u:u-f),+a,f-h);return{axisBBox:d,controllerBBox:c,timelineBBox:v}},enumerable:!1,configurable:!0}),n.prototype.setBySliderValues=function(e){var t,i,a=this.data,s=(0,Pe.CR)(Array.isArray(e)?e:[0,e],2),o=s[0],l=s[1],u=a.length,c=a[Math.floor(o*u)],d=a[Math.ceil(l*u)-(Array.isArray(e)?0:1)];this.states.values=[(t=c==null?void 0:c.time)!==null&&t!==void 0?t:a[0].time,(i=d==null?void 0:d.time)!==null&&i!==void 0?i:1/0]},n.prototype.setByTimebarValues=function(e){var t,i,a,s=this.data,o=(0,Pe.CR)(Array.isArray(e)?e:[void 0,e],2),l=o[0],u=o[1],c=s.find(function(h){var f=h.time;return f===l}),d=s.find(function(h){var f=h.time;return f===u});this.states.values=[(t=c==null?void 0:c.time)!==null&&t!==void 0?t:(i=s[0])===null||i===void 0?void 0:i.time,(a=d==null?void 0:d.time)!==null&&a!==void 0?a:1/0]},n.prototype.setByIndex=function(e){var t,i,a,s,o=this.data,l=(0,Pe.CR)(e,2),u=l[0],c=l[1];this.states.values=[(i=(t=o[u])===null||t===void 0?void 0:t.time)!==null&&i!==void 0?i:o[0].time,(s=(a=this.data[c])===null||a===void 0?void 0:a.time)!==null&&s!==void 0?s:1/0]},Object.defineProperty(n.prototype,"sliderValues",{get:function(){var e=this.states,t=e.values,i=e.selectionType,a=(0,Pe.CR)(Array.isArray(t)?t:[void 0,t],2),s=a[0],o=a[1],l=this.data,u=l.length,c=i==="value",d=function(){var f=l.findIndex(function(v){var g=v.time;return g===s});return c?0:f>-1?f/u:0},h=function(){if(o===1/0)return 1;var f=l.findIndex(function(v){var g=v.time;return g===o});return f>-1?f/u:c?.5:1};return[d(),h()]},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"values",{get:function(){var e=this.states,t=e.values,i=e.selectionType,a=(0,Pe.CR)(Array.isArray(t)?t:[this.data[0].time,t],2),s=a[0],o=a[1];return i==="value"?o:[s,o]},enumerable:!1,configurable:!0}),n.prototype.getDatumByRatio=function(e){var t=this.data,i=t.length,a=Math.floor(e*(i-1));return t[a]},Object.defineProperty(n.prototype,"chartHandleIconShape",{get:function(){var e=this.states.selectionType,t=this.space.timelineBBox.height;return e==="range"?function(i){return new I1e({style:{type:i,height:t,iconSize:t/6}})}:function(){return new RP({style:{x1:0,y1:-t/2,x2:0,y2:t/2,lineWidth:2,stroke:"#c8c8c8"}})}},enumerable:!1,configurable:!0}),n.prototype.getChartStyle=function(e){var t=this,i=e.x,a=e.y,s=e.width,o=e.height,l=this.states,u=l.selectionType,c=l.chartType,d=this.data,h=this.attributes,f=h.type,v=h.labelFormatter,g=Zi(this.attributes,"chart"),m=g.type,y=(0,Pe._T)(g,["type"]),w=u==="range";if(f==="time")return(0,Pe.pi)({handleIconShape:function(){return new L1e({})},selectionFill:"#2e7ff8",selectionFillOpacity:1,showLabelOnInteraction:!0,handleLabelDy:w?-15:0,autoFitLabel:w,handleSpacing:w?-15:0,trackFill:"#edeeef",trackLength:s,trackOpacity:.5,trackRadius:o/2,trackSize:o/2,type:u,values:this.sliderValues,formatter:function(x){if(v)return v(x);var _=t.getDatumByRatio(x).time;return typeof _=="number"?dG(_):Ec(_,"YYYY-MM-DD HH:mm:ss")},transform:"translate(".concat(i,", ").concat(a,")"),zIndex:1},y);var T=u==="range"?5:0,G=d.map(function(x){var _=x.value;return _});return(0,Pe.pi)({handleIconOffset:T,handleIconShape:this.chartHandleIconShape,selectionFill:"#fff",selectionFillOpacity:.5,selectionType:"invert",sparklineSpacing:.1,sparklineColumnLineWidth:0,sparklineColor:"#d4e5fd",sparklineAreaOpacity:1,sparklineAreaLineWidth:0,sparklineData:G,sparklineType:c,sparklineScale:.8,trackLength:s,trackSize:o,type:u,values:this.sliderValues,transform:"translate(".concat(i,", ").concat(a,")"),zIndex:1},y)},n.prototype.renderChart=function(e){e===void 0&&(e=this.space.timelineBBox),this.timeline.update(this.getChartStyle(e))},n.prototype.updateSelection=function(){this.timeline.setValues(this.sliderValues,!0),this.handleSliderChange(this.sliderValues)},n.prototype.getAxisStyle=function(e){var t=this.data,i=this.attributes,a=i.interval,s=i.labelFormatter,o=Zi(this.attributes,"axis"),l=e.x,u=e.y,c=e.width,d=(0,Pe.ev)((0,Pe.ev)([],(0,Pe.CR)(t),!1),[{time:0}],!1).map(function(f,v,g){var m=f.time;return{label:"".concat(m),value:v/(g.length-1),time:m}}),h=(0,Pe.pi)({startPos:[l,u],endPos:[l+c,u],data:d,labelFilter:function(f,v){return v<d.length-1},labelFormatter:function(f){var v=f.time;return s?s(v):D1e(v,a)}},o);return h},n.prototype.renderAxis=function(e){e===void 0&&(e=this.space.axisBBox);var t=this.attributes.type;t==="chart"&&this.axis.update(this.getAxisStyle(e))},n.prototype.renderController=function(e){e===void 0&&(e=this.space.controllerBBox);var t=this.attributes.type,i=this.states,a=i.state,s=i.speed,o=i.selectionType,l=i.chartType,u=Zi(this.attributes,"controller"),c=this,d=(0,Pe.pi)((0,Pe.pi)((0,Pe.pi)({},e),{iconSize:20,speed:s,state:a,selectionType:o,chartType:l,onChange:function(h,f){var v=f.value;switch(h){case"reset":c.internalReset();break;case"speed":c.handleSpeedChange(v);break;case"backward":c.internalBackward();break;case"playPause":v==="play"?c.internalPlay():c.internalPause();break;case"forward":c.internalForward();break;case"selectionType":c.handleSelectionTypeChange(v);break;case"chartType":c.handleChartTypeChange(v);break;default:break}}}),u);t==="time"&&(d.functions=[["reset","speed"],["backward","playPause","forward"],["selectionType"]]),this.controller.update(d)},n.prototype.dispatchOnChange=function(e){var t=this.data,i=this.attributes.onChange,a=this.states,s=a.values,o=a.selectionType,l=(0,Pe.CR)(s,2),u=l[0],c=l[1],d=c===1/0?t.at(-1).time:c,h=o==="range"?[u,d]:d,f=function(v,g){return Array.isArray(v)?Array.isArray(g)?v[0]===g[0]&&(v[1]===g[1]||v[1]===1/0||g[1]===1/0):!1:Array.isArray(g)?!1:v===g};(!e||!f(e,h))&&(i==null||i(o==="range"?[u,d]:d))},n.prototype.internalReset=function(e){var t,i,a=this.states.selectionType;this.internalPause(),this.setBySliderValues(a==="range"?[0,1]:[0,0]),this.renderController(),this.updateSelection(),e||((i=(t=this.attributes)===null||t===void 0?void 0:t.onReset)===null||i===void 0||i.call(t),this.dispatchOnChange())},n.prototype.reset=function(){this.internalReset()},n.prototype.moveSelection=function(e,t){var i=this.data,a=i.length,s=this.states,o=s.values,l=s.selectionType,u=s.playMode,c=(0,Pe.CR)(o,2),d=c[0],h=c[1],f=i.findIndex(function(T){var G=T.time;return G===d}),v=i.findIndex(function(T){var G=T.time;return G===h});v===-1&&(v=a);var g=e==="backward"?-1:1,m;l==="range"?u==="acc"?(m=[f,v+g],g===-1&&f===v&&(m=[f,a])):m=[f+g,v+g]:m=[f,v+g];var y=function(T){var G=(0,Pe.CR)(T.sort(function(b,R){return b-R}),2),x=G[0],_=G[1],p=function(b){return(0,O.Z)(b,0,a)};return _>a?l==="value"?[0,0]:u==="acc"?[p(x),p(x)]:[0,p(_-x)]:x<0?u==="acc"?[0,p(_)]:[p(x+a-_),a]:[p(x),p(_)]},w=y(m);return this.setByIndex(w),this.updateSelection(),w},n.prototype.internalBackward=function(e){var t,i,a=this.moveSelection("backward",e);return e||((i=(t=this.attributes)===null||t===void 0?void 0:t.onBackward)===null||i===void 0||i.call(t),this.dispatchOnChange()),a},n.prototype.backward=function(){this.internalBackward()},n.prototype.internalPlay=function(e){var t=this,i,a,s=this.data,o=this.attributes.loop,l=this.states.speed,u=l===void 0?1:l;this.playInterval=window.setInterval(function(){var c=t.internalForward();c[1]===s.length&&!o&&(t.internalPause(),t.renderController())},1e3/u),this.states.state="play",!e&&((a=(i=this.attributes)===null||i===void 0?void 0:i.onPlay)===null||a===void 0||a.call(i))},n.prototype.play=function(){this.internalPlay()},n.prototype.internalPause=function(e){var t,i;clearInterval(this.playInterval),this.states.state="pause",!e&&((i=(t=this.attributes)===null||t===void 0?void 0:t.onPause)===null||i===void 0||i.call(t))},n.prototype.pause=function(){this.internalPause()},n.prototype.internalForward=function(e){var t,i,a=this.moveSelection("forward",e);return e||((i=(t=this.attributes)===null||t===void 0?void 0:t.onForward)===null||i===void 0||i.call(t),this.dispatchOnChange()),a},n.prototype.forward=function(){this.internalForward()},n.prototype.handleSpeedChange=function(e){var t,i;this.states.speed=e;var a=this.states.state;a==="play"&&(this.internalPause(!0),this.internalPlay(!0)),(i=(t=this.attributes)===null||t===void 0?void 0:t.onSpeedChange)===null||i===void 0||i.call(t,e)},n.prototype.handleSelectionTypeChange=function(e){var t,i;this.states.selectionType=e,this.renderChart(),(i=(t=this.attributes)===null||t===void 0?void 0:t.onSelectionTypeChange)===null||i===void 0||i.call(t,e)},n.prototype.handleChartTypeChange=function(e){var t,i;this.states.chartType=e,this.renderChart(),(i=(t=this.attributes)===null||t===void 0?void 0:t.onChartTypeChange)===null||i===void 0||i.call(t,e)},n.prototype.render=function(){var e=this.space,t=e.axisBBox,i=e.controllerBBox,a=e.timelineBBox;this.renderController(i),this.renderAxis(t),this.renderChart(a),this.states.state==="play"&&this.internalPlay()},n.prototype.destroy=function(){r.prototype.destroy.call(this),this.internalPause(!0)},n.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"}},n}(ml),$1e=k(69246),G1e=function(r,n,e,t){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(t.next(c))}catch(d){s(d)}}function l(c){try{u(t.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((t=t.apply(r,n||[])).next())})},z1e=function(r,n){var e={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&n.indexOf(t)<0&&(e[t]=r[t]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(r);i<t.length;i++)n.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(e[t[i]]=r[t[i]]);return e};const V1e=["timestamp","time","date","datetime"];class mw extends Fu{get padding(){return Kf(this.options.padding)}constructor(n,e){super(n,Object.assign({},mw.defaultOptions,e)),this.backup(),this.upsertTimebar()}play(){var n;(n=this.timebar)===null||n===void 0||n.play()}pause(){var n;(n=this.timebar)===null||n===void 0||n.pause()}forward(){var n;(n=this.timebar)===null||n===void 0||n.forward()}backward(){var n;(n=this.timebar)===null||n===void 0||n.backward()}reset(){var n;(n=this.timebar)===null||n===void 0||n.reset()}update(n){super.update(n),this.backup(),Object.keys(n).forEach(e=>{switch(e){case"position":this.upsertWrapper();break;default:this.upsertTimebar();break}})}backup(){this.originalData=hG(this.context.graph.getData())}upsertTimebar(){const{canvas:n}=this.context,e=this.options,{onChange:t,timebarType:i,data:a,x:s,y:o,width:l,height:u,mode:c}=e,d=z1e(e,["onChange","timebarType","data","x","y","width","height","mode"]),h=n.getSize(),[f]=this.padding;this.upsertCanvas().ready.then(()=>{var v;const g=Object.assign(Object.assign({x:h[0]/2-l/2,y:f,onChange:m=>{const y=((0,Ie.Z)(m)?m:[m,m]).map(w=>(0,$1e.Z)(w)?w.getTime():w);this.options.mode==="modify"?this.filterElements(y):this.hiddenElements(y),t==null||t(y)}},d),{data:a.map(m=>(0,pe.Z)(m)?{time:m,value:0}:m),width:l,height:u,type:i});this.timebar?this.timebar.update(g):(this.timebar=new B1e({style:g}),(v=this.canvas)===null||v===void 0||v.appendChild(this.timebar))})}upsertWrapper(){var n;if(!this.wrapper){const s=document.createElement("div");s.style.position="absolute",this.wrapper=s}const{x:e,y:t,className:i,position:a}=this.options;return i&&(this.wrapper.className=i),(0,pe.Z)(e)||(0,pe.Z)(t)?Object.assign(this.wrapper.style,{left:`${e!=null?e:0}px`,top:`${t!=null?t:0}px`}):Object.assign(this.wrapper.style,{[a==="top"?"bottom":"top"]:"unset",[a==="top"?"top":"bottom"]:"0px"}),(n=this.context.canvas.getContainer())===null||n===void 0||n.appendChild(this.wrapper),this.wrapper}upsertCanvas(){var n,e;const t=this.upsertWrapper();if(this.canvas)return this.canvas;const{height:i}=this.options,[a]=this.context.canvas.getSize(),[s,,o]=this.padding;return this.canvas=new $1({container:t,width:a,height:i+s+o,renderer:((e=(n=this.context.options).renderer)===null||e===void 0?void 0:e.call(n,"main"))||new qy,supportsMutipleCanvasesInOneContainer:!0}),this.canvas}filterElements(n){return G1e(this,void 0,void 0,function*(){var e;if(!this.originalData)return;const{elementTypes:t,getTime:i}=this.options,{graph:a,element:s}=this.context,o=hG(this.originalData);t.forEach(u=>{const c=`${u}s`;o[c]=(this.originalData[c]||[]).filter(d=>{const h=i(d);return!!fG(h,n)})});const l=[...o.nodes,...o.combos].map(u=>Ut(u));o.edges=o.edges.filter(u=>{const c=u.source,d=u.target;return l.includes(c)&&l.includes(d)}),a.setData(o),yield(e=s.draw({animation:!1,silence:!0}))===null||e===void 0?void 0:e.finished})}hiddenElements(n){const{graph:e}=this.context,{elementTypes:t,getTime:i}=this.options,a=[],s=[];t.forEach(o=>{var l;const u=`${o}s`;(((l=this.originalData)===null||l===void 0?void 0:l[u])||[]).forEach(d=>{const h=Ut(d),f=i(d);fG(f,n)?s.push(h):a.push(h)})}),e.hideElement(a,!1),e.showElement(s,!1)}destroy(){var n,e,t;const{graph:i}=this.context;this.originalData&&i.setData(Object.assign({},this.originalData)),(n=this.timebar)===null||n===void 0||n.destroy(),(e=this.canvas)===null||e===void 0||e.destroy(),(t=this.wrapper)===null||t===void 0||t.remove(),this.originalData=void 0,this.wrapper=void 0,this.timebar=void 0,this.canvas=void 0,super.destroy()}}mw.defaultOptions={position:"bottom",enable:!0,timebarType:"time",className:"g6-timebar",width:450,height:60,zIndex:3,elementTypes:["node"],padding:10,mode:"modify",getTime:r=>U1e(r,V1e,void 0),loop:!1};const hG=r=>{const{nodes:n=[],edges:e=[],combos:t=[]}=r;return{nodes:[...n],edges:[...e],combos:[...t]}},fG=(r,n)=>{if((0,pe.Z)(n))return r===n;const[e,t]=n;return r>=e&&r<=t},U1e=(r,n,e)=>{var t;for(let i=0;i<n.length;i++){const a=n[i],s=(t=r.data)===null||t===void 0?void 0:t[a];if(s)return s}return e};function j1e(r){const n={top:"unset",right:"unset",bottom:"unset",left:"unset"};return r.split("-").forEach(t=>{n[t]="8px"}),n.flexDirection=r.startsWith("top")||r.startsWith("bottom")?"row":"column",n}const H1e=`
|
|
|
.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;
|
|
|
}
|
|
|
`,W1e=`
|
|
|
<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 vG=function(r,n,e,t){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(t.next(c))}catch(d){s(d)}}function l(c){try{u(t.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((t=t.apply(r,n||[])).next())})};class pw extends Fu{constructor(n,e){super(n,Object.assign({},pw.defaultOptions,e)),this.$element=sx("toolbar",!1),this.onToolbarItemClick=i=>{const{onClick:a}=this.options;if(i.target instanceof Element&&i.target.className.includes("g6-toolbar-item")){const s=i.target.getAttribute("value");a==null||a(s,i.target)}};const t=this.context.canvas.getContainer();this.$element.style.display="flex",t.appendChild(this.$element),qM("g6-toolbar-css","style",{},H1e,document.head),qM("g6-toolbar-svgicon","div",{display:"none"},W1e),this.$element.addEventListener("click",this.onToolbarItemClick),this.update(e)}update(n){const e=Object.create(null,{update:{get:()=>super.update}});return vG(this,void 0,void 0,function*(){e.update.call(this,n);const{className:t,position:i,style:a}=this.options;this.$element.className=`g6-toolbar ${t||""}`,Object.assign(this.$element.style,a,j1e(i)),this.$element.innerHTML=yield this.getDOMContent()})}destroy(){this.$element.removeEventListener("click",this.onToolbarItemClick),this.$element.remove(),super.destroy()}getDOMContent(){return vG(this,void 0,void 0,function*(){return(yield this.options.getItems()).map(e=>`
|
|
|
<div class="g6-toolbar-item" value="${e.value}">
|
|
|
<svg aria-hidden="true" focusable="false">
|
|
|
<use xlink:href="#${e.id}"></use>
|
|
|
</svg>
|
|
|
</div>`).join("")})}}pw.defaultOptions={position:"top-left"};var gN=k(88204),Y1e=k(68856),gG=function(r,n){if(n==null){r.innerHTML="";return}r.replaceChildren?Array.isArray(n)?r.replaceChildren.apply(r,(0,Pe.ev)([],(0,Pe.CR)(n),!1)):r.replaceChildren(n):(r.innerHTML="",Array.isArray(n)?n.forEach(function(e){return r.appendChild(e)}):r.appendChild(n))};function _N(r){return r===void 0&&(r=""),{CONTAINER:"".concat(r,"tooltip"),TITLE:"".concat(r,"tooltip-title"),LIST:"".concat(r,"tooltip-list"),LIST_ITEM:"".concat(r,"tooltip-list-item"),NAME:"".concat(r,"tooltip-list-item-name"),MARKER:"".concat(r,"tooltip-list-item-marker"),NAME_LABEL:"".concat(r,"tooltip-list-item-name-label"),VALUE:"".concat(r,"tooltip-list-item-value"),CROSSHAIR_X:"".concat(r,"tooltip-crosshair-x"),CROSSHAIR_Y:"".concat(r,"tooltip-crosshair-y")}}var _G={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"};function Z1e(r){var n;r===void 0&&(r="");var e=_N(r);return n={},n[".".concat(e.CONTAINER)]={position:"absolute",visibility:"visible","z-index":8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)","background-color":"rgba(255, 255, 255, 0.96)","box-shadow":"0 6px 12px 0 rgba(0, 0, 0, 0.12)","border-radius":"4px",color:"rgba(0, 0, 0, 0.65)","font-size":"12px","line-height":"20px",padding:"12px","min-width":"120px","max-width":"360px","font-family":"Roboto-Regular"},n[".".concat(e.TITLE)]={color:"rgba(0, 0, 0, 0.45)"},n[".".concat(e.LIST)]={margin:"0px","list-style-type":"none",padding:"0px"},n[".".concat(e.LIST_ITEM)]={"list-style-type":"none",display:"flex","line-height":"2em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},n[".".concat(e.MARKER)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},n[".".concat(e.NAME)]={display:"flex","align-items":"center","max-width":"216px"},n[".".concat(e.NAME_LABEL)]=(0,Pe.pi)({flex:1},_G),n[".".concat(e.VALUE)]=(0,Pe.pi)({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},_G),n[".".concat(e.CROSSHAIR_X)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},n[".".concat(e.CROSSHAIR_Y)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},n}var X1e=function(r){(0,Pe.ZT)(n,r);function n(e){var t=this,i,a,s=(a=(i=e.style)===null||i===void 0?void 0:i.template)===null||a===void 0?void 0:a.prefixCls,o=_N(s);return t=r.call(this,e,{data:[],x:0,y:0,visibility:"visible",title:"",position:"bottom-right",offset:[5,5],enterable:!1,container:{x:0,y:0},bounding:null,template:{prefixCls:"",container:'<div class="'.concat(o.CONTAINER,'"></div>'),title:'<div class="'.concat(o.TITLE,'"></div>'),item:'<li class="'.concat(o.LIST_ITEM,`" data-index={index}>
|
|
|
<span class="`).concat(o.NAME,`">
|
|
|
<span class="`).concat(o.MARKER,`" style="background:{color}"></span>
|
|
|
<span class="`).concat(o.NAME_LABEL,`" title="{name}">{name}</span>
|
|
|
</span>
|
|
|
<span class="`).concat(o.VALUE,`" title="{value}">{value}</span>
|
|
|
</li>`)},style:Z1e(s)})||this,t.timestamp=-1,t.prevCustomContentKey=t.attributes.contentKey,t.initShape(),t.render(t.attributes,t),t}return Object.defineProperty(n.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),n.prototype.getContainer=function(){return this.element},Object.defineProperty(n.prototype,"elementSize",{get:function(){var e=this.element.offsetWidth,t=this.element.offsetHeight;return{width:e,height:t}},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"HTMLTooltipItemsElements",{get:function(){var e=this.attributes,t=e.data,i=e.template;return t.map(function(a,s){var o=a.name,l=o===void 0?"":o,u=a.color,c=u===void 0?"black":u,d=a.index,h=(0,Pe._T)(a,["name","color","index"]),f=(0,Pe.pi)({name:l,color:c,index:d!=null?d:s},h);return(0,gN.L)((0,Y1e.Z)(i.item,f))})},enumerable:!1,configurable:!0}),n.prototype.render=function(e,t){this.renderHTMLTooltipElement(),this.updatePosition()},n.prototype.destroy=function(){var e;(e=this.element)===null||e===void 0||e.remove(),r.prototype.destroy.call(this)},n.prototype.show=function(e,t){var i=this;if(e!==void 0&&t!==void 0){var a=this.element.style.visibility==="hidden",s=function(){i.attributes.x=e!=null?e:i.attributes.x,i.attributes.y=t!=null?t:i.attributes.y,i.updatePosition()};a?this.closeTransition(s):s()}this.element.style.visibility="visible"},n.prototype.hide=function(e,t){e===void 0&&(e=0),t===void 0&&(t=0);var i=this.attributes.enterable;i&&this.isCursorEntered(e,t)||(this.element.style.visibility="hidden")},n.prototype.initShape=function(){var e=this.attributes.template;this.element=(0,gN.L)(e.container),this.id&&this.element.setAttribute("id",this.id)},n.prototype.renderCustomContent=function(){if(!(this.prevCustomContentKey!==void 0&&this.prevCustomContentKey===this.attributes.contentKey)){this.prevCustomContentKey=this.attributes.contentKey;var e=this.attributes.content;e&&(typeof e=="string"?this.element.innerHTML=e:gG(this.element,e))}},n.prototype.renderHTMLTooltipElement=function(){var e,t,i=this.attributes,a=i.template,s=i.title,o=i.enterable,l=i.style,u=i.content,c=_N(a.prefixCls),d=this.element;if(this.element.style.pointerEvents=o?"auto":"none",u)this.renderCustomContent();else{s?(d.innerHTML=a.title,d.getElementsByClassName(c.TITLE)[0].innerHTML=s):(t=(e=d.getElementsByClassName(c.TITLE))===null||e===void 0?void 0:e[0])===null||t===void 0||t.remove();var h=this.HTMLTooltipItemsElements,f=document.createElement("ul");f.className=c.LIST,gG(f,h);var v=this.element.querySelector(".".concat(c.LIST));v?v.replaceWith(f):d.appendChild(f)}eye(d,l)},n.prototype.getRelativeOffsetFromCursor=function(e){var t=this.attributes,i=t.position,a=t.offset,s=e||i,o=s.split("-"),l={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},u=this.elementSize,c=u.width,d=u.height,h=[-c/2,-d/2];return o.forEach(function(f){var v=(0,Pe.CR)(h,2),g=v[0],m=v[1],y=(0,Pe.CR)(l[f],2),w=y[0],T=y[1];h=[g+(c/2+a[0])*w,m+(d/2+a[1])*T]}),h},n.prototype.setOffsetPosition=function(e){var t=(0,Pe.CR)(e,2),i=t[0],a=t[1],s=this.attributes,o=s.x,l=o===void 0?0:o,u=s.y,c=u===void 0?0:u,d=s.container,h=d.x,f=d.y;this.element.style.left="".concat(+l+h+i,"px"),this.element.style.top="".concat(+c+f+a,"px")},n.prototype.updatePosition=function(){var e=this.attributes.showDelay,t=e===void 0?60:e,i=Date.now();this.timestamp>0&&i-this.timestamp<t||(this.timestamp=i,this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor())))},n.prototype.autoPosition=function(e){var t=(0,Pe.CR)(e,2),i=t[0],a=t[1],s=this.attributes,o=s.x,l=s.y,u=s.bounding,c=s.position;if(!u)return[i,a];var d=this.element,h=d.offsetWidth,f=d.offsetHeight,v=(0,Pe.CR)([+o+i,+l+a],2),g=v[0],m=v[1],y={left:"right",right:"left",top:"bottom",bottom:"top"},w=u.x,T=u.y,G=u.width,x=u.height,_={left:g<w,right:g+h>w+G,top:m<T,bottom:m+f>T+x},p=[];c.split("-").forEach(function(R){_[R]?p.push(y[R]):p.push(R)});var b=p.join("-");return this.getRelativeOffsetFromCursor(b)},n.prototype.isCursorEntered=function(e,t){if(this.element){var i=this.element.getBoundingClientRect(),a=i.x,s=i.y,o=i.width,l=i.height;return new sl(a,s,o,l).isPointIn(e,t)}return!1},n.prototype.closeTransition=function(e){var t=this,i=this.element.style.transition;this.element.style.transition="none",e(),setTimeout(function(){t.element.style.transition=i},10)},n.tag="tooltip",n}(ml);class yw extends Fu{constructor(n,e){super(n,Object.assign({},yw.defaultOptions,e)),this.currentTarget=null,this.tooltipElement=null,this.container=null,this.isEnable=t=>{const{enable:i}=this.options;return typeof i=="function"?i(t):i},this.onClick=t=>{const{target:{id:i}}=t;this.currentTarget===i?(this.hide(t),this.currentTarget=null):(this.currentTarget=i,this.show(t))},this.onPointerMove=t=>{const{target:i}=t;!this.currentTarget||i.id===this.currentTarget||this.show(t)},this.onPointerLeave=t=>{this.hide(t),this.currentTarget=null},this.onCanvasMove=t=>{this.hide(t),this.currentTarget=null},this.onPointerEnter=t=>{this.show(t)},this.showById=t=>{const i={target:{id:t}};this.show(i)},this.getElementData=(t,i)=>{const{model:a}=this.context;switch(i){case"node":return a.getNodeData([t]);case"edge":return a.getEdgeData([t]);case"combo":return a.getComboData([t]);default:return[]}},this.show=t=>{const{client:i,target:{id:a}}=t;if(Zb(t.target)||!this.tooltipElement||!this.isEnable(t))return;const s=this.context.graph.getElementType(a),{getContent:o,title:l}=this.options;this.currentTarget=a;const u=this.getElementData(a,s);let c,d;if(i)c=i.x,d=i.y;else{const f=(0,nc.Z)(u,"0.style",{x:0,y:0});c=f.x,d=f.y}let h={};if(o)h.content=o(t,u);else{const f=this.context.graph.getElementRenderStyle(a),v=s==="node"?f.fill:f.stroke;h={title:l||s,data:u.map(g=>({name:"ID",value:g.id||`${g.source} -> ${g.target}`,color:v}))}}this.tooltipElement.update(Object.assign(Object.assign(Object.assign({},this.tooltipStyleProps),{x:c,y:d,style:{".tooltip":{visibility:"visible"}}}),h))},this.hide=t=>{var i;if(!t){(i=this.tooltipElement)===null||i===void 0||i.hide();return}if(!this.tooltipElement||!this.currentTarget)return;const{client:{x:a,y:s}}=t;this.tooltipElement.hide(a,s)},this.initTooltip=()=>{var t;const i=new X1e({className:"tooltip",style:this.tooltipStyleProps});return(t=this.container)===null||t===void 0||t.appendChild(i.HTMLTooltipElement),i},this.render(),this.bindEvents()}getEvents(){return this.options.trigger==="click"?{"node:click":this.onClick,"edge:click":this.onClick,"combo:click":this.onClick,"canvas:click":this.onPointerLeave,contextmenu:this.onPointerLeave,drag:this.onPointerLeave}:{"node:pointerenter":this.onPointerEnter,"node:pointermove":this.onPointerMove,"canvas:pointermove":this.onCanvasMove,"edge:pointerenter":this.onPointerEnter,"edge:pointermove":this.onPointerMove,"combo:pointerenter":this.onPointerEnter,"combo:pointermove":this.onPointerMove,contextmenu:this.onPointerLeave,"node:drag":this.onPointerLeave}}update(n){var e;this.unbindEvents(),super.update(n),this.tooltipElement&&((e=this.container)===null||e===void 0||e.removeChild(this.tooltipElement.HTMLTooltipElement)),this.tooltipElement=this.initTooltip(),this.bindEvents()}render(){const{canvas:n}=this.context,e=n.getContainer();e&&(this.container=e,this.tooltipElement=this.initTooltip())}unbindEvents(){const{graph:n}=this.context,e=this.getEvents();Object.keys(e).forEach(t=>{n.off(t,e[t])})}bindEvents(){const{graph:n}=this.context,e=this.getEvents();Object.keys(e).forEach(t=>{n.on(t,e[t])})}get tooltipStyleProps(){const{canvas:n}=this.context,{center:e}=n.getBounds(),t=n.getContainer(),{top:i,left:a}=t.getBoundingClientRect(),{style:s,position:o,enterable:l,container:u={x:-a,y:-i},title:c,offset:d}=this.options,[h,f]=e,[v,g]=n.getSize();return{x:h,y:f,container:u,title:c,bounding:{x:0,y:0,width:v,height:g},position:o,enterable:l,offset:d,style:s}}destroy(){var n;this.unbindEvents(),this.tooltipElement&&((n=this.container)===null||n===void 0||n.removeChild(this.tooltipElement.HTMLTooltipElement)),super.destroy()}}yw.defaultOptions={trigger:"hover",position:"top-right",enterable:!1,enable:!0,offset:[10,10],style:{".tooltip":{visibility:"hidden"}}};var mG=function(r,n,e,t){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(t.next(c))}catch(d){s(d)}}function l(c){try{u(t.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((t=t.apply(r,n||[])).next())})};let u0;function pG(r,n){return u0||(u0=document.createElement("canvas")),u0.width=r,u0.height=n,u0.getContext("2d").clearRect(0,0,r,n),u0}function K1e(r,n,e,t){return mG(this,void 0,void 0,function*(){const i=pG(r,n),a=i.getContext("2d"),{rotate:s,opacity:o,textFill:l,textFontSize:u,textFontFamily:c,textFontVariant:d,textFontWeight:h,textAlign:f,textBaseline:v}=t;return a.textAlign=f,a.textBaseline=v,a.translate(r/2,n/2),a.font=`${u}px ${c} ${d} ${h}`,s&&a.rotate(s),o&&(a.globalAlpha=o),l&&(a.fillStyle=l,a.fillText(`${e}`,0,0)),i.toDataURL()})}function J1e(r,n,e,t){return mG(this,void 0,void 0,function*(){const i=pG(r,n),a=i.getContext("2d"),{rotate:s,opacity:o}=t;s&&a.rotate(s),o&&(a.globalAlpha=o);const l=new Image;return l.crossOrigin="anonymous",l.src=e,new Promise(u=>{l.onload=function(){const c=r>l.width?(r-l.width)/2:0,d=n>l.height?(n-l.height)/2:0;a.drawImage(l,0,0,l.width,l.height,c,d,r-c*2,n-d*2),u(i.toDataURL())}})})}var Q1e=function(r,n,e,t){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(t.next(c))}catch(d){s(d)}}function l(c){try{u(t.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((t=t.apply(r,n||[])).next())})},q1e=function(r,n){var e={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&n.indexOf(t)<0&&(e[t]=r[t]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(r);i<t.length;i++)n.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(e[t[i]]=r[t[i]]);return e};class xw extends Fu{constructor(n,e){super(n,Object.assign({},xw.defaultOptions,e)),this.$element=sx("watermark"),this.context.canvas.getContainer().appendChild(this.$element),this.update(e)}update(n){const e=Object.create(null,{update:{get:()=>super.update}});return Q1e(this,void 0,void 0,function*(){e.update.call(this,n);const t=this.options,{width:i,height:a,text:s,imageURL:o}=t,l=q1e(t,["width","height","text","imageURL"]);Object.keys(l).forEach(c=>{c.startsWith("background")&&(this.$element.style[c]=n[c])});const u=o?yield J1e(i,a,o,l):yield K1e(i,a,s,l);this.$element.style.backgroundImage=`url(${u})`})}destroy(){super.destroy(),this.$element.remove()}}xw.defaultOptions={width:200,height:100,opacity:.2,rotate:Math.PI/12,text:"",textFill:"#000",textFontSize:16,textAlign:"center",textBaseline:"middle",backgroundRepeat:"repeat"};const eEe=["#7E92B5","#F4664A","#FFBE3A"],tEe={type:"group",color:["#1783FF","#00C9C9","#F08F56","#D580FF","#7863FF","#DB9D0D","#60C42D","#FF80CA","#2491B3","#17C76F"]},nEe={type:"group",color:["#99ADD1","#1783FF","#00C9C9","#F08F56","#D580FF","#7863FF","#DB9D0D","#60C42D","#FF80CA","#2491B3","#17C76F"]};function yG(r){const{bgColor:n,textColor:e,nodeColor:t,nodeColorDisabled:i,nodeStroke:a,nodeHaloStrokeOpacityActive:s=.15,nodeHaloStrokeOpacitySelected:o=.25,nodeOpacityDisabled:l=.06,nodeIconOpacityInactive:u=.85,nodeOpacityInactive:c=.25,nodeBadgePalette:d=eEe,nodePaletteOptions:h=tEe,edgeColor:f,edgeColorDisabled:v,edgePaletteOptions:g=nEe,comboColor:m,comboColorDisabled:y,comboStroke:w,comboStrokeDisabled:T,edgeColorInactive:G}=r;return{background:n,node:{palette:h,style:{donutOpacity:1,badgeBackgroundOpacity:1,badgeFill:"#fff",badgeFontSize:8,badgePadding:[0,4],badgePalette:d,fill:t,fillOpacity:1,halo:!1,iconFill:"#fff",iconOpacity:1,labelBackground:!1,labelBackgroundFill:n,labelBackgroundLineWidth:0,labelBackgroundOpacity:.75,labelFill:e,labelFillOpacity:.85,labelLineHeight:16,labelPadding:[0,2],labelFontSize:12,labelFontWeight:400,labelOpacity:1,labelOffsetY:2,lineWidth:0,portFill:t,portLineWidth:1,portStroke:a,portStrokeOpacity:.65,size:32,stroke:a,strokeOpacity:1,zIndex:2},state:{selected:{halo:!0,haloLineWidth:24,haloStrokeOpacity:o,labelFontSize:12,labelFontWeight:"bold",lineWidth:4,stroke:a},active:{halo:!0,haloLineWidth:12,haloStrokeOpacity:s},highlight:{labelFontWeight:"bold",lineWidth:4,stroke:a,strokeOpacity:.85},inactive:{badgeBackgroundOpacity:c,donutOpacity:c,fillOpacity:c,iconOpacity:u,labelFill:e,labelFillOpacity:c,strokeOpacity:c},disabled:{badgeBackgroundOpacity:.25,donutOpacity:l,fill:i,fillOpacity:l,iconFill:i,iconOpacity:.25,labelFill:e,labelFillOpacity:.25,strokeOpacity:l}},animation:{enter:"fade",exit:"fade",show:"fade",hide:"fade",expand:"node-expand",collapse:"node-collapse",update:[{fields:["x","y","fill","stroke"]}],translate:[{fields:["x","y"]}]}},edge:{palette:g,style:{badgeBackgroundFill:f,badgeFill:"#fff",badgeFontSize:8,badgeOffsetX:10,fillOpacity:1,halo:!1,haloLineWidth:12,haloStrokeOpacity:1,increasedLineWidthForHitTesting:2,labelBackground:!1,labelBackgroundFill:n,labelBackgroundLineWidth:0,labelBackgroundOpacity:.75,labelBackgroundPadding:[4,4,4,4],labelFill:e,labelFontSize:12,labelFontWeight:400,labelOpacity:1,labelPlacement:"center",labelTextBaseline:"middle",lineWidth:1,stroke:f,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:G,fillOpacity:.08,labelOpacity:.25,strokeOpacity:.08,badgeBackgroundOpacity:.25},disabled:{stroke:v,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:n,collapsedMarkerFontSize:12,collapsedMarkerFillOpacity:1,collapsedSize:32,collapsedFillOpacity:1,fill:m,halo:!1,haloLineWidth:12,haloStroke:w,haloStrokeOpacity:.25,labelBackground:!1,labelBackgroundFill:n,labelBackgroundLineWidth:0,labelBackgroundOpacity:.75,labelBackgroundPadding:[2,4,2,4],labelFill:e,labelFontSize:12,labelFontWeight:400,labelOpacity:1,lineDash:0,lineWidth:1,fillOpacity:.04,strokeOpacity:1,padding:10,stroke:w},state:{selected:{halo:!0,labelFontSize:14,labelFontWeight:700,lineWidth:4},active:{halo:!0},highlight:{labelFontWeight:700,lineWidth:4},inactive:{fillOpacity:.65,labelOpacity:.25,strokeOpacity:.65},disabled:{fill:y,fillOpacity:.25,labelOpacity:.25,stroke:T,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 rEe=yG({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"}),iEe=yG({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 Hg extends dT{beforeDraw(n,e){return n}afterLayout(){}}class aEe extends Hg{beforeDraw(n){const{model:e}=this.context,t=n.add.combos,i=a=>{const s=[];return a.forEach((o,l)=>{const c=e.getAncestorsData(l,"combo").map(d=>Ut(d)).reverse();s.push([l,o,c.length])}),new Map(s.sort(([,,o],[,,l])=>l-o).map(([o,l])=>[o,l]))};return n.add.combos=i(t),n.update.combos=i(n.update.combos),n}}function Rd(r,n,e,t,i){const a=Ut(t),s=`${e}s`,o=i?t:r.add[s].get(a)||r.update[s].get(a)||r.remove[s].get(a)||t;Object.entries(r).forEach(([l,u])=>{n===l?u[s].set(a,o):u[s].delete(a)})}function Ew(r,n){return Object.keys(r).every(e=>r[e]===n[e])}class sEe extends Hg{beforeDraw(n,e){if(e.stage==="visibility"||!this.context.model.model.hasTreeStructure(Ls))return n;const{model:t}=this.context,{add:i,update:a}=n,s=[...n.update.combos.entries(),...n.add.combos.entries()];for(;s.length;){const[o,l]=s.pop();if(Ed(l)){const u=t.getDescendantsData(o),c=u.map(Ut),{internal:d,external:h}=PM(c,f=>t.getRelatedEdgesData(f));u.forEach(f=>{const v=Ut(f),g=s.findIndex(([y])=>y===v);g!==-1&&s.splice(g,1);const m=t.getElementType(v);Rd(n,"remove",m,f)}),d.forEach(f=>Rd(n,"remove","edge",f)),h.forEach(f=>{var v;const g=Ut(f);((v=this.context.element)===null||v===void 0?void 0:v.getElement(g))?a.edges.set(g,f):i.edges.set(g,f)})}else{const u=t.getChildrenData(o),c=u.map(Ut),{edges:d}=PM(c,h=>t.getRelatedEdgesData(h));[...u,...d].forEach(h=>{var f;const v=Ut(h),g=t.getElementType(v);((f=this.context.element)===null||f===void 0?void 0:f.getElement(v))?Rd(n,"update",g,h):Rd(n,"add",g,h),g==="combo"&&s.push([v,h])})}}return n}}const xG=(r,n,e,t)=>{const i=`${e}s`,a=Ut(t);!r.add[i].has(a)&&!r.update[i].has(a)&&r[n][i].set(Ut(t),t)};class oEe extends Hg{getElement(n){return this.context.element.getElement(n)}handleExpand(n,e){if(xG(e,"add","node",n),Ed(n))return;const t=Ut(n);xG(e,"add","node",n),this.context.model.getRelatedEdgesData(t,"out").forEach(s=>{Rd(e,"add","edge",s)}),this.context.model.getChildrenData(t).forEach(s=>{this.handleExpand(s,e)})}beforeDraw(n){const{graph:e,model:t}=this.context;if(!t.model.hasTreeStructure(Hh))return n;const{add:{nodes:i,edges:a},update:{nodes:s}}=n,o=new Map,l=new Map;i.forEach((c,d)=>{Ed(c)&&o.set(d,c)}),a.forEach(c=>{if(e.getElementType(c.source)!=="node")return;const d=e.getNodeData(c.source);Ed(d)&&o.set(c.source,d)}),s.forEach((c,d)=>{const h=this.getElement(d);if(!h)return;const f=h.attributes.collapsed;Ed(c)?f||o.set(d,c):f&&l.set(d,c)});const u=new Set;return o.forEach((c,d)=>{t.getDescendantsData(d).forEach(f=>{const v=Ut(f);if(u.has(v))return;Rd(n,"remove","node",f),t.getRelatedEdgesData(v).forEach(m=>{Rd(n,"remove","edge",m)}),u.add(v)})}),l.forEach((c,d)=>{if(t.getAncestorsData(d,Hh).some(Ed)){Rd(n,"remove","node",c);return}this.handleExpand(c,n)}),n}}function lEe(r,n,e,t=!1){const i=aT[r][n];!t&&i?i!==e&&Gc.warn(`The extension ${n} of ${r} has been registered before.`):Object.assign(aT[r],{[n]:e})}class bw{constructor(n){this.type=n}}class ku extends bw{constructor(n,e){super(n),this.data=e}}class ph extends bw{constructor(n,e,t,i){super(n),this.animationType=e,this.animation=t,this.data=i}}class c0 extends bw{constructor(n,e,t){super(n),this.elementType=e,this.data=t}}class kw extends bw{constructor(n,e){super(n),this.data=e}}function $u(r,n){r.emit(n.type,n)}function uEe(r){if(!r)return null;if(r instanceof RA)return{type:"canvas",element:r};let n=r;for(;n;){if(tx(n))return{type:"node",element:n};if(t5(n))return{type:"edge",element:n};if(NM(n))return{type:"combo",element:n};n=n.parentElement}return null}const d0="cachedStyle",ww=r=>`__${r}__`;function cEe(r,n){const e=Array.isArray(n)?n:[n];(0,nc.Z)(r,d0)||(0,hp.Z)(r,d0,{}),e.forEach(t=>{(0,hp.Z)((0,nc.Z)(r,d0),ww(t),r.attributes[t])})}function EG(r,n){return(0,nc.Z)(r,[d0,ww(n)])}function dEe(r,n){return ww(n)in((0,nc.Z)(r,d0)||{})}function mLe(r,n,e){set(r,[d0,ww(n)],e)}class hEe{constructor(n){this.tasks=[],this.animations=new Set,this.context=n}getTasks(){const n=[...this.tasks];return this.tasks=[],n}add(n,e){this.tasks.push([n,e])}animate(n,e,t){var i,a,s;(i=e==null?void 0:e.before)===null||i===void 0||i.call(e);const o=this.getTasks().map(([u,c])=>{var d,h,f;const{element:v,elementType:g,stage:m}=u,y=cJ(this.context.options,g,m,n);(d=c==null?void 0:c.before)===null||d===void 0||d.call(c);const w=hJ(v,this.inferStyle(u,t),y);return w?((h=c==null?void 0:c.beforeAnimate)===null||h===void 0||h.call(c,w),w.finished.then(()=>{var T,G;(T=c==null?void 0:c.afterAnimate)===null||T===void 0||T.call(c,w),(G=c==null?void 0:c.after)===null||G===void 0||G.call(c),this.animations.delete(w)})):(f=c==null?void 0:c.after)===null||f===void 0||f.call(c),w}).filter(Boolean);o.forEach(u=>this.animations.add(u));const l=sT(o);return l?((a=e==null?void 0:e.beforeAnimate)===null||a===void 0||a.call(e,l),l.finished.then(()=>{var u,c;(u=e==null?void 0:e.afterAnimate)===null||u===void 0||u.call(e,l),(c=e==null?void 0:e.after)===null||c===void 0||c.call(e),this.release()})):(s=e==null?void 0:e.after)===null||s===void 0||s.call(e),l}inferStyle(n,e){var t,i;const{element:a,elementType:s,stage:o,originalStyle:l,modifiedStyle:u}=n,c={},d={};if(o==="enter")Object.assign(c,{opacity:0});else if(o==="exit")Object.assign(d,{opacity:0});else if(o==="show")Object.assign(c,{opacity:0}),Object.assign(d,{opacity:(t=EG(a,"opacity"))!==null&&t!==void 0?t:uy("opacity")});else if(o==="hide")Object.assign(c,{opacity:(i=EG(a,"opacity"))!==null&&i!==void 0?i:uy("opacity")}),Object.assign(d,{opacity:0});else if(o==="collapse"){const{collapse:h}=e||{},{target:f,descendants:v,position:g}=h;if(s==="node"){if(v.includes(a.id)){const[m,y,w]=g;Object.assign(d,{x:m,y,z:w})}}else if(s==="combo"){if(a.id===f||v.includes(a.id)){const[m,y]=g;Object.assign(d,{x:m,y,childrenNode:l.childrenNode})}}else s==="edge"&&Object.assign(d,{sourceNode:u.sourceNode,targetNode:u.targetNode})}else if(o==="expand"){const{expand:h}=e||{},{target:f,descendants:v,position:g}=h;if(s==="node"){if(a.id===f||v.includes(a.id)){const[m,y,w]=g;Object.assign(c,{x:m,y,z:w})}}else if(s==="combo"){if(a.id===f||v.includes(a.id)){const[m,y,w]=g;Object.assign(c,{x:m,y,z:w,childrenNode:u.childrenNode})}}else s==="edge"&&Object.assign(c,{sourceNode:u.sourceNode,targetNode:u.targetNode})}return[Object.keys(c).length>0?Object.assign({},l,c):l,Object.keys(d).length>0?Object.assign({},u,d):u]}stop(){this.animations.forEach(n=>n.cancel())}clear(){this.tasks=[]}release(){var n,e;const{canvas:t}=this.context,i=(e=(n=t.document)===null||n===void 0?void 0:n.timeline)===null||e===void 0?void 0:e.animationsWithPromises;i&&(t.document.timeline.animationsWithPromises=i.filter(a=>a.playState!=="finished"))}destroy(){this.stop(),this.animations.clear(),this.tasks=[]}}class fEe{constructor(n){this.batchCount=0,this.context=n}emit(n){const{graph:e}=this.context;e.emit(n.type,n)}startBatch(n=!0){this.batchCount++,this.batchCount===1&&this.emit(new ku(qn.BATCH_START,{initiate:n}))}endBatch(){this.batchCount--,this.batchCount===0&&this.emit(new ku(qn.BATCH_END))}get isBatching(){return this.batchCount>0}destroy(){this.context=null}}class vEe extends cT{constructor(n){super(n),this.currentTarget=null,this.currentTargetType=null,this.category="behavior",this.forwardCanvasEvents=e=>{const{target:t}=e,i=uEe(t);if(!i)return;const{graph:a,canvas:s}=this.context,{type:o,element:l}=i;if("destroyed"in l&&(Zb(l)||l.destroyed))return;const{type:u,detail:c,button:d}=e,h=Object.assign(Object.assign({},e),{target:l,targetType:o,originalTarget:t});u===un.POINTER_MOVE&&(this.currentTarget!==l&&(this.currentTarget&&a.emit(`${this.currentTargetType}:${un.POINTER_LEAVE}`,Object.assign(Object.assign({},h),{type:un.POINTER_LEAVE,target:this.currentTarget,targetType:this.currentTargetType})),l&&(Object.assign(h,{type:un.POINTER_ENTER}),a.emit(`${o}:${un.POINTER_ENTER}`,h))),this.currentTarget=l,this.currentTargetType=o),u===un.CLICK&&d===2||(a.emit(`${o}:${u}`,h),a.emit(u,h)),u===un.CLICK&&c===2&&(Object.assign(h,{type:un.DBLCLICK}),a.emit(`${o}:${un.DBLCLICK}`,h),a.emit(un.DBLCLICK,h)),u===un.POINTER_DOWN&&d===2&&(Object.assign(h,{type:un.CONTEXT_MENU,preventDefault:()=>{var f;(f=s.getContainer())===null||f===void 0||f.addEventListener(un.CONTEXT_MENU,v=>v.preventDefault(),{once:!0})}}),a.emit(`${o}:${un.CONTEXT_MENU}`,h),a.emit(un.CONTEXT_MENU,h))},this.forwardContainerEvents=e=>{this.context.graph.emit(e.type,e)},this.forwardEvents(),this.setBehaviors(this.context.options.behaviors||[])}setBehaviors(n){this.setExtensions(n)}forwardEvents(){const n=this.context.canvas.getContainer();n&&[lp.KEY_DOWN,lp.KEY_UP].forEach(t=>{n.addEventListener(t,this.forwardContainerEvents)});const e=this.context.canvas.document;e&&[un.CLICK,un.DBLCLICK,un.POINTER_OVER,un.POINTER_LEAVE,un.POINTER_ENTER,un.POINTER_MOVE,un.POINTER_OUT,un.POINTER_DOWN,un.POINTER_UP,un.CONTEXT_MENU,un.DRAG_START,un.DRAG,un.DRAG_END,un.DRAG_ENTER,un.DRAG_OVER,un.DRAG_LEAVE,un.DROP,un.WHEEL].forEach(t=>{e.addEventListener(t,this.forwardCanvasEvents)})}destroy(){const n=this.context.canvas.getContainer();n&&[lp.KEY_DOWN,lp.KEY_UP].forEach(e=>{n.removeEventListener(e,this.forwardContainerEvents)}),this.context.canvas.document.removeAllEventListeners(),super.destroy()}}function Wg(r){"@babel/helpers - typeof";return Wg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Wg(r)}function gEe(r,n){if(Wg(r)!="object"||!r)return r;var e=r[Symbol.toPrimitive];if(e!==void 0){var t=e.call(r,n||"default");if(Wg(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(r)}function bG(r){var n=gEe(r,"string");return Wg(n)=="symbol"?n:n+""}function ya(r,n,e){return(n=bG(n))in r?Object.defineProperty(r,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[n]=e,r}function kG(r,n){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);n&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),e.push.apply(e,t)}return e}function ol(r){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?kG(Object(e),!0).forEach(function(t){ya(r,t,e[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(e)):kG(Object(e)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))})}return r}function Nr(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}function wG(r,n){for(var e=0;e<n.length;e++){var t=n[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(r,bG(t.key),t)}}function Or(r,n,e){return n&&wG(r.prototype,n),e&&wG(r,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function h0(r){return h0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},h0(r)}function SG(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(n){}return(SG=function(){return!!r})()}function _Ee(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function mEe(r,n){if(n&&(Wg(n)=="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _Ee(r)}function no(r,n,e){return n=h0(n),mEe(r,SG()?Reflect.construct(n,e||[],h0(r).constructor):n.apply(r,e))}function mN(r,n){return mN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},mN(r,n)}function ro(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(n&&n.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),n&&mN(r,n)}function pN(r,n){(n==null||n>r.length)&&(n=r.length);for(var e=0,t=Array(n);e<n;e++)t[e]=r[e];return t}function pEe(r){if(Array.isArray(r))return pN(r)}function yEe(r){if(typeof Symbol!="undefined"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function yN(r,n){if(r){if(typeof r=="string")return pN(r,n);var e={}.toString.call(r).slice(8,-1);return e==="Object"&&r.constructor&&(e=r.constructor.name),e==="Map"||e==="Set"?Array.from(r):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?pN(r,n):void 0}}function xEe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zl(r){return pEe(r)||yEe(r)||yN(r)||xEe()}function EEe(r){if(Array.isArray(r))return r}function bEe(r,n){var e=r==null?null:typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(e!=null){var t,i,a,s,o=[],l=!0,u=!1;try{if(a=(e=e.call(r)).next,n===0){if(Object(e)!==e)return;l=!1}else for(;!(l=(t=a.call(e)).done)&&(o.push(t.value),o.length!==n);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&e.return!=null&&(s=e.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function kEe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ll(r,n){return EEe(r)||bEe(r,n)||yN(r,n)||kEe()}function wEe(r,n){for(;!{}.hasOwnProperty.call(r,n)&&(r=h0(r))!==null;);return r}function xN(){return xN=typeof Reflect!="undefined"&&Reflect.get?Reflect.get.bind():function(r,n,e){var t=wEe(r,n);if(t){var i=Object.getOwnPropertyDescriptor(t,n);return i.get?i.get.call(arguments.length<3?r:e):i.value}},xN.apply(null,arguments)}function TG(r,n,e,t){var i=xN(h0(1&t?r.prototype:r),n,e);return 2&t&&typeof i=="function"?function(a){return i.apply(e,a)}:i}function EN(r,n,e){r.prototype=n.prototype=e,e.constructor=r}function CG(r,n){var e=Object.create(r.prototype);for(var t in n)e[t]=n[t];return e}function Px(){}var Nx=.7,Sw=1/Nx,f0="\\s*([+-]?\\d+)\\s*",Ox="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",yv="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",SEe=/^#([0-9a-f]{3,8})$/,TEe=new RegExp(`^rgb\\(${f0},${f0},${f0}\\)$`),CEe=new RegExp(`^rgb\\(${yv},${yv},${yv}\\)$`),MEe=new RegExp(`^rgba\\(${f0},${f0},${f0},${Ox}\\)$`),PEe=new RegExp(`^rgba\\(${yv},${yv},${yv},${Ox}\\)$`),NEe=new RegExp(`^hsl\\(${Ox},${yv},${yv}\\)$`),OEe=new RegExp(`^hsla\\(${Ox},${yv},${yv},${Ox}\\)$`),MG={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};EN(Px,Tw,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:PG,formatHex:PG,formatHex8:REe,formatHsl:AEe,formatRgb:NG,toString:NG});function PG(){return this.rgb().formatHex()}function REe(){return this.rgb().formatHex8()}function AEe(){return IG(this).formatHsl()}function NG(){return this.rgb().formatRgb()}function Tw(r){var n,e;return r=(r+"").trim().toLowerCase(),(n=SEe.exec(r))?(e=n[1].length,n=parseInt(n[1],16),e===6?OG(n):e===3?new ad(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):e===8?Cw(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):e===4?Cw(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=TEe.exec(r))?new ad(n[1],n[2],n[3],1):(n=CEe.exec(r))?new ad(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=MEe.exec(r))?Cw(n[1],n[2],n[3],n[4]):(n=PEe.exec(r))?Cw(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=NEe.exec(r))?LG(n[1],n[2]/100,n[3]/100,1):(n=OEe.exec(r))?LG(n[1],n[2]/100,n[3]/100,n[4]):MG.hasOwnProperty(r)?OG(MG[r]):r==="transparent"?new ad(NaN,NaN,NaN,0):null}function OG(r){return new ad(r>>16&255,r>>8&255,r&255,1)}function Cw(r,n,e,t){return t<=0&&(r=n=e=NaN),new ad(r,n,e,t)}function LEe(r){return r instanceof Px||(r=Tw(r)),r?(r=r.rgb(),new ad(r.r,r.g,r.b,r.opacity)):new ad}function IEe(r,n,e,t){return arguments.length===1?LEe(r):new ad(r,n,e,t==null?1:t)}function ad(r,n,e,t){this.r=+r,this.g=+n,this.b=+e,this.opacity=+t}EN(ad,IEe,CG(Px,{brighter(r){return r=r==null?Sw:Math.pow(Sw,r),new ad(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?Nx:Math.pow(Nx,r),new ad(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new ad(pm(this.r),pm(this.g),pm(this.b),Mw(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:RG,formatHex:RG,formatHex8:DEe,formatRgb:AG,toString:AG}));function RG(){return`#${ym(this.r)}${ym(this.g)}${ym(this.b)}`}function DEe(){return`#${ym(this.r)}${ym(this.g)}${ym(this.b)}${ym((isNaN(this.opacity)?1:this.opacity)*255)}`}function AG(){const r=Mw(this.opacity);return`${r===1?"rgb(":"rgba("}${pm(this.r)}, ${pm(this.g)}, ${pm(this.b)}${r===1?")":`, ${r})`}`}function Mw(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function pm(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function ym(r){return r=pm(r),(r<16?"0":"")+r.toString(16)}function LG(r,n,e,t){return t<=0?r=n=e=NaN:e<=0||e>=1?r=n=NaN:n<=0&&(r=NaN),new bf(r,n,e,t)}function IG(r){if(r instanceof bf)return new bf(r.h,r.s,r.l,r.opacity);if(r instanceof Px||(r=Tw(r)),!r)return new bf;if(r instanceof bf)return r;r=r.rgb();var n=r.r/255,e=r.g/255,t=r.b/255,i=Math.min(n,e,t),a=Math.max(n,e,t),s=NaN,o=a-i,l=(a+i)/2;return o?(n===a?s=(e-t)/o+(e<t)*6:e===a?s=(t-n)/o+2:s=(n-e)/o+4,o/=l<.5?a+i:2-a-i,s*=60):o=l>0&&l<1?0:s,new bf(s,o,l,r.opacity)}function FEe(r,n,e,t){return arguments.length===1?IG(r):new bf(r,n,e,t==null?1:t)}function bf(r,n,e,t){this.h=+r,this.s=+n,this.l=+e,this.opacity=+t}EN(bf,FEe,CG(Px,{brighter(r){return r=r==null?Sw:Math.pow(Sw,r),new bf(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?Nx:Math.pow(Nx,r),new bf(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,n=isNaN(r)||isNaN(this.s)?0:this.s,e=this.l,t=e+(e<.5?e:1-e)*n,i=2*e-t;return new ad(bN(r>=240?r-240:r+120,i,t),bN(r,i,t),bN(r<120?r+240:r-120,i,t),this.opacity)},clamp(){return new bf(DG(this.h),Pw(this.s),Pw(this.l),Mw(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const r=Mw(this.opacity);return`${r===1?"hsl(":"hsla("}${DG(this.h)}, ${Pw(this.s)*100}%, ${Pw(this.l)*100}%${r===1?")":`, ${r})`}`}}));function DG(r){return r=(r||0)%360,r<0?r+360:r}function Pw(r){return Math.max(0,Math.min(1,r||0))}function bN(r,n,e){return(r<60?n+(e-n)*r/60:r<180?e:r<240?n+(e-n)*(240-r)/60:n)*255}function v0(r,n){var e=typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(!e){if(Array.isArray(r)||(e=yN(r))||n&&r&&typeof r.length=="number"){e&&(r=e);var t=0,i=function(){};return{s:i,n:function(){return t>=r.length?{done:!0}:{done:!1,value:r[t++]}},e:function(u){throw u},f:i}}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 a,s=!0,o=!1;return{s:function(){e=e.call(r)},n:function(){var u=e.next();return s=u.done,u},e:function(u){o=!0,a=u},f:function(){try{s||e.return==null||e.return()}finally{if(o)throw a}}}}function BEe(r,n){if(r==null)return{};var e={};for(var t in r)if({}.hasOwnProperty.call(r,t)){if(n.includes(t))continue;e[t]=r[t]}return e}function g0(r,n){if(r==null)return{};var e,t,i=BEe(r,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(t=0;t<a.length;t++)e=a[t],n.includes(e)||{}.propertyIsEnumerable.call(r,e)&&(i[e]=r[e])}return i}var $Ee=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof k.g!="undefined"?k.g:typeof self!="undefined"?self:{},FG={exports:{}};(function(r,n){(function(e,t){r.exports=t()})($Ee,function(){function e(x,_,p,b,R){t(x,_,p||0,b||x.length-1,R||a)}function t(x,_,p,b,R){for(;b>p;){if(b-p>600){var B=b-p+1,j=_-p+1,Z=Math.log(B),te=.5*Math.exp(2*Z/3),le=.5*Math.sqrt(Z*te*(B-te)/B)*(j-B/2<0?-1:1),ue=Math.max(p,Math.floor(_-j*te/B+le)),se=Math.min(b,Math.floor(_+(B-j)*te/B+le));t(x,_,ue,se,R)}var V=x[_],ee=p,he=b;for(i(x,p,_),R(x[b],V)>0&&i(x,p,b);ee<he;){for(i(x,ee,he),ee++,he--;R(x[ee],V)<0;)ee++;for(;R(x[he],V)>0;)he--}R(x[p],V)===0?i(x,p,he):(he++,i(x,he,b)),he<=_&&(p=he+1),_<=he&&(b=he-1)}}function i(x,_,p){var b=x[_];x[_]=x[p],x[p]=b}function a(x,_){return x<_?-1:x>_?1:0}var s=function(_){_===void 0&&(_=9),this._maxEntries=Math.max(4,_),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()};s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(_){var p=this.data,b=[];if(!w(_,p))return b;for(var R=this.toBBox,B=[];p;){for(var j=0;j<p.children.length;j++){var Z=p.children[j],te=p.leaf?R(Z):Z;w(_,te)&&(p.leaf?b.push(Z):y(_,te)?this._all(Z,b):B.push(Z))}p=B.pop()}return b},s.prototype.collides=function(_){var p=this.data;if(!w(_,p))return!1;for(var b=[];p;){for(var R=0;R<p.children.length;R++){var B=p.children[R],j=p.leaf?this.toBBox(B):B;if(w(_,j)){if(p.leaf||y(_,j))return!0;b.push(B)}}p=b.pop()}return!1},s.prototype.load=function(_){if(!(_&&_.length))return this;if(_.length<this._minEntries){for(var p=0;p<_.length;p++)this.insert(_[p]);return this}var b=this._build(_.slice(),0,_.length-1,0);if(!this.data.children.length)this.data=b;else if(this.data.height===b.height)this._splitRoot(this.data,b);else{if(this.data.height<b.height){var R=this.data;this.data=b,b=R}this._insert(b,this.data.height-b.height-1,!0)}return this},s.prototype.insert=function(_){return _&&this._insert(_,this.data.height-1),this},s.prototype.clear=function(){return this.data=T([]),this},s.prototype.remove=function(_,p){if(!_)return this;for(var b=this.data,R=this.toBBox(_),B=[],j=[],Z,te,le;b||B.length;){if(b||(b=B.pop(),te=B[B.length-1],Z=j.pop(),le=!0),b.leaf){var ue=o(_,b.children,p);if(ue!==-1)return b.children.splice(ue,1),B.push(b),this._condense(B),this}!le&&!b.leaf&&y(b,R)?(B.push(b),j.push(Z),Z=0,te=b,b=b.children[0]):te?(Z++,b=te.children[Z],le=!1):b=null}return this},s.prototype.toBBox=function(_){return _},s.prototype.compareMinX=function(_,p){return _.minX-p.minX},s.prototype.compareMinY=function(_,p){return _.minY-p.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(_){return this.data=_,this},s.prototype._all=function(_,p){for(var b=[];_;)_.leaf?p.push.apply(p,_.children):b.push.apply(b,_.children),_=b.pop();return p},s.prototype._build=function(_,p,b,R){var B=b-p+1,j=this._maxEntries,Z;if(B<=j)return Z=T(_.slice(p,b+1)),l(Z,this.toBBox),Z;R||(R=Math.ceil(Math.log(B)/Math.log(j)),j=Math.ceil(B/Math.pow(j,R-1))),Z=T([]),Z.leaf=!1,Z.height=R;var te=Math.ceil(B/j),le=te*Math.ceil(Math.sqrt(j));G(_,p,b,le,this.compareMinX);for(var ue=p;ue<=b;ue+=le){var se=Math.min(ue+le-1,b);G(_,ue,se,te,this.compareMinY);for(var V=ue;V<=se;V+=te){var ee=Math.min(V+te-1,se);Z.children.push(this._build(_,V,ee,R-1))}}return l(Z,this.toBBox),Z},s.prototype._chooseSubtree=function(_,p,b,R){for(;R.push(p),!(p.leaf||R.length-1===b);){for(var B=1/0,j=1/0,Z=void 0,te=0;te<p.children.length;te++){var le=p.children[te],ue=f(le),se=g(_,le)-ue;se<j?(j=se,B=ue<B?ue:B,Z=le):se===j&&ue<B&&(B=ue,Z=le)}p=Z||p.children[0]}return p},s.prototype._insert=function(_,p,b){var R=b?_:this.toBBox(_),B=[],j=this._chooseSubtree(R,this.data,p,B);for(j.children.push(_),c(j,R);p>=0&&B[p].children.length>this._maxEntries;)this._split(B,p),p--;this._adjustParentBBoxes(R,B,p)},s.prototype._split=function(_,p){var b=_[p],R=b.children.length,B=this._minEntries;this._chooseSplitAxis(b,B,R);var j=this._chooseSplitIndex(b,B,R),Z=T(b.children.splice(j,b.children.length-j));Z.height=b.height,Z.leaf=b.leaf,l(b,this.toBBox),l(Z,this.toBBox),p?_[p-1].children.push(Z):this._splitRoot(b,Z)},s.prototype._splitRoot=function(_,p){this.data=T([_,p]),this.data.height=_.height+1,this.data.leaf=!1,l(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(_,p,b){for(var R,B=1/0,j=1/0,Z=p;Z<=b-p;Z++){var te=u(_,0,Z,this.toBBox),le=u(_,Z,b,this.toBBox),ue=m(te,le),se=f(te)+f(le);ue<B?(B=ue,R=Z,j=se<j?se:j):ue===B&&se<j&&(j=se,R=Z)}return R||b-p},s.prototype._chooseSplitAxis=function(_,p,b){var R=_.leaf?this.compareMinX:d,B=_.leaf?this.compareMinY:h,j=this._allDistMargin(_,p,b,R),Z=this._allDistMargin(_,p,b,B);j<Z&&_.children.sort(R)},s.prototype._allDistMargin=function(_,p,b,R){_.children.sort(R);for(var B=this.toBBox,j=u(_,0,p,B),Z=u(_,b-p,b,B),te=v(j)+v(Z),le=p;le<b-p;le++){var ue=_.children[le];c(j,_.leaf?B(ue):ue),te+=v(j)}for(var se=b-p-1;se>=p;se--){var V=_.children[se];c(Z,_.leaf?B(V):V),te+=v(Z)}return te},s.prototype._adjustParentBBoxes=function(_,p,b){for(var R=b;R>=0;R--)c(p[R],_)},s.prototype._condense=function(_){for(var p=_.length-1,b=void 0;p>=0;p--)_[p].children.length===0?p>0?(b=_[p-1].children,b.splice(b.indexOf(_[p]),1)):this.clear():l(_[p],this.toBBox)};function o(x,_,p){if(!p)return _.indexOf(x);for(var b=0;b<_.length;b++)if(p(x,_[b]))return b;return-1}function l(x,_){u(x,0,x.children.length,_,x)}function u(x,_,p,b,R){R||(R=T(null)),R.minX=1/0,R.minY=1/0,R.maxX=-1/0,R.maxY=-1/0;for(var B=_;B<p;B++){var j=x.children[B];c(R,x.leaf?b(j):j)}return R}function c(x,_){return x.minX=Math.min(x.minX,_.minX),x.minY=Math.min(x.minY,_.minY),x.maxX=Math.max(x.maxX,_.maxX),x.maxY=Math.max(x.maxY,_.maxY),x}function d(x,_){return x.minX-_.minX}function h(x,_){return x.minY-_.minY}function f(x){return(x.maxX-x.minX)*(x.maxY-x.minY)}function v(x){return x.maxX-x.minX+(x.maxY-x.minY)}function g(x,_){return(Math.max(_.maxX,x.maxX)-Math.min(_.minX,x.minX))*(Math.max(_.maxY,x.maxY)-Math.min(_.minY,x.minY))}function m(x,_){var p=Math.max(x.minX,_.minX),b=Math.max(x.minY,_.minY),R=Math.min(x.maxX,_.maxX),B=Math.min(x.maxY,_.maxY);return Math.max(0,R-p)*Math.max(0,B-b)}function y(x,_){return x.minX<=_.minX&&x.minY<=_.minY&&_.maxX<=x.maxX&&_.maxY<=x.maxY}function w(x,_){return _.minX<=x.maxX&&_.minY<=x.maxY&&_.maxX>=x.minX&&_.maxY>=x.minY}function T(x){return{children:x,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function G(x,_,p,b,R){for(var B=[_,p];B.length;)if(p=B.pop(),_=B.pop(),!(p-_<=b)){var j=_+Math.ceil((p-_)/b/2)*b;e(x,j,_,p,R),B.push(_,j,j,p)}}return s})})(FG);var pLe=FG.exports,Zr=function(r){return r.GROUP="g",r.FRAGMENT="fragment",r.CIRCLE="circle",r.ELLIPSE="ellipse",r.IMAGE="image",r.RECT="rect",r.LINE="line",r.POLYLINE="polyline",r.POLYGON="polygon",r.TEXT="text",r.PATH="path",r.HTML="html",r.MESH="mesh",r}({}),kN=function(r){return r[r.ZERO=0]="ZERO",r[r.NEGATIVE_ONE=1]="NEGATIVE_ONE",r}({}),GEe=function(){function r(){Nr(this,r),this.plugins=[]}return Or(r,[{key:"addRenderingPlugin",value:function(e){this.plugins.push(e),this.context.renderingPlugins.push(e)}},{key:"removeAllRenderingPlugins",value:function(){var e=this;this.plugins.forEach(function(t){var i=e.context.renderingPlugins.indexOf(t);i>=0&&e.context.renderingPlugins.splice(i,1)})}}])}(),yLe=null,wN=E.IH,_0=E.JG,zEe=E.Fp,VEe=E.VV,BG=E.bA,SN=E.lu,sd=function(){function r(){Nr(this,r),this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return Or(r,[{key:"update",value:function(e,t){_0(this.center,e),_0(this.halfExtents,t),SN(this.min,this.center,this.halfExtents),wN(this.max,this.center,this.halfExtents)}},{key:"setMinMax",value:function(e,t){wN(this.center,t,e),BG(this.center,this.center,.5),SN(this.halfExtents,t,e),BG(this.halfExtents,this.halfExtents,.5),_0(this.min,e),_0(this.max,t)}},{key:"getMin",value:function(){return this.min}},{key:"getMax",value:function(){return this.max}},{key:"add",value:function(e){if(!r.isEmpty(e)){if(r.isEmpty(this)){this.setMinMax(e.getMin(),e.getMax());return}var t=this.center,i=t[0],a=t[1],s=t[2],o=this.halfExtents,l=o[0],u=o[1],c=o[2],d=i-l,h=i+l,f=a-u,v=a+u,g=s-c,m=s+c,y=e.center,w=y[0],T=y[1],G=y[2],x=e.halfExtents,_=x[0],p=x[1],b=x[2],R=w-_,B=w+_,j=T-p,Z=T+p,te=G-b,le=G+b;R<d&&(d=R),B>h&&(h=B),j<f&&(f=j),Z>v&&(v=Z),te<g&&(g=te),le>m&&(m=le),t[0]=(d+h)*.5,t[1]=(f+v)*.5,t[2]=(g+m)*.5,o[0]=(h-d)*.5,o[1]=(v-f)*.5,o[2]=(m-g)*.5,this.min[0]=d,this.min[1]=f,this.min[2]=g,this.max[0]=h,this.max[1]=v,this.max[2]=m}}},{key:"setFromTransformedAABB",value:function(e,t){var i=this.center,a=this.halfExtents,s=e.center,o=e.halfExtents,l=t[0],u=t[4],c=t[8],d=t[1],h=t[5],f=t[9],v=t[2],g=t[6],m=t[10],y=Math.abs(l),w=Math.abs(u),T=Math.abs(c),G=Math.abs(d),x=Math.abs(h),_=Math.abs(f),p=Math.abs(v),b=Math.abs(g),R=Math.abs(m);i[0]=t[12]+l*s[0]+u*s[1]+c*s[2],i[1]=t[13]+d*s[0]+h*s[1]+f*s[2],i[2]=t[14]+v*s[0]+g*s[1]+m*s[2],a[0]=y*o[0]+w*o[1]+T*o[2],a[1]=G*o[0]+x*o[1]+_*o[2],a[2]=p*o[0]+b*o[1]+R*o[2],SN(this.min,i,a),wN(this.max,i,a)}},{key:"intersects",value:function(e){var t=this.getMax(),i=this.getMin(),a=e.getMax(),s=e.getMin();return i[0]<=a[0]&&t[0]>=s[0]&&i[1]<=a[1]&&t[1]>=s[1]&&i[2]<=a[2]&&t[2]>=s[2]}},{key:"intersection",value:function(e){if(!this.intersects(e))return null;var t=new r,i=zEe([0,0,0],this.getMin(),e.getMin()),a=VEe([0,0,0],this.getMax(),e.getMax());return t.setMinMax(i,a),t}},{key:"getNegativeFarPoint",value:function(e){return e.pnVertexFlag===273?_0([0,0,0],this.min):e.pnVertexFlag===272?[this.min[0],this.min[1],this.max[2]]:e.pnVertexFlag===257?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===256?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===17?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===16?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===1?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]}},{key:"getPositiveFarPoint",value:function(e){return e.pnVertexFlag===273?_0([0,0,0],this.max):e.pnVertexFlag===272?[this.max[0],this.max[1],this.min[2]]:e.pnVertexFlag===257?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===256?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===17?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===16?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===1?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]}}],[{key:"isEmpty",value:function(e){return!e||e.halfExtents[0]===0&&e.halfExtents[1]===0&&e.halfExtents[2]===0}}])}(),UEe=function(){function r(n,e){Nr(this,r),this.distance=n||0,this.normal=e||E.al(0,1,0),this.updatePNVertexFlag()}return Or(r,[{key:"updatePNVertexFlag",value:function(){this.pnVertexFlag=(+(this.normal[0]>=0)<<8)+(+(this.normal[1]>=0)<<4)+ +(this.normal[2]>=0)}},{key:"distanceToPoint",value:function(e){return E.AK(e,this.normal)-this.distance}},{key:"normalize",value:function(){var e=1/E.Zh(this.normal);E.bA(this.normal,this.normal,e),this.distance*=e}},{key:"intersectsLine",value:function(e,t,i){var a=this.distanceToPoint(e),s=this.distanceToPoint(t),o=a/(a-s),l=o>=0&&o<=1;return l&&i&&E.t7(i,e,t,o),l}}])}(),xLe=function(r){return r[r.OUTSIDE=4294967295]="OUTSIDE",r[r.INSIDE=0]="INSIDE",r[r.INDETERMINATE=2147483647]="INDETERMINATE",r}({}),jEe=function(){function r(n){if(Nr(this,r),this.planes=[],n)this.planes=n;else for(var e=0;e<6;e++)this.planes.push(new UEe)}return Or(r,[{key:"extractFromVPMatrix",value:function(e){var t=ll(e,16),i=t[0],a=t[1],s=t[2],o=t[3],l=t[4],u=t[5],c=t[6],d=t[7],h=t[8],f=t[9],v=t[10],g=t[11],m=t[12],y=t[13],w=t[14],T=t[15];E.t8(this.planes[0].normal,o-i,d-l,g-h),this.planes[0].distance=T-m,E.t8(this.planes[1].normal,o+i,d+l,g+h),this.planes[1].distance=T+m,E.t8(this.planes[2].normal,o+a,d+u,g+f),this.planes[2].distance=T+y,E.t8(this.planes[3].normal,o-a,d-u,g-f),this.planes[3].distance=T-y,E.t8(this.planes[4].normal,o-s,d-c,g-v),this.planes[4].distance=T-w,E.t8(this.planes[5].normal,o+s,d+c,g+v),this.planes[5].distance=T+w,this.planes.forEach(function(G){G.normalize(),G.updatePNVertexFlag()})}}])}(),yh=function(){function r(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Nr(this,r),this.x=0,this.y=0,this.x=n,this.y=e}return Or(r,[{key:"clone",value:function(){return new r(this.x,this.y)}},{key:"copyFrom",value:function(e){this.x=e.x,this.y=e.y}}])}(),m0=function(){function r(n,e,t,i){Nr(this,r),this.x=n,this.y=e,this.width=t,this.height=i,this.left=n,this.right=n+t,this.top=e,this.bottom=e+i}return Or(r,[{key:"toJSON",value:function(){}}],[{key:"fromRect",value:function(e){return new r(e.x,e.y,e.width,e.height)}},{key:"applyTransform",value:function(e,t){var i=me.al(e.x,e.y,0,1),a=me.al(e.x+e.width,e.y,0,1),s=me.al(e.x,e.y+e.height,0,1),o=me.al(e.x+e.width,e.y+e.height,0,1),l=me.Ue(),u=me.Ue(),c=me.Ue(),d=me.Ue();me.fF(l,i,t),me.fF(u,a,t),me.fF(c,s,t),me.fF(d,o,t);var h=Math.min(l[0],u[0],c[0],d[0]),f=Math.min(l[1],u[1],c[1],d[1]),v=Math.max(l[0],u[0],c[0],d[0]),g=Math.max(l[1],u[1],c[1],d[1]);return r.fromRect({x:h,y:f,width:v-h,height:g-f})}}])}(),ul="Method not implemented.",ELe="Use document.documentElement instead.",HEe="Cannot append a destroyed element.";function TN(r){return r===void 0?0:r>360||r<-360?r%360:r}var CN=E.Ue();function od(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;return Array.isArray(r)&&r.length===3?t?E.d9(r):E.JG(CN,r):(0,pe.Z)(r)?t?E.al(r,n,e):E.t8(CN,r,n,e):t?E.al(r[0],r[1]||n,r[2]||e):E.t8(CN,r[0],r[1]||n,r[2]||e)}var WEe=Math.PI/180;function io(r){return r*WEe}var YEe=180/Math.PI;function xh(r){return r*YEe}var ZEe=.9;function bLe(r){return r%=400,r<0&&(r+=400),r*ZEe}function kLe(r){return r/360}function XEe(r){return 360*r}var Nw=Math.PI/2;function KEe(r,n){var e=n[0],t=n[1],i=n[2],a=n[3],s=e*e,o=t*t,l=i*i,u=a*a,c=s+o+l+u,d=e*a-t*i;return d>.499995*c?(r[0]=Nw,r[1]=2*Math.atan2(t,e),r[2]=0):d<-.499995*c?(r[0]=-Nw,r[1]=2*Math.atan2(t,e),r[2]=0):(r[0]=Math.asin(2*(e*i-a*t)),r[1]=Math.atan2(2*(e*a+t*i),1-2*(l+u)),r[2]=Math.atan2(2*(e*t+i*a),1-2*(o+l))),r}function JEe(r,n){var e,t,i=L.getScaling(E.Ue(),n),a=ll(i,3),s=a[0],o=a[1],l=a[2],u=Math.asin(-n[2]/s);return u<Nw?u>-Nw?(e=Math.atan2(n[6]/o,n[10]/l),t=Math.atan2(n[1]/s,n[0]/s)):(t=0,e=-Math.atan2(n[4]/o,n[5]/o)):(t=0,e=Math.atan2(n[4]/o,n[5]/o)),r[0]=e,r[1]=u,r[2]=t,r}function MN(r,n){return n.length===16?JEe(r,n):KEe(r,n)}function QEe(r,n,e,t,i){var a=Math.cos(r),s=Math.sin(r);return Ke.al(t*a,i*s,0,-t*s,i*a,0,n,e,1)}function qEe(r,n,e,t,i,a,s){var o=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1,l=2*a,u=e-n,c=t-i,d=l/u,h=l/c,f=(e+n)/u,v=(t+i)/c,g,m,y=s-a,w=s*a;return o?(g=-s/y,m=-w/y):(g=-(s+a)/y,m=-2*w/y),r[0]=d,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=h,r[6]=0,r[7]=0,r[8]=f,r[9]=v,r[10]=g,r[11]=-1,r[12]=0,r[13]=0,r[14]=m,r[15]=0,r}function $G(r){var n=r[0],e=r[1],t=r[3],i=r[4],a=Math.sqrt(n*n+e*e),s=Math.sqrt(t*t+i*i),o=n*i-e*t;if(o<0&&(n<i?a=-a:s=-s),a){var l=1/a;n*=l,e*=l}if(s){var u=1/s;t*=u,i*=u}var c=Math.atan2(e,n),d=xh(c);return[r[6],r[7],a,s,d]}var xv=L.create(),kf=L.create(),Rx=me.Ue(),Vi=[E.Ue(),E.Ue(),E.Ue()],GG=E.Ue();function ebe(r,n,e,t,i,a){if(!tbe(xv,r)||(L.copy(kf,xv),kf[3]=0,kf[7]=0,kf[11]=0,kf[15]=1,Math.abs(L.determinant(kf))<1e-8))return!1;var s=xv[3],o=xv[7],l=xv[11],u=xv[12],c=xv[13],d=xv[14],h=xv[15];if(s!==0||o!==0||l!==0){Rx[0]=s,Rx[1]=o,Rx[2]=l,Rx[3]=h;var f=L.invert(kf,kf);if(!f)return!1;L.transpose(kf,kf),me.fF(i,Rx,kf)}else i[0]=i[1]=i[2]=0,i[3]=1;if(n[0]=u,n[1]=c,n[2]=d,nbe(Vi,xv),e[0]=E.kE(Vi[0]),E.Fv(Vi[0],Vi[0]),t[0]=E.AK(Vi[0],Vi[1]),PN(Vi[1],Vi[1],Vi[0],1,-t[0]),e[1]=E.kE(Vi[1]),E.Fv(Vi[1],Vi[1]),t[0]/=e[1],t[1]=E.AK(Vi[0],Vi[2]),PN(Vi[2],Vi[2],Vi[0],1,-t[1]),t[2]=E.AK(Vi[1],Vi[2]),PN(Vi[2],Vi[2],Vi[1],1,-t[2]),e[2]=E.kE(Vi[2]),E.Fv(Vi[2],Vi[2]),t[1]/=e[2],t[2]/=e[2],E.kC(GG,Vi[1],Vi[2]),E.AK(Vi[0],GG)<0)for(var v=0;v<3;v++)e[v]*=-1,Vi[v][0]*=-1,Vi[v][1]*=-1,Vi[v][2]*=-1;return a[0]=.5*Math.sqrt(Math.max(1+Vi[0][0]-Vi[1][1]-Vi[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-Vi[0][0]+Vi[1][1]-Vi[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-Vi[0][0]-Vi[1][1]+Vi[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+Vi[0][0]+Vi[1][1]+Vi[2][2],0)),Vi[2][1]>Vi[1][2]&&(a[0]=-a[0]),Vi[0][2]>Vi[2][0]&&(a[1]=-a[1]),Vi[1][0]>Vi[0][1]&&(a[2]=-a[2]),!0}function tbe(r,n){var e=n[15];if(e===0)return!1;for(var t=1/e,i=0;i<16;i++)r[i]=n[i]*t;return!0}function nbe(r,n){r[0][0]=n[0],r[0][1]=n[1],r[0][2]=n[2],r[1][0]=n[4],r[1][1]=n[5],r[1][2]=n[6],r[2][0]=n[8],r[2][1]=n[9],r[2][2]=n[10]}function PN(r,n,e,t,i){r[0]=n[0]*t+e[0]*i,r[1]=n[1]*t+e[1]*i,r[2]=n[2]*t+e[2]*i}var Vl=function(r){return r[r.ORBITING=0]="ORBITING",r[r.EXPLORING=1]="EXPLORING",r[r.TRACKING=2]="TRACKING",r}({}),zG=function(r){return r[r.DEFAULT=0]="DEFAULT",r[r.ROTATIONAL=1]="ROTATIONAL",r[r.TRANSLATIONAL=2]="TRANSLATIONAL",r[r.CINEMATIC=3]="CINEMATIC",r}({}),wf=function(r){return r[r.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",r[r.PERSPECTIVE=1]="PERSPECTIVE",r}({}),rbe={UPDATED:"updated"},VG=2e-4,ibe=function(){function r(){Nr(this,r),this.clipSpaceNearZ=kN.NEGATIVE_ONE,this.eventEmitter=new Se.Z,this.matrix=L.create(),this.right=E.al(1,0,0),this.up=E.al(0,1,0),this.forward=E.al(0,0,1),this.position=E.al(0,0,1),this.focalPoint=E.al(0,0,0),this.distanceVector=E.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=L.create(),this.projectionMatrixInverse=L.create(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=Vl.EXPLORING,this.trackingMode=zG.DEFAULT,this.projectionMode=wf.PERSPECTIVE,this.frustum=new jEe,this.orthoMatrix=L.create()}return Or(r,[{key:"isOrtho",value:function(){return this.projectionMode===wf.ORTHOGRAPHIC}},{key:"getProjectionMode",value:function(){return this.projectionMode}},{key:"getPerspective",value:function(){return this.jitteredProjectionMatrix||this.projectionMatrix}},{key:"getPerspectiveInverse",value:function(){return this.projectionMatrixInverse}},{key:"getFrustum",value:function(){return this.frustum}},{key:"getPosition",value:function(){return this.position}},{key:"getFocalPoint",value:function(){return this.focalPoint}},{key:"getDollyingStep",value:function(){return this.dollyingStep}},{key:"getNear",value:function(){return this.near}},{key:"getFar",value:function(){return this.far}},{key:"getZoom",value:function(){return this.zoom}},{key:"getOrthoMatrix",value:function(){return this.orthoMatrix}},{key:"getView",value:function(){return this.view}},{key:"setEnableUpdate",value:function(e){this.enableUpdate=e}},{key:"setType",value:function(e,t){return this.type=e,this.type===Vl.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===Vl.TRACKING&&t!==void 0&&this.setTrackingMode(t),this}},{key:"setProjectionMode",value:function(e){return this.projectionMode=e,this}},{key:"setTrackingMode",value:function(e){if(this.type!==Vl.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=e,this}},{key:"setWorldRotation",value:function(e){return this.rotateWorld=e,this._getAngles(),this}},{key:"getViewTransform",value:function(){return L.invert(L.create(),this.matrix)}},{key:"getWorldTransform",value:function(){return this.matrix}},{key:"jitterProjectionMatrix",value:function(e,t){var i=L.fromTranslation(L.create(),[e,t,0]);this.jitteredProjectionMatrix=L.multiply(L.create(),i,this.projectionMatrix)}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0}},{key:"setMatrix",value:function(e){return this.matrix=e,this._update(),this}},{key:"setProjectionMatrix",value:function(e){this.projectionMatrix=e}},{key:"setFov",value:function(e){return this.setPerspective(this.near,this.far,e,this.aspect),this}},{key:"setAspect",value:function(e){return this.setPerspective(this.near,this.far,this.fov,e),this}},{key:"setNear",value:function(e){return this.projectionMode===wf.PERSPECTIVE?this.setPerspective(e,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,e,this.far),this}},{key:"setFar",value:function(e){return this.projectionMode===wf.PERSPECTIVE?this.setPerspective(this.near,e,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,e),this}},{key:"setViewOffset",value:function(e,t,i,a,s,o){return this.aspect=e/t,this.view===void 0&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=a,this.view.width=s,this.view.height=o,this.projectionMode===wf.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===wf.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"setZoom",value:function(e){return this.zoom=e,this.projectionMode===wf.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===wf.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this}},{key:"setZoomByViewportPoint",value:function(e,t){var i=this.canvas.viewport2Canvas({x:t[0],y:t[1]}),a=i.x,s=i.y,o=this.roll;this.rotate(0,0,-o),this.setPosition(a,s),this.setFocalPoint(a,s),this.setZoom(e),this.rotate(0,0,o);var l=this.canvas.viewport2Canvas({x:t[0],y:t[1]}),u=l.x,c=l.y,d=E.al(u-a,c-s,0),h=E.AK(d,this.right)/E.kE(this.right),f=E.AK(d,this.up)/E.kE(this.up),v=this.getPosition(),g=ll(v,2),m=g[0],y=g[1],w=this.getFocalPoint(),T=ll(w,2),G=T[0],x=T[1];return this.setPosition(m-h,y-f),this.setFocalPoint(G-h,x-f),this}},{key:"setPerspective",value:function(e,t,i,a){var s;this.projectionMode=wf.PERSPECTIVE,this.fov=i,this.near=e,this.far=t,this.aspect=a;var o=this.near*Math.tan(io(.5*this.fov))/this.zoom,l=2*o,u=this.aspect*l,c=-.5*u;if((s=this.view)!==null&&s!==void 0&&s.enabled){var d=this.view.fullWidth,h=this.view.fullHeight;c+=this.view.offsetX*u/d,o-=this.view.offsetY*l/h,u*=this.view.width/d,l*=this.view.height/h}return qEe(this.projectionMatrix,c,c+u,o-l,o,e,this.far,this.clipSpaceNearZ===kN.ZERO),L.invert(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this}},{key:"setOrthographic",value:function(e,t,i,a,s,o){var l;this.projectionMode=wf.ORTHOGRAPHIC,this.rright=t,this.left=e,this.top=i,this.bottom=a,this.near=s,this.far=o;var u=(this.rright-this.left)/(2*this.zoom),c=(this.top-this.bottom)/(2*this.zoom),d=(this.rright+this.left)/2,h=(this.top+this.bottom)/2,f=d-u,v=d+u,g=h+c,m=h-c;if((l=this.view)!==null&&l!==void 0&&l.enabled){var y=(this.rright-this.left)/this.view.fullWidth/this.zoom,w=(this.top-this.bottom)/this.view.fullHeight/this.zoom;f+=y*this.view.offsetX,v=f+y*this.view.width,g-=w*this.view.offsetY,m=g-w*this.view.height}return this.clipSpaceNearZ===kN.NEGATIVE_ONE?L.ortho(this.projectionMatrix,f,v,g,m,s,o):L.orthoZO(this.projectionMatrix,f,v,g,m,s,o),L.invert(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this}},{key:"setPosition",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.position[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.position[2],a=od(e,t,i);return this._setPosition(a),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this}},{key:"setFocalPoint",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.focalPoint[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.focalPoint[2],a=E.al(0,1,0);if(this.focalPoint=od(e,t,i),this.trackingMode===zG.CINEMATIC){var s=E.$X(E.Ue(),this.focalPoint,this.position);e=s[0],t=s[1],i=s[2];var o=E.kE(s),l=xh(Math.asin(t/o)),u=90+xh(Math.atan2(i,e)),c=L.create();L.rotateY(c,c,io(u)),L.rotateX(c,c,io(l)),a=E.fF(E.Ue(),[0,1,0],c)}return L.invert(this.matrix,L.lookAt(L.create(),this.position,this.focalPoint,a)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this}},{key:"getDistance",value:function(){return this.distance}},{key:"getDistanceVector",value:function(){return this.distanceVector}},{key:"setDistance",value:function(e){if(this.distance===e||e<0)return this;this.distance=e,this.distance<VG&&(this.distance=VG),this.dollyingStep=this.distance/100;var t=E.Ue();e=this.distance;var i=this.forward,a=this.focalPoint;return t[0]=e*i[0]+a[0],t[1]=e*i[1]+a[1],t[2]=e*i[2]+a[2],this._setPosition(t),this.triggerUpdate(),this}},{key:"setMaxDistance",value:function(e){return this.maxDistance=e,this}},{key:"setMinDistance",value:function(e){return this.minDistance=e,this}},{key:"setAzimuth",value:function(e){return this.azimuth=TN(e),this.computeMatrix(),this._getAxes(),this.type===Vl.ORBITING||this.type===Vl.EXPLORING?this._getPosition():this.type===Vl.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getAzimuth",value:function(){return this.azimuth}},{key:"setElevation",value:function(e){return this.elevation=TN(e),this.computeMatrix(),this._getAxes(),this.type===Vl.ORBITING||this.type===Vl.EXPLORING?this._getPosition():this.type===Vl.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getElevation",value:function(){return this.elevation}},{key:"setRoll",value:function(e){return this.roll=TN(e),this.computeMatrix(),this._getAxes(),this.type===Vl.ORBITING||this.type===Vl.EXPLORING?this._getPosition():this.type===Vl.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getRoll",value:function(){return this.roll}},{key:"_update",value:function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()}},{key:"computeMatrix",value:function(){var e=X.yY(X.Ue(),[0,0,1],io(this.roll));L.identity(this.matrix);var t=X.yY(X.Ue(),[1,0,0],io((this.rotateWorld&&this.type!==Vl.TRACKING||this.type===Vl.TRACKING?1:-1)*this.elevation)),i=X.yY(X.Ue(),[0,1,0],io((this.rotateWorld&&this.type!==Vl.TRACKING||this.type===Vl.TRACKING?1:-1)*this.azimuth)),a=X.Jp(X.Ue(),i,t);a=X.Jp(X.Ue(),a,e);var s=L.fromQuat(L.create(),a);this.type===Vl.ORBITING||this.type===Vl.EXPLORING?(L.translate(this.matrix,this.matrix,this.focalPoint),L.multiply(this.matrix,this.matrix,s),L.translate(this.matrix,this.matrix,[0,0,this.distance])):this.type===Vl.TRACKING&&(L.translate(this.matrix,this.matrix,this.position),L.multiply(this.matrix,this.matrix,s))}},{key:"_setPosition",value:function(e,t,i){this.position=od(e,t,i);var a=this.matrix;a[12]=this.position[0],a[13]=this.position[1],a[14]=this.position[2],a[15]=1,this._getOrthoMatrix()}},{key:"_getAxes",value:function(){E.JG(this.right,od(me.fF(me.Ue(),[1,0,0,0],this.matrix))),E.JG(this.up,od(me.fF(me.Ue(),[0,1,0,0],this.matrix))),E.JG(this.forward,od(me.fF(me.Ue(),[0,0,1,0],this.matrix))),E.Fv(this.right,this.right),E.Fv(this.up,this.up),E.Fv(this.forward,this.forward)}},{key:"_getAngles",value:function(){var e=this.distanceVector[0],t=this.distanceVector[1],i=this.distanceVector[2],a=E.kE(this.distanceVector);if(a===0){this.elevation=0,this.azimuth=0;return}this.type===Vl.TRACKING?(this.elevation=xh(Math.asin(t/a)),this.azimuth=xh(Math.atan2(-e,-i))):this.rotateWorld?(this.elevation=xh(Math.asin(t/a)),this.azimuth=xh(Math.atan2(-e,-i))):(this.elevation=-xh(Math.asin(t/a)),this.azimuth=-xh(Math.atan2(-e,-i)))}},{key:"_getPosition",value:function(){E.JG(this.position,od(me.fF(me.Ue(),[0,0,0,1],this.matrix))),this._getDistance()}},{key:"_getFocalPoint",value:function(){E.kK(this.distanceVector,[0,0,-this.distance],Ke.xO(Ke.Ue(),this.matrix)),E.IH(this.focalPoint,this.position,this.distanceVector),this._getDistance()}},{key:"_getDistance",value:function(){this.distanceVector=E.$X(E.Ue(),this.focalPoint,this.position),this.distance=E.kE(this.distanceVector),this.dollyingStep=this.distance/100}},{key:"_getOrthoMatrix",value:function(){if(this.projectionMode===wf.ORTHOGRAPHIC){var e=this.position,t=X.yY(X.Ue(),[0,0,1],-this.roll*Math.PI/180);L.fromRotationTranslationScaleOrigin(this.orthoMatrix,t,E.al((this.rright-this.left)/2-e[0],(this.top-this.bottom)/2-e[1],0),E.al(this.zoom,this.zoom,1),e)}}},{key:"triggerUpdate",value:function(){if(this.enableUpdate){var e=this.getViewTransform(),t=L.multiply(L.create(),this.getPerspective(),e);this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(rbe.UPDATED)}}},{key:"rotate",value:function(e,t,i){throw new Error(ul)}},{key:"pan",value:function(e,t){throw new Error(ul)}},{key:"dolly",value:function(e){throw new Error(ul)}},{key:"createLandmark",value:function(e,t){throw new Error(ul)}},{key:"gotoLandmark",value:function(e,t){throw new Error(ul)}},{key:"cancelLandmarkAnimation",value:function(){throw new Error(ul)}}])}(),abe=function(r){return r[r.Standard=0]="Standard",r}({}),NN=function(r){return r[r.ADDED=0]="ADDED",r[r.REMOVED=1]="REMOVED",r[r.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED",r}({}),UG={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new m0(0,0,0,0)},Zn=function(r){return r.COORDINATE="<coordinate>",r.COLOR="<color>",r.PAINT="<paint>",r.NUMBER="<number>",r.ANGLE="<angle>",r.OPACITY_VALUE="<opacity-value>",r.SHADOW_BLUR="<shadow-blur>",r.LENGTH="<length>",r.PERCENTAGE="<percentage>",r.LENGTH_PERCENTAGE="<length> | <percentage>",r.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",r.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",r.LIST_OF_POINTS="<list-of-points>",r.PATH="<path>",r.FILTER="<filter>",r.Z_INDEX="<z-index>",r.OFFSET_DISTANCE="<offset-distance>",r.DEFINED_PATH="<defined-path>",r.MARKER="<marker>",r.TRANSFORM="<transform>",r.TRANSFORM_ORIGIN="<transform-origin>",r.TEXT="<text>",r.TEXT_TRANSFORM="<text-transform>",r}({});function bc(r,n){if(typeof r!="function"||n!=null&&typeof n!="function")throw new TypeError("Expected a function");var e=function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var o=n?n.apply(this,a):a[0],l=e.cache;if(l.has(o))return l.get(o);var u=r.apply(this,a);return e.cache=l.set(o,u)||l,u};return e.cache=new(bc.Cache||Map),e}bc.Cache=Map;var rr=function(r){return r[r.kUnknown=0]="kUnknown",r[r.kNumber=1]="kNumber",r[r.kPercentage=2]="kPercentage",r[r.kEms=3]="kEms",r[r.kPixels=4]="kPixels",r[r.kRems=5]="kRems",r[r.kDegrees=6]="kDegrees",r[r.kRadians=7]="kRadians",r[r.kGradians=8]="kGradians",r[r.kTurns=9]="kTurns",r[r.kMilliseconds=10]="kMilliseconds",r[r.kSeconds=11]="kSeconds",r[r.kInteger=12]="kInteger",r}({}),Sf=function(r){return r[r.kUNumber=0]="kUNumber",r[r.kUPercent=1]="kUPercent",r[r.kULength=2]="kULength",r[r.kUAngle=3]="kUAngle",r[r.kUTime=4]="kUTime",r[r.kUOther=5]="kUOther",r}({}),sbe=function(r){return r[r.kYes=0]="kYes",r[r.kNo=1]="kNo",r}({}),obe=function(r){return r[r.kYes=0]="kYes",r[r.kNo=1]="kNo",r}({}),lbe=[{name:"em",unit_type:rr.kEms},{name:"px",unit_type:rr.kPixels},{name:"deg",unit_type:rr.kDegrees},{name:"rad",unit_type:rr.kRadians},{name:"grad",unit_type:rr.kGradians},{name:"ms",unit_type:rr.kMilliseconds},{name:"s",unit_type:rr.kSeconds},{name:"rem",unit_type:rr.kRems},{name:"turn",unit_type:rr.kTurns}],p0=function(r){return r[r.kUnknownType=0]="kUnknownType",r[r.kUnparsedType=1]="kUnparsedType",r[r.kKeywordType=2]="kKeywordType",r[r.kUnitType=3]="kUnitType",r[r.kSumType=4]="kSumType",r[r.kProductType=5]="kProductType",r[r.kNegateType=6]="kNegateType",r[r.kInvertType=7]="kInvertType",r[r.kMinType=8]="kMinType",r[r.kMaxType=9]="kMaxType",r[r.kClampType=10]="kClampType",r[r.kTransformType=11]="kTransformType",r[r.kPositionType=12]="kPositionType",r[r.kURLImageType=13]="kURLImageType",r[r.kColorType=14]="kColorType",r[r.kUnsupportedColorType=15]="kUnsupportedColorType",r}({}),ube=function(n){return lbe.find(function(e){return e.name===n}).unit_type},cbe=function(n){return n?n==="number"?rr.kNumber:n==="percent"||n==="%"?rr.kPercentage:ube(n):rr.kUnknown},dbe=function(n){switch(n){case rr.kNumber:case rr.kInteger:return Sf.kUNumber;case rr.kPercentage:return Sf.kUPercent;case rr.kPixels:return Sf.kULength;case rr.kMilliseconds:case rr.kSeconds:return Sf.kUTime;case rr.kDegrees:case rr.kRadians:case rr.kGradians:case rr.kTurns:return Sf.kUAngle;default:return Sf.kUOther}},hbe=function(n){switch(n){case Sf.kUNumber:return rr.kNumber;case Sf.kULength:return rr.kPixels;case Sf.kUPercent:return rr.kPercentage;case Sf.kUTime:return rr.kSeconds;case Sf.kUAngle:return rr.kDegrees;default:return rr.kUnknown}},jG=function(n){var e=1;switch(n){case rr.kPixels:case rr.kDegrees:case rr.kSeconds:break;case rr.kMilliseconds:e=.001;break;case rr.kRadians:e=180/Math.PI;break;case rr.kGradians:e=.9;break;case rr.kTurns:e=360;break}return e},ON=function(n){switch(n){case rr.kNumber:case rr.kInteger:return"";case rr.kPercentage:return"%";case rr.kEms:return"em";case rr.kRems:return"rem";case rr.kPixels:return"px";case rr.kDegrees:return"deg";case rr.kRadians:return"rad";case rr.kGradians:return"grad";case rr.kMilliseconds:return"ms";case rr.kSeconds:return"s";case rr.kTurns:return"turn"}return""},Ow=function(){function r(){Nr(this,r)}return Or(r,[{key:"toString",value:function(){return this.buildCSSText(sbe.kNo,obe.kNo,"")}},{key:"isNumericValue",value:function(){return this.getType()>=p0.kUnitType&&this.getType()<=p0.kClampType}}],[{key:"isAngle",value:function(e){return e===rr.kDegrees||e===rr.kRadians||e===rr.kGradians||e===rr.kTurns}},{key:"isLength",value:function(e){return e>=rr.kEms&&e<rr.kDegrees}},{key:"isRelativeUnit",value:function(e){return e===rr.kPercentage||e===rr.kEms||e===rr.kRems}},{key:"isTime",value:function(e){return e===rr.kSeconds||e===rr.kMilliseconds}}])}(),fbe=function(r){function n(e){var t;return Nr(this,n),t=no(this,n),t.colorSpace=e,t}return ro(n,r),Or(n,[{key:"getType",value:function(){return p0.kColorType}},{key:"to",value:function(t){return this}}])}(Ow),Rw=function(r){return r[r.Constant=0]="Constant",r[r.LinearGradient=1]="LinearGradient",r[r.RadialGradient=2]="RadialGradient",r}({}),Aw=function(r){function n(e,t){var i;return Nr(this,n),i=no(this,n),i.type=e,i.value=t,i}return ro(n,r),Or(n,[{key:"clone",value:function(){return new n(this.type,this.value)}},{key:"buildCSSText",value:function(t,i,a){return a}},{key:"getType",value:function(){return p0.kColorType}}])}(Ow),Eh=function(r){function n(e){var t;return Nr(this,n),t=no(this,n),t.value=e,t}return ro(n,r),Or(n,[{key:"clone",value:function(){return new n(this.value)}},{key:"getType",value:function(){return p0.kKeywordType}},{key:"buildCSSText",value:function(t,i,a){return a+this.value}}])}(Ow),vbe=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",t="";return Number.isFinite(n)?t="NaN":n>0?t="infinity":t="-infinity",t+=e},RN=function(n){return hbe(dbe(n))},ps=function(r){function n(e){var t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rr.kNumber;Nr(this,n),t=no(this,n);var a;return typeof i=="string"?a=cbe(i):a=i,t.unit=a,t.value=e,t}return ro(n,r),Or(n,[{key:"clone",value:function(){return new n(this.value,this.unit)}},{key:"equals",value:function(t){var i=t;return this.value===i.value&&this.unit===i.unit}},{key:"getType",value:function(){return p0.kUnitType}},{key:"convertTo",value:function(t){if(this.unit===t)return new n(this.value,this.unit);var i=RN(this.unit);if(i!==RN(t)||i===rr.kUnknown)return null;var a=jG(this.unit)/jG(t);return new n(this.value*a,t)}},{key:"buildCSSText",value:function(t,i,a){var s;switch(this.unit){case rr.kUnknown:break;case rr.kInteger:s=Number(this.value).toFixed(0);break;case rr.kNumber:case rr.kPercentage:case rr.kEms:case rr.kRems:case rr.kPixels:case rr.kDegrees:case rr.kRadians:case rr.kGradians:case rr.kMilliseconds:case rr.kSeconds:case rr.kTurns:{var o=-999999,l=999999,u=this.value,c=ON(this.unit);if(u<o||u>l){var d=ON(this.unit);!Number.isFinite(u)||Number.isNaN(u)?s=vbe(u,d):s=u+(d||"")}else s="".concat(u).concat(c)}}return a+=s,a}}])}(Ow),Tf=new ps(0,"px");new ps(1,"px");var xm=new ps(0,"deg"),AN=function(r){function n(e,t,i){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;return Nr(this,n),a=no(this,n,["rgb"]),a.r=e,a.g=t,a.b=i,a.alpha=s,a.isNone=o,a}return ro(n,r),Or(n,[{key:"clone",value:function(){return new n(this.r,this.g,this.b,this.alpha)}},{key:"buildCSSText",value:function(t,i,a){return"".concat(a,"rgba(").concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")}}])}(fbe),HG=new Eh("unset"),gbe=new Eh("initial"),_be=new Eh("inherit"),LN={"":HG,unset:HG,initial:gbe,inherit:_be},mbe=function(n){return LN[n]||(LN[n]=new Eh(n)),LN[n]},WG=new AN(0,0,0,0,!0),YG=new AN(0,0,0,0),pbe=bc(function(r,n,e,t){return new AN(r,n,e,t)},function(r,n,e,t){return"rgba(".concat(r,",").concat(n,",").concat(e,",").concat(t,")")}),Po=function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rr.kNumber;return new ps(n,e)};new ps(50,"%");function ybe(r){var n=r.type,e=r.value;return n==="hex"?"#".concat(e):n==="literal"?e:n==="rgb"?"rgb(".concat(e.join(","),")"):"rgba(".concat(e.join(","),")")}var xbe=function(){var r={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},n="";function e(V){throw new Error("".concat(n,": ").concat(V))}function t(){var V=i();return n.length>0&&e("Invalid input not EOF"),V}function i(){return T(a)}function a(){return s("linear-gradient",r.linearGradient,l)||s("repeating-linear-gradient",r.repeatingLinearGradient,l)||s("radial-gradient",r.radialGradient,d)||s("repeating-radial-gradient",r.repeatingRadialGradient,d)||s("conic-gradient",r.conicGradient,d)}function s(V,ee,he){return o(ee,function(ut){var ct=he();return ct&&(ue(r.comma)||e("Missing comma before color stops")),{type:V,orientation:ct,colorStops:T(G)}})}function o(V,ee){var he=ue(V);if(he){ue(r.startCall)||e("Missing (");var ut=ee(he);return ue(r.endCall)||e("Missing )"),ut}}function l(){return u()||c()}function u(){return le("directional",r.sideOrCorner,1)}function c(){return le("angular",r.angleValue,1)}function d(){var V,ee=h(),he;return ee&&(V=[],V.push(ee),he=n,ue(r.comma)&&(ee=h(),ee?V.push(ee):n=he)),V}function h(){var V=f()||v();if(V)V.at=m();else{var ee=g();if(ee){V=ee;var he=m();he&&(V.at=he)}else{var ut=y();ut&&(V={type:"default-radial",at:ut})}}return V}function f(){var V=le("shape",/^(circle)/i,0);return V&&(V.style=te()||g()),V}function v(){var V=le("shape",/^(ellipse)/i,0);return V&&(V.style=j()||g()),V}function g(){return le("extent-keyword",r.extentKeywords,1)}function m(){if(le("position",/^at/,0)){var V=y();return V||e("Missing positioning value"),V}}function y(){var V=w();if(V.x||V.y)return{type:"position",value:V}}function w(){return{x:j(),y:j()}}function T(V){var ee=V(),he=[];if(ee)for(he.push(ee);ue(r.comma);)ee=V(),ee?he.push(ee):e("One extra comma");return he}function G(){var V=x();return V||e("Expected color definition"),V.length=j(),V}function x(){return p()||R()||b()||_()}function _(){return le("literal",r.literalColor,0)}function p(){return le("hex",r.hexColor,1)}function b(){return o(r.rgbColor,function(){return{type:"rgb",value:T(B)}})}function R(){return o(r.rgbaColor,function(){return{type:"rgba",value:T(B)}})}function B(){return ue(r.number)[1]}function j(){return le("%",r.percentageValue,1)||Z()||te()}function Z(){return le("position-keyword",r.positionKeywords,1)}function te(){return le("px",r.pixelValue,1)||le("em",r.emValue,1)}function le(V,ee,he){var ut=ue(ee);if(ut)return{type:V,value:ut[he]}}function ue(V){var ee=/^[\n\r\t\s]+/.exec(n);ee&&se(ee[0].length);var he=V.exec(n);return he&&se(he[0].length),he}function se(V){n=n.substring(V)}return function(V){return n=V,t()}}();function wLe(r,n,e,t){var i=io(t.value),a=0,s=0,o=a+n/2,l=s+e/2,u=Math.abs(n*Math.cos(i))+Math.abs(e*Math.sin(i)),c=r[0]+o-Math.cos(i)*u/2,d=r[1]+l-Math.sin(i)*u/2,h=r[0]+o+Math.cos(i)*u/2,f=r[1]+l+Math.sin(i)*u/2;return{x1:c,y1:d,x2:h,y2:f}}function SLe(r,n,e,t,i,a){var s=t.value,o=i.value;t.unit===rr.kPercentage&&(s=t.value/100*n),i.unit===rr.kPercentage&&(o=i.value/100*e);var l=Math.max(distanceSquareRoot([0,0],[s,o]),distanceSquareRoot([0,e],[s,o]),distanceSquareRoot([n,e],[s,o]),distanceSquareRoot([n,0],[s,o]));return a&&(a instanceof ps?l=a.value:a instanceof Eh&&(a.value==="closest-side"?l=Math.min(s,n-s,o,e-o):a.value==="farthest-side"?l=Math.max(s,n-s,o,e-o):a.value==="closest-corner"&&(l=Math.min(distanceSquareRoot([0,0],[s,o]),distanceSquareRoot([0,e],[s,o]),distanceSquareRoot([n,e],[s,o]),distanceSquareRoot([n,0],[s,o]))))),{x:s+r[0],y:o+r[1],r:l}}var Ebe=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,bbe=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,kbe=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,ZG=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function wbe(r){var n,e=r.length;if(r[e-1].length=(n=r[e-1].length)!==null&&n!==void 0?n:{type:"%",value:"100"},e>1){var t;r[0].length=(t=r[0].length)!==null&&t!==void 0?t:{type:"%",value:"0"}}for(var i=0,a=Number(r[0].length.value),s=1;s<e;s++){var o,l=(o=r[s].length)===null||o===void 0?void 0:o.value;if(!(0,xe.Z)(l)&&!(0,xe.Z)(a)){for(var u=1;u<s-i;u++)r[i+u].length={type:"%",value:"".concat(a+(Number(l)-a)*u/(s-i))};i=s,a=Number(l)}}}var Sbe={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},Tbe=bc(function(r){var n;return r.type==="angular"?n=Number(r.value):n=Sbe[r.value]||0,Po(n,"deg")}),Cbe=bc(function(r){var n=50,e=50,t="%",i="%";if((r==null?void 0:r.type)==="position"){var a=r.value,s=a.x,o=a.y;(s==null?void 0:s.type)==="position-keyword"&&(s.value==="left"?n=0:s.value==="center"?n=50:s.value==="right"?n=100:s.value==="top"?e=0:s.value==="bottom"&&(e=100)),(o==null?void 0:o.type)==="position-keyword"&&(o.value==="left"?n=0:o.value==="center"?e=50:o.value==="right"?n=100:o.value==="top"?e=0:o.value==="bottom"&&(e=100)),((s==null?void 0:s.type)==="px"||(s==null?void 0:s.type)==="%"||(s==null?void 0:s.type)==="em")&&(t=s==null?void 0:s.type,n=Number(s.value)),((o==null?void 0:o.type)==="px"||(o==null?void 0:o.type)==="%"||(o==null?void 0:o.type)==="em")&&(i=o==null?void 0:o.type,e=Number(o.value))}return{cx:Po(n,t),cy:Po(e,i)}}),Mbe=bc(function(r){if(r.indexOf("linear")>-1||r.indexOf("radial")>-1){var n=xbe(r);return n.map(function(o){var l=o.type,u=o.orientation,c=o.colorStops;wbe(c);var d=c.map(function(T){return{offset:Po(Number(T.length.value),"%"),color:ybe(T)}});if(l==="linear-gradient")return new Aw(Rw.LinearGradient,{angle:u?Tbe(u):xm,steps:d});if(l==="radial-gradient"&&(u||(u=[{type:"shape",value:"circle"}]),u[0].type==="shape"&&u[0].value==="circle")){var h=Cbe(u[0].at),f=h.cx,v=h.cy,g;if(u[0].style){var m=u[0].style,y=m.type,w=m.value;y==="extent-keyword"?g=mbe(w):g=Po(w,y)}return new Aw(Rw.RadialGradient,{cx:f,cy:v,size:g,steps:d})}})}var e=r[0];if(r[1]==="("||r[2]==="("){if(e==="l"){var t=Ebe.exec(r);if(t){var i,a=((i=t[2].match(ZG))===null||i===void 0?void 0:i.map(function(o){return o.split(":")}))||[];return[new Aw(Rw.LinearGradient,{angle:Po(parseFloat(t[1]),"deg"),steps:a.map(function(o){var l=ll(o,2),u=l[0],c=l[1];return{offset:Po(Number(u)*100,"%"),color:c}})})]}}else if(e==="r"){var s=Pbe(r);if(s)if((0,Ze.Z)(s))r=s;else return[new Aw(Rw.RadialGradient,s)]}else if(e==="p")return Nbe(r)}});function Pbe(r){var n=bbe.exec(r);if(n){var e,t=((e=n[4].match(ZG))===null||e===void 0?void 0:e.map(function(i){return i.split(":")}))||[];return{cx:Po(50,"%"),cy:Po(50,"%"),steps:t.map(function(i){var a=ll(i,2),s=a[0],o=a[1];return{offset:Po(Number(s)*100,"%"),color:o}})}}return null}function Nbe(r){var n=kbe.exec(r);if(n){var e=n[1],t=n[2];switch(e){case"a":e="repeat";break;case"x":e="repeat-x";break;case"y":e="repeat-y";break;case"n":e="no-repeat";break;default:e="no-repeat"}return{image:t,repetition:e}}return null}function TLe(r){return!!r.type&&!!r.value}function Obe(r){return r&&!!r.image}function XG(r){return r&&!(0,xe.Z)(r.r)&&!(0,xe.Z)(r.g)&&!(0,xe.Z)(r.b)}var Ax=bc(function(r){if(Obe(r))return ol({repetition:"repeat"},r);if((0,xe.Z)(r)&&(r=""),r==="transparent")return YG;if(r==="currentColor")r="black";else if(r==="none")return WG;var n=Mbe(r);if(n)return n;var e=Tw(r),t=[0,0,0,0];return e!==null&&(t[0]=e.r||0,t[1]=e.g||0,t[2]=e.b||0,t[3]=e.opacity),pbe.apply(void 0,t)});function Rbe(r,n){if(!(!XG(r)||!XG(n)))return[[Number(r.r),Number(r.g),Number(r.b),Number(r.alpha)],[Number(n.r),Number(n.g),Number(n.b),Number(n.alpha)],function(e){var t=e.slice();if(t[3])for(var i=0;i<3;i++)t[i]=Math.round((0,O.Z)(t[i],0,255));return t[3]=(0,O.Z)(t[3],0,1),"rgba(".concat(t.join(","),")")}]}function Lx(r,n){if((0,xe.Z)(n))return Po(0,"px");if(n="".concat(n).trim().toLowerCase(),isFinite(Number(n))){if("px".search(r)>=0)return Po(Number(n),"px");if("deg".search(r)>=0)return Po(Number(n),"deg")}var e=[];n=n.replace(r,function(i){return e.push(i),"U".concat(i)});var t="U(".concat(r.source,")");return e.map(function(i){return Po(Number(n.replace(new RegExp("U".concat(i),"g"),"").replace(new RegExp(t,"g"),"*0")),i)})[0]}var KG=function(n){return Lx(new RegExp("px","g"),n)},Abe=bc(KG),Lbe=function(n){return Lx(new RegExp("%","g"),n)};bc(Lbe);var JG=function(n){return(0,pe.Z)(n)||isFinite(Number(n))?Po(Number(n)||0,"px"):Lx(new RegExp("px|%|em|rem","g"),n)},IN=bc(JG),QG=function(n){return Lx(new RegExp("deg|rad|grad|turn","g"),n)},Ibe=bc(QG);function Dbe(r,n,e,t){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a="",s=r.value||0,o=n.value||0,l=RN(r.unit),u=r.convertTo(l),c=n.convertTo(l);return u&&c?(s=u.value,o=c.value,a=ON(r.unit)):(ps.isLength(r.unit)||ps.isLength(n.unit))&&(s=Ad(r,i,e),o=Ad(n,i,e),a="px"),[s,o,function(d){return t&&(d=Math.max(d,0)),d+a}]}function ld(r){var n=0;return r.unit===rr.kDegrees?n=r.value:r.unit===rr.kRadians?n=xh(Number(r.value)):r.unit===rr.kTurns?n=XEe(Number(r.value)):r.value&&(n=r.value),n}function qG(r,n){var e;return Array.isArray(r)?e=r.map(function(t){return Number(t)}):(0,Ze.Z)(r)?e=r.split(" ").map(function(t){return Number(t)}):(0,pe.Z)(r)&&(e=[r]),n===2?e.length===1?[e[0],e[0]]:[e[0],e[1]]:e.length===1?[e[0],e[0],e[0],e[0]]:e.length===2?[e[0],e[1],e[0],e[1]]:e.length===3?[e[0],e[1],e[2],e[1]]:[e[0],e[1],e[2],e[3]]}function Ad(r,n,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(r.unit===rr.kPixels)return Number(r.value);if(r.unit===rr.kPercentage&&e){var i=e.nodeName===Zr.GROUP?e.getLocalBounds():e.getGeometryBounds();return(t?i.min[n]:0)+r.value/100*i.halfExtents[n]*2}return 0}var Fbe=function(n){return Lx(/deg|rad|grad|turn|px|%/g,n)},Bbe=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function $be(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(r=r.toLowerCase().trim(),r==="none")return[];for(var n=/\s*([\w-]+)\(([^)]*)\)/g,e=[],t,i=0;t=n.exec(r);){if(t.index!==i)return[];if(i=t.index+t[0].length,Bbe.indexOf(t[1])>-1&&e.push({name:t[1],params:t[2].split(" ").map(function(a){return Fbe(a)||Ax(a)})}),n.lastIndex===r.length)return e}return[]}function e8(r){return r.toString()}var t8=function(n){return typeof n=="number"?Po(n):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(n)?Po(Number(n)):Po(0)},DN=bc(t8);bc(function(r){return(0,Ze.Z)(r)?r.split(" ").map(DN):r.map(DN)});function FN(r,n){return[r,n,e8]}function BN(r,n){return function(e,t){return[e,t,function(i){return e8((0,O.Z)(i,r,n))}]}}function n8(r,n){if(r.length===n.length)return[r,n,function(e){return e}]}function r8(r){return r.parsedStyle.d.totalLength===0&&(r.parsedStyle.d.totalLength=(0,Um.D)(r.parsedStyle.d.absolutePath)),r.parsedStyle.d.totalLength}function Gbe(r){return r.parsedStyle.points.totalLength===0&&(r.parsedStyle.points.totalLength=(0,Nt.hE)(r.parsedStyle.points.points)),r.parsedStyle.points.totalLength}function zbe(r){for(var n=0;n<r.length;n++){var e=r[n-1],t=r[n],i=t[0];if(i==="M"&&e){var a=e[0],s=[t[1],t[2]],o=void 0;a==="L"||a==="M"?o=[e[1],e[2]]:(a==="C"||a==="A"||a==="Q")&&(o=[e[e.length-2],e[e.length-1]]),o&&Lw(s,o)&&(r.splice(n,1),n--)}}}function Vbe(r){for(var n=!1,e=r.length,t=0;t<e;t++){var i=r[t],a=i[0];if(a==="C"||a==="A"||a==="Q"){n=!0;break}}return n}function Ube(r){for(var n=[],e=[],t=[],i=0;i<r.length;i++){var a=r[i],s=a[0];s==="M"?(t.length&&(e.push(t),t=[]),t.push([a[1],a[2]])):s==="Z"?t.length&&(n.push(t),t=[]):t.push([a[1],a[2]])}return t.length>0&&e.push(t),{polygons:n,polylines:e}}function Lw(r,n){return r[0]===n[0]&&r[1]===n[1]}function jbe(r,n){for(var e=[],t=[],i=[],a=0;a<r.length;a++){var s=r[a],o=s.currentPoint,l=s.params,u=s.prePoint,c=void 0;switch(s.command){case"Q":c=(0,Nt.x4)(u[0],u[1],l[1],l[2],l[3],l[4]);break;case"C":c=(0,Nt.l5)(u[0],u[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var d=s.arcParams;c=(0,Nt.vp)(d.cx,d.cy,d.rx,d.ry,d.xRotation,d.startAngle,d.endAngle);break;default:e.push(o[0]),t.push(o[1]);break}c&&(s.box=c,e.push(c.x,c.x+c.width),t.push(c.y,c.y+c.height)),n&&(s.command==="L"||s.command==="M")&&s.prePoint&&s.nextPoint&&i.push(s)}e=e.filter(function(G){return!Number.isNaN(G)&&G!==1/0&&G!==-1/0}),t=t.filter(function(G){return!Number.isNaN(G)&&G!==1/0&&G!==-1/0});var h=(0,ne.Z)(e),f=(0,ne.Z)(t),v=(0,qe.Z)(e),g=(0,qe.Z)(t);if(i.length===0)return{x:h,y:f,width:v-h,height:g-f};for(var m=0;m<i.length;m++){var y=i[m],w=y.currentPoint,T=void 0;w[0]===h?(T=Iw(y,n),h-=T.xExtra):w[0]===v&&(T=Iw(y,n),v+=T.xExtra),w[1]===f?(T=Iw(y,n),f-=T.yExtra):w[1]===g&&(T=Iw(y,n),g+=T.yExtra)}return{x:h,y:f,width:v-h,height:g-f}}function Iw(r,n){var e=r.prePoint,t=r.currentPoint,i=r.nextPoint,a=Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2),s=Math.pow(t[0]-i[0],2)+Math.pow(t[1]-i[1],2),o=Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2),l=Math.acos((a+s-o)/(2*Math.sqrt(a)*Math.sqrt(s)));if(!l||Math.sin(l)===0||(0,dt.Z)(l,0))return{xExtra:0,yExtra:0};var u=Math.abs(Math.atan2(i[1]-t[1],i[0]-t[0])),c=Math.abs(Math.atan2(i[0]-t[0],i[1]-t[1]));u=u>Math.PI/2?Math.PI-u:u,c=c>Math.PI/2?Math.PI-c:c;var d={xExtra:Math.cos(l/2-u)*(n/2*(1/Math.sin(l/2)))-n/2||0,yExtra:Math.cos(c-l/2)*(n/2*(1/Math.sin(l/2)))-n/2||0};return d}function i8(r,n){return[n[0]+(n[0]-r[0]),n[1]+(n[1]-r[1])]}var a8=function(n,e){var t=n.x*e.x+n.y*e.y,i=Math.sqrt((Math.pow(n.x,2)+Math.pow(n.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2))),a=n.x*e.y-n.y*e.x<0?-1:1,s=a*Math.acos(t/i);return s},s8=function(n,e,t,i,a,s,o,l){e=Math.abs(e),t=Math.abs(t),i=(0,nt.Z)(i,360);var u=io(i);if(n.x===o.x&&n.y===o.y)return{x:n.x,y:n.y,ellipticalArcAngle:0};if(e===0||t===0)return{x:0,y:0,ellipticalArcAngle:0};var c=(n.x-o.x)/2,d=(n.y-o.y)/2,h={x:Math.cos(u)*c+Math.sin(u)*d,y:-Math.sin(u)*c+Math.cos(u)*d},f=Math.pow(h.x,2)/Math.pow(e,2)+Math.pow(h.y,2)/Math.pow(t,2);f>1&&(e*=Math.sqrt(f),t*=Math.sqrt(f));var v=Math.pow(e,2)*Math.pow(t,2)-Math.pow(e,2)*Math.pow(h.y,2)-Math.pow(t,2)*Math.pow(h.x,2),g=Math.pow(e,2)*Math.pow(h.y,2)+Math.pow(t,2)*Math.pow(h.x,2),m=v/g;m=m<0?0:m;var y=(a!==s?1:-1)*Math.sqrt(m),w={x:y*(e*h.y/t),y:y*(-(t*h.x)/e)},T={x:Math.cos(u)*w.x-Math.sin(u)*w.y+(n.x+o.x)/2,y:Math.sin(u)*w.x+Math.cos(u)*w.y+(n.y+o.y)/2},G={x:(h.x-w.x)/e,y:(h.y-w.y)/t},x=a8({x:1,y:0},G),_={x:(-h.x-w.x)/e,y:(-h.y-w.y)/t},p=a8(G,_);!s&&p>0?p-=2*Math.PI:s&&p<0&&(p+=2*Math.PI),p%=2*Math.PI;var b=x+p*l,R=e*Math.cos(b),B=t*Math.sin(b),j={x:Math.cos(u)*R-Math.sin(u)*B+T.x,y:Math.sin(u)*R+Math.cos(u)*B+T.y,ellipticalArcStartAngle:x,ellipticalArcEndAngle:x+p,ellipticalArcAngle:b,ellipticalArcCenter:T,resultantRx:e,resultantRy:t};return j};function Hbe(r){for(var n=[],e=null,t=null,i=null,a=0,s=r.length,o=0;o<s;o++){var l=r[o];t=r[o+1];var u=l[0],c={command:u,prePoint:e,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(u){case"M":i=[l[1],l[2]],a=o;break;case"A":var d=Wbe(e,l);c.arcParams=d;break}if(u==="Z")e=i,t=r[a+1];else{var h=l.length;e=[l[h-2],l[h-1]]}t&&t[0]==="Z"&&(t=r[a],n[a]&&(n[a].prePoint=e)),c.currentPoint=e,n[a]&&Lw(e,n[a].currentPoint)&&(n[a].prePoint=c.prePoint);var f=t?[t[t.length-2],t[t.length-1]]:null;c.nextPoint=f;var v=c.prePoint;if(["L","H","V"].includes(u))c.startTangent=[v[0]-e[0],v[1]-e[1]],c.endTangent=[e[0]-v[0],e[1]-v[1]];else if(u==="Q"){var g=[l[1],l[2]];c.startTangent=[v[0]-g[0],v[1]-g[1]],c.endTangent=[e[0]-g[0],e[1]-g[1]]}else if(u==="T"){var m=n[o-1],y=i8(m.currentPoint,v);m.command==="Q"?(c.command="Q",c.startTangent=[v[0]-y[0],v[1]-y[1]],c.endTangent=[e[0]-y[0],e[1]-y[1]]):(c.command="TL",c.startTangent=[v[0]-e[0],v[1]-e[1]],c.endTangent=[e[0]-v[0],e[1]-v[1]])}else if(u==="C"){var w=[l[1],l[2]],T=[l[3],l[4]];c.startTangent=[v[0]-w[0],v[1]-w[1]],c.endTangent=[e[0]-T[0],e[1]-T[1]],c.startTangent[0]===0&&c.startTangent[1]===0&&(c.startTangent=[w[0]-T[0],w[1]-T[1]]),c.endTangent[0]===0&&c.endTangent[1]===0&&(c.endTangent=[T[0]-w[0],T[1]-w[1]])}else if(u==="S"){var G=n[o-1],x=i8(G.currentPoint,v),_=[l[1],l[2]];G.command==="C"?(c.command="C",c.startTangent=[v[0]-x[0],v[1]-x[1]],c.endTangent=[e[0]-_[0],e[1]-_[1]]):(c.command="SQ",c.startTangent=[v[0]-_[0],v[1]-_[1]],c.endTangent=[e[0]-_[0],e[1]-_[1]])}else if(u==="A"){var p=o8(c,0),b=p.x,R=p.y,B=o8(c,1,!1),j=B.x,Z=B.y;c.startTangent=[b,R],c.endTangent=[j,Z]}n.push(c)}return n}function o8(r,n){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,t=r.arcParams,i=t.rx,a=i===void 0?0:i,s=t.ry,o=s===void 0?0:s,l=t.xRotation,u=t.arcFlag,c=t.sweepFlag,d=s8({x:r.prePoint[0],y:r.prePoint[1]},a,o,l,!!u,!!c,{x:r.currentPoint[0],y:r.currentPoint[1]},n),h=s8({x:r.prePoint[0],y:r.prePoint[1]},a,o,l,!!u,!!c,{x:r.currentPoint[0],y:r.currentPoint[1]},e?n+.005:n-.005),f=h.x-d.x,v=h.y-d.y,g=Math.sqrt(f*f+v*v);return{x:-f/g,y:-v/g}}function Dw(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function $N(r,n){return Dw(r)*Dw(n)?(r[0]*n[0]+r[1]*n[1])/(Dw(r)*Dw(n)):1}function l8(r,n){return(r[0]*n[1]<r[1]*n[0]?-1:1)*Math.acos($N(r,n))}function Wbe(r,n){var e=n[1],t=n[2],i=(0,nt.Z)(io(n[3]),Math.PI*2),a=n[4],s=n[5],o=r[0],l=r[1],u=n[6],c=n[7],d=Math.cos(i)*(o-u)/2+Math.sin(i)*(l-c)/2,h=-1*Math.sin(i)*(o-u)/2+Math.cos(i)*(l-c)/2,f=d*d/(e*e)+h*h/(t*t);f>1&&(e*=Math.sqrt(f),t*=Math.sqrt(f));var v=e*e*(h*h)+t*t*(d*d),g=v?Math.sqrt((e*e*(t*t)-v)/v):1;a===s&&(g*=-1),isNaN(g)&&(g=0);var m=t?g*e*h/t:0,y=e?g*-t*d/e:0,w=(o+u)/2+Math.cos(i)*m-Math.sin(i)*y,T=(l+c)/2+Math.sin(i)*m+Math.cos(i)*y,G=[(d-m)/e,(h-y)/t],x=[(-1*d-m)/e,(-1*h-y)/t],_=l8([1,0],G),p=l8(G,x);return $N(G,x)<=-1&&(p=Math.PI),$N(G,x)>=1&&(p=0),s===0&&p>0&&(p-=2*Math.PI),s===1&&p<0&&(p+=2*Math.PI),{cx:w,cy:T,rx:Lw(r,[u,c])?0:e,ry:Lw(r,[u,c])?0:t,startAngle:_,endAngle:_+p,xRotation:i,arcFlag:a,sweepFlag:s}}function Ybe(r,n,e){return r.reduce(function(t,i){var a="";if(i[0]==="M"||i[0]==="L"){var s=vec3.fromValues(i[1],i[2],0);e&&vec3.transformMat4(s,s,e),a="".concat(i[0]).concat(s[0],",").concat(s[1])}else if(i[0]==="Z")a=i[0];else if(i[0]==="C"){var o=vec3.fromValues(i[1],i[2],0),l=vec3.fromValues(i[3],i[4],0),u=vec3.fromValues(i[5],i[6],0);e&&(vec3.transformMat4(o,o,e),vec3.transformMat4(l,l,e),vec3.transformMat4(u,u,e)),a="".concat(i[0]).concat(o[0],",").concat(o[1],",").concat(l[0],",").concat(l[1],",").concat(u[0],",").concat(u[1])}else if(i[0]==="A"){var c=vec3.fromValues(i[6],i[7],0);e&&vec3.transformMat4(c,c,e),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],",").concat(i[5],",").concat(c[0],",").concat(c[1])}else if(i[0]==="Q"){var d=vec3.fromValues(i[1],i[2],0),h=vec3.fromValues(i[3],i[4],0);e&&(vec3.transformMat4(d,d,e),vec3.transformMat4(h,h,e)),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],"}")}return t+=a},"")}function Zbe(r,n,e,t){return[["M",r,n],["L",e,t]]}function u8(r,n,e,t){var i=(-1+Math.sqrt(2))/3*4,a=r*i,s=n*i,o=e-r,l=e+r,u=t-n,c=t+n;return[["M",o,t],["C",o,t-s,e-a,u,e,u],["C",e+a,u,l,t-s,l,t],["C",l,t+s,e+a,c,e,c],["C",e-a,c,o,t+s,o,t],["Z"]]}function Xbe(r,n){var e=r.map(function(t,i){return[i===0?"M":"L",t[0],t[1]]});return n&&e.push(["Z"]),e}function Kbe(r,n,e,t,i){if(i){var a=_slicedToArray(i,4),s=a[0],o=a[1],l=a[2],u=a[3],c=r>0?1:-1,d=n>0?1:-1,h=c+d!==0?1:0;return[["M",c*s+e,t],["L",r-c*o+e,t],o?["A",o,o,0,0,h,r+e,d*o+t]:null,["L",r+e,n-d*l+t],l?["A",l,l,0,0,h,r+e-c*l,n+t]:null,["L",e+c*u,n+t],u?["A",u,u,0,0,h,e,n+t-d*u]:null,["L",e,d*s+t],s?["A",s,s,0,0,h,c*s+e,t]:null,["Z"]].filter(function(f){return f})}return[["M",e,t],["L",e+r,t],["L",e+r,t+n],["L",e,t+n],["Z"]]}function CLe(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r.getLocalTransform(),e=[];switch(r.nodeName){case Zr.LINE:var t=r.parsedStyle,i=t.x1,a=i===void 0?0:i,s=t.y1,o=s===void 0?0:s,l=t.x2,u=l===void 0?0:l,c=t.y2,d=c===void 0?0:c;e=Zbe(a,o,u,d);break;case Zr.CIRCLE:{var h=r.parsedStyle,f=h.r,v=f===void 0?0:f,g=h.cx,m=g===void 0?0:g,y=h.cy,w=y===void 0?0:y;e=u8(v,v,m,w);break}case Zr.ELLIPSE:{var T=r.parsedStyle,G=T.rx,x=G===void 0?0:G,_=T.ry,p=_===void 0?0:_,b=T.cx,R=b===void 0?0:b,B=T.cy,j=B===void 0?0:B;e=u8(x,p,R,j);break}case Zr.POLYLINE:case Zr.POLYGON:var Z=r.parsedStyle.points;e=Xbe(Z.points,r.nodeName===Zr.POLYGON);break;case Zr.RECT:var te=r.parsedStyle,le=te.width,ue=le===void 0?0:le,se=te.height,V=se===void 0?0:se,ee=te.x,he=ee===void 0?0:ee,ut=te.y,ct=ut===void 0?0:ut,Lt=te.radius,vn=Lt&&Lt.some(function(rn){return rn!==0});e=Kbe(ue,V,he,ct,vn&&Lt.map(function(rn){return clamp(rn,0,Math.min(Math.abs(ue)/2,Math.abs(V)/2))}));break;case Zr.PATH:var tn=r.parsedStyle.d.absolutePath;e=_toConsumableArray(tn);break}if(e.length)return Ybe(e,r,n)}function MLe(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a=r.map(function(s,o){var l=s[0],u=r[o+1],c=o===0&&(n!==0||e!==0),d=(o===r.length-1||u&&(u[0]==="M"||u[0]==="Z"))&&t!==0&&i!==0,h=c?[n,e]:[0,0],f=_slicedToArray(h,2),v=f[0],g=f[1],m=d?[t,i]:[0,0],y=_slicedToArray(m,2),w=y[0],T=y[1];switch(l){case"M":return"M ".concat(s[1]+v,",").concat(s[2]+g);case"L":return"L ".concat(s[1]+w,",").concat(s[2]+T);case"Q":return"Q ".concat(s[1]," ").concat(s[2],",").concat(s[3]+w," ").concat(s[4]+T);case"C":return"C ".concat(s[1]," ").concat(s[2],",").concat(s[3]," ").concat(s[4],",").concat(s[5]+w," ").concat(s[6]+T);case"A":return"A ".concat(s[1]," ").concat(s[2]," ").concat(s[3]," ").concat(s[4]," ").concat(s[5]," ").concat(s[6]+w," ").concat(s[7]+T);case"Z":return"Z";default:return null}}).filter(function(s){return s!==null}).join(" ");return~a.indexOf("NaN")?"":a}var c8=function(n){if(n===""||Array.isArray(n)&&n.length===0)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var e;try{e=(0,xt.A)(n)}catch(f){e=(0,xt.A)(""),console.error("[g]: Invalid SVG Path definition: ".concat(n))}zbe(e);var t=Vbe(e),i=Ube(e),a=i.polygons,s=i.polylines,o=Hbe(e),l=jbe(o,0),u=l.x,c=l.y,d=l.width,h=l.height;return{absolutePath:e,hasArc:t,segments:o,polygons:a,polylines:s,totalLength:0,rect:{x:Number.isFinite(u)?u:0,y:Number.isFinite(c)?c:0,width:Number.isFinite(d)?d:0,height:Number.isFinite(h)?h:0}}},Jbe=bc(c8);function d8(r){return(0,Ze.Z)(r)?Jbe(r):c8(r)}function Qbe(r,n,e){var t=r.curve,i=n.curve;(!t||t.length===0)&&(t=(0,bt.Y)(r.absolutePath,!1),r.curve=t),(!i||i.length===0)&&(i=(0,bt.Y)(n.absolutePath,!1),n.curve=i);var a=[t,i];t.length!==i.length&&(a=(0,wt.x)(t,i));var s=(0,we.b)(a[0])!==(0,we.b)(a[1])?(0,oe.G)(a[0]):(0,Fe.U)(a[0]);return[s,(0,Ye.g)(a[1],s),function(o){return o}]}function qbe(r,n){var e;return(0,Ze.Z)(r)?e=r.split(" ").map(function(t){var i=t.split(","),a=ll(i,2),s=a[0],o=a[1];return[Number(s),Number(o)]}):e=r,{points:e,totalLength:0,segments:[]}}function eke(r,n){return[r.points,n.points,function(e){return e}]}var cl=null,y0=/\s*(\w+)\(([^)]*)\)/g;function ud(r){return function(n){var e=0;return r.map(function(t){return t===cl?n[e++]:t})}}function Em(r){return r}var Ix={matrix:["NNNNNN",[cl,cl,0,0,cl,cl,0,0,0,0,1,0,cl,cl,0,1],Em],matrix3d:["NNNNNNNNNNNNNNNN",Em],rotate:["A"],rotateX:["A"],rotateY:["A"],rotateZ:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",ud([cl,cl,new ps(1)]),Em],scaleX:["N",ud([cl,new ps(1),new ps(1)]),ud([cl,new ps(1)])],scaleY:["N",ud([new ps(1),cl,new ps(1)]),ud([new ps(1),cl])],scaleZ:["N",ud([new ps(1),new ps(1),cl])],scale3d:["NNN",Em],skew:["Aa",null,Em],skewX:["A",null,ud([cl,xm])],skewY:["A",null,ud([xm,cl])],translate:["Tt",ud([cl,cl,Tf]),Em],translateX:["T",ud([cl,Tf,Tf]),ud([cl,Tf])],translateY:["T",ud([Tf,cl,Tf]),ud([Tf,cl])],translateZ:["L",ud([Tf,Tf,cl])],translate3d:["TTL",Em]};function h8(r){for(var n=[],e=r.length,t=0;t<e;t++){var i=r[t],a=i[0],s=i.slice(1);a==="translate"||a==="skew"?s.length===1&&s.push(0):a==="scale"&&s.length===1&&s.push(s[0]);var o=Ix[a];if(!o)return[];var l=s.map(function(u){return Po(u)});n.push({t:a,d:l})}return n}function tke(r){if(Array.isArray(r))return h8(r);if(r=(r||"none").trim(),r==="none")return[];var n=[],e,t=0;for(y0.lastIndex=0;e=y0.exec(r);){if(e.index!==t)return[];t=e.index+e[0].length;var i=e[1],a=Ix[i];if(!a)return[];var s=e[2].split(","),o=a[0];if(o.length<s.length)return[];for(var l=[],u=0;u<o.length;u++){var c=s[u],d=o[u],h=void 0;if(c?h={A:function(v){return v.trim()==="0"?xm:Ibe(v)},N:DN,T:IN,L:Abe}[d.toUpperCase()](c):h={a:xm,n:l[0],t:Tf}[d],h===void 0)return[];l.push(h)}if(n.push({t:i,d:l}),y0.lastIndex===r.length)return n}return[]}function nke(r){if(Array.isArray(r))return h8(r);if(r=(r||"none").trim(),r==="none")return[];var n=[],e,t=0;for(y0.lastIndex=0;e=y0.exec(r);){if(e.index!==t)return[];t=e.index+e[0].length;var i=e[1],a=Ix[i];if(!a)return[];var s=e[2].split(","),o=a[0];if(o.length<s.length)return[];for(var l=[],u=0;u<o.length;u++){var c=s[u],d=o[u],h=void 0;if(c?h={A:function(v){return v.trim()==="0"?xm:QG(v)},N:t8,T:JG,L:KG}[d.toUpperCase()](c):h={a:xm,n:l[0],t:Tf}[d],h===void 0)return[];l.push(h)}if(n.push({t:i,d:l}),y0.lastIndex===r.length)return n}return[]}function rke(r){var n,e,t,i;switch(r.t){case"rotateX":return i=io(ld(r.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotateY":return i=io(ld(r.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotateZ":return i=io(ld(r.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":n=r.d[0].value,e=r.d[1].value,t=r.d[2].value,i=io(ld(r.d[3]));var a=n*n+e*e+t*t;if(a===0)n=1,e=0,t=0;else if(a!==1){var s=Math.sqrt(a);n/=s,e/=s,t/=s}var o=Math.sin(i/2),l=o*Math.cos(i/2),u=o*o;return[1-2*(e*e+t*t)*u,2*(n*e*u+t*l),2*(n*t*u-e*l),0,2*(n*e*u-t*l),1-2*(n*n+t*t)*u,2*(e*t*u+n*l),0,2*(n*t*u+e*l),2*(e*t*u-n*l),1-2*(n*n+e*e)*u,0,0,0,0,1];case"scale":return[r.d[0].value,0,0,0,0,r.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scaleX":return[r.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaleY":return[1,0,0,0,0,r.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scaleZ":return[1,0,0,0,0,1,0,0,0,0,r.d[0].value,0,0,0,0,1];case"scale3d":return[r.d[0].value,0,0,0,0,r.d[1].value,0,0,0,0,r.d[2].value,0,0,0,0,1];case"skew":var c=io(ld(r.d[0])),d=io(ld(r.d[1]));return[1,Math.tan(d),0,0,Math.tan(c),1,0,0,0,0,1,0,0,0,0,1];case"skewX":return i=io(ld(r.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewY":return i=io(ld(r.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return n=Ad(r.d[0],0,null)||0,e=Ad(r.d[1],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,e,0,1];case"translateX":return n=Ad(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,0,0,1];case"translateY":return e=Ad(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,e,0,1];case"translateZ":return t=Ad(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,t,1];case"translate3d":return n=Ad(r.d[0],0,null)||0,e=Ad(r.d[1],0,null)||0,t=Ad(r.d[2],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,n,e,t,1];case"perspective":var h=Ad(r.d[0],0,null)||0,f=h?-1/h:0;return[1,0,0,0,0,1,0,0,0,0,1,f,0,0,0,1];case"matrix":return[r.d[0].value,r.d[1].value,0,0,r.d[2].value,r.d[3].value,0,0,0,0,1,0,r.d[4].value,r.d[5].value,0,1];case"matrix3d":return r.d.map(function(v){return v.value})}}function ike(r,n){return[r[0]*n[0]+r[4]*n[1]+r[8]*n[2]+r[12]*n[3],r[1]*n[0]+r[5]*n[1]+r[9]*n[2]+r[13]*n[3],r[2]*n[0]+r[6]*n[1]+r[10]*n[2]+r[14]*n[3],r[3]*n[0]+r[7]*n[1]+r[11]*n[2]+r[15]*n[3],r[0]*n[4]+r[4]*n[5]+r[8]*n[6]+r[12]*n[7],r[1]*n[4]+r[5]*n[5]+r[9]*n[6]+r[13]*n[7],r[2]*n[4]+r[6]*n[5]+r[10]*n[6]+r[14]*n[7],r[3]*n[4]+r[7]*n[5]+r[11]*n[6]+r[15]*n[7],r[0]*n[8]+r[4]*n[9]+r[8]*n[10]+r[12]*n[11],r[1]*n[8]+r[5]*n[9]+r[9]*n[10]+r[13]*n[11],r[2]*n[8]+r[6]*n[9]+r[10]*n[10]+r[14]*n[11],r[3]*n[8]+r[7]*n[9]+r[11]*n[10]+r[15]*n[11],r[0]*n[12]+r[4]*n[13]+r[8]*n[14]+r[12]*n[15],r[1]*n[12]+r[5]*n[13]+r[9]*n[14]+r[13]*n[15],r[2]*n[12]+r[6]*n[13]+r[10]*n[14]+r[14]*n[15],r[3]*n[12]+r[7]*n[13]+r[11]*n[14]+r[15]*n[15]]}function ake(r){return r.length===0?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:r.map(rke).reduce(ike)}function f8(r){var n=[0,0,0],e=[1,1,1],t=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return ebe(ake(r),n,e,t,i,a),[[n,e,t,a,i]]}var ske=function(){function r(t,i){for(var a=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],s=0;s<4;s++)for(var o=0;o<4;o++)for(var l=0;l<4;l++)a[s][o]+=i[s][l]*t[l][o];return a}function n(t){return t[0][2]===0&&t[0][3]===0&&t[1][2]===0&&t[1][3]===0&&t[2][0]===0&&t[2][1]===0&&t[2][2]===1&&t[2][3]===0&&t[3][2]===0&&t[3][3]===1}function e(t,i,a,s,o){for(var l=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],u=0;u<4;u++)l[u][3]=o[u];for(var c=0;c<3;c++)for(var d=0;d<3;d++)l[3][c]+=t[d]*l[d][c];var h=s[0],f=s[1],v=s[2],g=s[3],m=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];m[0][0]=1-2*(f*f+v*v),m[0][1]=2*(h*f-v*g),m[0][2]=2*(h*v+f*g),m[1][0]=2*(h*f+v*g),m[1][1]=1-2*(h*h+v*v),m[1][2]=2*(f*v-h*g),m[2][0]=2*(h*v-f*g),m[2][1]=2*(f*v+h*g),m[2][2]=1-2*(h*h+f*f),l=r(l,m);var y=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];a[2]&&(y[2][1]=a[2],l=r(l,y)),a[1]&&(y[2][1]=0,y[2][0]=a[0],l=r(l,y)),a[0]&&(y[2][0]=0,y[1][0]=a[0],l=r(l,y));for(var w=0;w<3;w++)for(var T=0;T<3;T++)l[w][T]*=i[w];return n(l)?[l[0][0],l[0][1],l[1][0],l[1][1],l[3][0],l[3][1]]:l[0].concat(l[1],l[2],l[3])}return e}();function oke(r){return r.toFixed(6).replace(".000000","")}function GN(r,n){var e,t;return r.decompositionPair!==n&&(r.decompositionPair=n,e=f8(r)),n.decompositionPair!==r&&(n.decompositionPair=r,t=f8(n)),e[0]===null||t[0]===null?[[!1],[!0],function(i){return i?n[0].d:r[0].d}]:(e[0].push(0),t[0].push(1),[e,t,function(i){var a=uke(e[0][3],t[0][3],i[5]),s=ske(i[0],i[1],i[2],a,i[4]),o=s.map(oke).join(",");return o}])}function lke(r,n){for(var e=0,t=0;t<r.length;t++)e+=r[t]*n[t];return e}function uke(r,n,e){var t=lke(r,n);t=(0,O.Z)(t,-1,1);var i=[];if(t===1)i=r;else for(var a=Math.acos(t),s=Math.sin(e*a)*1/Math.sqrt(1-t*t),o=0;o<4;o++)i.push(r[o]*(Math.cos(e*a)-t*s)+n[o]*s);return i}function zN(r){return r.replace(/[XY]/,"")}function VN(r){return r.replace(/(X|Y|Z|3d)?$/,"3d")}var cke=function(n,e){return n==="perspective"&&e==="perspective"||(n==="matrix"||n==="matrix3d")&&(e==="matrix"||e==="matrix3d")};function dke(r,n,e){var t=!1;if(!r.length||!n.length){r.length||(t=!0,r=n,n=[]);for(var i=function(){var j=r[a],Z=j.t,te=j.d,le=Z.substring(0,5)==="scale"?1:0;n.push({t:Z,d:te.map(function(ue){return typeof ue=="number"?Po(le):Po(le,ue.unit)})})},a=0;a<r.length;a++)i()}var s=[],o=[],l=[];if(r.length!==n.length){var u=GN(r,n);s=[u[0]],o=[u[1]],l=[["matrix",[u[2]]]]}else for(var c=0;c<r.length;c++){var d=r[c].t,h=n[c].t,f=r[c].d,v=n[c].d,g=Ix[d],m=Ix[h],y=void 0;if(cke(d,h)){var w=GN([r[c]],[n[c]]);s.push(w[0]),o.push(w[1]),l.push(["matrix",[w[2]]]);continue}else if(d===h)y=d;else if(g[2]&&m[2]&&zN(d)===zN(h))y=zN(d),f=g[2](f),v=m[2](v);else if(g[1]&&m[1]&&VN(d)===VN(h))y=VN(d),f=g[1](f),v=m[1](v);else{var T=GN(r,n);s=[T[0]],o=[T[1]],l=[["matrix",[T[2]]]];break}for(var G=[],x=[],_=[],p=0;p<f.length;p++){var b=Dbe(f[p],v[p],e,!1,p);G[p]=b[0],x[p]=b[1],_.push(b[2])}s.push(G),o.push(x),l.push([y,_])}if(t){var R=s;s=o,o=R}return[s,o,function(B){return B.map(function(j,Z){var te=j.map(function(le,ue){return l[Z][1][ue](le)}).join(",");return l[Z][0]==="matrix"&&te.split(",").length===16&&(l[Z][0]="matrix3d"),l[Z][0]==="matrix3d"&&te.split(",").length===6&&(l[Z][0]="matrix"),"".concat(l[Z][0],"(").concat(te,")")}).join(" ")}]}var hke=bc(function(r){if((0,Ze.Z)(r)){if(r==="text-anchor")return[Po(0,"px"),Po(0,"px")];var n=r.split(" ");return n.length===1&&(n[0]==="top"||n[0]==="bottom"?(n[1]=n[0],n[0]="center"):n[1]="center"),n.length!==2?null:[IN(v8(n[0])),IN(v8(n[1]))]}return[Po(r[0]||0,"px"),Po(r[1]||0,"px")]});function v8(r){return r==="center"?"50%":r==="left"||r==="top"?"0%":r==="right"||r==="bottom"?"100%":r}var g8=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:Zn.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:Zn.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:Zn.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:Zn.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:Zn.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:Zn.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:Zn.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:Zn.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:Zn.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:Zn.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:Zn.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:Zn.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:Zn.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:Zn.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:Zn.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:Zn.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:Zn.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:Zn.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:Zn.FILTER},{n:"clipPath",syntax:Zn.DEFINED_PATH},{n:"textPath",syntax:Zn.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:Zn.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:Zn.TRANSFORM},{n:"transformOrigin",p:100,d:"0 0",l:!0,syntax:Zn.TRANSFORM_ORIGIN},{n:"cx",int:!0,l:!0,d:"0",syntax:Zn.COORDINATE},{n:"cy",int:!0,l:!0,d:"0",syntax:Zn.COORDINATE},{n:"cz",int:!0,l:!0,d:"0",syntax:Zn.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:Zn.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:Zn.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:Zn.LENGTH_PERCENTAGE},{n:"x",int:!0,l:!0,d:"0",syntax:Zn.COORDINATE},{n:"y",int:!0,l:!0,d:"0",syntax:Zn.COORDINATE},{n:"z",int:!0,l:!0,d:"0",syntax:Zn.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:Zn.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:Zn.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:Zn.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:Zn.COORDINATE},{n:"y1",int:!0,l:!0,syntax:Zn.COORDINATE},{n:"z1",int:!0,l:!0,syntax:Zn.COORDINATE},{n:"x2",int:!0,l:!0,syntax:Zn.COORDINATE},{n:"y2",int:!0,l:!0,syntax:Zn.COORDINATE},{n:"z2",int:!0,l:!0,syntax:Zn.COORDINATE},{n:"d",int:!0,l:!0,d:"",syntax:Zn.PATH,p:50},{n:"points",int:!0,l:!0,syntax:Zn.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:Zn.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:Zn.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:Zn.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:Zn.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:Zn.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:Zn.NUMBER,d:function(n){return n===Zr.PATH||n===Zr.POLYGON||n===Zr.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:Zn.MARKER},{n:"markerEnd",syntax:Zn.MARKER},{n:"markerMid",syntax:Zn.MARKER},{n:"markerStartOffset",syntax:Zn.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:Zn.LENGTH,l:!0,int:!0,d:"0"}],fke=new Set(g8.filter(function(r){return!!r.l}).map(function(r){return r.n})),vke={},gke=function(){function r(n){var e=this;Nr(this,r),this.runtime=n,g8.forEach(function(t){e.registerMetadata(t)})}return Or(r,[{key:"registerMetadata",value:function(e){[e.n].concat(zl(e.a||[])).forEach(function(t){vke[t]=e})}},{key:"getPropertySyntax",value:function(e){return this.runtime.CSSPropertySyntaxFactory[e]}},{key:"processProperties",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0};Object.assign(e.attributes,t);var a=e.parsedStyle.clipPath,s=e.parsedStyle.offsetPath;_ke(e,t);var o=!!i.forceUpdateGeometry;if(!o){for(var l in t)if(fke.has(l)){o=!0;break}}var u=_8(e);u.has("fill")&&t.fill&&(e.parsedStyle.fill=Ax(t.fill)),u.has("stroke")&&t.stroke&&(e.parsedStyle.stroke=Ax(t.stroke)),u.has("shadowColor")&&t.shadowColor&&(e.parsedStyle.shadowColor=Ax(t.shadowColor)),u.has("filter")&&t.filter&&(e.parsedStyle.filter=$be(t.filter)),u.has("radius")&&!(0,xe.Z)(t.radius)&&(e.parsedStyle.radius=qG(t.radius,4)),u.has("lineDash")&&!(0,xe.Z)(t.lineDash)&&(e.parsedStyle.lineDash=qG(t.lineDash,2)),u.has("points")&&t.points&&(e.parsedStyle.points=qbe(t.points)),u.has("d")&&t.d===""&&(e.parsedStyle.d=ol({},UG)),u.has("d")&&t.d&&(e.parsedStyle.d=d8(t.d)),u.has("textTransform")&&t.textTransform&&this.runtime.CSSPropertySyntaxFactory[Zn.TEXT_TRANSFORM].calculator(null,null,{value:t.textTransform},e,null),u.has("clipPath")&&!(0,ie.Z)(t.clipPath)&&this.runtime.CSSPropertySyntaxFactory[Zn.DEFINED_PATH].calculator("clipPath",a,t.clipPath,e,this.runtime),u.has("offsetPath")&&t.offsetPath&&this.runtime.CSSPropertySyntaxFactory[Zn.DEFINED_PATH].calculator("offsetPath",s,t.offsetPath,e,this.runtime),u.has("transform")&&t.transform&&(e.parsedStyle.transform=tke(t.transform)),u.has("transformOrigin")&&t.transformOrigin&&(e.parsedStyle.transformOrigin=hke(t.transformOrigin)),u.has("markerStart")&&t.markerStart&&(e.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory[Zn.MARKER].calculator(null,t.markerStart,t.markerStart,null,null)),u.has("markerEnd")&&t.markerEnd&&(e.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory[Zn.MARKER].calculator(null,t.markerEnd,t.markerEnd,null,null)),u.has("markerMid")&&t.markerMid&&(e.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory[Zn.MARKER].calculator("",t.markerMid,t.markerMid,null,null)),u.has("zIndex")&&!(0,xe.Z)(t.zIndex)&&this.runtime.CSSPropertySyntaxFactory[Zn.Z_INDEX].postProcessor(e),u.has("offsetDistance")&&!(0,xe.Z)(t.offsetDistance)&&this.runtime.CSSPropertySyntaxFactory[Zn.OFFSET_DISTANCE].postProcessor(e),u.has("transform")&&t.transform&&this.runtime.CSSPropertySyntaxFactory[Zn.TRANSFORM].postProcessor(e),u.has("transformOrigin")&&t.transformOrigin&&this.runtime.CSSPropertySyntaxFactory[Zn.TRANSFORM_ORIGIN].postProcessor(e),o&&(e.geometry.dirty=!0,e.renderable.boundsDirty=!0,e.renderable.renderBoundsDirty=!0,i.forceUpdateGeometry||this.runtime.sceneGraphService.dirtifyToRoot(e))}},{key:"updateGeometry",value:function(e){var t=e.nodeName,i=this.runtime.geometryUpdaterFactory[t];if(i){var a=e.geometry;a.contentBounds||(a.contentBounds=new sd),a.renderBounds||(a.renderBounds=new sd);var s=e.parsedStyle,o=i.update(s,e),l=o.cx,u=l===void 0?0:l,c=o.cy,d=c===void 0?0:c,h=o.cz,f=h===void 0?0:h,v=o.hwidth,g=v===void 0?0:v,m=o.hheight,y=m===void 0?0:m,w=o.hdepth,T=w===void 0?0:w,G=[Math.abs(g),Math.abs(y),T],x=s.stroke,_=s.lineWidth,p=_===void 0?1:_,b=s.increasedLineWidthForHitTesting,R=b===void 0?0:b,B=s.shadowType,j=B===void 0?"outer":B,Z=s.shadowColor,te=s.filter,le=te===void 0?[]:te,ue=s.transformOrigin,se=[u,d,f];a.contentBounds.update(se,G);var V=t===Zr.POLYLINE||t===Zr.POLYGON||t===Zr.PATH?Math.SQRT2:.5,ee=x&&!x.isNone;if(ee){var he=((p||0)+(R||0))*V;G[0]+=he,G[1]+=he}if(a.renderBounds.update(se,G),Z&&j&&j!=="inner"){var ut=a.renderBounds,ct=ut.min,Lt=ut.max,vn=s.shadowBlur,tn=s.shadowOffsetX,rn=s.shadowOffsetY,mn=vn||0,ar=tn||0,gi=rn||0,kr=ct[0]-mn+ar,Ta=Lt[0]+mn+ar,Wa=ct[1]-mn+gi,la=Lt[1]+mn+gi;ct[0]=Math.min(ct[0],kr),Lt[0]=Math.max(Lt[0],Ta),ct[1]=Math.min(ct[1],Wa),Lt[1]=Math.max(Lt[1],la),a.renderBounds.setMinMax(ct,Lt)}le.forEach(function(so){var oo=so.name,qi=so.params;if(oo==="blur"){var lo=qi[0].value;a.renderBounds.update(a.renderBounds.center,E.IH(a.renderBounds.halfExtents,a.renderBounds.halfExtents,[lo,lo,0]))}else if(oo==="drop-shadow"){var uo=qi[0].value,co=qi[1].value,ea=qi[2].value,ho=a.renderBounds,Rr=ho.min,Ar=ho.max,Gu=Rr[0]-ea+uo,zu=Ar[0]+ea+uo,Vu=Rr[1]-ea+co,Uu=Ar[1]+ea+co;Rr[0]=Math.min(Rr[0],Gu),Ar[0]=Math.max(Ar[0],zu),Rr[1]=Math.min(Rr[1],Vu),Ar[1]=Math.max(Ar[1],Uu),a.renderBounds.setMinMax(Rr,Ar)}}),e.geometry.dirty=!1;var ys=g<0,Jl=y<0,xs=(ys?-1:1)*(ue?Ad(ue[0],0,e,!0):0),Es=(Jl?-1:1)*(ue?Ad(ue[1],1,e,!0):0);(xs||Es)&&e.setOrigin(xs,Es)}}},{key:"updateSizeAttenuation",value:function(e,t){e.style.isSizeAttenuation?(e.style.rawLineWidth||(e.style.rawLineWidth=e.style.lineWidth),e.style.lineWidth=(e.style.rawLineWidth||1)/t,e.nodeName===Zr.CIRCLE&&(e.style.rawR||(e.style.rawR=e.style.r),e.style.r=(e.style.rawR||1)/t)):(e.style.rawLineWidth&&(e.style.lineWidth=e.style.rawLineWidth,delete e.style.rawLineWidth),e.nodeName===Zr.CIRCLE&&e.style.rawR&&(e.style.r=e.style.rawR,delete e.style.rawR))}}])}();function _ke(r,n){var e=_8(r);for(var t in n)e.has(t)&&(r.parsedStyle[t]=n[t])}function _8(r){return r.constructor.PARSED_STYLE_LIST}var mke=function(){function r(){Nr(this,r),this.mixer=FN}return Or(r,[{key:"calculator",value:function(e,t,i,a){return ld(i)}}])}(),pke=function(){function r(){Nr(this,r)}return Or(r,[{key:"calculator",value:function(e,t,i,a,s){return i instanceof Eh&&(i=null),s.sceneGraphService.updateDisplayObjectDependency(e,t,i,a),e==="clipPath"&&a.forEach(function(o){o.childNodes.length===0&&s.sceneGraphService.dirtifyToRoot(o)}),i}}])}(),yke=function(){function r(){Nr(this,r),this.parser=Ax,this.mixer=Rbe}return Or(r,[{key:"calculator",value:function(e,t,i,a){return i instanceof Eh?i.value==="none"?WG:YG:i}}])}(),xke=function(){function r(){Nr(this,r)}return Or(r,[{key:"calculator",value:function(e,t,i){return i instanceof Eh?[]:i}}])}();function m8(r){var n=r.parsedStyle,e=n.fontSize;return(0,xe.Z)(e)?null:e}var UN=function(){function r(){Nr(this,r),this.mixer=FN}return Or(r,[{key:"calculator",value:function(e,t,i,a,s){if((0,pe.Z)(i))return i;if(ps.isRelativeUnit(i.unit)){if(i.unit===rr.kPercentage)return 0;if(i.unit===rr.kEms){if(a.parentNode){var o=m8(a.parentNode);if(o)return o*=i.value,o}return 0}if(i.unit===rr.kRems){var l;if(a!=null&&(l=a.ownerDocument)!==null&&l!==void 0&&l.documentElement){var u=m8(a.ownerDocument.documentElement);if(u)return u*=i.value,u}return 0}}else return i.value}}])}(),Eke=function(){function r(){Nr(this,r),this.mixer=n8}return Or(r,[{key:"calculator",value:function(e,t,i){return i.map(function(a){return a.value})}}])}(),bke=function(){function r(){Nr(this,r),this.mixer=n8}return Or(r,[{key:"calculator",value:function(e,t,i){return i.map(function(a){return a.value})}}])}(),kke=function(){function r(){Nr(this,r)}return Or(r,[{key:"calculator",value:function(e,t,i,a){var s;i instanceof Eh&&(i=null);var o=(s=i)===null||s===void 0?void 0:s.cloneNode(!0);return o&&(o.style.isMarker=!0),o}}])}(),wke=function(){function r(){Nr(this,r),this.mixer=FN}return Or(r,[{key:"calculator",value:function(e,t,i){return i.value}}])}(),Ske=function(){function r(){Nr(this,r),this.mixer=BN(0,1)}return Or(r,[{key:"calculator",value:function(e,t,i){return i.value}},{key:"postProcessor",value:function(e){var t=e.parsedStyle,i=t.offsetPath,a=t.offsetDistance;if(i){var s=i.nodeName;if(s===Zr.LINE||s===Zr.PATH||s===Zr.POLYLINE){var o=i.getPoint(a);o&&e.setLocalPosition(o.x,o.y)}}}}])}(),Tke=function(){function r(){Nr(this,r),this.mixer=BN(0,1)}return Or(r,[{key:"calculator",value:function(e,t,i){return i.value}}])}(),Cke=function(){function r(){Nr(this,r),this.parser=d8,this.mixer=Qbe}return Or(r,[{key:"calculator",value:function(e,t,i){return i instanceof Eh&&i.value==="unset"?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new m0(0,0,0,0)}:i}}])}(),Mke=Or(function r(){Nr(this,r),this.mixer=eke}),Pke=function(r){function n(){var e;Nr(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=no(this,n,[].concat(i)),e.mixer=BN(0,1/0),e}return ro(n,r),Or(n)}(UN),Nke=function(){function r(){Nr(this,r)}return Or(r,[{key:"calculator",value:function(e,t,i,a){return i instanceof Eh?i.value==="unset"?"":i.value:"".concat(i)}},{key:"postProcessor",value:function(e){e.nodeValue="".concat(e.parsedStyle.text)||""}}])}(),Oke=function(){function r(){Nr(this,r)}return Or(r,[{key:"calculator",value:function(e,t,i,a){var s=a.getAttribute("text");if(s){var o=s;i.value==="capitalize"?o=s.charAt(0).toUpperCase()+s.slice(1):i.value==="lowercase"?o=s.toLowerCase():i.value==="uppercase"&&(o=s.toUpperCase()),a.parsedStyle.text=o}return i.value}}])}(),PLe=function(n){return Object.fromEntries(Object.entries(n).filter(function(e){var t=_slicedToArray(e,2),i=t[1];return i!==void 0}))},jN=new WeakMap;function NLe(r,n,e){if(r){var t=typeof r=="string"?document.getElementById(r):r;jN.has(t)&&jN.get(t).destroy(e),jN.set(t,n)}}var p8=typeof window!="undefined"&&typeof window.document!="undefined";function OLe(r){return!!r.getAttribute}function RLe(r,n){for(var e=0,t=r.length;e<t;){var i=e+t>>>1;Rke(r[i],n)<0?e=i+1:t=i}return e}function Rke(r,n){var e=Number(r.parsedStyle.zIndex||0),t=Number(n.parsedStyle.zIndex||0);if(e===t){var i=r.parentNode;if(i){var a=i.childNodes||[];return a.indexOf(r)-a.indexOf(n)}}return e-t}function Ake(r){var n=r;do{var e,t=(e=n.parsedStyle)===null||e===void 0?void 0:e.clipPath;if(t)return n;n=n.parentElement}while(n!==null);return null}var y8="px";function ALe(r,n,e){p8&&r.style&&(r.style.width=n+y8,r.style.height=e+y8)}function x8(r,n){if(p8)return document.defaultView.getComputedStyle(r,null).getPropertyValue(n)}function LLe(r){var n=x8(r,"width");return n==="auto"?r.offsetWidth:parseFloat(n)}function ILe(r){var n=x8(r,"height");return n==="auto"?r.offsetHeight:parseFloat(n)}var Lke=1,Ike={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},Dke=typeof performance=="object"&&performance.now?performance:Date;function HN(r){return r.nodeName===Zr.FRAGMENT?!0:r.getRootNode().nodeName===Zr.FRAGMENT}function DLe(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"auto",n=arguments.length>1?arguments[1]:void 0,e=arguments.length>2?arguments[2]:void 0,t=!1,i=!1,a=!!n&&!n.isNone,s=!!e&&!e.isNone;return r==="visiblepainted"||r==="painted"||r==="auto"?(t=a,i=s):r==="visiblefill"||r==="fill"?t=!0:r==="visiblestroke"||r==="stroke"?i=!0:(r==="visible"||r==="all")&&(t=!0,i=!0),[t,i]}var Fke=1,Bke=function(){return Fke++},Ev=typeof self=="object"&&self.self===self?self:typeof k.g=="object"&&k.g.global===k.g?k.g:{},$ke=Date.now(),Gke=function(){return Ev.performance&&typeof Ev.performance.now=="function"?Ev.performance.now():Date.now()-$ke},Dx={},E8=Date.now(),zke=function(n){if(typeof n!="function")throw new TypeError("".concat(n," is not a function"));var e=Date.now(),t=e-E8,i=t>16?0:16-t,a=Bke();return Dx[a]=n,Object.keys(Dx).length>1||setTimeout(function(){E8=e;var s=Dx;Dx={},Object.keys(s).forEach(function(o){return s[o](Gke())})},i),a},Vke=function(n){delete Dx[n]},Uke=["","webkit","moz","ms","o"],b8=function(n){return typeof n!="string"?zke:n===""?Ev.requestAnimationFrame:Ev["".concat(n,"RequestAnimationFrame")]},jke=function(n){return typeof n!="string"?Vke:n===""?Ev.cancelAnimationFrame:Ev["".concat(n,"CancelAnimationFrame")]||Ev["".concat(n,"CancelRequestAnimationFrame")]},Hke=function(n,e){for(var t=0;n[t]!==void 0;){if(e(n[t]))return n[t];t+=1}},k8=Hke(Uke,function(r){return!!b8(r)}),w8=b8(k8),Wke=jke(k8);Ev.requestAnimationFrame=w8,Ev.cancelAnimationFrame=Wke;var FLe=null,BLe=null,$Le=null,GLe=null,Yke=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Zke=/([\"\'])[^\'\"]+\1/;function Xke(r){for(var n=r.fontSize,e=n===void 0?16:n,t=r.fontFamily,i=t===void 0?"sans-serif":t,a=r.fontStyle,s=a===void 0?"normal":a,o=r.fontVariant,l=o===void 0?"normal":o,u=r.fontWeight,c=u===void 0?"normal":u,d=(0,pe.Z)(e)&&"".concat(e,"px")||"16px",h=i.split(","),f=h.length-1;f>=0;f--){var v=h[f].trim();!Zke.test(v)&&Yke.indexOf(v)<0&&(v='"'.concat(v,'"')),h[f]=v}return"".concat(s," ").concat(l," ").concat(c," ").concat(d," ").concat(h.join(","))}function WN(r,n,e){return L.identity(r),r[4]=Math.tan(n),r[1]=Math.tan(e),r}var Ul=L.create(),Kke=L.create(),Jke={scale:function(n){L.fromScaling(Ul,[n[0].value,n[1].value,1])},scaleX:function(n){L.fromScaling(Ul,[n[0].value,1,1])},scaleY:function(n){L.fromScaling(Ul,[1,n[0].value,1])},scaleZ:function(n){L.fromScaling(Ul,[1,1,n[0].value])},scale3d:function(n){L.fromScaling(Ul,[n[0].value,n[1].value,n[2].value])},translate:function(n){L.fromTranslation(Ul,[n[0].value,n[1].value,0])},translateX:function(n){L.fromTranslation(Ul,[n[0].value,0,0])},translateY:function(n){L.fromTranslation(Ul,[0,n[0].value,0])},translateZ:function(n){L.fromTranslation(Ul,[0,0,n[0].value])},translate3d:function(n){L.fromTranslation(Ul,[n[0].value,n[1].value,n[2].value])},rotate:function(n){L.fromZRotation(Ul,io(ld(n[0])))},rotateX:function(n){L.fromXRotation(Ul,io(ld(n[0])))},rotateY:function(n){L.fromYRotation(Ul,io(ld(n[0])))},rotateZ:function(n){L.fromZRotation(Ul,io(ld(n[0])))},rotate3d:function(n){L.fromRotation(Ul,io(ld(n[3])),[n[0].value,n[1].value,n[2].value])},skew:function(n){WN(Ul,io(n[0].value),io(n[1].value))},skewX:function(n){WN(Ul,io(n[0].value),0)},skewY:function(n){WN(Ul,0,io(n[0].value))},matrix:function(n){L.set(Ul,n[0].value,n[1].value,0,0,n[2].value,n[3].value,0,0,0,0,1,0,n[4].value,n[5].value,0,1)},matrix3d:function(n){L.set.apply(L,[Ul].concat(zl(n.map(function(e){return e.value}))))}},Qke=E.al(1,1,1),qke=E.Ue(),S8={translate:function(n,e){dr.sceneGraphService.setLocalScale(n,Qke,!1),dr.sceneGraphService.setLocalEulerAngles(n,qke,void 0,void 0,!1),dr.sceneGraphService.setLocalPosition(n,[e[0].value,e[1].value,0],!1),dr.sceneGraphService.dirtifyLocal(n,n.transformable)}};function ewe(r,n){if(r.length){if(r.length===1&&S8[r[0].t]){S8[r[0].t](n,r[0].d);return}for(var e=L.identity(Kke),t=0;t<r.length;t++){var i=r[t],a=i.t,s=i.d,o=Jke[a];o&&(o(s),L.mul(e,e,Ul))}n.setLocalTransform(e)}else n.resetLocalTransform();return n.getLocalTransform()}var twe=function(){function r(){Nr(this,r),this.parser=nke,this.mixer=dke}return Or(r,[{key:"calculator",value:function(e,t,i,a){return i instanceof Eh?[]:i}},{key:"postProcessor",value:function(e){ewe(e.parsedStyle.transform,e)}}])}(),nwe=function(){function r(){Nr(this,r)}return Or(r,[{key:"postProcessor",value:function(e){var t=e.parsedStyle.transformOrigin;t[0].unit===rr.kPixels&&t[1].unit===rr.kPixels?e.setOrigin(t[0].value,t[1].value):e.getGeometryBounds()}}])}(),rwe=function(){function r(){Nr(this,r)}return Or(r,[{key:"calculator",value:function(e,t,i,a){return i.value}},{key:"postProcessor",value:function(e){if(e.parentNode){var t=e.parentNode,i=t.renderable,a=t.sortable;i&&(i.dirty=!0),a&&(a.dirty=!0,a.dirtyReason=NN.Z_INDEX_CHANGED)}}}])}(),iwe=function(){function r(){Nr(this,r)}return Or(r,[{key:"update",value:function(e,t){var i=e.cx,a=i===void 0?0:i,s=e.cy,o=s===void 0?0:s,l=e.r,u=l===void 0?0:l;return{cx:a,cy:o,hwidth:u,hheight:u}}}])}(),awe=function(){function r(){Nr(this,r)}return Or(r,[{key:"update",value:function(e,t){var i=e.cx,a=i===void 0?0:i,s=e.cy,o=s===void 0?0:s,l=e.rx,u=l===void 0?0:l,c=e.ry,d=c===void 0?0:c;return{cx:a,cy:o,hwidth:u,hheight:d}}}])}(),swe=function(){function r(){Nr(this,r)}return Or(r,[{key:"update",value:function(e){var t=e.x1,i=e.y1,a=e.x2,s=e.y2,o=Math.min(t,a),l=Math.max(t,a),u=Math.min(i,s),c=Math.max(i,s),d=l-o,h=c-u,f=d/2,v=h/2;return{cx:o+f,cy:u+v,hwidth:f,hheight:v}}}])}(),owe=function(){function r(){Nr(this,r)}return Or(r,[{key:"update",value:function(e){var t=e.d,i=t.rect,a=i.x,s=i.y,o=i.width,l=i.height,u=o/2,c=l/2;return{cx:a+u,cy:s+c,hwidth:u,hheight:c}}}])}(),lwe=function(){function r(){Nr(this,r)}return Or(r,[{key:"update",value:function(e){if(e.points&&(0,Ie.Z)(e.points.points)){var t=e.points.points,i=Math.min.apply(Math,zl(t.map(function(h){return h[0]}))),a=Math.max.apply(Math,zl(t.map(function(h){return h[0]}))),s=Math.min.apply(Math,zl(t.map(function(h){return h[1]}))),o=Math.max.apply(Math,zl(t.map(function(h){return h[1]}))),l=a-i,u=o-s,c=l/2,d=u/2;return{cx:i+c,cy:s+d,hwidth:c,hheight:d}}return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),uwe=function(){function r(){Nr(this,r)}return Or(r,[{key:"update",value:function(e,t){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s,l=e.src,u=e.width,c=u===void 0?0:u,d=e.height,h=d===void 0?0:d,f=c,v=h;return l&&!(0,Ze.Z)(l)&&(f||(f=l.width,e.width=f),v||(v=l.height,e.height=v)),{cx:a+f/2,cy:o+v/2,hwidth:f/2,hheight:v/2}}}])}(),cwe=function(){function r(n){Nr(this,r),this.globalRuntime=n}return Or(r,[{key:"isReadyToMeasure",value:function(e,t){var i=e.text;return i}},{key:"update",value:function(e,t){var i,a=e.text,s=e.textAlign,o=s===void 0?"start":s,l=e.lineWidth,u=l===void 0?1:l,c=e.textBaseline,d=c===void 0?"alphabetic":c,h=e.dx,f=h===void 0?0:h,v=e.dy,g=v===void 0?0:v,m=e.x,y=m===void 0?0:m,w=e.y,T=w===void 0?0:w;if(!this.isReadyToMeasure(e,t))return e.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{hwidth:0,hheight:0,cx:0,cy:0};var G=(t==null||(i=t.ownerDocument)===null||i===void 0||(i=i.defaultView)===null||i===void 0?void 0:i.getConfig())||{},x=G.offscreenCanvas,_=this.globalRuntime.textService.measureText(a,e,x);e.metrics=_;var p=_.width,b=_.height,R=p/2,B=b/2,j=y+R;o==="center"||o==="middle"?j+=u/2-R:(o==="right"||o==="end")&&(j+=u-R*2);var Z=T-B;return d==="middle"?Z+=B:d==="top"||d==="hanging"?Z+=B*2:d==="alphabetic"||(d==="bottom"||d==="ideographic")&&(Z+=0),f&&(j+=f),g&&(Z+=g),{cx:j,cy:Z,hwidth:R,hheight:B}}}])}(),dwe=function(){function r(){Nr(this,r)}return Or(r,[{key:"update",value:function(e,t){return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),hwe=function(){function r(){Nr(this,r)}return Or(r,[{key:"update",value:function(e,t){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s,l=e.width,u=l===void 0?0:l,c=e.height,d=c===void 0?0:c;return{cx:a+u/2,cy:o+d/2,hwidth:u/2,hheight:d/2}}}])}();function zLe(r){return!!r.type}var YN=function(){function r(n){Nr(this,r),this.eventPhase=r.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new yh,this.page=new yh,this.canvas=new yh,this.viewport=new yh,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=n}return Or(r,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"composedPath",value:function(){return this.manager&&(!this.path||this.path[0]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}},{key:"propagationPath",get:function(){return this.composedPath()}},{key:"preventDefault",value:function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}},{key:"stopImmediatePropagation",value:function(){this.propagationImmediatelyStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"initEvent",value:function(){}},{key:"initUIEvent",value:function(){}},{key:"clone",value:function(){throw new Error(ul)}}])}(),T8=function(r){function n(){var e;Nr(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=no(this,n,[].concat(i)),e.client=new yh,e.movement=new yh,e.offset=new yh,e.global=new yh,e.screen=new yh,e}return ro(n,r),Or(n,[{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(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)}},{key:"initMouseEvent",value:function(){throw new Error(ul)}}])}(YN),fwe=function(r){function n(){var e;Nr(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=no(this,n,[].concat(i)),e.width=0,e.height=0,e.isPrimary=!1,e}return ro(n,r),Or(n,[{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)}}])}(T8),vwe=function(r){function n(){return Nr(this,n),no(this,n,arguments)}return ro(n,r),Or(n,[{key:"clone",value:function(){return this.manager.cloneWheelEvent(this)}}])}(T8),ng=function(r){function n(e,t){var i;return Nr(this,n),i=no(this,n,[null]),i.type=e,i.detail=t,Object.assign(i,t),i}return ro(n,r),Or(n)}(YN),C8=new WeakMap,gwe=function(){function r(){Nr(this,r),this.emitter=new Se.Z}return Or(r,[{key:"on",value:function(e,t,i){return this.addEventListener(e,t,i),this}},{key:"addEventListener",value:function(e,t,i){var a=!1,s=!1;if((0,je.Z)(i))a=i;else if(i){var o=i.capture;a=o===void 0?!1:o;var l=i.once;s=l===void 0?!1:l}a&&(e+="capture"),t=(0,Be.Z)(t)?t:t.handleEvent;var u=(0,Be.Z)(t)?void 0:t;return s?this.emitter.once(e,t,u):this.emitter.on(e,t,u),this}},{key:"off",value:function(e,t,i){return e?this.removeEventListener(e,t,i):this.removeAllEventListeners(),this}},{key:"removeAllEventListeners",value:function(){var e;(e=this.emitter)===null||e===void 0||e.removeAllListeners()}},{key:"removeEventListener",value:function(e,t,i){var a;if(!this.emitter)return this;var s=(0,je.Z)(i)?i:i==null?void 0:i.capture;s&&(e+="capture"),t=(0,Be.Z)(t)?t:(a=t)===null||a===void 0?void 0:a.handleEvent;var o=(0,Be.Z)(t)?void 0:t;return this.emitter.off(e,t,o),this}},{key:"emit",value:function(e,t){this.dispatchEvent(new ng(e,t))}},{key:"dispatchEvent",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=C8.get(this);if(!i){var a;this.document?i=this:this.defaultView?i=this.defaultView:i=(a=this.ownerDocument)===null||a===void 0?void 0:a.defaultView,i&&C8.set(this,i)}if(i){if(e.manager=i.getEventService(),!e.manager)return!1;e.defaultPrevented=!1,e.path?e.path.length=0:e.page=[],t||(e.target=this),e.manager.dispatchEvent(e,e.type,t)}else this.emitter.emit(e.type,e);return!e.defaultPrevented}}])}(),bm=function(r){function n(){var e;Nr(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=no(this,n,[].concat(i)),e.shadow=!1,e.ownerDocument=null,e.isConnected=!1,e.baseURI="",e.childNodes=[],e.nodeType=0,e.nodeName="",e.nodeValue=null,e.parentNode=null,e}return ro(n,r),Or(n,[{key:"textContent",get:function(){var t="";this.nodeName===Zr.TEXT&&(t+=this.style.text);var i=v0(this.childNodes),a;try{for(i.s();!(a=i.n()).done;){var s=a.value;s.nodeName===Zr.TEXT?t+=s.nodeValue:t+=s.textContent}}catch(o){i.e(o)}finally{i.f()}return t},set:function(t){var i=this;this.childNodes.slice().forEach(function(a){i.removeChild(a)}),this.nodeName===Zr.TEXT&&(this.style.text="".concat(t))}},{key:"getRootNode",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this}},{key:"hasChildNodes",value:function(){return this.childNodes.length>0}},{key:"isDefaultNamespace",value:function(t){throw new Error(ul)}},{key:"lookupNamespaceURI",value:function(t){throw new Error(ul)}},{key:"lookupPrefix",value:function(t){throw new Error(ul)}},{key:"normalize",value:function(){throw new Error(ul)}},{key:"isEqualNode",value:function(t){return this===t}},{key:"isSameNode",value:function(t){return this.isEqualNode(t)}},{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(t){if(t===this)return 0;for(var i=t,a=this,s=[i],o=[a];(l=i.parentNode)!==null&&l!==void 0?l:a.parentNode;){var l;i=i.parentNode?(s.push(i.parentNode),i.parentNode):i,a=a.parentNode?(o.push(a.parentNode),a.parentNode):a}if(i!==a)return n.DOCUMENT_POSITION_DISCONNECTED|n.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|n.DOCUMENT_POSITION_PRECEDING;var u=s.length>o.length?s:o,c=u===s?o:s;if(u[u.length-c.length]===c[0])return u===s?n.DOCUMENT_POSITION_CONTAINED_BY|n.DOCUMENT_POSITION_FOLLOWING:n.DOCUMENT_POSITION_CONTAINS|n.DOCUMENT_POSITION_PRECEDING;for(var d=u.length-c.length,h=c.length-1;h>=0;h--){var f=c[h],v=u[d+h];if(v!==f){var g=f.parentNode.childNodes;return g.indexOf(f)<g.indexOf(v)?c===s?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING:u===s?n.DOCUMENT_POSITION_PRECEDING:n.DOCUMENT_POSITION_FOLLOWING}}return n.DOCUMENT_POSITION_FOLLOWING}},{key:"contain",value:function(t){return this.contains(t)}},{key:"contains",value:function(t){for(var i=t;i&&this!==i;)i=i.parentNode;return!!i}},{key:"getAncestor",value:function(t){for(var i=this;t>0&&i;)i=i.parentNode,t--;return i}},{key:"forEach",value:function(t){for(var i=[this];i.length>0;){var a=i.pop(),s=t(a);if(s===!1)break;for(var o=a.childNodes.length-1;o>=0;o--)i.push(a.childNodes[o])}}}],[{key:"isNode",value:function(t){return!!t.childNodes}}])}(gwe);bm.DOCUMENT_POSITION_DISCONNECTED=1,bm.DOCUMENT_POSITION_PRECEDING=2,bm.DOCUMENT_POSITION_FOLLOWING=4,bm.DOCUMENT_POSITION_CONTAINS=8,bm.DOCUMENT_POSITION_CONTAINED_BY=16,bm.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;var VLe=2048,ULe=null,_we=function(){function r(){Nr(this,r)}return Or(r,[{key:"getOrCreateCanvas",value:function(e,t){if(this.canvas)return this.canvas;if(e||dr.offscreenCanvas)this.canvas=e||dr.offscreenCanvas,this.context=this.canvas.getContext("2d",ol({willReadFrequently:!0},t));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",ol({willReadFrequently:!0},t)),(!this.context||!this.context.measureText)&&(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(i){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",ol({willReadFrequently:!0},t))}return this.canvas.width=10,this.canvas.height=10,this.canvas}},{key:"getOrCreateContext",value:function(e,t){return this.context?this.context:(this.getOrCreateCanvas(e,t),this.context)}}],[{key:"createCanvas",value:function(){try{return new window.OffscreenCanvas(0,0)}catch(e){}try{return document.createElement("canvas")}catch(e){}return null}}])}(),jLe=function(r){return r[r.CAMERA_CHANGED=0]="CAMERA_CHANGED",r[r.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",r[r.NONE=2]="NONE",r}({}),HLe=null,mwe=/\[\s*(.*)=(.*)\s*\]/,pwe=function(){function r(){Nr(this,r)}return Or(r,[{key:"selectOne",value:function(e,t){var i=this;if(e.startsWith("."))return t.find(function(l){return((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(e))>-1});if(e.startsWith("#"))return t.find(function(l){return l.id===i.getIdOrClassname(e)});if(e.startsWith("[")){var a=this.getAttribute(e),s=a.name,o=a.value;return s?t.find(function(l){return t!==l&&(s==="name"?l.name===o:i.attributeToString(l,s)===o)}):null}return t.find(function(l){return t!==l&&l.nodeName===e})}},{key:"selectAll",value:function(e,t){var i=this;if(e.startsWith("."))return t.findAll(function(l){return t!==l&&((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(e))>-1});if(e.startsWith("#"))return t.findAll(function(l){return t!==l&&l.id===i.getIdOrClassname(e)});if(e.startsWith("[")){var a=this.getAttribute(e),s=a.name,o=a.value;return s?t.findAll(function(l){return t!==l&&(s==="name"?l.name===o:i.attributeToString(l,s)===o)}):[]}return t.findAll(function(l){return t!==l&&l.nodeName===e})}},{key:"is",value:function(e,t){if(e.startsWith("."))return t.className===this.getIdOrClassname(e);if(e.startsWith("#"))return t.id===this.getIdOrClassname(e);if(e.startsWith("[")){var i=this.getAttribute(e),a=i.name,s=i.value;return a==="name"?t.name===s:this.attributeToString(t,a)===s}return t.nodeName===e}},{key:"getIdOrClassname",value:function(e){return e.substring(1)}},{key:"getAttribute",value:function(e){var t=e.match(mwe),i="",a="";return t&&t.length>2&&(i=t[1].replace(/"/g,""),a=t[2].replace(/"/g,"")),{name:i,value:a}}},{key:"attributeToString",value:function(e,t){if(!e.getAttribute)return"";var i=e.getAttribute(t);return(0,xe.Z)(i)?"":i.toString?i.toString():""}}])}(),wu=function(r){return r.REPARENT="reparent",r.DESTROY="destroy",r.ATTR_MODIFIED="DOMAttrModified",r.INSERTED="DOMNodeInserted",r.REMOVED="removed",r.MOUNTED="DOMNodeInsertedIntoDocument",r.UNMOUNTED="DOMNodeRemovedFromDocument",r.BOUNDS_CHANGED="bounds-changed",r.CULLED="culled",r}({}),bv=function(r){function n(e,t,i,a,s,o,l,u){var c;return Nr(this,n),c=no(this,n,[null]),c.relatedNode=t,c.prevValue=i,c.newValue=a,c.attrName=s,c.attrChange=o,c.prevParsedValue=l,c.newParsedValue=u,c.type=e,c}return ro(n,r),Or(n)}(YN);bv.ADDITION=2,bv.MODIFICATION=1,bv.REMOVAL=3;function M8(r){var n=r.renderable;n&&(n.renderBoundsDirty=!0,n.boundsDirty=!0)}var ywe=new bv(wu.REPARENT,null,"","","",0,"",""),xwe=ot.Ue(),Fw=E.Ue(),Ewe=E.al(1,1,1),bwe=L.create(),kwe=ot.Ue(),Yg=E.Ue(),x0=L.create(),Zg=X.Ue(),wwe=E.Ue(),Swe=X.Ue(),Twe=E.Ue(),Fx=E.Ue(),km=E.Ue(),Bw=L.create(),P8=X.Ue(),N8=X.Ue(),$w=X.Ue(),ZN={affectChildren:!0},Cwe=function(){function r(n){Nr(this,r),this.pendingEvents=new Map,this.boundsChangedEvent=new ng(wu.BOUNDS_CHANGED),this.displayObjectDependencyMap=new WeakMap,this.runtime=n}return Or(r,[{key:"matches",value:function(e,t){return this.runtime.sceneGraphSelector.is(e,t)}},{key:"querySelector",value:function(e,t){return this.runtime.sceneGraphSelector.selectOne(e,t)}},{key:"querySelectorAll",value:function(e,t){return this.runtime.sceneGraphSelector.selectAll(e,t)}},{key:"attach",value:function(e,t,i){var a,s=!1;e.parentNode&&(s=e.parentNode!==t,this.detach(e));var o=e.nodeName===Zr.FRAGMENT,l=HN(t);e.parentNode=t;var u=o?e.childNodes:[e];(0,pe.Z)(i)?u.forEach(function(f){t.childNodes.splice(i,0,f),f.parentNode=t}):u.forEach(function(f){t.childNodes.push(f),f.parentNode=t});var c=t,d=c.sortable;if((d!=null&&(a=d.sorted)!==null&&a!==void 0&&a.length||e.parsedStyle.zIndex)&&(d.dirtyChildren.indexOf(e)===-1&&d.dirtyChildren.push(e),d.dirty=!0,d.dirtyReason=NN.ADDED),!l){if(o)this.dirtifyFragment(e);else{var h=e.transformable;h&&this.dirtifyWorld(e,h)}s&&e.dispatchEvent(ywe)}}},{key:"detach",value:function(e){if(e.parentNode){var t,i,a=e.transformable,s=e.parentNode,o=s.sortable;(o!=null&&(t=o.sorted)!==null&&t!==void 0&&t.length||(i=e.style)!==null&&i!==void 0&&i.zIndex)&&(o.dirtyChildren.indexOf(e)===-1&&o.dirtyChildren.push(e),o.dirty=!0,o.dirtyReason=NN.REMOVED);var l=e.parentNode.childNodes.indexOf(e);l>-1&&e.parentNode.childNodes.splice(l,1),a&&this.dirtifyWorld(e,a),e.parentNode=null}}},{key:"getOrigin",value:function(e){return e.getGeometryBounds(),e.transformable.origin}},{key:"setOrigin",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=[t,i,a]);var s=e.transformable;if(!(t[0]===s.origin[0]&&t[1]===s.origin[1]&&t[2]===s.origin[2])){var o=s.origin;o[0]=t[0],o[1]=t[1],o[2]=t[2]||0,this.dirtifyLocal(e,s)}}},{key:"rotate",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;if(e.parentNode===null||!e.parentNode.transformable)this.rotateLocal(e,t);else{var o=Zg;X.Su(o,t[0],t[1],t[2]);var l=this.getRotation(e),u=this.getRotation(e.parentNode);X.JG($w,u),X.U_($w,$w),X.Jp(o,$w,o),X.Jp(s.localRotation,o,l),X.Fv(s.localRotation,s.localRotation),this.dirtifyLocal(e,s)}}},{key:"rotateLocal",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;X.Su(N8,t[0],t[1],t[2]),X.dC(s.localRotation,s.localRotation,N8),this.dirtifyLocal(e,s)}},{key:"setEulerAngles",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;if(e.parentNode===null||!e.parentNode.transformable)this.setLocalEulerAngles(e,t);else{X.Su(s.localRotation,t[0],t[1],t[2]);var o=this.getRotation(e.parentNode);X.JG(P8,X.U_(Zg,o)),X.dC(s.localRotation,s.localRotation,P8),this.dirtifyLocal(e,s)}}},{key:"setLocalEulerAngles",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;typeof t=="number"&&(t=E.al(t,i,a));var o=e.transformable;X.Su(o.localRotation,t[0],t[1],t[2]),s&&this.dirtifyLocal(e,o)}},{key:"translateLocal",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.al(t,i,a));var s=e.transformable;E.fS(t,Fw)||(E.VC(t,t,s.localRotation),E.IH(s.localPosition,s.localPosition,t),this.dirtifyLocal(e,s))}},{key:"setPosition",value:function(e,t){var i,a=e.transformable;if(km[0]=t[0],km[1]=t[1],km[2]=(i=t[2])!==null&&i!==void 0?i:0,!E.fS(this.getPosition(e),km)){if(E.JG(a.position,km),e.parentNode===null||!e.parentNode.transformable)E.JG(a.localPosition,km);else{var s=e.parentNode.transformable;L.copy(Bw,s.worldTransform),L.invert(Bw,Bw),E.fF(a.localPosition,km,Bw)}this.dirtifyLocal(e,a)}}},{key:"setLocalPosition",value:function(e,t){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=e.transformable;Fx[0]=t[0],Fx[1]=t[1],Fx[2]=(i=t[2])!==null&&i!==void 0?i:0,!E.fS(s.localPosition,Fx)&&(E.JG(s.localPosition,Fx),a&&this.dirtifyLocal(e,s))}},{key:"scaleLocal",value:function(e,t){var i,a=e.transformable;E.Jp(a.localScale,a.localScale,E.t8(Yg,t[0],t[1],(i=t[2])!==null&&i!==void 0?i:1)),this.dirtifyLocal(e,a)}},{key:"setLocalScale",value:function(e,t){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=e.transformable;E.t8(Yg,t[0],t[1],(i=t[2])!==null&&i!==void 0?i:s.localScale[2]),!E.fS(Yg,s.localScale)&&(E.JG(s.localScale,Yg),a&&this.dirtifyLocal(e,s))}},{key:"translate",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof t=="number"&&(t=E.t8(Yg,t,i,a)),!E.fS(t,Fw)&&(E.IH(Yg,this.getPosition(e),t),this.setPosition(e,Yg))}},{key:"setRotation",value:function(e,t,i,a,s){var o=e.transformable;if(typeof t=="number"&&(t=X.al(t,i,a,s)),e.parentNode===null||!e.parentNode.transformable)this.setLocalRotation(e,t);else{var l=this.getRotation(e.parentNode);X.JG(Zg,l),X.U_(Zg,Zg),X.Jp(o.localRotation,Zg,t),X.Fv(o.localRotation,o.localRotation),this.dirtifyLocal(e,o)}}},{key:"setLocalRotation",value:function(e,t,i,a,s){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;typeof t=="number"&&(t=X.t8(Zg,t,i,a,s));var l=e.transformable;X.JG(l.localRotation,t),o&&this.dirtifyLocal(e,l)}},{key:"setLocalSkew",value:function(e,t,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;typeof t=="number"&&(t=ot.t8(kwe,t,i));var s=e.transformable;ot.JG(s.localSkew,t),a&&this.dirtifyLocal(e,s)}},{key:"dirtifyLocal",value:function(e,t){HN(e)||t.localDirtyFlag||(t.localDirtyFlag=!0,t.dirtyFlag||this.dirtifyWorld(e,t))}},{key:"dirtifyWorld",value:function(e,t){t.dirtyFlag||this.unfreezeParentToRoot(e),this.dirtifyWorldInternal(e,t),this.dirtifyToRoot(e,!0)}},{key:"dirtifyFragment",value:function(e){var t=e.transformable;t&&(t.frozen=!1,t.dirtyFlag=!0,t.localDirtyFlag=!0);var i=e.renderable;i&&(i.renderBoundsDirty=!0,i.boundsDirty=!0,i.dirty=!0);for(var a=e.childNodes.length,s=0;s<a;s++)this.dirtifyFragment(e.childNodes[s]);e.nodeName===Zr.FRAGMENT&&this.pendingEvents.set(e,!1)}},{key:"triggerPendingEvents",value:function(){var e=this,t=new Set,i=function(s,o){!s.isConnected||t.has(s)||s.nodeName===Zr.FRAGMENT||(e.boundsChangedEvent.detail=o,e.boundsChangedEvent.target=s,s.isMutationObserved?s.dispatchEvent(e.boundsChangedEvent):s.ownerDocument.defaultView.dispatchEvent(e.boundsChangedEvent,!0),t.add(s))};this.pendingEvents.forEach(function(a,s){s.nodeName!==Zr.FRAGMENT&&(ZN.affectChildren=a,a?s.forEach(function(o){i(o,ZN)}):i(s,ZN))}),t.clear(),this.clearPendingEvents()}},{key:"clearPendingEvents",value:function(){this.pendingEvents.clear()}},{key:"dirtifyToRoot",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=e;for(i.renderable&&(i.renderable.dirty=!0);i;)M8(i),i=i.parentNode;t&&e.forEach(function(a){M8(a)}),this.informDependentDisplayObjects(e),this.pendingEvents.set(e,t)}},{key:"updateDisplayObjectDependency",value:function(e,t,i,a){if(t&&t!==i){var s=this.displayObjectDependencyMap.get(t);if(s&&s[e]){var o=s[e].indexOf(a);s[e].splice(o,1)}}if(i){var l=this.displayObjectDependencyMap.get(i);l||(this.displayObjectDependencyMap.set(i,{}),l=this.displayObjectDependencyMap.get(i)),l[e]||(l[e]=[]),l[e].push(a)}}},{key:"informDependentDisplayObjects",value:function(e){var t=this,i=this.displayObjectDependencyMap.get(e);i&&Object.keys(i).forEach(function(a){i[a].forEach(function(s){t.dirtifyToRoot(s,!0),s.dispatchEvent(new bv(wu.ATTR_MODIFIED,s,t,t,a,bv.MODIFICATION,t,t)),s.isCustomElement&&s.isConnected&&s.attributeChangedCallback&&s.attributeChangedCallback(a,t,t)})})}},{key:"getPosition",value:function(e){var t=e.transformable;return L.getTranslation(t.position,this.getWorldTransform(e,t))}},{key:"getRotation",value:function(e){var t=e.transformable;return L.getRotation(t.rotation,this.getWorldTransform(e,t))}},{key:"getScale",value:function(e){var t=e.transformable;return L.getScaling(t.scaling,this.getWorldTransform(e,t))}},{key:"getWorldTransform",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.transformable;return!t.localDirtyFlag&&!t.dirtyFlag||(e.parentNode&&e.parentNode.transformable&&this.getWorldTransform(e.parentNode),this.sync(e,t)),t.worldTransform}},{key:"getLocalPosition",value:function(e){return e.transformable.localPosition}},{key:"getLocalRotation",value:function(e){return e.transformable.localRotation}},{key:"getLocalScale",value:function(e){return e.transformable.localScale}},{key:"getLocalSkew",value:function(e){return e.transformable.localSkew}},{key:"calcLocalTransform",value:function(e){var t=e.localSkew[0]!==0||e.localSkew[1]!==0;if(t){L.fromRotationTranslationScaleOrigin(e.localTransform,e.localRotation,e.localPosition,E.al(1,1,1),e.origin),(e.localSkew[0]!==0||e.localSkew[1]!==0)&&(L.identity(x0),x0[4]=Math.tan(e.localSkew[0]),x0[1]=Math.tan(e.localSkew[1]),L.multiply(e.localTransform,e.localTransform,x0));var i=L.fromRotationTranslationScaleOrigin(x0,X.t8(Zg,0,0,0,1),E.t8(Yg,1,1,1),e.localScale,e.origin);L.multiply(e.localTransform,e.localTransform,i)}else{var a=e.localTransform,s=e.localPosition,o=e.localRotation,l=e.localScale,u=e.origin,c=s[0]!==0||s[1]!==0||s[2]!==0,d=o[3]!==1||o[0]!==0||o[1]!==0||o[2]!==0,h=l[0]!==1||l[1]!==1||l[2]!==1,f=u[0]!==0||u[1]!==0||u[2]!==0;!d&&!h&&!f?c?L.fromTranslation(a,s):L.identity(a):L.fromRotationTranslationScaleOrigin(a,o,s,l,u)}}},{key:"getLocalTransform",value:function(e){var t=e.transformable;return t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.localTransform}},{key:"setLocalTransform",value:function(e,t){var i=L.getTranslation(wwe,t),a=L.getRotation(Swe,t),s=L.getScaling(Twe,t);this.setLocalScale(e,s,!1),this.setLocalPosition(e,i,!1),this.setLocalRotation(e,a,void 0,void 0,void 0,!1),this.dirtifyLocal(e,e.transformable)}},{key:"resetLocalTransform",value:function(e){this.setLocalScale(e,Ewe,!1),this.setLocalPosition(e,Fw,!1),this.setLocalEulerAngles(e,Fw,void 0,void 0,!1),this.setLocalSkew(e,xwe,void 0,!1),this.dirtifyLocal(e,e.transformable)}},{key:"getTransformedGeometryBounds",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2?arguments[2]:void 0,a=this.getGeometryBounds(e,t);if(!sd.isEmpty(a)){var s=i||new sd;return s.setFromTransformedAABB(a,this.getWorldTransform(e)),s}return null}},{key:"getGeometryBounds",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=e,a=i.geometry;a.dirty&&dr.styleValueRegistry.updateGeometry(e);var s=t?a.renderBounds:a.contentBounds||null;return s||new sd}},{key:"getBounds",value:function(e){var t=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=e,s=a.renderable;if(!s.boundsDirty&&!i&&s.bounds)return s.bounds;if(!s.renderBoundsDirty&&i&&s.renderBounds)return s.renderBounds;var o=i?s.renderBounds:s.bounds,l=this.getTransformedGeometryBounds(e,i,o),u=e.childNodes;if(u.forEach(function(h){var f=t.getBounds(h,i);f&&(l?l.add(f):(l=o||new sd,l.update(f.center,f.halfExtents)))}),l||(l=new sd),i){var c=Ake(e);if(c){var d=c.parsedStyle.clipPath.getBounds(i);l?d&&(l=d.intersection(l)):l.update(d.center,d.halfExtents)}}return i?(s.renderBounds=l,s.renderBoundsDirty=!1):(s.bounds=l,s.boundsDirty=!1),l}},{key:"getLocalBounds",value:function(e){if(e.parentNode){var t=bwe;e.parentNode.transformable&&(t=L.invert(x0,this.getWorldTransform(e.parentNode)));var i=this.getBounds(e);if(!sd.isEmpty(i)){var a=new sd;return a.setFromTransformedAABB(i,t),a}}return this.getBounds(e)}},{key:"getBoundingClientRect",value:function(e){var t,i,a=this.getGeometryBounds(e);sd.isEmpty(a)||(i=new sd,i.setFromTransformedAABB(a,this.getWorldTransform(e)));var s=(t=e.ownerDocument)===null||t===void 0||(t=t.defaultView)===null||t===void 0?void 0:t.getContextService().getBoundingClientRect();if(i){var o=i.getMin(),l=ll(o,2),u=l[0],c=l[1],d=i.getMax(),h=ll(d,2),f=h[0],v=h[1];return new m0(u+((s==null?void 0:s.left)||0),c+((s==null?void 0:s.top)||0),f-u,v-c)}return new m0((s==null?void 0:s.left)||0,(s==null?void 0:s.top)||0,0,0)}},{key:"dirtifyWorldInternal",value:function(e,t){var i=this;if(!t.dirtyFlag){t.dirtyFlag=!0,t.frozen=!1,e.childNodes.forEach(function(o){var l=o.transformable;l.dirtyFlag||i.dirtifyWorldInternal(o,l)});var a=e,s=a.renderable;s&&(s.renderBoundsDirty=!0,s.boundsDirty=!0,s.dirty=!0)}}},{key:"syncHierarchy",value:function(e){var t=e.transformable;if(!t.frozen){t.frozen=!0,(t.localDirtyFlag||t.dirtyFlag)&&this.sync(e,t);for(var i=e.childNodes,a=0;a<i.length;a++)this.syncHierarchy(i[a])}}},{key:"sync",value:function(e,t){if(t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.dirtyFlag){var i=e.parentNode,a=i&&i.transformable;i===null||!a?L.copy(t.worldTransform,t.localTransform):L.multiply(t.worldTransform,a.worldTransform,t.localTransform),t.dirtyFlag=!1}}},{key:"unfreezeParentToRoot",value:function(e){for(var t=e.parentNode;t;){var i=t.transformable;i&&(i.frozen=!1),t=t.parentNode}}}])}(),wm={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]},O8=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,Mwe=/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/,Pwe=/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/,Nwe=/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/,Owe=/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/,Rwe=/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/,Awe=/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/,Lwe=/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/,Iwe=/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/,Dwe=new RegExp("".concat(Mwe.source,"|").concat(Nwe.source,"|").concat(Rwe.source,"|").concat(Lwe.source)),Fwe=new RegExp("".concat(Pwe.source,"|").concat(Owe.source,"|").concat(Awe.source,"|").concat(Iwe.source)),Bwe=function(){function r(n){var e=this;Nr(this,r),this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,i){return e.isBreakingSpace(i)?!1:!!(t&&(Fwe.exec(i)||Dwe.exec(t)))},this.trimByKinsokuShorui=function(t){var i=zl(t),a=i[i.length-2];if(!a)return t;var s=a[a.length-1];return i[i.length-2]=a.slice(0,-1),i[i.length-1]=s+i[i.length-1],i},this.runtime=n}return Or(r,[{key:"measureFont",value:function(e,t){if(this.fontMetricsCache[e])return this.fontMetricsCache[e];var i={ascent:0,descent:0,fontSize:0},a=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(t),s=this.runtime.offscreenCanvasCreator.getOrCreateContext(t,{willReadFrequently:!0});s.font=e;var o=wm.MetricsString+wm.BaselineSymbol,l=Math.ceil(s.measureText(o).width),u=Math.ceil(s.measureText(wm.BaselineSymbol).width),c=wm.HeightMultiplier*u;u=u*wm.BaselineMultiplier|0,a.width=l,a.height=c,s.fillStyle="#f00",s.fillRect(0,0,l,c),s.font=e,s.textBaseline="alphabetic",s.fillStyle="#000",s.fillText(o,0,u);var d=s.getImageData(0,0,l||1,c||1).data,h=d.length,f=l*4,v=0,g=0,m=!1;for(v=0;v<u;++v){for(var y=0;y<f;y+=4)if(d[g+y]!==255){m=!0;break}if(!m)g+=f;else break}for(i.ascent=u-v,g=h-f,m=!1,v=c;v>u;--v){for(var w=0;w<f;w+=4)if(d[g+w]!==255){m=!0;break}if(!m)g-=f;else break}return i.descent=v-u,i.fontSize=i.ascent+i.descent,this.fontMetricsCache[e]=i,i}},{key:"measureText",value:function(e,t,i){var a=t.fontSize,s=a===void 0?16:a,o=t.wordWrap,l=o===void 0?!1:o,u=t.lineHeight,c=t.lineWidth,d=c===void 0?1:c,h=t.textBaseline,f=h===void 0?"alphabetic":h,v=t.textAlign,g=v===void 0?"start":v,m=t.letterSpacing,y=m===void 0?0:m,w=t.textPath;t.textPathSide,t.textPathStartOffset;var T=t.leading,G=T===void 0?0:T,x=Xke(t),_=this.measureFont(x,i);_.fontSize===0&&(_.fontSize=s,_.ascent=s);var p=this.runtime.offscreenCanvasCreator.getOrCreateContext(i);p.font=x,t.isOverflowing=!1;var b=l?this.wordWrap(e,t,i):e,R=b.split(/(?:\r\n|\r|\n)/),B=new Array(R.length),j=0;if(w){w.getTotalLength();for(var Z=0;Z<R.length;Z++)p.measureText(R[Z]).width+(R[Z].length-1)*y}else{for(var te=0;te<R.length;te++){var le=p.measureText(R[te]).width+(R[te].length-1)*y;B[te]=le,j=Math.max(j,le)}var ue=j+d,se=u||_.fontSize+d,V=Math.max(se,_.fontSize+d)+(R.length-1)*(se+G);se+=G;var ee=0;return f==="middle"?ee=-V/2:f==="bottom"||f==="alphabetic"||f==="ideographic"?ee=-V:(f==="top"||f==="hanging")&&(ee=0),{font:x,width:ue,height:V,lines:R,lineWidths:B,lineHeight:se,maxLineWidth:j,fontProperties:_,lineMetrics:B.map(function(he,ut){var ct=0;return g==="center"||g==="middle"?ct-=he/2:(g==="right"||g==="end")&&(ct-=he),new m0(ct-d/2,ee+ut*se,he+d,se)})}}}},{key:"wordWrap",value:function(e,t,i){var a=this,s=t.wordWrapWidth,o=s===void 0?0:s,l=t.letterSpacing,u=l===void 0?0:l,c=t.maxLines,d=c===void 0?1/0:c,h=t.textOverflow,f=this.runtime.offscreenCanvasCreator.getOrCreateContext(i),v=o+u,g="";h==="ellipsis"?g="...":h&&h!=="clip"&&(g=h);var m=[],y=0,w=0,T={},G=function(le){return a.getFromCache(le,u,T,f)},x=Array.from(g).reduce(function(te,le){return te+G(le)},0);function _(te){if(!(x<=0||x>v)){for(var le=m[te].length,ue=0,se=le,V=0;V<le;V++){var ee=G(m[te][V]);if(ue+ee+x>v){se=V;break}ue+=ee}m[te]=(m[te]||"").slice(0,se)+g}}for(var p=Array.from(e),b=0;b<p.length;b++){var R=p[b],B=e[b-1],j=e[b+1],Z=G(R);if(this.isNewline(R)){if(y++,y>=d){t.isOverflowing=!0,b<p.length-1&&_(y-1);break}w=0,m[y]="";continue}if(w>0&&w+Z>v){if(y+1>=d){t.isOverflowing=!0,_(y);break}if(y++,w=0,m[y]="",this.isBreakingSpace(R))continue;this.canBreakInLastChar(R)||(m=this.trimToBreakable(m),w=this.sumTextWidthByCache(m[y]||"",T)),this.shouldBreakByKinsokuShorui(R,j)&&(m=this.trimByKinsokuShorui(m),w+=G(B||""))}w+=Z,m[y]=(m[y]||"")+R}return m.join(`
|
|
|
`)}},{key:"isBreakingSpace",value:function(e){return typeof e!="string"?!1:wm.BreakingSpaces.indexOf(e.charCodeAt(0))>=0}},{key:"isNewline",value:function(e){return typeof e!="string"?!1:wm.Newlines.indexOf(e.charCodeAt(0))>=0}},{key:"trimToBreakable",value:function(e){var t=zl(e),i=t[t.length-2],a=this.findBreakableIndex(i);if(a===-1||!i)return t;var s=i.slice(a,a+1),o=this.isBreakingSpace(s),l=a+1,u=a+(o?0:1);return t[t.length-1]+=i.slice(l,i.length),t[t.length-2]=i.slice(0,u),t}},{key:"canBreakInLastChar",value:function(e){return!(e&&O8.test(e))}},{key:"sumTextWidthByCache",value:function(e,t){return e.split("").reduce(function(i,a){if(!t[a])throw Error("cannot count the word without cache");return i+t[a]},0)}},{key:"findBreakableIndex",value:function(e){for(var t=e.length-1;t>=0;t--)if(!O8.test(e[t]))return t;return-1}},{key:"getFromCache",value:function(e,t,i,a){var s=i[e];if(typeof s!="number"){var o=e.length*t;s=a.measureText(e).width+o,i[e]=s}return s}}])}(),dr={},$we=function(r){var n=new uwe,e=new lwe;return r={},ya(ya(ya(ya(ya(ya(ya(ya(ya(ya(r,Zr.FRAGMENT,null),Zr.CIRCLE,new iwe),Zr.ELLIPSE,new awe),Zr.RECT,n),Zr.IMAGE,n),Zr.GROUP,new dwe),Zr.LINE,new swe),Zr.TEXT,new cwe(dr)),Zr.POLYLINE,e),Zr.POLYGON,e),ya(ya(ya(r,Zr.PATH,new owe),Zr.HTML,new hwe),Zr.MESH,null)}(),Gwe=function(r){var n=new yke,e=new UN;return r={},ya(ya(ya(ya(ya(ya(ya(ya(ya(ya(r,Zn.PERCENTAGE,null),Zn.NUMBER,new wke),Zn.ANGLE,new mke),Zn.DEFINED_PATH,new pke),Zn.PAINT,n),Zn.COLOR,n),Zn.FILTER,new xke),Zn.LENGTH,e),Zn.LENGTH_PERCENTAGE,e),Zn.LENGTH_PERCENTAGE_12,new Eke),ya(ya(ya(ya(ya(ya(ya(ya(ya(ya(r,Zn.LENGTH_PERCENTAGE_14,new bke),Zn.COORDINATE,new UN),Zn.OFFSET_DISTANCE,new Ske),Zn.OPACITY_VALUE,new Tke),Zn.PATH,new Cke),Zn.LIST_OF_POINTS,new Mke),Zn.SHADOW_BLUR,new Pke),Zn.TEXT,new Nke),Zn.TEXT_TRANSFORM,new Oke),Zn.TRANSFORM,new twe),ya(ya(ya(r,Zn.TRANSFORM_ORIGIN,new nwe),Zn.Z_INDEX,new rwe),Zn.MARKER,new kke)}(),zwe=function(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof k.g!="undefined"?k.g:{}};dr.CameraContribution=ibe,dr.AnimationTimeline=null,dr.EasingFunction=null,dr.offscreenCanvasCreator=new _we,dr.sceneGraphSelector=new pwe,dr.sceneGraphService=new Cwe(dr),dr.textService=new Bwe(dr),dr.geometryUpdaterFactory=$we,dr.CSSPropertySyntaxFactory=Gwe,dr.styleValueRegistry=new gke(dr),dr.layoutRegistry=null,dr.globalThis=zwe(),dr.enableStyleSyntax=!0,dr.enableSizeAttenuation=!1;var R8=0;function WLe(){R8=0}var A8=new bv(wu.INSERTED,null,"","","",0,"",""),L8=new bv(wu.REMOVED,null,"","","",0,"",""),Vwe=new ng(wu.DESTROY),Uwe=function(r){function n(){var e;Nr(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return e=no(this,n,[].concat(i)),e.entity=R8++,e.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},e.cullable={strategy:abe.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},e.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:[0,0,0],localRotation:[0,0,0,1],localScale:[1,1,1],localTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],localSkew:[0,0],position:[0,0,0],rotation:[0,0,0,1],scaling:[1,1,1],worldTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],origin:[0,0,0]},e.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},e.geometry={contentBounds:void 0,renderBounds:void 0,dirty:!0},e.rBushNode={aabb:void 0},e.namespaceURI="g",e.scrollLeft=0,e.scrollTop=0,e.clientTop=0,e.clientLeft=0,e.destroyed=!1,e.style={},e.computedStyle={},e.parsedStyle={},e.attributes={},e}return ro(n,r),Or(n,[{key:"className",get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(t){return t!==""})}},{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 t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t+1]||null}return null}},{key:"previousSibling",get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t-1]||null}return null}},{key:"cloneNode",value:function(t){throw new Error(ul)}},{key:"appendChild",value:function(t,i){var a;if(t.destroyed)throw new Error(HEe);return dr.sceneGraphService.attach(t,this,i),(a=this.ownerDocument)!==null&&a!==void 0&&a.defaultView&&(!HN(this)&&t.nodeName===Zr.FRAGMENT?this.ownerDocument.defaultView.mountFragment(t):this.ownerDocument.defaultView.mountChildren(t)),this.isMutationObserved&&(A8.relatedNode=this,t.dispatchEvent(A8)),t}},{key:"insertBefore",value:function(t,i){if(!i)this.appendChild(t);else{t.parentElement&&t.parentElement.removeChild(t);var a=this.childNodes.indexOf(i);a===-1?this.appendChild(t):this.appendChild(t,a)}return t}},{key:"replaceChild",value:function(t,i){var a=this.childNodes.indexOf(i);return this.removeChild(i),this.appendChild(t,a),i}},{key:"removeChild",value:function(t){var i;return L8.relatedNode=this,t.dispatchEvent(L8),(i=t.ownerDocument)!==null&&i!==void 0&&i.defaultView&&t.ownerDocument.defaultView.unmountChildren(t),dr.sceneGraphService.detach(t),t}},{key:"removeChildren",value:function(){for(var t=this.childNodes.length-1;t>=0;t--){var i=this.childNodes[t];this.removeChild(i)}}},{key:"destroyChildren",value:function(){for(var t=this.childNodes.length-1;t>=0;t--){var i=this.childNodes[t];i.childNodes.length>0&&i.destroyChildren(),i.destroy()}}},{key:"matches",value:function(t){return dr.sceneGraphService.matches(t,this)}},{key:"getElementById",value:function(t){return dr.sceneGraphService.querySelector("#".concat(t),this)}},{key:"getElementsByName",value:function(t){return dr.sceneGraphService.querySelectorAll('[name="'.concat(t,'"]'),this)}},{key:"getElementsByClassName",value:function(t){return dr.sceneGraphService.querySelectorAll(".".concat(t),this)}},{key:"getElementsByTagName",value:function(t){return dr.sceneGraphService.querySelectorAll(t,this)}},{key:"querySelector",value:function(t){return dr.sceneGraphService.querySelector(t,this)}},{key:"querySelectorAll",value:function(t){return dr.sceneGraphService.querySelectorAll(t,this)}},{key:"closest",value:function(t){var i=this;do{if(dr.sceneGraphService.matches(t,i))return i;i=i.parentElement}while(i!==null);return null}},{key:"find",value:function(t){var i=this,a=null;return this.forEach(function(s){return s!==i&&t(s)?(a=s,!1):!0}),a}},{key:"findAll",value:function(t){var i=this,a=[];return this.forEach(function(s){s!==i&&t(s)&&a.push(s)}),a}},{key:"after",value:function(){var t=this;if(this.parentNode){for(var i=this.parentNode.childNodes.indexOf(this),a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];s.forEach(function(l,u){var c;return(c=t.parentNode)===null||c===void 0?void 0:c.appendChild(l,i+u+1)})}}},{key:"before",value:function(){if(this.parentNode){for(var t,i=this.parentNode.childNodes.indexOf(this),a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];var l=s[0],u=s.slice(1);this.parentNode.appendChild(l,i),(t=l).after.apply(t,zl(u))}}},{key:"replaceWith",value:function(){this.after.apply(this,arguments),this.remove()}},{key:"append",value:function(){for(var t=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];a.forEach(function(o){return t.appendChild(o)})}},{key:"prepend",value:function(){for(var t=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];a.forEach(function(o,l){return t.appendChild(o,l)})}},{key:"replaceChildren",value:function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)}},{key:"remove",value:function(){return this.parentNode?this.parentNode.removeChild(this):this}},{key:"destroy",value:function(){this.destroyChildren(),this.dispatchEvent(Vwe),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0}},{key:"getGeometryBounds",value:function(){return dr.sceneGraphService.getGeometryBounds(this)}},{key:"getRenderBounds",value:function(){return dr.sceneGraphService.getBounds(this,!0)}},{key:"getBounds",value:function(){return dr.sceneGraphService.getBounds(this)}},{key:"getLocalBounds",value:function(){return dr.sceneGraphService.getLocalBounds(this)}},{key:"getBoundingClientRect",value:function(){return dr.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(t){if(typeof t!="symbol"){var i=this.attributes[t];return i}}},{key:"hasAttribute",value:function(t){return this.getAttributeNames().includes(t)}},{key:"hasAttributes",value:function(){return!!this.getAttributeNames().length}},{key:"removeAttribute",value:function(t){this.setAttribute(t,null),delete this.attributes[t]}},{key:"setAttribute",value:function(t,i,a,s){this.attributes[t]=i}},{key:"getAttributeNS",value:function(t,i){throw new Error(ul)}},{key:"getAttributeNode",value:function(t){throw new Error(ul)}},{key:"getAttributeNodeNS",value:function(t,i){throw new Error(ul)}},{key:"hasAttributeNS",value:function(t,i){throw new Error(ul)}},{key:"removeAttributeNS",value:function(t,i){throw new Error(ul)}},{key:"removeAttributeNode",value:function(t){throw new Error(ul)}},{key:"setAttributeNS",value:function(t,i,a){throw new Error(ul)}},{key:"setAttributeNode",value:function(t){throw new Error(ul)}},{key:"setAttributeNodeNS",value:function(t){throw new Error(ul)}},{key:"toggleAttribute",value:function(t,i){throw new Error(ul)}}])}(bm);function ao(r){return!!(r!=null&&r.nodeName)}var jwe=dr.globalThis.Proxy?dr.globalThis.Proxy:function(){},rg=new bv(wu.ATTR_MODIFIED,null,null,null,null,bv.MODIFICATION,null,null),Bx=E.Ue(),Hwe=X.Ue(),Kl=function(r){function n(e){var t;return Nr(this,n),t=no(this,n),t.isCustomElement=!1,t.isMutationObserved=!1,t.activeAnimations=[],t.config=e,t.id=e.id||"",t.name=e.name||"",(e.className||e.class)&&(t.className=e.className||e.class),t.nodeName=e.type||Zr.GROUP,e.initialParsedStyle&&Object.assign(t.parsedStyle,e.initialParsedStyle),t.initAttributes(e.style),dr.enableStyleSyntax&&(t.style=new jwe({setProperty:function(a,s){t.setAttribute(a,s)},getPropertyValue:function(a){return t.getAttribute(a)},removeProperty:function(a){t.removeAttribute(a)},item:function(){return""}},{get:function(a,s){return a[s]!==void 0?a[s]:t.getAttribute(s)},set:function(a,s,o){return t.setAttribute(s,o),!0}})),t}return ro(n,r),Or(n,[{key:"destroy",value:function(){TG(n,"destroy",this,3)([]),this.getAnimations().forEach(function(t){t.cancel()})}},{key:"cloneNode",value:function(t,i){var a=ol({},this.attributes);for(var s in a){var o=a[s];ao(o)&&s!=="clipPath"&&s!=="offsetPath"&&s!=="textPath"&&(a[s]=o.cloneNode(t)),i&&(a[s]=i(s,o))}var l=new this.constructor(ol(ol({},this.config),{},{style:a}));return l.setLocalTransform(this.getLocalTransform()),t&&this.children.forEach(function(u){if(!u.style.isMarker){var c=u.cloneNode(t);l.appendChild(c)}}),l}},{key:"initAttributes",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i={forceUpdateGeometry:!0};dr.styleValueRegistry.processProperties(this,t,i),this.renderable.dirty=!0}},{key:"setAttribute",value:function(t,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;(0,ie.Z)(i)||(a||i!==this.attributes[t])&&(this.internalSetAttribute(t,i,{memoize:s}),TG(n,"setAttribute",this,3)([t,i]))}},{key:"internalSetAttribute",value:function(t,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=this.renderable,o=this.attributes[t],l=this.parsedStyle[t];dr.styleValueRegistry.processProperties(this,ya({},t,i),a),s.dirty=!0;var u=this.parsedStyle[t];if(this.isConnected&&(rg.relatedNode=this,rg.prevValue=o,rg.newValue=i,rg.attrName=t,rg.prevParsedValue=l,rg.newParsedValue=u,this.isMutationObserved?this.dispatchEvent(rg):(rg.target=this,this.ownerDocument.defaultView.dispatchEvent(rg,!0))),this.isCustomElement&&this.isConnected||!this.isCustomElement){var c,d;(c=(d=this).attributeChangedCallback)===null||c===void 0||c.call(d,t,o,i,l,u)}}},{key:"getBBox",value:function(){var t=this.getBounds(),i=t.getMin(),a=ll(i,2),s=a[0],o=a[1],l=t.getMax(),u=ll(l,2),c=u[0],d=u[1];return new m0(s,o,c-s,d-o)}},{key:"setOrigin",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return dr.sceneGraphService.setOrigin(this,od(t,i,a,!1)),this}},{key:"getOrigin",value:function(){return dr.sceneGraphService.getOrigin(this)}},{key:"setPosition",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return dr.sceneGraphService.setPosition(this,od(t,i,a,!1)),this}},{key:"setLocalPosition",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return dr.sceneGraphService.setLocalPosition(this,od(t,i,a,!1)),this}},{key:"translate",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return dr.sceneGraphService.translate(this,od(t,i,a,!1)),this}},{key:"translateLocal",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return dr.sceneGraphService.translateLocal(this,od(t,i,a,!1)),this}},{key:"getPosition",value:function(){return dr.sceneGraphService.getPosition(this)}},{key:"getLocalPosition",value:function(){return dr.sceneGraphService.getLocalPosition(this)}},{key:"scale",value:function(t,i,a){return this.scaleLocal(t,i,a)}},{key:"scaleLocal",value:function(t,i,a){return typeof t=="number"&&(i=i||t,a=a||t,t=od(t,i,a,!1)),dr.sceneGraphService.scaleLocal(this,t),this}},{key:"setLocalScale",value:function(t,i,a){return typeof t=="number"&&(i=i||t,a=a||t,t=od(t,i,a,!1)),dr.sceneGraphService.setLocalScale(this,t),this}},{key:"getLocalScale",value:function(){return dr.sceneGraphService.getLocalScale(this)}},{key:"getScale",value:function(){return dr.sceneGraphService.getScale(this)}},{key:"getEulerAngles",value:function(){var t=MN(Bx,dr.sceneGraphService.getWorldTransform(this)),i=ll(t,3),a=i[2];return xh(a)}},{key:"getLocalEulerAngles",value:function(){var t=MN(Bx,dr.sceneGraphService.getLocalRotation(this)),i=ll(t,3),a=i[2];return xh(a)}},{key:"setEulerAngles",value:function(t){return dr.sceneGraphService.setEulerAngles(this,0,0,t),this}},{key:"setLocalEulerAngles",value:function(t){return dr.sceneGraphService.setLocalEulerAngles(this,0,0,t),this}},{key:"rotateLocal",value:function(t,i,a){return(0,xe.Z)(i)&&(0,xe.Z)(a)?dr.sceneGraphService.rotateLocal(this,0,0,t):dr.sceneGraphService.rotateLocal(this,t,i,a),this}},{key:"rotate",value:function(t,i,a){return(0,xe.Z)(i)&&(0,xe.Z)(a)?dr.sceneGraphService.rotate(this,0,0,t):dr.sceneGraphService.rotate(this,t,i,a),this}},{key:"setRotation",value:function(t,i,a,s){return dr.sceneGraphService.setRotation(this,t,i,a,s),this}},{key:"setLocalRotation",value:function(t,i,a,s){return dr.sceneGraphService.setLocalRotation(this,t,i,a,s),this}},{key:"setLocalSkew",value:function(t,i){return dr.sceneGraphService.setLocalSkew(this,t,i),this}},{key:"getRotation",value:function(){return dr.sceneGraphService.getRotation(this)}},{key:"getLocalRotation",value:function(){return dr.sceneGraphService.getLocalRotation(this)}},{key:"getLocalSkew",value:function(){return dr.sceneGraphService.getLocalSkew(this)}},{key:"getLocalTransform",value:function(){return dr.sceneGraphService.getLocalTransform(this)}},{key:"getWorldTransform",value:function(){return dr.sceneGraphService.getWorldTransform(this)}},{key:"setLocalTransform",value:function(t){return dr.sceneGraphService.setLocalTransform(this,t),this}},{key:"resetLocalTransform",value:function(){dr.sceneGraphService.resetLocalTransform(this)}},{key:"getAnimations",value:function(){return this.activeAnimations}},{key:"animate",value:function(t,i){var a,s=(a=this.ownerDocument)===null||a===void 0?void 0:a.timeline;return s?s.play(this,t,i):null}},{key:"isVisible",value:function(){var t;return((t=this.parsedStyle)===null||t===void 0?void 0:t.visibility)!=="hidden"}},{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}},{key:"isInteractive",value:function(){var t;return((t=this.parsedStyle)===null||t===void 0?void 0:t.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,zl(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})))+1),this}},{key:"toBack",value:function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,zl(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})))-1),this}},{key:"getConfig",value:function(){return this.config}},{key:"attr",value:function(){for(var t=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var o=a[0],l=a[1];return o?(0,Gs.Z)(o)?(Object.keys(o).forEach(function(u){t.setAttribute(u,o[u])}),this):a.length===2?(this.setAttribute(o,l),this):this.attributes[o]:this.attributes}},{key:"getMatrix",value:function(t){var i=t||this.getWorldTransform(),a=L.getTranslation(Bx,i),s=ll(a,2),o=s[0],l=s[1],u=L.getScaling(Bx,i),c=ll(u,2),d=c[0],h=c[1],f=L.getRotation(Hwe,i),v=MN(Bx,f),g=ll(v,3),m=g[0],y=g[2];return QEe(m||y,o,l,d,h)}},{key:"getLocalMatrix",value:function(){return this.getMatrix(this.getLocalTransform())}},{key:"setMatrix",value:function(t){var i=$G(t),a=ll(i,5),s=a[0],o=a[1],l=a[2],u=a[3],c=a[4];this.setEulerAngles(c).setPosition(s,o).setLocalScale(l,u)}},{key:"setLocalMatrix",value:function(t){var i=$G(t),a=ll(i,5),s=a[0],o=a[1],l=a[2],u=a[3],c=a[4];this.setLocalEulerAngles(c).setLocalPosition(s,o).setLocalScale(l,u)}},{key:"show",value:function(){this.forEach(function(t){t.style.visibility="visible"})}},{key:"hide",value:function(){this.forEach(function(t){t.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(t){return this.children[t]||null}},{key:"add",value:function(t,i){return this.appendChild(t,i)}},{key:"set",value:function(t,i){this.config[t]=i}},{key:"get",value:function(t){return this.config[t]}},{key:"moveTo",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(t,i,a),this}},{key:"move",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(t,i,a),this}},{key:"setZIndex",value:function(t){return this.style.zIndex=t,this}}])}(Uwe);Kl.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 Wwe=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Nr(this,n),no(this,n,[ol({type:Zr.CIRCLE},e)])}return ro(n,r),Or(n)}(Kl);Wwe.PARSED_STYLE_LIST=new Set([].concat(zl(Kl.PARSED_STYLE_LIST),["cx","cy","cz","r","isBillboard","isSizeAttenuation"]));var YLe=null,ZLe=null,Ywe=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Nr(this,n),no(this,n,[ol({type:Zr.ELLIPSE},e)])}return ro(n,r),Or(n)}(Kl);Ywe.PARSED_STYLE_LIST=new Set([].concat(zl(Kl.PARSED_STYLE_LIST),["cx","cy","cz","rx","ry","isBillboard","isSizeAttenuation"]));var XLe=null,Zwe=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Nr(this,n),no(this,n,[ol({type:Zr.GROUP},e)])}return ro(n,r),Or(n)}(Kl);Zwe.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var Xwe=["style"],Kwe=function(r){function n(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.style,a=g0(t,Xwe);return Nr(this,n),e=no(this,n,[ol({type:Zr.HTML,style:i},a)]),e.cullable.enable=!1,e}return ro(n,r),Or(n,[{key:"getDomElement",value:function(){return this.parsedStyle.$el}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"getLocalBounds",value:function(){if(this.parentNode){var t=L.invert(L.create(),this.parentNode.getWorldTransform()),i=this.getBounds();if(!sd.isEmpty(i)){var a=new sd;return a.setFromTransformedAABB(i,t),a}}return this.getBounds()}}])}(Kl);Kwe.PARSED_STYLE_LIST=new Set([].concat(zl(Kl.PARSED_STYLE_LIST),["x","y","$el","innerHTML","width","height"]));var Jwe=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Nr(this,n),no(this,n,[ol({type:Zr.IMAGE},e)])}return ro(n,r),Or(n)}(Kl);Jwe.PARSED_STYLE_LIST=new Set([].concat(zl(Kl.PARSED_STYLE_LIST),["x","y","z","src","width","height","isBillboard","billboardRotation","isSizeAttenuation","keepAspectRatio"]));var Qwe=["style"],qwe=function(r){function n(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.style,a=g0(t,Qwe);Nr(this,n),e=no(this,n,[ol({type:Zr.LINE,style:ol({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},i)},a)]),e.markerStartAngle=0,e.markerEndAngle=0;var s=e.parsedStyle,o=s.markerStart,l=s.markerEnd;return o&&ao(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),l&&ao(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return ro(n,r),Or(n,[{key:"attributeChangedCallback",value:function(t,i,a,s,o){t==="x1"||t==="y1"||t==="x2"||t==="y2"||t==="markerStartOffset"||t==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):t==="markerStart"?(s&&ao(s)&&(this.markerStartAngle=0,s.remove()),o&&ao(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):t==="markerEnd"&&(s&&ao(s)&&(this.markerEndAngle=0,s.remove()),o&&ao(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1)))}},{key:"transformMarker",value:function(t){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=i.x1,c=i.x2,d=i.y1,h=i.y2,f=t?a:s;if(!(!f||!ao(f))){var v=0,g,m,y,w,T,G;t?(y=u,w=d,g=c-u,m=h-d,T=o||0,G=this.markerStartAngle):(y=c,w=h,g=u-c,m=d-h,T=l||0,G=this.markerEndAngle),v=Math.atan2(m,g),f.setLocalEulerAngles(v*180/Math.PI+G),f.setLocalPosition(y+Math.cos(v)*T,w+Math.sin(v)*T)}}},{key:"getPoint",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle,s=a.x1,o=a.y1,l=a.x2,u=a.y2,c=(0,Nt.U4)(s,o,l,u,t),d=c.x,h=c.y,f=E.fF(E.Ue(),E.al(d,h,0),i?this.getWorldTransform():this.getLocalTransform());return new yh(f[0],f[1])}},{key:"getPointAtLength",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(t/this.getTotalLength(),i)}},{key:"getTotalLength",value:function(){var t=this.parsedStyle,i=t.x1,a=t.y1,s=t.x2,o=t.y2;return(0,Nt.Xk)(i,a,s,o)}}])}(Kl);qwe.PARSED_STYLE_LIST=new Set([].concat(zl(Kl.PARSED_STYLE_LIST),["x1","y1","x2","y2","z1","z2","isBillboard","isSizeAttenuation","markerStart","markerEnd","markerStartOffset","markerEndOffset"]));var eSe=["style"],tSe=function(r){function n(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.style,a=g0(t,eSe);Nr(this,n),e=no(this,n,[ol({type:Zr.PATH,style:i,initialParsedStyle:{miterLimit:4,d:ol({},UG)}},a)]),e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[];var s=e.parsedStyle,o=s.markerStart,l=s.markerEnd,u=s.markerMid;return o&&ao(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),u&&ao(u)&&e.placeMarkerMid(u),l&&ao(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return ro(n,r),Or(n,[{key:"attributeChangedCallback",value:function(t,i,a,s,o){t==="d"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):t==="markerStartOffset"||t==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):t==="markerStart"?(s&&ao(s)&&(this.markerStartAngle=0,s.remove()),o&&ao(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):t==="markerEnd"?(s&&ao(s)&&(this.markerEndAngle=0,s.remove()),o&&ao(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1))):t==="markerMid"&&this.placeMarkerMid(o)}},{key:"transformMarker",value:function(t){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=t?a:s;if(!(!u||!ao(u))){var c=0,d,h,f,v,g,m;if(t){var y=this.getStartTangent(),w=ll(y,2),T=w[0],G=w[1];f=G[0],v=G[1],d=T[0]-G[0],h=T[1]-G[1],g=o||0,m=this.markerStartAngle}else{var x=this.getEndTangent(),_=ll(x,2),p=_[0],b=_[1];f=b[0],v=b[1],d=p[0]-b[0],h=p[1]-b[1],g=l||0,m=this.markerEndAngle}c=Math.atan2(h,d),u.setLocalEulerAngles(c*180/Math.PI+m),u.setLocalPosition(f+Math.cos(c)*g,v+Math.sin(c)*g)}}},{key:"placeMarkerMid",value:function(t){var i=this.parsedStyle.d.segments;if(this.markerMidList.forEach(function(c){c.remove()}),t&&ao(t))for(var a=1;a<i.length-1;a++){var s=ll(i[a].currentPoint,2),o=s[0],l=s[1],u=a===1?t:t.cloneNode(!0);this.markerMidList.push(u),this.appendChild(u),u.setLocalPosition(o,l)}}},{key:"getTotalLength",value:function(){return r8(this)}},{key:"getPointAtLength",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle.d.absolutePath,s=(0,jm.r)(a,t),o=s.x,l=s.y,u=E.fF(E.Ue(),E.al(o,l,0),i?this.getWorldTransform():this.getLocalTransform());return new yh(u[0],u[1])}},{key:"getPoint",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPointAtLength(t*r8(this),i)}},{key:"getStartTangent",value:function(){var t=this.parsedStyle.d.segments,i=[];if(t.length>1){var a=t[0].currentPoint,s=t[1].currentPoint,o=t[1].startTangent;i=[],o?(i.push([a[0]-o[0],a[1]-o[1]]),i.push([a[0],a[1]])):(i.push([s[0],s[1]]),i.push([a[0],a[1]]))}return i}},{key:"getEndTangent",value:function(){var t=this.parsedStyle.d.segments,i=t.length,a=[];if(i>1){var s=t[i-2].currentPoint,o=t[i-1].currentPoint,l=t[i-1].endTangent;a=[],l?(a.push([o[0]-l[0],o[1]-l[1]]),a.push([o[0],o[1]])):(a.push([s[0],s[1]]),a.push([o[0],o[1]]))}return a}}])}(Kl);tSe.PARSED_STYLE_LIST=new Set([].concat(zl(Kl.PARSED_STYLE_LIST),["d","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard","isSizeAttenuation"]));var nSe=["style"],XN=function(r){function n(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=t.style,a=g0(t,nSe);Nr(this,n),e=no(this,n,[ol({type:Zr.POLYGON,style:i,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},a)]),e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[];var s=e.parsedStyle,o=s.markerStart,l=s.markerEnd,u=s.markerMid;return o&&ao(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),u&&ao(u)&&e.placeMarkerMid(u),l&&ao(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return ro(n,r),Or(n,[{key:"attributeChangedCallback",value:function(t,i,a,s,o){t==="points"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):t==="markerStartOffset"||t==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):t==="markerStart"?(s&&ao(s)&&(this.markerStartAngle=0,s.remove()),o&&ao(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):t==="markerEnd"?(s&&ao(s)&&(this.markerEndAngle=0,s.remove()),o&&ao(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1))):t==="markerMid"&&this.placeMarkerMid(o)}},{key:"transformMarker",value:function(t){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=i.points,c=u||{},d=c.points,h=t?a:s;if(!(!h||!ao(h)||!d)){var f=0,v,g,m,y,w,T;if(m=d[0][0],y=d[0][1],t)v=d[1][0]-d[0][0],g=d[1][1]-d[0][1],w=o||0,T=this.markerStartAngle;else{var G=d.length;this.parsedStyle.isClosed?(v=d[G-1][0]-d[0][0],g=d[G-1][1]-d[0][1]):(m=d[G-1][0],y=d[G-1][1],v=d[G-2][0]-d[G-1][0],g=d[G-2][1]-d[G-1][1]),w=l||0,T=this.markerEndAngle}f=Math.atan2(g,v),h.setLocalEulerAngles(f*180/Math.PI+T),h.setLocalPosition(m+Math.cos(f)*w,y+Math.sin(f)*w)}}},{key:"placeMarkerMid",value:function(t){var i=this.parsedStyle.points,a=i||{},s=a.points;if(this.markerMidList.forEach(function(d){d.remove()}),this.markerMidList=[],t&&ao(t)&&s)for(var o=1;o<(this.parsedStyle.isClosed?s.length:s.length-1);o++){var l=s[o][0],u=s[o][1],c=o===1?t:t.cloneNode(!0);this.markerMidList.push(c),this.appendChild(c),c.setLocalPosition(l,u)}}}])}(Kl);XN.PARSED_STYLE_LIST=new Set([].concat(zl(Kl.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isClosed","isBillboard","isSizeAttenuation"]));var rSe=["style"],iSe=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.style,i=g0(e,rSe);return Nr(this,n),no(this,n,[ol({type:Zr.POLYLINE,style:t,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},i)])}return ro(n,r),Or(n,[{key:"getTotalLength",value:function(){return Gbe(this)}},{key:"getPointAtLength",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(t/this.getTotalLength(),i)}},{key:"getPoint",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle.points.points;if(this.parsedStyle.points.segments.length===0){var s=[],o=0,l,u,c=this.getTotalLength();a.forEach(function(y,w){a[w+1]&&(l=[0,0],l[0]=o/c,u=(0,Nt.Xk)(y[0],y[1],a[w+1][0],a[w+1][1]),o+=u,l[1]=o/c,s.push(l))}),this.parsedStyle.points.segments=s}var d=0,h=0;this.parsedStyle.points.segments.forEach(function(y,w){t>=y[0]&&t<=y[1]&&(d=(t-y[0])/(y[1]-y[0]),h=w)});var f=(0,Nt.U4)(a[h][0],a[h][1],a[h+1][0],a[h+1][1],d),v=f.x,g=f.y,m=E.fF(E.Ue(),E.al(v,g,0),i?this.getWorldTransform():this.getLocalTransform());return new yh(m[0],m[1])}},{key:"getStartTangent",value:function(){var t=this.parsedStyle.points.points,i=[];return i.push([t[1][0],t[1][1]]),i.push([t[0][0],t[0][1]]),i}},{key:"getEndTangent",value:function(){var t=this.parsedStyle.points.points,i=t.length-1,a=[];return a.push([t[i-1][0],t[i-1][1]]),a.push([t[i][0],t[i][1]]),a}}])}(XN);iSe.PARSED_STYLE_LIST=new Set([].concat(zl(XN.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard"]));var aSe=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Nr(this,n),no(this,n,[ol({type:Zr.RECT},e)])}return ro(n,r),Or(n)}(Kl);aSe.PARSED_STYLE_LIST=new Set([].concat(zl(Kl.PARSED_STYLE_LIST),["x","y","z","width","height","isBillboard","isSizeAttenuation","radius"]));var sSe=["style"],oSe=function(r){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.style,i=g0(e,sSe);return Nr(this,n),no(this,n,[ol({type:Zr.TEXT,style:ol({fill:"black"},t)},i)])}return ro(n,r),Or(n,[{key:"getComputedTextLength",value:function(){var t;return this.getGeometryBounds(),((t=this.parsedStyle.metrics)===null||t===void 0?void 0:t.maxLineWidth)||0}},{key:"getLineBoundingRects",value:function(){var t;return this.getGeometryBounds(),((t=this.parsedStyle.metrics)===null||t===void 0?void 0:t.lineMetrics)||[]}},{key:"isOverflowing",value:function(){return this.getGeometryBounds(),!!this.parsedStyle.isOverflowing}}])}(Kl);oSe.PARSED_STYLE_LIST=new Set([].concat(zl(Kl.PARSED_STYLE_LIST),["x","y","z","isBillboard","billboardRotation","isSizeAttenuation","text","textAlign","textBaseline","fontStyle","fontSize","fontFamily","fontWeight","fontVariant","lineHeight","letterSpacing","leading","wordWrap","wordWrapWidth","maxLines","textOverflow","isOverflowing","textPath","textDecorationLine","textDecorationColor","textDecorationStyle","textPathSide","textPathStartOffset","metrics","dx","dy"]));var KLe=null,JLe={number:function(n){return new ps(n)},percent:function(n){return new ps(n,"%")},px:function(n){return new ps(n,"px")},em:function(n){return new ps(n,"em")},rem:function(n){return new ps(n,"rem")},deg:function(n){return new ps(n,"deg")},grad:function(n){return new ps(n,"grad")},rad:function(n){return new ps(n,"rad")},turn:function(n){return new ps(n,"turn")},s:function(n){return new ps(n,"s")},ms:function(n){return new ps(n,"ms")},registerProperty:function(n){var e=n.name,t=n.inherits,i=n.interpolable,a=n.initialValue,s=n.syntax;dr.styleValueRegistry.registerMetadata({n:e,inh:t,int:i,d:a,syntax:s})},registerLayout:function(n,e){dr.layoutRegistry.registerLayout(n,e)}},QLe=null,lSe=function(){function r(n){Nr(this,r),this.strategies=n}return Or(r,[{key:"apply",value:function(e){var t=e.camera,i=e.renderingService,a=e.renderingContext,s=this.strategies;i.hooks.cull.tap(r.tag,function(o){if(o){var l=o.cullable;return s.length===0?l.visible=a.unculledEntities.indexOf(o.entity)>-1:l.visible=s.every(function(u){return u.isVisible(t,o)}),!o.isCulled()&&o.isVisible()?o:(o.dispatchEvent(new ng(wu.CULLED)),null)}return o}),i.hooks.afterRender.tap(r.tag,function(o){o.cullable.visibilityPlaneMask=-1})}}])}();lSe.tag="Culling";var uSe=function(){function r(){var n=this;Nr(this,r),this.autoPreventDefault=!1,this.rootPointerEvent=new fwe(null),this.rootWheelEvent=new vwe(null),this.onPointerMove=function(e){var t,i=(t=n.context.renderingContext.root)===null||t===void 0||(t=t.ownerDocument)===null||t===void 0?void 0:t.defaultView;if(!(i.supportsTouchEvents&&e.pointerType==="touch")){var a=n.normalizeToPointerEvent(e,i),s=v0(a),o;try{for(s.s();!(o=s.n()).done;){var l=o.value,u=n.bootstrapEvent(n.rootPointerEvent,l,i,e);n.context.eventService.mapEvent(u)}}catch(c){s.e(c)}finally{s.f()}n.setCursor(n.context.eventService.cursor)}},this.onClick=function(e){var t,i=(t=n.context.renderingContext.root)===null||t===void 0||(t=t.ownerDocument)===null||t===void 0?void 0:t.defaultView,a=n.normalizeToPointerEvent(e,i),s=v0(a),o;try{for(s.s();!(o=s.n()).done;){var l=o.value,u=n.bootstrapEvent(n.rootPointerEvent,l,i,e);n.context.eventService.mapEvent(u)}}catch(c){s.e(c)}finally{s.f()}n.setCursor(n.context.eventService.cursor)}}return Or(r,[{key:"apply",value:function(e){var t=this;this.context=e;var i=e.renderingService,a=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(s){var o=t.context.renderingService.hooks.pickSync.call({position:s,picked:[],topmost:!0}),l=o.picked;return l[0]||null}),i.hooks.pointerWheel.tap(r.tag,function(s){var o=t.normalizeWheelEvent(s);t.context.eventService.mapEvent(o)}),i.hooks.pointerDown.tap(r.tag,function(s){if(!(a.supportsTouchEvents&&s.pointerType==="touch")){var o=t.normalizeToPointerEvent(s,a);if(t.autoPreventDefault&&o[0].isNormalized){var l=s.cancelable||!("cancelable"in s);l&&s.preventDefault()}var u=v0(o),c;try{for(u.s();!(c=u.n()).done;){var d=c.value,h=t.bootstrapEvent(t.rootPointerEvent,d,a,s);t.context.eventService.mapEvent(h)}}catch(f){u.e(f)}finally{u.f()}t.setCursor(t.context.eventService.cursor)}}),i.hooks.pointerUp.tap(r.tag,function(s){if(!(a.supportsTouchEvents&&s.pointerType==="touch")){var o=t.context.contextService.getDomElement(),l=t.context.eventService.isNativeEventFromCanvas(o,s),u=l?"":"outside",c=t.normalizeToPointerEvent(s,a),d=v0(c),h;try{for(d.s();!(h=d.n()).done;){var f=h.value,v=t.bootstrapEvent(t.rootPointerEvent,f,a,s);v.type+=u,t.context.eventService.mapEvent(v)}}catch(g){d.e(g)}finally{d.f()}t.setCursor(t.context.eventService.cursor)}}),i.hooks.pointerMove.tap(r.tag,this.onPointerMove),i.hooks.pointerOver.tap(r.tag,this.onPointerMove),i.hooks.pointerOut.tap(r.tag,this.onPointerMove),i.hooks.click.tap(r.tag,this.onClick),i.hooks.pointerCancel.tap(r.tag,function(s){var o=t.normalizeToPointerEvent(s,a),l=v0(o),u;try{for(l.s();!(u=l.n()).done;){var c=u.value,d=t.bootstrapEvent(t.rootPointerEvent,c,a,s);t.context.eventService.mapEvent(d)}}catch(h){l.e(h)}finally{l.f()}t.setCursor(t.context.eventService.cursor)})}},{key:"bootstrapEvent",value:function(e,t,i,a){e.view=i,e.originalEvent=null,e.nativeEvent=a,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this.transferMouseData(e,t);var s=this.context.eventService.client2Viewport({x:t.clientX,y:t.clientY}),o=s.x,l=s.y;e.viewport.x=o,e.viewport.y=l;var u=this.context.eventService.viewport2Canvas(e.viewport),c=u.x,d=u.y;return e.canvas.x=c,e.canvas.y=d,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.isTrusted=a.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=Ike[e.type]||e.type),e}},{key:"normalizeWheelEvent",value:function(e){var t=this.rootWheelEvent;this.transferMouseData(t,e),t.deltaMode=e.deltaMode,t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ;var i=this.context.eventService.client2Viewport({x:e.clientX,y:e.clientY}),a=i.x,s=i.y;t.viewport.x=a,t.viewport.y=s;var o=this.context.eventService.viewport2Canvas(t.viewport),l=o.x,u=o.y;return t.canvas.x=l,t.canvas.y=u,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.nativeEvent=e,t.type=e.type,t}},{key:"transferMouseData",value:function(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=Dke.now(),e.type=t.type,e.altKey=t.altKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.ctrlKey=t.ctrlKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.screen.x=t.screenX,e.screen.y=t.screenY,e.relatedTarget=null}},{key:"setCursor",value:function(e){this.context.contextService.applyCursorStyle(e||this.context.config.cursor||"default")}},{key:"normalizeToPointerEvent",value:function(e,t){var i=[];if(t.isTouchEvent(e))for(var a=0;a<e.changedTouches.length;a++){var s=e.changedTouches[a];(0,ie.Z)(s.button)&&(s.button=0),(0,ie.Z)(s.buttons)&&(s.buttons=1),(0,ie.Z)(s.isPrimary)&&(s.isPrimary=e.touches.length===1&&e.type==="touchstart"),(0,ie.Z)(s.width)&&(s.width=s.radiusX||1),(0,ie.Z)(s.height)&&(s.height=s.radiusY||1),(0,ie.Z)(s.tiltX)&&(s.tiltX=0),(0,ie.Z)(s.tiltY)&&(s.tiltY=0),(0,ie.Z)(s.pointerType)&&(s.pointerType="touch"),(0,ie.Z)(s.pointerId)&&(s.pointerId=s.identifier||0),(0,ie.Z)(s.pressure)&&(s.pressure=s.force||.5),(0,ie.Z)(s.twist)&&(s.twist=0),(0,ie.Z)(s.tangentialPressure)&&(s.tangentialPressure=0),s.isNormalized=!0,s.type=e.type,i.push(s)}else if(t.isMouseEvent(e)){var o=e;(0,ie.Z)(o.isPrimary)&&(o.isPrimary=!0),(0,ie.Z)(o.width)&&(o.width=1),(0,ie.Z)(o.height)&&(o.height=1),(0,ie.Z)(o.tiltX)&&(o.tiltX=0),(0,ie.Z)(o.tiltY)&&(o.tiltY=0),(0,ie.Z)(o.pointerType)&&(o.pointerType="mouse"),(0,ie.Z)(o.pointerId)&&(o.pointerId=Lke),(0,ie.Z)(o.pressure)&&(o.pressure=.5),(0,ie.Z)(o.twist)&&(o.twist=0),(0,ie.Z)(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,i.push(o)}else i.push(e);return i}}])}();uSe.tag="Event";var qLe=[Zr.CIRCLE,Zr.ELLIPSE,Zr.IMAGE,Zr.RECT,Zr.LINE,Zr.POLYLINE,Zr.POLYGON,Zr.TEXT,Zr.PATH,Zr.HTML],eIe=null,cSe=function(){function r(){Nr(this,r),this.syncTasks=new Map,this.isFirstTimeRendering=!0,this.syncing=!1,this.isFirstTimeRenderingFinished=!1}return Or(r,[{key:"apply",value:function(e){var t=this,i,a=e.renderingService,s=e.renderingContext,o=e.rBushRoot,l=s.root.ownerDocument.defaultView;this.rBush=o;var u=function(g){var m=g.target;m.renderable.dirty=!0,a.dirtify()},c=function(g){t.syncTasks.set(g.target,g.detail.affectChildren),a.dirtify()},d=function(g){var m=g.target;dr.enableSizeAttenuation&&dr.styleValueRegistry.updateSizeAttenuation(m,l.getCamera().getZoom())},h=function(g){var m=g.target,y=m.rBushNode;y.aabb&&t.rBush.remove(y.aabb),t.syncTasks.delete(m),dr.sceneGraphService.dirtifyToRoot(m),a.dirtify()};a.hooks.init.tap(r.tag,function(){l.addEventListener(wu.MOUNTED,d),l.addEventListener(wu.UNMOUNTED,h),l.addEventListener(wu.ATTR_MODIFIED,u),l.addEventListener(wu.BOUNDS_CHANGED,c)}),a.hooks.destroy.tap(r.tag,function(){l.removeEventListener(wu.MOUNTED,d),l.removeEventListener(wu.UNMOUNTED,h),l.removeEventListener(wu.ATTR_MODIFIED,u),l.removeEventListener(wu.BOUNDS_CHANGED,c),t.syncTasks.clear()});var f=(i=dr.globalThis.requestIdleCallback)!==null&&i!==void 0?i:w8.bind(dr.globalThis);a.hooks.endFrame.tap(r.tag,function(){t.isFirstTimeRendering?(t.isFirstTimeRendering=!1,t.syncing=!0,f(function(){t.syncRTree(!0),t.isFirstTimeRenderingFinished=!0})):t.syncRTree()})}},{key:"syncNode",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.isConnected){var i=e.rBushNode;i.aabb&&this.rBush.remove(i.aabb);var a=e.getRenderBounds();if(a){var s=e.renderable;t&&(s.dirtyRenderBounds||(s.dirtyRenderBounds=new sd),s.dirtyRenderBounds.update(a.center,a.halfExtents));var o=a.getMin(),l=ll(o,2),u=l[0],c=l[1],d=a.getMax(),h=ll(d,2),f=h[0],v=h[1];i.aabb||(i.aabb={}),i.aabb.displayObject=e,i.aabb.minX=u,i.aabb.minY=c,i.aabb.maxX=f,i.aabb.maxY=v}if(i.aabb&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.minX)&&!isNaN(i.aabb.minY))return i.aabb}}},{key:"syncRTree",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!(!t&&(this.syncing||this.syncTasks.size===0))){this.syncing=!0;var i=[],a=new Set,s=function(l){if(!a.has(l)&&l.renderable){var u=e.syncNode(l,t);u&&(i.push(u),a.add(l))}};this.syncTasks.forEach(function(o,l){o&&l.forEach(s);for(var u=l;u;)s(u),u=u.parentElement}),this.rBush.load(i),i.length=0,this.syncing=!1}}}])}();cSe.tag="Prepare";function tIe(r){return!!r.document}var KN=function(r){return r.READY="ready",r.BEFORE_RENDER="beforerender",r.RERENDER="rerender",r.AFTER_RENDER="afterrender",r.BEFORE_DESTROY="beforedestroy",r.AFTER_DESTROY="afterdestroy",r.RESIZE="resize",r.DIRTY_RECTANGLE="dirtyrectangle",r.RENDERER_CHANGED="rendererchanged",r}({}),nIe=500,rIe=.1,iIe=1e3,aIe=new ng(wu.MOUNTED),sIe=new ng(wu.UNMOUNTED),oIe=new ng(KN.BEFORE_RENDER),lIe=new ng(KN.RERENDER),uIe=new ng(KN.AFTER_RENDER),cIe=null;function JN(){"use strict";JN=function(){return n};var r,n={},e=Object.prototype,t=e.hasOwnProperty,i=Object.defineProperty||function(se,V,ee){se[V]=ee.value},a=typeof Symbol=="function"?Symbol:{},s=a.iterator||"@@iterator",o=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(se,V,ee){return Object.defineProperty(se,V,{value:ee,enumerable:!0,configurable:!0,writable:!0}),se[V]}try{u({},"")}catch(se){u=function(ee,he,ut){return ee[he]=ut}}function c(se,V,ee,he){var ut=V&&V.prototype instanceof y?V:y,ct=Object.create(ut.prototype),Lt=new le(he||[]);return i(ct,"_invoke",{value:B(se,ee,Lt)}),ct}function d(se,V,ee){try{return{type:"normal",arg:se.call(V,ee)}}catch(he){return{type:"throw",arg:he}}}n.wrap=c;var h="suspendedStart",f="suspendedYield",v="executing",g="completed",m={};function y(){}function w(){}function T(){}var G={};u(G,s,function(){return this});var x=Object.getPrototypeOf,_=x&&x(x(ue([])));_&&_!==e&&t.call(_,s)&&(G=_);var p=T.prototype=y.prototype=Object.create(G);function b(se){["next","throw","return"].forEach(function(V){u(se,V,function(ee){return this._invoke(V,ee)})})}function R(se,V){function ee(ut,ct,Lt,vn){var tn=d(se[ut],se,ct);if(tn.type!=="throw"){var rn=tn.arg,mn=rn.value;return mn&&Wg(mn)=="object"&&t.call(mn,"__await")?V.resolve(mn.__await).then(function(ar){ee("next",ar,Lt,vn)},function(ar){ee("throw",ar,Lt,vn)}):V.resolve(mn).then(function(ar){rn.value=ar,Lt(rn)},function(ar){return ee("throw",ar,Lt,vn)})}vn(tn.arg)}var he;i(this,"_invoke",{value:function(ct,Lt){function vn(){return new V(function(tn,rn){ee(ct,Lt,tn,rn)})}return he=he?he.then(vn,vn):vn()}})}function B(se,V,ee){var he=h;return function(ut,ct){if(he===v)throw Error("Generator is already running");if(he===g){if(ut==="throw")throw ct;return{value:r,done:!0}}for(ee.method=ut,ee.arg=ct;;){var Lt=ee.delegate;if(Lt){var vn=j(Lt,ee);if(vn){if(vn===m)continue;return vn}}if(ee.method==="next")ee.sent=ee._sent=ee.arg;else if(ee.method==="throw"){if(he===h)throw he=g,ee.arg;ee.dispatchException(ee.arg)}else ee.method==="return"&&ee.abrupt("return",ee.arg);he=v;var tn=d(se,V,ee);if(tn.type==="normal"){if(he=ee.done?g:f,tn.arg===m)continue;return{value:tn.arg,done:ee.done}}tn.type==="throw"&&(he=g,ee.method="throw",ee.arg=tn.arg)}}}function j(se,V){var ee=V.method,he=se.iterator[ee];if(he===r)return V.delegate=null,ee==="throw"&&se.iterator.return&&(V.method="return",V.arg=r,j(se,V),V.method==="throw")||ee!=="return"&&(V.method="throw",V.arg=new TypeError("The iterator does not provide a '"+ee+"' method")),m;var ut=d(he,se.iterator,V.arg);if(ut.type==="throw")return V.method="throw",V.arg=ut.arg,V.delegate=null,m;var ct=ut.arg;return ct?ct.done?(V[se.resultName]=ct.value,V.next=se.nextLoc,V.method!=="return"&&(V.method="next",V.arg=r),V.delegate=null,m):ct:(V.method="throw",V.arg=new TypeError("iterator result is not an object"),V.delegate=null,m)}function Z(se){var V={tryLoc:se[0]};1 in se&&(V.catchLoc=se[1]),2 in se&&(V.finallyLoc=se[2],V.afterLoc=se[3]),this.tryEntries.push(V)}function te(se){var V=se.completion||{};V.type="normal",delete V.arg,se.completion=V}function le(se){this.tryEntries=[{tryLoc:"root"}],se.forEach(Z,this),this.reset(!0)}function ue(se){if(se||se===""){var V=se[s];if(V)return V.call(se);if(typeof se.next=="function")return se;if(!isNaN(se.length)){var ee=-1,he=function ut(){for(;++ee<se.length;)if(t.call(se,ee))return ut.value=se[ee],ut.done=!1,ut;return ut.value=r,ut.done=!0,ut};return he.next=he}}throw new TypeError(Wg(se)+" is not iterable")}return w.prototype=T,i(p,"constructor",{value:T,configurable:!0}),i(T,"constructor",{value:w,configurable:!0}),w.displayName=u(T,l,"GeneratorFunction"),n.isGeneratorFunction=function(se){var V=typeof se=="function"&&se.constructor;return!!V&&(V===w||(V.displayName||V.name)==="GeneratorFunction")},n.mark=function(se){return Object.setPrototypeOf?Object.setPrototypeOf(se,T):(se.__proto__=T,u(se,l,"GeneratorFunction")),se.prototype=Object.create(p),se},n.awrap=function(se){return{__await:se}},b(R.prototype),u(R.prototype,o,function(){return this}),n.AsyncIterator=R,n.async=function(se,V,ee,he,ut){ut===void 0&&(ut=Promise);var ct=new R(c(se,V,ee,he),ut);return n.isGeneratorFunction(V)?ct:ct.next().then(function(Lt){return Lt.done?Lt.value:ct.next()})},b(p),u(p,l,"Generator"),u(p,s,function(){return this}),u(p,"toString",function(){return"[object Generator]"}),n.keys=function(se){var V=Object(se),ee=[];for(var he in V)ee.push(he);return ee.reverse(),function ut(){for(;ee.length;){var ct=ee.pop();if(ct in V)return ut.value=ct,ut.done=!1,ut}return ut.done=!0,ut}},n.values=ue,le.prototype={constructor:le,reset:function(V){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(te),!V)for(var ee in this)ee.charAt(0)==="t"&&t.call(this,ee)&&!isNaN(+ee.slice(1))&&(this[ee]=r)},stop:function(){this.done=!0;var V=this.tryEntries[0].completion;if(V.type==="throw")throw V.arg;return this.rval},dispatchException:function(V){if(this.done)throw V;var ee=this;function he(rn,mn){return Lt.type="throw",Lt.arg=V,ee.next=rn,mn&&(ee.method="next",ee.arg=r),!!mn}for(var ut=this.tryEntries.length-1;ut>=0;--ut){var ct=this.tryEntries[ut],Lt=ct.completion;if(ct.tryLoc==="root")return he("end");if(ct.tryLoc<=this.prev){var vn=t.call(ct,"catchLoc"),tn=t.call(ct,"finallyLoc");if(vn&&tn){if(this.prev<ct.catchLoc)return he(ct.catchLoc,!0);if(this.prev<ct.finallyLoc)return he(ct.finallyLoc)}else if(vn){if(this.prev<ct.catchLoc)return he(ct.catchLoc,!0)}else{if(!tn)throw Error("try statement without catch or finally");if(this.prev<ct.finallyLoc)return he(ct.finallyLoc)}}}},abrupt:function(V,ee){for(var he=this.tryEntries.length-1;he>=0;--he){var ut=this.tryEntries[he];if(ut.tryLoc<=this.prev&&t.call(ut,"finallyLoc")&&this.prev<ut.finallyLoc){var ct=ut;break}}ct&&(V==="break"||V==="continue")&&ct.tryLoc<=ee&&ee<=ct.finallyLoc&&(ct=null);var Lt=ct?ct.completion:{};return Lt.type=V,Lt.arg=ee,ct?(this.method="next",this.next=ct.finallyLoc,m):this.complete(Lt)},complete:function(V,ee){if(V.type==="throw")throw V.arg;return V.type==="break"||V.type==="continue"?this.next=V.arg:V.type==="return"?(this.rval=this.arg=V.arg,this.method="return",this.next="end"):V.type==="normal"&&ee&&(this.next=ee),m},finish:function(V){for(var ee=this.tryEntries.length-1;ee>=0;--ee){var he=this.tryEntries[ee];if(he.finallyLoc===V)return this.complete(he.completion,he.afterLoc),te(he),m}},catch:function(V){for(var ee=this.tryEntries.length-1;ee>=0;--ee){var he=this.tryEntries[ee];if(he.tryLoc===V){var ut=he.completion;if(ut.type==="throw"){var ct=ut.arg;te(he)}return ct}}throw Error("illegal catch attempt")},delegateYield:function(V,ee,he){return this.delegate={iterator:ue(V),resultName:ee,nextLoc:he},this.method==="next"&&(this.arg=r),m}},n}function I8(r,n,e,t,i,a,s){try{var o=r[a](s),l=o.value}catch(u){return void e(u)}o.done?n(l):Promise.resolve(l).then(t,i)}function dSe(r){return function(){var n=this,e=arguments;return new Promise(function(t,i){var a=r.apply(n,e);function s(l){I8(a,t,i,s,o,"next",l)}function o(l){I8(a,t,i,s,o,"throw",l)}s(void 0)})}}var D8=function(){function r(n){Nr(this,r),this.dragndropPluginOptions=n}return Or(r,[{key:"apply",value:function(e){var t=this,i=e.renderingService,a=e.renderingContext,s=a.root.ownerDocument,o=s.defaultView,l=function(c){var d=c.target,h=d===s,f=h&&t.dragndropPluginOptions.isDocumentDraggable?s:d.closest&&d.closest("[draggable=true]");if(f){var v=!1,g=c.timeStamp,m=[c.clientX,c.clientY],y=null,w=[c.clientX,c.clientY],T=function(){var x=dSe(JN().mark(function _(p){var b,R,B,j,Z,te;return JN().wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:if(v){ue.next=8;break}if(b=p.timeStamp-g,R=(0,Uv.y)([p.clientX,p.clientY],m),!(b<=t.dragndropPluginOptions.dragstartTimeThreshold||R<=t.dragndropPluginOptions.dragstartDistanceThreshold)){ue.next=5;break}return ue.abrupt("return");case 5:p.type="dragstart",f.dispatchEvent(p),v=!0;case 8:if(p.type="drag",p.dx=p.clientX-w[0],p.dy=p.clientY-w[1],f.dispatchEvent(p),w=[p.clientX,p.clientY],h){ue.next=21;break}return B=t.dragndropPluginOptions.overlap==="pointer"?[p.canvasX,p.canvasY]:d.getBounds().center,ue.next=17,s.elementsFromPoint(B[0],B[1]);case 17:j=ue.sent,Z=j[j.indexOf(d)+1],te=(Z==null?void 0:Z.closest("[droppable=true]"))||(t.dragndropPluginOptions.isDocumentDroppable?s:null),y!==te&&(y&&(p.type="dragleave",p.target=y,y.dispatchEvent(p)),te&&(p.type="dragenter",p.target=te,te.dispatchEvent(p)),y=te,y&&(p.type="dragover",p.target=y,y.dispatchEvent(p)));case 21:case"end":return ue.stop()}},_)}));return function(p){return x.apply(this,arguments)}}();o.addEventListener("pointermove",T);var G=function(_){if(v){_.detail={preventClick:!0};var p=_.clone();y&&(p.type="drop",p.target=y,y.dispatchEvent(p)),p.type="dragend",f.dispatchEvent(p),v=!1}o.removeEventListener("pointermove",T)};d.addEventListener("pointerup",G,{once:!0}),d.addEventListener("pointerupoutside",G,{once:!0})}};i.hooks.init.tap(r.tag,function(){o.addEventListener("pointerdown",l)}),i.hooks.destroy.tap(r.tag,function(){o.removeEventListener("pointerdown",l)})}}])}();D8.tag="Dragndrop";var hSe=function(r){function n(){var e,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Nr(this,n),e=no(this,n),e.name="dragndrop",e.options=t,e}return ro(n,r),Or(n,[{key:"init",value:function(){this.addRenderingPlugin(new D8(ol({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}},{key:"setOptions",value:function(t){Object.assign(this.plugins[0].dragndropPluginOptions,t)}}])}(GEe),F8=function(r,n,e,t){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(t.next(c))}catch(d){s(d)}}function l(c){try{u(t.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((t=t.apply(r,n||[])).next())})},B8=function(r,n){var e={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&n.indexOf(t)<0&&(e[t]=r[t]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(r);i<t.length;i++)n.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(e[t[i]]=r[t[i]]);return e};const $8=["background","main","label","transient"];class G8{getConfig(){return this.config}getLayer(n="main"){return this.extends.layers[n]}getLayers(){return this.extends.layers}getRenderer(n){return this.extends.renderers[n]}getCamera(n="main"){return this.getLayer(n).getCamera()}getRoot(n="main"){return this.getLayer(n).getRoot()}getContextService(n="main"){return this.getLayer(n).getContextService()}setCursor(n){this.config.cursor=n,this.getLayer().setCursor(n)}get document(){return this.getLayer().document}get context(){return this.getLayer().context}constructor(n){this.config=n;const{renderer:e,background:t,cursor:i}=n,a=B8(n,["renderer","background","cursor"]),s=z8(e),o=Object.fromEntries($8.map(l=>{const u=new $1(Object.assign(Object.assign({},a),{supportsMutipleCanvasesInOneContainer:!0,renderer:s[l],background:l==="background"?t:void 0}));return[l,u]}));V8(o),this.extends={config:n,renderer:e,renderers:s,layers:o}}get ready(){return Promise.all(Object.entries(this.getLayers()).map(([,n])=>n.ready))}resize(n,e){Object.assign(this.extends.config,{width:n,height:e}),Object.values(this.getLayers()).forEach(t=>{const i=t.getCamera(),a=i.getPosition(),s=i.getFocalPoint();t.resize(n,e),i.setPosition(a),i.setFocalPoint(s)})}getBounds(n){return cy(Object.values(this.getLayers()).map(e=>n?e.getRoot().childNodes.find(i=>i.classList.includes(n)):e.getRoot()).filter(e=>(e==null?void 0:e.childNodes.length)>0).map(e=>e.getBounds()))}getContainer(){const n=this.extends.config.container;return typeof n=="string"?document.getElementById(n):n}getSize(){return[this.extends.config.width||0,this.extends.config.height||0]}appendChild(n,e){var t;const i=((t=n.style)===null||t===void 0?void 0:t.$layer)||"main";return this.getLayer(i).appendChild(n,e)}setRenderer(n){if(n===this.extends.renderer)return;const e=z8(n);this.extends.renderers=e,Object.entries(e).forEach(([t,i])=>this.getLayer(t).setRenderer(i)),V8(this.getLayers())}getCanvasByViewport(n){return Du(this.getLayer().viewport2Canvas(Zh(n)))}getViewportByCanvas(n){return Du(this.getLayer().canvas2Viewport(Zh(n)))}getViewportByClient(n){return Du(this.getLayer().client2Viewport(Zh(n)))}getClientByViewport(n){return Du(this.getLayer().viewport2Client(Zh(n)))}getClientByCanvas(n){return this.getClientByViewport(this.getViewportByCanvas(n))}getCanvasByClient(n){const e=this.getLayer(),t=e.client2Viewport(Zh(n));return Du(e.viewport2Canvas(t))}toDataURL(){return F8(this,arguments,void 0,function*(n={}){const e=window.devicePixelRatio||1,{mode:t="viewport"}=n,i=B8(n,["mode"]);let[a,s,o,l]=[0,0,0,0];if(t==="viewport")[o,l]=this.getSize();else if(t==="overall"){const y=this.getBounds(),w=yg(y);[a,s]=y.min,[o,l]=w}const u=(0,gN.L)('<div id="virtual-image"></div>'),c=new $1({width:o,height:l,renderer:new qy,devicePixelRatio:e,container:u,background:this.extends.config.background});yield c.ready,c.appendChild(this.getLayer("background").getRoot().cloneNode(!0)),c.appendChild(this.getRoot().cloneNode(!0));const d=this.getLayer("label").getRoot().cloneNode(!0),h=c.viewport2Canvas({x:0,y:0}),f=this.getCanvasByViewport([0,0]);d.translate([f[0]-h.x,f[1]-h.y]),d.scale(1/this.getCamera().getZoom()),c.appendChild(d),c.appendChild(this.getLayer("transient").getRoot().cloneNode(!0));const v=this.getCamera(),g=c.getCamera();if(t==="viewport")g.setZoom(v.getZoom()),g.setPosition(v.getPosition()),g.setFocalPoint(v.getFocalPoint());else if(t==="overall"){const[y,w,T]=g.getPosition(),[G,x,_]=g.getFocalPoint();g.setPosition([y+a,w+s,T]),g.setFocalPoint([G+a,x+s,_])}const m=c.getContextService();return new Promise(y=>{c.addEventListener(Vf.RERENDER,()=>F8(this,void 0,void 0,function*(){yield new Promise(T=>setTimeout(T,300));const w=yield m.toDataURL(i);y(w)}))})})}destroy(){Object.values(this.getLayers()).forEach(n=>{n.getCamera().cancelLandmarkAnimation(),n.destroy()})}}function z8(r){return Object.fromEntries($8.map(n=>{const e=(r==null?void 0:r(n))||new qy;return n==="main"?e.registerPlugin(new hSe({isDocumentDraggable:!0,isDocumentDroppable:!0,dragstartDistanceThreshold:10,dragstartTimeThreshold:100})):e.unregisterPlugin(e.getPlugin("dom-interaction")),[n,e]}))}function V8(r){Object.entries(r).forEach(([n,e])=>{const t=e.getContextService().getDomElement();t.style.position="absolute",t.style.outline="none",t.tabIndex=1,n!=="main"&&(t.style.pointerEvents="none")})}var fSe=k(58029),$x=function(r,n){var e={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&n.indexOf(t)<0&&(e[t]=r[t]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(r);i<t.length;i++)n.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(e[t[i]]=r[t[i]]);return e};function Xg(r,n){const{data:e,style:t}=r,i=$x(r,["data","style"]),{data:a,style:s}=n,o=$x(n,["data","style"]),l=Object.assign(Object.assign({},i),o);return(e||a)&&Object.assign(l,{data:Object.assign(Object.assign({},e),a)}),(t||s)&&Object.assign(l,{style:Object.assign(Object.assign({},t),s)}),l}function QN(r){const{data:n,style:e}=r,i=$x(r,["data","style"]);return n&&(i.data=Object.assign({},n)),e&&(i.style=Object.assign({},e)),i}function dIe(r){return!get(r,["nodes","length"])&&!get(r,["edges","length"])&&!get(r,["combos","length"])}function E0(r={},n={}){const{states:e=[],data:t={},style:i={},children:a=[]}=r,s=$x(r,["states","data","style","children"]),{states:o=[],data:l={},style:u={},children:c=[]}=n,d=$x(n,["states","data","style","children"]),h=(v,g)=>v.length!==g.length?!1:v.every((m,y)=>m===g[y]),f=(v,g)=>{const m=Object.keys(v),y=Object.keys(g);return m.length!==y.length?!1:m.every(w=>v[w]===g[w])};return!(!f(s,d)||!h(a,c)||!h(e,o)||!f(t,l)||!f(i,u))}var vSe=function(r,n){var e={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&n.indexOf(t)<0&&(e[t]=r[t]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(r);i<t.length;i++)n.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(e[t[i]]=r[t[i]]);return e};function qN(r){const{id:n=Ut(r),style:e,data:t}=r,i=vSe(r,["id","style","data"]),a=Object.assign(Object.assign({},r),{style:Object.assign({},e),data:Object.assign({},t)});return pJ(r)?Object.assign({id:n,data:a},i):{id:n,data:a}}function Su(r){return r.data}function gSe(r){if(r.hasTreeStructure(Hh))return;r.attachTreeStructure(Hh);const n=r.getAllEdges();for(const e of n){const{source:t,target:i}=e;r.setParent(i,t,Hh)}}class _Se{constructor(){this.latestRemovedComboIds=new Set,this.comboIds=new Set,this.changes=[],this.batchCount=0,this.isTraceless=!1,this.enableUpdateNodeLikeHierarchy=!0,this.model=new su.k}pushChange(n){if(this.isTraceless)return;const{type:e}=n;if(e===ko.NodeUpdated||e===ko.EdgeUpdated||e===ko.ComboUpdated){const{value:t,original:i}=n;this.changes.push({value:QN(t),original:QN(i),type:e})}else this.changes.push({value:QN(n.value),type:e})}getChanges(){return this.changes}clearChanges(){this.changes=[]}batch(n){this.batchCount++,this.model.batch(n),this.batchCount--}silence(n){this.isTraceless=!0,n(),this.isTraceless=!1}isCombo(n){return this.comboIds.has(n)||this.latestRemovedComboIds.has(n)}getData(){return{nodes:this.getNodeData(),edges:this.getEdgeData(),combos:this.getComboData()}}getNodeData(n){return this.model.getAllNodes().reduce((e,t)=>{const i=Su(t);return this.isCombo(Ut(i))||(n===void 0||n.includes(Ut(i)))&&e.push(i),e},[])}getEdgeDatum(n){return Su(this.model.getEdge(n))}getEdgeData(n){return this.model.getAllEdges().reduce((e,t)=>{const i=Su(t);return(n===void 0||n.includes(Ut(i)))&&e.push(i),e},[])}getComboData(n){return this.model.getAllNodes().reduce((e,t)=>{const i=Su(t);return this.isCombo(Ut(i))&&(n===void 0||n.includes(Ut(i)))&&e.push(i),e},[])}getRootsData(n=Hh){return this.model.getRoots(n).map(Su)}getAncestorsData(n,e){const{model:t}=this;return!t.hasNode(n)||!t.hasTreeStructure(e)?[]:t.getAncestors(n,e).map(Su)}getDescendantsData(n){const e=this.getElementDataById(n),t=[];return O_(e,i=>{i!==e&&t.push(i)},i=>this.getChildrenData(Ut(i)),"TB"),t}getParentData(n,e){const{model:t}=this;if(!e){Gc.warn("The hierarchy structure key is not specified");return}if(!t.hasNode(n)||!t.hasTreeStructure(e))return;const i=t.getParent(n,e);return i?Su(i):void 0}getChildrenData(n){const e=this.getElementType(n)==="node"?Hh:Ls,{model:t}=this;return!t.hasNode(n)||!t.hasTreeStructure(e)?[]:t.getChildren(n,e).map(Su)}getElementsDataByType(n){return n==="node"?this.getNodeData():n==="edge"?this.getEdgeData():n==="combo"?this.getComboData():[]}getElementDataById(n){return this.getElementType(n)==="edge"?this.getEdgeDatum(n):this.getNodeLikeDatum(n)}getNodeLikeDatum(n){const e=this.model.getNode(n);return Su(e)}getNodeLikeData(n){return this.model.getAllNodes().reduce((e,t)=>{const i=Su(t);return n?n.includes(Ut(i))&&e.push(i):e.push(i),e},[])}getElementDataByState(n,e){return this.getElementsDataByType(n).filter(i=>{var a;return(a=i.states)===null||a===void 0?void 0:a.includes(e)})}getElementState(n){var e;return((e=this.getElementDataById(n))===null||e===void 0?void 0:e.states)||[]}hasNode(n){return this.model.hasNode(n)&&!this.isCombo(n)}hasEdge(n){return this.model.hasEdge(n)}hasCombo(n){return this.model.hasNode(n)&&this.isCombo(n)}getRelatedEdgesData(n,e="both"){return this.model.getRelatedEdges(n,e).map(Su)}getNeighborNodesData(n){return this.model.getNeighbors(n).map(Su)}setData(n){const{nodes:e=[],edges:t=[],combos:i=[]}=n,{nodes:a,edges:s,combos:o}=this.getData(),l=bg(a,e,d=>Ut(d),E0),u=bg(s,t,d=>Ut(d),E0),c=bg(o,i,d=>Ut(d),E0);this.batch(()=>{this.addData({nodes:l.enter,edges:u.enter,combos:c.enter}),this.updateData({nodes:l.update,edges:u.update,combos:c.update}),this.removeData({nodes:l.exit.map(Ut),edges:u.exit.map(Ut),combos:c.exit.map(Ut)})})}addData(n){const{nodes:e,edges:t,combos:i}=n;this.batch(()=>{this.addComboData(i),this.addNodeData(e),this.addEdgeData(t)})}addNodeData(n=[]){n.length&&(this.model.addNodes(n.map(e=>(this.pushChange({value:e,type:ko.NodeAdded}),qN(e)))),this.updateNodeLikeHierarchy(n))}addEdgeData(n=[]){n.length&&this.model.addEdges(n.map(e=>(this.pushChange({value:e,type:ko.EdgeAdded}),qN(e))))}addComboData(n=[]){if(!n.length)return;const{model:e}=this;e.hasTreeStructure(Ls)||e.attachTreeStructure(Ls),e.addNodes(n.map(t=>(this.comboIds.add(Ut(t)),this.pushChange({value:t,type:ko.ComboAdded}),qN(t)))),this.updateNodeLikeHierarchy(n)}addChildrenData(n,e){const t=this.getNodeLikeDatum(n),i=e.map(Ut);this.addNodeData(e),this.updateNodeData([{id:n,children:[...t.children||[],...i]}]),this.addEdgeData(i.map(a=>({source:n,target:a})))}updateNodeLikeHierarchy(n){if(!this.enableUpdateNodeLikeHierarchy)return;const{model:e}=this;n.forEach(t=>{const i=Ut(t);bE(t)&&(e.hasTreeStructure(Ls)||e.attachTreeStructure(Ls),this.setParent(i,bE(t),Ls));const s=t.children||[];if(s.length){e.hasTreeStructure(Hh)||e.attachTreeStructure(Hh);const o=s.filter(l=>e.hasNode(l));o.forEach(l=>this.setParent(l,i,Hh)),o.length!==s.length&&this.updateNodeData([{id:i,children:o}])}})}preventUpdateNodeLikeHierarchy(n){this.enableUpdateNodeLikeHierarchy=!1,n(),this.enableUpdateNodeLikeHierarchy=!0}updateData(n){const{nodes:e,edges:t,combos:i}=n;this.batch(()=>{this.updateNodeData(e),this.updateComboData(i),this.updateEdgeData(t)})}updateNodeData(n=[]){if(!n.length)return;const{model:e}=this;this.batch(()=>{const t=[];n.forEach(i=>{const a=Ut(i),s=Su(e.getNode(a));if(E0(s,i))return;const o=Xg(s,i);this.pushChange({value:o,original:s,type:ko.NodeUpdated}),e.mergeNodeData(a,o),t.push(o)}),this.updateNodeLikeHierarchy(t)})}refreshData(){const{nodes:n,edges:e,combos:t}=this.getData();n.forEach(i=>{this.pushChange({value:i,original:i,type:ko.NodeUpdated})}),e.forEach(i=>{this.pushChange({value:i,original:i,type:ko.EdgeUpdated})}),t.forEach(i=>{this.pushChange({value:i,original:i,type:ko.ComboUpdated})})}syncNodeDatum(n){const{model:e}=this,t=Ut(n),i=Su(e.getNode(t)),a=Xg(i,n);e.mergeNodeData(t,a)}updateEdgeData(n=[]){if(!n.length)return;const{model:e}=this;this.batch(()=>{n.forEach(t=>{const i=Ut(t),a=Su(e.getEdge(i));if(E0(a,t))return;t.source&&a.source!==t.source&&e.updateEdgeSource(i,t.source),t.target&&a.target!==t.target&&e.updateEdgeTarget(i,t.target);const s=Xg(a,t);this.pushChange({value:s,original:a,type:ko.EdgeUpdated}),e.mergeEdgeData(i,s)})})}updateComboData(n=[]){if(!n.length)return;const{model:e}=this;e.batch(()=>{const t=[];n.forEach(i=>{const a=Ut(i),s=Su(e.getNode(a));if(E0(s,i))return;const o=Xg(s,i);this.pushChange({value:o,original:s,type:ko.ComboUpdated}),e.mergeNodeData(a,o),t.push(o)}),this.updateNodeLikeHierarchy(t)})}setParent(n,e,t,i=!0){var a;if(n===e)return;const s=this.getNodeLikeDatum(n),o=bE(s);if(e){const l=this.getNodeLikeDatum(e);if(((a=l.style)===null||a===void 0?void 0:a.zIndex)!==void 0){const u=(0,nc.Z)(l,["style","zIndex"],0)+(this.isCombo(e)?1:0);(0,hp.Z)(s,["style","zIndex"],u)}}if(o!==e&&t===Ls){const l={id:n,combo:e};this.isCombo(n)?this.syncComboDatum(l):this.syncNodeDatum(l)}this.model.setParent(n,e,t),i&&t===Ls&&(0,fSe.Z)([o,e]).forEach(l=>{l!==void 0&&this.refreshComboData(l)})}refreshComboData(n){const e=this.getComboData([n])[0],t=this.getAncestorsData(n,Ls);e&&this.pushChange({value:e,original:e,type:ko.ComboUpdated}),t.forEach(i=>{this.pushChange({value:i,original:i,type:ko.ComboUpdated})})}syncComboDatum(n){const{model:e}=this,t=Ut(n);if(!e.hasNode(t))return;const i=Su(e.getNode(t)),a=Xg(i,n);e.mergeNodeData(t,a)}getElementPosition(n){const e=this.getElementDataById(n);return Iu(e)}translateNodeLikeBy(n,e){this.isCombo(n)?this.translateComboBy(n,e):this.translateNodeBy(n,e)}translateNodeLikeTo(n,e){this.isCombo(n)?this.translateComboTo(n,e):this.translateNodeTo(n,e)}translateNodeBy(n,e){const t=this.getElementPosition(n),i=Ji(t,[...e,0].slice(0,3));this.translateNodeTo(n,i)}translateNodeTo(n,e){const[t=0,i=0,a=0]=e;this.preventUpdateNodeLikeHierarchy(()=>{this.updateNodeData([{id:n,style:{x:t,y:i,z:a}}])})}translateComboBy(n,e){const[t=0,i=0,a=0]=e;if([t,i,a].some(isNaN)||[t,i,a].every(l=>l===0))return;const s=this.getComboData([n])[0];if(!s)return;const o=new Set;O_(s,l=>{const u=Ut(l);if(o.has(u))return;o.add(u);const[c,d,h]=Iu(l),f=Xg(l,{style:{x:c+t,y:d+i,z:h+a}});this.pushChange({value:f,original:l,type:this.isCombo(u)?ko.ComboUpdated:ko.NodeUpdated}),this.model.mergeNodeData(u,f)},l=>this.getChildrenData(Ut(l)),"BT")}translateComboTo(n,e){var t;if(e.some(isNaN))return;const[i=0,a=0,s=0]=e,o=(t=this.getComboData([n]))===null||t===void 0?void 0:t[0];if(!o)return;const[l,u,c]=Iu(o),d=i-l,h=a-u,f=s-c;O_(o,v=>{const g=Ut(v),[m,y,w]=Iu(v),T=Xg(v,{style:{x:m+d,y:y+h,z:w+f}});this.pushChange({value:T,original:v,type:this.isCombo(g)?ko.ComboUpdated:ko.NodeUpdated}),this.model.mergeNodeData(g,T)},v=>this.getChildrenData(Ut(v)),"BT")}removeData(n){const{nodes:e,edges:t,combos:i}=n;this.batch(()=>{this.removeEdgeData(t),this.removeNodeData(e),this.removeComboData(i),this.latestRemovedComboIds=new Set(i)})}removeNodeData(n=[]){n.length&&this.batch(()=>{n.forEach(e=>{this.removeEdgeData(this.getRelatedEdgesData(e).map(Ut)),this.pushChange({value:this.getNodeData([e])[0],type:ko.NodeRemoved}),this.removeNodeLikeHierarchy(e)}),this.model.removeNodes(n)})}removeEdgeData(n=[]){n.length&&(n.forEach(e=>this.pushChange({value:this.getEdgeData([e])[0],type:ko.EdgeRemoved})),this.model.removeEdges(n))}removeComboData(n=[]){n.length&&this.batch(()=>{n.forEach(e=>{this.pushChange({value:this.getComboData([e])[0],type:ko.ComboRemoved}),this.removeNodeLikeHierarchy(e),this.comboIds.delete(e)}),this.model.removeNodes(n)})}removeNodeLikeHierarchy(n){if(this.model.hasTreeStructure(Ls)){const e=bE(this.getNodeLikeDatum(n));this.setParent(n,void 0,Ls,!1),this.model.getChildren(n,Ls).forEach(t=>{const i=Su(t),a=Ut(i);this.setParent(Ut(i),e,Ls,!1);const s=Xg(i,{id:Ut(i),combo:e});this.pushChange({value:s,original:i,type:this.isCombo(a)?ko.ComboUpdated:ko.NodeUpdated}),this.model.mergeNodeData(Ut(i),s)}),(0,ie.Z)(e)||this.refreshComboData(e)}}getElementType(n){if(this.model.hasNode(n))return this.isCombo(n)?"combo":"node";if(this.model.hasEdge(n))return"edge";throw new Error(Bv(`Unknown element type of id: ${n}`))}destroy(){const{model:n}=this,e=n.getAllNodes(),t=n.getAllEdges();n.removeEdges(t.map(i=>i.id)),n.removeNodes(e.map(i=>i.id)),this.context={}}}var Gw=function(r,n,e,t){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(t.next(c))}catch(d){s(d)}}function l(c){try{u(t.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((t=t.apply(r,n||[])).next())})};class mSe{constructor(n){this.elementMap={},this.shapeTypeMap={},this.paletteStyle={},this.defaultStyle={},this.stateStyle={},this.visibilityCache=new WeakMap,this.context=n}init(){if(!this.container){const{canvas:n}=this.context;this.container=n.appendChild(new Y0({className:"elements"}))}}emit(n,e){e.silence||$u(this.context.graph,n)}forEachElementData(n){N_.forEach(e=>{const t=this.context.model.getElementsDataByType(e);n(e,t)})}getElementType(n,e){var t;const{options:i,graph:a}=this.context,s=((t=i[n])===null||t===void 0?void 0:t.type)||e.type;return s?typeof s=="string"?s:s.call(a,e):n==="edge"?"line":"circle"}getTheme(n){return sI(this.context.options)[n]||{}}getThemeStyle(n){return this.getTheme(n).style||{}}getThemeStateStyle(n,e){const{state:t={}}=this.getTheme(n);return Object.assign({},...e.map(i=>t[i]||{}))}computePaletteStyle(){const{options:n}=this.context;this.paletteStyle={},this.forEachElementData((e,t)=>{var i,a;const s=Object.assign({},LI((i=this.getTheme(e))===null||i===void 0?void 0:i.palette),LI((a=n[e])===null||a===void 0?void 0:a.palette));s!=null&&s.field&&Object.assign(this.paletteStyle,QJ(t,s))})}getPaletteStyle(n,e){const t=this.paletteStyle[e];return t?n==="edge"?{stroke:t}:{fill:t}:{}}computeElementDefaultStyle(n,e){var t;const{options:i}=this.context,a=((t=i[n])===null||t===void 0?void 0:t.style)||{};"transform"in a&&Array.isArray(a.transform)&&(a.transform=[...a.transform]),this.defaultStyle[Ut(e.datum)]=RI(a,e)}computeElementsDefaultStyle(n){const{graph:e}=this.context;this.forEachElementData((t,i)=>{const a=i.length;for(let s=0;s<a;s++){const o=i[s];(n===void 0||n.includes(Ut(o)))&&this.computeElementDefaultStyle(t,{datum:o,graph:e})}})}getDefaultStyle(n){return this.defaultStyle[n]||{}}getElementState(n){try{const{model:e}=this.context;return e.getElementState(n)}catch(e){return[]}}getElementStateStyle(n,e,t){var i,a;const{options:s}=this.context,o=((a=(i=s[n])===null||i===void 0?void 0:i.state)===null||a===void 0?void 0:a[e])||{};return RI(o,t)}computeElementStatesStyle(n,e,t){this.stateStyle[Ut(t.datum)]=Object.assign({},...e.map(i=>this.getElementStateStyle(n,i,t)))}computeElementsStatesStyle(n){const{graph:e}=this.context;this.forEachElementData((t,i)=>{const a=i.length;for(let s=0;s<a;s++){const o=i[s];if(n===void 0||n.includes(Ut(o))){const l=this.getElementState(Ut(o));this.computeElementStatesStyle(t,l,{datum:o,graph:e})}}})}getStateStyle(n){return this.stateStyle[n]||{}}computeStyle(n,e){n&&["translate","zIndex"].includes(n)||(this.computePaletteStyle(),this.computeElementsDefaultStyle(e),this.computeElementsStatesStyle(e))}getElement(n){return this.elementMap[n]}getElementZIndex(n){var e;const t=this.getElement(n);return t&&(e=t.style.zIndex)!==null&&e!==void 0?e:0}getNodes(){return this.context.model.getNodeData().map(({id:n})=>this.elementMap[n])}getEdges(){return this.context.model.getEdgeData().map(n=>this.elementMap[Ut(n)])}getCombos(){return this.context.model.getComboData().map(({id:n})=>this.elementMap[n])}getElementComputedStyle(n,e){const t=Ut(e),i=this.getThemeStyle(n),a=this.getPaletteStyle(n,t),s=e.style||{},o=this.getDefaultStyle(t),l=this.getThemeStateStyle(n,this.getElementState(t)),u=this.getStateStyle(t),c=Object.assign({},i,a,s,o,l,u);if(n==="combo"){const d=this.context.model.getChildrenData(t),f=!!c.collapsed?[]:d.map(Ut).filter(v=>this.getElement(v));Object.assign(c,{childrenNode:f,childrenData:d})}return c}draw(n={animation:!0}){this.init();const e=this.computeChangesAndDrawData(n);if(!e)return null;const{dataChanges:t,drawData:i}=e;this.markDestroyElement(i),this.computeStyle(n.stage);const{add:a,update:s,remove:o}=i;this.destroyElements(o,n),this.createElements(a,n),this.updateElements(s,n);const{animation:l,silence:u}=n,{type:c="draw"}=n;return this.context.animation.animate(l,u?{}:{before:()=>this.emit(new ku(qn.BEFORE_DRAW,{dataChanges:t,animation:l,render:c==="render"}),n),beforeAnimate:d=>this.emit(new ph(qn.BEFORE_ANIMATE,$c.DRAW,d,i),n),afterAnimate:d=>this.emit(new ph(qn.AFTER_ANIMATE,$c.DRAW,d,i),n),after:()=>this.emit(new ku(qn.AFTER_DRAW,{dataChanges:t,animation:l,render:c==="render"}),n)})}computeChangesAndDrawData(n){const{model:e}=this.context,t=e.getChanges(),i=tP(t);if(i.length===0)return null;const{NodeAdded:a=[],NodeUpdated:s=[],NodeRemoved:o=[],EdgeAdded:l=[],EdgeUpdated:u=[],EdgeRemoved:c=[],ComboAdded:d=[],ComboUpdated:h=[],ComboRemoved:f=[]}=(0,xE.Z)(i,y=>y.type),v=y=>new Map(y.map(w=>{const T=w.value;return[Ut(T),T]})),g={add:{nodes:v(a),edges:v(l),combos:v(d)},update:{nodes:v(s),edges:v(u),combos:v(h)},remove:{nodes:v(o),edges:v(c),combos:v(f)}},m=this.transformData(g,n);return e.clearChanges(),{dataChanges:t,drawData:m}}transformData(n,e){const t=this.context.transform.getTransformInstance();return Object.values(t).reduce((i,a)=>a.beforeDraw(i,e),n)}createElement(n,e,t){var i,a;const s=Ut(e);if(this.getElement(s))return;const l=this.getElementType(n,e),u=this.getElementComputedStyle(n,e),c=Fv(n,l);if(!c)return Gc.warn(`The element ${l} of ${n} is not registered.`);if(this.emit(new c0(qn.BEFORE_ELEMENT_CREATE,n,e),t),t.stage==="expand"){const f=this.getElementZIndex(t.target);(!u.zIndex||u.zIndex<f)&&(u.zIndex=f+((i=u.zIndex)!==null&&i!==void 0?i:0))}const d=this.container.appendChild(new c({id:s,style:Object.assign({context:this.context},u)}));this.shapeTypeMap[s]=l,this.elementMap[s]=d;const{stage:h="enter"}=t;(a=this.context.animation)===null||a===void 0||a.add({element:d,elementType:n,stage:h,originalStyle:Object.assign({},d.attributes),modifiedStyle:Object.assign(Object.assign({},d.attributes),u)},{after:()=>{var f;this.emit(new c0(qn.AFTER_ELEMENT_CREATE,n,e),t),(f=d.onCreate)===null||f===void 0||f.call(d)}})}createElements(n,e){const{nodes:t,edges:i,combos:a}=n;[["node",t],["combo",a],["edge",i]].forEach(([o,l])=>{l.forEach(u=>this.createElement(o,u,e))})}getUpdateStageStyle(n,e,t){const{stage:i="update"}=t;if(i==="translate")if(n==="node"||n==="combo"){const{style:{x:a=0,y:s=0,z:o=0}={}}=e;return{x:a,y:s,z:o}}else return{};return this.getElementComputedStyle(n,e)}updateElement(n,e,t){var i;const a=Ut(e),{stage:s="update"}=t,o=this.getElement(a);if(!o)return()=>null;this.emit(new c0(qn.BEFORE_ELEMENT_UPDATE,n,e),t);const l=this.getElementType(n,e),u=this.getUpdateStageStyle(n,e,t);this.shapeTypeMap[a]!==l&&(o.destroy(),delete this.shapeTypeMap[a],delete this.elementMap[a],this.createElement(n,e,{animation:!1,silence:!0}));const c=s!=="visibility"?s:u.visibility==="hidden"?"hide":"show";c==="hide"&&delete u.visibility,(i=this.context.animation)===null||i===void 0||i.add({element:o,elementType:n,stage:c,originalStyle:Object.assign({},o.attributes),modifiedStyle:Object.assign(Object.assign({},o.attributes),u)},{before:()=>{const d=this.elementMap[a];s!=="collapse"&&LM(d,u),s==="visibility"&&(dEe(d,"opacity")||cEe(d,"opacity"),this.visibilityCache.set(d,c==="show"?"visible":"hidden"),c==="show"&&M_(d,"visible"))},after:()=>{var d;const h=this.elementMap[a];s==="collapse"&&LM(h,u),c==="hide"&&M_(h,this.visibilityCache.get(h)),this.emit(new c0(qn.AFTER_ELEMENT_UPDATE,n,e),t),(d=h.onUpdate)===null||d===void 0||d.call(h)}})}updateElements(n,e){const{nodes:t,edges:i,combos:a}=n;[["node",t],["combo",a],["edge",i]].forEach(([o,l])=>{l.forEach(u=>this.updateElement(o,u,e))})}markDestroyElement(n){Object.values(n.remove).forEach(e=>{e.forEach(t=>{const i=Ut(t),a=this.getElement(i);a&&Dde(a)})})}destroyElement(n,e,t){var i;const{stage:a="exit"}=t,s=Ut(e),o=this.elementMap[s];if(!o)return()=>null;this.emit(new c0(qn.BEFORE_ELEMENT_DESTROY,n,e),t),(i=this.context.animation)===null||i===void 0||i.add({element:o,elementType:n,stage:a,originalStyle:Object.assign({},o.attributes),modifiedStyle:Object.assign({},o.attributes)},{after:()=>{var l;this.clearElement(s),o.destroy(),(l=o.onDestroy)===null||l===void 0||l.call(o),this.emit(new c0(qn.AFTER_ELEMENT_DESTROY,n,e),t)}})}destroyElements(n,e){const{nodes:t,edges:i,combos:a}=n;[["combo",a],["edge",i],["node",t]].forEach(([o,l])=>{l.forEach(u=>this.destroyElement(o,u,e))})}clearElement(n){delete this.paletteStyle[n],delete this.defaultStyle[n],delete this.stateStyle[n],delete this.elementMap[n],delete this.shapeTypeMap[n]}collapseNode(n,e){return Gw(this,void 0,void 0,function*(){var t;const{model:i,layout:a}=this.context,s=this.computeChangesAndDrawData({stage:"collapse",animation:e});if(!s)return;this.markDestroyElement(s.drawData);const o=yield a.simulate();i.updateData(o);const l=this.computeChangesAndDrawData({stage:"collapse",animation:e});if(!l)return;const{drawData:u}=l,{add:c,remove:d,update:h}=u;this.markDestroyElement(u);const f={animation:e,stage:"collapse",data:u};this.destroyElements(d,f),this.createElements(c,f),this.updateElements(h,f),yield(t=this.context.animation.animate(e,{beforeAnimate:v=>this.emit(new ph(qn.BEFORE_ANIMATE,$c.COLLAPSE,v,u),f),afterAnimate:v=>this.emit(new ph(qn.AFTER_ANIMATE,$c.COLLAPSE,v,u),f)},{collapse:{target:n,descendants:Array.from(d.nodes).map(([,v])=>Ut(v)),position:Iu(h.nodes.get(n))}}))===null||t===void 0?void 0:t.finished})}expandNode(n,e){return Gw(this,void 0,void 0,function*(){var t;const{model:i,layout:a}=this.context;if(!i.getAncestorsData(n,Ls).every(v=>Ed(v)))return;const s=Iu(i.getNodeData([n])[0]),o=this.computeChangesAndDrawData({stage:"expand",animation:e});if(!o)return;const{drawData:{add:l}}=o;this.createElements(l,{animation:!1,stage:"expand",target:n}),this.context.animation.clear();const u=yield a.simulate();i.updateData(u),this.computeStyle("expand");const c=this.computeChangesAndDrawData({stage:"collapse",animation:e});if(!c)return;const{drawData:d}=c,{update:h}=d,f={animation:e,stage:"expand",data:d};l.edges.forEach(v=>h.edges.set(Ut(v),v)),l.nodes.forEach(v=>h.nodes.set(Ut(v),v)),this.updateElements(h,f),yield(t=this.context.animation.animate(e,{beforeAnimate:v=>this.emit(new ph(qn.BEFORE_ANIMATE,$c.EXPAND,v,d),f),afterAnimate:v=>this.emit(new ph(qn.AFTER_ANIMATE,$c.EXPAND,v,d),f)},{expand:{target:n,descendants:Array.from(l.nodes).map(([,v])=>Ut(v)),position:s}}))===null||t===void 0?void 0:t.finished})}collapseCombo(n,e){return Gw(this,void 0,void 0,function*(){var t;const{model:i,element:a}=this.context;if(i.getAncestorsData(n,Ls).some(g=>Ed(g)))return;const s=a.getElement(n),o=s.getComboPosition(Object.assign(Object.assign({},s.attributes),{collapsed:!0})),l=this.computeChangesAndDrawData({stage:"collapse",animation:e});if(!l)return;const{dataChanges:u,drawData:c}=l;this.markDestroyElement(c);const{update:d,remove:h}=c,f={animation:e,stage:"collapse",data:c};this.destroyElements(h,f),this.updateElements(d,f);const v=g=>Array.from(g).map(([,m])=>Ut(m));yield(t=this.context.animation.animate(e,{before:()=>this.emit(new ku(qn.BEFORE_DRAW,{dataChanges:u,animation:e}),f),beforeAnimate:g=>this.emit(new ph(qn.BEFORE_ANIMATE,$c.COLLAPSE,g,c),f),afterAnimate:g=>this.emit(new ph(qn.AFTER_ANIMATE,$c.COLLAPSE,g,c),f),after:()=>this.emit(new ku(qn.AFTER_DRAW,{dataChanges:u,animation:e}),f)},{collapse:{target:n,descendants:[...v(h.nodes),...v(h.combos)],position:o}}))===null||t===void 0?void 0:t.finished})}expandCombo(n,e){return Gw(this,void 0,void 0,function*(){var t;const{model:i}=this.context,a=Iu(i.getComboData([n])[0]);this.computeStyle("expand");const s=this.computeChangesAndDrawData({stage:"expand",animation:e});if(!s)return;const{dataChanges:o,drawData:l}=s,{add:u,update:c}=l,d={animation:e,stage:"expand",data:l,target:n};this.createElements(u,d),this.updateElements(c,d);const h=f=>Array.from(f).map(([,v])=>Ut(v));yield(t=this.context.animation.animate(e,{before:()=>this.emit(new ku(qn.BEFORE_DRAW,{dataChanges:o,animation:e}),d),beforeAnimate:f=>this.emit(new ph(qn.BEFORE_ANIMATE,$c.EXPAND,f,l),d),afterAnimate:f=>this.emit(new ph(qn.AFTER_ANIMATE,$c.EXPAND,f,l),d),after:()=>this.emit(new ku(qn.AFTER_DRAW,{dataChanges:o,animation:e}),d)},{expand:{target:n,descendants:[...h(u.nodes),...h(u.combos)],position:a}}))===null||t===void 0?void 0:t.finished})}getFrontZIndex(n){const{model:e}=this.context,t=e.getElementType(n),i=e.getElementDataById(n),a=e.getData();if(Object.assign(a,{[`${t}s`]:a[`${t}s`].filter(s=>Ut(s)!==n)}),t==="combo"&&!Ed(i)){const s=e.getAncestorsData(n,Ls).map(Ut);a.nodes=a.nodes.filter(o=>!s.includes(Ut(o))),a.combos=a.combos.filter(o=>!s.includes(Ut(o))),a.edges=a.edges.filter(({source:o,target:l})=>s.includes(o)&&s.includes(l))}return Math.max(0,...Object.values(a).flat().map(s=>{const o=Ut(s);return this.getElementZIndex(o)}))+1}destroy(){this.container.destroy(),this.elementMap={},this.shapeTypeMap={},this.defaultStyle={},this.stateStyle={},this.paletteStyle={},this.context={}}}var U8=k(54375);class pSe extends eP.Z{constructor(n,e,t){super(),this.graph=n,this.layout=e,this.options=t,this.spawnWorker()}spawnWorker(){this.proxy=U8.Ud(new Worker(new URL(k.p+k.u(4150),k.b),{type:void 0})),this.running&&(this.running=!1,this.execute())}execute(){var n;return ia(this,void 0,void 0,function*(){if(this.running)return this;this.running=!0;const e=this.layout.options,{onTick:t}=e,i=v5(e,["onTick"]),a={};Object.keys(i).forEach(u=>{(0,Be.Z)(i[u])||(a[u]=i[u])});const s={layout:{id:this.layout.id,options:a,iterations:(n=this.options)===null||n===void 0?void 0:n.iterations},nodes:this.graph.getAllNodes(),edges:this.graph.getAllEdges()},o=new Float32Array([0]),[l]=yield this.proxy.calculateLayout(s,[o]);return l})}stop(){return this.running=!1,this.proxy.stopLayout(),this}kill(){this.proxy[U8.Yy]()}isRunning(){return this.running}}var Gx=function(r,n,e,t){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(t.next(c))}catch(d){s(d)}}function l(c){try{u(t.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((t=t.apply(r,n||[])).next())})},ySe=function(r,n){var e={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&n.indexOf(t)<0&&(e[t]=r[t]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(r);i<t.length;i++)n.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(e[t[i]]=r[t[i]]);return e};class xSe{get presetOptions(){return{animation:!!oI(this.context.options,!0)}}get options(){const{options:n}=this.context;return n.layout}constructor(n){this.instances=[],this.context=n}getLayoutInstance(){return this.instances}layout(){return Gx(this,void 0,void 0,function*(){if(!this.options)return;const n=Array.isArray(this.options)?this.options:[this.options],{graph:e}=this.context;$u(e,new ku(qn.BEFORE_LAYOUT));for(const t of n){const i=n.indexOf(t),a=this.getLayoutData(t),s=Object.assign(Object.assign({},this.presetOptions),t);$u(e,new ku(qn.BEFORE_STAGE_LAYOUT,{options:s,index:i}));const o=yield this.stepLayout(a,s,i);$u(e,new ku(qn.AFTER_STAGE_LAYOUT,{options:s,index:i})),t.animation||this.updateElementPosition(o,!1)}$u(e,new ku(qn.AFTER_LAYOUT)),this.transformDataAfterLayout()})}transformDataAfterLayout(){const n=this.context.transform.getTransformInstance();Object.values(n).forEach(e=>e.afterLayout())}simulate(){return Gx(this,void 0,void 0,function*(){if(!this.options)return{};const n=Array.isArray(this.options)?this.options:[this.options];let e={};for(const t of n){const i=n.indexOf(t),a=this.getLayoutData(t);e=yield this.stepLayout(a,Object.assign(Object.assign(Object.assign({},this.presetOptions),t),{animation:!1}),i)}return e})}stepLayout(n,e,t){return Gx(this,void 0,void 0,function*(){return Vde(e)?yield this.treeLayout(n,e,t):yield this.graphLayout(n,e,t)})}graphLayout(n,e,t){return Gx(this,void 0,void 0,function*(){const{animation:i,enableWorker:a,iterations:s=300}=e,o=this.initGraphLayout(e);if(!o)return{};if(this.instances[t]=o,this.instance=o,a){const u=o;return this.supervisor=new pSe(u.graphData2LayoutModel(n),u.instance,{iterations:s}),ek(yield this.supervisor.execute())}if(XM(o))return i?yield o.execute(n,{onTick:u=>{this.updateElementPosition(u,!1)}}):(o.execute(n),o.stop(),o.tick(s));const l=yield o.execute(n);if(i){const u=this.updateElementPosition(l,i);yield u==null?void 0:u.finished}return l})}treeLayout(n,e,t){return Gx(this,void 0,void 0,function*(){const{type:i,animation:a}=e,s=Fv("layout",i);if(!s)return{};const{nodes:o=[],edges:l=[]}=n,u=new su.k({nodes:o.map(v=>({id:Ut(v),data:v.data||{}})),edges:l.map(v=>({id:Ut(v),source:v.source,target:v.target,data:v.data||{}}))});gSe(u);const c={nodes:[],edges:[]},d={nodes:[],edges:[]};u.getRoots(Hh).forEach(v=>{O_(v,T=>{T.children=u.getSuccessors(T.id)},T=>u.getSuccessors(T.id),"TB");const g=s(v,e),{x:m,y,z:w=0}=g;O_(g,T=>{const{id:G,x,y:_,z:p=0}=T;c.nodes.push({id:G,style:{x:m,y,z:w}}),d.nodes.push({id:G,style:{x,y:_,z:p}})},T=>T.children,"TB")});const f=this.inferTreeLayoutOffset(d);if(j8(d,f),a){j8(c,f),this.updateElementPosition(c,!1);const v=this.updateElementPosition(d,a);yield v==null?void 0:v.finished}return d})}inferTreeLayoutOffset(n){var e;let[t,i]=[1/0,-1/0],[a,s]=[1/0,-1/0];(e=n.nodes)===null||e===void 0||e.forEach(g=>{const{x:m=0,y=0}=g.style||{};t=Math.min(t,m),i=Math.max(i,m),a=Math.min(a,y),s=Math.max(s,y)});const{canvas:o}=this.context,l=o.getSize(),[u,c]=o.getCanvasByViewport([0,0]),[d,h]=o.getCanvasByViewport(l);if(t>=u&&i<=d&&a>=c&&s<=h)return[0,0];const f=(u+d)/2,v=(c+h)/2;return[f-(t+i)/2,v-(a+s)/2]}stopLayout(){this.instance&&XM(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(n){const{nodeFilter:e=()=>!0}=n,{nodes:t,edges:i,combos:a}=this.context.model.getData(),s=c=>this.context.element.getElement(c),o=t.filter(c=>{const d=Ut(c),h=s(d);return!h||Zb(h)?!1:e(c)}),l=new Map(o.map(c=>[Ut(c),c])),u=i.filter(c=>{const{source:d,target:h}=c;return!(!l.has(d)||!l.has(h))});return{nodes:o,edges:u,combos:a}}initGraphLayout(n){var e;const{element:t,viewport:i}=this.context,{type:a,enableWorker:s,animation:o,iterations:l}=n,u=ySe(n,["type","enableWorker","animation","iterations"]),[c,d]=i.getCanvasSize(),h=[c/2,d/2],f=(e=n==null?void 0:n.nodeSize)!==null&&e!==void 0?e:w=>{const T=t==null?void 0:t.getElement(w.id),{size:G}=(T==null?void 0:T.attributes)||{};return Math.max(...th(G))},v=Fv("layout",a);if(!v)return Gc.warn(`The layout of ${a} is not registered.`);const g=Object.getPrototypeOf(v.prototype)===l5.prototype?v:Ude(v,this.context),m=new g(this.context),y={nodeSize:f,width:c,height:d,center:h};switch(m.id){case"d3-force":case"d3-force-3d":Object.assign(y,{center:{x:c/2,y:d/2,z:0}});break;default:break}return(0,xd.Z)(m.options,y,u),m}updateElementPosition(n,e){const{model:t,element:i}=this.context;return i?(t.updateData(n),i.draw({animation:e,silence:!0})):null}destroy(){var n;this.stopLayout(),this.context={},(n=this.supervisor)===null||n===void 0||n.kill(),this.supervisor=void 0,this.instance=void 0,this.instances=[],this.animationResult=void 0}}const j8=(r,n)=>{var e;const[t,i]=n;(e=r.nodes)===null||e===void 0||e.forEach(a=>{if(a.style){const{x:s=0,y:o=0}=a.style;a.style.x=s+t,a.style.y=o+i}else a.style={x:t,y:i}})};class ESe extends cT{constructor(n){super(n),this.category="plugin",this.setPlugins(this.context.options.plugins||[])}setPlugins(n){this.setExtensions(n)}getPluginInstance(n){const e=this.extensionMap[n];if(e)return e;Gc.warn(`Cannot find the plugin ${n}, will try to find it by type.`);const t=this.extensions.find(i=>i.type===n);if(t)return this.extensionMap[t.key]}}const zw=["update-related-edges","collapse-expand-node","collapse-expand-combo","get-edge-actual-ends","arrange-draw-order"];class bSe extends cT{constructor(n){super(n),this.category="transform",this.setTransforms(this.context.options.transforms||[])}getTransforms(){}setTransforms(n){this.setExtensions([...zw.slice(0,zw.length-1),...n,zw[zw.length-1]])}getTransformInstance(n){return n?this.extensionMap[n]:this.extensionMap}}var zx=function(r,n,e,t){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(t.next(c))}catch(d){s(d)}}function l(c){try{u(t.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((t=t.apply(r,n||[])).next())})};class kSe{get padding(){return Kf(this.context.options.padding)}get paddingOffset(){const[n,e,t,i]=this.padding,[a,s,o]=[(i-e)/2,(n-t)/2,0];return[a,s,o]}constructor(n){this.landmarkCounter=0,this.context=n;const[e,t]=this.paddingOffset,{zoom:i,rotation:a,x:s=e,y:o=t}=n.options;this.transform({mode:"absolute",scale:i,translate:[s,o],rotate:a},!1)}get camera(){const{canvas:n}=this.context;return new Proxy(n.getCamera(),{get:(e,t)=>{const a=Object.entries(n.getLayers()).filter(([o])=>!["main"].includes(o)).map(([,o])=>o.getCamera()),s=e[t];if(typeof s=="function")return(...o)=>{const l=s.apply(e,o);return a.forEach(u=>{u[t].apply(u,o)}),l}}})}createLandmark(n){return this.camera.createLandmark(`landmark-${this.landmarkCounter++}`,n)}getAnimation(n){const e=oI(this.context.options,n);return e?(0,nm.Z)(Object.assign({},e),["easing","duration"]):!1}getCanvasSize(){const{canvas:n}=this.context,{width:e=0,height:t=0}=n.getConfig();return[e,t]}getCanvasCenter(){const{canvas:n}=this.context,{width:e=0,height:t=0}=n.getConfig();return[e/2,t/2,0]}getViewportCenter(){const[n,e]=this.camera.getPosition();return[n,e,0]}getGraphCenter(){return this.context.graph.getViewportByCanvas(this.getCanvasCenter())}getZoom(){return this.camera.getZoom()}getRotation(){return this.camera.getRoll()}getTranslateOptions(n){const{camera:e}=this,{mode:t,translate:i=[]}=n,a=this.getZoom(),s=e.getPosition(),o=e.getFocalPoint(),[l,u]=this.getCanvasCenter(),[c=0,d=0,h=0]=i,f=Yh([-c,-d,-h],a);return t==="relative"?{position:Ji(s,f),focalPoint:Ji(o,f)}:{position:Ji([l,u,s[2]],f),focalPoint:Ji([l,u,o[2]],f)}}getRotateOptions(n){const{mode:e,rotate:t=0}=n;return{roll:e==="relative"?this.camera.getRoll()+t:t}}getZoomOptions(n){const{zoomRange:e}=this.context.options,t=this.camera.getZoom(),{mode:i,scale:a=1}=n;return(0,O.Z)(i==="relative"?t*a:a,...e)}transform(n,e){return zx(this,void 0,void 0,function*(){const{graph:t}=this.context,{translate:i,rotate:a,scale:s,origin:o}=n;this.cancelAnimation();const l=this.getAnimation(e);if($u(t,new kw(qn.BEFORE_TRANSFORM,n)),!a&&s&&!i&&o&&!l){this.camera.setZoomByViewportPoint(this.getZoomOptions(n),o),$u(t,new kw(qn.AFTER_TRANSFORM,n));return}const u={};if(i&&Object.assign(u,this.getTranslateOptions(n)),(0,pe.Z)(a)&&Object.assign(u,this.getRotateOptions(n)),(0,pe.Z)(s)&&Object.assign(u,{zoom:this.getZoomOptions(n)}),l)return $u(t,new ph(qn.BEFORE_ANIMATE,$c.TRANSFORM,null,n)),new Promise(c=>{this.transformResolver=c,this.camera.gotoLandmark(this.createLandmark(u),Object.assign(Object.assign({},l),{onfinish:()=>{$u(t,new ph(qn.AFTER_ANIMATE,$c.TRANSFORM,null,n)),$u(t,new kw(qn.AFTER_TRANSFORM,n)),this.transformResolver=void 0,c()}}))});this.camera.gotoLandmark(this.createLandmark(u),{duration:0}),$u(t,new kw(qn.AFTER_TRANSFORM,n))})}fitView(n,e){return zx(this,void 0,void 0,function*(){const[t,i,a,s]=this.padding,{when:o="always",direction:l="both"}=n||{},[u,c]=this.context.canvas.getSize(),d=u-s-i,h=c-t-a,f=this.context.canvas.getBounds(),v=this.getBBoxInViewport(f),[g,m]=yg(v),y=l==="x"&&g>=d||l==="y"&&m>=h||l==="both"&&g>=d&&m>=h;if(o==="overflow"&&!y)return yield this.fitCenter(e);const w=d/g,T=h/m,G=l==="x"?w:l==="y"?T:Math.min(w,T),x=this.getAnimation(e);yield this.transform({mode:"relative",scale:G,translate:Ji(Cs(this.getCanvasCenter(),this.getBBoxInViewport(f).center),Yh(this.paddingOffset,G))},x)})}fitCenter(n){return zx(this,void 0,void 0,function*(){const e=this.context.canvas.getBounds();yield this.focus(e,n)})}focusElements(n,e){return zx(this,void 0,void 0,function*(){const{element:t}=this.context;if(!t)return;const i=cy(n.map(a=>t.getElement(a).getRenderBounds()));yield this.focus(i,e)})}focus(n,e){return zx(this,void 0,void 0,function*(){const t=this.context.graph.getViewportByCanvas(n.center),i=this.getCanvasCenter(),a=Cs(i,t);yield this.transform({mode:"relative",translate:Ji(a,this.paddingOffset)},e)})}getBBoxInViewport(n){const{min:e,max:t}=n,{graph:i}=this.context,[a,s]=i.getViewportByCanvas(e),[o,l]=i.getViewportByCanvas(t),u=new hl;return u.setMinMax([a,s,0],[o,l,0]),u}isInViewport(n,e=!1,t=0){const{graph:i}=this.context,a=this.getCanvasSize(),[s,o]=i.getCanvasByViewport([0,0]),[l,u]=i.getCanvasByViewport(a);let c=new hl;return c.setMinMax([s,o,0],[l,u,0]),t&&(c=Eg(c,t)),cp(n)?Wh(n,c):e?EJ(n,c):c.intersects(n)}cancelAnimation(){var n,e;!((n=this.camera.landmarks)===null||n===void 0)&&n.length&&this.camera.cancelLandmarkAnimation(),(e=this.transformResolver)===null||e===void 0||e.call(this)}}var Fs=function(r,n,e,t){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{u(t.next(c))}catch(d){s(d)}}function l(c){try{u(t.throw(c))}catch(d){s(d)}}function u(c){c.done?a(c.value):i(c.value).then(o,l)}u((t=t.apply(r,n||[])).next())})};class eO extends eP.Z{constructor(n){super(),this.destroyed=!1,this.context={model:new _Se},this.isCollapsingExpanding=!1,this.onResize=(0,rx.Z)(()=>{this.resize()},300),this.options=Object.assign({},eO.defaultOptions,n),this._setOptions(this.options,!0),this.context.graph=this,this.options.autoResize&&window.addEventListener("resize",this.onResize)}getOptions(){return this.options}setOptions(n){this._setOptions(n,!1)}_setOptions(n,e){if(this.updateCanvas(n),e){const{data:h}=n;h&&this.addData(h);return}Object.assign(this.options,n);const{behaviors:t,combo:i,data:a,edge:s,layout:o,node:l,plugins:u,theme:c,transforms:d}=n;t&&this.setBehaviors(t),a&&this.setData(a),l&&this.setNode(l),s&&this.setEdge(s),i&&this.setCombo(i),o&&this.setLayout(o),c&&this.setTheme(c),u&&this.setPlugins(u),d&&this.setTransforms(d)}getSize(){return this.context.canvas?this.context.canvas.getSize():[this.options.width||0,this.options.height||0]}setSize(n,e){var t;Object.assign(this.options,{width:n,height:e}),(t=this.context.canvas)===null||t===void 0||t.resize(n,e)}setZoomRange(n){this.options.zoomRange=n}getZoomRange(){return this.options.zoomRange}setNode(n){this.options.node=n,this.context.model.refreshData()}setEdge(n){this.options.edge=n,this.context.model.refreshData()}setCombo(n){this.options.combo=n,this.context.model.refreshData()}getTheme(){return this.options.theme}setTheme(n){this.options.theme=(0,Be.Z)(n)?n(this.getTheme()):n}setLayout(n){this.options.layout=(0,Be.Z)(n)?n(this.getLayout()):n}getLayout(){return this.options.layout}setBehaviors(n){var e;this.options.behaviors=(0,Be.Z)(n)?n(this.getBehaviors()):n,(e=this.context.behavior)===null||e===void 0||e.setBehaviors(this.options.behaviors)}updateBehavior(n){this.setBehaviors(e=>e.map(t=>typeof t=="object"&&t.key===n.key?Object.assign(Object.assign({},t),n):t))}getBehaviors(){return this.options.behaviors||[]}setPlugins(n){var e;this.options.plugins=(0,Be.Z)(n)?n(this.getPlugins()):n,(e=this.context.plugin)===null||e===void 0||e.setPlugins(this.options.plugins)}updatePlugin(n){this.setPlugins(e=>e.map(t=>typeof t=="object"&&t.key===n.key?Object.assign(Object.assign({},t),n):t))}getPlugins(){return this.options.plugins||[]}getPluginInstance(n){return this.context.plugin.getPluginInstance(n)}setTransforms(n){var e;this.options.transforms=(0,Be.Z)(n)?n(this.getTransforms()):n,(e=this.context.transform)===null||e===void 0||e.setTransforms(this.options.transforms)}updateTransform(n){this.setTransforms(e=>e.map(t=>typeof t=="object"&&t.key===n.key?Object.assign(Object.assign({},t),n):t)),this.context.model.refreshData()}getTransforms(){return this.options.transforms||[]}getData(){return this.context.model.getData()}getElementData(n){return Array.isArray(n)?n.map(e=>this.context.model.getElementDataById(e)):this.context.model.getElementDataById(n)}getNodeData(n){var e;return n===void 0?this.context.model.getNodeData():Array.isArray(n)?this.context.model.getNodeData(n):(e=this.context.model.getNodeData([n]))===null||e===void 0?void 0:e[0]}getEdgeData(n){var e;return n===void 0?this.context.model.getEdgeData():Array.isArray(n)?this.context.model.getEdgeData(n):(e=this.context.model.getEdgeData([n]))===null||e===void 0?void 0:e[0]}getComboData(n){var e;return n===void 0?this.context.model.getComboData():Array.isArray(n)?this.context.model.getComboData(n):(e=this.context.model.getComboData([n]))===null||e===void 0?void 0:e[0]}setData(n){this.context.model.setData((0,Be.Z)(n)?n(this.getData()):n)}addData(n){this.context.model.addData((0,Be.Z)(n)?n(this.getData()):n)}addNodeData(n){this.context.model.addNodeData((0,Be.Z)(n)?n(this.getNodeData()):n)}addEdgeData(n){this.context.model.addEdgeData((0,Be.Z)(n)?n(this.getEdgeData()):n)}addComboData(n){this.context.model.addComboData((0,Be.Z)(n)?n(this.getComboData()):n)}addChildrenData(n,e){this.context.model.addChildrenData(n,e)}updateData(n){this.context.model.updateData((0,Be.Z)(n)?n(this.getData()):n)}updateNodeData(n){this.context.model.updateNodeData((0,Be.Z)(n)?n(this.getNodeData()):n)}updateEdgeData(n){this.context.model.updateEdgeData((0,Be.Z)(n)?n(this.getEdgeData()):n)}updateComboData(n){this.context.model.updateComboData((0,Be.Z)(n)?n(this.getComboData()):n)}removeData(n){this.context.model.removeData((0,Be.Z)(n)?n(this.getData()):n)}removeNodeData(n){this.context.model.removeNodeData((0,Be.Z)(n)?n(this.getNodeData()):n)}removeEdgeData(n){this.context.model.removeEdgeData((0,Be.Z)(n)?n(this.getEdgeData()):n)}removeComboData(n){this.context.model.removeComboData((0,Be.Z)(n)?n(this.getComboData()):n)}getElementType(n){return this.context.model.getElementType(n)}getRelatedEdgesData(n,e="both"){return this.context.model.getRelatedEdgesData(n,e)}getNeighborNodesData(n){return this.context.model.getNeighborNodesData(n)}getAncestorsData(n,e){return this.context.model.getAncestorsData(n,e)}getParentData(n,e){return this.context.model.getParentData(n,e)}getChildrenData(n){return this.context.model.getChildrenData(n)}getDescendantsData(n){return this.context.model.getDescendantsData(n)}getElementDataByState(n,e){return this.context.model.getElementDataByState(n,e)}initCanvas(){return Fs(this,void 0,void 0,function*(){var n;if(this.context.canvas)return yield this.context.canvas.ready;const{container:e="container",width:t,height:i,renderer:a,cursor:s,background:o,devicePixelRatio:l=(n=window.devicePixelRatio)!==null&&n!==void 0?n:1}=this.options;if(e instanceof G8)this.context.canvas=e,s&&e.setCursor(s),a&&e.setRenderer(a),yield e.ready;else{const u=(0,Ze.Z)(e)?document.getElementById(e):e,c=gB(u);this.emit(qn.BEFORE_CANVAS_INIT,{container:u,width:t,height:i});const d=new G8({container:u,width:t||c[0],height:i||c[1],background:o,renderer:a,cursor:s,devicePixelRatio:l});this.context.canvas=d,yield d.ready,this.emit(qn.AFTER_CANVAS_INIT,{canvas:d})}})}updateCanvas(n){var e,t;const{renderer:i,cursor:a,height:s,width:o}=n,l=this.context.canvas;l&&(i&&(this.emit(qn.BEFORE_RENDERER_CHANGE,{renderer:this.options.renderer}),l.setRenderer(i),this.emit(qn.AFTER_RENDERER_CHANGE,{renderer:i})),a&&l.setCursor(a),((0,pe.Z)(o)||(0,pe.Z)(s))&&this.setSize((e=o!=null?o:this.options.width)!==null&&e!==void 0?e:0,(t=s!=null?s:this.options.height)!==null&&t!==void 0?t:0))}initRuntime(){this.context.options=this.options,this.context.batch||(this.context.batch=new fEe(this.context)),this.context.plugin||(this.context.plugin=new ESe(this.context)),this.context.viewport||(this.context.viewport=new kSe(this.context)),this.context.transform||(this.context.transform=new bSe(this.context)),this.context.element||(this.context.element=new mSe(this.context)),this.context.animation||(this.context.animation=new hEe(this.context)),this.context.layout||(this.context.layout=new xSe(this.context)),this.context.behavior||(this.context.behavior=new vEe(this.context))}prepare(){return Fs(this,void 0,void 0,function*(){if(yield Promise.resolve(),this.destroyed)throw new Error(Bv("The graph instance has been destroyed"));yield this.initCanvas(),this.initRuntime()})}render(){return Fs(this,void 0,void 0,function*(){yield this.prepare(),$u(this,new ku(qn.BEFORE_RENDER));const n=this.context.element.draw({type:"render"});yield Promise.all([n==null?void 0:n.finished,this.context.layout.layout()]),yield this.autoFit(),$u(this,new ku(qn.AFTER_RENDER))})}draw(){return Fs(this,void 0,void 0,function*(){var n;yield this.prepare(),yield(n=this.context.element.draw())===null||n===void 0?void 0:n.finished})}layout(){return Fs(this,void 0,void 0,function*(){yield this.context.layout.layout()})}stopLayout(){this.context.layout.stopLayout()}clear(){return Fs(this,void 0,void 0,function*(){this.context.model.setData({}),yield this.draw()})}destroy(){$u(this,new ku(qn.BEFORE_DESTROY));const{layout:n,animation:e,element:t,model:i,canvas:a,behavior:s,plugin:o}=this.context;o==null||o.destroy(),s==null||s.destroy(),n==null||n.destroy(),e==null||e.destroy(),t==null||t.destroy(),i.destroy(),a==null||a.destroy(),this.options={},this.context={},this.off(),window.removeEventListener("resize",this.onResize),this.destroyed=!0,$u(this,new ku(qn.AFTER_DESTROY))}getCanvas(){return this.context.canvas}resize(n,e){const t=!n||!e?gB(this.context.canvas.getContainer()):[n,e];(0,Ml.Z)(t,this.getSize())||($u(this,new ku(qn.BEFORE_SIZE_CHANGE,{size:t})),this.context.canvas.resize(...t),$u(this,new ku(qn.AFTER_SIZE_CHANGE,{size:t})))}fitView(n,e){return Fs(this,void 0,void 0,function*(){var t;yield(t=this.context.viewport)===null||t===void 0?void 0:t.fitView(n,e)})}fitCenter(n){return Fs(this,void 0,void 0,function*(){var e;yield(e=this.context.viewport)===null||e===void 0?void 0:e.fitCenter(n)})}autoFit(){return Fs(this,void 0,void 0,function*(){const{autoFit:n}=this.context.options;if(n)if((0,Ze.Z)(n))n==="view"?yield this.fitView():n==="center"&&(yield this.fitCenter());else{const{type:e,animation:t}=n;e==="view"?yield this.fitView(n.options,t):e==="center"&&(yield this.fitCenter(t))}})}focusElement(n,e){return Fs(this,void 0,void 0,function*(){var t;yield(t=this.context.viewport)===null||t===void 0?void 0:t.focusElements(Array.isArray(n)?n:[n],e)})}zoomBy(n,e,t){return Fs(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"relative",scale:n,origin:t},e)})}zoomTo(n,e,t){return Fs(this,void 0,void 0,function*(){this.context.viewport.transform({mode:"absolute",scale:n,origin:t},e)})}getZoom(){return this.context.viewport.getZoom()}rotateBy(n,e,t){return Fs(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"relative",rotate:n,origin:t},e)})}rotateTo(n,e,t){return Fs(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"absolute",rotate:n,origin:t},e)})}getRotation(){return this.context.viewport.getRotation()}translateBy(n,e){return Fs(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"relative",translate:n},e)})}translateTo(n,e){return Fs(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"absolute",translate:n},e)})}getPosition(){return Cs([0,0],this.getCanvasByViewport([0,0]))}translateElementBy(n,e){return Fs(this,arguments,void 0,function*(t,i,a=!0){var s,o;const[l,u]=(0,Gs.Z)(t)?[t,(s=i)!==null&&s!==void 0?s:!0]:[{[t]:i},a];Object.entries(l).forEach(([c,d])=>this.context.model.translateNodeLikeBy(c,d)),yield(o=this.context.element.draw({animation:u,stage:"translate"}))===null||o===void 0?void 0:o.finished})}translateElementTo(n,e){return Fs(this,arguments,void 0,function*(t,i,a=!0){var s,o;const[l,u]=(0,Gs.Z)(t)?[t,(s=i)!==null&&s!==void 0?s:!0]:[{[t]:i},a];Object.entries(l).forEach(([c,d])=>this.context.model.translateNodeLikeTo(c,d)),yield(o=this.context.element.draw({animation:u,stage:"translate"}))===null||o===void 0?void 0:o.finished})}getElementPosition(n){return this.context.model.getElementPosition(n)}getElementRenderStyle(n){return(0,QM.Z)(this.context.element.getElement(n).attributes,["context"])}setElementVisibility(n,e){return Fs(this,arguments,void 0,function*(t,i,a=!0){var s,o;const[l,u]=(0,Gs.Z)(t)?[t,(s=i)!==null&&s!==void 0?s:!0]:[{[t]:i},a],c={nodes:[],edges:[],combos:[]};Object.entries(l).forEach(([f,v])=>{const g=this.getElementType(f);c[`${g}s`].push({id:f,style:{visibility:v}})});const{model:d,element:h}=this.context;d.preventUpdateNodeLikeHierarchy(()=>{d.updateData(c)}),yield(o=h.draw({animation:u,stage:"visibility"}))===null||o===void 0?void 0:o.finished})}showElement(n,e){return Fs(this,void 0,void 0,function*(){const t=Array.isArray(n)?n:[n];yield this.setElementVisibility(Object.fromEntries(t.map(i=>[i,"visible"])),e)})}hideElement(n,e){return Fs(this,void 0,void 0,function*(){const t=Array.isArray(n)?n:[n];yield this.setElementVisibility(Object.fromEntries(t.map(i=>[i,"hidden"])),e)})}getElementVisibility(n){var e,t;const i=this.context.element.getElement(n);return(t=(e=i==null?void 0:i.style)===null||e===void 0?void 0:e.visibility)!==null&&t!==void 0?t:"visible"}setElementZIndex(n,e){return Fs(this,void 0,void 0,function*(){var t;const i={nodes:[],edges:[],combos:[]},a=(0,Gs.Z)(n)?n:{[n]:e};Object.entries(a).forEach(([l,u])=>{const c=this.getElementType(l);i[`${c}s`].push({id:l,style:{zIndex:u}})});const{model:s,element:o}=this.context;s.preventUpdateNodeLikeHierarchy(()=>s.updateData(i)),yield(t=o.draw({animation:!1,stage:"zIndex"}))===null||t===void 0?void 0:t.finished})}frontElement(n){return Fs(this,void 0,void 0,function*(){const e=Array.isArray(n)?n:[n],{model:t,element:i}=this.context,a={};e.map(s=>{const o=i.getFrontZIndex(s);if(t.getElementType(s)==="combo"){const u=t.getAncestorsData(s,Ls).at(-1)||this.getComboData(s),c=[u,...t.getDescendantsData(Ut(u))],d=o-i.getElementZIndex(s);c.forEach(f=>{a[Ut(f)]=this.getElementZIndex(Ut(f))+d});const{internal:h}=PM(c.map(Ut),f=>t.getRelatedEdgesData(f));h.forEach(f=>{const v=Ut(f);a[v]=this.getElementZIndex(v)+d})}else a[s]=o}),yield this.setElementZIndex(a)})}getElementZIndex(n){var e,t,i;const{model:a,element:s}=this.context;return(i=(t=(e=a.getElementDataById(n))===null||e===void 0?void 0:e.style)===null||t===void 0?void 0:t.zIndex)!==null&&i!==void 0?i:s.getElementZIndex(n)}setElementState(n,e){return Fs(this,arguments,void 0,function*(t,i,a=!0){var s,o;const[l,u]=(0,Gs.Z)(t)?[t,(s=i)!==null&&s!==void 0?s:!0]:[{[t]:i},a],c=h=>h?Array.isArray(h)?h:[h]:[],d={nodes:[],edges:[],combos:[]};Object.entries(l).forEach(([h,f])=>{const v=this.getElementType(h);d[`${v}s`].push({id:h,states:c(f)})}),this.updateData(d),yield(o=this.context.element.draw({animation:u}))===null||o===void 0?void 0:o.finished})}getElementState(n){return this.context.model.getElementState(n)}getElementRenderBounds(n){return this.context.element.getElement(n).getRenderBounds()}collapseElement(n){return Fs(this,arguments,void 0,function*(e,t=!0){const{model:i,element:a}=this.context;if(Ed(i.getNodeLikeData([e])[0])||this.isCollapsingExpanding)return;const s=i.getElementType(e);yield this.frontElement(e),this.isCollapsingExpanding=!0,this.setElementCollapsibility(e,!0),s==="node"?yield a.collapseNode(e,t):s==="combo"&&(yield a.collapseCombo(e,t)),this.isCollapsingExpanding=!1})}expandElement(n){return Fs(this,arguments,void 0,function*(e,t=!0){const{model:i,element:a}=this.context;if(!Ed(i.getNodeLikeData([e])[0])||this.isCollapsingExpanding)return;const s=i.getElementType(e);this.isCollapsingExpanding=!0,this.setElementCollapsibility(e,!1),s==="node"?yield a.expandNode(e,t):s==="combo"&&(yield a.expandCombo(e,t)),this.isCollapsingExpanding=!1})}setElementCollapsibility(n,e){const t=this.getElementType(n);t==="node"?this.updateNodeData([{id:n,style:{collapsed:e}}]):t==="combo"&&this.updateComboData([{id:n,style:{collapsed:e}}])}toDataURL(){return Fs(this,arguments,void 0,function*(n={}){return this.context.canvas.toDataURL(n)})}getCanvasByViewport(n){return this.context.canvas.getCanvasByViewport(n)}getViewportByCanvas(n){return this.context.canvas.getViewportByCanvas(n)}getClientByCanvas(n){return this.context.canvas.getClientByCanvas(n)}getCanvasByClient(n){return this.context.canvas.getCanvasByClient(n)}getViewportCenter(){return this.context.viewport.getViewportCenter()}getCanvasCenter(){return this.context.viewport.getCanvasCenter()}on(n,e,t){return super.on(n,e,t)}once(n,e){return super.once(n,e)}off(n,e){return super.off(n,e)}}eO.defaultOptions={autoResize:!1,theme:"light",rotation:0,zoom:1,zoomRange:[.01,10]};var wSe=function(r,n){var e={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&n.indexOf(t)<0&&(e[t]=r[t]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(r);i<t.length;i++)n.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(r,t[i])&&(e[t[i]]=r[t[i]]);return e};function SSe(r,n){const{getNodeData:e=(o,l)=>{if(o.depth=l,!o.children)return o;const{children:u}=o,c=wSe(o,["children"]);return Object.assign(Object.assign({},c),{children:u.map(d=>d.id)})},getEdgeData:t=(o,l)=>({source:o.id,target:l.id}),getChildren:i=o=>o.children||[]}=n||{},a=[],s=[];return O_(r,(o,l)=>{a.push(e(o,l));const u=i(o);for(const c of u)s.push(t(o,c))},o=>i(o),"TB"),{nodes:a,edges:s}}class TSe extends Hg{beforeDraw(n){const{add:e,update:t}=n,{model:i}=this.context;return[...e.edges.entries(),...t.edges.entries()].forEach(([,a])=>{H8(i,a)}),n}}const H8=(r,n)=>{const{source:e,target:t}=n,i=r.getElementDataById(e),a=r.getElementDataById(t),s=X4(i,d=>r.getParentData(d,Ls)),o=X4(a,d=>r.getParentData(d,Ls)),l=Ut(s),u=Ut(o),c={sourceNode:l,targetNode:u};return n.style?Object.assign(n.style,c):n.style=c,n},CSe=(r,n,e)=>{const[t,i]=n,[a,s]=e;if(i===t)return a;const o=(r-t)/(i-t);return a+o*(s-a)},MSe=(r,n,e)=>{const[t,i]=n,[a,s]=e,o=Math.log(r-t+1)/Math.log(i-t+1);return a+o*(s-a)},PSe=(r,n,e,t=2)=>{const[i,a]=n,[s,o]=e,l=Math.pow((r-i)/(a-i),t);return s+l*(o-s)},NSe=(r,n,e)=>{const[t,i]=n,[a,s]=e,o=Math.sqrt((r-t)/(i-t));return a+o*(s-a)};class Vw extends Hg{constructor(n,e){super(n,(0,xd.Z)({},Vw.defaultOptions,e)),this.assignSizeByCentrality=(t,i,a,s,o,l)=>{const u=[i,a],c=[s[0],o[0]],d=[s[1],o[1]],h=[s[2],o[2]],f=(v,g)=>{if(typeof l=="function")return l(v,u,g);switch(l){case"linear":return CSe(v,u,g);case"log":return MSe(v,u,g);case"pow":return PSe(v,u,g,2);case"sqrt":return NSe(v,u,g);default:return g[0]}};return[f(t,c),f(t,d),f(t,h)]}}beforeDraw(n){const{model:e}=this.context,t=e.getNodeData(),i=th(this.options.maxSize),a=th(this.options.minSize),s=this.getCentralities(this.options.centrality),o=s.size>0?Math.max(...s.values()):0,l=s.size>0?Math.min(...s.values()):0;return t.forEach(u=>{var c;const d=this.assignSizeByCentrality(s.get(Ut(u))||0,l,o,a,i,this.options.scale),h=(c=this.context.element)===null||c===void 0?void 0:c.getElement(Ut(u)),f={size:d};this.assignLabelStyle(f,d,u,h),(!h||!Ew(f,h.attributes))&&Rd(n,h?"update":"add","node",(0,xd.Z)(u,{style:f}),!0)}),n}assignLabelStyle(n,e,t,i){var a;const s=i?i.config.style:(a=this.context.element)===null||a===void 0?void 0:a.getElementComputedStyle("node",t);if(Object.assign(n,(0,nm.Z)(s,["labelFontSize","labelLineHeight"])),this.options.mapLabelSize){const o=this.getLabelSizeByNodeSize(e,1/0,Number(n.labelFontSize));Object.assign(n,{labelFontSize:o,labelLineHeight:o+xJ(n.labelPadding)})}return n}getLabelSizeByNodeSize(n,e,t){const i=Math.min(...n)/2,[a,s]=Array.isArray(this.options.mapLabelSize)?this.options.mapLabelSize:[t,e];return Math.min(s,Math.max(i,a))}getCentralities(n){const{model:e}=this.context,t=e.getData();if(typeof n=="function")return n(t);const i=e.getRelatedEdgesData.bind(e);return gI(t,i,n)}}Vw.defaultOptions={centrality:{type:"degree"},maxSize:80,minSize:20,scale:"linear",mapLabelSize:!1};class Uw extends Hg{constructor(n,e){super(n,Object.assign({},Uw.defaultOptions,e))}get ref(){return this.context.model.getRootsData()[0]}afterLayout(){var n;const e=Iu(this.ref),{graph:t,model:i}=this.context;(n=i.getData().nodes)===null||n===void 0||n.forEach(s=>{if(Ut(s)===Ut(this.ref))return;const o=pI(Cs(Iu(s),e)),l=Math.abs(o)>Math.PI/2,u=s.transformd||!s.children||s.children.length===0,c=th(t.getElementRenderStyle(Ut(s)).size)[0]/2,d=(u?1:-1)*(c+this.options.offset),h=[["translate",d*Math.cos(o),d*Math.sin(o)],["rotate",l?Rc(o)+180:Rc(o)]];i.updateNodeData([{id:Ut(s),style:{labelTextAlign:l===u?"right":"left",labelTextBaseline:"middle",labelTransform:h}}])}),t.draw()}}Uw.defaultOptions={offset:5};const OSe="quadratic",W8=["top","top-right","right","right-bottom","bottom","bottom-left","left","left-top"];class jw extends Hg{constructor(n,e){super(n,Object.assign({},jw.defaultOptions,e)),this.cacheMergeStyle=new Map,this.getAffectedParallelEdges=t=>{const{add:{edges:i},update:{nodes:a,edges:s,combos:o},remove:{edges:l}}=t,{model:u}=this.context,c=new Map,d=(v,g)=>{u.getRelatedEdgesData(g).forEach(y=>!c.has(Ut(y))&&c.set(Ut(y),y))};a.forEach(d),o.forEach(d);const h=v=>{const g=u.getEdgeData().map(y=>H8(u,y));RSe(v,g,!0).forEach(y=>!c.has(Ut(y))&&c.set(Ut(y),y))};if(l.size&&l.forEach(h),i.size&&i.forEach(h),s.size){const v=bB(tP(u.getChanges())).update.edges;s.forEach(g=>{var m;h(g);const y=(m=v.find(w=>Ut(w.value)===Ut(g)))===null||m===void 0?void 0:m.original;y&&!tO(g,y)&&h(y)})}(0,my.Z)(this.options.edges)||c.forEach((v,g)=>!this.options.edges.includes(g)&&c.delete(g));const f=u.getEdgeData().map(Ut);return new Map([...c].sort((v,g)=>f.indexOf(v[0])-f.indexOf(g[0])))},this.applyBundlingStyle=(t,i,a)=>{const{edgeMap:s,reverses:o}=Y8(i);s.forEach(l=>{l.forEach((u,c,d)=>{var h;const f=d.length,v=u.style||{};if(u.source===u.target){const y=W8.length;v.loopPlacement=W8[c%y],v.loopDist=Math.floor(c/y)*a+50}else if(f===1)v.curveOffset=0;else{const y=(c%2===0?1:-1)*(o[`${u.source}|${u.target}|${c}`]?-1:1);v.curveOffset=f%2===1?y*Math.ceil(c/2)*a*2:y*(Math.floor(c/2)*a*2+a)}const g=Object.assign(u,{type:OSe,style:v}),m=(h=this.context.element)===null||h===void 0?void 0:h.getElement(Ut(u));(!m||!Ew(g.style,m.attributes))&&Rd(t,m?"update":"add","edge",g,!0)})})},this.resetEdgeStyle=t=>{const i=t.style||{},a=this.cacheMergeStyle.get(Ut(t))||{};return Object.keys(a).forEach(s=>{(0,Ml.Z)(i[s],a[s])&&(t[s]?i[s]=t[s]:delete i[s])}),Object.assign(t,{style:i})},this.applyMergingStyle=(t,i)=>{const{edgeMap:a,reverses:s}=Y8(i);a.forEach(o=>{var l;if(o.length===1){const c=o[0],d=(l=this.context.element)===null||l===void 0?void 0:l.getElement(Ut(c)),h=this.resetEdgeStyle(c);(!d||!Ew(h,d.attributes))&&Rd(t,d?"update":"add","edge",h);return}const u=o.map(({source:c,target:d,style:h={}},f)=>{const{startArrow:v,endArrow:g}=h,m={},[y,w]=s[`${c}|${d}|${f}`]?["endArrow","startArrow"]:["startArrow","endArrow"];return(0,je.Z)(v)&&(m[y]=v),(0,je.Z)(g)&&(m[w]=g),m}).reduce((c,d)=>Object.assign(Object.assign({},c),d),{});o.forEach((c,d,h)=>{var f;if(d!==0){Rd(t,"remove","edge",c);return}const v=Object.assign({},(0,Be.Z)(this.options.style)?this.options.style(h):this.options.style,{childrenData:h});this.cacheMergeStyle.set(Ut(c),v);const g=Object.assign(Object.assign({},c),{type:"line",style:Object.assign(Object.assign(Object.assign({},c.style),u),v)}),m=(f=this.context.element)===null||f===void 0?void 0:f.getElement(Ut(c));(!m||!Ew(g.style,m.attributes))&&Rd(t,m?"update":"add","edge",g,!0)})})}}beforeDraw(n){const e=this.getAffectedParallelEdges(n);return e.size===0||(this.options.mode==="bundle"?this.applyBundlingStyle(n,e,this.options.distance):this.applyMergingStyle(n,e)),n}}jw.defaultOptions={mode:"bundle",distance:15};const Y8=r=>{const n=new Map,e=new Set,t={};for(const[i,a]of r){if(e.has(i))continue;const{source:s,target:o}=a,l=`${s}-${o}`;n.has(l)||n.set(l,[]),n.get(l).push(a),e.add(i);for(const[u,c]of r)e.has(u)||tO(a,c)&&(n.get(l).push(c),e.add(u),s===c.target&&o===c.source&&(t[`${c.source}|${c.target}|${n.get(l).length-1}`]=!0))}return{edgeMap:n,reverses:t}},RSe=(r,n,e)=>n.filter(t=>(e||Ut(t)!==Ut(r))&&tO(t,r)),tO=(r,n)=>{const{sourceNode:e,targetNode:t}=r.style||{},{sourceNode:i,targetNode:a}=n.style||{};return e===i&&t===a||e===a&&t===i};class ASe extends Hg{beforeDraw(n,e){const{stage:t}=e;if(t==="visibility")return n;const{model:i}=this.context,{update:{nodes:a,edges:s,combos:o}}=n,l=(u,c)=>{i.getRelatedEdgesData(c).forEach(h=>!s.has(Ut(h))&&s.set(Ut(h),h))};return a.forEach(l),o.forEach(l),n}}const LSe={animation:{"combo-collapse":dI,"combo-expand":mJ,"node-collapse":uI,"node-expand":gJ,"path-in":cI,"path-out":_J,fade:fJ,translate:vJ},behavior:{"brush-select":gy,"click-select":PE,"collapse-expand":Xb,"create-edge":Qb,"drag-canvas":qb,"drag-element-force":Hde,"drag-element":ix,"fix-element-size":tk,"focus-element":nk,"hover-activate":rk,"lasso-select":Yde,"auto-adapt-label":kE,"optimize-viewport-transform":ik,"scroll-canvas":ak,"zoom-canvas":sk},combo:{circle:Zce,rect:Xce},edge:{cubic:rm,line:Hb,polyline:Wb,quadratic:Yb,"cubic-horizontal":Vb,"cubic-radial":Ub,"cubic-vertical":jb},layout:{"antv-dagre":Lfe,"combo-combined":ive,"compact-box":ok.compactBox,"force-atlas2":mve,circular:Ffe,concentric:HM,"d3-force":fve,dagre:uk,dendrogram:ok.dendrogram,force:rB,fruchterman:xve,grid:bve,indented:ok.indented,mds:uB,mindmap:ok.mindmap,radial:Ove,random:Bve},node:{circle:R_,diamond:uQ,ellipse:LE,hexagon:vQ,html:Fb,image:Bb,rect:Wce,star:Yce,donut:RE,triangle:$b},palette:{spectral:$ve,tableau:Gve,oranges:zve,greens:Vve,blues:Uve},theme:{dark:rEe,light:iEe},plugin:{"bubble-sets":fk,"edge-bundling":gk,"edge-filter-lens":_k,"grid-line":yk,background:hk,contextmenu:vk,fisheye:mk,fullscreen:pk,history:xk,hull:Ek,legend:ow,minimap:lw,snapline:uw,timebar:mw,toolbar:pw,tooltip:yw,watermark:xw},transform:{"arrange-draw-order":aEe,"collapse-expand-combo":sEe,"collapse-expand-node":oEe,"get-edge-actual-ends":TSe,"map-node-size":Vw,"place-radial-labels":Uw,"process-parallel-edges":jw,"update-related-edges":ASe},shape:{circle:W0,ellipse:x2,group:Y0,html:E2,image:xT,line:I1,path:gg,polygon:D1,polyline:OA,rect:zf,text:Z0,label:Sg,badge:fp}};function ISe(){Object.entries(LSe).forEach(([r,n])=>{Object.entries(n).forEach(([e,t])=>{lEe(r,e,t)})})}ISe();const hIe={css:"//at.alicdn.com/t/a/font_470089_8hnbbf8n4u8.css",js:"//at.alicdn.com/t/a/font_470089_8hnbbf8n4u8.js"};var DSe=Object.defineProperty,Z8=Object.getOwnPropertySymbols,FSe=Object.prototype.hasOwnProperty,BSe=Object.prototype.propertyIsEnumerable,X8=(r,n,e)=>n in r?DSe(r,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[n]=e,$Se=(r,n)=>{for(var e in n||(n={}))FSe.call(n,e)&&X8(r,e,n[e]);if(Z8)for(var e of Z8(n))BSe.call(n,e)&&X8(r,e,n[e]);return r};const fIe=r=>React.createElement("svg",$Se({width:12,height:8,xmlns:"http://www.w3.org/2000/svg"},r),React.createElement("title",null,"\u7F16\u7EC4 10"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"m.565 4.503 3.488 3.284c.217.204.533.26.814.154a.708.708 0 0 0 .463-.652V.72a.708.708 0 0 0-.463-.652.807.807 0 0 0-.288-.056.737.737 0 0 0-.526.21L.565 3.506a.692.692 0 0 0-.217.499.655.655 0 0 0 .217.498Z",fill:"#462BB1"}),React.createElement("path",{d:"m7.232 4.503 3.488 3.284c.217.204.533.26.814.154a.708.708 0 0 0 .463-.652V.72a.708.708 0 0 0-.463-.652.807.807 0 0 0-.288-.056.737.737 0 0 0-.526.21L7.232 3.506a.692.692 0 0 0-.218.499.655.655 0 0 0 .218.498Z",fill:"#A395D9"})));var GSe="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsLXJ1bGU9Im5vbnplcm8iIGZpbGw9Im5vbmUiPjxwYXRoIGQ9Im0uNTY1IDQuNTAzIDMuNDg4IDMuMjg0Yy4yMTcuMjA0LjUzMy4yNi44MTQuMTU0YS43MDguNzA4IDAgMCAwIC40NjMtLjY1MlYuNzJhLjcwOC43MDggMCAwIDAtLjQ2My0uNjUyLjgwNy44MDcgMCAwIDAtLjI4OC0uMDU2LjczNy43MzcgMCAwIDAtLjUyNi4yMUwuNTY1IDMuNTA2YS42OTIuNjkyIDAgMCAwLS4yMTcuNDk5LjY1NS42NTUgMCAwIDAgLjIxNy40OThaIiBmaWxsPSIjNDYyQkIxIi8+PHBhdGggZD0ibTcuMjMyIDQuNTAzIDMuNDg4IDMuMjg0Yy4yMTcuMjA0LjUzMy4yNi44MTQuMTU0YS43MDguNzA4IDAgMCAwIC40NjMtLjY1MlYuNzJhLjcwOC43MDggMCAwIDAtLjQ2My0uNjUyLjgwNy44MDcgMCAwIDAtLjI4OC0uMDU2LjczNy43MzcgMCAwIDAtLjUyNi4yMUw3LjIzMiAzLjUwNmEuNjkyLjY5MiAwIDAgMC0uMjE4LjQ5OS42NTUuNjU1IDAgMCAwIC4yMTguNDk4WiIgZmlsbD0iI0EzOTVEOSIvPjwvZz48L3N2Zz4=",zSe=Object.defineProperty,K8=Object.getOwnPropertySymbols,VSe=Object.prototype.hasOwnProperty,USe=Object.prototype.propertyIsEnumerable,J8=(r,n,e)=>n in r?zSe(r,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[n]=e,jSe=(r,n)=>{for(var e in n||(n={}))VSe.call(n,e)&&J8(r,e,n[e]);if(K8)for(var e of K8(n))USe.call(n,e)&&J8(r,e,n[e]);return r};const vIe=r=>React.createElement("svg",jSe({width:12,height:8,xmlns:"http://www.w3.org/2000/svg"},r),React.createElement("title",null,"\u7F16\u7EC4 10"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M11.435 4.503 7.947 7.787a.785.785 0 0 1-.814.154.708.708 0 0 1-.463-.652V.72c0-.287.182-.54.463-.652a.807.807 0 0 1 .288-.056c.196 0 .386.07.526.21l3.488 3.284c.14.134.217.316.217.499a.655.655 0 0 1-.217.498Z",fill:"#462BB1"}),React.createElement("path",{d:"M4.768 4.503 1.28 7.787a.785.785 0 0 1-.814.154.708.708 0 0 1-.463-.652V.72c0-.287.183-.54.463-.652A.807.807 0 0 1 .754.012c.197 0 .386.07.526.21l3.488 3.284c.14.134.218.316.218.499a.655.655 0 0 1-.218.498Z",fill:"#A395D9"})));var HSe="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsLXJ1bGU9Im5vbnplcm8iIGZpbGw9Im5vbmUiPjxwYXRoIGQ9Ik0xMS40MzUgNC41MDMgNy45NDcgNy43ODdhLjc4NS43ODUgMCAwIDEtLjgxNC4xNTQuNzA4LjcwOCAwIDAgMS0uNDYzLS42NTJWLjcyYzAtLjI4Ny4xODItLjU0LjQ2My0uNjUyYS44MDcuODA3IDAgMCAxIC4yODgtLjA1NmMuMTk2IDAgLjM4Ni4wNy41MjYuMjFsMy40ODggMy4yODRjLjE0LjEzNC4yMTcuMzE2LjIxNy40OTlhLjY1NS42NTUgMCAwIDEtLjIxNy40OThaIiBmaWxsPSIjNDYyQkIxIi8+PHBhdGggZD0iTTQuNzY4IDQuNTAzIDEuMjggNy43ODdhLjc4NS43ODUgMCAwIDEtLjgxNC4xNTQuNzA4LjcwOCAwIDAgMS0uNDYzLS42NTJWLjcyYzAtLjI4Ny4xODMtLjU0LjQ2My0uNjUyQS44MDcuODA3IDAgMCAxIC43NTQuMDEyYy4xOTcgMCAuMzg2LjA3LjUyNi4yMWwzLjQ4OCAzLjI4NGMuMTQuMTM0LjIxOC4zMTYuMjE4LjQ5OWEuNjU1LjY1NSAwIDAgMS0uMjE4LjQ5OFoiIGZpbGw9IiNBMzk1RDkiLz48L2c+PC9zdmc+",WSe=Object.defineProperty,YSe=Object.defineProperties,ZSe=Object.getOwnPropertyDescriptors,Q8=Object.getOwnPropertySymbols,XSe=Object.prototype.hasOwnProperty,KSe=Object.prototype.propertyIsEnumerable,q8=(r,n,e)=>n in r?WSe(r,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[n]=e,Hw=(r,n)=>{for(var e in n||(n={}))XSe.call(n,e)&&q8(r,e,n[e]);if(Q8)for(var e of Q8(n))KSe.call(n,e)&&q8(r,e,n[e]);return r},JSe=(r,n)=>YSe(r,ZSe(n)),Vx=(r,n,e)=>new Promise((t,i)=>{var a=l=>{try{o(e.next(l))}catch(u){i(u)}},s=l=>{try{o(e.throw(l))}catch(u){i(u)}},o=l=>l.done?t(l.value):Promise.resolve(l.value).then(a,s);o((e=e.apply(r,n)).next())}),QSe=()=>{const r=(0,H.useRef)(null),n=(0,H.useRef)(null),{pathId:e}=(0,ge.useParams)(),[t,i]=(0,H.useState)([]),[a,s]=(0,H.useState)(!1),[o,l]=(0,H.useState)([]),[u,c]=(0,H.useState)(1),[d,h]=(0,H.useState)(!1),[f]=I.default.useForm(),[v,g]=(0,H.useState)([]),[m,y]=(0,H.useState)({knowledge_type:1}),[w,T]=(0,H.useState)([]),[G,x]=(0,H.useState)({}),[_,p]=(0,H.useState)({nodes:[],links:[]});(0,H.useEffect)(()=>{b()},[]);function b(){return Vx(this,null,function*(){var j,Z,te,le,ue,se,V,ee;if(!r.current)return;let he=yield(0,be.ZP)(`/api/knowledge_maps/${e}.json`,{method:"get"});if((he==null?void 0:he.status)===0){l(he==null?void 0:he.data);let ct=[];(Z=(j=he==null?void 0:he.data)==null?void 0:j.node_data)==null||Z.map(kr=>{var Ta;return(Ta=kr==null?void 0:kr.nodes)==null?void 0:Ta.map((Wa,la)=>{la==0&&ct.push(Wa)})});let Lt=(te=ct==null?void 0:ct.splice(1))==null?void 0:te.map((kr,Ta)=>{var Wa,la,ys;return{startNodeUuid:(la=(Wa=ct==null?void 0:ct[0])==null?void 0:Wa.properties)==null?void 0:la.uuid,type:"\u5305\u542B",endNodeUuid:(ys=kr==null?void 0:kr.properties)==null?void 0:ys.uuid}});const{nodes:vn,links:tn}=(ue=(le=he==null?void 0:he.data)==null?void 0:le.node_data)==null?void 0:ue.reduce((kr,Ta)=>(kr.nodes.push(...Ta.nodes),kr.links.push(...Ta.relationships),kr),{nodes:[],links:[]});let rn=(0,Ue.fX)(vn==null?void 0:vn.map((kr,Ta)=>{var Wa,la,ys,Jl,xs,Es;return JSe(Hw(Hw({},kr),kr==null?void 0:kr.properties),{rootNodeUuid:(Wa=kr==null?void 0:kr.properties)==null?void 0:Wa.rootNodeUuid,id:(la=kr==null?void 0:kr.properties)==null?void 0:la.name,name:(ys=kr==null?void 0:kr.properties)==null?void 0:ys.name,labelstype:(Jl=kr==null?void 0:kr.labels)==null?void 0:Jl[1],description:(xs=kr==null?void 0:kr.properties)==null?void 0:xs.description,nodeType:(Es=kr==null?void 0:kr.properties)==null?void 0:Es.nodeType,level:0})}),[...tn==null?void 0:tn.filter(kr=>kr.type==="\u5305\u542B"),...Lt]),mn=SSe(rn),ar=(se=mn.nodes)==null?void 0:se.filter((kr,Ta,Wa)=>Ta===Wa.findIndex(la=>la.id===kr.id)),gi=(V=mn.edges)==null?void 0:V.filter((kr,Ta,Wa)=>Ta===Wa.findIndex(la=>la.source===kr.source&&la.target===kr.target));console.log("----",rn),p({nodes:ar,links:gi})}let ut=yield(0,be.ZP)(`/api/knowledge_maps/${e}/knowledge_list.json`,{method:"get"});(ut==null?void 0:ut.status)===0&&(i((ee=ut==null?void 0:ut.data)==null?void 0:ee.list),x(ut==null?void 0:ut.data))})}(0,H.useEffect)(()=>{if(!r.current||_.nodes.length===0)return;const j=(0,U.Z)()(r.current).graphData(_).nodeAutoColorBy("group").nodeThreeObject(Z=>{const te=Math.max(10*Math.pow(.7,Z.level),2),le=new N.Kj0(new N.xo$(te,16,16),new N.vBJ({color:Z.color||16777215})),ue=new Y.Z(Z.id);ue.color="#fff",ue.textHeight=te*.9,ue.position.set(0,te+2,0);const se=new N.ZAu;return se.add(le),se.add(ue),se}).linkOpacity(.3).linkWidth(.5).linkDirectionalParticles(0).linkDirectionalParticleWidth(0).onNodeClick(Z=>{const le=1+80/Math.hypot(Z.x,Z.y,Z.z);j.cameraPosition({x:Z.x*le,y:Z.y*le,z:Z.z*le},Z,3e3)});return n.current=j,()=>{j._destructor()}},[_]);function R(){return Vx(this,null,function*(){let j=yield(0,be.ZP)("/api/paths.json",{method:"get",params:{page:1,limit:800}});j&&g(j==null?void 0:j.subjects)})}function B(j){return Vx(this,null,function*(){var Z;let te=yield(0,be.ZP)("/api/knowledge_maps.json",{method:"get",params:{page:1,limit:800,knowledge_type:j}});te&&T(((Z=te==null?void 0:te.data)==null?void 0:Z.list)||[])})}return H.createElement("div",{style:{position:"relative"}},H.createElement(C.ZP,{type:"primary",ghost:!0,style:{position:"absolute",top:20,left:20,zIndex:10},onClick:()=>{history.back()}},"\u8FD4\u56DE"),H.createElement("div",{onClick:()=>{s(!a)},className:Ne.rightopen,style:{right:a?600:0}},H.createElement("div",null,a?"\u6536":"\u5C55"),H.createElement("div",null,a?"\u8D77":"\u5F00"),H.createElement("img",{src:a?HSe:GSe})),a&&H.createElement("div",{className:Ne.rightmodal},H.createElement("div",{style:{display:"flex",justifyContent:"end"}},H.createElement("a",{onClick:()=>{(G==null?void 0:G.knowledge_type)==2?R():(G==null?void 0:G.knowledge_type)==3&&B(2),f.setFieldsValue({knowledge_type:G==null?void 0:G.knowledge_type,name:o==null?void 0:o.name,description:o==null?void 0:o.description,subject_ids:(G==null?void 0:G.knowledge_type)==2?o==null?void 0:o.subject_ids:[],knowledge_map_ids:(G==null?void 0:G.knowledge_type)==3?o==null?void 0:o.map_ids:[]}),y({knowledge_type:G==null?void 0:G.knowledge_type,name:o==null?void 0:o.name,description:o==null?void 0:o.description,subject_ids:(G==null?void 0:G.knowledge_type)==2?o==null?void 0:o.subject_ids:[],knowledge_map_ids:(G==null?void 0:G.knowledge_type)==3?o==null?void 0:o.map_ids:[]}),h(!0)}},"\u7F16\u8F91"),H.createElement("a",{onClick:()=>Vx(void 0,null,function*(){let j=yield(0,be.ZP)(`/api/knowledge_maps/${e}.json`,{method:"DELETE"});(j==null?void 0:j.status)===0&&(A.ZP.info("\u5220\u9664\u6210\u529F"),history.back())}),style:{marginLeft:20}},"\u5220\u9664")),H.createElement("div",{className:Ne.rname},H.createElement("div",{style:{color:"#333333",fontSize:16}},o==null?void 0:o.name),H.createElement("div",{style:{marginTop:14}},H.createElement("span",{style:{color:"#5F6A95"}},"\u521B\u5EFA\u65E5\u671F"),H.createElement("span",{style:{marginLeft:10}},o==null?void 0:o.created_at))),H.createElement("div",{style:{marginTop:20,display:"flex"}},H.createElement("div",{onClick:()=>{c(1)},className:Ne.topradios},"\u4E13\u4E1A\u6982\u89C8"),H.createElement("div",{onClick:()=>{c(2)},className:Ne.topradio},"\u56FE\u8C31\u5217\u8868")),u===1&&H.createElement("div",{className:Ne.bocent},H.createElement("div",{className:Ne.bctitle},H.createElement("div",null,"\u8BFE\u7A0B\u6570\u91CF"),H.createElement("div",null,"\u56FE\u8C31\u6570\u91CF"),H.createElement("div",null,"\u56FE\u8C31\u8282\u70B9\u6570\u91CF")),H.createElement("div",{className:Ne.btcent},H.createElement("div",null,o==null?void 0:o.subject_count),H.createElement("div",null,o==null?void 0:o.knowledge_count),H.createElement("div",null,o==null?void 0:o.node_count)),H.createElement("div",{style:{marginTop:20}},o==null?void 0:o.description)),u===2&&H.createElement("div",{className:Ne.bocent},H.createElement("div",{className:Ne.bctitles},H.createElement("div",null,"\u8BFE\u7A0B\u540D\u79F0"),H.createElement("div",null,"\u56FE\u8C31\u6570\u91CF"),H.createElement("div",null,"\u6807\u7B7E\u8282\u70B9"),H.createElement("div",null,"\u8D44\u6E90\u8282\u70B9")),t==null?void 0:t.map(j=>H.createElement("div",{className:Ne.bctitles},H.createElement("div",{style:{color:"#3061D0"},onClick:()=>{window.open(`/knowledgegraph/${j==null?void 0:j.identifier}`)}},"\u300A",j==null?void 0:j.name,"\u300B"),H.createElement("div",null,j==null?void 0:j.knowledge_count),H.createElement("div",null,j==null?void 0:j.label_count),H.createElement("div",null,j==null?void 0:j.resource_count))))),H.createElement("div",{ref:r,style:{width:"100vw",height:"100vh",background:"#000",margin:0,overflow:"hidden"}}),H.createElement(F.default,{open:d,title:"\u7F16\u8F91\u77E5\u8BC6\u56FE\u8C31",centered:!0,width:1200,onCancel:()=>{h(!1)},onOk:()=>f.submit()},H.createElement(I.default,{form:f,scrollToFirstError:!0,layout:"horizontal",colon:!1,size:"large",labelCol:{flex:"110rem"},onValuesChange:(j,Z)=>{(j==null?void 0:j.knowledge_type)==2?R():(j==null?void 0:j.knowledge_type)==3&&B(2),y(Hw({},Z)),j!=null&&j.knowledge_type&&f.setFieldsValue({name:"",description:"",subject_id:"",subject_ids:[],knowledge_map_ids:[],knowledge_type:j==null?void 0:j.knowledge_type})},initialValues:{knowledge_type:1},onFinish:j=>Vx(void 0,null,function*(){let Z=yield(0,be.ZP)(`/api/knowledge_maps/${e}.json`,{method:"PUT",body:Hw({},j)});(Z==null?void 0:Z.status)===0&&(A.ZP.info("\u4FEE\u6539\u6210\u529F"),b(),h(!1),f.resetFields(),y({name:"",description:"",subject_id:"",subject_ids:[],knowledge_map_ids:[],knowledge_type:1}))}),className:Ne.form},H.createElement(I.default.Item,{label:"\u56FE\u8C31\u603B\u7C7B",name:"knowledge_type",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u56FE\u8C31\u603B\u7C7B"}]},H.createElement(P.ZP.Group,{disabled:!0},H.createElement(P.ZP,{value:1},"\u8BFE\u7A0B\u56FE\u8C31"),H.createElement(P.ZP,{value:2},"\u4E13\u4E1A\u56FE\u8C31"),H.createElement(P.ZP,{value:3},"\u5B66\u79D1\u56FE\u8C31"))),H.createElement(I.default.Item,{label:m.knowledge_type==1?"\u56FE\u8C31\u540D\u79F0":m.knowledge_type==2?"\u4E13\u4E1A\u540D\u79F0":"\u5B66\u79D1\u540D\u79F0",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0"},{type:"string",max:60,message:"\u8F93\u5165\u8D85\u9650\uFF0C\u8BF7\u7F29\u51CF\u5B57\u7B26\u6570"},{type:"string",whitespace:!0,message:"\u5185\u5BB9\u4E0D\u80FD\u5168\u4E3A\u7A7A\u683C"}]},H.createElement(W.default,{maxLength:60,showCount:!0,placeholder:"\u8BF7\u8F93\u5165"})),H.createElement(I.default.Item,{label:m.knowledge_type==1?"\u56FE\u8C31\u7B80\u4ECB":m.knowledge_type==2?"\u4E13\u4E1A\u7B80\u4ECB":"\u5B66\u79D1\u7B80\u4ECB",name:"description",rules:[{required:!1,message:"\u8BF7\u8F93\u5165\u7B80\u4ECB"},{type:"string",max:500,message:"\u8F93\u5165\u8D85\u9650\uFF0C\u8BF7\u7F29\u51CF\u5B57\u7B26\u6570"},{type:"string",whitespace:!0,message:"\u5185\u5BB9\u4E0D\u80FD\u5168\u4E3A\u7A7A\u683C"}]},H.createElement(W.default.TextArea,{maxLength:500,showCount:!0,placeholder:"\u8BF7\u8F93\u5165"})),m.knowledge_type=="2"&&H.createElement(I.default.Item,{className:Ne.mType,label:m.knowledge_type==2?"\u9009\u62E9\u8BFE\u7A0B":"\u9009\u62E9\u4E13\u4E1A",name:m.knowledge_type==2?"subject_ids":"knowledge_map_ids",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BFE\u7A0B"}]},H.createElement(K.default,{mode:"multiple"},v==null?void 0:v.map(j=>H.createElement(K.default.Option,{value:j==null?void 0:j.id},j==null?void 0:j.name)))),m.knowledge_type=="3"&&H.createElement(I.default.Item,{className:Ne.mType,label:"\u9009\u62E9\u4E13\u4E1A",name:"knowledge_map_ids",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u4E13\u4E1A"}]},H.createElement(K.default,{mode:"multiple"},w==null?void 0:w.map(j=>H.createElement(K.default.Option,{value:j==null?void 0:j.id},j==null?void 0:j.name)))))))}},48202:function(ke,ve,k){"use strict";var M,H=Object.defineProperty,U=Ae=>{throw TypeError(Ae)},Y=Math.pow,N=(Ae,$,z)=>$ in Ae?H(Ae,$,{enumerable:!0,configurable:!0,writable:!0,value:z}):Ae[$]=z,I=(Ae,$,z)=>N(Ae,typeof $!="symbol"?$+"":$,z),C=(Ae,$,z)=>$.has(Ae)||U("Cannot "+z),A=(Ae,$,z)=>(C(Ae,$,"read from private field"),z?z.call(Ae):$.get(Ae)),F=(Ae,$,z)=>$.has(Ae)?U("Cannot add the same private member more than once"):$ instanceof WeakSet?$.add(Ae):$.set(Ae,z),P=(Ae,$,z,S)=>(C(Ae,$,"write to private field"),S?S.call(Ae,z):$.set(Ae,z),z),W=(Ae,$,z)=>(C(Ae,$,"access private method"),z),K,ge,be;M={value:!0};var Ue=k(44091),Ne=k(75823);const ye=" ".repeat(2),De=" ".repeat(4);function Ce(){return Me(this)}function Me(Ae,$={}){const{maxRows:z=15,maxColumns:S=10,maxNumSize:D=8,padMinus:J="auto"}=$;return`${Ae.constructor.name} {
|
|
|
${ye}[
|
|
|
${De}${Oe(Ae,z,S,D,J)}
|
|
|
${ye}]
|
|
|
${ye}rows: ${Ae.rows}
|
|
|
${ye}columns: ${Ae.columns}
|
|
|
}`}function Oe(Ae,$,z,S,D){const{rows:J,columns:Le}=Ae,$e=Math.min(J,$),tt=Math.min(Le,z),at=[];if(D==="auto"){D=!1;e:for(let Ct=0;Ct<$e;Ct++)for(let pt=0;pt<tt;pt++)if(Ae.get(Ct,pt)<0){D=!0;break e}}for(let Ct=0;Ct<$e;Ct++){let pt=[];for(let $t=0;$t<tt;$t++)pt.push(re(Ae.get(Ct,$t),S,D));at.push(`${pt.join(" ")}`)}return tt!==Le&&(at[at.length-1]+=` ... ${Le-z} more columns`),$e!==J&&at.push(`... ${J-$} more rows`),at.join(`
|
|
|
${De}`)}function re(Ae,$,z){return(Ae>=0&&z?` ${q(Ae,$-1)}`:q(Ae,$)).padEnd($)}function q(Ae,$){let z=Ae.toString();if(z.length<=$)return z;let S=Ae.toFixed($);if(S.length>$&&(S=Ae.toFixed(Math.max(0,$-(S.length-$)))),S.length<=$&&!S.startsWith("0.000")&&!S.startsWith("-0.000"))return S;let D=Ae.toExponential($);return D.length>$&&(D=Ae.toExponential(Math.max(0,$-(D.length-$)))),D.slice(0)}function ce(Ae,$){Ae.prototype.add=function(S){return typeof S=="number"?this.addS(S):this.addM(S)},Ae.prototype.addS=function(S){for(let D=0;D<this.rows;D++)for(let J=0;J<this.columns;J++)this.set(D,J,this.get(D,J)+S);return this},Ae.prototype.addM=function(S){if(S=$.checkMatrix(S),this.rows!==S.rows||this.columns!==S.columns)throw new RangeError("Matrices dimensions must be equal");for(let D=0;D<this.rows;D++)for(let J=0;J<this.columns;J++)this.set(D,J,this.get(D,J)+S.get(D,J));return this},Ae.add=function(S,D){return new $(S).add(D)},Ae.prototype.sub=function(S){return typeof S=="number"?this.subS(S):this.subM(S)},Ae.prototype.subS=function(S){for(let D=0;D<this.rows;D++)for(let J=0;J<this.columns;J++)this.set(D,J,this.get(D,J)-S);return this},Ae.prototype.subM=function(S){if(S=$.checkMatrix(S),this.rows!==S.rows||this.columns!==S.columns)throw new RangeError("Matrices dimensions must be equal");for(let D=0;D<this.rows;D++)for(let J=0;J<this.columns;J++)this.set(D,J,this.get(D,J)-S.get(D,J));return this},Ae.sub=function(S,D){return new $(S).sub(D)},Ae.prototype.subtract=Ae.prototype.sub,Ae.prototype.subtractS=Ae.prototype.subS,Ae.prototype.subtractM=Ae.prototype.subM,Ae.subtract=Ae.sub,Ae.prototype.mul=function(S){return typeof S=="number"?this.mulS(S):this.mulM(S)},Ae.prototype.mulS=function(S){for(let D=0;D<this.rows;D++)for(let J=0;J<this.columns;J++)this.set(D,J,this.get(D,J)*S);return this},Ae.prototype.mulM=function(S){if(S=$.checkMatrix(S),this.rows!==S.rows||this.columns!==S.columns)throw new RangeError("Matrices dimensions must be equal");for(let D=0;D<this.rows;D++)for(let J=0;J<this.columns;J++)this.set(D,J,this.get(D,J)*S.get(D,J));return this},Ae.mul=function(S,D){return new $(S).mul(D)},Ae.prototype.multiply=Ae.prototype.mul,Ae.prototype.multiplyS=Ae.prototype.mulS,Ae.prototype.multiplyM=Ae.prototype.mulM,Ae.multiply=Ae.mul,Ae.prototype.div=function(S){return typeof S=="number"?this.divS(S):this.divM(S)},Ae.prototype.divS=function(S){for(let D=0;D<this.rows;D++)for(let J=0;J<this.columns;J++)this.set(D,J,this.get(D,J)/S);return this},Ae.prototype.divM=function(S){if(S=$.checkMatrix(S),this.rows!==S.rows||this.columns!==S.columns)throw new RangeError("Matrices dimensions must be equal");for(let D=0;D<this.rows;D++)for(let J=0;J<this.columns;J++)this.set(D,J,this.get(D,J)/S.get(D,J));return this},Ae.div=function(S,D){return new $(S).div(D)},Ae.prototype.divide=Ae.prototype.div,Ae.prototype.divideS=Ae.prototype.divS,Ae.prototype.divideM=Ae.prototype.divM,Ae.divide=Ae.div,Ae.prototype.mod=function(S){return typeof S=="number"?this.modS(S):this.modM(S)},Ae.prototype.modS=function(S){for(let D=0;D<this.rows;D++)for(let J=0;J<this.columns;J++)this.set(D,J,this.get(D,J)%S);return this},Ae.prototype.modM=function(S){if(S=$.checkMatrix(S),this.rows!==S.rows||this.columns!==S.columns)throw new RangeError("Matrices dimensions must be equal");for(let D=0;D<this.rows;D++)for(let J=0;J<this.columns;J++)this.set(D,J,this.get(D,J)%S.get(D,J));return this},Ae.mod=function(S,D){return new $(S).mod(D)},Ae.prototype.modulus=Ae.prototype.mod,Ae.prototype.modulusS=Ae.prototype.modS,Ae.prototype.modulusM=Ae.prototype.modM,Ae.modulus=Ae.mod,Ae.prototype.and=function(S){return typeof S=="number"?this.andS(S):this.andM(S)},Ae.prototype.andS=function(S){for(let D=0;D<this.rows;D++)for(let J=0;J<this.columns;J++)this.set(D,J,this.get(D,J)&S);return this},Ae.prototype.andM=function(S){if(S=$.checkMatrix(S),this.rows!==S.rows||this.columns!==S.columns)throw new RangeError("Matrices dimensions must be equal");for(let D=0;D<this.rows;D++)for(let J=0;J<this.columns;J++)this.set(D,J,this.get(D,J)&S.get(D,J));return this},Ae.and=function(S,D){return new $(S).and(D)},Ae.prototype.or=function(S){return typeof S=="number"?this.orS(S):this.orM(S)},Ae.prototype.orS=function(S){for(let D=0;D<this.rows;D++)for(let J=0;J<this.columns;J++)this.set(D,J,this.get(D,J)|S);return this},Ae.prototype.orM=function(S){if(S=$.checkMatrix(S),this.rows!==S.rows||this.columns!==S.columns)throw new RangeError("Matrices dimensions must be equal");for(let D=0;D<this.rows;D++)for(let J=0;J<this.columns;J++)this.set(D,J,this.get(D,J)|S.get(D,J));return this},Ae.or=function(S,D){return new $(S).or(D)},Ae.prototype.xor=function(S){return typeof S=="number"?this.xorS(S):this.xorM(S)},Ae.prototype.xorS=function(S){for(let D=0;D<this.rows;D++)for(let J=0;J<this.columns;J++)this.set(D,J,this.get(D,J)^S);return this},Ae.prototype.xorM=function(S){if(S=$.checkMatrix(S),this.rows!==S.rows||this.columns!==S.columns)throw new RangeError("Matrices dimensions must be equal");for(let D=0;D<this.rows;D++)for(let J=0;J<this.columns;J++)this.set(D,J,this.get(D,J)^S.get(D,J));return this},Ae.xor=function(S,D){return new $(S).xor(D)},Ae.prototype.leftShift=function(S){return typeof S=="number"?this.leftShiftS(S):this.leftShiftM(S)},Ae.prototype.leftShiftS=function(S){for(let D=0;D<this.rows;D++)for(let J=0;J<this.columns;J++)this.set(D,J,this.get(D,J)<<S);return this},Ae.prototype.leftShiftM=function(S){if(S=$.checkMatrix(S),this.rows!==S.rows||this.columns!==S.columns)throw new RangeError("Matrices dimensions must be equal");for(let D=0;D<this.rows;D++)for(let J=0;J<this.columns;J++)this.set(D,J,this.get(D,J)<<S.get(D,J));return this},Ae.leftShift=function(S,D){return new $(S).leftShift(D)},Ae.prototype.signPropagatingRightShift=function(S){return typeof S=="number"?this.signPropagatingRightShiftS(S):this.signPropagatingRightShiftM(S)},Ae.prototype.signPropagatingRightShiftS=function(S){for(let D=0;D<this.rows;D++)for(let J=0;J<this.columns;J++)this.set(D,J,this.get(D,J)>>S);return this},Ae.prototype.signPropagatingRightShiftM=function(S){if(S=$.checkMatrix(S),this.rows!==S.rows||this.columns!==S.columns)throw new RangeError("Matrices dimensions must be equal");for(let D=0;D<this.rows;D++)for(let J=0;J<this.columns;J++)this.set(D,J,this.get(D,J)>>S.get(D,J));return this},Ae.signPropagatingRightShift=function(S,D){return new $(S).signPropagatingRightShift(D)},Ae.prototype.rightShift=function(S){return typeof S=="number"?this.rightShiftS(S):this.rightShiftM(S)},Ae.prototype.rightShiftS=function(S){for(let D=0;D<this.rows;D++)for(let J=0;J<this.columns;J++)this.set(D,J,this.get(D,J)>>>S);return this},Ae.prototype.rightShiftM=function(S){if(S=$.checkMatrix(S),this.rows!==S.rows||this.columns!==S.columns)throw new RangeError("Matrices dimensions must be equal");for(let D=0;D<this.rows;D++)for(let J=0;J<this.columns;J++)this.set(D,J,this.get(D,J)>>>S.get(D,J));return this},Ae.rightShift=function(S,D){return new $(S).rightShift(D)},Ae.prototype.zeroFillRightShift=Ae.prototype.rightShift,Ae.prototype.zeroFillRightShiftS=Ae.prototype.rightShiftS,Ae.prototype.zeroFillRightShiftM=Ae.prototype.rightShiftM,Ae.zeroFillRightShift=Ae.rightShift,Ae.prototype.not=function(){for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.set(S,D,~this.get(S,D));return this},Ae.not=function(S){return new $(S).not()},Ae.prototype.abs=function(){for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.set(S,D,Math.abs(this.get(S,D)));return this},Ae.abs=function(S){return new $(S).abs()},Ae.prototype.acos=function(){for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.set(S,D,Math.acos(this.get(S,D)));return this},Ae.acos=function(S){return new $(S).acos()},Ae.prototype.acosh=function(){for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.set(S,D,Math.acosh(this.get(S,D)));return this},Ae.acosh=function(S){return new $(S).acosh()},Ae.prototype.asin=function(){for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.set(S,D,Math.asin(this.get(S,D)));return this},Ae.asin=function(S){return new $(S).asin()},Ae.prototype.asinh=function(){for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.set(S,D,Math.asinh(this.get(S,D)));return this},Ae.asinh=function(S){return new $(S).asinh()},Ae.prototype.atan=function(){for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.set(S,D,Math.atan(this.get(S,D)));return this},Ae.atan=function(S){return new $(S).atan()},Ae.prototype.atanh=function(){for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.set(S,D,Math.atanh(this.get(S,D)));return this},Ae.atanh=function(S){return new $(S).atanh()},Ae.prototype.cbrt=function(){for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.set(S,D,Math.cbrt(this.get(S,D)));return this},Ae.cbrt=function(S){return new $(S).cbrt()},Ae.prototype.ceil=function(){for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.set(S,D,Math.ceil(this.get(S,D)));return this},Ae.ceil=function(S){return new $(S).ceil()},Ae.prototype.clz32=function(){for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.set(S,D,Math.clz32(this.get(S,D)));return this},Ae.clz32=function(S){return new $(S).clz32()},Ae.prototype.cos=function(){for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.set(S,D,Math.cos(this.get(S,D)));return this},Ae.cos=function(S){return new $(S).cos()},Ae.prototype.cosh=function(){for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.set(S,D,Math.cosh(this.get(S,D)));return this},Ae.cosh=function(S){return new $(S).cosh()},Ae.prototype.exp=function(){for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.set(S,D,Math.exp(this.get(S,D)));return this},Ae.exp=function(S){return new $(S).exp()},Ae.prototype.expm1=function(){for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.set(S,D,Math.expm1(this.get(S,D)));return this},Ae.expm1=function(S){return new $(S).expm1()},Ae.prototype.floor=function(){for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.set(S,D,Math.floor(this.get(S,D)));return this},Ae.floor=function(S){return new $(S).floor()},Ae.prototype.fround=function(){for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.set(S,D,Math.fround(this.get(S,D)));return this},Ae.fround=function(S){return new $(S).fround()},Ae.prototype.log=function(){for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.set(S,D,Math.log(this.get(S,D)));return this},Ae.log=function(S){return new $(S).log()},Ae.prototype.log1p=function(){for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.set(S,D,Math.log1p(this.get(S,D)));return this},Ae.log1p=function(S){return new $(S).log1p()},Ae.prototype.log10=function(){for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.set(S,D,Math.log10(this.get(S,D)));return this},Ae.log10=function(S){return new $(S).log10()},Ae.prototype.log2=function(){for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.set(S,D,Math.log2(this.get(S,D)));return this},Ae.log2=function(S){return new $(S).log2()},Ae.prototype.round=function(){for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.set(S,D,Math.round(this.get(S,D)));return this},Ae.round=function(S){return new $(S).round()},Ae.prototype.sign=function(){for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.set(S,D,Math.sign(this.get(S,D)));return this},Ae.sign=function(S){return new $(S).sign()},Ae.prototype.sin=function(){for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.set(S,D,Math.sin(this.get(S,D)));return this},Ae.sin=function(S){return new $(S).sin()},Ae.prototype.sinh=function(){for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.set(S,D,Math.sinh(this.get(S,D)));return this},Ae.sinh=function(S){return new $(S).sinh()},Ae.prototype.sqrt=function(){for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.set(S,D,Math.sqrt(this.get(S,D)));return this},Ae.sqrt=function(S){return new $(S).sqrt()},Ae.prototype.tan=function(){for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.set(S,D,Math.tan(this.get(S,D)));return this},Ae.tan=function(S){return new $(S).tan()},Ae.prototype.tanh=function(){for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.set(S,D,Math.tanh(this.get(S,D)));return this},Ae.tanh=function(S){return new $(S).tanh()},Ae.prototype.trunc=function(){for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.set(S,D,Math.trunc(this.get(S,D)));return this},Ae.trunc=function(S){return new $(S).trunc()},Ae.pow=function(S,D){return new $(S).pow(D)},Ae.prototype.pow=function(S){return typeof S=="number"?this.powS(S):this.powM(S)},Ae.prototype.powS=function(S){for(let D=0;D<this.rows;D++)for(let J=0;J<this.columns;J++)this.set(D,J,Y(this.get(D,J),S));return this},Ae.prototype.powM=function(S){if(S=$.checkMatrix(S),this.rows!==S.rows||this.columns!==S.columns)throw new RangeError("Matrices dimensions must be equal");for(let D=0;D<this.rows;D++)for(let J=0;J<this.columns;J++)this.set(D,J,Y(this.get(D,J),S.get(D,J)));return this}}function Ee(Ae,$,z){let S=z?Ae.rows:Ae.rows-1;if($<0||$>S)throw new RangeError("Row index out of range")}function Te(Ae,$,z){let S=z?Ae.columns:Ae.columns-1;if($<0||$>S)throw new RangeError("Column index out of range")}function Je(Ae,$){if($.to1DArray&&($=$.to1DArray()),$.length!==Ae.columns)throw new RangeError("vector size must be the same as the number of columns");return $}function He(Ae,$){if($.to1DArray&&($=$.to1DArray()),$.length!==Ae.rows)throw new RangeError("vector size must be the same as the number of rows");return $}function rt(Ae,$){if(!Ue.isAnyArray($))throw new TypeError("row indices must be an array");for(let z=0;z<$.length;z++)if($[z]<0||$[z]>=Ae.rows)throw new RangeError("row indices are out of range")}function Et(Ae,$){if(!Ue.isAnyArray($))throw new TypeError("column indices must be an array");for(let z=0;z<$.length;z++)if($[z]<0||$[z]>=Ae.columns)throw new RangeError("column indices are out of range")}function lt(Ae,$,z,S,D){if(arguments.length!==5)throw new RangeError("expected 4 arguments");if(mt("startRow",$),mt("endRow",z),mt("startColumn",S),mt("endColumn",D),$>z||S>D||$<0||$>=Ae.rows||z<0||z>=Ae.rows||S<0||S>=Ae.columns||D<0||D>=Ae.columns)throw new RangeError("Submatrix indices are out of range")}function st(Ae,$=0){let z=[];for(let S=0;S<Ae;S++)z.push($);return z}function mt(Ae,$){if(typeof $!="number")throw new TypeError(`${Ae} must be a number`)}function fe(Ae){if(Ae.isEmpty())throw new Error("Empty matrix has no elements to index")}function We(Ae){let $=st(Ae.rows);for(let z=0;z<Ae.rows;++z)for(let S=0;S<Ae.columns;++S)$[z]+=Ae.get(z,S);return $}function ht(Ae){let $=st(Ae.columns);for(let z=0;z<Ae.rows;++z)for(let S=0;S<Ae.columns;++S)$[S]+=Ae.get(z,S);return $}function Pt(Ae){let $=0;for(let z=0;z<Ae.rows;z++)for(let S=0;S<Ae.columns;S++)$+=Ae.get(z,S);return $}function Ve(Ae){let $=st(Ae.rows,1);for(let z=0;z<Ae.rows;++z)for(let S=0;S<Ae.columns;++S)$[z]*=Ae.get(z,S);return $}function it(Ae){let $=st(Ae.columns,1);for(let z=0;z<Ae.rows;++z)for(let S=0;S<Ae.columns;++S)$[S]*=Ae.get(z,S);return $}function ft(Ae){let $=1;for(let z=0;z<Ae.rows;z++)for(let S=0;S<Ae.columns;S++)$*=Ae.get(z,S);return $}function ze(Ae,$,z){const S=Ae.rows,D=Ae.columns,J=[];for(let Le=0;Le<S;Le++){let $e=0,tt=0,at=0;for(let Ct=0;Ct<D;Ct++)at=Ae.get(Le,Ct)-z[Le],$e+=at,tt+=at*at;$?J.push((tt-$e*$e/D)/(D-1)):J.push((tt-$e*$e/D)/D)}return J}function Qe(Ae,$,z){const S=Ae.rows,D=Ae.columns,J=[];for(let Le=0;Le<D;Le++){let $e=0,tt=0,at=0;for(let Ct=0;Ct<S;Ct++)at=Ae.get(Ct,Le)-z[Le],$e+=at,tt+=at*at;$?J.push((tt-$e*$e/S)/(S-1)):J.push((tt-$e*$e/S)/S)}return J}function Se(Ae,$,z){const S=Ae.rows,D=Ae.columns,J=S*D;let Le=0,$e=0,tt=0;for(let at=0;at<S;at++)for(let Ct=0;Ct<D;Ct++)tt=Ae.get(at,Ct)-z,Le+=tt,$e+=tt*tt;return $?($e-Le*Le/J)/(J-1):($e-Le*Le/J)/J}function E(Ae,$){for(let z=0;z<Ae.rows;z++)for(let S=0;S<Ae.columns;S++)Ae.set(z,S,Ae.get(z,S)-$[z])}function me(Ae,$){for(let z=0;z<Ae.rows;z++)for(let S=0;S<Ae.columns;S++)Ae.set(z,S,Ae.get(z,S)-$[S])}function L(Ae,$){for(let z=0;z<Ae.rows;z++)for(let S=0;S<Ae.columns;S++)Ae.set(z,S,Ae.get(z,S)-$)}function X(Ae){const $=[];for(let z=0;z<Ae.rows;z++){let S=0;for(let D=0;D<Ae.columns;D++)S+=Y(Ae.get(z,D),2)/(Ae.columns-1);$.push(Math.sqrt(S))}return $}function Ke(Ae,$){for(let z=0;z<Ae.rows;z++)for(let S=0;S<Ae.columns;S++)Ae.set(z,S,Ae.get(z,S)/$[z])}function ot(Ae){const $=[];for(let z=0;z<Ae.columns;z++){let S=0;for(let D=0;D<Ae.rows;D++)S+=Y(Ae.get(D,z),2)/(Ae.rows-1);$.push(Math.sqrt(S))}return $}function pe(Ae,$){for(let z=0;z<Ae.rows;z++)for(let S=0;S<Ae.columns;S++)Ae.set(z,S,Ae.get(z,S)/$[S])}function xe(Ae){const $=Ae.size-1;let z=0;for(let S=0;S<Ae.columns;S++)for(let D=0;D<Ae.rows;D++)z+=Y(Ae.get(D,S),2)/$;return Math.sqrt(z)}function Ze(Ae,$){for(let z=0;z<Ae.rows;z++)for(let S=0;S<Ae.columns;S++)Ae.set(z,S,Ae.get(z,S)/$)}class O{static from1DArray($,z,S){if($*z!==S.length)throw new RangeError("data length does not match given dimensions");let J=new nt($,z);for(let Le=0;Le<$;Le++)for(let $e=0;$e<z;$e++)J.set(Le,$e,S[Le*z+$e]);return J}static rowVector($){let z=new nt(1,$.length);for(let S=0;S<$.length;S++)z.set(0,S,$[S]);return z}static columnVector($){let z=new nt($.length,1);for(let S=0;S<$.length;S++)z.set(S,0,$[S]);return z}static zeros($,z){return new nt($,z)}static ones($,z){return new nt($,z).fill(1)}static rand($,z,S={}){if(typeof S!="object")throw new TypeError("options must be an object");const{random:D=Math.random}=S;let J=new nt($,z);for(let Le=0;Le<$;Le++)for(let $e=0;$e<z;$e++)J.set(Le,$e,D());return J}static randInt($,z,S={}){if(typeof S!="object")throw new TypeError("options must be an object");const{min:D=0,max:J=1e3,random:Le=Math.random}=S;if(!Number.isInteger(D))throw new TypeError("min must be an integer");if(!Number.isInteger(J))throw new TypeError("max must be an integer");if(D>=J)throw new RangeError("min must be smaller than max");let $e=J-D,tt=new nt($,z);for(let at=0;at<$;at++)for(let Ct=0;Ct<z;Ct++){let pt=D+Math.round(Le()*$e);tt.set(at,Ct,pt)}return tt}static eye($,z,S){z===void 0&&(z=$),S===void 0&&(S=1);let D=Math.min($,z),J=this.zeros($,z);for(let Le=0;Le<D;Le++)J.set(Le,Le,S);return J}static diag($,z,S){let D=$.length;z===void 0&&(z=D),S===void 0&&(S=z);let J=Math.min(D,z,S),Le=this.zeros(z,S);for(let $e=0;$e<J;$e++)Le.set($e,$e,$[$e]);return Le}static min($,z){$=this.checkMatrix($),z=this.checkMatrix(z);let S=$.rows,D=$.columns,J=new nt(S,D);for(let Le=0;Le<S;Le++)for(let $e=0;$e<D;$e++)J.set(Le,$e,Math.min($.get(Le,$e),z.get(Le,$e)));return J}static max($,z){$=this.checkMatrix($),z=this.checkMatrix(z);let S=$.rows,D=$.columns,J=new this(S,D);for(let Le=0;Le<S;Le++)for(let $e=0;$e<D;$e++)J.set(Le,$e,Math.max($.get(Le,$e),z.get(Le,$e)));return J}static checkMatrix($){return O.isMatrix($)?$:new nt($)}static isMatrix($){return $!=null&&$.klass==="Matrix"}get size(){return this.rows*this.columns}apply($){if(typeof $!="function")throw new TypeError("callback must be a function");for(let z=0;z<this.rows;z++)for(let S=0;S<this.columns;S++)$.call(this,z,S);return this}to1DArray(){let $=[];for(let z=0;z<this.rows;z++)for(let S=0;S<this.columns;S++)$.push(this.get(z,S));return $}to2DArray(){let $=[];for(let z=0;z<this.rows;z++){$.push([]);for(let S=0;S<this.columns;S++)$[z].push(this.get(z,S))}return $}toJSON(){return this.to2DArray()}isRowVector(){return this.rows===1}isColumnVector(){return this.columns===1}isVector(){return this.rows===1||this.columns===1}isSquare(){return this.rows===this.columns}isEmpty(){return this.rows===0||this.columns===0}isSymmetric(){if(this.isSquare()){for(let $=0;$<this.rows;$++)for(let z=0;z<=$;z++)if(this.get($,z)!==this.get(z,$))return!1;return!0}return!1}isDistance(){if(!this.isSymmetric())return!1;for(let $=0;$<this.rows;$++)if(this.get($,$)!==0)return!1;return!0}isEchelonForm(){let $=0,z=0,S=-1,D=!0,J=!1;for(;$<this.rows&&D;){for(z=0,J=!1;z<this.columns&&J===!1;)this.get($,z)===0?z++:this.get($,z)===1&&z>S?(J=!0,S=z):(D=!1,J=!0);$++}return D}isReducedEchelonForm(){let $=0,z=0,S=-1,D=!0,J=!1;for(;$<this.rows&&D;){for(z=0,J=!1;z<this.columns&&J===!1;)this.get($,z)===0?z++:this.get($,z)===1&&z>S?(J=!0,S=z):(D=!1,J=!0);for(let Le=z+1;Le<this.rows;Le++)this.get($,Le)!==0&&(D=!1);$++}return D}echelonForm(){let $=this.clone(),z=0,S=0;for(;z<$.rows&&S<$.columns;){let D=z;for(let J=z;J<$.rows;J++)$.get(J,S)>$.get(D,S)&&(D=J);if($.get(D,S)===0)S++;else{$.swapRows(z,D);let J=$.get(z,S);for(let Le=S;Le<$.columns;Le++)$.set(z,Le,$.get(z,Le)/J);for(let Le=z+1;Le<$.rows;Le++){let $e=$.get(Le,S)/$.get(z,S);$.set(Le,S,0);for(let tt=S+1;tt<$.columns;tt++)$.set(Le,tt,$.get(Le,tt)-$.get(z,tt)*$e)}z++,S++}}return $}reducedEchelonForm(){let $=this.echelonForm(),z=$.columns,S=$.rows,D=S-1;for(;D>=0;)if($.maxRow(D)===0)D--;else{let J=0,Le=!1;for(;J<S&&Le===!1;)$.get(D,J)===1?Le=!0:J++;for(let $e=0;$e<D;$e++){let tt=$.get($e,J);for(let at=J;at<z;at++){let Ct=$.get($e,at)-tt*$.get(D,at);$.set($e,at,Ct)}}D--}return $}set(){throw new Error("set method is unimplemented")}get(){throw new Error("get method is unimplemented")}repeat($={}){if(typeof $!="object")throw new TypeError("options must be an object");const{rows:z=1,columns:S=1}=$;if(!Number.isInteger(z)||z<=0)throw new TypeError("rows must be a positive integer");if(!Number.isInteger(S)||S<=0)throw new TypeError("columns must be a positive integer");let D=new nt(this.rows*z,this.columns*S);for(let J=0;J<z;J++)for(let Le=0;Le<S;Le++)D.setSubMatrix(this,this.rows*J,this.columns*Le);return D}fill($){for(let z=0;z<this.rows;z++)for(let S=0;S<this.columns;S++)this.set(z,S,$);return this}neg(){return this.mulS(-1)}getRow($){Ee(this,$);let z=[];for(let S=0;S<this.columns;S++)z.push(this.get($,S));return z}getRowVector($){return nt.rowVector(this.getRow($))}setRow($,z){Ee(this,$),z=Je(this,z);for(let S=0;S<this.columns;S++)this.set($,S,z[S]);return this}swapRows($,z){Ee(this,$),Ee(this,z);for(let S=0;S<this.columns;S++){let D=this.get($,S);this.set($,S,this.get(z,S)),this.set(z,S,D)}return this}getColumn($){Te(this,$);let z=[];for(let S=0;S<this.rows;S++)z.push(this.get(S,$));return z}getColumnVector($){return nt.columnVector(this.getColumn($))}setColumn($,z){Te(this,$),z=He(this,z);for(let S=0;S<this.rows;S++)this.set(S,$,z[S]);return this}swapColumns($,z){Te(this,$),Te(this,z);for(let S=0;S<this.rows;S++){let D=this.get(S,$);this.set(S,$,this.get(S,z)),this.set(S,z,D)}return this}addRowVector($){$=Je(this,$);for(let z=0;z<this.rows;z++)for(let S=0;S<this.columns;S++)this.set(z,S,this.get(z,S)+$[S]);return this}subRowVector($){$=Je(this,$);for(let z=0;z<this.rows;z++)for(let S=0;S<this.columns;S++)this.set(z,S,this.get(z,S)-$[S]);return this}mulRowVector($){$=Je(this,$);for(let z=0;z<this.rows;z++)for(let S=0;S<this.columns;S++)this.set(z,S,this.get(z,S)*$[S]);return this}divRowVector($){$=Je(this,$);for(let z=0;z<this.rows;z++)for(let S=0;S<this.columns;S++)this.set(z,S,this.get(z,S)/$[S]);return this}addColumnVector($){$=He(this,$);for(let z=0;z<this.rows;z++)for(let S=0;S<this.columns;S++)this.set(z,S,this.get(z,S)+$[z]);return this}subColumnVector($){$=He(this,$);for(let z=0;z<this.rows;z++)for(let S=0;S<this.columns;S++)this.set(z,S,this.get(z,S)-$[z]);return this}mulColumnVector($){$=He(this,$);for(let z=0;z<this.rows;z++)for(let S=0;S<this.columns;S++)this.set(z,S,this.get(z,S)*$[z]);return this}divColumnVector($){$=He(this,$);for(let z=0;z<this.rows;z++)for(let S=0;S<this.columns;S++)this.set(z,S,this.get(z,S)/$[z]);return this}mulRow($,z){Ee(this,$);for(let S=0;S<this.columns;S++)this.set($,S,this.get($,S)*z);return this}mulColumn($,z){Te(this,$);for(let S=0;S<this.rows;S++)this.set(S,$,this.get(S,$)*z);return this}max($){if(this.isEmpty())return NaN;switch($){case"row":{const z=new Array(this.rows).fill(Number.NEGATIVE_INFINITY);for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.get(S,D)>z[S]&&(z[S]=this.get(S,D));return z}case"column":{const z=new Array(this.columns).fill(Number.NEGATIVE_INFINITY);for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.get(S,D)>z[D]&&(z[D]=this.get(S,D));return z}case void 0:{let z=this.get(0,0);for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.get(S,D)>z&&(z=this.get(S,D));return z}default:throw new Error(`invalid option: ${$}`)}}maxIndex(){fe(this);let $=this.get(0,0),z=[0,0];for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.get(S,D)>$&&($=this.get(S,D),z[0]=S,z[1]=D);return z}min($){if(this.isEmpty())return NaN;switch($){case"row":{const z=new Array(this.rows).fill(Number.POSITIVE_INFINITY);for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.get(S,D)<z[S]&&(z[S]=this.get(S,D));return z}case"column":{const z=new Array(this.columns).fill(Number.POSITIVE_INFINITY);for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.get(S,D)<z[D]&&(z[D]=this.get(S,D));return z}case void 0:{let z=this.get(0,0);for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.get(S,D)<z&&(z=this.get(S,D));return z}default:throw new Error(`invalid option: ${$}`)}}minIndex(){fe(this);let $=this.get(0,0),z=[0,0];for(let S=0;S<this.rows;S++)for(let D=0;D<this.columns;D++)this.get(S,D)<$&&($=this.get(S,D),z[0]=S,z[1]=D);return z}maxRow($){if(Ee(this,$),this.isEmpty())return NaN;let z=this.get($,0);for(let S=1;S<this.columns;S++)this.get($,S)>z&&(z=this.get($,S));return z}maxRowIndex($){Ee(this,$),fe(this);let z=this.get($,0),S=[$,0];for(let D=1;D<this.columns;D++)this.get($,D)>z&&(z=this.get($,D),S[1]=D);return S}minRow($){if(Ee(this,$),this.isEmpty())return NaN;let z=this.get($,0);for(let S=1;S<this.columns;S++)this.get($,S)<z&&(z=this.get($,S));return z}minRowIndex($){Ee(this,$),fe(this);let z=this.get($,0),S=[$,0];for(let D=1;D<this.columns;D++)this.get($,D)<z&&(z=this.get($,D),S[1]=D);return S}maxColumn($){if(Te(this,$),this.isEmpty())return NaN;let z=this.get(0,$);for(let S=1;S<this.rows;S++)this.get(S,$)>z&&(z=this.get(S,$));return z}maxColumnIndex($){Te(this,$),fe(this);let z=this.get(0,$),S=[0,$];for(let D=1;D<this.rows;D++)this.get(D,$)>z&&(z=this.get(D,$),S[0]=D);return S}minColumn($){if(Te(this,$),this.isEmpty())return NaN;let z=this.get(0,$);for(let S=1;S<this.rows;S++)this.get(S,$)<z&&(z=this.get(S,$));return z}minColumnIndex($){Te(this,$),fe(this);let z=this.get(0,$),S=[0,$];for(let D=1;D<this.rows;D++)this.get(D,$)<z&&(z=this.get(D,$),S[0]=D);return S}diag(){let $=Math.min(this.rows,this.columns),z=[];for(let S=0;S<$;S++)z.push(this.get(S,S));return z}norm($="frobenius"){switch($){case"max":return this.max();case"frobenius":return Math.sqrt(this.dot(this));default:throw new RangeError(`unknown norm type: ${$}`)}}cumulativeSum(){let $=0;for(let z=0;z<this.rows;z++)for(let S=0;S<this.columns;S++)$+=this.get(z,S),this.set(z,S,$);return this}dot($){O.isMatrix($)&&($=$.to1DArray());let z=this.to1DArray();if(z.length!==$.length)throw new RangeError("vectors do not have the same size");let S=0;for(let D=0;D<z.length;D++)S+=z[D]*$[D];return S}mmul($){$=nt.checkMatrix($);let z=this.rows,S=this.columns,D=$.columns,J=new nt(z,D),Le=new Float64Array(S);for(let $e=0;$e<D;$e++){for(let tt=0;tt<S;tt++)Le[tt]=$.get(tt,$e);for(let tt=0;tt<z;tt++){let at=0;for(let Ct=0;Ct<S;Ct++)at+=this.get(tt,Ct)*Le[Ct];J.set(tt,$e,at)}}return J}mpow($){if(!this.isSquare())throw new RangeError("Matrix must be square");if(!Number.isInteger($)||$<0)throw new RangeError("Exponent must be a non-negative integer");let z=nt.eye(this.rows),S=this;for(let D=$;D>1;D/=2)D&1&&(z=z.mmul(S)),S=S.mmul(S);return z}strassen2x2($){$=nt.checkMatrix($);let z=new nt(2,2);const S=this.get(0,0),D=$.get(0,0),J=this.get(0,1),Le=$.get(0,1),$e=this.get(1,0),tt=$.get(1,0),at=this.get(1,1),Ct=$.get(1,1),pt=(S+at)*(D+Ct),$t=($e+at)*D,Nt=S*(Le-Ct),Ot=at*(tt-D),Wt=(S+J)*Ct,dn=($e-S)*(D+Le),St=(J-at)*(tt+Ct),zt=pt+Ot-Wt+St,pn=Nt+Wt,Mn=$t+Ot,En=pt-$t+Nt+dn;return z.set(0,0,zt),z.set(0,1,pn),z.set(1,0,Mn),z.set(1,1,En),z}strassen3x3($){$=nt.checkMatrix($);let z=new nt(3,3);const S=this.get(0,0),D=this.get(0,1),J=this.get(0,2),Le=this.get(1,0),$e=this.get(1,1),tt=this.get(1,2),at=this.get(2,0),Ct=this.get(2,1),pt=this.get(2,2),$t=$.get(0,0),Nt=$.get(0,1),Ot=$.get(0,2),Wt=$.get(1,0),dn=$.get(1,1),St=$.get(1,2),zt=$.get(2,0),pn=$.get(2,1),Mn=$.get(2,2),En=(S+D+J-Le-$e-Ct-pt)*dn,ti=(S-Le)*(-Nt+dn),bn=$e*(-$t+Nt+Wt-dn-St-zt+Mn),Nn=(-S+Le+$e)*($t-Nt+dn),Lr=(Le+$e)*(-$t+Nt),At=S*$t,qt=(-S+at+Ct)*($t-Ot+St),yn=(-S+at)*(Ot-St),ln=(at+Ct)*(-$t+Ot),wi=(S+D+J-$e-tt-at-Ct)*St,Ci=Ct*(-$t+Ot+Wt-dn-St-zt+pn),fi=(-J+Ct+pt)*(dn+zt-pn),ai=(J-pt)*(dn-pn),Si=J*zt,za=(Ct+pt)*(-zt+pn),sa=(-J+$e+tt)*(St+zt-Mn),Ti=(J-tt)*(St-Mn),xa=($e+tt)*(-zt+Mn),wr=D*Wt,Wi=tt*pn,ni=Le*Ot,Ea=at*Nt,Vr=pt*Mn,os=At+Si+wr,fo=En+Nn+Lr+At+fi+Si+za,dl=At+qt+ln+wi+Si+sa+xa,Ql=ti+bn+Nn+At+Si+sa+Ti,Do=ti+Nn+Lr+At+Wi,ql=Si+sa+Ti+xa+ni,Tu=At+qt+yn+Ci+fi+ai+Si,qa=fi+ai+Si+za+Ea,ou=At+qt+yn+ln+Vr;return z.set(0,0,os),z.set(0,1,fo),z.set(0,2,dl),z.set(1,0,Ql),z.set(1,1,Do),z.set(1,2,ql),z.set(2,0,Tu),z.set(2,1,qa),z.set(2,2,ou),z}mmulStrassen($){$=nt.checkMatrix($);let z=this.clone(),S=z.rows,D=z.columns,J=$.rows,Le=$.columns;D!==J&&console.warn(`Multiplying ${S} x ${D} and ${J} x ${Le} matrix: dimensions do not match.`);function $e(pt,$t,Nt){let Ot=pt.rows,Wt=pt.columns;if(Ot===$t&&Wt===Nt)return pt;{let dn=O.zeros($t,Nt);return dn=dn.setSubMatrix(pt,0,0),dn}}let tt=Math.max(S,J),at=Math.max(D,Le);z=$e(z,tt,at),$=$e($,tt,at);function Ct(pt,$t,Nt,Ot){if(Nt<=512||Ot<=512)return pt.mmul($t);Nt%2===1&&Ot%2===1?(pt=$e(pt,Nt+1,Ot+1),$t=$e($t,Nt+1,Ot+1)):Nt%2===1?(pt=$e(pt,Nt+1,Ot),$t=$e($t,Nt+1,Ot)):Ot%2===1&&(pt=$e(pt,Nt,Ot+1),$t=$e($t,Nt,Ot+1));let Wt=parseInt(pt.rows/2,10),dn=parseInt(pt.columns/2,10),St=pt.subMatrix(0,Wt-1,0,dn-1),zt=$t.subMatrix(0,Wt-1,0,dn-1),pn=pt.subMatrix(0,Wt-1,dn,pt.columns-1),Mn=$t.subMatrix(0,Wt-1,dn,$t.columns-1),En=pt.subMatrix(Wt,pt.rows-1,0,dn-1),ti=$t.subMatrix(Wt,$t.rows-1,0,dn-1),bn=pt.subMatrix(Wt,pt.rows-1,dn,pt.columns-1),Nn=$t.subMatrix(Wt,$t.rows-1,dn,$t.columns-1),Lr=Ct(O.add(St,bn),O.add(zt,Nn),Wt,dn),At=Ct(O.add(En,bn),zt,Wt,dn),qt=Ct(St,O.sub(Mn,Nn),Wt,dn),yn=Ct(bn,O.sub(ti,zt),Wt,dn),ln=Ct(O.add(St,pn),Nn,Wt,dn),wi=Ct(O.sub(En,St),O.add(zt,Mn),Wt,dn),Ci=Ct(O.sub(pn,bn),O.add(ti,Nn),Wt,dn),fi=O.add(Lr,yn);fi.sub(ln),fi.add(Ci);let ai=O.add(qt,ln),Si=O.add(At,yn),za=O.sub(Lr,At);za.add(qt),za.add(wi);let sa=O.zeros(2*fi.rows,2*fi.columns);return sa=sa.setSubMatrix(fi,0,0),sa=sa.setSubMatrix(ai,fi.rows,0),sa=sa.setSubMatrix(Si,0,fi.columns),sa=sa.setSubMatrix(za,fi.rows,fi.columns),sa.subMatrix(0,Nt-1,0,Ot-1)}return Ct(z,$,tt,at)}scaleRows($={}){if(typeof $!="object")throw new TypeError("options must be an object");const{min:z=0,max:S=1}=$;if(!Number.isFinite(z))throw new TypeError("min must be a number");if(!Number.isFinite(S))throw new TypeError("max must be a number");if(z>=S)throw new RangeError("min must be smaller than max");let D=new nt(this.rows,this.columns);for(let J=0;J<this.rows;J++){const Le=this.getRow(J);Le.length>0&&Ne(Le,{min:z,max:S,output:Le}),D.setRow(J,Le)}return D}scaleColumns($={}){if(typeof $!="object")throw new TypeError("options must be an object");const{min:z=0,max:S=1}=$;if(!Number.isFinite(z))throw new TypeError("min must be a number");if(!Number.isFinite(S))throw new TypeError("max must be a number");if(z>=S)throw new RangeError("min must be smaller than max");let D=new nt(this.rows,this.columns);for(let J=0;J<this.columns;J++){const Le=this.getColumn(J);Le.length&&Ne(Le,{min:z,max:S,output:Le}),D.setColumn(J,Le)}return D}flipRows(){const $=Math.ceil(this.columns/2);for(let z=0;z<this.rows;z++)for(let S=0;S<$;S++){let D=this.get(z,S),J=this.get(z,this.columns-1-S);this.set(z,S,J),this.set(z,this.columns-1-S,D)}return this}flipColumns(){const $=Math.ceil(this.rows/2);for(let z=0;z<this.columns;z++)for(let S=0;S<$;S++){let D=this.get(S,z),J=this.get(this.rows-1-S,z);this.set(S,z,J),this.set(this.rows-1-S,z,D)}return this}kroneckerProduct($){$=nt.checkMatrix($);let z=this.rows,S=this.columns,D=$.rows,J=$.columns,Le=new nt(z*D,S*J);for(let $e=0;$e<z;$e++)for(let tt=0;tt<S;tt++)for(let at=0;at<D;at++)for(let Ct=0;Ct<J;Ct++)Le.set(D*$e+at,J*tt+Ct,this.get($e,tt)*$.get(at,Ct));return Le}kroneckerSum($){if($=nt.checkMatrix($),!this.isSquare()||!$.isSquare())throw new Error("Kronecker Sum needs two Square Matrices");let z=this.rows,S=$.rows,D=this.kroneckerProduct(nt.eye(S,S)),J=nt.eye(z,z).kroneckerProduct($);return D.add(J)}transpose(){let $=new nt(this.columns,this.rows);for(let z=0;z<this.rows;z++)for(let S=0;S<this.columns;S++)$.set(S,z,this.get(z,S));return $}sortRows($=ne){for(let z=0;z<this.rows;z++)this.setRow(z,this.getRow(z).sort($));return this}sortColumns($=ne){for(let z=0;z<this.columns;z++)this.setColumn(z,this.getColumn(z).sort($));return this}subMatrix($,z,S,D){lt(this,$,z,S,D);let J=new nt(z-$+1,D-S+1);for(let Le=$;Le<=z;Le++)for(let $e=S;$e<=D;$e++)J.set(Le-$,$e-S,this.get(Le,$e));return J}subMatrixRow($,z,S){if(z===void 0&&(z=0),S===void 0&&(S=this.columns-1),z>S||z<0||z>=this.columns||S<0||S>=this.columns)throw new RangeError("Argument out of range");let D=new nt($.length,S-z+1);for(let J=0;J<$.length;J++)for(let Le=z;Le<=S;Le++){if($[J]<0||$[J]>=this.rows)throw new RangeError(`Row index out of range: ${$[J]}`);D.set(J,Le-z,this.get($[J],Le))}return D}subMatrixColumn($,z,S){if(z===void 0&&(z=0),S===void 0&&(S=this.rows-1),z>S||z<0||z>=this.rows||S<0||S>=this.rows)throw new RangeError("Argument out of range");let D=new nt(S-z+1,$.length);for(let J=0;J<$.length;J++)for(let Le=z;Le<=S;Le++){if($[J]<0||$[J]>=this.columns)throw new RangeError(`Column index out of range: ${$[J]}`);D.set(Le-z,J,this.get(Le,$[J]))}return D}setSubMatrix($,z,S){if($=nt.checkMatrix($),$.isEmpty())return this;let D=z+$.rows-1,J=S+$.columns-1;lt(this,z,D,S,J);for(let Le=0;Le<$.rows;Le++)for(let $e=0;$e<$.columns;$e++)this.set(z+Le,S+$e,$.get(Le,$e));return this}selection($,z){rt(this,$),Et(this,z);let S=new nt($.length,z.length);for(let D=0;D<$.length;D++){let J=$[D];for(let Le=0;Le<z.length;Le++){let $e=z[Le];S.set(D,Le,this.get(J,$e))}}return S}trace(){let $=Math.min(this.rows,this.columns),z=0;for(let S=0;S<$;S++)z+=this.get(S,S);return z}clone(){return this.constructor.copy(this,new nt(this.rows,this.columns))}static copy($,z){for(const[S,D,J]of $.entries())z.set(S,D,J);return z}sum($){switch($){case"row":return We(this);case"column":return ht(this);case void 0:return Pt(this);default:throw new Error(`invalid option: ${$}`)}}product($){switch($){case"row":return Ve(this);case"column":return it(this);case void 0:return ft(this);default:throw new Error(`invalid option: ${$}`)}}mean($){const z=this.sum($);switch($){case"row":{for(let S=0;S<this.rows;S++)z[S]/=this.columns;return z}case"column":{for(let S=0;S<this.columns;S++)z[S]/=this.rows;return z}case void 0:return z/this.size;default:throw new Error(`invalid option: ${$}`)}}variance($,z={}){if(typeof $=="object"&&(z=$,$=void 0),typeof z!="object")throw new TypeError("options must be an object");const{unbiased:S=!0,mean:D=this.mean($)}=z;if(typeof S!="boolean")throw new TypeError("unbiased must be a boolean");switch($){case"row":{if(!Ue.isAnyArray(D))throw new TypeError("mean must be an array");return ze(this,S,D)}case"column":{if(!Ue.isAnyArray(D))throw new TypeError("mean must be an array");return Qe(this,S,D)}case void 0:{if(typeof D!="number")throw new TypeError("mean must be a number");return Se(this,S,D)}default:throw new Error(`invalid option: ${$}`)}}standardDeviation($,z){typeof $=="object"&&(z=$,$=void 0);const S=this.variance($,z);if($===void 0)return Math.sqrt(S);for(let D=0;D<S.length;D++)S[D]=Math.sqrt(S[D]);return S}center($,z={}){if(typeof $=="object"&&(z=$,$=void 0),typeof z!="object")throw new TypeError("options must be an object");const{center:S=this.mean($)}=z;switch($){case"row":{if(!Ue.isAnyArray(S))throw new TypeError("center must be an array");return E(this,S),this}case"column":{if(!Ue.isAnyArray(S))throw new TypeError("center must be an array");return me(this,S),this}case void 0:{if(typeof S!="number")throw new TypeError("center must be a number");return L(this,S),this}default:throw new Error(`invalid option: ${$}`)}}scale($,z={}){if(typeof $=="object"&&(z=$,$=void 0),typeof z!="object")throw new TypeError("options must be an object");let S=z.scale;switch($){case"row":{if(S===void 0)S=X(this);else if(!Ue.isAnyArray(S))throw new TypeError("scale must be an array");return Ke(this,S),this}case"column":{if(S===void 0)S=ot(this);else if(!Ue.isAnyArray(S))throw new TypeError("scale must be an array");return pe(this,S),this}case void 0:{if(S===void 0)S=xe(this);else if(typeof S!="number")throw new TypeError("scale must be a number");return Ze(this,S),this}default:throw new Error(`invalid option: ${$}`)}}toString($){return Me(this,$)}[Symbol.iterator](){return this.entries()}*entries(){for(let $=0;$<this.rows;$++)for(let z=0;z<this.columns;z++)yield[$,z,this.get($,z)]}*values(){for(let $=0;$<this.rows;$++)for(let z=0;z<this.columns;z++)yield this.get($,z)}}O.prototype.klass="Matrix",typeof Symbol!="undefined"&&(O.prototype[Symbol.for("nodejs.util.inspect.custom")]=Ce);function ne(Ae,$){return Ae-$}function qe(Ae){return Ae.every($=>typeof $=="number")}O.random=O.rand,O.randomInt=O.randInt,O.diagonal=O.diag,O.prototype.diagonal=O.prototype.diag,O.identity=O.eye,O.prototype.negate=O.prototype.neg,O.prototype.tensorProduct=O.prototype.kroneckerProduct;const dt=class iO extends O{constructor($,z){if(super(),F(this,K),I(this,"data"),iO.isMatrix($))W(this,K,ge).call(this,$.rows,$.columns),iO.copy($,this);else if(Number.isInteger($)&&$>=0)W(this,K,ge).call(this,$,z);else if(Ue.isAnyArray($)){const S=$;if($=S.length,z=$?S[0].length:0,typeof z!="number")throw new TypeError("Data must be a 2D array with at least one element");this.data=[];for(let D=0;D<$;D++){if(S[D].length!==z)throw new RangeError("Inconsistent array dimensions");if(!qe(S[D]))throw new TypeError("Input data contains non-numeric values");this.data.push(Float64Array.from(S[D]))}this.rows=$,this.columns=z}else throw new TypeError("First argument must be a positive number or an array")}set($,z,S){return this.data[$][z]=S,this}get($,z){return this.data[$][z]}removeRow($){return Ee(this,$),this.data.splice($,1),this.rows-=1,this}addRow($,z){return z===void 0&&(z=$,$=this.rows),Ee(this,$,!0),z=Float64Array.from(Je(this,z)),this.data.splice($,0,z),this.rows+=1,this}removeColumn($){Te(this,$);for(let z=0;z<this.rows;z++){const S=new Float64Array(this.columns-1);for(let D=0;D<$;D++)S[D]=this.data[z][D];for(let D=$+1;D<this.columns;D++)S[D-1]=this.data[z][D];this.data[z]=S}return this.columns-=1,this}addColumn($,z){typeof z=="undefined"&&(z=$,$=this.columns),Te(this,$,!0),z=He(this,z);for(let S=0;S<this.rows;S++){const D=new Float64Array(this.columns+1);let J=0;for(;J<$;J++)D[J]=this.data[S][J];for(D[J++]=z[S];J<this.columns+1;J++)D[J]=this.data[S][J-1];this.data[S]=D}return this.columns+=1,this}};K=new WeakSet,ge=function(Ae,$){if(this.data=[],Number.isInteger($)&&$>=0)for(let z=0;z<Ae;z++)this.data.push(new Float64Array($));else throw new TypeError("nColumns must be a positive integer");this.rows=Ae,this.columns=$};let nt=dt;ce(O,nt);const xt=class aO extends O{constructor($){if(super(),F(this,be),nt.isMatrix($)){if(!$.isSymmetric())throw new TypeError("not symmetric data");P(this,be,nt.copy($,new nt($.rows,$.rows)))}else if(Number.isInteger($)&&$>=0)P(this,be,new nt($,$));else if(P(this,be,new nt($)),!this.isSymmetric())throw new TypeError("not symmetric data")}get size(){return A(this,be).size}get rows(){return A(this,be).rows}get columns(){return A(this,be).columns}get diagonalSize(){return this.rows}static isSymmetricMatrix($){return nt.isMatrix($)&&$.klassType==="SymmetricMatrix"}static zeros($){return new this($)}static ones($){return new this($).fill(1)}clone(){const $=new aO(this.diagonalSize);for(const[z,S,D]of this.upperRightEntries())$.set(z,S,D);return $}toMatrix(){return new nt(this)}get($,z){return A(this,be).get($,z)}set($,z,S){return A(this,be).set($,z,S),A(this,be).set(z,$,S),this}removeCross($){return A(this,be).removeRow($),A(this,be).removeColumn($),this}addCross($,z){z===void 0&&(z=$,$=this.diagonalSize);const S=z.slice();return S.splice($,1),A(this,be).addRow($,S),A(this,be).addColumn($,z),this}applyMask($){if($.length!==this.diagonalSize)throw new RangeError("Mask size do not match with matrix size");const z=[];for(const[S,D]of $.entries())D||z.push(S);z.reverse();for(const S of z)this.removeCross(S);return this}toCompact(){const{diagonalSize:$}=this,z=new Array($*($+1)/2);for(let S=0,D=0,J=0;J<z.length;J++)z[J]=this.get(D,S),++S>=$&&(S=++D);return z}static fromCompact($){const z=$.length,S=(Math.sqrt(8*z+1)-1)/2;if(!Number.isInteger(S))throw new TypeError(`This array is not a compact representation of a Symmetric Matrix, ${JSON.stringify($)}`);const D=new aO(S);for(let J=0,Le=0,$e=0;$e<z;$e++)D.set(J,Le,$[$e]),++J>=S&&(J=++Le);return D}*upperRightEntries(){for(let $=0,z=0;$<this.diagonalSize;void 0){const S=this.get($,z);yield[$,z,S],++z>=this.diagonalSize&&(z=++$)}}*upperRightValues(){for(let $=0,z=0;$<this.diagonalSize;void 0)yield this.get($,z),++z>=this.diagonalSize&&(z=++$)}};be=new WeakMap;let bt=xt;bt.prototype.klassType="SymmetricMatrix";class wt extends bt{static isDistanceMatrix($){return bt.isSymmetricMatrix($)&&$.klassSubType==="DistanceMatrix"}constructor($){if(super($),!this.isDistance())throw new TypeError("Provided arguments do no produce a distance matrix")}set($,z,S){return $===z&&(S=0),super.set($,z,S)}addCross($,z){return z===void 0&&(z=$,$=this.diagonalSize),z=z.slice(),z[$]=0,super.addCross($,z)}toSymmetricMatrix(){return new bt(this)}clone(){const $=new wt(this.diagonalSize);for(const[z,S,D]of this.upperRightEntries())z!==S&&$.set(z,S,D);return $}toCompact(){const{diagonalSize:$}=this,z=($-1)*$/2,S=new Array(z);for(let D=1,J=0,Le=0;Le<S.length;Le++)S[Le]=this.get(J,D),++D>=$&&(D=++J+1);return S}static fromCompact($){const z=$.length;if(z===0)return new this(0);const S=(Math.sqrt(8*z+1)+1)/2;if(!Number.isInteger(S))throw new TypeError(`This array is not a compact representation of a DistanceMatrix, ${JSON.stringify($)}`);const D=new this(S);for(let J=1,Le=0,$e=0;$e<z;$e++)D.set(J,Le,$[$e]),++J>=S&&(J=++Le+1);return D}}wt.prototype.klassSubType="DistanceMatrix";class we extends O{constructor($,z,S){super(),this.matrix=$,this.rows=z,this.columns=S}}class oe extends we{constructor($,z){Te($,z),super($,$.rows,1),this.column=z}set($,z,S){return this.matrix.set($,this.column,S),this}get($){return this.matrix.get($,this.column)}}class Fe extends we{constructor($,z){Et($,z),super($,$.rows,z.length),this.columnIndices=z}set($,z,S){return this.matrix.set($,this.columnIndices[z],S),this}get($,z){return this.matrix.get($,this.columnIndices[z])}}class Ye extends we{constructor($){super($,$.rows,$.columns)}set($,z,S){return this.matrix.set($,this.columns-z-1,S),this}get($,z){return this.matrix.get($,this.columns-z-1)}}class ie extends we{constructor($){super($,$.rows,$.columns)}set($,z,S){return this.matrix.set(this.rows-$-1,z,S),this}get($,z){return this.matrix.get(this.rows-$-1,z)}}class Ie extends we{constructor($,z){Ee($,z),super($,1,$.columns),this.row=z}set($,z,S){return this.matrix.set(this.row,z,S),this}get($,z){return this.matrix.get(this.row,z)}}class je extends we{constructor($,z){rt($,z),super($,z.length,$.columns),this.rowIndices=z}set($,z,S){return this.matrix.set(this.rowIndices[$],z,S),this}get($,z){return this.matrix.get(this.rowIndices[$],z)}}class Be extends we{constructor($,z,S){rt($,z),Et($,S),super($,z.length,S.length),this.rowIndices=z,this.columnIndices=S}set($,z,S){return this.matrix.set(this.rowIndices[$],this.columnIndices[z],S),this}get($,z){return this.matrix.get(this.rowIndices[$],this.columnIndices[z])}}class et extends we{constructor($,z,S,D,J){lt($,z,S,D,J),super($,S-z+1,J-D+1),this.startRow=z,this.startColumn=D}set($,z,S){return this.matrix.set(this.startRow+$,this.startColumn+z,S),this}get($,z){return this.matrix.get(this.startRow+$,this.startColumn+z)}}class gt extends we{constructor($){super($,$.columns,$.rows)}set($,z,S){return this.matrix.set(z,$,S),this}get($,z){return this.matrix.get(z,$)}}class Mt extends O{constructor($,z={}){const{rows:S=1}=z;if($.length%S!==0)throw new Error("the data length is not divisible by the number of rows");super(),this.rows=S,this.columns=$.length/S,this.data=$}set($,z,S){let D=this._calculateIndex($,z);return this.data[D]=S,this}get($,z){let S=this._calculateIndex($,z);return this.data[S]}_calculateIndex($,z){return $*this.columns+z}}class Rt extends O{constructor($){super(),this.data=$,this.rows=$.length,this.columns=$[0].length}set($,z,S){return this.data[$][z]=S,this}get($,z){return this.data[$][z]}}function Ft(Ae,$){if(Ue.isAnyArray(Ae))return Ae[0]&&Ue.isAnyArray(Ae[0])?new Rt(Ae):new Mt(Ae,$);throw new Error("the argument is not an array")}class Xt{constructor($){$=Rt.checkMatrix($);let z=$.clone(),S=z.rows,D=z.columns,J=new Float64Array(S),Le=1,$e,tt,at,Ct,pt,$t,Nt,Ot,Wt;for($e=0;$e<S;$e++)J[$e]=$e;for(Ot=new Float64Array(S),tt=0;tt<D;tt++){for($e=0;$e<S;$e++)Ot[$e]=z.get($e,tt);for($e=0;$e<S;$e++){for(Wt=Math.min($e,tt),pt=0,at=0;at<Wt;at++)pt+=z.get($e,at)*Ot[at];Ot[$e]-=pt,z.set($e,tt,Ot[$e])}for(Ct=tt,$e=tt+1;$e<S;$e++)Math.abs(Ot[$e])>Math.abs(Ot[Ct])&&(Ct=$e);if(Ct!==tt){for(at=0;at<D;at++)$t=z.get(Ct,at),z.set(Ct,at,z.get(tt,at)),z.set(tt,at,$t);Nt=J[Ct],J[Ct]=J[tt],J[tt]=Nt,Le=-Le}if(tt<S&&z.get(tt,tt)!==0)for($e=tt+1;$e<S;$e++)z.set($e,tt,z.get($e,tt)/z.get(tt,tt))}this.LU=z,this.pivotVector=J,this.pivotSign=Le}isSingular(){let $=this.LU,z=$.columns;for(let S=0;S<z;S++)if($.get(S,S)===0)return!0;return!1}solve($){$=nt.checkMatrix($);let z=this.LU;if(z.rows!==$.rows)throw new Error("Invalid matrix dimensions");if(this.isSingular())throw new Error("LU matrix is singular");let D=$.columns,J=$.subMatrixRow(this.pivotVector,0,D-1),Le=z.columns,$e,tt,at;for(at=0;at<Le;at++)for($e=at+1;$e<Le;$e++)for(tt=0;tt<D;tt++)J.set($e,tt,J.get($e,tt)-J.get(at,tt)*z.get($e,at));for(at=Le-1;at>=0;at--){for(tt=0;tt<D;tt++)J.set(at,tt,J.get(at,tt)/z.get(at,at));for($e=0;$e<at;$e++)for(tt=0;tt<D;tt++)J.set($e,tt,J.get($e,tt)-J.get(at,tt)*z.get($e,at))}return J}get determinant(){let $=this.LU;if(!$.isSquare())throw new Error("Matrix must be square");let z=this.pivotSign,S=$.columns;for(let D=0;D<S;D++)z*=$.get(D,D);return z}get lowerTriangularMatrix(){let $=this.LU,z=$.rows,S=$.columns,D=new nt(z,S);for(let J=0;J<z;J++)for(let Le=0;Le<S;Le++)J>Le?D.set(J,Le,$.get(J,Le)):J===Le?D.set(J,Le,1):D.set(J,Le,0);return D}get upperTriangularMatrix(){let $=this.LU,z=$.rows,S=$.columns,D=new nt(z,S);for(let J=0;J<z;J++)for(let Le=0;Le<S;Le++)J<=Le?D.set(J,Le,$.get(J,Le)):D.set(J,Le,0);return D}get pivotPermutationVector(){return Array.from(this.pivotVector)}}function Qt(Ae,$){let z=0;return Math.abs(Ae)>Math.abs($)?(z=$/Ae,Math.abs(Ae)*Math.sqrt(1+z*z)):$!==0?(z=Ae/$,Math.abs($)*Math.sqrt(1+z*z)):0}class an{constructor($){$=Rt.checkMatrix($);let z=$.clone(),S=$.rows,D=$.columns,J=new Float64Array(D),Le,$e,tt,at;for(tt=0;tt<D;tt++){let Ct=0;for(Le=tt;Le<S;Le++)Ct=Qt(Ct,z.get(Le,tt));if(Ct!==0){for(z.get(tt,tt)<0&&(Ct=-Ct),Le=tt;Le<S;Le++)z.set(Le,tt,z.get(Le,tt)/Ct);for(z.set(tt,tt,z.get(tt,tt)+1),$e=tt+1;$e<D;$e++){for(at=0,Le=tt;Le<S;Le++)at+=z.get(Le,tt)*z.get(Le,$e);for(at=-at/z.get(tt,tt),Le=tt;Le<S;Le++)z.set(Le,$e,z.get(Le,$e)+at*z.get(Le,tt))}}J[tt]=-Ct}this.QR=z,this.Rdiag=J}solve($){$=nt.checkMatrix($);let z=this.QR,S=z.rows;if($.rows!==S)throw new Error("Matrix row dimensions must agree");if(!this.isFullRank())throw new Error("Matrix is rank deficient");let D=$.columns,J=$.clone(),Le=z.columns,$e,tt,at,Ct;for(at=0;at<Le;at++)for(tt=0;tt<D;tt++){for(Ct=0,$e=at;$e<S;$e++)Ct+=z.get($e,at)*J.get($e,tt);for(Ct=-Ct/z.get(at,at),$e=at;$e<S;$e++)J.set($e,tt,J.get($e,tt)+Ct*z.get($e,at))}for(at=Le-1;at>=0;at--){for(tt=0;tt<D;tt++)J.set(at,tt,J.get(at,tt)/this.Rdiag[at]);for($e=0;$e<at;$e++)for(tt=0;tt<D;tt++)J.set($e,tt,J.get($e,tt)-J.get(at,tt)*z.get($e,at))}return J.subMatrix(0,Le-1,0,D-1)}isFullRank(){let $=this.QR.columns;for(let z=0;z<$;z++)if(this.Rdiag[z]===0)return!1;return!0}get upperTriangularMatrix(){let $=this.QR,z=$.columns,S=new nt(z,z),D,J;for(D=0;D<z;D++)for(J=0;J<z;J++)D<J?S.set(D,J,$.get(D,J)):D===J?S.set(D,J,this.Rdiag[D]):S.set(D,J,0);return S}get orthogonalMatrix(){let $=this.QR,z=$.rows,S=$.columns,D=new nt(z,S),J,Le,$e,tt;for($e=S-1;$e>=0;$e--){for(J=0;J<z;J++)D.set(J,$e,0);for(D.set($e,$e,1),Le=$e;Le<S;Le++)if($.get($e,$e)!==0){for(tt=0,J=$e;J<z;J++)tt+=$.get(J,$e)*D.get(J,Le);for(tt=-tt/$.get($e,$e),J=$e;J<z;J++)D.set(J,Le,D.get(J,Le)+tt*$.get(J,$e))}}return D}}class In{constructor($,z={}){if($=Rt.checkMatrix($),$.isEmpty())throw new Error("Matrix must be non-empty");let S=$.rows,D=$.columns;const{computeLeftSingularVectors:J=!0,computeRightSingularVectors:Le=!0,autoTranspose:$e=!1}=z;let tt=!!J,at=!!Le,Ct=!1,pt;if(S<D)if(!$e)pt=$.clone(),console.warn("Computing SVD on a matrix with more columns than rows. Consider enabling autoTranspose");else{pt=$.transpose(),S=pt.rows,D=pt.columns,Ct=!0;let At=tt;tt=at,at=At}else pt=$.clone();let $t=Math.min(S,D),Nt=Math.min(S+1,D),Ot=new Float64Array(Nt),Wt=new nt(S,$t),dn=new nt(D,D),St=new Float64Array(D),zt=new Float64Array(S),pn=new Float64Array(Nt);for(let At=0;At<Nt;At++)pn[At]=At;let Mn=Math.min(S-1,D),En=Math.max(0,Math.min(D-2,S)),ti=Math.max(Mn,En);for(let At=0;At<ti;At++){if(At<Mn){Ot[At]=0;for(let qt=At;qt<S;qt++)Ot[At]=Qt(Ot[At],pt.get(qt,At));if(Ot[At]!==0){pt.get(At,At)<0&&(Ot[At]=-Ot[At]);for(let qt=At;qt<S;qt++)pt.set(qt,At,pt.get(qt,At)/Ot[At]);pt.set(At,At,pt.get(At,At)+1)}Ot[At]=-Ot[At]}for(let qt=At+1;qt<D;qt++){if(At<Mn&&Ot[At]!==0){let yn=0;for(let ln=At;ln<S;ln++)yn+=pt.get(ln,At)*pt.get(ln,qt);yn=-yn/pt.get(At,At);for(let ln=At;ln<S;ln++)pt.set(ln,qt,pt.get(ln,qt)+yn*pt.get(ln,At))}St[qt]=pt.get(At,qt)}if(tt&&At<Mn)for(let qt=At;qt<S;qt++)Wt.set(qt,At,pt.get(qt,At));if(At<En){St[At]=0;for(let qt=At+1;qt<D;qt++)St[At]=Qt(St[At],St[qt]);if(St[At]!==0){St[At+1]<0&&(St[At]=0-St[At]);for(let qt=At+1;qt<D;qt++)St[qt]/=St[At];St[At+1]+=1}if(St[At]=-St[At],At+1<S&&St[At]!==0){for(let qt=At+1;qt<S;qt++)zt[qt]=0;for(let qt=At+1;qt<S;qt++)for(let yn=At+1;yn<D;yn++)zt[qt]+=St[yn]*pt.get(qt,yn);for(let qt=At+1;qt<D;qt++){let yn=-St[qt]/St[At+1];for(let ln=At+1;ln<S;ln++)pt.set(ln,qt,pt.get(ln,qt)+yn*zt[ln])}}if(at)for(let qt=At+1;qt<D;qt++)dn.set(qt,At,St[qt])}}let bn=Math.min(D,S+1);if(Mn<D&&(Ot[Mn]=pt.get(Mn,Mn)),S<bn&&(Ot[bn-1]=0),En+1<bn&&(St[En]=pt.get(En,bn-1)),St[bn-1]=0,tt){for(let At=Mn;At<$t;At++){for(let qt=0;qt<S;qt++)Wt.set(qt,At,0);Wt.set(At,At,1)}for(let At=Mn-1;At>=0;At--)if(Ot[At]!==0){for(let qt=At+1;qt<$t;qt++){let yn=0;for(let ln=At;ln<S;ln++)yn+=Wt.get(ln,At)*Wt.get(ln,qt);yn=-yn/Wt.get(At,At);for(let ln=At;ln<S;ln++)Wt.set(ln,qt,Wt.get(ln,qt)+yn*Wt.get(ln,At))}for(let qt=At;qt<S;qt++)Wt.set(qt,At,-Wt.get(qt,At));Wt.set(At,At,1+Wt.get(At,At));for(let qt=0;qt<At-1;qt++)Wt.set(qt,At,0)}else{for(let qt=0;qt<S;qt++)Wt.set(qt,At,0);Wt.set(At,At,1)}}if(at)for(let At=D-1;At>=0;At--){if(At<En&&St[At]!==0)for(let qt=At+1;qt<D;qt++){let yn=0;for(let ln=At+1;ln<D;ln++)yn+=dn.get(ln,At)*dn.get(ln,qt);yn=-yn/dn.get(At+1,At);for(let ln=At+1;ln<D;ln++)dn.set(ln,qt,dn.get(ln,qt)+yn*dn.get(ln,At))}for(let qt=0;qt<D;qt++)dn.set(qt,At,0);dn.set(At,At,1)}let Nn=bn-1,Lr=Number.EPSILON;for(;bn>0;){let At,qt;for(At=bn-2;At>=-1&&At!==-1;At--){const yn=Number.MIN_VALUE+Lr*Math.abs(Ot[At]+Math.abs(Ot[At+1]));if(Math.abs(St[At])<=yn||Number.isNaN(St[At])){St[At]=0;break}}if(At===bn-2)qt=4;else{let yn;for(yn=bn-1;yn>=At&&yn!==At;yn--){let ln=(yn!==bn?Math.abs(St[yn]):0)+(yn!==At+1?Math.abs(St[yn-1]):0);if(Math.abs(Ot[yn])<=Lr*ln){Ot[yn]=0;break}}yn===At?qt=3:yn===bn-1?qt=1:(qt=2,At=yn)}switch(At++,qt){case 1:{let yn=St[bn-2];St[bn-2]=0;for(let ln=bn-2;ln>=At;ln--){let wi=Qt(Ot[ln],yn),Ci=Ot[ln]/wi,fi=yn/wi;if(Ot[ln]=wi,ln!==At&&(yn=-fi*St[ln-1],St[ln-1]=Ci*St[ln-1]),at)for(let ai=0;ai<D;ai++)wi=Ci*dn.get(ai,ln)+fi*dn.get(ai,bn-1),dn.set(ai,bn-1,-fi*dn.get(ai,ln)+Ci*dn.get(ai,bn-1)),dn.set(ai,ln,wi)}break}case 2:{let yn=St[At-1];St[At-1]=0;for(let ln=At;ln<bn;ln++){let wi=Qt(Ot[ln],yn),Ci=Ot[ln]/wi,fi=yn/wi;if(Ot[ln]=wi,yn=-fi*St[ln],St[ln]=Ci*St[ln],tt)for(let ai=0;ai<S;ai++)wi=Ci*Wt.get(ai,ln)+fi*Wt.get(ai,At-1),Wt.set(ai,At-1,-fi*Wt.get(ai,ln)+Ci*Wt.get(ai,At-1)),Wt.set(ai,ln,wi)}break}case 3:{const yn=Math.max(Math.abs(Ot[bn-1]),Math.abs(Ot[bn-2]),Math.abs(St[bn-2]),Math.abs(Ot[At]),Math.abs(St[At])),ln=Ot[bn-1]/yn,wi=Ot[bn-2]/yn,Ci=St[bn-2]/yn,fi=Ot[At]/yn,ai=St[At]/yn,Si=((wi+ln)*(wi-ln)+Ci*Ci)/2,za=ln*Ci*(ln*Ci);let sa=0;(Si!==0||za!==0)&&(Si<0?sa=0-Math.sqrt(Si*Si+za):sa=Math.sqrt(Si*Si+za),sa=za/(Si+sa));let Ti=(fi+ln)*(fi-ln)+sa,xa=fi*ai;for(let wr=At;wr<bn-1;wr++){let Wi=Qt(Ti,xa);Wi===0&&(Wi=Number.MIN_VALUE);let ni=Ti/Wi,Ea=xa/Wi;if(wr!==At&&(St[wr-1]=Wi),Ti=ni*Ot[wr]+Ea*St[wr],St[wr]=ni*St[wr]-Ea*Ot[wr],xa=Ea*Ot[wr+1],Ot[wr+1]=ni*Ot[wr+1],at)for(let Vr=0;Vr<D;Vr++)Wi=ni*dn.get(Vr,wr)+Ea*dn.get(Vr,wr+1),dn.set(Vr,wr+1,-Ea*dn.get(Vr,wr)+ni*dn.get(Vr,wr+1)),dn.set(Vr,wr,Wi);if(Wi=Qt(Ti,xa),Wi===0&&(Wi=Number.MIN_VALUE),ni=Ti/Wi,Ea=xa/Wi,Ot[wr]=Wi,Ti=ni*St[wr]+Ea*Ot[wr+1],Ot[wr+1]=-Ea*St[wr]+ni*Ot[wr+1],xa=Ea*St[wr+1],St[wr+1]=ni*St[wr+1],tt&&wr<S-1)for(let Vr=0;Vr<S;Vr++)Wi=ni*Wt.get(Vr,wr)+Ea*Wt.get(Vr,wr+1),Wt.set(Vr,wr+1,-Ea*Wt.get(Vr,wr)+ni*Wt.get(Vr,wr+1)),Wt.set(Vr,wr,Wi)}St[bn-2]=Ti;break}case 4:{if(Ot[At]<=0&&(Ot[At]=Ot[At]<0?-Ot[At]:0,at))for(let yn=0;yn<=Nn;yn++)dn.set(yn,At,-dn.get(yn,At));for(;At<Nn&&!(Ot[At]>=Ot[At+1]);){let yn=Ot[At];if(Ot[At]=Ot[At+1],Ot[At+1]=yn,at&&At<D-1)for(let ln=0;ln<D;ln++)yn=dn.get(ln,At+1),dn.set(ln,At+1,dn.get(ln,At)),dn.set(ln,At,yn);if(tt&&At<S-1)for(let ln=0;ln<S;ln++)yn=Wt.get(ln,At+1),Wt.set(ln,At+1,Wt.get(ln,At)),Wt.set(ln,At,yn);At++}bn--;break}}}if(Ct){let At=dn;dn=Wt,Wt=At}this.m=S,this.n=D,this.s=Ot,this.U=Wt,this.V=dn}solve($){let z=$,S=this.threshold,D=this.s.length,J=nt.zeros(D,D);for(let $t=0;$t<D;$t++)Math.abs(this.s[$t])<=S?J.set($t,$t,0):J.set($t,$t,1/this.s[$t]);let Le=this.U,$e=this.rightSingularVectors,tt=$e.mmul(J),at=$e.rows,Ct=Le.rows,pt=nt.zeros(at,Ct);for(let $t=0;$t<at;$t++)for(let Nt=0;Nt<Ct;Nt++){let Ot=0;for(let Wt=0;Wt<D;Wt++)Ot+=tt.get($t,Wt)*Le.get(Nt,Wt);pt.set($t,Nt,Ot)}return pt.mmul(z)}solveForDiagonal($){return this.solve(nt.diag($))}inverse(){let $=this.V,z=this.threshold,S=$.rows,D=$.columns,J=new nt(S,this.s.length);for(let Ct=0;Ct<S;Ct++)for(let pt=0;pt<D;pt++)Math.abs(this.s[pt])>z&&J.set(Ct,pt,$.get(Ct,pt)/this.s[pt]);let Le=this.U,$e=Le.rows,tt=Le.columns,at=new nt(S,$e);for(let Ct=0;Ct<S;Ct++)for(let pt=0;pt<$e;pt++){let $t=0;for(let Nt=0;Nt<tt;Nt++)$t+=J.get(Ct,Nt)*Le.get(pt,Nt);at.set(Ct,pt,$t)}return at}get condition(){return this.s[0]/this.s[Math.min(this.m,this.n)-1]}get norm2(){return this.s[0]}get rank(){let $=Math.max(this.m,this.n)*this.s[0]*Number.EPSILON,z=0,S=this.s;for(let D=0,J=S.length;D<J;D++)S[D]>$&&z++;return z}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 nt.diag(this.s)}}function Xr(Ae,$=!1){return Ae=Rt.checkMatrix(Ae),$?new In(Ae).inverse():Cn(Ae,nt.eye(Ae.rows))}function Cn(Ae,$,z=!1){return Ae=Rt.checkMatrix(Ae),$=Rt.checkMatrix($),z?new In(Ae).solve($):Ae.isSquare()?new Xt(Ae).solve($):new an(Ae).solve($)}function or(Ae){if(Ae=nt.checkMatrix(Ae),Ae.isSquare()){if(Ae.columns===0)return 1;let $,z,S,D;if(Ae.columns===2)return $=Ae.get(0,0),z=Ae.get(0,1),S=Ae.get(1,0),D=Ae.get(1,1),$*D-z*S;if(Ae.columns===3){let J,Le,$e;return J=new Be(Ae,[1,2],[1,2]),Le=new Be(Ae,[1,2],[0,2]),$e=new Be(Ae,[1,2],[0,1]),$=Ae.get(0,0),z=Ae.get(0,1),S=Ae.get(0,2),$*or(J)-z*or(Le)+S*or($e)}else return new Xt(Ae).determinant}else throw Error("determinant can only be calculated for a square matrix")}function ei(Ae,$){let z=[];for(let S=0;S<Ae;S++)S!==$&&z.push(S);return z}function mr(Ae,$,z,S=1e-9,D=1e-9){if(Ae>D)return new Array($.rows+1).fill(0);{let J=$.addRow(z,[0]);for(let Le=0;Le<J.rows;Le++)Math.abs(J.get(Le,0))<S&&J.set(Le,0,0);return J.to1DArray()}}function Fr(Ae,$={}){const{thresholdValue:z=1e-9,thresholdError:S=1e-9}=$;Ae=nt.checkMatrix(Ae);let D=Ae.rows,J=new nt(D,D);for(let Le=0;Le<D;Le++){let $e=nt.columnVector(Ae.getRow(Le)),tt=Ae.subMatrixRow(ei(D,Le)).transpose(),Ct=new In(tt).solve($e),pt=nt.sub($e,tt.mmul(Ct)).abs().max();J.setRow(Le,mr(pt,Ct,Le,z,S))}return J}function ta(Ae,$=Number.EPSILON){if(Ae=nt.checkMatrix(Ae),Ae.isEmpty())return Ae.transpose();let z=new In(Ae,{autoTranspose:!0}),S=z.leftSingularVectors,D=z.rightSingularVectors,J=z.diagonal;for(let Le=0;Le<J.length;Le++)Math.abs(J[Le])>$?J[Le]=1/J[Le]:J[Le]=0;return D.mmul(nt.diag(J).mmul(S.transpose()))}function Qa(Ae,$=Ae,z={}){Ae=new nt(Ae);let S=!1;if(typeof $=="object"&&!nt.isMatrix($)&&!Ue.isAnyArray($)?(z=$,$=Ae,S=!0):$=new nt($),Ae.rows!==$.rows)throw new TypeError("Both matrices must have the same number of rows");const{center:D=!0}=z;D&&(Ae=Ae.center("column"),S||($=$.center("column")));const J=Ae.transpose().mmul($);for(let Le=0;Le<J.rows;Le++)for(let $e=0;$e<J.columns;$e++)J.set(Le,$e,J.get(Le,$e)*(1/(Ae.rows-1)));return J}function Bt(Ae,$=Ae,z={}){Ae=new nt(Ae);let S=!1;if(typeof $=="object"&&!nt.isMatrix($)&&!Ue.isAnyArray($)?(z=$,$=Ae,S=!0):$=new nt($),Ae.rows!==$.rows)throw new TypeError("Both matrices must have the same number of rows");const{center:D=!0,scale:J=!0}=z;D&&(Ae.center("column"),S||$.center("column")),J&&(Ae.scale("column"),S||$.scale("column"));const Le=Ae.standardDeviation("column",{unbiased:!0}),$e=S?Le:$.standardDeviation("column",{unbiased:!0}),tt=Ae.transpose().mmul($);for(let at=0;at<tt.rows;at++)for(let Ct=0;Ct<tt.columns;Ct++)tt.set(at,Ct,tt.get(at,Ct)*(1/(Le[at]*$e[Ct]))*(1/(Ae.rows-1)));return tt}class en{constructor($,z={}){const{assumeSymmetric:S=!1}=z;if($=Rt.checkMatrix($),!$.isSquare())throw new Error("Matrix is not a square matrix");if($.isEmpty())throw new Error("Matrix must be non-empty");let D=$.columns,J=new nt(D,D),Le=new Float64Array(D),$e=new Float64Array(D),tt=$,at,Ct,pt=!1;if(S?pt=!0:pt=$.isSymmetric(),pt){for(at=0;at<D;at++)for(Ct=0;Ct<D;Ct++)J.set(at,Ct,tt.get(at,Ct));Jt(D,$e,Le,J),nn(D,$e,Le,J)}else{let $t=new nt(D,D),Nt=new Float64Array(D);for(Ct=0;Ct<D;Ct++)for(at=0;at<D;at++)$t.set(at,Ct,tt.get(at,Ct));sr(D,$t,Nt,J),Pn(D,$e,Le,J,$t)}this.n=D,this.e=$e,this.d=Le,this.V=J}get realEigenvalues(){return Array.from(this.d)}get imaginaryEigenvalues(){return Array.from(this.e)}get eigenvectorMatrix(){return this.V}get diagonalMatrix(){let $=this.n,z=this.e,S=this.d,D=new nt($,$),J,Le;for(J=0;J<$;J++){for(Le=0;Le<$;Le++)D.set(J,Le,0);D.set(J,J,S[J]),z[J]>0?D.set(J,J+1,z[J]):z[J]<0&&D.set(J,J-1,z[J])}return D}}function Jt(Ae,$,z,S){let D,J,Le,$e,tt,at,Ct,pt;for(tt=0;tt<Ae;tt++)z[tt]=S.get(Ae-1,tt);for($e=Ae-1;$e>0;$e--){for(pt=0,Le=0,at=0;at<$e;at++)pt=pt+Math.abs(z[at]);if(pt===0)for($[$e]=z[$e-1],tt=0;tt<$e;tt++)z[tt]=S.get($e-1,tt),S.set($e,tt,0),S.set(tt,$e,0);else{for(at=0;at<$e;at++)z[at]/=pt,Le+=z[at]*z[at];for(D=z[$e-1],J=Math.sqrt(Le),D>0&&(J=-J),$[$e]=pt*J,Le=Le-D*J,z[$e-1]=D-J,tt=0;tt<$e;tt++)$[tt]=0;for(tt=0;tt<$e;tt++){for(D=z[tt],S.set(tt,$e,D),J=$[tt]+S.get(tt,tt)*D,at=tt+1;at<=$e-1;at++)J+=S.get(at,tt)*z[at],$[at]+=S.get(at,tt)*D;$[tt]=J}for(D=0,tt=0;tt<$e;tt++)$[tt]/=Le,D+=$[tt]*z[tt];for(Ct=D/(Le+Le),tt=0;tt<$e;tt++)$[tt]-=Ct*z[tt];for(tt=0;tt<$e;tt++){for(D=z[tt],J=$[tt],at=tt;at<=$e-1;at++)S.set(at,tt,S.get(at,tt)-(D*$[at]+J*z[at]));z[tt]=S.get($e-1,tt),S.set($e,tt,0)}}z[$e]=Le}for($e=0;$e<Ae-1;$e++){if(S.set(Ae-1,$e,S.get($e,$e)),S.set($e,$e,1),Le=z[$e+1],Le!==0){for(at=0;at<=$e;at++)z[at]=S.get(at,$e+1)/Le;for(tt=0;tt<=$e;tt++){for(J=0,at=0;at<=$e;at++)J+=S.get(at,$e+1)*S.get(at,tt);for(at=0;at<=$e;at++)S.set(at,tt,S.get(at,tt)-J*z[at])}}for(at=0;at<=$e;at++)S.set(at,$e+1,0)}for(tt=0;tt<Ae;tt++)z[tt]=S.get(Ae-1,tt),S.set(Ae-1,tt,0);S.set(Ae-1,Ae-1,1),$[0]=0}function nn(Ae,$,z,S){let D,J,Le,$e,tt,at,Ct,pt,$t,Nt,Ot,Wt,dn,St,zt,pn;for(Le=1;Le<Ae;Le++)$[Le-1]=$[Le];$[Ae-1]=0;let Mn=0,En=0,ti=Number.EPSILON;for(at=0;at<Ae;at++){for(En=Math.max(En,Math.abs(z[at])+Math.abs($[at])),Ct=at;Ct<Ae&&!(Math.abs($[Ct])<=ti*En);)Ct++;if(Ct>at)do{for(D=z[at],pt=(z[at+1]-D)/(2*$[at]),$t=Qt(pt,1),pt<0&&($t=-$t),z[at]=$[at]/(pt+$t),z[at+1]=$[at]*(pt+$t),Nt=z[at+1],J=D-z[at],Le=at+2;Le<Ae;Le++)z[Le]-=J;for(Mn=Mn+J,pt=z[Ct],Ot=1,Wt=Ot,dn=Ot,St=$[at+1],zt=0,pn=0,Le=Ct-1;Le>=at;Le--)for(dn=Wt,Wt=Ot,pn=zt,D=Ot*$[Le],J=Ot*pt,$t=Qt(pt,$[Le]),$[Le+1]=zt*$t,zt=$[Le]/$t,Ot=pt/$t,pt=Ot*z[Le]-zt*D,z[Le+1]=J+zt*(Ot*D+zt*z[Le]),tt=0;tt<Ae;tt++)J=S.get(tt,Le+1),S.set(tt,Le+1,zt*S.get(tt,Le)+Ot*J),S.set(tt,Le,Ot*S.get(tt,Le)-zt*J);pt=-zt*pn*dn*St*$[at]/Nt,$[at]=zt*pt,z[at]=Ot*pt}while(Math.abs($[at])>ti*En);z[at]=z[at]+Mn,$[at]=0}for(Le=0;Le<Ae-1;Le++){for(tt=Le,pt=z[Le],$e=Le+1;$e<Ae;$e++)z[$e]<pt&&(tt=$e,pt=z[$e]);if(tt!==Le)for(z[tt]=z[Le],z[Le]=pt,$e=0;$e<Ae;$e++)pt=S.get($e,Le),S.set($e,Le,S.get($e,tt)),S.set($e,tt,pt)}}function sr(Ae,$,z,S){let D=0,J=Ae-1,Le,$e,tt,at,Ct,pt,$t;for(pt=D+1;pt<=J-1;pt++){for($t=0,at=pt;at<=J;at++)$t=$t+Math.abs($.get(at,pt-1));if($t!==0){for(tt=0,at=J;at>=pt;at--)z[at]=$.get(at,pt-1)/$t,tt+=z[at]*z[at];for($e=Math.sqrt(tt),z[pt]>0&&($e=-$e),tt=tt-z[pt]*$e,z[pt]=z[pt]-$e,Ct=pt;Ct<Ae;Ct++){for(Le=0,at=J;at>=pt;at--)Le+=z[at]*$.get(at,Ct);for(Le=Le/tt,at=pt;at<=J;at++)$.set(at,Ct,$.get(at,Ct)-Le*z[at])}for(at=0;at<=J;at++){for(Le=0,Ct=J;Ct>=pt;Ct--)Le+=z[Ct]*$.get(at,Ct);for(Le=Le/tt,Ct=pt;Ct<=J;Ct++)$.set(at,Ct,$.get(at,Ct)-Le*z[Ct])}z[pt]=$t*z[pt],$.set(pt,pt-1,$t*$e)}}for(at=0;at<Ae;at++)for(Ct=0;Ct<Ae;Ct++)S.set(at,Ct,at===Ct?1:0);for(pt=J-1;pt>=D+1;pt--)if($.get(pt,pt-1)!==0){for(at=pt+1;at<=J;at++)z[at]=$.get(at,pt-1);for(Ct=pt;Ct<=J;Ct++){for($e=0,at=pt;at<=J;at++)$e+=z[at]*S.get(at,Ct);for($e=$e/z[pt]/$.get(pt,pt-1),at=pt;at<=J;at++)S.set(at,Ct,S.get(at,Ct)+$e*z[at])}}}function Pn(Ae,$,z,S,D){let J=Ae-1,Le=0,$e=Ae-1,tt=Number.EPSILON,at=0,Ct=0,pt=0,$t=0,Nt=0,Ot=0,Wt=0,dn=0,St,zt,pn,Mn,En,ti,bn,Nn,Lr,At,qt,yn,ln,wi,Ci;for(St=0;St<Ae;St++)for((St<Le||St>$e)&&(z[St]=D.get(St,St),$[St]=0),zt=Math.max(St-1,0);zt<Ae;zt++)Ct=Ct+Math.abs(D.get(St,zt));for(;J>=Le;){for(Mn=J;Mn>Le&&(Ot=Math.abs(D.get(Mn-1,Mn-1))+Math.abs(D.get(Mn,Mn)),Ot===0&&(Ot=Ct),!(Math.abs(D.get(Mn,Mn-1))<tt*Ot));)Mn--;if(Mn===J)D.set(J,J,D.get(J,J)+at),z[J]=D.get(J,J),$[J]=0,J--,dn=0;else if(Mn===J-1){if(bn=D.get(J,J-1)*D.get(J-1,J),pt=(D.get(J-1,J-1)-D.get(J,J))/2,$t=pt*pt+bn,Wt=Math.sqrt(Math.abs($t)),D.set(J,J,D.get(J,J)+at),D.set(J-1,J-1,D.get(J-1,J-1)+at),Nn=D.get(J,J),$t>=0){for(Wt=pt>=0?pt+Wt:pt-Wt,z[J-1]=Nn+Wt,z[J]=z[J-1],Wt!==0&&(z[J]=Nn-bn/Wt),$[J-1]=0,$[J]=0,Nn=D.get(J,J-1),Ot=Math.abs(Nn)+Math.abs(Wt),pt=Nn/Ot,$t=Wt/Ot,Nt=Math.sqrt(pt*pt+$t*$t),pt=pt/Nt,$t=$t/Nt,zt=J-1;zt<Ae;zt++)Wt=D.get(J-1,zt),D.set(J-1,zt,$t*Wt+pt*D.get(J,zt)),D.set(J,zt,$t*D.get(J,zt)-pt*Wt);for(St=0;St<=J;St++)Wt=D.get(St,J-1),D.set(St,J-1,$t*Wt+pt*D.get(St,J)),D.set(St,J,$t*D.get(St,J)-pt*Wt);for(St=Le;St<=$e;St++)Wt=S.get(St,J-1),S.set(St,J-1,$t*Wt+pt*S.get(St,J)),S.set(St,J,$t*S.get(St,J)-pt*Wt)}else z[J-1]=Nn+pt,z[J]=Nn+pt,$[J-1]=Wt,$[J]=-Wt;J=J-2,dn=0}else{if(Nn=D.get(J,J),Lr=0,bn=0,Mn<J&&(Lr=D.get(J-1,J-1),bn=D.get(J,J-1)*D.get(J-1,J)),dn===10){for(at+=Nn,St=Le;St<=J;St++)D.set(St,St,D.get(St,St)-Nn);Ot=Math.abs(D.get(J,J-1))+Math.abs(D.get(J-1,J-2)),Nn=Lr=.75*Ot,bn=-.4375*Ot*Ot}if(dn===30&&(Ot=(Lr-Nn)/2,Ot=Ot*Ot+bn,Ot>0)){for(Ot=Math.sqrt(Ot),Lr<Nn&&(Ot=-Ot),Ot=Nn-bn/((Lr-Nn)/2+Ot),St=Le;St<=J;St++)D.set(St,St,D.get(St,St)-Ot);at+=Ot,Nn=Lr=bn=.964}for(dn=dn+1,En=J-2;En>=Mn&&(Wt=D.get(En,En),Nt=Nn-Wt,Ot=Lr-Wt,pt=(Nt*Ot-bn)/D.get(En+1,En)+D.get(En,En+1),$t=D.get(En+1,En+1)-Wt-Nt-Ot,Nt=D.get(En+2,En+1),Ot=Math.abs(pt)+Math.abs($t)+Math.abs(Nt),pt=pt/Ot,$t=$t/Ot,Nt=Nt/Ot,!(En===Mn||Math.abs(D.get(En,En-1))*(Math.abs($t)+Math.abs(Nt))<tt*(Math.abs(pt)*(Math.abs(D.get(En-1,En-1))+Math.abs(Wt)+Math.abs(D.get(En+1,En+1))))));)En--;for(St=En+2;St<=J;St++)D.set(St,St-2,0),St>En+2&&D.set(St,St-3,0);for(pn=En;pn<=J-1&&(wi=pn!==J-1,pn!==En&&(pt=D.get(pn,pn-1),$t=D.get(pn+1,pn-1),Nt=wi?D.get(pn+2,pn-1):0,Nn=Math.abs(pt)+Math.abs($t)+Math.abs(Nt),Nn!==0&&(pt=pt/Nn,$t=$t/Nn,Nt=Nt/Nn)),Nn!==0);pn++)if(Ot=Math.sqrt(pt*pt+$t*$t+Nt*Nt),pt<0&&(Ot=-Ot),Ot!==0){for(pn!==En?D.set(pn,pn-1,-Ot*Nn):Mn!==En&&D.set(pn,pn-1,-D.get(pn,pn-1)),pt=pt+Ot,Nn=pt/Ot,Lr=$t/Ot,Wt=Nt/Ot,$t=$t/pt,Nt=Nt/pt,zt=pn;zt<Ae;zt++)pt=D.get(pn,zt)+$t*D.get(pn+1,zt),wi&&(pt=pt+Nt*D.get(pn+2,zt),D.set(pn+2,zt,D.get(pn+2,zt)-pt*Wt)),D.set(pn,zt,D.get(pn,zt)-pt*Nn),D.set(pn+1,zt,D.get(pn+1,zt)-pt*Lr);for(St=0;St<=Math.min(J,pn+3);St++)pt=Nn*D.get(St,pn)+Lr*D.get(St,pn+1),wi&&(pt=pt+Wt*D.get(St,pn+2),D.set(St,pn+2,D.get(St,pn+2)-pt*Nt)),D.set(St,pn,D.get(St,pn)-pt),D.set(St,pn+1,D.get(St,pn+1)-pt*$t);for(St=Le;St<=$e;St++)pt=Nn*S.get(St,pn)+Lr*S.get(St,pn+1),wi&&(pt=pt+Wt*S.get(St,pn+2),S.set(St,pn+2,S.get(St,pn+2)-pt*Nt)),S.set(St,pn,S.get(St,pn)-pt),S.set(St,pn+1,S.get(St,pn+1)-pt*$t)}}}if(Ct!==0){for(J=Ae-1;J>=0;J--)if(pt=z[J],$t=$[J],$t===0)for(Mn=J,D.set(J,J,1),St=J-1;St>=0;St--){for(bn=D.get(St,St)-pt,Nt=0,zt=Mn;zt<=J;zt++)Nt=Nt+D.get(St,zt)*D.get(zt,J);if($[St]<0)Wt=bn,Ot=Nt;else if(Mn=St,$[St]===0?D.set(St,J,bn!==0?-Nt/bn:-Nt/(tt*Ct)):(Nn=D.get(St,St+1),Lr=D.get(St+1,St),$t=(z[St]-pt)*(z[St]-pt)+$[St]*$[St],ti=(Nn*Ot-Wt*Nt)/$t,D.set(St,J,ti),D.set(St+1,J,Math.abs(Nn)>Math.abs(Wt)?(-Nt-bn*ti)/Nn:(-Ot-Lr*ti)/Wt)),ti=Math.abs(D.get(St,J)),tt*ti*ti>1)for(zt=St;zt<=J;zt++)D.set(zt,J,D.get(zt,J)/ti)}else if($t<0)for(Mn=J-1,Math.abs(D.get(J,J-1))>Math.abs(D.get(J-1,J))?(D.set(J-1,J-1,$t/D.get(J,J-1)),D.set(J-1,J,-(D.get(J,J)-pt)/D.get(J,J-1))):(Ci=Fn(0,-D.get(J-1,J),D.get(J-1,J-1)-pt,$t),D.set(J-1,J-1,Ci[0]),D.set(J-1,J,Ci[1])),D.set(J,J-1,0),D.set(J,J,1),St=J-2;St>=0;St--){for(At=0,qt=0,zt=Mn;zt<=J;zt++)At=At+D.get(St,zt)*D.get(zt,J-1),qt=qt+D.get(St,zt)*D.get(zt,J);if(bn=D.get(St,St)-pt,$[St]<0)Wt=bn,Nt=At,Ot=qt;else if(Mn=St,$[St]===0?(Ci=Fn(-At,-qt,bn,$t),D.set(St,J-1,Ci[0]),D.set(St,J,Ci[1])):(Nn=D.get(St,St+1),Lr=D.get(St+1,St),yn=(z[St]-pt)*(z[St]-pt)+$[St]*$[St]-$t*$t,ln=(z[St]-pt)*2*$t,yn===0&&ln===0&&(yn=tt*Ct*(Math.abs(bn)+Math.abs($t)+Math.abs(Nn)+Math.abs(Lr)+Math.abs(Wt))),Ci=Fn(Nn*Nt-Wt*At+$t*qt,Nn*Ot-Wt*qt-$t*At,yn,ln),D.set(St,J-1,Ci[0]),D.set(St,J,Ci[1]),Math.abs(Nn)>Math.abs(Wt)+Math.abs($t)?(D.set(St+1,J-1,(-At-bn*D.get(St,J-1)+$t*D.get(St,J))/Nn),D.set(St+1,J,(-qt-bn*D.get(St,J)-$t*D.get(St,J-1))/Nn)):(Ci=Fn(-Nt-Lr*D.get(St,J-1),-Ot-Lr*D.get(St,J),Wt,$t),D.set(St+1,J-1,Ci[0]),D.set(St+1,J,Ci[1]))),ti=Math.max(Math.abs(D.get(St,J-1)),Math.abs(D.get(St,J))),tt*ti*ti>1)for(zt=St;zt<=J;zt++)D.set(zt,J-1,D.get(zt,J-1)/ti),D.set(zt,J,D.get(zt,J)/ti)}for(St=0;St<Ae;St++)if(St<Le||St>$e)for(zt=St;zt<Ae;zt++)S.set(St,zt,D.get(St,zt));for(zt=Ae-1;zt>=Le;zt--)for(St=Le;St<=$e;St++){for(Wt=0,pn=Le;pn<=Math.min(zt,$e);pn++)Wt=Wt+S.get(St,pn)*D.get(pn,zt);S.set(St,zt,Wt)}}}function Fn(Ae,$,z,S){let D,J;return Math.abs(z)>Math.abs(S)?(D=S/z,J=z+D*S,[(Ae+D*$)/J,($-D*Ae)/J]):(D=z/S,J=S+D*z,[(D*Ae+$)/J,(D*$-Ae)/J])}class zr{constructor($){if($=Rt.checkMatrix($),!$.isSymmetric())throw new Error("Matrix is not symmetric");let z=$,S=z.rows,D=new nt(S,S),J=!0,Le,$e,tt;for($e=0;$e<S;$e++){let at=0;for(tt=0;tt<$e;tt++){let Ct=0;for(Le=0;Le<tt;Le++)Ct+=D.get(tt,Le)*D.get($e,Le);Ct=(z.get($e,tt)-Ct)/D.get(tt,tt),D.set($e,tt,Ct),at=at+Ct*Ct}for(at=z.get($e,$e)-at,J&&(J=at>0),D.set($e,$e,Math.sqrt(Math.max(at,0))),tt=$e+1;tt<S;tt++)D.set($e,tt,0)}this.L=D,this.positiveDefinite=J}isPositiveDefinite(){return this.positiveDefinite}solve($){$=Rt.checkMatrix($);let z=this.L,S=z.rows;if($.rows!==S)throw new Error("Matrix dimensions do not match");if(this.isPositiveDefinite()===!1)throw new Error("Matrix is not positive definite");let D=$.columns,J=$.clone(),Le,$e,tt;for(tt=0;tt<S;tt++)for($e=0;$e<D;$e++){for(Le=0;Le<tt;Le++)J.set(tt,$e,J.get(tt,$e)-J.get(Le,$e)*z.get(tt,Le));J.set(tt,$e,J.get(tt,$e)/z.get(tt,tt))}for(tt=S-1;tt>=0;tt--)for($e=0;$e<D;$e++){for(Le=tt+1;Le<S;Le++)J.set(tt,$e,J.get(tt,$e)-J.get(Le,$e)*z.get(Le,tt));J.set(tt,$e,J.get(tt,$e)/z.get(tt,tt))}return J}get lowerTriangularMatrix(){return this.L}}class $r{constructor($,z={}){$=Rt.checkMatrix($);let{Y:S}=z;const{scaleScores:D=!1,maxIterations:J=1e3,terminationCriteria:Le=1e-10}=z;let $e;if(S){if(Ue.isAnyArray(S)&&typeof S[0]=="number"?S=nt.columnVector(S):S=Rt.checkMatrix(S),S.rows!==$.rows)throw new Error("Y should have the same number of rows as X");$e=S.getColumnVector(0)}else $e=$.getColumnVector(0);let tt=1,at,Ct,pt,$t;for(let Nt=0;Nt<J&&tt>Le;Nt++)pt=$.transpose().mmul($e).div($e.transpose().mmul($e).get(0,0)),pt=pt.div(pt.norm()),at=$.mmul(pt).div(pt.transpose().mmul(pt).get(0,0)),Nt>0&&(tt=at.clone().sub($t).pow(2).sum()),$t=at.clone(),S?(Ct=S.transpose().mmul(at).div(at.transpose().mmul(at).get(0,0)),Ct=Ct.div(Ct.norm()),$e=S.mmul(Ct).div(Ct.transpose().mmul(Ct).get(0,0))):$e=at;if(S){let Nt=$.transpose().mmul(at).div(at.transpose().mmul(at).get(0,0));Nt=Nt.div(Nt.norm());let Ot=$.clone().sub(at.clone().mmul(Nt.transpose())),Wt=$e.transpose().mmul(at).div(at.transpose().mmul(at).get(0,0)),dn=S.clone().sub(at.clone().mulS(Wt.get(0,0)).mmul(Ct.transpose()));this.t=at,this.p=Nt.transpose(),this.w=pt.transpose(),this.q=Ct,this.u=$e,this.s=at.transpose().mmul(at),this.xResidual=Ot,this.yResidual=dn,this.betas=Wt}else this.w=pt.transpose(),this.s=at.transpose().mmul(at).sqrt(),D?this.t=at.clone().div(this.s.get(0,0)):this.t=at,this.xResidual=$.sub(at.mmul(pt.transpose()))}}ve.XA=O,ve.a_=zr,ve.yQ=zr,ve.Hs=wt,ve.Ec=en,ve.dx=en,ve.LU=Xt,ve.Rm=Xt,ve.y3=nt,ve.qK=Fe,ve.pb=oe,ve.j=Ye,ve.sO=ie,ve.BZ=je,ve.EK=Ie,ve.Db=Be,ve.Fx=et,ve.tU=gt,ve.Ym=$r,ve.rs=$r,ve.QR=an,ve.TB=an,ve.oH=In,ve.Sc=In,ve.BN=bt,ve.it=Mt,ve.$r=Rt,ve.QM=Bt,ve.AV=Qa,M=nt,ve.GH=or,ve.SO=Xr,ve.uZ=Fr,ve.yU=ta,ve.F1=Cn,ve.re=Ft},9708:function(ke,ve,k){"use strict";k.d(ve,{F:function(){return N},Z:function(){return Y}});var M=k(94184),H=k.n(M);const U=null;function Y(I,C,A){return H()({[`${I}-status-success`]:C==="success",[`${I}-status-warning`]:C==="warning",[`${I}-status-error`]:C==="error",[`${I}-status-validating`]:C==="validating",[`${I}-has-feedback`]:A})}const N=(I,C)=>C||I},88258:function(ke,ve,k){"use strict";var M=k(67294),H=k(53124),U=k(32983);const Y=N=>{const{componentName:I}=N,{getPrefixCls:C}=(0,M.useContext)(H.E_),A=C("empty");switch(I){case"Table":case"List":return M.createElement(U.Z,{image:U.Z.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return M.createElement(U.Z,{image:U.Z.PRESENTED_IMAGE_SIMPLE,className:`${A}-small`});default:return M.createElement(U.Z,null)}};ve.Z=Y},32983:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return Me}});var M=k(94184),H=k.n(M),U=k(67294),Y=k(53124),N=k(10110),I=k(84780),C=k(46605),F=()=>{const[,Oe]=(0,C.Z)(),q=new I.C(Oe.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return U.createElement("svg",{style:q,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},U.createElement("g",{fill:"none",fillRule:"evenodd"},U.createElement("g",{transform:"translate(24 31.67)"},U.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),U.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),U.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),U.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),U.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),U.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),U.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},U.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),U.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},W=()=>{const[,Oe]=(0,C.Z)(),{colorFill:re,colorFillTertiary:q,colorFillQuaternary:ce,colorBgContainer:Ee}=Oe,{borderColor:Te,shadowColor:Je,contentColor:He}=(0,U.useMemo)(()=>({borderColor:new I.C(re).onBackground(Ee).toHexShortString(),shadowColor:new I.C(q).onBackground(Ee).toHexShortString(),contentColor:new I.C(ce).onBackground(Ee).toHexShortString()}),[re,q,ce,Ee]);return U.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},U.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},U.createElement("ellipse",{fill:Je,cx:"32",cy:"33",rx:"32",ry:"7"}),U.createElement("g",{fillRule:"nonzero",stroke:Te},U.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),U.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:He}))))},K=k(67968),ge=k(45503);const be=Oe=>{const{componentCls:re,margin:q,marginXS:ce,marginXL:Ee,fontSize:Te,lineHeight:Je}=Oe;return{[re]:{marginInline:ce,fontSize:Te,lineHeight:Je,textAlign:"center",[`${re}-image`]:{height:Oe.emptyImgHeight,marginBottom:ce,opacity:Oe.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${re}-description`]:{color:Oe.colorText},[`${re}-footer`]:{marginTop:q},"&-normal":{marginBlock:Ee,color:Oe.colorTextDisabled,[`${re}-description`]:{color:Oe.colorTextDisabled},[`${re}-image`]:{height:Oe.emptyImgHeightMD}},"&-small":{marginBlock:ce,color:Oe.colorTextDisabled,[`${re}-image`]:{height:Oe.emptyImgHeightSM}}}}};var Ue=(0,K.Z)("Empty",Oe=>{const{componentCls:re,controlHeightLG:q}=Oe,ce=(0,ge.TS)(Oe,{emptyImgCls:`${re}-img`,emptyImgHeight:q*2.5,emptyImgHeightMD:q,emptyImgHeightSM:q*.875});return[be(ce)]}),Ne=function(Oe,re){var q={};for(var ce in Oe)Object.prototype.hasOwnProperty.call(Oe,ce)&&re.indexOf(ce)<0&&(q[ce]=Oe[ce]);if(Oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ee=0,ce=Object.getOwnPropertySymbols(Oe);Ee<ce.length;Ee++)re.indexOf(ce[Ee])<0&&Object.prototype.propertyIsEnumerable.call(Oe,ce[Ee])&&(q[ce[Ee]]=Oe[ce[Ee]]);return q};const ye=U.createElement(F,null),De=U.createElement(W,null),Ce=Oe=>{var{className:re,rootClassName:q,prefixCls:ce,image:Ee=ye,description:Te,children:Je,imageStyle:He,style:rt}=Oe,Et=Ne(Oe,["className","rootClassName","prefixCls","image","description","children","imageStyle","style"]);const{getPrefixCls:lt,direction:st,empty:mt}=U.useContext(Y.E_),fe=lt("empty",ce),[We,ht]=Ue(fe),[Pt]=(0,N.Z)("Empty"),Ve=typeof Te!="undefined"?Te:Pt==null?void 0:Pt.description,it=typeof Ve=="string"?Ve:"empty";let ft=null;return typeof Ee=="string"?ft=U.createElement("img",{alt:it,src:Ee}):ft=Ee,We(U.createElement("div",Object.assign({className:H()(ht,fe,mt==null?void 0:mt.className,{[`${fe}-normal`]:Ee===De,[`${fe}-rtl`]:st==="rtl"},re,q),style:Object.assign(Object.assign({},mt==null?void 0:mt.style),rt)},Et),U.createElement("div",{className:`${fe}-image`,style:He},ft),Ve&&U.createElement("div",{className:`${fe}-description`},Ve),Je&&U.createElement("div",{className:`${fe}-footer`},Je)))};Ce.PRESENTED_IMAGE_DEFAULT=ye,Ce.PRESENTED_IMAGE_SIMPLE=De;var Me=Ce},22150:function(ke,ve,k){"use strict";k.d(ve,{default:function(){return z}});var M=k(74902),H=k(94184),U=k.n(H),Y=k(38379),N=k(67294),I=k(33603),C=k(65223);function A(S){const[D,J]=N.useState(S);return N.useEffect(()=>{const Le=setTimeout(()=>{J(S)},S.length?0:10);return()=>{clearTimeout(Le)}},[S]),D}var F=k(14747),P=k(50438),W=k(33507),K=k(45503),ge=k(67968),Ue=S=>{const{componentCls:D}=S,J=`${D}-show-help`,Le=`${D}-show-help-item`;return{[J]:{transition:`opacity ${S.motionDurationSlow} ${S.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[Le]:{overflow:"hidden",transition:`height ${S.motionDurationSlow} ${S.motionEaseInOut},
|
|
|
opacity ${S.motionDurationSlow} ${S.motionEaseInOut},
|
|
|
transform ${S.motionDurationSlow} ${S.motionEaseInOut} !important`,[`&${Le}-appear, &${Le}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${Le}-leave-active`]:{transform:"translateY(-5px)"}}}}};const Ne=S=>({legend:{display:"block",width:"100%",marginBottom:S.marginLG,padding:0,color:S.colorTextDescription,fontSize:S.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${S.lineWidth}px ${S.lineType} ${S.colorBorder}`},label:{fontSize:S.fontSize},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${S.controlOutlineWidth}px ${S.controlOutline}`},output:{display:"block",paddingTop:15,color:S.colorText,fontSize:S.fontSize,lineHeight:S.lineHeight}}),ye=(S,D)=>{const{formItemCls:J}=S;return{[J]:{[`${J}-label > label`]:{height:D},[`${J}-control-input`]:{minHeight:D}}}},De=S=>{const{componentCls:D}=S;return{[S.componentCls]:Object.assign(Object.assign(Object.assign({},(0,F.Wf)(S)),Ne(S)),{[`${D}-text`]:{display:"inline-block",paddingInlineEnd:S.paddingSM},"&-small":Object.assign({},ye(S,S.controlHeightSM)),"&-large":Object.assign({},ye(S,S.controlHeightLG))})}},Ce=S=>{const{formItemCls:D,iconCls:J,componentCls:Le,rootPrefixCls:$e,labelRequiredMarkColor:tt,labelColor:at,labelFontSize:Ct,labelHeight:pt,labelColonMarginInlineStart:$t,labelColonMarginInlineEnd:Nt,itemMarginBottom:Ot}=S;return{[D]:Object.assign(Object.assign({},(0,F.Wf)(S)),{marginBottom:Ot,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
|
&-hidden.${$e}-row`]:{display:"none"},"&-has-warning":{[`${D}-split`]:{color:S.colorError}},"&-has-error":{[`${D}-split`]:{color:S.colorWarning}},[`${D}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${S.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:pt,color:at,fontSize:Ct,[`> ${J}`]:{fontSize:S.fontSize,verticalAlign:"top"},[`&${D}-required:not(${D}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:S.marginXXS,color:tt,fontSize:S.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${Le}-hide-required-mark &`]:{display:"none"}},[`${D}-optional`]:{display:"inline-block",marginInlineStart:S.marginXXS,color:S.colorTextDescription,[`${Le}-hide-required-mark &`]:{display:"none"}},[`${D}-tooltip`]:{color:S.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:S.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:$t,marginInlineEnd:Nt},[`&${D}-no-colon::after`]:{content:'"\\a0"'}}},[`${D}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${$e}-col-'"]):not([class*="' ${$e}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:S.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[D]:{"&-explain, &-extra":{clear:"both",color:S.colorTextDescription,fontSize:S.fontSize,lineHeight:S.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:S.controlHeightSM,transition:`color ${S.motionDurationMid} ${S.motionEaseOut}`},"&-explain":{"&-error":{color:S.colorError},"&-warning":{color:S.colorWarning}}},[`&-with-help ${D}-explain`]:{height:"auto",opacity:1},[`${D}-feedback-icon`]:{fontSize:S.fontSize,textAlign:"center",visibility:"visible",animationName:P.kr,animationDuration:S.motionDurationMid,animationTimingFunction:S.motionEaseOutBack,pointerEvents:"none","&-success":{color:S.colorSuccess},"&-error":{color:S.colorError},"&-warning":{color:S.colorWarning},"&-validating":{color:S.colorPrimary}}})}},Me=S=>{const{componentCls:D,formItemCls:J}=S;return{[`${D}-horizontal`]:{[`${J}-label`]:{flexGrow:0},[`${J}-control`]:{flex:"1 1 0",minWidth:0},[`${J}-label[class$='-24'], ${J}-label[class*='-24 ']`]:{[`& + ${J}-control`]:{minWidth:"unset"}}}}},Oe=S=>{const{componentCls:D,formItemCls:J}=S;return{[`${D}-inline`]:{display:"flex",flexWrap:"wrap",[J]:{flex:"none",marginInlineEnd:S.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${J}-label,
|
|
|
> ${J}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${J}-label`]:{flex:"none"},[`${D}-text`]:{display:"inline-block"},[`${J}-has-feedback`]:{display:"inline-block"}}}}},re=S=>({padding:S.verticalLabelPadding,margin:S.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),q=S=>{const{componentCls:D,formItemCls:J,rootPrefixCls:Le}=S;return{[`${J} ${J}-label`]:re(S),[D]:{[J]:{flexWrap:"wrap",[`${J}-label, ${J}-control`]:{[`&:not([class*=" ${Le}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},ce=S=>{const{componentCls:D,formItemCls:J,rootPrefixCls:Le}=S;return{[`${D}-vertical`]:{[J]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${D}-item-control`]:{width:"100%"}}},[`${D}-vertical ${J}-label,
|
|
|
.${Le}-col-24${J}-label,
|
|
|
.${Le}-col-xl-24${J}-label`]:re(S),[`@media (max-width: ${S.screenXSMax}px)`]:[q(S),{[D]:{[`.${Le}-col-xs-24${J}-label`]:re(S)}}],[`@media (max-width: ${S.screenSMMax}px)`]:{[D]:{[`.${Le}-col-sm-24${J}-label`]:re(S)}},[`@media (max-width: ${S.screenMDMax}px)`]:{[D]:{[`.${Le}-col-md-24${J}-label`]:re(S)}},[`@media (max-width: ${S.screenLGMax}px)`]:{[D]:{[`.${Le}-col-lg-24${J}-label`]:re(S)}}}},Ee=(S,D)=>(0,K.TS)(S,{formItemCls:`${S.componentCls}-item`,rootPrefixCls:D});var Te=(0,ge.Z)("Form",(S,D)=>{let{rootPrefixCls:J}=D;const Le=Ee(S,J);return[De(Le),Ce(Le),Ue(Le),Me(Le),Oe(Le),ce(Le),(0,W.Z)(Le),P.kr]},S=>({labelRequiredMarkColor:S.colorError,labelColor:S.colorTextHeading,labelFontSize:S.fontSize,labelHeight:S.controlHeight,labelColonMarginInlineStart:S.marginXXS/2,labelColonMarginInlineEnd:S.marginXS,itemMarginBottom:S.marginLG,verticalLabelPadding:`0 0 ${S.paddingXS}px`,verticalLabelMargin:0}),{order:-1e3});const Je=[];function He(S,D,J){let Le=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof S=="string"?S:`${D}-${Le}`,error:S,errorStatus:J}}var Et=S=>{let{help:D,helpStatus:J,errors:Le=Je,warnings:$e=Je,className:tt,fieldId:at,onVisibleChanged:Ct}=S;const{prefixCls:pt}=N.useContext(C.Rk),$t=`${pt}-item-explain`,[,Nt]=Te(pt),Ot=(0,N.useMemo)(()=>(0,I.Z)(pt),[pt]),Wt=A(Le),dn=A($e),St=N.useMemo(()=>D!=null?[He(D,"help",J)]:[].concat((0,M.Z)(Wt.map((pn,Mn)=>He(pn,"error","error",Mn))),(0,M.Z)(dn.map((pn,Mn)=>He(pn,"warning","warning",Mn)))),[D,J,Wt,dn]),zt={};return at&&(zt.id=`${at}_help`),N.createElement(Y.default,{motionDeadline:Ot.motionDeadline,motionName:`${pt}-show-help`,visible:!!St.length,onVisibleChanged:Ct},pn=>{const{className:Mn,style:En}=pn;return N.createElement("div",Object.assign({},zt,{className:U()($t,Mn,tt,Nt),style:En,role:"alert"}),N.createElement(Y.CSSMotionList,Object.assign({keys:St},(0,I.Z)(pt),{motionName:`${pt}-show-help-item`,component:!1}),ti=>{const{key:bn,error:Nn,errorStatus:Lr,className:At,style:qt}=ti;return N.createElement("div",{key:bn,className:U()(At,{[`${$t}-${Lr}`]:Lr}),style:qt},Nn)}))})},lt=k(58083),st=k(53124),mt=k(98866),fe=k(97647),We=k(98675),ht=k(17423);const Pt=["parentNode"],Ve="form_item";function it(S){return S===void 0||S===!1?[]:Array.isArray(S)?S:[S]}function ft(S,D){if(!S.length)return;const J=S.join("_");return D?`${D}_${J}`:Pt.includes(J)?`${Ve}_${J}`:J}function ze(S,D,J,Le,$e,tt){let at=Le;return tt!==void 0?at=tt:J.validating?at="validating":S.length?at="error":D.length?at="warning":(J.touched||$e&&J.validated)&&(at="success"),at}function Qe(S){return it(S).join("_")}function Se(S){const[D]=(0,lt.useForm)(),J=N.useRef({}),Le=N.useMemo(()=>S!=null?S:Object.assign(Object.assign({},D),{__INTERNAL__:{itemRef:$e=>tt=>{const at=Qe($e);tt?J.current[at]=tt:delete J.current[at]}},scrollToField:function($e){let tt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const at=it($e),Ct=ft(at,Le.__INTERNAL__.name),pt=Ct?document.getElementById(Ct):null;pt&&(0,ht.Z)(pt,Object.assign({scrollMode:"if-needed",block:"nearest"},tt))},getFieldInstance:$e=>{const tt=Qe($e);return J.current[tt]}}),[S,D]);return[Le]}var E=k(37920),me=function(S,D){var J={};for(var Le in S)Object.prototype.hasOwnProperty.call(S,Le)&&D.indexOf(Le)<0&&(J[Le]=S[Le]);if(S!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $e=0,Le=Object.getOwnPropertySymbols(S);$e<Le.length;$e++)D.indexOf(Le[$e])<0&&Object.prototype.propertyIsEnumerable.call(S,Le[$e])&&(J[Le[$e]]=S[Le[$e]]);return J};const L=(S,D)=>{const J=N.useContext(mt.Z),{getPrefixCls:Le,direction:$e,form:tt}=N.useContext(st.E_),{prefixCls:at,className:Ct,rootClassName:pt,size:$t,disabled:Nt=J,form:Ot,colon:Wt,labelAlign:dn,labelWrap:St,labelCol:zt,wrapperCol:pn,hideRequiredMark:Mn,layout:En="horizontal",scrollToFirstError:ti,requiredMark:bn,onFinishFailed:Nn,name:Lr,style:At,feedbackIcons:qt}=S,yn=me(S,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons"]),ln=(0,We.Z)($t),wi=N.useContext(E.Z),Ci=(0,N.useMemo)(()=>bn!==void 0?bn:tt&&tt.requiredMark!==void 0?tt.requiredMark:!Mn,[Mn,bn,tt]),fi=Wt!=null?Wt:tt==null?void 0:tt.colon,ai=Le("form",at),[Si,za]=Te(ai),sa=U()(ai,`${ai}-${En}`,{[`${ai}-hide-required-mark`]:Ci===!1,[`${ai}-rtl`]:$e==="rtl",[`${ai}-${ln}`]:ln},za,tt==null?void 0:tt.className,Ct,pt),[Ti]=Se(Ot),{__INTERNAL__:xa}=Ti;xa.name=Lr;const wr=(0,N.useMemo)(()=>({name:Lr,labelAlign:dn,labelCol:zt,labelWrap:St,wrapperCol:pn,vertical:En==="vertical",colon:fi,requiredMark:Ci,itemRef:xa.itemRef,form:Ti,feedbackIcons:qt}),[Lr,dn,zt,pn,En,fi,Ci,Ti,qt]);N.useImperativeHandle(D,()=>Ti);const Wi=(Ea,Vr)=>{if(Ea){let os={block:"nearest"};typeof Ea=="object"&&(os=Ea),Ti.scrollToField(Vr,os)}},ni=Ea=>{if(Nn==null||Nn(Ea),Ea.errorFields.length){const Vr=Ea.errorFields[0].name;if(ti!==void 0){Wi(ti,Vr);return}tt&&tt.scrollToFirstError!==void 0&&Wi(tt.scrollToFirstError,Vr)}};return Si(N.createElement(mt.n,{disabled:Nt},N.createElement(fe.q,{size:ln},N.createElement(C.RV,Object.assign({},{validateMessages:wi}),N.createElement(C.q3.Provider,{value:wr},N.createElement(lt.default,Object.assign({id:Lr},yn,{name:Lr,onFinishFailed:ni,form:Ti,style:Object.assign(Object.assign({},tt==null?void 0:tt.style),At),className:sa})))))))};var Ke=N.forwardRef(L),ot=k(9475),pe=k(17799),xe=k(96159),Ze=k(37419);function O(S){if(typeof S=="function")return S;const D=(0,Ze.Z)(S);return D.length<=1?D[0]:D}const ne=()=>{const{status:S,errors:D=[],warnings:J=[]}=(0,N.useContext)(C.aM);return{status:S,errors:D,warnings:J}};ne.Context=C.aM;var qe=ne,dt=k(96523);function nt(S){const[D,J]=N.useState(S),Le=(0,N.useRef)(null),$e=(0,N.useRef)([]),tt=(0,N.useRef)(!1);N.useEffect(()=>(tt.current=!1,()=>{tt.current=!0,dt.Z.cancel(Le.current),Le.current=null}),[]);function at(Ct){tt.current||(Le.current===null&&($e.current=[],Le.current=(0,dt.Z)(()=>{Le.current=null,J(pt=>{let $t=pt;return $e.current.forEach(Nt=>{$t=Nt($t)}),$t})})),$e.current.push(Ct))}return[D,at]}function xt(){const{itemRef:S}=N.useContext(C.q3),D=N.useRef({});function J(Le,$e){const tt=$e&&typeof $e=="object"&&$e.ref,at=Le.join("_");return(D.current.name!==at||D.current.originRef!==tt)&&(D.current.name=at,D.current.originRef=tt,D.current.ref=(0,pe.sQ)(S(Le),tt)),D.current.ref}return J}var bt=k(48130),wt=k(14075),we=k(10366),oe=k(92820),Fe=k(21584);const Ye=S=>{const{formItemCls:D}=S;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${D}-control`]:{display:"flex"}}}};var ie=(0,ge.b)(["Form","item-item"],(S,D)=>{let{rootPrefixCls:J}=D;const Le=Ee(S,J);return[Ye(Le)]}),je=S=>{const{prefixCls:D,status:J,wrapperCol:Le,children:$e,errors:tt,warnings:at,_internalItemRender:Ct,extra:pt,help:$t,fieldId:Nt,marginBottom:Ot,onErrorVisibleChanged:Wt}=S,dn=`${D}-item`,St=N.useContext(C.q3),zt=Le||St.wrapperCol||{},pn=U()(`${dn}-control`,zt.className),Mn=N.useMemo(()=>Object.assign({},St),[St]);delete Mn.labelCol,delete Mn.wrapperCol;const En=N.createElement("div",{className:`${dn}-control-input`},N.createElement("div",{className:`${dn}-control-input-content`},$e)),ti=N.useMemo(()=>({prefixCls:D,status:J}),[D,J]),bn=Ot!==null||tt.length||at.length?N.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},N.createElement(C.Rk.Provider,{value:ti},N.createElement(Et,{fieldId:Nt,errors:tt,warnings:at,help:$t,helpStatus:J,className:`${dn}-explain-connected`,onVisibleChanged:Wt})),!!Ot&&N.createElement("div",{style:{width:0,height:Ot}})):null,Nn={};Nt&&(Nn.id=`${Nt}_extra`);const Lr=pt?N.createElement("div",Object.assign({},Nn,{className:`${dn}-extra`}),pt):null,At=Ct&&Ct.mark==="pro_table_render"&&Ct.render?Ct.render(S,{input:En,errorList:bn,extra:Lr}):N.createElement(N.Fragment,null,En,bn,Lr);return N.createElement(C.q3.Provider,{value:Mn},N.createElement(Fe.Z,Object.assign({},zt,{className:pn}),At),N.createElement(ie,{prefixCls:D}))},Be=k(17663),et=k(24457),gt=k(10110),Mt=k(83062),Rt=function(S,D){var J={};for(var Le in S)Object.prototype.hasOwnProperty.call(S,Le)&&D.indexOf(Le)<0&&(J[Le]=S[Le]);if(S!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $e=0,Le=Object.getOwnPropertySymbols(S);$e<Le.length;$e++)D.indexOf(Le[$e])<0&&Object.prototype.propertyIsEnumerable.call(S,Le[$e])&&(J[Le[$e]]=S[Le[$e]]);return J};function Ft(S){return S?typeof S=="object"&&!N.isValidElement(S)?S:{title:S}:null}var Qt=S=>{let{prefixCls:D,label:J,htmlFor:Le,labelCol:$e,labelAlign:tt,colon:at,required:Ct,requiredMark:pt,tooltip:$t}=S;var Nt;const[Ot]=(0,gt.Z)("Form"),{vertical:Wt,labelAlign:dn,labelCol:St,labelWrap:zt,colon:pn}=N.useContext(C.q3);if(!J)return null;const Mn=$e||St||{},En=tt||dn,ti=`${D}-item-label`,bn=U()(ti,En==="left"&&`${ti}-left`,Mn.className,{[`${ti}-wrap`]:!!zt});let Nn=J;const Lr=at===!0||pn!==!1&&at!==!1;Lr&&!Wt&&typeof J=="string"&&J.trim()!==""&&(Nn=J.replace(/[:|:]\s*$/,""));const qt=Ft($t);if(qt){const{icon:Ci=N.createElement(Be.Z,null)}=qt,fi=Rt(qt,["icon"]),ai=N.createElement(Mt.Z,Object.assign({},fi),N.cloneElement(Ci,{className:`${D}-item-tooltip`,title:""}));Nn=N.createElement(N.Fragment,null,Nn,ai)}const yn=pt==="optional",ln=typeof pt=="function";ln?Nn=pt(Nn,{required:!!Ct}):yn&&!Ct&&(Nn=N.createElement(N.Fragment,null,Nn,N.createElement("span",{className:`${D}-item-optional`,title:""},(Ot==null?void 0:Ot.optional)||((Nt=et.Z.Form)===null||Nt===void 0?void 0:Nt.optional))));const wi=U()({[`${D}-item-required`]:Ct,[`${D}-item-required-mark-optional`]:yn||ln,[`${D}-item-no-colon`]:!Lr});return N.createElement(Fe.Z,Object.assign({},Mn,{className:bn}),N.createElement("label",{htmlFor:Le,className:wi,title:typeof J=="string"?J:""},Nn))},an=k(87725),In=k(16646),Xr=k(87995),Cn=k(3407);const or={success:an.Z,warning:Xr.Z,error:In.Z,validating:Cn.Z};function ei(S){let{children:D,errors:J,warnings:Le,hasFeedback:$e,validateStatus:tt,prefixCls:at,meta:Ct,noStyle:pt}=S;const $t=`${at}-item`,{feedbackIcons:Nt}=N.useContext(C.q3),Ot=ze(J,Le,Ct,null,!!$e,tt),{isFormItemInput:Wt,status:dn}=N.useContext(C.aM),St=N.useMemo(()=>{var zt;let pn;if($e){const ti=$e!==!0&&$e.icons||Nt,bn=Ot&&((zt=ti==null?void 0:ti({status:Ot,errors:J,warnings:Le}))===null||zt===void 0?void 0:zt[Ot]),Nn=Ot&&or[Ot];pn=bn!==!1&&Nn?N.createElement("span",{className:U()(`${$t}-feedback-icon`,`${$t}-feedback-icon-${Ot}`)},bn||N.createElement(Nn,null)):null}let Mn=!0,En=Ot||"";return pt&&(Mn=Wt,En=(Ot!=null?Ot:dn)||""),{status:En,errors:J,warnings:Le,hasFeedback:!!$e,feedbackIcon:pn,isFormItemInput:Mn}},[Ot,$e,pt,Wt,dn]);return N.createElement(C.aM.Provider,{value:St},D)}var mr=function(S,D){var J={};for(var Le in S)Object.prototype.hasOwnProperty.call(S,Le)&&D.indexOf(Le)<0&&(J[Le]=S[Le]);if(S!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $e=0,Le=Object.getOwnPropertySymbols(S);$e<Le.length;$e++)D.indexOf(Le[$e])<0&&Object.prototype.propertyIsEnumerable.call(S,Le[$e])&&(J[Le[$e]]=S[Le[$e]]);return J};function Fr(S){const{prefixCls:D,className:J,rootClassName:Le,style:$e,help:tt,errors:at,warnings:Ct,validateStatus:pt,meta:$t,hasFeedback:Nt,hidden:Ot,children:Wt,fieldId:dn,required:St,isRequired:zt,onSubItemMetaChange:pn}=S,Mn=mr(S,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),En=`${D}-item`,{requiredMark:ti}=N.useContext(C.q3),bn=N.useRef(null),Nn=A(at),Lr=A(Ct),At=tt!=null,qt=!!(At||at.length||Ct.length),yn=!!bn.current&&(0,bt.Z)(bn.current),[ln,wi]=N.useState(null);(0,wt.Z)(()=>{if(qt&&bn.current){const za=getComputedStyle(bn.current);wi(parseInt(za.marginBottom,10))}},[qt,yn]);const Ci=za=>{za||wi(null)},ai=function(){let za=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const sa=za?Nn:$t.errors,Ti=za?Lr:$t.warnings;return ze(sa,Ti,$t,"",!!Nt,pt)}(),Si=U()(En,J,Le,{[`${En}-with-help`]:At||Nn.length||Lr.length,[`${En}-has-feedback`]:ai&&Nt,[`${En}-has-success`]:ai==="success",[`${En}-has-warning`]:ai==="warning",[`${En}-has-error`]:ai==="error",[`${En}-is-validating`]:ai==="validating",[`${En}-hidden`]:Ot});return N.createElement("div",{className:Si,style:$e,ref:bn},N.createElement(oe.Z,Object.assign({className:`${En}-row`},(0,we.Z)(Mn,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),N.createElement(Qt,Object.assign({htmlFor:dn},S,{requiredMark:ti,required:St!=null?St:zt,prefixCls:D})),N.createElement(je,Object.assign({},S,$t,{errors:Nn,warnings:Lr,prefixCls:D,status:ai,help:tt,marginBottom:ln,onErrorVisibleChanged:Ci}),N.createElement(C.qI.Provider,{value:pn},N.createElement(ei,{prefixCls:D,meta:$t,errors:$t.errors,warnings:$t.warnings,hasFeedback:Nt,validateStatus:ai},Wt)))),!!ln&&N.createElement("div",{className:`${En}-margin-offset`,style:{marginBottom:-ln}}))}const ta="__SPLIT__",Qa=null,Bt=N.memo(S=>{let{children:D}=S;return D},(S,D)=>S.value===D.value&&S.update===D.update&&S.childProps.length===D.childProps.length&&S.childProps.every((J,Le)=>J===D.childProps[Le]));function en(S){return S!=null}function Jt(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function nn(S){const{name:D,noStyle:J,className:Le,dependencies:$e,prefixCls:tt,shouldUpdate:at,rules:Ct,children:pt,required:$t,label:Nt,messageVariables:Ot,trigger:Wt="onChange",validateTrigger:dn,hidden:St,help:zt}=S,{getPrefixCls:pn}=N.useContext(st.E_),{name:Mn}=N.useContext(C.q3),En=O(pt),ti=typeof En=="function",bn=N.useContext(C.qI),{validateTrigger:Nn}=N.useContext(lt.FieldContext),Lr=dn!==void 0?dn:Nn,At=en(D),qt=pn("form",tt),[yn,ln]=Te(qt),wi=N.useContext(lt.ListContext),Ci=N.useRef(),[fi,ai]=nt({}),[Si,za]=(0,ot.Z)(()=>Jt()),sa=Vr=>{const os=wi==null?void 0:wi.getKey(Vr.name);if(za(Vr.destroy?Jt():Vr,!0),J&&zt!==!1&&bn){let fo=Vr.name;if(Vr.destroy)fo=Ci.current||fo;else if(os!==void 0){const[dl,Ql]=os;fo=[dl].concat((0,M.Z)(Ql)),Ci.current=fo}bn(Vr,fo)}},Ti=(Vr,os)=>{ai(fo=>{const dl=Object.assign({},fo),Do=[].concat((0,M.Z)(Vr.name.slice(0,-1)),(0,M.Z)(os)).join(ta);return Vr.destroy?delete dl[Do]:dl[Do]=Vr,dl})},[xa,wr]=N.useMemo(()=>{const Vr=(0,M.Z)(Si.errors),os=(0,M.Z)(Si.warnings);return Object.values(fi).forEach(fo=>{Vr.push.apply(Vr,(0,M.Z)(fo.errors||[])),os.push.apply(os,(0,M.Z)(fo.warnings||[]))}),[Vr,os]},[fi,Si.errors,Si.warnings]),Wi=xt();function ni(Vr,os,fo){return J&&!St?N.createElement(ei,{prefixCls:qt,hasFeedback:S.hasFeedback,validateStatus:S.validateStatus,meta:Si,errors:xa,warnings:wr,noStyle:!0},Vr):N.createElement(Fr,Object.assign({key:"row"},S,{className:U()(Le,ln),prefixCls:qt,fieldId:os,isRequired:fo,errors:xa,warnings:wr,meta:Si,onSubItemMetaChange:Ti}),Vr)}if(!At&&!ti&&!$e)return yn(ni(En));let Ea={};return typeof Nt=="string"?Ea.label=Nt:D&&(Ea.label=String(D)),Ot&&(Ea=Object.assign(Object.assign({},Ea),Ot)),yn(N.createElement(lt.Field,Object.assign({},S,{messageVariables:Ea,trigger:Wt,validateTrigger:Lr,onMetaChange:sa}),(Vr,os,fo)=>{const dl=it(D).length&&os?os.name:[],Ql=ft(dl,Mn),Do=$t!==void 0?$t:!!(Ct&&Ct.some(qa=>{if(qa&&typeof qa=="object"&&qa.required&&!qa.warningOnly)return!0;if(typeof qa=="function"){const ou=qa(fo);return ou&&ou.required&&!ou.warningOnly}return!1})),ql=Object.assign({},Vr);let Tu=null;if(Array.isArray(En)&&At)Tu=En;else if(!(ti&&(!(at||$e)||At))){if(!($e&&!ti&&!At))if((0,xe.l$)(En)){const qa=Object.assign(Object.assign({},En.props),ql);if(qa.id||(qa.id=Ql),zt||xa.length>0||wr.length>0||S.extra){const Cu=[];(zt||xa.length>0)&&Cu.push(`${Ql}_help`),S.extra&&Cu.push(`${Ql}_extra`),qa["aria-describedby"]=Cu.join(" ")}xa.length>0&&(qa["aria-invalid"]="true"),Do&&(qa["aria-required"]="true"),(0,pe.Yr)(En)&&(qa.ref=Wi(dl,En)),new Set([].concat((0,M.Z)(it(Wt)),(0,M.Z)(it(Lr)))).forEach(Cu=>{qa[Cu]=function(){for(var eu,tu,Mu,Kr,bh,kv=arguments.length,kh=new Array(kv),cd=0;cd<kv;cd++)kh[cd]=arguments[cd];(Mu=ql[Cu])===null||Mu===void 0||(eu=Mu).call.apply(eu,[ql].concat(kh)),(bh=(Kr=En.props)[Cu])===null||bh===void 0||(tu=bh).call.apply(tu,[Kr].concat(kh))}});const lu=[qa["aria-required"],qa["aria-invalid"],qa["aria-describedby"]];Tu=N.createElement(Bt,{value:ql[S.valuePropName||"value"],update:En,childProps:lu},(0,xe.Tm)(En,qa))}else ti&&(at||$e)&&!At?Tu=En(fo):Tu=En}return ni(Tu,Ql,Do)}))}const sr=nn;sr.useStatus=qe;var Pn=sr,Fn=function(S,D){var J={};for(var Le in S)Object.prototype.hasOwnProperty.call(S,Le)&&D.indexOf(Le)<0&&(J[Le]=S[Le]);if(S!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $e=0,Le=Object.getOwnPropertySymbols(S);$e<Le.length;$e++)D.indexOf(Le[$e])<0&&Object.prototype.propertyIsEnumerable.call(S,Le[$e])&&(J[Le[$e]]=S[Le[$e]]);return J},$r=S=>{var{prefixCls:D,children:J}=S,Le=Fn(S,["prefixCls","children"]);const{getPrefixCls:$e}=N.useContext(st.E_),tt=$e("form",D),at=N.useMemo(()=>({prefixCls:tt,status:"error"}),[tt]);return N.createElement(lt.List,Object.assign({},Le),(Ct,pt,$t)=>N.createElement(C.Rk.Provider,{value:at},J(Ct.map(Nt=>Object.assign(Object.assign({},Nt),{fieldKey:Nt.key})),pt,{errors:$t.errors,warnings:$t.warnings})))};function Ae(){const{form:S}=(0,N.useContext)(C.q3);return S}const $=Ke;$.Item=Pn,$.List=$r,$.ErrorList=Et,$.useForm=Se,$.useFormInstance=Ae,$.useWatch=lt.useWatch,$.Provider=C.RV,$.create=()=>{};var z=$},82586:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return Ce},n:function(){return ye}});var M=k(16646),H=k(94184),U=k.n(H),Y=k(67656),N=k(17799),I=k(67294),C=k(9708),A=k(53124),F=k(98866),P=k(98675),W=k(65223),K=k(4173),ge=k(72922),be=k(47673);function Ue(Me){return!!(Me.prefix||Me.suffix||Me.allowClear)}var Ne=function(Me,Oe){var re={};for(var q in Me)Object.prototype.hasOwnProperty.call(Me,q)&&Oe.indexOf(q)<0&&(re[q]=Me[q]);if(Me!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ce=0,q=Object.getOwnPropertySymbols(Me);ce<q.length;ce++)Oe.indexOf(q[ce])<0&&Object.prototype.propertyIsEnumerable.call(Me,q[ce])&&(re[q[ce]]=Me[q[ce]]);return re};function ye(Me,Oe){if(!Me)return;Me.focus(Oe);const{cursor:re}=Oe||{};if(re){const q=Me.value.length;switch(re){case"start":Me.setSelectionRange(0,0);break;case"end":Me.setSelectionRange(q,q);break;default:Me.setSelectionRange(0,q);break}}}var Ce=(0,I.forwardRef)((Me,Oe)=>{var re;const{prefixCls:q,bordered:ce=!0,status:Ee,size:Te,disabled:Je,onBlur:He,onFocus:rt,suffix:Et,allowClear:lt,addonAfter:st,addonBefore:mt,className:fe,style:We,styles:ht,rootClassName:Pt,onChange:Ve,classNames:it}=Me,ft=Ne(Me,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:ze,direction:Qe,input:Se}=I.useContext(A.E_),E=ze("input",q),me=(0,I.useRef)(null),[L,X]=(0,be.ZP)(E),{compactSize:Ke,compactItemClassnames:ot}=(0,K.ri)(E,Qe),pe=(0,P.Z)(ie=>{var Ie;return(Ie=Te!=null?Te:Ke)!==null&&Ie!==void 0?Ie:ie}),xe=I.useContext(F.Z),Ze=Je!=null?Je:xe,{status:O,hasFeedback:ne,feedbackIcon:qe}=(0,I.useContext)(W.aM),dt=(0,C.F)(O,Ee),nt=Ue(Me)||!!ne,xt=(0,I.useRef)(nt);(0,I.useEffect)(()=>{var ie;nt&&xt.current,xt.current=nt},[nt]);const bt=(0,ge.Z)(me,!0),wt=ie=>{bt(),He==null||He(ie)},we=ie=>{bt(),rt==null||rt(ie)},oe=ie=>{bt(),Ve==null||Ve(ie)},Fe=(ne||Et)&&I.createElement(I.Fragment,null,Et,ne&&qe);let Ye;return typeof lt=="object"&&(lt!=null&<.clearIcon)?Ye=lt:lt&&(Ye={clearIcon:I.createElement(M.Z,null)}),L(I.createElement(Y.default,Object.assign({ref:(0,N.sQ)(Oe,me),prefixCls:E,autoComplete:Se==null?void 0:Se.autoComplete},ft,{disabled:Ze,onBlur:wt,onFocus:we,style:Object.assign(Object.assign({},Se==null?void 0:Se.style),We),styles:Object.assign(Object.assign({},Se==null?void 0:Se.styles),ht),suffix:Fe,allowClear:Ye,className:U()(fe,Pt,ot,Se==null?void 0:Se.className),onChange:oe,addonAfter:st&&I.createElement(K.BR,null,I.createElement(W.Ux,{override:!0,status:!0},st)),addonBefore:mt&&I.createElement(K.BR,null,I.createElement(W.Ux,{override:!0,status:!0},mt)),classNames:Object.assign(Object.assign(Object.assign({},it),Se==null?void 0:Se.classNames),{input:U()({[`${E}-sm`]:pe==="small",[`${E}-lg`]:pe==="large",[`${E}-rtl`]:Qe==="rtl",[`${E}-borderless`]:!ce},!nt&&(0,C.Z)(E,dt),it==null?void 0:it.input,(re=Se==null?void 0:Se.classNames)===null||re===void 0?void 0:re.input,X)}),classes:{affixWrapper:U()({[`${E}-affix-wrapper-sm`]:pe==="small",[`${E}-affix-wrapper-lg`]:pe==="large",[`${E}-affix-wrapper-rtl`]:Qe==="rtl",[`${E}-affix-wrapper-borderless`]:!ce},(0,C.Z)(`${E}-affix-wrapper`,dt,ne),X),wrapper:U()({[`${E}-group-rtl`]:Qe==="rtl"},X),group:U()({[`${E}-group-wrapper-sm`]:pe==="small",[`${E}-group-wrapper-lg`]:pe==="large",[`${E}-group-wrapper-rtl`]:Qe==="rtl",[`${E}-group-wrapper-disabled`]:Ze},(0,C.Z)(`${E}-group-wrapper`,dt,ne),X)}})))})},96330:function(ke,ve,k){"use strict";var M=k(16646),H=k(94184),U=k.n(H),Y=k(64701),N=k(67294),I=k(9708),C=k(53124),A=k(98866),F=k(98675),P=k(65223),W=k(82586),K=k(47673),ge=function(Ue,Ne){var ye={};for(var De in Ue)Object.prototype.hasOwnProperty.call(Ue,De)&&Ne.indexOf(De)<0&&(ye[De]=Ue[De]);if(Ue!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ce=0,De=Object.getOwnPropertySymbols(Ue);Ce<De.length;Ce++)Ne.indexOf(De[Ce])<0&&Object.prototype.propertyIsEnumerable.call(Ue,De[Ce])&&(ye[De[Ce]]=Ue[De[Ce]]);return ye};const be=(0,N.forwardRef)((Ue,Ne)=>{const{prefixCls:ye,bordered:De=!0,size:Ce,disabled:Me,status:Oe,allowClear:re,showCount:q,classNames:ce,rootClassName:Ee,className:Te}=Ue,Je=ge(Ue,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:He,direction:rt}=N.useContext(C.E_),Et=(0,F.Z)(Ce),lt=N.useContext(A.Z),st=Me!=null?Me:lt,{status:mt,hasFeedback:fe,feedbackIcon:We}=N.useContext(P.aM),ht=(0,I.F)(mt,Oe),Pt=N.useRef(null);N.useImperativeHandle(Ne,()=>{var Qe;return{resizableTextArea:(Qe=Pt.current)===null||Qe===void 0?void 0:Qe.resizableTextArea,focus:Se=>{var E,me;(0,W.n)((me=(E=Pt.current)===null||E===void 0?void 0:E.resizableTextArea)===null||me===void 0?void 0:me.textArea,Se)},blur:()=>{var Se;return(Se=Pt.current)===null||Se===void 0?void 0:Se.blur()}}});const Ve=He("input",ye);let it;typeof re=="object"&&(re!=null&&re.clearIcon)?it=re:re&&(it={clearIcon:N.createElement(M.Z,null)});const[ft,ze]=(0,K.ZP)(Ve);return ft(N.createElement(Y.default,Object.assign({},Je,{disabled:st,allowClear:it,className:U()(Te,Ee),classes:{affixWrapper:U()(`${Ve}-textarea-affix-wrapper`,{[`${Ve}-affix-wrapper-rtl`]:rt==="rtl",[`${Ve}-affix-wrapper-borderless`]:!De,[`${Ve}-affix-wrapper-sm`]:Et==="small",[`${Ve}-affix-wrapper-lg`]:Et==="large",[`${Ve}-textarea-show-count`]:q},(0,I.Z)(`${Ve}-affix-wrapper`,ht),ze)},classNames:Object.assign(Object.assign({},ce),{textarea:U()({[`${Ve}-borderless`]:!De,[`${Ve}-sm`]:Et==="small",[`${Ve}-lg`]:Et==="large"},(0,I.Z)(Ve,ht),ze,ce==null?void 0:ce.textarea)}),prefixCls:Ve,suffix:fe&&N.createElement("span",{className:`${Ve}-textarea-suffix`},We),showCount:q,ref:Pt})))});ve.Z=be},72922:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return H}});var M=k(67294);function H(U,Y){const N=(0,M.useRef)([]),I=()=>{N.current.push(setTimeout(()=>{var C,A,F,P;!((C=U.current)===null||C===void 0)&&C.input&&((A=U.current)===null||A===void 0?void 0:A.input.getAttribute("type"))==="password"&&(!((F=U.current)===null||F===void 0)&&F.input.hasAttribute("value"))&&((P=U.current)===null||P===void 0||P.input.removeAttribute("value"))}))};return(0,M.useEffect)(()=>(Y&&I(),()=>N.current.forEach(C=>{C&&clearTimeout(C)})),[]),I}},69677:function(ke,ve,k){"use strict";k.d(ve,{default:function(){return Et}});var M=k(94184),H=k.n(M),U=k(67294),Y=k(53124),N=k(65223),I=k(47673),A=lt=>{const{getPrefixCls:st,direction:mt}=(0,U.useContext)(Y.E_),{prefixCls:fe,className:We}=lt,ht=st("input-group",fe),Pt=st("input"),[Ve,it]=(0,I.ZP)(Pt),ft=H()(ht,{[`${ht}-lg`]:lt.size==="large",[`${ht}-sm`]:lt.size==="small",[`${ht}-compact`]:lt.compact,[`${ht}-rtl`]:mt==="rtl"},it,We),ze=(0,U.useContext)(N.aM),Qe=(0,U.useMemo)(()=>Object.assign(Object.assign({},ze),{isFormItemInput:!1}),[ze]);return Ve(U.createElement("span",{className:ft,style:lt.style,onMouseEnter:lt.onMouseEnter,onMouseLeave:lt.onMouseLeave,onFocus:lt.onFocus,onBlur:lt.onBlur},U.createElement(N.aM.Provider,{value:Qe},lt.children)))},F=k(82586),P=k(63237),W=k(99569),K=k(10366),ge=k(17799),be=k(72922),Ue=function(lt,st){var mt={};for(var fe in lt)Object.prototype.hasOwnProperty.call(lt,fe)&&st.indexOf(fe)<0&&(mt[fe]=lt[fe]);if(lt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var We=0,fe=Object.getOwnPropertySymbols(lt);We<fe.length;We++)st.indexOf(fe[We])<0&&Object.prototype.propertyIsEnumerable.call(lt,fe[We])&&(mt[fe[We]]=lt[fe[We]]);return mt};const Ne=lt=>lt?U.createElement(W.Z,null):U.createElement(P.Z,null),ye={click:"onClick",hover:"onMouseOver"};var Ce=U.forwardRef((lt,st)=>{const{visibilityToggle:mt=!0}=lt,fe=typeof mt=="object"&&mt.visible!==void 0,[We,ht]=(0,U.useState)(()=>fe?mt.visible:!1),Pt=(0,U.useRef)(null);U.useEffect(()=>{fe&&ht(mt.visible)},[fe,mt]);const Ve=(0,be.Z)(Pt),it=()=>{const{disabled:Ze}=lt;Ze||(We&&Ve(),ht(O=>{var ne;const qe=!O;return typeof mt=="object"&&((ne=mt.onVisibleChange)===null||ne===void 0||ne.call(mt,qe)),qe}))},ft=Ze=>{const{action:O="click",iconRender:ne=Ne}=lt,qe=ye[O]||"",dt=ne(We),nt={[qe]:it,className:`${Ze}-icon`,key:"passwordIcon",onMouseDown:xt=>{xt.preventDefault()},onMouseUp:xt=>{xt.preventDefault()}};return U.cloneElement(U.isValidElement(dt)?dt:U.createElement("span",null,dt),nt)},{className:ze,prefixCls:Qe,inputPrefixCls:Se,size:E}=lt,me=Ue(lt,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:L}=U.useContext(Y.E_),X=L("input",Se),Ke=L("input-password",Qe),ot=mt&&ft(Ke),pe=H()(Ke,ze,{[`${Ke}-${E}`]:!!E}),xe=Object.assign(Object.assign({},(0,K.Z)(me,["suffix","iconRender","visibilityToggle"])),{type:We?"text":"password",className:pe,prefixCls:X,suffix:ot});return E&&(xe.size=E),U.createElement(F.Z,Object.assign({ref:(0,ge.sQ)(st,Pt)},xe))}),Me=k(72395),Oe=k(96159),re=k(71577),q=k(98675),ce=k(4173),Ee=function(lt,st){var mt={};for(var fe in lt)Object.prototype.hasOwnProperty.call(lt,fe)&&st.indexOf(fe)<0&&(mt[fe]=lt[fe]);if(lt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var We=0,fe=Object.getOwnPropertySymbols(lt);We<fe.length;We++)st.indexOf(fe[We])<0&&Object.prototype.propertyIsEnumerable.call(lt,fe[We])&&(mt[fe[We]]=lt[fe[We]]);return mt},Je=U.forwardRef((lt,st)=>{const{prefixCls:mt,inputPrefixCls:fe,className:We,size:ht,suffix:Pt,enterButton:Ve=!1,addonAfter:it,loading:ft,disabled:ze,onSearch:Qe,onChange:Se,onCompositionStart:E,onCompositionEnd:me}=lt,L=Ee(lt,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:X,direction:Ke}=U.useContext(Y.E_),ot=U.useRef(!1),pe=X("input-search",mt),xe=X("input",fe),{compactSize:Ze}=(0,ce.ri)(pe,Ke),O=(0,q.Z)(je=>{var Be;return(Be=ht!=null?ht:Ze)!==null&&Be!==void 0?Be:je}),ne=U.useRef(null),qe=je=>{je&&je.target&&je.type==="click"&&Qe&&Qe(je.target.value,je,{source:"clear"}),Se&&Se(je)},dt=je=>{var Be;document.activeElement===((Be=ne.current)===null||Be===void 0?void 0:Be.input)&&je.preventDefault()},nt=je=>{var Be,et;Qe&&Qe((et=(Be=ne.current)===null||Be===void 0?void 0:Be.input)===null||et===void 0?void 0:et.value,je,{source:"input"})},xt=je=>{ot.current||ft||nt(je)},bt=typeof Ve=="boolean"?U.createElement(Me.Z,null):null,wt=`${pe}-button`;let we;const oe=Ve||{},Fe=oe.type&&oe.type.__ANT_BUTTON===!0;Fe||oe.type==="button"?we=(0,Oe.Tm)(oe,Object.assign({onMouseDown:dt,onClick:je=>{var Be,et;(et=(Be=oe==null?void 0:oe.props)===null||Be===void 0?void 0:Be.onClick)===null||et===void 0||et.call(Be,je),nt(je)},key:"enterButton"},Fe?{className:wt,size:O}:{})):we=U.createElement(re.ZP,{className:wt,type:Ve?"primary":void 0,size:O,disabled:ze,key:"enterButton",onMouseDown:dt,onClick:nt,loading:ft,icon:bt},Ve),it&&(we=[we,(0,Oe.Tm)(it,{key:"addonAfter"})]);const Ye=H()(pe,{[`${pe}-rtl`]:Ke==="rtl",[`${pe}-${O}`]:!!O,[`${pe}-with-button`]:!!Ve},We),ie=je=>{ot.current=!0,E==null||E(je)},Ie=je=>{ot.current=!1,me==null||me(je)};return U.createElement(F.Z,Object.assign({ref:(0,ge.sQ)(ne,st),onPressEnter:xt},L,{size:O,onCompositionStart:ie,onCompositionEnd:Ie,prefixCls:xe,addonAfter:we,suffix:Pt,onChange:qe,className:Ye,disabled:ze}))}),He=k(96330);const rt=F.Z;rt.Group=A,rt.Search=Je,rt.TextArea=He.Z,rt.Password=Ce;var Et=rt},47673:function(ke,ve,k){"use strict";k.d(ve,{M1:function(){return C},TM:function(){return Oe},Xy:function(){return A},bi:function(){return W},e5:function(){return Me},ik:function(){return K},nz:function(){return N},pU:function(){return I},s7:function(){return ge},x0:function(){return P}});var M=k(14747),H=k(80110),U=k(45503),Y=k(67968);const N=re=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:re,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),I=re=>({borderColor:re.hoverBorderColor}),C=re=>({borderColor:re.activeBorderColor,boxShadow:re.activeShadow,outline:0}),A=re=>({color:re.colorTextDisabled,backgroundColor:re.colorBgContainerDisabled,borderColor:re.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},I((0,U.TS)(re,{hoverBorderColor:re.colorBorder})))}),F=re=>{const{paddingBlockLG:q,fontSizeLG:ce,lineHeightLG:Ee,borderRadiusLG:Te,paddingInlineLG:Je}=re;return{padding:`${q}px ${Je}px`,fontSize:ce,lineHeight:Ee,borderRadius:Te}},P=re=>({padding:`${re.paddingBlockSM}px ${re.paddingInlineSM}px`,borderRadius:re.borderRadiusSM}),W=(re,q)=>{const{componentCls:ce,colorError:Ee,colorWarning:Te,errorActiveShadow:Je,warningActiveShadow:He,colorErrorBorderHover:rt,colorWarningBorderHover:Et}=re;return{[`&-status-error:not(${q}-disabled):not(${q}-borderless)${q}`]:{borderColor:Ee,"&:hover":{borderColor:rt},"&:focus, &-focused":Object.assign({},C((0,U.TS)(re,{activeBorderColor:Ee,activeShadow:Je}))),[`${ce}-prefix, ${ce}-suffix`]:{color:Ee}},[`&-status-warning:not(${q}-disabled):not(${q}-borderless)${q}`]:{borderColor:Te,"&:hover":{borderColor:Et},"&:focus, &-focused":Object.assign({},C((0,U.TS)(re,{activeBorderColor:Te,activeShadow:He}))),[`${ce}-prefix, ${ce}-suffix`]:{color:Te}}}},K=re=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${re.paddingBlock}px ${re.paddingInline}px`,color:re.colorText,fontSize:re.fontSize,lineHeight:re.lineHeight,backgroundColor:re.colorBgContainer,backgroundImage:"none",borderWidth:re.lineWidth,borderStyle:re.lineType,borderColor:re.colorBorder,borderRadius:re.borderRadius,transition:`all ${re.motionDurationMid}`},N(re.colorTextPlaceholder)),{"&:hover":Object.assign({},I(re)),"&:focus, &-focused":Object.assign({},C(re)),"&-disabled, &[disabled]":Object.assign({},A(re)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:re.controlHeight,lineHeight:re.lineHeight,verticalAlign:"bottom",transition:`all ${re.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},F(re)),"&-sm":Object.assign({},P(re)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),ge=re=>{const{componentCls:q,antCls:ce}=re;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:re.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${q}, &-lg > ${q}-group-addon`]:Object.assign({},F(re)),[`&-sm ${q}, &-sm > ${q}-group-addon`]:Object.assign({},P(re)),[`&-lg ${ce}-select-single ${ce}-select-selector`]:{height:re.controlHeightLG},[`&-sm ${ce}-select-single ${ce}-select-selector`]:{height:re.controlHeightSM},[`> ${q}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${q}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${re.paddingInline}px`,color:re.colorText,fontWeight:"normal",fontSize:re.fontSize,textAlign:"center",backgroundColor:re.colorFillAlter,border:`${re.lineWidth}px ${re.lineType} ${re.colorBorder}`,borderRadius:re.borderRadius,transition:`all ${re.motionDurationSlow}`,lineHeight:1,[`${ce}-select`]:{margin:`-${re.paddingBlock+1}px -${re.paddingInline}px`,[`&${ce}-select-single:not(${ce}-select-customize-input)`]:{[`${ce}-select-selector`]:{backgroundColor:"inherit",border:`${re.lineWidth}px ${re.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${ce}-select-selector`]:{color:re.colorPrimary}}},[`${ce}-cascader-picker`]:{margin:`-9px -${re.paddingInline}px`,backgroundColor:"transparent",[`${ce}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${q}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${q}-search-with-button &`]:{zIndex:0}}},[`> ${q}:first-child, ${q}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${ce}-select ${ce}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${q}-affix-wrapper`]:{[`&:not(:first-child) ${q}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${q}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${q}:last-child, ${q}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${ce}-select ${ce}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${q}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${q}-search &`]:{borderStartStartRadius:re.borderRadius,borderEndStartRadius:re.borderRadius}},[`&:not(:first-child), ${q}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${q}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,M.dF)()),{[`${q}-group-addon, ${q}-group-wrap, > ${q}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:re.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
|
& > ${q}-affix-wrapper,
|
|
|
& > ${q}-number-affix-wrapper,
|
|
|
& > ${ce}-picker-range
|
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-re.lineWidth,borderInlineEndWidth:re.lineWidth},[`${q}`]:{float:"none"},[`& > ${ce}-select > ${ce}-select-selector,
|
|
|
& > ${ce}-select-auto-complete ${q},
|
|
|
& > ${ce}-cascader-picker ${q},
|
|
|
& > ${q}-group-wrapper ${q}`]:{borderInlineEndWidth:re.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${ce}-select-focused`]:{zIndex:1},[`& > ${ce}-select > ${ce}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
|
& > ${ce}-select:first-child > ${ce}-select-selector,
|
|
|
& > ${ce}-select-auto-complete:first-child ${q},
|
|
|
& > ${ce}-cascader-picker:first-child ${q}`]:{borderStartStartRadius:re.borderRadius,borderEndStartRadius:re.borderRadius},[`& > *:last-child,
|
|
|
& > ${ce}-select:last-child > ${ce}-select-selector,
|
|
|
& > ${ce}-cascader-picker:last-child ${q},
|
|
|
& > ${ce}-cascader-picker-focused:last-child ${q}`]:{borderInlineEndWidth:re.lineWidth,borderStartEndRadius:re.borderRadius,borderEndEndRadius:re.borderRadius},[`& > ${ce}-select-auto-complete ${q}`]:{verticalAlign:"top"},[`${q}-group-wrapper + ${q}-group-wrapper`]:{marginInlineStart:-re.lineWidth,[`${q}-affix-wrapper`]:{borderRadius:0}},[`${q}-group-wrapper:not(:last-child)`]:{[`&${q}-search > ${q}-group`]:{[`& > ${q}-group-addon > ${q}-search-button`]:{borderRadius:0},[`& > ${q}`]:{borderStartStartRadius:re.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:re.borderRadius}}}})}},be=re=>{const{componentCls:q,controlHeightSM:ce,lineWidth:Ee}=re,Je=(ce-Ee*2-16)/2;return{[q]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,M.Wf)(re)),K(re)),W(re,q)),{'&[type="color"]':{height:re.controlHeight,[`&${q}-lg`]:{height:re.controlHeightLG},[`&${q}-sm`]:{height:ce,paddingTop:Je,paddingBottom:Je}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},Ue=re=>{const{componentCls:q}=re;return{[`${q}-clear-icon`]:{margin:0,color:re.colorTextQuaternary,fontSize:re.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${re.motionDurationSlow}`,"&:hover":{color:re.colorTextTertiary},"&:active":{color:re.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${re.inputAffixPadding}px`}}}},Ne=re=>{const{componentCls:q,inputAffixPadding:ce,colorTextDescription:Ee,motionDurationSlow:Te,colorIcon:Je,colorIconHover:He,iconCls:rt}=re;return{[`${q}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},K(re)),{display:"inline-flex",[`&:not(${q}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},I(re)),{zIndex:1,[`${q}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${q}[disabled]`]:{background:"transparent"}},[`> input${q}`]:{padding:0,fontSize:"inherit",border:"none",borderRadius:0,outline:"none","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${q}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:re.paddingXS}},"&-show-count-suffix":{color:Ee},"&-show-count-has-suffix":{marginInlineEnd:re.paddingXXS},"&-prefix":{marginInlineEnd:ce},"&-suffix":{marginInlineStart:ce}}}),Ue(re)),{[`${rt}${q}-password-icon`]:{color:Je,cursor:"pointer",transition:`all ${Te}`,"&:hover":{color:He}}}),W(re,`${q}-affix-wrapper`))}},ye=re=>{const{componentCls:q,colorError:ce,colorWarning:Ee,borderRadiusLG:Te,borderRadiusSM:Je}=re;return{[`${q}-group`]:Object.assign(Object.assign(Object.assign({},(0,M.Wf)(re)),ge(re)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${q}-group-addon`]:{borderRadius:Te,fontSize:re.fontSizeLG}},"&-sm":{[`${q}-group-addon`]:{borderRadius:Je}},"&-status-error":{[`${q}-group-addon`]:{color:ce,borderColor:ce}},"&-status-warning":{[`${q}-group-addon`]:{color:Ee,borderColor:Ee}},"&-disabled":{[`${q}-group-addon`]:Object.assign({},A(re))},[`&:not(${q}-compact-first-item):not(${q}-compact-last-item)${q}-compact-item`]:{[`${q}, ${q}-group-addon`]:{borderRadius:0}},[`&:not(${q}-compact-last-item)${q}-compact-first-item`]:{[`${q}, ${q}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${q}-compact-first-item)${q}-compact-last-item`]:{[`${q}, ${q}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},De=re=>{const{componentCls:q,antCls:ce}=re,Ee=`${q}-search`;return{[Ee]:{[`${q}`]:{"&:hover, &:focus":{borderColor:re.colorPrimaryHover,[`+ ${q}-group-addon ${Ee}-button:not(${ce}-btn-primary)`]:{borderInlineStartColor:re.colorPrimaryHover}}},[`${q}-affix-wrapper`]:{borderRadius:0},[`${q}-lg`]:{lineHeight:re.lineHeightLG-2e-4},[`> ${q}-group`]:{[`> ${q}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${Ee}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:re.borderRadius,borderEndEndRadius:re.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${Ee}-button:not(${ce}-btn-primary)`]:{color:re.colorTextDescription,"&:hover":{color:re.colorPrimaryHover},"&:active":{color:re.colorPrimaryActive},[`&${ce}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${Ee}-button`]:{height:re.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${Ee}-button`]:{height:re.controlHeightLG},[`&-small ${Ee}-button`]:{height:re.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${q}-compact-item`]:{[`&:not(${q}-compact-last-item)`]:{[`${q}-group-addon`]:{[`${q}-search-button`]:{marginInlineEnd:-re.lineWidth,borderRadius:0}}},[`&:not(${q}-compact-first-item)`]:{[`${q},${q}-affix-wrapper`]:{borderRadius:0}},[`> ${q}-group-addon ${q}-search-button,
|
|
|
> ${q},
|
|
|
${q}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${q}-affix-wrapper-focused`]:{zIndex:2}}}}},Ce=re=>{const{componentCls:q,paddingLG:ce}=re,Ee=`${q}-textarea`;return{[Ee]:{position:"relative","&-show-count":{[`> ${q}`]:{height:"100%"},[`${q}-data-count`]:{position:"absolute",bottom:-re.fontSize*re.lineHeight,insetInlineEnd:0,color:re.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${q}`]:{paddingInlineEnd:ce}},[`&-affix-wrapper${Ee}-has-feedback`]:{[`${q}`]:{paddingInlineEnd:ce}},[`&-affix-wrapper${q}-affix-wrapper`]:{padding:0,[`> textarea${q}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${q}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${q}-clear-icon`]:{position:"absolute",insetInlineEnd:re.paddingXS,insetBlockStart:re.paddingXS},[`${Ee}-suffix`]:{position:"absolute",top:0,insetInlineEnd:re.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function Me(re){return(0,U.TS)(re,{inputAffixPadding:re.paddingXXS})}const Oe=re=>{const{controlHeight:q,fontSize:ce,lineHeight:Ee,lineWidth:Te,controlHeightSM:Je,controlHeightLG:He,fontSizeLG:rt,lineHeightLG:Et,paddingSM:lt,controlPaddingHorizontalSM:st,controlPaddingHorizontal:mt,colorFillAlter:fe,colorPrimaryHover:We,controlOutlineWidth:ht,controlOutline:Pt,colorErrorOutline:Ve,colorWarningOutline:it}=re;return{paddingBlock:Math.max(Math.round((q-ce*Ee)/2*10)/10-Te,3),paddingBlockSM:Math.max(Math.round((Je-ce*Ee)/2*10)/10-Te,0),paddingBlockLG:Math.ceil((He-rt*Et)/2*10)/10-Te,paddingInline:lt-Te,paddingInlineSM:st-Te,paddingInlineLG:mt-Te,addonBg:fe,activeBorderColor:We,hoverBorderColor:We,activeShadow:`0 0 0 ${ht}px ${Pt}`,errorActiveShadow:`0 0 0 ${ht}px ${Ve}`,warningActiveShadow:`0 0 0 ${ht}px ${it}`}};ve.ZP=(0,Y.Z)("Input",re=>{const q=(0,U.TS)(re,Me(re));return[be(q),Ce(q),Ne(q),ye(q),De(q),(0,H.c)(q)]},Oe)},78045:function(ke,ve,k){"use strict";k.d(ve,{ZP:function(){return Pt}});var M=k(94184),H=k.n(M),U=k(5663),Y=k(1337),N=k(67294),I=k(53124),C=k(98675);const A=N.createContext(null),F=A.Provider;var P=A;const W=N.createContext(null),K=W.Provider;var ge=k(95860),be=k(17799),Ue=k(98866),Ne=k(65223),ye=k(14747),De=k(67968),Ce=k(45503);const Me=Ve=>{const{componentCls:it,antCls:ft}=Ve,ze=`${it}-group`;return{[ze]:Object.assign(Object.assign({},(0,ye.Wf)(Ve)),{display:"inline-block",fontSize:0,[`&${ze}-rtl`]:{direction:"rtl"},[`${ft}-badge ${ft}-badge-count`]:{zIndex:1},[`> ${ft}-badge:not(:first-child) > ${ft}-button-wrapper`]:{borderInlineStart:"none"}})}},Oe=Ve=>{const{componentCls:it,wrapperMarginInlineEnd:ft,colorPrimary:ze,radioSize:Qe,motionDurationSlow:Se,motionDurationMid:E,motionEaseInOutCirc:me,colorBgContainer:L,colorBorder:X,lineWidth:Ke,dotSize:ot,colorBgContainerDisabled:pe,colorTextDisabled:xe,paddingXS:Ze,dotColorDisabled:O,lineType:ne,radioDotDisabledSize:qe,wireframe:dt,colorWhite:nt}=Ve,xt=`${it}-inner`;return{[`${it}-wrapper`]:Object.assign(Object.assign({},(0,ye.Wf)(Ve)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:ft,cursor:"pointer",[`&${it}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:Ve.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${it}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${Ke}px ${ne} ${ze}`,borderRadius:"50%",visibility:"hidden",content:'""'},[it]:Object.assign(Object.assign({},(0,ye.Wf)(Ve)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${it}-wrapper:hover &,
|
|
|
&:hover ${xt}`]:{borderColor:ze},[`${it}-input:focus-visible + ${xt}`]:Object.assign({},(0,ye.oN)(Ve)),[`${it}:hover::after, ${it}-wrapper:hover &::after`]:{visibility:"visible"},[`${it}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:Qe,height:Qe,marginBlockStart:Qe/-2,marginInlineStart:Qe/-2,backgroundColor:dt?ze:nt,borderBlockStart:0,borderInlineStart:0,borderRadius:Qe,transform:"scale(0)",opacity:0,transition:`all ${Se} ${me}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:Qe,height:Qe,backgroundColor:L,borderColor:X,borderStyle:"solid",borderWidth:Ke,borderRadius:"50%",transition:`all ${E}`},[`${it}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${it}-checked`]:{[xt]:{borderColor:ze,backgroundColor:dt?L:ze,"&::after":{transform:`scale(${ot/Qe})`,opacity:1,transition:`all ${Se} ${me}`}}},[`${it}-disabled`]:{cursor:"not-allowed",[xt]:{backgroundColor:pe,borderColor:X,cursor:"not-allowed","&::after":{backgroundColor:O}},[`${it}-input`]:{cursor:"not-allowed"},[`${it}-disabled + span`]:{color:xe,cursor:"not-allowed"},[`&${it}-checked`]:{[xt]:{"&::after":{transform:`scale(${qe/Qe})`}}}},[`span${it} + *`]:{paddingInlineStart:Ze,paddingInlineEnd:Ze}})}},re=Ve=>{const{buttonColor:it,controlHeight:ft,componentCls:ze,lineWidth:Qe,lineType:Se,colorBorder:E,motionDurationSlow:me,motionDurationMid:L,buttonPaddingInline:X,fontSize:Ke,buttonBg:ot,fontSizeLG:pe,controlHeightLG:xe,controlHeightSM:Ze,paddingXS:O,borderRadius:ne,borderRadiusSM:qe,borderRadiusLG:dt,buttonCheckedBg:nt,buttonSolidCheckedColor:xt,colorTextDisabled:bt,colorBgContainerDisabled:wt,buttonCheckedBgDisabled:we,buttonCheckedColorDisabled:oe,colorPrimary:Fe,colorPrimaryHover:Ye,colorPrimaryActive:ie,buttonSolidCheckedBg:Ie,buttonSolidCheckedHoverBg:je,buttonSolidCheckedActiveBg:Be}=Ve;return{[`${ze}-button-wrapper`]:{position:"relative",display:"inline-block",height:ft,margin:0,paddingInline:X,paddingBlock:0,color:it,fontSize:Ke,lineHeight:`${ft-Qe*2}px`,background:ot,border:`${Qe}px ${Se} ${E}`,borderBlockStartWidth:Qe+.02,borderInlineStartWidth:0,borderInlineEndWidth:Qe,cursor:"pointer",transition:[`color ${L}`,`background ${L}`,`box-shadow ${L}`].join(","),a:{color:it},[`> ${ze}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-Qe,insetInlineStart:-Qe,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:Qe,paddingInline:0,backgroundColor:E,transition:`background-color ${me}`,content:'""'}},"&:first-child":{borderInlineStart:`${Qe}px ${Se} ${E}`,borderStartStartRadius:ne,borderEndStartRadius:ne},"&:last-child":{borderStartEndRadius:ne,borderEndEndRadius:ne},"&:first-child:last-child":{borderRadius:ne},[`${ze}-group-large &`]:{height:xe,fontSize:pe,lineHeight:`${xe-Qe*2}px`,"&:first-child":{borderStartStartRadius:dt,borderEndStartRadius:dt},"&:last-child":{borderStartEndRadius:dt,borderEndEndRadius:dt}},[`${ze}-group-small &`]:{height:Ze,paddingInline:O-Qe,paddingBlock:0,lineHeight:`${Ze-Qe*2}px`,"&:first-child":{borderStartStartRadius:qe,borderEndStartRadius:qe},"&:last-child":{borderStartEndRadius:qe,borderEndEndRadius:qe}},"&:hover":{position:"relative",color:Fe},"&:has(:focus-visible)":Object.assign({},(0,ye.oN)(Ve)),[`${ze}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${ze}-button-wrapper-disabled)`]:{zIndex:1,color:Fe,background:nt,borderColor:Fe,"&::before":{backgroundColor:Fe},"&:first-child":{borderColor:Fe},"&:hover":{color:Ye,borderColor:Ye,"&::before":{backgroundColor:Ye}},"&:active":{color:ie,borderColor:ie,"&::before":{backgroundColor:ie}}},[`${ze}-group-solid &-checked:not(${ze}-button-wrapper-disabled)`]:{color:xt,background:Ie,borderColor:Ie,"&:hover":{color:xt,background:je,borderColor:je},"&:active":{color:xt,background:Be,borderColor:Be}},"&-disabled":{color:bt,backgroundColor:wt,borderColor:E,cursor:"not-allowed","&:first-child, &:hover":{color:bt,backgroundColor:wt,borderColor:E}},[`&-disabled${ze}-button-wrapper-checked`]:{color:oe,backgroundColor:we,borderColor:E,boxShadow:"none"}}}},q=Ve=>Ve-4*2;var ce=(0,De.Z)("Radio",Ve=>{const{controlOutline:it,controlOutlineWidth:ft,radioSize:ze}=Ve,Qe=`0 0 0 ${ft}px ${it}`,Se=Qe,E=q(ze),me=(0,Ce.TS)(Ve,{radioDotDisabledSize:E,radioFocusShadow:Qe,radioButtonFocusShadow:Se});return[Me(me),Oe(me),re(me)]},Ve=>{const{wireframe:it,padding:ft,marginXS:ze,lineWidth:Qe,fontSizeLG:Se,colorText:E,colorBgContainer:me,colorTextDisabled:L,controlItemBgActiveDisabled:X,colorTextLightSolid:Ke,colorPrimary:ot,colorPrimaryHover:pe,colorPrimaryActive:xe}=Ve,Ze=4,O=Se,ne=it?q(O):O-(Ze+Qe)*2;return{radioSize:O,dotSize:ne,dotColorDisabled:L,buttonSolidCheckedColor:Ke,buttonSolidCheckedBg:ot,buttonSolidCheckedHoverBg:pe,buttonSolidCheckedActiveBg:xe,buttonBg:me,buttonCheckedBg:me,buttonColor:E,buttonCheckedBgDisabled:X,buttonCheckedColorDisabled:L,buttonPaddingInline:ft-Qe,wrapperMarginInlineEnd:ze}}),Ee=k(45353),Te=k(92429),Je=function(Ve,it){var ft={};for(var ze in Ve)Object.prototype.hasOwnProperty.call(Ve,ze)&&it.indexOf(ze)<0&&(ft[ze]=Ve[ze]);if(Ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Qe=0,ze=Object.getOwnPropertySymbols(Ve);Qe<ze.length;Qe++)it.indexOf(ze[Qe])<0&&Object.prototype.propertyIsEnumerable.call(Ve,ze[Qe])&&(ft[ze[Qe]]=Ve[ze[Qe]]);return ft};const He=(Ve,it)=>{var ft,ze;const Qe=N.useContext(P),Se=N.useContext(W),{getPrefixCls:E,direction:me,radio:L}=N.useContext(I.E_),X=N.useRef(null),Ke=(0,be.sQ)(it,X),{isFormItemInput:ot}=N.useContext(Ne.aM),pe=ie=>{var Ie,je;(Ie=Ve.onChange)===null||Ie===void 0||Ie.call(Ve,ie),(je=Qe==null?void 0:Qe.onChange)===null||je===void 0||je.call(Qe,ie)},{prefixCls:xe,className:Ze,rootClassName:O,children:ne,style:qe}=Ve,dt=Je(Ve,["prefixCls","className","rootClassName","children","style"]),nt=E("radio",xe),xt=((Qe==null?void 0:Qe.optionType)||Se)==="button",bt=xt?`${nt}-button`:nt,[wt,we]=ce(nt),oe=Object.assign({},dt),Fe=N.useContext(Ue.Z);Qe&&(oe.name=Qe.name,oe.onChange=pe,oe.checked=Ve.value===Qe.value,oe.disabled=(ft=oe.disabled)!==null&&ft!==void 0?ft:Qe.disabled),oe.disabled=(ze=oe.disabled)!==null&&ze!==void 0?ze:Fe;const Ye=H()(`${bt}-wrapper`,{[`${bt}-wrapper-checked`]:oe.checked,[`${bt}-wrapper-disabled`]:oe.disabled,[`${bt}-wrapper-rtl`]:me==="rtl",[`${bt}-wrapper-in-form-item`]:ot},L==null?void 0:L.className,Ze,O,we);return wt(N.createElement(Ee.Z,{component:"Radio",disabled:oe.disabled},N.createElement("label",{className:Ye,style:Object.assign(Object.assign({},L==null?void 0:L.style),qe),onMouseEnter:Ve.onMouseEnter,onMouseLeave:Ve.onMouseLeave},N.createElement(ge.Z,Object.assign({},oe,{className:H()(oe.className,!xt&&Te.A),type:"radio",prefixCls:bt,ref:Ke})),ne!==void 0?N.createElement("span",null,ne):null)))};var Et=N.forwardRef(He);const lt=N.forwardRef((Ve,it)=>{const{getPrefixCls:ft,direction:ze}=N.useContext(I.E_),[Qe,Se]=(0,U.Z)(Ve.defaultValue,{value:Ve.value}),E=Ie=>{const je=Qe,Be=Ie.target.value;"value"in Ve||Se(Be);const{onChange:et}=Ve;et&&Be!==je&&et(Ie)},{prefixCls:me,className:L,rootClassName:X,options:Ke,buttonStyle:ot="outline",disabled:pe,children:xe,size:Ze,style:O,id:ne,onMouseEnter:qe,onMouseLeave:dt,onFocus:nt,onBlur:xt}=Ve,bt=ft("radio",me),wt=`${bt}-group`,[we,oe]=ce(bt);let Fe=xe;Ke&&Ke.length>0&&(Fe=Ke.map(Ie=>typeof Ie=="string"||typeof Ie=="number"?N.createElement(Et,{key:Ie.toString(),prefixCls:bt,disabled:pe,value:Ie,checked:Qe===Ie},Ie):N.createElement(Et,{key:`radio-group-value-options-${Ie.value}`,prefixCls:bt,disabled:Ie.disabled||pe,value:Ie.value,checked:Qe===Ie.value,title:Ie.title,style:Ie.style},Ie.label)));const Ye=(0,C.Z)(Ze),ie=H()(wt,`${wt}-${ot}`,{[`${wt}-${Ye}`]:Ye,[`${wt}-rtl`]:ze==="rtl"},L,X,oe);return we(N.createElement("div",Object.assign({},(0,Y.Z)(Ve,{aria:!0,data:!0}),{className:ie,style:O,onMouseEnter:qe,onMouseLeave:dt,onFocus:nt,onBlur:xt,id:ne,ref:it}),N.createElement(F,{value:{onChange:E,value:Qe,disabled:Ve.disabled,name:Ve.name,optionType:Ve.optionType}},Fe)))});var st=N.memo(lt),mt=function(Ve,it){var ft={};for(var ze in Ve)Object.prototype.hasOwnProperty.call(Ve,ze)&&it.indexOf(ze)<0&&(ft[ze]=Ve[ze]);if(Ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Qe=0,ze=Object.getOwnPropertySymbols(Ve);Qe<ze.length;Qe++)it.indexOf(ze[Qe])<0&&Object.prototype.propertyIsEnumerable.call(Ve,ze[Qe])&&(ft[ze[Qe]]=Ve[ze[Qe]]);return ft};const fe=(Ve,it)=>{const{getPrefixCls:ft}=N.useContext(I.E_),{prefixCls:ze}=Ve,Qe=mt(Ve,["prefixCls"]),Se=ft("radio",ze);return N.createElement(K,{value:"button"},N.createElement(Et,Object.assign({prefixCls:Se},Qe,{type:"radio",ref:it})))};var We=N.forwardRef(fe);const ht=Et;ht.Button=We,ht.Group=st,ht.__ANT_RADIO=!0;var Pt=ht},11713:function(ke,ve,k){"use strict";k.d(ve,{default:function(){return Jg}});var M=k(94184),H=k.n(M),U=k(87462),Y=k(74902),N=k(4942),I=k(1413),C=k(97685),A=k(45987),F=k(71002),P=k(67294);function W(vt){var _t=P.useRef();_t.current=vt;var Ht=P.useCallback(function(){for(var Gt,sn=arguments.length,cn=new Array(sn),Sn=0;Sn<sn;Sn++)cn[Sn]=arguments[Sn];return(Gt=_t.current)===null||Gt===void 0?void 0:Gt.call.apply(Gt,[_t].concat(cn))},[]);return Ht}function K(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var ge=K()?P.useLayoutEffect:P.useEffect,be=ge,Ue=function(_t,Ht){var Gt=P.useRef(!0);ge(function(){if(!Gt.current)return _t()},Ht),ge(function(){return Gt.current=!1,function(){Gt.current=!0}},[])};function Ne(vt){var _t=P.useRef(!1),Ht=P.useState(vt),Gt=(0,C.Z)(Ht,2),sn=Gt[0],cn=Gt[1];P.useEffect(function(){return _t.current=!1,function(){_t.current=!0}},[]);function Sn(Bn,gr){gr&&_t.current||cn(Bn)}return[sn,Sn]}function ye(vt){return vt!==void 0}function De(vt,_t){var Ht=_t||{},Gt=Ht.defaultValue,sn=Ht.value,cn=Ht.onChange,Sn=Ht.postState,Bn=Ne(function(){return ye(sn)?sn:ye(Gt)?typeof Gt=="function"?Gt():Gt:typeof vt=="function"?vt():vt}),gr=(0,C.Z)(Bn,2),gn=gr[0],_n=gr[1],fn=sn!==void 0?sn:gn,Sr=Sn?Sn(fn):fn,Rn=W(cn),Ln=Ne([fn]),Jr=(0,C.Z)(Ln,2),mi=Jr[0],_i=Jr[1];Ue(function(){var pi=mi[0];gn!==pi&&Rn(gn,pi)},[mi]),Ue(function(){ye(sn)||_n(sn)},[sn]);var vi=W(function(pi,ba){_n(pi,ba),_i([fn],ba)});return[Sr,vi]}var Ce={};function Me(vt,_t){}function Oe(vt,_t){}function re(){Ce={}}function q(vt,_t,Ht){!_t&&!Ce[Ht]&&(vt(!1,Ht),Ce[Ht]=!0)}function ce(vt,_t){q(Me,vt,_t)}function Ee(vt,_t){q(Oe,vt,_t)}var Te=ce,Je=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var vt=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(vt)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(vt==null?void 0:vt.substr(0,4))},He={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(_t){var Ht=_t.keyCode;if(_t.altKey&&!_t.ctrlKey||_t.metaKey||Ht>=He.F1&&Ht<=He.F12)return!1;switch(Ht){case He.ALT:case He.CAPS_LOCK:case He.CONTEXT_MENU:case He.CTRL:case He.DOWN:case He.END:case He.ESC:case He.HOME:case He.INSERT:case He.LEFT:case He.MAC_FF_META:case He.META:case He.NUMLOCK:case He.NUM_CENTER:case He.PAGE_DOWN:case He.PAGE_UP:case He.PAUSE:case He.PRINT_SCREEN:case He.RIGHT:case He.SHIFT:case He.UP:case He.WIN_KEY:case He.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(_t){if(_t>=He.ZERO&&_t<=He.NINE||_t>=He.NUM_ZERO&&_t<=He.NUM_MULTIPLY||_t>=He.A&&_t<=He.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&_t===0)return!0;switch(_t){case He.SPACE:case He.QUESTION_MARK:case He.NUM_PLUS:case He.NUM_MINUS:case He.NUM_PERIOD:case He.NUM_DIVISION:case He.SEMICOLON:case He.DASH:case He.EQUALS:case He.COMMA:case He.PERIOD:case He.SLASH:case He.APOSTROPHE:case He.SINGLE_QUOTE:case He.OPEN_SQUARE_BRACKET:case He.BACKSLASH:case He.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},rt=He,Et=k(47655);function lt(vt,_t,Ht){var Gt=P.useRef({});return(!("value"in Gt.current)||Ht(Gt.current.condition,_t))&&(Gt.current.value=vt(),Gt.current.condition=_t),Gt.current.value}function st(vt,_t){typeof vt=="function"?vt(_t):(0,F.Z)(vt)==="object"&&vt&&"current"in vt&&(vt.current=_t)}function mt(){for(var vt=arguments.length,_t=new Array(vt),Ht=0;Ht<vt;Ht++)_t[Ht]=arguments[Ht];var Gt=_t.filter(function(sn){return sn});return Gt.length<=1?Gt[0]:function(sn){_t.forEach(function(cn){st(cn,sn)})}}function fe(){for(var vt=arguments.length,_t=new Array(vt),Ht=0;Ht<vt;Ht++)_t[Ht]=arguments[Ht];return lt(function(){return mt.apply(void 0,_t)},_t,function(Gt,sn){return Gt.length===sn.length&&Gt.every(function(cn,Sn){return cn===sn[Sn]})})}function We(vt){var _t,Ht,Gt=isMemo(vt)?vt.type.type:vt.type;return!(typeof Gt=="function"&&!((_t=Gt.prototype)!==null&&_t!==void 0&&_t.render)||typeof vt=="function"&&!((Ht=vt.prototype)!==null&&Ht!==void 0&&Ht.render))}var ht=function(_t){var Ht=_t.className,Gt=_t.customizeIcon,sn=_t.customizeIconProps,cn=_t.onMouseDown,Sn=_t.onClick,Bn=_t.children,gr;return typeof Gt=="function"?gr=Gt(sn):gr=Gt,P.createElement("span",{className:Ht,onMouseDown:function(_n){_n.preventDefault(),cn&&cn(_n)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Sn,"aria-hidden":!0},gr!==void 0?gr:P.createElement("span",{className:H()(Ht.split(/\s+/).map(function(gn){return"".concat(gn,"-icon")}))},Bn))},Pt=ht;function Ve(vt,_t,Ht,Gt,sn){var cn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Sn=arguments.length>6?arguments[6]:void 0,Bn=arguments.length>7?arguments[7]:void 0,gr=P.useMemo(function(){if((0,F.Z)(Gt)==="object")return Gt.clearIcon;if(sn)return sn},[Gt,sn]),gn=P.useMemo(function(){return!!(!cn&&Gt&&(Ht.length||Sn)&&!(Bn==="combobox"&&Sn===""))},[Gt,cn,Ht.length,Sn,Bn]);return{allowClear:gn,clearIcon:P.createElement(Pt,{className:"".concat(vt,"-clear"),onMouseDown:_t,customizeIcon:gr},"\xD7")}}var it=P.createContext(null);function ft(){return P.useContext(it)}function ze(){var vt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,_t=P.useState(!1),Ht=(0,C.Z)(_t,2),Gt=Ht[0],sn=Ht[1],cn=P.useRef(null),Sn=function(){window.clearTimeout(cn.current)};P.useEffect(function(){return Sn},[]);var Bn=function(gn,_n){Sn(),cn.current=window.setTimeout(function(){sn(gn),_n&&_n()},vt)};return[Gt,Bn,Sn]}function Qe(){var vt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,_t=P.useRef(null),Ht=P.useRef(null);P.useEffect(function(){return function(){window.clearTimeout(Ht.current)}},[]);function Gt(sn){(sn||_t.current===null)&&(_t.current=sn),window.clearTimeout(Ht.current),Ht.current=window.setTimeout(function(){_t.current=null},vt)}return[function(){return _t.current},Gt]}function Se(vt,_t,Ht,Gt){var sn=P.useRef(null);sn.current={open:_t,triggerOpen:Ht,customizedTrigger:Gt},P.useEffect(function(){function cn(Sn){var Bn;if(!((Bn=sn.current)!==null&&Bn!==void 0&&Bn.customizedTrigger)){var gr=Sn.target;gr.shadowRoot&&Sn.composed&&(gr=Sn.composedPath()[0]||gr),sn.current.open&&vt().filter(function(gn){return gn}).every(function(gn){return!gn.contains(gr)&&gn!==gr})&&sn.current.triggerOpen(!1)}}return window.addEventListener("mousedown",cn),function(){return window.removeEventListener("mousedown",cn)}},[])}var E=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
|
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
|
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
|
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
|
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
|
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
|
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
|
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
|
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
|
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
|
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
|
summary tabIndex target title type useMap value width wmode wrap`,me=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
|
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
|
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
|
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
|
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
|
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
|
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,L="".concat(E," ").concat(me).split(/[\s\n]+/),X="aria-",Ke="data-";function ot(vt,_t){return vt.indexOf(_t)===0}function pe(vt){var _t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ht;_t===!1?Ht={aria:!0,data:!0,attr:!0}:_t===!0?Ht={aria:!0}:Ht=(0,I.Z)({},_t);var Gt={};return Object.keys(vt).forEach(function(sn){(Ht.aria&&(sn==="role"||ot(sn,X))||Ht.data&&ot(sn,Ke)||Ht.attr&&L.includes(sn))&&(Gt[sn]=vt[sn])}),Gt}var xe=k(48555),Ze=k(14075),O=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],ne=void 0;function qe(vt,_t){var Ht=vt.prefixCls,Gt=vt.invalidate,sn=vt.item,cn=vt.renderItem,Sn=vt.responsive,Bn=vt.responsiveDisabled,gr=vt.registerSize,gn=vt.itemKey,_n=vt.className,fn=vt.style,Sr=vt.children,Rn=vt.display,Ln=vt.order,Jr=vt.component,mi=Jr===void 0?"div":Jr,_i=(0,A.Z)(vt,O),vi=Sn&&!Rn;function pi(Xi){gr(gn,Xi)}P.useEffect(function(){return function(){pi(null)}},[]);var ba=cn&&sn!==ne?cn(sn):Sr,Qi;Gt||(Qi={opacity:vi?0:1,height:vi?0:ne,overflowY:vi?"hidden":ne,order:Sn?Ln:ne,pointerEvents:vi?"none":ne,position:vi?"absolute":ne});var li={};vi&&(li["aria-hidden"]=!0);var Yi=P.createElement(mi,(0,U.Z)({className:H()(!Gt&&Ht,_n),style:(0,I.Z)((0,I.Z)({},Qi),fn)},li,_i,{ref:_t}),ba);return Sn&&(Yi=P.createElement(xe.Z,{onResize:function(ha){var Gr=ha.offsetWidth;pi(Gr)},disabled:Bn},Yi)),Yi}var dt=P.forwardRef(qe);dt.displayName="Item";var nt=dt,xt=k(77527),bt=k(73935),wt=k(96523);function we(vt){if(typeof MessageChannel=="undefined")(0,wt.Z)(vt);else{var _t=new MessageChannel;_t.port1.onmessage=function(){return vt()},_t.port2.postMessage(void 0)}}function oe(){var vt=P.useRef(null),_t=function(Gt){vt.current||(vt.current=[],we(function(){(0,bt.unstable_batchedUpdates)(function(){vt.current.forEach(function(sn){sn()}),vt.current=null})})),vt.current.push(Gt)};return _t}function Fe(vt,_t){var Ht=P.useState(_t),Gt=(0,C.Z)(Ht,2),sn=Gt[0],cn=Gt[1],Sn=(0,xt.Z)(function(Bn){vt(function(){cn(Bn)})});return[sn,Sn]}var Ye=P.createContext(null),ie=["component"],Ie=["className"],je=["className"],Be=function(_t,Ht){var Gt=P.useContext(Ye);if(!Gt){var sn=_t.component,cn=sn===void 0?"div":sn,Sn=(0,A.Z)(_t,ie);return P.createElement(cn,(0,U.Z)({},Sn,{ref:Ht}))}var Bn=Gt.className,gr=(0,A.Z)(Gt,Ie),gn=_t.className,_n=(0,A.Z)(_t,je);return P.createElement(Ye.Provider,{value:null},P.createElement(nt,(0,U.Z)({ref:Ht,className:H()(Bn,gn)},gr,_n)))},et=P.forwardRef(Be);et.displayName="RawItem";var gt=et,Mt=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Rt="responsive",Ft="invalidate";function Xt(vt){return"+ ".concat(vt.length," ...")}function Qt(vt,_t){var Ht=vt.prefixCls,Gt=Ht===void 0?"rc-overflow":Ht,sn=vt.data,cn=sn===void 0?[]:sn,Sn=vt.renderItem,Bn=vt.renderRawItem,gr=vt.itemKey,gn=vt.itemWidth,_n=gn===void 0?10:gn,fn=vt.ssr,Sr=vt.style,Rn=vt.className,Ln=vt.maxCount,Jr=vt.renderRest,mi=vt.renderRawRest,_i=vt.suffix,vi=vt.component,pi=vi===void 0?"div":vi,ba=vt.itemComponent,Qi=vt.onVisibleChange,li=(0,A.Z)(vt,Mt),Yi=fn==="full",Xi=oe(),ha=Fe(Xi,null),Gr=(0,C.Z)(ha,2),ua=Gr[0],As=Gr[1],Ra=ua||0,Ca=Fe(Xi,new Map),Mi=(0,C.Z)(Ca,2),yi=Mi[0],Pi=Mi[1],Ni=Fe(Xi,0),na=(0,C.Z)(Ni,2),nu=na[0],Bs=na[1],No=Fe(Xi,0),es=(0,C.Z)(No,2),ca=es[0],Fo=es[1],du=Fe(Xi,0),Ui=(0,C.Z)(du,2),jr=Ui[0],xi=Ui[1],Aa=(0,P.useState)(null),ra=(0,C.Z)(Aa,2),oa=ra[0],Ki=ra[1],Ya=(0,P.useState)(null),bs=(0,C.Z)(Ya,2),is=bs[0],Bo=bs[1],ks=P.useMemo(function(){return is===null&&Yi?Number.MAX_SAFE_INTEGER:is||0},[is,ua]),Oo=(0,P.useState)(!1),fa=(0,C.Z)(Oo,2),as=fa[0],ls=fa[1],ju="".concat(Gt,"-item"),Pu=Math.max(nu,ca),$o=Ln===Rt,Za=cn.length&&$o,Ro=Ln===Ft,ru=Za||typeof Ln=="number"&&cn.length>Ln,vo=(0,P.useMemo)(function(){var Oi=cn;return Za?ua===null&&Yi?Oi=cn:Oi=cn.slice(0,Math.min(cn.length,Ra/_n)):typeof Ln=="number"&&(Oi=cn.slice(0,Ln)),Oi},[cn,_n,ua,Ln,Za]),Ao=(0,P.useMemo)(function(){return Za?cn.slice(ks+1):cn.slice(vo.length)},[cn,vo,Za,ks]),jl=(0,P.useCallback)(function(Oi,On){var Br;return typeof gr=="function"?gr(Oi):(Br=gr&&(Oi==null?void 0:Oi[gr]))!==null&&Br!==void 0?Br:On},[gr]),Ld=(0,P.useCallback)(Sn||function(Oi){return Oi},[Sn]);function ic(Oi,On,Br){is===Oi&&(On===void 0||On===oa)||(Bo(Oi),Br||(ls(Oi<cn.length-1),Qi==null||Qi(Oi)),On!==void 0&&Ki(On))}function Ch(Oi,On){As(On.clientWidth)}function Hu(Oi,On){Pi(function(Br){var Hr=new Map(Br);return On===null?Hr.delete(Oi):Hr.set(Oi,On),Hr})}function Nu(Oi,On){Fo(On),Bs(ca)}function Go(Oi,On){xi(On)}function iu(Oi){return yi.get(jl(vo[Oi],Oi))}(0,Ze.Z)(function(){if(Ra&&typeof Pu=="number"&&vo){var Oi=jr,On=vo.length,Br=On-1;if(!On){ic(0,null);return}for(var Hr=0;Hr<On;Hr+=1){var ui=iu(Hr);if(Yi&&(ui=ui||0),ui===void 0){ic(Hr-1,void 0,!0);break}if(Oi+=ui,Br===0&&Oi<=Ra||Hr===Br-1&&Oi+iu(Br)<=Ra){ic(Br,null);break}else if(Oi+Pu>Ra){ic(Hr-1,Oi-ui-jr+ca);break}}_i&&iu(0)+jr>Ra&&Ki(null)}},[Ra,yi,ca,jr,jl,vo]);var Id=as&&!!Ao.length,dd={};oa!==null&&Za&&(dd={position:"absolute",left:oa,top:0});var Wu={prefixCls:ju,responsive:Za,component:ba,invalidate:Ro},kc=Bn?function(Oi,On){var Br=jl(Oi,On);return P.createElement(Ye.Provider,{key:Br,value:(0,I.Z)((0,I.Z)({},Wu),{},{order:On,item:Oi,itemKey:Br,registerSize:Hu,display:On<=ks})},Bn(Oi,On))}:function(Oi,On){var Br=jl(Oi,On);return P.createElement(nt,(0,U.Z)({},Wu,{order:On,key:Br,item:Oi,renderItem:Ld,itemKey:Br,registerSize:Hu,display:On<=ks}))},hu,Dd={order:Id?ks:Number.MAX_SAFE_INTEGER,className:"".concat(ju,"-rest"),registerSize:Nu,display:Id};if(mi)mi&&(hu=P.createElement(Ye.Provider,{value:(0,I.Z)((0,I.Z)({},Wu),Dd)},mi(Ao)));else{var fu=Jr||Xt;hu=P.createElement(nt,(0,U.Z)({},Wu,Dd),typeof fu=="function"?fu(Ao):fu)}var wc=P.createElement(pi,(0,U.Z)({className:H()(!Ro&&Gt,Rn),style:Sr,ref:_t},li),vo.map(kc),ru?hu:null,_i&&P.createElement(nt,(0,U.Z)({},Wu,{responsive:$o,responsiveDisabled:!Za,order:ks,className:"".concat(ju,"-suffix"),registerSize:Go,display:!0,style:dd}),_i));return $o&&(wc=P.createElement(xe.Z,{onResize:Ch,disabled:!Za},wc)),wc}var an=P.forwardRef(Qt);an.displayName="Overflow",an.Item=gt,an.RESPONSIVE=Rt,an.INVALIDATE=Ft;var In=an,Xr=In,Cn=function(_t,Ht){var Gt,sn,cn=_t.prefixCls,Sn=_t.id,Bn=_t.inputElement,gr=_t.disabled,gn=_t.tabIndex,_n=_t.autoFocus,fn=_t.autoComplete,Sr=_t.editable,Rn=_t.activeDescendantId,Ln=_t.value,Jr=_t.maxLength,mi=_t.onKeyDown,_i=_t.onMouseDown,vi=_t.onChange,pi=_t.onPaste,ba=_t.onCompositionStart,Qi=_t.onCompositionEnd,li=_t.open,Yi=_t.attrs,Xi=Bn||P.createElement("input",null),ha=Xi,Gr=ha.ref,ua=ha.props,As=ua.onKeyDown,Ra=ua.onChange,Ca=ua.onMouseDown,Mi=ua.onCompositionStart,yi=ua.onCompositionEnd,Pi=ua.style;return"maxLength"in Xi.props,Xi=P.cloneElement(Xi,(0,I.Z)((0,I.Z)((0,I.Z)({type:"search"},ua),{},{id:Sn,ref:mt(Ht,Gr),disabled:gr,tabIndex:gn,autoComplete:fn||"off",autoFocus:_n,className:H()("".concat(cn,"-selection-search-input"),(Gt=Xi)===null||Gt===void 0||(sn=Gt.props)===null||sn===void 0?void 0:sn.className),role:"combobox","aria-label":"Search","aria-expanded":li||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Sn,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Sn,"_list"),"aria-activedescendant":li?Rn:void 0},Yi),{},{value:Sr?Ln:"",maxLength:Jr,readOnly:!Sr,unselectable:Sr?null:"on",style:(0,I.Z)((0,I.Z)({},Pi),{},{opacity:Sr?null:0}),onKeyDown:function(na){mi(na),As&&As(na)},onMouseDown:function(na){_i(na),Ca&&Ca(na)},onChange:function(na){vi(na),Ra&&Ra(na)},onCompositionStart:function(na){ba(na),Mi&&Mi(na)},onCompositionEnd:function(na){Qi(na),yi&&yi(na)},onPaste:pi})),Xi},or=P.forwardRef(Cn);or.displayName="Input";var ei=or;function mr(vt){return Array.isArray(vt)?vt:vt!==void 0?[vt]:[]}var Fr=typeof window!="undefined"&&window.document&&window.document.documentElement,ta=Fr;function Qa(vt){return vt!=null}function Bt(vt){return!vt&&vt!==0}function en(vt){return["string","number"].includes((0,F.Z)(vt))}function Jt(vt){var _t=void 0;return vt&&(en(vt.title)?_t=vt.title.toString():en(vt.label)&&(_t=vt.label.toString())),_t}function nn(vt,_t){ta?P.useLayoutEffect(vt,_t):P.useEffect(vt,_t)}function sr(vt){var _t;return(_t=vt.key)!==null&&_t!==void 0?_t:vt.value}var Pn=function(_t){_t.preventDefault(),_t.stopPropagation()},Fn=function(_t){var Ht=_t.id,Gt=_t.prefixCls,sn=_t.values,cn=_t.open,Sn=_t.searchValue,Bn=_t.autoClearSearchValue,gr=_t.inputRef,gn=_t.placeholder,_n=_t.disabled,fn=_t.mode,Sr=_t.showSearch,Rn=_t.autoFocus,Ln=_t.autoComplete,Jr=_t.activeDescendantId,mi=_t.tabIndex,_i=_t.removeIcon,vi=_t.maxTagCount,pi=_t.maxTagTextLength,ba=_t.maxTagPlaceholder,Qi=ba===void 0?function(Ki){return"+ ".concat(Ki.length," ...")}:ba,li=_t.tagRender,Yi=_t.onToggleOpen,Xi=_t.onRemove,ha=_t.onInputChange,Gr=_t.onInputPaste,ua=_t.onInputKeyDown,As=_t.onInputMouseDown,Ra=_t.onInputCompositionStart,Ca=_t.onInputCompositionEnd,Mi=P.useRef(null),yi=(0,P.useState)(0),Pi=(0,C.Z)(yi,2),Ni=Pi[0],na=Pi[1],nu=(0,P.useState)(!1),Bs=(0,C.Z)(nu,2),No=Bs[0],es=Bs[1],ca="".concat(Gt,"-selection"),Fo=cn||fn==="multiple"&&Bn===!1||fn==="tags"?Sn:"",du=fn==="tags"||fn==="multiple"&&Bn===!1||Sr&&(cn||No);nn(function(){na(Mi.current.scrollWidth)},[Fo]);function Ui(Ki,Ya,bs,is,Bo){return P.createElement("span",{className:H()("".concat(ca,"-item"),(0,N.Z)({},"".concat(ca,"-item-disabled"),bs)),title:Jt(Ki)},P.createElement("span",{className:"".concat(ca,"-item-content")},Ya),is&&P.createElement(Pt,{className:"".concat(ca,"-item-remove"),onMouseDown:Pn,onClick:Bo,customizeIcon:_i},"\xD7"))}function jr(Ki,Ya,bs,is,Bo){var ks=function(fa){Pn(fa),Yi(!cn)};return P.createElement("span",{onMouseDown:ks},li({label:Ya,value:Ki,disabled:bs,closable:is,onClose:Bo}))}function xi(Ki){var Ya=Ki.disabled,bs=Ki.label,is=Ki.value,Bo=!_n&&!Ya,ks=bs;if(typeof pi=="number"&&(typeof bs=="string"||typeof bs=="number")){var Oo=String(ks);Oo.length>pi&&(ks="".concat(Oo.slice(0,pi),"..."))}var fa=function(ls){ls&&ls.stopPropagation(),Xi(Ki)};return typeof li=="function"?jr(is,ks,Ya,Bo,fa):Ui(Ki,ks,Ya,Bo,fa)}function Aa(Ki){var Ya=typeof Qi=="function"?Qi(Ki):Qi;return Ui({title:Ya},Ya,!1)}var ra=P.createElement("div",{className:"".concat(ca,"-search"),style:{width:Ni},onFocus:function(){es(!0)},onBlur:function(){es(!1)}},P.createElement(ei,{ref:gr,open:cn,prefixCls:Gt,id:Ht,inputElement:null,disabled:_n,autoFocus:Rn,autoComplete:Ln,editable:du,activeDescendantId:Jr,value:Fo,onKeyDown:ua,onMouseDown:As,onChange:ha,onPaste:Gr,onCompositionStart:Ra,onCompositionEnd:Ca,tabIndex:mi,attrs:pe(_t,!0)}),P.createElement("span",{ref:Mi,className:"".concat(ca,"-search-mirror"),"aria-hidden":!0},Fo,"\xA0")),oa=P.createElement(Xr,{prefixCls:"".concat(ca,"-overflow"),data:sn,renderItem:xi,renderRest:Aa,suffix:ra,itemKey:sr,maxCount:vi});return P.createElement(P.Fragment,null,oa,!sn.length&&!Fo&&P.createElement("span",{className:"".concat(ca,"-placeholder")},gn))},zr=Fn,$r=function(_t){var Ht=_t.inputElement,Gt=_t.prefixCls,sn=_t.id,cn=_t.inputRef,Sn=_t.disabled,Bn=_t.autoFocus,gr=_t.autoComplete,gn=_t.activeDescendantId,_n=_t.mode,fn=_t.open,Sr=_t.values,Rn=_t.placeholder,Ln=_t.tabIndex,Jr=_t.showSearch,mi=_t.searchValue,_i=_t.activeValue,vi=_t.maxLength,pi=_t.onInputKeyDown,ba=_t.onInputMouseDown,Qi=_t.onInputChange,li=_t.onInputPaste,Yi=_t.onInputCompositionStart,Xi=_t.onInputCompositionEnd,ha=_t.title,Gr=P.useState(!1),ua=(0,C.Z)(Gr,2),As=ua[0],Ra=ua[1],Ca=_n==="combobox",Mi=Ca||Jr,yi=Sr[0],Pi=mi||"";Ca&&_i&&!As&&(Pi=_i),P.useEffect(function(){Ca&&Ra(!1)},[Ca,_i]);var Ni=_n!=="combobox"&&!fn&&!Jr?!1:!!Pi,na=ha===void 0?Jt(yi):ha,nu=function(){if(yi)return null;var No=Ni?{visibility:"hidden"}:void 0;return P.createElement("span",{className:"".concat(Gt,"-selection-placeholder"),style:No},Rn)};return P.createElement(P.Fragment,null,P.createElement("span",{className:"".concat(Gt,"-selection-search")},P.createElement(ei,{ref:cn,prefixCls:Gt,id:sn,open:fn,inputElement:Ht,disabled:Sn,autoFocus:Bn,autoComplete:gr,editable:Mi,activeDescendantId:gn,value:Pi,onKeyDown:pi,onMouseDown:ba,onChange:function(No){Ra(!0),Qi(No)},onPaste:li,onCompositionStart:Yi,onCompositionEnd:Xi,tabIndex:Ln,attrs:pe(_t,!0),maxLength:Ca?vi:void 0})),!Ca&&yi?P.createElement("span",{className:"".concat(Gt,"-selection-item"),title:na,style:Ni?{visibility:"hidden"}:void 0},yi.label):null,nu())},Ae=$r;function $(vt){return![rt.ESC,rt.SHIFT,rt.BACKSPACE,rt.TAB,rt.WIN_KEY,rt.ALT,rt.META,rt.WIN_KEY_RIGHT,rt.CTRL,rt.SEMICOLON,rt.EQUALS,rt.CAPS_LOCK,rt.CONTEXT_MENU,rt.F1,rt.F2,rt.F3,rt.F4,rt.F5,rt.F6,rt.F7,rt.F8,rt.F9,rt.F10,rt.F11,rt.F12].includes(vt)}var z=function(_t,Ht){var Gt=(0,P.useRef)(null),sn=(0,P.useRef)(!1),cn=_t.prefixCls,Sn=_t.open,Bn=_t.mode,gr=_t.showSearch,gn=_t.tokenWithEnter,_n=_t.autoClearSearchValue,fn=_t.onSearch,Sr=_t.onSearchSubmit,Rn=_t.onToggleOpen,Ln=_t.onInputKeyDown,Jr=_t.domRef;P.useImperativeHandle(Ht,function(){return{focus:function(){Gt.current.focus()},blur:function(){Gt.current.blur()}}});var mi=Qe(0),_i=(0,C.Z)(mi,2),vi=_i[0],pi=_i[1],ba=function(Pi){var Ni=Pi.which;(Ni===rt.UP||Ni===rt.DOWN)&&Pi.preventDefault(),Ln&&Ln(Pi),Ni===rt.ENTER&&Bn==="tags"&&!sn.current&&!Sn&&(Sr==null||Sr(Pi.target.value)),$(Ni)&&Rn(!0)},Qi=function(){pi(!0)},li=(0,P.useRef)(null),Yi=function(Pi){fn(Pi,!0,sn.current)!==!1&&Rn(!0)},Xi=function(){sn.current=!0},ha=function(Pi){sn.current=!1,Bn!=="combobox"&&Yi(Pi.target.value)},Gr=function(Pi){var Ni=Pi.target.value;if(gn&&li.current&&/[\r\n]/.test(li.current)){var na=li.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Ni=Ni.replace(na,li.current)}li.current=null,Yi(Ni)},ua=function(Pi){var Ni=Pi.clipboardData,na=Ni.getData("text");li.current=na},As=function(Pi){var Ni=Pi.target;if(Ni!==Gt.current){var na=document.body.style.msTouchAction!==void 0;na?setTimeout(function(){Gt.current.focus()}):Gt.current.focus()}},Ra=function(Pi){var Ni=vi();Pi.target!==Gt.current&&!Ni&&Bn!=="combobox"&&Pi.preventDefault(),(Bn!=="combobox"&&(!gr||!Ni)||!Sn)&&(Sn&&_n!==!1&&fn("",!0,!1),Rn())},Ca={inputRef:Gt,onInputKeyDown:ba,onInputMouseDown:Qi,onInputChange:Gr,onInputPaste:ua,onInputCompositionStart:Xi,onInputCompositionEnd:ha},Mi=Bn==="multiple"||Bn==="tags"?P.createElement(zr,(0,U.Z)({},_t,Ca)):P.createElement(Ae,(0,U.Z)({},_t,Ca));return P.createElement("div",{ref:Jr,className:"".concat(cn,"-selector"),onClick:As,onMouseDown:Ra},Mi)},S=P.forwardRef(z);S.displayName="Selector";var D=S,J=k(62709),Le=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],$e=function(_t){var Ht=_t===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Ht,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Ht,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Ht,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Ht,adjustY:1},htmlRegion:"scroll"}}},tt=function(_t,Ht){var Gt=_t.prefixCls,sn=_t.disabled,cn=_t.visible,Sn=_t.children,Bn=_t.popupElement,gr=_t.animation,gn=_t.transitionName,_n=_t.dropdownStyle,fn=_t.dropdownClassName,Sr=_t.direction,Rn=Sr===void 0?"ltr":Sr,Ln=_t.placement,Jr=_t.builtinPlacements,mi=_t.dropdownMatchSelectWidth,_i=_t.dropdownRender,vi=_t.dropdownAlign,pi=_t.getPopupContainer,ba=_t.empty,Qi=_t.getTriggerDOMNode,li=_t.onPopupVisibleChange,Yi=_t.onPopupMouseEnter,Xi=(0,A.Z)(_t,Le),ha="".concat(Gt,"-dropdown"),Gr=Bn;_i&&(Gr=_i(Bn));var ua=P.useMemo(function(){return Jr||$e(mi)},[Jr,mi]),As=gr?"".concat(ha,"-").concat(gr):gn,Ra=typeof mi=="number",Ca=P.useMemo(function(){return Ra?null:mi===!1?"minWidth":"width"},[mi,Ra]),Mi=_n;Ra&&(Mi=(0,I.Z)((0,I.Z)({},Mi),{},{width:mi}));var yi=P.useRef(null);return P.useImperativeHandle(Ht,function(){return{getPopupElement:function(){return yi.current}}}),P.createElement(J.Z,(0,U.Z)({},Xi,{showAction:li?["click"]:[],hideAction:li?["click"]:[],popupPlacement:Ln||(Rn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:ua,prefixCls:ha,popupTransitionName:As,popup:P.createElement("div",{ref:yi,onMouseEnter:Yi},Gr),stretch:Ca,popupAlign:vi,popupVisible:cn,getPopupContainer:pi,popupClassName:H()(fn,(0,N.Z)({},"".concat(ha,"-empty"),ba)),popupStyle:Mi,getTriggerDOMNode:Qi,onPopupVisibleChange:li}),Sn)},at=P.forwardRef(tt);at.displayName="SelectTrigger";var Ct=at,pt=k(84506);function $t(vt,_t){var Ht=vt.key,Gt;return"value"in vt&&(Gt=vt.value),Ht!=null?Ht:Gt!==void 0?Gt:"rc-index-key-".concat(_t)}function Nt(vt,_t){var Ht=vt||{},Gt=Ht.label,sn=Ht.value,cn=Ht.options,Sn=Ht.groupLabel,Bn=Gt||(_t?"children":"label");return{label:Bn,value:sn||"value",options:cn||"options",groupLabel:Sn||Bn}}function Ot(vt){var _t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ht=_t.fieldNames,Gt=_t.childrenAsData,sn=[],cn=Nt(Ht,!1),Sn=cn.label,Bn=cn.value,gr=cn.options,gn=cn.groupLabel;function _n(fn,Sr){fn.forEach(function(Rn){if(Sr||!(gr in Rn)){var Ln=Rn[Bn];sn.push({key:$t(Rn,sn.length),groupOption:Sr,data:Rn,label:Rn[Sn],value:Ln})}else{var Jr=Rn[gn];Jr===void 0&&Gt&&(Jr=Rn.label),sn.push({key:$t(Rn,sn.length),group:!0,data:Rn,label:Jr}),_n(Rn[gr],!0)}})}return _n(vt,!1),sn}function Wt(vt){var _t=(0,I.Z)({},vt);return"props"in _t||Object.defineProperty(_t,"props",{get:function(){return Te(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),_t}}),_t}function dn(vt,_t){if(!_t||!_t.length)return null;var Ht=!1;function Gt(cn,Sn){var Bn=(0,pt.Z)(Sn),gr=Bn[0],gn=Bn.slice(1);if(!gr)return[cn];var _n=cn.split(gr);return Ht=Ht||_n.length>1,_n.reduce(function(fn,Sr){return[].concat((0,Y.Z)(fn),(0,Y.Z)(Gt(Sr,gn)))},[]).filter(function(fn){return fn})}var sn=Gt(vt,_t);return Ht?sn:null}var St=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],zt=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"];function pn(vt){return vt==="tags"||vt==="multiple"}var Mn=P.forwardRef(function(vt,_t){var Ht,Gt,sn=vt.id,cn=vt.prefixCls,Sn=vt.className,Bn=vt.showSearch,gr=vt.tagRender,gn=vt.direction,_n=vt.omitDomProps,fn=vt.displayValues,Sr=vt.onDisplayValuesChange,Rn=vt.emptyOptions,Ln=vt.notFoundContent,Jr=Ln===void 0?"Not Found":Ln,mi=vt.onClear,_i=vt.mode,vi=vt.disabled,pi=vt.loading,ba=vt.getInputElement,Qi=vt.getRawInputElement,li=vt.open,Yi=vt.defaultOpen,Xi=vt.onDropdownVisibleChange,ha=vt.activeValue,Gr=vt.onActiveValueChange,ua=vt.activeDescendantId,As=vt.searchValue,Ra=vt.autoClearSearchValue,Ca=vt.onSearch,Mi=vt.onSearchSplit,yi=vt.tokenSeparators,Pi=vt.allowClear,Ni=vt.suffixIcon,na=vt.clearIcon,nu=vt.OptionList,Bs=vt.animation,No=vt.transitionName,es=vt.dropdownStyle,ca=vt.dropdownClassName,Fo=vt.dropdownMatchSelectWidth,du=vt.dropdownRender,Ui=vt.dropdownAlign,jr=vt.placement,xi=vt.builtinPlacements,Aa=vt.getPopupContainer,ra=vt.showAction,oa=ra===void 0?[]:ra,Ki=vt.onFocus,Ya=vt.onBlur,bs=vt.onKeyUp,is=vt.onKeyDown,Bo=vt.onMouseDown,ks=(0,A.Z)(vt,St),Oo=pn(_i),fa=(Bn!==void 0?Bn:Oo)||_i==="combobox",as=(0,I.Z)({},ks);zt.forEach(function(jt){delete as[jt]}),_n==null||_n.forEach(function(jt){delete as[jt]});var ls=P.useState(!1),ju=(0,C.Z)(ls,2),Pu=ju[0],$o=ju[1];P.useEffect(function(){$o(Je())},[]);var Za=P.useRef(null),Ro=P.useRef(null),ru=P.useRef(null),vo=P.useRef(null),Ao=P.useRef(null),jl=ze(),Ld=(0,C.Z)(jl,3),ic=Ld[0],Ch=Ld[1],Hu=Ld[2];P.useImperativeHandle(_t,function(){var jt,Zt;return{focus:(jt=vo.current)===null||jt===void 0?void 0:jt.focus,blur:(Zt=vo.current)===null||Zt===void 0?void 0:Zt.blur,scrollTo:function(hn){var xn;return(xn=Ao.current)===null||xn===void 0?void 0:xn.scrollTo(hn)}}});var Nu=P.useMemo(function(){var jt;if(_i!=="combobox")return As;var Zt=(jt=fn[0])===null||jt===void 0?void 0:jt.value;return typeof Zt=="string"||typeof Zt=="number"?String(Zt):""},[As,_i,fn]),Go=_i==="combobox"&&typeof ba=="function"&&ba()||null,iu=typeof Qi=="function"&&Qi(),Id=fe(Ro,iu==null||(Ht=iu.props)===null||Ht===void 0?void 0:Ht.ref),dd=P.useState(!1),Wu=(0,C.Z)(dd,2),kc=Wu[0],hu=Wu[1];be(function(){hu(!0)},[]);var Dd=De(!1,{defaultValue:Yi,value:li}),fu=(0,C.Z)(Dd,2),wc=fu[0],Oi=fu[1],On=kc?wc:!1,Br=!Jr&&Rn;(vi||Br&&On&&_i==="combobox")&&(On=!1);var Hr=Br?!1:On,ui=P.useCallback(function(jt){var Zt=jt!==void 0?jt:!On;vi||(Oi(Zt),On!==Zt&&(Xi==null||Xi(Zt)))},[vi,On,Oi,Xi]),ts=P.useMemo(function(){return(yi||[]).some(function(jt){return[`
|
|
|
`,`\r
|
|
|
`].includes(jt)})},[yi]),ss=function(Zt,Kt,hn){var xn=!0,wn=Zt;Gr==null||Gr(null);var ir=hn?null:dn(Zt,yi);return _i!=="combobox"&&ir&&(wn="",Mi==null||Mi(ir),ui(!1),xn=!1),Ca&&Nu!==wn&&Ca(wn,{source:Kt?"typing":"effect"}),xn},Fd=function(Zt){!Zt||!Zt.trim()||Ca(Zt,{source:"submit"})};P.useEffect(function(){!On&&!Oo&&_i!=="combobox"&&ss("",!1,!1)},[On]),P.useEffect(function(){wc&&vi&&Oi(!1),vi&&Ch(!1)},[vi]);var Yu=Qe(),Zu=(0,C.Z)(Yu,2),yl=Zu[0],Sc=Zu[1],Cv=function(Zt){var Kt=yl(),hn=Zt.which;if(hn===rt.ENTER&&(_i!=="combobox"&&Zt.preventDefault(),On||ui(!0)),Sc(!!Nu),hn===rt.BACKSPACE&&!Kt&&Oo&&!Nu&&fn.length){for(var xn=(0,Y.Z)(fn),wn=null,ir=xn.length-1;ir>=0;ir-=1){var pr=xn[ir];if(!pr.disabled){xn.splice(ir,1),wn=pr;break}}wn&&Sr(xn,{type:"remove",values:[wn]})}for(var _r=arguments.length,si=new Array(_r>1?_r-1:0),Ur=1;Ur<_r;Ur++)si[Ur-1]=arguments[Ur];if(On&&Ao.current){var qr;(qr=Ao.current).onKeyDown.apply(qr,[Zt].concat(si))}is==null||is.apply(void 0,[Zt].concat(si))},ag=function(Zt){for(var Kt=arguments.length,hn=new Array(Kt>1?Kt-1:0),xn=1;xn<Kt;xn++)hn[xn-1]=arguments[xn];if(On&&Ao.current){var wn;(wn=Ao.current).onKeyUp.apply(wn,[Zt].concat(hn))}bs==null||bs.apply(void 0,[Zt].concat(hn))},Tm=function(Zt){var Kt=fn.filter(function(hn){return hn!==Zt});Sr(Kt,{type:"remove",values:[Zt]})},Da=P.useRef(!1),vu=function(){Ch(!0),vi||(Ki&&!Da.current&&Ki.apply(void 0,arguments),oa.includes("focus")&&ui(!0)),Da.current=!0},gu=function(){Ch(!1,function(){Da.current=!1,ui(!1)}),!vi&&(Nu&&(_i==="tags"?Ca(Nu,{source:"submit"}):_i==="multiple"&&Ca("",{source:"blur"})),Ya&&Ya.apply(void 0,arguments))},Xu=[];P.useEffect(function(){return function(){Xu.forEach(function(jt){return clearTimeout(jt)}),Xu.splice(0,Xu.length)}},[]);var Mv=function(Zt){var Kt,hn=Zt.target,xn=(Kt=ru.current)===null||Kt===void 0?void 0:Kt.getPopupElement();if(xn&&xn.contains(hn)){var wn=setTimeout(function(){var si=Xu.indexOf(wn);if(si!==-1&&Xu.splice(si,1),Hu(),!Pu&&!xn.contains(document.activeElement)){var Ur;(Ur=vo.current)===null||Ur===void 0||Ur.focus()}});Xu.push(wn)}for(var ir=arguments.length,pr=new Array(ir>1?ir-1:0),_r=1;_r<ir;_r++)pr[_r-1]=arguments[_r];Bo==null||Bo.apply(void 0,[Zt].concat(pr))},Cm=P.useState({}),jx=(0,C.Z)(Cm,2),de=jx[1];function Q(){de({})}var ae;iu&&(ae=function(Zt){ui(Zt)}),Se(function(){var jt;return[Za.current,(jt=ru.current)===null||jt===void 0?void 0:jt.getPopupElement()]},Hr,ui,!!iu);var _e=P.useMemo(function(){return(0,I.Z)((0,I.Z)({},vt),{},{notFoundContent:Jr,open:On,triggerOpen:Hr,id:sn,showSearch:fa,multiple:Oo,toggleOpen:ui})},[vt,Jr,Hr,On,sn,fa,Oo,ui]),Re=!!Ni||pi,Ge;Re&&(Ge=P.createElement(Pt,{className:H()("".concat(cn,"-arrow"),(0,N.Z)({},"".concat(cn,"-arrow-loading"),pi)),customizeIcon:Ni,customizeIconProps:{loading:pi,searchValue:Nu,open:On,focused:ic,showSearch:fa}}));var Xe=function(){var Zt;mi==null||mi(),(Zt=vo.current)===null||Zt===void 0||Zt.focus(),Sr([],{type:"clear",values:fn}),ss("",!1,!1)},yt=Ve(cn,Xe,fn,Pi,na,vi,Nu,_i),kt=yt.allowClear,Tt=yt.clearIcon,It=P.createElement(nu,{ref:Ao}),Dt=H()(cn,Sn,(Gt={},(0,N.Z)(Gt,"".concat(cn,"-focused"),ic),(0,N.Z)(Gt,"".concat(cn,"-multiple"),Oo),(0,N.Z)(Gt,"".concat(cn,"-single"),!Oo),(0,N.Z)(Gt,"".concat(cn,"-allow-clear"),Pi),(0,N.Z)(Gt,"".concat(cn,"-show-arrow"),Re),(0,N.Z)(Gt,"".concat(cn,"-disabled"),vi),(0,N.Z)(Gt,"".concat(cn,"-loading"),pi),(0,N.Z)(Gt,"".concat(cn,"-open"),On),(0,N.Z)(Gt,"".concat(cn,"-customize-input"),Go),(0,N.Z)(Gt,"".concat(cn,"-show-search"),fa),Gt)),Yt=P.createElement(Ct,{ref:ru,disabled:vi,prefixCls:cn,visible:Hr,popupElement:It,animation:Bs,transitionName:No,dropdownStyle:es,dropdownClassName:ca,direction:gn,dropdownMatchSelectWidth:Fo,dropdownRender:du,dropdownAlign:Ui,placement:jr,builtinPlacements:xi,getPopupContainer:Aa,empty:Rn,getTriggerDOMNode:function(){return Ro.current},onPopupVisibleChange:ae,onPopupMouseEnter:Q},iu?P.cloneElement(iu,{ref:Id}):P.createElement(D,(0,U.Z)({},vt,{domRef:Ro,prefixCls:cn,inputElement:Go,ref:vo,id:sn,showSearch:fa,autoClearSearchValue:Ra,mode:_i,activeDescendantId:ua,tagRender:gr,values:fn,open:On,onToggleOpen:ui,activeValue:ha,searchValue:Nu,onSearch:ss,onSearchSubmit:Fd,onRemove:Tm,tokenWithEnter:ts}))),Vt;return iu?Vt=Yt:Vt=P.createElement("div",(0,U.Z)({className:Dt},as,{ref:Za,onMouseDown:Mv,onKeyDown:Cv,onKeyUp:ag,onFocus:vu,onBlur:gu}),ic&&!On&&P.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},"".concat(fn.map(function(jt){var Zt=jt.label,Kt=jt.value;return["number","string"].includes((0,F.Z)(Zt))?Zt:Kt}).join(", "))),Yt,Ge,kt&&Tt),P.createElement(it.Provider,{value:_e},Vt)}),En=Mn,ti=function(vt,_t){var Ht=P.useRef({values:new Map,options:new Map}),Gt=P.useMemo(function(){var cn=Ht.current,Sn=cn.values,Bn=cn.options,gr=vt.map(function(fn){if(fn.label===void 0){var Sr;return(0,I.Z)((0,I.Z)({},fn),{},{label:(Sr=Sn.get(fn.value))===null||Sr===void 0?void 0:Sr.label})}return fn}),gn=new Map,_n=new Map;return gr.forEach(function(fn){gn.set(fn.value,fn),_n.set(fn.value,_t.get(fn.value)||Bn.get(fn.value))}),Ht.current.values=gn,Ht.current.options=_n,gr},[vt,_t]),sn=P.useCallback(function(cn){return _t.get(cn)||Ht.current.options.get(cn)},[_t]);return[Gt,sn]};function bn(vt,_t){return mr(vt).join("").toUpperCase().includes(_t)}var Nn=function(vt,_t,Ht,Gt,sn){return P.useMemo(function(){if(!Ht||Gt===!1)return vt;var cn=_t.options,Sn=_t.label,Bn=_t.value,gr=[],gn=typeof Gt=="function",_n=Ht.toUpperCase(),fn=gn?Gt:function(Rn,Ln){return sn?bn(Ln[sn],_n):Ln[cn]?bn(Ln[Sn!=="children"?Sn:"label"],_n):bn(Ln[Bn],_n)},Sr=gn?function(Rn){return Wt(Rn)}:function(Rn){return Rn};return vt.forEach(function(Rn){if(Rn[cn]){var Ln=fn(Ht,Sr(Rn));if(Ln)gr.push(Rn);else{var Jr=Rn[cn].filter(function(mi){return fn(Ht,Sr(mi))});Jr.length&&gr.push((0,I.Z)((0,I.Z)({},Rn),{},(0,N.Z)({},cn,Jr)))}return}fn(Ht,Sr(Rn))&&gr.push(Rn)}),gr},[vt,Gt,sn,Ht,_t])},Lr=0,At=K();function qt(){var vt;return At?(vt=Lr,Lr+=1):vt="TEST_OR_SSR",vt}function yn(vt){var _t=P.useState(),Ht=(0,C.Z)(_t,2),Gt=Ht[0],sn=Ht[1];return P.useEffect(function(){sn("rc_select_".concat(qt()))},[]),vt||Gt}function ln(vt){var _t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ht=[];return P.Children.forEach(vt,function(Gt){Gt==null&&!_t.keepEmpty||(Array.isArray(Gt)?Ht=Ht.concat(ln(Gt)):(0,Et.isFragment)(Gt)&&Gt.props?Ht=Ht.concat(ln(Gt.props.children,_t)):Ht.push(Gt))}),Ht}var wi=["children","value"],Ci=["children"];function fi(vt){var _t=vt,Ht=_t.key,Gt=_t.props,sn=Gt.children,cn=Gt.value,Sn=(0,A.Z)(Gt,wi);return(0,I.Z)({key:Ht,value:cn!==void 0?cn:Ht,children:sn},Sn)}function ai(vt){var _t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return ln(vt).map(function(Ht,Gt){if(!P.isValidElement(Ht)||!Ht.type)return null;var sn=Ht,cn=sn.type.isSelectOptGroup,Sn=sn.key,Bn=sn.props,gr=Bn.children,gn=(0,A.Z)(Bn,Ci);return _t||!cn?fi(Ht):(0,I.Z)((0,I.Z)({key:"__RC_SELECT_GRP__".concat(Sn===null?Gt:Sn,"__"),label:Sn},gn),{},{options:ai(gr)})}).filter(function(Ht){return Ht})}function Si(vt,_t,Ht,Gt,sn){return P.useMemo(function(){var cn=vt,Sn=!vt;Sn&&(cn=ai(_t));var Bn=new Map,gr=new Map,gn=function(Sr,Rn,Ln){Ln&&typeof Ln=="string"&&Sr.set(Rn[Ln],Rn)};function _n(fn){for(var Sr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Rn=0;Rn<fn.length;Rn+=1){var Ln=fn[Rn];!Ln[Ht.options]||Sr?(Bn.set(Ln[Ht.value],Ln),gn(gr,Ln,Ht.label),gn(gr,Ln,Gt),gn(gr,Ln,sn)):_n(Ln[Ht.options],!0)}}return _n(cn),{options:cn,valueOptions:Bn,labelOptions:gr}},[vt,_t,Ht,Gt,sn])}function za(vt){var _t=P.useRef();_t.current=vt;var Ht=P.useCallback(function(){return _t.current.apply(_t,arguments)},[]);return Ht}var sa=function(){return null};sa.isSelectOptGroup=!0;var Ti=sa,xa=function(){return null};xa.isSelectOption=!0;var wr=xa;function Wi(vt,_t){var Ht=(0,I.Z)({},vt);return Array.isArray(_t)&&_t.forEach(function(Gt){delete Ht[Gt]}),Ht}var ni=k(73299),Ea=P.createContext(null),Vr=Ea;function os(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var fo=["disabled","title","children","style","className"];function dl(vt){return typeof vt=="string"||typeof vt=="number"}var Ql=function(_t,Ht){var Gt=ft(),sn=Gt.prefixCls,cn=Gt.id,Sn=Gt.open,Bn=Gt.multiple,gr=Gt.mode,gn=Gt.searchValue,_n=Gt.toggleOpen,fn=Gt.notFoundContent,Sr=Gt.onPopupScroll,Rn=P.useContext(Vr),Ln=Rn.flattenOptions,Jr=Rn.onActiveValue,mi=Rn.defaultActiveFirstOption,_i=Rn.onSelect,vi=Rn.menuItemSelectedIcon,pi=Rn.rawValues,ba=Rn.fieldNames,Qi=Rn.virtual,li=Rn.direction,Yi=Rn.listHeight,Xi=Rn.listItemHeight,ha="".concat(sn,"-item"),Gr=lt(function(){return Ln},[Sn,Ln],function(Ui,jr){return jr[0]&&Ui[1]!==jr[1]}),ua=P.useRef(null),As=function(jr){jr.preventDefault()},Ra=function(jr){ua.current&&ua.current.scrollTo(typeof jr=="number"?{index:jr}:jr)},Ca=function(jr){for(var xi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Aa=Gr.length,ra=0;ra<Aa;ra+=1){var oa=(jr+ra*xi+Aa)%Aa,Ki=Gr[oa],Ya=Ki.group,bs=Ki.data;if(!Ya&&!bs.disabled)return oa}return-1},Mi=P.useState(function(){return Ca(0)}),yi=(0,C.Z)(Mi,2),Pi=yi[0],Ni=yi[1],na=function(jr){var xi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Ni(jr);var Aa={source:xi?"keyboard":"mouse"},ra=Gr[jr];if(!ra){Jr(null,-1,Aa);return}Jr(ra.value,jr,Aa)};(0,P.useEffect)(function(){na(mi!==!1?Ca(0):-1)},[Gr.length,gn]);var nu=P.useCallback(function(Ui){return pi.has(Ui)&&gr!=="combobox"},[gr,(0,Y.Z)(pi).toString(),pi.size]);(0,P.useEffect)(function(){var Ui=setTimeout(function(){if(!Bn&&Sn&&pi.size===1){var xi=Array.from(pi)[0],Aa=Gr.findIndex(function(ra){var oa=ra.data;return oa.value===xi});Aa!==-1&&(na(Aa),Ra(Aa))}});if(Sn){var jr;(jr=ua.current)===null||jr===void 0||jr.scrollTo(void 0)}return function(){return clearTimeout(Ui)}},[Sn,gn,Ln.length]);var Bs=function(jr){jr!==void 0&&_i(jr,{selected:!pi.has(jr)}),Bn||_n(!1)};if(P.useImperativeHandle(Ht,function(){return{onKeyDown:function(jr){var xi=jr.which,Aa=jr.ctrlKey;switch(xi){case rt.N:case rt.P:case rt.UP:case rt.DOWN:{var ra=0;if(xi===rt.UP?ra=-1:xi===rt.DOWN?ra=1:os()&&Aa&&(xi===rt.N?ra=1:xi===rt.P&&(ra=-1)),ra!==0){var oa=Ca(Pi+ra,ra);Ra(oa),na(oa,!0)}break}case rt.ENTER:{var Ki=Gr[Pi];Ki&&!Ki.data.disabled?Bs(Ki.value):Bs(void 0),Sn&&jr.preventDefault();break}case rt.ESC:_n(!1),Sn&&jr.stopPropagation()}},onKeyUp:function(){},scrollTo:function(jr){Ra(jr)}}}),Gr.length===0)return P.createElement("div",{role:"listbox",id:"".concat(cn,"_list"),className:"".concat(ha,"-empty"),onMouseDown:As},fn);var No=Object.keys(ba).map(function(Ui){return ba[Ui]}),es=function(jr){return jr.label};function ca(Ui,jr){var xi=Ui.group;return{role:xi?"presentation":"option",id:"".concat(cn,"_list_").concat(jr)}}var Fo=function(jr){var xi=Gr[jr];if(!xi)return null;var Aa=xi.data||{},ra=Aa.value,oa=xi.group,Ki=pe(Aa,!0),Ya=es(xi);return xi?P.createElement("div",(0,U.Z)({"aria-label":typeof Ya=="string"&&!oa?Ya:null},Ki,{key:jr},ca(xi,jr),{"aria-selected":nu(ra)}),ra):null},du={role:"listbox",id:"".concat(cn,"_list")};return P.createElement(P.Fragment,null,Qi&&P.createElement("div",(0,U.Z)({},du,{style:{height:0,width:0,overflow:"hidden"}}),Fo(Pi-1),Fo(Pi),Fo(Pi+1)),P.createElement(ni.Z,{itemKey:"key",ref:ua,data:Gr,height:Yi,itemHeight:Xi,fullHeight:!1,onMouseDown:As,onScroll:Sr,virtual:Qi,direction:li,innerProps:Qi?null:du},function(Ui,jr){var xi,Aa=Ui.group,ra=Ui.groupOption,oa=Ui.data,Ki=Ui.label,Ya=Ui.value,bs=oa.key;if(Aa){var is,Bo=(is=oa.title)!==null&&is!==void 0?is:dl(Ki)?Ki.toString():void 0;return P.createElement("div",{className:H()(ha,"".concat(ha,"-group")),title:Bo},Ki!==void 0?Ki:bs)}var ks=oa.disabled,Oo=oa.title,fa=oa.children,as=oa.style,ls=oa.className,ju=(0,A.Z)(oa,fo),Pu=Wi(ju,No),$o=nu(Ya),Za="".concat(ha,"-option"),Ro=H()(ha,Za,ls,(xi={},(0,N.Z)(xi,"".concat(Za,"-grouped"),ra),(0,N.Z)(xi,"".concat(Za,"-active"),Pi===jr&&!ks),(0,N.Z)(xi,"".concat(Za,"-disabled"),ks),(0,N.Z)(xi,"".concat(Za,"-selected"),$o),xi)),ru=es(Ui),vo=!vi||typeof vi=="function"||$o,Ao=typeof ru=="number"?ru:ru||Ya,jl=dl(Ao)?Ao.toString():void 0;return Oo!==void 0&&(jl=Oo),P.createElement("div",(0,U.Z)({},pe(Pu),Qi?{}:ca(Ui,jr),{"aria-selected":$o,className:Ro,title:jl,onMouseMove:function(){Pi===jr||ks||na(jr)},onClick:function(){ks||Bs(Ya)},style:as}),P.createElement("div",{className:"".concat(Za,"-content")},Ao),P.isValidElement(vi)||$o,vo&&P.createElement(Pt,{className:"".concat(ha,"-option-state"),customizeIcon:vi,customizeIconProps:{isSelected:$o}},$o?"\u2713":null))}))},Do=P.forwardRef(Ql);Do.displayName="OptionList";var ql=Do;function Tu(vt){var _t=vt.mode,Ht=vt.options,Gt=vt.children,sn=vt.backfill,cn=vt.allowClear,Sn=vt.placeholder,Bn=vt.getInputElement,gr=vt.showSearch,gn=vt.onSearch,_n=vt.defaultOpen,fn=vt.autoFocus,Sr=vt.labelInValue,Rn=vt.value,Ln=vt.inputValue,Jr=vt.optionLabelProp,mi=isMultiple(_t),_i=gr!==void 0?gr:mi||_t==="combobox",vi=Ht||convertChildrenToData(Gt);if(warning(_t!=="tags"||vi.every(function(li){return!li.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),_t==="tags"||_t==="combobox"){var pi=vi.some(function(li){return li.options?li.options.some(function(Yi){return typeof("value"in Yi?Yi.value:Yi.key)=="number"}):typeof("value"in li?li.value:li.key)=="number"});warning(!pi,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(_t!=="combobox"||!Jr,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(_t==="combobox"||!sn,"`backfill` only works with `combobox` mode."),warning(_t==="combobox"||!Bn,"`getInputElement` only work with `combobox` mode."),noteOnce(_t!=="combobox"||!Bn||!cn||!Sn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),gn&&!_i&&_t!=="combobox"&&_t!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!_n||fn,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Rn!=null){var ba=toArray(Rn);warning(!Sr||ba.every(function(li){return _typeof(li)==="object"&&("key"in li||"value"in li)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!mi||Array.isArray(Rn),"`value` should be array when `mode` is `multiple` or `tags`")}if(Gt){var Qi=null;toNodeArray(Gt).some(function(li){if(!React.isValidElement(li)||!li.type)return!1;var Yi=li,Xi=Yi.type;if(Xi.isSelectOption)return!1;if(Xi.isSelectOptGroup){var ha=toNodeArray(li.props.children).every(function(Gr){return!React.isValidElement(Gr)||!li.type||Gr.type.isSelectOption?!0:(Qi=Gr.type,!1)});return!ha}return Qi=Xi,!0}),Qi&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Qi.displayName||Qi.name||Qi,"`.")),warning(Ln===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function qa(vt,_t){if(vt){var Ht=function Gt(sn){for(var cn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Sn=0;Sn<sn.length;Sn++){var Bn=sn[Sn];if(Bn[_t==null?void 0:_t.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!cn&&Array.isArray(Bn[_t==null?void 0:_t.options])&&Gt(Bn[_t==null?void 0:_t.options],!0))break}};Ht(vt)}}var ou=null,lu=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"],Cu=["inputValue"];function eu(vt){return!vt||(0,F.Z)(vt)!=="object"}var tu=P.forwardRef(function(vt,_t){var Ht=vt.id,Gt=vt.mode,sn=vt.prefixCls,cn=sn===void 0?"rc-select":sn,Sn=vt.backfill,Bn=vt.fieldNames,gr=vt.inputValue,gn=vt.searchValue,_n=vt.onSearch,fn=vt.autoClearSearchValue,Sr=fn===void 0?!0:fn,Rn=vt.onSelect,Ln=vt.onDeselect,Jr=vt.dropdownMatchSelectWidth,mi=Jr===void 0?!0:Jr,_i=vt.filterOption,vi=vt.filterSort,pi=vt.optionFilterProp,ba=vt.optionLabelProp,Qi=vt.options,li=vt.children,Yi=vt.defaultActiveFirstOption,Xi=vt.menuItemSelectedIcon,ha=vt.virtual,Gr=vt.direction,ua=vt.listHeight,As=ua===void 0?200:ua,Ra=vt.listItemHeight,Ca=Ra===void 0?20:Ra,Mi=vt.value,yi=vt.defaultValue,Pi=vt.labelInValue,Ni=vt.onChange,na=(0,A.Z)(vt,lu),nu=yn(Ht),Bs=pn(Gt),No=!!(!Qi&&li),es=P.useMemo(function(){return _i===void 0&&Gt==="combobox"?!1:_i},[_i,Gt]),ca=P.useMemo(function(){return Nt(Bn,No)},[JSON.stringify(Bn),No]),Fo=De("",{value:gn!==void 0?gn:gr,postState:function(Br){return Br||""}}),du=(0,C.Z)(Fo,2),Ui=du[0],jr=du[1],xi=Si(Qi,li,ca,pi,ba),Aa=xi.valueOptions,ra=xi.labelOptions,oa=xi.options,Ki=P.useCallback(function(On){var Br=mr(On);return Br.map(function(Hr){var ui,ts,ss,Fd,Yu;if(eu(Hr))ui=Hr;else{var Zu;ss=Hr.key,ts=Hr.label,ui=(Zu=Hr.value)!==null&&Zu!==void 0?Zu:ss}var yl=Aa.get(ui);if(yl){var Sc;if(ts===void 0&&(ts=yl==null?void 0:yl[ba||ca.label]),ss===void 0&&(ss=(Sc=yl==null?void 0:yl.key)!==null&&Sc!==void 0?Sc:ui),Fd=yl==null?void 0:yl.disabled,Yu=yl==null?void 0:yl.title,0)var Cv}return{label:ts,value:ui,key:ss,disabled:Fd,title:Yu}})},[ca,ba,Aa]),Ya=De(yi,{value:Mi}),bs=(0,C.Z)(Ya,2),is=bs[0],Bo=bs[1],ks=P.useMemo(function(){var On,Br=Ki(is);return Gt==="combobox"&&Bt((On=Br[0])===null||On===void 0?void 0:On.value)?[]:Br},[is,Ki,Gt]),Oo=ti(ks,Aa),fa=(0,C.Z)(Oo,2),as=fa[0],ls=fa[1],ju=P.useMemo(function(){if(!Gt&&as.length===1){var On=as[0];if(On.value===null&&(On.label===null||On.label===void 0))return[]}return as.map(function(Br){var Hr;return(0,I.Z)((0,I.Z)({},Br),{},{label:(Hr=Br.label)!==null&&Hr!==void 0?Hr:Br.value})})},[Gt,as]),Pu=P.useMemo(function(){return new Set(as.map(function(On){return On.value}))},[as]);P.useEffect(function(){if(Gt==="combobox"){var On,Br=(On=as[0])===null||On===void 0?void 0:On.value;jr(Qa(Br)?String(Br):"")}},[as]);var $o=za(function(On,Br){var Hr,ui=Br!=null?Br:On;return Hr={},(0,N.Z)(Hr,ca.value,On),(0,N.Z)(Hr,ca.label,ui),Hr}),Za=P.useMemo(function(){if(Gt!=="tags")return oa;var On=(0,Y.Z)(oa),Br=function(ui){return Aa.has(ui)};return(0,Y.Z)(as).sort(function(Hr,ui){return Hr.value<ui.value?-1:1}).forEach(function(Hr){var ui=Hr.value;Br(ui)||On.push($o(ui,Hr.label))}),On},[$o,oa,Aa,as,Gt]),Ro=Nn(Za,ca,Ui,es,pi),ru=P.useMemo(function(){return Gt!=="tags"||!Ui||Ro.some(function(On){return On[pi||"value"]===Ui})||Ro.some(function(On){return On[ca.value]===Ui})?Ro:[$o(Ui)].concat((0,Y.Z)(Ro))},[$o,pi,Gt,Ro,Ui,ca]),vo=P.useMemo(function(){return vi?(0,Y.Z)(ru).sort(function(On,Br){return vi(On,Br)}):ru},[ru,vi]),Ao=P.useMemo(function(){return Ot(vo,{fieldNames:ca,childrenAsData:No})},[vo,ca,No]),jl=function(Br){var Hr=Ki(Br);if(Bo(Hr),Ni&&(Hr.length!==as.length||Hr.some(function(ss,Fd){var Yu;return((Yu=as[Fd])===null||Yu===void 0?void 0:Yu.value)!==(ss==null?void 0:ss.value)}))){var ui=Pi?Hr:Hr.map(function(ss){return ss.value}),ts=Hr.map(function(ss){return Wt(ls(ss.value))});Ni(Bs?ui:ui[0],Bs?ts:ts[0])}},Ld=P.useState(null),ic=(0,C.Z)(Ld,2),Ch=ic[0],Hu=ic[1],Nu=P.useState(0),Go=(0,C.Z)(Nu,2),iu=Go[0],Id=Go[1],dd=Yi!==void 0?Yi:Gt!=="combobox",Wu=P.useCallback(function(On,Br){var Hr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ui=Hr.source,ts=ui===void 0?"keyboard":ui;Id(Br),Sn&&Gt==="combobox"&&On!==null&&ts==="keyboard"&&Hu(String(On))},[Sn,Gt]),kc=function(Br,Hr,ui){var ts=function(){var Da,vu=ls(Br);return[Pi?{label:vu==null?void 0:vu[ca.label],value:Br,key:(Da=vu==null?void 0:vu.key)!==null&&Da!==void 0?Da:Br}:Br,Wt(vu)]};if(Hr&&Rn){var ss=ts(),Fd=(0,C.Z)(ss,2),Yu=Fd[0],Zu=Fd[1];Rn(Yu,Zu)}else if(!Hr&&Ln&&ui!=="clear"){var yl=ts(),Sc=(0,C.Z)(yl,2),Cv=Sc[0],ag=Sc[1];Ln(Cv,ag)}},hu=za(function(On,Br){var Hr,ui=Bs?Br.selected:!0;ui?Hr=Bs?[].concat((0,Y.Z)(as),[On]):[On]:Hr=as.filter(function(ts){return ts.value!==On}),jl(Hr),kc(On,ui),Gt==="combobox"?Hu(""):(!pn||Sr)&&(jr(""),Hu(""))}),Dd=function(Br,Hr){jl(Br);var ui=Hr.type,ts=Hr.values;(ui==="remove"||ui==="clear")&&ts.forEach(function(ss){kc(ss.value,!1,ui)})},fu=function(Br,Hr){if(jr(Br),Hu(null),Hr.source==="submit"){var ui=(Br||"").trim();if(ui){var ts=Array.from(new Set([].concat((0,Y.Z)(Pu),[ui])));jl(ts),kc(ui,!0),jr("")}return}Hr.source!=="blur"&&(Gt==="combobox"&&jl(Br),_n==null||_n(Br))},wc=function(Br){var Hr=Br;Gt!=="tags"&&(Hr=Br.map(function(ts){var ss=ra.get(ts);return ss==null?void 0:ss.value}).filter(function(ts){return ts!==void 0}));var ui=Array.from(new Set([].concat((0,Y.Z)(Pu),(0,Y.Z)(Hr))));jl(ui),ui.forEach(function(ts){kc(ts,!0)})},Oi=P.useMemo(function(){var On=ha!==!1&&mi!==!1;return(0,I.Z)((0,I.Z)({},xi),{},{flattenOptions:Ao,onActiveValue:Wu,defaultActiveFirstOption:dd,onSelect:hu,menuItemSelectedIcon:Xi,rawValues:Pu,fieldNames:ca,virtual:On,direction:Gr,listHeight:As,listItemHeight:Ca,childrenAsData:No})},[xi,Ao,Wu,dd,hu,Xi,Pu,ca,ha,mi,As,Ca,No]);return P.createElement(Vr.Provider,{value:Oi},P.createElement(En,(0,U.Z)({},na,{id:nu,prefixCls:cn,ref:_t,omitDomProps:Cu,mode:Gt,displayValues:ju,onDisplayValuesChange:Dd,direction:Gr,searchValue:Ui,onSearch:fu,autoClearSearchValue:Sr,onSearchSplit:wc,dropdownMatchSelectWidth:mi,OptionList:ql,emptyOptions:!Ao.length,activeValue:Ch,activeDescendantId:"".concat(nu,"_list_").concat(iu)})))}),Mu=tu;Mu.Option=wr,Mu.OptGroup=Ti;var Kr=Mu,bh=Kr,kv=k(10366),kh=k(8745),cd=k(33603),wv=k(9708),Va=k(53124),Sv=k(98866),uu=k(88258),Sm=k(98675),ig=k(65223),wh=k(4173),Cf=k(87244),Sh=k(13458),Tv=k(78642),Tn=k(46163),pl=function(vt,_t){var Ht={};for(var Gt in vt)Object.prototype.hasOwnProperty.call(vt,Gt)&&_t.indexOf(Gt)<0&&(Ht[Gt]=vt[Gt]);if(vt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var sn=0,Gt=Object.getOwnPropertySymbols(vt);sn<Gt.length;sn++)_t.indexOf(Gt[sn])<0&&Object.prototype.propertyIsEnumerable.call(vt,Gt[sn])&&(Ht[Gt[sn]]=vt[Gt[sn]]);return Ht};const An="SECRET_COMBOBOX_MODE_DO_NOT_USE",cu=(vt,_t)=>{var Ht,{prefixCls:Gt,bordered:sn=!0,className:cn,rootClassName:Sn,getPopupContainer:Bn,popupClassName:gr,dropdownClassName:gn,listHeight:_n=256,placement:fn,listItemHeight:Sr=24,size:Rn,disabled:Ln,notFoundContent:Jr,status:mi,builtinPlacements:_i,dropdownMatchSelectWidth:vi,popupMatchSelectWidth:pi,direction:ba,style:Qi,allowClear:li}=vt,Yi=pl(vt,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear"]);const{getPopupContainer:Xi,getPrefixCls:ha,renderEmpty:Gr,direction:ua,virtual:As,popupMatchSelectWidth:Ra,popupOverflow:Ca,select:Mi}=P.useContext(Va.E_),yi=ha("select",Gt),Pi=ha(),Ni=ba!=null?ba:ua,{compactSize:na,compactItemClassnames:nu}=(0,wh.ri)(yi,Ni),[Bs,No]=(0,Cf.Z)(yi),es=P.useMemo(()=>{const{mode:Za}=Yi;if(Za!=="combobox")return Za===An?"combobox":Za},[Yi.mode]),ca=es==="multiple"||es==="tags",Fo=(0,Tv.Z)(Yi.suffixIcon,Yi.showArrow),du=(Ht=pi!=null?pi:vi)!==null&&Ht!==void 0?Ht:Ra,{status:Ui,hasFeedback:jr,isFormItemInput:xi,feedbackIcon:Aa}=P.useContext(ig.aM),ra=(0,wv.F)(Ui,mi);let oa;Jr!==void 0?oa=Jr:es==="combobox"?oa=null:oa=(Gr==null?void 0:Gr("Select"))||P.createElement(uu.Z,{componentName:"Select"});const{suffixIcon:Ki,itemIcon:Ya,removeIcon:bs,clearIcon:is}=(0,Tn.Z)(Object.assign(Object.assign({},Yi),{multiple:ca,hasFeedback:jr,feedbackIcon:Aa,showSuffixIcon:Fo,prefixCls:yi,showArrow:Yi.showArrow,componentName:"Select"})),Bo=li===!0?{clearIcon:is}:li,ks=(0,kv.Z)(Yi,["suffixIcon","itemIcon"]),Oo=H()(gr||gn,{[`${yi}-dropdown-${Ni}`]:Ni==="rtl"},Sn,No),fa=(0,Sm.Z)(Za=>{var Ro;return(Ro=Rn!=null?Rn:na)!==null&&Ro!==void 0?Ro:Za}),as=P.useContext(Sv.Z),ls=Ln!=null?Ln:as,ju=H()({[`${yi}-lg`]:fa==="large",[`${yi}-sm`]:fa==="small",[`${yi}-rtl`]:Ni==="rtl",[`${yi}-borderless`]:!sn,[`${yi}-in-form-item`]:xi},(0,wv.Z)(yi,ra,jr),nu,Mi==null?void 0:Mi.className,cn,Sn,No),Pu=P.useMemo(()=>fn!==void 0?fn:Ni==="rtl"?"bottomRight":"bottomLeft",[fn,Ni]),$o=(0,Sh.Z)(_i,Ca);return Bs(P.createElement(bh,Object.assign({ref:_t,virtual:As,showSearch:Mi==null?void 0:Mi.showSearch},ks,{style:Object.assign(Object.assign({},Mi==null?void 0:Mi.style),Qi),dropdownMatchSelectWidth:du,builtinPlacements:$o,transitionName:(0,cd.m)(Pi,"slide-up",Yi.transitionName),listHeight:_n,listItemHeight:Sr,mode:es,prefixCls:yi,placement:Pu,direction:Ni,suffixIcon:Ki,menuItemSelectedIcon:Ya,removeIcon:bs,allowClear:Bo,notFoundContent:oa,className:ju,getPopupContainer:Bn||Xi,dropdownClassName:Oo,disabled:ls})))},Th=P.forwardRef(cu),Kg=(0,kh.Z)(Th);Th.SECRET_COMBOBOX_MODE_DO_NOT_USE=An,Th.Option=wr,Th.OptGroup=Ti,Th._InternalPanelDoNotUseOrYouWillBeFired=Kg;var Jg=Th},87244:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return re}});var M=k(14747),H=k(80110),U=k(45503),Y=k(67968),N=k(67771),I=k(33297);const C=q=>{const{optionHeight:ce,optionFontSize:Ee,optionLineHeight:Te,optionPadding:Je}=q;return{position:"relative",display:"block",minHeight:ce,padding:Je,color:q.colorText,fontWeight:"normal",fontSize:Ee,lineHeight:Te,boxSizing:"border-box"}};var F=q=>{const{antCls:ce,componentCls:Ee}=q,Te=`${Ee}-item`,Je=`&${ce}-slide-up-enter${ce}-slide-up-enter-active`,He=`&${ce}-slide-up-appear${ce}-slide-up-appear-active`,rt=`&${ce}-slide-up-leave${ce}-slide-up-leave-active`,Et=`${Ee}-dropdown-placement-`;return[{[`${Ee}-dropdown`]:Object.assign(Object.assign({},(0,M.Wf)(q)),{position:"absolute",top:-9999,zIndex:q.zIndexPopup,boxSizing:"border-box",padding:q.paddingXXS,overflow:"hidden",fontSize:q.fontSize,fontVariant:"initial",backgroundColor:q.colorBgElevated,borderRadius:q.borderRadiusLG,outline:"none",boxShadow:q.boxShadowSecondary,[`
|
|
|
${Je}${Et}bottomLeft,
|
|
|
${He}${Et}bottomLeft
|
|
|
`]:{animationName:N.fJ},[`
|
|
|
${Je}${Et}topLeft,
|
|
|
${He}${Et}topLeft,
|
|
|
${Je}${Et}topRight,
|
|
|
${He}${Et}topRight
|
|
|
`]:{animationName:N.Qt},[`${rt}${Et}bottomLeft`]:{animationName:N.Uw},[`
|
|
|
${rt}${Et}topLeft,
|
|
|
${rt}${Et}topRight
|
|
|
`]:{animationName:N.ly},"&-hidden":{display:"none"},[`${Te}`]:Object.assign(Object.assign({},C(q)),{cursor:"pointer",transition:`background ${q.motionDurationSlow} ease`,borderRadius:q.borderRadiusSM,"&-group":{color:q.colorTextDescription,fontSize:q.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},M.vS),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${Te}-option-disabled)`]:{backgroundColor:q.optionActiveBg},[`&-selected:not(${Te}-option-disabled)`]:{color:q.optionSelectedColor,fontWeight:q.optionSelectedFontWeight,backgroundColor:q.optionSelectedBg,[`${Te}-option-state`]:{color:q.colorPrimary}},"&-disabled":{[`&${Te}-option-selected`]:{backgroundColor:q.colorBgContainerDisabled},color:q.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:q.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},(0,N.oN)(q,"slide-up"),(0,N.oN)(q,"slide-down"),(0,I.Fm)(q,"move-up"),(0,I.Fm)(q,"move-down")]};const P=2,W=q=>{let{controlHeightSM:ce,controlHeight:Ee,lineWidth:Te}=q;const Je=(Ee-ce)/2-Te,He=Math.ceil(Je/2);return[Je,He]};function K(q,ce){const{componentCls:Ee,iconCls:Te}=q,Je=`${Ee}-selection-overflow`,He=q.multipleSelectItemHeight,[rt]=W(q),Et=ce?`${Ee}-${ce}`:"";return{[`${Ee}-multiple${Et}`]:{fontSize:q.fontSize,[Je]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${Ee}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${rt-P}px ${P*2}px`,borderRadius:q.borderRadius,[`${Ee}-show-search&`]:{cursor:"text"},[`${Ee}-disabled&`]:{background:q.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${P}px 0`,lineHeight:`${He}px`,visibility:"hidden",content:'"\\a0"'}},[`
|
|
|
&${Ee}-show-arrow ${Ee}-selector,
|
|
|
&${Ee}-allow-clear ${Ee}-selector
|
|
|
`]:{paddingInlineEnd:q.fontSizeIcon+q.controlPaddingHorizontal},[`${Ee}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:He,marginTop:P,marginBottom:P,lineHeight:`${He-q.lineWidth*2}px`,background:q.multipleItemBg,border:`${q.lineWidth}px ${q.lineType} ${q.multipleItemBorderColor}`,borderRadius:q.borderRadiusSM,cursor:"default",transition:`font-size ${q.motionDurationSlow}, line-height ${q.motionDurationSlow}, height ${q.motionDurationSlow}`,userSelect:"none",marginInlineEnd:P*2,paddingInlineStart:q.paddingXS,paddingInlineEnd:q.paddingXS/2,[`${Ee}-disabled&`]:{color:q.multipleItemColorDisabled,borderColor:q.multipleItemBorderColorDisabled,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:q.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},(0,M.Ro)()),{display:"inline-flex",alignItems:"center",color:q.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${Te}`]:{verticalAlign:"-0.2em"},"&:hover":{color:q.colorIconHover}})},[`${Je}-item + ${Je}-item`]:{[`${Ee}-selection-search`]:{marginInlineStart:0}},[`${Ee}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:q.inputPaddingHorizontalBase-rt,"\n &-input,\n &-mirror\n ":{height:He,fontFamily:q.fontFamily,lineHeight:`${He}px`,transition:`all ${q.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${Ee}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:q.inputPaddingHorizontalBase,insetInlineEnd:q.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${q.motionDurationSlow}`}}}}var be=q=>{const{componentCls:ce}=q,Ee=(0,U.TS)(q,{controlHeight:q.controlHeightSM,multipleSelectItemHeight:q.controlHeightXS,borderRadius:q.borderRadiusSM,borderRadiusSM:q.borderRadiusXS}),Te=(0,U.TS)(q,{fontSize:q.fontSizeLG,controlHeight:q.controlHeightLG,multipleSelectItemHeight:q.multipleItemHeightLG,borderRadius:q.borderRadiusLG,borderRadiusSM:q.borderRadius}),[,Je]=W(q);return[K(q),K(Ee,"sm"),{[`${ce}-multiple${ce}-sm`]:{[`${ce}-selection-placeholder`]:{insetInline:q.controlPaddingHorizontalSM-q.lineWidth},[`${ce}-selection-search`]:{marginInlineStart:Je}}},K(Te,"lg")]};function Ue(q,ce){const{componentCls:Ee,inputPaddingHorizontalBase:Te,borderRadius:Je}=q,He=q.controlHeight-q.lineWidth*2,rt=Math.ceil(q.fontSize*1.25),Et=ce?`${Ee}-${ce}`:"";return{[`${Ee}-single${Et}`]:{fontSize:q.fontSize,[`${Ee}-selector`]:Object.assign(Object.assign({},(0,M.Wf)(q)),{display:"flex",borderRadius:Je,[`${Ee}-selection-search`]:{position:"absolute",top:0,insetInlineStart:Te,insetInlineEnd:Te,bottom:0,"&-input":{width:"100%"}},[`
|
|
|
${Ee}-selection-item,
|
|
|
${Ee}-selection-placeholder
|
|
|
`]:{padding:0,lineHeight:`${He}px`,transition:`all ${q.motionDurationSlow}, visibility 0s`,"@supports (-moz-appearance: meterbar)":{lineHeight:`${He}px`}},[`${Ee}-selection-item`]:{position:"relative",userSelect:"none"},[`${Ee}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${Ee}-selection-item:after`,`${Ee}-selection-placeholder:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
|
|
|
&${Ee}-show-arrow ${Ee}-selection-item,
|
|
|
&${Ee}-show-arrow ${Ee}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:rt},[`&${Ee}-open ${Ee}-selection-item`]:{color:q.colorTextPlaceholder},[`&:not(${Ee}-customize-input)`]:{[`${Ee}-selector`]:{width:"100%",height:q.controlHeight,padding:`0 ${Te}px`,[`${Ee}-selection-search-input`]:{height:He},"&:after":{lineHeight:`${He}px`}}},[`&${Ee}-customize-input`]:{[`${Ee}-selector`]:{"&:after":{display:"none"},[`${Ee}-selection-search`]:{position:"static",width:"100%"},[`${Ee}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${Te}px`,"&:after":{display:"none"}}}}}}}function Ne(q){const{componentCls:ce}=q,Ee=q.controlPaddingHorizontalSM-q.lineWidth;return[Ue(q),Ue((0,U.TS)(q,{controlHeight:q.controlHeightSM,borderRadius:q.borderRadiusSM}),"sm"),{[`${ce}-single${ce}-sm`]:{[`&:not(${ce}-customize-input)`]:{[`${ce}-selection-search`]:{insetInlineStart:Ee,insetInlineEnd:Ee},[`${ce}-selector`]:{padding:`0 ${Ee}px`},[`&${ce}-show-arrow ${ce}-selection-search`]:{insetInlineEnd:Ee+q.fontSize*1.5},[`
|
|
|
&${ce}-show-arrow ${ce}-selection-item,
|
|
|
&${ce}-show-arrow ${ce}-selection-placeholder
|
|
|
`]:{paddingInlineEnd:q.fontSize*1.5}}}},Ue((0,U.TS)(q,{controlHeight:q.singleItemHeightLG,fontSize:q.fontSizeLG,borderRadius:q.borderRadiusLG}),"lg")]}const ye=q=>{const{componentCls:ce,selectorBg:Ee}=q;return{position:"relative",backgroundColor:Ee,border:`${q.lineWidth}px ${q.lineType} ${q.colorBorder}`,transition:`all ${q.motionDurationMid} ${q.motionEaseInOut}`,input:{cursor:"pointer"},[`${ce}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${ce}-disabled&`]:{color:q.colorTextDisabled,background:q.colorBgContainerDisabled,cursor:"not-allowed",[`${ce}-multiple&`]:{background:q.multipleSelectorBgDisabled},input:{cursor:"not-allowed"}}}},De=function(q,ce){let Ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:Te,borderHoverColor:Je,outlineColor:He,antCls:rt}=ce,Et=Ee?{[`${Te}-selector`]:{borderColor:Je}}:{};return{[q]:{[`&:not(${Te}-disabled):not(${Te}-customize-input):not(${rt}-pagination-size-changer)`]:Object.assign(Object.assign({},Et),{[`${Te}-focused& ${Te}-selector`]:{borderColor:Je,boxShadow:`0 0 0 ${ce.controlOutlineWidth}px ${He}`,outline:0},[`&:hover ${Te}-selector`]:{borderColor:Je}})}}},Ce=q=>{const{componentCls:ce}=q;return{[`${ce}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},Me=q=>{const{componentCls:ce,inputPaddingHorizontalBase:Ee,iconCls:Te}=q;return{[ce]:Object.assign(Object.assign({},(0,M.Wf)(q)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${ce}-customize-input) ${ce}-selector`]:Object.assign(Object.assign({},ye(q)),Ce(q)),[`${ce}-selection-item`]:Object.assign({flex:1,fontWeight:"normal"},M.vS),[`${ce}-selection-placeholder`]:Object.assign(Object.assign({},M.vS),{flex:1,color:q.colorTextPlaceholder,pointerEvents:"none"}),[`${ce}-arrow`]:Object.assign(Object.assign({},(0,M.Ro)()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Ee,height:q.fontSizeIcon,marginTop:-q.fontSizeIcon/2,color:q.colorTextQuaternary,fontSize:q.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[Te]:{verticalAlign:"top",transition:`transform ${q.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${ce}-suffix)`]:{pointerEvents:"auto"}},[`${ce}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${ce}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:Ee,zIndex:1,display:"inline-block",width:q.fontSizeIcon,height:q.fontSizeIcon,marginTop:-q.fontSizeIcon/2,color:q.colorTextQuaternary,fontSize:q.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:q.clearBg,cursor:"pointer",opacity:0,transition:`color ${q.motionDurationMid} ease, opacity ${q.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:q.colorTextTertiary}},"&:hover":{[`${ce}-clear`]:{opacity:1}}}),[`${ce}-has-feedback`]:{[`${ce}-clear`]:{insetInlineEnd:Ee+q.fontSize+q.paddingXS}}}},Oe=q=>{const{componentCls:ce}=q;return[{[ce]:{[`&-borderless ${ce}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${ce}-in-form-item`]:{width:"100%"}}},Me(q),Ne(q),be(q),F(q),{[`${ce}-rtl`]:{direction:"rtl"}},De(ce,(0,U.TS)(q,{borderHoverColor:q.colorPrimaryHover,outlineColor:q.controlOutline})),De(`${ce}-status-error`,(0,U.TS)(q,{borderHoverColor:q.colorErrorHover,outlineColor:q.colorErrorOutline}),!0),De(`${ce}-status-warning`,(0,U.TS)(q,{borderHoverColor:q.colorWarningHover,outlineColor:q.colorWarningOutline}),!0),(0,H.c)(q,{borderElCls:`${ce}-selector`,focusElCls:`${ce}-focused`})]};var re=(0,Y.Z)("Select",(q,ce)=>{let{rootPrefixCls:Ee}=ce;const Te=(0,U.TS)(q,{rootPrefixCls:Ee,inputPaddingHorizontalBase:q.paddingSM-1,multipleSelectItemHeight:q.multipleItemHeight});return[Oe(Te)]},q=>{const{fontSize:ce,lineHeight:Ee,controlHeight:Te,controlPaddingHorizontal:Je,zIndexPopupBase:He,colorText:rt,fontWeightStrong:Et,controlItemBgActive:lt,controlItemBgHover:st,colorBgContainer:mt,colorFillSecondary:fe,controlHeightLG:We,controlHeightSM:ht,colorBgContainerDisabled:Pt,colorTextDisabled:Ve}=q;return{zIndexPopup:He+50,optionSelectedColor:rt,optionSelectedFontWeight:Et,optionSelectedBg:lt,optionActiveBg:st,optionPadding:`${(Te-ce*Ee)/2}px ${Je}px`,optionFontSize:ce,optionLineHeight:Ee,optionHeight:Te,selectorBg:mt,clearBg:mt,singleItemHeightLG:We,multipleItemBg:fe,multipleItemBorderColor:"transparent",multipleItemHeight:ht,multipleItemHeightLG:Te,multipleSelectorBgDisabled:Pt,multipleItemColorDisabled:Ve,multipleItemBorderColorDisabled:"transparent"}})},13458:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return H}});const M=U=>{const N={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:U==="scroll"?"scroll":"visible",_experimental:{dynamicInset:!0}};return{bottomLeft:Object.assign(Object.assign({},N),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},N),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},N),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},N),{points:["br","tr"],offset:[0,-4]})}};function H(U,Y){return U||M(Y)}},78642:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return M}});function M(H,U){return U!==void 0?U:H!==null}},46163:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return A}});var M=k(18299),H=k(16646),U=k(73475),Y=k(42922),N=k(3407),I=k(72395),C=k(67294);function A(F){let{suffixIcon:P,clearIcon:W,menuItemSelectedIcon:K,removeIcon:ge,loading:be,multiple:Ue,hasFeedback:Ne,prefixCls:ye,showSuffixIcon:De,feedbackIcon:Ce,showArrow:Me,componentName:Oe}=F;const re=W!=null?W:C.createElement(H.Z,null),q=Je=>P===null&&!Ne&&!Me?null:C.createElement(C.Fragment,null,De!==!1&&Je,Ne&&Ce);let ce=null;if(P!==void 0)ce=q(P);else if(be)ce=q(C.createElement(N.Z,{spin:!0}));else{const Je=`${ye}-suffix`;ce=He=>{let{open:rt,showSearch:Et}=He;return q(rt&&Et?C.createElement(I.Z,{className:Je}):C.createElement(Y.Z,{className:Je}))}}let Ee=null;K!==void 0?Ee=K:Ue?Ee=C.createElement(M.Z,null):Ee=null;let Te=null;return ge!==void 0?Te=ge:Te=C.createElement(U.Z,null),{clearIcon:re,suffixIcon:ce,itemIcon:Ee,removeIcon:Te}}},33507:function(ke,ve){"use strict";const k=M=>({[M.componentCls]:{[`${M.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${M.motionDurationMid} ${M.motionEaseInOut},
|
|
|
opacity ${M.motionDurationMid} ${M.motionEaseInOut} !important`}},[`${M.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${M.motionDurationMid} ${M.motionEaseInOut},
|
|
|
opacity ${M.motionDurationMid} ${M.motionEaseInOut} !important`}}});ve.Z=k},33297:function(ke,ve,k){"use strict";k.d(ve,{Fm:function(){return K}});var M=k(45930),H=k(93590);const U=new M.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Y=new M.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),N=new M.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),I=new M.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),C=new M.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),A=new M.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),F=new M.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),P=new M.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),W={"move-up":{inKeyframes:F,outKeyframes:P},"move-down":{inKeyframes:U,outKeyframes:Y},"move-left":{inKeyframes:N,outKeyframes:I},"move-right":{inKeyframes:C,outKeyframes:A}},K=(ge,be)=>{const{antCls:Ue}=ge,Ne=`${Ue}-${be}`,{inKeyframes:ye,outKeyframes:De}=W[be];return[(0,H.R)(Ne,ye,De,ge.motionDurationMid),{[`
|
|
|
${Ne}-enter,
|
|
|
${Ne}-appear
|
|
|
`]:{opacity:0,animationTimingFunction:ge.motionEaseOutCirc},[`${Ne}-leave`]:{animationTimingFunction:ge.motionEaseInOutCirc}}]}},67771:function(ke,ve,k){"use strict";k.d(ve,{Qt:function(){return N},Uw:function(){return Y},fJ:function(){return U},ly:function(){return I},oN:function(){return K}});var M=k(45930),H=k(93590);const U=new M.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Y=new M.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),N=new M.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),I=new M.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),C=new M.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),A=new M.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),F=new M.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),P=new M.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),W={"slide-up":{inKeyframes:U,outKeyframes:Y},"slide-down":{inKeyframes:N,outKeyframes:I},"slide-left":{inKeyframes:C,outKeyframes:A},"slide-right":{inKeyframes:F,outKeyframes:P}},K=(ge,be)=>{const{antCls:Ue}=ge,Ne=`${Ue}-${be}`,{inKeyframes:ye,outKeyframes:De}=W[be];return[(0,H.R)(Ne,ye,De,ge.motionDurationMid),{[`
|
|
|
${Ne}-enter,
|
|
|
${Ne}-appear
|
|
|
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:ge.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${Ne}-leave`]:{animationTimingFunction:ge.motionEaseInQuint}}]}},41771:function(ke,ve){"use strict";var k;var M=typeof Symbol=="function"&&Symbol.for,H=M?Symbol.for("react.element"):60103,U=M?Symbol.for("react.portal"):60106,Y=M?Symbol.for("react.fragment"):60107,N=M?Symbol.for("react.strict_mode"):60108,I=M?Symbol.for("react.profiler"):60114,C=M?Symbol.for("react.provider"):60109,A=M?Symbol.for("react.context"):60110,F=M?Symbol.for("react.async_mode"):60111,P=M?Symbol.for("react.concurrent_mode"):60111,W=M?Symbol.for("react.forward_ref"):60112,K=M?Symbol.for("react.suspense"):60113,ge=M?Symbol.for("react.suspense_list"):60120,be=M?Symbol.for("react.memo"):60115,Ue=M?Symbol.for("react.lazy"):60116,Ne=M?Symbol.for("react.block"):60121,ye=M?Symbol.for("react.fundamental"):60117,De=M?Symbol.for("react.responder"):60118,Ce=M?Symbol.for("react.scope"):60119;function Me(re){if(typeof re=="object"&&re!==null){var q=re.$$typeof;switch(q){case H:switch(re=re.type,re){case F:case P:case Y:case I:case N:case K:return re;default:switch(re=re&&re.$$typeof,re){case A:case W:case Ue:case be:case C:return re;default:return q}}case U:return q}}}function Oe(re){return Me(re)===P}k=F,k=P,k=A,k=C,k=H,k=W,k=Y,k=Ue,k=be,k=U,k=I,k=N,k=K,k=function(re){return Oe(re)||Me(re)===F},k=Oe,k=function(re){return Me(re)===A},k=function(re){return Me(re)===C},k=function(re){return typeof re=="object"&&re!==null&&re.$$typeof===H},k=function(re){return Me(re)===W},ve.isFragment=function(re){return Me(re)===Y},k=function(re){return Me(re)===Ue},k=function(re){return Me(re)===be},k=function(re){return Me(re)===U},k=function(re){return Me(re)===I},k=function(re){return Me(re)===N},k=function(re){return Me(re)===K},k=function(re){return typeof re=="string"||typeof re=="function"||re===Y||re===P||re===I||re===N||re===K||re===ge||typeof re=="object"&&re!==null&&(re.$$typeof===Ue||re.$$typeof===be||re.$$typeof===C||re.$$typeof===A||re.$$typeof===W||re.$$typeof===ye||re.$$typeof===De||re.$$typeof===Ce||re.$$typeof===Ne)},k=Me},47655:function(ke,ve,k){"use strict";ke.exports=k(41771)},64701:function(ke,ve,k){"use strict";k.r(ve),k.d(ve,{ResizableTextArea:function(){return ft},default:function(){return L}});var M=k(87462),H=k(1413),U=k(4942),Y=k(71002),N=k(97685),I=k(45987),C=k(74902),A=k(94184),F=k.n(A),P=k(67656),W=k(87887),K=k(67294);function ge(X){var Ke=K.useRef();Ke.current=X;var ot=K.useCallback(function(){for(var pe,xe=arguments.length,Ze=new Array(xe),O=0;O<xe;O++)Ze[O]=arguments[O];return(pe=Ke.current)===null||pe===void 0?void 0:pe.call.apply(pe,[Ke].concat(Ze))},[]);return ot}function be(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Ue=be()?K.useLayoutEffect:K.useEffect,Ne=Ue,ye=function(Ke,ot){var pe=K.useRef(!0);Ue(function(){if(!pe.current)return Ke()},ot),Ue(function(){return pe.current=!1,function(){pe.current=!0}},[])};function De(X){var Ke=K.useRef(!1),ot=K.useState(X),pe=(0,N.Z)(ot,2),xe=pe[0],Ze=pe[1];K.useEffect(function(){return Ke.current=!1,function(){Ke.current=!0}},[]);function O(ne,qe){qe&&Ke.current||Ze(ne)}return[xe,O]}function Ce(X){return X!==void 0}function Me(X,Ke){var ot=Ke||{},pe=ot.defaultValue,xe=ot.value,Ze=ot.onChange,O=ot.postState,ne=De(function(){return Ce(xe)?xe:Ce(pe)?typeof pe=="function"?pe():pe:typeof X=="function"?X():X}),qe=(0,N.Z)(ne,2),dt=qe[0],nt=qe[1],xt=xe!==void 0?xe:dt,bt=O?O(xt):xt,wt=ge(Ze),we=De([xt]),oe=(0,N.Z)(we,2),Fe=oe[0],Ye=oe[1];ye(function(){var Ie=Fe[0];dt!==Ie&&wt(dt,Ie)},[Fe]),ye(function(){Ce(xe)||nt(xe)},[xe]);var ie=ge(function(Ie,je){nt(Ie,je),Ye([xt],je)});return[bt,ie]}var Oe=k(48555),re=function(Ke){return+setTimeout(Ke,16)},q=function(Ke){return clearTimeout(Ke)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(re=function(Ke){return window.requestAnimationFrame(Ke)},q=function(Ke){return window.cancelAnimationFrame(Ke)});var ce=0,Ee=new Map;function Te(X){Ee.delete(X)}var Je=function(Ke){var ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;ce+=1;var pe=ce;function xe(Ze){if(Ze===0)Te(pe),Ke();else{var O=re(function(){xe(Ze-1)});Ee.set(pe,O)}}return xe(ot),pe};Je.cancel=function(X){var Ke=Ee.get(X);return Te(Ke),q(Ke)};var He=Je,rt=`
|
|
|
min-height:0 !important;
|
|
|
max-height:none !important;
|
|
|
height:0 !important;
|
|
|
visibility:hidden !important;
|
|
|
overflow:hidden !important;
|
|
|
position:absolute !important;
|
|
|
z-index:-1000 !important;
|
|
|
top:0 !important;
|
|
|
right:0 !important;
|
|
|
pointer-events: none !important;
|
|
|
`,Et=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],lt={},st;function mt(X){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ot=X.getAttribute("id")||X.getAttribute("data-reactid")||X.getAttribute("name");if(Ke&<[ot])return lt[ot];var pe=window.getComputedStyle(X),xe=pe.getPropertyValue("box-sizing")||pe.getPropertyValue("-moz-box-sizing")||pe.getPropertyValue("-webkit-box-sizing"),Ze=parseFloat(pe.getPropertyValue("padding-bottom"))+parseFloat(pe.getPropertyValue("padding-top")),O=parseFloat(pe.getPropertyValue("border-bottom-width"))+parseFloat(pe.getPropertyValue("border-top-width")),ne=Et.map(function(dt){return"".concat(dt,":").concat(pe.getPropertyValue(dt))}).join(";"),qe={sizingStyle:ne,paddingSize:Ze,borderSize:O,boxSizing:xe};return Ke&&ot&&(lt[ot]=qe),qe}function fe(X){var Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,pe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;st||(st=document.createElement("textarea"),st.setAttribute("tab-index","-1"),st.setAttribute("aria-hidden","true"),document.body.appendChild(st)),X.getAttribute("wrap")?st.setAttribute("wrap",X.getAttribute("wrap")):st.removeAttribute("wrap");var xe=mt(X,Ke),Ze=xe.paddingSize,O=xe.borderSize,ne=xe.boxSizing,qe=xe.sizingStyle;st.setAttribute("style","".concat(qe,";").concat(rt)),st.value=X.value||X.placeholder||"";var dt=void 0,nt=void 0,xt,bt=st.scrollHeight;if(ne==="border-box"?bt+=O:ne==="content-box"&&(bt-=Ze),ot!==null||pe!==null){st.value=" ";var wt=st.scrollHeight-Ze;ot!==null&&(dt=wt*ot,ne==="border-box"&&(dt=dt+Ze+O),bt=Math.max(dt,bt)),pe!==null&&(nt=wt*pe,ne==="border-box"&&(nt=nt+Ze+O),xt=bt>nt?"":"hidden",bt=Math.min(nt,bt))}var we={height:bt,overflowY:xt,resize:"none"};return dt&&(we.minHeight=dt),nt&&(we.maxHeight=nt),we}var We=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],ht=0,Pt=1,Ve=2,it=K.forwardRef(function(X,Ke){var ot=X,pe=ot.prefixCls,xe=ot.onPressEnter,Ze=ot.defaultValue,O=ot.value,ne=ot.autoSize,qe=ot.onResize,dt=ot.className,nt=ot.style,xt=ot.disabled,bt=ot.onChange,wt=ot.onInternalAutoSize,we=(0,I.Z)(ot,We),oe=Me(Ze,{value:O,postState:function(nn){return nn!=null?nn:""}}),Fe=(0,N.Z)(oe,2),Ye=Fe[0],ie=Fe[1],Ie=function(nn){ie(nn.target.value),bt==null||bt(nn)},je=K.useRef();K.useImperativeHandle(Ke,function(){return{textArea:je.current}});var Be=K.useMemo(function(){return ne&&(0,Y.Z)(ne)==="object"?[ne.minRows,ne.maxRows]:[]},[ne]),et=(0,N.Z)(Be,2),gt=et[0],Mt=et[1],Rt=!!ne,Ft=function(){try{if(document.activeElement===je.current){var nn=je.current,sr=nn.selectionStart,Pn=nn.selectionEnd,Fn=nn.scrollTop;je.current.setSelectionRange(sr,Pn),je.current.scrollTop=Fn}}catch(zr){}},Xt=K.useState(Ve),Qt=(0,N.Z)(Xt,2),an=Qt[0],In=Qt[1],Xr=K.useState(),Cn=(0,N.Z)(Xr,2),or=Cn[0],ei=Cn[1],mr=function(){In(ht)};Ne(function(){Rt&&mr()},[O,gt,Mt,Rt]),Ne(function(){if(an===ht)In(Pt);else if(an===Pt){var Jt=fe(je.current,!1,gt,Mt);In(Ve),ei(Jt)}else Ft()},[an]);var Fr=K.useRef(),ta=function(){He.cancel(Fr.current)},Qa=function(nn){an===Ve&&(qe==null||qe(nn),ne&&(ta(),Fr.current=He(function(){mr()})))};K.useEffect(function(){return ta},[]);var Bt=Rt?or:null,en=(0,H.Z)((0,H.Z)({},nt),Bt);return(an===ht||an===Pt)&&(en.overflowY="hidden",en.overflowX="hidden"),K.createElement(Oe.Z,{onResize:Qa,disabled:!(ne||qe)},K.createElement("textarea",(0,M.Z)({},we,{ref:je,style:en,className:F()(pe,dt,(0,U.Z)({},"".concat(pe,"-disabled"),xt)),disabled:xt,value:Ye,onChange:Ie})))}),ft=it,ze=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function Qe(X,Ke){return(0,C.Z)(X||"").slice(0,Ke).join("")}function Se(X,Ke,ot,pe){var xe=ot;return X?xe=Qe(ot,pe):(0,C.Z)(Ke||"").length<ot.length&&(0,C.Z)(ot||"").length>pe&&(xe=Ke),xe}var E=K.forwardRef(function(X,Ke){var ot,pe=X.defaultValue,xe=X.value,Ze=X.onFocus,O=X.onBlur,ne=X.onChange,qe=X.allowClear,dt=X.maxLength,nt=X.onCompositionStart,xt=X.onCompositionEnd,bt=X.suffix,wt=X.prefixCls,we=wt===void 0?"rc-textarea":wt,oe=X.classes,Fe=X.showCount,Ye=X.className,ie=X.style,Ie=X.disabled,je=X.hidden,Be=X.classNames,et=X.styles,gt=X.onResize,Mt=(0,I.Z)(X,ze),Rt=Me(pe,{value:xe,defaultValue:pe}),Ft=(0,N.Z)(Rt,2),Xt=Ft[0],Qt=Ft[1],an=(0,K.useRef)(null),In=K.useState(!1),Xr=(0,N.Z)(In,2),Cn=Xr[0],or=Xr[1],ei=K.useState(!1),mr=(0,N.Z)(ei,2),Fr=mr[0],ta=mr[1],Qa=K.useRef(),Bt=K.useRef(0),en=K.useState(null),Jt=(0,N.Z)(en,2),nn=Jt[0],sr=Jt[1],Pn=function(){var Nt;(Nt=an.current)===null||Nt===void 0||Nt.textArea.focus()};(0,K.useImperativeHandle)(Ke,function(){return{resizableTextArea:an.current,focus:Pn,blur:function(){var Nt;(Nt=an.current)===null||Nt===void 0||Nt.textArea.blur()}}}),(0,K.useEffect)(function(){or(function($t){return!Ie&&$t})},[Ie]);var Fn=Number(dt)>0,zr=function(Nt){ta(!0),Qa.current=Xt,Bt.current=Nt.currentTarget.selectionStart,nt==null||nt(Nt)},$r=function(Nt){ta(!1);var Ot=Nt.currentTarget.value;if(Fn){var Wt,dn=Bt.current>=dt+1||Bt.current===((Wt=Qa.current)===null||Wt===void 0?void 0:Wt.length);Ot=Se(dn,Qa.current,Ot,dt)}Ot!==Xt&&(Qt(Ot),(0,W.rJ)(Nt.currentTarget,Nt,ne,Ot)),xt==null||xt(Nt)},Ae=function(Nt){var Ot=Nt.target.value;if(!Fr&&Fn){var Wt=Nt.target.selectionStart>=dt+1||Nt.target.selectionStart===Ot.length||!Nt.target.selectionStart;Ot=Se(Wt,Xt,Ot,dt)}Qt(Ot),(0,W.rJ)(Nt.currentTarget,Nt,ne,Ot)},$=function(Nt){var Ot=Mt.onPressEnter,Wt=Mt.onKeyDown;Nt.key==="Enter"&&Ot&&Ot(Nt),Wt==null||Wt(Nt)},z=function(Nt){or(!0),Ze==null||Ze(Nt)},S=function(Nt){or(!1),O==null||O(Nt)},D=function(Nt){var Ot;Qt(""),Pn(),(0,W.rJ)((Ot=an.current)===null||Ot===void 0?void 0:Ot.textArea,Nt,ne)},J=(0,W.D7)(Xt);!Fr&&Fn&&xe==null&&(J=Qe(J,dt));var Le=bt,$e;if(Fe){var tt=(0,C.Z)(J).length;(0,Y.Z)(Fe)==="object"?$e=Fe.formatter({value:J,count:tt,maxLength:dt}):$e="".concat(tt).concat(Fn?" / ".concat(dt):""),Le=K.createElement(K.Fragment,null,Le,K.createElement("span",{className:F()("".concat(we,"-data-count"),Be==null?void 0:Be.count),style:et==null?void 0:et.count},$e))}var at=function(Nt){var Ot;gt==null||gt(Nt),(Ot=an.current)!==null&&Ot!==void 0&&Ot.textArea.style.height&&sr(!0)},Ct=!Mt.autoSize&&!Fe&&!qe,pt=K.createElement(P.BaseInput,{value:J,allowClear:qe,handleReset:D,suffix:Le,prefixCls:we,classes:{affixWrapper:F()(oe==null?void 0:oe.affixWrapper,(ot={},(0,U.Z)(ot,"".concat(we,"-show-count"),Fe),(0,U.Z)(ot,"".concat(we,"-textarea-allow-clear"),qe),ot))},disabled:Ie,focused:Cn,className:Ye,style:(0,H.Z)((0,H.Z)({},ie),nn&&!Ct?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof $e=="string"?$e:void 0}},hidden:je,inputElement:K.createElement(ft,(0,M.Z)({},Mt,{onKeyDown:$,onChange:Ae,onFocus:z,onBlur:S,onCompositionStart:zr,onCompositionEnd:$r,className:Be==null?void 0:Be.textarea,style:(0,H.Z)((0,H.Z)({},et==null?void 0:et.textarea),{},{resize:ie==null?void 0:ie.resize}),disabled:Ie,prefixCls:we,onResize:at,ref:an}))});return pt}),me=E,L=me},1337:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return A}});var M=k(1413),H=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
|
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
|
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
|
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
|
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
|
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
|
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
|
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
|
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
|
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
|
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
|
summary tabIndex target title type useMap value width wmode wrap`,U=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
|
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
|
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
|
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
|
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
|
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
|
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,Y="".concat(H," ").concat(U).split(/[\s\n]+/),N="aria-",I="data-";function C(F,P){return F.indexOf(P)===0}function A(F){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,W;P===!1?W={aria:!0,data:!0,attr:!0}:P===!0?W={aria:!0}:W=(0,M.Z)({},P);var K={};return Object.keys(F).forEach(function(ge){(W.aria&&(ge==="role"||C(ge,N))||W.data&&C(ge,I)||W.attr&&Y.includes(ge))&&(K[ge]=F[ge])}),K}},89558:function(ke,ve,k){"use strict";k.d(ve,{Ae:function(){return ye},CF:function(){return nt},vC:function(){return O},x1:function(){return I}});function M(we,oe,Fe,Ye,ie,Ie){const je=we,Be=oe,et=Fe-je,gt=Ye-Be;let Mt=ie-je,Rt=Ie-Be,Ft=Mt*et+Rt*gt,Xt=0;Ft<=0?Xt=0:(Mt=et-Mt,Rt=gt-Rt,Ft=Mt*et+Rt*gt,Ft<=0?Xt=0:Xt=Ft*Ft/(et*et+gt*gt));const Qt=Mt*Mt+Rt*Rt-Xt;return Qt<0?0:Qt}function H(we,oe,Fe,Ye){return(we-Fe)*(we-Fe)+(oe-Ye)*(oe-Ye)}function U(we,oe,Fe,Ye,ie){return H(we,oe,Fe,Ye)<ie*ie}function Y(we){if(!Number.isFinite(we))return Fe=>Fe;if(we===0)return Math.round;const oe=Math.pow(10,we);return Fe=>Math.round(Fe*oe)/oe}function N(we){const oe=Math.min(we.x1,we.x2),Fe=Math.max(we.x1,we.x2),Ye=Math.min(we.y1,we.y2),ie=Math.max(we.y1,we.y2);return{x:oe,y:Ye,x2:Fe,y2:ie,width:Fe-oe,height:ie-Ye}}class I{constructor(oe,Fe,Ye,ie){this.x1=oe,this.y1=Fe,this.x2=Ye,this.y2=ie}equals(oe){return this.x1===oe.x1&&this.y1===oe.y1&&this.x2===oe.x2&&this.y2===oe.y2}draw(oe){oe.moveTo(this.x1,this.y1),oe.lineTo(this.x2,this.y2)}toString(){return`Line(from=(${this.x1},${this.y1}),to=(${this.x2},${this.y2}))`}static from(oe){return new I(oe.x1,oe.y1,oe.x2,oe.y2)}cuts(oe,Fe){if(this.y1===this.y2||Fe<this.y1&&Fe<=this.y2||Fe>this.y1&&Fe>=this.y2||oe>this.x1&&oe>=this.x2)return!1;if(oe<this.x1&&oe<=this.x2)return!0;const Ye=this.x1+(Fe-this.y1)*(this.x2-this.x1)/(this.y2-this.y1);return oe<=Ye}distSquare(oe,Fe){return M(this.x1,this.y1,this.x2,this.y2,oe,Fe)}ptClose(oe,Fe,Ye){if(this.x1<this.x2){if(oe<this.x1-Ye||oe>this.x2+Ye)return!1}else if(oe<this.x2-Ye||oe>this.x1+Ye)return!1;if(this.y1<this.y2){if(Fe<this.y1-Ye||Fe>this.y2+Ye)return!1}else if(Fe<this.y2-Ye||Fe>this.y1+Ye)return!1;return!0}}var C;(function(we){we[we.POINT=1]="POINT",we[we.PARALLEL=2]="PARALLEL",we[we.COINCIDENT=3]="COINCIDENT",we[we.NONE=4]="NONE"})(C||(C={}));class A{constructor(oe,Fe=0,Ye=0){this.state=oe,this.x=Fe,this.y=Ye}}function F(we,oe){const Fe=(oe.x2-oe.x1)*(we.y1-oe.y1)-(oe.y2-oe.y1)*(we.x1-oe.x1),Ye=(we.x2-we.x1)*(we.y1-oe.y1)-(we.y2-we.y1)*(we.x1-oe.x1),ie=(oe.y2-oe.y1)*(we.x2-we.x1)-(oe.x2-oe.x1)*(we.y2-we.y1);if(ie){const Ie=Fe/ie,je=Ye/ie;return 0<=Ie&&Ie<=1&&0<=je&&je<=1?new A(C.POINT,we.x1+Ie*(we.x2-we.x1),we.y1+Ie*(we.y2-we.y1)):new A(C.NONE)}return new A(Fe===0||Ye===0?C.COINCIDENT:C.PARALLEL)}function P(we,oe){const Fe=(oe.x2-oe.x1)*(we.y1-oe.y1)-(oe.y2-oe.y1)*(we.x1-oe.x1),Ye=(we.x2-we.x1)*(we.y1-oe.y1)-(we.y2-we.y1)*(we.x1-oe.x1),ie=(oe.y2-oe.y1)*(we.x2-we.x1)-(oe.x2-oe.x1)*(we.y2-we.y1);if(ie){const Ie=Fe/ie,je=Ye/ie;if(0<=Ie&&Ie<=1&&0<=je&&je<=1)return Ie}return Number.POSITIVE_INFINITY}function W(we,oe){function Fe(ie,Ie,je,Be){let et=P(oe,new I(ie,Ie,je,Be));return et=Math.abs(et-.5),et>=0&&et<=1?1:0}let Ye=Fe(we.x,we.y,we.x2,we.y);return Ye+=Fe(we.x,we.y,we.x,we.y2),Ye>1||(Ye+=Fe(we.x,we.y2,we.x2,we.y2),Ye>1)?!0:(Ye+=Fe(we.x2,we.y,we.x2,we.y2),Ye>0)}var K;(function(we){we[we.LEFT=0]="LEFT",we[we.TOP=1]="TOP",we[we.RIGHT=2]="RIGHT",we[we.BOTTOM=3]="BOTTOM"})(K||(K={}));function ge(we,oe,Fe){const Ye=new Set;return we.width<=0?(Ye.add(K.LEFT),Ye.add(K.RIGHT)):oe<we.x?Ye.add(K.LEFT):oe>we.x+we.width&&Ye.add(K.RIGHT),we.height<=0?(Ye.add(K.TOP),Ye.add(K.BOTTOM)):Fe<we.y?Ye.add(K.TOP):Fe>we.y+we.height&&Ye.add(K.BOTTOM),Ye}function be(we,oe){let Fe=oe.x1,Ye=oe.y1;const ie=oe.x2,Ie=oe.y2,je=Array.from(ge(we,ie,Ie));if(je.length===0)return!0;let Be=ge(we,Fe,Ye);for(;Be.size!==0;){for(const et of je)if(Be.has(et))return!1;if(Be.has(K.RIGHT)||Be.has(K.LEFT)){let et=we.x;Be.has(K.RIGHT)&&(et+=we.width),Ye=Ye+(et-Fe)*(Ie-Ye)/(ie-Fe),Fe=et}else{let et=we.y;Be.has(K.BOTTOM)&&(et+=we.height),Fe=Fe+(et-Ye)*(ie-Fe)/(Ie-Ye),Ye=et}Be=ge(we,Fe,Ye)}return!0}function Ue(we,oe){let Fe=Number.POSITIVE_INFINITY,Ye=0;function ie(Ie,je,Be,et){let gt=P(oe,new I(Ie,je,Be,et));gt=Math.abs(gt-.5),gt>=0&><=1&&(Ye++,gt<Fe&&(Fe=gt))}return ie(we.x,we.y,we.x2,we.y),ie(we.x,we.y,we.x,we.y2),Ye>1||(ie(we.x,we.y2,we.x2,we.y2),Ye>1)?Fe:(ie(we.x2,we.y,we.x2,we.y2),Ye===0?-1:Fe)}function Ne(we,oe){let Fe=0;const Ye=F(we,new I(oe.x,oe.y,oe.x2,oe.y));Fe+=Ye.state===C.POINT?1:0;const ie=F(we,new I(oe.x,oe.y,oe.x,oe.y2));Fe+=ie.state===C.POINT?1:0;const Ie=F(we,new I(oe.x,oe.y2,oe.x2,oe.y2));Fe+=Ie.state===C.POINT?1:0;const je=F(we,new I(oe.x2,oe.y,oe.x2,oe.y2));return Fe+=je.state===C.POINT?1:0,{top:Ye,left:ie,bottom:Ie,right:je,count:Fe}}class ye{constructor(oe,Fe,Ye,ie){this.x=oe,this.y=Fe,this.width=Ye,this.height=ie}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(oe){return new ye(oe.x,oe.y,oe.width,oe.height)}equals(oe){return this.x===oe.x&&this.y===oe.y&&this.width===oe.width&&this.height===oe.height}clone(){return new ye(this.x,this.y,this.width,this.height)}add(oe){const Fe=Math.min(this.x,oe.x),Ye=Math.min(this.y,oe.y),ie=Math.max(this.x2,oe.x+oe.width),Ie=Math.max(this.y2,oe.y+oe.height);this.x=Fe,this.y=Ye,this.width=ie-Fe,this.height=Ie-Ye}addPoint(oe){const Fe=Math.min(this.x,oe.x),Ye=Math.min(this.y,oe.y),ie=Math.max(this.x2,oe.x),Ie=Math.max(this.y2,oe.y);this.x=Fe,this.y=Ye,this.width=ie-Fe,this.height=Ie-Ye}toString(){return`Rectangle[x=${this.x}, y=${this.y}, w=${this.width}, h=${this.height}]`}draw(oe){oe.rect(this.x,this.y,this.width,this.height)}containsPt(oe,Fe){return oe>=this.x&&oe<=this.x2&&Fe>=this.y&&Fe<=this.y2}get area(){return this.width*this.height}intersects(oe){return this.area<=0||oe.width<=0||oe.height<=0?!1:oe.x+oe.width>this.x&&oe.y+oe.height>this.y&&oe.x<this.x2&&oe.y<this.y2}distSquare(oe,Fe){if(this.containsPt(oe,Fe))return 0;const Ye=ge(this,oe,Fe);return Ye.has(K.TOP)?Ye.has(K.LEFT)?H(oe,Fe,this.x,this.y):Ye.has(K.RIGHT)?H(oe,Fe,this.x2,this.y):(this.y-Fe)*(this.y-Fe):Ye.has(K.BOTTOM)?Ye.has(K.LEFT)?H(oe,Fe,this.x,this.y2):Ye.has(K.RIGHT)?H(oe,Fe,this.x2,this.y2):(Fe-this.y2)*(Fe-this.y2):Ye.has(K.LEFT)?(this.x-oe)*(this.x-oe):Ye.has(K.RIGHT)?(oe-this.x2)*(oe-this.x2):0}}function De(we){if(we.length===0)return null;const oe=we[0],Fe=new ye(oe.x,oe.y,0,0);for(const Ye of we)Fe.addPoint(Ye);return Fe}class Ce{constructor(oe,Fe,Ye){this.cx=oe,this.cy=Fe,this.radius=Ye}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(oe){return new Ce(oe.cx,oe.cy,oe.radius)}containsPt(oe,Fe){return H(this.cx,this.cy,oe,Fe)<this.radius*this.radius}distSquare(oe,Fe){const Ye=H(this.cx,this.cy,oe,Fe);if(Ye<this.radius*this.radius)return 0;const ie=Math.sqrt(Ye)-this.radius;return ie*ie}draw(oe){oe.ellipse(this.cx,this.cy,this.radius,this.radius,0,0,Math.PI*2)}}class Me{constructor(oe,Fe=0,Ye=0,ie=0,Ie=0,je=10,Be=10,et=new Float32Array(Math.max(0,je*Be)).fill(0)){this.pixelGroup=oe,this.i=Fe,this.j=Ye,this.pixelX=ie,this.pixelY=Ie,this.width=je,this.height=Be,this.area=et}createSub(oe,Fe){return new Me(this.pixelGroup,oe.x,oe.y,Fe.x,Fe.y,oe.width,oe.height)}static fromPixelRegion(oe,Fe){return new Me(Fe,0,0,oe.x,oe.y,Math.ceil(oe.width/Fe),Math.ceil(oe.height/Fe))}copy(oe,Fe){return new Me(this.pixelGroup,this.scaleX(Fe.x),this.scaleY(Fe.y),Fe.x,Fe.y,oe.width,oe.height,oe.area)}boundX(oe){return oe<this.i?this.i:oe>=this.width?this.width-1:oe}boundY(oe){return oe<this.j?this.j:oe>=this.height?this.height-1:oe}scaleX(oe){return this.boundX(Math.floor((oe-this.pixelX)/this.pixelGroup))}scaleY(oe){return this.boundY(Math.floor((oe-this.pixelY)/this.pixelGroup))}scale(oe){const Fe=this.scaleX(oe.x),Ye=this.scaleY(oe.y),ie=this.boundX(Math.ceil((oe.x+oe.width-this.pixelX)/this.pixelGroup)),Ie=this.boundY(Math.ceil((oe.y+oe.height-this.pixelY)/this.pixelGroup)),je=ie-Fe,Be=Ie-Ye;return new ye(Fe,Ye,je,Be)}invertScaleX(oe){return Math.round(oe*this.pixelGroup+this.pixelX)}invertScaleY(oe){return Math.round(oe*this.pixelGroup+this.pixelY)}addPadding(oe,Fe){const Ye=Math.ceil(Fe/this.pixelGroup),ie=this.boundX(oe.x-Ye),Ie=this.boundY(oe.y-Ye),je=this.boundX(oe.x2+Ye),Be=this.boundY(oe.y2+Ye),et=je-ie,gt=Be-Ie;return new ye(ie,Ie,et,gt)}get(oe,Fe){return oe<0||Fe<0||oe>=this.width||Fe>=this.height?Number.NaN:this.area[oe+Fe*this.width]}inc(oe,Fe,Ye){oe<0||Fe<0||oe>=this.width||Fe>=this.height||(this.area[oe+Fe*this.width]+=Ye)}set(oe,Fe,Ye){oe<0||Fe<0||oe>=this.width||Fe>=this.height||(this.area[oe+Fe*this.width]=Ye)}incArea(oe,Fe){if(oe.width<=0||oe.height<=0||Fe===0)return;const Ye=this.width,ie=oe.width,Ie=Math.max(0,oe.i),je=Math.max(0,oe.j),Be=Math.min(oe.i+oe.width,Ye),et=Math.min(oe.j+oe.height,this.height);if(!(et<=0||Be<=0||Ie>=Ye||et>=this.height))for(let gt=je;gt<et;gt++){const Mt=(gt-oe.j)*ie,Rt=gt*Ye;for(let Ft=Ie;Ft<Be;Ft++){const Xt=oe.area[Ft-oe.i+Mt];Xt!==0&&(this.area[Ft+Rt]+=Fe*Xt)}}}fill(oe){this.area.fill(oe)}fillArea(oe,Fe){const Ye=oe.x+oe.y*this.width;for(let ie=0;ie<oe.height;ie++){const Ie=Ye+ie*this.width;this.area.fill(Fe,Ie,Ie+oe.width)}}fillHorizontalLine(oe,Fe,Ye,ie){const Ie=oe+Fe*this.width;this.area.fill(ie,Ie,Ie+Ye)}fillVerticalLine(oe,Fe,Ye,ie){const Ie=oe+Fe*this.width;for(let je=0;je<Ye;je++)this.area[Ie+je*this.width]=ie}clear(){this.area.fill(0)}toString(){let oe="";for(let Fe=0;Fe<this.height;Fe++){const Ye=Fe*this.width;for(let ie=0;ie<this.width;ie++){const Ie=this.area[Ye+ie];oe+=Ie.toFixed(1).padStart(6),oe+=" "}oe+=`
|
|
|
`}return oe}draw(oe,Fe=!0){if(this.width<=0||this.height<=0)return;oe.save(),Fe&&oe.translate(this.pixelX,this.pixelY);const Ye=this.area.reduce((je,Be)=>Math.min(je,Be),Number.POSITIVE_INFINITY),ie=this.area.reduce((je,Be)=>Math.max(je,Be),Number.NEGATIVE_INFINITY),Ie=je=>(je-Ye)/(ie-Ye);oe.scale(this.pixelGroup,this.pixelGroup);for(let je=0;je<this.width;je++)for(let Be=0;Be<this.height;Be++){const et=this.area[je+Be*this.width];oe.fillStyle=`rgba(0, 0, 0, ${Ie(et)})`,oe.fillRect(je,Be,1,1)}oe.restore()}drawThreshold(oe,Fe,Ye=!0){if(!(this.width<=0||this.height<=0)){oe.save(),Ye&&oe.translate(this.pixelX,this.pixelY),oe.scale(this.pixelGroup,this.pixelGroup);for(let ie=0;ie<this.width;ie++)for(let Ie=0;Ie<this.height;Ie++){const je=this.area[ie+Ie*this.width];oe.fillStyle=je>Fe?"black":"white",oe.fillRect(ie,Ie,1,1)}oe.restore()}}}function Oe(we,oe){const Fe=Ye=>({x:Ye.x-oe,y:Ye.y-oe,width:Ye.width+2*oe,height:Ye.height+2*oe});return Array.isArray(we)?we.map(Fe):Fe(we)}function re(we,oe,Fe){return q(Object.assign(N(we),{distSquare:(Ye,ie)=>M(we.x1,we.y1,we.x2,we.y2,Ye,ie)}),oe,Fe)}function q(we,oe,Fe){const Ye=Oe(we,Fe),ie=oe.scale(Ye),Ie=oe.createSub(ie,Ye);return ce(Ie,oe,Fe,(je,Be)=>we.distSquare(je,Be)),Ie}function ce(we,oe,Fe,Ye){const ie=Fe*Fe;for(let Ie=0;Ie<we.height;Ie++)for(let je=0;je<we.width;je++){const Be=oe.invertScaleX(we.i+je),et=oe.invertScaleY(we.j+Ie),gt=Ye(Be,et);if(gt===0){we.set(je,Ie,ie);continue}if(gt<ie){const Mt=Fe-Math.sqrt(gt);we.set(je,Ie,Mt*Mt)}}return we}function Ee(we,oe,Fe){const Ye=oe.scale(we),ie=oe.addPadding(Ye,Fe),Ie=oe.createSub(ie,{x:we.x-Fe,y:we.y-Fe}),je=Ye.x-ie.x,Be=Ye.y-ie.y,et=ie.x2-Ye.x2,gt=ie.y2-Ye.y2,Mt=ie.width-je-et,Rt=ie.height-Be-gt,Ft=Fe*Fe;Ie.fillArea({x:je,y:Be,width:Mt+1,height:Rt+1},Ft);const Xt=[0],Qt=Math.max(Be,je,et,gt);{const Cn=oe.invertScaleX(Ye.x+Ye.width/2);for(let or=1;or<Qt;or++){const ei=oe.invertScaleY(Ye.y-or),mr=we.distSquare(Cn,ei);if(mr<Ft){const Fr=Fe-Math.sqrt(mr);Xt.push(Fr*Fr)}else break}}const an=[],In=Math.max(je,et),Xr=Math.max(Be,et);for(let Cn=1;Cn<In;Cn++){const or=oe.invertScaleX(Ye.x-Cn),ei=[];for(let mr=1;mr<Xr;mr++){const Fr=oe.invertScaleY(Ye.y-mr),ta=we.distSquare(or,Fr);if(ta<Ft){const Qa=Fe-Math.sqrt(ta);ei.push(Qa*Qa)}else ei.push(0)}an.push(ei)}for(let Cn=1;Cn<Math.min(Be,Xt.length);Cn++){const or=Xt[Cn];Ie.fillHorizontalLine(je,Be-Cn,Mt+1,or)}for(let Cn=1;Cn<Math.min(gt,Xt.length);Cn++){const or=Xt[Cn];Ie.fillHorizontalLine(je,Be+Rt+Cn,Mt+1,or)}for(let Cn=1;Cn<Math.min(je,Xt.length);Cn++){const or=Xt[Cn];Ie.fillVerticalLine(je-Cn,Be,Rt+1,or)}for(let Cn=1;Cn<Math.min(gt,Xt.length);Cn++){const or=Xt[Cn];Ie.fillVerticalLine(je+Mt+Cn,Be,Rt+1,or)}for(let Cn=1;Cn<je;Cn++){const or=an[Cn-1],ei=je-Cn;for(let mr=1;mr<Be;mr++)Ie.set(ei,Be-mr,or[mr-1]);for(let mr=1;mr<gt;mr++)Ie.set(ei,Be+Rt+mr,or[mr-1])}for(let Cn=1;Cn<et;Cn++){const or=an[Cn-1],ei=je+Mt+Cn;for(let mr=1;mr<Be;mr++)Ie.set(ei,Be-mr,or[mr-1]);for(let mr=1;mr<gt;mr++)Ie.set(ei,Be+Rt+mr,or[mr-1])}return Ie}function Te(we,oe,Fe,Ye){return{x:we,y:oe,width:Fe,height:Ye}}function Je(we,oe,Fe){return{cx:we,cy:oe,radius:Fe}}function He(we,oe,Fe,Ye){return{x1:we,y1:oe,x2:Fe,y2:Ye}}function rt(we,oe){return{x:we,y:oe}}function Et(we,oe,Fe,Ye){if(we.length===0)return[];const ie=We(we);return ie.map((Ie,je)=>{const Be=ie.slice(0,je);return lt(oe,Ie,Be,Fe,Ye)}).flat()}function lt(we,oe,Fe,Ye,ie){const Ie=rt(oe.cx,oe.cy),je=fe(Ie,Fe,we);if(je==null)return[];const Be=new I(Ie.x,Ie.y,je.cx,je.cy),et=st(Be,we,Ye,ie);return mt(et,we)}function st(we,oe,Fe,Ye){const ie=[],Ie=[];Ie.push(we);let je=!0;for(let Be=0;Be<Fe&&je;Be++)for(je=!1;!je&&Ie.length>0;){const et=Ie.pop(),gt=Ve(oe,et),Mt=gt?Ne(et,gt):null;if(!gt||!Mt||Mt.count!==2){je||ie.push(et);continue}let Rt=Ye,Ft=ft(gt,Rt,Mt,!0),Xt=Pt(Ft,Ie)||Pt(Ft,ie),Qt=ht(Ft,oe);for(;!Xt&&Qt&&Rt>=1;)Rt/=1.5,Ft=ft(gt,Rt,Mt,!0),Xt=Pt(Ft,Ie)||Pt(Ft,ie),Qt=ht(Ft,oe);if(Ft&&!Xt&&!Qt&&(Ie.push(new I(et.x1,et.y1,Ft.x,Ft.y)),Ie.push(new I(Ft.x,Ft.y,et.x2,et.y2)),je=!0),je)continue;Rt=Ye,Ft=ft(gt,Rt,Mt,!1);let an=Pt(Ft,Ie)||Pt(Ft,ie);for(Qt=ht(Ft,oe);!an&&Qt&&Rt>=1;)Rt/=1.5,Ft=ft(gt,Rt,Mt,!1),an=Pt(Ft,Ie)||Pt(Ft,ie),Qt=ht(Ft,oe);Ft&&!an&&(Ie.push(new I(et.x1,et.y1,Ft.x,Ft.y)),Ie.push(new I(Ft.x,Ft.y,et.x2,et.y2)),je=!0),je||ie.push(et)}for(;Ie.length>0;)ie.push(Ie.pop());return ie}function mt(we,oe){const Fe=[];for(;we.length>0;){const Ye=we.pop();if(we.length===0){Fe.push(Ye);break}const ie=we.pop(),Ie=new I(Ye.x1,Ye.y1,ie.x2,ie.y2);Ve(oe,Ie)?(Fe.push(Ye),we.push(ie)):we.push(Ie)}return Fe}function fe(we,oe,Fe){let Ye=Number.POSITIVE_INFINITY;return oe.reduce((ie,Ie)=>{const je=H(we.x,we.y,Ie.cx,Ie.cy);if(je>Ye)return ie;const Be=new I(we.x,we.y,Ie.cx,Ie.cy),et=it(Fe,Be);return je*(et+1)*(et+1)<Ye&&(ie=Ie,Ye=je*(et+1)*(et+1)),ie},null)}function We(we){if(we.length<2)return we;let oe=0,Fe=0;return we.forEach(Ye=>{oe+=Ye.cx,Fe+=Ye.cy}),oe/=we.length,Fe/=we.length,we.map(Ye=>{const ie=oe-Ye.cx,Ie=Fe-Ye.cy,je=ie*ie+Ie*Ie;return[Ye,je]}).sort((Ye,ie)=>Ye[1]-ie[1]).map(Ye=>Ye[0])}function ht(we,oe){return oe.some(Fe=>Fe.containsPt(we.x,we.y))}function Pt(we,oe){return oe.some(Fe=>!!(U(Fe.x1,Fe.y1,we.x,we.y,.001)||U(Fe.x2,Fe.y2,we.x,we.y,.001)))}function Ve(we,oe){let Fe=Number.POSITIVE_INFINITY,Ye=null;for(const ie of we){if(!be(ie,oe))continue;const Ie=Ue(ie,oe);Ie>=0&&Ie<Fe&&(Ye=ie,Fe=Ie)}return Ye}function it(we,oe){return we.reduce((Fe,Ye)=>be(Ye,oe)&&W(Ye,oe)?Fe+1:Fe,0)}function ft(we,oe,Fe,Ye){const ie=Fe.top,Ie=Fe.left,je=Fe.bottom,Be=Fe.right;if(Ye){if(Ie.state===C.POINT){if(ie.state===C.POINT)return rt(we.x-oe,we.y-oe);if(je.state===C.POINT)return rt(we.x-oe,we.y2+oe);const Ft=we.width*we.height;return we.width*((Ie.y-we.y+(Be.y-we.y))*.5)<Ft*.5?Ie.y>Be.y?rt(we.x-oe,we.y-oe):rt(we.x2+oe,we.y-oe):Ie.y<Be.y?rt(we.x-oe,we.y2+oe):rt(we.x2+oe,we.y2+oe)}if(Be.state===C.POINT){if(ie.state===C.POINT)return rt(we.x2+oe,we.y-oe);if(je.state===C.POINT)return rt(we.x2+oe,we.y2+oe)}const Mt=we.height*we.width;return we.height*((ie.x-we.x+(Be.x-we.x))*.5)<Mt*.5?ie.x>je.x?rt(we.x-oe,we.y-oe):rt(we.x-oe,we.y2+oe):ie.x<je.x?rt(we.x2+oe,we.y-oe):rt(we.x2+oe,we.y2+oe)}if(Ie.state===C.POINT){if(ie.state===C.POINT)return rt(we.x2+oe,we.y2+oe);if(je.state===C.POINT)return rt(we.x2+oe,we.y-oe);const Mt=we.height*we.width;return we.width*((Ie.y-we.y+(Be.y-we.y))*.5)<Mt*.5?Ie.y>Be.y?rt(we.x2+oe,we.y2+oe):rt(we.x-oe,we.y2+oe):Ie.y<Be.y?rt(we.x2+oe,we.y-oe):rt(we.x-oe,we.y-oe)}if(Be.state===C.POINT){if(ie.state===C.POINT)return rt(we.x-oe,we.y2+oe);if(je.state===C.POINT)return rt(we.x-oe,we.y-oe)}const et=we.height*we.width;return we.height*((ie.x-we.x+(Be.x-we.x))*.5)<et*.5?ie.x>je.x?rt(we.x2+oe,we.y2+oe):rt(we.x2+oe,we.y-oe):ie.x<je.x?rt(we.x-oe,we.y2+oe):rt(we.x-oe,we.y-oe)}function ze(we,oe,Fe,Ye){if(!(we.closed?Fe<we.length:Fe<we.length-1))return!1;const Ie=we.get(oe),je=we.get(Fe+1);for(let Be=oe+1;Be<=Fe;Be++){const et=we.get(Be);if(M(Ie.x,Ie.y,je.x,je.y,et.x,et.y)>Ye)return!1}return!0}function Qe(we=0){return oe=>{if(we<0||oe.length<3)return oe;const Fe=[];let Ye=0;const ie=we*we;for(;Ye<oe.length;){let Ie=Ye+1;for(;ze(oe,Ye,Ie,ie);)Ie++;Fe.push(oe.get(Ye)),Ye=Ie}return new L(Fe)}}function Se(we,oe){switch(we){case-2:return(((-oe+3)*oe-3)*oe+1)/6;case-1:return((3*oe-6)*oe*oe+4)/6;case 0:return(((-3*oe+3)*oe+3)*oe+1)/6;case 1:return oe*oe*oe/6;default:throw new Error("unknown error")}}function E(we=6){function Ie(je,Be,et){let gt=0,Mt=0;for(let Rt=-2;Rt<=1;Rt++){const Ft=je.get(Be+Rt),Xt=Se(Rt,et);gt+=Xt*Ft.x,Mt+=Xt*Ft.y}return{x:gt,y:Mt}}return je=>{if(je.length<3)return je;const Be=[],et=je.closed,gt=je.length+3-1+(et?0:2);Be.push(Ie(je,2-(et?0:2),0));for(let Mt=2-(et?0:2);Mt<gt;Mt++)for(let Rt=1;Rt<=we;Rt++)Be.push(Ie(je,Mt,Rt/we));return new L(Be)}}function me(we=8){return oe=>{let Fe=we,Ye=oe.length;if(Fe>1)for(Ye=Math.floor(oe.length/Fe);Ye<3&&Fe>1;)Fe-=1,Ye=Math.floor(oe.length/Fe);const ie=[];for(let Ie=0,je=0;je<Ye;je++,Ie+=Fe)ie.push(oe.get(Ie));return new L(ie)}}class L{constructor(oe=[],Fe=!0){this.points=oe,this.closed=Fe}get(oe){const Fe=oe,Ye=this.points.length;return oe<0?this.closed?this.get(oe+Ye):this.points[0]:oe>=Ye?this.closed?this.get(oe-Ye):this.points[Ye-1]:this.points[Fe]}get length(){return this.points.length}toString(oe=1/0){const Fe=this.points;if(Fe.length===0)return"";const Ye=typeof oe=="function"?oe:Y(oe);let ie="M";for(const Ie of Fe)ie+=`${Ye(Ie.x)},${Ye(Ie.y)} L`;return ie=ie.slice(0,-1),this.closed&&(ie+=" Z"),ie}draw(oe){const Fe=this.points;if(Fe.length!==0){oe.beginPath(),oe.moveTo(Fe[0].x,Fe[0].y);for(const Ye of Fe)oe.lineTo(Ye.x,Ye.y);this.closed&&oe.closePath()}}sample(oe){return me(oe)(this)}simplify(oe){return Qe(oe)(this)}bSplines(oe){return E(oe)(this)}apply(oe){return oe(this)}containsElements(oe){const Fe=De(this.points);return Fe?oe.every(Ye=>Fe.containsPt(Ye.cx,Ye.cy)&&this.withinArea(Ye.cx,Ye.cy)):!1}withinArea(oe,Fe){if(this.length===0)return!1;let Ye=0;const ie=this.points[0],Ie=new I(ie.x,ie.y,ie.x,ie.y);for(let je=1;je<this.points.length;je++){const Be=this.points[je];Ie.x1=Ie.x2,Ie.y1=Ie.y2,Ie.x2=Be.x,Ie.y2=Be.y,Ie.cuts(oe,Fe)&&Ye++}return Ie.x1=Ie.x2,Ie.y1=Ie.y2,Ie.x2=ie.x,Ie.y2=ie.y,Ie.cuts(oe,Fe)&&Ye++,Ye%2===1}}class X{constructor(oe=0){this.count=0,this.arr=[],this.set=new Set,this.arr.length=oe}add(oe){this.set.add(`${oe.x}x${oe.y}`),this.arr[this.count++]=oe}contains(oe){return this.set.has(`${oe.x}x${oe.y}`)}isFirst(oe){if(this.count===0)return!1;const Fe=this.arr[0];return Fe!=null&&Fe.x===oe.x&&Fe.y===oe.y}path(){return new L(this.arr.slice(0,this.count))}clear(){this.set.clear(),this.count=0}get(oe){return this.arr[oe]}get length(){return this.count}}const Ke=0,ot=1,pe=2,xe=3;function Ze(we,oe){const Fe=(Math.floor(we.width)+Math.floor(we.height))*2,Ye=new X(Fe);function ie(et,gt,Mt,Rt){const Ft=we.get(et,gt);return Number.isNaN(Ft)?Number.NaN:Ft>oe?Mt+Rt:Mt}function Ie(et,gt){let Mt=Ke;return Mt=ie(et,gt,Mt,1),Mt=ie(et+1,gt,Mt,2),Mt=ie(et,gt+1,Mt,4),Mt=ie(et+1,gt+1,Mt,8),Number.isNaN(Mt)?-1:Mt}let je=ot;function Be(et,gt){let Mt=et,Rt=gt,Ft=we.invertScaleX(Mt),Xt=we.invertScaleY(Rt);for(let Qt=0;Qt<we.width*we.height;Qt++){const an={x:Ft,y:Xt};if(Ye.contains(an)){if(Ye.isFirst(an))return!0}else Ye.add(an);const In=Ie(Mt,Rt);switch(In){case-1:return!0;case 0:case 3:case 2:case 7:je=pe;break;case 12:case 14:case 4:je=xe;break;case 6:je=je===Ke?xe:pe;break;case 1:case 13:case 5:je=Ke;break;case 9:je=je===pe?Ke:ot;break;case 10:case 8:case 11:je=ot;break;default:return console.warn("Marching squares invalid state: "+In),!0}switch(je){case Ke:Rt--,Xt-=we.pixelGroup;break;case ot:Rt++,Xt+=we.pixelGroup;break;case xe:Mt--,Ft-=we.pixelGroup;break;case pe:Mt++,Ft+=we.pixelGroup;break;default:return console.warn("Marching squares invalid state: "+In),!0}}return!0}for(let et=0;et<we.width;et++)for(let gt=0;gt<we.height;gt++){if(we.get(et,gt)<=oe)continue;const Mt=Ie(et,gt);if(!(Mt<0||Mt===15)&&Be(et,gt))return Ye.path()}return null}const O={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 ne(we){return we!=null&&typeof we.radius=="number"}function qe(we,oe){if(ne(we)!==ne(oe))return!1;if(ne(we)){const Ye=oe;return we.cx===Ye.cx&&we.cy===Ye.cy&&we.radius===Ye.radius}const Fe=oe;return we.x===Fe.x&&we.y===Fe.y&&we.width===Fe.width&&we.height===Fe.height}var dt;(function(we){we[we.MEMBERS=0]="MEMBERS",we[we.NON_MEMBERS=1]="NON_MEMBERS",we[we.EDGES=2]="EDGES"})(dt||(dt={}));class nt{constructor(oe={}){this.dirty=new Set,this.members=[],this.nonMembers=[],this.virtualEdges=[],this.edges=[],this.activeRegion=new ye(0,0,0,0),this.potentialArea=new Me(1,0,0,0,0,0,0),this.o=Object.assign({},O,oe)}pushMember(...oe){if(oe.length!==0){this.dirty.add(dt.MEMBERS);for(const Fe of oe)this.members.push({raw:Fe,obj:ne(Fe)?Ce.from(Fe):ye.from(Fe),area:null})}}removeMember(oe){const Fe=this.members.findIndex(Ye=>qe(Ye.raw,oe));return Fe<0?!1:(this.members.splice(Fe,1),this.dirty.add(dt.MEMBERS),!0)}removeNonMember(oe){const Fe=this.nonMembers.findIndex(Ye=>qe(Ye.raw,oe));return Fe<0?!1:(this.nonMembers.splice(Fe,1),this.dirty.add(dt.NON_MEMBERS),!0)}removeEdge(oe){const Fe=this.edges.findIndex(Ye=>Ye.obj.equals(oe));return Fe<0?!1:(this.edges.splice(Fe,1),this.dirty.add(dt.NON_MEMBERS),!0)}pushNonMember(...oe){if(oe.length!==0){this.dirty.add(dt.NON_MEMBERS);for(const Fe of oe)this.nonMembers.push({raw:Fe,obj:ne(Fe)?Ce.from(Fe):ye.from(Fe),area:null})}}pushEdge(...oe){if(oe.length!==0){this.dirty.add(dt.EDGES);for(const Fe of oe)this.edges.push({raw:Fe,obj:I.from(Fe),area:null})}}update(){const oe=this.dirty.has(dt.MEMBERS),Fe=this.dirty.has(dt.NON_MEMBERS);let Ye=this.dirty.has(dt.EDGES);this.dirty.clear();const ie=this.members.map(gt=>gt.obj);if(this.o.virtualEdges&&(oe||Fe)){const gt=this.nonMembers.map(Ft=>Ft.obj),Mt=Et(ie,gt,this.o.maxRoutingIterations,this.o.morphBuffer),Rt=new Map(this.virtualEdges.map(Ft=>[Ft.obj.toString(),Ft.area]));this.virtualEdges=Mt.map(Ft=>{var Xt;return{raw:Ft,obj:Ft,area:(Xt=Rt.get(Ft.toString()))!==null&&Xt!==void 0?Xt:null}}),Ye=!0}let Ie=!1;if(oe||Ye){const gt=this.virtualEdges.concat(this.edges).map(Xt=>Xt.obj),Mt=bt(ie,gt),Rt=Math.max(this.o.edgeR1,this.o.nodeR1)+this.o.morphBuffer,Ft=ye.from(Oe(Mt,Rt));Ft.equals(this.activeRegion)||(Ie=!0,this.activeRegion=Ft)}if(Ie){const gt=Math.ceil(this.activeRegion.width/this.o.pixelGroup),Mt=Math.ceil(this.activeRegion.height/this.o.pixelGroup);this.activeRegion.x!==this.potentialArea.pixelX||this.activeRegion.y!==this.potentialArea.pixelY?(this.potentialArea=Me.fromPixelRegion(this.activeRegion,this.o.pixelGroup),this.members.forEach(Rt=>Rt.area=null),this.nonMembers.forEach(Rt=>Rt.area=null),this.edges.forEach(Rt=>Rt.area=null),this.virtualEdges.forEach(Rt=>Rt.area=null)):(gt!==this.potentialArea.width||Mt!==this.potentialArea.height)&&(this.potentialArea=Me.fromPixelRegion(this.activeRegion,this.o.pixelGroup))}const je=new Map,Be=gt=>{if(gt.area){const Mt=`${gt.obj.width}x${gt.obj.height}x${gt.obj instanceof ye?"R":"C"}`;je.set(Mt,gt.area)}},et=gt=>{if(gt.area)return;const Mt=`${gt.obj.width}x${gt.obj.height}x${gt.obj instanceof ye?"R":"C"}`;if(je.has(Mt)){const Ft=je.get(Mt);gt.area=this.potentialArea.copy(Ft,{x:gt.obj.x-this.o.nodeR1,y:gt.obj.y-this.o.nodeR1});return}const Rt=gt.obj instanceof ye?Ee(gt.obj,this.potentialArea,this.o.nodeR1):q(gt.obj,this.potentialArea,this.o.nodeR1);gt.area=Rt,je.set(Mt,Rt)};this.members.forEach(Be),this.nonMembers.forEach(Be),this.members.forEach(et),this.nonMembers.forEach(gt=>{this.activeRegion.intersects(gt.obj)?et(gt):gt.area=null}),this.edges.forEach(gt=>{gt.area||(gt.area=re(gt.obj,this.potentialArea,this.o.edgeR1))}),this.virtualEdges.forEach(gt=>{gt.area||(gt.area=re(gt.obj,this.potentialArea,this.o.edgeR1))})}drawMembers(oe){for(const Fe of this.members)Fe.obj.draw(oe)}drawNonMembers(oe){for(const Fe of this.nonMembers)Fe.obj.draw(oe)}drawEdges(oe){for(const Fe of this.edges)Fe.obj.draw(oe)}drawPotentialArea(oe,Fe=!0){this.potentialArea.draw(oe,Fe)}compute(){if(this.members.length===0)return new L([]);this.dirty.size>0&&this.update();const{o:oe,potentialArea:Fe}=this,Ye=this.members.map(Be=>Be.area),ie=this.virtualEdges.concat(this.edges).map(Be=>Be.area),Ie=this.nonMembers.filter(Be=>Be.area!=null).map(Be=>Be.area),je=this.members.map(Be=>Be.obj);return xt(Fe,Ye,ie,Ie,Be=>Be.containsElements(je),oe)}}function xt(we,oe,Fe,Ye,ie,Ie={}){const je=Object.assign({},O,Ie);let Be=je.threshold,et=je.memberInfluenceFactor,gt=je.edgeInfluenceFactor,Mt=je.nonMemberInfluenceFactor;const Rt=(je.nodeR0-je.nodeR1)*(je.nodeR0-je.nodeR1),Ft=(je.edgeR0-je.edgeR1)*(je.edgeR0-je.edgeR1);for(let Xt=0;Xt<je.maxMarchingIterations;Xt++){if(we.clear(),et!==0){const an=et/Rt;for(const In of oe)we.incArea(In,an)}if(gt!==0){const an=gt/Ft;for(const In of Fe)we.incArea(In,an)}if(Mt!==0){const an=Mt/Rt;for(const In of Ye)we.incArea(In,an)}const Qt=Ze(we,Be);if(Qt&&ie(Qt))return Qt;if(Be*=.95,Xt<=je.maxMarchingIterations*.5)et*=1.2,gt*=1.2;else if(Mt!==0&&Ye.length>0)Mt*=.8;else break}return new L([])}function bt(we,oe){if(we.length===0)return new ye(0,0,0,0);const Fe=ye.from(we[0]);for(const Ye of we)Fe.add(Ye);for(const Ye of oe)Fe.add(N(Ye));return Fe}function wt(we,oe=[],Fe=[],Ye={}){if(we.length===0)return new L([]);const ie=new nt(Ye);return ie.pushMember(...we),ie.pushNonMember(...oe),ie.pushEdge(...Fe),ie.compute()}},8874:function(ke){"use strict";ke.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]}},19818:function(ke,ve,k){var M=k(8874),H=k(86851),U=Object.hasOwnProperty,Y=Object.create(null);for(var N in M)U.call(M,N)&&(Y[M[N]]=N);var I=ke.exports={to:{},get:{}};I.get=function(F){var P=F.substring(0,3).toLowerCase(),W,K;switch(P){case"hsl":W=I.get.hsl(F),K="hsl";break;case"hwb":W=I.get.hwb(F),K="hwb";break;default:W=I.get.rgb(F),K="rgb";break}return W?{model:K,value:W}:null},I.get.rgb=function(F){if(!F)return null;var P=/^#([a-f0-9]{3,4})$/i,W=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,K=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,ge=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,be=/^(\w+)$/,Ue=[0,0,0,1],Ne,ye,De;if(Ne=F.match(W)){for(De=Ne[2],Ne=Ne[1],ye=0;ye<3;ye++){var Ce=ye*2;Ue[ye]=parseInt(Ne.slice(Ce,Ce+2),16)}De&&(Ue[3]=parseInt(De,16)/255)}else if(Ne=F.match(P)){for(Ne=Ne[1],De=Ne[3],ye=0;ye<3;ye++)Ue[ye]=parseInt(Ne[ye]+Ne[ye],16);De&&(Ue[3]=parseInt(De+De,16)/255)}else if(Ne=F.match(K)){for(ye=0;ye<3;ye++)Ue[ye]=parseInt(Ne[ye+1],0);Ne[4]&&(Ne[5]?Ue[3]=parseFloat(Ne[4])*.01:Ue[3]=parseFloat(Ne[4]))}else if(Ne=F.match(ge)){for(ye=0;ye<3;ye++)Ue[ye]=Math.round(parseFloat(Ne[ye+1])*2.55);Ne[4]&&(Ne[5]?Ue[3]=parseFloat(Ne[4])*.01:Ue[3]=parseFloat(Ne[4]))}else return(Ne=F.match(be))?Ne[1]==="transparent"?[0,0,0,0]:U.call(M,Ne[1])?(Ue=M[Ne[1]],Ue[3]=1,Ue):null:null;for(ye=0;ye<3;ye++)Ue[ye]=C(Ue[ye],0,255);return Ue[3]=C(Ue[3],0,1),Ue},I.get.hsl=function(F){if(!F)return null;var P=/^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*)?\)$/,W=F.match(P);if(W){var K=parseFloat(W[4]),ge=(parseFloat(W[1])%360+360)%360,be=C(parseFloat(W[2]),0,100),Ue=C(parseFloat(W[3]),0,100),Ne=C(isNaN(K)?1:K,0,1);return[ge,be,Ue,Ne]}return null},I.get.hwb=function(F){if(!F)return null;var P=/^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*)?\)$/,W=F.match(P);if(W){var K=parseFloat(W[4]),ge=(parseFloat(W[1])%360+360)%360,be=C(parseFloat(W[2]),0,100),Ue=C(parseFloat(W[3]),0,100),Ne=C(isNaN(K)?1:K,0,1);return[ge,be,Ue,Ne]}return null},I.to.hex=function(){var F=H(arguments);return"#"+A(F[0])+A(F[1])+A(F[2])+(F[3]<1?A(Math.round(F[3]*255)):"")},I.to.rgb=function(){var F=H(arguments);return F.length<4||F[3]===1?"rgb("+Math.round(F[0])+", "+Math.round(F[1])+", "+Math.round(F[2])+")":"rgba("+Math.round(F[0])+", "+Math.round(F[1])+", "+Math.round(F[2])+", "+F[3]+")"},I.to.rgb.percent=function(){var F=H(arguments),P=Math.round(F[0]/255*100),W=Math.round(F[1]/255*100),K=Math.round(F[2]/255*100);return F.length<4||F[3]===1?"rgb("+P+"%, "+W+"%, "+K+"%)":"rgba("+P+"%, "+W+"%, "+K+"%, "+F[3]+")"},I.to.hsl=function(){var F=H(arguments);return F.length<4||F[3]===1?"hsl("+F[0]+", "+F[1]+"%, "+F[2]+"%)":"hsla("+F[0]+", "+F[1]+"%, "+F[2]+"%, "+F[3]+")"},I.to.hwb=function(){var F=H(arguments),P="";return F.length>=4&&F[3]!==1&&(P=", "+F[3]),"hwb("+F[0]+", "+F[1]+"%, "+F[2]+"%"+P+")"},I.to.keyword=function(F){return Y[F.slice(0,3)]};function C(F,P,W){return Math.min(Math.max(P,F),W)}function A(F){var P=Math.round(F).toString(16).toUpperCase();return P.length<2?"0"+P:P}},70681:function(ke,ve,k){ke.exports={graphlib:k(70574),layout:k(98123),debug:k(27570),util:{time:k(11138).time,notime:k(11138).notime},version:k(88177)}},92188:function(ke,ve,k){"use strict";var M=k(38436),H=k(74079);ke.exports={run:U,undo:N};function U(I){var C=I.graph().acyclicer==="greedy"?H(I,A(I)):Y(I);M.forEach(C,function(F){var P=I.edge(F);I.removeEdge(F),P.forwardName=F.name,P.reversed=!0,I.setEdge(F.w,F.v,P,M.uniqueId("rev"))});function A(F){return function(P){return F.edge(P).weight}}}function Y(I){var C=[],A={},F={};function P(W){M.has(F,W)||(F[W]=!0,A[W]=!0,M.forEach(I.outEdges(W),function(K){M.has(A,K.w)?C.push(K):P(K.w)}),delete A[W])}return M.forEach(I.nodes(),P),C}function N(I){M.forEach(I.edges(),function(C){var A=I.edge(C);if(A.reversed){I.removeEdge(C);var F=A.forwardName;delete A.reversed,delete A.forwardName,I.setEdge(C.w,C.v,A,F)}})}},61133:function(ke,ve,k){var M=k(38436),H=k(11138);ke.exports=U;function U(N){function I(C){var A=N.children(C),F=N.node(C);if(A.length&&M.forEach(A,I),M.has(F,"minRank")){F.borderLeft=[],F.borderRight=[];for(var P=F.minRank,W=F.maxRank+1;P<W;++P)Y(N,"borderLeft","_bl",C,F,P),Y(N,"borderRight","_br",C,F,P)}}M.forEach(N.children(),I)}function Y(N,I,C,A,F,P){var W={width:0,height:0,rank:P,borderType:I},K=F[I][P-1],ge=H.addDummyNode(N,"border",W,C);F[I][P]=ge,N.setParent(ge,A),K&&N.setEdge(K,ge,{weight:1})}},53258:function(ke,ve,k){"use strict";var M=k(38436);ke.exports={adjust:H,undo:U};function H(P){var W=P.graph().rankdir.toLowerCase();(W==="lr"||W==="rl")&&Y(P)}function U(P){var W=P.graph().rankdir.toLowerCase();(W==="bt"||W==="rl")&&I(P),(W==="lr"||W==="rl")&&(A(P),Y(P))}function Y(P){M.forEach(P.nodes(),function(W){N(P.node(W))}),M.forEach(P.edges(),function(W){N(P.edge(W))})}function N(P){var W=P.width;P.width=P.height,P.height=W}function I(P){M.forEach(P.nodes(),function(W){C(P.node(W))}),M.forEach(P.edges(),function(W){var K=P.edge(W);M.forEach(K.points,C),M.has(K,"y")&&C(K)})}function C(P){P.y=-P.y}function A(P){M.forEach(P.nodes(),function(W){F(P.node(W))}),M.forEach(P.edges(),function(W){var K=P.edge(W);M.forEach(K.points,F),M.has(K,"x")&&F(K)})}function F(P){var W=P.x;P.x=P.y,P.y=W}},77822:function(ke){ke.exports=ve;function ve(){var H={};H._next=H._prev=H,this._sentinel=H}ve.prototype.dequeue=function(){var H=this._sentinel,U=H._prev;if(U!==H)return k(U),U},ve.prototype.enqueue=function(H){var U=this._sentinel;H._prev&&H._next&&k(H),H._next=U._next,U._next._prev=H,U._next=H,H._prev=U},ve.prototype.toString=function(){for(var H=[],U=this._sentinel,Y=U._prev;Y!==U;)H.push(JSON.stringify(Y,M)),Y=Y._prev;return"["+H.join(", ")+"]"};function k(H){H._prev._next=H._next,H._next._prev=H._prev,delete H._next,delete H._prev}function M(H,U){if(H!=="_next"&&H!=="_prev")return U}},27570:function(ke,ve,k){var M=k(38436),H=k(11138),U=k(70574).Graph;ke.exports={debugOrdering:Y};function Y(N){var I=H.buildLayerMatrix(N),C=new U({compound:!0,multigraph:!0}).setGraph({});return M.forEach(N.nodes(),function(A){C.setNode(A,{label:A}),C.setParent(A,"layer"+N.node(A).rank)}),M.forEach(N.edges(),function(A){C.setEdge(A.v,A.w,{},A.name)}),M.forEach(I,function(A,F){var P="layer"+F;C.setNode(P,{rank:"same"}),M.reduce(A,function(W,K){return C.setEdge(W,K,{style:"invis"}),K})}),C}},70574:function(ke,ve,k){var M;try{M=k(28282)}catch(H){}M||(M=window.graphlib),ke.exports=M},74079:function(ke,ve,k){var M=k(38436),H=k(70574).Graph,U=k(77822);ke.exports=N;var Y=M.constant(1);function N(P,W){if(P.nodeCount()<=1)return[];var K=A(P,W||Y),ge=I(K.graph,K.buckets,K.zeroIdx);return M.flatten(M.map(ge,function(be){return P.outEdges(be.v,be.w)}),!0)}function I(P,W,K){for(var ge=[],be=W[W.length-1],Ue=W[0],Ne;P.nodeCount();){for(;Ne=Ue.dequeue();)C(P,W,K,Ne);for(;Ne=be.dequeue();)C(P,W,K,Ne);if(P.nodeCount()){for(var ye=W.length-2;ye>0;--ye)if(Ne=W[ye].dequeue(),Ne){ge=ge.concat(C(P,W,K,Ne,!0));break}}}return ge}function C(P,W,K,ge,be){var Ue=be?[]:void 0;return M.forEach(P.inEdges(ge.v),function(Ne){var ye=P.edge(Ne),De=P.node(Ne.v);be&&Ue.push({v:Ne.v,w:Ne.w}),De.out-=ye,F(W,K,De)}),M.forEach(P.outEdges(ge.v),function(Ne){var ye=P.edge(Ne),De=Ne.w,Ce=P.node(De);Ce.in-=ye,F(W,K,Ce)}),P.removeNode(ge.v),Ue}function A(P,W){var K=new H,ge=0,be=0;M.forEach(P.nodes(),function(ye){K.setNode(ye,{v:ye,in:0,out:0})}),M.forEach(P.edges(),function(ye){var De=K.edge(ye.v,ye.w)||0,Ce=W(ye),Me=De+Ce;K.setEdge(ye.v,ye.w,Me),be=Math.max(be,K.node(ye.v).out+=Ce),ge=Math.max(ge,K.node(ye.w).in+=Ce)});var Ue=M.range(be+ge+3).map(function(){return new U}),Ne=ge+1;return M.forEach(K.nodes(),function(ye){F(Ue,Ne,K.node(ye))}),{graph:K,buckets:Ue,zeroIdx:Ne}}function F(P,W,K){K.out?K.in?P[K.out-K.in+W].enqueue(K):P[P.length-1].enqueue(K):P[0].enqueue(K)}},98123:function(ke,ve,k){"use strict";var M=k(38436),H=k(92188),U=k(45995),Y=k(78093),N=k(11138).normalizeRanks,I=k(24219),C=k(11138).removeEmptyRanks,A=k(72981),F=k(61133),P=k(53258),W=k(53408),K=k(17873),ge=k(11138),be=k(70574).Graph;ke.exports=Ue;function Ue(ze,Qe){var Se=Qe&&Qe.debugTiming?ge.time:ge.notime;Se("layout",function(){var E=Se(" buildLayoutGraph",function(){return Te(ze)});Se(" runLayout",function(){Ne(E,Se)}),Se(" updateInputGraph",function(){ye(ze,E)})})}function Ne(ze,Qe){Qe(" makeSpaceForEdgeLabels",function(){Je(ze)}),Qe(" removeSelfEdges",function(){ht(ze)}),Qe(" acyclic",function(){H.run(ze)}),Qe(" nestingGraph.run",function(){A.run(ze)}),Qe(" rank",function(){Y(ge.asNonCompoundGraph(ze))}),Qe(" injectEdgeLabelProxies",function(){He(ze)}),Qe(" removeEmptyRanks",function(){C(ze)}),Qe(" nestingGraph.cleanup",function(){A.cleanup(ze)}),Qe(" normalizeRanks",function(){N(ze)}),Qe(" assignRankMinMax",function(){rt(ze)}),Qe(" removeEdgeLabelProxies",function(){Et(ze)}),Qe(" normalize.run",function(){U.run(ze)}),Qe(" parentDummyChains",function(){I(ze)}),Qe(" addBorderSegments",function(){F(ze)}),Qe(" order",function(){W(ze)}),Qe(" insertSelfEdges",function(){Pt(ze)}),Qe(" adjustCoordinateSystem",function(){P.adjust(ze)}),Qe(" position",function(){K(ze)}),Qe(" positionSelfEdges",function(){Ve(ze)}),Qe(" removeBorderNodes",function(){We(ze)}),Qe(" normalize.undo",function(){U.undo(ze)}),Qe(" fixupEdgeLabelCoords",function(){mt(ze)}),Qe(" undoCoordinateSystem",function(){P.undo(ze)}),Qe(" translateGraph",function(){lt(ze)}),Qe(" assignNodeIntersects",function(){st(ze)}),Qe(" reversePoints",function(){fe(ze)}),Qe(" acyclic.undo",function(){H.undo(ze)})}function ye(ze,Qe){M.forEach(ze.nodes(),function(Se){var E=ze.node(Se),me=Qe.node(Se);E&&(E.x=me.x,E.y=me.y,Qe.children(Se).length&&(E.width=me.width,E.height=me.height))}),M.forEach(ze.edges(),function(Se){var E=ze.edge(Se),me=Qe.edge(Se);E.points=me.points,M.has(me,"x")&&(E.x=me.x,E.y=me.y)}),ze.graph().width=Qe.graph().width,ze.graph().height=Qe.graph().height}var De=["nodesep","edgesep","ranksep","marginx","marginy"],Ce={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Me=["acyclicer","ranker","rankdir","align"],Oe=["width","height"],re={width:0,height:0},q=["minlen","weight","width","height","labeloffset"],ce={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Ee=["labelpos"];function Te(ze){var Qe=new be({multigraph:!0,compound:!0}),Se=ft(ze.graph());return Qe.setGraph(M.merge({},Ce,it(Se,De),M.pick(Se,Me))),M.forEach(ze.nodes(),function(E){var me=ft(ze.node(E));Qe.setNode(E,M.defaults(it(me,Oe),re)),Qe.setParent(E,ze.parent(E))}),M.forEach(ze.edges(),function(E){var me=ft(ze.edge(E));Qe.setEdge(E,M.merge({},ce,it(me,q),M.pick(me,Ee)))}),Qe}function Je(ze){var Qe=ze.graph();Qe.ranksep/=2,M.forEach(ze.edges(),function(Se){var E=ze.edge(Se);E.minlen*=2,E.labelpos.toLowerCase()!=="c"&&(Qe.rankdir==="TB"||Qe.rankdir==="BT"?E.width+=E.labeloffset:E.height+=E.labeloffset)})}function He(ze){M.forEach(ze.edges(),function(Qe){var Se=ze.edge(Qe);if(Se.width&&Se.height){var E=ze.node(Qe.v),me=ze.node(Qe.w),L={rank:(me.rank-E.rank)/2+E.rank,e:Qe};ge.addDummyNode(ze,"edge-proxy",L,"_ep")}})}function rt(ze){var Qe=0;M.forEach(ze.nodes(),function(Se){var E=ze.node(Se);E.borderTop&&(E.minRank=ze.node(E.borderTop).rank,E.maxRank=ze.node(E.borderBottom).rank,Qe=M.max(Qe,E.maxRank))}),ze.graph().maxRank=Qe}function Et(ze){M.forEach(ze.nodes(),function(Qe){var Se=ze.node(Qe);Se.dummy==="edge-proxy"&&(ze.edge(Se.e).labelRank=Se.rank,ze.removeNode(Qe))})}function lt(ze){var Qe=Number.POSITIVE_INFINITY,Se=0,E=Number.POSITIVE_INFINITY,me=0,L=ze.graph(),X=L.marginx||0,Ke=L.marginy||0;function ot(pe){var xe=pe.x,Ze=pe.y,O=pe.width,ne=pe.height;Qe=Math.min(Qe,xe-O/2),Se=Math.max(Se,xe+O/2),E=Math.min(E,Ze-ne/2),me=Math.max(me,Ze+ne/2)}M.forEach(ze.nodes(),function(pe){ot(ze.node(pe))}),M.forEach(ze.edges(),function(pe){var xe=ze.edge(pe);M.has(xe,"x")&&ot(xe)}),Qe-=X,E-=Ke,M.forEach(ze.nodes(),function(pe){var xe=ze.node(pe);xe.x-=Qe,xe.y-=E}),M.forEach(ze.edges(),function(pe){var xe=ze.edge(pe);M.forEach(xe.points,function(Ze){Ze.x-=Qe,Ze.y-=E}),M.has(xe,"x")&&(xe.x-=Qe),M.has(xe,"y")&&(xe.y-=E)}),L.width=Se-Qe+X,L.height=me-E+Ke}function st(ze){M.forEach(ze.edges(),function(Qe){var Se=ze.edge(Qe),E=ze.node(Qe.v),me=ze.node(Qe.w),L,X;Se.points?(L=Se.points[0],X=Se.points[Se.points.length-1]):(Se.points=[],L=me,X=E),Se.points.unshift(ge.intersectRect(E,L)),Se.points.push(ge.intersectRect(me,X))})}function mt(ze){M.forEach(ze.edges(),function(Qe){var Se=ze.edge(Qe);if(M.has(Se,"x"))switch((Se.labelpos==="l"||Se.labelpos==="r")&&(Se.width-=Se.labeloffset),Se.labelpos){case"l":Se.x-=Se.width/2+Se.labeloffset;break;case"r":Se.x+=Se.width/2+Se.labeloffset;break}})}function fe(ze){M.forEach(ze.edges(),function(Qe){var Se=ze.edge(Qe);Se.reversed&&Se.points.reverse()})}function We(ze){M.forEach(ze.nodes(),function(Qe){if(ze.children(Qe).length){var Se=ze.node(Qe),E=ze.node(Se.borderTop),me=ze.node(Se.borderBottom),L=ze.node(M.last(Se.borderLeft)),X=ze.node(M.last(Se.borderRight));Se.width=Math.abs(X.x-L.x),Se.height=Math.abs(me.y-E.y),Se.x=L.x+Se.width/2,Se.y=E.y+Se.height/2}}),M.forEach(ze.nodes(),function(Qe){ze.node(Qe).dummy==="border"&&ze.removeNode(Qe)})}function ht(ze){M.forEach(ze.edges(),function(Qe){if(Qe.v===Qe.w){var Se=ze.node(Qe.v);Se.selfEdges||(Se.selfEdges=[]),Se.selfEdges.push({e:Qe,label:ze.edge(Qe)}),ze.removeEdge(Qe)}})}function Pt(ze){var Qe=ge.buildLayerMatrix(ze);M.forEach(Qe,function(Se){var E=0;M.forEach(Se,function(me,L){var X=ze.node(me);X.order=L+E,M.forEach(X.selfEdges,function(Ke){ge.addDummyNode(ze,"selfedge",{width:Ke.label.width,height:Ke.label.height,rank:X.rank,order:L+ ++E,e:Ke.e,label:Ke.label},"_se")}),delete X.selfEdges})})}function Ve(ze){M.forEach(ze.nodes(),function(Qe){var Se=ze.node(Qe);if(Se.dummy==="selfedge"){var E=ze.node(Se.e.v),me=E.x+E.width/2,L=E.y,X=Se.x-me,Ke=E.height/2;ze.setEdge(Se.e,Se.label),ze.removeNode(Qe),Se.label.points=[{x:me+2*X/3,y:L-Ke},{x:me+5*X/6,y:L-Ke},{x:me+X,y:L},{x:me+5*X/6,y:L+Ke},{x:me+2*X/3,y:L+Ke}],Se.label.x=Se.x,Se.label.y=Se.y}})}function it(ze,Qe){return M.mapValues(M.pick(ze,Qe),Number)}function ft(ze){var Qe={};return M.forEach(ze,function(Se,E){Qe[E.toLowerCase()]=Se}),Qe}},38436:function(ke,ve,k){var M;try{M={cloneDeep:k(50361),constant:k(75703),defaults:k(91747),each:k(85768),filter:k(63105),find:k(13311),flatten:k(85564),forEach:k(84486),forIn:k(62620),has:k(18721),isUndefined:k(52353),last:k(10928),map:k(35161),mapValues:k(8521),max:k(6162),merge:k(82492),min:k(53632),minBy:k(22762),now:k(7771),pick:k(78718),range:k(96026),reduce:k(54061),sortBy:k(89734),uniqueId:k(73955),values:k(52628),zipObject:k(7287)}}catch(H){}M||(M=window._),ke.exports=M},72981:function(ke,ve,k){var M=k(38436),H=k(11138);ke.exports={run:U,cleanup:C};function U(A){var F=H.addDummyNode(A,"root",{},"_root"),P=N(A),W=M.max(M.values(P))-1,K=2*W+1;A.graph().nestingRoot=F,M.forEach(A.edges(),function(be){A.edge(be).minlen*=K});var ge=I(A)+1;M.forEach(A.children(),function(be){Y(A,F,K,ge,W,P,be)}),A.graph().nodeRankFactor=K}function Y(A,F,P,W,K,ge,be){var Ue=A.children(be);if(!Ue.length){be!==F&&A.setEdge(F,be,{weight:0,minlen:P});return}var Ne=H.addBorderNode(A,"_bt"),ye=H.addBorderNode(A,"_bb"),De=A.node(be);A.setParent(Ne,be),De.borderTop=Ne,A.setParent(ye,be),De.borderBottom=ye,M.forEach(Ue,function(Ce){Y(A,F,P,W,K,ge,Ce);var Me=A.node(Ce),Oe=Me.borderTop?Me.borderTop:Ce,re=Me.borderBottom?Me.borderBottom:Ce,q=Me.borderTop?W:2*W,ce=Oe!==re?1:K-ge[be]+1;A.setEdge(Ne,Oe,{weight:q,minlen:ce,nestingEdge:!0}),A.setEdge(re,ye,{weight:q,minlen:ce,nestingEdge:!0})}),A.parent(be)||A.setEdge(F,Ne,{weight:0,minlen:K+ge[be]})}function N(A){var F={};function P(W,K){var ge=A.children(W);ge&&ge.length&&M.forEach(ge,function(be){P(be,K+1)}),F[W]=K}return M.forEach(A.children(),function(W){P(W,1)}),F}function I(A){return M.reduce(A.edges(),function(F,P){return F+A.edge(P).weight},0)}function C(A){var F=A.graph();A.removeNode(F.nestingRoot),delete F.nestingRoot,M.forEach(A.edges(),function(P){var W=A.edge(P);W.nestingEdge&&A.removeEdge(P)})}},45995:function(ke,ve,k){"use strict";var M=k(38436),H=k(11138);ke.exports={run:U,undo:N};function U(I){I.graph().dummyChains=[],M.forEach(I.edges(),function(C){Y(I,C)})}function Y(I,C){var A=C.v,F=I.node(A).rank,P=C.w,W=I.node(P).rank,K=C.name,ge=I.edge(C),be=ge.labelRank;if(W!==F+1){I.removeEdge(C);var Ue,Ne,ye;for(ye=0,++F;F<W;++ye,++F)ge.points=[],Ne={width:0,height:0,edgeLabel:ge,edgeObj:C,rank:F},Ue=H.addDummyNode(I,"edge",Ne,"_d"),F===be&&(Ne.width=ge.width,Ne.height=ge.height,Ne.dummy="edge-label",Ne.labelpos=ge.labelpos),I.setEdge(A,Ue,{weight:ge.weight},K),ye===0&&I.graph().dummyChains.push(Ue),A=Ue;I.setEdge(A,P,{weight:ge.weight},K)}}function N(I){M.forEach(I.graph().dummyChains,function(C){var A=I.node(C),F=A.edgeLabel,P;for(I.setEdge(A.edgeObj,F);A.dummy;)P=I.successors(C)[0],I.removeNode(C),F.points.push({x:A.x,y:A.y}),A.dummy==="edge-label"&&(F.x=A.x,F.y=A.y,F.width=A.width,F.height=A.height),C=P,A=I.node(C)})}},55093:function(ke,ve,k){var M=k(38436);ke.exports=H;function H(U,Y,N){var I={},C;M.forEach(N,function(A){for(var F=U.parent(A),P,W;F;){if(P=U.parent(F),P?(W=I[P],I[P]=F):(W=C,C=F),W&&W!==F){Y.setEdge(W,F);return}F=P}})}},35439:function(ke,ve,k){var M=k(38436);ke.exports=H;function H(U,Y){return M.map(Y,function(N){var I=U.inEdges(N);if(I.length){var C=M.reduce(I,function(A,F){var P=U.edge(F),W=U.node(F.v);return{sum:A.sum+P.weight*W.order,weight:A.weight+P.weight}},{sum:0,weight:0});return{v:N,barycenter:C.sum/C.weight,weight:C.weight}}else return{v:N}})}},23128:function(ke,ve,k){var M=k(38436),H=k(70574).Graph;ke.exports=U;function U(N,I,C){var A=Y(N),F=new H({compound:!0}).setGraph({root:A}).setDefaultNodeLabel(function(P){return N.node(P)});return M.forEach(N.nodes(),function(P){var W=N.node(P),K=N.parent(P);(W.rank===I||W.minRank<=I&&I<=W.maxRank)&&(F.setNode(P),F.setParent(P,K||A),M.forEach(N[C](P),function(ge){var be=ge.v===P?ge.w:ge.v,Ue=F.edge(be,P),Ne=M.isUndefined(Ue)?0:Ue.weight;F.setEdge(be,P,{weight:N.edge(ge).weight+Ne})}),M.has(W,"minRank")&&F.setNode(P,{borderLeft:W.borderLeft[I],borderRight:W.borderRight[I]}))}),F}function Y(N){for(var I;N.hasNode(I=M.uniqueId("_root")););return I}},56630:function(ke,ve,k){"use strict";var M=k(38436);ke.exports=H;function H(Y,N){for(var I=0,C=1;C<N.length;++C)I+=U(Y,N[C-1],N[C]);return I}function U(Y,N,I){for(var C=M.zipObject(I,M.map(I,function(ge,be){return be})),A=M.flatten(M.map(N,function(ge){return M.sortBy(M.map(Y.outEdges(ge),function(be){return{pos:C[be.w],weight:Y.edge(be).weight}}),"pos")}),!0),F=1;F<I.length;)F<<=1;var P=2*F-1;F-=1;var W=M.map(new Array(P),function(){return 0}),K=0;return M.forEach(A.forEach(function(ge){var be=ge.pos+F;W[be]+=ge.weight;for(var Ue=0;be>0;)be%2&&(Ue+=W[be+1]),be=be-1>>1,W[be]+=ge.weight;K+=ge.weight*Ue})),K}},53408:function(ke,ve,k){"use strict";var M=k(38436),H=k(2588),U=k(56630),Y=k(61026),N=k(23128),I=k(55093),C=k(70574).Graph,A=k(11138);ke.exports=F;function F(ge){var be=A.maxRank(ge),Ue=P(ge,M.range(1,be+1),"inEdges"),Ne=P(ge,M.range(be-1,-1,-1),"outEdges"),ye=H(ge);K(ge,ye);for(var De=Number.POSITIVE_INFINITY,Ce,Me=0,Oe=0;Oe<4;++Me,++Oe){W(Me%2?Ue:Ne,Me%4>=2),ye=A.buildLayerMatrix(ge);var re=U(ge,ye);re<De&&(Oe=0,Ce=M.cloneDeep(ye),De=re)}K(ge,Ce)}function P(ge,be,Ue){return M.map(be,function(Ne){return N(ge,Ne,Ue)})}function W(ge,be){var Ue=new C;M.forEach(ge,function(Ne){var ye=Ne.graph().root,De=Y(Ne,ye,Ue,be);M.forEach(De.vs,function(Ce,Me){Ne.node(Ce).order=Me}),I(Ne,Ue,De.vs)})}function K(ge,be){M.forEach(be,function(Ue){M.forEach(Ue,function(Ne,ye){ge.node(Ne).order=ye})})}},2588:function(ke,ve,k){"use strict";var M=k(38436);ke.exports=H;function H(U){var Y={},N=M.filter(U.nodes(),function(P){return!U.children(P).length}),I=M.max(M.map(N,function(P){return U.node(P).rank})),C=M.map(M.range(I+1),function(){return[]});function A(P){if(!M.has(Y,P)){Y[P]=!0;var W=U.node(P);C[W.rank].push(P),M.forEach(U.successors(P),A)}}var F=M.sortBy(N,function(P){return U.node(P).rank});return M.forEach(F,A),C}},83678:function(ke,ve,k){"use strict";var M=k(38436);ke.exports=H;function H(N,I){var C={};M.forEach(N,function(F,P){var W=C[F.v]={indegree:0,in:[],out:[],vs:[F.v],i:P};M.isUndefined(F.barycenter)||(W.barycenter=F.barycenter,W.weight=F.weight)}),M.forEach(I.edges(),function(F){var P=C[F.v],W=C[F.w];!M.isUndefined(P)&&!M.isUndefined(W)&&(W.indegree++,P.out.push(C[F.w]))});var A=M.filter(C,function(F){return!F.indegree});return U(A)}function U(N){var I=[];function C(P){return function(W){W.merged||(M.isUndefined(W.barycenter)||M.isUndefined(P.barycenter)||W.barycenter>=P.barycenter)&&Y(P,W)}}function A(P){return function(W){W.in.push(P),--W.indegree===0&&N.push(W)}}for(;N.length;){var F=N.pop();I.push(F),M.forEach(F.in.reverse(),C(F)),M.forEach(F.out,A(F))}return M.map(M.filter(I,function(P){return!P.merged}),function(P){return M.pick(P,["vs","i","barycenter","weight"])})}function Y(N,I){var C=0,A=0;N.weight&&(C+=N.barycenter*N.weight,A+=N.weight),I.weight&&(C+=I.barycenter*I.weight,A+=I.weight),N.vs=I.vs.concat(N.vs),N.barycenter=C/A,N.weight=A,N.i=Math.min(I.i,N.i),I.merged=!0}},61026:function(ke,ve,k){var M=k(38436),H=k(35439),U=k(83678),Y=k(87304);ke.exports=N;function N(A,F,P,W){var K=A.children(F),ge=A.node(F),be=ge?ge.borderLeft:void 0,Ue=ge?ge.borderRight:void 0,Ne={};be&&(K=M.filter(K,function(re){return re!==be&&re!==Ue}));var ye=H(A,K);M.forEach(ye,function(re){if(A.children(re.v).length){var q=N(A,re.v,P,W);Ne[re.v]=q,M.has(q,"barycenter")&&C(re,q)}});var De=U(ye,P);I(De,Ne);var Ce=Y(De,W);if(be&&(Ce.vs=M.flatten([be,Ce.vs,Ue],!0),A.predecessors(be).length)){var Me=A.node(A.predecessors(be)[0]),Oe=A.node(A.predecessors(Ue)[0]);M.has(Ce,"barycenter")||(Ce.barycenter=0,Ce.weight=0),Ce.barycenter=(Ce.barycenter*Ce.weight+Me.order+Oe.order)/(Ce.weight+2),Ce.weight+=2}return Ce}function I(A,F){M.forEach(A,function(P){P.vs=M.flatten(P.vs.map(function(W){return F[W]?F[W].vs:W}),!0)})}function C(A,F){M.isUndefined(A.barycenter)?(A.barycenter=F.barycenter,A.weight=F.weight):(A.barycenter=(A.barycenter*A.weight+F.barycenter*F.weight)/(A.weight+F.weight),A.weight+=F.weight)}},87304:function(ke,ve,k){var M=k(38436),H=k(11138);ke.exports=U;function U(I,C){var A=H.partition(I,function(Ne){return M.has(Ne,"barycenter")}),F=A.lhs,P=M.sortBy(A.rhs,function(Ne){return-Ne.i}),W=[],K=0,ge=0,be=0;F.sort(N(!!C)),be=Y(W,P,be),M.forEach(F,function(Ne){be+=Ne.vs.length,W.push(Ne.vs),K+=Ne.barycenter*Ne.weight,ge+=Ne.weight,be=Y(W,P,be)});var Ue={vs:M.flatten(W,!0)};return ge&&(Ue.barycenter=K/ge,Ue.weight=ge),Ue}function Y(I,C,A){for(var F;C.length&&(F=M.last(C)).i<=A;)C.pop(),I.push(F.vs),A++;return A}function N(I){return function(C,A){return C.barycenter<A.barycenter?-1:C.barycenter>A.barycenter?1:I?A.i-C.i:C.i-A.i}}},24219:function(ke,ve,k){var M=k(38436);ke.exports=H;function H(N){var I=Y(N);M.forEach(N.graph().dummyChains,function(C){for(var A=N.node(C),F=A.edgeObj,P=U(N,I,F.v,F.w),W=P.path,K=P.lca,ge=0,be=W[ge],Ue=!0;C!==F.w;){if(A=N.node(C),Ue){for(;(be=W[ge])!==K&&N.node(be).maxRank<A.rank;)ge++;be===K&&(Ue=!1)}if(!Ue){for(;ge<W.length-1&&N.node(be=W[ge+1]).minRank<=A.rank;)ge++;be=W[ge]}N.setParent(C,be),C=N.successors(C)[0]}})}function U(N,I,C,A){var F=[],P=[],W=Math.min(I[C].low,I[A].low),K=Math.max(I[C].lim,I[A].lim),ge,be;ge=C;do ge=N.parent(ge),F.push(ge);while(ge&&(I[ge].low>W||K>I[ge].lim));for(be=ge,ge=A;(ge=N.parent(ge))!==be;)P.push(ge);return{path:F.concat(P.reverse()),lca:be}}function Y(N){var I={},C=0;function A(F){var P=C;M.forEach(N.children(F),A),I[F]={low:P,lim:C++}}return M.forEach(N.children(),A),I}},3573:function(ke,ve,k){"use strict";var M=k(38436),H=k(70574).Graph,U=k(11138);ke.exports={positionX:Ue,findType1Conflicts:Y,findType2Conflicts:N,addConflict:C,hasConflict:A,verticalAlignment:F,horizontalCompaction:P,alignCoordinates:ge,findSmallestWidthAlignment:K,balance:be};function Y(De,Ce){var Me={};function Oe(re,q){var ce=0,Ee=0,Te=re.length,Je=M.last(q);return M.forEach(q,function(He,rt){var Et=I(De,He),lt=Et?De.node(Et).order:Te;(Et||He===Je)&&(M.forEach(q.slice(Ee,rt+1),function(st){M.forEach(De.predecessors(st),function(mt){var fe=De.node(mt),We=fe.order;(We<ce||lt<We)&&!(fe.dummy&&De.node(st).dummy)&&C(Me,mt,st)})}),Ee=rt+1,ce=lt)}),q}return M.reduce(Ce,Oe),Me}function N(De,Ce){var Me={};function Oe(q,ce,Ee,Te,Je){var He;M.forEach(M.range(ce,Ee),function(rt){He=q[rt],De.node(He).dummy&&M.forEach(De.predecessors(He),function(Et){var lt=De.node(Et);lt.dummy&&(lt.order<Te||lt.order>Je)&&C(Me,Et,He)})})}function re(q,ce){var Ee=-1,Te,Je=0;return M.forEach(ce,function(He,rt){if(De.node(He).dummy==="border"){var Et=De.predecessors(He);Et.length&&(Te=De.node(Et[0]).order,Oe(ce,Je,rt,Ee,Te),Je=rt,Ee=Te)}Oe(ce,Je,ce.length,Te,q.length)}),ce}return M.reduce(Ce,re),Me}function I(De,Ce){if(De.node(Ce).dummy)return M.find(De.predecessors(Ce),function(Me){return De.node(Me).dummy})}function C(De,Ce,Me){if(Ce>Me){var Oe=Ce;Ce=Me,Me=Oe}var re=De[Ce];re||(De[Ce]=re={}),re[Me]=!0}function A(De,Ce,Me){if(Ce>Me){var Oe=Ce;Ce=Me,Me=Oe}return M.has(De[Ce],Me)}function F(De,Ce,Me,Oe){var re={},q={},ce={};return M.forEach(Ce,function(Ee){M.forEach(Ee,function(Te,Je){re[Te]=Te,q[Te]=Te,ce[Te]=Je})}),M.forEach(Ce,function(Ee){var Te=-1;M.forEach(Ee,function(Je){var He=Oe(Je);if(He.length){He=M.sortBy(He,function(mt){return ce[mt]});for(var rt=(He.length-1)/2,Et=Math.floor(rt),lt=Math.ceil(rt);Et<=lt;++Et){var st=He[Et];q[Je]===Je&&Te<ce[st]&&!A(Me,Je,st)&&(q[st]=Je,q[Je]=re[Je]=re[st],Te=ce[st])}}})}),{root:re,align:q}}function P(De,Ce,Me,Oe,re){var q={},ce=W(De,Ce,Me,re),Ee=re?"borderLeft":"borderRight";function Te(rt,Et){for(var lt=ce.nodes(),st=lt.pop(),mt={};st;)mt[st]?rt(st):(mt[st]=!0,lt.push(st),lt=lt.concat(Et(st))),st=lt.pop()}function Je(rt){q[rt]=ce.inEdges(rt).reduce(function(Et,lt){return Math.max(Et,q[lt.v]+ce.edge(lt))},0)}function He(rt){var Et=ce.outEdges(rt).reduce(function(st,mt){return Math.min(st,q[mt.w]-ce.edge(mt))},Number.POSITIVE_INFINITY),lt=De.node(rt);Et!==Number.POSITIVE_INFINITY&<.borderType!==Ee&&(q[rt]=Math.max(q[rt],Et))}return Te(Je,ce.predecessors.bind(ce)),Te(He,ce.successors.bind(ce)),M.forEach(Oe,function(rt){q[rt]=q[Me[rt]]}),q}function W(De,Ce,Me,Oe){var re=new H,q=De.graph(),ce=Ne(q.nodesep,q.edgesep,Oe);return M.forEach(Ce,function(Ee){var Te;M.forEach(Ee,function(Je){var He=Me[Je];if(re.setNode(He),Te){var rt=Me[Te],Et=re.edge(rt,He);re.setEdge(rt,He,Math.max(ce(De,Je,Te),Et||0))}Te=Je})}),re}function K(De,Ce){return M.minBy(M.values(Ce),function(Me){var Oe=Number.NEGATIVE_INFINITY,re=Number.POSITIVE_INFINITY;return M.forIn(Me,function(q,ce){var Ee=ye(De,ce)/2;Oe=Math.max(q+Ee,Oe),re=Math.min(q-Ee,re)}),Oe-re})}function ge(De,Ce){var Me=M.values(Ce),Oe=M.min(Me),re=M.max(Me);M.forEach(["u","d"],function(q){M.forEach(["l","r"],function(ce){var Ee=q+ce,Te=De[Ee],Je;if(Te!==Ce){var He=M.values(Te);Je=ce==="l"?Oe-M.min(He):re-M.max(He),Je&&(De[Ee]=M.mapValues(Te,function(rt){return rt+Je}))}})})}function be(De,Ce){return M.mapValues(De.ul,function(Me,Oe){if(Ce)return De[Ce.toLowerCase()][Oe];var re=M.sortBy(M.map(De,Oe));return(re[1]+re[2])/2})}function Ue(De){var Ce=U.buildLayerMatrix(De),Me=M.merge(Y(De,Ce),N(De,Ce)),Oe={},re;M.forEach(["u","d"],function(ce){re=ce==="u"?Ce:M.values(Ce).reverse(),M.forEach(["l","r"],function(Ee){Ee==="r"&&(re=M.map(re,function(rt){return M.values(rt).reverse()}));var Te=(ce==="u"?De.predecessors:De.successors).bind(De),Je=F(De,re,Me,Te),He=P(De,re,Je.root,Je.align,Ee==="r");Ee==="r"&&(He=M.mapValues(He,function(rt){return-rt})),Oe[ce+Ee]=He})});var q=K(De,Oe);return ge(Oe,q),be(Oe,De.graph().align)}function Ne(De,Ce,Me){return function(Oe,re,q){var ce=Oe.node(re),Ee=Oe.node(q),Te=0,Je;if(Te+=ce.width/2,M.has(ce,"labelpos"))switch(ce.labelpos.toLowerCase()){case"l":Je=-ce.width/2;break;case"r":Je=ce.width/2;break}if(Je&&(Te+=Me?Je:-Je),Je=0,Te+=(ce.dummy?Ce:De)/2,Te+=(Ee.dummy?Ce:De)/2,Te+=Ee.width/2,M.has(Ee,"labelpos"))switch(Ee.labelpos.toLowerCase()){case"l":Je=Ee.width/2;break;case"r":Je=-Ee.width/2;break}return Je&&(Te+=Me?Je:-Je),Je=0,Te}}function ye(De,Ce){return De.node(Ce).width}},17873:function(ke,ve,k){"use strict";var M=k(38436),H=k(11138),U=k(3573).positionX;ke.exports=Y;function Y(I){I=H.asNonCompoundGraph(I),N(I),M.forEach(U(I),function(C,A){I.node(A).x=C})}function N(I){var C=H.buildLayerMatrix(I),A=I.graph().ranksep,F=0;M.forEach(C,function(P){var W=M.max(M.map(P,function(K){return I.node(K).height}));M.forEach(P,function(K){I.node(K).y=F+W/2}),F+=W+A})}},20300:function(ke,ve,k){"use strict";var M=k(38436),H=k(70574).Graph,U=k(76681).slack;ke.exports=Y;function Y(A){var F=new H({directed:!1}),P=A.nodes()[0],W=A.nodeCount();F.setNode(P,{});for(var K,ge;N(F,A)<W;)K=I(F,A),ge=F.hasNode(K.v)?U(A,K):-U(A,K),C(F,A,ge);return F}function N(A,F){function P(W){M.forEach(F.nodeEdges(W),function(K){var ge=K.v,be=W===ge?K.w:ge;!A.hasNode(be)&&!U(F,K)&&(A.setNode(be,{}),A.setEdge(W,be,{}),P(be))})}return M.forEach(A.nodes(),P),A.nodeCount()}function I(A,F){return M.minBy(F.edges(),function(P){if(A.hasNode(P.v)!==A.hasNode(P.w))return U(F,P)})}function C(A,F,P){M.forEach(A.nodes(),function(W){F.node(W).rank+=P})}},78093:function(ke,ve,k){"use strict";var M=k(76681),H=M.longestPath,U=k(20300),Y=k(42472);ke.exports=N;function N(F){switch(F.graph().ranker){case"network-simplex":A(F);break;case"tight-tree":C(F);break;case"longest-path":I(F);break;default:A(F)}}var I=H;function C(F){H(F),U(F)}function A(F){Y(F)}},42472:function(ke,ve,k){"use strict";var M=k(38436),H=k(20300),U=k(76681).slack,Y=k(76681).longestPath,N=k(70574).alg.preorder,I=k(70574).alg.postorder,C=k(11138).simplify;ke.exports=A,A.initLowLimValues=K,A.initCutValues=F,A.calcCutValue=W,A.leaveEdge=be,A.enterEdge=Ue,A.exchangeEdges=Ne;function A(Me){Me=C(Me),Y(Me);var Oe=H(Me);K(Oe),F(Oe,Me);for(var re,q;re=be(Oe);)q=Ue(Oe,Me,re),Ne(Oe,Me,re,q)}function F(Me,Oe){var re=I(Me,Me.nodes());re=re.slice(0,re.length-1),M.forEach(re,function(q){P(Me,Oe,q)})}function P(Me,Oe,re){var q=Me.node(re),ce=q.parent;Me.edge(re,ce).cutvalue=W(Me,Oe,re)}function W(Me,Oe,re){var q=Me.node(re),ce=q.parent,Ee=!0,Te=Oe.edge(re,ce),Je=0;return Te||(Ee=!1,Te=Oe.edge(ce,re)),Je=Te.weight,M.forEach(Oe.nodeEdges(re),function(He){var rt=He.v===re,Et=rt?He.w:He.v;if(Et!==ce){var lt=rt===Ee,st=Oe.edge(He).weight;if(Je+=lt?st:-st,De(Me,re,Et)){var mt=Me.edge(re,Et).cutvalue;Je+=lt?-mt:mt}}}),Je}function K(Me,Oe){arguments.length<2&&(Oe=Me.nodes()[0]),ge(Me,{},1,Oe)}function ge(Me,Oe,re,q,ce){var Ee=re,Te=Me.node(q);return Oe[q]=!0,M.forEach(Me.neighbors(q),function(Je){M.has(Oe,Je)||(re=ge(Me,Oe,re,Je,q))}),Te.low=Ee,Te.lim=re++,ce?Te.parent=ce:delete Te.parent,re}function be(Me){return M.find(Me.edges(),function(Oe){return Me.edge(Oe).cutvalue<0})}function Ue(Me,Oe,re){var q=re.v,ce=re.w;Oe.hasEdge(q,ce)||(q=re.w,ce=re.v);var Ee=Me.node(q),Te=Me.node(ce),Je=Ee,He=!1;Ee.lim>Te.lim&&(Je=Te,He=!0);var rt=M.filter(Oe.edges(),function(Et){return He===Ce(Me,Me.node(Et.v),Je)&&He!==Ce(Me,Me.node(Et.w),Je)});return M.minBy(rt,function(Et){return U(Oe,Et)})}function Ne(Me,Oe,re,q){var ce=re.v,Ee=re.w;Me.removeEdge(ce,Ee),Me.setEdge(q.v,q.w,{}),K(Me),F(Me,Oe),ye(Me,Oe)}function ye(Me,Oe){var re=M.find(Me.nodes(),function(ce){return!Oe.node(ce).parent}),q=N(Me,re);q=q.slice(1),M.forEach(q,function(ce){var Ee=Me.node(ce).parent,Te=Oe.edge(ce,Ee),Je=!1;Te||(Te=Oe.edge(Ee,ce),Je=!0),Oe.node(ce).rank=Oe.node(Ee).rank+(Je?Te.minlen:-Te.minlen)})}function De(Me,Oe,re){return Me.hasEdge(Oe,re)}function Ce(Me,Oe,re){return re.low<=Oe.lim&&Oe.lim<=re.lim}},76681:function(ke,ve,k){"use strict";var M=k(38436);ke.exports={longestPath:H,slack:U};function H(Y){var N={};function I(C){var A=Y.node(C);if(M.has(N,C))return A.rank;N[C]=!0;var F=M.min(M.map(Y.outEdges(C),function(P){return I(P.w)-Y.edge(P).minlen}));return(F===Number.POSITIVE_INFINITY||F===void 0||F===null)&&(F=0),A.rank=F}M.forEach(Y.sources(),I)}function U(Y,N){return Y.node(N.w).rank-Y.node(N.v).rank-Y.edge(N).minlen}},11138:function(ke,ve,k){"use strict";var M=k(38436),H=k(70574).Graph;ke.exports={addDummyNode:U,simplify:Y,asNonCompoundGraph:N,successorWeights:I,predecessorWeights:C,intersectRect:A,buildLayerMatrix:F,normalizeRanks:P,removeEmptyRanks:W,addBorderNode:K,maxRank:ge,partition:be,time:Ue,notime:Ne};function U(ye,De,Ce,Me){var Oe;do Oe=M.uniqueId(Me);while(ye.hasNode(Oe));return Ce.dummy=De,ye.setNode(Oe,Ce),Oe}function Y(ye){var De=new H().setGraph(ye.graph());return M.forEach(ye.nodes(),function(Ce){De.setNode(Ce,ye.node(Ce))}),M.forEach(ye.edges(),function(Ce){var Me=De.edge(Ce.v,Ce.w)||{weight:0,minlen:1},Oe=ye.edge(Ce);De.setEdge(Ce.v,Ce.w,{weight:Me.weight+Oe.weight,minlen:Math.max(Me.minlen,Oe.minlen)})}),De}function N(ye){var De=new H({multigraph:ye.isMultigraph()}).setGraph(ye.graph());return M.forEach(ye.nodes(),function(Ce){ye.children(Ce).length||De.setNode(Ce,ye.node(Ce))}),M.forEach(ye.edges(),function(Ce){De.setEdge(Ce,ye.edge(Ce))}),De}function I(ye){var De=M.map(ye.nodes(),function(Ce){var Me={};return M.forEach(ye.outEdges(Ce),function(Oe){Me[Oe.w]=(Me[Oe.w]||0)+ye.edge(Oe).weight}),Me});return M.zipObject(ye.nodes(),De)}function C(ye){var De=M.map(ye.nodes(),function(Ce){var Me={};return M.forEach(ye.inEdges(Ce),function(Oe){Me[Oe.v]=(Me[Oe.v]||0)+ye.edge(Oe).weight}),Me});return M.zipObject(ye.nodes(),De)}function A(ye,De){var Ce=ye.x,Me=ye.y,Oe=De.x-Ce,re=De.y-Me,q=ye.width/2,ce=ye.height/2;if(!Oe&&!re)throw new Error("Not possible to find intersection inside of the rectangle");var Ee,Te;return Math.abs(re)*q>Math.abs(Oe)*ce?(re<0&&(ce=-ce),Ee=ce*Oe/re,Te=ce):(Oe<0&&(q=-q),Ee=q,Te=q*re/Oe),{x:Ce+Ee,y:Me+Te}}function F(ye){var De=M.map(M.range(ge(ye)+1),function(){return[]});return M.forEach(ye.nodes(),function(Ce){var Me=ye.node(Ce),Oe=Me.rank;M.isUndefined(Oe)||(De[Oe][Me.order]=Ce)}),De}function P(ye){var De=M.min(M.map(ye.nodes(),function(Ce){return ye.node(Ce).rank}));M.forEach(ye.nodes(),function(Ce){var Me=ye.node(Ce);M.has(Me,"rank")&&(Me.rank-=De)})}function W(ye){var De=M.min(M.map(ye.nodes(),function(re){return ye.node(re).rank})),Ce=[];M.forEach(ye.nodes(),function(re){var q=ye.node(re).rank-De;Ce[q]||(Ce[q]=[]),Ce[q].push(re)});var Me=0,Oe=ye.graph().nodeRankFactor;M.forEach(Ce,function(re,q){M.isUndefined(re)&&q%Oe!==0?--Me:Me&&M.forEach(re,function(ce){ye.node(ce).rank+=Me})})}function K(ye,De,Ce,Me){var Oe={width:0,height:0};return arguments.length>=4&&(Oe.rank=Ce,Oe.order=Me),U(ye,"border",Oe,De)}function ge(ye){return M.max(M.map(ye.nodes(),function(De){var Ce=ye.node(De).rank;if(!M.isUndefined(Ce))return Ce}))}function be(ye,De){var Ce={lhs:[],rhs:[]};return M.forEach(ye,function(Me){De(Me)?Ce.lhs.push(Me):Ce.rhs.push(Me)}),Ce}function Ue(ye,De){var Ce=M.now();try{return De()}finally{console.log(ye+" time: "+(M.now()-Ce)+"ms")}}function Ne(ye,De){return De()}},88177:function(ke){ke.exports="0.8.5"},26729:function(ke){"use strict";var ve=Object.prototype.hasOwnProperty,k="~";function M(){}Object.create&&(M.prototype=Object.create(null),new M().__proto__||(k=!1));function H(I,C,A){this.fn=I,this.context=C,this.once=A||!1}function U(I,C,A,F,P){if(typeof A!="function")throw new TypeError("The listener must be a function");var W=new H(A,F||I,P),K=k?k+C:C;return I._events[K]?I._events[K].fn?I._events[K]=[I._events[K],W]:I._events[K].push(W):(I._events[K]=W,I._eventsCount++),I}function Y(I,C){--I._eventsCount===0?I._events=new M:delete I._events[C]}function N(){this._events=new M,this._eventsCount=0}N.prototype.eventNames=function(){var C=[],A,F;if(this._eventsCount===0)return C;for(F in A=this._events)ve.call(A,F)&&C.push(k?F.slice(1):F);return Object.getOwnPropertySymbols?C.concat(Object.getOwnPropertySymbols(A)):C},N.prototype.listeners=function(C){var A=k?k+C:C,F=this._events[A];if(!F)return[];if(F.fn)return[F.fn];for(var P=0,W=F.length,K=new Array(W);P<W;P++)K[P]=F[P].fn;return K},N.prototype.listenerCount=function(C){var A=k?k+C:C,F=this._events[A];return F?F.fn?1:F.length:0},N.prototype.emit=function(C,A,F,P,W,K){var ge=k?k+C:C;if(!this._events[ge])return!1;var be=this._events[ge],Ue=arguments.length,Ne,ye;if(be.fn){switch(be.once&&this.removeListener(C,be.fn,void 0,!0),Ue){case 1:return be.fn.call(be.context),!0;case 2:return be.fn.call(be.context,A),!0;case 3:return be.fn.call(be.context,A,F),!0;case 4:return be.fn.call(be.context,A,F,P),!0;case 5:return be.fn.call(be.context,A,F,P,W),!0;case 6:return be.fn.call(be.context,A,F,P,W,K),!0}for(ye=1,Ne=new Array(Ue-1);ye<Ue;ye++)Ne[ye-1]=arguments[ye];be.fn.apply(be.context,Ne)}else{var De=be.length,Ce;for(ye=0;ye<De;ye++)switch(be[ye].once&&this.removeListener(C,be[ye].fn,void 0,!0),Ue){case 1:be[ye].fn.call(be[ye].context);break;case 2:be[ye].fn.call(be[ye].context,A);break;case 3:be[ye].fn.call(be[ye].context,A,F);break;case 4:be[ye].fn.call(be[ye].context,A,F,P);break;default:if(!Ne)for(Ce=1,Ne=new Array(Ue-1);Ce<Ue;Ce++)Ne[Ce-1]=arguments[Ce];be[ye].fn.apply(be[ye].context,Ne)}}return!0},N.prototype.on=function(C,A,F){return U(this,C,A,F,!1)},N.prototype.once=function(C,A,F){return U(this,C,A,F,!0)},N.prototype.removeListener=function(C,A,F,P){var W=k?k+C:C;if(!this._events[W])return this;if(!A)return Y(this,W),this;var K=this._events[W];if(K.fn)K.fn===A&&(!P||K.once)&&(!F||K.context===F)&&Y(this,W);else{for(var ge=0,be=[],Ue=K.length;ge<Ue;ge++)(K[ge].fn!==A||P&&!K[ge].once||F&&K[ge].context!==F)&&be.push(K[ge]);be.length?this._events[W]=be.length===1?be[0]:be:Y(this,W)}return this},N.prototype.removeAllListeners=function(C){var A;return C?(A=k?k+C:C,this._events[A]&&Y(this,A)):(this._events=new M,this._eventsCount=0),this},N.prototype.off=N.prototype.removeListener,N.prototype.addListener=N.prototype.on,N.prefixed=k,N.EventEmitter=N,ke.exports=N},49685:function(ke,ve,k){"use strict";k.d(ve,{Ib:function(){return M},WT:function(){return H}});var M=1e-6,H=typeof Float32Array!="undefined"?Float32Array:Array,U=Math.random;function Y(A){H=A}var N=Math.PI/180;function I(A){return A*N}function C(A,F){return Math.abs(A-F)<=M*Math.max(1,Math.abs(A),Math.abs(F))}Math.hypot||(Math.hypot=function(){for(var A=0,F=arguments.length;F--;)A+=arguments[F]*arguments[F];return Math.sqrt(A)})},35600:function(ke,ve,k){"use strict";k.d(ve,{Ue:function(){return H},al:function(){return I},xO:function(){return U}});var M=k(49685);function H(){var fe=new M.WT(9);return M.WT!=Float32Array&&(fe[1]=0,fe[2]=0,fe[3]=0,fe[5]=0,fe[6]=0,fe[7]=0),fe[0]=1,fe[4]=1,fe[8]=1,fe}function U(fe,We){return fe[0]=We[0],fe[1]=We[1],fe[2]=We[2],fe[3]=We[4],fe[4]=We[5],fe[5]=We[6],fe[6]=We[8],fe[7]=We[9],fe[8]=We[10],fe}function Y(fe){var We=new glMatrix.ARRAY_TYPE(9);return We[0]=fe[0],We[1]=fe[1],We[2]=fe[2],We[3]=fe[3],We[4]=fe[4],We[5]=fe[5],We[6]=fe[6],We[7]=fe[7],We[8]=fe[8],We}function N(fe,We){return fe[0]=We[0],fe[1]=We[1],fe[2]=We[2],fe[3]=We[3],fe[4]=We[4],fe[5]=We[5],fe[6]=We[6],fe[7]=We[7],fe[8]=We[8],fe}function I(fe,We,ht,Pt,Ve,it,ft,ze,Qe){var Se=new M.WT(9);return Se[0]=fe,Se[1]=We,Se[2]=ht,Se[3]=Pt,Se[4]=Ve,Se[5]=it,Se[6]=ft,Se[7]=ze,Se[8]=Qe,Se}function C(fe,We,ht,Pt,Ve,it,ft,ze,Qe,Se){return fe[0]=We,fe[1]=ht,fe[2]=Pt,fe[3]=Ve,fe[4]=it,fe[5]=ft,fe[6]=ze,fe[7]=Qe,fe[8]=Se,fe}function A(fe){return fe[0]=1,fe[1]=0,fe[2]=0,fe[3]=0,fe[4]=1,fe[5]=0,fe[6]=0,fe[7]=0,fe[8]=1,fe}function F(fe,We){if(fe===We){var ht=We[1],Pt=We[2],Ve=We[5];fe[1]=We[3],fe[2]=We[6],fe[3]=ht,fe[5]=We[7],fe[6]=Pt,fe[7]=Ve}else fe[0]=We[0],fe[1]=We[3],fe[2]=We[6],fe[3]=We[1],fe[4]=We[4],fe[5]=We[7],fe[6]=We[2],fe[7]=We[5],fe[8]=We[8];return fe}function P(fe,We){var ht=We[0],Pt=We[1],Ve=We[2],it=We[3],ft=We[4],ze=We[5],Qe=We[6],Se=We[7],E=We[8],me=E*ft-ze*Se,L=-E*it+ze*Qe,X=Se*it-ft*Qe,Ke=ht*me+Pt*L+Ve*X;return Ke?(Ke=1/Ke,fe[0]=me*Ke,fe[1]=(-E*Pt+Ve*Se)*Ke,fe[2]=(ze*Pt-Ve*ft)*Ke,fe[3]=L*Ke,fe[4]=(E*ht-Ve*Qe)*Ke,fe[5]=(-ze*ht+Ve*it)*Ke,fe[6]=X*Ke,fe[7]=(-Se*ht+Pt*Qe)*Ke,fe[8]=(ft*ht-Pt*it)*Ke,fe):null}function W(fe,We){var ht=We[0],Pt=We[1],Ve=We[2],it=We[3],ft=We[4],ze=We[5],Qe=We[6],Se=We[7],E=We[8];return fe[0]=ft*E-ze*Se,fe[1]=Ve*Se-Pt*E,fe[2]=Pt*ze-Ve*ft,fe[3]=ze*Qe-it*E,fe[4]=ht*E-Ve*Qe,fe[5]=Ve*it-ht*ze,fe[6]=it*Se-ft*Qe,fe[7]=Pt*Qe-ht*Se,fe[8]=ht*ft-Pt*it,fe}function K(fe){var We=fe[0],ht=fe[1],Pt=fe[2],Ve=fe[3],it=fe[4],ft=fe[5],ze=fe[6],Qe=fe[7],Se=fe[8];return We*(Se*it-ft*Qe)+ht*(-Se*Ve+ft*ze)+Pt*(Qe*Ve-it*ze)}function ge(fe,We,ht){var Pt=We[0],Ve=We[1],it=We[2],ft=We[3],ze=We[4],Qe=We[5],Se=We[6],E=We[7],me=We[8],L=ht[0],X=ht[1],Ke=ht[2],ot=ht[3],pe=ht[4],xe=ht[5],Ze=ht[6],O=ht[7],ne=ht[8];return fe[0]=L*Pt+X*ft+Ke*Se,fe[1]=L*Ve+X*ze+Ke*E,fe[2]=L*it+X*Qe+Ke*me,fe[3]=ot*Pt+pe*ft+xe*Se,fe[4]=ot*Ve+pe*ze+xe*E,fe[5]=ot*it+pe*Qe+xe*me,fe[6]=Ze*Pt+O*ft+ne*Se,fe[7]=Ze*Ve+O*ze+ne*E,fe[8]=Ze*it+O*Qe+ne*me,fe}function be(fe,We,ht){var Pt=We[0],Ve=We[1],it=We[2],ft=We[3],ze=We[4],Qe=We[5],Se=We[6],E=We[7],me=We[8],L=ht[0],X=ht[1];return fe[0]=Pt,fe[1]=Ve,fe[2]=it,fe[3]=ft,fe[4]=ze,fe[5]=Qe,fe[6]=L*Pt+X*ft+Se,fe[7]=L*Ve+X*ze+E,fe[8]=L*it+X*Qe+me,fe}function Ue(fe,We,ht){var Pt=We[0],Ve=We[1],it=We[2],ft=We[3],ze=We[4],Qe=We[5],Se=We[6],E=We[7],me=We[8],L=Math.sin(ht),X=Math.cos(ht);return fe[0]=X*Pt+L*ft,fe[1]=X*Ve+L*ze,fe[2]=X*it+L*Qe,fe[3]=X*ft-L*Pt,fe[4]=X*ze-L*Ve,fe[5]=X*Qe-L*it,fe[6]=Se,fe[7]=E,fe[8]=me,fe}function Ne(fe,We,ht){var Pt=ht[0],Ve=ht[1];return fe[0]=Pt*We[0],fe[1]=Pt*We[1],fe[2]=Pt*We[2],fe[3]=Ve*We[3],fe[4]=Ve*We[4],fe[5]=Ve*We[5],fe[6]=We[6],fe[7]=We[7],fe[8]=We[8],fe}function ye(fe,We){return fe[0]=1,fe[1]=0,fe[2]=0,fe[3]=0,fe[4]=1,fe[5]=0,fe[6]=We[0],fe[7]=We[1],fe[8]=1,fe}function De(fe,We){var ht=Math.sin(We),Pt=Math.cos(We);return fe[0]=Pt,fe[1]=ht,fe[2]=0,fe[3]=-ht,fe[4]=Pt,fe[5]=0,fe[6]=0,fe[7]=0,fe[8]=1,fe}function Ce(fe,We){return fe[0]=We[0],fe[1]=0,fe[2]=0,fe[3]=0,fe[4]=We[1],fe[5]=0,fe[6]=0,fe[7]=0,fe[8]=1,fe}function Me(fe,We){return fe[0]=We[0],fe[1]=We[1],fe[2]=0,fe[3]=We[2],fe[4]=We[3],fe[5]=0,fe[6]=We[4],fe[7]=We[5],fe[8]=1,fe}function Oe(fe,We){var ht=We[0],Pt=We[1],Ve=We[2],it=We[3],ft=ht+ht,ze=Pt+Pt,Qe=Ve+Ve,Se=ht*ft,E=Pt*ft,me=Pt*ze,L=Ve*ft,X=Ve*ze,Ke=Ve*Qe,ot=it*ft,pe=it*ze,xe=it*Qe;return fe[0]=1-me-Ke,fe[3]=E-xe,fe[6]=L+pe,fe[1]=E+xe,fe[4]=1-Se-Ke,fe[7]=X-ot,fe[2]=L-pe,fe[5]=X+ot,fe[8]=1-Se-me,fe}function re(fe,We){var ht=We[0],Pt=We[1],Ve=We[2],it=We[3],ft=We[4],ze=We[5],Qe=We[6],Se=We[7],E=We[8],me=We[9],L=We[10],X=We[11],Ke=We[12],ot=We[13],pe=We[14],xe=We[15],Ze=ht*ze-Pt*ft,O=ht*Qe-Ve*ft,ne=ht*Se-it*ft,qe=Pt*Qe-Ve*ze,dt=Pt*Se-it*ze,nt=Ve*Se-it*Qe,xt=E*ot-me*Ke,bt=E*pe-L*Ke,wt=E*xe-X*Ke,we=me*pe-L*ot,oe=me*xe-X*ot,Fe=L*xe-X*pe,Ye=Ze*Fe-O*oe+ne*we+qe*wt-dt*bt+nt*xt;return Ye?(Ye=1/Ye,fe[0]=(ze*Fe-Qe*oe+Se*we)*Ye,fe[1]=(Qe*wt-ft*Fe-Se*bt)*Ye,fe[2]=(ft*oe-ze*wt+Se*xt)*Ye,fe[3]=(Ve*oe-Pt*Fe-it*we)*Ye,fe[4]=(ht*Fe-Ve*wt+it*bt)*Ye,fe[5]=(Pt*wt-ht*oe-it*xt)*Ye,fe[6]=(ot*nt-pe*dt+xe*qe)*Ye,fe[7]=(pe*ne-Ke*nt-xe*O)*Ye,fe[8]=(Ke*dt-ot*ne+xe*Ze)*Ye,fe):null}function q(fe,We,ht){return fe[0]=2/We,fe[1]=0,fe[2]=0,fe[3]=0,fe[4]=-2/ht,fe[5]=0,fe[6]=-1,fe[7]=1,fe[8]=1,fe}function ce(fe){return"mat3("+fe[0]+", "+fe[1]+", "+fe[2]+", "+fe[3]+", "+fe[4]+", "+fe[5]+", "+fe[6]+", "+fe[7]+", "+fe[8]+")"}function Ee(fe){return Math.hypot(fe[0],fe[1],fe[2],fe[3],fe[4],fe[5],fe[6],fe[7],fe[8])}function Te(fe,We,ht){return fe[0]=We[0]+ht[0],fe[1]=We[1]+ht[1],fe[2]=We[2]+ht[2],fe[3]=We[3]+ht[3],fe[4]=We[4]+ht[4],fe[5]=We[5]+ht[5],fe[6]=We[6]+ht[6],fe[7]=We[7]+ht[7],fe[8]=We[8]+ht[8],fe}function Je(fe,We,ht){return fe[0]=We[0]-ht[0],fe[1]=We[1]-ht[1],fe[2]=We[2]-ht[2],fe[3]=We[3]-ht[3],fe[4]=We[4]-ht[4],fe[5]=We[5]-ht[5],fe[6]=We[6]-ht[6],fe[7]=We[7]-ht[7],fe[8]=We[8]-ht[8],fe}function He(fe,We,ht){return fe[0]=We[0]*ht,fe[1]=We[1]*ht,fe[2]=We[2]*ht,fe[3]=We[3]*ht,fe[4]=We[4]*ht,fe[5]=We[5]*ht,fe[6]=We[6]*ht,fe[7]=We[7]*ht,fe[8]=We[8]*ht,fe}function rt(fe,We,ht,Pt){return fe[0]=We[0]+ht[0]*Pt,fe[1]=We[1]+ht[1]*Pt,fe[2]=We[2]+ht[2]*Pt,fe[3]=We[3]+ht[3]*Pt,fe[4]=We[4]+ht[4]*Pt,fe[5]=We[5]+ht[5]*Pt,fe[6]=We[6]+ht[6]*Pt,fe[7]=We[7]+ht[7]*Pt,fe[8]=We[8]+ht[8]*Pt,fe}function Et(fe,We){return fe[0]===We[0]&&fe[1]===We[1]&&fe[2]===We[2]&&fe[3]===We[3]&&fe[4]===We[4]&&fe[5]===We[5]&&fe[6]===We[6]&&fe[7]===We[7]&&fe[8]===We[8]}function lt(fe,We){var ht=fe[0],Pt=fe[1],Ve=fe[2],it=fe[3],ft=fe[4],ze=fe[5],Qe=fe[6],Se=fe[7],E=fe[8],me=We[0],L=We[1],X=We[2],Ke=We[3],ot=We[4],pe=We[5],xe=We[6],Ze=We[7],O=We[8];return Math.abs(ht-me)<=glMatrix.EPSILON*Math.max(1,Math.abs(ht),Math.abs(me))&&Math.abs(Pt-L)<=glMatrix.EPSILON*Math.max(1,Math.abs(Pt),Math.abs(L))&&Math.abs(Ve-X)<=glMatrix.EPSILON*Math.max(1,Math.abs(Ve),Math.abs(X))&&Math.abs(it-Ke)<=glMatrix.EPSILON*Math.max(1,Math.abs(it),Math.abs(Ke))&&Math.abs(ft-ot)<=glMatrix.EPSILON*Math.max(1,Math.abs(ft),Math.abs(ot))&&Math.abs(ze-pe)<=glMatrix.EPSILON*Math.max(1,Math.abs(ze),Math.abs(pe))&&Math.abs(Qe-xe)<=glMatrix.EPSILON*Math.max(1,Math.abs(Qe),Math.abs(xe))&&Math.abs(Se-Ze)<=glMatrix.EPSILON*Math.max(1,Math.abs(Se),Math.abs(Ze))&&Math.abs(E-O)<=glMatrix.EPSILON*Math.max(1,Math.abs(E),Math.abs(O))}var st=null,mt=null},85975:function(ke,ve,k){"use strict";k.r(ve),k.d(ve,{add:function(){return me},adjoint:function(){return P},clone:function(){return U},copy:function(){return Y},create:function(){return H},determinant:function(){return W},equals:function(){return pe},exactEquals:function(){return ot},frob:function(){return E},fromQuat:function(){return st},fromQuat2:function(){return Te},fromRotation:function(){return Oe},fromRotationTranslation:function(){return Ee},fromRotationTranslationScale:function(){return Et},fromRotationTranslationScaleOrigin:function(){return lt},fromScaling:function(){return Me},fromTranslation:function(){return Ce},fromValues:function(){return N},fromXRotation:function(){return re},fromYRotation:function(){return q},fromZRotation:function(){return ce},frustum:function(){return mt},getRotation:function(){return rt},getScaling:function(){return He},getTranslation:function(){return Je},identity:function(){return C},invert:function(){return F},lookAt:function(){return ze},mul:function(){return xe},multiply:function(){return K},multiplyScalar:function(){return X},multiplyScalarAndAdd:function(){return Ke},ortho:function(){return it},orthoNO:function(){return Ve},orthoZO:function(){return ft},perspective:function(){return We},perspectiveFromFieldOfView:function(){return Pt},perspectiveNO:function(){return fe},perspectiveZO:function(){return ht},rotate:function(){return Ue},rotateX:function(){return Ne},rotateY:function(){return ye},rotateZ:function(){return De},scale:function(){return be},set:function(){return I},str:function(){return Se},sub:function(){return Ze},subtract:function(){return L},targetTo:function(){return Qe},translate:function(){return ge},transpose:function(){return A}});var M=k(49685);function H(){var O=new M.WT(16);return M.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 U(O){var ne=new M.WT(16);return ne[0]=O[0],ne[1]=O[1],ne[2]=O[2],ne[3]=O[3],ne[4]=O[4],ne[5]=O[5],ne[6]=O[6],ne[7]=O[7],ne[8]=O[8],ne[9]=O[9],ne[10]=O[10],ne[11]=O[11],ne[12]=O[12],ne[13]=O[13],ne[14]=O[14],ne[15]=O[15],ne}function Y(O,ne){return O[0]=ne[0],O[1]=ne[1],O[2]=ne[2],O[3]=ne[3],O[4]=ne[4],O[5]=ne[5],O[6]=ne[6],O[7]=ne[7],O[8]=ne[8],O[9]=ne[9],O[10]=ne[10],O[11]=ne[11],O[12]=ne[12],O[13]=ne[13],O[14]=ne[14],O[15]=ne[15],O}function N(O,ne,qe,dt,nt,xt,bt,wt,we,oe,Fe,Ye,ie,Ie,je,Be){var et=new M.WT(16);return et[0]=O,et[1]=ne,et[2]=qe,et[3]=dt,et[4]=nt,et[5]=xt,et[6]=bt,et[7]=wt,et[8]=we,et[9]=oe,et[10]=Fe,et[11]=Ye,et[12]=ie,et[13]=Ie,et[14]=je,et[15]=Be,et}function I(O,ne,qe,dt,nt,xt,bt,wt,we,oe,Fe,Ye,ie,Ie,je,Be,et){return O[0]=ne,O[1]=qe,O[2]=dt,O[3]=nt,O[4]=xt,O[5]=bt,O[6]=wt,O[7]=we,O[8]=oe,O[9]=Fe,O[10]=Ye,O[11]=ie,O[12]=Ie,O[13]=je,O[14]=Be,O[15]=et,O}function C(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 A(O,ne){if(O===ne){var qe=ne[1],dt=ne[2],nt=ne[3],xt=ne[6],bt=ne[7],wt=ne[11];O[1]=ne[4],O[2]=ne[8],O[3]=ne[12],O[4]=qe,O[6]=ne[9],O[7]=ne[13],O[8]=dt,O[9]=xt,O[11]=ne[14],O[12]=nt,O[13]=bt,O[14]=wt}else O[0]=ne[0],O[1]=ne[4],O[2]=ne[8],O[3]=ne[12],O[4]=ne[1],O[5]=ne[5],O[6]=ne[9],O[7]=ne[13],O[8]=ne[2],O[9]=ne[6],O[10]=ne[10],O[11]=ne[14],O[12]=ne[3],O[13]=ne[7],O[14]=ne[11],O[15]=ne[15];return O}function F(O,ne){var qe=ne[0],dt=ne[1],nt=ne[2],xt=ne[3],bt=ne[4],wt=ne[5],we=ne[6],oe=ne[7],Fe=ne[8],Ye=ne[9],ie=ne[10],Ie=ne[11],je=ne[12],Be=ne[13],et=ne[14],gt=ne[15],Mt=qe*wt-dt*bt,Rt=qe*we-nt*bt,Ft=qe*oe-xt*bt,Xt=dt*we-nt*wt,Qt=dt*oe-xt*wt,an=nt*oe-xt*we,In=Fe*Be-Ye*je,Xr=Fe*et-ie*je,Cn=Fe*gt-Ie*je,or=Ye*et-ie*Be,ei=Ye*gt-Ie*Be,mr=ie*gt-Ie*et,Fr=Mt*mr-Rt*ei+Ft*or+Xt*Cn-Qt*Xr+an*In;return Fr?(Fr=1/Fr,O[0]=(wt*mr-we*ei+oe*or)*Fr,O[1]=(nt*ei-dt*mr-xt*or)*Fr,O[2]=(Be*an-et*Qt+gt*Xt)*Fr,O[3]=(ie*Qt-Ye*an-Ie*Xt)*Fr,O[4]=(we*Cn-bt*mr-oe*Xr)*Fr,O[5]=(qe*mr-nt*Cn+xt*Xr)*Fr,O[6]=(et*Ft-je*an-gt*Rt)*Fr,O[7]=(Fe*an-ie*Ft+Ie*Rt)*Fr,O[8]=(bt*ei-wt*Cn+oe*In)*Fr,O[9]=(dt*Cn-qe*ei-xt*In)*Fr,O[10]=(je*Qt-Be*Ft+gt*Mt)*Fr,O[11]=(Ye*Ft-Fe*Qt-Ie*Mt)*Fr,O[12]=(wt*Xr-bt*or-we*In)*Fr,O[13]=(qe*or-dt*Xr+nt*In)*Fr,O[14]=(Be*Rt-je*Xt-et*Mt)*Fr,O[15]=(Fe*Xt-Ye*Rt+ie*Mt)*Fr,O):null}function P(O,ne){var qe=ne[0],dt=ne[1],nt=ne[2],xt=ne[3],bt=ne[4],wt=ne[5],we=ne[6],oe=ne[7],Fe=ne[8],Ye=ne[9],ie=ne[10],Ie=ne[11],je=ne[12],Be=ne[13],et=ne[14],gt=ne[15];return O[0]=wt*(ie*gt-Ie*et)-Ye*(we*gt-oe*et)+Be*(we*Ie-oe*ie),O[1]=-(dt*(ie*gt-Ie*et)-Ye*(nt*gt-xt*et)+Be*(nt*Ie-xt*ie)),O[2]=dt*(we*gt-oe*et)-wt*(nt*gt-xt*et)+Be*(nt*oe-xt*we),O[3]=-(dt*(we*Ie-oe*ie)-wt*(nt*Ie-xt*ie)+Ye*(nt*oe-xt*we)),O[4]=-(bt*(ie*gt-Ie*et)-Fe*(we*gt-oe*et)+je*(we*Ie-oe*ie)),O[5]=qe*(ie*gt-Ie*et)-Fe*(nt*gt-xt*et)+je*(nt*Ie-xt*ie),O[6]=-(qe*(we*gt-oe*et)-bt*(nt*gt-xt*et)+je*(nt*oe-xt*we)),O[7]=qe*(we*Ie-oe*ie)-bt*(nt*Ie-xt*ie)+Fe*(nt*oe-xt*we),O[8]=bt*(Ye*gt-Ie*Be)-Fe*(wt*gt-oe*Be)+je*(wt*Ie-oe*Ye),O[9]=-(qe*(Ye*gt-Ie*Be)-Fe*(dt*gt-xt*Be)+je*(dt*Ie-xt*Ye)),O[10]=qe*(wt*gt-oe*Be)-bt*(dt*gt-xt*Be)+je*(dt*oe-xt*wt),O[11]=-(qe*(wt*Ie-oe*Ye)-bt*(dt*Ie-xt*Ye)+Fe*(dt*oe-xt*wt)),O[12]=-(bt*(Ye*et-ie*Be)-Fe*(wt*et-we*Be)+je*(wt*ie-we*Ye)),O[13]=qe*(Ye*et-ie*Be)-Fe*(dt*et-nt*Be)+je*(dt*ie-nt*Ye),O[14]=-(qe*(wt*et-we*Be)-bt*(dt*et-nt*Be)+je*(dt*we-nt*wt)),O[15]=qe*(wt*ie-we*Ye)-bt*(dt*ie-nt*Ye)+Fe*(dt*we-nt*wt),O}function W(O){var ne=O[0],qe=O[1],dt=O[2],nt=O[3],xt=O[4],bt=O[5],wt=O[6],we=O[7],oe=O[8],Fe=O[9],Ye=O[10],ie=O[11],Ie=O[12],je=O[13],Be=O[14],et=O[15],gt=ne*bt-qe*xt,Mt=ne*wt-dt*xt,Rt=ne*we-nt*xt,Ft=qe*wt-dt*bt,Xt=qe*we-nt*bt,Qt=dt*we-nt*wt,an=oe*je-Fe*Ie,In=oe*Be-Ye*Ie,Xr=oe*et-ie*Ie,Cn=Fe*Be-Ye*je,or=Fe*et-ie*je,ei=Ye*et-ie*Be;return gt*ei-Mt*or+Rt*Cn+Ft*Xr-Xt*In+Qt*an}function K(O,ne,qe){var dt=ne[0],nt=ne[1],xt=ne[2],bt=ne[3],wt=ne[4],we=ne[5],oe=ne[6],Fe=ne[7],Ye=ne[8],ie=ne[9],Ie=ne[10],je=ne[11],Be=ne[12],et=ne[13],gt=ne[14],Mt=ne[15],Rt=qe[0],Ft=qe[1],Xt=qe[2],Qt=qe[3];return O[0]=Rt*dt+Ft*wt+Xt*Ye+Qt*Be,O[1]=Rt*nt+Ft*we+Xt*ie+Qt*et,O[2]=Rt*xt+Ft*oe+Xt*Ie+Qt*gt,O[3]=Rt*bt+Ft*Fe+Xt*je+Qt*Mt,Rt=qe[4],Ft=qe[5],Xt=qe[6],Qt=qe[7],O[4]=Rt*dt+Ft*wt+Xt*Ye+Qt*Be,O[5]=Rt*nt+Ft*we+Xt*ie+Qt*et,O[6]=Rt*xt+Ft*oe+Xt*Ie+Qt*gt,O[7]=Rt*bt+Ft*Fe+Xt*je+Qt*Mt,Rt=qe[8],Ft=qe[9],Xt=qe[10],Qt=qe[11],O[8]=Rt*dt+Ft*wt+Xt*Ye+Qt*Be,O[9]=Rt*nt+Ft*we+Xt*ie+Qt*et,O[10]=Rt*xt+Ft*oe+Xt*Ie+Qt*gt,O[11]=Rt*bt+Ft*Fe+Xt*je+Qt*Mt,Rt=qe[12],Ft=qe[13],Xt=qe[14],Qt=qe[15],O[12]=Rt*dt+Ft*wt+Xt*Ye+Qt*Be,O[13]=Rt*nt+Ft*we+Xt*ie+Qt*et,O[14]=Rt*xt+Ft*oe+Xt*Ie+Qt*gt,O[15]=Rt*bt+Ft*Fe+Xt*je+Qt*Mt,O}function ge(O,ne,qe){var dt=qe[0],nt=qe[1],xt=qe[2],bt,wt,we,oe,Fe,Ye,ie,Ie,je,Be,et,gt;return ne===O?(O[12]=ne[0]*dt+ne[4]*nt+ne[8]*xt+ne[12],O[13]=ne[1]*dt+ne[5]*nt+ne[9]*xt+ne[13],O[14]=ne[2]*dt+ne[6]*nt+ne[10]*xt+ne[14],O[15]=ne[3]*dt+ne[7]*nt+ne[11]*xt+ne[15]):(bt=ne[0],wt=ne[1],we=ne[2],oe=ne[3],Fe=ne[4],Ye=ne[5],ie=ne[6],Ie=ne[7],je=ne[8],Be=ne[9],et=ne[10],gt=ne[11],O[0]=bt,O[1]=wt,O[2]=we,O[3]=oe,O[4]=Fe,O[5]=Ye,O[6]=ie,O[7]=Ie,O[8]=je,O[9]=Be,O[10]=et,O[11]=gt,O[12]=bt*dt+Fe*nt+je*xt+ne[12],O[13]=wt*dt+Ye*nt+Be*xt+ne[13],O[14]=we*dt+ie*nt+et*xt+ne[14],O[15]=oe*dt+Ie*nt+gt*xt+ne[15]),O}function be(O,ne,qe){var dt=qe[0],nt=qe[1],xt=qe[2];return O[0]=ne[0]*dt,O[1]=ne[1]*dt,O[2]=ne[2]*dt,O[3]=ne[3]*dt,O[4]=ne[4]*nt,O[5]=ne[5]*nt,O[6]=ne[6]*nt,O[7]=ne[7]*nt,O[8]=ne[8]*xt,O[9]=ne[9]*xt,O[10]=ne[10]*xt,O[11]=ne[11]*xt,O[12]=ne[12],O[13]=ne[13],O[14]=ne[14],O[15]=ne[15],O}function Ue(O,ne,qe,dt){var nt=dt[0],xt=dt[1],bt=dt[2],wt=Math.hypot(nt,xt,bt),we,oe,Fe,Ye,ie,Ie,je,Be,et,gt,Mt,Rt,Ft,Xt,Qt,an,In,Xr,Cn,or,ei,mr,Fr,ta;return wt<M.Ib?null:(wt=1/wt,nt*=wt,xt*=wt,bt*=wt,we=Math.sin(qe),oe=Math.cos(qe),Fe=1-oe,Ye=ne[0],ie=ne[1],Ie=ne[2],je=ne[3],Be=ne[4],et=ne[5],gt=ne[6],Mt=ne[7],Rt=ne[8],Ft=ne[9],Xt=ne[10],Qt=ne[11],an=nt*nt*Fe+oe,In=xt*nt*Fe+bt*we,Xr=bt*nt*Fe-xt*we,Cn=nt*xt*Fe-bt*we,or=xt*xt*Fe+oe,ei=bt*xt*Fe+nt*we,mr=nt*bt*Fe+xt*we,Fr=xt*bt*Fe-nt*we,ta=bt*bt*Fe+oe,O[0]=Ye*an+Be*In+Rt*Xr,O[1]=ie*an+et*In+Ft*Xr,O[2]=Ie*an+gt*In+Xt*Xr,O[3]=je*an+Mt*In+Qt*Xr,O[4]=Ye*Cn+Be*or+Rt*ei,O[5]=ie*Cn+et*or+Ft*ei,O[6]=Ie*Cn+gt*or+Xt*ei,O[7]=je*Cn+Mt*or+Qt*ei,O[8]=Ye*mr+Be*Fr+Rt*ta,O[9]=ie*mr+et*Fr+Ft*ta,O[10]=Ie*mr+gt*Fr+Xt*ta,O[11]=je*mr+Mt*Fr+Qt*ta,ne!==O&&(O[12]=ne[12],O[13]=ne[13],O[14]=ne[14],O[15]=ne[15]),O)}function Ne(O,ne,qe){var dt=Math.sin(qe),nt=Math.cos(qe),xt=ne[4],bt=ne[5],wt=ne[6],we=ne[7],oe=ne[8],Fe=ne[9],Ye=ne[10],ie=ne[11];return ne!==O&&(O[0]=ne[0],O[1]=ne[1],O[2]=ne[2],O[3]=ne[3],O[12]=ne[12],O[13]=ne[13],O[14]=ne[14],O[15]=ne[15]),O[4]=xt*nt+oe*dt,O[5]=bt*nt+Fe*dt,O[6]=wt*nt+Ye*dt,O[7]=we*nt+ie*dt,O[8]=oe*nt-xt*dt,O[9]=Fe*nt-bt*dt,O[10]=Ye*nt-wt*dt,O[11]=ie*nt-we*dt,O}function ye(O,ne,qe){var dt=Math.sin(qe),nt=Math.cos(qe),xt=ne[0],bt=ne[1],wt=ne[2],we=ne[3],oe=ne[8],Fe=ne[9],Ye=ne[10],ie=ne[11];return ne!==O&&(O[4]=ne[4],O[5]=ne[5],O[6]=ne[6],O[7]=ne[7],O[12]=ne[12],O[13]=ne[13],O[14]=ne[14],O[15]=ne[15]),O[0]=xt*nt-oe*dt,O[1]=bt*nt-Fe*dt,O[2]=wt*nt-Ye*dt,O[3]=we*nt-ie*dt,O[8]=xt*dt+oe*nt,O[9]=bt*dt+Fe*nt,O[10]=wt*dt+Ye*nt,O[11]=we*dt+ie*nt,O}function De(O,ne,qe){var dt=Math.sin(qe),nt=Math.cos(qe),xt=ne[0],bt=ne[1],wt=ne[2],we=ne[3],oe=ne[4],Fe=ne[5],Ye=ne[6],ie=ne[7];return ne!==O&&(O[8]=ne[8],O[9]=ne[9],O[10]=ne[10],O[11]=ne[11],O[12]=ne[12],O[13]=ne[13],O[14]=ne[14],O[15]=ne[15]),O[0]=xt*nt+oe*dt,O[1]=bt*nt+Fe*dt,O[2]=wt*nt+Ye*dt,O[3]=we*nt+ie*dt,O[4]=oe*nt-xt*dt,O[5]=Fe*nt-bt*dt,O[6]=Ye*nt-wt*dt,O[7]=ie*nt-we*dt,O}function Ce(O,ne){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]=ne[0],O[13]=ne[1],O[14]=ne[2],O[15]=1,O}function Me(O,ne){return O[0]=ne[0],O[1]=0,O[2]=0,O[3]=0,O[4]=0,O[5]=ne[1],O[6]=0,O[7]=0,O[8]=0,O[9]=0,O[10]=ne[2],O[11]=0,O[12]=0,O[13]=0,O[14]=0,O[15]=1,O}function Oe(O,ne,qe){var dt=qe[0],nt=qe[1],xt=qe[2],bt=Math.hypot(dt,nt,xt),wt,we,oe;return bt<M.Ib?null:(bt=1/bt,dt*=bt,nt*=bt,xt*=bt,wt=Math.sin(ne),we=Math.cos(ne),oe=1-we,O[0]=dt*dt*oe+we,O[1]=nt*dt*oe+xt*wt,O[2]=xt*dt*oe-nt*wt,O[3]=0,O[4]=dt*nt*oe-xt*wt,O[5]=nt*nt*oe+we,O[6]=xt*nt*oe+dt*wt,O[7]=0,O[8]=dt*xt*oe+nt*wt,O[9]=nt*xt*oe-dt*wt,O[10]=xt*xt*oe+we,O[11]=0,O[12]=0,O[13]=0,O[14]=0,O[15]=1,O)}function re(O,ne){var qe=Math.sin(ne),dt=Math.cos(ne);return O[0]=1,O[1]=0,O[2]=0,O[3]=0,O[4]=0,O[5]=dt,O[6]=qe,O[7]=0,O[8]=0,O[9]=-qe,O[10]=dt,O[11]=0,O[12]=0,O[13]=0,O[14]=0,O[15]=1,O}function q(O,ne){var qe=Math.sin(ne),dt=Math.cos(ne);return O[0]=dt,O[1]=0,O[2]=-qe,O[3]=0,O[4]=0,O[5]=1,O[6]=0,O[7]=0,O[8]=qe,O[9]=0,O[10]=dt,O[11]=0,O[12]=0,O[13]=0,O[14]=0,O[15]=1,O}function ce(O,ne){var qe=Math.sin(ne),dt=Math.cos(ne);return O[0]=dt,O[1]=qe,O[2]=0,O[3]=0,O[4]=-qe,O[5]=dt,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 Ee(O,ne,qe){var dt=ne[0],nt=ne[1],xt=ne[2],bt=ne[3],wt=dt+dt,we=nt+nt,oe=xt+xt,Fe=dt*wt,Ye=dt*we,ie=dt*oe,Ie=nt*we,je=nt*oe,Be=xt*oe,et=bt*wt,gt=bt*we,Mt=bt*oe;return O[0]=1-(Ie+Be),O[1]=Ye+Mt,O[2]=ie-gt,O[3]=0,O[4]=Ye-Mt,O[5]=1-(Fe+Be),O[6]=je+et,O[7]=0,O[8]=ie+gt,O[9]=je-et,O[10]=1-(Fe+Ie),O[11]=0,O[12]=qe[0],O[13]=qe[1],O[14]=qe[2],O[15]=1,O}function Te(O,ne){var qe=new M.WT(3),dt=-ne[0],nt=-ne[1],xt=-ne[2],bt=ne[3],wt=ne[4],we=ne[5],oe=ne[6],Fe=ne[7],Ye=dt*dt+nt*nt+xt*xt+bt*bt;return Ye>0?(qe[0]=(wt*bt+Fe*dt+we*xt-oe*nt)*2/Ye,qe[1]=(we*bt+Fe*nt+oe*dt-wt*xt)*2/Ye,qe[2]=(oe*bt+Fe*xt+wt*nt-we*dt)*2/Ye):(qe[0]=(wt*bt+Fe*dt+we*xt-oe*nt)*2,qe[1]=(we*bt+Fe*nt+oe*dt-wt*xt)*2,qe[2]=(oe*bt+Fe*xt+wt*nt-we*dt)*2),Ee(O,ne,qe),O}function Je(O,ne){return O[0]=ne[12],O[1]=ne[13],O[2]=ne[14],O}function He(O,ne){var qe=ne[0],dt=ne[1],nt=ne[2],xt=ne[4],bt=ne[5],wt=ne[6],we=ne[8],oe=ne[9],Fe=ne[10];return O[0]=Math.hypot(qe,dt,nt),O[1]=Math.hypot(xt,bt,wt),O[2]=Math.hypot(we,oe,Fe),O}function rt(O,ne){var qe=new M.WT(3);He(qe,ne);var dt=1/qe[0],nt=1/qe[1],xt=1/qe[2],bt=ne[0]*dt,wt=ne[1]*nt,we=ne[2]*xt,oe=ne[4]*dt,Fe=ne[5]*nt,Ye=ne[6]*xt,ie=ne[8]*dt,Ie=ne[9]*nt,je=ne[10]*xt,Be=bt+Fe+je,et=0;return Be>0?(et=Math.sqrt(Be+1)*2,O[3]=.25*et,O[0]=(Ye-Ie)/et,O[1]=(ie-we)/et,O[2]=(wt-oe)/et):bt>Fe&&bt>je?(et=Math.sqrt(1+bt-Fe-je)*2,O[3]=(Ye-Ie)/et,O[0]=.25*et,O[1]=(wt+oe)/et,O[2]=(ie+we)/et):Fe>je?(et=Math.sqrt(1+Fe-bt-je)*2,O[3]=(ie-we)/et,O[0]=(wt+oe)/et,O[1]=.25*et,O[2]=(Ye+Ie)/et):(et=Math.sqrt(1+je-bt-Fe)*2,O[3]=(wt-oe)/et,O[0]=(ie+we)/et,O[1]=(Ye+Ie)/et,O[2]=.25*et),O}function Et(O,ne,qe,dt){var nt=ne[0],xt=ne[1],bt=ne[2],wt=ne[3],we=nt+nt,oe=xt+xt,Fe=bt+bt,Ye=nt*we,ie=nt*oe,Ie=nt*Fe,je=xt*oe,Be=xt*Fe,et=bt*Fe,gt=wt*we,Mt=wt*oe,Rt=wt*Fe,Ft=dt[0],Xt=dt[1],Qt=dt[2];return O[0]=(1-(je+et))*Ft,O[1]=(ie+Rt)*Ft,O[2]=(Ie-Mt)*Ft,O[3]=0,O[4]=(ie-Rt)*Xt,O[5]=(1-(Ye+et))*Xt,O[6]=(Be+gt)*Xt,O[7]=0,O[8]=(Ie+Mt)*Qt,O[9]=(Be-gt)*Qt,O[10]=(1-(Ye+je))*Qt,O[11]=0,O[12]=qe[0],O[13]=qe[1],O[14]=qe[2],O[15]=1,O}function lt(O,ne,qe,dt,nt){var xt=ne[0],bt=ne[1],wt=ne[2],we=ne[3],oe=xt+xt,Fe=bt+bt,Ye=wt+wt,ie=xt*oe,Ie=xt*Fe,je=xt*Ye,Be=bt*Fe,et=bt*Ye,gt=wt*Ye,Mt=we*oe,Rt=we*Fe,Ft=we*Ye,Xt=dt[0],Qt=dt[1],an=dt[2],In=nt[0],Xr=nt[1],Cn=nt[2],or=(1-(Be+gt))*Xt,ei=(Ie+Ft)*Xt,mr=(je-Rt)*Xt,Fr=(Ie-Ft)*Qt,ta=(1-(ie+gt))*Qt,Qa=(et+Mt)*Qt,Bt=(je+Rt)*an,en=(et-Mt)*an,Jt=(1-(ie+Be))*an;return O[0]=or,O[1]=ei,O[2]=mr,O[3]=0,O[4]=Fr,O[5]=ta,O[6]=Qa,O[7]=0,O[8]=Bt,O[9]=en,O[10]=Jt,O[11]=0,O[12]=qe[0]+In-(or*In+Fr*Xr+Bt*Cn),O[13]=qe[1]+Xr-(ei*In+ta*Xr+en*Cn),O[14]=qe[2]+Cn-(mr*In+Qa*Xr+Jt*Cn),O[15]=1,O}function st(O,ne){var qe=ne[0],dt=ne[1],nt=ne[2],xt=ne[3],bt=qe+qe,wt=dt+dt,we=nt+nt,oe=qe*bt,Fe=dt*bt,Ye=dt*wt,ie=nt*bt,Ie=nt*wt,je=nt*we,Be=xt*bt,et=xt*wt,gt=xt*we;return O[0]=1-Ye-je,O[1]=Fe+gt,O[2]=ie-et,O[3]=0,O[4]=Fe-gt,O[5]=1-oe-je,O[6]=Ie+Be,O[7]=0,O[8]=ie+et,O[9]=Ie-Be,O[10]=1-oe-Ye,O[11]=0,O[12]=0,O[13]=0,O[14]=0,O[15]=1,O}function mt(O,ne,qe,dt,nt,xt,bt){var wt=1/(qe-ne),we=1/(nt-dt),oe=1/(xt-bt);return O[0]=xt*2*wt,O[1]=0,O[2]=0,O[3]=0,O[4]=0,O[5]=xt*2*we,O[6]=0,O[7]=0,O[8]=(qe+ne)*wt,O[9]=(nt+dt)*we,O[10]=(bt+xt)*oe,O[11]=-1,O[12]=0,O[13]=0,O[14]=bt*xt*2*oe,O[15]=0,O}function fe(O,ne,qe,dt,nt){var xt=1/Math.tan(ne/2),bt;return O[0]=xt/qe,O[1]=0,O[2]=0,O[3]=0,O[4]=0,O[5]=xt,O[6]=0,O[7]=0,O[8]=0,O[9]=0,O[11]=-1,O[12]=0,O[13]=0,O[15]=0,nt!=null&&nt!==1/0?(bt=1/(dt-nt),O[10]=(nt+dt)*bt,O[14]=2*nt*dt*bt):(O[10]=-1,O[14]=-2*dt),O}var We=fe;function ht(O,ne,qe,dt,nt){var xt=1/Math.tan(ne/2),bt;return O[0]=xt/qe,O[1]=0,O[2]=0,O[3]=0,O[4]=0,O[5]=xt,O[6]=0,O[7]=0,O[8]=0,O[9]=0,O[11]=-1,O[12]=0,O[13]=0,O[15]=0,nt!=null&&nt!==1/0?(bt=1/(dt-nt),O[10]=nt*bt,O[14]=nt*dt*bt):(O[10]=-1,O[14]=-dt),O}function Pt(O,ne,qe,dt){var nt=Math.tan(ne.upDegrees*Math.PI/180),xt=Math.tan(ne.downDegrees*Math.PI/180),bt=Math.tan(ne.leftDegrees*Math.PI/180),wt=Math.tan(ne.rightDegrees*Math.PI/180),we=2/(bt+wt),oe=2/(nt+xt);return O[0]=we,O[1]=0,O[2]=0,O[3]=0,O[4]=0,O[5]=oe,O[6]=0,O[7]=0,O[8]=-((bt-wt)*we*.5),O[9]=(nt-xt)*oe*.5,O[10]=dt/(qe-dt),O[11]=-1,O[12]=0,O[13]=0,O[14]=dt*qe/(qe-dt),O[15]=0,O}function Ve(O,ne,qe,dt,nt,xt,bt){var wt=1/(ne-qe),we=1/(dt-nt),oe=1/(xt-bt);return O[0]=-2*wt,O[1]=0,O[2]=0,O[3]=0,O[4]=0,O[5]=-2*we,O[6]=0,O[7]=0,O[8]=0,O[9]=0,O[10]=2*oe,O[11]=0,O[12]=(ne+qe)*wt,O[13]=(nt+dt)*we,O[14]=(bt+xt)*oe,O[15]=1,O}var it=Ve;function ft(O,ne,qe,dt,nt,xt,bt){var wt=1/(ne-qe),we=1/(dt-nt),oe=1/(xt-bt);return O[0]=-2*wt,O[1]=0,O[2]=0,O[3]=0,O[4]=0,O[5]=-2*we,O[6]=0,O[7]=0,O[8]=0,O[9]=0,O[10]=oe,O[11]=0,O[12]=(ne+qe)*wt,O[13]=(nt+dt)*we,O[14]=xt*oe,O[15]=1,O}function ze(O,ne,qe,dt){var nt,xt,bt,wt,we,oe,Fe,Ye,ie,Ie,je=ne[0],Be=ne[1],et=ne[2],gt=dt[0],Mt=dt[1],Rt=dt[2],Ft=qe[0],Xt=qe[1],Qt=qe[2];return Math.abs(je-Ft)<M.Ib&&Math.abs(Be-Xt)<M.Ib&&Math.abs(et-Qt)<M.Ib?C(O):(Fe=je-Ft,Ye=Be-Xt,ie=et-Qt,Ie=1/Math.hypot(Fe,Ye,ie),Fe*=Ie,Ye*=Ie,ie*=Ie,nt=Mt*ie-Rt*Ye,xt=Rt*Fe-gt*ie,bt=gt*Ye-Mt*Fe,Ie=Math.hypot(nt,xt,bt),Ie?(Ie=1/Ie,nt*=Ie,xt*=Ie,bt*=Ie):(nt=0,xt=0,bt=0),wt=Ye*bt-ie*xt,we=ie*nt-Fe*bt,oe=Fe*xt-Ye*nt,Ie=Math.hypot(wt,we,oe),Ie?(Ie=1/Ie,wt*=Ie,we*=Ie,oe*=Ie):(wt=0,we=0,oe=0),O[0]=nt,O[1]=wt,O[2]=Fe,O[3]=0,O[4]=xt,O[5]=we,O[6]=Ye,O[7]=0,O[8]=bt,O[9]=oe,O[10]=ie,O[11]=0,O[12]=-(nt*je+xt*Be+bt*et),O[13]=-(wt*je+we*Be+oe*et),O[14]=-(Fe*je+Ye*Be+ie*et),O[15]=1,O)}function Qe(O,ne,qe,dt){var nt=ne[0],xt=ne[1],bt=ne[2],wt=dt[0],we=dt[1],oe=dt[2],Fe=nt-qe[0],Ye=xt-qe[1],ie=bt-qe[2],Ie=Fe*Fe+Ye*Ye+ie*ie;Ie>0&&(Ie=1/Math.sqrt(Ie),Fe*=Ie,Ye*=Ie,ie*=Ie);var je=we*ie-oe*Ye,Be=oe*Fe-wt*ie,et=wt*Ye-we*Fe;return Ie=je*je+Be*Be+et*et,Ie>0&&(Ie=1/Math.sqrt(Ie),je*=Ie,Be*=Ie,et*=Ie),O[0]=je,O[1]=Be,O[2]=et,O[3]=0,O[4]=Ye*et-ie*Be,O[5]=ie*je-Fe*et,O[6]=Fe*Be-Ye*je,O[7]=0,O[8]=Fe,O[9]=Ye,O[10]=ie,O[11]=0,O[12]=nt,O[13]=xt,O[14]=bt,O[15]=1,O}function Se(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 E(O){return Math.hypot(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 me(O,ne,qe){return O[0]=ne[0]+qe[0],O[1]=ne[1]+qe[1],O[2]=ne[2]+qe[2],O[3]=ne[3]+qe[3],O[4]=ne[4]+qe[4],O[5]=ne[5]+qe[5],O[6]=ne[6]+qe[6],O[7]=ne[7]+qe[7],O[8]=ne[8]+qe[8],O[9]=ne[9]+qe[9],O[10]=ne[10]+qe[10],O[11]=ne[11]+qe[11],O[12]=ne[12]+qe[12],O[13]=ne[13]+qe[13],O[14]=ne[14]+qe[14],O[15]=ne[15]+qe[15],O}function L(O,ne,qe){return O[0]=ne[0]-qe[0],O[1]=ne[1]-qe[1],O[2]=ne[2]-qe[2],O[3]=ne[3]-qe[3],O[4]=ne[4]-qe[4],O[5]=ne[5]-qe[5],O[6]=ne[6]-qe[6],O[7]=ne[7]-qe[7],O[8]=ne[8]-qe[8],O[9]=ne[9]-qe[9],O[10]=ne[10]-qe[10],O[11]=ne[11]-qe[11],O[12]=ne[12]-qe[12],O[13]=ne[13]-qe[13],O[14]=ne[14]-qe[14],O[15]=ne[15]-qe[15],O}function X(O,ne,qe){return O[0]=ne[0]*qe,O[1]=ne[1]*qe,O[2]=ne[2]*qe,O[3]=ne[3]*qe,O[4]=ne[4]*qe,O[5]=ne[5]*qe,O[6]=ne[6]*qe,O[7]=ne[7]*qe,O[8]=ne[8]*qe,O[9]=ne[9]*qe,O[10]=ne[10]*qe,O[11]=ne[11]*qe,O[12]=ne[12]*qe,O[13]=ne[13]*qe,O[14]=ne[14]*qe,O[15]=ne[15]*qe,O}function Ke(O,ne,qe,dt){return O[0]=ne[0]+qe[0]*dt,O[1]=ne[1]+qe[1]*dt,O[2]=ne[2]+qe[2]*dt,O[3]=ne[3]+qe[3]*dt,O[4]=ne[4]+qe[4]*dt,O[5]=ne[5]+qe[5]*dt,O[6]=ne[6]+qe[6]*dt,O[7]=ne[7]+qe[7]*dt,O[8]=ne[8]+qe[8]*dt,O[9]=ne[9]+qe[9]*dt,O[10]=ne[10]+qe[10]*dt,O[11]=ne[11]+qe[11]*dt,O[12]=ne[12]+qe[12]*dt,O[13]=ne[13]+qe[13]*dt,O[14]=ne[14]+qe[14]*dt,O[15]=ne[15]+qe[15]*dt,O}function ot(O,ne){return O[0]===ne[0]&&O[1]===ne[1]&&O[2]===ne[2]&&O[3]===ne[3]&&O[4]===ne[4]&&O[5]===ne[5]&&O[6]===ne[6]&&O[7]===ne[7]&&O[8]===ne[8]&&O[9]===ne[9]&&O[10]===ne[10]&&O[11]===ne[11]&&O[12]===ne[12]&&O[13]===ne[13]&&O[14]===ne[14]&&O[15]===ne[15]}function pe(O,ne){var qe=O[0],dt=O[1],nt=O[2],xt=O[3],bt=O[4],wt=O[5],we=O[6],oe=O[7],Fe=O[8],Ye=O[9],ie=O[10],Ie=O[11],je=O[12],Be=O[13],et=O[14],gt=O[15],Mt=ne[0],Rt=ne[1],Ft=ne[2],Xt=ne[3],Qt=ne[4],an=ne[5],In=ne[6],Xr=ne[7],Cn=ne[8],or=ne[9],ei=ne[10],mr=ne[11],Fr=ne[12],ta=ne[13],Qa=ne[14],Bt=ne[15];return Math.abs(qe-Mt)<=M.Ib*Math.max(1,Math.abs(qe),Math.abs(Mt))&&Math.abs(dt-Rt)<=M.Ib*Math.max(1,Math.abs(dt),Math.abs(Rt))&&Math.abs(nt-Ft)<=M.Ib*Math.max(1,Math.abs(nt),Math.abs(Ft))&&Math.abs(xt-Xt)<=M.Ib*Math.max(1,Math.abs(xt),Math.abs(Xt))&&Math.abs(bt-Qt)<=M.Ib*Math.max(1,Math.abs(bt),Math.abs(Qt))&&Math.abs(wt-an)<=M.Ib*Math.max(1,Math.abs(wt),Math.abs(an))&&Math.abs(we-In)<=M.Ib*Math.max(1,Math.abs(we),Math.abs(In))&&Math.abs(oe-Xr)<=M.Ib*Math.max(1,Math.abs(oe),Math.abs(Xr))&&Math.abs(Fe-Cn)<=M.Ib*Math.max(1,Math.abs(Fe),Math.abs(Cn))&&Math.abs(Ye-or)<=M.Ib*Math.max(1,Math.abs(Ye),Math.abs(or))&&Math.abs(ie-ei)<=M.Ib*Math.max(1,Math.abs(ie),Math.abs(ei))&&Math.abs(Ie-mr)<=M.Ib*Math.max(1,Math.abs(Ie),Math.abs(mr))&&Math.abs(je-Fr)<=M.Ib*Math.max(1,Math.abs(je),Math.abs(Fr))&&Math.abs(Be-ta)<=M.Ib*Math.max(1,Math.abs(Be),Math.abs(ta))&&Math.abs(et-Qa)<=M.Ib*Math.max(1,Math.abs(et),Math.abs(Qa))&&Math.abs(gt-Bt)<=M.Ib*Math.max(1,Math.abs(gt),Math.abs(Bt))}var xe=K,Ze=L},32945:function(ke,ve,k){"use strict";k.d(ve,{Fv:function(){return Ve},JG:function(){return Je},Jp:function(){return P},Su:function(){return q},U_:function(){return Me},Ue:function(){return N},al:function(){return Te},dC:function(){return Et},t8:function(){return He},yY:function(){return C}});var M=k(49685),H=k(35600),U=k(33983),Y=k(98333);function N(){var E=new M.WT(4);return M.WT!=Float32Array&&(E[0]=0,E[1]=0,E[2]=0),E[3]=1,E}function I(E){return E[0]=0,E[1]=0,E[2]=0,E[3]=1,E}function C(E,me,L){L=L*.5;var X=Math.sin(L);return E[0]=X*me[0],E[1]=X*me[1],E[2]=X*me[2],E[3]=Math.cos(L),E}function A(E,me){var L=Math.acos(me[3])*2,X=Math.sin(L/2);return X>glMatrix.EPSILON?(E[0]=me[0]/X,E[1]=me[1]/X,E[2]=me[2]/X):(E[0]=1,E[1]=0,E[2]=0),L}function F(E,me){var L=st(E,me);return Math.acos(2*L*L-1)}function P(E,me,L){var X=me[0],Ke=me[1],ot=me[2],pe=me[3],xe=L[0],Ze=L[1],O=L[2],ne=L[3];return E[0]=X*ne+pe*xe+Ke*O-ot*Ze,E[1]=Ke*ne+pe*Ze+ot*xe-X*O,E[2]=ot*ne+pe*O+X*Ze-Ke*xe,E[3]=pe*ne-X*xe-Ke*Ze-ot*O,E}function W(E,me,L){L*=.5;var X=me[0],Ke=me[1],ot=me[2],pe=me[3],xe=Math.sin(L),Ze=Math.cos(L);return E[0]=X*Ze+pe*xe,E[1]=Ke*Ze+ot*xe,E[2]=ot*Ze-Ke*xe,E[3]=pe*Ze-X*xe,E}function K(E,me,L){L*=.5;var X=me[0],Ke=me[1],ot=me[2],pe=me[3],xe=Math.sin(L),Ze=Math.cos(L);return E[0]=X*Ze-ot*xe,E[1]=Ke*Ze+pe*xe,E[2]=ot*Ze+X*xe,E[3]=pe*Ze-Ke*xe,E}function ge(E,me,L){L*=.5;var X=me[0],Ke=me[1],ot=me[2],pe=me[3],xe=Math.sin(L),Ze=Math.cos(L);return E[0]=X*Ze+Ke*xe,E[1]=Ke*Ze-X*xe,E[2]=ot*Ze+pe*xe,E[3]=pe*Ze-ot*xe,E}function be(E,me){var L=me[0],X=me[1],Ke=me[2];return E[0]=L,E[1]=X,E[2]=Ke,E[3]=Math.sqrt(Math.abs(1-L*L-X*X-Ke*Ke)),E}function Ue(E,me){var L=me[0],X=me[1],Ke=me[2],ot=me[3],pe=Math.sqrt(L*L+X*X+Ke*Ke),xe=Math.exp(ot),Ze=pe>0?xe*Math.sin(pe)/pe:0;return E[0]=L*Ze,E[1]=X*Ze,E[2]=Ke*Ze,E[3]=xe*Math.cos(pe),E}function Ne(E,me){var L=me[0],X=me[1],Ke=me[2],ot=me[3],pe=Math.sqrt(L*L+X*X+Ke*Ke),xe=pe>0?Math.atan2(pe,ot)/pe:0;return E[0]=L*xe,E[1]=X*xe,E[2]=Ke*xe,E[3]=.5*Math.log(L*L+X*X+Ke*Ke+ot*ot),E}function ye(E,me,L){return Ne(E,me),lt(E,E,L),Ue(E,E),E}function De(E,me,L,X){var Ke=me[0],ot=me[1],pe=me[2],xe=me[3],Ze=L[0],O=L[1],ne=L[2],qe=L[3],dt,nt,xt,bt,wt;return nt=Ke*Ze+ot*O+pe*ne+xe*qe,nt<0&&(nt=-nt,Ze=-Ze,O=-O,ne=-ne,qe=-qe),1-nt>M.Ib?(dt=Math.acos(nt),xt=Math.sin(dt),bt=Math.sin((1-X)*dt)/xt,wt=Math.sin(X*dt)/xt):(bt=1-X,wt=X),E[0]=bt*Ke+wt*Ze,E[1]=bt*ot+wt*O,E[2]=bt*pe+wt*ne,E[3]=bt*xe+wt*qe,E}function Ce(E){var me=glMatrix.RANDOM(),L=glMatrix.RANDOM(),X=glMatrix.RANDOM(),Ke=Math.sqrt(1-me),ot=Math.sqrt(me);return E[0]=Ke*Math.sin(2*Math.PI*L),E[1]=Ke*Math.cos(2*Math.PI*L),E[2]=ot*Math.sin(2*Math.PI*X),E[3]=ot*Math.cos(2*Math.PI*X),E}function Me(E,me){var L=me[0],X=me[1],Ke=me[2],ot=me[3],pe=L*L+X*X+Ke*Ke+ot*ot,xe=pe?1/pe:0;return E[0]=-L*xe,E[1]=-X*xe,E[2]=-Ke*xe,E[3]=ot*xe,E}function Oe(E,me){return E[0]=-me[0],E[1]=-me[1],E[2]=-me[2],E[3]=me[3],E}function re(E,me){var L=me[0]+me[4]+me[8],X;if(L>0)X=Math.sqrt(L+1),E[3]=.5*X,X=.5/X,E[0]=(me[5]-me[7])*X,E[1]=(me[6]-me[2])*X,E[2]=(me[1]-me[3])*X;else{var Ke=0;me[4]>me[0]&&(Ke=1),me[8]>me[Ke*3+Ke]&&(Ke=2);var ot=(Ke+1)%3,pe=(Ke+2)%3;X=Math.sqrt(me[Ke*3+Ke]-me[ot*3+ot]-me[pe*3+pe]+1),E[Ke]=.5*X,X=.5/X,E[3]=(me[ot*3+pe]-me[pe*3+ot])*X,E[ot]=(me[ot*3+Ke]+me[Ke*3+ot])*X,E[pe]=(me[pe*3+Ke]+me[Ke*3+pe])*X}return E}function q(E,me,L,X){var Ke=.5*Math.PI/180;me*=Ke,L*=Ke,X*=Ke;var ot=Math.sin(me),pe=Math.cos(me),xe=Math.sin(L),Ze=Math.cos(L),O=Math.sin(X),ne=Math.cos(X);return E[0]=ot*Ze*ne-pe*xe*O,E[1]=pe*xe*ne+ot*Ze*O,E[2]=pe*Ze*O-ot*xe*ne,E[3]=pe*Ze*ne+ot*xe*O,E}function ce(E){return"quat("+E[0]+", "+E[1]+", "+E[2]+", "+E[3]+")"}var Ee=Y.d9,Te=Y.al,Je=Y.JG,He=Y.t8,rt=Y.IH,Et=P,lt=Y.bA,st=Y.AK,mt=Y.t7,fe=Y.kE,We=null,ht=Y.we,Pt=null,Ve=Y.Fv,it=Y.I6,ft=Y.fS,ze=function(){var E=U.Ue(),me=U.al(1,0,0),L=U.al(0,1,0);return function(X,Ke,ot){var pe=U.AK(Ke,ot);return pe<-.999999?(U.kC(E,me,Ke),U.Zh(E)<1e-6&&U.kC(E,L,Ke),U.Fv(E,E),C(X,E,Math.PI),X):pe>.999999?(X[0]=0,X[1]=0,X[2]=0,X[3]=1,X):(U.kC(E,Ke,ot),X[0]=E[0],X[1]=E[1],X[2]=E[2],X[3]=1+pe,Ve(X,X))}}(),Qe=function(){var E=N(),me=N();return function(L,X,Ke,ot,pe,xe){return De(E,X,pe,xe),De(me,Ke,ot,xe),De(L,E,me,2*xe*(1-xe)),L}}(),Se=function(){var E=H.Ue();return function(me,L,X,Ke){return E[0]=X[0],E[3]=X[1],E[6]=X[2],E[1]=Ke[0],E[4]=Ke[1],E[7]=Ke[2],E[2]=-L[0],E[5]=-L[1],E[8]=-L[2],Ve(me,re(me,E))}}()},31437:function(ke,ve,k){"use strict";k.d(ve,{AK:function(){return Ee},Fv:function(){return ce},I6:function(){return Pt},JG:function(){return N},Ue:function(){return H},t8:function(){return I}});var M=k(49685);function H(){var X=new M.WT(2);return M.WT!=Float32Array&&(X[0]=0,X[1]=0),X}function U(X){var Ke=new glMatrix.ARRAY_TYPE(2);return Ke[0]=X[0],Ke[1]=X[1],Ke}function Y(X,Ke){var ot=new glMatrix.ARRAY_TYPE(2);return ot[0]=X,ot[1]=Ke,ot}function N(X,Ke){return X[0]=Ke[0],X[1]=Ke[1],X}function I(X,Ke,ot){return X[0]=Ke,X[1]=ot,X}function C(X,Ke,ot){return X[0]=Ke[0]+ot[0],X[1]=Ke[1]+ot[1],X}function A(X,Ke,ot){return X[0]=Ke[0]-ot[0],X[1]=Ke[1]-ot[1],X}function F(X,Ke,ot){return X[0]=Ke[0]*ot[0],X[1]=Ke[1]*ot[1],X}function P(X,Ke,ot){return X[0]=Ke[0]/ot[0],X[1]=Ke[1]/ot[1],X}function W(X,Ke){return X[0]=Math.ceil(Ke[0]),X[1]=Math.ceil(Ke[1]),X}function K(X,Ke){return X[0]=Math.floor(Ke[0]),X[1]=Math.floor(Ke[1]),X}function ge(X,Ke,ot){return X[0]=Math.min(Ke[0],ot[0]),X[1]=Math.min(Ke[1],ot[1]),X}function be(X,Ke,ot){return X[0]=Math.max(Ke[0],ot[0]),X[1]=Math.max(Ke[1],ot[1]),X}function Ue(X,Ke){return X[0]=Math.round(Ke[0]),X[1]=Math.round(Ke[1]),X}function Ne(X,Ke,ot){return X[0]=Ke[0]*ot,X[1]=Ke[1]*ot,X}function ye(X,Ke,ot,pe){return X[0]=Ke[0]+ot[0]*pe,X[1]=Ke[1]+ot[1]*pe,X}function De(X,Ke){var ot=Ke[0]-X[0],pe=Ke[1]-X[1];return Math.hypot(ot,pe)}function Ce(X,Ke){var ot=Ke[0]-X[0],pe=Ke[1]-X[1];return ot*ot+pe*pe}function Me(X){var Ke=X[0],ot=X[1];return Math.hypot(Ke,ot)}function Oe(X){var Ke=X[0],ot=X[1];return Ke*Ke+ot*ot}function re(X,Ke){return X[0]=-Ke[0],X[1]=-Ke[1],X}function q(X,Ke){return X[0]=1/Ke[0],X[1]=1/Ke[1],X}function ce(X,Ke){var ot=Ke[0],pe=Ke[1],xe=ot*ot+pe*pe;return xe>0&&(xe=1/Math.sqrt(xe)),X[0]=Ke[0]*xe,X[1]=Ke[1]*xe,X}function Ee(X,Ke){return X[0]*Ke[0]+X[1]*Ke[1]}function Te(X,Ke,ot){var pe=Ke[0]*ot[1]-Ke[1]*ot[0];return X[0]=X[1]=0,X[2]=pe,X}function Je(X,Ke,ot,pe){var xe=Ke[0],Ze=Ke[1];return X[0]=xe+pe*(ot[0]-xe),X[1]=Ze+pe*(ot[1]-Ze),X}function He(X,Ke){Ke=Ke||1;var ot=glMatrix.RANDOM()*2*Math.PI;return X[0]=Math.cos(ot)*Ke,X[1]=Math.sin(ot)*Ke,X}function rt(X,Ke,ot){var pe=Ke[0],xe=Ke[1];return X[0]=ot[0]*pe+ot[2]*xe,X[1]=ot[1]*pe+ot[3]*xe,X}function Et(X,Ke,ot){var pe=Ke[0],xe=Ke[1];return X[0]=ot[0]*pe+ot[2]*xe+ot[4],X[1]=ot[1]*pe+ot[3]*xe+ot[5],X}function lt(X,Ke,ot){var pe=Ke[0],xe=Ke[1];return X[0]=ot[0]*pe+ot[3]*xe+ot[6],X[1]=ot[1]*pe+ot[4]*xe+ot[7],X}function st(X,Ke,ot){var pe=Ke[0],xe=Ke[1];return X[0]=ot[0]*pe+ot[4]*xe+ot[12],X[1]=ot[1]*pe+ot[5]*xe+ot[13],X}function mt(X,Ke,ot,pe){var xe=Ke[0]-ot[0],Ze=Ke[1]-ot[1],O=Math.sin(pe),ne=Math.cos(pe);return X[0]=xe*ne-Ze*O+ot[0],X[1]=xe*O+Ze*ne+ot[1],X}function fe(X,Ke){var ot=X[0],pe=X[1],xe=Ke[0],Ze=Ke[1],O=Math.sqrt(ot*ot+pe*pe)*Math.sqrt(xe*xe+Ze*Ze),ne=O&&(ot*xe+pe*Ze)/O;return Math.acos(Math.min(Math.max(ne,-1),1))}function We(X){return X[0]=0,X[1]=0,X}function ht(X){return"vec2("+X[0]+", "+X[1]+")"}function Pt(X,Ke){return X[0]===Ke[0]&&X[1]===Ke[1]}function Ve(X,Ke){var ot=X[0],pe=X[1],xe=Ke[0],Ze=Ke[1];return Math.abs(ot-xe)<=glMatrix.EPSILON*Math.max(1,Math.abs(ot),Math.abs(xe))&&Math.abs(pe-Ze)<=glMatrix.EPSILON*Math.max(1,Math.abs(pe),Math.abs(Ze))}var it=null,ft=null,ze=null,Qe=null,Se=null,E=null,me=null,L=function(){var X=H();return function(Ke,ot,pe,xe,Ze,O){var ne,qe;for(ot||(ot=2),pe||(pe=0),xe?qe=Math.min(xe*ot+pe,Ke.length):qe=Ke.length,ne=pe;ne<qe;ne+=ot)X[0]=Ke[ne],X[1]=Ke[ne+1],Ze(X,X,O),Ke[ne]=X[0],Ke[ne+1]=X[1];return Ke}}()},33983:function(ke,ve,k){"use strict";k.d(ve,{$X:function(){return F},AK:function(){return Ee},Fp:function(){return Ue},Fv:function(){return ce},IH:function(){return A},JG:function(){return I},Jp:function(){return P},TK:function(){return me},Ue:function(){return H},VC:function(){return mt},VV:function(){return be},Zh:function(){return X},al:function(){return N},bA:function(){return ye},d9:function(){return U},fF:function(){return lt},fS:function(){return ze},kC:function(){return Te},kE:function(){return Y},kK:function(){return st},lu:function(){return Qe},t7:function(){return Je},t8:function(){return C}});var M=k(49685);function H(){var pe=new M.WT(3);return M.WT!=Float32Array&&(pe[0]=0,pe[1]=0,pe[2]=0),pe}function U(pe){var xe=new M.WT(3);return xe[0]=pe[0],xe[1]=pe[1],xe[2]=pe[2],xe}function Y(pe){var xe=pe[0],Ze=pe[1],O=pe[2];return Math.hypot(xe,Ze,O)}function N(pe,xe,Ze){var O=new M.WT(3);return O[0]=pe,O[1]=xe,O[2]=Ze,O}function I(pe,xe){return pe[0]=xe[0],pe[1]=xe[1],pe[2]=xe[2],pe}function C(pe,xe,Ze,O){return pe[0]=xe,pe[1]=Ze,pe[2]=O,pe}function A(pe,xe,Ze){return pe[0]=xe[0]+Ze[0],pe[1]=xe[1]+Ze[1],pe[2]=xe[2]+Ze[2],pe}function F(pe,xe,Ze){return pe[0]=xe[0]-Ze[0],pe[1]=xe[1]-Ze[1],pe[2]=xe[2]-Ze[2],pe}function P(pe,xe,Ze){return pe[0]=xe[0]*Ze[0],pe[1]=xe[1]*Ze[1],pe[2]=xe[2]*Ze[2],pe}function W(pe,xe,Ze){return pe[0]=xe[0]/Ze[0],pe[1]=xe[1]/Ze[1],pe[2]=xe[2]/Ze[2],pe}function K(pe,xe){return pe[0]=Math.ceil(xe[0]),pe[1]=Math.ceil(xe[1]),pe[2]=Math.ceil(xe[2]),pe}function ge(pe,xe){return pe[0]=Math.floor(xe[0]),pe[1]=Math.floor(xe[1]),pe[2]=Math.floor(xe[2]),pe}function be(pe,xe,Ze){return pe[0]=Math.min(xe[0],Ze[0]),pe[1]=Math.min(xe[1],Ze[1]),pe[2]=Math.min(xe[2],Ze[2]),pe}function Ue(pe,xe,Ze){return pe[0]=Math.max(xe[0],Ze[0]),pe[1]=Math.max(xe[1],Ze[1]),pe[2]=Math.max(xe[2],Ze[2]),pe}function Ne(pe,xe){return pe[0]=Math.round(xe[0]),pe[1]=Math.round(xe[1]),pe[2]=Math.round(xe[2]),pe}function ye(pe,xe,Ze){return pe[0]=xe[0]*Ze,pe[1]=xe[1]*Ze,pe[2]=xe[2]*Ze,pe}function De(pe,xe,Ze,O){return pe[0]=xe[0]+Ze[0]*O,pe[1]=xe[1]+Ze[1]*O,pe[2]=xe[2]+Ze[2]*O,pe}function Ce(pe,xe){var Ze=xe[0]-pe[0],O=xe[1]-pe[1],ne=xe[2]-pe[2];return Math.hypot(Ze,O,ne)}function Me(pe,xe){var Ze=xe[0]-pe[0],O=xe[1]-pe[1],ne=xe[2]-pe[2];return Ze*Ze+O*O+ne*ne}function Oe(pe){var xe=pe[0],Ze=pe[1],O=pe[2];return xe*xe+Ze*Ze+O*O}function re(pe,xe){return pe[0]=-xe[0],pe[1]=-xe[1],pe[2]=-xe[2],pe}function q(pe,xe){return pe[0]=1/xe[0],pe[1]=1/xe[1],pe[2]=1/xe[2],pe}function ce(pe,xe){var Ze=xe[0],O=xe[1],ne=xe[2],qe=Ze*Ze+O*O+ne*ne;return qe>0&&(qe=1/Math.sqrt(qe)),pe[0]=xe[0]*qe,pe[1]=xe[1]*qe,pe[2]=xe[2]*qe,pe}function Ee(pe,xe){return pe[0]*xe[0]+pe[1]*xe[1]+pe[2]*xe[2]}function Te(pe,xe,Ze){var O=xe[0],ne=xe[1],qe=xe[2],dt=Ze[0],nt=Ze[1],xt=Ze[2];return pe[0]=ne*xt-qe*nt,pe[1]=qe*dt-O*xt,pe[2]=O*nt-ne*dt,pe}function Je(pe,xe,Ze,O){var ne=xe[0],qe=xe[1],dt=xe[2];return pe[0]=ne+O*(Ze[0]-ne),pe[1]=qe+O*(Ze[1]-qe),pe[2]=dt+O*(Ze[2]-dt),pe}function He(pe,xe,Ze,O,ne,qe){var dt=qe*qe,nt=dt*(2*qe-3)+1,xt=dt*(qe-2)+qe,bt=dt*(qe-1),wt=dt*(3-2*qe);return pe[0]=xe[0]*nt+Ze[0]*xt+O[0]*bt+ne[0]*wt,pe[1]=xe[1]*nt+Ze[1]*xt+O[1]*bt+ne[1]*wt,pe[2]=xe[2]*nt+Ze[2]*xt+O[2]*bt+ne[2]*wt,pe}function rt(pe,xe,Ze,O,ne,qe){var dt=1-qe,nt=dt*dt,xt=qe*qe,bt=nt*dt,wt=3*qe*nt,we=3*xt*dt,oe=xt*qe;return pe[0]=xe[0]*bt+Ze[0]*wt+O[0]*we+ne[0]*oe,pe[1]=xe[1]*bt+Ze[1]*wt+O[1]*we+ne[1]*oe,pe[2]=xe[2]*bt+Ze[2]*wt+O[2]*we+ne[2]*oe,pe}function Et(pe,xe){xe=xe||1;var Ze=glMatrix.RANDOM()*2*Math.PI,O=glMatrix.RANDOM()*2-1,ne=Math.sqrt(1-O*O)*xe;return pe[0]=Math.cos(Ze)*ne,pe[1]=Math.sin(Ze)*ne,pe[2]=O*xe,pe}function lt(pe,xe,Ze){var O=xe[0],ne=xe[1],qe=xe[2],dt=Ze[3]*O+Ze[7]*ne+Ze[11]*qe+Ze[15];return dt=dt||1,pe[0]=(Ze[0]*O+Ze[4]*ne+Ze[8]*qe+Ze[12])/dt,pe[1]=(Ze[1]*O+Ze[5]*ne+Ze[9]*qe+Ze[13])/dt,pe[2]=(Ze[2]*O+Ze[6]*ne+Ze[10]*qe+Ze[14])/dt,pe}function st(pe,xe,Ze){var O=xe[0],ne=xe[1],qe=xe[2];return pe[0]=O*Ze[0]+ne*Ze[3]+qe*Ze[6],pe[1]=O*Ze[1]+ne*Ze[4]+qe*Ze[7],pe[2]=O*Ze[2]+ne*Ze[5]+qe*Ze[8],pe}function mt(pe,xe,Ze){var O=Ze[0],ne=Ze[1],qe=Ze[2],dt=Ze[3],nt=xe[0],xt=xe[1],bt=xe[2],wt=ne*bt-qe*xt,we=qe*nt-O*bt,oe=O*xt-ne*nt,Fe=ne*oe-qe*we,Ye=qe*wt-O*oe,ie=O*we-ne*wt,Ie=dt*2;return wt*=Ie,we*=Ie,oe*=Ie,Fe*=2,Ye*=2,ie*=2,pe[0]=nt+wt+Fe,pe[1]=xt+we+Ye,pe[2]=bt+oe+ie,pe}function fe(pe,xe,Ze,O){var ne=[],qe=[];return ne[0]=xe[0]-Ze[0],ne[1]=xe[1]-Ze[1],ne[2]=xe[2]-Ze[2],qe[0]=ne[0],qe[1]=ne[1]*Math.cos(O)-ne[2]*Math.sin(O),qe[2]=ne[1]*Math.sin(O)+ne[2]*Math.cos(O),pe[0]=qe[0]+Ze[0],pe[1]=qe[1]+Ze[1],pe[2]=qe[2]+Ze[2],pe}function We(pe,xe,Ze,O){var ne=[],qe=[];return ne[0]=xe[0]-Ze[0],ne[1]=xe[1]-Ze[1],ne[2]=xe[2]-Ze[2],qe[0]=ne[2]*Math.sin(O)+ne[0]*Math.cos(O),qe[1]=ne[1],qe[2]=ne[2]*Math.cos(O)-ne[0]*Math.sin(O),pe[0]=qe[0]+Ze[0],pe[1]=qe[1]+Ze[1],pe[2]=qe[2]+Ze[2],pe}function ht(pe,xe,Ze,O){var ne=[],qe=[];return ne[0]=xe[0]-Ze[0],ne[1]=xe[1]-Ze[1],ne[2]=xe[2]-Ze[2],qe[0]=ne[0]*Math.cos(O)-ne[1]*Math.sin(O),qe[1]=ne[0]*Math.sin(O)+ne[1]*Math.cos(O),qe[2]=ne[2],pe[0]=qe[0]+Ze[0],pe[1]=qe[1]+Ze[1],pe[2]=qe[2]+Ze[2],pe}function Pt(pe,xe){var Ze=pe[0],O=pe[1],ne=pe[2],qe=xe[0],dt=xe[1],nt=xe[2],xt=Math.sqrt(Ze*Ze+O*O+ne*ne),bt=Math.sqrt(qe*qe+dt*dt+nt*nt),wt=xt*bt,we=wt&&Ee(pe,xe)/wt;return Math.acos(Math.min(Math.max(we,-1),1))}function Ve(pe){return pe[0]=0,pe[1]=0,pe[2]=0,pe}function it(pe){return"vec3("+pe[0]+", "+pe[1]+", "+pe[2]+")"}function ft(pe,xe){return pe[0]===xe[0]&&pe[1]===xe[1]&&pe[2]===xe[2]}function ze(pe,xe){var Ze=pe[0],O=pe[1],ne=pe[2],qe=xe[0],dt=xe[1],nt=xe[2];return Math.abs(Ze-qe)<=M.Ib*Math.max(1,Math.abs(Ze),Math.abs(qe))&&Math.abs(O-dt)<=M.Ib*Math.max(1,Math.abs(O),Math.abs(dt))&&Math.abs(ne-nt)<=M.Ib*Math.max(1,Math.abs(ne),Math.abs(nt))}var Qe=F,Se=null,E=null,me=Ce,L=null,X=Y,Ke=null,ot=function(){var pe=H();return function(xe,Ze,O,ne,qe,dt){var nt,xt;for(Ze||(Ze=3),O||(O=0),ne?xt=Math.min(ne*Ze+O,xe.length):xt=xe.length,nt=O;nt<xt;nt+=Ze)pe[0]=xe[nt],pe[1]=xe[nt+1],pe[2]=xe[nt+2],qe(pe,pe,dt),xe[nt]=pe[0],xe[nt+1]=pe[1],xe[nt+2]=pe[2];return xe}}()},98333:function(ke,ve,k){"use strict";k.d(ve,{AK:function(){return Ee},Fv:function(){return ce},I6:function(){return mt},IH:function(){return C},JG:function(){return N},Ue:function(){return H},al:function(){return Y},bA:function(){return Ne},d9:function(){return U},fF:function(){return rt},fS:function(){return fe},kE:function(){return Me},t7:function(){return Je},t8:function(){return I},we:function(){return Oe}});var M=k(49685);function H(){var Se=new M.WT(4);return M.WT!=Float32Array&&(Se[0]=0,Se[1]=0,Se[2]=0,Se[3]=0),Se}function U(Se){var E=new M.WT(4);return E[0]=Se[0],E[1]=Se[1],E[2]=Se[2],E[3]=Se[3],E}function Y(Se,E,me,L){var X=new M.WT(4);return X[0]=Se,X[1]=E,X[2]=me,X[3]=L,X}function N(Se,E){return Se[0]=E[0],Se[1]=E[1],Se[2]=E[2],Se[3]=E[3],Se}function I(Se,E,me,L,X){return Se[0]=E,Se[1]=me,Se[2]=L,Se[3]=X,Se}function C(Se,E,me){return Se[0]=E[0]+me[0],Se[1]=E[1]+me[1],Se[2]=E[2]+me[2],Se[3]=E[3]+me[3],Se}function A(Se,E,me){return Se[0]=E[0]-me[0],Se[1]=E[1]-me[1],Se[2]=E[2]-me[2],Se[3]=E[3]-me[3],Se}function F(Se,E,me){return Se[0]=E[0]*me[0],Se[1]=E[1]*me[1],Se[2]=E[2]*me[2],Se[3]=E[3]*me[3],Se}function P(Se,E,me){return Se[0]=E[0]/me[0],Se[1]=E[1]/me[1],Se[2]=E[2]/me[2],Se[3]=E[3]/me[3],Se}function W(Se,E){return Se[0]=Math.ceil(E[0]),Se[1]=Math.ceil(E[1]),Se[2]=Math.ceil(E[2]),Se[3]=Math.ceil(E[3]),Se}function K(Se,E){return Se[0]=Math.floor(E[0]),Se[1]=Math.floor(E[1]),Se[2]=Math.floor(E[2]),Se[3]=Math.floor(E[3]),Se}function ge(Se,E,me){return Se[0]=Math.min(E[0],me[0]),Se[1]=Math.min(E[1],me[1]),Se[2]=Math.min(E[2],me[2]),Se[3]=Math.min(E[3],me[3]),Se}function be(Se,E,me){return Se[0]=Math.max(E[0],me[0]),Se[1]=Math.max(E[1],me[1]),Se[2]=Math.max(E[2],me[2]),Se[3]=Math.max(E[3],me[3]),Se}function Ue(Se,E){return Se[0]=Math.round(E[0]),Se[1]=Math.round(E[1]),Se[2]=Math.round(E[2]),Se[3]=Math.round(E[3]),Se}function Ne(Se,E,me){return Se[0]=E[0]*me,Se[1]=E[1]*me,Se[2]=E[2]*me,Se[3]=E[3]*me,Se}function ye(Se,E,me,L){return Se[0]=E[0]+me[0]*L,Se[1]=E[1]+me[1]*L,Se[2]=E[2]+me[2]*L,Se[3]=E[3]+me[3]*L,Se}function De(Se,E){var me=E[0]-Se[0],L=E[1]-Se[1],X=E[2]-Se[2],Ke=E[3]-Se[3];return Math.hypot(me,L,X,Ke)}function Ce(Se,E){var me=E[0]-Se[0],L=E[1]-Se[1],X=E[2]-Se[2],Ke=E[3]-Se[3];return me*me+L*L+X*X+Ke*Ke}function Me(Se){var E=Se[0],me=Se[1],L=Se[2],X=Se[3];return Math.hypot(E,me,L,X)}function Oe(Se){var E=Se[0],me=Se[1],L=Se[2],X=Se[3];return E*E+me*me+L*L+X*X}function re(Se,E){return Se[0]=-E[0],Se[1]=-E[1],Se[2]=-E[2],Se[3]=-E[3],Se}function q(Se,E){return Se[0]=1/E[0],Se[1]=1/E[1],Se[2]=1/E[2],Se[3]=1/E[3],Se}function ce(Se,E){var me=E[0],L=E[1],X=E[2],Ke=E[3],ot=me*me+L*L+X*X+Ke*Ke;return ot>0&&(ot=1/Math.sqrt(ot)),Se[0]=me*ot,Se[1]=L*ot,Se[2]=X*ot,Se[3]=Ke*ot,Se}function Ee(Se,E){return Se[0]*E[0]+Se[1]*E[1]+Se[2]*E[2]+Se[3]*E[3]}function Te(Se,E,me,L){var X=me[0]*L[1]-me[1]*L[0],Ke=me[0]*L[2]-me[2]*L[0],ot=me[0]*L[3]-me[3]*L[0],pe=me[1]*L[2]-me[2]*L[1],xe=me[1]*L[3]-me[3]*L[1],Ze=me[2]*L[3]-me[3]*L[2],O=E[0],ne=E[1],qe=E[2],dt=E[3];return Se[0]=ne*Ze-qe*xe+dt*pe,Se[1]=-(O*Ze)+qe*ot-dt*Ke,Se[2]=O*xe-ne*ot+dt*X,Se[3]=-(O*pe)+ne*Ke-qe*X,Se}function Je(Se,E,me,L){var X=E[0],Ke=E[1],ot=E[2],pe=E[3];return Se[0]=X+L*(me[0]-X),Se[1]=Ke+L*(me[1]-Ke),Se[2]=ot+L*(me[2]-ot),Se[3]=pe+L*(me[3]-pe),Se}function He(Se,E){E=E||1;var me,L,X,Ke,ot,pe;do me=glMatrix.RANDOM()*2-1,L=glMatrix.RANDOM()*2-1,ot=me*me+L*L;while(ot>=1);do X=glMatrix.RANDOM()*2-1,Ke=glMatrix.RANDOM()*2-1,pe=X*X+Ke*Ke;while(pe>=1);var xe=Math.sqrt((1-ot)/pe);return Se[0]=E*me,Se[1]=E*L,Se[2]=E*X*xe,Se[3]=E*Ke*xe,Se}function rt(Se,E,me){var L=E[0],X=E[1],Ke=E[2],ot=E[3];return Se[0]=me[0]*L+me[4]*X+me[8]*Ke+me[12]*ot,Se[1]=me[1]*L+me[5]*X+me[9]*Ke+me[13]*ot,Se[2]=me[2]*L+me[6]*X+me[10]*Ke+me[14]*ot,Se[3]=me[3]*L+me[7]*X+me[11]*Ke+me[15]*ot,Se}function Et(Se,E,me){var L=E[0],X=E[1],Ke=E[2],ot=me[0],pe=me[1],xe=me[2],Ze=me[3],O=Ze*L+pe*Ke-xe*X,ne=Ze*X+xe*L-ot*Ke,qe=Ze*Ke+ot*X-pe*L,dt=-ot*L-pe*X-xe*Ke;return Se[0]=O*Ze+dt*-ot+ne*-xe-qe*-pe,Se[1]=ne*Ze+dt*-pe+qe*-ot-O*-xe,Se[2]=qe*Ze+dt*-xe+O*-pe-ne*-ot,Se[3]=E[3],Se}function lt(Se){return Se[0]=0,Se[1]=0,Se[2]=0,Se[3]=0,Se}function st(Se){return"vec4("+Se[0]+", "+Se[1]+", "+Se[2]+", "+Se[3]+")"}function mt(Se,E){return Se[0]===E[0]&&Se[1]===E[1]&&Se[2]===E[2]&&Se[3]===E[3]}function fe(Se,E){var me=Se[0],L=Se[1],X=Se[2],Ke=Se[3],ot=E[0],pe=E[1],xe=E[2],Ze=E[3];return Math.abs(me-ot)<=M.Ib*Math.max(1,Math.abs(me),Math.abs(ot))&&Math.abs(L-pe)<=M.Ib*Math.max(1,Math.abs(L),Math.abs(pe))&&Math.abs(X-xe)<=M.Ib*Math.max(1,Math.abs(X),Math.abs(xe))&&Math.abs(Ke-Ze)<=M.Ib*Math.max(1,Math.abs(Ke),Math.abs(Ze))}var We=null,ht=null,Pt=null,Ve=null,it=null,ft=null,ze=null,Qe=function(){var Se=H();return function(E,me,L,X,Ke,ot){var pe,xe;for(me||(me=4),L||(L=0),X?xe=Math.min(X*me+L,E.length):xe=E.length,pe=L;pe<xe;pe+=me)Se[0]=E[pe],Se[1]=E[pe+1],Se[2]=E[pe+2],Se[3]=E[pe+3],Ke(Se,Se,ot),E[pe]=Se[0],E[pe+1]=Se[1],E[pe+2]=Se[2],E[pe+3]=Se[3];return E}}()},28282:function(ke,ve,k){var M=k(82354);ke.exports={Graph:M.Graph,json:k(28974),alg:k(12440),version:M.version}},2842:function(ke,ve,k){var M=k(89126);ke.exports=H;function H(U){var Y={},N=[],I;function C(A){M.has(Y,A)||(Y[A]=!0,I.push(A),M.each(U.successors(A),C),M.each(U.predecessors(A),C))}return M.each(U.nodes(),function(A){I=[],C(A),I.length&&N.push(I)}),N}},53984:function(ke,ve,k){var M=k(89126);ke.exports=H;function H(Y,N,I){M.isArray(N)||(N=[N]);var C=(Y.isDirected()?Y.successors:Y.neighbors).bind(Y),A=[],F={};return M.each(N,function(P){if(!Y.hasNode(P))throw new Error("Graph does not have node: "+P);U(Y,P,I==="post",F,C,A)}),A}function U(Y,N,I,C,A,F){M.has(C,N)||(C[N]=!0,I||F.push(N),M.each(A(N),function(P){U(Y,P,I,C,A,F)}),I&&F.push(N))}},84847:function(ke,ve,k){var M=k(63763),H=k(89126);ke.exports=U;function U(Y,N,I){return H.transform(Y.nodes(),function(C,A){C[A]=M(Y,A,N,I)},{})}},63763:function(ke,ve,k){var M=k(89126),H=k(75639);ke.exports=Y;var U=M.constant(1);function Y(I,C,A,F){return N(I,String(C),A||U,F||function(P){return I.outEdges(P)})}function N(I,C,A,F){var P={},W=new H,K,ge,be=function(Ue){var Ne=Ue.v!==K?Ue.v:Ue.w,ye=P[Ne],De=A(Ue),Ce=ge.distance+De;if(De<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+Ue+" Weight: "+De);Ce<ye.distance&&(ye.distance=Ce,ye.predecessor=K,W.decrease(Ne,Ce))};for(I.nodes().forEach(function(Ue){var Ne=Ue===C?0:Number.POSITIVE_INFINITY;P[Ue]={distance:Ne},W.add(Ue,Ne)});W.size()>0&&(K=W.removeMin(),ge=P[K],ge.distance!==Number.POSITIVE_INFINITY);)F(K).forEach(be);return P}},9096:function(ke,ve,k){var M=k(89126),H=k(5023);ke.exports=U;function U(Y){return M.filter(H(Y),function(N){return N.length>1||N.length===1&&Y.hasEdge(N[0],N[0])})}},38924:function(ke,ve,k){var M=k(89126);ke.exports=U;var H=M.constant(1);function U(N,I,C){return Y(N,I||H,C||function(A){return N.outEdges(A)})}function Y(N,I,C){var A={},F=N.nodes();return F.forEach(function(P){A[P]={},A[P][P]={distance:0},F.forEach(function(W){P!==W&&(A[P][W]={distance:Number.POSITIVE_INFINITY})}),C(P).forEach(function(W){var K=W.v===P?W.w:W.v,ge=I(W);A[P][K]={distance:ge,predecessor:P}})}),F.forEach(function(P){var W=A[P];F.forEach(function(K){var ge=A[K];F.forEach(function(be){var Ue=ge[P],Ne=W[be],ye=ge[be],De=Ue.distance+Ne.distance;De<ye.distance&&(ye.distance=De,ye.predecessor=Ne.predecessor)})})}),A}},12440:function(ke,ve,k){ke.exports={components:k(2842),dijkstra:k(63763),dijkstraAll:k(84847),findCycles:k(9096),floydWarshall:k(38924),isAcyclic:k(62707),postorder:k(58828),preorder:k(92648),prim:k(80514),tarjan:k(5023),topsort:k(2166)}},62707:function(ke,ve,k){var M=k(2166);ke.exports=H;function H(U){try{M(U)}catch(Y){if(Y instanceof M.CycleException)return!1;throw Y}return!0}},58828:function(ke,ve,k){var M=k(53984);ke.exports=H;function H(U,Y){return M(U,Y,"post")}},92648:function(ke,ve,k){var M=k(53984);ke.exports=H;function H(U,Y){return M(U,Y,"pre")}},80514:function(ke,ve,k){var M=k(89126),H=k(30771),U=k(75639);ke.exports=Y;function Y(N,I){var C=new H,A={},F=new U,P;function W(ge){var be=ge.v===P?ge.w:ge.v,Ue=F.priority(be);if(Ue!==void 0){var Ne=I(ge);Ne<Ue&&(A[be]=P,F.decrease(be,Ne))}}if(N.nodeCount()===0)return C;M.each(N.nodes(),function(ge){F.add(ge,Number.POSITIVE_INFINITY),C.setNode(ge)}),F.decrease(N.nodes()[0],0);for(var K=!1;F.size()>0;){if(P=F.removeMin(),M.has(A,P))C.setEdge(P,A[P]);else{if(K)throw new Error("Input graph is not connected: "+N);K=!0}N.nodeEdges(P).forEach(W)}return C}},5023:function(ke,ve,k){var M=k(89126);ke.exports=H;function H(U){var Y=0,N=[],I={},C=[];function A(F){var P=I[F]={onStack:!0,lowlink:Y,index:Y++};if(N.push(F),U.successors(F).forEach(function(ge){M.has(I,ge)?I[ge].onStack&&(P.lowlink=Math.min(P.lowlink,I[ge].index)):(A(ge),P.lowlink=Math.min(P.lowlink,I[ge].lowlink))}),P.lowlink===P.index){var W=[],K;do K=N.pop(),I[K].onStack=!1,W.push(K);while(F!==K);C.push(W)}}return U.nodes().forEach(function(F){M.has(I,F)||A(F)}),C}},2166:function(ke,ve,k){var M=k(89126);ke.exports=H,H.CycleException=U;function H(Y){var N={},I={},C=[];function A(F){if(M.has(I,F))throw new U;M.has(N,F)||(I[F]=!0,N[F]=!0,M.each(Y.predecessors(F),A),delete I[F],C.push(F))}if(M.each(Y.sinks(),A),M.size(N)!==Y.nodeCount())throw new U;return C}function U(){}U.prototype=new Error},75639:function(ke,ve,k){var M=k(89126);ke.exports=H;function H(){this._arr=[],this._keyIndices={}}H.prototype.size=function(){return this._arr.length},H.prototype.keys=function(){return this._arr.map(function(U){return U.key})},H.prototype.has=function(U){return M.has(this._keyIndices,U)},H.prototype.priority=function(U){var Y=this._keyIndices[U];if(Y!==void 0)return this._arr[Y].priority},H.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},H.prototype.add=function(U,Y){var N=this._keyIndices;if(U=String(U),!M.has(N,U)){var I=this._arr,C=I.length;return N[U]=C,I.push({key:U,priority:Y}),this._decrease(C),!0}return!1},H.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var U=this._arr.pop();return delete this._keyIndices[U.key],this._heapify(0),U.key},H.prototype.decrease=function(U,Y){var N=this._keyIndices[U];if(Y>this._arr[N].priority)throw new Error("New priority is greater than current priority. Key: "+U+" Old: "+this._arr[N].priority+" New: "+Y);this._arr[N].priority=Y,this._decrease(N)},H.prototype._heapify=function(U){var Y=this._arr,N=2*U,I=N+1,C=U;N<Y.length&&(C=Y[N].priority<Y[C].priority?N:C,I<Y.length&&(C=Y[I].priority<Y[C].priority?I:C),C!==U&&(this._swap(U,C),this._heapify(C)))},H.prototype._decrease=function(U){for(var Y=this._arr,N=Y[U].priority,I;U!==0&&(I=U>>1,!(Y[I].priority<N));)this._swap(U,I),U=I},H.prototype._swap=function(U,Y){var N=this._arr,I=this._keyIndices,C=N[U],A=N[Y];N[U]=A,N[Y]=C,I[A.key]=U,I[C.key]=Y}},30771:function(ke,ve,k){"use strict";var M=k(89126);ke.exports=N;var H="\0",U="\0",Y="";function N(W){this._isDirected=M.has(W,"directed")?W.directed:!0,this._isMultigraph=M.has(W,"multigraph")?W.multigraph:!1,this._isCompound=M.has(W,"compound")?W.compound:!1,this._label=void 0,this._defaultNodeLabelFn=M.constant(void 0),this._defaultEdgeLabelFn=M.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[U]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}N.prototype._nodeCount=0,N.prototype._edgeCount=0,N.prototype.isDirected=function(){return this._isDirected},N.prototype.isMultigraph=function(){return this._isMultigraph},N.prototype.isCompound=function(){return this._isCompound},N.prototype.setGraph=function(W){return this._label=W,this},N.prototype.graph=function(){return this._label},N.prototype.setDefaultNodeLabel=function(W){return M.isFunction(W)||(W=M.constant(W)),this._defaultNodeLabelFn=W,this},N.prototype.nodeCount=function(){return this._nodeCount},N.prototype.nodes=function(){return M.keys(this._nodes)},N.prototype.sources=function(){var W=this;return M.filter(this.nodes(),function(K){return M.isEmpty(W._in[K])})},N.prototype.sinks=function(){var W=this;return M.filter(this.nodes(),function(K){return M.isEmpty(W._out[K])})},N.prototype.setNodes=function(W,K){var ge=arguments,be=this;return M.each(W,function(Ue){ge.length>1?be.setNode(Ue,K):be.setNode(Ue)}),this},N.prototype.setNode=function(W,K){return M.has(this._nodes,W)?(arguments.length>1&&(this._nodes[W]=K),this):(this._nodes[W]=arguments.length>1?K:this._defaultNodeLabelFn(W),this._isCompound&&(this._parent[W]=U,this._children[W]={},this._children[U][W]=!0),this._in[W]={},this._preds[W]={},this._out[W]={},this._sucs[W]={},++this._nodeCount,this)},N.prototype.node=function(W){return this._nodes[W]},N.prototype.hasNode=function(W){return M.has(this._nodes,W)},N.prototype.removeNode=function(W){var K=this;if(M.has(this._nodes,W)){var ge=function(be){K.removeEdge(K._edgeObjs[be])};delete this._nodes[W],this._isCompound&&(this._removeFromParentsChildList(W),delete this._parent[W],M.each(this.children(W),function(be){K.setParent(be)}),delete this._children[W]),M.each(M.keys(this._in[W]),ge),delete this._in[W],delete this._preds[W],M.each(M.keys(this._out[W]),ge),delete this._out[W],delete this._sucs[W],--this._nodeCount}return this},N.prototype.setParent=function(W,K){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(M.isUndefined(K))K=U;else{K+="";for(var ge=K;!M.isUndefined(ge);ge=this.parent(ge))if(ge===W)throw new Error("Setting "+K+" as parent of "+W+" would create a cycle");this.setNode(K)}return this.setNode(W),this._removeFromParentsChildList(W),this._parent[W]=K,this._children[K][W]=!0,this},N.prototype._removeFromParentsChildList=function(W){delete this._children[this._parent[W]][W]},N.prototype.parent=function(W){if(this._isCompound){var K=this._parent[W];if(K!==U)return K}},N.prototype.children=function(W){if(M.isUndefined(W)&&(W=U),this._isCompound){var K=this._children[W];if(K)return M.keys(K)}else{if(W===U)return this.nodes();if(this.hasNode(W))return[]}},N.prototype.predecessors=function(W){var K=this._preds[W];if(K)return M.keys(K)},N.prototype.successors=function(W){var K=this._sucs[W];if(K)return M.keys(K)},N.prototype.neighbors=function(W){var K=this.predecessors(W);if(K)return M.union(K,this.successors(W))},N.prototype.isLeaf=function(W){var K;return this.isDirected()?K=this.successors(W):K=this.neighbors(W),K.length===0},N.prototype.filterNodes=function(W){var K=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});K.setGraph(this.graph());var ge=this;M.each(this._nodes,function(Ne,ye){W(ye)&&K.setNode(ye,Ne)}),M.each(this._edgeObjs,function(Ne){K.hasNode(Ne.v)&&K.hasNode(Ne.w)&&K.setEdge(Ne,ge.edge(Ne))});var be={};function Ue(Ne){var ye=ge.parent(Ne);return ye===void 0||K.hasNode(ye)?(be[Ne]=ye,ye):ye in be?be[ye]:Ue(ye)}return this._isCompound&&M.each(K.nodes(),function(Ne){K.setParent(Ne,Ue(Ne))}),K},N.prototype.setDefaultEdgeLabel=function(W){return M.isFunction(W)||(W=M.constant(W)),this._defaultEdgeLabelFn=W,this},N.prototype.edgeCount=function(){return this._edgeCount},N.prototype.edges=function(){return M.values(this._edgeObjs)},N.prototype.setPath=function(W,K){var ge=this,be=arguments;return M.reduce(W,function(Ue,Ne){return be.length>1?ge.setEdge(Ue,Ne,K):ge.setEdge(Ue,Ne),Ne}),this},N.prototype.setEdge=function(){var W,K,ge,be,Ue=!1,Ne=arguments[0];typeof Ne=="object"&&Ne!==null&&"v"in Ne?(W=Ne.v,K=Ne.w,ge=Ne.name,arguments.length===2&&(be=arguments[1],Ue=!0)):(W=Ne,K=arguments[1],ge=arguments[3],arguments.length>2&&(be=arguments[2],Ue=!0)),W=""+W,K=""+K,M.isUndefined(ge)||(ge=""+ge);var ye=A(this._isDirected,W,K,ge);if(M.has(this._edgeLabels,ye))return Ue&&(this._edgeLabels[ye]=be),this;if(!M.isUndefined(ge)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(W),this.setNode(K),this._edgeLabels[ye]=Ue?be:this._defaultEdgeLabelFn(W,K,ge);var De=F(this._isDirected,W,K,ge);return W=De.v,K=De.w,Object.freeze(De),this._edgeObjs[ye]=De,I(this._preds[K],W),I(this._sucs[W],K),this._in[K][ye]=De,this._out[W][ye]=De,this._edgeCount++,this},N.prototype.edge=function(W,K,ge){var be=arguments.length===1?P(this._isDirected,arguments[0]):A(this._isDirected,W,K,ge);return this._edgeLabels[be]},N.prototype.hasEdge=function(W,K,ge){var be=arguments.length===1?P(this._isDirected,arguments[0]):A(this._isDirected,W,K,ge);return M.has(this._edgeLabels,be)},N.prototype.removeEdge=function(W,K,ge){var be=arguments.length===1?P(this._isDirected,arguments[0]):A(this._isDirected,W,K,ge),Ue=this._edgeObjs[be];return Ue&&(W=Ue.v,K=Ue.w,delete this._edgeLabels[be],delete this._edgeObjs[be],C(this._preds[K],W),C(this._sucs[W],K),delete this._in[K][be],delete this._out[W][be],this._edgeCount--),this},N.prototype.inEdges=function(W,K){var ge=this._in[W];if(ge){var be=M.values(ge);return K?M.filter(be,function(Ue){return Ue.v===K}):be}},N.prototype.outEdges=function(W,K){var ge=this._out[W];if(ge){var be=M.values(ge);return K?M.filter(be,function(Ue){return Ue.w===K}):be}},N.prototype.nodeEdges=function(W,K){var ge=this.inEdges(W,K);if(ge)return ge.concat(this.outEdges(W,K))};function I(W,K){W[K]?W[K]++:W[K]=1}function C(W,K){--W[K]||delete W[K]}function A(W,K,ge,be){var Ue=""+K,Ne=""+ge;if(!W&&Ue>Ne){var ye=Ue;Ue=Ne,Ne=ye}return Ue+Y+Ne+Y+(M.isUndefined(be)?H:be)}function F(W,K,ge,be){var Ue=""+K,Ne=""+ge;if(!W&&Ue>Ne){var ye=Ue;Ue=Ne,Ne=ye}var De={v:Ue,w:Ne};return be&&(De.name=be),De}function P(W,K){return A(W,K.v,K.w,K.name)}},82354:function(ke,ve,k){ke.exports={Graph:k(30771),version:k(49631)}},28974:function(ke,ve,k){var M=k(89126),H=k(30771);ke.exports={write:U,read:I};function U(C){var A={options:{directed:C.isDirected(),multigraph:C.isMultigraph(),compound:C.isCompound()},nodes:Y(C),edges:N(C)};return M.isUndefined(C.graph())||(A.value=M.clone(C.graph())),A}function Y(C){return M.map(C.nodes(),function(A){var F=C.node(A),P=C.parent(A),W={v:A};return M.isUndefined(F)||(W.value=F),M.isUndefined(P)||(W.parent=P),W})}function N(C){return M.map(C.edges(),function(A){var F=C.edge(A),P={v:A.v,w:A.w};return M.isUndefined(A.name)||(P.name=A.name),M.isUndefined(F)||(P.value=F),P})}function I(C){var A=new H(C.options).setGraph(C.value);return M.each(C.nodes,function(F){A.setNode(F.v,F.value),F.parent&&A.setParent(F.v,F.parent)}),M.each(C.edges,function(F){A.setEdge({v:F.v,w:F.w,name:F.name},F.value)}),A}},89126:function(ke,ve,k){var M;try{M={clone:k(66678),constant:k(75703),each:k(85768),filter:k(63105),has:k(18721),isArray:k(1469),isEmpty:k(58367),isFunction:k(23560),isUndefined:k(52353),keys:k(3674),map:k(35161),reduce:k(54061),size:k(84238),transform:k(68718),union:k(93386),values:k(52628)}}catch(H){}M||(M=window._),ke.exports=M},49631:function(ke){ke.exports="2.1.8"},80817:function(ke){function ve(U,Y,N){return(Y[0]-U[0])*(N[1]-U[1])-(Y[1]-U[1])*(N[0]-U[0])}function k(U){const Y=[];for(let N=0;N<U.length;N++){for(;Y.length>=2&&ve(Y[Y.length-2],Y[Y.length-1],U[N])<=0;)Y.pop();Y.push(U[N])}return Y.pop(),Y}function M(U){const Y=U.reverse(),N=[];for(let I=0;I<Y.length;I++){for(;N.length>=2&&ve(N[N.length-2],N[N.length-1],Y[I])<=0;)N.pop();N.push(Y[I])}return N.pop(),N}function H(U){const Y=k(U),I=M(U).concat(Y);return I.push(U[0]),I}ke.exports=H},63652:function(ke){ke.exports={toXy:function(ve,k){return k===void 0?ve.slice():ve.map(function(M){return new Function("pt","return [pt"+k[0]+",pt"+k[1]+"];")(M)})},fromXy:function(ve,k){return k===void 0?ve.slice():ve.map(function(M){return new Function("pt","const o = {}; o"+k[0]+"= pt[0]; o"+k[1]+"= pt[1]; return o;")(M)})}}},58867:function(ke){function ve(M,H){this._cells=[],this._cellSize=H,this._reverseCellSize=1/H;for(let U=0;U<M.length;U++){const Y=M[U],N=this.coordToCellNum(Y[0]),I=this.coordToCellNum(Y[1]);if(this._cells[N])this._cells[N][I]?this._cells[N][I].push(Y):this._cells[N][I]=[Y];else{const C=[];C[I]=[Y],this._cells[N]=C}}}ve.prototype={cellPoints:function(M,H){return this._cells[M]!==void 0&&this._cells[M][H]!==void 0?this._cells[M][H]:[]},rangePoints:function(M){const H=this.coordToCellNum(M[0]),U=this.coordToCellNum(M[1]),Y=this.coordToCellNum(M[2]),N=this.coordToCellNum(M[3]),I=[];for(let C=H;C<=Y;C++)for(let A=U;A<=N;A++)for(let F=0;F<this.cellPoints(C,A).length;F++)I.push(this.cellPoints(C,A)[F]);return I},removePoint:function(M){const H=this.coordToCellNum(M[0]),U=this.coordToCellNum(M[1]),Y=this._cells[H][U];let N;for(let I=0;I<Y.length;I++)if(Y[I][0]===M[0]&&Y[I][1]===M[1]){N=I;break}return Y.splice(N,1),Y},trunc:Math.trunc||function(M){return M-M%1},coordToCellNum:function(M){return this.trunc(M*this._reverseCellSize)},extendBbox:function(M,H){return[M[0]-H*this._cellSize,M[1]-H*this._cellSize,M[2]+H*this._cellSize,M[3]+H*this._cellSize]}};function k(M,H){return new ve(M,H)}ke.exports=k},1344:function(ke,ve,k){"use strict";const M=k(77444),H=k(58867),U=k(63652),Y=k(80817);function N(ye){const De=[ye[0]];let Ce=ye[0];for(let Me=1;Me<ye.length;Me++){const Oe=ye[Me];(Ce[0]!==Oe[0]||Ce[1]!==Oe[1])&&De.push(Oe),Ce=Oe}return De}function I(ye){return ye.sort(function(De,Ce){return De[0]-Ce[0]||De[1]-Ce[1]})}function C(ye,De){return Math.pow(De[0]-ye[0],2)+Math.pow(De[1]-ye[1],2)}function A(ye,De,Ce){const Me=[De[0]-ye[0],De[1]-ye[1]],Oe=[Ce[0]-ye[0],Ce[1]-ye[1]],re=C(ye,De),q=C(ye,Ce);return(Me[0]*Oe[0]+Me[1]*Oe[1])/Math.sqrt(re*q)}function F(ye,De){for(let Ce=0;Ce<De.length-1;Ce++){const Me=[De[Ce],De[Ce+1]];if(!(ye[0][0]===Me[0][0]&&ye[0][1]===Me[0][1]||ye[0][0]===Me[1][0]&&ye[0][1]===Me[1][1])&&M(ye,Me))return!0}return!1}function P(ye){let De=1/0,Ce=1/0,Me=-1/0,Oe=-1/0;for(let re=ye.length-1;re>=0;re--)ye[re][0]<De&&(De=ye[re][0]),ye[re][1]<Ce&&(Ce=ye[re][1]),ye[re][0]>Me&&(Me=ye[re][0]),ye[re][1]>Oe&&(Oe=ye[re][1]);return[Me-De,Oe-Ce]}function W(ye){return[Math.min(ye[0][0],ye[1][0]),Math.min(ye[0][1],ye[1][1]),Math.max(ye[0][0],ye[1][0]),Math.max(ye[0][1],ye[1][1])]}function K(ye,De,Ce){let Me=null,Oe=Ue,re=Ue,q,ce;for(let Ee=0;Ee<De.length;Ee++)q=A(ye[0],ye[1],De[Ee]),ce=A(ye[1],ye[0],De[Ee]),q>Oe&&ce>re&&!F([ye[0],De[Ee]],Ce)&&!F([ye[1],De[Ee]],Ce)&&(Oe=q,re=ce,Me=De[Ee]);return Me}function ge(ye,De,Ce,Me,Oe){let re=!1;for(let q=0;q<ye.length-1;q++){const ce=[ye[q],ye[q+1]],Ee=ce[0][0]+","+ce[0][1]+","+ce[1][0]+","+ce[1][1];if(C(ce[0],ce[1])<De||Oe.has(Ee))continue;let Te=0,Je=W(ce),He,rt,Et;do Je=Me.extendBbox(Je,Te),He=Je[2]-Je[0],rt=Je[3]-Je[1],Et=K(ce,Me.rangePoints(Je),ye),Te++;while(Et===null&&(Ce[0]>He||Ce[1]>rt));He>=Ce[0]&&rt>=Ce[1]&&Oe.add(Ee),Et!==null&&(ye.splice(q+1,0,Et),Me.removePoint(Et),re=!0)}return re?ge(ye,De,Ce,Me,Oe):ye}function be(ye,De,Ce){let Me=De||20;const Oe=N(I(U.toXy(ye,Ce)));if(Oe.length<4){const He=Oe.concat([Oe[0]]);return Ce?U.fromXy(He,Ce):He}const re=P(Oe),q=[re[0]*Ne,re[1]*Ne],ce=Y(Oe),Ee=Oe.filter(function(He){return ce.indexOf(He)<0}),Te=Math.ceil(1/(Oe.length/(re[0]*re[1]))),Je=ge(ce,Math.pow(Me,2),q,H(Ee,Te),new Set);return Ce?U.fromXy(Je,Ce):Je}const Ue=Math.cos(90/(180/Math.PI)),Ne=.6;ke.exports=be},77444:function(ke){function ve(M,H,U,Y,N,I){const C=(I-H)*(U-M)-(Y-H)*(N-M);return C>0?!0:!(C<0)}function k(M,H){const U=M[0][0],Y=M[0][1],N=M[1][0],I=M[1][1],C=H[0][0],A=H[0][1],F=H[1][0],P=H[1][1];return ve(U,Y,C,A,F,P)!==ve(N,I,C,A,F,P)&&ve(U,Y,N,I,C,A)!==ve(U,Y,N,I,F,P)}ke.exports=k},44091:function(ke,ve,k){"use strict";k.r(ve),k.d(ve,{isAnyArray:function(){return H}});const M=Object.prototype.toString;function H(U){const Y=M.call(U);return Y.endsWith("Array]")&&!Y.includes("Big")}},18552:function(ke,ve,k){var M=k(10852),H=k(55639),U=M(H,"DataView");ke.exports=U},53818:function(ke,ve,k){var M=k(10852),H=k(55639),U=M(H,"Promise");ke.exports=U},58525:function(ke,ve,k){var M=k(10852),H=k(55639),U=M(H,"Set");ke.exports=U},88668:function(ke,ve,k){var M=k(83369),H=k(90619),U=k(72385);function Y(N){var I=-1,C=N==null?0:N.length;for(this.__data__=new M;++I<C;)this.add(N[I])}Y.prototype.add=Y.prototype.push=H,Y.prototype.has=U,ke.exports=Y},70577:function(ke,ve,k){var M=k(10852),H=k(55639),U=M(H,"WeakMap");ke.exports=U},77412:function(ke){function ve(k,M){for(var H=-1,U=k==null?0:k.length;++H<U&&M(k[H],H,k)!==!1;);return k}ke.exports=ve},34963:function(ke){function ve(k,M){for(var H=-1,U=k==null?0:k.length,Y=0,N=[];++H<U;){var I=k[H];M(I,H,k)&&(N[Y++]=I)}return N}ke.exports=ve},47443:function(ke,ve,k){var M=k(42118);function H(U,Y){var N=U==null?0:U.length;return!!N&&M(U,Y,0)>-1}ke.exports=H},1196:function(ke){function ve(k,M,H){for(var U=-1,Y=k==null?0:k.length;++U<Y;)if(H(M,k[U]))return!0;return!1}ke.exports=ve},29932:function(ke){function ve(k,M){for(var H=-1,U=k==null?0:k.length,Y=Array(U);++H<U;)Y[H]=M(k[H],H,k);return Y}ke.exports=ve},62488:function(ke){function ve(k,M){for(var H=-1,U=M.length,Y=k.length;++H<U;)k[Y+H]=M[H];return k}ke.exports=ve},62663:function(ke){function ve(k,M,H,U){var Y=-1,N=k==null?0:k.length;for(U&&N&&(H=k[++Y]);++Y<N;)H=M(H,k[Y],Y,k);return H}ke.exports=ve},82908:function(ke){function ve(k,M){for(var H=-1,U=k==null?0:k.length;++H<U;)if(M(k[H],H,k))return!0;return!1}ke.exports=ve},48983:function(ke,ve,k){var M=k(40371),H=M("length");ke.exports=H},44037:function(ke,ve,k){var M=k(98363),H=k(3674);function U(Y,N){return Y&&M(N,H(N),Y)}ke.exports=U},63886:function(ke,ve,k){var M=k(98363),H=k(81704);function U(Y,N){return Y&&M(N,H(N),Y)}ke.exports=U},85990:function(ke,ve,k){var M=k(46384),H=k(77412),U=k(34865),Y=k(44037),N=k(63886),I=k(64626),C=k(278),A=k(18805),F=k(1911),P=k(58234),W=k(46904),K=k(64160),ge=k(43824),be=k(29148),Ue=k(38517),Ne=k(1469),ye=k(44144),De=k(56688),Ce=k(13218),Me=k(72928),Oe=k(3674),re=k(81704),q=1,ce=2,Ee=4,Te="[object Arguments]",Je="[object Array]",He="[object Boolean]",rt="[object Date]",Et="[object Error]",lt="[object Function]",st="[object GeneratorFunction]",mt="[object Map]",fe="[object Number]",We="[object Object]",ht="[object RegExp]",Pt="[object Set]",Ve="[object String]",it="[object Symbol]",ft="[object WeakMap]",ze="[object ArrayBuffer]",Qe="[object DataView]",Se="[object Float32Array]",E="[object Float64Array]",me="[object Int8Array]",L="[object Int16Array]",X="[object Int32Array]",Ke="[object Uint8Array]",ot="[object Uint8ClampedArray]",pe="[object Uint16Array]",xe="[object Uint32Array]",Ze={};Ze[Te]=Ze[Je]=Ze[ze]=Ze[Qe]=Ze[He]=Ze[rt]=Ze[Se]=Ze[E]=Ze[me]=Ze[L]=Ze[X]=Ze[mt]=Ze[fe]=Ze[We]=Ze[ht]=Ze[Pt]=Ze[Ve]=Ze[it]=Ze[Ke]=Ze[ot]=Ze[pe]=Ze[xe]=!0,Ze[Et]=Ze[lt]=Ze[ft]=!1;function O(ne,qe,dt,nt,xt,bt){var wt,we=qe&q,oe=qe&ce,Fe=qe&Ee;if(dt&&(wt=xt?dt(ne,nt,xt,bt):dt(ne)),wt!==void 0)return wt;if(!Ce(ne))return ne;var Ye=Ne(ne);if(Ye){if(wt=ge(ne),!we)return C(ne,wt)}else{var ie=K(ne),Ie=ie==lt||ie==st;if(ye(ne))return I(ne,we);if(ie==We||ie==Te||Ie&&!xt){if(wt=oe||Ie?{}:Ue(ne),!we)return oe?F(ne,N(wt,ne)):A(ne,Y(wt,ne))}else{if(!Ze[ie])return xt?ne:{};wt=be(ne,ie,we)}}bt||(bt=new M);var je=bt.get(ne);if(je)return je;bt.set(ne,wt),Me(ne)?ne.forEach(function(gt){wt.add(O(gt,qe,dt,gt,ne,bt))}):De(ne)&&ne.forEach(function(gt,Mt){wt.set(Mt,O(gt,qe,dt,Mt,ne,bt))});var Be=Fe?oe?W:P:oe?re:Oe,et=Ye?void 0:Be(ne);return H(et||ne,function(gt,Mt){et&&(Mt=gt,gt=ne[Mt]),U(wt,Mt,O(gt,qe,dt,Mt,ne,bt))}),wt}ke.exports=O},89881:function(ke,ve,k){var M=k(47816),H=k(99291),U=H(M);ke.exports=U},56029:function(ke,ve,k){var M=k(33448);function H(U,Y,N){for(var I=-1,C=U.length;++I<C;){var A=U[I],F=Y(A);if(F!=null&&(P===void 0?F===F&&!M(F):N(F,P)))var P=F,W=A}return W}ke.exports=H},80760:function(ke,ve,k){var M=k(89881);function H(U,Y){var N=[];return M(U,function(I,C,A){Y(I,C,A)&&N.push(I)}),N}ke.exports=H},41848:function(ke){function ve(k,M,H,U){for(var Y=k.length,N=H+(U?1:-1);U?N--:++N<Y;)if(M(k[N],N,k))return N;return-1}ke.exports=ve},21078:function(ke,ve,k){var M=k(62488),H=k(37285);function U(Y,N,I,C,A){var F=-1,P=Y.length;for(I||(I=H),A||(A=[]);++F<P;){var W=Y[F];N>0&&I(W)?N>1?U(W,N-1,I,C,A):M(A,W):C||(A[A.length]=W)}return A}ke.exports=U},47816:function(ke,ve,k){var M=k(28483),H=k(3674);function U(Y,N){return Y&&M(Y,N,H)}ke.exports=U},97786:function(ke,ve,k){var M=k(71811),H=k(40327);function U(Y,N){N=M(N,Y);for(var I=0,C=N.length;Y!=null&&I<C;)Y=Y[H(N[I++])];return I&&I==C?Y:void 0}ke.exports=U},64055:function(ke,ve,k){var M=k(62488),H=k(1469);function U(Y,N,I){var C=N(Y);return H(Y)?C:M(C,I(Y))}ke.exports=U},53325:function(ke){function ve(k,M){return k>M}ke.exports=ve},78565:function(ke){var ve=Object.prototype,k=ve.hasOwnProperty;function M(H,U){return H!=null&&k.call(H,U)}ke.exports=M},13:function(ke){function ve(k,M){return k!=null&&M in Object(k)}ke.exports=ve},42118:function(ke,ve,k){var M=k(41848),H=k(62722),U=k(42351);function Y(N,I,C){return I===I?U(N,I,C):M(N,H,C)}ke.exports=Y},90939:function(ke,ve,k){var M=k(2492),H=k(37005);function U(Y,N,I,C,A){return Y===N?!0:Y==null||N==null||!H(Y)&&!H(N)?Y!==Y&&N!==N:M(Y,N,I,C,U,A)}ke.exports=U},2492:function(ke,ve,k){var M=k(46384),H=k(67114),U=k(18351),Y=k(16096),N=k(64160),I=k(1469),C=k(44144),A=k(36719),F=1,P="[object Arguments]",W="[object Array]",K="[object Object]",ge=Object.prototype,be=ge.hasOwnProperty;function Ue(Ne,ye,De,Ce,Me,Oe){var re=I(Ne),q=I(ye),ce=re?W:N(Ne),Ee=q?W:N(ye);ce=ce==P?K:ce,Ee=Ee==P?K:Ee;var Te=ce==K,Je=Ee==K,He=ce==Ee;if(He&&C(Ne)){if(!C(ye))return!1;re=!0,Te=!1}if(He&&!Te)return Oe||(Oe=new M),re||A(Ne)?H(Ne,ye,De,Ce,Me,Oe):U(Ne,ye,ce,De,Ce,Me,Oe);if(!(De&F)){var rt=Te&&be.call(Ne,"__wrapped__"),Et=Je&&be.call(ye,"__wrapped__");if(rt||Et){var lt=rt?Ne.value():Ne,st=Et?ye.value():ye;return Oe||(Oe=new M),Me(lt,st,De,Ce,Oe)}}return He?(Oe||(Oe=new M),Y(Ne,ye,De,Ce,Me,Oe)):!1}ke.exports=Ue},25588:function(ke,ve,k){var M=k(64160),H=k(37005),U="[object Map]";function Y(N){return H(N)&&M(N)==U}ke.exports=Y},2958:function(ke,ve,k){var M=k(46384),H=k(90939),U=1,Y=2;function N(I,C,A,F){var P=A.length,W=P,K=!F;if(I==null)return!W;for(I=Object(I);P--;){var ge=A[P];if(K&&ge[2]?ge[1]!==I[ge[0]]:!(ge[0]in I))return!1}for(;++P<W;){ge=A[P];var be=ge[0],Ue=I[be],Ne=ge[1];if(K&&ge[2]){if(Ue===void 0&&!(be in I))return!1}else{var ye=new M;if(F)var De=F(Ue,Ne,be,I,C,ye);if(!(De===void 0?H(Ne,Ue,U|Y,F,ye):De))return!1}}return!0}ke.exports=N},62722:function(ke){function ve(k){return k!==k}ke.exports=ve},29221:function(ke,ve,k){var M=k(64160),H=k(37005),U="[object Set]";function Y(N){return H(N)&&M(N)==U}ke.exports=Y},67206:function(ke,ve,k){var M=k(91573),H=k(16432),U=k(6557),Y=k(1469),N=k(39601);function I(C){return typeof C=="function"?C:C==null?U:typeof C=="object"?Y(C)?H(C[0],C[1]):M(C):N(C)}ke.exports=I},280:function(ke,ve,k){var M=k(25726),H=k(86916),U=Object.prototype,Y=U.hasOwnProperty;function N(I){if(!M(I))return H(I);var C=[];for(var A in Object(I))Y.call(I,A)&&A!="constructor"&&C.push(A);return C}ke.exports=N},70433:function(ke){function ve(k,M){return k<M}ke.exports=ve},69199:function(ke,ve,k){var M=k(89881),H=k(98612);function U(Y,N){var I=-1,C=H(Y)?Array(Y.length):[];return M(Y,function(A,F,P){C[++I]=N(A,F,P)}),C}ke.exports=U},91573:function(ke,ve,k){var M=k(2958),H=k(1499),U=k(42634);function Y(N){var I=H(N);return I.length==1&&I[0][2]?U(I[0][0],I[0][1]):function(C){return C===N||M(C,N,I)}}ke.exports=Y},16432:function(ke,ve,k){var M=k(90939),H=k(27361),U=k(79095),Y=k(15403),N=k(89162),I=k(42634),C=k(40327),A=1,F=2;function P(W,K){return Y(W)&&N(K)?I(C(W),K):function(ge){var be=H(ge,W);return be===void 0&&be===K?U(ge,W):M(K,be,A|F)}}ke.exports=P},82689:function(ke,ve,k){var M=k(29932),H=k(97786),U=k(67206),Y=k(69199),N=k(63922),I=k(7518),C=k(85022),A=k(6557),F=k(1469);function P(W,K,ge){K.length?K=M(K,function(Ne){return F(Ne)?function(ye){return H(ye,Ne.length===1?Ne[0]:Ne)}:Ne}):K=[A];var be=-1;K=M(K,I(U));var Ue=Y(W,function(Ne,ye,De){var Ce=M(K,function(Me){return Me(Ne)});return{criteria:Ce,index:++be,value:Ne}});return N(Ue,function(Ne,ye){return C(Ne,ye,ge)})}ke.exports=P},25970:function(ke,ve,k){var M=k(63012),H=k(79095);function U(Y,N){return M(Y,N,function(I,C){return H(Y,C)})}ke.exports=U},63012:function(ke,ve,k){var M=k(97786),H=k(10611),U=k(71811);function Y(N,I,C){for(var A=-1,F=I.length,P={};++A<F;){var W=I[A],K=M(N,W);C(K,W)&&H(P,U(W,N),K)}return P}ke.exports=Y},40371:function(ke){function ve(k){return function(M){return M==null?void 0:M[k]}}ke.exports=ve},79152:function(ke,ve,k){var M=k(97786);function H(U){return function(Y){return M(Y,U)}}ke.exports=H},40098:function(ke){var ve=Math.ceil,k=Math.max;function M(H,U,Y,N){for(var I=-1,C=k(ve((U-H)/(Y||1)),0),A=Array(C);C--;)A[N?C:++I]=H,H+=Y;return A}ke.exports=M},10107:function(ke){function ve(k,M,H,U,Y){return Y(k,function(N,I,C){H=U?(U=!1,N):M(H,N,I,C)}),H}ke.exports=ve},10611:function(ke,ve,k){var M=k(34865),H=k(71811),U=k(65776),Y=k(13218),N=k(40327);function I(C,A,F,P){if(!Y(C))return C;A=H(A,C);for(var W=-1,K=A.length,ge=K-1,be=C;be!=null&&++W<K;){var Ue=N(A[W]),Ne=F;if(Ue==="__proto__"||Ue==="constructor"||Ue==="prototype")return C;if(W!=ge){var ye=be[Ue];Ne=P?P(ye,Ue,be):void 0,Ne===void 0&&(Ne=Y(ye)?ye:U(A[W+1])?[]:{})}M(be,Ue,Ne),be=be[Ue]}return C}ke.exports=I},63922:function(ke){function ve(k,M){var H=k.length;for(k.sort(M);H--;)k[H]=k[H].value;return k}ke.exports=ve},80531:function(ke,ve,k){var M=k(62705),H=k(29932),U=k(1469),Y=k(33448),N=1/0,I=M?M.prototype:void 0,C=I?I.toString:void 0;function A(F){if(typeof F=="string")return F;if(U(F))return H(F,A)+"";if(Y(F))return C?C.call(F):"";var P=F+"";return P=="0"&&1/F==-N?"-0":P}ke.exports=A},27561:function(ke,ve,k){var M=k(67990),H=/^\s+/;function U(Y){return Y&&Y.slice(0,M(Y)+1).replace(H,"")}ke.exports=U},45652:function(ke,ve,k){var M=k(88668),H=k(47443),U=k(1196),Y=k(74757),N=k(23593),I=k(21814),C=200;function A(F,P,W){var K=-1,ge=H,be=F.length,Ue=!0,Ne=[],ye=Ne;if(W)Ue=!1,ge=U;else if(be>=C){var De=P?null:N(F);if(De)return I(De);Ue=!1,ge=Y,ye=new M}else ye=P?[]:Ne;e:for(;++K<be;){var Ce=F[K],Me=P?P(Ce):Ce;if(Ce=W||Ce!==0?Ce:0,Ue&&Me===Me){for(var Oe=ye.length;Oe--;)if(ye[Oe]===Me)continue e;P&&ye.push(Me),Ne.push(Ce)}else ge(ye,Me,W)||(ye!==Ne&&ye.push(Me),Ne.push(Ce))}return Ne}ke.exports=A},47415:function(ke,ve,k){var M=k(29932);function H(U,Y){return M(Y,function(N){return U[N]})}ke.exports=H},1757:function(ke){function ve(k,M,H){for(var U=-1,Y=k.length,N=M.length,I={};++U<Y;){var C=U<N?M[U]:void 0;H(I,k[U],C)}return I}ke.exports=ve},74757:function(ke){function ve(k,M){return k.has(M)}ke.exports=ve},54290:function(ke,ve,k){var M=k(6557);function H(U){return typeof U=="function"?U:M}ke.exports=H},71811:function(ke,ve,k){var M=k(1469),H=k(15403),U=k(55514),Y=k(79833);function N(I,C){return M(I)?I:H(I,C)?[I]:U(Y(I))}ke.exports=N},57157:function(ke,ve,k){var M=k(74318);function H(U,Y){var N=Y?M(U.buffer):U.buffer;return new U.constructor(N,U.byteOffset,U.byteLength)}ke.exports=H},93147:function(ke){var ve=/\w*$/;function k(M){var H=new M.constructor(M.source,ve.exec(M));return H.lastIndex=M.lastIndex,H}ke.exports=k},40419:function(ke,ve,k){var M=k(62705),H=M?M.prototype:void 0,U=H?H.valueOf:void 0;function Y(N){return U?Object(U.call(N)):{}}ke.exports=Y},26393:function(ke,ve,k){var M=k(33448);function H(U,Y){if(U!==Y){var N=U!==void 0,I=U===null,C=U===U,A=M(U),F=Y!==void 0,P=Y===null,W=Y===Y,K=M(Y);if(!P&&!K&&!A&&U>Y||A&&F&&W&&!P&&!K||I&&F&&W||!N&&W||!C)return 1;if(!I&&!A&&!K&&U<Y||K&&N&&C&&!I&&!A||P&&N&&C||!F&&C||!W)return-1}return 0}ke.exports=H},85022:function(ke,ve,k){var M=k(26393);function H(U,Y,N){for(var I=-1,C=U.criteria,A=Y.criteria,F=C.length,P=N.length;++I<F;){var W=M(C[I],A[I]);if(W){if(I>=P)return W;var K=N[I];return W*(K=="desc"?-1:1)}}return U.index-Y.index}ke.exports=H},18805:function(ke,ve,k){var M=k(98363),H=k(99551);function U(Y,N){return M(Y,H(Y),N)}ke.exports=U},1911:function(ke,ve,k){var M=k(98363),H=k(51442);function U(Y,N){return M(Y,H(Y),N)}ke.exports=U},99291:function(ke,ve,k){var M=k(98612);function H(U,Y){return function(N,I){if(N==null)return N;if(!M(N))return U(N,I);for(var C=N.length,A=Y?C:-1,F=Object(N);(Y?A--:++A<C)&&I(F[A],A,F)!==!1;);return N}}ke.exports=H},67740:function(ke,ve,k){var M=k(67206),H=k(98612),U=k(3674);function Y(N){return function(I,C,A){var F=Object(I);if(!H(I)){var P=M(C,3);I=U(I),C=function(K){return P(F[K],K,F)}}var W=N(I,C,A);return W>-1?F[P?I[W]:W]:void 0}}ke.exports=Y},47445:function(ke,ve,k){var M=k(40098),H=k(16612),U=k(18601);function Y(N){return function(I,C,A){return A&&typeof A!="number"&&H(I,C,A)&&(C=A=void 0),I=U(I),C===void 0?(C=I,I=0):C=U(C),A=A===void 0?I<C?1:-1:U(A),M(I,C,A,N)}}ke.exports=Y},23593:function(ke,ve,k){var M=k(58525),H=k(50308),U=k(21814),Y=1/0,N=M&&1/U(new M([,-0]))[1]==Y?function(I){return new M(I)}:H;ke.exports=N},67114:function(ke,ve,k){var M=k(88668),H=k(82908),U=k(74757),Y=1,N=2;function I(C,A,F,P,W,K){var ge=F&Y,be=C.length,Ue=A.length;if(be!=Ue&&!(ge&&Ue>be))return!1;var Ne=K.get(C),ye=K.get(A);if(Ne&&ye)return Ne==A&&ye==C;var De=-1,Ce=!0,Me=F&N?new M:void 0;for(K.set(C,A),K.set(A,C);++De<be;){var Oe=C[De],re=A[De];if(P)var q=ge?P(re,Oe,De,A,C,K):P(Oe,re,De,C,A,K);if(q!==void 0){if(q)continue;Ce=!1;break}if(Me){if(!H(A,function(ce,Ee){if(!U(Me,Ee)&&(Oe===ce||W(Oe,ce,F,P,K)))return Me.push(Ee)})){Ce=!1;break}}else if(!(Oe===re||W(Oe,re,F,P,K))){Ce=!1;break}}return K.delete(C),K.delete(A),Ce}ke.exports=I},18351:function(ke,ve,k){var M=k(62705),H=k(11149),U=k(77813),Y=k(67114),N=k(68776),I=k(21814),C=1,A=2,F="[object Boolean]",P="[object Date]",W="[object Error]",K="[object Map]",ge="[object Number]",be="[object RegExp]",Ue="[object Set]",Ne="[object String]",ye="[object Symbol]",De="[object ArrayBuffer]",Ce="[object DataView]",Me=M?M.prototype:void 0,Oe=Me?Me.valueOf:void 0;function re(q,ce,Ee,Te,Je,He,rt){switch(Ee){case Ce:if(q.byteLength!=ce.byteLength||q.byteOffset!=ce.byteOffset)return!1;q=q.buffer,ce=ce.buffer;case De:return!(q.byteLength!=ce.byteLength||!He(new H(q),new H(ce)));case F:case P:case ge:return U(+q,+ce);case W:return q.name==ce.name&&q.message==ce.message;case be:case Ne:return q==ce+"";case K:var Et=N;case Ue:var lt=Te&C;if(Et||(Et=I),q.size!=ce.size&&!lt)return!1;var st=rt.get(q);if(st)return st==ce;Te|=A,rt.set(q,ce);var mt=Y(Et(q),Et(ce),Te,Je,He,rt);return rt.delete(q),mt;case ye:if(Oe)return Oe.call(q)==Oe.call(ce)}return!1}ke.exports=re},16096:function(ke,ve,k){var M=k(58234),H=1,U=Object.prototype,Y=U.hasOwnProperty;function N(I,C,A,F,P,W){var K=A&H,ge=M(I),be=ge.length,Ue=M(C),Ne=Ue.length;if(be!=Ne&&!K)return!1;for(var ye=be;ye--;){var De=ge[ye];if(!(K?De in C:Y.call(C,De)))return!1}var Ce=W.get(I),Me=W.get(C);if(Ce&&Me)return Ce==C&&Me==I;var Oe=!0;W.set(I,C),W.set(C,I);for(var re=K;++ye<be;){De=ge[ye];var q=I[De],ce=C[De];if(F)var Ee=K?F(ce,q,De,C,I,W):F(q,ce,De,I,C,W);if(!(Ee===void 0?q===ce||P(q,ce,A,F,W):Ee)){Oe=!1;break}re||(re=De=="constructor")}if(Oe&&!re){var Te=I.constructor,Je=C.constructor;Te!=Je&&"constructor"in I&&"constructor"in C&&!(typeof Te=="function"&&Te instanceof Te&&typeof Je=="function"&&Je instanceof Je)&&(Oe=!1)}return W.delete(I),W.delete(C),Oe}ke.exports=N},99021:function(ke,ve,k){var M=k(85564),H=k(45357),U=k(30061);function Y(N){return U(H(N,void 0,M),N+"")}ke.exports=Y},58234:function(ke,ve,k){var M=k(64055),H=k(99551),U=k(3674);function Y(N){return M(N,U,H)}ke.exports=Y},46904:function(ke,ve,k){var M=k(64055),H=k(51442),U=k(81704);function Y(N){return M(N,U,H)}ke.exports=Y},1499:function(ke,ve,k){var M=k(89162),H=k(3674);function U(Y){for(var N=H(Y),I=N.length;I--;){var C=N[I],A=Y[C];N[I]=[C,A,M(A)]}return N}ke.exports=U},99551:function(ke,ve,k){var M=k(34963),H=k(70479),U=Object.prototype,Y=U.propertyIsEnumerable,N=Object.getOwnPropertySymbols,I=N?function(C){return C==null?[]:(C=Object(C),M(N(C),function(A){return Y.call(C,A)}))}:H;ke.exports=I},51442:function(ke,ve,k){var M=k(62488),H=k(85924),U=k(99551),Y=k(70479),N=Object.getOwnPropertySymbols,I=N?function(C){for(var A=[];C;)M(A,U(C)),C=H(C);return A}:Y;ke.exports=I},64160:function(ke,ve,k){var M=k(18552),H=k(57071),U=k(53818),Y=k(58525),N=k(70577),I=k(44239),C=k(80346),A="[object Map]",F="[object Object]",P="[object Promise]",W="[object Set]",K="[object WeakMap]",ge="[object DataView]",be=C(M),Ue=C(H),Ne=C(U),ye=C(Y),De=C(N),Ce=I;(M&&Ce(new M(new ArrayBuffer(1)))!=ge||H&&Ce(new H)!=A||U&&Ce(U.resolve())!=P||Y&&Ce(new Y)!=W||N&&Ce(new N)!=K)&&(Ce=function(Me){var Oe=I(Me),re=Oe==F?Me.constructor:void 0,q=re?C(re):"";if(q)switch(q){case be:return ge;case Ue:return A;case Ne:return P;case ye:return W;case De:return K}return Oe}),ke.exports=Ce},222:function(ke,ve,k){var M=k(71811),H=k(35694),U=k(1469),Y=k(65776),N=k(41780),I=k(40327);function C(A,F,P){F=M(F,A);for(var W=-1,K=F.length,ge=!1;++W<K;){var be=I(F[W]);if(!(ge=A!=null&&P(A,be)))break;A=A[be]}return ge||++W!=K?ge:(K=A==null?0:A.length,!!K&&N(K)&&Y(be,K)&&(U(A)||H(A)))}ke.exports=C},62689:function(ke){var ve="\\ud800-\\udfff",k="\\u0300-\\u036f",M="\\ufe20-\\ufe2f",H="\\u20d0-\\u20ff",U=k+M+H,Y="\\ufe0e\\ufe0f",N="\\u200d",I=RegExp("["+N+ve+U+Y+"]");function C(A){return I.test(A)}ke.exports=C},43824:function(ke){var ve=Object.prototype,k=ve.hasOwnProperty;function M(H){var U=H.length,Y=new H.constructor(U);return U&&typeof H[0]=="string"&&k.call(H,"index")&&(Y.index=H.index,Y.input=H.input),Y}ke.exports=M},29148:function(ke,ve,k){var M=k(74318),H=k(57157),U=k(93147),Y=k(40419),N=k(77133),I="[object Boolean]",C="[object Date]",A="[object Map]",F="[object Number]",P="[object RegExp]",W="[object Set]",K="[object String]",ge="[object Symbol]",be="[object ArrayBuffer]",Ue="[object DataView]",Ne="[object Float32Array]",ye="[object Float64Array]",De="[object Int8Array]",Ce="[object Int16Array]",Me="[object Int32Array]",Oe="[object Uint8Array]",re="[object Uint8ClampedArray]",q="[object Uint16Array]",ce="[object Uint32Array]";function Ee(Te,Je,He){var rt=Te.constructor;switch(Je){case be:return M(Te);case I:case C:return new rt(+Te);case Ue:return H(Te,He);case Ne:case ye:case De:case Ce:case Me:case Oe:case re:case q:case ce:return N(Te,He);case A:return new rt;case F:case K:return new rt(Te);case P:return U(Te);case W:return new rt;case ge:return Y(Te)}}ke.exports=Ee},37285:function(ke,ve,k){var M=k(62705),H=k(35694),U=k(1469),Y=M?M.isConcatSpreadable:void 0;function N(I){return U(I)||H(I)||!!(Y&&I&&I[Y])}ke.exports=N},15403:function(ke,ve,k){var M=k(1469),H=k(33448),U=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Y=/^\w*$/;function N(I,C){if(M(I))return!1;var A=typeof I;return A=="number"||A=="symbol"||A=="boolean"||I==null||H(I)?!0:Y.test(I)||!U.test(I)||C!=null&&I in Object(C)}ke.exports=N},89162:function(ke,ve,k){var M=k(13218);function H(U){return U===U&&!M(U)}ke.exports=H},68776:function(ke){function ve(k){var M=-1,H=Array(k.size);return k.forEach(function(U,Y){H[++M]=[Y,U]}),H}ke.exports=ve},42634:function(ke){function ve(k,M){return function(H){return H==null?!1:H[k]===M&&(M!==void 0||k in Object(H))}}ke.exports=ve},24523:function(ke,ve,k){var M=k(88306),H=500;function U(Y){var N=M(Y,function(C){return I.size===H&&I.clear(),C}),I=N.cache;return N}ke.exports=U},86916:function(ke,ve,k){var M=k(5569),H=M(Object.keys,Object);ke.exports=H},90619:function(ke){var ve="__lodash_hash_undefined__";function k(M){return this.__data__.set(M,ve),this}ke.exports=k},72385:function(ke){function ve(k){return this.__data__.has(k)}ke.exports=ve},21814:function(ke){function ve(k){var M=-1,H=Array(k.size);return k.forEach(function(U){H[++M]=U}),H}ke.exports=ve},42351:function(ke){function ve(k,M,H){for(var U=H-1,Y=k.length;++U<Y;)if(k[U]===M)return U;return-1}ke.exports=ve},88016:function(ke,ve,k){var M=k(48983),H=k(62689),U=k(21903);function Y(N){return H(N)?U(N):M(N)}ke.exports=Y},55514:function(ke,ve,k){var M=k(24523),H=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,U=/\\(\\)?/g,Y=M(function(N){var I=[];return N.charCodeAt(0)===46&&I.push(""),N.replace(H,function(C,A,F,P){I.push(F?P.replace(U,"$1"):A||C)}),I});ke.exports=Y},40327:function(ke,ve,k){var M=k(33448),H=1/0;function U(Y){if(typeof Y=="string"||M(Y))return Y;var N=Y+"";return N=="0"&&1/Y==-H?"-0":N}ke.exports=U},67990:function(ke){var ve=/\s/;function k(M){for(var H=M.length;H--&&ve.test(M.charAt(H)););return H}ke.exports=k},21903:function(ke){var ve="\\ud800-\\udfff",k="\\u0300-\\u036f",M="\\ufe20-\\ufe2f",H="\\u20d0-\\u20ff",U=k+M+H,Y="\\ufe0e\\ufe0f",N="["+ve+"]",I="["+U+"]",C="\\ud83c[\\udffb-\\udfff]",A="(?:"+I+"|"+C+")",F="[^"+ve+"]",P="(?:\\ud83c[\\udde6-\\uddff]){2}",W="[\\ud800-\\udbff][\\udc00-\\udfff]",K="\\u200d",ge=A+"?",be="["+Y+"]?",Ue="(?:"+K+"(?:"+[F,P,W].join("|")+")"+be+ge+")*",Ne=be+ge+Ue,ye="(?:"+[F+I+"?",I,P,W,N].join("|")+")",De=RegExp(C+"(?="+C+")|"+ye+Ne,"g");function Ce(Me){for(var Oe=De.lastIndex=0;De.test(Me);)++Oe;return Oe}ke.exports=Ce},66678:function(ke,ve,k){var M=k(85990),H=4;function U(Y){return M(Y,H)}ke.exports=U},50361:function(ke,ve,k){var M=k(85990),H=1,U=4;function Y(N){return M(N,H|U)}ke.exports=Y},91747:function(ke,ve,k){var M=k(18460),H=k(77813),U=k(16612),Y=k(81704),N=Object.prototype,I=N.hasOwnProperty,C=M(function(A,F){A=Object(A);var P=-1,W=F.length,K=W>2?F[2]:void 0;for(K&&U(F[0],F[1],K)&&(W=1);++P<W;)for(var ge=F[P],be=Y(ge),Ue=-1,Ne=be.length;++Ue<Ne;){var ye=be[Ue],De=A[ye];(De===void 0||H(De,N[ye])&&!I.call(A,ye))&&(A[ye]=ge[ye])}return A});ke.exports=C},85768:function(ke,ve,k){ke.exports=k(84486)},63105:function(ke,ve,k){var M=k(34963),H=k(80760),U=k(67206),Y=k(1469);function N(I,C){var A=Y(I)?M:H;return A(I,U(C,3))}ke.exports=N},13311:function(ke,ve,k){var M=k(67740),H=k(30998),U=M(H);ke.exports=U},30998:function(ke,ve,k){var M=k(41848),H=k(67206),U=k(40554),Y=Math.max;function N(I,C,A){var F=I==null?0:I.length;if(!F)return-1;var P=A==null?0:U(A);return P<0&&(P=Y(F+P,0)),M(I,H(C,3),P)}ke.exports=N},85564:function(ke,ve,k){var M=k(21078);function H(U){var Y=U==null?0:U.length;return Y?M(U,1):[]}ke.exports=H},84486:function(ke,ve,k){var M=k(77412),H=k(89881),U=k(54290),Y=k(1469);function N(I,C){var A=Y(I)?M:H;return A(I,U(C))}ke.exports=N},62620:function(ke,ve,k){var M=k(28483),H=k(54290),U=k(81704);function Y(N,I){return N==null?N:M(N,H(I),U)}ke.exports=Y},27361:function(ke,ve,k){var M=k(97786);function H(U,Y,N){var I=U==null?void 0:M(U,Y);return I===void 0?N:I}ke.exports=H},18721:function(ke,ve,k){var M=k(78565),H=k(222);function U(Y,N){return Y!=null&&H(Y,N,M)}ke.exports=U},79095:function(ke,ve,k){var M=k(13),H=k(222);function U(Y,N){return Y!=null&&H(Y,N,M)}ke.exports=U},58367:function(ke,ve,k){var M=k(280),H=k(64160),U=k(35694),Y=k(1469),N=k(98612),I=k(44144),C=k(25726),A=k(36719),F="[object Map]",P="[object Set]",W=Object.prototype,K=W.hasOwnProperty;function ge(be){if(be==null)return!0;if(N(be)&&(Y(be)||typeof be=="string"||typeof be.splice=="function"||I(be)||A(be)||U(be)))return!be.length;var Ue=H(be);if(Ue==F||Ue==P)return!be.size;if(C(be))return!M(be).length;for(var Ne in be)if(K.call(be,Ne))return!1;return!0}ke.exports=ge},56688:function(ke,ve,k){var M=k(25588),H=k(7518),U=k(31167),Y=U&&U.isMap,N=Y?H(Y):M;ke.exports=N},72928:function(ke,ve,k){var M=k(29221),H=k(7518),U=k(31167),Y=U&&U.isSet,N=Y?H(Y):M;ke.exports=N},47037:function(ke,ve,k){var M=k(44239),H=k(1469),U=k(37005),Y="[object String]";function N(I){return typeof I=="string"||!H(I)&&U(I)&&M(I)==Y}ke.exports=N},33448:function(ke,ve,k){var M=k(44239),H=k(37005),U="[object Symbol]";function Y(N){return typeof N=="symbol"||H(N)&&M(N)==U}ke.exports=Y},52353:function(ke){function ve(k){return k===void 0}ke.exports=ve},3674:function(ke,ve,k){var M=k(14636),H=k(280),U=k(98612);function Y(N){return U(N)?M(N):H(N)}ke.exports=Y},10928:function(ke){function ve(k){var M=k==null?0:k.length;return M?k[M-1]:void 0}ke.exports=ve},35161:function(ke,ve,k){var M=k(29932),H=k(67206),U=k(69199),Y=k(1469);function N(I,C){var A=Y(I)?M:U;return A(I,H(C,3))}ke.exports=N},8521:function(ke,ve,k){var M=k(89465),H=k(47816),U=k(67206);function Y(N,I){var C={};return I=U(I,3),H(N,function(A,F,P){M(C,F,I(A,F,P))}),C}ke.exports=Y},6162:function(ke,ve,k){var M=k(56029),H=k(53325),U=k(6557);function Y(N){return N&&N.length?M(N,U,H):void 0}ke.exports=Y},88306:function(ke,ve,k){var M=k(83369),H="Expected a function";function U(Y,N){if(typeof Y!="function"||N!=null&&typeof N!="function")throw new TypeError(H);var I=function(){var C=arguments,A=N?N.apply(this,C):C[0],F=I.cache;if(F.has(A))return F.get(A);var P=Y.apply(this,C);return I.cache=F.set(A,P)||F,P};return I.cache=new(U.Cache||M),I}U.Cache=M,ke.exports=U},53632:function(ke,ve,k){var M=k(56029),H=k(70433),U=k(6557);function Y(N){return N&&N.length?M(N,U,H):void 0}ke.exports=Y},22762:function(ke,ve,k){var M=k(56029),H=k(67206),U=k(70433);function Y(N,I){return N&&N.length?M(N,H(I,2),U):void 0}ke.exports=Y},50308:function(ke){function ve(){}ke.exports=ve},7771:function(ke,ve,k){var M=k(55639),H=function(){return M.Date.now()};ke.exports=H},78718:function(ke,ve,k){var M=k(25970),H=k(99021),U=H(function(Y,N){return Y==null?{}:M(Y,N)});ke.exports=U},39601:function(ke,ve,k){var M=k(40371),H=k(79152),U=k(15403),Y=k(40327);function N(I){return U(I)?M(Y(I)):H(I)}ke.exports=N},96026:function(ke,ve,k){var M=k(47445),H=M();ke.exports=H},54061:function(ke,ve,k){var M=k(62663),H=k(89881),U=k(67206),Y=k(10107),N=k(1469);function I(C,A,F){var P=N(C)?M:Y,W=arguments.length<3;return P(C,U(A,4),F,W,H)}ke.exports=I},84238:function(ke,ve,k){var M=k(280),H=k(64160),U=k(98612),Y=k(47037),N=k(88016),I="[object Map]",C="[object Set]";function A(F){if(F==null)return 0;if(U(F))return Y(F)?N(F):F.length;var P=H(F);return P==I||P==C?F.size:M(F).length}ke.exports=A},89734:function(ke,ve,k){var M=k(21078),H=k(82689),U=k(18460),Y=k(16612),N=U(function(I,C){if(I==null)return[];var A=C.length;return A>1&&Y(I,C[0],C[1])?C=[]:A>2&&Y(C[0],C[1],C[2])&&(C=[C[0]]),H(I,M(C,1),[])});ke.exports=N},70479:function(ke){function ve(){return[]}ke.exports=ve},18601:function(ke,ve,k){var M=k(14841),H=1/0,U=17976931348623157e292;function Y(N){if(!N)return N===0?N:0;if(N=M(N),N===H||N===-H){var I=N<0?-1:1;return I*U}return N===N?N:0}ke.exports=Y},40554:function(ke,ve,k){var M=k(18601);function H(U){var Y=M(U),N=Y%1;return Y===Y?N?Y-N:Y:0}ke.exports=H},14841:function(ke,ve,k){var M=k(27561),H=k(13218),U=k(33448),Y=NaN,N=/^[-+]0x[0-9a-f]+$/i,I=/^0b[01]+$/i,C=/^0o[0-7]+$/i,A=parseInt;function F(P){if(typeof P=="number")return P;if(U(P))return Y;if(H(P)){var W=typeof P.valueOf=="function"?P.valueOf():P;P=H(W)?W+"":W}if(typeof P!="string")return P===0?P:+P;P=M(P);var K=I.test(P);return K||C.test(P)?A(P.slice(2),K?2:8):N.test(P)?Y:+P}ke.exports=F},79833:function(ke,ve,k){var M=k(80531);function H(U){return U==null?"":M(U)}ke.exports=H},68718:function(ke,ve,k){var M=k(77412),H=k(3118),U=k(47816),Y=k(67206),N=k(85924),I=k(1469),C=k(44144),A=k(23560),F=k(13218),P=k(36719);function W(K,ge,be){var Ue=I(K),Ne=Ue||C(K)||P(K);if(ge=Y(ge,4),be==null){var ye=K&&K.constructor;Ne?be=Ue?new ye:[]:F(K)?be=A(ye)?H(N(K)):{}:be={}}return(Ne?M:U)(K,function(De,Ce,Me){return ge(be,De,Ce,Me)}),be}ke.exports=W},93386:function(ke,ve,k){var M=k(21078),H=k(18460),U=k(45652),Y=k(29246),N=H(function(I){return U(M(I,1,Y,!0))});ke.exports=N},73955:function(ke,ve,k){var M=k(79833),H=0;function U(Y){var N=++H;return M(Y)+N}ke.exports=U},52628:function(ke,ve,k){var M=k(47415),H=k(3674);function U(Y){return Y==null?[]:M(Y,H(Y))}ke.exports=U},7287:function(ke,ve,k){var M=k(34865),H=k(1757);function U(Y,N){return H(Y||[],N||[],M)}ke.exports=U},75823:function(ke,ve,k){"use strict";k.r(ve),k.d(ve,{default:function(){return Y}});var M=k(44091);function H(N){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(0,M.isAnyArray)(N))throw new TypeError("input must be an array");if(N.length===0)throw new TypeError("input must not be empty");var C=I.fromIndex,A=C===void 0?0:C,F=I.toIndex,P=F===void 0?N.length:F;if(A<0||A>=N.length||!Number.isInteger(A))throw new Error("fromIndex must be a positive integer smaller than length");if(P<=A||P>N.length||!Number.isInteger(P))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var W=N[A],K=A+1;K<P;K++)N[K]>W&&(W=N[K]);return W}function U(N){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(0,M.isAnyArray)(N))throw new TypeError("input must be an array");if(N.length===0)throw new TypeError("input must not be empty");var C=I.fromIndex,A=C===void 0?0:C,F=I.toIndex,P=F===void 0?N.length:F;if(A<0||A>=N.length||!Number.isInteger(A))throw new Error("fromIndex must be a positive integer smaller than length");if(P<=A||P>N.length||!Number.isInteger(P))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var W=N[A],K=A+1;K<P;K++)N[K]<W&&(W=N[K]);return W}function Y(N){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if((0,M.isAnyArray)(N)){if(N.length===0)throw new TypeError("input must not be empty")}else throw new TypeError("input must be an array");var C;if(I.output!==void 0){if(!(0,M.isAnyArray)(I.output))throw new TypeError("output option must be an array if specified");C=I.output}else C=new Array(N.length);var A=U(N),F=H(N);if(A===F)throw new RangeError("minimum and maximum input values are equal. Cannot rescale a constant array");var P=I.min,W=P===void 0?I.autoMinMax?A:0:P,K=I.max,ge=K===void 0?I.autoMinMax?F:1:K;if(W>=ge)throw new RangeError("min option must be smaller than max option");for(var be=(ge-W)/(F-A),Ue=0;Ue<N.length;Ue++)C[Ue]=(N[Ue]-A)*be+W;return C}},95860:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return Me}});var M=k(87462),H=k(1413),U=k(4942),Y=k(97685),N=k(45987),I=k(94184),C=k.n(I),A=k(67294);function F(Oe){var re=A.useRef();re.current=Oe;var q=A.useCallback(function(){for(var ce,Ee=arguments.length,Te=new Array(Ee),Je=0;Je<Ee;Je++)Te[Je]=arguments[Je];return(ce=re.current)===null||ce===void 0?void 0:ce.call.apply(ce,[re].concat(Te))},[]);return q}function P(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var W=P()?A.useLayoutEffect:A.useEffect,K=function(re,q){var ce=A.useRef(!0);W(function(){return re(ce.current)},q),W(function(){return ce.current=!1,function(){ce.current=!0}},[])},ge=function(re,q){K(function(ce){if(!ce)return re()},q)},be=null;function Ue(Oe){var re=A.useRef(!1),q=A.useState(Oe),ce=(0,Y.Z)(q,2),Ee=ce[0],Te=ce[1];A.useEffect(function(){return re.current=!1,function(){re.current=!0}},[]);function Je(He,rt){rt&&re.current||Te(He)}return[Ee,Je]}function Ne(Oe){return Oe!==void 0}function ye(Oe,re){var q=re||{},ce=q.defaultValue,Ee=q.value,Te=q.onChange,Je=q.postState,He=Ue(function(){return Ne(Ee)?Ee:Ne(ce)?typeof ce=="function"?ce():ce:typeof Oe=="function"?Oe():Oe}),rt=(0,Y.Z)(He,2),Et=rt[0],lt=rt[1],st=Ee!==void 0?Ee:Et,mt=Je?Je(st):st,fe=F(Te),We=Ue([st]),ht=(0,Y.Z)(We,2),Pt=ht[0],Ve=ht[1];ge(function(){var ft=Pt[0];Et!==ft&&fe(Et,ft)},[Pt]),ge(function(){Ne(Ee)||lt(Ee)},[Ee]);var it=F(function(ft,ze){lt(ft,ze),Ve([st],ze)});return[mt,it]}var De=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],Ce=(0,A.forwardRef)(function(Oe,re){var q,ce=Oe.prefixCls,Ee=ce===void 0?"rc-checkbox":ce,Te=Oe.className,Je=Oe.style,He=Oe.checked,rt=Oe.disabled,Et=Oe.defaultChecked,lt=Et===void 0?!1:Et,st=Oe.type,mt=st===void 0?"checkbox":st,fe=Oe.title,We=Oe.onChange,ht=(0,N.Z)(Oe,De),Pt=(0,A.useRef)(null),Ve=ye(lt,{value:He}),it=(0,Y.Z)(Ve,2),ft=it[0],ze=it[1];(0,A.useImperativeHandle)(re,function(){return{focus:function(){var me;(me=Pt.current)===null||me===void 0||me.focus()},blur:function(){var me;(me=Pt.current)===null||me===void 0||me.blur()},input:Pt.current}});var Qe=C()(Ee,Te,(q={},(0,U.Z)(q,"".concat(Ee,"-checked"),ft),(0,U.Z)(q,"".concat(Ee,"-disabled"),rt),q)),Se=function(me){rt||("checked"in Oe||ze(me.target.checked),We==null||We({target:(0,H.Z)((0,H.Z)({},Oe),{},{type:mt,checked:me.target.checked}),stopPropagation:function(){me.stopPropagation()},preventDefault:function(){me.preventDefault()},nativeEvent:me.nativeEvent}))};return A.createElement("span",{className:Qe,title:fe,style:Je},A.createElement("input",(0,M.Z)({},ht,{className:"".concat(Ee,"-input"),ref:Pt,onChange:Se,disabled:rt,checked:!!ft,type:mt})),A.createElement("span",{className:"".concat(Ee,"-inner")}))}),Me=Ce},67656:function(ke,ve,k){"use strict";k.r(ve),k.d(ve,{BaseInput:function(){return P},default:function(){return Ce}});var M=k(87462),H=k(1413),U=k(4942),Y=k(71002),N=k(94184),I=k.n(N),C=k(67294),A=k(87887),F=function(Oe){var re,q,ce=Oe.inputElement,Ee=Oe.prefixCls,Te=Oe.prefix,Je=Oe.suffix,He=Oe.addonBefore,rt=Oe.addonAfter,Et=Oe.className,lt=Oe.style,st=Oe.disabled,mt=Oe.readOnly,fe=Oe.focused,We=Oe.triggerFocus,ht=Oe.allowClear,Pt=Oe.value,Ve=Oe.handleReset,it=Oe.hidden,ft=Oe.classes,ze=Oe.classNames,Qe=Oe.dataAttrs,Se=Oe.styles,E=Oe.components,me=(E==null?void 0:E.affixWrapper)||"span",L=(E==null?void 0:E.groupWrapper)||"span",X=(E==null?void 0:E.wrapper)||"span",Ke=(E==null?void 0:E.groupAddon)||"span",ot=(0,C.useRef)(null),pe=function(oe){var Fe;(Fe=ot.current)!==null&&Fe!==void 0&&Fe.contains(oe.target)&&(We==null||We())},xe=function(){var oe;if(!ht)return null;var Fe=!st&&!mt&&Pt,Ye="".concat(Ee,"-clear-icon"),ie=(0,Y.Z)(ht)==="object"&&ht!==null&&ht!==void 0&&ht.clearIcon?ht.clearIcon:"\u2716";return C.createElement("span",{onClick:Ve,onMouseDown:function(je){return je.preventDefault()},className:I()(Ye,(oe={},(0,U.Z)(oe,"".concat(Ye,"-hidden"),!Fe),(0,U.Z)(oe,"".concat(Ye,"-has-suffix"),!!Je),oe)),role:"button",tabIndex:-1},ie)},Ze=(0,C.cloneElement)(ce,{value:Pt,hidden:it,className:I()((re=ce.props)===null||re===void 0?void 0:re.className,!(0,A.X3)(Oe)&&!(0,A.He)(Oe)&&Et)||null,style:(0,H.Z)((0,H.Z)({},(q=ce.props)===null||q===void 0?void 0:q.style),!(0,A.X3)(Oe)&&!(0,A.He)(Oe)?lt:{})});if((0,A.X3)(Oe)){var O,ne="".concat(Ee,"-affix-wrapper"),qe=I()(ne,(O={},(0,U.Z)(O,"".concat(ne,"-disabled"),st),(0,U.Z)(O,"".concat(ne,"-focused"),fe),(0,U.Z)(O,"".concat(ne,"-readonly"),mt),(0,U.Z)(O,"".concat(ne,"-input-with-clear-btn"),Je&&ht&&Pt),O),!(0,A.He)(Oe)&&Et,ft==null?void 0:ft.affixWrapper,ze==null?void 0:ze.affixWrapper),dt=(Je||ht)&&C.createElement("span",{className:I()("".concat(Ee,"-suffix"),ze==null?void 0:ze.suffix),style:Se==null?void 0:Se.suffix},xe(),Je);Ze=C.createElement(me,(0,M.Z)({className:qe,style:(0,H.Z)((0,H.Z)({},(0,A.He)(Oe)?void 0:lt),Se==null?void 0:Se.affixWrapper),hidden:!(0,A.He)(Oe)&&it,onClick:pe},Qe==null?void 0:Qe.affixWrapper,{ref:ot}),Te&&C.createElement("span",{className:I()("".concat(Ee,"-prefix"),ze==null?void 0:ze.prefix),style:Se==null?void 0:Se.prefix},Te),(0,C.cloneElement)(ce,{value:Pt,hidden:null}),dt)}if((0,A.He)(Oe)){var nt="".concat(Ee,"-group"),xt="".concat(nt,"-addon"),bt=I()("".concat(Ee,"-wrapper"),nt,ft==null?void 0:ft.wrapper),wt=I()("".concat(Ee,"-group-wrapper"),Et,ft==null?void 0:ft.group);return C.createElement(L,{className:wt,style:lt,hidden:it},C.createElement(X,{className:bt},He&&C.createElement(Ke,{className:xt},He),(0,C.cloneElement)(Ze,{hidden:null}),rt&&C.createElement(Ke,{className:xt},rt)))}return Ze},P=F,W=k(74902),K=k(97685),ge=k(45987),be=k(21770),Ue=k(98423),Ne=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],ye=(0,C.forwardRef)(function(Me,Oe){var re=Me.autoComplete,q=Me.onChange,ce=Me.onFocus,Ee=Me.onBlur,Te=Me.onPressEnter,Je=Me.onKeyDown,He=Me.prefixCls,rt=He===void 0?"rc-input":He,Et=Me.disabled,lt=Me.htmlSize,st=Me.className,mt=Me.maxLength,fe=Me.suffix,We=Me.showCount,ht=Me.type,Pt=ht===void 0?"text":ht,Ve=Me.classes,it=Me.classNames,ft=Me.styles,ze=(0,ge.Z)(Me,Ne),Qe=(0,be.Z)(Me.defaultValue,{value:Me.value}),Se=(0,K.Z)(Qe,2),E=Se[0],me=Se[1],L=(0,C.useState)(!1),X=(0,K.Z)(L,2),Ke=X[0],ot=X[1],pe=(0,C.useRef)(null),xe=function(wt){pe.current&&(0,A.nH)(pe.current,wt)};(0,C.useImperativeHandle)(Oe,function(){return{focus:xe,blur:function(){var wt;(wt=pe.current)===null||wt===void 0||wt.blur()},setSelectionRange:function(wt,we,oe){var Fe;(Fe=pe.current)===null||Fe===void 0||Fe.setSelectionRange(wt,we,oe)},select:function(){var wt;(wt=pe.current)===null||wt===void 0||wt.select()},input:pe.current}}),(0,C.useEffect)(function(){ot(function(bt){return bt&&Et?!1:bt})},[Et]);var Ze=function(wt){Me.value===void 0&&me(wt.target.value),pe.current&&(0,A.rJ)(pe.current,wt,q)},O=function(wt){Te&&wt.key==="Enter"&&Te(wt),Je==null||Je(wt)},ne=function(wt){ot(!0),ce==null||ce(wt)},qe=function(wt){ot(!1),Ee==null||Ee(wt)},dt=function(wt){me(""),xe(),pe.current&&(0,A.rJ)(pe.current,wt,q)},nt=function(){var wt=(0,Ue.Z)(Me,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return C.createElement("input",(0,M.Z)({autoComplete:re},wt,{onChange:Ze,onFocus:ne,onBlur:qe,onKeyDown:O,className:I()(rt,(0,U.Z)({},"".concat(rt,"-disabled"),Et),it==null?void 0:it.input),style:ft==null?void 0:ft.input,ref:pe,size:lt,type:Pt}))},xt=function(){var wt=Number(mt)>0;if(fe||We){var we=(0,A.D7)(E),oe=(0,W.Z)(we).length,Fe=(0,Y.Z)(We)==="object"?We.formatter({value:we,count:oe,maxLength:mt}):"".concat(oe).concat(wt?" / ".concat(mt):"");return C.createElement(C.Fragment,null,!!We&&C.createElement("span",{className:I()("".concat(rt,"-show-count-suffix"),(0,U.Z)({},"".concat(rt,"-show-count-has-suffix"),!!fe),it==null?void 0:it.count),style:(0,H.Z)({},ft==null?void 0:ft.count)},Fe),fe)}return null};return C.createElement(P,(0,M.Z)({},ze,{prefixCls:rt,className:st,inputElement:nt(),handleReset:dt,value:(0,A.D7)(E),focused:Ke,triggerFocus:xe,suffix:xt(),disabled:Et,classes:Ve,classNames:it,styles:ft}))}),De=ye,Ce=De},87887:function(ke,ve,k){"use strict";k.d(ve,{D7:function(){return N},He:function(){return M},X3:function(){return H},nH:function(){return Y},rJ:function(){return U}});function M(I){return!!(I.addonBefore||I.addonAfter)}function H(I){return!!(I.prefix||I.suffix||I.allowClear)}function U(I,C,A,F){if(A){var P=C;if(C.type==="click"){var W=I.cloneNode(!0);P=Object.create(C,{target:{value:W},currentTarget:{value:W}}),W.value="",A(P);return}if(F!==void 0){P=Object.create(C,{target:{value:I},currentTarget:{value:I}}),I.value=F,A(P);return}A(P)}}function Y(I,C){if(I){I.focus(C);var A=C||{},F=A.cursor;if(F){var P=I.value.length;switch(F){case"start":I.setSelectionRange(0,0);break;case"end":I.setSelectionRange(P,P);break;default:I.setSelectionRange(0,P)}}}}function N(I){return typeof I=="undefined"||I===null?"":String(I)}},66680:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return H}});var M=k(67294);function H(U){var Y=M.useRef();Y.current=U;var N=M.useCallback(function(){for(var I,C=arguments.length,A=new Array(C),F=0;F<C;F++)A[F]=arguments[F];return(I=Y.current)===null||I===void 0?void 0:I.call.apply(I,[Y].concat(A))},[]);return N}},21770:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return I}});var M=k(97685),H=k(66680),U=k(8410),Y=k(63896);function N(C){return C!==void 0}function I(C,A){var F=A||{},P=F.defaultValue,W=F.value,K=F.onChange,ge=F.postState,be=(0,Y.Z)(function(){return N(W)?W:N(P)?typeof P=="function"?P():P:typeof C=="function"?C():C}),Ue=(0,M.Z)(be,2),Ne=Ue[0],ye=Ue[1],De=W!==void 0?W:Ne,Ce=ge?ge(De):De,Me=(0,H.Z)(K),Oe=(0,Y.Z)([De]),re=(0,M.Z)(Oe,2),q=re[0],ce=re[1];(0,U.o)(function(){var Te=q[0];Ne!==Te&&Me(Ne,Te)},[q]),(0,U.o)(function(){N(W)||ye(W)},[W]);var Ee=(0,H.Z)(function(Te,Je){ye(Te,Je),ce([De],Je)});return[Ce,Ee]}},98423:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return H}});var M=k(1413);function H(U,Y){var N=(0,M.Z)({},U);return Array.isArray(Y)&&Y.forEach(function(I){delete N[I]}),N}},73299:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return Qa}});var M=k(87462),H=k(1413),U=k(71002),Y=k(97685),N=k(4942),I=k(45987),C=k(67294),A=k(73935),F=k(94184),P=k.n(F),W=k(48555),K=C.forwardRef(function(Bt,en){var Jt=Bt.height,nn=Bt.offsetY,sr=Bt.offsetX,Pn=Bt.children,Fn=Bt.prefixCls,zr=Bt.onInnerResize,$r=Bt.innerProps,Ae=Bt.rtl,$=Bt.extra,z={},S={display:"flex",flexDirection:"column"};if(nn!==void 0){var D;z={height:Jt,position:"relative",overflow:"hidden"},S=(0,H.Z)((0,H.Z)({},S),{},(D={transform:"translateY(".concat(nn,"px)")},(0,N.Z)(D,Ae?"marginRight":"marginLeft",-sr),(0,N.Z)(D,"position","absolute"),(0,N.Z)(D,"left",0),(0,N.Z)(D,"right",0),(0,N.Z)(D,"top",0),D))}return C.createElement("div",{style:z},C.createElement(W.Z,{onResize:function(Le){var $e=Le.offsetHeight;$e&&zr&&zr()}},C.createElement("div",(0,M.Z)({style:S,className:P()((0,N.Z)({},"".concat(Fn,"-holder-inner"),Fn)),ref:en},$r),Pn,$)))});K.displayName="Filler";var ge=K,be=function(en){return+setTimeout(en,16)},Ue=function(en){return clearTimeout(en)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(be=function(en){return window.requestAnimationFrame(en)},Ue=function(en){return window.cancelAnimationFrame(en)});var Ne=0,ye=new Map;function De(Bt){ye.delete(Bt)}var Ce=function(en){var Jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Ne+=1;var nn=Ne;function sr(Pn){if(Pn===0)De(nn),en();else{var Fn=be(function(){sr(Pn-1)});ye.set(nn,Fn)}}return sr(Jt),nn};Ce.cancel=function(Bt){var en=ye.get(Bt);return De(en),Ue(en)};var Me=Ce;function Oe(Bt,en){var Jt="touches"in Bt?Bt.touches[0]:Bt;return Jt[en?"pageX":"pageY"]}var re=C.forwardRef(function(Bt,en){var Jt,nn=Bt.prefixCls,sr=Bt.rtl,Pn=Bt.scrollOffset,Fn=Bt.scrollRange,zr=Bt.onStartMove,$r=Bt.onStopMove,Ae=Bt.onScroll,$=Bt.horizontal,z=Bt.spinSize,S=Bt.containerSize,D=Bt.style,J=Bt.thumbStyle,Le=C.useState(!1),$e=(0,Y.Z)(Le,2),tt=$e[0],at=$e[1],Ct=C.useState(null),pt=(0,Y.Z)(Ct,2),$t=pt[0],Nt=pt[1],Ot=C.useState(null),Wt=(0,Y.Z)(Ot,2),dn=Wt[0],St=Wt[1],zt=!sr,pn=C.useRef(),Mn=C.useRef(),En=C.useState(!1),ti=(0,Y.Z)(En,2),bn=ti[0],Nn=ti[1],Lr=C.useRef(),At=function(){clearTimeout(Lr.current),Nn(!0),Lr.current=setTimeout(function(){Nn(!1)},3e3)},qt=Fn-S||0,yn=S-z||0,ln=qt>0,wi=C.useMemo(function(){if(Pn===0||qt===0)return 0;var wr=Pn/qt;return wr*yn},[Pn,qt,yn]),Ci=function(Wi){Wi.stopPropagation(),Wi.preventDefault()},fi=C.useRef({top:wi,dragging:tt,pageY:$t,startTop:dn});fi.current={top:wi,dragging:tt,pageY:$t,startTop:dn};var ai=function(Wi){at(!0),Nt(Oe(Wi,$)),St(fi.current.top),zr(),Wi.stopPropagation(),Wi.preventDefault()};C.useEffect(function(){var wr=function(Vr){Vr.preventDefault()},Wi=pn.current,ni=Mn.current;return Wi.addEventListener("touchstart",wr),ni.addEventListener("touchstart",ai),function(){Wi.removeEventListener("touchstart",wr),ni.removeEventListener("touchstart",ai)}},[]);var Si=C.useRef();Si.current=qt;var za=C.useRef();za.current=yn,C.useEffect(function(){if(tt){var wr,Wi=function(Vr){var os=fi.current,fo=os.dragging,dl=os.pageY,Ql=os.startTop;if(Me.cancel(wr),fo){var Do=Oe(Vr,$)-dl,ql=Ql;!zt&&$?ql-=Do:ql+=Do;var Tu=Si.current,qa=za.current,ou=qa?ql/qa:0,lu=Math.ceil(ou*Tu);lu=Math.max(lu,0),lu=Math.min(lu,Tu),wr=Me(function(){Ae(lu,$)})}},ni=function(){at(!1),$r()};return window.addEventListener("mousemove",Wi),window.addEventListener("touchmove",Wi),window.addEventListener("mouseup",ni),window.addEventListener("touchend",ni),function(){window.removeEventListener("mousemove",Wi),window.removeEventListener("touchmove",Wi),window.removeEventListener("mouseup",ni),window.removeEventListener("touchend",ni),Me.cancel(wr)}}},[tt]),C.useEffect(function(){At()},[Pn]),C.useImperativeHandle(en,function(){return{delayHidden:At}});var sa="".concat(nn,"-scrollbar"),Ti={position:"absolute",visibility:bn&&ln?null:"hidden"},xa={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return $?(Ti.height=8,Ti.left=0,Ti.right=0,Ti.bottom=0,xa.height="100%",xa.width=z,zt?xa.left=wi:xa.right=wi):(Ti.width=8,Ti.top=0,Ti.bottom=0,zt?Ti.right=0:Ti.left=0,xa.width="100%",xa.height=z,xa.top=wi),C.createElement("div",{ref:pn,className:P()(sa,(Jt={},(0,N.Z)(Jt,"".concat(sa,"-horizontal"),$),(0,N.Z)(Jt,"".concat(sa,"-vertical"),!$),(0,N.Z)(Jt,"".concat(sa,"-visible"),bn),Jt)),style:(0,H.Z)((0,H.Z)({},Ti),D),onMouseDown:Ci,onMouseMove:At},C.createElement("div",{ref:Mn,className:P()("".concat(sa,"-thumb"),(0,N.Z)({},"".concat(sa,"-thumb-moving"),tt)),style:(0,H.Z)((0,H.Z)({},xa),J),onMouseDown:ai}))}),q=re;function ce(Bt){var en=Bt.children,Jt=Bt.setRef,nn=C.useCallback(function(sr){Jt(sr)},[]);return C.cloneElement(en,{ref:nn})}function Ee(Bt,en,Jt,nn,sr,Pn,Fn){var zr=Fn.getKey;return Bt.slice(en,Jt+1).map(function($r,Ae){var $=en+Ae,z=Pn($r,$,{style:{width:nn}}),S=zr($r);return C.createElement(ce,{key:S,setRef:function(J){return sr($r,J)}},z)})}function Te(Bt){return Bt instanceof HTMLElement||Bt instanceof SVGElement}function Je(Bt){return Te(Bt)?Bt:Bt instanceof C.Component?A.findDOMNode(Bt):null}var He=k(15671),rt=k(43144),Et=function(){function Bt(){(0,He.Z)(this,Bt),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,rt.Z)(Bt,[{key:"set",value:function(Jt,nn){this.maps[Jt]=nn,this.id+=1}},{key:"get",value:function(Jt){return this.maps[Jt]}}]),Bt}(),lt=Et;function st(Bt,en,Jt){var nn=C.useState(0),sr=(0,Y.Z)(nn,2),Pn=sr[0],Fn=sr[1],zr=(0,C.useRef)(new Map),$r=(0,C.useRef)(new lt),Ae=(0,C.useRef)();function $(){Me.cancel(Ae.current)}function z(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;$();var J=function(){zr.current.forEach(function($e,tt){if($e&&$e.offsetParent){var at=Je($e),Ct=at.offsetHeight;$r.current.get(tt)!==Ct&&$r.current.set(tt,at.offsetHeight)}}),Fn(function($e){return $e+1})};D?J():Ae.current=Me(J)}function S(D,J){var Le=Bt(D),$e=zr.current.get(Le);J?(zr.current.set(Le,J),z()):zr.current.delete(Le),!$e!=!J&&(J?en==null||en(D):Jt==null||Jt(D))}return(0,C.useEffect)(function(){return $},[]),[S,z,$r.current,Pn]}function mt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var fe=mt()?C.useLayoutEffect:C.useEffect,We=function(en,Jt){var nn=C.useRef(!0);fe(function(){return en(nn.current)},Jt),fe(function(){return nn.current=!1,function(){nn.current=!0}},[])},ht=function(en,Jt){We(function(nn){if(!nn)return en()},Jt)},Pt=We;function Ve(Bt){var en=C.useRef();en.current=Bt;var Jt=C.useCallback(function(){for(var nn,sr=arguments.length,Pn=new Array(sr),Fn=0;Fn<sr;Fn++)Pn[Fn]=arguments[Fn];return(nn=en.current)===null||nn===void 0?void 0:nn.call.apply(nn,[en].concat(Pn))},[]);return Jt}function it(Bt){var en=React.useRef(!1),Jt=React.useState(Bt),nn=_slicedToArray(Jt,2),sr=nn[0],Pn=nn[1];React.useEffect(function(){return en.current=!1,function(){en.current=!0}},[]);function Fn(zr,$r){$r&&en.current||Pn(zr)}return[sr,Fn]}function ft(Bt){return Bt!==void 0}function ze(Bt,en){var Jt=en||{},nn=Jt.defaultValue,sr=Jt.value,Pn=Jt.onChange,Fn=Jt.postState,zr=useState(function(){return ft(sr)?sr:ft(nn)?typeof nn=="function"?nn():nn:typeof Bt=="function"?Bt():Bt}),$r=_slicedToArray(zr,2),Ae=$r[0],$=$r[1],z=sr!==void 0?sr:Ae,S=Fn?Fn(z):z,D=useEvent(Pn),J=useState([z]),Le=_slicedToArray(J,2),$e=Le[0],tt=Le[1];useLayoutUpdateEffect(function(){var Ct=$e[0];Ae!==Ct&&D(Ae,Ct)},[$e]),useLayoutUpdateEffect(function(){ft(sr)||$(sr)},[sr]);var at=useEvent(function(Ct,pt){$(Ct,pt),tt([z],pt)});return[S,at]}var Qe=k(31461);function Se(Bt,en,Jt){var nn=React.useRef({});return(!("value"in nn.current)||Jt(nn.current.condition,en))&&(nn.current.value=Bt(),nn.current.condition=en),nn.current.value}function E(Bt,en){typeof Bt=="function"?Bt(en):_typeof(Bt)==="object"&&Bt&&"current"in Bt&&(Bt.current=en)}function me(){for(var Bt=arguments.length,en=new Array(Bt),Jt=0;Jt<Bt;Jt++)en[Jt]=arguments[Jt];var nn=en.filter(function(sr){return sr});return nn.length<=1?nn[0]:function(sr){en.forEach(function(Pn){E(Pn,sr)})}}function L(){for(var Bt=arguments.length,en=new Array(Bt),Jt=0;Jt<Bt;Jt++)en[Jt]=arguments[Jt];return useMemo(function(){return me.apply(void 0,en)},en,function(nn,sr){return nn.length!==sr.length||nn.every(function(Pn,Fn){return Pn!==sr[Fn]})})}function X(Bt){var en,Jt,nn=isMemo(Bt)?Bt.type.type:Bt.type;return!(typeof nn=="function"&&!((en=nn.prototype)!==null&&en!==void 0&&en.render)||typeof Bt=="function"&&!((Jt=Bt.prototype)!==null&&Jt!==void 0&&Jt.render))}function Ke(Bt){return!isValidElement(Bt)||isFragment(Bt)?!1:X(Bt)}function ot(Bt,en,Jt,nn){if(!en.length)return Jt;var sr=_toArray(en),Pn=sr[0],Fn=sr.slice(1),zr;return!Bt&&typeof Pn=="number"?zr=[]:Array.isArray(Bt)?zr=_toConsumableArray(Bt):zr=_objectSpread({},Bt),nn&&Jt===void 0&&Fn.length===1?delete zr[Pn][Fn[0]]:zr[Pn]=ot(zr[Pn],Fn,Jt,nn),zr}function pe(Bt,en,Jt){var nn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return en.length&&nn&&Jt===void 0&&!get(Bt,en.slice(0,-1))?Bt:ot(Bt,en,Jt,nn)}function xe(Bt){return _typeof(Bt)==="object"&&Bt!==null&&Object.getPrototypeOf(Bt)===Object.prototype}function Ze(Bt){return Array.isArray(Bt)?[]:{}}var O=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function ne(){for(var Bt=arguments.length,en=new Array(Bt),Jt=0;Jt<Bt;Jt++)en[Jt]=arguments[Jt];var nn=Ze(en[0]);return en.forEach(function(sr){function Pn(Fn,zr){var $r=new Set(zr),Ae=get(sr,Fn),$=Array.isArray(Ae);if($||xe(Ae)){if(!$r.has(Ae)){$r.add(Ae);var z=get(nn,Fn);$?nn=pe(nn,Fn,[]):(!z||_typeof(z)!=="object")&&(nn=pe(nn,Fn,Ze(Ae))),O(Ae).forEach(function(S){Pn([].concat(_toConsumableArray(Fn),[S]),$r)})}}else nn=pe(nn,Fn,Ae)}Pn([])}),nn}var qe={},dt=[],nt=function(en){dt.push(en)};function xt(Bt,en){if(0)var Jt}function bt(Bt,en){if(0)var Jt}function wt(){qe={}}function we(Bt,en,Jt){!en&&!qe[Jt]&&(Bt(!1,Jt),qe[Jt]=!0)}function oe(Bt,en){we(xt,Bt,en)}function Fe(Bt,en){we(bt,Bt,en)}oe.preMessage=nt,oe.resetWarned=wt,oe.noteOnce=Fe;var Ye=null,ie=10;function Ie(Bt,en,Jt,nn,sr,Pn,Fn,zr){var $r=C.useRef(),Ae=C.useState(null),$=(0,Y.Z)(Ae,2),z=$[0],S=$[1];return Pt(function(){if(z&&z.times<ie){if(!Bt.current){S(function(At){return(0,H.Z)({},At)});return}Pn();var D=z.targetAlign,J=z.originAlign,Le=z.index,$e=z.offset,tt=Bt.current.clientHeight,at=!1,Ct=D,pt=null;if(tt){for(var $t=D||J,Nt=0,Ot=0,Wt=0,dn=Math.min(en.length-1,Le),St=0;St<=dn;St+=1){var zt=sr(en[St]);Ot=Nt;var pn=Jt.get(zt);Wt=Ot+(pn===void 0?nn:pn),Nt=Wt}for(var Mn=$t==="top"?$e:tt-$e,En=dn;En>=0;En-=1){var ti=sr(en[En]),bn=Jt.get(ti);if(bn===void 0){at=!0;break}if(Mn-=bn,Mn<=0)break}switch($t){case"top":pt=Ot-$e;break;case"bottom":pt=Wt-tt+$e;break;default:{var Nn=Bt.current.scrollTop,Lr=Nn+tt;Ot<Nn?Ct="top":Wt>Lr&&(Ct="bottom")}}pt!==null&&Fn(pt),pt!==z.lastTop&&(at=!0)}at&&S(function(At){return(0,H.Z)((0,H.Z)({},At),{},{times:At.times+1,targetAlign:Ct,lastTop:pt})})}},[z,Bt.current]),function(D){if(D==null){zr();return}if(Me.cancel($r.current),typeof D=="number")Fn(D);else if(D&&(0,U.Z)(D)==="object"){var J,Le=D.align;"index"in D?J=D.index:J=en.findIndex(function(at){return sr(at)===D.key});var $e=D.offset,tt=$e===void 0?0:$e;S({times:0,index:J,offset:tt,originAlign:Le})}}}function je(Bt,en,Jt,nn){var sr=Jt-Bt,Pn=en-Jt,Fn=Math.min(sr,Pn)*2;if(nn<=Fn){var zr=Math.floor(nn/2);return nn%2?Jt+zr+1:Jt-zr}return sr>Pn?Jt-(nn-Pn):Jt+(nn-sr)}function Be(Bt,en,Jt){var nn=Bt.length,sr=en.length,Pn,Fn;if(nn===0&&sr===0)return null;nn<sr?(Pn=Bt,Fn=en):(Pn=en,Fn=Bt);var zr={__EMPTY_ITEM__:!0};function $r(J){return J!==void 0?Jt(J):zr}for(var Ae=null,$=Math.abs(nn-sr)!==1,z=0;z<Fn.length;z+=1){var S=$r(Pn[z]),D=$r(Fn[z]);if(S!==D){Ae=z,$=$||S!==$r(Fn[z+1]);break}}return Ae===null?null:{index:Ae,multiple:$}}function et(Bt,en,Jt){var nn=C.useState(Bt),sr=(0,Y.Z)(nn,2),Pn=sr[0],Fn=sr[1],zr=C.useState(null),$r=(0,Y.Z)(zr,2),Ae=$r[0],$=$r[1];return C.useEffect(function(){var z=Be(Pn||[],Bt||[],en);(z==null?void 0:z.index)!==void 0&&(Jt==null||Jt(z.index),$(Bt[z.index])),Fn(Bt)},[Bt]),[Ae]}var gt=(typeof navigator=="undefined"?"undefined":(0,U.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Mt=gt,Rt=function(Bt,en){var Jt=(0,C.useRef)(!1),nn=(0,C.useRef)(null);function sr(){clearTimeout(nn.current),Jt.current=!0,nn.current=setTimeout(function(){Jt.current=!1},50)}var Pn=(0,C.useRef)({top:Bt,bottom:en});return Pn.current.top=Bt,Pn.current.bottom=en,function(Fn){var zr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,$r=Fn<0&&Pn.current.top||Fn>0&&Pn.current.bottom;return zr&&$r?(clearTimeout(nn.current),Jt.current=!1):(!$r||Jt.current)&&sr(),!Jt.current&&$r}};function Ft(Bt,en,Jt,nn,sr){var Pn=(0,C.useRef)(0),Fn=(0,C.useRef)(null),zr=(0,C.useRef)(null),$r=(0,C.useRef)(!1),Ae=Rt(en,Jt);function $($e,tt){Me.cancel(Fn.current),Pn.current+=tt,zr.current=tt,!Ae(tt)&&(Mt||$e.preventDefault(),Fn.current=Me(function(){var at=$r.current?10:1;sr(Pn.current*at),Pn.current=0}))}function z($e,tt){sr(tt,!0),Mt||$e.preventDefault()}var S=(0,C.useRef)(null),D=(0,C.useRef)(null);function J($e){if(Bt){Me.cancel(D.current),D.current=Me(function(){S.current=null},2);var tt=$e.deltaX,at=$e.deltaY,Ct=$e.shiftKey,pt=tt,$t=at;(S.current==="sx"||!S.current&&Ct&&at&&!tt)&&(pt=at,$t=0,S.current="sx");var Nt=Math.abs(pt),Ot=Math.abs($t);S.current===null&&(S.current=nn&&Nt>Ot?"x":"y"),S.current==="y"?$($e,$t):z($e,pt)}}function Le($e){Bt&&($r.current=$e.detail===zr.current)}return[J,Le]}var Xt=14/15;function Qt(Bt,en,Jt){var nn=(0,C.useRef)(!1),sr=(0,C.useRef)(0),Pn=(0,C.useRef)(null),Fn=(0,C.useRef)(null),zr,$r=function(S){if(nn.current){var D=Math.ceil(S.touches[0].pageY),J=sr.current-D;sr.current=D,Jt(J)&&S.preventDefault(),clearInterval(Fn.current),Fn.current=setInterval(function(){J*=Xt,(!Jt(J,!0)||Math.abs(J)<=.1)&&clearInterval(Fn.current)},16)}},Ae=function(){nn.current=!1,zr()},$=function(S){zr(),S.touches.length===1&&!nn.current&&(nn.current=!0,sr.current=Math.ceil(S.touches[0].pageY),Pn.current=S.target,Pn.current.addEventListener("touchmove",$r),Pn.current.addEventListener("touchend",Ae))};zr=function(){Pn.current&&(Pn.current.removeEventListener("touchmove",$r),Pn.current.removeEventListener("touchend",Ae))},Pt(function(){return Bt&&en.current.addEventListener("touchstart",$),function(){var z;(z=en.current)===null||z===void 0||z.removeEventListener("touchstart",$),zr(),clearInterval(Fn.current)}},[Bt])}var an=20;function In(){var Bt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,en=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Jt=Bt/en*100;return isNaN(Jt)&&(Jt=0),Jt=Math.max(Jt,an),Jt=Math.min(Jt,Bt/2),Math.floor(Jt)}function Xr(Bt,en,Jt,nn){var sr=C.useMemo(function(){return[new Map,[]]},[Bt,Jt.id,nn]),Pn=(0,Y.Z)(sr,2),Fn=Pn[0],zr=Pn[1],$r=function($){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$,S=Fn.get($),D=Fn.get(z);if(S===void 0||D===void 0)for(var J=Bt.length,Le=zr.length;Le<J;Le+=1){var $e,tt=Bt[Le],at=en(tt);Fn.set(at,Le);var Ct=($e=Jt.get(at))!==null&&$e!==void 0?$e:nn;if(zr[Le]=(zr[Le-1]||0)+Ct,at===$&&(S=Le),at===z&&(D=Le),S!==void 0&&D!==void 0)break}return{top:zr[S-1]||0,bottom:zr[D]}};return $r}var Cn=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],or=[],ei={overflowY:"auto",overflowAnchor:"none"};function mr(Bt,en){var Jt=Bt.prefixCls,nn=Jt===void 0?"rc-virtual-list":Jt,sr=Bt.className,Pn=Bt.height,Fn=Bt.itemHeight,zr=Bt.fullHeight,$r=zr===void 0?!0:zr,Ae=Bt.style,$=Bt.data,z=Bt.children,S=Bt.itemKey,D=Bt.virtual,J=Bt.direction,Le=Bt.scrollWidth,$e=Bt.component,tt=$e===void 0?"div":$e,at=Bt.onScroll,Ct=Bt.onVirtualScroll,pt=Bt.onVisibleChange,$t=Bt.innerProps,Nt=Bt.extraRender,Ot=Bt.styles,Wt=(0,I.Z)(Bt,Cn),dn=!!(D!==!1&&Pn&&Fn),St=dn&&$&&(Fn*$.length>Pn||!!Le),zt=J==="rtl",pn=P()(nn,(0,N.Z)({},"".concat(nn,"-rtl"),zt),sr),Mn=$||or,En=(0,C.useRef)(),ti=(0,C.useRef)(),bn=(0,C.useState)(0),Nn=(0,Y.Z)(bn,2),Lr=Nn[0],At=Nn[1],qt=(0,C.useState)(0),yn=(0,Y.Z)(qt,2),ln=yn[0],wi=yn[1],Ci=(0,C.useState)(!1),fi=(0,Y.Z)(Ci,2),ai=fi[0],Si=fi[1],za=function(){Si(!0)},sa=function(){Si(!1)},Ti=C.useCallback(function(gn){return typeof S=="function"?S(gn):gn==null?void 0:gn[S]},[S]),xa={getKey:Ti};function wr(gn){At(function(_n){var fn;typeof gn=="function"?fn=gn(_n):fn=gn;var Sr=Sm(fn);return En.current.scrollTop=Sr,Sr})}var Wi=(0,C.useRef)({start:0,end:Mn.length}),ni=(0,C.useRef)(),Ea=et(Mn,Ti),Vr=(0,Y.Z)(Ea,1),os=Vr[0];ni.current=os;var fo=st(Ti,null,null),dl=(0,Y.Z)(fo,4),Ql=dl[0],Do=dl[1],ql=dl[2],Tu=dl[3],qa=C.useMemo(function(){if(!dn)return{scrollHeight:void 0,start:0,end:Mn.length-1,offset:void 0};if(!St){var gn;return{scrollHeight:((gn=ti.current)===null||gn===void 0?void 0:gn.offsetHeight)||0,start:0,end:Mn.length-1,offset:void 0}}for(var _n=0,fn,Sr,Rn,Ln=Mn.length,Jr=0;Jr<Ln;Jr+=1){var mi=Mn[Jr],_i=Ti(mi),vi=ql.get(_i),pi=_n+(vi===void 0?Fn:vi);pi>=Lr&&fn===void 0&&(fn=Jr,Sr=_n),pi>Lr+Pn&&Rn===void 0&&(Rn=Jr),_n=pi}return fn===void 0&&(fn=0,Sr=0,Rn=Math.ceil(Pn/Fn)),Rn===void 0&&(Rn=Mn.length-1),Rn=Math.min(Rn+1,Mn.length-1),{scrollHeight:_n,start:fn,end:Rn,offset:Sr}},[St,dn,Lr,Mn,Tu,Pn]),ou=qa.scrollHeight,lu=qa.start,Cu=qa.end,eu=qa.offset;Wi.current.start=lu,Wi.current.end=Cu;var tu=C.useState({width:0,height:Pn}),Mu=(0,Y.Z)(tu,2),Kr=Mu[0],bh=Mu[1],kv=function(_n){bh({width:_n.width||_n.offsetWidth,height:_n.height||_n.offsetHeight})},kh=(0,C.useRef)(),cd=(0,C.useRef)(),wv=C.useMemo(function(){return In(Kr.width,Le)},[Kr.width,Le]),Va=C.useMemo(function(){return In(Kr.height,ou)},[Kr.height,ou]),Sv=ou-Pn,uu=(0,C.useRef)(Sv);uu.current=Sv;function Sm(gn){var _n=gn;return Number.isNaN(uu.current)||(_n=Math.min(_n,uu.current)),_n=Math.max(_n,0),_n}var ig=Lr<=0,wh=Lr>=Sv,Cf=Rt(ig,wh),Sh=function(){return{x:zt?-ln:ln,y:Lr}},Tv=(0,C.useRef)(Sh()),Tn=Ve(function(){if(Ct){var gn=Sh();(Tv.current.x!==gn.x||Tv.current.y!==gn.y)&&(Ct(gn),Tv.current=gn)}});function pl(gn,_n){var fn=gn;_n?((0,A.flushSync)(function(){wi(fn)}),Tn()):wr(fn)}function An(gn){var _n=gn.currentTarget.scrollTop;_n!==Lr&&wr(_n),at==null||at(gn),Tn()}var cu=function(_n){var fn=_n,Sr=Le-Kr.width;return fn=Math.max(fn,0),fn=Math.min(fn,Sr),fn},Th=Ve(function(gn,_n){_n?((0,A.flushSync)(function(){wi(function(fn){var Sr=fn+(zt?-gn:gn);return cu(Sr)})}),Tn()):wr(function(fn){var Sr=fn+gn;return Sr})}),Kg=Ft(dn,ig,wh,!!Le,Th),Jg=(0,Y.Z)(Kg,2),vt=Jg[0],_t=Jg[1];Qt(dn,En,function(gn,_n){return Cf(gn,_n)?!1:(vt({preventDefault:function(){},deltaY:gn}),!0)}),Pt(function(){function gn(fn){dn&&fn.preventDefault()}var _n=En.current;return _n.addEventListener("wheel",vt),_n.addEventListener("DOMMouseScroll",_t),_n.addEventListener("MozMousePixelScroll",gn),function(){_n.removeEventListener("wheel",vt),_n.removeEventListener("DOMMouseScroll",_t),_n.removeEventListener("MozMousePixelScroll",gn)}},[dn]),Pt(function(){Le&&wi(function(gn){return cu(gn)})},[Kr.width,Le]);var Ht=function(){var _n,fn;(_n=kh.current)===null||_n===void 0||_n.delayHidden(),(fn=cd.current)===null||fn===void 0||fn.delayHidden()},Gt=Ie(En,Mn,ql,Fn,Ti,function(){return Do(!0)},wr,Ht);C.useImperativeHandle(en,function(){return{getScrollInfo:Sh,scrollTo:function(_n){function fn(Sr){return Sr&&(0,U.Z)(Sr)==="object"&&("left"in Sr||"top"in Sr)}fn(_n)?(_n.left!==void 0&&wi(cu(_n.left)),Gt(_n.top)):Gt(_n)}}}),Pt(function(){if(pt){var gn=Mn.slice(lu,Cu+1);pt(gn,Mn)}},[lu,Cu,Mn]);var sn=Xr(Mn,Ti,ql,Fn),cn=Nt==null?void 0:Nt({start:lu,end:Cu,virtual:St,offsetX:ln,offsetY:eu,rtl:zt,getSize:sn}),Sn=Ee(Mn,lu,Cu,Le,Ql,z,xa),Bn=null;Pn&&(Bn=(0,H.Z)((0,N.Z)({},$r?"height":"maxHeight",Pn),ei),dn&&(Bn.overflowY="hidden",Le&&(Bn.overflowX="hidden"),ai&&(Bn.pointerEvents="none")));var gr={};return zt&&(gr.dir="rtl"),C.createElement("div",(0,M.Z)({style:(0,H.Z)((0,H.Z)({},Ae),{},{position:"relative"}),className:pn},gr,Wt),C.createElement(W.Z,{onResize:kv},C.createElement(tt,{className:"".concat(nn,"-holder"),style:Bn,ref:En,onScroll:An,onMouseEnter:Ht},C.createElement(ge,{prefixCls:nn,height:ou,offsetX:ln,offsetY:eu,scrollWidth:Le,onInnerResize:Do,ref:ti,innerProps:$t,rtl:zt,extra:cn},Sn))),St&&ou>Pn&&C.createElement(q,{ref:kh,prefixCls:nn,scrollOffset:Lr,scrollRange:ou,rtl:zt,onScroll:pl,onStartMove:za,onStopMove:sa,spinSize:Va,containerSize:Kr.height,style:Ot==null?void 0:Ot.verticalScrollBar,thumbStyle:Ot==null?void 0:Ot.verticalScrollBarThumb}),St&&Le&&C.createElement(q,{ref:cd,prefixCls:nn,scrollOffset:ln,scrollRange:Le,rtl:zt,onScroll:pl,onStartMove:za,onStopMove:sa,spinSize:wv,containerSize:Kr.width,horizontal:!0,style:Ot==null?void 0:Ot.horizontalScrollBar,thumbStyle:Ot==null?void 0:Ot.horizontalScrollBarThumb}))}var Fr=C.forwardRef(mr);Fr.displayName="List";var ta=Fr,Qa=ta},66392:function(ke,ve){"use strict";var k;var M=Symbol.for("react.element"),H=Symbol.for("react.portal"),U=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),I=Symbol.for("react.provider"),C=Symbol.for("react.context"),A=Symbol.for("react.server_context"),F=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),W=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),ge=Symbol.for("react.lazy"),be=Symbol.for("react.offscreen"),Ue;Ue=Symbol.for("react.module.reference");function Ne(ye){if(typeof ye=="object"&&ye!==null){var De=ye.$$typeof;switch(De){case M:switch(ye=ye.type,ye){case U:case N:case Y:case P:case W:return ye;default:switch(ye=ye&&ye.$$typeof,ye){case A:case C:case F:case ge:case K:case I:return ye;default:return De}}case H:return De}}}k=C,k=I,k=M,k=F,k=U,k=ge,k=K,k=H,k=N,k=Y,k=P,k=W,k=function(){return!1},k=function(){return!1},k=function(ye){return Ne(ye)===C},k=function(ye){return Ne(ye)===I},k=function(ye){return typeof ye=="object"&&ye!==null&&ye.$$typeof===M},k=function(ye){return Ne(ye)===F},k=function(ye){return Ne(ye)===U},k=function(ye){return Ne(ye)===ge},k=function(ye){return Ne(ye)===K},k=function(ye){return Ne(ye)===H},k=function(ye){return Ne(ye)===N},k=function(ye){return Ne(ye)===Y},k=function(ye){return Ne(ye)===P},k=function(ye){return Ne(ye)===W},k=function(ye){return typeof ye=="string"||typeof ye=="function"||ye===U||ye===N||ye===Y||ye===P||ye===W||ye===be||typeof ye=="object"&&ye!==null&&(ye.$$typeof===ge||ye.$$typeof===K||ye.$$typeof===I||ye.$$typeof===C||ye.$$typeof===F||ye.$$typeof===Ue||ye.getModuleId!==void 0)},k=Ne},31461:function(ke,ve,k){"use strict";k(66392)},86851:function(ke,ve,k){"use strict";var M=k(89594),H=Array.prototype.concat,U=Array.prototype.slice,Y=ke.exports=function(I){for(var C=[],A=0,F=I.length;A<F;A++){var P=I[A];M(P)?C=H.call(C,U.call(P)):C.push(P)}return C};Y.wrap=function(N){return function(){return N(Y(arguments))}}},89594:function(ke){ke.exports=function(k){return!k||typeof k=="string"?!1:k instanceof Array||Array.isArray(k)||k.length>=0&&(k.splice instanceof Function||Object.getOwnPropertyDescriptor(k,k.length-1)&&k.constructor.name!=="String")}},94660:function(ke,ve){"use strict";var k={value:()=>{}};function M(){for(var I=0,C=arguments.length,A={},F;I<C;++I){if(!(F=arguments[I]+"")||F in A||/[\s.]/.test(F))throw new Error("illegal type: "+F);A[F]=[]}return new H(A)}function H(I){this._=I}function U(I,C){return I.trim().split(/^|\s+/).map(function(A){var F="",P=A.indexOf(".");if(P>=0&&(F=A.slice(P+1),A=A.slice(0,P)),A&&!C.hasOwnProperty(A))throw new Error("unknown type: "+A);return{type:A,name:F}})}H.prototype=M.prototype={constructor:H,on:function(I,C){var A=this._,F=U(I+"",A),P,W=-1,K=F.length;if(arguments.length<2){for(;++W<K;)if((P=(I=F[W]).type)&&(P=Y(A[P],I.name)))return P;return}if(C!=null&&typeof C!="function")throw new Error("invalid callback: "+C);for(;++W<K;)if(P=(I=F[W]).type)A[P]=N(A[P],I.name,C);else if(C==null)for(P in A)A[P]=N(A[P],I.name,null);return this},copy:function(){var I={},C=this._;for(var A in C)I[A]=C[A].slice();return new H(I)},call:function(I,C){if((P=arguments.length-2)>0)for(var A=new Array(P),F=0,P,W;F<P;++F)A[F]=arguments[F+2];if(!this._.hasOwnProperty(I))throw new Error("unknown type: "+I);for(W=this._[I],F=0,P=W.length;F<P;++F)W[F].value.apply(C,A)},apply:function(I,C,A){if(!this._.hasOwnProperty(I))throw new Error("unknown type: "+I);for(var F=this._[I],P=0,W=F.length;P<W;++P)F[P].value.apply(C,A)}};function Y(I,C){for(var A=0,F=I.length,P;A<F;++A)if((P=I[A]).name===C)return P.value}function N(I,C,A){for(var F=0,P=I.length;F<P;++F)if(I[F].name===C){I[F]=k,I=I.slice(0,F).concat(I.slice(F+1));break}return A!=null&&I.push({name:C,value:A}),I}ve.Z=M},92770:function(ke,ve,k){"use strict";k.d(ve,{Sc:function(){return Ee},y3:function(){return P}});var M=k(48202);const H=M.XA,U=M.a_,Y=M.yQ,N=M.Hs,I=M.Ec,C=M.dx,A=M.LU,F=M.Rm,P=M.y3,W=M.qK,K=M.pb,ge=M.j,be=M.sO,Ue=M.BZ,Ne=M.EK,ye=M.Db,De=M.Fx,Ce=M.tU,Me=M.Ym,Oe=M.rs,re=M.QR,q=M.TB,ce=M.oH,Ee=M.Sc,Te=M.BN,Je=M.it,He=M.$r,rt=M.QM,Et=M.AV;var lt=(M.y3,M.y3);const st=M.GH,mt=M.SO,fe=M.uZ,We=M.yU,ht=M.F1,Pt=M.re},54375:function(ke,ve,k){"use strict";k.d(ve,{Ud:function(){return be},Yy:function(){return U}});const M=Symbol("Comlink.proxy"),H=Symbol("Comlink.endpoint"),U=Symbol("Comlink.releaseProxy"),Y=Symbol("Comlink.finalizer"),N=Symbol("Comlink.thrown"),I=st=>typeof st=="object"&&st!==null||typeof st=="function",C={canHandle:st=>I(st)&&st[M],serialize(st){const{port1:mt,port2:fe}=new MessageChannel;return W(st,mt),[fe,[fe]]},deserialize(st){return st.start(),be(st)}},A={canHandle:st=>I(st)&&N in st,serialize({value:st}){let mt;return st instanceof Error?mt={isError:!0,value:{message:st.message,name:st.name,stack:st.stack}}:mt={isError:!1,value:st},[mt,[]]},deserialize(st){throw st.isError?Object.assign(new Error(st.value.message),st.value):st.value}},F=new Map([["proxy",C],["throw",A]]);function P(st,mt){for(const fe of st)if(mt===fe||fe==="*"||fe instanceof RegExp&&fe.test(mt))return!0;return!1}function W(st,mt=globalThis,fe=["*"]){mt.addEventListener("message",function We(ht){if(!ht||!ht.data)return;if(!P(fe,ht.origin)){console.warn(`Invalid origin '${ht.origin}' for comlink proxy`);return}const{id:Pt,type:Ve,path:it}=Object.assign({path:[]},ht.data),ft=(ht.data.argumentList||[]).map(rt);let ze;try{const Qe=it.slice(0,-1).reduce((E,me)=>E[me],st),Se=it.reduce((E,me)=>E[me],st);switch(Ve){case"GET":ze=Se;break;case"SET":Qe[it.slice(-1)[0]]=rt(ht.data.value),ze=!0;break;case"APPLY":ze=Se.apply(Qe,ft);break;case"CONSTRUCT":{const E=new Se(...ft);ze=Te(E)}break;case"ENDPOINT":{const{port1:E,port2:me}=new MessageChannel;W(st,me),ze=Ee(E,[E])}break;case"RELEASE":ze=void 0;break;default:return}}catch(Qe){ze={value:Qe,[N]:0}}Promise.resolve(ze).catch(Qe=>({value:Qe,[N]:0})).then(Qe=>{const[Se,E]=He(Qe);mt.postMessage(Object.assign(Object.assign({},Se),{id:Pt}),E),Ve==="RELEASE"&&(mt.removeEventListener("message",We),ge(mt),Y in st&&typeof st[Y]=="function"&&st[Y]())}).catch(Qe=>{const[Se,E]=He({value:new TypeError("Unserializable return value"),[N]:0});mt.postMessage(Object.assign(Object.assign({},Se),{id:Pt}),E)})}),mt.start&&mt.start()}function K(st){return st.constructor.name==="MessagePort"}function ge(st){K(st)&&st.close()}function be(st,mt){return Oe(st,[],mt)}function Ue(st){if(st)throw new Error("Proxy has been released and is not useable")}function Ne(st){return Et(st,{type:"RELEASE"}).then(()=>{ge(st)})}const ye=new WeakMap,De="FinalizationRegistry"in globalThis&&new FinalizationRegistry(st=>{const mt=(ye.get(st)||0)-1;ye.set(st,mt),mt===0&&Ne(st)});function Ce(st,mt){const fe=(ye.get(mt)||0)+1;ye.set(mt,fe),De&&De.register(st,mt,st)}function Me(st){De&&De.unregister(st)}function Oe(st,mt=[],fe=function(){}){let We=!1;const ht=new Proxy(fe,{get(Pt,Ve){if(Ue(We),Ve===U)return()=>{Me(ht),Ne(st),We=!0};if(Ve==="then"){if(mt.length===0)return{then:()=>ht};const it=Et(st,{type:"GET",path:mt.map(ft=>ft.toString())}).then(rt);return it.then.bind(it)}return Oe(st,[...mt,Ve])},set(Pt,Ve,it){Ue(We);const[ft,ze]=He(it);return Et(st,{type:"SET",path:[...mt,Ve].map(Qe=>Qe.toString()),value:ft},ze).then(rt)},apply(Pt,Ve,it){Ue(We);const ft=mt[mt.length-1];if(ft===H)return Et(st,{type:"ENDPOINT"}).then(rt);if(ft==="bind")return Oe(st,mt.slice(0,-1));const[ze,Qe]=q(it);return Et(st,{type:"APPLY",path:mt.map(Se=>Se.toString()),argumentList:ze},Qe).then(rt)},construct(Pt,Ve){Ue(We);const[it,ft]=q(Ve);return Et(st,{type:"CONSTRUCT",path:mt.map(ze=>ze.toString()),argumentList:it},ft).then(rt)}});return Ce(ht,st),ht}function re(st){return Array.prototype.concat.apply([],st)}function q(st){const mt=st.map(He);return[mt.map(fe=>fe[0]),re(mt.map(fe=>fe[1]))]}const ce=new WeakMap;function Ee(st,mt){return ce.set(st,mt),st}function Te(st){return Object.assign(st,{[M]:!0})}function Je(st,mt=globalThis,fe="*"){return{postMessage:(We,ht)=>st.postMessage(We,fe,ht),addEventListener:mt.addEventListener.bind(mt),removeEventListener:mt.removeEventListener.bind(mt)}}function He(st){for(const[mt,fe]of F)if(fe.canHandle(st)){const[We,ht]=fe.serialize(st);return[{type:"HANDLER",name:mt,value:We},ht]}return[{type:"RAW",value:st},ce.get(st)||[]]}function rt(st){switch(st.type){case"HANDLER":return F.get(st.name).deserialize(st.value);case"RAW":return st.value}}function Et(st,mt,fe){return new Promise(We=>{const ht=lt();st.addEventListener("message",function Pt(Ve){!Ve.data||!Ve.data.id||Ve.data.id!==ht||(st.removeEventListener("message",Pt),We(Ve.data))}),st.start&&st.start(),st.postMessage(Object.assign({id:ht},mt),fe)})}function lt(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}},45736:function(ke,ve,k){"use strict";k.d(ve,{HT:function(){return Ue}});var M=0,H=0,U=0,Y=1e3,N,I,C=0,A=0,F=0,P=typeof performance=="object"&&performance.now?performance:Date,W=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(Oe){setTimeout(Oe,17)};function K(){return A||(W(ge),A=P.now()+F)}function ge(){A=0}function be(){this._call=this._time=this._next=null}be.prototype=Ue.prototype={constructor:be,restart:function(Oe,re,q){if(typeof Oe!="function")throw new TypeError("callback is not a function");q=(q==null?K():+q)+(re==null?0:+re),!this._next&&I!==this&&(I?I._next=this:N=this,I=this),this._call=Oe,this._time=q,Me()},stop:function(){this._call&&(this._call=null,this._time=1/0,Me())}};function Ue(Oe,re,q){var ce=new be;return ce.restart(Oe,re,q),ce}function Ne(){K(),++M;for(var Oe=N,re;Oe;)(re=A-Oe._time)>=0&&Oe._call.call(void 0,re),Oe=Oe._next;--M}function ye(){A=(C=P.now())+F,M=H=0;try{Ne()}finally{M=0,Ce(),A=0}}function De(){var Oe=P.now(),re=Oe-C;re>Y&&(F-=re,C=Oe)}function Ce(){for(var Oe,re=N,q,ce=1/0;re;)re._call?(ce>re._time&&(ce=re._time),Oe=re,re=re._next):(q=re._next,re._next=null,re=Oe?Oe._next=q:N=q);I=Oe,Me(ce)}function Me(Oe){if(!M){H&&(H=clearTimeout(H));var re=Oe-A;re>24?(Oe<1/0&&(H=setTimeout(ye,Oe-P.now()-F)),U&&(U=clearInterval(U))):(U||(C=P.now(),U=setInterval(De,Y)),M=1,W(ye))}}},46846:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return M}});function M(H,U){var Y,N=1;H==null&&(H=0),U==null&&(U=0);function I(){var C,A=Y.length,F,P=0,W=0;for(C=0;C<A;++C)F=Y[C],P+=F.x,W+=F.y;for(P=(P/A-H)*N,W=(W/A-U)*N,C=0;C<A;++C)F=Y[C],F.x-=P,F.y-=W}return I.initialize=function(C){Y=C},I.x=function(C){return arguments.length?(H=+C,I):H},I.y=function(C){return arguments.length?(U=+C,I):U},I.strength=function(C){return arguments.length?(N=+C,I):N},I}},89281:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return I}});var M=k(46632),H=k(13548),U=k(79778);function Y(C){return C.x+C.vx}function N(C){return C.y+C.vy}function I(C){var A,F,P,W=1,K=1;typeof C!="function"&&(C=(0,H.Z)(C==null?1:+C));function ge(){for(var Ne,ye=A.length,De,Ce,Me,Oe,re,q,ce=0;ce<K;++ce)for(De=(0,M.Z)(A,Y,N).visitAfter(be),Ne=0;Ne<ye;++Ne)Ce=A[Ne],re=F[Ce.index],q=re*re,Me=Ce.x+Ce.vx,Oe=Ce.y+Ce.vy,De.visit(Ee);function Ee(Te,Je,He,rt,Et){var lt=Te.data,st=Te.r,mt=re+st;if(lt){if(lt.index>Ce.index){var fe=Me-lt.x-lt.vx,We=Oe-lt.y-lt.vy,ht=fe*fe+We*We;ht<mt*mt&&(fe===0&&(fe=(0,U.Z)(P),ht+=fe*fe),We===0&&(We=(0,U.Z)(P),ht+=We*We),ht=(mt-(ht=Math.sqrt(ht)))/ht*W,Ce.vx+=(fe*=ht)*(mt=(st*=st)/(q+st)),Ce.vy+=(We*=ht)*mt,lt.vx-=fe*(mt=1-mt),lt.vy-=We*mt)}return}return Je>Me+mt||rt<Me-mt||He>Oe+mt||Et<Oe-mt}}function be(Ne){if(Ne.data)return Ne.r=F[Ne.data.index];for(var ye=Ne.r=0;ye<4;++ye)Ne[ye]&&Ne[ye].r>Ne.r&&(Ne.r=Ne[ye].r)}function Ue(){if(A){var Ne,ye=A.length,De;for(F=new Array(ye),Ne=0;Ne<ye;++Ne)De=A[Ne],F[De.index]=+C(De,Ne,A)}}return ge.initialize=function(Ne,ye){A=Ne,P=ye,Ue()},ge.iterations=function(Ne){return arguments.length?(K=+Ne,ge):K},ge.strength=function(Ne){return arguments.length?(W=+Ne,ge):W},ge.radius=function(Ne){return arguments.length?(C=typeof Ne=="function"?Ne:(0,H.Z)(+Ne),Ue(),ge):C},ge}},13548:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return M}});function M(H){return function(){return H}}},79778:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return M}});function M(H){return(H()-.5)*1e-6}},3168:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return Y}});const M=1664525,H=1013904223,U=4294967296;function Y(){let N=1;return()=>(N=(M*N+H)%U)/U}},56561:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return N}});var M=k(13548),H=k(79778);function U(I){return I.index}function Y(I,C){var A=I.get(C);if(!A)throw new Error("node not found: "+C);return A}function N(I){var C=U,A=ye,F,P=(0,M.Z)(30),W,K,ge,be,Ue,Ne=1;I==null&&(I=[]);function ye(re){return 1/Math.min(ge[re.source.index],ge[re.target.index])}function De(re){for(var q=0,ce=I.length;q<Ne;++q)for(var Ee=0,Te,Je,He,rt,Et,lt,st;Ee<ce;++Ee)Te=I[Ee],Je=Te.source,He=Te.target,rt=He.x+He.vx-Je.x-Je.vx||(0,H.Z)(Ue),Et=He.y+He.vy-Je.y-Je.vy||(0,H.Z)(Ue),lt=Math.sqrt(rt*rt+Et*Et),lt=(lt-W[Ee])/lt*re*F[Ee],rt*=lt,Et*=lt,He.vx-=rt*(st=be[Ee]),He.vy-=Et*st,Je.vx+=rt*(st=1-st),Je.vy+=Et*st}function Ce(){if(K){var re,q=K.length,ce=I.length,Ee=new Map(K.map((Je,He)=>[C(Je,He,K),Je])),Te;for(re=0,ge=new Array(q);re<ce;++re)Te=I[re],Te.index=re,typeof Te.source!="object"&&(Te.source=Y(Ee,Te.source)),typeof Te.target!="object"&&(Te.target=Y(Ee,Te.target)),ge[Te.source.index]=(ge[Te.source.index]||0)+1,ge[Te.target.index]=(ge[Te.target.index]||0)+1;for(re=0,be=new Array(ce);re<ce;++re)Te=I[re],be[re]=ge[Te.source.index]/(ge[Te.source.index]+ge[Te.target.index]);F=new Array(ce),Me(),W=new Array(ce),Oe()}}function Me(){if(K)for(var re=0,q=I.length;re<q;++re)F[re]=+A(I[re],re,I)}function Oe(){if(K)for(var re=0,q=I.length;re<q;++re)W[re]=+P(I[re],re,I)}return De.initialize=function(re,q){K=re,Ue=q,Ce()},De.links=function(re){return arguments.length?(I=re,Ce(),De):I},De.id=function(re){return arguments.length?(C=re,De):C},De.iterations=function(re){return arguments.length?(Ne=+re,De):Ne},De.strength=function(re){return arguments.length?(A=typeof re=="function"?re:(0,M.Z)(+re),Me(),De):A},De.distance=function(re){return arguments.length?(P=typeof re=="function"?re:(0,M.Z)(+re),Oe(),De):P},De}},65475:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return N}});var M=k(46632),H=k(13548),U=k(79778),Y=k(80616);function N(){var I,C,A,F,P=(0,H.Z)(-30),W,K=1,ge=1/0,be=.81;function Ue(Ce){var Me,Oe=I.length,re=(0,M.Z)(I,Y.x,Y.y).visitAfter(ye);for(F=Ce,Me=0;Me<Oe;++Me)C=I[Me],re.visit(De)}function Ne(){if(I){var Ce,Me=I.length,Oe;for(W=new Array(Me),Ce=0;Ce<Me;++Ce)Oe=I[Ce],W[Oe.index]=+P(Oe,Ce,I)}}function ye(Ce){var Me=0,Oe,re,q=0,ce,Ee,Te;if(Ce.length){for(ce=Ee=Te=0;Te<4;++Te)(Oe=Ce[Te])&&(re=Math.abs(Oe.value))&&(Me+=Oe.value,q+=re,ce+=re*Oe.x,Ee+=re*Oe.y);Ce.x=ce/q,Ce.y=Ee/q}else{Oe=Ce,Oe.x=Oe.data.x,Oe.y=Oe.data.y;do Me+=W[Oe.data.index];while(Oe=Oe.next)}Ce.value=Me}function De(Ce,Me,Oe,re){if(!Ce.value)return!0;var q=Ce.x-C.x,ce=Ce.y-C.y,Ee=re-Me,Te=q*q+ce*ce;if(Ee*Ee/be<Te)return Te<ge&&(q===0&&(q=(0,U.Z)(A),Te+=q*q),ce===0&&(ce=(0,U.Z)(A),Te+=ce*ce),Te<K&&(Te=Math.sqrt(K*Te)),C.vx+=q*Ce.value*F/Te,C.vy+=ce*Ce.value*F/Te),!0;if(Ce.length||Te>=ge)return;(Ce.data!==C||Ce.next)&&(q===0&&(q=(0,U.Z)(A),Te+=q*q),ce===0&&(ce=(0,U.Z)(A),Te+=ce*ce),Te<K&&(Te=Math.sqrt(K*Te)));do Ce.data!==C&&(Ee=W[Ce.data.index]*F/Te,C.vx+=q*Ee,C.vy+=ce*Ee);while(Ce=Ce.next)}return Ue.initialize=function(Ce,Me){I=Ce,A=Me,Ne()},Ue.strength=function(Ce){return arguments.length?(P=typeof Ce=="function"?Ce:(0,H.Z)(+Ce),Ne(),Ue):P},Ue.distanceMin=function(Ce){return arguments.length?(K=Ce*Ce,Ue):Math.sqrt(K)},Ue.distanceMax=function(Ce){return arguments.length?(ge=Ce*Ce,Ue):Math.sqrt(ge)},Ue.theta=function(Ce){return arguments.length?(be=Ce*Ce,Ue):Math.sqrt(be)},Ue}},61217:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return H}});var M=k(13548);function H(U,Y,N){var I,C=(0,M.Z)(.1),A,F;typeof U!="function"&&(U=(0,M.Z)(+U)),Y==null&&(Y=0),N==null&&(N=0);function P(K){for(var ge=0,be=I.length;ge<be;++ge){var Ue=I[ge],Ne=Ue.x-Y||1e-6,ye=Ue.y-N||1e-6,De=Math.sqrt(Ne*Ne+ye*ye),Ce=(F[ge]-De)*A[ge]*K/De;Ue.vx+=Ne*Ce,Ue.vy+=ye*Ce}}function W(){if(I){var K,ge=I.length;for(A=new Array(ge),F=new Array(ge),K=0;K<ge;++K)F[K]=+U(I[K],K,I),A[K]=isNaN(F[K])?0:+C(I[K],K,I)}}return P.initialize=function(K){I=K,W()},P.strength=function(K){return arguments.length?(C=typeof K=="function"?K:(0,M.Z)(+K),W(),P):C},P.radius=function(K){return arguments.length?(U=typeof K=="function"?K:(0,M.Z)(+K),W(),P):U},P.x=function(K){return arguments.length?(Y=+K,P):Y},P.y=function(K){return arguments.length?(N=+K,P):N},P}},80616:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return A},x:function(){return Y},y:function(){return N}});var M=k(94660),H=k(45736),U=k(3168);function Y(F){return F.x}function N(F){return F.y}var I=10,C=Math.PI*(3-Math.sqrt(5));function A(F){var P,W=1,K=.001,ge=1-Math.pow(K,1/300),be=0,Ue=.6,Ne=new Map,ye=(0,H.HT)(Me),De=(0,M.Z)("tick","end"),Ce=(0,U.Z)();F==null&&(F=[]);function Me(){Oe(),De.call("tick",P),W<K&&(ye.stop(),De.call("end",P))}function Oe(ce){var Ee,Te=F.length,Je;ce===void 0&&(ce=1);for(var He=0;He<ce;++He)for(W+=(be-W)*ge,Ne.forEach(function(rt){rt(W)}),Ee=0;Ee<Te;++Ee)Je=F[Ee],Je.fx==null?Je.x+=Je.vx*=Ue:(Je.x=Je.fx,Je.vx=0),Je.fy==null?Je.y+=Je.vy*=Ue:(Je.y=Je.fy,Je.vy=0);return P}function re(){for(var ce=0,Ee=F.length,Te;ce<Ee;++ce){if(Te=F[ce],Te.index=ce,Te.fx!=null&&(Te.x=Te.fx),Te.fy!=null&&(Te.y=Te.fy),isNaN(Te.x)||isNaN(Te.y)){var Je=I*Math.sqrt(.5+ce),He=ce*C;Te.x=Je*Math.cos(He),Te.y=Je*Math.sin(He)}(isNaN(Te.vx)||isNaN(Te.vy))&&(Te.vx=Te.vy=0)}}function q(ce){return ce.initialize&&ce.initialize(F,Ce),ce}return re(),P={tick:Oe,restart:function(){return ye.restart(Me),P},stop:function(){return ye.stop(),P},nodes:function(ce){return arguments.length?(F=ce,re(),Ne.forEach(q),P):F},alpha:function(ce){return arguments.length?(W=+ce,P):W},alphaMin:function(ce){return arguments.length?(K=+ce,P):K},alphaDecay:function(ce){return arguments.length?(ge=+ce,P):+ge},alphaTarget:function(ce){return arguments.length?(be=+ce,P):be},velocityDecay:function(ce){return arguments.length?(Ue=1-ce,P):1-Ue},randomSource:function(ce){return arguments.length?(Ce=ce,Ne.forEach(q),P):Ce},force:function(ce,Ee){return arguments.length>1?(Ee==null?Ne.delete(ce):Ne.set(ce,q(Ee)),P):Ne.get(ce)},find:function(ce,Ee,Te){var Je=0,He=F.length,rt,Et,lt,st,mt;for(Te==null?Te=1/0:Te*=Te,Je=0;Je<He;++Je)st=F[Je],rt=ce-st.x,Et=Ee-st.y,lt=rt*rt+Et*Et,lt<Te&&(mt=st,Te=lt);return mt},on:function(ce,Ee){return arguments.length>1?(De.on(ce,Ee),P):De.on(ce)}}}},70341:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return H}});var M=k(13548);function H(U){var Y=(0,M.Z)(.1),N,I,C;typeof U!="function"&&(U=(0,M.Z)(U==null?0:+U));function A(P){for(var W=0,K=N.length,ge;W<K;++W)ge=N[W],ge.vx+=(C[W]-ge.x)*I[W]*P}function F(){if(N){var P,W=N.length;for(I=new Array(W),C=new Array(W),P=0;P<W;++P)I[P]=isNaN(C[P]=+U(N[P],P,N))?0:+Y(N[P],P,N)}}return A.initialize=function(P){N=P,F()},A.strength=function(P){return arguments.length?(Y=typeof P=="function"?P:(0,M.Z)(+P),F(),A):Y},A.x=function(P){return arguments.length?(U=typeof P=="function"?P:(0,M.Z)(+P),F(),A):U},A}},12688:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return H}});var M=k(13548);function H(U){var Y=(0,M.Z)(.1),N,I,C;typeof U!="function"&&(U=(0,M.Z)(U==null?0:+U));function A(P){for(var W=0,K=N.length,ge;W<K;++W)ge=N[W],ge.vy+=(C[W]-ge.y)*I[W]*P}function F(){if(N){var P,W=N.length;for(I=new Array(W),C=new Array(W),P=0;P<W;++P)I[P]=isNaN(C[P]=+U(N[P],P,N))?0:+Y(N[P],P,N)}}return A.initialize=function(P){N=P,F()},A.strength=function(P){return arguments.length?(Y=typeof P=="function"?P:(0,M.Z)(+P),F(),A):Y},A.y=function(P){return arguments.length?(U=typeof P=="function"?P:(0,M.Z)(+P),F(),A):U},A}},54146:function(ke,ve,k){"use strict";var M=k(26729);ve.Z=M},17423:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return A}});const M=F=>typeof F=="object"&&F!=null&&F.nodeType===1,H=(F,P)=>(!P||F!=="hidden")&&F!=="visible"&&F!=="clip",U=(F,P)=>{if(F.clientHeight<F.scrollHeight||F.clientWidth<F.scrollWidth){const W=getComputedStyle(F,null);return H(W.overflowY,P)||H(W.overflowX,P)||(K=>{const ge=(be=>{if(!be.ownerDocument||!be.ownerDocument.defaultView)return null;try{return be.ownerDocument.defaultView.frameElement}catch(Ue){return null}})(K);return!!ge&&(ge.clientHeight<K.scrollHeight||ge.clientWidth<K.scrollWidth)})(F)}return!1},Y=(F,P,W,K,ge,be,Ue,Ne)=>be<F&&Ue>P||be>F&&Ue<P?0:be<=F&&Ne<=W||Ue>=P&&Ne>=W?be-F-K:Ue>P&&Ne<W||be<F&&Ne>W?Ue-P+ge:0,N=F=>{const P=F.parentElement;return P==null?F.getRootNode().host||null:P},I=(F,P)=>{var W,K,ge,be;if(typeof document=="undefined")return[];const{scrollMode:Ue,block:Ne,inline:ye,boundary:De,skipOverflowHiddenElements:Ce}=P,Me=typeof De=="function"?De:ze=>ze!==De;if(!M(F))throw new TypeError("Invalid target");const Oe=document.scrollingElement||document.documentElement,re=[];let q=F;for(;M(q)&&Me(q);){if(q=N(q),q===Oe){re.push(q);break}q!=null&&q===document.body&&U(q)&&!U(document.documentElement)||q!=null&&U(q,Ce)&&re.push(q)}const ce=(K=(W=window.visualViewport)==null?void 0:W.width)!=null?K:innerWidth,Ee=(be=(ge=window.visualViewport)==null?void 0:ge.height)!=null?be:innerHeight,{scrollX:Te,scrollY:Je}=window,{height:He,width:rt,top:Et,right:lt,bottom:st,left:mt}=F.getBoundingClientRect(),{top:fe,right:We,bottom:ht,left:Pt}=(ze=>{const Qe=window.getComputedStyle(ze);return{top:parseFloat(Qe.scrollMarginTop)||0,right:parseFloat(Qe.scrollMarginRight)||0,bottom:parseFloat(Qe.scrollMarginBottom)||0,left:parseFloat(Qe.scrollMarginLeft)||0}})(F);let Ve=Ne==="start"||Ne==="nearest"?Et-fe:Ne==="end"?st+ht:Et+He/2-fe+ht,it=ye==="center"?mt+rt/2-Pt+We:ye==="end"?lt+We:mt-Pt;const ft=[];for(let ze=0;ze<re.length;ze++){const Qe=re[ze],{height:Se,width:E,top:me,right:L,bottom:X,left:Ke}=Qe.getBoundingClientRect();if(Ue==="if-needed"&&Et>=0&&mt>=0&&st<=Ee&<<=ce&&Et>=me&&st<=X&&mt>=Ke&<<=L)return ft;const ot=getComputedStyle(Qe),pe=parseInt(ot.borderLeftWidth,10),xe=parseInt(ot.borderTopWidth,10),Ze=parseInt(ot.borderRightWidth,10),O=parseInt(ot.borderBottomWidth,10);let ne=0,qe=0;const dt="offsetWidth"in Qe?Qe.offsetWidth-Qe.clientWidth-pe-Ze:0,nt="offsetHeight"in Qe?Qe.offsetHeight-Qe.clientHeight-xe-O:0,xt="offsetWidth"in Qe?Qe.offsetWidth===0?0:E/Qe.offsetWidth:0,bt="offsetHeight"in Qe?Qe.offsetHeight===0?0:Se/Qe.offsetHeight:0;if(Oe===Qe)ne=Ne==="start"?Ve:Ne==="end"?Ve-Ee:Ne==="nearest"?Y(Je,Je+Ee,Ee,xe,O,Je+Ve,Je+Ve+He,He):Ve-Ee/2,qe=ye==="start"?it:ye==="center"?it-ce/2:ye==="end"?it-ce:Y(Te,Te+ce,ce,pe,Ze,Te+it,Te+it+rt,rt),ne=Math.max(0,ne+Je),qe=Math.max(0,qe+Te);else{ne=Ne==="start"?Ve-me-xe:Ne==="end"?Ve-X+O+nt:Ne==="nearest"?Y(me,X,Se,xe,O+nt,Ve,Ve+He,He):Ve-(me+Se/2)+nt/2,qe=ye==="start"?it-Ke-pe:ye==="center"?it-(Ke+E/2)+dt/2:ye==="end"?it-L+Ze+dt:Y(Ke,L,E,pe,Ze+dt,it,it+rt,rt);const{scrollLeft:wt,scrollTop:we}=Qe;ne=bt===0?0:Math.max(0,Math.min(we+ne/bt,Qe.scrollHeight-Se/bt+nt)),qe=xt===0?0:Math.max(0,Math.min(wt+qe/xt,Qe.scrollWidth-E/xt+dt)),Ve+=we-ne,it+=wt-qe}ft.push({el:Qe,top:ne,left:qe})}return ft},C=F=>F===!1?{block:"end",inline:"nearest"}:(P=>P===Object(P)&&Object.keys(P).length!==0)(F)?F:{block:"start",inline:"nearest"};function A(F,P){if(!F.isConnected||!(ge=>{let be=ge;for(;be&&be.parentNode;){if(be.parentNode===document)return!0;be=be.parentNode instanceof ShadowRoot?be.parentNode.host:be.parentNode}return!1})(F))return;const W=(ge=>{const be=window.getComputedStyle(ge);return{top:parseFloat(be.scrollMarginTop)||0,right:parseFloat(be.scrollMarginRight)||0,bottom:parseFloat(be.scrollMarginBottom)||0,left:parseFloat(be.scrollMarginLeft)||0}})(F);if((ge=>typeof ge=="object"&&typeof ge.behavior=="function")(P))return P.behavior(I(F,P));const K=typeof P=="boolean"||P==null?void 0:P.behavior;for(const{el:ge,top:be,left:Ue}of I(F,C(P))){const Ne=be-W.top+W.bottom,ye=Ue-W.left+W.right;ge.scroll({top:Ne,left:ye,behavior:K})}}},25871:function(ke,ve,k){"use strict";k.d(ve,{Z:function(){return Ee}});var M=k(38870);function H(Te,Je){(Je==null||Je>Te.length)&&(Je=Te.length);for(var He=0,rt=Array(Je);He<Je;He++)rt[He]=Te[He];return rt}function U(Te){if(Array.isArray(Te))return Te}function Y(Te){if(Array.isArray(Te))return H(Te)}function N(Te){if(Te===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Te}function I(Te,Je,He){return Je=P(Je),ye(Te,K()?Reflect.construct(Je,He||[],P(Te).constructor):Je.apply(Te,He))}function C(Te,Je){if(!(Te instanceof Je))throw new TypeError("Cannot call a class as a function")}function A(Te,Je){for(var He=0;He<Je.length;He++){var rt=Je[He];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(Te,re(rt.key),rt)}}function F(Te,Je,He){return Je&&A(Te.prototype,Je),Object.defineProperty(Te,"prototype",{writable:!1}),Te}function P(Te){return P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Je){return Je.__proto__||Object.getPrototypeOf(Je)},P(Te)}function W(Te,Je){if(typeof Je!="function"&&Je!==null)throw new TypeError("Super expression must either be null or a function");Te.prototype=Object.create(Je&&Je.prototype,{constructor:{value:Te,writable:!0,configurable:!0}}),Object.defineProperty(Te,"prototype",{writable:!1}),Je&&De(Te,Je)}function K(){try{var Te=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(Je){}return(K=function(){return!!Te})()}function ge(Te){if(typeof Symbol!="undefined"&&Te[Symbol.iterator]!=null||Te["@@iterator"]!=null)return Array.from(Te)}function be(Te,Je){var He=Te==null?null:typeof Symbol!="undefined"&&Te[Symbol.iterator]||Te["@@iterator"];if(He!=null){var rt,Et,lt,st,mt=[],fe=!0,We=!1;try{if(lt=(He=He.call(Te)).next,Je===0){if(Object(He)!==He)return;fe=!1}else for(;!(fe=(rt=lt.call(He)).done)&&(mt.push(rt.value),mt.length!==Je);fe=!0);}catch(ht){We=!0,Et=ht}finally{try{if(!fe&&He.return!=null&&(st=He.return(),Object(st)!==st))return}finally{if(We)throw Et}}return mt}}function Ue(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ne(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ye(Te,Je){if(Je&&(typeof Je=="object"||typeof Je=="function"))return Je;if(Je!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return N(Te)}function De(Te,Je){return De=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(He,rt){return He.__proto__=rt,He},De(Te,Je)}function Ce(Te,Je){return U(Te)||be(Te,Je)||q(Te,Je)||Ue()}function Me(Te){return Y(Te)||ge(Te)||q(Te)||Ne()}function Oe(Te,Je){if(typeof Te!="object"||!Te)return Te;var He=Te[Symbol.toPrimitive];if(He!==void 0){var rt=He.call(Te,Je);if(typeof rt!="object")return rt;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Te)}function re(Te){var Je=Oe(Te,"string");return typeof Je=="symbol"?Je:Je+""}function q(Te,Je){if(Te){if(typeof Te=="string")return H(Te,Je);var He={}.toString.call(Te).slice(8,-1);return He==="Object"&&Te.constructor&&(He=Te.constructor.name),He==="Map"||He==="Set"?Array.from(Te):He==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(He)?H(Te,Je):void 0}}var ce=typeof window!="undefined"&&window.THREE?window.THREE:{CanvasTexture:M.ROQ,Sprite:M.jyi,SpriteMaterial:M.xeV,SRGBColorSpace:M.KI_},Ee=function(Te){function Je(){var He,rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:10,lt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"rgba(255, 255, 255, 1)";return C(this,Je),He=I(this,Je,[new ce.SpriteMaterial]),He._text="".concat(rt),He._textHeight=Et,He._color=lt,He._backgroundColor=!1,He._padding=0,He._borderWidth=0,He._borderRadius=0,He._borderColor="white",He._offsetX=0,He._offsetY=0,He._strokeWidth=0,He._strokeColor="white",He._fontFace="system-ui",He._fontSize=90,He._fontWeight="normal",He._canvas=document.createElement("canvas"),He._genCanvas(),He}return W(Je,Te),F(Je,[{key:"text",get:function(){return this._text},set:function(rt){this._text=rt,this._genCanvas()}},{key:"textHeight",get:function(){return this._textHeight},set:function(rt){this._textHeight=rt,this._genCanvas()}},{key:"color",get:function(){return this._color},set:function(rt){this._color=rt,this._genCanvas()}},{key:"backgroundColor",get:function(){return this._backgroundColor},set:function(rt){this._backgroundColor=rt,this._genCanvas()}},{key:"padding",get:function(){return this._padding},set:function(rt){this._padding=rt,this._genCanvas()}},{key:"borderWidth",get:function(){return this._borderWidth},set:function(rt){this._borderWidth=rt,this._genCanvas()}},{key:"borderRadius",get:function(){return this._borderRadius},set:function(rt){this._borderRadius=rt,this._genCanvas()}},{key:"borderColor",get:function(){return this._borderColor},set:function(rt){this._borderColor=rt,this._genCanvas()}},{key:"offsetX",get:function(){return this._offsetX},set:function(rt){this._offsetX=rt,this._genCanvas()}},{key:"offsetY",get:function(){return this._offsetY},set:function(rt){this._offsetY=rt,this._genCanvas()}},{key:"fontFace",get:function(){return this._fontFace},set:function(rt){this._fontFace=rt,this._genCanvas()}},{key:"fontSize",get:function(){return this._fontSize},set:function(rt){this._fontSize=rt,this._genCanvas()}},{key:"fontWeight",get:function(){return this._fontWeight},set:function(rt){this._fontWeight=rt,this._genCanvas()}},{key:"strokeWidth",get:function(){return this._strokeWidth},set:function(rt){this._strokeWidth=rt,this._genCanvas()}},{key:"strokeColor",get:function(){return this._strokeColor},set:function(rt){this._strokeColor=rt,this._genCanvas()}},{key:"_genCanvas",value:function(){var rt=this,Et=this._canvas,lt=Et.getContext("2d"),st=1/this.textHeight,mt=Array.isArray(this.borderWidth)?this.borderWidth:[this.borderWidth,this.borderWidth],fe=mt.map(function(O){return O*rt.fontSize*st}),We=Array.isArray(this.borderRadius)?this.borderRadius:[this.borderRadius,this.borderRadius,this.borderRadius,this.borderRadius],ht=We.map(function(O){return O*rt.fontSize*st}),Pt=Array.isArray(this.padding)?this.padding:[this.padding,this.padding],Ve=Pt.map(function(O){return O*rt.fontSize*st}),it=[this.offsetX,this.offsetY].map(function(O){return O*rt.fontSize*st}),ft=this.text.split(`
|
|
|
`),ze="".concat(this.fontWeight," ").concat(this.fontSize,"px ").concat(this.fontFace);lt.font=ze;var Qe=Math.max.apply(Math,Me(ft.map(function(O){return lt.measureText(O).width}))),Se=this.fontSize*ft.length,E=Qe+fe[0]*2+Ve[0]*2,me=Se+fe[1]*2+Ve[1]*2;if(Et.width=E+Math.abs(it[0]),Et.height=me+Math.abs(it[1]),lt.translate.apply(lt,Me(it.map(function(O){return Math.max(0,O)}))),this.borderWidth){if(lt.strokeStyle=this.borderColor,fe[0]){var L=fe[0]/2;lt.lineWidth=fe[0],lt.beginPath(),lt.moveTo(L,ht[0]),lt.lineTo(L,me-ht[3]),lt.moveTo(E-L,ht[1]),lt.lineTo(E-L,me-ht[2]),lt.stroke()}if(fe[1]){var X=fe[1]/2;lt.lineWidth=fe[1],lt.beginPath(),lt.moveTo(Math.max(fe[0],ht[0]),X),lt.lineTo(E-Math.max(fe[0],ht[1]),X),lt.moveTo(Math.max(fe[0],ht[3]),me-X),lt.lineTo(E-Math.max(fe[0],ht[2]),me-X),lt.stroke()}if(this.borderRadius){var Ke=Math.max.apply(Math,Me(fe)),ot=Ke/2;lt.lineWidth=Ke,lt.beginPath(),[!!ht[0]&&[ht[0],ot,ot,ht[0]],!!ht[1]&&[E-ht[1],E-ot,ot,ht[1]],!!ht[2]&&[E-ht[2],E-ot,me-ot,me-ht[2]],!!ht[3]&&[ht[3],ot,me-ot,me-ht[3]]].filter(function(O){return O}).forEach(function(O){var ne=Ce(O,4),qe=ne[0],dt=ne[1],nt=ne[2],xt=ne[3];lt.moveTo(qe,nt),lt.quadraticCurveTo(dt,nt,dt,xt)}),lt.stroke()}}this.backgroundColor&&(lt.fillStyle=this.backgroundColor,this.borderRadius?(lt.beginPath(),lt.moveTo(fe[0],ht[0]),[[fe[0],ht[0],E-ht[1],fe[1],fe[1],fe[1]],[E-fe[0],E-fe[0],E-fe[0],fe[1],ht[1],me-ht[2]],[E-fe[0],E-ht[2],ht[3],me-fe[1],me-fe[1],me-fe[1]],[fe[0],fe[0],fe[0],me-fe[1],me-ht[3],ht[0]]].forEach(function(O){var ne=Ce(O,6),qe=ne[0],dt=ne[1],nt=ne[2],xt=ne[3],bt=ne[4],wt=ne[5];lt.quadraticCurveTo(qe,xt,dt,bt),lt.lineTo(nt,wt)}),lt.closePath(),lt.fill()):lt.fillRect(fe[0],fe[1],E-fe[0]*2,me-fe[1]*2)),lt.translate.apply(lt,Me(fe)),lt.translate.apply(lt,Me(Ve)),lt.font=ze,lt.fillStyle=this.color,lt.textBaseline="bottom";var pe=this.strokeWidth>0;pe&&(lt.lineWidth=this.strokeWidth*this.fontSize/10,lt.strokeStyle=this.strokeColor),ft.forEach(function(O,ne){var qe=(Qe-lt.measureText(O).width)/2,dt=(ne+1)*rt.fontSize;pe&<.strokeText(O,qe,dt),lt.fillText(O,qe,dt)}),this.material.map&&this.material.map.dispose();var xe=this.material.map=new ce.CanvasTexture(Et);xe.colorSpace=ce.SRGBColorSpace;var Ze=this.textHeight*ft.length+mt[1]*2+Pt[1]*2+Math.abs(this.offsetY);this.scale.set(Ze*Et.width/Et.height,Ze,0)}},{key:"clone",value:function(){return new this.constructor(this.text,this.textHeight,this.color).copy(this)}},{key:"copy",value:function(rt){return ce.Sprite.prototype.copy.call(this,rt),this.color=rt.color,this.backgroundColor=rt.backgroundColor,this.padding=rt.padding,this.borderWidth=rt.borderWidth,this.borderColor=rt.borderColor,this.offsetX=rt.offsetX,this.offsetY=rt.offsetY,this.fontFace=rt.fontFace,this.fontSize=rt.fontSize,this.fontWeight=rt.fontWeight,this.strokeWidth=rt.strokeWidth,this.strokeColor=rt.strokeColor,this}}])}(ce.Sprite)},97582:function(ke,ve,k){"use strict";k.d(ve,{CR:function(){return ye},Jh:function(){return ge},Q_:function(){return Et},XA:function(){return Ne},ZT:function(){return H},_T:function(){return Y},ev:function(){return Me},mG:function(){return K},pi:function(){return U}});var M=function(Ve,it){return M=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ft,ze){ft.__proto__=ze}||function(ft,ze){for(var Qe in ze)Object.prototype.hasOwnProperty.call(ze,Qe)&&(ft[Qe]=ze[Qe])},M(Ve,it)};function H(Ve,it){if(typeof it!="function"&&it!==null)throw new TypeError("Class extends value "+String(it)+" is not a constructor or null");M(Ve,it);function ft(){this.constructor=Ve}Ve.prototype=it===null?Object.create(it):(ft.prototype=it.prototype,new ft)}var U=function(){return U=Object.assign||function(it){for(var ft,ze=1,Qe=arguments.length;ze<Qe;ze++){ft=arguments[ze];for(var Se in ft)Object.prototype.hasOwnProperty.call(ft,Se)&&(it[Se]=ft[Se])}return it},U.apply(this,arguments)};function Y(Ve,it){var ft={};for(var ze in Ve)Object.prototype.hasOwnProperty.call(Ve,ze)&&it.indexOf(ze)<0&&(ft[ze]=Ve[ze]);if(Ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Qe=0,ze=Object.getOwnPropertySymbols(Ve);Qe<ze.length;Qe++)it.indexOf(ze[Qe])<0&&Object.prototype.propertyIsEnumerable.call(Ve,ze[Qe])&&(ft[ze[Qe]]=Ve[ze[Qe]]);return ft}function N(Ve,it,ft,ze){var Qe=arguments.length,Se=Qe<3?it:ze===null?ze=Object.getOwnPropertyDescriptor(it,ft):ze,E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Se=Reflect.decorate(Ve,it,ft,ze);else for(var me=Ve.length-1;me>=0;me--)(E=Ve[me])&&(Se=(Qe<3?E(Se):Qe>3?E(it,ft,Se):E(it,ft))||Se);return Qe>3&&Se&&Object.defineProperty(it,ft,Se),Se}function I(Ve,it){return function(ft,ze){it(ft,ze,Ve)}}function C(Ve,it,ft,ze,Qe,Se){function E(qe){if(qe!==void 0&&typeof qe!="function")throw new TypeError("Function expected");return qe}for(var me=ze.kind,L=me==="getter"?"get":me==="setter"?"set":"value",X=!it&&Ve?ze.static?Ve:Ve.prototype:null,Ke=it||(X?Object.getOwnPropertyDescriptor(X,ze.name):{}),ot,pe=!1,xe=ft.length-1;xe>=0;xe--){var Ze={};for(var O in ze)Ze[O]=O==="access"?{}:ze[O];for(var O in ze.access)Ze.access[O]=ze.access[O];Ze.addInitializer=function(qe){if(pe)throw new TypeError("Cannot add initializers after decoration has completed");Se.push(E(qe||null))};var ne=(0,ft[xe])(me==="accessor"?{get:Ke.get,set:Ke.set}:Ke[L],Ze);if(me==="accessor"){if(ne===void 0)continue;if(ne===null||typeof ne!="object")throw new TypeError("Object expected");(ot=E(ne.get))&&(Ke.get=ot),(ot=E(ne.set))&&(Ke.set=ot),(ot=E(ne.init))&&Qe.unshift(ot)}else(ot=E(ne))&&(me==="field"?Qe.unshift(ot):Ke[L]=ot)}X&&Object.defineProperty(X,ze.name,Ke),pe=!0}function A(Ve,it,ft){for(var ze=arguments.length>2,Qe=0;Qe<it.length;Qe++)ft=ze?it[Qe].call(Ve,ft):it[Qe].call(Ve);return ze?ft:void 0}function F(Ve){return typeof Ve=="symbol"?Ve:"".concat(Ve)}function P(Ve,it,ft){return typeof it=="symbol"&&(it=it.description?"[".concat(it.description,"]"):""),Object.defineProperty(Ve,"name",{configurable:!0,value:ft?"".concat(ft," ",it):it})}function W(Ve,it){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(Ve,it)}function K(Ve,it,ft,ze){function Qe(Se){return Se instanceof ft?Se:new ft(function(E){E(Se)})}return new(ft||(ft=Promise))(function(Se,E){function me(Ke){try{X(ze.next(Ke))}catch(ot){E(ot)}}function L(Ke){try{X(ze.throw(Ke))}catch(ot){E(ot)}}function X(Ke){Ke.done?Se(Ke.value):Qe(Ke.value).then(me,L)}X((ze=ze.apply(Ve,it||[])).next())})}function ge(Ve,it){var ft={label:0,sent:function(){if(Se[0]&1)throw Se[1];return Se[1]},trys:[],ops:[]},ze,Qe,Se,E=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return E.next=me(0),E.throw=me(1),E.return=me(2),typeof Symbol=="function"&&(E[Symbol.iterator]=function(){return this}),E;function me(X){return function(Ke){return L([X,Ke])}}function L(X){if(ze)throw new TypeError("Generator is already executing.");for(;E&&(E=0,X[0]&&(ft=0)),ft;)try{if(ze=1,Qe&&(Se=X[0]&2?Qe.return:X[0]?Qe.throw||((Se=Qe.return)&&Se.call(Qe),0):Qe.next)&&!(Se=Se.call(Qe,X[1])).done)return Se;switch(Qe=0,Se&&(X=[X[0]&2,Se.value]),X[0]){case 0:case 1:Se=X;break;case 4:return ft.label++,{value:X[1],done:!1};case 5:ft.label++,Qe=X[1],X=[0];continue;case 7:X=ft.ops.pop(),ft.trys.pop();continue;default:if(Se=ft.trys,!(Se=Se.length>0&&Se[Se.length-1])&&(X[0]===6||X[0]===2)){ft=0;continue}if(X[0]===3&&(!Se||X[1]>Se[0]&&X[1]<Se[3])){ft.label=X[1];break}if(X[0]===6&&ft.label<Se[1]){ft.label=Se[1],Se=X;break}if(Se&&ft.label<Se[2]){ft.label=Se[2],ft.ops.push(X);break}Se[2]&&ft.ops.pop(),ft.trys.pop();continue}X=it.call(Ve,ft)}catch(Ke){X=[6,Ke],Qe=0}finally{ze=Se=0}if(X[0]&5)throw X[1];return{value:X[0]?X[1]:void 0,done:!0}}}var be=Object.create?function(Ve,it,ft,ze){ze===void 0&&(ze=ft);var Qe=Object.getOwnPropertyDescriptor(it,ft);(!Qe||("get"in Qe?!it.__esModule:Qe.writable||Qe.configurable))&&(Qe={enumerable:!0,get:function(){return it[ft]}}),Object.defineProperty(Ve,ze,Qe)}:function(Ve,it,ft,ze){ze===void 0&&(ze=ft),Ve[ze]=it[ft]};function Ue(Ve,it){for(var ft in Ve)ft!=="default"&&!Object.prototype.hasOwnProperty.call(it,ft)&&be(it,Ve,ft)}function Ne(Ve){var it=typeof Symbol=="function"&&Symbol.iterator,ft=it&&Ve[it],ze=0;if(ft)return ft.call(Ve);if(Ve&&typeof Ve.length=="number")return{next:function(){return Ve&&ze>=Ve.length&&(Ve=void 0),{value:Ve&&Ve[ze++],done:!Ve}}};throw new TypeError(it?"Object is not iterable.":"Symbol.iterator is not defined.")}function ye(Ve,it){var ft=typeof Symbol=="function"&&Ve[Symbol.iterator];if(!ft)return Ve;var ze=ft.call(Ve),Qe,Se=[],E;try{for(;(it===void 0||it-- >0)&&!(Qe=ze.next()).done;)Se.push(Qe.value)}catch(me){E={error:me}}finally{try{Qe&&!Qe.done&&(ft=ze.return)&&ft.call(ze)}finally{if(E)throw E.error}}return Se}function De(){for(var Ve=[],it=0;it<arguments.length;it++)Ve=Ve.concat(ye(arguments[it]));return Ve}function Ce(){for(var Ve=0,it=0,ft=arguments.length;it<ft;it++)Ve+=arguments[it].length;for(var ze=Array(Ve),Qe=0,it=0;it<ft;it++)for(var Se=arguments[it],E=0,me=Se.length;E<me;E++,Qe++)ze[Qe]=Se[E];return ze}function Me(Ve,it,ft){if(ft||arguments.length===2)for(var ze=0,Qe=it.length,Se;ze<Qe;ze++)(Se||!(ze in it))&&(Se||(Se=Array.prototype.slice.call(it,0,ze)),Se[ze]=it[ze]);return Ve.concat(Se||Array.prototype.slice.call(it))}function Oe(Ve){return this instanceof Oe?(this.v=Ve,this):new Oe(Ve)}function re(Ve,it,ft){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var ze=ft.apply(Ve,it||[]),Qe,Se=[];return Qe=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),me("next"),me("throw"),me("return",E),Qe[Symbol.asyncIterator]=function(){return this},Qe;function E(xe){return function(Ze){return Promise.resolve(Ze).then(xe,ot)}}function me(xe,Ze){ze[xe]&&(Qe[xe]=function(O){return new Promise(function(ne,qe){Se.push([xe,O,ne,qe])>1||L(xe,O)})},Ze&&(Qe[xe]=Ze(Qe[xe])))}function L(xe,Ze){try{X(ze[xe](Ze))}catch(O){pe(Se[0][3],O)}}function X(xe){xe.value instanceof Oe?Promise.resolve(xe.value.v).then(Ke,ot):pe(Se[0][2],xe)}function Ke(xe){L("next",xe)}function ot(xe){L("throw",xe)}function pe(xe,Ze){xe(Ze),Se.shift(),Se.length&&L(Se[0][0],Se[0][1])}}function q(Ve){var it,ft;return it={},ze("next"),ze("throw",function(Qe){throw Qe}),ze("return"),it[Symbol.iterator]=function(){return this},it;function ze(Qe,Se){it[Qe]=Ve[Qe]?function(E){return(ft=!ft)?{value:Oe(Ve[Qe](E)),done:!1}:Se?Se(E):E}:Se}}function ce(Ve){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var it=Ve[Symbol.asyncIterator],ft;return it?it.call(Ve):(Ve=typeof Ne=="function"?Ne(Ve):Ve[Symbol.iterator](),ft={},ze("next"),ze("throw"),ze("return"),ft[Symbol.asyncIterator]=function(){return this},ft);function ze(Se){ft[Se]=Ve[Se]&&function(E){return new Promise(function(me,L){E=Ve[Se](E),Qe(me,L,E.done,E.value)})}}function Qe(Se,E,me,L){Promise.resolve(L).then(function(X){Se({value:X,done:me})},E)}}function Ee(Ve,it){return Object.defineProperty?Object.defineProperty(Ve,"raw",{value:it}):Ve.raw=it,Ve}var Te=Object.create?function(Ve,it){Object.defineProperty(Ve,"default",{enumerable:!0,value:it})}:function(Ve,it){Ve.default=it},Je=function(Ve){return Je=Object.getOwnPropertyNames||function(it){var ft=[];for(var ze in it)Object.prototype.hasOwnProperty.call(it,ze)&&(ft[ft.length]=ze);return ft},Je(Ve)};function He(Ve){if(Ve&&Ve.__esModule)return Ve;var it={};if(Ve!=null)for(var ft=Je(Ve),ze=0;ze<ft.length;ze++)ft[ze]!=="default"&&be(it,Ve,ft[ze]);return Te(it,Ve),it}function rt(Ve){return Ve&&Ve.__esModule?Ve:{default:Ve}}function Et(Ve,it,ft,ze){if(ft==="a"&&!ze)throw new TypeError("Private accessor was defined without a getter");if(typeof it=="function"?Ve!==it||!ze:!it.has(Ve))throw new TypeError("Cannot read private member from an object whose class did not declare it");return ft==="m"?ze:ft==="a"?ze.call(Ve):ze?ze.value:it.get(Ve)}function lt(Ve,it,ft,ze,Qe){if(ze==="m")throw new TypeError("Private method is not writable");if(ze==="a"&&!Qe)throw new TypeError("Private accessor was defined without a setter");if(typeof it=="function"?Ve!==it||!Qe:!it.has(Ve))throw new TypeError("Cannot write private member to an object whose class did not declare it");return ze==="a"?Qe.call(Ve,ft):Qe?Qe.value=ft:it.set(Ve,ft),ft}function st(Ve,it){if(it===null||typeof it!="object"&&typeof it!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof Ve=="function"?it===Ve:Ve.has(it)}function mt(Ve,it,ft){if(it!=null){if(typeof it!="object"&&typeof it!="function")throw new TypeError("Object expected.");var ze,Qe;if(ft){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");ze=it[Symbol.asyncDispose]}if(ze===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");ze=it[Symbol.dispose],ft&&(Qe=ze)}if(typeof ze!="function")throw new TypeError("Object not disposable.");Qe&&(ze=function(){try{Qe.call(this)}catch(Se){return Promise.reject(Se)}}),Ve.stack.push({value:it,dispose:ze,async:ft})}else ft&&Ve.stack.push({async:!0});return it}var fe=typeof SuppressedError=="function"?SuppressedError:function(Ve,it,ft){var ze=new Error(ft);return ze.name="SuppressedError",ze.error=Ve,ze.suppressed=it,ze};function We(Ve){function it(Se){Ve.error=Ve.hasError?new fe(Se,Ve.error,"An error was suppressed during disposal."):Se,Ve.hasError=!0}var ft,ze=0;function Qe(){for(;ft=Ve.stack.pop();)try{if(!ft.async&&ze===1)return ze=0,Ve.stack.push(ft),Promise.resolve().then(Qe);if(ft.dispose){var Se=ft.dispose.call(ft.value);if(ft.async)return ze|=2,Promise.resolve(Se).then(Qe,function(E){return it(E),Qe()})}else ze|=1}catch(E){it(E)}if(ze===1)return Ve.hasError?Promise.reject(Ve.error):Promise.resolve();if(Ve.hasError)throw Ve.error}return Qe()}function ht(Ve,it){return typeof Ve=="string"&&/^\.\.?\//.test(Ve)?Ve.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(ft,ze,Qe,Se,E){return ze?it?".jsx":".js":Qe&&(!Se||!E)?ft:Qe+Se+"."+E.toLowerCase()+"js"}):Ve}var Pt={__extends:H,__assign:U,__rest:Y,__decorate:N,__param:I,__esDecorate:C,__runInitializers:A,__propKey:F,__setFunctionName:P,__metadata:W,__awaiter:K,__generator:ge,__createBinding:be,__exportStar:Ue,__values:Ne,__read:ye,__spread:De,__spreadArrays:Ce,__spreadArray:Me,__await:Oe,__asyncGenerator:re,__asyncDelegator:q,__asyncValues:ce,__makeTemplateObject:Ee,__importStar:He,__importDefault:rt,__classPrivateFieldGet:Et,__classPrivateFieldSet:lt,__classPrivateFieldIn:st,__addDisposableResource:mt,__disposeResources:We,__rewriteRelativeImportExtension:ht}}}]);
|
|
|
}()); |