diff --git a/dist/0c35d18bf06992036b69.woff2 b/dist/0c35d18bf06992036b69.woff2 deleted file mode 100644 index 5492a6e7..00000000 Binary files a/dist/0c35d18bf06992036b69.woff2 and /dev/null differ diff --git a/dist/219aa9140e099e6c72ed.woff2 b/dist/219aa9140e099e6c72ed.woff2 deleted file mode 100644 index 40626852..00000000 Binary files a/dist/219aa9140e099e6c72ed.woff2 and /dev/null differ diff --git a/dist/3a4004a46a653d4b2166.woff b/dist/3a4004a46a653d4b2166.woff deleted file mode 100644 index 80d8c991..00000000 Binary files a/dist/3a4004a46a653d4b2166.woff and /dev/null differ diff --git a/dist/3baa5b8f3469222b822d.woff b/dist/3baa5b8f3469222b822d.woff deleted file mode 100644 index ddf106c4..00000000 Binary files a/dist/3baa5b8f3469222b822d.woff and /dev/null differ diff --git a/dist/4d73cb90e394b34b7670.woff b/dist/4d73cb90e394b34b7670.woff deleted file mode 100644 index 88fdf4d0..00000000 Binary files a/dist/4d73cb90e394b34b7670.woff and /dev/null differ diff --git a/dist/4ef4218c522f1eb6b5b1.woff2 b/dist/4ef4218c522f1eb6b5b1.woff2 deleted file mode 100644 index 8f799901..00000000 Binary files a/dist/4ef4218c522f1eb6b5b1.woff2 and /dev/null differ diff --git a/dist/5d681e2edae8c60630db.woff b/dist/5d681e2edae8c60630db.woff deleted file mode 100644 index bc0002b3..00000000 Binary files a/dist/5d681e2edae8c60630db.woff and /dev/null differ diff --git a/dist/6f420cf17cc0d7676fad.woff2 b/dist/6f420cf17cc0d7676fad.woff2 deleted file mode 100644 index d44b9486..00000000 Binary files a/dist/6f420cf17cc0d7676fad.woff2 and /dev/null differ diff --git a/dist/c380809fd3677d7d6903.woff2 b/dist/c380809fd3677d7d6903.woff2 deleted file mode 100644 index e9e305f2..00000000 Binary files a/dist/c380809fd3677d7d6903.woff2 and /dev/null differ diff --git a/dist/f882956fd323fd322f31.woff b/dist/f882956fd323fd322f31.woff deleted file mode 100644 index edeb9df9..00000000 Binary files a/dist/f882956fd323fd322f31.woff and /dev/null differ diff --git a/dist/sdfv.js b/dist/sdfv.js deleted file mode 100644 index 1c2bcab7..00000000 --- a/dist/sdfv.js +++ /dev/null @@ -1,9 +0,0 @@ -/*! For license information please see sdfv.js.LICENSE.txt */ -(()=>{var __webpack_modules__={11680:(e,t,n)=>{"use strict";var r,i,o,a,s,l,c,d,u,p,f,h,m,b,g,A,v,y,x;n.d(t,{A7:()=>v,G5:()=>y,I2:()=>l,N3:()=>i,Nt:()=>f,T$:()=>a,UN:()=>g,V0:()=>o,Vi:()=>r,WB:()=>h,aH:()=>p,cB:()=>A,iw:()=>m,lg:()=>s,mr:()=>x,oT:()=>u,sp:()=>c,vK:()=>d,yl:()=>b}),function(e){e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2"}(r||(r={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS"}(i||(i={})),function(e){e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL"}(o||(o={})),function(e){e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e[e.NORMAL_NPM=17]="NORMAL_NPM",e[e.ADD_NPM=18]="ADD_NPM",e[e.SCREEN_NPM=19]="SCREEN_NPM",e[e.NONE=20]="NONE",e[e.SRC_OVER=0]="SRC_OVER",e[e.SRC_IN=21]="SRC_IN",e[e.SRC_OUT=22]="SRC_OUT",e[e.SRC_ATOP=23]="SRC_ATOP",e[e.DST_OVER=24]="DST_OVER",e[e.DST_IN=25]="DST_IN",e[e.DST_OUT=26]="DST_OUT",e[e.DST_ATOP=27]="DST_ATOP",e[e.ERASE=26]="ERASE",e[e.SUBTRACT=28]="SUBTRACT",e[e.XOR=29]="XOR"}(a||(a={})),function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(s||(s={})),function(e){e[e.RGBA=6408]="RGBA",e[e.RGB=6407]="RGB",e[e.RG=33319]="RG",e[e.RED=6403]="RED",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.ALPHA=6406]="ALPHA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(l||(l={})),function(e){e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"}(c||(c={})),function(e){e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.BYTE=5120]="BYTE",e[e.SHORT=5122]="SHORT",e[e.INT=5124]="INT",e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",e[e.HALF_FLOAT=36193]="HALF_FLOAT"}(d||(d={})),function(e){e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT"}(u||(u={})),function(e){e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR"}(p||(p={})),function(e){e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(f||(f={})),function(e){e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL"}(h||(h={})),function(e){e[e.NPM=0]="NPM",e[e.UNPACK=1]="UNPACK",e[e.PMA=2]="PMA",e[e.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",e[e.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",e[e.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA"}(m||(m={})),function(e){e[e.NO=0]="NO",e[e.YES=1]="YES",e[e.AUTO=2]="AUTO",e[e.BLEND=0]="BLEND",e[e.CLEAR=1]="CLEAR",e[e.BLIT=2]="BLIT"}(b||(b={})),function(e){e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL"}(g||(g={})),function(e){e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp"}(A||(A={})),function(e){e[e.NONE=0]="NONE",e[e.SCISSOR=1]="SCISSOR",e[e.STENCIL=2]="STENCIL",e[e.SPRITE=3]="SPRITE"}(v||(v={})),function(e){e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH"}(y||(y={})),function(e){e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"}(x||(x={}))},69658:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Circle:()=>l,DEG_TO_RAD:()=>a,Ellipse:()=>c,Matrix:()=>h,ObservablePoint:()=>f,PI_2:()=>i,Point:()=>p,Polygon:()=>d,RAD_TO_DEG:()=>o,Rectangle:()=>s,RoundedRectangle:()=>u,SHAPES:()=>r,Transform:()=>_,groupD8:()=>w});var r,i=2*Math.PI,o=180/Math.PI,a=Math.PI/180;!function(e){e[e.POLY=0]="POLY",e[e.RECT=1]="RECT",e[e.CIRC=2]="CIRC",e[e.ELIP=3]="ELIP",e[e.RREC=4]="RREC"}(r||(r={}));var s=function(){function e(e,t,n,i){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===i&&(i=0),this.x=Number(e),this.y=Number(t),this.width=Number(n),this.height=Number(i),this.type=r.RECT}return Object.defineProperty(e.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(e,"EMPTY",{get:function(){return new e(0,0,0,0)},enumerable:!1,configurable:!0}),e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copyFrom=function(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this},e.prototype.copyTo=function(e){return e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e},e.prototype.contains=function(e,t){return!(this.width<=0||this.height<=0)&&e>=this.x&&e=this.y&&tt!=c>t&&e<(t-s)/(c-s)*(l-a)+a&&(n=!n)}return n},e.prototype.toString=function(){return"[@pixi/math:PolygoncloseStroke="+this.closeStroke+"points="+this.points.reduce((function(e,t){return e+", "+t}),"")+"]"},e}(),u=function(){function e(e,t,n,i,o){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===i&&(i=0),void 0===o&&(o=20),this.x=e,this.y=t,this.width=n,this.height=i,this.radius=o,this.type=r.RREC}return e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height,this.radius)},e.prototype.contains=function(e,t){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height){if(t>=this.y+this.radius&&t<=this.y+this.height-this.radius||e>=this.x+this.radius&&e<=this.x+this.width-this.radius)return!0;var n=e-(this.x+this.radius),r=t-(this.y+this.radius),i=this.radius*this.radius;if(n*n+r*r<=i)return!0;if((n=e-(this.x+this.width-this.radius))*n+r*r<=i)return!0;if(n*n+(r=t-(this.y+this.height-this.radius))*r<=i)return!0;if((n=e-(this.x+this.radius))*n+r*r<=i)return!0}return!1},e.prototype.toString=function(){return"[@pixi/math:RoundedRectangle x="+this.x+" y="+this.y+"width="+this.width+" height="+this.height+" radius="+this.radius+"]"},e}(),p=function(){function e(e,t){void 0===e&&(e=0),void 0===t&&(t=0),this.x=0,this.y=0,this.x=e,this.y=t}return e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.copyFrom=function(e){return this.set(e.x,e.y),this},e.prototype.copyTo=function(e){return e.set(this.x,this.y),e},e.prototype.equals=function(e){return e.x===this.x&&e.y===this.y},e.prototype.set=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=e),this.x=e,this.y=t,this},e.prototype.toString=function(){return"[@pixi/math:Point x="+this.x+" y="+this.y+"]"},e}(),f=function(){function e(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=0),this._x=n,this._y=r,this.cb=e,this.scope=t}return e.prototype.clone=function(t,n){return void 0===t&&(t=this.cb),void 0===n&&(n=this.scope),new e(t,n,this._x,this._y)},e.prototype.set=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=e),this._x===e&&this._y===t||(this._x=e,this._y=t,this.cb.call(this.scope)),this},e.prototype.copyFrom=function(e){return this._x===e.x&&this._y===e.y||(this._x=e.x,this._y=e.y,this.cb.call(this.scope)),this},e.prototype.copyTo=function(e){return e.set(this._x,this._y),e},e.prototype.equals=function(e){return e.x===this._x&&e.y===this._y},e.prototype.toString=function(){return"[@pixi/math:ObservablePoint x=0 y=0 scope="+this.scope+"]"},Object.defineProperty(e.prototype,"x",{get:function(){return this._x},set:function(e){this._x!==e&&(this._x=e,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._y},set:function(e){this._y!==e&&(this._y=e,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),e}(),h=function(){function e(e,t,n,r,i,o){void 0===e&&(e=1),void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=1),void 0===i&&(i=0),void 0===o&&(o=0),this.array=null,this.a=e,this.b=t,this.c=n,this.d=r,this.tx=i,this.ty=o}return e.prototype.fromArray=function(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]},e.prototype.set=function(e,t,n,r,i,o){return this.a=e,this.b=t,this.c=n,this.d=r,this.tx=i,this.ty=o,this},e.prototype.toArray=function(e,t){this.array||(this.array=new Float32Array(9));var n=t||this.array;return e?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n},e.prototype.apply=function(e,t){t=t||new p;var n=e.x,r=e.y;return t.x=this.a*n+this.c*r+this.tx,t.y=this.b*n+this.d*r+this.ty,t},e.prototype.applyInverse=function(e,t){t=t||new p;var n=1/(this.a*this.d+this.c*-this.b),r=e.x,i=e.y;return t.x=this.d*n*r+-this.c*n*i+(this.ty*this.c-this.tx*this.d)*n,t.y=this.a*n*i+-this.b*n*r+(-this.ty*this.a+this.tx*this.b)*n,t},e.prototype.translate=function(e,t){return this.tx+=e,this.ty+=t,this},e.prototype.scale=function(e,t){return this.a*=e,this.d*=t,this.c*=e,this.b*=t,this.tx*=e,this.ty*=t,this},e.prototype.rotate=function(e){var t=Math.cos(e),n=Math.sin(e),r=this.a,i=this.c,o=this.tx;return this.a=r*t-this.b*n,this.b=r*n+this.b*t,this.c=i*t-this.d*n,this.d=i*n+this.d*t,this.tx=o*t-this.ty*n,this.ty=o*n+this.ty*t,this},e.prototype.append=function(e){var t=this.a,n=this.b,r=this.c,i=this.d;return this.a=e.a*t+e.b*r,this.b=e.a*n+e.b*i,this.c=e.c*t+e.d*r,this.d=e.c*n+e.d*i,this.tx=e.tx*t+e.ty*r+this.tx,this.ty=e.tx*n+e.ty*i+this.ty,this},e.prototype.setTransform=function(e,t,n,r,i,o,a,s,l){return this.a=Math.cos(a+l)*i,this.b=Math.sin(a+l)*i,this.c=-Math.sin(a-s)*o,this.d=Math.cos(a-s)*o,this.tx=e-(n*this.a+r*this.c),this.ty=t-(n*this.b+r*this.d),this},e.prototype.prepend=function(e){var t=this.tx;if(1!==e.a||0!==e.b||0!==e.c||1!==e.d){var n=this.a,r=this.c;this.a=n*e.a+this.b*e.c,this.b=n*e.b+this.b*e.d,this.c=r*e.a+this.d*e.c,this.d=r*e.b+this.d*e.d}return this.tx=t*e.a+this.ty*e.c+e.tx,this.ty=t*e.b+this.ty*e.d+e.ty,this},e.prototype.decompose=function(e){var t=this.a,n=this.b,r=this.c,o=this.d,a=e.pivot,s=-Math.atan2(-r,o),l=Math.atan2(n,t),c=Math.abs(s+l);return c<1e-5||Math.abs(i-c)<1e-5?(e.rotation=l,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=s,e.skew.y=l),e.scale.x=Math.sqrt(t*t+n*n),e.scale.y=Math.sqrt(r*r+o*o),e.position.x=this.tx+(a.x*t+a.y*r),e.position.y=this.ty+(a.x*n+a.y*o),e},e.prototype.invert=function(){var e=this.a,t=this.b,n=this.c,r=this.d,i=this.tx,o=e*r-t*n;return this.a=r/o,this.b=-t/o,this.c=-n/o,this.d=e/o,this.tx=(n*this.ty-r*i)/o,this.ty=-(e*this.ty-t*i)/o,this},e.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},e.prototype.clone=function(){var t=new e;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},e.prototype.copyTo=function(e){return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},e.prototype.copyFrom=function(e){return this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty,this},e.prototype.toString=function(){return"[@pixi/math:Matrix a="+this.a+" b="+this.b+" c="+this.c+" d="+this.d+" tx="+this.tx+" ty="+this.ty+"]"},Object.defineProperty(e,"IDENTITY",{get:function(){return new e},enumerable:!1,configurable:!0}),Object.defineProperty(e,"TEMP_MATRIX",{get:function(){return new e},enumerable:!1,configurable:!0}),e}(),m=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],b=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],g=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],A=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],v=[],y=[],x=Math.sign;!function(){for(var e=0;e<16;e++){var t=[];v.push(t);for(var n=0;n<16;n++)for(var r=x(m[e]*m[n]+g[e]*b[n]),i=x(b[e]*m[n]+A[e]*b[n]),o=x(m[e]*g[n]+g[e]*A[n]),a=x(b[e]*g[n]+A[e]*A[n]),s=0;s<16;s++)if(m[s]===r&&b[s]===i&&g[s]===o&&A[s]===a){t.push(s);break}}for(e=0;e<16;e++){var l=new h;l.set(m[e],b[e],g[e],A[e],0,0),y.push(l)}}();var w={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:function(e){return m[e]},uY:function(e){return b[e]},vX:function(e){return g[e]},vY:function(e){return A[e]},inv:function(e){return 8&e?15&e:7&-e},add:function(e,t){return v[e][t]},sub:function(e,t){return v[e][w.inv(t)]},rotate180:function(e){return 4^e},isVertical:function(e){return 2==(3&e)},byDirection:function(e,t){return 2*Math.abs(e)<=Math.abs(t)?t>=0?w.S:w.N:2*Math.abs(t)<=Math.abs(e)?e>0?w.E:w.W:t>0?e>0?w.SE:w.SW:e>0?w.NE:w.NW},matrixAppendRotationInv:function(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var i=y[w.inv(t)];i.tx=n,i.ty=r,e.append(i)}},_=function(){function e(){this.worldTransform=new h,this.localTransform=new h,this.position=new f(this.onChange,this,0,0),this.scale=new f(this.onChange,this,1,1),this.pivot=new f(this.onChange,this,0,0),this.skew=new f(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}return e.prototype.onChange=function(){this._localID++},e.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++},e.prototype.toString=function(){return"[@pixi/math:Transform position=("+this.position.x+", "+this.position.y+") rotation="+this.rotation+" scale=("+this.scale.x+", "+this.scale.y+") skew=("+this.skew.x+", "+this.skew.y+") ]"},e.prototype.updateLocalTransform=function(){var e=this.localTransform;this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1)},e.prototype.updateTransform=function(e){var t=this.localTransform;if(this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==e._worldID){var n=e.worldTransform,r=this.worldTransform;r.a=t.a*n.a+t.b*n.c,r.b=t.a*n.b+t.b*n.d,r.c=t.c*n.a+t.d*n.c,r.d=t.c*n.b+t.d*n.d,r.tx=t.tx*n.a+t.ty*n.c+n.tx,r.ty=t.tx*n.b+t.ty*n.d+n.ty,this._parentID=e._worldID,this._worldID++}},e.prototype.setFromMatrix=function(e){e.decompose(this),this._localID++},Object.defineProperty(e.prototype,"rotation",{get:function(){return this._rotation},set:function(e){this._rotation!==e&&(this._rotation=e,this.updateSkew())},enumerable:!1,configurable:!0}),e.IDENTITY=new e,e}()},49319:(e,t,n)=>{"use strict";n.d(t,{t:()=>j,X:()=>$});var r,i,o,a,s,l,c,d,u,p,f,h,m,b,g,A,v,y,x,w=/iPhone/i,_=/iPod/i,C=/iPad/i,D=/\biOS-universal(?:.+)Mac\b/i,E=/\bAndroid(?:.+)Mobile\b/i,k=/Android/i,O=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,S=/Silk/i,B=/Windows Phone/i,M=/\bWindows(?:.+)ARM\b/i,P=/BlackBerry/i,N=/BB10/i,T=/Opera Mini/i,I=/\b(CriOS|Chrome)(?:.+)Mobile/i,R=/Mobile(?:.+)Firefox\b/i,F=function(e){return void 0!==e&&"MacIntel"===e.platform&&"number"==typeof e.maxTouchPoints&&e.maxTouchPoints>1&&"undefined"==typeof MSStream},j=function(e){var t={userAgent:"",platform:"",maxTouchPoints:0};e||"undefined"==typeof navigator?"string"==typeof e?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0}):t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var n=t.userAgent,r=n.split("[FBAN");void 0!==r[1]&&(n=r[0]),void 0!==(r=n.split("Twitter"))[1]&&(n=r[0]);var i=function(e){return function(t){return t.test(e)}}(n),o={apple:{phone:i(w)&&!i(B),ipod:i(_),tablet:!i(w)&&(i(C)||F(t))&&!i(B),universal:i(D),device:(i(w)||i(_)||i(C)||i(D)||F(t))&&!i(B)},amazon:{phone:i(O),tablet:!i(O)&&i(S),device:i(O)||i(S)},android:{phone:!i(B)&&i(O)||!i(B)&&i(E),tablet:!i(B)&&!i(O)&&!i(E)&&(i(S)||i(k)),device:!i(B)&&(i(O)||i(S)||i(E)||i(k))||i(/\bokhttp\b/i)},windows:{phone:i(B),tablet:i(M),device:i(B)||i(M)},other:{blackberry:i(P),blackberry10:i(N),opera:i(T),firefox:i(R),chrome:i(I),device:i(P)||i(N)||i(T)||i(R)||i(I)},any:!1,phone:!1,tablet:!1};return o.any=o.apple.device||o.android.device||o.windows.device||o.other.device,o.phone=o.apple.phone||o.android.phone||o.windows.phone,o.tablet=o.apple.tablet||o.android.tablet||o.windows.tablet,o}(self.navigator);!function(e){e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2"}(r||(r={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS"}(i||(i={})),function(e){e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL"}(o||(o={})),function(e){e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e[e.NORMAL_NPM=17]="NORMAL_NPM",e[e.ADD_NPM=18]="ADD_NPM",e[e.SCREEN_NPM=19]="SCREEN_NPM",e[e.NONE=20]="NONE",e[e.SRC_OVER=0]="SRC_OVER",e[e.SRC_IN=21]="SRC_IN",e[e.SRC_OUT=22]="SRC_OUT",e[e.SRC_ATOP=23]="SRC_ATOP",e[e.DST_OVER=24]="DST_OVER",e[e.DST_IN=25]="DST_IN",e[e.DST_OUT=26]="DST_OUT",e[e.DST_ATOP=27]="DST_ATOP",e[e.ERASE=26]="ERASE",e[e.SUBTRACT=28]="SUBTRACT",e[e.XOR=29]="XOR"}(a||(a={})),function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(s||(s={})),function(e){e[e.RGBA=6408]="RGBA",e[e.RGB=6407]="RGB",e[e.RG=33319]="RG",e[e.RED=6403]="RED",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.ALPHA=6406]="ALPHA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(l||(l={})),function(e){e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"}(c||(c={})),function(e){e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.BYTE=5120]="BYTE",e[e.SHORT=5122]="SHORT",e[e.INT=5124]="INT",e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",e[e.HALF_FLOAT=36193]="HALF_FLOAT"}(d||(d={})),function(e){e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT"}(u||(u={})),function(e){e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR"}(p||(p={})),function(e){e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(f||(f={})),function(e){e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL"}(h||(h={})),function(e){e[e.NPM=0]="NPM",e[e.UNPACK=1]="UNPACK",e[e.PMA=2]="PMA",e[e.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",e[e.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",e[e.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA"}(m||(m={})),function(e){e[e.NO=0]="NO",e[e.YES=1]="YES",e[e.AUTO=2]="AUTO",e[e.BLEND=0]="BLEND",e[e.CLEAR=1]="CLEAR",e[e.BLIT=2]="BLIT"}(b||(b={})),function(e){e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL"}(g||(g={})),function(e){e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp"}(A||(A={})),function(e){e[e.NONE=0]="NONE",e[e.SCISSOR=1]="SCISSOR",e[e.STENCIL=2]="STENCIL",e[e.SPRITE=3]="SPRITE"}(v||(v={})),function(e){e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH"}(y||(y={})),function(e){e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"}(x||(x={}));var $={MIPMAP_TEXTURES:h.POW2,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,FILTER_MULTISAMPLE:y.NONE,SPRITE_MAX_TEXTURES:function(e){var t,n=!0;(j.tablet||j.phone)&&(j.apple.device&&(t=navigator.userAgent.match(/OS (\d+)_(\d+)?/))&&parseInt(t[1],10)<11&&(n=!1),j.android.device&&(t=navigator.userAgent.match(/Android\s([0-9.]*)/))&&parseInt(t[1],10)<7&&(n=!1));return n?32:4}(),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,antialias:!1,autoDensity:!1,backgroundColor:0,backgroundAlpha:1,useContextAlpha:!0,clearBeforeRender:!0,preserveDrawingBuffer:!1,width:800,height:600,legacy:!1},GC_MODE:g.AUTO,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:f.CLAMP,SCALE_MODE:p.LINEAR,PRECISION_VERTEX:A.HIGH,PRECISION_FRAGMENT:j.apple.device?A.HIGH:A.MEDIUM,CAN_UPLOAD_SAME_BUFFER:!j.apple.device,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1}},98942:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BaseTextureCache:()=>U,CanvasRenderTarget:()=>H,DATA_URI:()=>V,EventEmitter:()=>o.a,ProgramCache:()=>L,TextureCache:()=>z,clearTextureCache:()=>q,correctBlendMode:()=>_,createIndicesForQuads:()=>k,decomposeDataUri:()=>X,deprecation:()=>$,destroyTextureCache:()=>G,determineCrossOrigin:()=>Y,earcut:()=>s.a,getBufferType:()=>O,getResolutionOfUrl:()=>Q,hex2rgb:()=>A,hex2string:()=>v,interleaveTypedArrays:()=>B,isMobile:()=>r.t,isPow2:()=>P,isWebGLSupported:()=>b,log2:()=>N,nextPow2:()=>M,premultiplyBlendMode:()=>w,premultiplyRgba:()=>C,premultiplyTint:()=>D,premultiplyTintToRgba:()=>E,removeItems:()=>T,rgb2hex:()=>x,sayHello:()=>m,sign:()=>I,skipHello:()=>h,string2hex:()=>y,trimCanvas:()=>J,uid:()=>F,url:()=>d});var r=n(49319),i=n(26729),o=n.n(i),a=n(9187),s=n.n(a),l=n(8575),c=n(11680),d={parse:l.Qc,format:l.WU,resolve:l.DB};r.X.RETINA_PREFIX=/@([0-9\.]+)x/,r.X.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var u,p=!1,f="6.1.3";function h(){p=!0}function m(e){var t;if(!p){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var n=["\n %c %c %c PixiJS "+f+" - ✰ "+e+" ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];(t=self.console).log.apply(t,n)}else self.console&&self.console.log("PixiJS "+f+" - "+e+" - http://www.pixijs.com/");p=!0}}function b(){return void 0===u&&(u=function(){var e={stencil:!0,failIfMajorPerformanceCaveat:r.X.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!self.WebGLRenderingContext)return!1;var t=document.createElement("canvas"),n=t.getContext("webgl",e)||t.getContext("experimental-webgl",e),i=!(!n||!n.getContextAttributes().stencil);if(n){var o=n.getExtension("WEBGL_lose_context");o&&o.loseContext()}return n=null,i}catch(e){return!1}}()),u}var g={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function A(e,t){return void 0===t&&(t=[]),t[0]=(e>>16&255)/255,t[1]=(e>>8&255)/255,t[2]=(255&e)/255,t}function v(e){var t=e.toString(16);return"#"+("000000".substr(0,6-t.length)+t)}function y(e){return"string"==typeof e&&"#"===(e=g[e.toLowerCase()]||e)[0]&&(e=e.substr(1)),parseInt(e,16)}function x(e){return(255*e[0]<<16)+(255*e[1]<<8)+(255*e[2]|0)}var w=function(){for(var e=[],t=[],n=0;n<32;n++)e[n]=n,t[n]=n;e[c.T$.NORMAL_NPM]=c.T$.NORMAL,e[c.T$.ADD_NPM]=c.T$.ADD,e[c.T$.SCREEN_NPM]=c.T$.SCREEN,t[c.T$.NORMAL]=c.T$.NORMAL_NPM,t[c.T$.ADD]=c.T$.ADD_NPM,t[c.T$.SCREEN]=c.T$.SCREEN_NPM;var r=[];return r.push(t),r.push(e),r}();function _(e,t){return w[t?1:0][e]}function C(e,t,n,r){return n=n||new Float32Array(4),r||void 0===r?(n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t):(n[0]=e[0],n[1]=e[1],n[2]=e[2]),n[3]=t,n}function D(e,t){if(1===t)return(255*t<<24)+e;if(0===t)return 0;var n=e>>16&255,r=e>>8&255,i=255&e;return(255*t<<24)+((n=n*t+.5|0)<<16)+((r=r*t+.5|0)<<8)+(i*t+.5|0)}function E(e,t,n,r){return(n=n||new Float32Array(4))[0]=(e>>16&255)/255,n[1]=(e>>8&255)/255,n[2]=(255&e)/255,(r||void 0===r)&&(n[0]*=t,n[1]*=t,n[2]*=t),n[3]=t,n}function k(e,t){void 0===t&&(t=null);var n=6*e;if((t=t||new Uint16Array(n)).length!==n)throw new Error("Out buffer length is incorrect, got "+t.length+" and expected "+n);for(var r=0,i=0;r>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,1+(e|=e>>>16)}function P(e){return!(e&e-1||!e)}function N(e){var t=(e>65535?1:0)<<4,n=((e>>>=t)>255?1:0)<<3;return t|=n,t|=n=((e>>>=n)>15?1:0)<<2,(t|=n=((e>>>=n)>3?1:0)<<1)|(e>>>=n)>>1}function T(e,t,n){var r,i=e.length;if(!(t>=i||0===n)){var o=i-(n=t+n>i?i-t:n);for(r=t;r{"use strict";var r=n(34155);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var o,a,s=n(62136).codes,l=s.ERR_AMBIGUOUS_ARGUMENT,c=s.ERR_INVALID_ARG_TYPE,d=s.ERR_INVALID_ARG_VALUE,u=s.ERR_INVALID_RETURN_VALUE,p=s.ERR_MISSING_ARGS,f=n(25961),h=n(89539).inspect,m=n(89539).types,b=m.isPromise,g=m.isRegExp,A=Object.assign?Object.assign:n(8091).assign,v=Object.is?Object.is:n(20609);function y(){var e=n(19158);o=e.isDeepEqual,a=e.isDeepStrictEqual}new Map;var x=!1,w=e.exports=E,_={};function C(e){if(e.message instanceof Error)throw e.message;throw new f(e)}function D(e,t,n,r){if(!n){var i=!1;if(0===t)i=!0,r="No value argument passed to `assert.ok()`";else if(r instanceof Error)throw r;var o=new f({actual:n,expected:!0,message:r,operator:"==",stackStartFn:e});throw o.generatedMessage=i,o}}function E(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),i=1;i1?n-1:0),i=1;i1?n-1:0),i=1;i1?n-1:0),i=1;i{"use strict";var r=n(34155);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){for(var n=0;ne.length)&&(n=e.length),e.substring(n-t.length,n)===t}var b="",g="",A="",v="",y={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function x(e){var t=Object.keys(e),n=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){n[t]=e[t]})),Object.defineProperty(n,"message",{value:e.message}),n}function w(e){return f(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var _=function(e){function t(e){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),"object"!==p(e)||null===e)throw new h("options","Object",e);var i=e.message,o=e.operator,l=e.stackStartFn,c=e.actual,d=e.expected,f=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=i)n=a(this,u(t).call(this,String(i)));else if(r.stderr&&r.stderr.isTTY&&(r.stderr&&r.stderr.getColorDepth&&1!==r.stderr.getColorDepth()?(b="",g="",v="",A=""):(b="",g="",v="",A="")),"object"===p(c)&&null!==c&&"object"===p(d)&&null!==d&&"stack"in c&&c instanceof Error&&"stack"in d&&d instanceof Error&&(c=x(c),d=x(d)),"deepStrictEqual"===o||"strictEqual"===o)n=a(this,u(t).call(this,function(e,t,n){var i="",o="",a=0,s="",l=!1,c=w(e),d=c.split("\n"),u=w(t).split("\n"),f=0,h="";if("strictEqual"===n&&"object"===p(e)&&"object"===p(t)&&null!==e&&null!==t&&(n="strictEqualObject"),1===d.length&&1===u.length&&d[0]!==u[0]){var x=d[0].length+u[0].length;if(x<=10){if(!("object"===p(e)&&null!==e||"object"===p(t)&&null!==t||0===e&&0===t))return"".concat(y[n],"\n\n")+"".concat(d[0]," !== ").concat(u[0],"\n")}else if("strictEqualObject"!==n&&x<(r.stderr&&r.stderr.isTTY?r.stderr.columns:80)){for(;d[0][f]===u[0][f];)f++;f>2&&(h="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var n=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,n-e.length)}(" ",f),"^"),f=0)}}for(var _=d[d.length-1],C=u[u.length-1];_===C&&(f++<2?s="\n ".concat(_).concat(s):i=_,d.pop(),u.pop(),0!==d.length&&0!==u.length);)_=d[d.length-1],C=u[u.length-1];var D=Math.max(d.length,u.length);if(0===D){var E=c.split("\n");if(E.length>30)for(E[26]="".concat(b,"...").concat(v);E.length>27;)E.pop();return"".concat(y.notIdentical,"\n\n").concat(E.join("\n"),"\n")}f>3&&(s="\n".concat(b,"...").concat(v).concat(s),l=!0),""!==i&&(s="\n ".concat(i).concat(s),i="");var k=0,O=y[n]+"\n".concat(g,"+ actual").concat(v," ").concat(A,"- expected").concat(v),S=" ".concat(b,"...").concat(v," Lines skipped");for(f=0;f1&&f>2&&(B>4?(o+="\n".concat(b,"...").concat(v),l=!0):B>3&&(o+="\n ".concat(u[f-2]),k++),o+="\n ".concat(u[f-1]),k++),a=f,i+="\n".concat(A,"-").concat(v," ").concat(u[f]),k++;else if(u.length1&&f>2&&(B>4?(o+="\n".concat(b,"...").concat(v),l=!0):B>3&&(o+="\n ".concat(d[f-2]),k++),o+="\n ".concat(d[f-1]),k++),a=f,o+="\n".concat(g,"+").concat(v," ").concat(d[f]),k++;else{var M=u[f],P=d[f],N=P!==M&&(!m(P,",")||P.slice(0,-1)!==M);N&&m(M,",")&&M.slice(0,-1)===P&&(N=!1,P+=","),N?(B>1&&f>2&&(B>4?(o+="\n".concat(b,"...").concat(v),l=!0):B>3&&(o+="\n ".concat(d[f-2]),k++),o+="\n ".concat(d[f-1]),k++),a=f,o+="\n".concat(g,"+").concat(v," ").concat(P),i+="\n".concat(A,"-").concat(v," ").concat(M),k+=2):(o+=i,i="",1!==B&&0!==f||(o+="\n ".concat(P),k++))}if(k>20&&f30)for(C[26]="".concat(b,"...").concat(v);C.length>27;)C.pop();n=1===C.length?a(this,u(t).call(this,"".concat(_," ").concat(C[0]))):a(this,u(t).call(this,"".concat(_,"\n\n").concat(C.join("\n"),"\n")))}else{var D=w(c),E="",k=y[o];"notDeepEqual"===o||"notEqual"===o?(D="".concat(y[o],"\n\n").concat(D)).length>1024&&(D="".concat(D.slice(0,1021),"...")):(E="".concat(w(d)),D.length>512&&(D="".concat(D.slice(0,509),"...")),E.length>512&&(E="".concat(E.slice(0,509),"...")),"deepEqual"===o||"equal"===o?D="".concat(k,"\n\n").concat(D,"\n\nshould equal\n\n"):E=" ".concat(o," ").concat(E)),n=a(this,u(t).call(this,"".concat(D).concat(E)))}return Error.stackTraceLimit=f,n.generatedMessage=!i,Object.defineProperty(s(n),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),n.code="ERR_ASSERTION",n.actual=c,n.expected=d,n.operator=o,Error.captureStackTrace&&Error.captureStackTrace(s(n),l),n.stack,n.name="AssertionError",a(n)}var n,l;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(t,e),n=t,l=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:f.custom,value:function(e,t){return f(this,function(e){for(var t=1;t{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}function o(e,t){return o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},o(e,t)}var a,s,l={};function c(e,t,n){n||(n=Error);var a=function(n){function a(n,o,s){var l;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),l=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,i(a).call(this,function(e,n,r){return"string"==typeof t?t:t(e,n,r)}(n,o,s))),l.code=e,l}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(a,n),a}(n);l[e]=a}function d(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}c("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),c("ERR_INVALID_ARG_TYPE",(function(e,t,i){var o,s,l,c,u;if(void 0===a&&(a=n(69282)),a("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(s="not ",t.substr(0,4)===s)?(o="must not be",t=t.replace(/^not /,"")):o="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-9,n)===t}(e," argument"))l="The ".concat(e," ").concat(o," ").concat(d(t,"type"));else{var p=("number"!=typeof u&&(u=0),u+1>(c=e).length||-1===c.indexOf(".",u)?"argument":"property");l='The "'.concat(e,'" ').concat(p," ").concat(o," ").concat(d(t,"type"))}return l+". Received type ".concat(r(i))}),TypeError),c("ERR_INVALID_ARG_VALUE",(function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===s&&(s=n(89539));var i=s.inspect(t);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(i)}),TypeError,RangeError),c("ERR_INVALID_RETURN_VALUE",(function(e,t,n){var i;return i=n&&n.constructor&&n.constructor.name?"instance of ".concat(n.constructor.name):"type ".concat(r(n)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(i,".")}),TypeError),c("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),r=0;r0,"At least one arg needs to be specified");var i="The ",o=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),o){case 1:i+="".concat(t[0]," argument");break;case 2:i+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:i+=t.slice(0,o-1).join(", "),i+=", and ".concat(t[o-1]," arguments")}return"".concat(i," must be specified")}),TypeError),e.exports.codes=l},19158:(e,t,n)=>{"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var o=void 0!==/a/g.flags,a=function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t},s=function(e){var t=[];return e.forEach((function(e,n){return t.push([n,e])})),t},l=Object.is?Object.is:n(20609),c=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},d=Number.isNaN?Number.isNaN:n(20360);function u(e){return e.call.bind(e)}var p=u(Object.prototype.hasOwnProperty),f=u(Object.prototype.propertyIsEnumerable),h=u(Object.prototype.toString),m=n(89539).types,b=m.isAnyArrayBuffer,g=m.isArrayBufferView,A=m.isDate,v=m.isMap,y=m.isRegExp,x=m.isSet,w=m.isNativeError,_=m.isBoxedPrimitive,C=m.isNumberObject,D=m.isStringObject,E=m.isBooleanObject,k=m.isBigIntObject,O=m.isSymbolObject,S=m.isFloat32Array,B=m.isFloat64Array;function M(e){if(0===e.length||e.length>10)return!0;for(var t=0;t57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function P(e){return Object.keys(e).filter(M).concat(c(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function N(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stronglyConnectedComponents=void 0,t.stronglyConnectedComponents=function*(e){const t=new Map,n=new Map,r=new Set,i=[];let o=0;for(const a of e.nodes())if(!r.has(a)){const s=[a];for(;s.length;){const a=s[s.length-1];t.has(a)||(o++,t.set(a,o));let l=!0;for(const n of e.neighborsIter(a))if(!t.has(n)){s.push(n),l=!1;break}if(l){n.set(a,t.get(a));for(const i of e.neighborsIter(a))r.has(i)||(t.get(i)>t.get(a)?n.set(a,Math.min(n.get(a),n.get(i))):n.set(a,Math.min(n.get(a),t.get(i))));if(s.pop(),n.get(a)===t.get(a)){const e=new Set([a]);for(;i.length&&t.get(i[i.length-1])>t.get(a);)e.add(i.pop());for(const t of e)r.add(t);yield e}else i.push(a)}}}}},60815:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.allBackedges=t.simpleCycles=t.NodeCycle=void 0;const r=n(3873);class i{_nodes=new Set;constructor(e){this._nodes=new Set(e)}get length(){return this._nodes.size}get nodes(){return this._nodes}}function*o(e){function t(e,t,n){const r=[e];for(;r.length>0;){const e=r.pop();if(e&&t.has(e)&&(t.delete(e),n.has(e))){for(const t of n.get(e))r.push(t);n.delete(e)}}}const n=e.copy(),i=[];for(const e of(0,r.stronglyConnectedComponents)(n))e.size>1&&i.push(e);for(const e of n.nodes())n.hasEdge(e,e)&&(yield[e],n.removeEdge(e,e));for(;i.length;){const e=i.pop();if(e){const o=n.subgraph(e),a=Array.from(e)[0];e.delete(a);const s=[a],l=new Set,c=new Set;l.add(a);const d=new Map,u=[[a,o.neighbors(a)]];for(;u.length>0;){const[e,n]=u[u.length-1];if(n.length>0){const e=n.pop();if(e===a){yield s.slice();for(const e of s)c.add(e)}else if(e&&!l.has(e)){s.push(e),u.push([e,o.neighbors(e)]),c.delete(e),l.add(e);continue}}if(0===n.length){if(c.has(e))t(e,l,d);else for(const t of o.neighbors(e))void 0===d.get(t)?d.set(t,new Set([e])):d.get(t).has(e)||d.get(t).add(e);u.pop(),s.pop()}}const p=n.subgraph(e);for(const e of(0,r.stronglyConnectedComponents)(p))e.size>1&&i.push(e)}}}t.NodeCycle=i,t.simpleCycles=o,t.allBackedges=function(e,t,n=!1){const r=new Set,a=new Set;if(void 0===t&&(t=e.sources()[0]),void 0===t)throw new Error("No start node specified and none could be found");const s=new Set;for(const t of o(e))s.add(new i(t));const l=new Map;for(const e of s)for(const t of e.nodes)l.has(t)||l.set(t,new Set),l.get(t).add(e);const c=[t],d=new Set([t]),u=new Set,p=s;for(;c.length>0;){const t=c.shift(),i=[];for(const n of e.predecessors(t))d.has(n)||i.push(n);const o=new Map,s=l.get(t);if(s){const e=new Set;for(const t of s)if(u.has(t))e.add(t);else for(const e of i)t.nodes.has(e)&&(o.has(e)?t.length>o.get(e).length&&o.set(e,t):o.set(e,t));for(const t of e)s.delete(t)}const f=new Set;for(const i of o){const o=i[1];u.add(o),p.delete(o),l.get(t)?.delete(o);const a=e.inEdges(t);for(const e of a){const t=e[0][0],i=e[0][1];if(!d.has(t)&&o.nodes.has(t)){f.add([e,o]),n||r.add(e[0]);const a=new Set;for(const e of p)e.nodes.has(t)&&e.nodes.has(i)&&(u.add(e),a.add(e));for(const e of a)p.delete(e)}}}if(n){let e;const t=new Set;for(const n of f)e?e[1].length0)for(const e of t)a.add(e)}for(const n of e.successors(t))d.has(n)||(d.add(n),c.push(n))}return n?[r,a]:[r,new Set]}},7458:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dominatorTree=t.immediateDominators=void 0;const r=n(64436),i=n(75345);function o(e,t){const n=new Map;n.set(t,t);const r=Array.from((0,i.dfsPostorderNodes)(e,t)),o=new Map;for(let e=0;e{"use strict";function*n(e,t,n){const r=new Set;let i;void 0===n&&(n=e.numberOfNodes()),i=void 0===t?e.nodes():[t];for(const t of i){if(r.has(t))continue;yield[t,t,"forward"],r.add(t);const i=[[t,n,e.successors(t)]];for(;i.length;){const[t,n,o]=i[i.length-1],a=o.pop();void 0!==a?r.has(a)?yield[t,a,"nontree"]:(yield[t,a,"forward"],r.add(a),n>1&&i.push([a,n-1,e.successors(a)])):(i.pop(),i.length&&(yield[i[i.length-1][0],t,"reverse"]))}yield[t,t,"reverse"]}}Object.defineProperty(t,"__esModule",{value:!0}),t.dfsPostorderNodes=t.dfsLabeledEdges=void 0,t.dfsLabeledEdges=n,t.dfsPostorderNodes=function*(e,t,r){for(const i of n(e,t,r))"reverse"===i[2]&&(yield i[1])}},64436:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiGraph=void 0;const r=n(3555);class i extends r.Graph{pred=new Map;succ=new Map;constructor(e=""){super(e)}addNode(e,t){super.addNode(e,t),this.pred.has(e)||this.pred.set(e,new Map),this.succ.has(e)||this.succ.set(e,new Map)}removeNode(e){super.removeNode(e),this.pred.delete(e),this.succ.delete(e)}addEdge(e,t,n){this.nodeMap.has(e)||this.addNode(e,void 0),this.nodeMap.has(t)||this.addNode(t,void 0),this.succ.get(e)?.set(t,n??null),this.pred.get(t)?.set(e,n??null)}removeEdge(e,t){this.succ.get(e)?.delete(t),this.pred.get(t)?.delete(e)}edge(e,t){const n=this.succ.get(e)?.get(t);if(void 0===n)throw new Error(`Edge ${e} -> ${t} does not exist`);return n??void 0}neighborsIter(e){return this.succ.get(e)?.keys()??(new Map).keys()}*edgesIter(){for(const[e,t]of this.succ)for(const n of t.keys())yield[e,n]}hasEdge(e,t){return this.succ.get(e)?.has(t)??!1}successorsIter(e){return this.succ.get(e)?.keys()??(new Map).keys()}successors(e){return Array.from(this.successorsIter(e))}predecessorsIter(e){return this.pred.get(e)?.keys()??(new Map).keys()}predecessors(e){return Array.from(this.predecessorsIter(e))}*inEdgesIter(e){for(const[t,n]of this.pred.get(e)??new Map)yield[[t,e],n]}inEdges(e){return Array.from(this.inEdgesIter(e))}*outEdgesIter(e){for(const[t,n]of this.succ.get(e)??new Map)yield[[e,t],n]}outEdges(e){return Array.from(this.outEdgesIter(e))}inDegree(e){return this.pred.get(e)?.size??0}outDegree(e){return this.succ.get(e)?.size??0}sources(){return Array.from(this.sourcesIter())}*sourcesIter(){for(const[e,t]of this.pred)0===t.size&&(yield e)}sinks(){return Array.from(this.sinksIter())}*sinksIter(){for(const[e,t]of this.succ)0===t.size&&(yield e)}clear(){super.clear(),this.pred.clear(),this.succ.clear()}copy(){const e=new i;for(const[t,n]of this.nodeMap.entries())e.addNode(t,n??void 0),e.pred.set(t,new Map(this.pred.get(t))),e.succ.set(t,new Map(this.succ.get(t)));return e}reversed(){const e=new i;for(const[t,n]of this.nodeMap.entries())e.addNode(t,n??void 0),e.succ.set(t,new Map(this.pred.get(t))),e.pred.set(t,new Map(this.succ.get(t)));return e}subgraph(e){const t=new i;for(const n of e){const e=this.nodeMap.get(n);e&&t.addNode(n,e)}for(const[n,r]of this.edgesIter())e.has(n)&&e.has(r)&&t.addEdge(n,r,this.edge(n,r));return t}}t.DiGraph=i},3555:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Graph=void 0;class n{name;nodeMap=new Map;adjacencyList=new Map;constructor(e=""){this.name=e}get(e){const t=this.nodeMap.get(e);if(null==t)throw new Error(`Node ${e} does not exist`);return t}addNode(e,t){this.nodeMap.set(e,t??null),this.adjacencyList.has(e)||this.adjacencyList.set(e,new Map)}addNodesWithAttributes(e){for(const[t,n]of e)this.addNode(t,n)}addNodes(e){for(const t of e)this.addNode(t,void 0)}removeNode(e){this.nodeMap.delete(e)&&(this.adjacencyList.get(e)?.forEach(((t,n)=>{this.adjacencyList.get(n)?.delete(e)})),this.adjacencyList.delete(e))}removeNodes(e){for(const t of e)this.removeNode(t)}numberOfNodes(){return this.nodeMap.size}nodes(){return Array.from(this.nodeMap.keys())}nodesIter(){return this.nodeMap.keys()}addEdge(e,t,n){this.nodeMap.has(e)||this.addNode(e),this.nodeMap.has(t)||this.addNode(t),this.adjacencyList.get(e)?.set(t,n??null),this.adjacencyList.get(t)?.set(e,n??null)}addEdgesWithAttributes(e){for(const[t,n,r]of e)this.addEdge(t,n,r)}addEdges(e){for(const[t,n]of e)this.addEdge(t,n,void 0)}removeEdge(e,t){this.adjacencyList.get(e)?.delete(t),this.adjacencyList.get(t)?.delete(e)}hasEdge(e,t){return(this.adjacencyList.get(e)?.has(t)??!1)||(this.adjacencyList.get(t)?.has(e)??!1)}edge(e,t){const n=this.adjacencyList.get(e)?.get(t);if(void 0===n)throw new Error(`Edge ${e} <-> ${t} does not exist`);return n??void 0}neighbors(e){return Array.from(this.neighborsIter(e))}neighborsIter(e){const t=this.adjacencyList.get(e);if(void 0===t)throw new Error(`Node ${e} does not exist`);return t.keys()}edges(){return Array.from(this.edgesIter())}*edgesIter(){const e=new Set;for(const[t,n]of this.adjacencyList.entries())for(const r of n.keys())e.has([r,t])||e.has([t,r])||(yield[t,r])}numberOfEdges(){return this.edges().length}adjList(){return Array.from(this.adjListIter())}*adjListIter(){for(const[e,t]of this.adjacencyList.entries())if(t.size)for(const n of t)yield[e,n[0]];else yield e}clear(){this.name="",this.nodeMap.clear(),this.adjacencyList.clear()}copy(){const e=new n;for(const[t,n]of this.nodeMap.entries())e.addNode(t,n??void 0),e.adjacencyList.set(t,new Map(this.adjacencyList.get(t)));return e}subgraph(e){const t=new n;for(const n of e){const e=this.nodeMap.get(n);e&&t.addNode(n,e)}for(const[n,r]of this.edgesIter())e.has(n)&&e.has(r)&&t.addEdge(n,r,this.edge(n,r));return t}}t.Graph=n},9543:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.SMLayouter=void 0;const a=o(n(70681)),s=n(60815),l=n(7458),c=n(64436),d=n(53408),u="__smlayouter_artifical_start",p="__smlayouter_artifical_end";var f;!function(e){e[e.BRANCH=0]="BRANCH",e[e.LOOP_REGULAR=1]="LOOP_REGULAR",e[e.LOOP_INVERTED=2]="LOOP_INVERTED"}(f||(f={}));class h{graph;startNode;endNode;iDoms;iPostDoms;allDom;domTree;allPostDom;postDomTree;backedges;backedgesDstDict;eclipsedBackedges;eclipsedBackedgesDstDict;backedgesCombined;rankDict;rankHeights;nodeRanks;dummyChains;constructor(e){this.graph=e,this.rankDict=new Map,this.rankHeights=new Map,this.nodeRanks=new Map,this.dummyChains=new Set;const t=this.graph.reversed(),n=this.graph.sources(),r=this.graph.sinks();if(n.length>1){console.warn("State machine has multiple possible sources. Using an artificial source node for layouting."),this.startNode=u,this.graph.addNode(this.startNode);for(const e of n)this.graph.addEdge(this.startNode,e,{points:[]})}else{if(0===n.length)throw new Error("State machine has no sources.");this.startNode=n[0]}if(r.length>1){console.warn("State machine has multiple possible sinks. Using an artificial sink node for layouting."),this.endNode=p,this.graph.addNode(this.endNode);for(const e of r)this.graph.addEdge(e,this.endNode,{points:[]})}else{if(0===r.length)throw new Error("State machine has no sinks.");this.endNode=r[0]}this.iDoms=(0,l.immediateDominators)(this.graph,this.startNode),this.iPostDoms=(0,l.immediateDominators)(t,this.endNode),[this.allDom,this.domTree]=(0,l.dominatorTree)(this.graph,this.startNode,this.iDoms),[this.allPostDom,this.postDomTree]=(0,l.dominatorTree)(this.graph,this.endNode,this.iPostDoms),[this.backedges,this.eclipsedBackedges]=(0,s.allBackedges)(this.graph,this.startNode,!0),this.backedgesCombined=new Set(this.backedges);for(const e of this.eclipsedBackedges)this.backedgesCombined.add(e);this.backedgesDstDict=new Map;for(const e of this.backedges)this.backedgesDstDict.has(e[1])||this.backedgesDstDict.set(e[1],new Set),this.backedgesDstDict.get(e[1]).add(e);this.eclipsedBackedgesDstDict=new Map;for(const e of this.eclipsedBackedges)this.eclipsedBackedgesDstDict.has(e[1])||this.eclipsedBackedgesDstDict.set(e[1],new Set),this.eclipsedBackedgesDstDict.get(e[1]).add(e)}static layoutDagreCompat(e){const t=new c.DiGraph;for(const n of e.nodes())t.addNode(n,e.node(n));for(const n of e.edges())t.addEdge(n.v,n.w,e.edge(n));h.layout(t)}doLayout(){this.doRanking(),this.normalizeEdges(),this.permute();const e=this.assignPositions(),t=this.denormalizeEdges();for(const n of t)e.add(n);this.routeBackEdges(e),this.checkUnroutedEdges(e)}static layout(e){const t=new h(e);t.doLayout(),t.startNode===u&&e.removeNode(u),t.endNode===p&&e.removeNode(p)}checkUnroutedEdges(e){const t=new Set;for(const n of this.graph.edgesIter()){const r=this.graph.edge(n[0],n[1]);e.has(r)||t.add(r)}t.size>0&&console.warn("The following edges were not routed:",t)}assignInitialRanks(){const e=[[this.startNode,0]],t=[],n=new Set,r=new Map;for(;e.length>0;){const[i,o]=e.shift();if(!n.has(i)){const a=this.backedgesDstDict.get(i)??new Set;r.has(i)?r.set(i,Math.max(r.get(i),o)):r.set(i,o);const s=[];for(const e of this.graph.successorsIter(i)){let t=!1;for(const n of this.backedgesCombined)if(n[1]===e&&n[0]===i){t=!0;break}t||s.push(e)}if(a.size>0){if(a.size>1)throw new Error("Node has multiple backedges.");const t=Array.from(a)[0][0];let n=new Set;for(const e of s)e===t||this.allDom.get(e)?.has(t)||n.add(e);for(const e of this.graph.successorsIter(t))e!==i&&n.add(e);if(n.size<1)throw new Error("No exit candidates found.");if(n.size>1){let e=1/0;const t=new Set;for(const r of n){const n=this.postDomTree.get(r),i=n?.level??1/0;i0))throw new Error("Failed to determine exit.");n=t}let r=0;for(const e of n)r+=this.allDom.get(e)?.size??0;const l=o+((this.allDom.get(i)?.size??0)-r);for(const t of n)e.push([t,l]);for(const t of s)n.has(t)||e.push([t,o+1])}else if(1===s.length)e.push([s[0],o+1]);else if(s.length>1){let n;const r=this.iPostDoms.get(i);if(r&&s.includes(r))n=r;else for(const e of this.domTree.successorsIter(i))if(!s.includes(e)){n=e;break}if(n){const r=o+((this.allDom.get(i)?.size??0)-(this.allDom.get(n)?.size??0));e.push([n,r]),t.push([f.BRANCH,o,r])}for(const t of s)t!==n&&e.push([t,o+1])}n.add(i)}}this.rankDict.clear(),this.rankHeights.clear(),this.nodeRanks.clear();for(const e of r.keys()){const t=r.get(e);this.rankDict.has(t)||this.rankDict.set(t,[]),this.rankDict.get(t).push(e),this.nodeRanks.set(e,t)}}contractRanks(){const e=Array.from(this.rankDict.keys()).sort(((e,t)=>e-t)),t=new Map,n=new Map;let r=0;for(const i of e)t.set(r,this.rankDict.get(i)),n.set(r,this.rankHeights.get(i)??0),r++;this.rankDict.clear(),this.rankHeights.clear(),this.nodeRanks.clear();for(const e of t.keys()){this.rankDict.set(e,t.get(e)),this.rankHeights.set(e,n.get(e));for(const n of t.get(e))this.nodeRanks.set(n,e)}}doRanking(){this.assignInitialRanks(),this.contractRanks()}normalizeEdges(){let e=0;for(const t of this.graph.edgesIter()){const n=t[0],r=t[1],i=this.nodeRanks.get(n),o=this.nodeRanks.get(r);if(i===o-1)continue;if(i>o)continue;let a=n,s=null;const l=[],c=this.graph.edge(n,r);for(let t=i+1;tt!==e))),this.nodeRanks.delete(e);const n=this.graph.predecessors(e)[0];null===r&&(r=n),i=this.graph.successors(e)[0];const a=this.graph.get(e),s=this.rankHeights.get(t)??0;s>0?(o.push({x:a.x,y:a.y-s/2}),o.push({x:a.x,y:a.y+s/2})):o.push({x:a.x,y:a.y})}const a=this.graph.get(r),s=this.graph.get(i),l=a.x+a.width/200*50;e.points=[{x:l,y:a.y+a.height/2},...o,{x:s.x,y:s.y-s.height/2}],this.graph.addEdge(r,i,e);for(const e of n)this.graph.removeNode(e);t.add(e)}this.dummyChains.clear();for(const n of t){const t=n.points;if(t.length<=2)continue;let r=0;for(let e=1;ee.rank-t.rank));let n=0;const r=[],i=new Set,o=new Set;for(const e of t)if("dst"===e.type)if(0===r.length)r.push(e.edge);else{const t=r[r.length-1];t.srcRank>=e.edge.srcRank?(t.children.push(e.edge),e.edge.root=t.root??t,e.edge.depth=t.depth+1,n=Math.max(n,e.edge.depth),e.edge.root.maxDepth=Math.max(e.edge.root.maxDepth??0,e.edge.depth),i.add(e.edge),r.push(e.edge)):(r.pop(),r.push(e.edge),i.add(t),o.add(t))}else r.length>0&&r[r.length-1]===e.edge&&r.pop(),i.has(e.edge)||o.add(e.edge);const a=new Map;for(let e=0;e{e.depth=t-e.depth;for(const n of e.children)s(n,t)};for(const e of o)s(e,e.maxDepth??0);const l=e=>{a.get(n-e.depth).push(e);for(const t of e.children)l(t)};for(const e of o)l(e);for(let t=n;t>=0;t--){const r=a.get(t),i=n-t+1;for(const t of r){const n=this.graph.edge(t.edge[0],t.edge[1]),r=this.graph.get(t.edge[0]),o=this.graph.get(t.edge[1]),a=r.x-r.width/2,s=20*i;n.points=[{x:a,y:r.y},{x:a-s,y:r.y},{x:a-s,y:o.y},{x:a,y:o.y}],e.add(n)}}}permute(){const e=new a.graphlib.Graph({directed:!0,multigraph:!1,compound:!1});for(const t of this.graph.nodesIter()){const n=this.nodeRanks.get(t);e.setNode(t,{rank:n})}for(const t of this.graph.edgesIter()){const n=t[0],r=t[1];e.setEdge(n,r,{weight:1})}d(e),e.nodes().forEach((t=>{this.graph.get(t).order=e.node(t).order}));for(const e of this.rankDict.keys()){const t=this.rankDict.get(e);t.sort(((e,t)=>{const n=this.graph.get(e)?.order,r=this.graph.get(t)?.order;return void 0===n||void 0===r?0:n-r})),this.rankDict.set(e,t)}}assignPositions(){const e=new Set;let t=0,n=0;const r=Array.from(this.rankDict.keys()).sort(((e,t)=>e-t));for(const e of r){const r=this.rankDict.get(e);let i=0;for(const e of r){const t=this.graph.get(e);i=Math.max(i,t.height)}this.rankHeights.set(e,i);const o=t+n/2+50+i/2;t=o,n=i;let a=0,s=0;for(const e of r){const t=this.graph.get(e),n=a+s/2+50+t.width/2;a=n,s=t.width,t.x=n,t.y=o}}for(const t of this.graph.edgesIter()){if(this.nodeRanks.get(t[0])>this.nodeRanks.get(t[1]))continue;const n=this.graph.edge(t[0],t[1]),r=this.graph.get(t[0]),i=this.graph.get(t[1]);n.points=[{x:r.x,y:r.y+r.height/2},{x:i.x,y:i.y-i.height/2}],e.add(n)}return e}}t.SMLayouter=h},25722:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ComputationNode=void 0;const s=a(n(17647)),l=o(n(55341)),c=n(41105),d=n(9960),u=n(95261),p=n(29269);class f extends p.Node{text;accessOrder;farText;drawBorder;label;constructor(e,t,n,r,i=void 0,o=!0,a){super(t,e,a),this.text=n,this.accessOrder=r,this.farText=i,this.drawBorder=o,this.label=new c.Text(this.text,u.DEFAULT_TEXT_STYLE),this.label.position.set(10),this.addChild(this.label),this.draw()}draw(){super.draw(),this.drawBorder&&this.lineStyle(u.DEFAULT_LINE_STYLE),this.drawRect(0,0,this.label.width+20,this.label.height+20)}getAccessesFor(e){const t=new d.AccessMap,n=[];for(const r of this.accessOrder){const i=[];for(const t of r.index){let n;try{n=l.evaluate(t,e),"number"!=typeof n&&(n=void 0)}catch(e){n=void 0}i.push(n)}n.push({dataContainer:r.dataContainer,accessMode:r.accessMode,index:i});const o=t.get(r.dataContainer);void 0!==o?o.push([r.accessMode,i]):t.set(r.dataContainer,[[r.accessMode,i]])}return[t,n]}findRelatedFromScope(e,t,n){for(const r of this.accessOrder)if(r.dataContainer!==e&&r.index){const e=[];for(const n of r.index){let r;try{r=l.evaluate(n,t),"number"!=typeof r&&(r=void 0)}catch(e){r=void 0}e.push(r)}const i=n.get(r.dataContainer);void 0!==i?i.push([r.accessMode,e]):n.set(r.dataContainer,[[r.accessMode,e]])}}getRelatedAccesses(e,t,n){const r=new d.AccessMap,i=[];if(this.accessOrder.forEach((t=>{t.dataContainer===e&&i.push(t.index)})),i.length>0){const n=new Map;i[0].forEach(((e,r)=>{if(r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataContainer=t.AccessMode=t.AccessMap=void 0;const r=n(23121);class i extends Map{constructor(){super()}}var o;t.AccessMap=i,(o=t.AccessMode||(t.AccessMode={}))[o.ReadOnly=0]="ReadOnly",o[o.Write=1]="Write",o[o.ReadWrite=2]="ReadWrite",t.DataContainer=class{name;dim;elementSize;startOffset;alignment;storage;strides;constructor(e,t,n=1,i=0,o=0,a,s){if(this.name=e,this.dim=t,this.elementSize=n,this.startOffset=i,this.alignment=o,this.storage=a,void 0!==s)this.strides=s;else{const e=this.dim.slice();if(e.length>1)for(let t=e.length-2;t>=0;t--)e[t]=new r.DataDimension("("+e[t].name+")*("+e[t+1].name+")",e[t].value*e[t+1].value);e.length>1?(this.strides=e.slice(1),this.strides.push(new r.DataDimension("1",1))):this.strides=[new r.DataDimension("1",1)]}}}},23121:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataDimension=void 0,t.DataDimension=class{name;value;constructor(e,t){this.name=e,this.value=t}toString(){return this.name}}},97266:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Edge=void 0;const r=n(95261);class i extends r.Element{src;dst;constructor(e,t,n){super(n),this.src=e,this.dst=t}}t.Edge=i},95261:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Element=t.DEFAULT_TEXT_STYLE=t.DEFAULT_LINE_STYLE=void 0;const r=n(41105);t.DEFAULT_LINE_STYLE={color:0,width:1},t.DEFAULT_TEXT_STYLE=new r.TextStyle({fontFamily:"Montserrat",fontSize:30});class i extends r.Graphics{renderer;constructor(e){super(),this.renderer=e}draw(){this.clear()}get unscaledWidth(){return this.width}get unscaledHeight(){return this.height}}t.Element=i},50828:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MapNode=void 0;const i=n(69658),o=r(n(19755)),a=n(55341),s=n(41105),l=n(67917),c=n(57637),d=n(37537),u=n(77705),p=n(89922),f=n(3750),h=n(9960),m=n(95261),b=n(46778),g=n(29269);class A extends g.Node{ranges;innerGraph;overrideWidth;overrideHeight;labels=[];sliders=new Map;freeSymbolSliders=new Map;playButton;resetButton;pauseButton;showingAccessPatternControls=!1;labelWidth;accessPattern;playbackTicker=0;playbackInterval=null;playbackPlaying=!1;extScope=new Map;headerHeight=80;nestingPadding=30;buttonPadding=10;buttonInternalPadding=5;buttonSize=30;constructor(e,t,n,r,o,c,d){super(t,e,d),this.ranges=n,this.innerGraph=r,this.overrideWidth=o,this.overrideHeight=c;try{this.nestingPadding=parseInt(l.SDFGRenderer.getCssProperty("--local-view-map-nesting-padding")),this.headerHeight=parseInt(l.SDFGRenderer.getCssProperty("--local-view-map-header-height")),this.buttonPadding=parseInt(l.SDFGRenderer.getCssProperty("--local-view-map-button-padding")),this.buttonInternalPadding=parseInt(l.SDFGRenderer.getCssProperty("--local-view-map-button-internal-padding")),this.buttonSize=parseInt(l.SDFGRenderer.getCssProperty("--local-view-map-button-size"))}catch(e){}void 0!==this.overrideWidth?this._width=this.overrideWidth:this._width=this.innerGraph.width+2*this.nestingPadding,void 0!==this.overrideHeight?this._height=this.overrideHeight:this._height=this.innerGraph.height+this.headerHeight+2*this.nestingPadding;let f=0;for(let e=0;e1?":"+t.step:""),r=new s.Text(n,m.DEFAULT_TEXT_STYLE);r.renderable=!1,f=Math.max(f,r.width+60),r.anchor.set(.5),this.labels.push(r)}void 0!==this.overrideWidth?this.labelWidth=this._width/this.ranges.length:(this.labelWidth=Math.max(f,this._width/this.ranges.length),this._width=this.labelWidth*this.ranges.length);for(let e=0;e{this.onSlidersUpdated()}))}const h=this.buttonSize/4,b=new i.Polygon([this.buttonSize/4,this.buttonSize/4,3*this.buttonSize/4,this.buttonSize/2,this.buttonSize/4,3*this.buttonSize/4]);this.playButton=new u.Button((()=>{this.playbackStart()}),b,this.buttonSize,this.buttonSize,h),this.playButton.position.set(this.buttonPadding,this.headerHeight+this.buttonPadding),this.addChild(this.playButton);const g=this.buttonSize-2*this.buttonInternalPadding,A=(this.buttonSize-1.5*this.buttonInternalPadding*2)/3,v=[new i.Rectangle(1.5*this.buttonInternalPadding,this.buttonInternalPadding,A,g),new i.Rectangle(this.buttonSize-(1.5*this.buttonInternalPadding+A),this.buttonInternalPadding,A,g)];this.pauseButton=new u.Button((()=>{this.playbackPause()}),v,this.buttonSize,this.buttonSize,h),this.pauseButton.disable(),this.pauseButton.position.set(2*this.buttonPadding+this.buttonSize,this.headerHeight+this.buttonPadding),this.addChild(this.pauseButton),this.resetButton=new u.Button((()=>{this.playbackReset()}),"reset",void 0,this.buttonSize,h,this.buttonSize-2*this.buttonInternalPadding),this.resetButton.disable(),this.resetButton.position.set(3*this.buttonPadding+2*this.buttonSize,this.headerHeight+this.buttonPadding),this.addChild(this.resetButton),this.innerGraph.position.set(this._width/2-this.innerGraph.width/2,this.headerHeight+this.nestingPadding),this.addChild(this.innerGraph),this.draw();const y=new Map;this.accessPattern=[],this.recursiveSimulate(y,this.ranges,this.accessPattern),this.calculateStackDistances()}recalculateSize(){void 0!==this.overrideWidth?this._width=this.overrideWidth:this._width=Math.max(this.labelWidth*this.ranges.length,this.innerGraph.width+2*this.nestingPadding),void 0!==this.overrideHeight?this._height=this.overrideHeight:this._height=this.innerGraph.height+this.headerHeight+2*this.nestingPadding,this.labelWidth=this._width/this.ranges.length;for(let e=0;e0?e=>e<=r.end:e=>e>=r.end;for(let t=r.start;o(t);t+=r.step)if(i.length>0)this.recursiveSimulate(new Map([...e.entries(),[r.itvar,t]]),i,n);else{const i=new Map([...e.entries(),[r.itvar,t]]),[o,a]=this.innerGraph.getAccessesFor(i);n.push([i,o,a])}}calculateStackDistances(){let e=-1;const t=(0,o.default)("#reuse-distance-threshold-input").val();void 0!==t&&"string"==typeof t&&(e=parseInt(t));const n=new c.AccessStack;this.accessPattern.forEach((t=>{t[2].forEach((t=>{const r=this.parentGraph.memoryNodesMap.get(t.dataContainer);if(r){const i=r.values().next().value[1];if(i&&!t.index.includes(void 0)){const r=i.getCacheLine(t.index);if(r&&r.length>0){const o=r[0],a=n.touch(o),s=i.getTileAt(t.index),l=s?.stackDistances.get(a);void 0!==l?s?.stackDistances.set(a,l+1):s?.stackDistances.set(a,1),a>=0?s?.stackDistancesFlattened.push(a):s&&s.coldMisses++;const c=b.MemoryNode.reuseDistanceHistogram.get(a);if(void 0!==c?b.MemoryNode.reuseDistanceHistogram.set(a,c+1):b.MemoryNode.reuseDistanceHistogram.set(a,1),(a<0||a>=e)&&s){const e=b.MemoryNode.missesHistogram.get(s.totalMisses);void 0!==e&&e>=0&&(e>1?b.MemoryNode.missesHistogram.set(s.totalMisses,e-1):b.MemoryNode.missesHistogram.delete(s.totalMisses)),s.totalMisses++;const t=b.MemoryNode.missesHistogram.get(s.totalMisses);void 0!==t?b.MemoryNode.missesHistogram.set(s.totalMisses,t+1):b.MemoryNode.missesHistogram.set(s.totalMisses,1)}}}}}))}))}playbackReset(){b.MemoryNode.MAX_ACCESSES=1,this.playbackPlaying=!1,this.playbackTicker=0,this.sliders.forEach((e=>{e.value=e.getSliderBounds().min})),this.clearAccessMarkings(),this.playButton.enable(),this.pauseButton.disable(),this.resetButton.disable()}clearAccessMarkings(){this.parentGraph.memoryNodesMap.forEach((e=>{e.forEach((e=>{e[1].clearAllAccesses()}))}))}playbackPause(){this.playbackPlaying=!1,this.playButton.enable(),this.pauseButton.disable(),this.resetButton.enable()}playbackStart(){this.playButton.disable(),this.pauseButton.enable(),this.resetButton.disable();const e=document.getElementById("map-playback-speed-input")?.value,t=parseInt(e);this.playbackPlaying=!0,this.playbackInterval=window.setInterval((()=>{this.playbackPlaying?this.playbackTickFunction():(this.playbackInterval&&window.clearInterval(this.playbackInterval),this.playbackInterval=null)}),1e3/t)}showAccesses(e,t=!0){e.forEach(((e,n)=>{const r=this.parentGraph.memoryNodesMap.get(n);r&&e.forEach((e=>{r.forEach((n=>{n[1].applyToIdx(e[1],(e=>{e.onMarkAccess(t)})),t&&n[1].draw()}))}))}))}playbackTickFunction(){if(this.playbackTicker{e.renderable=!0})),this.lineStyle(m.DEFAULT_LINE_STYLE),this.beginFill(16777215,.95),this.drawPolygon([0,this.headerHeight,0,this.headerHeight/2,this.headerHeight/2,0,this._width-this.headerHeight/2,0,this._width,this.headerHeight/2,this._width,this.headerHeight,this._width,this._height,0,this._height,0,this.headerHeight,this._width,this.headerHeight]),this.endFill(),this.sliders.forEach((e=>{e.draw()}));for(let e=0;e{({})[r[0]]=i;const o=new Map([...e.entries(),[r[0],i]]);t.length>1?this.buildScopes(o,t.slice(1),n):n.push(o)}))}getAccessesFor(e,t=!1){const n=new h.AccessMap;if(t){this.extScope.clear();for(const t of e){this.extScope.set(t[0],t[1]);const n=t[0];if(this.freeSymbolSliders.has(n)){const t=this.freeSymbolSliders.get(n);if(void 0===t)continue;const r=t[1],i=t[0],o="string"==typeof i.start?(0,a.evaluate)(i.start,e):i.start,s="string"==typeof i.end?(0,a.evaluate)(i.end,e):i.end,l="string"==typeof i.step?(0,a.evaluate)(i.step,e):i.step;r?.updateBounds(o,s,l)}}}const r=[];for(const t of this.ranges){let n,i,o;if("number"==typeof t.start)n=t.start;else try{n=(0,a.evaluate)(t.start,e)}catch{n=void 0}if("number"==typeof t.end)i=t.end;else try{i=(0,a.evaluate)(t.end,e)}catch{i=void 0}if("number"==typeof t.step)o=t.step;else try{o=(0,a.evaluate)(t.step,e)}catch{o=void 0}if(void 0!==n&&void 0!==i&&void 0!==o){const e=[];for(let t=n;t{const r=n.get(t);void 0!==r?n.set(t,r.concat(e)):n.set(t,e)})),o.push(...i)}return[n,o]}getRelatedAccesses(e,t,n){return this.innerGraph.getRelatedAccesses(e,t)}getAccessPattern(){return this.accessPattern}get unscaledWidth(){return this.overrideWidth?this.overrideWidth:Math.max(this.labelWidth*this.ranges.length,this.innerGraph.width+2*this.nestingPadding)}get unscaledHeight(){return this.overrideHeight?this.overrideHeight:this.innerGraph.height+this.headerHeight+2*this.nestingPadding}}t.MapNode=A},40233:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MemoryMovementEdge=void 0;const i=r(n(19755)),o=n(55341),a=n(41105),s=n(67917),l=n(37537),c=n(97266),d=n(95261),u=n(46778);class p extends c.Edge{text;parentGraph;points;gfxText;physMovementOverlayActive=!1;_volume=0;constructor(e,t,n,r,i,o){super(r,i,o),this.text=e,this.parentGraph=t,this.points=n,r.outEdges.push(this),i.inEdges.push(this),this.gfxText=new a.Text(this.text??"",d.DEFAULT_TEXT_STYLE),this.gfxText.renderable=!1,this.addChild(this.gfxText)}drawText(e,t,n,r){null!==e&&""!==e?(this.gfxText.renderable=!0,this.gfxText.text=e,this.gfxText.style={fontSize:r,fontFamily:d.DEFAULT_TEXT_STYLE.fontFamily},this.gfxText.position.x=t,this.gfxText.position.y=n,this.gfxText.anchor.x=.5,this.gfxText.anchor.y=1,this.lineStyle({color:0}).beginFill(16777215).drawRect(this.gfxText.position.x-(this.gfxText.width/2+5),this.gfxText.position.y-(this.gfxText.height+5),this.gfxText.width+10,this.gfxText.height+10)):this.gfxText.renderable=!1}clearVolume(){this._volume=0}getVolumeFromMemNode(e){const t=e.getTotalCacheMisses(),n=(0,i.default)("#cache-line-size-input").val();let r=0;return void 0!==n&&"string"==typeof n&&(r=parseInt(n)),r*t}calculateMovementVolume(){return this._volume=0,this.src instanceof u.MemoryNode?this._volume=this.getVolumeFromMemNode(this.src):this.dst instanceof u.MemoryNode&&(this._volume=this.getVolumeFromMemNode(this.dst)),this._volume}rotatePoint(e,t,n){const r=(0,o.sin)(n),i=(0,o.cos)(n);e.x-=t.x,e.y-=t.y;const a=e.x*i-e.y*r,s=e.x*r+e.y*i;return e.x=a+t.x,e.y=s+t.y,e}draw(){super.draw();const e=this.points.length?this.points[0]:this.src.position,t=this.points.length?this.points[this.points.length-2]:e,n=this.points.length?this.points[this.points.length-1]:this.dst.position,r=n.x===t.x?0:0-(0,o.tanh)((t.x-n.x)/(t.y-n.y));let i=0,a=null,c=16,d=1,u=30;if(this.physMovementOverlayActive){let e=0;if(this.renderer){const t=[...this.renderer.globalMemoryMovementHistogram.keys()];t.sort(((e,t)=>e-t));const n=t.indexOf(this._volume);n>0&&t.length>1&&(e=n/(t.length-1))}i=(0,l.getTempColorHEX)(e);try{d=parseInt(s.SDFGRenderer.getCssProperty("--local-view-edge-overlay-width")),c=parseInt(s.SDFGRenderer.getCssProperty("--local-view-edge-overlay-arrowhead-length")),u=parseInt(s.SDFGRenderer.getCssProperty("--local-view-edge-overlay-fontsize"))}catch(e){}let t=this._volume,n=1;for(;t>=1024&&n<=1e9;)t/=1024,n*=1e3;let r="B";switch(n){case 1e3:r="KB";break;case 1e6:r="MB";break;case 1e9:r="GB"}a=t.toString()+" "+r}else{a="true"===s.SDFGRenderer.getCssProperty("--local-view-edge-show-label").toLowerCase()?this.text:"";try{d=parseInt(s.SDFGRenderer.getCssProperty("--local-view-edge-width")),c=parseInt(s.SDFGRenderer.getCssProperty("--local-view-edge-arrowhead-length")),u=parseInt(s.SDFGRenderer.getCssProperty("--local-view-edge-fontsize"))}catch(e){}}this.lineStyle({color:i,width:d}),this.moveTo(e.x,e.y);for(let e=1;e{e.onMarkCached()}))}unmarkCacheLine(){this.memoryNode.getCacheLine(this.index).forEach((e=>{e.unmarkCached()}))}unmarkRelatedAccesses(e=!1){e?(this.accessMarkedTiles.forEach((e=>{e.unmarkAccess()})),this.accessMarkedTiles.clear()):(this.hoverMarkedTiles.forEach((e=>{e.unmarkRelated()})),this.hoverMarkedTiles.clear())}markRelatedAccesses(e=!1){const t=new f.AccessMap,n=this.memoryNode.parentGraph.neighborhood(this.memoryNode);for(const e of n)(e instanceof m.MapNode||e instanceof p.ComputationNode)&&e.getRelatedAccesses(this.memoryNode.dataContainer,this.index,this.memoryNode).forEach(((e,n)=>{const r=t.get(n);r?t.set(n,r.concat(e)):t.set(n,e)}));t.forEach(((t,n)=>{const r=this.memoryNode.parentGraph.memoryNodesMap.get(n);r&&t.forEach((t=>{r.forEach((n=>{const r=[];e?n[1].applyToIdx(t[1],(e=>e.onMarkAccess()),void 0,void 0,r):n[1].applyToIdx(t[1],(e=>e.onMarkRelated()),void 0,void 0,r),r.forEach((t=>{e?this.accessMarkedTiles.add(t):this.hoverMarkedTiles.add(t)})),n[1].draw()}))}))}))}markTilingRegion(){const e=this.memoryNode.getTilingRegionsForIdx(this.index),t=[];e.forEach(((e,n)=>{const r=l.KELLY_COLORS[n];e[1].forEach(((e,n)=>{const i=this.memoryNode.parentGraph.memoryNodesMap.get(n);if(void 0!==i&&i.size){const n=i.values().next().value[1];e.forEach((e=>{n.applyToIdx(e[1],(e=>{e.borderMarkingColors.includes(r)||e.borderMarkingColors.push(r)}))})),t.includes(n)||t.push(n)}}))})),t.forEach((e=>e.draw()))}unmarkTilingRegion(){this.memoryNode.parentGraph.memoryNodesMap.forEach((e=>{e.forEach((e=>{const t=e[1];t.applyToAll(void 0,(e=>e.borderMarkingColors=[])),t.draw()}))}))}fillReuseDistanceHistogram(){const e=[...this.stackDistances.keys()],t=Math.max(...e),n=Array.from(Array(t+1).keys()),r=Array(t+1).fill(0);for(const t of e){const e=this.stackDistances.get(t);void 0!==e&&t>=0&&(r[t]=e)}const i=this.stackDistances.get(-1),o={labels:[...n,"Cold"],datasets:[{label:this.memoryNode.dataContainer.name+"["+this.index.toString()+"]",backgroundColor:"#00538A",data:[...r,void 0===i?0:i]}]};this.memoryNode.renderer?.showReuseDistanceHist(o)}clearReuseDistanceHistogram(){this.memoryNode.renderer?.hideReuseDistanceHist()}onClicked(){this.selected=!this.selected;const e=this.memoryNode.renderer?.nodeOverlay;this.selected?e instanceof d.CacheLineOverlay?this.markCacheLine():e instanceof u.ReuseDistanceOverlay?this.fillReuseDistanceHistogram():e instanceof c.AccessPatternOverlay&&this.markRelatedAccesses(!0):e instanceof d.CacheLineOverlay?this.unmarkCacheLine():e instanceof u.ReuseDistanceOverlay?this.clearReuseDistanceHistogram():e instanceof c.AccessPatternOverlay&&this.unmarkRelatedAccesses(!0),this.draw()}onMouseOver(e){if(this.stackedAccesses>0){const e=this.toGlobal({x:this.elementX,y:this.elementY});this.memoryNode.renderer?.showTooltip(e.x+this.elementWidth/2,e.y,this.stackedAccesses.toString())}if(this.hovered=!0,this.memoryNode.reuseDistanceOverlayActive){const e=this.toGlobal({x:this.elementX,y:this.elementY});if(this.stackDistancesFlattened.length>0){const t=(0,a.median)(this.stackDistancesFlattened),n=(0,a.max)(this.stackDistancesFlattened),r=(0,a.min)(this.stackDistancesFlattened);this.memoryNode.renderer?.showTooltip(e.x+this.elementWidth/2,e.y,"Median: "+t.toString()+"\nMin: "+r.toString()+"\nMax: "+n.toString()+"\nMisses: "+this.totalMisses.toString())}else this.memoryNode.renderer?.showTooltip(e.x+this.elementWidth/2,e.y,"Median: N/A\nMin: N/A\nMax: N/A\nMisses: "+this.totalMisses.toString())}else this.markRelatedAccesses();this.draw()}onMouseOut(){this.memoryNode.renderer?.hideTooltip(),this.hovered=!1,this.unmarkRelatedAccesses(),this.draw()}removeFromGlobalHist(){if(this.stackedAccesses>0){const e=v.accessHistogram.get(this.stackedAccesses);void 0!==e&&(e<=1?v.accessHistogram.delete(this.stackedAccesses):v.accessHistogram.set(this.stackedAccesses,e-1))}}addToGlobalHist(){if(this.stackedAccesses>0){const e=v.accessHistogram.get(this.stackedAccesses);void 0!==e&&0!==e?v.accessHistogram.set(this.stackedAccesses,e+1):v.accessHistogram.set(this.stackedAccesses,1)}}onMarkAccess(e=!0){this.removeFromGlobalHist(),this.stackedAccesses++,v.MAX_ACCESSES=Math.max(v.MAX_ACCESSES,this.stackedAccesses),v.accessMap.set(this,this.stackedAccesses),this.addToGlobalHist(),e&&this.draw()}unmarkAccess(){this.removeFromGlobalHist(),this.stackedAccesses--,this.stackedAccesses<0&&(this.stackedAccesses=0),v.accessMap.set(this,this.stackedAccesses),this.addToGlobalHist(),this.draw()}onClearAccesses(){this.removeFromGlobalHist(),this.stackedAccesses=0,v.accessMap.set(this,this.stackedAccesses),this.draw()}onMarkRelated(){this.showingRelated=!0,this.draw()}unmarkRelated(){this.showingRelated=!1,this.draw()}onMarkCached(){this.showingCached=!0,this.draw()}unmarkCached(){this.showingCached=!1,this.draw()}draw(){if(this.clear(),this.lineStyle(h.DEFAULT_LINE_STYLE),this.selected)this.showingRelated?this.beginFill(5263564):this.beginFill(10526975);else if(this.stackedAccesses>0){const e=[...v.accessHistogram.keys()];e.sort(((e,t)=>e-t));const t=e.indexOf(this.stackedAccesses);let n=0;n=t<0?0:t/(e.length-1),this.beginFill((0,l.getTempColorHEX)(n))}else if(this.showingRelated)this.beginFill(13421772);else if(this.showingCached)this.beginFill(13107059);else if(this.borderMarkingColors.length>0){const e=this.elementHeight/this.borderMarkingColors.length;this.borderMarkingColors.forEach(((t,n)=>{this.beginFill(t,.8),this.lineStyle({width:0,color:t}),this.drawRect(this.elementX,this.elementY+n*e,this.elementWidth,e),this.endFill()})),this.lineStyle(h.DEFAULT_LINE_STYLE)}else if(this.memoryNode.reuseDistanceOverlayActive){if(this.stackDistancesFlattened.length>0){let e,t;switch(this.memoryNode.reuseDistanceMetric){case"max":e=(0,a.max)(this.stackDistancesFlattened),t=[...v.maxReuseDistanceHistogram.keys()];break;case"min":e=(0,a.min)(this.stackDistancesFlattened),t=[...v.minReuseDistanceHistogram.keys()];break;case"misses":e=this.totalMisses,t=[...v.missesHistogram.keys()];break;default:e=(0,a.median)(this.stackDistancesFlattened),t=[...v.reuseDistanceHistogram.keys()]}t.sort(((e,t)=>e-t));let n=-1;for(let r=0;r=e){n=r;break}let r=0;r=n<0?0:n/(t.length-1),this.beginFill((0,l.getTempColorHEX)(r))}else this.coldMisses>0?this.beginFill(13421772,.8):this.beginFill(16777215,.8);this.selected&&(this.tint=11184810)}else this.beginFill(16777215,.8);this.hovered?this.tint=13421772:this.tint=16777215,this.drawRect(this.elementX,this.elementY,this.elementWidth,this.elementHeight),this.endFill()}get accesses(){return this.stackedAccesses}}class v extends b.Node{dataContainer;accessMode;nameBottom;tileSizeOverride;static MAX_ACCESSES=1;_unscaledWidth;_unscaledHeight;tiles;gfxText;static accessMap=new Map;static accessHistogram=new Map;static reuseDistanceHistogram=new Map;static minReuseDistanceHistogram=new Map;static maxReuseDistanceHistogram=new Map;static missesHistogram=new Map;reuseDistanceOverlayActive=!1;reuseDistanceMetric="median";constructor(e,t,n,r,i=!1,o,a){super(t,e,a),this.dataContainer=n,this.accessMode=r,this.nameBottom=i,this.tileSizeOverride=o,this._unscaledWidth=this.calcUnscaledWidthRecursive(this.dataContainer.dim.slice()),this._unscaledHeight=this.calcUnscaledHeightRecursive(this.dataContainer.dim.slice()),this.gfxText=new s.Text(this.dataContainer.name,h.DEFAULT_TEXT_STYLE),this.gfxText.renderable=!1,this.gfxText.position.x=this._unscaledWidth/2;let l=0;this.nameBottom?this.gfxText.position.y=this._unscaledHeight+(this.gfxText.height/2+5):(this.gfxText.position.y=this.gfxText.height/2,l+=this.gfxText.height+10),this.gfxText.anchor.set(.5),this.addChild(this.gfxText),this.tiles=new Array(this.dataContainer.dim[0].value).fill(null),this.recursiveInit(this.dataContainer.dim.slice(),0,l,this._unscaledWidth,this._unscaledHeight,this.tiles,[])}calcUnscaledWidthRecursive(e){return 1===e.length?e[0].value*(void 0!==this.tileSizeOverride?this.tileSizeOverride:10):2===e.length?e[1].value*(void 0!==this.tileSizeOverride?this.tileSizeOverride:10):e.length%2==0?g+this.calcUnscaledWidthRecursive(e.slice(1)):e[0].value*(g+this.calcUnscaledWidthRecursive(e.slice(1)))}calcUnscaledHeightRecursive(e){return 1===e.length?void 0!==this.tileSizeOverride?this.tileSizeOverride:10:2===e.length?e[0].value*(void 0!==this.tileSizeOverride?this.tileSizeOverride:10):e.length%2!=0?g+this.calcUnscaledHeightRecursive(e.slice(1)):e[0].value*(g+this.calcUnscaledHeightRecursive(e.slice(1)))}clearAllAccesses(){this.applyToAll(this.tiles,(e=>{e.onClearAccesses()}))}getTilingRegionsForIdx(e){const t=this.getTilingRegions(),n=[];return t.forEach((t=>{const r=t[1].get(this.dataContainer);if(void 0!==r)for(let i=0;ie.length-1||o[1][t]!==e[t]){a=!1;break}if(a){n.push(t);break}}})),n}getTilingRegions(){const e=[];this.inEdges.forEach((t=>{t.src instanceof m.MapNode&&e.push(t.src)})),this.outEdges.forEach((t=>{t.dst instanceof m.MapNode&&e.push(t.dst)}));const t=[];return e.forEach((e=>{e.getAccessPattern().forEach((e=>{t.push([e[0],e[1]])}))})),t}getCacheLine(e){const t=[],n=(0,o.default)("#cache-line-size-input").val();let r;if(void 0!==n&&("number"==typeof n?r=n:"string"==typeof n&&(r=parseInt(n))),void 0!==r&&r>0&&e.length===this.dataContainer.strides.length){let n=this.dataContainer.startOffset;for(let t=0;t=this.dataContainer.dim[e].value){r=!0;break}n.push(o)}if(!r){const e=this.getTileAt(n);e&&t.push(e)}}}}return t}applyToAll(e,t){const n=void 0===e?[this.tiles]:[e];for(;n.length;){const e=n.shift();e?.forEach((e=>{e.descendants&&e.descendants.length&&n.push(e.descendants),t(e)}))}}recGetTilesAt(e,t=0,n=this.tiles){const r=e[t];if(void 0!==r&&"number"==typeof r){const i=n[r];return t{if(n.descendants){const i=this.recGetTilesAt(e,t+1,n.descendants);i instanceof A?r.push(i):r.push(...i)}})),r}return n}getTilesAt(e){return this.recGetTilesAt(e)}getTileAt(e){const t=this.recGetTilesAt(e);if(t instanceof A)return t}applyToIdx(e,t,n=0,r=this.tiles,i=[]){const o=e[n];if(void 0!==o&&"number"==typeof o){if(o<0||o>=r.length)return;const a=r[o];n{r.descendants&&this.applyToIdx(e,t,n+1,r.descendants,i)})):(r.forEach((e=>{t(e)})),i.push(...r))}recursiveInit(e,t,n,r,i,o,a){const s=e[0].value,l=e.length%2!=0,c=e.length>2,d=l?r/s:r,u=l?i:i/s;for(let r=0;r1){const t=e[1].value;f.descendants=new Array(t).fill(null),this.recursiveInit(e.slice(1),c?s+15:s,c?p+15:p,c?d-g:d,c?u-g:u,f.descendants,i)}}}clearStackDistances(){this.applyToAll(this.tiles,(e=>{e.stackDistances.clear()}))}getTotalCacheMisses(){let e=0;return this.applyToAll(this.tiles,(t=>{e+=t.totalMisses})),e}draw(){super.draw(),this.gfxText.renderable=!0;const e=[this.tiles];for(;e.length>0;){const t=e.shift();if(t)for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Node=void 0;const r=n(95261);class i extends r.Element{parentGraph;id;inEdges=[];outEdges=[];constructor(e,t,n){super(n),this.parentGraph=e,this.id=t}draw(){super.draw()}}t.Node=i},46042:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Graph=void 0;const r=n(41105),i=n(35046),o=n(25722),a=n(9960),s=n(97266),l=n(95261),c=n(50828),d=n(40233),u=n(46778),p=n(29269);class f extends r.Graphics{renderer;memoryNodesMap=new Map;dataContainers=new Map;nodes=new Set;edges=new Set;constructor(e){super(),this.renderer=e}draw(){this.clear(),this.children.forEach((e=>{e instanceof l.Element&&e.draw()}))}isNodeContractible(e){return e instanceof u.MemoryNode&&e.dataContainer.storage===i.StorageType.Register||e instanceof o.ComputationNode}findContractionRegions(){const e=new Map;for(const t of this.nodes){let n=e.get(t);if(void 0===n&&(n=new Set([t]),e.set(t,n)),this.isNodeContractible(t))for(const r of this.neighborhood(t))if(this.isNodeContractible(r)){let t=e.get(r);void 0===t&&(t=new Set([r]));const i=new Set([...n,...t]);for(const t of i)e.set(t,i)}}const t=new Set;for(const n of e.values())n.size&&t.add(n);return t}contractGraph(){const e=this.findContractionRegions();for(const t of e){const e=t.values().next().value.id,n=new Set,r=new Set,i=new Set;let a;const s=[];for(const e of t){e instanceof o.ComputationNode?(s.push(...e.accessOrder),a?a+="\n"+e.text:a=e.text):e instanceof u.MemoryNode&&i.add(e.dataContainer),this.removeChild(e);for(const i of this.neighborEdges(e))t.has(i.src)||n.add(i),t.has(i.dst)||r.add(i),this.removeChild(i)}const l=[];for(const e of s)i.has(e.dataContainer)||l.push(e);const c=new o.ComputationNode(e,this,a||"Contracted",l,"Contracted",this.nodes.size>0);this.addChild(c);for(const e of n)e instanceof d.MemoryMovementEdge&&(this.addChild(new d.MemoryMovementEdge(e.text,this,[],e.src,c)),this.removeChild(e));for(const e of r)e instanceof d.MemoryMovementEdge&&(this.addChild(new d.MemoryMovementEdge(e.text,this,[],c,e.dst)),this.removeChild(e))}}getAccessesFor(e,t=!1){const n=new a.AccessMap,r=[];for(const i of this.children)if(i instanceof c.MapNode||i instanceof o.ComputationNode){const[o,a]=i.getAccessesFor(e,t);o.forEach(((e,t)=>{const r=n.get(t);void 0!==r?n.set(t,r.concat(e)):n.set(t,e)})),r.push(...a)}return[n,r]}getRelatedAccesses(e,t){const n=new a.AccessMap;for(const r of this.children)if(r instanceof c.MapNode||r instanceof o.ComputationNode){const i=r.getRelatedAccesses(e,t);for(const e of i.keys()){const t=i.get(e);if(t){const r=n.get(e);r?r.concat(t):n.set(e,t)}}}return n}addChild(...e){return e.forEach((e=>{e instanceof p.Node?(this.nodes.add(e),e instanceof u.MemoryNode&&this.registerMemoryNode(e.dataContainer,e,e.accessMode)):e instanceof s.Edge&&this.edges.add(e)})),super.addChild(...e)}removeChild(...e){return e.forEach((e=>{if(e instanceof p.Node){if(this.nodes.delete(e),e instanceof u.MemoryNode){const t=this.memoryNodesMap.get(e.dataContainer);if(t){for(const n of t)n[1]===e&&t.delete(n);t.size||(this.memoryNodesMap.delete(e.dataContainer),this.dataContainers.delete(e.dataContainer.name))}}}else e instanceof s.Edge&&this.edges.delete(e)})),super.removeChild(...e)}registerMemoryNode(e,t,n){this.memoryNodesMap.has(e)?this.memoryNodesMap.get(e)?.add([n,t]):this.memoryNodesMap.set(e,new Set([[n,t]])),this.dataContainers.set(e.name,e)}addComputation(){}setAccessPatternOverlay(e){this.nodes.forEach((t=>{t instanceof c.MapNode&&(t.showingAccessPatternControls=e,t.draw(),t.innerGraph.setAccessPatternOverlay(e))}))}enableAccessPatternOverlay(){this.setAccessPatternOverlay(!0)}disableAccessPatternOverlay(){this.setAccessPatternOverlay(!1)}setReuseDistanceOverlay(e){this.memoryNodesMap.forEach((t=>{t.forEach((t=>{const n=t[1];n.reuseDistanceOverlayActive=e,n.draw()}))}))}enableReuseDistanceOverlay(){this.setReuseDistanceOverlay(!0)}disableReuseDistanceOverlay(){this.setReuseDistanceOverlay(!1)}setReuseDistanceMetric(e,t=!0){this.memoryNodesMap.forEach((n=>{n.forEach((n=>{const r=n[1];r.reuseDistanceMetric=e,t&&r.draw()}))}))}setPhysMovementOverlay(e){this.edges.forEach((t=>{t instanceof d.MemoryMovementEdge&&(t.physMovementOverlayActive=e,t.draw())}))}enablePhysMovementOverlay(){this.setPhysMovementOverlay(!0)}disablePhysMovementOverlay(){this.setPhysMovementOverlay(!1)}disableCacheLineOverlay(){this.nodes.forEach((e=>{e instanceof u.MemoryNode&&(e.applyToAll(void 0,(e=>{e.selected=!1,e.showingCached=!1})),e.draw())}))}*inEdges(e){for(const t of this.edges)t.dst===e&&t.src!==e&&(yield t)}*outEdges(e){for(const t of this.edges)t.src===e&&t.dst!==e&&(yield t)}*neighborEdges(e){yield*this.inEdges(e),yield*this.outEdges(e)}*predecessors(e){for(const t of this.inEdges(e))yield t.src}*successors(e){for(const t of this.outEdges(e))yield t.dst}*neighborhood(e){yield*this.predecessors(e),yield*this.successors(e)}}t.Graph=f},77705:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Button=void 0;const r=n(69658),i=n(41105),o=n(95261),a=n(47042);class s extends a.GUIComponent{clickHandler;label;radius;borderGeometry;labelGraphic;hovered=!1;disabled=!0;constructor(e,t,n,a,s=0,l=30){if(super(),this.clickHandler=e,this.label=t,this.radius=s,"string"==typeof this.label)this.labelGraphic=new i.Text(this.label,{fontFamily:o.DEFAULT_TEXT_STYLE.fontFamily,fontSize:l}),void 0===n&&(n=this.labelGraphic.width+10),void 0===a&&(a=this.labelGraphic.height+10),this.labelGraphic.position.set(n/2,a/2),this.labelGraphic.anchor.set(.5);else if(this.labelGraphic=new i.Graphics,void 0===n||void 0===a)throw new Error("When using a graphical label, both height and width need to be provided!");this.addChild(this.labelGraphic),this.borderGeometry=new r.RoundedRectangle(0,0,n,a,this.radius),this.on("mouseover",(()=>{this.hovered=!0,this.draw()})),this.on("mouseout",(()=>{this.hovered=!1,this.draw()})),this.hitArea=this.borderGeometry,this.enable(),this.draw()}setLabelShape(e){this.label=e,this.draw()}disable(){this.disabled=!0,this.buttonMode=!1,this.interactive=!1,this.off("pointerdown"),this.draw()}enable(){this.disabled=!1,this.buttonMode=!0,this.interactive=!0,this.on("pointerdown",this.clickHandler),this.draw()}draw(){super.draw(),this.labelGraphic instanceof i.Graphics&&(this.labelGraphic.clear(),this.labelGraphic.lineStyle(o.DEFAULT_LINE_STYLE),"string"==typeof this.label||Array.isArray(this.label)?Array.isArray(this.label)&&this.label.forEach((e=>{this.labelGraphic.drawShape(e)})):this.labelGraphic.drawShape(this.label)),this.disabled?(this.beginFill(13421772,.8),this.alpha=.3):(this.alpha=1,this.hovered?this.beginFill(0,.1):this.beginFill(16777215,1)),this.lineStyle(o.DEFAULT_LINE_STYLE),this.drawShape(this.borderGeometry),this.endFill()}}t.Button=s},47042:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GUIComponent=void 0;const r=n(41105);class i extends r.Graphics{constructor(){super()}draw(){this.clear()}}t.GUIComponent=i},89922:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Slider=void 0;const r=n(41105),i=n(47042);class o extends i.GUIComponent{min;max;step;sliderWidth;lineThickness;lineColor;pommelRadius;pommelColor;val;valueChangedHandler=null;dragging=!1;minText;maxText;valText;pommel;lineY;lineSegmentLength;minPommelX;maxPommelX;constructor(e,t,n,i,o=2,a=0,s=6,l=4473924){super(),this.min=e,this.max=t,this.step=n,this.sliderWidth=i,this.lineThickness=o,this.lineColor=a,this.pommelRadius=s,this.pommelColor=l,this.val=e,this.lineY=this.pommelRadius+5-this.lineThickness/2,this.minPommelX=30+this.pommelRadius,this.maxPommelX=i-(30+this.pommelRadius);const c=i-60-2*this.pommelRadius;this.lineSegmentLength=c/(this.max-this.min),this.pommel=new r.Graphics,this.pommel.interactive=!0,this.pommel.buttonMode=!0,this.pommel.position.set(this.minPommelX,this.lineY),this.pommel.on("pointerdown",(()=>{this.dragging=!0,this.draw()})),this.pommel.on("pointerup",(()=>{this.dragging=!1,this.draw()})),window.addEventListener("mouseup",(()=>{this.dragging&&(this.dragging=!1,this.draw())})),this.pommel.on("pointermove",(e=>{if(this.dragging){let t=e.data.getLocalPosition(this).x;t>this.maxPommelX&&(t=this.maxPommelX),t({}))),e.nodes.forEach((e=>{e instanceof o.MapNode&&(this.layoutGraph(e.innerGraph),e.innerGraph.draw(),e.recalculateSize()),t.setNode(e.id,{node:e,width:e.unscaledWidth,height:e.unscaledHeight})})),e.edges.forEach((e=>{t.setEdge(e.src.id,e.dst.id,{edge:e})})),i.default.layout(t),t.nodes().forEach((e=>{const n=t.node(e);n.node.x=n.x-n.width/2,n.node.y=n.y-n.height/2})),t.edges().forEach((e=>{const n=t.edge(e);n.edge.points=n.points})),e}}},3750:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.LViewParser=t.LViewGraphParseError=void 0;const i=r(n(19755)),o=n(77826),a=n(48042),s=n(9960),l=n(23121),c=n(50828),d=n(46042),u=n(35046),p=n(25722),f=n(40233),h=n(46778),m=n(55341);class b extends Error{}t.LViewGraphParseError=b,t.LViewParser=class{static parseSymbolic(e,t){let n;return n="number"==typeof e?e:(0,m.evaluate)(e.replaceAll("**","^"),t),n}static parseMap(e,t,n,r,i,o){const a=e.data.node.attributes.range.ranges,s=e.data.node.attributes.params,l=[];for(let e=0;e{const n=(0,i.default)("
",{class:"sdfv_modal_background"}),r=(0,i.default)("
",{class:"sdfv_modal"}).appendTo(n),o=(0,i.default)("
",{class:"sdfv_modal_title_bar"}).appendTo(r);(0,i.default)("",{class:"sdfv_modal_title",text:"Define symbol "+e}).appendTo(o),(0,i.default)("
",{class:"modal_close",html:'close',click:()=>{throw n.remove(),new b("Symbol "+e+" left undefined")}}).appendTo(o);const a=(0,i.default)("
",{class:"sdfv_modal_content_box"}).appendTo(r),s=(0,i.default)("
",{class:"sdfv_modal_content"}).appendTo(a),l=(0,i.default)("",{type:"text",class:"sdfv_modal_input_text"}).appendTo(s);l.on("keypress",(e=>{if("Enter"===e.key){const e=l.val();if(e&&"string"==typeof e){const r=parseInt(e);r&&(n.remove(),t(r))}}})),n.appendTo(document.body),n.show(),l.trigger("focus")}))}static async resolveSymbols(e){const t=new Map,n=e.attributes.symbols,r=e.attributes.constants_prop;if(n)for(const e in n)if(r&&r[e]&&r[e][1])t.set(e,r[e][1]);else{const n=await this.promptDefineSymbol(e);t.set(e,n)}return t}static async parseGraph(e,t){const n=e.node("0");if(n){const r=await this.resolveSymbols(n.sdfg);return this.parseState(n,e,r,t)}return null}}},25972:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.LViewRenderer=void 0;const i=n(25668),o=r(n(4773)),a=r(n(19755)),s=n(45025),l=n(41105),c=n(67917),d=n(50828),u=n(40233),p=n(46778),f=n(74328),h=n(24764),m=n(61602),b=n(17290),g=n(20620);t.LViewRenderer=class{sdfvInstance;container;_graph;pixiApp=null;viewport=null;tooltipContainer;tooltipText;sidebarContents;sidebarTitle;chartContainer;reuseDistanceHistogramCanvas;reuseDistanceHistogram;nViewModeSelector;nViewModeSelectorAdditional;eViewModeSelector;eViewModeSelectorAdditional;nOverlay;eOverlay;globalMemoryMovementHistogram=new Map;invisibleCssBootstrapElement;constructor(e,t,n){this.sdfvInstance=e,this.container=t,this._graph=n,this.initLocalViewSidebar();const r=this.container.getBoundingClientRect(),i=c.SDFGRenderer.getCssProperty("--state-background-color");this.pixiApp=new l.Application({width:r.width-10,height:r.height-10,backgroundColor:Number(i.replace("#","0x")),antialias:!0,resizeTo:this.container}),this.container.appendChild(this.pixiApp.view),this.viewport=new s.Viewport({screenWidth:r.width,screenHeight:r.height,interaction:this.pixiApp.renderer.plugins.interaction}),new ResizeObserver((e=>{e.forEach((e=>{e.contentBoxSize&&(this.pixiApp?.resize(),this.viewport?.resize(e.contentRect.width,e.contentRect.height))}))})).observe(this.container),this.pixiApp.stage.addChild(this.viewport),this.viewport.drag().pinch().wheel().decelerate({friction:.3}),this.invisibleCssBootstrapElement=(0,a.default)("
",{style:"display: none",class:"sdfg_canvas"})[0],this.container.appendChild(this.invisibleCssBootstrapElement),this._graph&&this.viewport?.addChild(this._graph),this._graph?.draw()}showTooltip(e,t,n){this.tooltipText=(0,a.default)("",{id:"lview-tooltip-text",text:n,css:{"white-space":"pre-line"}}),this.tooltipContainer=(0,a.default)("
",{id:"lview-tooltip-container",css:{left:"0px",top:"0px"}}),this.tooltipText.appendTo(this.tooltipContainer),this.tooltipContainer.appendTo(document.body);const r=this.tooltipContainer[0].getBoundingClientRect(),i=this.container.getBoundingClientRect();this.tooltipContainer.css("left",(e-r.width/2).toString()+"px"),this.tooltipContainer.css("top",(t+i.y-r.height-8).toString()+"px")}hideTooltip(){this.tooltipContainer&&this.tooltipContainer.remove()}set graph(e){e?(this._graph=e,this.viewport?.addChild(this._graph),this._graph.draw()):(this.viewport?.removeChildren(),this._graph=void 0)}get graph(){return this._graph}getGraph(){return this._graph}destroy(){this.pixiApp&&(this.container.removeChild(this.pixiApp.view),this.pixiApp.destroy(),this.container.removeChild(this.invisibleCssBootstrapElement))}initOverlays(){this.nViewModeSelector=(0,a.default)("#node-viewmode-input"),this.nViewModeSelectorAdditional=(0,a.default)("#node-viewmode-selector-additional"),this.eViewModeSelector=(0,a.default)("#edge-viewmode-input"),this.eViewModeSelectorAdditional=(0,a.default)("#edge-viewmode-selector-additional");for(const e of[h.NoNodeOverlay,f.AccessPatternOverlay,g.ReuseDistanceOverlay,m.CacheLineOverlay]){const t=new e(this);h.NodeOverlay.availableOverlays.push(t.value),h.NodeOverlay.overlayMap.set(t.value,t);const n=new Option(t.displayName,t.value,e===h.NoNodeOverlay,e===h.NoNodeOverlay);e==h.NoNodeOverlay&&(this.nOverlay=t,t.onSelect()),this.nViewModeSelector?.append(n)}for(const e of[h.NoEdgeOverlay,b.PhysicalMovementOverlay]){const t=new e(this);h.EdgeOverlay.availableOverlays.push(t.value),h.EdgeOverlay.overlayMap.set(t.value,t);const n=new Option(t.displayName,t.value,e===h.NoEdgeOverlay,e===h.NoEdgeOverlay);e==h.NoEdgeOverlay&&(this.eOverlay=t,t.onSelect()),this.eViewModeSelector?.append(n)}this.nViewModeSelector?.on("change",(()=>{const e=this.nViewModeSelector?.val();if(e&&"string"==typeof e){const t=h.NodeOverlay.overlayMap.get(e);t&&(this.nOverlay&&this.nOverlay.onDeselect(),this.nOverlay=t,t.onSelect())}})),this.eViewModeSelector?.on("change",(()=>{const e=this.eViewModeSelector?.val();if(e&&"string"==typeof e){const t=h.EdgeOverlay.overlayMap.get(e);t&&(this.eOverlay&&this.eOverlay.onDeselect(),this.eOverlay=t,t.onSelect())}}))}initLocalViewSidebar(){this.sdfvInstance.sidebar_set_title("Local View"),this.sdfvInstance.close_menu(),this.sdfvInstance.disable_menu_close();const e=this.sdfvInstance.sidebar_get_contents();e&&((0,a.default)(e).html('\n
\n \n
\n \n\n
\n\n \n
\n \n\n
\n\n \n
\n \n\n
\n\n
\n \n
\n \n
\n
\n\n
\n \n
\n \n
\n
\n\n
\n\n
\n
\n\n
\n \n
\n\n
\n
\n\n
\n '),(0,a.default)("#cache-line-size-input")?.on("change",(()=>{this.recalculateAll()})),(0,a.default)("#reuse-distance-threshold-input")?.on("change",(()=>{this.recalculateAll()})),this.initOverlays(),this.reuseDistanceHistogramCanvas=(0,a.default)("#reuse-distance-histogram"),i.Chart.register(o.default),i.Chart.register(i.BarController,i.BarElement,i.CategoryScale,i.Tooltip,i.Legend,i.LinearScale),this.reuseDistanceHistogram=new i.Chart(this.reuseDistanceHistogramCanvas,{type:"bar",data:{labels:[],datasets:[]},options:{}}),this.hideReuseDistanceHist(),this.sidebarTitle=(0,a.default)("#lview-sidebar-title"),this.chartContainer=(0,a.default)("#lview-chart-container"),this.sidebarContents=(0,a.default)("#lview-sidebar-contents"),this.sdfvInstance.sidebar_show())}clearGraphAccesses(e,t=!0){e.nodes.forEach((e=>{e instanceof p.MemoryNode?e.clearAllAccesses():e instanceof d.MapNode&&(e.playbackPause(),e.playbackReset(),this.clearGraphAccesses(e.innerGraph,!1))})),t&&e.draw()}graphShowAllAccesses(e,t=!0){e.nodes.forEach((e=>{if(e instanceof d.MapNode){const t=e.getAccessPattern();for(let n=0;n{if(e instanceof u.MemoryMovementEdge){const t=e.calculateMovementVolume(),n=this.globalMemoryMovementHistogram.get(t);void 0!==n?this.globalMemoryMovementHistogram.set(t,n+1):this.globalMemoryMovementHistogram.set(t,1)}})),e.nodes.forEach((e=>{e instanceof d.MapNode&&this.constructMemoryMovementHistForGraph(e.innerGraph)}))}showReuseDistanceHist(e){this.chartContainer?.show(),e&&this.reuseDistanceHistogram&&(this.reuseDistanceHistogram.data=e,this.reuseDistanceHistogram.update())}hideReuseDistanceHist(){this.chartContainer?.hide()}recalculateForGraph(e){e.nodes.forEach((e=>{e instanceof d.MapNode&&(e.calculateStackDistances(),this.recalculateForGraph(e.innerGraph))}))}graphClearCalculatedValue(e){e.edges.forEach((e=>{e instanceof u.MemoryMovementEdge&&e.clearVolume()})),e.nodes.forEach((e=>{e instanceof p.MemoryNode?e.applyToAll(void 0,(e=>{e.stackDistancesFlattened=[],e.stackDistances.clear(),e.coldMisses=0,e.totalMisses=0})):e instanceof d.MapNode&&this.graphClearCalculatedValue(e.innerGraph)}))}recalculateAll(){this._graph&&(this.graphClearCalculatedValue(this._graph),p.MemoryNode.reuseDistanceHistogram.clear(),p.MemoryNode.minReuseDistanceHistogram.clear(),p.MemoryNode.maxReuseDistanceHistogram.clear(),p.MemoryNode.missesHistogram.clear(),this.recalculateForGraph(this._graph),this.globalMemoryMovementHistogram.clear(),this.constructMemoryMovementHistForGraph(this._graph),this._graph.draw())}get nodeOverlay(){return this.nOverlay}get edgeOverlay(){return this.eOverlay}hideNodeViewModeSelectorAdditional(){this.nViewModeSelectorAdditional?.empty(),this.nViewModeSelectorAdditional?.hide()}hideEdgeViewModeSelectorAdditional(){this.eViewModeSelectorAdditional?.empty(),this.eViewModeSelectorAdditional?.hide()}get nodeOverlayAdditional(){return this.nViewModeSelectorAdditional}}},74328:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.AccessPatternOverlay=void 0;const i=r(n(19755)),o=n(24764);class a extends o.NodeOverlay{value="access-pattern";displayName="Access Pattern / Number of Accesses";onSelect(){this.renderer.hideNodeViewModeSelectorAdditional();const e=(0,i.default)("
",{id:"access-pattern-button-box"});(0,i.default)("
",{id:"clear-all-access-pattern-button",class:"button",text:"Clear All",click:()=>{this.renderer.graph&&this.renderer.clearGraphAccesses(this.renderer.graph)}}).appendTo(e),(0,i.default)("
",{id:"show-all-access-pattern-button",class:"button",text:"Show All Accesses",click:()=>{this.renderer.graph&&(this.renderer.clearGraphAccesses(this.renderer.graph),this.renderer.graphShowAllAccesses(this.renderer.graph))}}).appendTo(e),this.renderer.graph?.enableAccessPatternOverlay(),this.renderer.nodeOverlayAdditional?.append(e),this.renderer.nodeOverlayAdditional?.show()}onDeselect(){this.renderer.graph&&(this.renderer.graph.disableAccessPatternOverlay(),this.renderer.clearGraphAccesses(this.renderer.graph))}}t.AccessPatternOverlay=a},24764:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoEdgeOverlay=t.NoNodeOverlay=t.EdgeOverlay=t.NodeOverlay=t.BaseOverlay=void 0;class n{renderer;constructor(e){this.renderer=e}}t.BaseOverlay=n;class r extends n{static availableOverlays=[];static overlayMap=new Map}t.NodeOverlay=r;class i extends n{static availableOverlays=[];static overlayMap=new Map}t.EdgeOverlay=i,t.NoNodeOverlay=class extends r{value="none";displayName="None";onSelect(){this.renderer.hideNodeViewModeSelectorAdditional()}onDeselect(){}},t.NoEdgeOverlay=class extends i{value="none";displayName="None";onSelect(){this.renderer.hideEdgeViewModeSelectorAdditional()}onDeselect(){}}},61602:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CacheLineOverlay=void 0;const r=n(24764);class i extends r.NodeOverlay{value="cache-lines";displayName="Cache Lines";onSelect(){this.renderer.hideNodeViewModeSelectorAdditional()}onDeselect(){this.renderer.getGraph()?.disableCacheLineOverlay()}}t.CacheLineOverlay=i},17290:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PhysicalMovementOverlay=void 0;const r=n(24764);class i extends r.EdgeOverlay{value="physical-data-movement";displayName="Physical Data Movement";onSelect(){this.renderer.hideEdgeViewModeSelectorAdditional(),this.renderer.recalculateAll(),this.renderer.graph?.enablePhysMovementOverlay()}onDeselect(){this.renderer.graph?.disablePhysMovementOverlay()}}t.PhysicalMovementOverlay=i},20620:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ReuseDistanceOverlay=void 0;const i=r(n(19755)),o=n(24764);class a extends o.NodeOverlay{value="reuse-distance";displayName="Reuse Distance (Stack Distance)";onSelect(){this.renderer.hideNodeViewModeSelectorAdditional();const e=(0,i.default)("
",{id:"reuse-distance-metric-container"});(0,i.default)("",{type:"radio",id:"input-rdm-median",name:"reuse-distance-metric",value:"median",checked:"checked"}).appendTo(e),(0,i.default)("