PageSourceSearch

https://samugiken.com/_next/static/chunks/cc3ea29e-9eedc9b0a4d3b6c2.js

js samugiken.com collected 2026-10-07 01:52:00 UTC 224,704 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3623],{66828:function(e,t,n){n.d(t,{$6:function(){return aN},$p:function(){return iP},Aw:function(){return rd},Cd:function(){return r9},Dk:function(){return rx},E9:function(){return eI},Ee:function(){return ao},F6:function(){return eb},GL:function(){return tX},GZ:function(){return r$},I8:function(){return eS},L1:function(){return iZ},MD:function(){return aH},N1:function(){return it},NB:function(){return rf},O4:function(){return eB},Oi:function(){return iN},Pj:function(){return an},R:function(){return ns},RV:function(){return r3},Rr:function(){return ry},S3:function(){return aV},UL:function(){return ap},V1:function(){return e5},Vl:function(){return ez},Xz:function(){return aZ},YR:function(){return nF},ZA:function(){return ai},_O:function(){return eF},aH:function(){return af},b_:function(){return at},bn:function(){return ex},gz:function(){return nM},h0:function(){return tn},iM:function(){return e0},jf:function(){return eG},k9:function(){return aa},lu:function(){return nu},mN:function(){return eR},mg:function(){return ad},s$:function(){return r8},sC:function(){return aW},ux:function(){return ak},x1:function(){return al},xA:function(){return rl},xv:function(){return ay},y$:function(){return ac}});var i,r,a,o,s,l,u,c,h,d,v,f,p,g,y,m,k,E,x,T,b,S,w,N,P,M,C,A=n(17816),R=n(30917),Z=n(87660),L=n(12686),O=n(58957),I=n(75470),D=n(50155),G=n(52644),_=n(35136),F=n(72647),U=n(14690),B=n(61899),V=n(10953),z=n(75837),H=n(26912),Y=n(35476),W=n(89148),X=n(27412),j=n(15378),$=n(59548),q=n(20203),K=n(7086),J=n(45378),Q=n(44502),ee=n(96216),et=n(58856),en=n(29873),ei=n(86976),er=n(2854),ea=n(62370),eo=n(79011),es=n(36179),el=n(83262),eu=n(29803),ec=n(91531),eh=n(70373),ed=n(59123),ev=n(75621),ef=n(36108),ep=n(4978),eg=n(24435),ey=n(13016),em=n(17672),ek=n(44426),eE=n(17039),ex=((i={}).GROUP="g",i.FRAGMENT="fragment",i.CIRCLE="circle",i.ELLIPSE="ellipse",i.IMAGE="image",i.RECT="rect",i.LINE="line",i.POLYLINE="polyline",i.POLYGON="polygon",i.TEXT="text",i.PATH="path",i.HTML="html",i.MESH="mesh",i),eT=((r={})[r.ZERO=0]="ZERO",r[r.NEGATIVE_ONE=1]="NEGATIVE_ONE",r),eb=(0,Z.Z)(function e(){(0,R.Z)(this,e),this.plugins=[]},[{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 n=e.context.renderingPlugins.indexOf(t);n>=0&&e.context.renderingPlugins.splice(n,1)})}}]),eS=(0,Z.Z)(function e(t){(0,R.Z)(this,e),this.clipSpaceNearZ=eT.NEGATIVE_ONE,this.plugins=[],this.config=(0,A.Z)({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableSizeAttenuation:!0,enableRenderingOptimization:!1},t)},[{key:"registerPlugin",value:function(e){-1===this.plugins.findIndex(function(t){return t===e})&&this.plugins.push(e)}},{key:"unregisterPlugin",value:function(e){var t=this.plugins.findIndex(function(t){return t===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)}}]),ew=_.IH,eN=_.JG,eP=_.Fp,eM=_.VV,eC=_.bA,eA=_.lu,eR=function(){function e(){(0,R.Z)(this,e),this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return(0,Z.Z)(e,[{key:"update",value:function(e,t){eN(this.center,e),eN(this.halfExtents,t),eA(this.min,this.center,this.halfExtents),ew(this.max,this.center,this.halfExtents)}},{key:"setMinMax",value:function(e,t){ew(this.center,t,e),eC(this.center,this.center,.5),eA(this.halfExtents,t,e),eC(this.halfExtents,this.halfExtents,.5),eN(this.min,e),eN(this.max,t)}},{key:"getMin",value:function(){return this.min}},{key:"getMax",value:function(){return this.max}},{key:"add",value:function(t){if(!e.isEmpty(t)){if(e.isEmpty(this)){this.setMinMax(t.getMin(),t.getMax());return}var n=this.center,i=n[0],r=n[1],a=n[2],o=this.halfExtents,s=o[0],l=o[1],u=o[2],c=i-s,h=i+s,d=r-l,v=r+l,f=a-u,p=a+u,g=t.center,y=g[0],m=g[1],k=g[2],E=t.halfExtents,x=E[0],T=E[1],b=E[2],S=y-x,w=y+x,N=m-T,P=m+T,M=k-b,C=k+b;S<c&&(c=S),w>h&&(h=w),N<d&&(d=N),P>v&&(v=P),M<f&&(f=M),C>p&&(p=C),n[0]=(c+h)*.5,n[1]=(d+v)*.5,n[2]=(f+p)*.5,o[0]=(h-c)*.5,o[1]=(v-d)*.5,o[2]=(p-f)*.5,this.min[0]=c,this.min[1]=d,this.min[2]=f,this.max[0]=h,this.max[1]=v,this.max[2]=p}}},{key:"setFromTransformedAABB",value:function(e,t){var n=this.center,i=this.halfExtents,r=e.center,a=e.halfExtents,o=t[0],s=t[4],l=t[8],u=t[1],c=t[5],h=t[9],d=t[2],v=t[6],f=t[10],p=Math.abs(o),g=Math.abs(s),y=Math.abs(l),m=Math.abs(u),k=Math.abs(c),E=Math.abs(h),x=Math.abs(d),T=Math.abs(v),b=Math.abs(f);n[0]=t[12]+o*r[0]+s*r[1]+l*r[2],n[1]=t[13]+u*r[0]+c*r[1]+h*r[2],n[2]=t[14]+d*r[0]+v*r[1]+f*r[2],i[0]=p*a[0]+g*a[1]+y*a[2],i[1]=m*a[0]+k*a[
11]+E*a[2],i[2]=x*a[0]+T*a[1]+b*a[2],eA(this.min,n,i),ew(this.max,n,i)}},{key:"intersects",value:function(e){var t=this.getMax(),n=this.getMin(),i=e.getMax(),r=e.getMin();return n[0]<=i[0]&&t[0]>=r[0]&&n[1]<=i[1]&&t[1]>=r[1]&&n[2]<=i[2]&&t[2]>=r[2]}},{key:"intersection",value:function(t){if(!this.intersects(t))return null;var n=new e,i=eP([0,0,0],this.getMin(),t.getMin()),r=eM([0,0,0],this.getMax(),t.getMax());return n.setMinMax(i,r),n}},{key:"getNegativeFarPoint",value:function(e){return 273===e.pnVertexFlag?eN([0,0,0],this.min):272===e.pnVertexFlag?[this.min[0],this.min[1],this.max[2]]:257===e.pnVertexFlag?[this.min[0],this.max[1],this.min[2]]:256===e.pnVertexFlag?[this.min[0],this.max[1],this.max[2]]:17===e.pnVertexFlag?[this.max[0],this.min[1],this.min[2]]:16===e.pnVertexFlag?[this.max[0],this.min[1],this.max[2]]:1===e.pnVertexFlag?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]}},{key:"getPositiveFarPoint",value:function(e){return 273===e.pnVertexFlag?eN([0,0,0],this.max):272===e.pnVertexFlag?[this.max[0],this.max[1],this.min[2]]:257===e.pnVertexFlag?[this.max[0],this.min[1],this.max[2]]:256===e.pnVertexFlag?[this.max[0],this.min[1],this.min[2]]:17===e.pnVertexFlag?[this.min[0],this.max[1],this.max[2]]:16===e.pnVertexFlag?[this.min[0],this.max[1],this.min[2]]:1===e.pnVertexFlag?[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||0===e.halfExtents[0]&&0===e.halfExtents[1]&&0===e.halfExtents[2]}}])}(),eZ=(0,Z.Z)(function e(t,n){(0,R.Z)(this,e),this.distance=t||0,this.normal=n||_.al(0,1,0),this.updatePNVertexFlag()},[{key:"updatePNVertexFlag",value:function(){this.pnVertexFlag=(Number(this.normal[0]>=0)<<8)+(Number(this.normal[1]>=0)<<4)+Number(this.normal[2]>=0)}},{key:"distanceToPoint",value:function(e){return _.AK(e,this.normal)-this.distance}},{key:"normalize",value:function(){var e=1/_.Zh(this.normal);_.bA(this.normal,this.normal,e),this.distance*=e}},{key:"intersectsLine",value:function(e,t,n){var i=this.distanceToPoint(e),r=i/(i-this.distanceToPoint(t)),a=r>=0&&r<=1;return a&&n&&_.t7(n,e,t,r),a}}]),eL=((a={})[a.OUTSIDE=4294967295]="OUTSIDE",a[a.INSIDE=0]="INSIDE",a[a.INDETERMINATE=2147483647]="INDETERMINATE",a),eO=(0,Z.Z)(function e(t){if((0,R.Z)(this,e),this.planes=[],t)this.planes=t;else for(var n=0;n<6;n++)this.planes.push(new eZ)},[{key:"extractFromVPMatrix",value:function(e){var t=(0,D.Z)(e,16),n=t[0],i=t[1],r=t[2],a=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=t[9],d=t[10],v=t[11],f=t[12],p=t[13],g=t[14],y=t[15];_.t8(this.planes[0].normal,a-n,u-o,v-c),this.planes[0].distance=y-f,_.t8(this.planes[1].normal,a+n,u+o,v+c),this.planes[1].distance=y+f,_.t8(this.planes[2].normal,a+i,u+s,v+h),this.planes[2].distance=y+p,_.t8(this.planes[3].normal,a-i,u-s,v-h),this.planes[3].distance=y-p,_.t8(this.planes[4].normal,a-r,u-l,v-d),this.planes[4].distance=y-g,_.t8(this.planes[5].normal,a+r,u+l,v+d),this.planes[5].distance=y+g,this.planes.forEach(function(e){e.normalize(),e.updatePNVertexFlag()})}}]),eI=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(0,R.Z)(this,e),this.x=0,this.y=0,this.x=t,this.y=n}return(0,Z.Z)(e,[{key:"clone",value:function(){return new e(this.x,this.y)}},{key:"copyFrom",value:function(e){this.x=e.x,this.y=e.y}}])}(),eD=function(){function e(t,n,i,r){(0,R.Z)(this,e),this.x=t,this.y=n,this.width=i,this.height=r,this.left=t,this.right=t+i,this.top=n,this.bottom=n+r}return(0,Z.Z)(e,[{key:"toJSON",value:function(){}}],[{key:"fromRect",value:function(t){return new e(t.x,t.y,t.width,t.height)}},{key:"applyTransform",value:function(t,n){var i=F.al(t.x,t.y,0,1),r=F.al(t.x+t.width,t.y,0,1),a=F.al(t.x,t.y+t.height,0,1),o=F.al(t.x+t.width,t.y+t.height,0,1),s=F.Ue(),l=F.Ue(),u=F.Ue(),c=F.Ue();F.fF(s,i,n),F.fF(l,r,n),F.fF(u,a,n),F.fF(c,o,n);var h=Math.min(s[0],l[0],u[0],c[0]),d=Math.min(s[1],l[1],u[1],c[1]),v=Math.max(s[0],l[0],u[0],c[0]),f=Math.max(s[1],l[1],u[1],c[1]);return e.fromRect({x:h,y:d,width:v-h,height:f-d})}}])}(),eG="Method not implemented.",e_="Use document.documentElement instead.";function eF(e){return void 0===e?0:e>360||e<-360?e%360:e}var eU=_.Ue();function eB(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=!(arguments.length>3)||void 0===arguments[3]||arguments[3];
1return Array.isArray(e)&&3===e.length?i?_.d9(e):_.JG(eU,e):(0,H.Z)(e)?i?_.al(e,t,n):_.t8(eU,e,t,n):i?_.al(e[0],e[1]||t,e[2]||n):_.t8(eU,e[0],e[1]||t,e[2]||n)}var eV=Math.PI/180;function ez(e){return e*eV}var eH=180/Math.PI,eY=Math.PI/2;function eW(e,t){var n,i,r,a,o,s,l,u,c,h,d,v,f,p,g,y,m;return 16===t.length?(r=U.getScaling(_.Ue(),t),o=(a=(0,D.Z)(r,3))[0],s=a[1],l=a[2],(u=Math.asin(-t[2]/o))<eY?u>-eY?(n=Math.atan2(t[6]/s,t[10]/l),i=Math.atan2(t[1]/o,t[0]/o)):(i=0,n=-Math.atan2(t[4]/s,t[5]/s)):(i=0,n=Math.atan2(t[4]/s,t[5]/s)),e[0]=n,e[1]=u,e[2]=i):(c=t[0],h=t[1],d=t[2],v=t[3],y=c*c+(f=h*h)+(p=d*d)+(g=v*v),(m=c*v-h*d)>.499995*y?(e[0]=eY,e[1]=2*Math.atan2(h,c),e[2]=0):m<-.499995*y?(e[0]=-eY,e[1]=2*Math.atan2(h,c),e[2]=0):(e[0]=Math.asin(2*(c*d-v*h)),e[1]=Math.atan2(2*(c*v+h*d),1-2*(p+g)),e[2]=Math.atan2(2*(c*h+d*v),1-2*(f+p)))),e}function eX(e){var t=e[0],n=e[1],i=e[3],r=e[4],a=Math.sqrt(t*t+n*n),o=Math.sqrt(i*i+r*r);if(t*r-n*i<0&&(t<r?a=-a:o=-o),a){var s=1/a;t*=s,n*=s}if(o){var l=1/o;i*=l,r*=l}var u=Math.atan2(n,t)*eH;return[e[6],e[7],a,o,u]}var ej=U.create(),e$=U.create(),eq=F.Ue(),eK=[_.Ue(),_.Ue(),_.Ue()],eJ=_.Ue();function eQ(e,t,n,i,r){e[0]=t[0]*i+n[0]*r,e[1]=t[1]*i+n[1]*r,e[2]=t[2]*i+n[2]*r}var e0=((o={})[o.ORBITING=0]="ORBITING",o[o.EXPLORING=1]="EXPLORING",o[o.TRACKING=2]="TRACKING",o),e1=((s={})[s.DEFAULT=0]="DEFAULT",s[s.ROTATIONAL=1]="ROTATIONAL",s[s.TRANSLATIONAL=2]="TRANSLATIONAL",s[s.CINEMATIC=3]="CINEMATIC",s),e2=((l={})[l.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",l[l.PERSPECTIVE=1]="PERSPECTIVE",l),e3={UPDATED:"updated"},e5=(0,Z.Z)(function e(){(0,R.Z)(this,e),this.clipSpaceNearZ=eT.NEGATIVE_ONE,this.eventEmitter=new G.Z,this.matrix=U.create(),this.right=_.al(1,0,0),this.up=_.al(0,1,0),this.forward=_.al(0,0,1),this.position=_.al(0,0,1),this.focalPoint=_.al(0,0,0),this.distanceVector=_.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=U.create(),this.projectionMatrixInverse=U.create(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=e0.EXPLORING,this.trackingMode=e1.DEFAULT,this.projectionMode=e2.PERSPECTIVE,this.frustum=new eO,this.orthoMatrix=U.create()},[{key:"isOrtho",value:function(){return this.projectionMode===e2.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===e0.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===e0.TRACKING&&void 0!==t&&this.setTrackingMode(t),this}},{key:"setProjectionMode",value:function(e){return this.projectionMode=e,this}},{key:"setTrackingMode",value:function(e){if(this.type!==e0.TRACKING)throw 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 U.invert(U.create(),this.matrix)}},{key:"getWorldTransform",value:function(){return this.matrix}},{key:"jitterProjectionMatrix",value:function(e,t){var n=U.fromTranslation(U.create(),[e,t,0]);this.jitteredProjectionMatrix=U.multiply(U.create(),n,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===e2.PERSPECTIVE?this.setPerspective(e,this.far,this.fov,this.aspect):this.setOrthogra
1phic(this.left,this.rright,this.top,this.bottom,e,this.far),this}},{key:"setFar",value:function(e){return this.projectionMode===e2.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,n,i,r,a){return this.aspect=e/t,void 0===this.view&&(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=n,this.view.offsetY=i,this.view.width=r,this.view.height=a,this.projectionMode===e2.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 void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===e2.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===e2.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===e2.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this}},{key:"setZoomByViewportPoint",value:function(e,t){var n=this.canvas.viewport2Canvas({x:t[0],y:t[1]}),i=n.x,r=n.y,a=this.roll;this.rotate(0,0,-a),this.setPosition(i,r),this.setFocalPoint(i,r),this.setZoom(e),this.rotate(0,0,a);var o=this.canvas.viewport2Canvas({x:t[0],y:t[1]}),s=o.x,l=o.y,u=_.al(s-i,l-r,0),c=_.AK(u,this.right)/_.kE(this.right),h=_.AK(u,this.up)/_.kE(this.up),d=this.getPosition(),v=(0,D.Z)(d,2),f=v[0],p=v[1],g=this.getFocalPoint(),y=(0,D.Z)(g,2),m=y[0],k=y[1];return this.setPosition(f-c,p-h),this.setFocalPoint(m-c,k-h),this}},{key:"setPerspective",value:function(e,t,n,i){this.projectionMode=e2.PERSPECTIVE,this.fov=n,this.near=e,this.far=t,this.aspect=i;var r,a=this.near*Math.tan(.5*this.fov*eV)/this.zoom,o=2*a,s=this.aspect*o,l=-.5*s;if(null!==(r=this.view)&&void 0!==r&&r.enabled){var u=this.view.fullWidth,c=this.view.fullHeight;l+=this.view.offsetX*s/u,a-=this.view.offsetY*o/c,s*=this.view.width/u,o*=this.view.height/c}return!function(e,t,n,i,r,a,o){var s,l,u=arguments.length>7&&void 0!==arguments[7]&&arguments[7],c=2*a,h=n-t,d=i-r,v=o-a,f=o*a;u?(s=-o/v,l=-f/v):(s=-(o+a)/v,l=-2*f/v),e[0]=c/h,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c/d,e[6]=0,e[7]=0,e[8]=(n+t)/h,e[9]=(i+r)/d,e[10]=s,e[11]=-1,e[12]=0,e[13]=0,e[14]=l,e[15]=0}(this.projectionMatrix,l,l+s,a-o,a,e,this.far,this.clipSpaceNearZ===eT.ZERO),U.invert(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this}},{key:"setOrthographic",value:function(e,t,n,i,r,a){this.projectionMode=e2.ORTHOGRAPHIC,this.rright=t,this.left=e,this.top=n,this.bottom=i,this.near=r,this.far=a;var o,s=(this.rright-this.left)/(2*this.zoom),l=(this.top-this.bottom)/(2*this.zoom),u=(this.rright+this.left)/2,c=(this.top+this.bottom)/2,h=u-s,d=u+s,v=c+l,f=c-l;if(null!==(o=this.view)&&void 0!==o&&o.enabled){var p=(this.rright-this.left)/this.view.fullWidth/this.zoom,g=(this.top-this.bottom)/this.view.fullHeight/this.zoom;h+=p*this.view.offsetX,d=h+p*this.view.width,v-=g*this.view.offsetY,f=v-g*this.view.height}return this.clipSpaceNearZ===eT.NEGATIVE_ONE?U.ortho(this.projectionMatrix,h,d,v,f,r,a):U.orthoZO(this.projectionMatrix,h,d,v,f,r,a),U.invert(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this}},{key:"setPosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.position[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.position[2],i=eB(e,t,n);return this._setPosition(i),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this}},{key:"setFocalPoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.focalPoint[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.focalPoint[2],i=_.al(0,1,0);if(this.focalPoint=eB(e,t,n),this.trackingMode===e1.CINEMATIC){var r=_.$X(_.Ue(),this.focalPoint,this.position);e=r[0],t=r[1],n=r[2];
1var a=Math.asin(t/_.kE(r))*eH,o=90+Math.atan2(n,e)*eH,s=U.create();U.rotateY(s,s,o*eV),U.rotateX(s,s,a*eV),i=_.fF(_.Ue(),[0,1,0],s)}return U.invert(this.matrix,U.lookAt(U.create(),this.position,this.focalPoint,i)),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<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100;var t=_.Ue();e=this.distance;var n=this.forward,i=this.focalPoint;return t[0]=e*n[0]+i[0],t[1]=e*n[1]+i[1],t[2]=e*n[2]+i[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=eF(e),this.computeMatrix(),this._getAxes(),this.type===e0.ORBITING||this.type===e0.EXPLORING?this._getPosition():this.type===e0.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getAzimuth",value:function(){return this.azimuth}},{key:"setElevation",value:function(e){return this.elevation=eF(e),this.computeMatrix(),this._getAxes(),this.type===e0.ORBITING||this.type===e0.EXPLORING?this._getPosition():this.type===e0.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getElevation",value:function(){return this.elevation}},{key:"setRoll",value:function(e){return this.roll=eF(e),this.computeMatrix(),this._getAxes(),this.type===e0.ORBITING||this.type===e0.EXPLORING?this._getPosition():this.type===e0.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=V.yY(V.Ue(),[0,0,1],this.roll*eV);U.identity(this.matrix);var t=V.yY(V.Ue(),[1,0,0],(this.rotateWorld&&this.type!==e0.TRACKING||this.type===e0.TRACKING?1:-1)*this.elevation*eV),n=V.yY(V.Ue(),[0,1,0],(this.rotateWorld&&this.type!==e0.TRACKING||this.type===e0.TRACKING?1:-1)*this.azimuth*eV),i=V.Jp(V.Ue(),n,t);i=V.Jp(V.Ue(),i,e);var r=U.fromQuat(U.create(),i);this.type===e0.ORBITING||this.type===e0.EXPLORING?(U.translate(this.matrix,this.matrix,this.focalPoint),U.multiply(this.matrix,this.matrix,r),U.translate(this.matrix,this.matrix,[0,0,this.distance])):this.type===e0.TRACKING&&(U.translate(this.matrix,this.matrix,this.position),U.multiply(this.matrix,this.matrix,r))}},{key:"_setPosition",value:function(e,t,n){this.position=eB(e,t,n);var i=this.matrix;i[12]=this.position[0],i[13]=this.position[1],i[14]=this.position[2],i[15]=1,this._getOrthoMatrix()}},{key:"_getAxes",value:function(){_.JG(this.right,eB(F.fF(F.Ue(),[1,0,0,0],this.matrix))),_.JG(this.up,eB(F.fF(F.Ue(),[0,1,0,0],this.matrix))),_.JG(this.forward,eB(F.fF(F.Ue(),[0,0,1,0],this.matrix))),_.Fv(this.right,this.right),_.Fv(this.up,this.up),_.Fv(this.forward,this.forward)}},{key:"_getAngles",value:function(){var e=this.distanceVector[0],t=this.distanceVector[1],n=this.distanceVector[2],i=_.kE(this.distanceVector);if(0===i){this.elevation=0,this.azimuth=0;return}this.type===e0.TRACKING?(this.elevation=Math.asin(t/i)*eH,this.azimuth=Math.atan2(-e,-n)*eH):this.rotateWorld?(this.elevation=Math.asin(t/i)*eH,this.azimuth=Math.atan2(-e,-n)*eH):(this.elevation=-(Math.asin(t/i)*eH),this.azimuth=-(Math.atan2(-e,-n)*eH))}},{key:"_getPosition",value:function(){_.JG(this.position,eB(F.fF(F.Ue(),[0,0,0,1],this.matrix))),this._getDistance()}},{key:"_getFocalPoint",value:function(){_.kK(this.distanceVector,[0,0,-this.distance],B.xO(B.Ue(),this.matrix)),_.IH(this.focalPoint,this.position,this.distanceVector),this._getDistance()}},{key:"_getDistance",value:function(){this.distanceVector=_.$X(_.Ue(),this.focalPoint,this.position),this.distance=_.kE(this.distanceVector),this.dollyingStep=this.distance/100}},{key:"_getOrthoMatrix",value:function(){if(this.projectionMode===e2.ORTHOGRAPHIC){var e=this.position,t=V.yY(V.Ue(),[0,0,1],-this.roll*Math.PI/180);U.fromRotationTranslationScaleOrigin(this.orthoMatrix,t,_.al((this.rright-this.left)/2-e[0],(this.top-this.bottom)/2-e[1],0
1),_.al(this.zoom,this.zoom,1),e)}}},{key:"triggerUpdate",value:function(){if(this.enableUpdate){var e=this.getViewTransform(),t=U.multiply(U.create(),this.getPerspective(),e);this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(e3.UPDATED)}}},{key:"rotate",value:function(e,t,n){throw Error(eG)}},{key:"pan",value:function(e,t){throw Error(eG)}},{key:"dolly",value:function(e){throw Error(eG)}},{key:"createLandmark",value:function(e,t){throw Error(eG)}},{key:"gotoLandmark",value:function(e,t){throw Error(eG)}},{key:"cancelLandmarkAnimation",value:function(){throw Error(eG)}}]),e4=((u={})[u.Standard=0]="Standard",u),e6=((c={})[c.ADDED=0]="ADDED",c[c.REMOVED=1]="REMOVED",c[c.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED",c),e7=_.Ue(),e8=U.create(),e9=V.Ue();function te(e){if(e.localDirtyFlag){if(0!==e.localSkew[0]||0!==e.localSkew[1]){U.fromRotationTranslationScaleOrigin(e.localTransform,e.localRotation,e.localPosition,_.al(1,1,1),e.origin),(0!==e.localSkew[0]||0!==e.localSkew[1])&&(U.identity(e8),e8[4]=Math.tan(e.localSkew[0]),e8[1]=Math.tan(e.localSkew[1]),U.multiply(e.localTransform,e.localTransform,e8));var t=U.fromRotationTranslationScaleOrigin(e8,V.t8(e9,0,0,0,1),_.t8(e7,1,1,1),e.localScale,e.origin);U.multiply(e.localTransform,e.localTransform,t)}else{var n=e.localTransform,i=e.localPosition,r=e.localRotation,a=e.localScale,o=e.origin,s=0!==i[0]||0!==i[1]||0!==i[2],l=1!==r[3]||0!==r[0]||0!==r[1]||0!==r[2],u=1!==a[0]||1!==a[1]||1!==a[2],c=0!==o[0]||0!==o[1]||0!==o[2];l||u||c?U.fromRotationTranslationScaleOrigin(n,r,i,a,o):s?U.fromTranslation(n,i):U.identity(n)}e.localDirtyFlag=!1}}var tt={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new eD(0,0,0,0)},tn=((h={}).COORDINATE="<coordinate>",h.COLOR="<color>",h.PAINT="<paint>",h.NUMBER="<number>",h.ANGLE="<angle>",h.OPACITY_VALUE="<opacity-value>",h.SHADOW_BLUR="<shadow-blur>",h.LENGTH="<length>",h.PERCENTAGE="<percentage>",h.LENGTH_PERCENTAGE="<length> | <percentage>",h.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",h.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",h.LIST_OF_POINTS="<list-of-points>",h.PATH="<path>",h.FILTER="<filter>",h.Z_INDEX="<z-index>",h.OFFSET_DISTANCE="<offset-distance>",h.DEFINED_PATH="<defined-path>",h.MARKER="<marker>",h.TRANSFORM="<transform>",h.TRANSFORM_ORIGIN="<transform-origin>",h.TEXT="<text>",h.TEXT_TRANSFORM="<text-transform>",h);function ti(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function tr(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function ta(){}var to="\\s*([+-]?\\d+)\\s*",ts="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",tl="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",tu=/^#([0-9a-f]{3,8})$/,tc=RegExp(`^rgb\\(${to},${to},${to}\\)$`),th=RegExp(`^rgb\\(${tl},${tl},${tl}\\)$`),td=RegExp(`^rgba\\(${to},${to},${to},${ts}\\)$`),tv=RegExp(`^rgba\\(${tl},${tl},${tl},${ts}\\)$`),tf=RegExp(`^hsl\\(${ts},${tl},${tl}\\)$`),tp=RegExp(`^hsla\\(${ts},${tl},${tl},${ts}\\)$`),tg={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};function ty(){return this.rgb().formatHex()}function tm(){return this.rgb().formatRgb()}function tk(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=tu.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?t
1E(t):3===n?new tT(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?tx(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?tx(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=tc.exec(e))?new tT(t[1],t[2],t[3],1):(t=th.exec(e))?new tT(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=td.exec(e))?tx(t[1],t[2],t[3],t[4]):(t=tv.exec(e))?tx(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=tf.exec(e))?tM(t[1],t[2]/100,t[3]/100,1):(t=tp.exec(e))?tM(t[1],t[2]/100,t[3]/100,t[4]):tg.hasOwnProperty(e)?tE(tg[e]):"transparent"===e?new tT(NaN,NaN,NaN,0):null}function tE(e){return new tT(e>>16&255,e>>8&255,255&e,1)}function tx(e,t,n,i){return i<=0&&(e=t=n=NaN),new tT(e,t,n,i)}function tT(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}function tb(){return`#${tP(this.r)}${tP(this.g)}${tP(this.b)}`}function tS(){let e=tw(this.opacity);return`${1===e?"rgb(":"rgba("}${tN(this.r)}, ${tN(this.g)}, ${tN(this.b)}${1===e?")":`, ${e})`}`}function tw(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function tN(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function tP(e){return((e=tN(e))<16?"0":"")+e.toString(16)}function tM(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new tA(e,t,n,i)}function tC(e){if(e instanceof tA)return new tA(e.h,e.s,e.l,e.opacity);if(e instanceof ta||(e=tk(e)),!e)return new tA;if(e instanceof tA)return e;var t=(e=e.rgb()).r/255,n=e.g/255,i=e.b/255,r=Math.min(t,n,i),a=Math.max(t,n,i),o=NaN,s=a-r,l=(a+r)/2;return s?(o=t===a?(n-i)/s+(n<i)*6:n===a?(i-t)/s+2:(t-n)/s+4,s/=l<.5?a+r:2-a-r,o*=60):s=l>0&&l<1?0:o,new tA(o,s,l,e.opacity)}function tA(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}function tR(e){return(e=(e||0)%360)<0?e+360:e}function tZ(e){return Math.max(0,Math.min(1,e||0))}function tL(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}function tO(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){for(var i=arguments.length,r=Array(i),a=0;a<i;a++)r[a]=arguments[a];var o=t?t.apply(this,r):r[0],s=n.cache;if(s.has(o))return s.get(o);var l=e.apply(this,r);return n.cache=s.set(o,l)||s,l};return n.cache=new(tO.Cache||Map),tO.cacheList.push(n.cache),n}ti(ta,tk,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ty,formatHex:ty,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return tC(this).formatHsl()},formatRgb:tm,toString:tm}),ti(tT,function(e,t,n,i){var r;return 1==arguments.length?((r=e)instanceof ta||(r=tk(r)),r)?new tT((r=r.rgb()).r,r.g,r.b,r.opacity):new tT:new tT(e,t,n,null==i?1:i)},tr(ta,{brighter(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new tT(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new tT(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new tT(tN(this.r),tN(this.g),tN(this.b),tw(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:tb,formatHex:tb,formatHex8:function(){return`#${tP(this.r)}${tP(this.g)}${tP(this.b)}${tP((isNaN(this.opacity)?1:this.opacity)*255)}`},formatRgb:tS,toString:tS})),ti(tA,function(e,t,n,i){return 1==arguments.length?tC(e):new tA(e,t,n,null==i?1:i)},tr(ta,{brighter(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new tA(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new tA(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,r=2*n-i;return new tT(tL(e>=240?e-240:e+120,r,i),tL(e,r,i),tL(e<120?e+240:e-120,r,i),this.opacity)},clamp(){return new tA(tR(this.h),tZ(this.s),tZ(this.l),tw(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(){let e=tw(this.opacity);return`${1===e?"hsl(":"hsla("}${tR(this.h)}, ${100*tZ(this.s)}%, ${100*tZ(this.l)}%${1===e?")":`, ${e})`}`}})),tO.Cache=Map,tO.cacheList=[],tO.clearCache=function(){tO.cacheList.forEach(function(e){return e.clear()})};var tI=((d={})[d.kUnknown=0]="kUnknown",d[d.kNumber=1]="kNumber",d[d.kPercentage=2]="kPercentage",d[d.kEms=3]="kEms",d[d.kPixels=4]="kPixels",d[d.kRems=5]="k
1Rems",d[d.kDegrees=6]="kDegrees",d[d.kRadians=7]="kRadians",d[d.kGradians=8]="kGradians",d[d.kTurns=9]="kTurns",d[d.kMilliseconds=10]="kMilliseconds",d[d.kSeconds=11]="kSeconds",d[d.kInteger=12]="kInteger",d),tD=((v={})[v.kUNumber=0]="kUNumber",v[v.kUPercent=1]="kUPercent",v[v.kULength=2]="kULength",v[v.kUAngle=3]="kUAngle",v[v.kUTime=4]="kUTime",v[v.kUOther=5]="kUOther",v),tG=((f={})[f.kYes=0]="kYes",f[f.kNo=1]="kNo",f),t_=((p={})[p.kYes=0]="kYes",p[p.kNo=1]="kNo",p),tF=[{name:"em",unit_type:tI.kEms},{name:"px",unit_type:tI.kPixels},{name:"deg",unit_type:tI.kDegrees},{name:"rad",unit_type:tI.kRadians},{name:"grad",unit_type:tI.kGradians},{name:"ms",unit_type:tI.kMilliseconds},{name:"s",unit_type:tI.kSeconds},{name:"rem",unit_type:tI.kRems},{name:"turn",unit_type:tI.kTurns}],tU=((g={})[g.kUnknownType=0]="kUnknownType",g[g.kUnparsedType=1]="kUnparsedType",g[g.kKeywordType=2]="kKeywordType",g[g.kUnitType=3]="kUnitType",g[g.kSumType=4]="kSumType",g[g.kProductType=5]="kProductType",g[g.kNegateType=6]="kNegateType",g[g.kInvertType=7]="kInvertType",g[g.kMinType=8]="kMinType",g[g.kMaxType=9]="kMaxType",g[g.kClampType=10]="kClampType",g[g.kTransformType=11]="kTransformType",g[g.kPositionType=12]="kPositionType",g[g.kURLImageType=13]="kURLImageType",g[g.kColorType=14]="kColorType",g[g.kUnsupportedColorType=15]="kUnsupportedColorType",g),tB=function(e){switch(e){case tI.kNumber:case tI.kInteger:return tD.kUNumber;case tI.kPercentage:return tD.kUPercent;case tI.kPixels:return tD.kULength;case tI.kMilliseconds:case tI.kSeconds:return tD.kUTime;case tI.kDegrees:case tI.kRadians:case tI.kGradians:case tI.kTurns:return tD.kUAngle;default:return tD.kUOther}},tV=function(e){switch(e){case tD.kUNumber:return tI.kNumber;case tD.kULength:return tI.kPixels;case tD.kUPercent:return tI.kPercentage;case tD.kUTime:return tI.kSeconds;case tD.kUAngle:return tI.kDegrees;default:return tI.kUnknown}},tz=function(e){var t=1;switch(e){case tI.kPixels:case tI.kDegrees:case tI.kSeconds:break;case tI.kMilliseconds:t=.001;break;case tI.kRadians:t=180/Math.PI;break;case tI.kGradians:t=.9;break;case tI.kTurns:t=360}return t},tH=function(e){switch(e){case tI.kNumber:case tI.kInteger:break;case tI.kPercentage:return"%";case tI.kEms:return"em";case tI.kRems:return"rem";case tI.kPixels:return"px";case tI.kDegrees:return"deg";case tI.kRadians:return"rad";case tI.kGradians:return"grad";case tI.kMilliseconds:return"ms";case tI.kSeconds:return"s";case tI.kTurns:return"turn"}return""},tY=(0,Z.Z)(function e(){(0,R.Z)(this,e)},[{key:"toString",value:function(){return this.buildCSSText(tG.kNo,t_.kNo,"")}},{key:"isNumericValue",value:function(){return this.getType()>=tU.kUnitType&&this.getType()<=tU.kClampType}}],[{key:"isAngle",value:function(e){return e===tI.kDegrees||e===tI.kRadians||e===tI.kGradians||e===tI.kTurns}},{key:"isLength",value:function(e){return e>=tI.kEms&&e<tI.kDegrees}},{key:"isRelativeUnit",value:function(e){return e===tI.kPercentage||e===tI.kEms||e===tI.kRems}},{key:"isTime",value:function(e){return e===tI.kSeconds||e===tI.kMilliseconds}}]),tW=function(e){function t(e){var n;
1return(0,R.Z)(this,t),(n=(0,O.Z)(this,t)).colorSpace=e,n}return(0,I.Z)(t,e),(0,Z.Z)(t,[{key:"getType",value:function(){return tU.kColorType}},{key:"to",value:function(e){return this}}])}(tY),tX=((y={})[y.Constant=0]="Constant",y[y.LinearGradient=1]="LinearGradient",y[y.RadialGradient=2]="RadialGradient",y),tj=function(e){function t(e,n){var i;return(0,R.Z)(this,t),(i=(0,O.Z)(this,t)).type=e,i.value=n,i}return(0,I.Z)(t,e),(0,Z.Z)(t,[{key:"clone",value:function(){return new t(this.type,this.value)}},{key:"buildCSSText",value:function(e,t,n){return n}},{key:"getType",value:function(){return tU.kColorType}}])}(tY),t$=function(e){function t(e){var n;return(0,R.Z)(this,t),(n=(0,O.Z)(this,t)).value=e,n}return(0,I.Z)(t,e),(0,Z.Z)(t,[{key:"clone",value:function(){return new t(this.value)}},{key:"getType",value:function(){return tU.kKeywordType}},{key:"buildCSSText",value:function(e,t,n){return n+this.value}}])}(tY),tq=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(Number.isFinite(e)?"NaN":e>0?"infinity":"-infinity")+t},tK=function(e){return tV(tB(e))},tJ=function(e){function t(e){var n,i,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tI.kNumber;return(0,R.Z)(this,t),i=(0,O.Z)(this,t),r="string"==typeof a?(n=a)?"number"===n?tI.kNumber:"percent"===n||"%"===n?tI.kPercentage:tF.find(function(e){return e.name===n}).unit_type:tI.kUnknown:a,i.unit=r,i.value=e,i}return(0,I.Z)(t,e),(0,Z.Z)(t,[{key:"clone",value:function(){return new t(this.value,this.unit)}},{key:"equals",value:function(e){return this.value===e.value&&this.unit===e.unit}},{key:"getType",value:function(){return tU.kUnitType}},{key:"convertTo",value:function(e){if(this.unit===e)return new t(this.value,this.unit);var n=tK(this.unit);if(n!==tK(e)||n===tI.kUnknown)return null;var i=tz(this.unit)/tz(e);return new t(this.value*i,e)}},{key:"buildCSSText",value:function(e,t,n){var i;switch(this.unit){case tI.kUnknown:break;case tI.kInteger:i=Number(this.value).toFixed(0);break;case tI.kNumber:case tI.kPercentage:case tI.kEms:case tI.kRems:case tI.kPixels:case tI.kDegrees:case tI.kRadians:case tI.kGradians:case tI.kMilliseconds:case tI.kSeconds:case tI.kTurns:var r=this.value,a=tH(this.unit);if(r<-999999||r>999999){var o=tH(this.unit);i=!Number.isFinite(r)||Number.isNaN(r)?tq(r,o):r+(o||"")}else i="".concat(r).concat(a)}return n+i}}])}(tY),tQ=new tJ(0,"px");new tJ(1,"px");var t0=new tJ(0,"deg"),t1=function(e){function t(e,n,i){var r,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return(0,R.Z)(this,t),(r=(0,O.Z)(this,t,["rgb"])).r=e,r.g=n,r.b=i,r.alpha=a,r.isNone=o,r}return(0,I.Z)(t,e),(0,Z.Z)(t,[{key:"clone",value:function(){return new t(this.r,this.g,this.b,this.alpha)}},{key:"buildCSSText",value:function(e,t,n){return"".concat(n,"rgba(").concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")}}])}(tW),t2=new t$("unset"),t3={"":t2,unset:t2,initial:new t$("initial"),inherit:new t$("inherit")},t5=new t1(0,0,0,0,!0),t4=new t1(0,0,0,0),t6=tO(function(e,t,n,i){return new t1(e,t,n,i)},function(e,t,n,i){return"rgba(".concat(e,",").concat(t,",").concat(n,",").concat(i,")")}),t7=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tI.kNumber;return new tJ(e,t)};new tJ(50,"%");var t8=function(){var e={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},t="";function n(e){throw Error("".concat(t,": ").concat(e))}function i(){return r("linear-gradient",e.linearGradient,o)||r("repeating-linear-gradient",e.repeatingLinearGradient,o)||r("radial-gradient",e.radialGradient,s)||r("repeating-radial-gradient",e.repeatingRadialGradient,s)||r("conic-gradient",e.conicGradient,s)}function r(t,i,r){return a(i,function(i){var a=r();return a&&!m(e.comma)&&n("Missing comma before color stops"),{type:t,orientation:a,colorStops:d(v)}})}function a(t,i){var r=m(t);if(r){m(e.startCall)||n("Missing (");var a=i(r);return m(e.endCall)||n("Missing )"),a}}function o(){return y("directional",e.sideOrCorner,1)||y("angular",e.angleValue,1)}function s(){var n,i,r=l();return r&&((n=[]).push(r),i=t,m(e.comma)&&((r=l())?n.push(r):t=i)),n}function l(){var e,t,n=((e=y("shape",/^(circle)/i,0))&&(e.style=g()||u()),e||((t=y("shape",/^(ellipse)/i,0))&&(t.style=p()||u()),t));if(n)n.at=c();else{var i=u();if(i){n=i;var r=c();r&&(n.at=r)}else{var a=h();a&&(n={type:"default-radial",at:a})}}return n}function u(){return y("extent-keyword",e.extentKeywords,1)}function c(){if(y("position",/^at/,0)){var e=h();return e||n("Missing positioning value"),e}}function h(){var e={x:p(),y:p()};if(e.x||e.y)return{type:"position",value:e}}function d(t){var i=t(),r=[];if(i)for(r.push(i);m(e.comma);)(i=t())?r.push(i):n("One extra comma");return r}function v(){var t=y("hex",e.hexColor,1)||a(e.rgbaColor,function(){return{type:"rgba",value:d(f)}})||a(e.rgbColor,function(){return{type:"rgb",value:d(f)}})||y("literal",e.literalColor,0);return t||n("Expected color definition"),t.length=p(),t}function f(){return m(e.number)[1]}function p(){return y("%",e.percentageValue,1)||y("position-keyword",e.positionKeywords,1)||g()}function g(){return y("px",e.pixelValue,1)||y("em",e.emValue,1)}function y(e,t,n){var i=m(t);if(i)return{type:e,value:i[n]}}function m(e){var n=/^[\n\r\t\s]+/.exec(t);n&&k(n[0].length);var i=e.exec(t);return i&&k(i[0].length),i}function k(e){t=t.substring(e)}return function(e){var r;return t=e,r=d(i),t.length>0&&n("Invalid input not EOF"),r}}(),t9=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,ne=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,nt=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,nn=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,ni={left:180,top:-90,bottom:90,right:0,"left top":225,"top left"
1:225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},nr=tO(function(e){return t7("angular"===e.type?Number(e.value):ni[e.value]||0,"deg")}),na=tO(function(e){var t=50,n=50,i="%",r="%";if((null==e?void 0:e.type)==="position"){var a=e.value,o=a.x,s=a.y;(null==o?void 0:o.type)==="position-keyword"&&("left"===o.value?t=0:"center"===o.value?t=50:"right"===o.value?t=100:"top"===o.value?n=0:"bottom"===o.value&&(n=100)),(null==s?void 0:s.type)==="position-keyword"&&("left"===s.value?t=0:"center"===s.value?n=50:"right"===s.value?t=100:"top"===s.value?n=0:"bottom"===s.value&&(n=100)),((null==o?void 0:o.type)==="px"||(null==o?void 0:o.type)==="%"||(null==o?void 0:o.type)==="em")&&(i=null==o?void 0:o.type,t=Number(o.value)),((null==s?void 0:s.type)==="px"||(null==s?void 0:s.type)==="%"||(null==s?void 0:s.type)==="em")&&(r=null==s?void 0:s.type,n=Number(s.value))}return{cx:t7(t,i),cy:t7(n,r)}}),no=tO(function(e){if(e.indexOf("linear")>-1||e.indexOf("radial")>-1)return t8(e).map(function(e){var t=e.type,n=e.orientation,i=e.colorStops;!function(e){var t=e.length;e[t-1].length=null!==(a=e[t-1].length)&&void 0!==a?a:{type:"%",value:"100"},t>1&&(e[0].length=null!==(o=e[0].length)&&void 0!==o?o:{type:"%",value:"0"});for(var n=0,i=Number(e[0].length.value),r=1;r<t;r++){var a,o,s,l=null===(s=e[r].length)||void 0===s?void 0:s.value;if(!(0,W.Z)(l)&&!(0,W.Z)(i)){for(var u=1;u<r-n;u++)e[n+u].length={type:"%",value:"".concat(i+(Number(l)-i)*u/(r-n))};n=r,i=Number(l)}}}(i);var r=i.map(function(e){var t,n;return{offset:t7(Number(e.length.value),"%"),color:(t=e.type,n=e.value,"hex"===t?"#".concat(n):"literal"
1===t?n:"rgb"===t?"rgb(".concat(n.join(","),")"):"rgba(".concat(n.join(","),")"))}});if("linear-gradient"===t)return new tj(tX.LinearGradient,{angle:n?nr(n):t0,steps:r});if("radial-gradient"===t&&(n||(n=[{type:"shape",value:"circle"}]),"shape"===n[0].type&&"circle"===n[0].value)){var a,o=na(n[0].at),s=o.cx,l=o.cy;if(n[0].style){var u=n[0].style,c=u.type,h=u.value;"extent-keyword"===c?(t3[h]||(t3[h]=new t$(h)),a=t3[h]):a=t7(h,c)}return new tj(tX.RadialGradient,{cx:s,cy:l,size:a,steps:r})}});var t=e[0];if("("===e[1]||"("===e[2]){if("l"===t){var n=t9.exec(e);if(n){var i,r=(null===(i=n[2].match(nn))||void 0===i?void 0:i.map(function(e){return e.split(":")}))||[];return[new tj(tX.LinearGradient,{angle:t7(parseFloat(n[1]),"deg"),steps:r.map(function(e){var t=(0,D.Z)(e,2),n=t[0],i=t[1];return{offset:t7(100*Number(n),"%"),color:i}})})]}}else if("r"===t){var a=function(e){var t=ne.exec(e);if(t){var n,i=(null===(n=t[4].match(nn))||void 0===n?void 0:n.map(function(e){return e.split(":")}))||[];return{cx:t7(50,"%"),cy:t7(50,"%"),steps:i.map(function(e){var t=(0,D.Z)(e,2),n=t[0],i=t[1];return{offset:t7(100*Number(n),"%"),color:i}})}}return null}(e);if(a){if(!(0,X.Z)(a))return[new tj(tX.RadialGradient,a)];e=a}}else if("p"===t)return function(e){var t=nt.exec(e);if(t){var n=t[1],i=t[2];switch(n){case"a":n="repeat";break;case"x":n="repeat-x";break;case"y":n="repeat-y";break;default:n="no-repeat"}return{image:i,repetition:n}}return null}(e)}});function ns(e){return e&&!!e.image}function nl(e){return e&&!(0,W.Z)(e.r)&&!(0,W.Z)(e.g)&&!(0,W.Z)(e.b)}var nu=tO(function(e){if(ns(e))return(0,A.Z)({repetition:"repeat"},e);if((0,W.Z)(e)&&(e=""),"transparent"===e)return t4;if("currentColor"===e)e="black";else if("none"===e)return t5;var t=no(e);if(t)return t;var n=tk(e),i=[0,0,0,0];return null!==n&&(i[0]=n.r||0,i[1]=n.g||0,i[2]=n.b||0,i[3]=n.opacity),t6.apply(void 0,i)});function nc(e,t){if(nl(e)&&nl(t))return[[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],function(e){var t=e.slice();if(t[3])for(var n=0;n<3;n++)t[n]=Math.round((0,j.Z)(t[n],0,255));return t[3]=(0,j.Z)(t[3],0,1),"rgba(".concat(t.join(","),")")}]}function nh(e,t){if((0,W.Z)(t))return t7(0,"px");if(isFinite(Number(t="".concat(t).trim().toLowerCase()))){if("px".search(e)>=0)return t7(Number(t),"px");if("deg".search(e)>=0)return t7(Number(t),"deg")}var n=[];t=t.replace(e,function(e){return n.push(e),"U".concat(e)});var i="U(".concat(e.source,")");return n.map(function(e){return t7(Number(t.replace(RegExp("U".concat(e),"g"),"").replace(RegExp(i,"g"),"*0")),e)})[0]}var nd=function(e){return nh(/px/g,e)},nv=tO(nd);tO(function(e){return nh(RegExp("%","g"),e)});var nf=function(e){return(0,H.Z)(e)||isFinite(Number(e))?t7(Number(e)||0,"px"):nh(RegExp("px|%|em|rem","g"),e)},np=tO(nf),ng=function(e){return nh(RegExp("deg|rad|grad|turn","g"),e)},ny=tO(ng);function nm(e){var t=0;return e.unit===tI.kDegrees?t=e.value:e.unit===tI.kRadians?t=Number(e.value)*eH:e.unit===tI.kTurns?t=360*Number(e.value):e.value&&(t=e.value),t}function nk(e,t){var n;return(Array.isArray(e)?n=e.map(function(e){return Number(e)}):(0,X.Z)(e)?n=e.split(" ").map(function(e){return Number(e)}):(0,H.Z)(e)&&(n=[e]),2===t)?1===n.length?[n[0],n[0]]:[n[0],n[1]]:4===t?1===n.length?[n[0],n[0],n[0],n[0]]:2===n.length?[n[0],n[1],n[0],n[1]]:3===n.length?[n[0],n[1],n[2],n[1]]:[n[0],n[1],n[2],n[3]]:"even"===t&&n.length%2==1?[].concat((0,L.Z)(n),(0,L.Z)(n)):n}function nE(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(e.unit===tI.kPixels)return Number(e.value);if(e.unit===tI.kPercentage&&n){var r=n.nodeName===ex.GROUP?n.getLocalBounds():n.getGeometryBounds();return(i?r.min[t]:0)+e.value/100*r.halfExtents[t]*2}return 0}var nx=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function nT(e){return e.toString()}var nb=function(e){return"number"==typeof e?t7(e):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(e)?t7(Number(e)):t7(0)},nS=tO(nb);function nw(e,t){return[e,t,nT]}function nN(e,t){return function(n,i){return[n,i,function(n){return nT((0,j.Z)(n,e,t))}]}}function nP(e,t){if(e.length===t.length)return[e,t,function(e){return e}]}function nM(e){return 0===e.parsedStyle.d.totalLength&&(e.parsedStyle.d.totalLength=(0,$.D)(e.parsedStyle.d.absolutePath)),e.parsedStyle.d.totalLength}function nC(e,t){return e[0]===t[0]&&e[1]===t[1]}function nA(e,t){var n=e.prePoint,i=e.currentPoint,r=e.nextPoint,a=Math.pow(i[0]-n[0],2)+Math.pow(i[1]-n[1],2),o=Math.pow(i[0]-r[0],2)+Math.pow(i[1]-r[1],2),s=Math.acos((a+o-(Math.pow(n[0]-r[0],2)+Math.pow(n[1]-r[1],2)))/(2*Math.sqrt(a)*Math.sqrt(o)));if(!s||0===Math.sin(s)||(0,J.Z)(s,0))return{xExtra:0,yExtra:0};var l=Math.abs(Math.atan2(r[1]-i[1],r[0]-i[0])),u=Math.abs(Math.atan2(r[0]-i[0],r[1]-i[1]));return{xExtra:t/2*(1/Math.sin(s/2))*Math.cos(s/2-(l=l>Math.PI/2?Math.PI-l:l))-t/2||0,yExtra:t/2*(1/Math.sin(s/2))*Math.cos((u=u>Math.PI/2?Math.PI-u:u)-s/2)-t/2||0}}function nR(e,t){return[t[0]+(t[0]-e[0]),t[1]+(t[1]-e[1])]}tO(function(e){return(0,X.Z)(e)?e.split(" ").map(nS):e.map(nS)});var nZ=function(e,t){var n=e.x*t.x+e.y*t.y,i=Math.sqrt((Math.pow(e.x,2)+Math.pow(e.y,2))*(Math.pow(t.x,2)+Math.pow(t.y,2)));return(e.x*t.y-e.y*t.x<0?-1:1)*Math.acos(n/i)},nL=function(e,t,n,i,r,a,o,s){t=Math.abs(t),n=Math.abs(n);var l=(i=(0,Q.Z)(i,360))*eV;if(e.x===o.x&&e.y===o.y)return{x:e.x,y:e.y,ellipticalArcAngle:0};if(0===t||0===n)return{x:0,y:0,ellipticalArcAngle:0};var u=(e.x-o.x)/2,c=(e.y-o.y)/2,h={x:Math.cos(l)*u+Math.sin(l)*c,y:-Math.sin(l)*u+Math.cos(l)*c},d=Math.pow(h.x,2)/Math.pow(t,2)+Math.pow(h.y,2)/Math.pow(n,2);d>1&&(t*=Math.sqrt(d),n*=Math.sqrt(d));var v=(Math.pow(t,2)*Math.pow(n,2)-Math.pow(t,2)*Math.pow(h.y,2)-Math.pow(n,2)*Math.pow(h.x,2))/(Math.pow(t,2)*Math.pow(h.y,2)+Math.pow(n,2)*Math.pow(h.x,2)),f=(r!==a?1:-1)*Math.sqrt(v=v<0?0:v),p={x:t*h.y/n*f,y:-(n*h.x)/t*f},g={x:Math.cos(l)*p.x-Math.sin(l)*p.y+(e.x+o.x)/2,y:Math.sin(l)*p.x+Math.cos(l)*p.y+(e.y+o.y)/2},y={x:(h.x-p.x)/t,y:(h.y-p.y)/n},m=nZ({x:1,y:0},y),k=nZ(y,{x:(-h.x-p.x)/t,y:(-h.y-p.y)/n});!a&&k>0?k-=2*Math.PI:a&&k<0&&(k+=2*Math.PI);var E=m+(k%=2*Math.PI)*s,x=t*Math.cos(E),T=n*Math.sin(E);return{x:Math.cos(l)*x-Math.sin(l)*T+g.x,y:Math.sin(l)*x+Math.cos(l)*T+g.y,ellipticalArcStartAngle:m,ellipticalArcEndAngle:m+k,ellipticalArcAngle:E,ellipticalArcCenter:g,resultantRx:t,resultantRy:n}};function nO(e,t){var n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],i=e.arcParams,r=i.rx,a=void 0===r?0:r,o=i.ry,s=void 0===o?0:o,l=i.xRotation,u=i.arcFlag,c=i.sweepFlag,h=nL({x:e.prePoint[0],y:e.prePoint[1]},a,s,l,!!u,!!c,{x:e.currentPoint[0],y:e.currentPoint[1]},t),d=nL({x:e.prePoint[0],y:e.prePoint[1]},a,s,l,!!u,!!c,{x:e.currentPoint[0],y:e.currentPoint[1]},n?t+.005:t-.005),v=d.x-h.x,f=d.y-h.y,p=Math.sqrt(v*v+f*f);return{x:-v/p,y:-f/p}}function nI(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function nD(e,t){return nI(e)*nI(t)?(e[0]*t[0]+e[1]*t[1])/(nI(e)*nI(t)):1}function nG(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(nD(e,t))}function n_(e,t,n,i){var r=(-1+Math.sqrt(2))/3*4,a=e*r,o=t*r,s=n-e,l=n+e,u=i-t,c=i+t;
1return[["M",s,i],["C",s,i-o,n-a,u,n,u],["C",n+a,u,l,i-o,l,i],["C",l,i+o,n+a,c,n,c],["C",n-a,c,s,i+o,s,i],["Z"]]}function nF(e){var t,n,i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.getLocalTransform(),a=[];switch(e.nodeName){case ex.LINE:var o=e.parsedStyle,s=o.x1,l=o.y1,u=o.x2,c=o.y2;a=[["M",void 0===s?0:s,void 0===l?0:l],["L",void 0===u?0:u,void 0===c?0:c]];break;case ex.CIRCLE:var h=e.parsedStyle,d=h.r,v=void 0===d?0:d,f=h.cx,p=h.cy;a=n_(v,v,void 0===f?0:f,void 0===p?0:p);break;case ex.ELLIPSE:var g=e.parsedStyle,y=g.rx,m=g.ry,k=g.cx,E=g.cy;a=n_(void 0===y?0:y,void 0===m?0:m,void 0===k?0:k,void 0===E?0:E);break;case ex.POLYLINE:case ex.POLYGON:t=e.parsedStyle.points.points,n=e.nodeName===ex.POLYGON,i=t.map(function(e,t){return[0===t?"M":"L",e[0],e[1]]}),n&&i.push(["Z"]),a=i;break;case ex.RECT:var x=e.parsedStyle,T=x.width,b=void 0===T?0:T,S=x.height,w=void 0===S?0:S,N=x.x,P=x.y,M=x.radius;a=function(e,t,n,i,r){if(r){var a=(0,D.Z)(r,4),o=a[0],s=a[1],l=a[2],u=a[3],c=e>0?1:-1,h=t>0?1:-1,d=c+h!==0?1:0;return[["M",c*o+n,i],["L",e-c*s+n,i],s?["A",s,s,0,0,d,e+n,h*s+i]:null,["L",e+n,t-h*l+i],l?["A",l,l,0,0,d,e+n-c*l,t+i]:null,["L",n+c*u,t+i],u?["A",u,u,0,0,d,n,t+i-h*u]:null,["L",n,h*o+i],o?["A",o,o,0,0,d,c*o+n,i]:null,["Z"]].filter(function(e){return e})}return[["M",n,i],["L",n+e,i],["L",n+e,i+t],["L",n,i+t],["Z"]]}(b,w,void 0===N?0:N,void 0===P?0:P,M&&M.some(function(e){return 0!==e})&&M.map(function(e){return(0,j.Z)(e,0,Math.min(Math.abs(b)/2,Math.abs(w)/2))}));break;case ex.PATH:var C=e.parsedStyle.d.absolutePath;a=(0,L.Z)(C)}if(a.length)return a.reduce(function(e,t){var n="";if("M"===t[0]||"L"===t[0]){var i=_.al(t[1],t[2],0);r&&_.fF(i,i,r),n="".concat(t[0]).concat(i[0],",").concat(i[1])}else if("Z"===t[0])n=t[0];else if("C"===t[0]){var a=_.al(t[1],t[2],0),o=_.al(t[3],t[4],0),s=_.al(t[5],t[6],0);r&&(_.fF(a,a,r),_.fF(o,o,r),_.fF(s,s,r)),n="".concat(t[0]).concat(a[0],",").concat(a[1],",").concat(o[0],",").concat(o[1],",").concat(s[0],",").concat(s[1])}else if("A"===t[0]){var l=_.al(t[6],t[7],0);r&&_.fF(l,l,r),n="".concat(t[0]).concat(t[1],",").concat(t[2],",").concat(t[3],",").concat(t[4],",").concat(t[5],",").concat(l[0],",").concat(l[1])}else if("Q"===t[0]){var u=_.al(t[1],t[2],0),c=_.al(t[3],t[4],0);r&&(_.fF(u,u,r),_.fF(c,c,r)),n="".concat(t[0]).concat(t[1],",").concat(t[2],",").concat(t[3],",").concat(t[4],"}")}return e+n},"")}var nU=function(e){if(""===e||Array.isArray(e)&&0===e.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};try{t=(0,ee.A)(e)}catch(n){t=(0,ee.A)(""),console.error("[g]: Invalid SVG Path definition: ".concat(e))}!function(e){for(var t=0;t<e.length;t++){var n=e[t-1],i=e[t];if("M"===i[0]&&n){var r=n[0],a=[i[1],i[2]],o=void 0;"L"===r||"M"===r?o=[n[1],n[2]]:("C"===r||"A"===r||"Q"===r)&&(o=[n[n.length-2],n[n.length-1]]),o&&nC(a,o)&&(e.splice(t,1),t--)}}}(t);var t,n=function(e){for(var t=!1,n=e.length,i=0;i<n;i++){var r=e[i][0];if("C"===r||"A"===r||"Q"===r){t=!0;break}}return t}(t),i=function(e){for(var t=[],n=[],i=[],r=0;r<e.length;r++){var a=e[r],o=a[0];"M"===o?(i.length&&(n.push(i),i=[]),i.push([a[1],a[2]])):"Z"===o?i.length&&(t.push(i),i=[]):i.push([a[1],a[2]])}return i.length>0&&n.push(i),{polygons:t,polylines:n}}(t),r=i.polygons,a=i.polylines,o=function(e){for(var t=[],n=null,i=null,r=null,a=0,o=e.length,s=0;s<o;s++){var l=e[s];i=e[s+1];var u=l[0],c={command:u,prePoint:n,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(u){case"M":r=[l[1],l[2]],a=s;break;case"A":var h=function(e,t){var n=t[1],i=t[2],r=(0,Q.Z)(t[3]*eV,2*Math.PI),a=t[4],o=t[5],s=e[0],l=e[1],u=t[6],c=t[7],h=Math.cos(r)*(s-u)/2+Math.sin(r)*(l-c)/2,d=-1*Math.sin(r)*(s-u)/2+Math.cos(r)*(l-c)/2,v=h*h/(n*n)+d*d/(i*i);v>1&&(n*=Math.sqrt(v),i*=Math.sqrt(v));var f=n*n*(d*d)+i*i*(h*h),p=f?Math.sqrt((n*n*(i*i)-f)/f):1;a===o&&(p*=-1),isNaN(p)&&(p=0);var g=i?p*n*d/i:0,y=n?-(p*i)*h/n:0,m=(s+u)/2+Math.cos(r)*g-Math.sin(r)*y,k=(l+c)/2+Math.sin(r)*g+Math.cos(r)*y,E=[(h-g)/n,(d-y)/i],x=[(-1*h-g)/n,(-1*d-y)/i],T=nG([1,0],E),b=nG(E,x);return -1>=nD(E,x)&&(b=Math.PI),nD(E,x)>=1&&(b=0),0===o&&b>0&&(b-=2*Math.PI),1===o&&b<0&&(b+=2*Math.PI),{cx:m,cy:k,rx:nC(e,[u,c])?0:n,ry:nC(e,[u,c])?0:i,startAngle:T,endAngle:T+b,xRotation:r,arcFlag:a,sweepFlag:o}}(n,l);c.arcParams=h}if("Z"===u)n=r,i=e[a+1];else{var d=l.length;n=[l[d-2],l[d-1]]}i&&"Z"===i[0]&&(i=e[a],t[a]&&(t[a].prePoint=n)),c.currentPoint=n,t[a]&&nC(n,t[a].currentPoint)&&(t[a].prePoint=c.prePoint);var v=i?[i[i.length-2],i[i.length-1]]:null;c.nextPoint=v;var f=c.prePoint;if(["L","H","V"].includes(u))c.startTangent=[f[0]-n[0],f[1]-n[1]],c.endTangent=[n[0]-f[0],n[1]-f[1]];else if("Q"===u){var p=[l[1],l[2]];
1c.startTangent=[f[0]-p[0],f[1]-p[1]],c.endTangent=[n[0]-p[0],n[1]-p[1]]}else if("T"===u){var g=t[s-1],y=nR(g.currentPoint,f);"Q"===g.command?(c.command="Q",c.startTangent=[f[0]-y[0],f[1]-y[1]],c.endTangent=[n[0]-y[0],n[1]-y[1]]):(c.command="TL",c.startTangent=[f[0]-n[0],f[1]-n[1]],c.endTangent=[n[0]-f[0],n[1]-f[1]])}else if("C"===u){var m=[l[1],l[2]],k=[l[3],l[4]];c.startTangent=[f[0]-m[0],f[1]-m[1]],c.endTangent=[n[0]-k[0],n[1]-k[1]],0===c.startTangent[0]&&0===c.startTangent[1]&&(c.startTangent=[m[0]-k[0],m[1]-k[1]]),0===c.endTangent[0]&&0===c.endTangent[1]&&(c.endTangent=[k[0]-m[0],k[1]-m[1]])}else if("S"===u){var E=t[s-1],x=nR(E.currentPoint,f),T=[l[1],l[2]];"C"===E.command?(c.command="C",c.startTangent=[f[0]-x[0],f[1]-x[1]]):(c.command="SQ",c.startTangent=[f[0]-T[0],f[1]-T[1]]),c.endTangent=[n[0]-T[0],n[1]-T[1]]}else if("A"===u){var b=nO(c,0),S=b.x,w=b.y,N=nO(c,1,!1),P=N.x,M=N.y;c.startTangent=[S,w],c.endTangent=[P,M]}t.push(c)}return t}(t),s=function(e,t){for(var n=[],i=[],r=[],a=0;a<e.length;a++){var o=e[a],s=o.currentPoint,l=o.params,u=o.prePoint,c=void 0;switch(o.command){case"Q":c=(0,eg.x4)(u[0],u[1],l[1],l[2],l[3],l[4]);break;case"C":c=(0,eg.l5)(u[0],u[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var h=o.arcParams;c=(0,eg.vp)(h.cx,h.cy,h.rx,h.ry,h.xRotation,h.startAngle,h.endAngle);break;default:n.push(s[0]),i.push(s[1])}c&&(o.box=c,n.push(c.x,c.x+c.width),i.push(c.y,c.y+c.height))}n=n.filter(function(e){return!Number.isNaN(e)&&e!==1/0&&e!==-1/0}),i=i.filter(function(e){return!Number.isNaN(e)&&e!==1/0&&e!==-1/0});var d=(0,q.Z)(n),v=(0,q.Z)(i),f=(0,K.Z)(n),p=(0,K.Z)(i);if(0===r.length)return{x:d,y:v,width:f-d,height:p-v};for(var g=0;g<r.length;g++){var y=r[g],m=y.currentPoint;m[0]===d?d-=nA(y,0).xExtra:m[0]===f&&(f+=nA(y,0).xExtra),m[1]===v?v-=nA(y,t).yExtra:m[1]===p&&(p+=nA(y,t).yExtra)}return{x:d,y:v,width:f-d,height:p-v}}(o,0),l=s.x,u=s.y,c=s.width,h=s.height;return{absolutePath:t,hasArc:n,segments:o,polygons:r,polylines:a,totalLength:0,rect:{x:Number.isFinite(l)?l:0,y:Number.isFinite(u)?u:0,width:Number.isFinite(c)?c:0,height:Number.isFinite(h)?h:0}}},nB=tO(nU);function nV(e){return(0,X.Z)(e)?nB(e):nU(e)}function nz(e,t,n){var i=e.curve,r=t.curve;i&&0!==i.length||(i=(0,et.Y)(e.absolutePath,!1),e.curve=i),r&&0!==r.length||(r=(0,et.Y)(t.absolutePath,!1),t.curve=r);var a=[i,r];i.length!==r.length&&(a=(0,en.x)(i,r));var o=(0,ei.b)(a[0])!==(0,ei.b)(a[1])?(0,er.G)(a[0]):(0,ea.U)(a[0]);return[o,(0,eo.g)(a[1],o),function(e){return e}]}function nH(e,t){return[e.points,t.points,function(e){return e}]}var nY=/\s*(\w+)\(([^)]*)\)/g;function nW(e){return function(t){var n=0;return e.map(function(e){return null===e?t[n++]:e})}}function nX(e){return e}var nj={matrix:["NNNNNN",[null,null,0,0,null,null,0,0,0,0,1,0,null,null,0,1],nX],matrix3d:["NNNNNNNNNNNNNNNN",nX],rotate:["A"],rotateX:["A"],rotateY:["A"],rotateZ:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",nW([null,null,new tJ(1)]),nX],scaleX:["N",nW([null,new tJ(1),new tJ(1)]),nW([null,new tJ(1)])],scaleY:["N",nW([new tJ(1),null,new tJ(1)]),nW([new tJ(1),null])],scaleZ:["N",nW([new tJ(1),new tJ(1),null])],scale3d:["NNN",nX],skew:["Aa",null,nX],skewX:["A",null,nW([null,t0])],skewY:["A",null,nW([t0,null])],translate:["Tt",nW([null,null,tQ]),nX],translateX:["T",nW([null,tQ,tQ]),nW([null,tQ])],translateY:["T",nW([tQ,null,tQ]),nW([tQ,null])],translateZ:["L",nW([tQ,tQ,null])],translate3d:["TTL",nX]};function n$(e){for(var t=[],n=e.length,i=0;i<n;i++){var r=e[i],a=r[0],o=r.slice(1);if("translate"===a||"skew"===a?1===o.length&&o.push(0):"scale"===a&&1===o.length&&o.push(o[0]),!nj[a])return[];var s=o.map(function(e){return t7(e)});t.push({t:a,d:s})}return t}function nq(e){if(Array.isArray(e))return n$(e);if("none"===(e=(e||"none").trim()))return[];var t,n=[],i=0;for(nY.lastIndex=0;(t=nY.exec(e))&&t.index===i;){i=t.index+t[0].length;var r=t[1],a=nj[r];if(!a)break;var o=t[2].split(","),s=a[0];if(s.length<o.length)break;for(var l=[],u=0;u<s.length;u++){var c=o[u],h=s[u],d=void 0;if(void 0===(d=c?({A:function(e){return"0"===e.trim()?t0:ny(e)},N:nS,T:np,L:nv})[h.toUpperCase()](c):({a:t0,n:l[0],t:tQ})[h]))return[];l.push(d)}if(n.push({t:r,d:l}),nY.lastIndex===e.length)return n}return[]}function nK(e){if(Array.isArray(e))return n$(e);
1if("none"===(e=(e||"none").trim()))return[];var t,n=[],i=0;for(nY.lastIndex=0;(t=nY.exec(e))&&t.index===i;){i=t.index+t[0].length;var r=t[1],a=nj[r];if(!a)break;var o=t[2].split(","),s=a[0];if(s.length<o.length)break;for(var l=[],u=0;u<s.length;u++){var c=o[u],h=s[u],d=void 0;if(void 0===(d=c?({A:function(e){return"0"===e.trim()?t0:ng(e)},N:nb,T:nf,L:nd})[h.toUpperCase()](c):({a:t0,n:l[0],t:tQ})[h]))return[];l.push(d)}if(n.push({t:r,d:l}),nY.lastIndex===e.length)return n}return[]}function nJ(e){switch(e.t){case"rotateX":return[1,0,0,0,0,Math.cos(r=nm(e.d[0])*eV),Math.sin(r),0,0,-Math.sin(r),Math.cos(r),0,0,0,0,1];case"rotateY":return[Math.cos(r=nm(e.d[0])*eV),0,-Math.sin(r),0,0,1,0,0,Math.sin(r),0,Math.cos(r),0,0,0,0,1];case"rotate":case"rotateZ":return[Math.cos(r=nm(e.d[0])*eV),Math.sin(r),0,0,-Math.sin(r),Math.cos(r),0,0,0,0,1,0,0,0,0,1];case"rotate3d":t=e.d[0].value,n=e.d[1].value,i=e.d[2].value,r=nm(e.d[3])*eV;var t,n,i,r,a=t*t+n*n+i*i;if(0===a)t=1,n=0,i=0;else if(1!==a){var o=Math.sqrt(a);t/=o,n/=o,i/=o}var s=Math.sin(r/2),l=s*Math.cos(r/2),u=s*s;return[1-2*(n*n+i*i)*u,2*(t*n*u+i*l),2*(t*i*u-n*l),0,2*(t*n*u-i*l),1-2*(t*t+i*i)*u,2*(n*i*u+t*l),0,2*(t*i*u+n*l),2*(n*i*u-t*l),1-2*(t*t+n*n)*u,0,0,0,0,1];case"scale":return[e.d[0].value,0,0,0,0,e.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scaleX":return[e.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,e.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,e.d[0].value,0,0,0,0,1];case"scale3d":return[e.d[0].value,0,0,0,0,e.d[1].value,0,0,0,0,e.d[2].value,0,0,0,0,1];case"skew":var c=nm(e.d[0])*eV;return[1,Math.tan(nm(e.d[1])*eV),0,0,Math.tan(c),1,0,0,0,0,1,0,0,0,0,1];case"skewX":return[1,0,0,0,Math.tan(r=nm(e.d[0])*eV),1,0,0,0,0,1,0,0,0,0,1];case"skewY":return[1,Math.tan(r=nm(e.d[0])*eV),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,t=nE(e.d[0],0,null)||0,n=nE(e.d[1],0,null)||0,0,1];case"translateX":return[1,0,0,0,0,1,0,0,0,0,1,0,t=nE(e.d[0],0,null)||0,0,0,1];case"translateY":return[1,0,0,0,0,1,0,0,0,0,1,0,0,n=nE(e.d[0],0,null)||0,0,1];case"translateZ":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,i=nE(e.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,t=nE(e.d[0],0,null)||0,n=nE(e.d[1],0,null)||0,i=nE(e.d[2],0,null)||0,1];case"perspective":var h=nE(e.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,h?-1/h:0,0,0,0,1];case"matrix":return[e.d[0].value,e.d[1].value,0,0,e.d[2].value,e.d[3].value,0,0,0,0,1,0,e.d[4].value,e.d[5].value,0,1];case"matrix3d":return e.d.map(function(e){return e.value})}}function nQ(e,t){return[e[0]*t[0]+e[4]*t[1]+e[8]*t[2]+e[12]*t[3],e[1]*t[0]+e[5]*t[1]+e[9]*t[2]+e[13]*t[3],e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]*t[3],e[3]*t[0]+e[7]*t[1]+e[11]*t[2]+e[15]*t[3],e[0]*t[4]+e[4]*t[5]+e[8]*t[6]+e[12]*t[7],e[1]*t[4]+e[5]*t[5]+e[9]*t[6]+e[13]*t[7],e[2]*t[4]+e[6]*t[5]+e[10]*t[6]+e[14]*t[7],e[3]*t[4]+e[7]*t[5]+e[11]*t[6]+e[15]*t[7],e[0]*t[8]+e[4]*t[9]+e[8]*t[10]+e[12]*t[11],e[1]*t[8]+e[5]*t[9]+e[9]*t[10]+e[13]*t[11],e[2]*t[8]+e[6]*t[9]+e[10]*t[10]+e[14]*t[11],e[3]*t[8]+e[7]*t[9]+e[11]*t[10]+e[15]*t[11],e[0]*t[12]+e[4]*t[13]+e[8]*t[14]+e[12]*t[15],e[1]*t[12]+e[5]*t[13]+e[9]*t[14]+e[13]*t[15],e[2]*t[12]+e[6]*t[13]+e[10]*t[14]+e[14]*t[15],e[3]*t[12]+e[7]*t[13]+e[11]*t[14]+e[15]*t[15]]}function n0(e){var t=[0,0,0],n=[1,1,1],i=[0,0,0],r=[0,0,0,1],a=[0,0,0,1];return!function(e,t,n,i,r,a){if(!(!function(e,t){var n=t[15];if(0===n)return!1;for(var i=1/n,r=0;r<16;r++)e[r]=t[r]*i;return!0}(ej,e)||(U.copy(e$,ej),e$[3]=0,e$[7]=0,e$[11]=0,e$[15]=1,1e-8>Math.abs(U.determinant(e$))))){var o=ej[3],s=ej[7],l=ej[11],u=ej[12],c=ej[13],h=ej[14],d=ej[15];if(0!==o||0!==s||0!==l){if(eq[0]=o,eq[1]=s,eq[2]=l,eq[3]=d,!U.invert(e$,e$))return;U.transpose(e$,e$),F.fF(r,eq,e$)}else r[0]=r[1]=r[2]=0,r[3]=1;if(t[0]=u,t[1]=c,t[2]=h,eK[0][0]=ej[0],eK[0][1]=ej[1],eK[0][2]=ej[2],eK[1][0]=ej[4],eK[1][1]=ej[5],eK[1][2]=ej[6],eK[2][0]=ej[8],eK[2][1]=ej[9],eK[2][2]=ej[10],n[0]=_.kE(eK[0]),_.Fv(eK[0],eK[0]),i[0]=_.AK(eK[0],eK[1]),eQ(eK[1],eK[1],eK[0],1,-i[0]),n[1]=_.kE(eK[1]),_.Fv(eK[1],eK[1]),i[0]/=n[1],i[1]=_.AK(eK[0],eK[2]),eQ(eK[2],eK[2],eK[0],1,-i[1]),i[2]=_.AK(eK[1],eK[2]),eQ(eK[2],eK[2],eK[1],1,-i[2]),n[2]=_.kE(eK[2]),_.Fv(eK[2],eK[2]),i[1]/=n[2],i[2]/=n[2],_.kC(eJ,eK[1],eK[2]),0>_.AK(eK[0],eJ))for(var v=0;v<3;v++)n[v]*=-1,eK[v][0]*=-1,eK[v][1]*=-1,eK[v][2]*=-1;a[0]=.5*Math.sqrt(Math.max(1+eK[0][0]-eK[1][1]-eK[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-eK[0][0]+eK[1][1]-eK[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-eK[0][0]-eK[1][1]+eK[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+eK[0][0]+eK[1][1]+eK[2][2],0)),eK[2][1]>eK[1][2]&&(a[0]=-a[0]),eK[0][2]>eK[2][0]&&(a[1]=-a[1]),eK[1][0]>eK[0][1]&&(a[2]=-a[2])}}(0===e.length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:e.map(nJ).reduce(nQ),t,n,i,r,a),[[t,n,i,a,r]]}var n1=function(){function e(e,t){for(var n=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],i=0;i<4;i++)for(var r=0;r<4;r++)for(var a=0;a<4;a++)n[i][r]+=t[i][a]*e[a][r];return n}return function(t,n,i,r,a){for(var o,s=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],l=0;l<4;l++)s[l][3]=a[l];for(var u=0;u<3;u++)for(var c=0;c<3;c++)s[3][u]+=t[c]*s[c][u];var h=r[0],d=r[1],v=r[2],f=r[3],p=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];p[0][0]=1-2*(d*d+v*v),p[0][1]=2*(h*d-v*f),p[0][2]=2*(h*v+d*f),p[1][0]=2*(h*d+v*f),p[1][1]=1-2*(h*h+v*v),p[1][2]=2*(d*v-h*f),p[2][0]=2*(h*v-d*f),p[2][1]=2*(d*v+h*f),p[2][2]=1-2*(h*h+d*d),s=e(s,p);var g=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];i[2]&&(g[2][1]=i[2],s=e(s,g)),i[1]&&(g[2][1]=0,g[2][0]=i[0],s=e(s,g)),i[0]&&(g[2][0]=0,g[1][0]=i[0],s=e(s,g));for(var y=0;y<3;y++)for(var m=0;m<3;m++)s[y][m]*=n[y];return 0===(o=s)[0][2]&&0===o[0][3]&&0===o[1][2]&&0===o[1][3]&&0===o[2][0]&&0===o[2][1]&&1===o[2][2]&&0===o[2][3]&&0===o[3][2]&&1===o[3][3]?[s[0][0],s[0][1],s[1][0],s[1][1],s[3][0],s[3][1]]:s[0].concat(s[1],s[2],s[3])}}();function n2(e){return e.toFixed(6).replace(".000000","")}function n3(e,t){var n,i;return(e.decompositionPair!==t&&(e.decompositionPair=t,n=n0(e)),t.decompositionPair!==e&&(t.decompositionPair=e,i=n0(t)),null===n[0]||null===i[0])?[[!1],[!0],function(n){return n?t[0].d:e[0].d}]:(n[0].push(0),i[0].push(1),[n,i,function(e){var t=function(e,t,n){var i=function(e,t){for(var n=0,i=0;i<e.length;i++)n+=e[i]*t[i];return n}(e,t);i=(0,j.Z)(i,-1,1);var r=[];if(1===i)r=e;
1else for(var a=Math.acos(i),o=1*Math.sin(n*a)/Math.sqrt(1-i*i),s=0;s<4;s++)r.push(e[s]*(Math.cos(n*a)-i*o)+t[s]*o);return r}(n[0][3],i[0][3],e[5]);return n1(e[0],e[1],e[2],t,e[4]).map(n2).join(",")}])}function n5(e){return e.replace(/[XY]/,"")}function n4(e){return e.replace(/(X|Y|Z|3d)?$/,"3d")}function n6(e,t,n){var i=!1;if(!e.length||!t.length){e.length||(i=!0,e=t,t=[]);for(var r=0;r<e.length;r++)!function(){var n=e[r],i=n.t,a=n.d,o="scale"===i.substring(0,5)?1:0;t.push({t:i,d:a.map(function(e){return"number"==typeof e?t7(o):t7(o,e.unit)})})}()}var a=[],o=[],s=[];if(e.length!==t.length){var l=n3(e,t);a=[l[0]],o=[l[1]],s=[["matrix",[l[2]]]]}else for(var u=0;u<e.length;u++){var c=e[u].t,h=t[u].t,d=e[u].d,v=t[u].d,f=nj[c],p=nj[h],g=void 0;if("perspective"===c&&"perspective"===h||("matrix"===c||"matrix3d"===c)&&("matrix"===h||"matrix3d"===h)){var y=n3([e[u]],[t[u]]);a.push(y[0]),o.push(y[1]),s.push(["matrix",[y[2]]]);continue}if(c===h)g=c;else if(f[2]&&p[2]&&n5(c)===n5(h))g=n5(c),d=f[2](d),v=p[2](v);else if(f[1]&&p[1]&&n4(c)===n4(h))g=n4(c),d=f[1](d),v=p[1](v);else{var m=n3(e,t);a=[m[0]],o=[m[1]],s=[["matrix",[m[2]]]];break}for(var k=[],E=[],x=[],T=0;T<d.length;T++){var b=function(e,t,n,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a="",o=e.value||0,s=t.value||0,l=tK(e.unit),u=e.convertTo(l),c=t.convertTo(l);return u&&c?(o=u.value,s=c.value,a=tH(e.unit)):(tJ.isLength(e.unit)||tJ.isLength(t.unit))&&(o=nE(e,r,n),s=nE(t,r,n),a="px"),[o,s,function(e){return i&&(e=Math.max(e,0)),e+a}]}(d[T],v[T],n,!1,T);k[T]=b[0],E[T]=b[1],x.push(b[2])}a.push(k),o.push(E),s.push([g,x])}if(i){var S=a;a=o,o=S}return[a,o,function(e){return e.map(function(e,t){var n=e.map(function(e,n){return s[t][1][n](e)}).join(",");return"matrix"===s[t][0]&&16===n.split(",").length&&(s[t][0]="matrix3d"),"matrix3d"===s[t][0]&&6===n.split(",").length&&(s[t][0]="matrix"),"".concat(s[t][0],"(").concat(n,")")}).join(" ")}]}var n7=tO(function(e){if((0,X.Z)(e)){if("text-anchor"===e)return[t7(0,"px"),t7(0,"px")];var t=e.split(" ");return(1===t.length&&("top"===t[0]||"bottom"===t[0]?(t[1]=t[0],t[0]="center"):t[1]="center"),2!==t.length)?null:[np(n8(t[0])),np(n8(t[1]))]}return[t7(e[0]||0,"px"),t7(e[1]||0,"px")]});function n8(e){return"center"===e?"50%":"left"===e||"top"===e?"0%":"right"===e||"bottom"===e?"100%":e}var n9=[{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(e){return e===ex.PATH||e===ex.POLYGON||e===ex.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:"alph
1abetic"},{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"}],ie=new Set(n9.filter(function(e){return!!e.l}).map(function(e){return e.n})),it={},ii=(0,Z.Z)(function e(t){var n=this;(0,R.Z)(this,e),this.runtime=t,n9.forEach(function(e){n.registerMetadata(e)})},[{key:"registerMetadata",value:function(e){[e.n].concat((0,L.Z)(e.a||[])).forEach(function(t){it[t]=e})}},{key:"getPropertySyntax",value:function(e){return this.runtime.CSSPropertySyntaxFactory[e]}},{key:"processProperties",value:function(e,t){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0};Object.assign(e.attributes,t);var r=e.parsedStyle.clipPath,a=e.parsedStyle.offsetPath;!function(e,t){var n=ir(e);for(var i in t)n.has(i)&&(e.parsedStyle[i]=t[i])}(e,t);var o=!!i.forceUpdateGeometry;if(!o){for(var s in t)if(ie.has(s)){o=!0;break}}var l=ir(e);l.has("fill")&&t.fill&&(e.parsedStyle.fill=nu(t.fill)),l.has("stroke")&&t.stroke&&(e.parsedStyle.stroke=nu(t.stroke)),l.has("shadowColor")&&t.shadowColor&&(e.parsedStyle.shadowColor=nu(t.shadowColor)),l.has("filter")&&t.filter&&(e.parsedStyle.filter=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if("none"===(t=t.toLowerCase().trim()))return[];for(var n=/\s*([\w-]+)\(([^)]*)\)/g,i=[],r=0;(e=n.exec(t))&&e.index===r;)if(r=e.index+e[0].length,nx.indexOf(e[1])>-1&&i.push({name:e[1],params:e[2].split(" ").map(function(e){return nh(/deg|rad|grad|turn|px|%/g,e)||nu(e)})}),n.lastIndex===t.length)return i;return[]}(t.filter)),l.has("radius")&&!(0,W.Z)(t.radius)&&(e.parsedStyle.radius=nk(t.radius,4)),l.has("lineDash")&&!(0,W.Z)(t.lineDash)&&(e.parsedStyle.lineDash=nk(t.lineDash,"even")),l.has("points")&&t.points&&(e.parsedStyle.points=(n=t.points,{points:(0,X.Z)(n)?n.split(" ").map(function(e){var t=e.split(","),n=(0,D.Z)(t,2),i=n[0],r=n[1];return[Number(i),Number(r)]}):n,totalLength:0,segments:[]})),l.has("d")&&""===t.d&&(e.parsedStyle.d=(0,A.Z)({},tt)),l.has("d")&&t.d&&(e.parsedStyle.d=nV(t.d)),l.has("textTransform")&&t.textTransform&&this.runtime.CSSPropertySyntaxFactory[tn.TEXT_TRANSFORM].calculator(null,null,{value:t.textTransform},e,null),l.has("clipPath")&&!(0,es.Z)(t.clipPath)&&this.runtime.CSSPropertySyntaxFactory[tn.DEFINED_PATH].calculator("clipPath",r,t.clipPath,e,this.runtime),l.has("offsetPath")&&t.offsetPath&&this.runtime.CSSPropertySyntaxFactory[tn.DEFINED_PATH].calculator("offsetPath",a,t.offsetPath,e,this.runtime),l.has("transform")&&t.transform&&(e.parsedStyle.transform=nq(t.transform)),l.has("transformOrigin")&&t.transformOrigin&&(e.parsedStyle.transformOrigin=n7(t.transformOrigin)),l.has("markerStart")&&t.markerStart&&(e.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory[tn.MARKER].calculator(null,t.markerStart,t.markerStart,null,null)),l.has("markerEnd")&&t.markerEnd&&(e.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory[tn.MARKER].calculator(null,t.markerEnd,t.markerEnd,null,null)),l.has("markerMid")&&t.markerMid&&(e.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory[tn.MARKER].calculator("",t.markerMid,t.markerMid,null,null)),l.has("zIndex")&&!(0,W.Z)(t.zIndex)&&this.runtime.CSSPropertySyntaxFactory[tn.Z_INDEX].postProcessor(e),l.has("offsetDistance")&&!(0,W.Z)(t.offsetDistance)&&this.runtime.CSSPropertySyntaxFactory[tn.OFFSET_DISTANCE].postProcessor(e),l.has("transform")&&t.transform&&this.runtime.CSSPropertySyntaxFactory[tn.TRANSFORM].postProcessor(e),l.has("transformOrigin")&&t.transformOrigin&&this.runtime.CSSPropertySyntaxFactory[tn.TRANSFORM_ORIGIN].postProcessor(e),o&&(e.dirty(!0,!0),i.forceUpdateGeometry||this.runtime.sceneGraphService.dirtyToRoot(e))}},{key:"updateGeometry",value:function(e){var t=e.nodeName,n=this.runtime.geometryUpdaterFactory[t];if(n){var i=e.geometry;i.contentBounds||(i.contentBounds=new eR),i.renderBounds||(i.renderBounds=new eR);var r=e.parsedStyle,a=n.update(r,e),o=a.cx,s=a.cy,l=a.cz,u=a.hwidth,c=void 0===u?0:u,h=a.hheight,d=void 0===h?0:h,v=a.hdepth,f=[Math.abs(c),Math.abs(d),void 0===v?0:v],p=r.stroke,g=r.lineWidth,y=r.increasedLineWi
1dthForHitTesting,m=r.shadowType,k=void 0===m?"outer":m,E=r.shadowColor,x=r.filter,T=r.transformOrigin,b=[void 0===o?0:o,void 0===s?0:s,void 0===l?0:l];i.contentBounds.update(b,f);var S=t===ex.POLYLINE||t===ex.POLYGON||t===ex.PATH?Math.SQRT2:.5;if(p&&!p.isNone){var w=(((void 0===g?1:g)||0)+((void 0===y?0:y)||0))*S;f[0]+=w,f[1]+=w}if(i.renderBounds.update(b,f),E&&k&&"inner"!==k){var N=i.renderBounds,P=N.min,M=N.max,C=r.shadowBlur,A=r.shadowOffsetX,R=r.shadowOffsetY,Z=C||0,L=A||0,O=R||0,I=P[0]-Z+L,D=M[0]+Z+L,G=P[1]-Z+O,F=M[1]+Z+O;P[0]=Math.min(P[0],I),M[0]=Math.max(M[0],D),P[1]=Math.min(P[1],G),M[1]=Math.max(M[1],F),i.renderBounds.setMinMax(P,M)}(void 0===x?[]:x).forEach(function(e){var t=e.name,n=e.params;if("blur"===t){var r=n[0].value;i.renderBounds.update(i.renderBounds.center,_.IH(i.renderBounds.halfExtents,i.renderBounds.halfExtents,[r,r,0]))}else if("drop-shadow"===t){var a=n[0].value,o=n[1].value,s=n[2].value,l=i.renderBounds,u=l.min,c=l.max,h=u[0]-s+a,d=c[0]+s+a,v=u[1]-s+o,f=c[1]+s+o;u[0]=Math.min(u[0],h),c[0]=Math.max(c[0],d),u[1]=Math.min(u[1],v),c[1]=Math.max(c[1],f),i.renderBounds.setMinMax(u,c)}}),e.geometry.dirty=!1;var U=d<0,B=(c<0?-1:1)*(T?nE(T[0],0,e,!0):0),V=(U?-1:1)*(T?nE(T[1],1,e,!0):0);(B||V)&&e.setOrigin(B,V)}}},{key:"updateSizeAttenuation",value:function(e,t){e.style.isSizeAttenuation?(e.style.rawLineWi
1dth||(e.style.rawLineWidth=e.style.lineWidth),e.style.lineWidth=(e.style.rawLineWidth||1)/t,e.nodeName===ex.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===ex.CIRCLE&&e.style.rawR&&(e.style.r=e.style.rawR,delete e.style.rawR))}}]);function ir(e){return e.constructor.PARSED_STYLE_LIST}var ia=(0,Z.Z)(function e(){(0,R.Z)(this,e),this.mixer=nw},[{key:"calculator",value:function(e,t,n,i){return nm(n)}}]),io=(0,Z.Z)(function e(){(0,R.Z)(this,e)},[{key:"calculator",value:function(e,t,n,i,r){return n instanceof t$&&(n=null),r.sceneGraphService.updateDisplayObjectDependency(e,t,n,i),"clipPath"===e&&i.forEach(function(e){0===e.childNodes.length&&r.sceneGraphService.dirtyToRoot(e)}),n}}]),is=(0,Z.Z)(function e(){(0,R.Z)(this,e),this.parser=nu,this.mixer=nc},[{key:"calculator",value:function(e,t,n,i){return n instanceof t$?"none"===n.value?t5:t4:n}}]),il=(0,Z.Z)(function e(){(0,R.Z)(this,e)},[{key:"calculator",value:function(e,t,n){return n instanceof t$?[]:n}}]);function iu(e){var t=e.parsedStyle.fontSize;return(0,W.Z)(t)?null:t}var ic=(0,Z.Z)(function e(){(0,R.Z)(this,e),this.mixer=nw},[{key:"calculator",value:function(e,t,n,i,r){if((0,H.Z)(n))return n;if(!tJ.isRelativeUnit(n.unit))return n.value;if(n.unit===tI.kPercentage)return 0;if(n.unit===tI.kEms){if(i.parentNode){var a,o=iu(i.parentNode);if(o)return o*n.value}return 0}if(n.unit===tI.kRems){if(null!=i&&null!==(a=i.ownerDocument)&&void 0!==a&&a.documentElement){var s=iu(i.ownerDocument.documentElement);if(s)return s*n.value}return 0}}}]),ih=(0,Z.Z)(function e(){(0,R.Z)(this,e),this.mixer=nP},[{key:"calculator",value:function(e,t,n){return n.map(function(e){return e.value})}}]),id=(0,Z.Z)(function e(){(0,R.Z)(this,e),this.mixer=nP},[{key:"calculator",value:function(e,t,n){return n.map(function(e){return e.value})}}]),iv=(0,Z.Z)(function e(){(0,R.Z)(this,e)},[{key:"calculator",value:function(e,t,n,i){n instanceof t$&&(n=null);var r,a=null===(r=n)||void 0===r?void 0:r.cloneNode(!0);return a&&(a.style.isMarker=!0),a}}]),ip=(0,Z.Z)(function e(){(0,R.Z)(this,e),this.mixer=nw},[{key:"calculator",value:function(e,t,n){return n.value}}]),ig=(0,Z.Z)(function e(){(0,R.Z)(this,e),this.mixer=nN(0,1)},[{key:"calculator",value:function(e,t,n){return n.value}},{key:"postProcessor",value:function(e){var t=e.parsedStyle,n=t.offsetPath,i=t.offsetDistance;if(n){var r=n.nodeName;if(r===ex.LINE||r===ex.PATH||r===ex.POLYLINE){var a=n.getPoint(i);a&&e.setLocalPosition(a.x,a.y)}}}}]),iy=(0,Z.Z)(function e(){(0,R.Z)(this,e),this.mixer=nN(0,1)},[{key:"calculator",value:function(e,t,n){return n.value}}]),im=(0,Z.Z)(function e(){(0,R.Z)(this,e),this.parser=nV,this.mixer=nz},[{key:"calculator",value:function(e,t,n){return n instanceof t$&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new eD(0,0,0,0)}:n}}]),ik=(0,Z.Z)(function e(){(0,R.Z)(this,e),this.mixer=nH}),iE=function(e){function t(){var e;(0,R.Z)(this,t);for(var n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];return(e=(0,O.Z)(this,t,[].concat(i))).mixer=nN(0,1/0),e}return(0,I.Z)(t,e),(0,Z.Z)(t)}(ic),ix=(0,Z.Z)(function e(){(0,R.Z)(this,e)},[{key:"calculator",value:function(e,t,n,i){return n instanceof t$?"unset"===n.value?"":n.value:"".concat(n)}},{key:"postProcessor",value:function(e){e.nodeValue="".concat(e.parsedStyle.text)||""}}]),iT=(0,Z.Z)(function e(){(0,R.Z)(this,e)},[{key:"calculator",value:function(e,t,n,i){var r=i.getAttribute("text");if(r){var a=r;"capitalize"===n.value?a=r.charAt(0).toUpperCase()+r.slice(1):"lowercase"===n.value?a=r.toLowerCase():"uppercase"===n.value&&(a=r.toUpperCase()),i.parsedStyle.text=a}return n.value}}]),ib=new WeakMap,iS="undefined"!=typeof window&&void 0!==window.document;function iw(e,t){var n=Number(e.parsedStyle.zIndex||0),i=Number(t.parsedStyle.zIndex||0);if(n===i){var r=e.parentNode;if(r){var a=r.childNodes||[];return a.indexOf(e)-a.indexOf(t)}}return n-i}function iN(e){var t,n=e;do{if(null===(t=n.parsedStyle)||void 0===t?void 0:t.clipPath)return n;n=n.parentElement}while(null!==n);return null}function iP(e,t,n){iS&&e.style&&(e.style.width=t+"px",e.style.height=n+"px")}function iM(e,t){if(iS)return document.defaultView.getComputedStyle(e,null).getPropertyValue(t)}var iC={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},iA="object"==typeof performance&&performance.now?performance:Date;
1function iR(e){return e.nodeName===ex.FRAGMENT||e.getRootNode().nodeName===ex.FRAGMENT}function iZ(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"auto",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,i=!1,r=!1,a=!!t&&!t.isNone,o=!!n&&!n.isNone;return"visiblepainted"===e||"painted"===e||"auto"===e?(i=a,r=o):"visiblefill"===e||"fill"===e?i=!0:"visiblestroke"===e||"stroke"===e?r=!0:("visible"===e||"all"===e)&&(i=!0,r=!0),[i,r]}var iL=1,iO="object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:{},iI=Date.now(),iD={},iG=Date.now(),i_=function(e){if("function"!=typeof e)throw TypeError("".concat(e," is not a function"));var t=Date.now(),n=t-iG,i=iL++;return iD[i]=e,Object.keys(iD).length>1||setTimeout(function(){iG=t;var e=iD;iD={},Object.keys(e).forEach(function(t){return e[t](iO.performance&&"function"==typeof iO.performance.now?iO.performance.now():Date.now()-iI)})},n>16?0:16-n),i},iF=function(e){return"string"!=typeof e?i_:""===e?iO.requestAnimationFrame:iO["".concat(e,"RequestAnimationFrame")]},iU=function(e,t){for(var n=0;void 0!==e[n];){if(t(e[n]))return e[n];n+=1}}(["","webkit","moz","ms","o"],function(e){return!!iF(e)}),iB=iF(iU),iV="string"!=typeof iU?function(e){delete iD[e]}:""===iU?iO.cancelAnimationFrame:iO["".concat(iU,"CancelAnimationFrame")]||iO["".concat(iU,"CancelRequestAnimationFrame")];iO.requestAnimationFrame=iB,iO.cancelAnimationFrame=iV;var iz=(0,Z.Z)(function e(){(0,R.Z)(this,e),this.callbacks=[]},[{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=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Promise.all(this.callbacks.map(function(e){return e.apply(void 0,t)}))}}]),iH=(0,Z.Z)(function e(){(0,R.Z)(this,e),this.callbacks=[]},[{key:"tapPromise",value:function(e,t){this.callbacks.push(t)}},{key:"promise",value:(m=(0,em.Z)((0,ey.Z)().mark(function e(){var t,n,i,r,a=arguments;return(0,ey.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.callbacks.length){e.next=6;break}return e.next=1,(t=this.callbacks)[0].apply(t,a);case 1:n=e.sent,i=1;case 2:if(!(i<this.callbacks.length)){e.next=5;break}return r=this.callbacks[i],e.next=3,r(n);case 3:n=e.sent;case 4:i++,e.next=2;break;case 5:return e.abrupt("return",n);case 6:return e.abrupt("return",null);case 7:case"end":return e.stop()}},e,this)})),function(){return m.apply(this,arguments)})}]),iY=(0,Z.Z)(function e(){(0,R.Z)(this,e),this.callbacks=[]},[{key:"tap",value:function(e,t){this.callbacks.push(t)}},{key:"call",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=arguments;this.callbacks.forEach(function(e){e.apply(void 0,i)})}}]),iW=(0,Z.Z)(function e(){(0,R.Z)(this,e),this.callbacks=[]},[{key:"tap",value:function(e,t){this.callbacks.push(t)}},{key:"call",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(this.callbacks.length){for(var i=arguments,r=this.callbacks[0].apply(void 0,i),a=1;a<this.callbacks.length;a++)r=(0,this.callbacks[a])(r);return r}return null}}]),iX=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],ij=/([\"\'])[^\'\"]+\1/;function i$(e){var t=e.fontSize,n=e.fontFamily,i=e.fontStyle,r=e.fontVariant,a=e.fontWeight;return{fontSize:void 0===t?16:t,fontFamily:void 0===n?"sans-serif":n,fontStyle:void 0===i?"normal":i,fontVariant:void 0===r?"normal":r,fontWeight:void 0===a?"normal":a}}var iq=tO(function(e){for(var t=i$(e),n=t.fontSize,i=t.fontFamily,r=t.fontStyle,a=t.fontVariant,o=t.fontWeight,s=(0,H.Z)(n)&&"".concat(n,"px")||"16px",l=i.split(","),u=l.length-1;u>=0;u--){var c=l[u].trim();!ij.test(c)&&0>iX.indexOf(c)&&(c='"'.concat(c,'"')),l[u]=c}return"".concat(r," ").concat(a," ").concat(o," ").concat(s," ").concat(l.join(","))},function(e){var t=i$(e),n=t.fontSize,i=t.fontFamily,r=t.fontStyle,a=t.fontVariant,o=t.fontWeight;return"".concat(r,"_").concat(a,"_").concat(o,"_").concat(n,"_").concat(i)}),iK=function(e){return Math.max(e,1e-6)};function iJ(e,t,n){return U.identity(e),e[4]=Math.tan(t),e[1]=Math.tan(n),e}var iQ=U.create(),i0=U.create(),i1={scale:function(e){U.fromScaling(iQ,[e[0].value,e[1].value,1].map(function(e){return iK(e)}))},scaleX:function(e){U.fromScaling(iQ,[e[0].value,1,1].map(function(e){return iK(e)}))},scaleY:function(e){U.fromScaling(iQ,[1,e[0].value,1].map(function(e){return iK(e)}))},scaleZ:function(e){U.fromScaling(iQ,[1,1,e[0].value].map(function(e){return iK(e)}))},scale3d:function(e){U.fromScaling(iQ,[e[0].value,e[1].value,e[2].value].map(function(e){return iK(e)}))},translate:function(e){U.fromTranslation(iQ,[e[0].value,e[1].value,0])},translateX:function(e){U.fromTranslation(iQ,[e[0].value,0,0])},translateY:function(e){U.fromTranslation(iQ,[0,e[0].value,0])},translateZ:function(e){U.fromTranslation(iQ,[0,0,e[0].value])},translate3d:function(e){U.fromTranslation(iQ,[e[0].value,e[1].value,e[2].value])},rotate:function(e){U.fromZRotation(iQ,nm(e[0])*eV)},rotateX:function(e){U.fromXRotation(iQ,nm(e[0])*eV)},rotateY:function(e){U.fromYRotation(iQ,nm(e[0])*eV)},rotateZ:function(e){U.fromZRotation(iQ,nm(e[0])*eV)},rotate3d:function(e){U.fromRotation(iQ,nm(e[3])*eV,[e[0].value,e[1].value,e[2].value])},skew:function(e){iJ(iQ,e[0].value*eV,e[1].value*eV)},skewX:function(e){iJ(iQ,e[0].value*eV,0)},skewY:function(e){iJ(iQ,0,e[0].value*eV)},matrix:function(e){U.set(iQ,e[0].value,e[1].value,0,0,e[2].value,e[3].value,0,0,0,0,1,0,e[4].value,e[5].value,0,1)},matrix3d:function(e){U.set.apply(U,[iQ].concat((0,L.Z)(e.map(function(e){return e.value}))))}},i2=_.al(1,1,1),i3=_.Ue(),i5={translate:function(e,t){r$.sceneGraphService.setLocalScale(e,i2,!1),r$.sceneGraphService.setLocalEulerAngles(e,i3,void 0,void 0,!1),r$.sceneGraphService.setLocalPosition(e,[t[0].value,t[1].value,0],!1),r$.sceneGraphService.dirtyLocalTransform(e,e.transformable)}};function i4(e,t){if(e.length){if(1===e.length&&i5[e[0].t]){i5[e[0].t](t,e[0].d);return}for(var n=U.identity(i0),i=0;i<e.length;i++){var r=e[i],a=r.t,o=r.d,s=i1[a];s&&(s(o),U.mul(n,n,iQ))}t.setLocalTransform(n)}else t.resetLocalTransform();return t.getLocalTransform()}var i6=(0,Z.Z)(function e(){(0,R.Z)(this,e),this.parser=nK,this.mixer=n6},[{key:"calculator",value:function(e,t,n,i){return n instanceof t$?[]:n}},{key:"postProcessor",value:function(e){i4(e.parsedStyle.transform,e)}}]),i7=(0,Z.Z)(function e(){(0,R.Z)(this,e)},[{key:"postProcessor",value:function(e){var t=e.parsedStyle.transformOrigin;t[0].unit===tI.kPixels&&t[1].unit===tI.kPixels?e.setOrigin(t[0].value,t[1].value):e.getGeometryBounds()}}]),i8=(0,Z.Z)(function e(){(0,R.Z)(this,e)},[{key:"calculator",value:function(e,t,n,i){return n.value}},{key:"postProcessor",value:function(e){if(e.parentNode){var t=e.parentNode,n=t.renderable,i=t.sortable;n&&t.dirty(),i&&(i.dirty=!0,i.dirtyReason=e6.Z_INDEX_CHANGED)}}}]),i9=(0,Z.Z)(function e(){(0,R.Z)(this,e)},[{key:"update",value:function(e,t){var n=e.cx,i=e.cy,r=e.r,a=void 0===r?0:r;return{cx:void 0===n?0:n,cy:void 0===i?0:i,hwidth:a,hheight:a}}}]),re=(0,Z.Z)(function e(){(0,R.Z)(this,e)},[{key:"update",value:function(e,t){var n=e.cx,i=e.cy,r=e.rx,a=e.ry;return{cx:void 0===n?0:n,cy:void 0===i?0:i,hwidth:void 0===r?0:r,hheight:void 0===a?0:a}}}]),rt=(0,Z.Z)(function e(){(0,R.Z)(this,e)},[{key:"update",value:function(e){var t=e.x1,n=e.y1,i=e.x2,r=e.y2,a=Math.min(t,i),o=Math.min(n,r),s=(Math.max(t,i)-a)/2,l=(Math.max(n,r)-o)/2;return{cx:a+s,cy:o+l,hwidth:s,hheight:l}}}]),rn=(0,Z.Z)(function e(){(0,R.Z)(this,e)},[{key:"update",value:function(e){var t=e.d.rect,n=t.x,i=t.y,r=t.width,a=t.height,o=r/2,s=a/2;
1return{cx:n+o,cy:i+s,hwidth:o,hheight:s}}}]),ri=(0,Z.Z)(function e(){(0,R.Z)(this,e)},[{key:"update",value:function(e){if(e.points&&(0,el.Z)(e.points.points)){var t=e.points.points,n=Math.min.apply(Math,(0,L.Z)(t.map(function(e){return e[0]}))),i=Math.max.apply(Math,(0,L.Z)(t.map(function(e){return e[0]}))),r=Math.min.apply(Math,(0,L.Z)(t.map(function(e){return e[1]}))),a=Math.max.apply(Math,(0,L.Z)(t.map(function(e){return e[1]}))),o=(i-n)/2,s=(a-r)/2;return{cx:n+o,cy:r+s,hwidth:o,hheight:s}}return{cx:0,cy:0,hwidth:0,hheight:0}}}]),rr=(0,Z.Z)(function e(){(0,R.Z)(this,e)},[{key:"update",value:function(e,t){var n=e.x,i=e.y,r=e.src,a=e.width,o=e.height,s=void 0===a?0:a,l=void 0===o?0:o;return!r||(0,X.Z)(r)||(s||(s=r.width,e.width=s),l||(l=r.height,e.height=l)),{cx:(void 0===n?0:n)+s/2,cy:(void 0===i?0:i)+l/2,hwidth:s/2,hheight:l/2}}}]),ra=(0,Z.Z)(function e(t){(0,R.Z)(this,e),this.globalRuntime=t},[{key:"isReadyToMeasure",value:function(e,t){return e.text}},{key:"update",value:function(e,t){var n,i=e.text,r=e.textAlign,a=void 0===r?"start":r,o=e.lineWidth,s=void 0===o?1:o,l=e.textBaseline,u=void 0===l?"alphabetic":l,c=e.dx,h=void 0===c?0:c,d=e.dy,v=void 0===d?0:d,f=e.x,p=e.y;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=((null==t||null===(n=t.ownerDocument)||void 0===n||null===(n=n.defaultView)||void 0===n?void 0:n.getConfig())||{}).offscreenCanvas,y=this.globalRuntime.textService.measureText(i,e,g);e.metrics=y;var m=y.width,k=y.height,E=m/2,x=k/2,T=(void 0===f?0:f)+E;"center"===a||"middle"===a?T+=s/2-E:("right"===a||"end"===a)&&(T+=s-2*E);var b=(void 0===p?0:p)-x;return"middle"===u?b+=x:"top"===u||"hanging"===u?b+=2*x:"alphabetic"===u||("bottom"===u||"ideographic"===u)&&(b+=0),h&&(T+=h),v&&(b+=v),{cx:T,cy:b,hwidth:E,hheight:x}}}]),ro=(0,Z.Z)(function e(){(0,R.Z)(this,e)},[{key:"update",value:function(e,t){return{cx:0,cy:0,hwidth:0,hheight:0}}}]),rs=(0,Z.Z)(function e(){(0,R.Z)(this,e)},[{key:"update",value:function(e,t){var n=e.x,i=e.y,r=e.width,a=void 0===r?0:r,o=e.height,s=void 0===o?0:o;return{cx:(void 0===n?0:n)+a/2,cy:(void 0===i?0:i)+s/2,hwidth:a/2,hheight:s/2}}}]),rl=(0,Z.Z)(function e(t){(0,R.Z)(this,e),this.eventPhase=e.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new eI,this.page=new eI,this.canvas=new eI,this.viewport=new eI,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t},[{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 Error(eG)}}]),ru=function(e){function t(){var e;(0,R.Z)(this,t);for(var n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];return(e=(0,O.Z)(this,t,[].concat(i))).client=new eI,e.movement=new eI,e.offset=new eI,e.global=new eI,e.screen=new eI,e}return(0,I.Z)(t,e),(0,Z.Z)(t,[{key:"clientX",get:function(){return this.client.x}},{key:"clientY",get:function(){return this.client.y}},{key:"movementX",get:function(){return this.movement.x}},{key:"movementY",get:function(){return this.movement.y}},{key:"offsetX",get:function(){return this.offset.x}},{key:"offsetY",get:function(){return this.offset.y}},{key:"globalX",get:function(){return this.global.x}},{key:"globalY",get:function(){return this.global.y}},{key:"screenX",get:function(){return this.screen.x}},{key:"screenY",get:function(){return this.screen.y}},{key:"getModifierState",value:function(e){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(e)}},{key:"initMouseEvent",value:function(){throw Error(eG)}}])}(rl),rc=function(e){function t(){var e;(0,R.Z)(this,t);for(var n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];return(e=(0,O.Z)(this,t,[].concat(i))).width=0,e.height=0,e.isPrimary=!1,e}
1return(0,I.Z)(t,e),(0,Z.Z)(t,[{key:"getCoalescedEvents",value:function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]}},{key:"getPredictedEvents",value:function(){throw Error("getPredictedEvents is not supported!")}},{key:"clone",value:function(){return this.manager.clonePointerEvent(this)}}])}(ru),rh=function(e){function t(){return(0,R.Z)(this,t),(0,O.Z)(this,t,arguments)}return(0,I.Z)(t,e),(0,Z.Z)(t,[{key:"clone",value:function(){return this.manager.cloneWheelEvent(this)}}])}(ru),rd=function(e){function t(e,n){var i;return(0,R.Z)(this,t),(i=(0,O.Z)(this,t,[null])).type=e,i.detail=null==n?void 0:n.detail,!n||"detail"in n||(i.detail=n),Object.assign(i,n),i}return(0,I.Z)(t,e),(0,Z.Z)(t)}(rl),rv=(0,Z.Z)(function e(){(0,R.Z)(this,e),this.emitter=new G.Z},[{key:"on",value:function(e,t,n){return this.addEventListener(e,t,n),this}},{key:"addEventListener",value:function(e,t,n){var i=!1,r=!1;if((0,eu.Z)(n))i=n;else if(n){var a=n.capture;i=void 0!==a&&a;var o=n.once;r=void 0!==o&&o}i&&(e+="capture"),t=(0,ec.Z)(t)?t:t.handleEvent;var s=(0,ec.Z)(t)?void 0:t;return r?this.emitter.once(e,t,s):this.emitter.on(e,t,s),this}},{key:"off",value:function(e,t,n){return e?this.removeEventListener(e,t,n):this.removeAllEventListeners(),this}},{key:"removeAllEventListeners",value:function(){var e;null===(e=this.emitter)||void 0===e||e.removeAllListeners()}},{key:"removeEventListener",value:function(e,t,n){if(!this.emitter)return this;((0,eu.Z)(n)?n:null==n?void 0:n.capture)&&(e+="capture"),t=(0,ec.Z)(t)?t:null===(i=t)||void 0===i?void 0:i.handleEvent;var i,r=(0,ec.Z)(t)?void 0:t;return this.emitter.off(e,t,r),this}},{key:"emit",value:function(e,t){this.dispatchEvent(new rd(e,t))}},{key:"dispatchEventToSelf",value:function(e){e.target||(e.target=this),e.currentTarget=this,this.emitter.emit(e.type,e)}},{key:"dispatchEvent",value:function(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0;if(r)return this.dispatchEventToSelf(e),!0;if(t=this.document?this:this.defaultView?this.defaultView:null===(n=this.ownerDocument)||void 0===n?void 0:n.defaultView){if(e.manager=t.getEventService(),!e.manager)return!1;e.defaultPrevented=!1,e.path?e.path.length=0:e.page=[],i||(e.target=this),e.manager.dispatchEvent(e,e.type,i)}else this.dispatchEventToSelf(e);return!e.defaultPrevented}}]),rf=function(e){function t(){var e;(0,R.Z)(this,t);for(var n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];return(e=(0,O.Z)(this,t,[].concat(i))).shadow=!1,e.ownerDocument=null,e.isConnected=!1,e.baseURI="",e.childNodes=[],e.nodeType=0,e.nodeName="",e.nodeValue=null,e.mutations=void 0,e.parentNode=null,e.destroyed=!1,e}return(0,I.Z)(t,e),(0,Z.Z)(t,[{key:"textContent",get:function(){var e="";this.nodeName===ex.TEXT&&(e+=this.style.text);var t,n=(0,ek.Z)(this.childNodes);try{for(n.s();!(t=n.n()).done;){var i=t.value;i.nodeName===ex.TEXT?e+=i.nodeValue:e+=i.textContent}}catch(e){n.e(e)}finally{n.f()}return e},set:function(e){var t=this;this.childNodes.slice().forEach(function(e){t.removeChild(e)}),this.nodeName===ex.TEXT&&(this.style.text="".concat(e))}},{key:"getRootNode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.parentNode?this.parentNode.getRootNode(e):e.composed&&this.host?this.host.getRootNode(e):this}},{key:"hasChildNodes",value:function(){return this.childNodes.length>0}},{key:"isDefaultNamespace",value:function(e){throw Error(eG)}},{key:"lookupNamespaceURI",value:function(e){throw Error(eG)}},{key:"lookupPrefix",value:function(e){throw Error(eG)}},{key:"normalize",value:function(){throw Error(eG)}},{key:"isEqualNode",value:function(e){return this===e}},{key:"isSameNode",value:function(e){return this.isEqualNode(e)}},{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(e){if(e===this)return 0;for(var n,i=e,r=this,a=[i],o=[r];null!==(n=i.parentNode)&&void 0!==n?n:r.parentNode;)i=i.parentNode?(a.push(i.parentNode),i.parentNode):i,r=r.parentNode?(o.push(r.parentNode),r.parentNode):r;if(i!==r)return t.DOCUMENT_POSITION_DISCONNECTED|t.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|t.DOCUMENT_POSITION_PRECEDING;var s=a.length>o.length?a:o,l=s===a?o:a;if(s[s.length-l.length]===l[0])return s===a?t.DOCUMENT_POSITION_CONTAINED_BY|t.DOCUMENT_POSITION_FOLLOWING:t.DOCUMENT_POSITION_CONTAINS|t.DOCUMENT_POSITION_PRECEDING;for(var u=s.length-l.length,c=l.length-1;c>=0;c--){var h=l[c],d=s[u+c];if(d!==h){var v=h.parentNode.childNodes;if(v.indexOf(h)<v.indexOf(d)){if(l===a)return t.DOCUMENT_POSITION_PRECEDING;return t.DOCUMENT_POSITION_FOLLOWING}if(s===a)return t.DOCUMENT_POSITION_PRECEDING;break}}return t.DOCUMENT_POSITION_FOLLOWING}},{key:"contain",value:function(e){return this.contains(e)}},{key:"contains",value:function(e){for(var t=e;t&&this!==t;)t=t.parentNode;return!!t}},{key:"getAncestor",value:function(e){for(var t=this;e>0&&t;)t=t.parentNode,e--;return t}}
vendor: 9,852 bytes, line 1
1,{key:"forEach",value:function(e){for(var t=[this];t.length>0;){var n=t.pop();if(!1===e(n))break;for(var i=n.childNodes.length-1;i>=0;i--)t.push(n.childNodes[i])}}}],[{key:"isNode",value:function(e){return!!e.childNodes}}])}(rv);rf.DOCUMENT_POSITION_DISCONNECTED=1,rf.DOCUMENT_POSITION_PRECEDING=2,rf.DOCUMENT_POSITION_FOLLOWING=4,rf.DOCUMENT_POSITION_CONTAINS=8,rf.DOCUMENT_POSITION_CONTAINED_BY=16,rf.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;var rp=(0,Z.Z)(function e(t,n){var i=this;(0,R.Z)(this,e),this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=U.create(),this.tmpVec3=_.Ue(),this.onPointerDown=function(e){var t=i.createPointerEvent(e);if(i.dispatchEvent(t,"pointerdown"),"touch"===t.pointerType)i.dispatchEvent(t,"touchstart");else if("mouse"===t.pointerType||"pen"===t.pointerType){var n=2===t.button;i.dispatchEvent(t,n?"rightdown":"mousedown")}i.trackingData(e.pointerId).pressTargetsByButton[e.button]=t.composedPath(),i.freeEvent(t)},this.onPointerUp=function(e){var t=iA.now(),n=i.createPointerEvent(e,void 0,void 0,i.context.config.alwaysTriggerPointerEventOnCanvas?i.rootTarget:void 0);if(i.dispatchEvent(n,"pointerup"),"touch"===n.pointerType)i.dispatchEvent(n,"touchend");else if("mouse"===n.pointerType||"pen"===n.pointerType){var r=2===n.button;i.dispatchEvent(n,r?"rightup":"mouseup")}var a=i.trackingData(e.pointerId),o=i.findMountedTarget(a.pressTargetsByButton[e.button]),s=o;if(o&&!n.composedPath().includes(o)){for(var l=o;l&&!n.composedPath().includes(l);){if(n.currentTarget=l,i.notifyTarget(n,"pointerupoutside"),"touch"===n.pointerType)i.notifyTarget(n,"touchendoutside");else if("mouse"===n.pointerType||"pen"===n.pointerType){var u=2===n.button;i.notifyTarget(n,u?"rightupoutside":"mouseupoutside")}rf.isNode(l)&&(l=l.parentNode)}delete a.pressTargetsByButton[e.button],s=l}if(s){var c,h=i.clonePointerEvent(n,"click");h.target=s,h.path=[],a.clicksByButton[e.button]||(a.clicksByButton[e.button]={clickCount:0,target:h.target,timeStamp:t});var d=i.context.renderingContext.root.ownerDocument.defaultView,v=a.clicksByButton[e.button];v.target===h.target&&t-v.timeStamp<d.getConfig().dblClickSpeed?++v.clickCount:v.clickCount=1,v.target=h.target,v.timeStamp=t,h.detail=v.clickCount,null!==(c=n.detail)&&void 0!==c&&c.preventClick||(i.context.config.useNativeClickEvent||"mouse"!==h.pointerType&&"touch"!==h.pointerType||i.dispatchEvent(h,"click"),i.dispatchEvent(h,"pointertap")),i.freeEvent(h)}i.freeEvent(n)},this.onPointerMove=function(e){var t=i.createPointerEvent(e,void 0,void 0,i.context.config.alwaysTriggerPointerEventOnCanvas?i.rootTarget:void 0),n="mouse"===t.pointerType||"pen"===t.pointerType,r=i.trackingData(e.pointerId),a=i.findMountedTarget(r.overTargets);if(r.overTargets&&a!==t.target){var o="mousemove"===e.type?"mouseout":"pointerout",s=i.createPointerEvent(e,o,a||void 0);if(i.dispatchEvent(s,"pointerout"),n&&i.dispatchEvent(s,"mouseout"),!t.composedPath().includes(a)){var l=i.createPointerEvent(e,"pointerleave",a||void 0);for(l.eventPhase=l.AT_TARGET;l.target&&!t.composedPath().includes(l.target);)l.currentTarget=l.target,i.notifyTarget(l),n&&i.notifyTarget(l,"mouseleave"),rf.isNode(l.target)&&(l.target=l.target.parentNode);i.freeEvent(l)}i.freeEvent(s)}if(a!==t.target){var u="mousemove"===e.type?"mouseover":"pointerover",c=i.clonePointerEvent(t,u);i.dispatchEvent(c,"pointerover"),n&&i.dispatchEvent(c,"mouseover");for(var h=a&&rf.isNode(a)&&a.parentNode;h&&h!==(rf.isNode(i.rootTarget)&&i.rootTarget.parentNode)&&h!==t.target;)h=h.parentNode;if(!h||h===(rf.isNode(i.rootTarget)&&i.rootTarget.parentNode)){var d=i.clonePointerEvent(t,"pointerenter");for(d.eventPhase=d.AT_TARGET;d.target&&d.target!==a&&d.target!==(rf.isNode(i.rootTarget)&&i.rootTarget.parentNode);)d.currentTarget=d.target,i.notifyTarget(d),n&&i.notifyTarget(d,"mouseenter"),rf.isNode(d.target)&&(d.target=d.target.parentNode);i.freeEvent(d)}i.freeEvent(c)}i.dispatchEvent(t,"pointermove"),"touch"===t.pointerType&&i.dispatchEvent(t,"touchmove"),n&&(i.dispatchEvent(t,"mousemove"),i.cursor=i.getCursor(t.target)),r.overTargets=t.composedPath(),i.freeEvent(t)},this.onPointerOut=function(e){var t=i.trackingData(e.pointerId);if(t.overTargets){var n="mouse"===e.pointerType||"pen"===e.pointerType,r=i.findMountedTarget(t.overTargets),a=i.createPointerEvent(e,"pointerout",r||void 0);i.dispatchEvent(a),n&&i.dispatchEvent(a,"mouseout");var o=i.createPointerEvent(e,"pointerleave",r||void 0);for(o.eventPhase=o.AT_TARGET;o.target&&o.target!==(rf.isNode(i.rootTarget)&&i.rootTarget.parentNode);)o.currentTarget=o.target,i.notifyTarget(o),n&&i.notifyTarget(o,"mouseleave"),rf.isNode(o.target)&&(o.target=o.target.parentNode);t.overTargets=null,i.freeEvent(a),i.freeEvent(o)}i.cursor=null},this.onPointerOver=function(e){var t=i.trackingData(e.pointerId),n=i.createPointerEvent(e),r="mouse"===n.pointerType||"pen"===n.pointerType;i.dispatchEvent(n,"pointerover"),r&&i.dispatchEvent(n,"mouseover"),"mouse"===n.pointerType&&(i.cursor=i.getCursor(n.target));var a=i.clonePointerEvent(n,"pointerenter");for(a.eventPhase=a.AT_TARGET;a.target&&a.target!==(rf.isNode(i.rootTarget)&&i.rootTarget.parentNode);)a.currentTarget=a.target,i.notifyTarget(a),r&&i.notifyTarget(a,"mouseenter"),rf.isNode(a.target)&&(a.target=a.target.parentNode);t.overTargets=n.composedPath(),i.freeEvent(n),i.freeEvent(a)},this.onPointerUpOutside=function(e){var t=i.trackingData(e.pointerId),n=i.findMountedTarget(t.pressTargetsByButton[e.button]),r=i.createPointerEvent(e);if(n){for(var a=n;a;)r.currentTarget=a,i.notifyTarget(r,"pointerupoutside"),"touch"===r.pointerType||("mouse"===r.pointerType||"pen"===r.pointerType)&&i.notifyTarget(r,2===r.button?"rightupoutside":"mouseupoutside"),rf.isNode(a)&&(a=a.parentNode);delete t.pressTargetsByButton[e.button]}i.freeEvent(r)},this.onWheel=function(e){var t=i.createWheelEvent(e);i.dispatchEvent(t),i.freeEvent(t)},this.onClick=function(e){if(i.context.config.useNativeClickEvent){var t=i.createPointerEvent(e);i.dispatchEvent(t),i.freeEvent(t)}},this.onPointerCancel=function(e){var t=i.createPointerEvent(e,void 0,void 0,i.context.config.alwaysTriggerPointerEventOnCanvas?i.rootTarget:void 0);i.dispatchEvent(t),i.freeEvent(t)},this.globalRuntime=t,this.context=n},[{key:"init",value:function(){this.rootTarget=this.context.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointercancel",this.onPointerCancel),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel),this.addEventMapping("click",this.onClick)}},{key:"destroy",value:function(){this.mappingTable={},this.mappingState={},this.eventPool.clear()}},{key:"getScale",value:function(){var e=this.context.contextService.getBoundingClientRect(),t=1,n=1,i=this.context.contextService.getDomElement();if(i&&e){var r=i.offsetWidth,a=i.offsetHeight;r&&a&&(t=e.width/r,n=e.height/a)}return{scaleX:t,scaleY:n,bbox:e}}},{key:"client2Viewport",value:function(e){var t=this.getScale(),n=t.scaleX,i=t.scaleY,r=t.bbox;return new eI((e.x-((null==r?void 0:r.left)||0))/n,(e.y-((null==r?void 0:r.top)||0))/i)}},{key:"viewport2Client",value:function(e){var t=this.getScale(),n=t.scaleX,i=t.scaleY,r=t.bbox;return new eI((e.x+((null==r?void 0:r.left)||0))*n,(e.y+((null==r?void 0:r.top)||0))*i)}},{key:"viewport2Canvas",value:function(e){var t=e.x,n=e.y,i=this.rootTarget.defaultView.getCamera(),r=this.context.config,a=r.width,o=r.height,s=i.getPerspectiveInverse(),l=i.getWorldTransform(),u=U.multiply(this.tmpMatrix,l,s),c=_.t8(this.tmpVec3,t/a*2-1,(1-n/o)*2-1,0);return _.fF(c,c,u),new eI(c[0],c[1])}},{key:"canvas2Viewport",value:function(e){var t=this.rootTarget.defaultView.getCamera(),n=t.getPerspective(),i=t.getViewTransform(),r=U.multiply(this.tmpMatrix,n,i),a=_.t8(this.tmpVec3,e.x,e.y,0);_.fF(this.tmpVec3,this.tmpVec3,r);var o=this.context.config,s=o.width,l=o.height;return new eI((a[0]+1)/2*s,(1-(a[1]+1)/2)*l)}},{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(e,t){return e.priority-t.priority})}},{key:"mapEvent",value:function(e){if(this.rootTarget){var t=this.mappingTable[e.type];if(t)for(var n=0,i=t.length;n<i;n++)t[n].fn(e);else console.warn("[EventService]: Event mapping not defined for ".concat(e.type))}}},{key:"dispatchEvent",value:function(e,t,n){if(n){e.eventPhase=e.AT_TARGET;var i=this.rootTarget.defaultView||null;e.currentTarget=i,this.notifyListeners(e,t)}else e.propagationStopped=!1,e.propagationImmediatelyStopped=!1,this.propagate(e,t)}},{key:"propagate",value:function(e,t){if(e.target){var n=e.composedPath();e.eventPhase=e.CAPTURING_PHASE;for(var i=n.length-1;i>=1;i--)if(e.currentTarget=n[i],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 r=n.indexOf(e.currentTarget);e.eventPhase=e.BUBBLING_PHASE;for(var a=r+1;a<n.length;a++)if(e.currentTarget=n[a],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return}}}},{key:"propagationPath",value:function(e){var t=[e],n=this.rootTarget.defaultView||null;if(n&&n===e)return t.unshift(n.document),t;for(var i=0;i<2048&&e!==this.rootTarget;i++)rf.isNode(e)&&e.parentNode&&(t.push(e.parentNode),e=e.parentNode);
1return n&&t.push(n),t}},{key:"hitTest",value:function(e){var t=e.viewportX,n=e.viewportY,i=this.context.config,r=i.width,a=i.height,o=i.disableHitTesting;return t<0||n<0||t>r||n>a?null:!o&&this.pickHandler(e)||this.rootTarget||null}},{key:"isNativeEventFromCanvas",value:function(e,t){var n,i=null==t?void 0:t.target;if(null!==(n=i)&&void 0!==n&&n.shadowRoot&&(i=t.composedPath()[0]),i){if(i===e)return!0;if(e&&e.contains)return e.contains(i)}return null!=t&&!!t.composedPath&&t.composedPath().indexOf(e)>-1}},{key:"getExistedHTML",value:function(e){if(e.nativeEvent.composedPath)for(var t=0,n=e.nativeEvent.composedPath();t<n.length;t++){var i=n[t],r=this.nativeHTMLMap.get(i);if(r)return r}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,n,i){var r=this.allocateEvent(rc);this.copyPointerData(e,r),this.copyMouseData(e,r),this.copyData(e,r),r.nativeEvent=e.nativeEvent,r.originalEvent=e;var a=this.getExistedHTML(r),o=this.context.contextService.getDomElement();return r.target=null!=n?n:a||this.isNativeEventFromCanvas(o,r.nativeEvent)&&this.pickTarget(r)||i,"string"==typeof t&&(r.type=t),r}},{key:"createWheelEvent",value:function(e){var t=this.allocateEvent(rh);this.copyWheelData(e,t),this.copyMouseData(e,t),this.copyData(e,t),t.nativeEvent=e.nativeEvent,t.originalEvent=e;var n=this.getExistedHTML(t),i=this.context.contextService.getDomElement();return t.target=n||this.isNativeEventFromCanvas(i,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(rh);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 n=this.allocateEvent(rc);return n.nativeEvent=e.nativeEvent,n.originalEvent=e.originalEvent,this.copyPointerData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.target=e.target,n.path=e.composedPath().slice(),n.type=null!=t?t:n.type,n}},{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=iA.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 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){t=null!=t?t:e.type;var n=e.eventPhase===e.CAPTURING_PHASE||e.eventPhase===e.AT_TARGET?"".concat(t,"capture"):t;this.notifyListeners(e,n),e.eventPhase===e.AT_TARGET&&this.notifyListeners(e,t)}},{key:"notifyListeners",value:function(e,t){var n=e.currentTarget.emitter,i=n._events[t];if(i){if("fn"in i)i.once&&n.removeListener(t,i.fn,void 0,!0),i.fn.call(e.currentTarget||i.context,e);else for(var r=0;r<i.length&&!e.propagationImmediatelyStopped;r++)i[r].once&&n.removeListener(t,i[r].fn,void 0,!0),i[r].fn.call(e.currentTarget||i[r].context,e)}}},{key:"findMountedTarget",value:function(e){if(!e)return null;for(var t=e[e.length-1],n=e.length-2;n>=0;n--){var i=e[n];if(i===this.rootTarget||rf.isNode(i)&&i.parentNode===t)t=e[n];else break}return t}},{key:"getCursor",value:function(e){for(var t=e;t;){var n=!!t.getAttribute&&t.getAttribute("cursor");if(n)return n;t=rf.isNode(t)&&t.parentNode}}}]),rg=(0,Z.Z)(function e(){(0,R.Z)(this,e)},[{key:"getOrCreateCanvas",value:function(e,t){if(this.canvas)return this.canvas;if(e||r$.offscreenCanvas)this.canvas=e||r$.offscreenCanvas,this.context=this.canvas.getContext("2d",(0,A.Z)({willReadFrequently:!0},t));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",(0,A.Z)({willReadFrequently:!0},t)),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(e){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",(0,A.Z)({willReadFrequently:!0},t))}return this.canvas.width=10,this.canvas.height=10,this.canvas}},{key:"getOrCreateContext",value:function(e,t){return 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}}]),ry=((k={})[k.CAMERA_CHANGED=0]="CAMERA_CHANGED",k[k.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",k[k.NONE=2]="NONE",k),rm=(0,Z.Z)(function e(t,n){(0,R.Z)(this,e),this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.hooks={init:new iY,initAsync:new iz,dirtycheck:new iW,cull:new iW,beginFrame:new iY,beforeRender:new iY,render:new iY,afterRe
1nder:new iY,endFrame:new iY,destroy:new iY,pick:new iH,pickSync:new iW,pointerDown:new iY,pointerUp:new iY,pointerMove:new iY,pointerOut:new iY,pointerOver:new iY,pointerWheel:new iY,pointerCancel:new iY,click:new iY},this.globalRuntime=t,this.context=n},[{key:"init",value:function(e){var t=this,n=(0,A.Z)((0,A.Z)({},this.globalRuntime),this.context);this.context.renderingPlugins.forEach(function(e){e.apply(n,t.globalRuntime)}),this.hooks.init.call(),0===this.hooks.initAsync.getCallbacksNum()?(this.inited=!0,e()):this.hooks.initAsync.promise().then(function(){t.inited=!0,e()}).catch(function(e){})}},{key:"getStats",value:function(){return this.stats}},{key:"disableDirtyRectangleRendering",value:function(){return!this.context.config.renderer.getConfig().enableDirtyRectangleRendering||this.context.renderingContext.renderReasons.has(ry.CAMERA_CHANGED)}},{key:"render",value:function(e,t,n){var i=this,r=e.getConfig(),a=this.context.renderingContext;if(this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0,this.globalRuntime.sceneGraphService.syncHierarchy(a.root),this.globalRuntime.sceneGraphService.notifyMutationObservers(e),a.renderReasons.size&&this.inited){a.dirtyRectangleRenderingDisabled=this.disableDirtyRectangleRendering();var o=1===a.renderReasons.size&&a.renderReasons.has(ry.CAMERA_CHANGED),s=!r.disableRenderHooks||!o;s&&this.renderDisplayObject(a.root,r,a),this.hooks.beginFrame.call(t),s&&a.renderListCurrentFrame.forEach(function(e){i.hooks.beforeRender.call(e),i.hooks.render.call(e),i.hooks.afterRender.call(e)}),this.hooks.endFrame.call(t),a.renderListCurrentFrame=[],a.renderReasons.clear(),n()}}},{key:"renderDisplayObject",value:function(e,t,n){for(var i=this,r=t.renderer.getConfig(),a=r.enableDirtyCheck,o=r.enableCulling,s=[e];s.length>0;){var l,u=s.pop();!function(e){var t=e.renderable,r=e.sortable,s=a?t.dirty||n.dirtyRectangleRenderingDisabled?e:null:e,l=null;s&&(l=o?i.hooks.cull.call(s,i.context.camera):s)&&(i.stats.rendered+=1,n.renderListCurrentFrame.push(l)),e.dirty(!1),r.renderOrder=i.zIndexCounter,i.zIndexCounter+=1,i.stats.total+=1,r.dirty&&(i.sort(e,r),r.dirty=!1,r.dirtyChildren=[],r.dirtyReason=void 0)}(u);for(var c=(null===(l=u.sortable)||void 0===l||null===(l=l.sorted)||void 0===l?void 0:l.length)>0?u.sortable.sorted:u.childNodes,h=c.length-1;h>=0;h--)s.push(c[h])}}},{key:"sort",value:function(e,t){var n,i;(null==t||null===(n=t.sorted)||void 0===n?void 0:n.length)>0&&t.dirtyReason!==e6.Z_INDEX_CHANGED?t.dirtyChildren.forEach(function(n){var i=t.sorted.indexOf(n);if(i>-1&&t.sorted.splice(i,1),e.childNodes.indexOf(n)>-1){if(0===t.sorted.length)t.sorted.push(n);else{var r=function(e,t){for(var n=0,i=e.length;n<i;){var r=n+i>>>1;0>iw(e[r],t)?n=r+1:i=r}return n}(t.sorted,n);t.sorted.splice(r,0,n)}}}):t.sorted=e.childNodes.slice().sort(iw),(null===(i=t.sorted)||void 0===i?void 0:i.length)>0&&0===e.childNodes.filter(function(e){return e.parsedStyle.zIndex}).length&&(t.sorted=[])}},{key:"destroy",value:function(){this.inited=!1,this.hooks.destroy.call()}},{key:"dirty",value:function(){this.context.renderingContext.renderReasons.add(ry.DISPLAY_OBJECT_CHANGED)}}]),rk=/\[\s*(.*)=(.*)\s*\]/,rE=(0,Z.Z)(function e(){(0,R.Z)(this,e)},[{key:"selectOne",value:function(e,t){var n=this;if(e.startsWith("."))return t.find(function(t){return((null==t?void 0:t.classList)||[]).indexOf(n.getIdOrClassname(e))>-1});if(e.startsWith("#"))return t.find(function(t){return t.id===n.getIdOrClassname(e)});if(e.startsWith("[")){var i=this.getAttribute(e),r=i.name,a=i.value;return r?t.find(function(e){return t!==e&&("name"===r?e.name===a:n.attributeToString(e,r)===a)}):null}return t.find(function(n){return t!==n&&n.nodeName===e})}},{key:"selectAll",value:function(e,t){var n=this;if(e.startsWith("."))return t.findAll(function(i){return t!==i&&((null==i?void 0:i.classList)||[]).indexOf(n.getIdOrClassname(e))>-1});if(e.startsWith("#"))return t.findAll(function(i){return t!==i&&i.id===n.getIdOrClassname(e)});if(e.startsWith("[")){var i=this.getAttribute(e),r=i.name,a=i.value;return r?t.findAll(function(e){return t!==e&&("name"===r?e.name===a:n.attributeToString(e,r)===a)}):[]}return t.findAll(function(n){return t!==n&&n.nodeName===e})}},{key:"is",value:function(e,t){if(e.startsWith("."))return t.className===this.getIdOrClassname(e);
1if(e.startsWith("#"))return t.id===this.getIdOrClassname(e);if(e.startsWith("[")){var n=this.getAttribute(e),i=n.name,r=n.value;return"name"===i?t.name===r:this.attributeToString(t,i)===r}return t.nodeName===e}},{key:"getIdOrClassname",value:function(e){return e.substring(1)}},{key:"getAttribute",value:function(e){var t=e.match(rk),n="",i="";return t&&t.length>2&&(n=t[1].replace(/"/g,""),i=t[2].replace(/"/g,"")),{name:n,value:i}}},{key:"attributeToString",value:function(e,t){if(!e.getAttribute)return"";var n=e.getAttribute(t);return(0,W.Z)(n)?"":n.toString?n.toString():""}}]),rx=((E={}).ATTR_MODIFIED="DOMAttrModified",E.INSERTED="DOMNodeInserted",E.MOUNTED="DOMNodeInsertedIntoDocument",E.REMOVED="removed",E.UNMOUNTED="DOMNodeRemovedFromDocument",E.REPARENT="reparent",E.DESTROY="destroy",E.BOUNDS_CHANGED="bounds-changed",E.CULLED="culled",E),rT=function(e){function t(e,n,i,r,a,o,s,l){var u;return(0,R.Z)(this,t),(u=(0,O.Z)(this,t,[null])).relatedNode=n,u.prevValue=i,u.newValue=r,u.attrName=a,u.attrChange=o,u.prevParsedValue=s,u.newParsedValue=l,u.type=e,u}return(0,I.Z)(t,e),(0,Z.Z)(t)}(rl);rT.ADDITION=2,rT.MODIFICATION=1,rT.REMOVAL=3;var rb=new rT(rx.REPARENT,null,"","","",0,"",""),rS=z.Ue(),rw=_.Ue(),rN=_.al(1,1,1),rP=U.create(),rM=z.Ue(),rC=_.Ue(),rA=U.create(),rR=V.Ue(),rZ=_.Ue(),rL=V.Ue(),rO=_.Ue(),rI=_.Ue(),rD=_.Ue(),rG=U.create(),r_=V.Ue(),rF=V.Ue(),rU=V.Ue(),rB=(0,Z.Z)(function e(t){(0,R.Z)(this,e),this.displayObjectDependencyMap=new WeakMap,this.runtime=t},[{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,n){var i=!1;e.parentNode&&(i=e.parentNode!==t,this.detach(e));var r=e.nodeName===ex.FRAGMENT,a=iR(t);e.parentNode=t;var o=r?e.childNodes:[e];(0,H.Z)(n)?o.forEach(function(e){t.childNodes.splice(n,0,e),e.parentNode=t}):o.forEach(function(e){t.childNodes.push(e),e.parentNode=t});var s=t.sortable;if((null!=s&&null!==(u=s.sorted)&&void 0!==u&&u.length||s.dirty||e.parsedStyle.zIndex)&&(-1===s.dirtyChildren.indexOf(e)&&s.dirtyChildren.push(e),s.dirty=!0,s.dirtyReason=e6.ADDED),!a){if(r)this.dirtyFragment(e);else{var l=e.transformable;l&&this.dirtyWorldTransform(e,l)}if(i){var u,c,h=(null===(c=t.ownerDocument)||void 0===c||null===(c=c.defaultView)||void 0===c||null===(c=c.getConfig())||void 0===c||null===(c=c.future)||void 0===c?void 0:c.experimentalCancelEventPropagation)===!0;e.dispatchEvent(rb,h,h)}}}},{key:"detach",value:function(e){if(e.parentNode){var t,n,i=e.transformable,r=e.parentNode.sortable;(null!=r&&null!==(t=r.sorted)&&void 0!==t&&t.length||null!==(n=e.style)&&void 0!==n&&n.zIndex)&&(-1===r.dirtyChildren.indexOf(e)&&r.dirtyChildren.push(e),r.dirty=!0,r.dirtyReason=e6.REMOVED);var a=e.parentNode.childNodes.indexOf(e);a>-1&&e.parentNode.childNodes.splice(a,1),i&&this.dirtyWorldTransform(e,i),e.parentNode=null}}},{key:"getLocalPosition",value:function(e){return e.transformable.localPosition}},{key:"getLocalRotation",value:function(e){return e.transformable.localRotation}},{key:"getLocalScale",value:function(e){return e.transformable.localScale}},{key:"getLocalSkew",value:function(e){return e.transformable.localSkew}},{key:"getLocalTransform",value:function(e){var t=e.transformable;return te(t),t.localTransform}},{key:"setLocalPosition",value:function(e,t){var n,i=!(arguments.length>2)||void 0===arguments[2]||arguments[2],r=e.transformable;rI[0]=t[0],rI[1]=t[1],rI[2]=null!==(n=t[2])&&void 0!==n?n:0,!_.fS(r.localPosition,rI)&&(_.JG(r.localPosition,rI),i&&this.dirtyLocalTransform(e,r))}},{key:"translateLocal",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;"number"==typeof t&&(t=_.al(t,n,i));var r=e.transformable;_.fS(t,rw)||(_.VC(t,t,r.localRotation),_.IH(r.localPosition,r.localPosition,t),this.dirtyLocalTransform(e,r))}},{key:"setLocalRotation",value:function(e,t,n,i,r){var a=!(arguments.length>5)||void 0===arguments[5]||arguments[5];"number"==typeof t&&(t=V.t8(rR,t,n,i,r));var o=e.transformable;V.JG(o.localRotation,t),a&&this.dirtyLocalTransform(e,o)}},{key:"rotateLocal",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;"number"==typeof t&&(t=_.al(t,n,i));var r=e.transformable;V.Su(rF,t[0],t[1],t[2]),V.dC(r.localRotation,r.localRotation,rF),this.dirtyLocalTransform(e,r)}},{key:"setLocalScale",value:function(e,t){var n,i=!(arguments.length>2)||void 0===arguments[2]||arguments[2],r=e.transformable;_.t8(rC,t[0],t[1],null!==(n=t[2])&&void 0!==n?n:r.localScale[2]),!_.fS(rC,r.localScale)&&(_.JG(r.localScale,rC),i&&this.dirtyLocalTransform(e,r))}},{key:"scaleLocal",value:function(e,t){var n,i=e.transformable;_.Jp(i.localScale,i.localScale,_.t8(rC,t[0],t[1],null!==(n=t[2])&&void 0!==n?n:1)),this.dirtyLocalTransform(e,i)}},{key:"setLocalSkew",value:function(e,t,n){var i=!(arguments.length>3)||void 0===arguments[3]||arguments[3];"number"==typeof t&&(t=z.t8(rM,t,n));var r=e.transformable;z.JG(r.localSkew,t),i&&this.dirtyLocalTransform(e,r)}},{key:"setLocalEulerAngles",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,r=!(arguments.length>4)||void 0===arguments[4]||arguments[4];"number"==typeof t&&(t=_.al(t,n,i));var a=e.transformable;V.Su(a.localRotation,t[0],t[1],t[2]),r&&this.dirtyLocalTransform(e,a)}},{key:"setLocalTransform",value:function(e,t){var n=U.getTranslation(rZ,t),i=U.getRotation(rL,t),r=U.getScaling(rO,t);this.setLocalScale(e,r,!1),this.setLocalPosition(e,n,!1),this.setLocalRotation(e,i,void 0,void 0,void 0,!1),this.dirtyLocalTransform(e,e.transformable)}},{key:"resetLocalTransform",value:function(e){this.setLocalScale(e,rN,!1),this.setLocalPosition(e,rw,!1),this.setLocalEulerAngles(e,rw,void 0,void 0,!1),this.setLocalSkew(e,rS,void 0,!1),this.dirtyLocalTransform(e,e.transformable)}},{key:"getPosition",value:function(e){var t=e.transformable;return U.getTranslation(t.position,this.getWorldTransform(e,t))}},{key:"getRotation",value:function(e){var t=e.transformable;return U.getRotation(t.rotation,this.getWorldTransform(e,t))}},{key:"getScale",value:function(e){var t=e.transformable;return U.getScaling(t.scaling,this.getWorldTransform(e,t))}},{key:"getOrigin",value:function(e){return e.getGeometryBounds(),e.transformable.origin}},{key:"getWorldTransform",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.transformable;return(t.localDirtyFlag||t.dirtyFlag)&&(e.parentNode&&e.parentNode.transformable&&this.getWorldTransform(e.parentNode),this.internalUpdateTransform(e)),t.worldTransform}},{key:"setPosition",value:function(e,t){var n,i=e.transformable;if(rD[0]=t[0],rD[1]=t[1],rD[2]=null!==(n=t[2])&&void 0!==n?n:0,!_.fS(this.getPosition(e),rD)){if(_.JG(i.position,rD),null!==e.parentNode&&e.parentNode.transformable){var r=e.parentNode.transformable;
1U.copy(rG,r.worldTransform),U.invert(rG,rG),_.fF(i.localPosition,rD,rG)}else _.JG(i.localPosition,rD);this.dirtyLocalTransform(e,i)}}},{key:"translate",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;"number"==typeof t&&(t=_.t8(rC,t,n,i)),_.fS(t,rw)||(_.IH(rC,this.getPosition(e),t),this.setPosition(e,rC))}},{key:"setRotation",value:function(e,t,n,i,r){var a=e.transformable;if("number"==typeof t&&(t=V.al(t,n,i,r)),null!==e.parentNode&&e.parentNode.transformable){var o=this.getRotation(e.parentNode);V.JG(rR,o),V.U_(rR,rR),V.Jp(a.localRotation,rR,t),V.Fv(a.localRotation,a.localRotation),this.dirtyLocalTransform(e,a)}else this.setLocalRotation(e,t)}},{key:"rotate",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;"number"==typeof t&&(t=_.al(t,n,i));var r=e.transformable;if(null!==e.parentNode&&e.parentNode.transformable){V.Su(rR,t[0],t[1],t[2]);var a=this.getRotation(e),o=this.getRotation(e.parentNode);V.JG(rU,o),V.U_(rU,rU),V.Jp(rR,rU,rR),V.Jp(r.localRotation,rR,a),V.Fv(r.localRotation,r.localRotation),this.dirtyLocalTransform(e,r)}else this.rotateLocal(e,t)}},{key:"setOrigin",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;"number"==typeof t&&(t=[t,n,i]);var r=e.transformable;if(t[0]!==r.origin[0]||t[1]!==r.origin[1]||t[2]!==r.origin[2]){var a=r.origin;a[0]=t[0],a[1]=t[1],a[2]=t[2]||0,this.dirtyLocalTransform(e,r)}}},{key:"setEulerAngles",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;"number"==typeof t&&(t=_.al(t,n,i));var r=e.transformable;if(null!==e.parentNode&&e.parentNode.transformable){V.Su(r.localRotation,t[0],t[1],t[2]);var a=this.getRotation(e.parentNode);V.JG(r_,V.U_(rR,a)),V.dC(r.localRotation,r.localRotation,r_),this.dirtyLocalTransform(e,r)}else this.setLocalEulerAngles(e,t)}},{key:"getGeometryBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.geometry;return n.dirty&&r$.styleValueRegistry.updateGeometry(e),(t?n.renderBounds:n.contentBounds||null)||new eR}},{key:"getTransformedGeometryBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,i=this.getGeometryBounds(e,t);if(!eR.isEmpty(i)){var r=n||new eR;return r.setFromTransformedAABB(i,this.getWorldTransform(e)),r}return null}},{key:"getBounds",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=e.renderable;if(!i.boundsDirty&&!n&&i.bounds)return i.bounds;if(!i.renderBoundsDirty&&n&&i.renderBounds)return i.renderBounds;var r=n?i.renderBounds:i.bounds,a=this.getTransformedGeometryBounds(e,n,r);if(e.childNodes.forEach(function(e){var i=t.getBounds(e,n);i&&(a?a.add(i):(a=r||new eR).update(i.center,i.halfExtents))}),a||(a=new eR),n){var o=iN(e);if(o){var s=o.parsedStyle.clipPath.getBounds(n);a?s&&(a=s.intersection(a)):a.update(s.center,s.halfExtents)}}return n?(i.renderBounds=a,i.renderBoundsDirty=!1):(i.bounds=a,i.boundsDirty=!1),a}},{key:"getLocalBounds",value:function(e){if(e.parentNode){var t=rP;e.parentNode.transformable&&(t=U.invert(rA,this.getWorldTransform(e.parentNode)));var n=this.getBounds(e);if(!eR.isEmpty(n)){var i=new eR;return i.setFromTransformedAABB(n,t),i}}return this.getBounds(e)}},{key:"getBoundingClientRect",value:function(e){var t,n,i=this.getGeometryBounds(e);eR.isEmpty(i)||(n=new eR).setFromTransformedAABB(i,this.getWorldTransform(e));var r=null===(t=e.ownerDocument)||void 0===t||null===(t=t.defaultView)||void 0===t?void 0:t.getContextService().getBoundingClientRect();if(n){var a=n.getMin(),o=(0,D.Z)(a,2),s=o[0],l=o[1],u=n.getMax(),c=(0,D.Z)(u,2),h=c[0],d=c[1];return new eD(s+((null==r?void 0:r.left)||0),l+((null==r?void 0:r.top)||0),h-s,d-l)}return new eD((null==r?void 0:r.left)||0,(null==r?void 0:r.top)||0,0,0)}},{key:"internalUpdateTransform",value:function(e){var t,n,i=null===(n=e.parentNode)||void 0===n?void 0:n.transformable;te(e.transformable),(t=e.transformable).dirtyFlag&&(i?U.multiply(t.worldTransform,i.worldTransform,t.localTransform):U.copy(t.worldTransform,t.localTransform),t.dirtyFlag=!1)}},{key:"internalUpdateElement",value:function(e,t){var n=(null===(s=e.ownerDocument)||void 0===s||null===(s=s.defaultView)||void 0===s||null===(s=s.getConfig())||void 0===s||null===(s=s.future)||void 0===s?void 0:s.experimentalAttributeUpdateOptimization)===!0,i=t[t.length-1],r=(null==i?void 0:i.transformDirty)||(null===(l=e.transformable)||void 0===l?void 0:l.localDirtyFlag);e.transformable&&((h=e.transformable).dirtyFlag||(h.dirtyFlag=r)),this.internalUpdateTransform(e),r&&(null===(d=e.dirty)||void 0===d||d.call(e,!0,!0));var a=(null===(u=e.renderable)||void 0===u?void 0:u.boundsDirty)||(null===(c=e.renderable)||void 0===c?void 0:c.renderBoundsDirty);if((r||a)&&(null==i?void 0:i.shapeUpdated)===!1&&n)for(var o=t.length-1;o>=0;){var s,l,u,c,h,d,v,f,p=t[o];if(p.shapeUpdated)break;null===(v=(f=p.node).dirty)||void 0===v||v.call(f,!0,!0),p.shapeUpdated=!0,o-=1}return r}},{key:"syncHierarchy",value:function(e){for(var t,n,i=[e],r=e.parentNode?[{node:e.parentNode,transformDirty:(null===(t=e.parentNode.transformable)||void 0===t?void 0:t.localDirtyFlag)||(null===(n=e.parentNode.transformable)||void 0===n?void 0:n.dirtyFlag),shapeUpdated:!1}]:[];i.length>0;){for(var a=i.pop(),o=r[r.length-1];r.length>0&&a.parentNode!==o.node;)o=r.pop();var s=this.internalUpdateElement(a,r);if(a.childNodes.length>0){for(var l=a.childNodes.length-1;l>=0;l--)i.push(a.childNodes[l]);r.push({node:a,transformDirty:s,shapeUpdated:!1})}}}},{key:"dirtyLocalTransform",value:function(e,t){iR(e)||t.localDirtyFlag||(t.localDirtyFlag=!0,t.dirtyFlag||this.dirtyWorldTransform(e,t))}},{key:"dirtyWorldTransform",value:function(e,t){this.dirtyWorldInternal(e,t),this.dirtyToRoot(e,!0)}},{key:"dirtyWorldInternal",value:function(e,t){var n,i=this,r=(null===(n=e.ownerDocument)||void 0===n||null===(n=n.defaultView)||void 0===n||null===(n=n.getConfig())||void 0===n||null===(n=n.future)||void 0===n?void 0:n.experimentalAttributeUpdateOptimization)===!0;t.dirtyFlag||(t.dirtyFlag=!0,e.dirty(!0,!0),r||e.childNodes.forEac
1h(function(e){var t=e.transformable;i.dirtyWorldInternal(e,t)}))}},{key:"dirtyToRoot",value:function(e){for(var t,n,i,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=e,o=(null===(t=e.ownerDocument)||void 0===t||null===(t=t.defaultView)||void 0===t||null===(t=t.getConfig())||void 0===t||null===(t=t.future)||void 0===t?void 0:t.experimentalAttributeUpdateOptimization)===!0;a&&(null===(n=(i=a).dirty)||void 0===n||n.call(i,!0,!0),!o);)a=a.parentNode;r&&e.forEach(function(e){var t;null===(t=e.dirty)||void 0===t||t.call(e,!0,!0)}),this.informDependentDisplayObjects(e);var s=e.mutations||[],l=s.find(function(e){return"attributes"===e.type&&e._boundsChangeData});l?l._boundsChangeData={affectChildren:l._boundsChangeData.affectChildren||r}:(l={type:"attributes",target:e,_boundsChangeData:{affectChildren:r}},s.push(l)),e.mutations=s}},{key:"dirtyFragment",value:function(e){var t,n=e.transformable;n&&(n.dirtyFlag=!0,n.localDirtyFlag=!0),null===(t=e.dirty)||void 0===t||t.call(e,!0,!0);for(var i=e.childNodes.length,r=0;r<i;r++)this.dirtyFragment(e.childNodes[r])}},{key:"notifyMutationObservers",value:function(e){var t=new Set;if(e.getRoot().forEach(function(e){(e.mutations||[]).forEach(function(n){"attributes"===n.type&&n._boundsChangeData&&(n._boundsChangeData.affectChildren?e.forEach(function(e){var i=(0,A.Z)({},n);i.target=e,t.add(i)}):t.add(n))}),e.mutations=void 0}),t.size>0){var n=new rd(rx.BOUNDS_CHANGED,{detail:Array.from(t)});e.dispatchEvent(n,!0,!0)}}},{key:"updateDisplayObjectDependency",value:function(e,t,n,i){if(t&&t!==n){var r=this.displayObjectDependencyMap.get(t);if(r&&r[e]){var a=r[e].indexOf(i);r[e].splice(a,1)}}if(n){var o=this.displayObjectDependencyMap.get(n);o||(this.displayObjectDependencyMap.set(n,{}),o=this.displayObjectDependencyMap.get(n)),o[e]||(o[e]=[]),o[e].push(i)}}},{key:"informDependentDisplayObjects",value:function(e){var t,n=this,i=this.displayObjectDependencyMap.get(e);if(i){var r=null===(t=e.ownerDocument)||void 0===t||null===(t=t.defaultView)||void 0===t||null===(t=t.getConfig())||void 0===t||null===(t=t.future)||void 0===t?void 0:t.experimentalCancelEventPropagation;
1Object.keys(i).forEach(function(e){i[e].forEach(function(t){n.dirtyToRoot(t,!0),t.dispatchEvent(new rT(rx.ATTR_MODIFIED,t,n,n,e,rT.MODIFICATION,n,n),r,r),t.isCustomElement&&t.isConnected&&t.attributeChangedCallback&&t.attributeChangedCallback(e,n,n)})})}}}]),rV=(0,Z.Z)(function e(t){if((0,R.Z)(this,e),t<=0)throw Error("LRU capacity must be a positive number.");this.capacity=t,this.cache=new Map},[{key:"get",value:function(e){if(this.cache.has(e)){var t=this.cache.get(e);return this.cache.delete(e),this.cache.set(e,t),t}}},{key:"put",value:function(e,t){if(this.cache.has(e)&&this.cache.delete(e),this.cache.set(e,t),this.cache.size>this.capacity){var n=this.cache.keys().next().value;this.cache.delete(n)}}},{key:"len",value:function(){return this.cache.size}},{key:"clear",value:function(){this.cache.clear()}}]),rz=[10,13],rH=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288],rY=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,rW=new RegExp("".concat(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source,"|").concat(/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source,"|").concat(/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source,"|").concat(/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source)),rX=new RegExp("".concat(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source,"|").concat(/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source,"|").concat(/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source,"|").concat(/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source)),rj=(0,Z.Z)(function e(t){var n=this;(0,R.Z)(this,e),this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(e,t){return!n.isBreakingSpace(t)&&!!(e&&(rX.exec(t)||rW.exec(e)))},this.trimByKinsokuShorui=function(e){var t=(0,L.Z)(e),n=t[t.length-2];if(!n)return e;var i=n[n.length-1];return t[t.length-2]=n.slice(0,-1),t[t.length-1]=i+t[t.length-1],t},this.runtime=t,this.charWidthCache=new rV(100)},[{key:"measureFont",value:function(e,t){if(this.fontMetricsCache[e])return this.fontMetricsCache[e];var n={ascent:0,descent:0,fontSize:0},i=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(t),r=this.runtime.offscreenCanvasCreator.getOrCreateContext(t,{willReadFrequently:!0});r.font=e;var a="|\xc9q\xc5M",o=Math.ceil(r.measureText(a).width),s=Math.ceil(r.measureText("M").width),l=2*s;s=1.4*s|0,i.width=o,i.height=l,r.fillStyle="#f00",r.fillRect(0,0,o,l),r.font=e,r.textBaseline="alphabetic",r.fillStyle="#000",r.fillText(a,0,s);var u=r.getImageData(0,0,o||1,l||1).data,c=u.length,h=4*o,d=0,v=0,f=!1;for(d=0;d<s;++d){for(var p=0;p<h;p+=4)if(255!==u[v+p]){f=!0;break}if(f)break;v+=h}for(n.ascent=s-d,v=c-h,f=!1,d=l;d>s;--d){for(var g=0;g<h;g+=4)if(255!==u[v+g]){f=!0;break}if(f)break;v-=h}return n.descent=d-s,n.fontSize=n.ascent+n.descent,this.fontMetricsCache[e]=n,n}},{key:"measureText",value:function(e,t,n){var i=t.fontSize,r=void 0===i?16:i,a=t.wordWrap,o=t.lineHeight,s=t.lineWidth,l=void 0===s?1:s,u=t.textBaseline,c=void 0===u?"alphabetic":u,h=t.textAlign,d=void 0===h?"start":h,v=t.letterSpacing,f=void 0===v?0:v,p=t.textPath;t.textPathSide,t.textPathStartOffset;var g=t.leading,y=void 0===g?0:g,m=iq(t),k=this.measureFont(m,n);0===k.fontSize&&(k.fontSize=r,k.ascent=r);var E=this.runtime.offscreenCanvasCreator.getOrCreateContext(n);E.font=m,t.isOverflowing=!1;var x=(void 0!==a&&a?this.wordWrap(e,t,n):e).split(/(?:\r\n|\r|\n)/),T=Array(x.length),b=0;if(p){p.getTotalLength();for(var S=0;S<x.length;S++)E.measureText(x[S]).width,x[S].length}else{for(var w=0;w<x.length;w++){var N=E.measureText(x[w]).width+(x[w].length-1)*f;T[w]=N,b=Math.max(b,N)}var P=b+l,M=o||k.fontSize+l,C=Math.max(M,k.fontSize+l)+(x.length-1)*(M+y);M+=y;var A=0;return"middle"===c?A=-C/2:"bottom"===c||"alphabetic"===c||"ideographic"===c?A=-C:("top"===c||"hanging"===c)&&(A=0),{font:m,width:P,height:C,lines:x,lineWidths:T,lineHeight:M,maxLineWidth:b,fontProperties:k,lineMetrics:T.map(function(e,t){var n=0;return"center"===d||"middle"===d?n-=e/2:("right"===d||"end"===d)&&(n-=e),new eD(n-l/2,A+t*M,e+l,M)})}}}},{key:"wordWrap",value:function(e,t,n){var i=this,r=Array.from(e);if(0===r.length)return"";var a=this,o=t.wordWrapWidth,s=t.letterSpacing,l=void 0===s?0:s,u=t.maxLines,c=void 0===u?1/0:u,h=t.textOverflow,d=this.runtime.offscreenCanvasCreator.getOrCreateContext(n),v=(void 0===o?0:o)+l,f="";"ellipsis"===h?f="...":h&&"clip"!==h&&(f=h);var p=[""],g=0,y=0,m=-1,k=iq(t),E=this.charWidthCache.get(k);E||(E=new rV(500),this.charWidthCache.put(k,E));var x=function(e){return i.getFromCache(e,l,E,d)},T=x(f);function b(e,t,n,i){for(;x(e)<i&&t<r.length-1&&!a.isNewline(r[t+1]);)t+=1,e+=r[t];for(;x(e)>i&&t>=n;)t-=1,e=e.slice(0,-1);return{lineTxt:e,txtLastCharIndex:t}}function S(e,t){if(!(T<=0)&&!(T>v)){if(!p[e]){p[e]=f;return}var n=b(p[e],t,m+1,v-T);p[e]=n.lineTxt+f}}for(var w=0;w<r.length;w++){var N=r[w],P=r[w-1],M=r[w+1],C=x(N);
1if(this.isNewline(N)){if(g+1>=c){w<r.length-1&&S(g,w-1),t.isOverflowing=!0;break}m=w-1,y=0,p[g+=1]="";continue}if(C>v){S(g,w-1),t.isOverflowing=!0;break}if(y>0&&y+C>v){var A=b(p[g],w-1,m+1,v);if(A.txtLastCharIndex!==w-1){if(p[g]=A.lineTxt,A.txtLastCharIndex===r.length-1)break;N=r[w=A.txtLastCharIndex+1],P=r[w-1],M=r[w+1],C=x(N)}if(g+1>=c){S(g,w-1),t.isOverflowing=!0;break}if(m=w-1,y=0,p[g+=1]="",this.isBreakingSpace(N))continue;this.canBreakInLastChar(N)||(p=this.trimToBreakable(p),y=this.sumTextWidthByCache(p[g]||"",x)),this.shouldBreakByKinsokuShorui(N,M)&&(p=this.trimByKinsokuShorui(p),y+=x(P||""))}y+=C,p[g]+=N}return p.join("\n")}},{key:"isBreakingSpace",value:function(e){return"string"==typeof e&&rH.indexOf(e.charCodeAt(0))>=0}},{key:"isNewline",value:function(e){return"string"==typeof e&&rz.indexOf(e.charCodeAt(0))>=0}},{key:"trimToBreakable",value:function(e){var t=(0,L.Z)(e),n=t[t.length-2],i=this.findBreakableIndex(n);if(-1===i||!n)return t;var r=n.slice(i,i+1),a=this.isBreakingSpace(r);return t[t.length-1]+=n.slice(i+1,n.length),t[t.length-2]=n.slice(0,i+(a?0:1)),t}},{key:"canBreakInLastChar",value:function(e){return!(e&&rY.test(e))}},{key:"sumTextWidthByCache",value:function(e,t){return e.split("").reduce(function(e,n){return e+t(n)},0)}},{key:"findBreakableIndex",value:function(e){for(var t=e.length-1;t>=0;t--)if(!rY.test(e[t]))return t;return -1}},{key:"getFromCache",value:function(e,t,n,i){var r=n.get(e);if("number"!=typeof r){var a=e.length*t;r=i.measureText(e).width+a,n.put(e,r)}return r}},{key:"clearCache",value:function(){this.fontMetricsCache={},this.charWidthCache.clear()}}]),r$={},rq=(T=new rr,b=new ri,x={},(0,ev.Z)((0,ev.Z)((0,ev.Z)((0,ev.Z)((0,ev.Z)((0,ev.Z)((0,ev.Z)((0,ev.Z)((0,ev.Z)((0,ev.Z)(x,ex.FRAGMENT,null),ex.CIRCLE,new i9),ex.ELLIPSE,new re),ex.RECT,T),ex.IMAGE,T),ex.GROUP,new ro),ex.LINE,new rt),ex.TEXT,new ra(r$)),ex.POLYLINE,b),ex.POLYGON,b),(0,ev.Z)((0,ev.Z)((0,ev.Z)(x,ex.PATH,new rn),ex.HTML,new rs),ex.MESH,null)),rK=(w=new is,N=new ic,S={},(0,ev.Z)((0,ev.Z)((0,ev.Z)((0,ev.Z)((0,ev.Z)((0,ev.Z)((0,ev.Z)((0,ev.Z)((0,ev.Z)((0,ev.Z)(S,tn.PERCENTAGE,null),tn.NUMBER,new ip),tn.ANGLE,new ia),tn.DEFINED_PATH,new io),tn.PAINT,w),tn.COLOR,w),tn.FILTER,new il),tn.LENGTH,N),tn.LENGTH_PERCENTAGE,N),tn.LENGTH_PERCENTAGE_12,new ih),(0,ev.Z)((0,ev.Z)((0,ev.Z)((0,ev.Z)((0,ev.Z)((0,ev.Z)((0,ev.Z)((0,ev.Z)((0,ev.Z)((0,ev.Z)(S,tn.LENGTH_PERCENTAGE_14,new id),tn.COORDINATE,new ic),tn.OFFSET_DISTANCE,new ig),tn.OPACITY_VALUE,new iy),tn.PATH,new im),tn.LIST_OF_POINTS,new ik),tn.SHADOW_BLUR,new iE),tn.TEXT,new ix),tn.TEXT_TRANSFORM,new iT),tn.TRANSFORM,new i6),(0,ev.Z)((0,ev.Z)((0,ev.Z)(S,tn.TRANSFORM_ORIGIN,new i7),tn.Z_INDEX,new i8),tn.MARKER,new iv));r$.CameraContribution=e5,r$.AnimationTimeline=null,r$.EasingFunction=null,r$.offscreenCanvasCreator=new rg,r$.sceneGraphSelector=new rE,r$.sceneGraphService=new rB(r$),r$.textService=new rj(r$),r$.geometryUpdaterFactory=rq,r$.CSSPropertySyntaxFactory=rK,r$.styleValueRegistry=new ii(r$),r$.layoutRegistry=null,r$.globalThis="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{},r$.enableStyleSyntax=!0,r$.enableSizeAttenuation=!1;var rJ=0,rQ=new rT(rx.INSERTED,null,"","","",0,"",""),r0=new rT(rx.REMOVED,null,"","","",0,"",""),r1=new rd(rx.DESTROY),r2=function(e){function t(){var e;(0,R.Z)(this,t);for(var n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];return(e=(0,O.Z)(this,t,[].concat(i))).entity=rJ++,e.transformable={dirtyFlag:!1,localDirtyFlag:!1,localPosition:[0,0,0],localRotation:[0,0,0,1],localScale:[1,1,1],localTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],localSkew:[0,0],position:[0,0,0],rotation:[0,0,0,1],scaling:[1,1,1],worldTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],origin:[0,0,0]},e.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},e.geometry={contentBounds:void 0,renderBounds:void 0,dirty:!0},e.cullable={strategy:e4.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},e.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},e.namespaceURI="g",e.scrollLeft=0,e.scrollTop=0,e.clientTop=0,e.clientLeft=0,e.style={},e.computedStyle={},e.parsedStyle={},e.attributes={},e}return(0,I.Z)(t,e),(0,Z.Z)(t,[{key:"dirty",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=arguments.length>1?arguments[1]:void 0;this.renderable.dirty=e,void 0!==t&&(this.renderable.boundsDirty=t,this.renderable.renderBoundsDirty=t,this.geometry.dirty=t)}},{key:"className",get:function(){return this.getAttribute("class")||""},set:function(e){this.setAttribute("class",e)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(e){return""!==e})}},{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 e=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[e+1]||null}return null}},{key:"previousSibling",get:function(){if(this.parentNode){var e=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[e-1]||null}return null}},{key:"cloneNode",value:function(e){throw Error(eG)}},{key:"appendChild",value:function(e,t){var n;if(e.destroyed)throw Error("Cannot append a destroyed element.");return r$.sceneGraphService.attach(e,this,t),null!==(n=this.ownerDocument)&&void 0!==n&&n.defaultView&&(iR(this)||e.nodeName!==ex.FRAGMENT?this.ownerDocument.defaultView.mountChildren(e):this.ownerDocument.defaultView.mountFragment(e)),this.isMutationObserved&&(rQ.relatedNode=this,e.dispatchEvent(rQ)),e}},{key:"insertBefore",value:function(e,t){if(t){e.parentElement&&e.parentElement.removeChild(e);var n=this.childNodes.indexOf(t);-1===n?this.appendChild(e):this.appendChild(e,n)}else this.appendChild(e);return e}},{key:"replaceChild",value:function(e,t){var n=this.childNodes.indexOf(t);return this.removeChild(t),this.appendChild(e,n),t}}
1,{key:"removeChild",value:function(e){var t,n,i=(null===(t=this.ownerDocument)||void 0===t||null===(t=t.defaultView)||void 0===t||null===(t=t.getConfig().future)||void 0===t?void 0:t.experimentalCancelEventPropagation)===!0;return r0.relatedNode=this,e.dispatchEvent(r0,i,i),null!==(n=e.ownerDocument)&&void 0!==n&&n.defaultView&&e.ownerDocument.defaultView.unmountChildren(e),r$.sceneGraphService.detach(e),e}},{key:"removeChildren",value:function(){for(var e=this.childNodes.length-1;e>=0;e--){var t=this.childNodes[e];this.removeChild(t)}}},{key:"destroyChildren",value:function(){for(var e=this.childNodes.length-1;e>=0;e--){var t=this.childNodes[e];t.childNodes.length>0&&t.destroyChildren(),t.destroy()}}},{key:"matches",value:function(e){return r$.sceneGraphService.matches(e,this)}},{key:"getElementById",value:function(e){return r$.sceneGraphService.querySelector("#".concat(e),this)}},{key:"getElementsByName",value:function(e){return r$.sceneGraphService.querySelectorAll('[name="'.concat(e,'"]'),this)}},{key:"getElementsByClassName",value:function(e){return r$.sceneGraphService.querySelectorAll(".".concat(e),this)}},{key:"getElementsByTagName",value:function(e){return r$.sceneGraphService.querySelectorAll(e,this)}},{key:"querySelector",value:function(e){return r$.sceneGraphService.querySelector(e,this)}},{key:"querySelectorAll",value:function(e){return r$.sceneGraphService.querySelectorAll(e,this)}},{key:"closest",value:function(e){var t=this;do{if(r$.sceneGraphService.matches(e,t))return t;t=t.parentElement}while(null!==t);return null}},{key:"find",value:function(e){var t=this,n=null;return this.forEach(function(i){return!(i!==t&&e(i))||(n=i,!1)}),n}},{key:"findAll",value:function(e){var t=this,n=[];return this.forEach(function(i){i!==t&&e(i)&&n.push(i)}),n}},{key:"after",value:function(){var e=this;if(this.parentNode){for(var t=this.parentNode.childNodes.indexOf(this),n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];i.forEach(function(n,i){var r;return null===(r=e.parentNode)||void 0===r?void 0:r.appendChild(n,t+i+1)})}}},{key:"before",value:function(){if(this.parentNode){for(var e=this.parentNode.childNodes.indexOf(this),t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];var r=n[0],a=(0,ep.Z)(n).slice(1);this.parentNode.appendChild(r,e),r.after.apply(r,(0,L.Z)(a))}}},{key:"replaceWith",value:function(){this.after.apply(this,arguments),this.remove()}},{key:"append",value:function(){for(var e=this,t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];n.forEach(function(t){return e.appendChild(t)})}},{key:"prepend",value:function(){for(var e=this,t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];n.forEach(function(t,n){return e.appendChild(t,n)})}},{key:"replaceChildren",value:function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)}},{key:"remove",value:function(){return this.parentNode?this.parentNode.removeChild(this):this}},{key:"destroy",value:function(){var e,t=(null===(e=this.ownerDocument)||void 0===e||null===(e=e.defaultView)||void 0===e||null===(e=e.getConfig().future)||void 0===e?void 0:e.experimentalCancelEventPropagation)===!0;this.destroyChildren(),this.dispatchEvent(r1,t,t),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0}},{key:"getGeometryBounds",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return r$.sceneGraphService.getGeometryBounds(this,e)}},{key:"getTransformedGeometryBounds",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return r$.sceneGraphService.getTransformedGeometryBounds(this,e)}},{key:"getBounds",value:function(){return r$.sceneGraphService.getBounds(this)}},{key:"getRenderBounds",value:function(){return r$.sceneGraphService.getBounds(this,!0)}},{key:"getLocalBounds",value:function(){return r$.sceneGraphService.getLocalBounds(this)}},{key:"getBoundingClientRect",value:function(){return r$.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(e){if("symbol"!=typeof e)return this.attributes[e]}},{key:"hasAttribute",value:function(e){return this.getAttributeNames().includes(e)}},{key:"hasAttributes",value:function(){return!!this.getAttributeNames().length}},{key:"removeAttribute",value:function(e){this.setAttribute(e,null),delete this.attributes[e]}},{key:"setAttribute",value:function(e,t){this.attributes[e]=t}},{key:"getAttributeNS",value:function(e,t){throw Error(eG)}},{key:"getAttributeNode",value:function(e){throw Error(eG)}},{key:"getAttributeNodeNS",value:function(e,t){throw Error(eG)}},{key:"hasAttributeNS",value:function(e,t){throw Error(eG)}},{key:"removeAttributeNS",value:function(e,t){throw Error(eG)}},{key:"removeAttributeNode",value:function(e){throw Error(eG)}},{key:"setAttributeNS",value:function(e,t,n){throw Error(eG)}},{key:"setAttributeNode",value:function(e){throw Error(eG)}},{key:"setAttributeNodeNS",value:function(e){throw Error(eG)}},{key:"toggleAttribute",value:function(e,t){throw Error(eG)}}])}(rf);function r3(e){return!!(null!=e&&e.nodeName)}var r5=r$.globalThis.Proxy?r$.globalThis.Proxy:function(){},r4=new rT(rx.ATTR_MODIFIED,null,null,null,null,rT.MODIFICATION,null,null),r6=_.Ue(),r7=V.Ue(),r8=function(e){function t(e){var n;return(0,R.Z)(this,t),(n=(0,O.Z)(this,t)).isCustomElement=!1,n.isMutationObserved=!1,n.activeAnimations=[],n.config=e,n.id=e.id||"",n.name=e.name||"",(e.className||e.class)&&(n.className=e.className||e.class),n.nodeName=e.type||ex.GROUP,e.initialParsedStyle&&Object.assign(n.parsedStyle,e.initialParsedStyle),n.initAttributes(e.style),r$.enableStyleSyntax&&(n.style=new r5({setProperty:function(e,t){n.setAttribute(e,t)},getPropertyValue:function(e){return n.getAttribute(e)},removeProperty:function(e){n.removeAttribute(e)},item:function(){return""}},{get:function(e,t){return void 0!==e[t]?e[t]:n.getAttribute(t)},set:function(e,t,i){return n.setAttribute(t,i),!0}})),n}return(0,I.Z)(t,e),(0,Z.Z)(t,[{key:"destroy",value:function(){(0,ef.Z)(t,"destroy",this,3)([]),this.getAnimations().forEac
1h(function(e){e.cancel()})}},{key:"cloneNode",value:function(e,t){var n=(0,A.Z)({},this.attributes);for(var i in n){var r=n[i];r3(r)&&"clipPath"!==i&&"offsetPath"!==i&&"textPath"!==i&&(n[i]=r.cloneNode(e)),t&&(n[i]=t(i,r))}var a=new this.constructor((0,A.Z)((0,A.Z)({},this.config),{},{style:n}));return a.setLocalTransform(this.getLocalTransform()),e&&this.children.forEach(function(t){if(!t.style.isMarker){var n=t.cloneNode(e);a.appendChild(n)}}),a}},{key:"initAttributes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};r$.styleValueRegistry.processProperties(this,e,{forceUpdateGeometry:!0}),this.dirty()}},{key:"setAttribute",value:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!(arguments.length>3)||void 0===arguments[3]||arguments[3];!(0,es.Z)(n)&&(i||n!==this.attributes[e])&&(this.internalSetAttribute(e,n,{memoize:r}),(0,ef.Z)(t,"setAttribute",this,3)([e,n]))}},{key:"setAttributes",value:function(e){var t,n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=i.skipDispatchAttrModifiedEvent,a=void 0!==r&&r;if(a||(t=(0,A.Z)({},this.attributes),n=(0,A.Z)({},this.parsedStyle)),r$.styleValueRegistry.processProperties(this,e,i),this.dirty(),!a)for(var o in e)this.dispatchAttrModifiedEvent(o,t[o],e[o],n[o])}},{key:"internalSetAttribute",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.attributes[e],r=this.parsedStyle[e];r$.styleValueRegistry.processProperties(this,(0,ev.Z)({},e,t),n),this.dirty(),this.dispatchAttrModifiedEvent(e,i,t,r)}},{key:"dispatchAttrModifiedEvent",value:function(e,t,n,i){var r,a=this.parsedStyle[e];if(this.isConnected){if(r4.relatedNode=this,r4.prevValue=t,r4.newValue=n,r4.attrName=e,r4.prevParsedValue=i,r4.newParsedValue=a,this.isMutationObserved)this.dispatchEvent(r4);else{var o,s=(null===(o=this.ownerDocument.defaultView.getConfig().future)||void 0===o?void 0:o.experimentalCancelEventPropagation)===!0;r4.target=this,this.ownerDocument.defaultView.dispatchEvent(r4,!0,s)}}(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&(null===(r=this.attributeChangedCallback)||void 0===r||r.call(this,e,t,n,i,a))}},{key:"getBBox",value:function(){var e=this.getBounds(),t=e.getMin(),n=(0,D.Z)(t,2),i=n[0],r=n[1],a=e.getMax(),o=(0,D.Z)(a,2);return new eD(i,r,o[0]-i,o[1]-r)}},{key:"setOrigin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return r$.sceneGraphService.setOrigin(this,eB(e,t,n,!1)),this}},{key:"getOrigin",value:function(){return r$.sceneGraphService.getOrigin(this)}},{key:"setPosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return r$.sceneGraphService.setPosition(this,eB(e,t,n,!1)),this}},{key:"setLocalPosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return r$.sceneGraphService.setLocalPosition(this,eB(e,t,n,!1)),this}},{key:"translate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return r$.sceneGraphService.translate(this,eB(e,t,n,!1)),this}},{key:"translateLocal",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return r$.sceneGraphService.translateLocal(this,eB(e,t,n,!1)),this}},{key:"getPosition",value:function(){return r$.sceneGraphService.getPosition(this)}},{key:"getLocalPosition",value:function(){return r$.sceneGraphService.getLocalPosition(this)}},{key:"scale",value:function(e,t,n){return this.scaleLocal(e,t,n)}},{key:"scaleLocal",value:function(e,t,n){return"number"==typeof e&&(t=t||e,n=n||e,e=eB(e,t,n,!1)),r$.sceneGraphService.scaleLocal(this,e),this}},{key:"setLocalScale",value:function(e,t,n){return"number"==typeof e&&(t=t||e,n=n||e,e=eB(e,t,n,!1)),r$.sceneGraphService.setLocalScale(this,e),this}},{key:"getLocalScale",value:function(){return r$.sceneGraphService.getLocalScale(this)}},{key:"getScale",value:function(){return r$.sceneGraphService.getScale(this)}},{key:"getEulerAngles",value:function(){var e=eW(r6,r$.sceneGraphService.getWorldTransform(this));return(0,D.Z)(e,3)[2]*eH}},{key:"getLocalEulerAngles",value:function(){var e=eW(r6,r$.sceneGraphService.getLocalRotation(this));return(0,D.Z)(e,3)[2]*eH}},{key:"setEulerAngles",value:function(e){return r$.sceneGraphService.setEulerAngles(this,0,0,e),this}},{key:"setLocalEulerAngles",value:function(e){return r$.sceneGraphService.setLocalEulerAngles(this,0,0,e),this}},{key:"rotateLocal",value:function(e,t,n){return(0,W.Z)(t)&&(0,W.Z)(n)?r$.sceneGraphService.rotateLocal(this,0,0,e):r$.sceneGraphService.rotateLocal(this,e,t,n),this}},{key:"rotate",value:function(e,t,n){return(0,W.Z)(t)&&(0,W.Z)(n)?r$.sceneGraphService.rotate(this,0,0,e):r$.sceneGraphService.rotate(this,e,t,n),this}},{key:"setRotation",value:function(e,t,n,i){return r$.sceneGraphService.setRotation(this,e,t,n,i),this}},{key:"setLocalRotation",value:function(e,t,n,i){return r$.sceneGraphService.setLocalRotation(this,e,t,n,i),this}},{key:"setLocalSkew",value:function(e,t){return r$.sceneGraphService.setLocalSkew(this,e,t),this}},{key:"getRotation",value:function(){return r$.sceneGraphService.getRotation(this)}},{key:"getLocalRotation",value:function(){return r$.sceneGraphService.getLocalRotation(this)}},{key:"getLocalSkew",value:function(){return r$.sceneGraphService.getLocalSkew(this)}},{key:"getLocalTransform",value:function(){return r$.sceneGraphService.getLocalTransform(this)}},{key:"getWorldTransform",value:function(){return r$.sceneGraphService.getWorldTransform(this)}},{key:"setLocalTransform",value:function(e){return r$.sceneGraphService.setLocalTransform(this,e),this}},{key:"resetLocalTransform",value:function(){r$.sceneGraphService.resetLocalTransform(this)}},{key:"getAnimations",value:function(){return this.activeAnimations}},{key:"animate",value:function(e,t){var n,i=null===(n=this.ownerDocument)||void 0===n?void 0:n.timeline;return i?i.play(this,e,t):null}},{key:"isVisible",value:function(){var e;return(null===(e=this.parsedStyle)||void 0===e?void 0:e.visibility)!=="hidden"}},{key:"interactive",get:function(){return this.isInteractive()},set:function(e){this.style.pointerEvents=e?"auto":"none"}},{key:"isInteractive",value:function(){var e;return(null===(e=this.parsedStyle)||void 0===e?void 0:e.pointerEvents)!=="none"}},{key:"isCulled",value:function(){return!!(this.cullable&&this.cullable.enable&&!this.cullable.visible)}},{key:"toFront",value:function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,(0,L.Z)(this.parentNode.children.map(function(e){return Number(e.style.zIndex)})))+1),this}},{key:"toBack",value:function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,(0,L.Z)(this.parentNode.children.map(function(e){return Number(e.style.zIndex)})))-1),this}},{key:"getConfig",value:function(){return this.config}},{key:"attr",value:function(){for(var e=this,t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];var r=n[0],a=n[1];return r?(0,eh.Z)(r)?(Object.keys(r).forEach(function(t){e.setAttribute(t,r[t])}),this):2===n.length?(this.setAttribute(r,a),this):this.attributes[r]:this.attributes}},{key:"getMatrix",value:function(e){var t,n,i,r=e||this.getWorldTransform(),a=U.getTranslation(r6,r),o=(0,D.Z)(a,2),s=o[0],l=o[1],u=U.getScaling(r6,r),c=(0,D.Z)(u,2),h=c[0],d=c[1],v=eW(r6,U.getRotation(r7,r)),f=(0,D.Z)(v,3),p=f[0],g=f[2];return n=Math.cos(t=p||g),i=Math.sin(t),B.al(h*n,d*i,0,-h*i,d*n,0,s,l,1)}},{key:"getLocalMatrix",value:function(){return this.getMatrix(this.getLocalTransform())}},{key:"setMatrix",value:function(e){var t=eX(e),n=(0,D.Z)(t,5),i=n[0],r=n[1],a=n[2],o=n[3],s=n[4];this.setEulerAngles(s).setPosition(i,r).setLocalScale(a,o)}},{key:"setLocalMatrix",value:function(e){var t=eX(e),n=(0,D.Z)(t,5),i=n[0],r=n[1],a=n[2],o=n[3],s=n[4];this.setLocalEulerAngles(s).setLocalPosition(i,r).setLocalScale(a,o)}},{key:"show",value:function(){this.forEach(function(e){e.style.visibility="visible"})}},{key:"hide",value:function(){this.forEach(function(e){e.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(e){return this.children[e]||null}},{key:"add",value:function(e,t){return this.appendChild(e,t)}},{key:"set",value:function(e,t){this.config[e]=t}},{key:"get",value:function(e){return this.config[e]}},{key:"moveTo",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.setPosition(e,t,n),this}},{key:"move",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.setPosition(e,t,n),this}},{key:"setZIndex",value:function(e){return this.style.zIndex=e,this}}])}(r2);r8.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","display","draggable","droppable","fill","fillOpacity","fillRule","filter","increasedLineWi
1dthForHitTesting","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 r9=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,R.Z)(this,t),(0,O.Z)(this,t,[(0,A.Z)({type:ex.CIRCLE},e)])}return(0,I.Z)(t,e),(0,Z.Z)(t)}(r8);r9.PARSED_STYLE_LIST=new Set([].concat((0,L.Z)(r8.PARSED_STYLE_LIST),["cx","cy","cz","r","isBillboard","isSizeAttenuation"]));var ae=["style"],at=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.style,r=(0,eE.Z)(n,ae);return(0,R.Z)(this,t),(e=(0,O.Z)(this,t,[(0,A.Z)({style:i},r)])).isCustomElement=!0,e}return(0,I.Z)(t,e),(0,Z.Z)(t)}(r8);at.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var an=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,R.Z)(this,t),(0,O.Z)(this,t,[(0,A.Z)({type:ex.ELLIPSE},e)])}return(0,I.Z)(t,e),(0,Z.Z)(t)}(r8);an.PARSED_STYLE_LIST=new Set([].concat((0,L.Z)(r8.PARSED_STYLE_LIST),["cx","cy","cz","rx","ry","isBillboard","isSizeAttenuation"])),function(e){function t(){return(0,R.Z)(this,t),(0,O.Z)(this,t,[{type:ex.FRAGMENT}])}return(0,I.Z)(t,e),(0,Z.Z)(t)}(r8).PARSED_STYLE_LIST=new Set(["class","className"]);var ai=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,R.Z)(this,t),(0,O.Z)(this,t,[(0,A.Z)({type:ex.GROUP},e)])}return(0,I.Z)(t,e),(0,Z.Z)(t)}(r8);ai.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var ar=["style"],aa=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.style,r=(0,eE.Z)(n,ar);return(0,R.Z)(this,t),(e=(0,O.Z)(this,t,[(0,A.Z)({type:ex.HTML,style:i},r)])).cullable.enable=!1,e}return(0,I.Z)(t,e),(0,Z.Z)(t,[{key:"getDomElement",value:function(){return this.parsedStyle.$el}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"getLocalBounds",value:function(){if(this.parentNode){var e=U.invert(U.create(),this.parentNode.getWorldTransform()),t=this.getBounds();if(!eR.isEmpty(t)){var n=new eR;return n.setFromTransformedAABB(t,e),n}}return this.getBounds()}}])}(r8);aa.PARSED_STYLE_LIST=new Set([].concat((0,L.Z)(r8.PARSED_STYLE_LIST),["x","y","$el","innerHTML","width","height"]));var ao=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,R.Z)(this,t),(0,O.Z)(this,t,[(0,A.Z)({type:ex.IMAGE},e)])}return(0,I.Z)(t,e),(0,Z.Z)(t)}(r8);ao.PARSED_STYLE_LIST=new Set([].concat((0,L.Z)(r8.PARSED_STYLE_LIST),["x","y","z","src","width","height","isBillboard","billboardRotation","isSizeAttenuation","keepAspectRatio"]));var as=["style"],al=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.style,r=(0,eE.Z)(n,as);(0,R.Z)(this,t),(e=(0,O.Z)(this,t,[(0,A.Z)({type:ex.LINE,style:(0,A.Z)({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},i)},r)])).markerStartAngle=0,e.markerEndAngle=0;var a=e.parsedStyle,o=a.markerStart,s=a.markerEnd;return o&&r3(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),s&&r3(s)&&(e.markerEndAngle=s.getLocalEulerAngles(),e.appendChild(s)),e.transformMarker(!0),e.transformMarker(!1),e}return(0,I.Z)(t,e),(0,Z.Z)(t,[{key:"attributeChangedCallback",value:function(e,t,n,i,r){"x1"===e||"y1"===e||"x2"===e||"y2"===e||"markerStartOffset"===e||"markerEndOffset"===e?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===e?(i&&r3(i)&&(this.markerStartAngle=0,i.remove()),r&&r3(r)&&(this.markerStartAngle=r.getLocalEulerAngles(),this.appendChild(r),this.transformMarker(!0))):"markerEnd"===e&&(i&&r3(i)&&(this.markerEndAngle=0,i.remove()),r&&r3(r)&&(this.markerEndAngle=r.getLocalEulerAngles(),this.appendChild(r),this.transformMarker(!1)))}},{key:"transformMarker",value:function(e){var t,n,i,r,a,o,s=this.parsedStyle,l=s.markerStart,u=s.markerEnd,c=s.markerStartOffset,h=s.markerEndOffset,d=s.x1,v=s.x2,f=s.y1,p=s.y2,g=e?l:u;if(g&&r3(g)){var y=0;e?(i=d,r=f,t=v-d,n=p-f,a=c||0,o=this.markerStartAngle):(i=v,r=p,t=d-v,n=f-p,a=h||0,o=this.markerEndAngle),y=Math.atan2(n,t),g.setLocalEulerAngles(180*y/Math.PI+o),g.setLocalPosition(i+Math.cos(y)*a,r+Math.sin(y)*a)}}},{key:"getPoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.parsedStyle,i=n.x1,r=n.y1,a=n.x2,o=n.y2,s=(0,eg.U4)(i,r,a,o,e),l=s.x,u=s.y,c=_.fF(_.Ue(),_.al(l,u,0),t?this.getWorldTransform():this.getLocalTransform());return new eI(c[0],c[1])}},{key:"getPointAtLength",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getPoint(e/this.getTotalLength(),t)}},{key:"getTotalLength",value:function(){var e=this.parsedStyle,t=e.x1,n=e.y1,i=e.x2,r=e.y2;return(0,eg.Xk)(t,n,i,r)}}])}(r8);al.PARSED_STYLE_LIST=new Set([].concat((0,L.Z)(r8.PARSED_STYLE_LIST),["x1","y1","x2","y2","z1","z2","isBillboard","isSizeAttenuation","markerStart","markerEnd","markerStartOffset","markerEndOffset"]));var au=["style"],ac=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.style,r=(0,eE.Z)(n,au);(0,R.Z)(this,t),(e=(0,O.Z)(this,t,[(0,A.Z)({type:ex.PATH,style:i,initialParsedStyle:{miterLimit:4,d:(0,A.Z)({},tt)}},r)])).markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[];var a=e.parsedStyle,o=a.markerStart,s=a.markerEnd,l=a.markerMid;return o&&r3(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),l&&r3(l)&&e.placeMarkerMid(l),s&&r3(s)&&(e.markerEndAngle=s.getLocalEulerAngles(),e.appendChild(s)),e.transformMarker(!0),e.transformMarker(!1),e}return(0,I.Z)(t,e),(0,Z.Z)(t,[{key:"attributeChangedCallback",value:function(e,t,n,i,r){"d"===e?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===e||"markerEndOffset"===e?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===e?(i&&r3(i)&&(this.markerStartAngle=0,i.remove()),r&&r3(r)&&(this.markerStartAngle=r.getLocalEulerAngles(),this.appendChild(r),this.transformMarker(!0))):"markerEnd"===e?(i&&r3(i)&&(this.markerEndAngle=0,i.remove()),r&&r3(r)&&(this.markerEndAngle=r.getLocalEulerAngles(),this.appendChild(r),this.transformMarker(!1))):"markerMid"===e&&this.placeMarkerMid(r)}},{key:"transformMarker",value:function(e){var t,n,i,r,a,o,s=this.parsedStyle,l=s.markerStart,u=s.markerEnd,c=s.markerStartOffset,h=s.markerEndOffset,d=e?l:u;
1if(d&&r3(d)){var v=0;if(e){var f=this.getStartTangent(),p=(0,D.Z)(f,2),g=p[0],y=p[1];i=y[0],r=y[1],t=g[0]-y[0],n=g[1]-y[1],a=c||0,o=this.markerStartAngle}else{var m=this.getEndTangent(),k=(0,D.Z)(m,2),E=k[0],x=k[1];i=x[0],r=x[1],t=E[0]-x[0],n=E[1]-x[1],a=h||0,o=this.markerEndAngle}v=Math.atan2(n,t),d.setLocalEulerAngles(180*v/Math.PI+o),d.setLocalPosition(i+Math.cos(v)*a,r+Math.sin(v)*a)}}},{key:"placeMarkerMid",value:function(e){var t=this.parsedStyle.d.segments;if(this.markerMidList.forEach(function(e){e.remove()}),e&&r3(e))for(var n=1;n<t.length-1;n++){var i=(0,D.Z)(t[n].currentPoint,2),r=i[0],a=i[1],o=1===n?e:e.cloneNode(!0);this.markerMidList.push(o),this.appendChild(o),o.setLocalPosition(r,a)}}},{key:"getTotalLength",value:function(){return nM(this)}},{key:"getPointAtLength",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.parsedStyle.d.absolutePath,i=(0,ed.r)(n,e),r=i.x,a=i.y,o=_.fF(_.Ue(),_.al(r,a,0),t?this.getWorldTransform():this.getLocalTransform());return new eI(o[0],o[1])}},{key:"getPoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getPointAtLength(e*nM(this),t)}},{key:"getStartTangent",value:function(){var e=this.parsedStyle.d.segments,t=[];if(e.length>1){var n=e[0].currentPoint,i=e[1].currentPoint,r=e[1].startTangent;t=[],r?t.push([n[0]-r[0],n[1]-r[1]]):t.push([i[0],i[1]]),t.push([n[0],n[1]])}return t}},{key:"getEndTangent",value:function(){var e=this.parsedStyle.d.segments,t=e.length,n=[];if(t>1){var i=e[t-2].currentPoint,r=e[t-1].currentPoint,a=e[t-1].endTangent;n=[],a?n.push([r[0]-a[0],r[1]-a[1]]):n.push([i[0],i[1]]),n.push([r[0],r[1]])}return n}}])}(r8);ac.PARSED_STYLE_LIST=new Set([].concat((0,L.Z)(r8.PARSED_STYLE_LIST),["d","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard","isSizeAttenuation"]));var ah=["style"],ad=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.style,r=(0,eE.Z)(n,ah);(0,R.Z)(this,t),(e=(0,O.Z)(this,t,[(0,A.Z)({type:ex.POLYGON,style:i,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},r)])).markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[];var a=e.parsedStyle,o=a.markerStart,s=a.markerEnd,l=a.markerMid;return o&&r3(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),l&&r3(l)&&e.placeMarkerMid(l),s&&r3(s)&&(e.markerEndAngle=s.getLocalEulerAngles(),e.appendChild(s)),e.transformMarker(!0),e.transformMarker(!1),e}return(0,I.Z)(t,e),(0,Z.Z)(t,[{key:"attributeChangedCallback",value:function(e,t,n,i,r){"points"===e?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===e||"markerEndOffset"===e?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===e?(i&&r3(i)&&(this.markerStartAngle=0,i.remove()),r&&r3(r)&&(this.markerStartAngle=r.getLocalEulerAngles(),this.appendChild(r),this.transformMarker(!0))):"markerEnd"===e?(i&&r3(i)&&(this.markerEndAngle=0,i.remove()),r&&r3(r)&&(this.markerEndAngle=r.getLocalEulerAngles(),this.appendChild(r),this.transformMarker(!1))):"markerMid"===e&&this.placeMarkerMid(r)}},{key:"transformMarker",value:function(e){var t,n,i,r,a,o,s=this.parsedStyle,l=s.markerStart,u=s.markerEnd,c=s.markerStartOffset,h=s.markerEndOffset,d=(s.points||{}).points,v=e?l:u;if(v&&r3(v)&&d){var f=0;if(i=d[0][0],r=d[0][1],e)t=d[1][0]-d[0][0],n=d[1][1]-d[0][1],a=c||0,o=this.markerStartAngle;else{var p=d.length;this.parsedStyle.isClosed?(t=d[p-1][0]-d[0][0],n=d[p-1][1]-d[0][1]):(i=d[p-1][0],r=d[p-1][1],t=d[p-2][0]-d[p-1][0],n=d[p-2][1]-d[p-1][1]),a=h||0,o=this.markerEndAngle}f=Math.atan2(n,t),v.setLocalEulerAngles(180*f/Math.PI+o),v.setLocalPosition(i+Math.cos(f)*a,r+Math.sin(f)*a)}}},{key:"placeMarkerMid",value:function(e){var t=(this.parsedStyle.points||{}).points;if(this.markerMidList.forEach(function(e){e.remove()}),this.markerMidList=[],e&&r3(e)&&t)for(var n=1;n<(this.parsedStyle.isClosed?t.length:t.length-1);n++){var i=t[n][0],r=t[n][1],a=1===n?e:e.cloneNode(!0);this.markerMidList.push(a),this.appendChild(a),a.setLocalPosition(i,r)}}}])}(r8);ad.PARSED_STYLE_LIST=new Set([].concat((0,L.Z)(r8.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isClosed","isBillboard","isSizeAttenuation"]));var av=["style"],af=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.style,i=(0,eE.Z)(e,av);return(0,R.Z)(this,t),(0,O.Z)(this,t,[(0,A.Z)({type:ex.POLYLINE,style:n,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}
1},i)])}return(0,I.Z)(t,e),(0,Z.Z)(t,[{key:"getTotalLength",value:function(){return 0===this.parsedStyle.points.totalLength&&(this.parsedStyle.points.totalLength=(0,eg.hE)(this.parsedStyle.points.points)),this.parsedStyle.points.totalLength}},{key:"getPointAtLength",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getPoint(e/this.getTotalLength(),t)}},{key:"getPoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.parsedStyle.points.points;if(0===this.parsedStyle.points.segments.length){var i,r,a=[],o=0,s=this.getTotalLength();n.forEach(function(e,t){n[t+1]&&((i=[0,0])[0]=o/s,r=(0,eg.Xk)(e[0],e[1],n[t+1][0],n[t+1][1]),o+=r,i[1]=o/s,a.push(i))}),this.parsedStyle.points.segments=a}var l=0,u=0;this.parsedStyle.points.segments.forEach(function(t,n){e>=t[0]&&e<=t[1]&&(l=(e-t[0])/(t[1]-t[0]),u=n)});var c=(0,eg.U4)(n[u][0],n[u][1],n[u+1][0],n[u+1][1],l),h=c.x,d=c.y,v=_.fF(_.Ue(),_.al(h,d,0),t?this.getWorldTransform():this.getLocalTransform());return new eI(v[0],v[1])}},{key:"getStartTangent",value:function(){var e=this.parsedStyle.points.points,t=[];return t.push([e[1][0],e[1][1]]),t.push([e[0][0],e[0][1]]),t}},{key:"getEndTangent",value:function(){var e=this.parsedStyle.points.points,t=e.length-1,n=[];return n.push([e[t-1][0],e[t-1][1]]),n.push([e[t][0],e[t][1]]),n}}])}(ad);af.PARSED_STYLE_LIST=new Set([].concat((0,L.Z)(ad.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard"]));var ap=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,R.Z)(this,t),(0,O.Z)(this,t,[(0,A.Z)({type:ex.RECT},e)])}return(0,I.Z)(t,e),(0,Z.Z)(t)}(r8);ap.PARSED_STYLE_LIST=new Set([].concat((0,L.Z)(r8.PARSED_STYLE_LIST),["x","y","z","width","height","isBillboard","isSizeAttenuation","radius"]));var ag=["style"],ay=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.style,i=(0,eE.Z)(e,ag);return(0,R.Z)(this,t),(0,O.Z)(this,t,[(0,A.Z)({type:ex.TEXT,style:(0,A.Z)({fill:"black"},n)},i)])}return(0,I.Z)(t,e),(0,Z.Z)(t,[{key:"getComputedTextLength",value:function(){var e;return this.getGeometryBounds(),(null===(e=this.parsedStyle.metrics)||void 0===e?void 0:e.maxLineWidth)||0}},{key:"getLineBoundingRects",value:function(){var e;return this.getGeometryBounds(),(null===(e=this.parsedStyle.metrics)||void 0===e?void 0:e.lineMetrics)||[]}},{key:"isOverflowing",value:function(){return this.getGeometryBounds(),!!this.parsedStyle.isOverflowing}}])}(r8);ay.PARSED_STYLE_LIST=new Set([].concat((0,L.Z)(r8.PARSED_STYLE_LIST),["x","y","z","isBillboard","billboardRotation","isSizeAttenuation","text","textAlign","textBaseline","fontStyle","fontSize","fontFamily","fontWeight","fontVariant","lineHeight","letterSpacing","leading","wordWrap","wordWrapWidth","maxLines","textOverflow","isOverflowing","textPath","textDecorationLine","textDecorationColor","textDecorationStyle","textDecorationThickness","textPathSide","textPathStartOffset","metrics","dx","dy"]));var am=(0,Z.Z)(function e(){(0,R.Z)(this,e),this.registry={},this.define(ex.CIRCLE,r9),this.define(ex.ELLIPSE,an),this.define(ex.RECT,ap),this.define(ex.IMAGE,ao),this.define(ex.LINE,al),this.define(ex.GROUP,ai),this.define(ex.PATH,ac),this.define(ex.POLYGON,ad),this.define(ex.POLYLINE,af),this.define(ex.TEXT,ay),this.define(ex.HTML,aa)},[{key:"define",value:function(e,t){this.registry[e]=t}},{key:"get",value:function(e){return this.registry[e]}}]),ak={number:function(e){return new tJ(e)},percent:function(e){return new tJ(e,"%")},px:function(e){return new tJ(e,"px")},em:function(e){return new tJ(e,"em")},rem:function(e){return new tJ(e,"rem")},deg:function(e){return new tJ(e,"deg")},grad:function(e){return new tJ(e,"grad")},rad:function(e){return new tJ(e,"rad")},turn:function(e){return new tJ(e,"turn")},s:function(e){return new tJ(e,"s")},ms:function(e){return new tJ(e,"ms")},registerProperty:function(e){var t=e.name,n=e.inherits,i=e.interpolable,r=e.initialValue,a=e.syntax;r$.styleValueRegistry.registerMetadata({n:t,inh:n,int:i,d:r,syntax:a})},registerLayout:function(e,t){r$.layoutRegistry.registerLayout(e,t)}},aE=function(e){var t,n;function i(){(0,R.Z)(this,i),(e=(0,O.Z)(this,i)).defaultView=null,e.ownerDocument=null,e.nodeName="document";try{e.timeline=new r$.AnimationTimeline(e)}catch(e){}var e,t={};return n9.forEach(function(e){var n=e.n,i=e.inh,r=e.d;i&&r&&(t[n]=(0,ec.Z)(r)?r(ex.GROUP):r)}),e.documentElement=new ai({id:"g-root",style:t}),e.documentElement.ownerDocument=e,e.documentElement.parentNode=e,e.childNodes=[e.documentElement],e}return(0,I.Z)(i,e),(0,Z.Z)(i,[{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(e,t){if("svg"===e)return this.documentElement;var n=this.defaultView.customElements.get(e);n||(console.warn("Unsupported tagName: ",e),n="tspan"===e?ay:ai);var i=new n(t);return i.ownerDocument=this,i}},{key:"createElementNS",value:function(e,t,n){return this.createElement(t,n)}},{key:"cloneNode",value:function(e){throw Error(eG)}},{key:"destroy",value:function(){try{this.documentElement.destroyChildren(),this.timeline.destroy()}catch(e){}}},{key:"elementsFromBBox",value:function(e,t,n,i){var r=[],a=function(o){if
1(!(!o.isInteractive()||o.isCulled())){var s=o.parsedStyle.pointerEvents;if(!["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(void 0===s?"auto":s)||o.isVisible()){var l=o.getTransformedGeometryBounds(!0);l&&!eR.isEmpty(l)&&l.max[0]>=e&&l.min[0]<=n&&l.max[1]>=t&&l.min[1]<=i&&r.push(o)}o.childNodes&&o.childNodes.forEach(function(e){e instanceof r8&&a(e)})}};return a(this.documentElement),r.sort(function(e,t){return t.sortable.renderOrder-e.sortable.renderOrder}),r}},{key:"elementFromPointSync",value:function(e,t){var n=this.defaultView.canvas2Viewport({x:e,y:t}),i=n.x,r=n.y,a=this.defaultView.getConfig(),o=a.width,s=a.height;if(i<0||r<0||i>o||r>s)return null;var l=this.defaultView.viewport2Client({x:i,y:r}),u=l.x,c=l.y,h=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:e,y:t,viewportX:i,viewportY:r,clientX:u,clientY:c},picked:[]}).picked;return h&&h[0]||this.documentElement}},{key:"elementFromPoint",value:(t=(0,em.Z)((0,ey.Z)().mark(function e(t,n){var i,r,a,o,s,l,u,c,h,d;return(0,ey.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(i=this.defaultView.canvas2Viewport({x:t,y:n})).x,a=i.y,s=(o=this.defaultView.getConfig()).width,l=o.height,!(r<0||a<0||r>s||a>l)){e.next=1;break}return e.abrupt("return",null);case 1:return c=(u=this.defaultView.viewport2Client({x:r,y:a})).x,h=u.y,e.next=2,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:t,y:n,viewportX:r,viewportY:a,clientX:c,clientY:h},picked:[]});case 2:return d=e.sent.picked,e.abrupt("return",d&&d[0]||this.documentElement);case 3:case"end":return e.stop()}},e,this)})),function(e,n){return t.apply(this,arguments)})},{key:"elementsFromPointSync",value:function(e,t){var n=this.defaultView.canvas2Viewport({x:e,y:t}),i=n.x,r=n.y,a=this.defaultView.getConfig(),o=a.width,s=a.height;if(i<0||r<0||i>o||r>s)return[];var l=this.defaultView.viewport2Client({x:i,y:r}),u=l.x,c=l.y,h=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:e,y:t,viewportX:i,viewportY:r,clientX:u,clientY:c},picked:[]}).picked;return h[h.length-1]!==this.documentElement&&h.push(this.documentElement),h}},{key:"elementsFromPoint",value:(n=(0,em.Z)((0,ey.Z)().mark(function e(t,n){var i,r,a,o,s,l,u,c,h,d;return(0,ey.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(i=this.defaultView.canvas2Viewport({x:t,y:n})).x,a=i.y,s=(o=this.defaultView.getConfig()).width,l=o.height,!(r<0||a<0||r>s||a>l)){e.next=1;break}return e.abrupt("return",[]);case 1:return c=(u=this.defaultView.viewport2Client({x:r,y:a})).x,h=u.y,e.next=2,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:t,y:n,viewportX:r,viewportY:a,clientX:c,clientY:h},picked:[]});case 2:return(d=e.sent.picked)[d.length-1]!==this.documentElement&&d.push(this.documentElement),e.abrupt("return",d);case 3:case"end":return e.stop()}},e,this)})),function(e,t){return n.apply(this,arguments)})},{key:"appendChild",value:function(e,t){throw Error(e_)}},{key:"insertBefore",value:function(e,t){throw Error(e_)}},{key:"removeChild",value:function(e,t){throw Error(e_)}},{key:"replaceChild",value:function(e,t,n){throw Error(e_)}},{key:"append",value:function(){throw Error(e_)}},{key:"prepend",value:function(){throw Error(e_)}},{key:"getElementById",value:function(e){return this.documentElement.getElementById(e)}},{key:"getElementsByName",value:function(e){return this.documentElement.getElementsByName(e)}},{key:"getElementsByTagName",value:function(e){return this.documentElement.getElementsByTagName(e)}},{key:"getElementsByClassName",value:function(e){return this.documentElement.getElementsByClassName(e)}},{key:"querySelector",value:function(e){return this.documentElement.querySelector(e)}},{key:"querySelectorAll",value:function(e){return this.documentElement.querySelectorAll(e)}},{key:"find",value:function(e){return this.documentElement.find(e)}},{key:"findAll",value:function(e){return this.documentElement.findAll(e)}}])}(rf),ax=function(){function e(t){(0,R.Z)(this,e),this.strategies=t}return(0,Z.Z)(e,[{key:"apply",value:function(t){var n=t.config,i=t.camera,r=t.renderingService,a=t.renderingContext,o=this.strategies;r.hooks.cull.tap(e.tag,function(e){if(e){var t,r=e.cullable;if(0===o.length?r.visible=a.unculledEntities.indexOf(e.entity)>-1:r.visible=o.every(function(t){return t.isVisible(i,e)}),!e.isCulled()&&e.isVisible())return e;var s=(null===(t=n.future)||void 0===t?void 0:t.experimentalCancelEventPropagation)===!0;return e.dispatchEvent(new rd(rx.CULLED),s,s),null}return e}),r.hooks.afterRender.tap(e.tag,function(e){e.cullable.visibilityPlaneMask=-1})}}])}();ax.tag="Culling";var aT=function(){function e(){var t=this;(0,R.Z)(this,e),this.autoPreventDefault=!1,this.rootPointerEvent=ne
1w rc(null),this.rootWheelEvent=new rh(null),this.onPointerMove=function(e){var n=null===(i=t.context.renderingContext.root)||void 0===i||null===(i=i.ownerDocument)||void 0===i?void 0:i.defaultView;if(!n.supportsTouchEvents||"touch"!==e.pointerType){var i,r,a=t.normalizeToPointerEvent(e,n),o=(0,ek.Z)(a);try{for(o.s();!(r=o.n()).done;){var s=r.value,l=t.bootstrapEvent(t.rootPointerEvent,s,n,e);t.context.eventService.mapEvent(l)}}catch(e){o.e(e)}finally{o.f()}t.setCursor(t.context.eventService.cursor)}},this.onClick=function(e){var n,i,r=null===(n=t.context.renderingContext.root)||void 0===n||null===(n=n.ownerDocument)||void 0===n?void 0:n.defaultView,a=t.normalizeToPointerEvent(e,r),o=(0,ek.Z)(a);try{for(o.s();!(i=o.n()).done;){var s=i.value,l=t.bootstrapEvent(t.rootPointerEvent,s,r,e);t.context.eventService.mapEvent(l)}}catch(e){o.e(e)}finally{o.f()}t.setCursor(t.context.eventService.cursor)}}return(0,Z.Z)(e,[{key:"apply",value:function(t){var n=this;this.context=t;var i=t.renderingService,r=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(e){return n.context.renderingService.hooks.pickSync.call({position:e,picked:[],topmost:!0}).picked[0]||null}),i.hooks.pointerWheel.tap(e.tag,function(e){var t=n.normalizeWheelEvent(e);n.context.eventService.mapEvent(t)}),i.hooks.pointerDown.tap(e.tag,function(e){if(!r.supportsTouchEvents||"touch"!==e.pointerType){var t=n.normalizeToPointerEvent(e,r);n.autoPreventDefault&&t[0].isNormalized&&(e.cancelable||!("cancelable"in e))&&e.preventDefault();var i,a=(0,ek.Z)(t);try{for(a.s();!(i=a.n()).done;){var o=i.value,s=n.bootstrapEvent(n.rootPointerEvent,o,r,e);n.context.eventService.mapEvent(s)}}catch(e){a.e(e)}finally{a.f()}n.setCursor(n.context.eventService.cursor)}}),i.hooks.pointerUp.tap(e.tag,function(e){if(!r.supportsTouchEvents||"touch"!==e.pointerType){var t,i=n.context.contextService.getDomElement(),a=n.context.eventService.isNativeEventFromCanvas(i,e)?"":"outside",o=n.normalizeToPointerEvent(e,r),s=(0,ek.Z)(o);try{for(s.s();!(t=s.n()).done;){var l=t.value,u=n.bootstrapEvent(n.rootPointerEvent,l,r,e);u.type+=a,n.context.eventService.mapEvent(u)}}catch(e){s.e(e)}finally{s.f()}n.setCursor(n.context.eventService.cursor)}}),i.hooks.pointerMove.tap(e.tag,this.onPointerMove),i.hooks.pointerOver.tap(e.tag,this.onPointerMove),i.hooks.pointerOut.tap(e.tag,this.onPointerMove),i.hooks.click.tap(e.tag,this.onClick),i.hooks.pointerCancel.tap(e.tag,function(e){var t,i=n.normalizeToPointerEvent(e,r),a=(0,ek.Z)(i);try{for(a.s();!(t=a.n()).done;){var o=t.value,s=n.bootstrapEvent(n.rootPointerEvent,o,r,e);n.context.eventService.mapEvent(s)}}catch(e){a.e(e)}finally{a.f()}n.setCursor(n.context.eventService.cursor)})}},{key:"bootstrapEvent",value:function(e,t,n,i){e.view=n,e.originalEvent=null,e.nativeEvent=i,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this.transferMouseData(e,t);var r=this.context.eventService.client2Viewport({x:t.clientX,y:t.clientY}),a=r.x,o=r.y;e.viewport.x=a,e.viewport.y=o;var s=this.context.eventService.viewport2Canvas(e.viewport),l=s.x,u=s.y;return e.canvas.x=l,e.canvas.y=u,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.isTrusted=i.isTrusted,"pointerleave"===e.type&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=iC[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 n=this.context.eventService.client2Viewport({x:e.clientX,y:e.clientY}),i=n.x,r=n.y;t.viewport.x=i,t.viewport.y=r;var a=this.context.eventService.viewport2Canvas(t.viewport),o=a.x,s=a.y;return t.canvas.x=o,t.canvas.y=s,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=iA.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 n=[];if(t.isTouchEvent(e))for(var i=0;i<e.changedTouches.length;i++){var r=e.changedTouches[i];(0,es.Z)(r.button)&&(r.button=0),(0,es.Z)(r.buttons)&&(r.buttons=1),(0,es.Z)(r.isPrimary)&&(r.isPrimary=1===e.touches.length&&"touchstart"===e.type),(0,es.Z)(r.width)&&(r.width=r.radiusX||1),(0,es.Z)(r.height)&&(r.height=r.radiusY||1),(0,es.Z)(r.tiltX)&&(r.tiltX=0),(0,es.Z)(r.tiltY)&&(r.tiltY=0),(0,es.Z)(r.pointerType)&&(r.pointerType="touch"),(0,es.Z)(r.pointerId)&&(r.pointerId=r.identifier||0),(0,es.Z)(r.pressure)&&(r.pressure=r.force||.5),(0,es.Z)(r.twist)&&(r.twist=0),(0,es.Z)(r.tangentialPressure)&&(r.tangentialPressure=0),r.isNormalized=!0,r.type=e.type,n.push(r)}else t.isMouseEvent(e)&&((0,es.Z)(e.isPrimary)&&(e.isPrimary=!0),(0,es.Z)(e.width)&&(e.width=1),(0,es.Z)(e.height)&&(e.height=1),(0,es.Z)(e.tiltX)&&(e.tiltX=0),(0,es.Z)(e.tiltY)&&(e.tiltY=0),(0,es.Z)(e.pointerType)&&(e.pointerType="mouse"),(0,es.Z)(e.pointerId)&&(e.pointerId=1),(0,es.Z)(e.pressure)&&(e.pressure=.5),(0,es.Z)(e.twist)&&(e.twist=0),(0,es.Z)(e.tangentialPressure)&&(e.tangentialPressure=0),e.isNormalized=!0),n.push(e);return n}}])}();aT.tag="Event";var ab=[ex.CIRCLE,ex.ELLIPSE,ex.IMAGE,ex.RECT,ex.LINE,ex.POLYLINE,ex.POLYGON,ex.TEXT,ex.PATH,ex.HTML],aS=(0,Z.Z)(function e(){(0,R.Z)(this,e)},[{key:"isVisible",value:function(e,t){var n,i=t.cullable;if(!i.enable)return!0;var r=t.getRenderBounds();if(eR.isEmpty(r))return!1;var a=e.getFrustum(),o=null===(n=t.parentNode)||void 0===n||null===(n=n.cullable)||void 0===n?void 0:n.visibilityPlaneMask;return i.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(t,r,o||eL.INDETERMINATE,a.planes),i.visible=i.visibilityPlaneMask!==eL.OUTSIDE,i.visible}},{key:"computeVisibilityWithPlaneMask",value:function(e,t,n,i){if(n===eL.OUTSIDE||n===eL.INSIDE)return n;for(var r=eL.INSIDE,a=ab.indexOf(e.nodeName)>-1,o=0,s=i.length;o<s;++o){var l=1<<o;if((n&l)!=0&&(!a||4!==o&&5!==o)){var u=i[o],c=u.normal,h=u.distance;if(_.AK(c,t.getPositiveFarPoint(i[o]))+h<0)return eL.OUTSIDE;_.AK(c,t.getNegativeFarPoint(i[o]))+h<0&&(r|=l)}}return r}}]),aw=function(){function e(){(0,R.Z)(this,e),this.mutationRecords=[],this.isFirstTimeRendering=!0,this.isFirstTimeRenderingFinished=!1}return(0,Z.Z)(e,[{key:"apply",value:function(t){var n,i=this,r=t.renderingService,a=t.renderingContext.root.ownerDocument.defaultView,o=function(e){r.dirty()},s=function(e){var t,n=e.detail;(t=i.mutationRecords).push.apply(t,(0,L.Z)(n)),r.dirty()},l=function(e){var t=e.target;r$.enableSizeAttenuation&&r$.styleValueRegistry.updateSizeAttenuation(t,a.getCamera().getZoom())},u=function(e){var t=e.target;r$.sceneGraphService.dirtyToRoot(t),r.dirty()};r.hooks.init.tap(e.tag,function(){a.addEventListener(rx.MOUNTED,l),a.addEventListener(rx.UNMOUNTED,u),a.addEventListener(rx.ATTR_MODIFIED,o),a.addEventListener(rx.BOUNDS_CHANGED,s)}),r.hooks.destroy.tap(e.tag,function(){a.removeEventListener(rx.MOUNTED,l),a.removeEventListener(rx.UNMOUNTED,u),a.removeEventListener(rx.ATTR_MODIFIED,o),a.removeEventListener(rx.BOUNDS_CHANGED,s),i.mutationRecords=[]});var c=null!==(n=r$.globalThis.requestIdleCallback)&&void 0!==n?n:iB.bind(r$.globalThis);r.hooks.endFrame.tap(e.tag,function(){i.isFirstTimeRendering&&(i.isFirstTimeRendering=!1,c(function(){i.isFirstTimeRenderingFinished=!0})),i.mutationRecords=[]})}}])}();aw.tag="Prepare";var aN=((P={}).READY="ready",P.BEFORE_RENDER="beforerender",P.RERENDER="rerender",P.AFTER_RENDER="afterrender",P.BEFORE_DESTROY="beforedestroy",P.AFTER_DESTROY="afterdestroy",P.RESIZE="resize",P.DIRTY_RECTANGLE="dirtyrectangle",P.RENDERER_CHANGED="rendererchanged",P),aP=new rd(rx.MOUNTED),aM=new rd(rx.UNMOUNTED),aC=new rd(aN.BEFORE_RENDER),aA=new rd(aN.RERENDER),aR=new rd(aN.AFTER_RENDER),aZ=function(e){function t(e){(0,R.Z)(this,t),(r=(0,O.Z)(this,t)).Element=r8,r.inited=!1,r.context={};var n,i,r,a=e.container,o=e.canvas,s=e.renderer,l=e.width,u=e.height,c=e.background,h=e.curs
1or,d=e.supportsMutipleCanvasesInOneContainer,v=e.cleanUpOnDestroy,f=void 0===v||v,p=e.offscreenCanvas,g=e.devicePixelRatio,y=e.requestAnimationFrame,m=e.cancelAnimationFrame,k=e.createImage,E=e.supportsTouchEvents,x=e.supportsPointerEvents,T=e.isTouchEvent,b=e.isMouseEvent,S=e.dblClickSpeed,w=l,N=u,P=g||iS&&window.devicePixelRatio||1;return P=P>=1?Math.ceil(P):1,o&&(w=l||("auto"===(n=iM(o,"width"))?o.offsetWidth:parseFloat(n))||o.width/P,N=u||("auto"===(i=iM(o,"height"))?o.offsetHeight:parseFloat(i))||o.height/P),r.customElements=new am,r.devicePixelRatio=P,r.requestAnimationFrame=null!=y?y:iB.bind(r$.globalThis),r.cancelAnimationFrame=null!=m?m:iV.bind(r$.globalThis),r.createImage=null!=k?k:function(){return new window.Image},r.supportsTouchEvents=null!=E?E:"ontouchstart"in r$.globalThis,r.supportsPointerEvents=null!=x?x:!!r$.globalThis.PointerEvent,r.isTouchEvent=null!=T?T:function(e){return r.supportsTouchEvents&&e instanceof r$.globalThis.TouchEvent},r.isMouseEvent=null!=b?b:function(e){return!r$.globalThis.MouseEvent||e instanceof r$.globalThis.MouseEvent&&(!r.supportsPointerEvents||!(e instanceof r$.globalThis.PointerEvent))},p&&(r$.offscreenCanvas=p),r.document=new aE,r.document.defaultView=r,d||function(e,t,n){if(e){var i="string"==typeof e?document.getElementById(e):e;ib.has(i)&&ib.get(i).destroy(n),ib.set(i,t)}}(a,r,f),r.initRenderingContext((0,A.Z)((0,A.Z)({},e),{},{width:w,height:N,background:null!=c?c:"transparent",cursor:null!=h?h:"default",cleanUpOnDestroy:f,devicePixelRatio:P,requestAnimationFrame:r.requestAnimationFrame,cancelAnimationFrame:r.cancelAnimationFrame,createImage:r.createImage,supportsTouchEvents:r.supportsTouchEvents,supportsPointerEvents:r.supportsPointerEvents,isTouchEvent:r.isTouchEvent,isMouseEvent:r.isMouseEvent,dblClickSpeed:null!=S?S:200})),r.initDefaultCamera(w,N,s.clipSpaceNearZ),r.initRenderer(s,!0),r}return(0,I.Z)(t,e),(0,Z.Z)(t,[{key:"initRenderingContext",value:function(e){this.context.config=e,this.context.renderingContext={root:this.document.documentElement,unculledEntities:[],renderListCurrentFrame:[],renderReasons:new Set,force:!1,dirty:!1}}},{key:"initDefaultCamera",value:function(e,t,n){var i=this,r=new r$.CameraContribution;r.clipSpaceNearZ=n,r.setType(e0.EXPLORING,e1.DEFAULT).setPosition(e/2,t/2,500).setFocalPoint(e/2,t/2,0).setOrthographic(-(e/2),e/2,t/2,-(t/2),.1,1e3),r.canvas=this,r.eventEmitter.on(e3.UPDATED,function(){i.context.renderingContext.renderReasons.add(ry.CAMERA_CHANGED),r$.enableSizeAttenuation&&i.getConfig().renderer.getConfig().enableSizeAttenuation&&i.updateSizeAttenuation()}),this.context.camera=r}},{key:"updateSizeAttenuation",value:function(){var e=this.getCamera().getZoom();this.document.documentElement.forEach(function(t){r$.styleValueRegistry.updateSizeAttenuation(t,e)})}},{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 e=this;return!this.readyPromise&&(this.readyPromise=new Promise(function(t){e.resolveReadyPromise=function(){t(e)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise}},{key:"destroy",value:function(){var e,t=!(arguments.length>0)||void 0===arguments[0]||arguments[0],n=arguments.length>1?arguments[1]:void 0;tO.clearCache();var i=(null===(e=this.getConfig().future)||void 0===e?void 0:e.experimentalCancelEventPropagation)===!0;n||this.dispatchEvent(new rd(aN.BEFORE_DESTROY),i,i),this.frameId&&this.cancelAnimationFrame(this.frameId);var r=this.getRoot();t&&(this.unmountChildren(r),this.document.destroy(),this.getEventService().destroy()),this.getRenderingService().destroy(),this.getContextService().destroy(),n||this.dispatchEvent(new rd(aN.AFTER_DESTROY),i,i);var a=function(e){e.currentTarget=null,e.manager=null,e.target=null,e.relatedNode=null};
1a(aP),a(aM),a(aC),a(aA),a(aR),a(r4),a(rQ),a(r0),a(r1),r$.textService.clearCache()}},{key:"changeSize",value:function(e,t){this.resize(e,t)}},{key:"resize",value:function(e,t){var n,i=this.context.config;i.width=e,i.height=t,this.getContextService().resize(e,t);var r=this.context.camera,a=r.getProjectionMode();r.setPosition(e/2,t/2,500).setFocalPoint(e/2,t/2,0),a===e2.ORTHOGRAPHIC?r.setOrthographic(-(e/2),e/2,t/2,-(t/2),r.getNear(),r.getFar()):r.setAspect(e/t);var o=(null===(n=i.future)||void 0===n?void 0:n.experimentalCancelEventPropagation)===!0;this.dispatchEvent(new rd(aN.RESIZE,{width:e,height:t}),o,o)}},{key:"appendChild",value:function(e,t){return this.document.documentElement.appendChild(e,t)}},{key:"insertBefore",value:function(e,t){return this.document.documentElement.insertBefore(e,t)}},{key:"removeChild",value:function(e){return this.document.documentElement.removeChild(e)}},{key:"removeChildren",value:function(){this.document.documentElement.removeChildren()}},{key:"destroyChildren",value:function(){this.document.documentElement.destroyChildren()}},{key:"render",value:function(e){var t,n=this;e&&(aC.detail=e,aR.detail=e);var i=(null===(t=this.getConfig().future)||void 0===t?void 0:t.experimentalCancelEventPropagation)===!0;this.dispatchEvent(aC,i,i),this.getRenderingService().render(this,e,function(){n.dispatchEvent(aA,i,i)}),this.dispatchEvent(aR,i,i)}},{key:"run",value:function(){var e=this,t=function(n,i){e.render(i),e.frameId=e.requestAnimationFrame(t)};t()}},{key:"initRenderer",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)throw Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new aT,new aw,new ax([new aS])),this.loadRendererContainerModule(e),this.context.contextService=new this.context.ContextService((0,A.Z)((0,A.Z)({},r$),this.context)),this.context.renderingService=new rm(r$,this.context),this.context.eventService=new rp(r$,this.context),this.context.eventService.init(),this.context.contextService.init?(this.context.contextService.init(),this.initRenderingService(e,n,!0)):this.context.contextService.initAsync().then(function(){t.initRenderingService(e,n)}).catch(function(e){console.error(e)})}},{key:"initRenderingService",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.context.renderingService.init(function(){t.inited=!0;var r,a=(null===(r=t.getConfig().future)||void 0===r?void 0:r.experimentalCancelEventPropagation)===!0;n?i?t.requestAnimationFrame(function(){t.dispatchEvent(new rd(aN.READY),a,a)}):t.dispatchEvent(new rd(aN.READY),a,a):t.dispatchEvent(new rd(aN.RENDERER_CHANGED),a,a),t.readyPromise&&t.resolveReadyPromise(),n||t.getRoot().forEach(function(e){var t;null===(t=e.dirty)||void 0===t||t.call(e,!0,!0)}),t.mountChildren(t.getRoot()),e.getConfig().enableAutoRendering&&t.run()})}},{key:"loadRendererContainerModule",value:function(e){var t=this;e.getPlugins().forEach(function(e){e.context=t.context,e.init(r$)})}},{key:"setRenderer",value:function(e){var t=this.getConfig();if(t.renderer!==e){var n=t.renderer;t.renderer=e,this.destroy(!1,!0),(0,L.Z)((null==n?void 0:n.getPlugins())||[]).reverse().forEach(function(e){e.destroy(r$)}),this.initRenderer(e)}}},{key:"setCursor",value:function(e){this.getConfig().cursor=e,this.getContextService().applyCursorStyle(e)}},{key:"unmountChildren",value:function(e){var t=this;if(e.childNodes.forEach(function(e){t.unmountChildren(e)}),this.inited){if(e.isMutationObserved)e.dispatchEvent(aM);else{var n,i=(null===(n=this.getConfig().future)||void 0===n?void 0:n.experimentalCancelEventPropagation)===!0;aM.target=e,this.dispatchEvent(aM,!0,i)}e!==this.document.documentElement&&(e.ownerDocument=null),e.isConnected=!1}e.isCustomElement&&e.disconnectedCallback&&e.disconnectedCallback()}},{key:"mountChildren",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:iR(e);if(this.inited){if(!e.isConnected&&(e.ownerDocument=this.document,e.isConnected=!0,!n)){if
1(e.isMutationObserved)e.dispatchEvent(aP);else{var i,r=(null===(i=this.getConfig().future)||void 0===i?void 0:i.experimentalCancelEventPropagation)===!0;aP.target=e,this.dispatchEvent(aP,!0,r)}}}else console.warn("[g]: You are trying to call `canvas.appendChild` before canvas' initialization finished. You can either await `canvas.ready` or listen to `CanvasEvent.READY` manually.","appended child: ",e.nodeName);e.childNodes.forEach(function(e){t.mountChildren(e,n)}),e.isCustomElement&&e.connectedCallback&&e.connectedCallback()}},{key:"mountFragment",value:function(e){this.mountChildren(e,!1)}},{key:"client2Viewport",value:function(e){return this.getEventService().client2Viewport(e)}},{key:"viewport2Client",value:function(e){return this.getEventService().viewport2Client(e)}},{key:"viewport2Canvas",value:function(e){return this.getEventService().viewport2Canvas(e)}},{key:"canvas2Viewport",value:function(e){return this.getEventService().canvas2Viewport(e)}},{key:"getPointByClient",value:function(e,t){return this.client2Viewport({x:e,y:t})}},{key:"getClientByPoint",value:function(e,t){return this.viewport2Client({x:e,y:t})}}])}(rv),aL=(new WeakMap,(0,Z.Z)(function e(){(0,R.Z)(this,e),this.cacheStore=new Map},[{key:"onRefAdded",value:function(e){}},{key:"has",value:function(e){return this.cacheStore.has(e)}},{key:"put",value:function(e,t,n){return!this.cacheStore.has(e)&&(this.cacheStore.set(e,{value:t,counter:new Set([n.entity])}),this.onRefAdded(n),!0)}},{key:"get",value:function(e,t){var n=this.cacheStore.get(e);return n?(n.counter.has(t.entity)||(n.counter.add(t.entity),this.onRefAdded(t)),n.value):null}},{key:"update",value:function(e,t,n){var i=this.cacheStore.get(e);return!!i&&(i.value=(0,A.Z)((0,A.Z)({},i.value),t),i.counter.has(n.entity)||(i.counter.add(n.entity),this.onRefAdded(n)),!0)}},{key:"release",value:function(e,t){var n=this.cacheStore.get(e);return!!n&&(n.counter.delete(t.entity),n.counter.size<=0&&this.cacheStore.delete(e),!0)}},{key:"releaseRef",value:function(e){var t=this;Array.from(this.cacheStore.keys()).forEach(function(n){t.release(n,e)})}},{key:"getSize",value:function(){return this.cacheStore.size}},{key:"clear",value:function(){this.cacheStore.clear()}}])),aO=[],aI=[],aD=function(){function e(){(0,R.Z)(this,e)}return(0,Z.Z)(e,null,[{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.api;e.rafId&&(t.cancelAnimationFrame(e.rafId),e.rafId=null)}},{key:"executeTask",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.api;aO.length<=0&&aI.length<=0||(aI.forEach(function(e){return e()}),aI=aO.splice(0,e.TASK_NUM_PER_FRAME),e.rafId=t.requestAnimationFrame(function(){e.executeTask(t)}))}},{key:"sliceImage",value:function(t,n,i,r){for(var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e.api,s=t.naturalWidth||t.width,l=t.naturalHeight||t.height,u=n-a,c=i-a,h=Math.ceil(s/u),d=Math.ceil(l/c),v={tileSize:[n,i],gridSize:[d,h],tiles:Array(d).fill(null).map(function(){return Array(h).fill(null)})},f=function(e){for(var a=function(a){aO.push(function(){var h=a*u,d=e*c,f=[Math.min(n,s-h),Math.min(i,l-d)],p=f[0],g=f[1],y=o.createCanvas();y.width=n,y.height=i,y.getContext("2d").drawImage(t,h,d,p,g,0,0,p,g),v.tiles[e][a]={x:h,y:d,tileX:a,tileY:e,data:y},r()})},d=0;d<h;d++)a(d)},p=0;p<d;p++)f(p);return e.stop(),e.executeTask(),v}}])}();aD.TASK_NUM_PER_FRAME=10;var aG=new aL;aG.onRefAdded=function(e){var t=this;e.addEventListener(rx.DESTROY,function(){t.releaseRef(e)},{once:!0})};var a_=(0,Z.Z)(function e(t,n){(0,R.Z)(this,e),this.gradientCache={},this.patternCache={},this.context=t,this.runtime=n},[{key:"getImageSync",value:function(e,t,n){var i=(0,X.Z)(e)?e:e.src;if(aG.has(i)){var r=aG.get(i,t);if(r.img.complete)return null==n||n(r),r}return this.getOrCreateImage(e,t).then(function(e){null==n||n(e)}).catch(function(e){console.error(e)}),null}},{key:"getOrCreateImage",value:function(e,t){var n=this,i=(0,X.Z)(e)?e:e.src;if(!(0,X.Z)(e)&&!aG.has(i)){var r={img:e,size:[e.naturalWidth||e.width,e.naturalHeight||e.height],tileSize:aF(e)};aG.put(i,r,t)}if(aG.has(i)){var a=aG.get(i,t);return a.img.complete?Promise.resolve(a):new Promise(function(e,t){a.img.addEventListener("load",function(){a.size=[a.img.naturalWi
1dth||a.img.width,a.img.naturalHeight||a.img.height],a.tileSize=aF(a.img),e(a)}),a.img.addEventListener("error",function(e){t(e)})})}return new Promise(function(e,r){var a=n.context.config.createImage();if(a){var o={img:a,size:[0,0],tileSize:aF(a)};aG.put(i,o,t),a.onload=function(){o.size=[a.naturalWidth||a.width,a.naturalHeight||a.height],o.tileSize=aF(o.img),e(o)},a.onerror=function(e){r(e)},a.crossOrigin="Anonymous",a.src=i}})}},{key:"createDownSampledImage",value:(M=(0,em.Z)((0,ey.Z)().mark(function e(t,n){var i,r,a,o,s,l,u,c,h,d,v,f,p,g;return(0,ey.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,this.getOrCreateImage(t,n);case 1:if(!(void 0!==(i=e.sent).downSamplingRate)){e.next=2;break}return e.abrupt("return",i);case 2:if(s=void 0===(o=(a="boolean"==typeof(r=this.context.config.enableLargeImageOptimization)?{}:r).maxDownSampledImageSize)?2048:o,u=void 0===(l=a.downSamplingRateThreshold)?.5:l,c=this.runtime.globalThis.createImageBitmap,d=(h=(0,D.Z)(i.size,2))[0],v=h[1],f=i.img,p=Math.min((s+s)/(d+v),Math.max(.01,Math.min(u,.5))),g=(0,A.Z)((0,A.Z)({},i),{},{downSamplingRate:p}),aG.update(i.img.src,g,n),!c){e.next=7;break}return e.prev=3,e.next=4,c(i.img,{resizeWidth:d*p,resizeHeight:v*p});case 4:f=e.sent,e.next=6;break;case 5:e.prev=5,e.catch(3),p=1;case 6:e.next=8;break;case 7:p=1;case 8:return g=(0,A.Z)((0,A.Z)({},this.getImageSync(t,n)),{},{downSampled:f,downSamplingRate:p}),aG.update(i.img.src,g,n),e.abrupt("return",g);case 9:case"end":return e.stop()}},e,this,[[3,5]])})),function(e,t){return M.apply(this,arguments)})},{key:"createImageTiles",value:(C=(0,em.Z)((0,ey.Z)().mark(function e(t,n,i,r){var a,o,s,l,u;return(0,ey.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,this.getOrCreateImage(t,r);case 1:return a=e.sent,s=(o=r.ownerDocument.defaultView).requestAnimationFrame,l=o.cancelAnimationFrame,aD.api={requestAnimationFrame:s,cancelAnimationFrame:l,createCanvas:function(){return rg.createCanvas()}},u=(0,A.Z)((0,A.Z)({},a),aD.sliceImage(a.img,a.tileSize[0],a.tileSize[0],i)),aG.update(a.img.src,u,r),e.abrupt("return",u);case 2:case"end":return e.stop()}},e,this)})),function(e,t,n,i){return C.apply(this,arguments)})},{key:"releaseImage",value:function(e,t){aG.release((0,X.Z)(e)?e:e.src,t)}},{key:"releaseImageRef",value:function(e){aG.releaseRef(e)}},{key:"getOrCreatePatternSync",value:function(e,t,n,i,r,a,o){var s,l,u=this.generatePatternKey(t);if(u&&this.patternCache[u])return this.patternCache[u];var c=t.image,h=t.repetition,d=t.transform,v=!1;if((0,X.Z)(c)){var f=this.getImageSync(c,e,o);s=null==f?void 0:f.img}else i?(s=i,v=!0):s=c;var p=s&&n.createPattern(s,h);return p&&(l=d?i4(nq(d),new r8({})):U.identity(U.create()),v&&U.scale(l,l,[1/r,1/r,1]),p.setTransform({a:l[0],b:l[1],c:l[4],d:l[5],e:l[12]+a[0],f:l[13]+a[1]})),u&&p&&(this.patternCache[u]=p),p}},{key:"getOrCreateGradient",value:function(e,t){var n=this.generateGradientKey(e),i=e.type,r=e.steps,a=e.min,o=e.width,s=e.height,l=e.angle,u=e.cx,c=e.cy,h=e.size;if(this.gradientCache[n])return this.gradientCache[n];var d=null;if(i===tX.LinearGradient){var v,f,p,g,y=(v=l.value*eV,f=0+o/2,p=0+s/2,g=Math.abs(o*Math.cos(v))+Math.abs(s*Math.sin(v)),{x1:a[0]+f-Math.cos(v)*g/2,y1:a[1]+p-Math.sin(v)*g/2,x2:a[0]+f+Math.cos(v)*g/2,y2:a[1]+p+Math.sin(v)*g/2}),m=y.x1,k=y.y1,E=y.x2,x=y.y2;d=t.createLinearGradient(m,k,E,x)}else if(i===tX.RadialGradient){var T,b,S,w=(T=u.value,b=c.value,u.unit===tI.kPercentage&&(T=u.value/100*o),c.unit===tI.kPercentage&&(b=c.value/100*s),S=Math.max((0,Y.y)([0,0],[T,b]),(0,Y.y)([0,s],[T,b]),(0,Y.y)([o,s],[T,b]),(0,Y.y)([o,0],[T,b])),h&&(h instanceof tJ?S=h.value:h instanceof t$&&("closest-side"===h.value?S=Math.min(T,o-T,b,s-b):"farthest-side"===h.value?S=Math.max(T,o-T,b,s-b):"closest-corner"===h.value&&(S=Math.min((0,Y.y)([0,0],[T,b]),(0,Y.y)([0,s],[T,b]),(0,Y.y)([o,s],[T,b]),(0,Y.y)([o,0],[T,b]))))),{x:T+a[0],y:b+a[1],r:S}),N=w.x,P=w.y,M=w.r;d=t.createRadialGradient(N,P,0,N,P,M)}return d&&(r.forEach(function(e){var t,n=e.offset,i=e.color;n.unit===tI.kPercentage&&(null===(t=d)||void 0===t||t.addColorStop(n.value/100,i.toString()))}),this.gradientCache[n]=d),this.gradientCache[n]}},{key:"generateGradientKey",value:function(e){var t=e.type,n=e.min,i=e.width,r=e.height,a=e.steps,o=e.angle,s=e.cx,l=e.cy,u=e.size;return"gradient-".concat(t,"-").concat((null==o?void 0:o.toString())||0,"-").concat((null==s?void 0:s.toString())||0,"-").concat((null==l?void 0:l.toString())||0,"-").concat((null==u?void 0:u.toString())||0,"-").concat(n[0],"-").concat(n[1],"-").concat(i,"-").concat(r,"-").concat(a.map(function(e){var t=e.offset,n=e.color;return"".concat(t).concat(n)}).join("-"))}},{key:"generatePatternKey",value:function(e){var t=e.image,n=e.repetition;return(0,X.Z)(t)?"pattern-".concat(t,"-").concat(n):"rect"===t.nodeName?"pattern-".concat(t.entity,"-").concat(n):void 0}}]);function aF(e){if(!e.complete)return[0,0];
1var t=e.naturalWidth||e.width,n=e.naturalHeight||e.height,i=256;return[256,512].forEach(function(e){Math.ceil(n/e)*Math.ceil(t/e)<1e3&&(i=e)}),[i,i]}a_.isSupportTile=!!rg.createCanvas();var aU=function(){function e(){(0,R.Z)(this,e)}return(0,Z.Z)(e,[{key:"apply",value:function(t){var n=t.renderingService,i=t.renderingContext,r=t.imagePool,a=i.root.ownerDocument.defaultView,o=function(e,t,n){var i=e.parsedStyle,r=i.width,a=i.height;r&&!a?e.setAttribute("height",n/t*r):!r&&a&&e.setAttribute("width",t/n*a)},s=function(e){var t=e.target,i=t.nodeName,a=t.attributes;if(i===ex.IMAGE){var s=a.src,l=a.keepAspectRatio;r.getImageSync(s,t,function(e){var i=e.img,r=i.width,a=i.height;l&&o(t,r,a),t.dirty(),n.dirty()})}},l=function(e){var t=e.target,i=e.attrName,a=e.prevValue,s=e.newValue;t.nodeName===ex.IMAGE&&"src"===i&&(a!==s&&r.releaseImage(a,t),(0,X.Z)(s)&&r.getOrCreateImage(s,t).then(function(e){var i=e.img,r=i.width,a=i.height;t.attributes.keepAspectRatio&&o(t,r,a),t.dirty(),n.dirty()}).catch(function(){}))};n.hooks.init.tap(e.tag,function(){a.addEventListener(rx.MOUNTED,s),a.addEventListener(rx.ATTR_MODIFIED,l)}),n.hooks.destroy.tap(e.tag,function(){a.removeEventListener(rx.MOUNTED,s),a.removeEventListener(rx.ATTR_MODIFIED,l)})}}])}();aU.tag="LoadImage";var aB=function(e){function t(){var e;(0,R.Z)(this,t);for(var n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];return(e=(0,O.Z)(this,t,[].concat(i))).name="image-loader",e}return(0,I.Z)(t,e),(0,Z.Z)(t,[{key:"init",value:function(e){this.context.imagePool=new a_(this.context,e),this.addRenderingPlugin(new aU)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(eb),aV=Object.freeze({__proto__:null,ImagePool:a_,Plugin:aB}),az=function(){function e(){(0,R.Z)(this,e),this.displayObjectHTMLElementMap=new WeakMap}return(0,Z.Z)(e,[{key:"joinTransformMatrix",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?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(t,n){var i=this,r=t.camera,a=t.renderingContext,o=t.renderingService;this.context=t;var s=a.root.ownerDocument.defaultView,l=s.context.eventService.nativeHTMLMap,u=function(e,t){t.style.transform=i.joinTransformMatrix(e.getWorldTransform(),e.getOrigin())},c=function(e){var t=e.target;if(t.nodeName===ex.HTML){i.$camera||(i.$camera=i.createCamera(r));var n=i.getOrCreateEl(t);i.$camera.appendChild(n),Object.keys(t.attributes).forEach(function(e){i.updateAttribute(e,t)}),u(t,n),l.set(n,t)}},h=function(e){var t=e.target;if(t.nodeName===ex.HTML&&i.$camera){var n=i.getOrCreateEl(t);n&&(n.remove(),l.delete(n))}},d=function(e){var t=e.target;if(t.nodeName===ex.HTML){var n=e.attrName;i.updateAttribute(n,t)}},v=function(e){for(var t=e.detail,n=0;n<t.length;n++){var r=t[n].target;(r.nodeName===ex.FRAGMENT?r.childNodes:[r]).forEach(function(e){if(e.nodeName===ex.HTML){var t=i.getOrCreateEl(e);u(e,t)}})}},f=function(){if(i.$camera){var e=i.context.config,t=e.width,n=e.height;i.$camera.parentElement.style.width="".concat(t||0,"px"),i.$camera.parentElement.style.height="".concat(n||0,"px")}};o.hooks.init.tap(e.tag,function(){s.addEventListener(aN.RESIZE,f),s.addEventListener(rx.MOUNTED,c),s.addEventListener(rx.UNMOUNTED,h),s.addEventListener(rx.ATTR_MODIFIED,d),s.addEventListener(rx.BOUNDS_CHANGED,v)}),o.hooks.endFrame.tap(e.tag,function(){i.$camera&&a.renderReasons.has(ry.CAMERA_CHANGED)&&(i.$camera.style.transform=i.joinTransformMatrix(r.getOrthoMatrix()))}),o.hooks.destroy.tap(e.tag,function(){i.$camera&&i.$camera.remove(),s.removeEventListener(aN.RESIZE,f),s.removeEventListener(rx.MOUNTED,c),s.removeEventListener(rx.UNMOUNTED,h),s.removeEventListener(rx.ATTR_MODIFIED,d),s.removeEventListener(rx.BOUNDS_CHANGED,v)})}},{key:"createCamera",value:function(e){var t=this.context.config,n=t.document,i=t.width,r=t.height,a=this.context.contextService.getDomElement(),o=a.parentNode;if(o){var s="g-canvas-camera",l=o.querySelector("#".concat(s));if(!l){var u=(n||document).createElement("div");u.style.overflow="hidden",u.style.pointerEvents="none",u.style.position="absolute",u.style.left="0px",u.style.top="0px",u.style.width="".concat(i||0,"px"),u.style.height="".concat(r||0,"px");var c=(n||document).createElement("div");l=c,c.id=s,c.style.position="absolute",c.style.left="".concat(a.offsetLeft||0,"px"),c.style.top="".concat(a.offsetTop||0,"px"),c.style.transformOrigin="left top",c.style.transform=this.joinTransformMatrix(e.getOrthoMatrix()),c.style.pointerEvents="none",c.style.width="100%",c.style.height="100%",u.appendChild(c),o.appendChild(u)}return l}return null}},{key:"getOrCreateEl",value:function(e){var t=this.context.config.document,n=this.displayObjectHTMLElementMap.get(e);return n||(n=(t||document).createElement("div"),e.parsedStyle.$el=n,this.displayObjectHTMLElementMap.set(e,n),e.id&&(n.id=e.id),e.name&&n.setAttribute("name",e.name),e.className&&(n.className=e.className),n.style.position="absolute",n.style["will-change"]="transform",n.style.transform=this.joinTransformMatrix(e.getWorldTransform(),e.getOrigin())),n}},{key:"updateAttribute",value:function(e,t){var n=this.getOrCreateEl(t);switch(e){case"innerHTML":var i=t.parsedStyle.innerHTML;(0,X.Z)(i)?n.innerHTML=i:(n.innerHTML="",n.appendChild(i));break;case"x":n.style.left="".concat(t.parsedStyle.x,"px");break;case"y":n.style.top="".concat(t.parsedStyle.y,"px");break;case"transformOrigin":var r=t.parsedStyle.transformOrigin;n.style["transform-origin"]="".concat(r[0].buildCSSText(null,null,"")," ").concat(r[1].buildCSSText(null,null,""));break;case"width":var a=t.parsedStyle.width;n.style.width=(0,H.Z)(a)?"".concat(a,"px"):a.toString();break;case"height":var o=t.parsedStyle.height;n.style.height=(0,H.Z)(o)?"".concat(o,"px"):o.toString();break;case"zIndex":var s=t.parsedStyle.zIndex;n.style["z-index"]="".concat(s);break;case"visibility":var l=t.parsedStyle.visibility;n.style.visibility=l;break;case"pointerEvents":var u=t.parsedStyle.pointerEvents;n.style.pointerEvents=void 0===u?"auto":u;break;case"opacity":var c=t.parsedStyle.opacity;n.style.opacity="".concat(c);break;case"fill":var h=t.parsedStyle.fill,d="";nl(h)?d=h.isNone?"transparent":t.getAttribute("fill"):Array.isArray(h)?d=t.getAttribute("fill"):ns(h),n.style.background=d;break;case"stroke":var v=t.parsedStyle.stroke,f="";nl(v)?f=v.isNone?"transparent":t.getAttribute("stroke"):Array.isArray(v)?f=t.getAttribute("stroke"):ns(v),n.style["border-color"]=f,n.style["border-style"]="solid";break;case"lineWidth":var p=t.parsedStyle.lineWidth;n.style["border-width"]="".concat(p||0,"px");break;case"lineDash":n.style["border-style"]="dashed";break;case"filter":var g=t.style.filter;n.style.filter=g;break;default:(0,W.Z)(t.style[e])||""===t.style[e]||(n.style[e]=t.style[e])}}}])}();az.tag="HTMLRendering";var aH=Object.freeze({__proto__:null,Plugin:function(e){function t(){var e;(0,R.Z)(this,t);for(var n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];return(e=(0,O.Z)(this,t,[].concat(i))).name="html-renderer",e}return(0,I.Z)(t,e),(0,Z.Z)(t,[{key:"init",value:function(){this.addRenderingPlugin(new az)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(eb)}),aY=function(){function e(){(0,R.Z)(this,e)}return(0,Z.Z)(e,[{key:"apply",value:function(t,n){var i=this,r=t.renderingService,a=t.renderingContext,o=t.config;this.context=t;var s=a.root.ownerDocument.defaultView,l=function(e){r.hooks.pointerMove.call(e)},u=function(e){r.hooks.pointerUp.call(e)},c=function(e){r.hooks.pointerDown.call(e)},h=function(e){r.hooks.pointerOver.call(e)},d=function(e){r.hooks.pointerOut.call(e)},v=function(e){r.hooks.pointerCancel.call(e)},f=function(e){r.hooks.pointerWheel.call(e)},p=function(e){r.hooks.click.call(e)},g=function(e){n.globalThis.document.addEventListener("pointermove",l,!0),e.addEventListener("pointerdown",c,!0),e.addEventListener("pointerleave",d,!0),e.addEventListener("pointerover",h,!0),n.globalThis.addEventListener("pointerup",u,!0),n.globalThis.addEventListener("pointercancel",v,!0)},y=function(e){e.addEventListener("touchstart",c,!0),e.addEventListener("touchend",u,!0),e.addEventListener("touchmove",l,!0),e.addEventListener("touchcancel",v,!0)},m=function(e){n.globalThis.document.addEventListener("mousemove",l,!0),e.addEventListener("mousedown",c,!0),e.addEventListener("mouseout",d,!0),e.addEventListener("mouseover",h,!0),n.globalThis.addEventListener("mouseup",u,!0)},k=function(e){n.globalThis.document.removeEventListener("pointermove",l,!0),e.removeEventListener("pointerdown",c,!0),e.removeEventListener("pointerleave",d,!0),e.removeEventListener("pointerover",h,!0),n.globalThis.removeEventListener("pointerup",u,!0),n.globalThis.removeEventListener("pointercancel",v,!0)},E=function(e){e.removeEventListener("touchstart",c,!0),e.removeEventListener("touchend",u,!0),e.removeEventListener("touchmove",l,!0),e.removeEventListener("touchcancel",v,!0)},x=function(e){n.globalThis.document.removeEventListener("mousemove",l,!0),e.removeEventListener("mousedown",c,!0),e.removeEventListener("mouseout",d,!0),e.removeEventListener("mouseover",h,!0),n.globalThis.removeEventListener("mouseup",u,!0)};r.hooks.init.tap(e.tag,function(){var e=i.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(e.style.msContentZooming="none",e.style.msTouchAction="none"):s.supportsPointerEvents&&(e.style.touchAction="none"),s.supportsPointerEvents?g(e):m(e),s.supportsTouchEvents&&y(e),o.useNativeClickEvent&&e.addEventListener("click",p,!0),e.addEventListener("wheel",f,{passive:!0,capture:!0})}),r.hooks.destroy.tap(e.tag,function(){var e=i.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(e.style.msContentZooming="",e.style.msTouchAction=""):s.supportsPointerEvents&&(e.style.touchAction=""),s.supportsPointerEvents?k(e):x(e),s.supportsTouchEvents&&E(e),o.useNativeClickEvent&&e.removeEventListener("click",p,!0),e.removeEventListener("wheel",f,!0)})}}])}();aY.tag="DOMInteraction";var aW=Object.freeze({__proto__:null,Plugin:function(e){function t(){var e;(0,R.Z)(this,t);for(var n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];return(e=(0,O.Z)(this,t,[].concat(i))).name="dom-interaction",e}return(0,I.Z)(t,e),(0,Z.Z)(t,[{key:"init",value:function(){this.addRenderingPlugin(new aY)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(eb)});(function(){function e(){(0,R.Z)(this,e)}return(0,Z.Z)(e,[{key:"apply",value:function(t){var n=t.renderingService,i=t.contextService,r=t.config,a=i.getDomElement(),o=function(e){n.hooks.pointerDown.call(e)},s=function(e){n.hooks.pointerUp.call(e)},l=function(e){n.hooks.pointerMove.call(e)},u=function(e){n.hooks.pointerOver.call(e)},c=function(e){n.hooks.pointerOut.call(e)},h=function(e){n.hooks.click.call(e)},d=function(e){n.hooks.pointerCancel.call(e)};n.hooks.init.tap(e.tag,function(){a.addEventListener("touchstart",o,!0),a.addEventListener("touchend",s,!0),a.addEventListener("touchmove",l,!0),a.addEventListener("touchcancel",d,!0),a.addEventListener("mouseout",c,!0),a.addEventListener("mouseover",u,!0),r.useNativeClickEvent&&a.addEventListener("click",h,!0)}),n.hooks.destroy.tap(e.tag,function(){a.removeEventListener("touchstart",o,!0),a.removeEventListener("touchend",s,!0),a.removeEventListener("touchmove",l,!0),a.removeEventListener("touchcancel",d,!0),a.removeEventListener("mouseout",c,!0),a.removeEventListener("mouseover",u,!0),r.useNativeClickEvent&&a.removeEventListener("click",h,!0)})}}])})().tag="MobileInteraction"}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.