(t[t.Undefined=0]="Undefined",t[t.PixelsPerInch=1]="PixelsPerInch",t[t.PixelsPerCentimeter=2]="PixelsPerCentimeter",t))(Kt||{});class Zt{constructor(r,e,o){e===void 0?(this.x=r,this.y=r,this.units=Kt.PixelsPerInch):o!==void 0?(this.x=r,this.y=e,this.units=o):(this.x=r,this.y=r,this.units=e)}x;y;units}class oe{static _disposeAfterExecution(r,e){try{const o=e(r);return o instanceof Promise?Promise.resolve(o).then(g=>(r.dispose(),oe.checkResult(r,g),g)):(r.dispose(),oe.checkResult(r,o),o)}catch(o){throw r.dispose(),o}}static checkResult(r,e){if(e===r)throw new Z("The result of the function cannot be the instance that has been disposed.");return e}}class Tn{_pointer;_bytes;_func;constructor(r,e,o){this._pointer=r,this._func=o,this._bytes=_._api.HEAPU8.subarray(r,r+e)}func(r){return r._bytes===void 0?r._func(new Uint8Array):r._func(r._bytes)}dispose(){this._pointer=_._api._MagickMemory_Relinquish(this._pointer)}}class Re{disposeMethod;instance;constructor(r,e){this.instance=r,this.disposeMethod=e}get _instance(){if(this.instance>0)return this.instance;throw this.instance===-1&&this._instanceNotInitialized(),new Z("instance is disposed")}set _instance(r){this.disposeInstance(this.instance),this.instance=r}dispose(){this.instance=this.disposeInstance(this.instance)}_instanceNotInitialized(){throw new Z("instance is not initialized")}_setInstance(r,e){return e.check(()=>this.instance===0?!1:(this.dispose(),this.instance=r,!0),()=>(this.disposeInstance(r),!0))}disposeInstance(r){return r>0&&(this.onDispose!==void 0&&this.onDispose(),this.disposeMethod(r)),0}}class Ia extends Re{constructor(r){const e=_._api._DrawingSettings_Create(),o=_._api._DrawingSettings_Dispose;if(super(e,o),r.fillColor!==void 0&&r.fillColor._use(g=>{_._api._DrawingSettings_FillColor_Set(this._instance,g)}),r.font!==void 0){const g=Se._getFontFileName(r.font);W(g,p=>{_._api._DrawingSettings_Font_Set(this._instance,p)})}r.fontPointsize!==void 0&&_._api._DrawingSettings_FontPointsize_Set(this._instance,r.fontPointsize),r.strokeColor!==void 0&&r.strokeColor._use(g=>{_._api._DrawingSettings_StrokeColor_Set(this._instance,g)}),r.strokeWidth!==void 0&&_._api._DrawingSettings_StrokeWidth_Set(this._instance,r.strokeWidth)}}class Ot{backgroundColor;fillColor;font;fontPointsize;strokeColor;strokeWidth;static _create(r){const e=new Ot;return e.fillColor=r.fillColor,e.font=r.font,e.fontPointsize=r.fontPointsize,e.strokeColor=r.strokeColor,e.strokeWidth=r.strokeWidth,e}_use(r){const e=new Ia(this);return oe._disposeAfterExecution(e,r)}}class Wn{instance;type;constructor(r,e){this.instance=_._api._malloc(r),this.type=e,_._api.setValue(this.instance,0,this.type)}get ptr(){return this.instance}get value(){return _._api.getValue(this.instance,this.type)}}class ve extends Wn{constructor(){super(4,"i32")}static use(r){const e=new ve;try{return r(e)}finally{_._api._free(e.ptr)}}}class R{pointer;constructor(r){this.pointer=r}get ptr(){return this.pointer.ptr}check(r,e){return this.isError()?e():r()}static usePointer(r,e){return ve.use(o=>{const g=r(o.ptr);return R.checkException(o,g,e)})}static use(r,e){return ve.use(o=>{const g=r(new R(o));return R.checkException(o,g,e)})}static checkException(r,e,o){if(!R.isRaised(r))return e;const g=R.getErrorSeverity(r.value);if(g>=nt.Error)R.throw(r,g);else if(o!==void 0){const p=R.createError(r.value,g);o(p)}else R.dispose(r);return e}isError(){return R.isRaised(this.pointer)?R.getErrorSeverity(this.pointer.value)>=nt.Error:!1}static getErrorSeverity(r){return _._api._MagickExceptionHelper_Severity(r)}static isRaised(r){return r.value!==0}static throw(r,e){const o=R.createError(r.value,e);throw R.dispose(r),o}static createError(r,e){const o=R.getMessage(r),g=new Z(o,e),p=_._api._MagickExceptionHelper_RelatedCount(r);if(p===0)return g;const d=[];for(let S=0;S_._api._DrawingWand_Create(r._instance,d._instance)),p=_._api._DrawingWand_Dispose;super(g,p)}color(r,e,o){R.usePointer(g=>{_._api._DrawingWand_Color(this._instance,r,e,o,g)})}draw(r){r.forEach(e=>{e.draw(this)}),R.usePointer(e=>{_._api._DrawingWand_Render(this._instance,e)})}fillColor(r){R.usePointer(e=>{r._use(o=>{_._api._DrawingWand_FillColor(this._instance,o,e)})})}fillOpacity(r){R.usePointer(e=>{_._api._DrawingWand_FillOpacity(this._instance,r,e)})}font(r){R.usePointer(e=>{W(r,o=>{_._api._DrawingWand_Font(this._instance,o,e)})})}fontPointSize(r){R.usePointer(e=>{_._api._DrawingWand_FontPointSize(this._instance,r,e)})}fontTypeMetrics(r,e){return R.usePointer(o=>W(r,g=>{const p=_._api._DrawingWand_FontTypeMetrics(this._instance,g,e?1:0,o);return Pt._create(p)}))}gravity(r){R.usePointer(e=>{_._api._DrawingWand_Gravity(this._instance,r,e)})}line(r,e,o,g){R.usePointer(p=>{_._api._DrawingWand_Line(this._instance,r,e,o,g,p)})}point(r,e){R.usePointer(o=>{_._api._DrawingWand_Point(this._instance,r,e,o)})}rectangle(r,e,o,g){R.usePointer(p=>{_._api._DrawingWand_Rectangle(this._instance,r,e,o,g,p)})}roundRectangle(r,e,o,g,p,d){R.usePointer(S=>{_._api._DrawingWand_RoundRectangle(this._instance,r,e,o,g,p,d,S)})}strokeColor(r){R.usePointer(e=>{r._use(o=>{_._api._DrawingWand_StrokeColor(this._instance,o,e)})})}strokeWidth(r){R.usePointer(e=>{_._api._DrawingWand_StrokeWidth(this._instance,r,e)})}text(r,e,o){R.usePointer(g=>{W(o,p=>{_._api._DrawingWand_Text(this._instance,r,e,p,g)})})}textAlignment(r){R.usePointer(e=>{_._api._DrawingWand_TextAlignment(this._instance,r,e)})}textAntialias(r){R.usePointer(e=>{_._api._DrawingWand_TextAntialias(this._instance,r?1:0,e)})}textDecoration(r){R.usePointer(e=>{_._api._DrawingWand_TextDecoration(this._instance,r,e)})}textInterlineSpacing(r){R.usePointer(e=>{_._api._DrawingWand_TextInterlineSpacing(this._instance,r,e)})}textInterwordspacing(r){R.usePointer(e=>{_._api._DrawingWand_TextInterwordSpacing(this._instance,r,e)})}textKerning(r){R.usePointer(e=>{_._api._DrawingWand_TextKerning(this._instance,r,e)})}textUnderColor(r){R.usePointer(e=>{r._use(o=>{_._api._DrawingWand_TextUnderColor(this._instance,o,e)})})}static _use(r,e){const o=new rt(r,r.settings);return oe._disposeAfterExecution(o,e)}}class en extends Wn{constructor(){super(8,"double")}static use(r){const e=new en;try{return r(e)}finally{_._api._free(e.ptr)}}}var at=(t=>(t[t.Undefined=0]="Undefined",t[t.Forget=0]="Forget",t[t.Northwest=1]="Northwest",t[t.North=2]="North",t[t.Northeast=3]="Northeast",t[t.West=4]="West",t[t.Center=5]="Center",t[t.East=6]="East",t[t.Southwest=7]="Southwest",t[t.South=8]="South",t[t.Southeast=9]="Southeast",t))(at||{});function*Bn(t){for(const r of t)switch(r){case 2:yield"north";break;case 3:yield"north",yield"east";break;case 1:yield"north",yield"west";break;case 6:yield"east";break;case 4:yield"west";break;case 8:yield"south";break;case 9:yield"south",yield"east";break;case 7:yield"south",yield"west"}}class Ln{constructor(r,e){this.name=r,this.data=e}name;data}class it{constructor(r,e,o){this.meanErrorPerPixel=r,this.normalizedMeanError=e,this.normalizedMaximumError=o}meanErrorPerPixel;normalizedMaximumError;normalizedMeanError;static _create(r){const e=_._api._MagickImage_MeanErrorPerPixel_Get(r._instance),o=_._api._MagickImage_NormalizedMeanError_Get(r._instance),g=_._api._MagickImage_NormalizedMaximumError_Get(r._instance);return new it(e,o,g)}}var he=(t=>(t.Unknown="UNKNOWN",t.ThreeFr="3FR",t.ThreeG2="3G2",t.ThreeGp="3GP",t.A="A",t.Aai="AAI",t.Ai="AI",t.APng="APNG",t.Art="ART",t.Arw="ARW",t.Ashlar="ASHLAR",t.Avi="AVI",t.Avif="AVIF",t.Avs="AVS",t.B="B",t.Bayer="BAYER",t.Bayera="BAYERA",t.Bgr="BGR",t.Bgra="BGRA",t.Bgro="BGRO",t.Bmp="BMP",t.Bmp2="BMP2",t.Bmp3="BMP3",t.Brf="BRF",t.C="C",t.Cal="CAL",t.Cals="CALS",t.Canvas="CANVAS",t.Caption="CAPTION",t.Cin="CIN",t.Cip="CIP",t.Clip="CLIP",t.Cmyk="CMYK",t.Cmyka="CMYKA",t.Cr2="CR2",t.Cr3="CR3",t.Crw="CRW",t.Cube="CUBE",t.Cur="CUR",t.Cut="CUT",t.Data="DATA",t.Dcm="DCM",t.Dcr="DCR",t.Dcraw="DCRAW",t.Dcx="DCX",t.Dds="DDS",t.Dfont="DFONT",t.Dng="DNG",t.Dpx="DPX",t.Dxt1="DXT1",t.Dxt5="DXT5",t.Epdf="EPDF",t.Epi="EPI",t.Eps="EPS",t.Eps2="EPS2",t.Eps3="EPS3",t.Epsf="EPSF",t.Epsi="EPSI",t.Ept="EPT",t.Ept2="EPT2",t.Ept3="EPT3",t.Erf="ERF",t.Exr="EXR",t.Farbfeld="FARBFELD",t.Fax="FAX",t.Ff="FF",t.Fff="FFF",t.File="FILE",t.Fits="FITS",t.Fl32="FL32",t.Flv="FLV",t.Fractal="FRACTAL",t.Ftp="FTP",t.Fts="FTS",t.Ftxt="FTXT",t.G="G",t.G3="G3",t.G4="G4",t.Gif="GIF",t.Gif87="GIF87",t.Gradient="GRADIENT",t.Gray="GRAY",t.Graya="GRAYA",t.Group4="GROUP4",t.Hald="HALD",t.Hdr="HDR",t.Heic="HEIC",t.Heif="HEIF",t.Histogram="HISTOGRAM",t.Hrz="HRZ",t.Htm="HTM",t.Html="HTML",t.Http="HTTP",t.Https="HTTPS",t.Icb="ICB",t.Ico="ICO",t.Icon="ICON",t.Iiq="IIQ",t.Info="INFO",t.Inline="INLINE",t.Ipl="IPL",t.Isobrl="ISOBRL",t.Isobrl6="ISOBRL6",t.J2c="J2C",t.J2k="J2K",t.Jng="JNG",t.Jnx="JNX",t.Jp2="JP2",t.Jpc="JPC",t.Jpe="JPE",t.Jpeg="JPEG",t.Jpg="JPG",t.Jpm="JPM",t.Jps="JPS",t.Jpt="JPT",t.Json="JSON",t.Jxl="JXL",t.K="K",t.K25="K25",t.Kdc="KDC",t.Label="LABEL",t.M="M",t.M2v="M2V",t.M4v="M4V",t.Mac="MAC",t.Map="MAP",t.Mask="MASK",t.Mat="MAT",t.Matte="MATTE",t.Mdc="MDC",t.Mef="MEF",t.Miff="MIFF",t.Mkv="MKV",t.Mng="MNG",t.Mono="MONO",t.Mov="MOV",t.Mos="MOS",t.Mp4="MP4",t.Mpc="MPC",t.Mpeg="MPEG",t.Mpg="MPG",t.Mpo="MPO",t.Mrw="MRW",t.Msl="MSL",t.Msvg="MSVG",t.Mtv="MTV",t.Mvg="MVG",t.Nef="NEF",t.Nrw="NRW",t.Null="NULL",t.O="O",t.Ora="ORA",t.Orf="ORF",t.Otb="OTB",t.Otf="OTF",t.Pal="PAL",t.Palm="PALM",t.Pam="PAM",t.Pango="PANGO",t.Pattern="PATTERN",t.Pbm="PBM",t.Pcd="PCD",t.Pcds="PCDS",t.Pcl="PCL",t.Pct="PCT",t.Pcx="PCX",t.Pdb="PDB",t.Pdf="PDF",t.Pdfa="PDFA",t.Pef="PEF",t.Pes="PES",t.Pfa="PFA",t.Pfb="PFB",t.Pfm="PFM",t.Pgm="PGM",t.Pgx="PGX",t.Phm="PHM",t.Picon="PICON",t.Pict="PICT",t.Pix="PIX",t.Pjpeg="PJPEG",t.Plasma="PLASMA",t.Png="PNG",t.Png00="PNG00",t.Png24="PNG24",t.Png32="PNG32",t.Png48="PNG48",t.Png64="PNG64",t.Png8="PNG8",t.Pnm="PNM",t.Pocketmod="POCKETMOD",t.Ppm="PPM",t.Ps="PS",t.Ps2="PS2",t.Ps3="PS3",t.Psb="PSB",t.Psd="PSD",t.Ptif="PTIF",t.Pwp="PWP",t.Qoi="QOI",t.R="R",t.RadialGradient="RADIAL-GRADIENT",t.Raf="RAF",t.Ras="RAS",t.Raw="RAW",t.Rgb="RGB",t.Rgb565="RGB565",t.Rgba="RGBA",t.Rgbo="RGBO",t.Rgf="RGF",t.Rla="RLA",t.Rle="RLE",t.Rmf="RMF",t.Rw2="RW2",t.Rwl="RWL",t.Scr="SCR",t.Screenshot="SCREENSHOT",t.Sct="SCT",t.Sfw="SFW",t.Sgi="SGI",t.Shtml="SHTML",t.Six="SIX",t.Sixel="SIXEL",t.SparseColor="SPARSE-COLOR",t.Sr2="SR2",t.Srf="SRF",t.Srw="SRW",t.Stegano="STEGANO",t.Sti="STI",t.StrImg="STRIMG",t.Sun="SUN",t.Svg="SVG",t.Svgz="SVGZ",t.Text="TEXT",t.Tga="TGA",t.Thumbnail="THUMBNAIL",t.Tif="TIF",t.Tiff="TIFF",t.Tiff64="TIFF64",t.Tile="TILE",t.Tim="TIM",t.Tm2="TM2",t.Ttc="TTC",t.Ttf="TTF",t.Txt="TXT",t.Ubrl="UBRL",t.Ubrl6="UBRL6",t.Uil="UIL",t.Uyvy="UYVY",t.Vda="VDA",t.Vicar="VICAR",t.Vid="VID",t.Viff="VIFF",t.Vips="VIPS",t.Vst="VST",t.WebM="WEBM",t.WebP="WEBP",t.Wbmp="WBMP",t.Wmv="WMV",t.Wpg="WPG",t.X3f="X3F",t.Xbm="XBM",t.Xc="XC",t.Xcf="XCF",t.Xpm="XPM",t.Xps="XPS",t.Xv="XV",t.Y="Y",t.Yaml="YAML",t.Ycbcr="YCBCR",t.Ycbcra="YCBCRA",t.Yuv="YUV",t))(he||{}),st=(t=>(t[t.Undefined=0]="Undefined",t[t.Coalesce=1]="Coalesce",t[t.CompareAny=2]="CompareAny",t[t.CompareClear=3]="CompareClear",t[t.CompareOverlay=4]="CompareOverlay",t[t.Dispose=5]="Dispose",t[t.Optimize=6]="Optimize",t[t.OptimizeImage=7]="OptimizeImage",t[t.OptimizePlus=8]="OptimizePlus",t[t.OptimizeTrans=9]="OptimizeTrans",t[t.RemoveDups=10]="RemoveDups",t[t.RemoveZero=11]="RemoveZero",t[t.Composite=12]="Composite",t[t.Merge=13]="Merge",t[t.Flatten=14]="Flatten",t[t.Mosaic=15]="Mosaic",t[t.Trimbounds=16]="Trimbounds",t))(st||{});class zn extends Re{constructor(r){const e=_._api._MagickSettings_Create(),o=_._api._MagickSettings_Dispose;if(super(e,o),r._fileName!==void 0&&W(r._fileName,g=>{_._api._MagickSettings_SetFileName(this._instance,g)}),r._ping&&_._api._MagickSettings_SetPing(this._instance,1),r._quality!==void 0&&_._api._MagickSettings_SetQuality(this._instance,r._quality),r.antiAlias!==void 0&&_._api._MagickSettings_AntiAlias_Set(this._instance,r.antiAlias?1:0),r.backgroundColor!==void 0&&r.backgroundColor._use(g=>{_._api._MagickSettings_BackgroundColor_Set(this._instance,g)}),r.colorSpace!==void 0&&_._api._MagickSettings_ColorSpace_Set(this._instance,r.colorSpace),r.colorType!==void 0&&_._api._MagickSettings_ColorType_Set(this._instance,r.colorType),r.compression!==void 0&&_._api._MagickSettings_Compression_Set(this._instance,r.compression),r.debug!==void 0&&_._api._MagickSettings_Debug_Set(this._instance,r.debug?1:0),r.depth!==void 0&&_._api._MagickSettings_Depth_Set(this._instance,r.depth),r.endian!==void 0&&_._api._MagickSettings_Endian_Set(this._instance,r.endian),r.fillColor!==void 0&&this.setOption("fill",r.fillColor.toString()),r.font!==void 0){const g=Se._getFontFileName(r.font);W(g,p=>{_._api._MagickSettings_SetFont(this._instance,p)})}r.fontPointsize!==void 0&&_._api._MagickSettings_FontPointsize_Set(this._instance,r.fontPointsize),r.format!==void 0&&W(r.format,g=>{_._api._MagickSettings_Format_Set(this._instance,g)}),r.interlace!==void 0&&_._api._MagickSettings_Interlace_Set(this._instance,r.interlace),r.strokeColor!==void 0&&this.setOption("stroke",r.strokeColor.toString()),r.strokeWidth!==void 0&&this.setOption("strokeWidth",r.strokeWidth.toString()),r.textInterlineSpacing!==void 0&&this.setOption("interline-spacing",r.textInterlineSpacing.toString()),r.textKerning!==void 0&&this.setOption("kerning",r.textKerning.toString());for(const g in r._options)this.setOption(g,r._options[g])}setOption(r,e){W(r,o=>{W(e,g=>{_._api._MagickSettings_SetOption(this._instance,o,g)})})}}class Ve{_options={};_fileName;_ping=!1;_quality;antiAlias;backgroundColor;colorSpace;colorType;compression;debug;depth;endian;fillColor;font;fontPointsize;format;interlace;strokeColor;strokeWidth;textInterlineSpacing;textKerning;getDefine(r,e){return e!==void 0?this._options[`${r}:${e}`]??null:this._options[r]??null}setDefine(r,e,o){if(o===void 0)this._options[r]=e;else{const g=this.parseDefine(r,e);typeof o=="string"?this._options[g]=o:typeof o=="number"?this._options[g]=o.toString():this._options[g]=o?"true":"false"}}setDefines(r){r.getDefines().forEach(e=>{e!==void 0&&this.setDefine(e.format,e.name,e.value)})}_clone(){const r=new Ve;return Object.assign(r,this),r}_use(r){const e=new zn(this);return oe._disposeAfterExecution(e,r)}parseDefine(r,e){return r===he.Unknown?e:`${r}:${e}`}}class ye extends Ve{constructor(r){super(),Object.assign(this,r)}extractArea;frameIndex;frameCount;height;get syncImageWithExifProfile(){const r=this.getDefine("exif:sync-image");return r===null?!0:r.toLowerCase()==="true"}set syncImageWithExifProfile(r){this.setDefine("exif:sync-image",r.toString())}width;_use(r){const e=new zn(this),o=this.getSize();if(o!==""&&W(o,g=>{_._api._MagickSettings_SetSize(e._instance,g)}),this.frameIndex!==void 0||this.frameCount!==void 0){const g=this.frameIndex??0,p=this.frameCount??1;_._api._MagickSettings_SetScene(e._instance,g),_._api._MagickSettings_SetNumberScenes(e._instance,p);const d=this.frameCount!==void 0?`${g}-${g+p}`:g.toString();W(d.toString(),S=>{_._api._MagickSettings_SetScenes(e._instance,S)})}return this.extractArea!==void 0&&W(this.extractArea.toString(),g=>{_._api._MagickSettings_Extract_Set(e._instance,g)}),oe._disposeAfterExecution(e,r)}getSize(){return this.width!==void 0&&this.height!==void 0?`${this.width}x${this.height}`:this.width!==void 0?`${this.width}x`:this.height!==void 0?`x${this.height}`:""}}var At=(t=>(t[t.Undefined=0]="Undefined",t[t.No=1]="No",t[t.Riemersma=2]="Riemersma",t[t.FloydSteinberg=3]="FloydSteinberg",t))(At||{});class Da extends Re{constructor(r){const e=_._api._QuantizeSettings_Create(),o=_._api._QuantizeSettings_Dispose;super(e,o),_._api._QuantizeSettings_SetColors(this._instance,r.colors),_._api._QuantizeSettings_SetColorSpace(this._instance,r.colorSpace),_._api._QuantizeSettings_SetDitherMethod(this._instance,r.ditherMethod??At.No),_._api._QuantizeSettings_SetMeasureErrors(this._instance,r.measureErrors?1:0),_._api._QuantizeSettings_SetTreeDepth(this._instance,r.treeDepth)}}class Et{constructor(){this.colors=256,this.colorSpace=Xe.Undefined,this.ditherMethod=At.Riemersma,this.measureErrors=!1,this.treeDepth=0}colors;colorSpace;ditherMethod;measureErrors;treeDepth;_use(r){const e=new Da(this);return oe._disposeAfterExecution(e,r)}}class ze{_image;_names=[];constructor(r){this._image=r}setArtifact(r,e){this._names.push(r),this._image.setArtifact(r,e)}static use(r,e){const o=new ze(r);try{return e(o)}finally{o.dispose()}}dispose(){for(const r of this._names)this._image.removeArtifact(r)}}function Nn(t,r){if(t.byteLength===0)throw new Z("The specified array cannot be empty");let e=0;try{return e=_._api._malloc(t.byteLength),_._api.HEAPU8.set(t,e),r(e)}finally{e!==0&&_._api._free(e)}}function Hn(t,r){if(t.length===0)throw new Z("The specified array cannot be empty");const e=t.length*8;let o=0;try{o=_._api._malloc(e);const g=new ArrayBuffer(e),p=new Float64Array(g);for(let d=0;d_._api._MagickImageCollection_Append(e,0,o.ptr),r)}appendVertically(r){return this.createImage((e,o)=>_._api._MagickImageCollection_Append(e,1,o.ptr),r)}clone(r){const e=we.create();for(let o=0;o_._api._MagickImageCollection_Coalesce(r,e.ptr))}combine(r,e){let o=e,g=Xe.sRGB;return typeof r=="number"?g=r:o=r,this.createImage((p,d)=>_._api._MagickImageCollection_Combine(p,g,d.ptr),o)}complex(r,e){return ze.use(this[0],o=>(r._setArtifacts(o),this.createImage((g,p)=>_._api._MagickImageCollection_Complex(g,r.complexOperator,p.ptr),e)))}deconstruct(){this.replaceImages((r,e)=>_._api._MagickImageCollection_Deconstruct(r,e.ptr))}evaluate(r,e){return this.createImage((o,g)=>_._api._MagickImageCollection_Evaluate(o,r,g.ptr),e)}flatten(r){return this.mergeImages(st.Flatten,r)}fx(r,e,o){this.throwIfEmpty();let g=Q.All,p=o;return typeof e=="number"?g=e:p=e,W(r,d=>this.createImage((S,G)=>_._api._MagickImageCollection_Fx(S,d,g,G.ptr),p))}merge(r){return this.mergeImages(st.Merge,r)}montage(r,e){return this.throwIfEmpty(),this.attachImages(o=>{const g=r._use(p=>R.use(d=>{const S=_._api._MagickImageCollection_Montage(o,p._instance,d.ptr);return this.checkResult(S,d)}));return we._createFromImages(g,this.getSettings())._use(p=>{const d=r.transparentColor;return d!==void 0&&p.forEach(S=>{S.transparent(d)}),p.merge(e)})})}morph(r){if(this.length<2)throw new Z("operation requires at least two images");this.replaceImages((e,o)=>_._api._MagickImageCollection_Morph(e,r,o.ptr))}mosaic(r){return this.mergeImages(st.Mosaic,r)}optimize(){this.replaceImages((r,e)=>_._api._MagickImageCollection_Optimize(r,e.ptr))}optimizePlus(){this.replaceImages((r,e)=>_._api._MagickImageCollection_OptimizePlus(r,e.ptr))}optimizeTransparency(){this.throwIfEmpty(),this.attachImages(r=>{R.usePointer(e=>{_._api._MagickImageCollection_OptimizeTransparency(r,e)})})}ping(r,e){this.readOrPing(!0,r,e)}polynomial(r,e){return this.createImage((o,g)=>Hn(r,p=>_._api._MagickImageCollection_Polynomial(o,p,r.length,g.ptr)),e)}quantize(r){this.throwIfEmpty();const e=r===void 0?new Et:r;return this.attachImages(o=>{e._use(g=>{R.usePointer(p=>{_._api._MagickImageCollection_Quantize(o,g._instance,p)})})}),e.measureErrors?it._create(this[0]):null}read(r,e){this.readOrPing(!1,r,e)}remap(r,e){this.throwIfEmpty();const o=e===void 0?new Et:e;this.attachImages(g=>{o._use(p=>{R.use(d=>{_._api._MagickImageCollection_Remap(g,p._instance,r._instance,d.ptr)})})})}resetPage(){this.forEach(r=>{r.resetPage()})}smushHorizontal(r,e){return this.smush(r,!1,e)}smushVertical(r,e){return this.smush(r,!0,e)}trimBounds(){this.mergeImages(st.Trimbounds,()=>{})}write(r,e){this.throwIfEmpty();let o=0,g=0;const p=this[0],d=this.getSettings();e!==void 0?d.format=r:(e=r,d.format=p.format),R.use(G=>{ve.use(B=>{d._use(N=>{this.attachImages(se=>{o=_._api._MagickImage_WriteBlob(se,N._instance,B.ptr,G.ptr),g=B.value})})})});const S=new Tn(o,g,e);return oe._disposeAfterExecution(S,S.func)}static _createFromImages(r,e){const o=we.createObject();return o.addImages(r,e._clone()),o}_use(r){return oe._disposeAfterExecution(this,r)}addImages(r,e){e.format=he.Unknown;let o=r;for(;o!==0;){const g=_._api._MagickImage_GetNext(o);_._api._MagickImage_SetNext(o,0),this.push(te._createFromImage(o,e)),o=g}}attachImages(r){try{for(let e=0;er,()=>(_._api._MagickImageCollection_Dispose(r),0))}static createObject(){return Object.create(we.prototype)}createImage(r,e){this.throwIfEmpty();const o=this.attachImages(p=>R.use(d=>{const S=r(p,d);return this.checkResult(S,d)}));return te._createFromImage(o,this.getSettings())._use(e)}getSettings(){return this[0]._getSettings()._clone()}mergeImages(r,e){return this.createImage((o,g)=>_._api._MagickImageCollection_Merge(o,r,g.ptr),e)}readOrPing(r,e,o){this.dispose(),R.use(g=>{const p=o===void 0?new ye:new ye(o);p._ping=r,typeof e=="string"?(p._fileName=e,p._use(d=>{const S=_._api._MagickImageCollection_ReadFile(d._instance,g.ptr);this.addImages(S,p)})):p._use(d=>{const S=e.byteLength;let G=0;try{G=_._api._malloc(S),_._api.HEAPU8.set(e,G);const B=_._api._MagickImageCollection_ReadBlob(d._instance,G,0,S,g.ptr);this.addImages(B,p)}finally{G!==0&&_._api._free(G)}})})}replaceImages(r){this.throwIfEmpty();const e=this.attachImages(g=>R.use(p=>{const d=r(g,p);return this.checkResult(d,p)})),o=this.getSettings()._clone();this.dispose(),this.addImages(e,o)}smush(r,e,o){return this.createImage((g,p)=>_._api._MagickImageCollection_Smush(g,r,e?1:0,p.ptr),o)}throwIfEmpty(){if(this.length===0)throw new Z("operation requires at least one image")}}class re{_value;constructor(r){this._value=r}static _fromQuantum(r){return new re(r/Ee.max*100)}multiply(r){return r*this._value/100}toDouble(){return this._value}_toQuantum(){return Ee.max*(this._value/100)}}class Un{static use(r,e,o){const g=_._api._MagickRectangle_Create();try{_._api._MagickRectangle_X_Set(g,e.x),_._api._MagickRectangle_Y_Set(g,e.y);let p=e.width,d=e.height;return e.isPercentage&&(p=new re(e.width).multiply(r.width),d=new re(e.height).multiply(r.height)),_._api._MagickRectangle_Width_Set(g,p),_._api._MagickRectangle_Height_Set(g,d),o(g)}finally{_._api._MagickRectangle_Dispose(g)}}}class Ne extends Re{image;constructor(r){const e=R.usePointer(g=>_._api._PixelCollection_Create(r._instance,g)),o=_._api._PixelCollection_Dispose;super(e,o),this.image=r}static _create(r){return new Ne(r)}static _use(r,e){const o=new Ne(r);return oe._disposeAfterExecution(o,e)}static _map(r,e,o){const g=new Ne(r);try{g.use(0,0,r.width,r.height,e,p=>{o(p)})}finally{g.dispose()}}getArea(r,e,o,g){return R.usePointer(p=>{const d=_._api._PixelCollection_GetArea(this._instance,r,e,o,g,p),S=o*g*this.image.channelCount;return _._api.HEAPU8.subarray(d,d+S)})}getPixel(r,e){return this.getArea(r,e,1,1)}setArea(r,e,o,g,p){R.usePointer(d=>{const S=p instanceof Uint8Array?p:new Uint8Array(p);ba(S,G=>{_._api._PixelCollection_SetArea(this._instance,r,e,o,g,G,S.length,d)})})}setPixel(r,e,o){o instanceof Uint8Array?this.setArea(r,e,1,1,o):this.setArea(r,e,1,1,o)}toByteArray(r,e,o,g,p){return this.use(r,e,o,g,p,d=>{if(d===0)return null;const S=o*g*p.length;return _._api.HEAPU8.slice(d,d+S)})}use(r,e,o,g,p,d){return W(p,S=>R.use(G=>{let B=_._api._PixelCollection_ToByteArray(this._instance,r,e,o,g,S,G.ptr);return G.check(()=>{const N=d(B);return B=_._api._MagickMemory_Relinquish(B),N},()=>(B=_._api._MagickMemory_Relinquish(B),null))}))}}var tn=(t=>(t[t.Undefined=0]="Undefined",t[t.Average=1]="Average",t[t.Brightness=2]="Brightness",t[t.Lightness=3]="Lightness",t[t.MS=4]="MS",t[t.Rec601Luma=5]="Rec601Luma",t[t.Rec601Luminance=6]="Rec601Luminance",t[t.Rec709Luma=7]="Rec709Luma",t[t.Rec709Luminance=8]="Rec709Luminance",t[t.RMS=9]="RMS",t))(tn||{});class Ce{constructor(r,e,o){this.x=r,this.y=e,this.z=o}x;y;z;static _create(r){return r===0?new Ce(0,0,0):new Ce(_._api._PrimaryInfo_X_Get(r),_._api._PrimaryInfo_Y_Get(r),_._api._PrimaryInfo_Z_Get(r))}_use(r){let e=0;try{e=_._api._PrimaryInfo_Create(),_._api._PrimaryInfo_X_Set(e,this.x),_._api._PrimaryInfo_Y_Set(e,this.y),_._api._PrimaryInfo_Z_Set(e,this.z),r(e)}finally{_._api._free(e)}}}class Fn{channel;depth;entropy;kurtosis;maximum;mean;minimum;skewness;standardDeviation;constructor(r,e){this.channel=r,this.depth=_._api._ChannelStatistics_Depth_Get(e),this.entropy=_._api._ChannelStatistics_Entropy_Get(e),this.kurtosis=_._api._ChannelStatistics_Kurtosis_Get(e),this.maximum=_._api._ChannelStatistics_Maximum_Get(e),this.mean=_._api._ChannelStatistics_Mean_Get(e),this.minimum=_._api._ChannelStatistics_Minimum_Get(e),this.skewness=_._api._ChannelStatistics_Skewness_Get(e),this.standardDeviation=_._api._ChannelStatistics_StandardDeviation_Get(e)}}class Rt{_channels={};get channels(){const r=[];for(const e in this._channels)r.push(parseInt(e));return r}composite(){return this._channels[E.Composite]}getChannel(r){const e=this._channels[r];return e!==void 0?e:null}static _create(r,e,o){const g=new Rt;return r.channels.forEach(p=>{o>>p&1&&g.addChannel(e,p)}),g.addChannel(e,E.Composite),g}addChannel(r,e){const o=_._api._Statistics_GetInstance(r,e);o!==0&&(this._channels[e]=new Fn(e,o))}}class Ga{static toArray(r){if(r===0)return null;const e=_._api._StringInfo_Datum_Get(r),o=_._api._StringInfo_Length_Get(r);return _._api.HEAPU8.subarray(e,e+o)}}class nn{constructor(r){this.error=r}error}class te extends Re{_settings;_progress;_warning;constructor(r,e){super(r,_._api._MagickImage_Dispose),this._settings=e}get animationDelay(){return _._api._MagickImage_AnimationDelay_Get(this._instance)}set animationDelay(r){_._api._MagickImage_AnimationDelay_Set(this._instance,r)}get animationIterations(){return _._api._MagickImage_AnimationIterations_Get(this._instance)}set animationIterations(r){_._api._MagickImage_AnimationIterations_Set(this._instance,r)}get animationTicksPerSecond(){return _._api._MagickImage_AnimationTicksPerSecond_Get(this._instance)}set animationTicksPerSecond(r){_._api._MagickImage_AnimationTicksPerSecond_Set(this._instance,r)}get artifactNames(){const r=[];_._api._MagickImage_ResetArtifactIterator(this._instance);let e=_._api._MagickImage_GetNextArtifactName(this._instance);for(;e!==0;)r.push(_._api.UTF8ToString(e)),e=_._api._MagickImage_GetNextArtifactName(this._instance);return r}get attributeNames(){const r=[];_._api._MagickImage_ResetAttributeIterator(this._instance);let e=_._api._MagickImage_GetNextAttributeName(this._instance);for(;e!==0;)r.push(_._api.UTF8ToString(e)),e=_._api._MagickImage_GetNextAttributeName(this._instance);return r}get backgroundColor(){const r=_._api._MagickImage_BackgroundColor_Get(this._instance);return w._create(r)}set backgroundColor(r){r._use(e=>{_._api._MagickImage_BackgroundColor_Set(this._instance,e)})}get baseHeight(){return _._api._MagickImage_BaseHeight_Get(this._instance)}get baseWidth(){return _._api._MagickImage_BaseWidth_Get(this._instance)}get blackPointCompensation(){return _._api._MagickImage_BlackPointCompensation_Get(this._instance)===1}set blackPointCompensation(r){_._api._MagickImage_BlackPointCompensation_Set(this._instance,r?1:0)}get borderColor(){const r=_._api._MagickImage_BorderColor_Get(this._instance);return w._create(r)}set borderColor(r){r._use(e=>{_._api._MagickImage_BorderColor_Set(this._instance,e)})}get boundingBox(){return this.useExceptionPointer(r=>{const e=_._api._MagickImage_BoundingBox_Get(this._instance,r),o=ue._fromRectangle(e);return o.width===0||o.height===0?null:o})}get channelCount(){return _._api._MagickImage_ChannelCount_Get(this._instance)}get channels(){const r=[];return[E.Red,E.Green,E.Blue,E.Black,E.Alpha].forEach(e=>{_._api._MagickImage_HasChannel(this._instance,e)&&r.push(e)}),r}get chromaticity(){return new En(Ce._create(_._api._MagickImage_ChromaRed_Get(this._instance)),Ce._create(_._api._MagickImage_ChromaGreen_Get(this._instance)),Ce._create(_._api._MagickImage_ChromaBlue_Get(this._instance)),Ce._create(_._api._MagickImage_ChromaWhite_Get(this._instance)))}set chromaticity(r){r.blue._use(e=>_._api._MagickImage_ChromaBlue_Set(this._instance,e)),r.green._use(e=>_._api._MagickImage_ChromaGreen_Set(this._instance,e)),r.red._use(e=>_._api._MagickImage_ChromaRed_Set(this._instance,e)),r.white._use(e=>_._api._MagickImage_ChromaWhite_Set(this._instance,e))}get classType(){return _._api._MagickImage_ClassType_Get(this._instance)}set classType(r){this.useExceptionPointer(e=>{_._api._MagickImage_ClassType_Set(this._instance,r,e)})}get colorFuzz(){return re._fromQuantum(_._api._MagickImage_ColorFuzz_Get(this._instance))}set colorFuzz(r){_._api._MagickImage_ColorFuzz_Set(this._instance,r._toQuantum())}get colormapSize(){return _._api._MagickImage_ColormapSize_Get(this._instance)}set colormapSize(r){this.useExceptionPointer(e=>{_._api._MagickImage_ColormapSize_Set(this._instance,r,e)})}get colorSpace(){return _._api._MagickImage_ColorSpace_Get(this._instance)}set colorSpace(r){this.useExceptionPointer(e=>{_._api._MagickImage_ColorSpace_Set(this._instance,r,e)})}get colorType(){return this.settings.colorType!==void 0?this.settings.colorType:_._api._MagickImage_ColorType_Get(this._instance)}set colorType(r){this.useExceptionPointer(e=>{_._api._MagickImage_ColorType_Set(this._instance,r,e)})}get comment(){return this.getAttribute("comment")}set comment(r){r===null?this.removeAttribute("comment"):this.setAttribute("comment",r)}get compose(){return _._api._MagickImage_Compose_Get(this._instance)}set compose(r){_._api._MagickImage_Compose_Set(this._instance,r)}get compression(){return _._api._MagickImage_Compression_Get(this._instance)}get density(){return new Zt(_._api._MagickImage_ResolutionX_Get(this._instance),_._api._MagickImage_ResolutionY_Get(this._instance),_._api._MagickImage_ResolutionUnits_Get(this._instance))}set density(r){_._api._MagickImage_ResolutionX_Set(this._instance,r.x),_._api._MagickImage_ResolutionY_Set(this._instance,r.y),_._api._MagickImage_ResolutionUnits_Set(this._instance,r.units)}get depth(){return _._api._MagickImage_Depth_Get(this._instance)}set depth(r){_._api._MagickImage_Depth_Set(this._instance,r)}get endian(){return _._api._MagickImage_Endian_Get(this._instance)}set endian(r){_._api._MagickImage_Endian_Set(this._instance,r)}get fileName(){const r=_._api._MagickImage_FileName_Get(this._instance);return r===0?null:_._api.UTF8ToString(r)}get filterType(){return _._api._MagickImage_FilterType_Get(this._instance)}set filterType(r){_._api._MagickImage_FilterType_Set(this._instance,r)}get format(){return ge(_._api._MagickImage_Format_Get(this._instance))}set format(r){W(r.toString(),e=>_._api._MagickImage_Format_Set(this._instance,e))}get gamma(){return _._api._MagickImage_Gamma_Get(this._instance)}get gifDisposeMethod(){return _._api._MagickImage_GifDisposeMethod_Get(this._instance)}set gifDisposeMethod(r){_._api._MagickImage_GifDisposeMethod_Set(this._instance,r)}get hasAlpha(){return this.toBool(_._api._MagickImage_HasAlpha_Get(this._instance))}set hasAlpha(r){this.useExceptionPointer(e=>{r&&this.alpha(Qt.Opaque),_._api._MagickImage_HasAlpha_Set(this._instance,this.fromBool(r),e)})}get height(){return _._api._MagickImage_Height_Get(this._instance)}get interlace(){return _._api._MagickImage_Interlace_Get(this._instance)}get isOpaque(){return this.useExceptionPointer(r=>this.toBool(_._api._MagickImage_IsOpaque_Get(this._instance,r)))}get interpolate(){return _._api._MagickImage_Interpolate_Get(this._instance)}set interpolate(r){_._api._MagickImage_Interpolate_Set(this._instance,r)}get label(){return this.getAttribute("label")}set label(r){r===null?this.removeAttribute("label"):this.setAttribute("label",r)}get matteColor(){const r=_._api._MagickImage_MatteColor_Get(this._instance);return w._create(r)}set matteColor(r){r._use(e=>{_._api._MagickImage_MatteColor_Set(this._instance,e)})}get metaChannelCount(){return _._api._MagickImage_MetaChannelCount_Get(this._instance)}set metaChannelCount(r){this.useExceptionPointer(e=>{_._api._MagickImage_MetaChannelCount_Set(this._instance,r,e)})}get orientation(){return _._api._MagickImage_Orientation_Get(this._instance)}set orientation(r){_._api._MagickImage_Orientation_Set(this._instance,r)}get onProgress(){return this._progress}set onProgress(r){r!==void 0?ie.setProgressDelegate(this):this.disposeProgressDelegate(),this._progress=r}get onWarning(){return this._warning}set onWarning(r){this._warning=r}get page(){const r=_._api._MagickImage_Page_Get(this._instance);return ue._fromRectangle(r)}set page(r){r._toRectangle(e=>{_._api._MagickImage_Page_Set(this._instance,e)})}get profileNames(){const r=[];_._api._MagickImage_ResetProfileIterator(this._instance);let e=_._api._MagickImage_GetNextProfileName(this._instance);for(;e!==0;)r.push(_._api.UTF8ToString(e)),e=_._api._MagickImage_GetNextProfileName(this._instance);return r}get quality(){return _._api._MagickImage_Quality_Get(this._instance)}set quality(r){let e=r<1?1:r;e=e>100?100:e,_._api._MagickImage_Quality_Set(this._instance,e),this._settings._quality=e}get renderingIntent(){return _._api._MagickImage_RenderingIntent_Get(this._instance)}set renderingIntent(r){_._api._MagickImage_RenderingIntent_Set(this._instance,r)}get settings(){return this._settings}get signature(){return this.useExceptionPointer(r=>ge(_._api._MagickImage_Signature_Get(this._instance,r)))}get totalColors(){return this.useExceptionPointer(r=>_._api._MagickImage_TotalColors_Get(this._instance,r))}get virtualPixelMethod(){return _._api._MagickImage_VirtualPixelMethod_Get(this._instance)}set virtualPixelMethod(r){this.useExceptionPointer(e=>{_._api._MagickImage_VirtualPixelMethod_Set(this._instance,r,e)})}get width(){return _._api._MagickImage_Width_Get(this._instance)}adaptiveBlur(r,e){const o=this.valueOrDefault(r,0),g=this.valueOrDefault(e,1);this.useException(p=>{const d=_._api._MagickImage_AdaptiveBlur(this._instance,o,g,p.ptr);this._setInstance(d,p)})}adaptiveResize(r,e){const o=typeof r=="number"?new ue(0,0,r,e):r;this.useException(g=>{W(o.toString(),p=>{const d=_._api._MagickImage_AdaptiveResize(this._instance,p,g.ptr);this._setInstance(d,g)})})}adaptiveSharpen(r,e,o){let g=0;const p=e??1;let d=o??Q.Undefined;r!==void 0&&(e===void 0?d=r:g=r),this.useException(S=>{const G=_._api._MagickImage_AdaptiveSharpen(this._instance,g,p,d,S.ptr);this._setInstance(G,S)})}addNoise(r,e,o){let g=1,p=o??Q.Undefined;e!==void 0&&(o===void 0?p=e:g=e),this.useException(d=>{const S=_._api._MagickImage_AddNoise(this._instance,r,g,p,d.ptr);this._setInstance(S,d)})}alpha(r){this.useExceptionPointer(e=>{_._api._MagickImage_SetAlpha(this._instance,r,e)})}autoGamma(r){this.useExceptionPointer(e=>{const o=this.valueOrDefault(r,Q.Composite);_._api._MagickImage_AutoGamma(this._instance,o,e)})}autoLevel(r){this.useExceptionPointer(e=>{const o=this.valueOrDefault(r,Q.Undefined);_._api._MagickImage_AutoLevel(this._instance,o,e)})}autoOrient(){this.useException(r=>{const e=_._api._MagickImage_AutoOrient(this._instance,r.ptr);this._setInstance(e,r)})}autoThreshold(r){this.useException(e=>{_._api._MagickImage_AutoThreshold(this._instance,r,e.ptr)})}blur(r,e,o){let g=0;const p=this.valueOrDefault(e,1);let d=this.valueOrDefault(o,Q.Undefined);r!==void 0&&(e===void 0?d=r:g=r),this.useException(S=>{const G=_._api._MagickImage_Blur(this._instance,g,p,d,S.ptr);this._setInstance(G,S)})}border(r,e){const o=r,g=this.valueOrDefault(e,r),p=new ue(0,0,o,g);this.useException(d=>{p._toRectangle(S=>{const G=_._api._MagickImage_Border(this._instance,S,d.ptr);this._setInstance(G,d)})})}brightnessContrast(r,e,o){const g=this.valueOrDefault(o,Q.Undefined);this.useException(p=>{_._api._MagickImage_BrightnessContrast(this._instance,r.toDouble(),e.toDouble(),g,p.ptr)})}charcoal(r,e){const o=r===void 0?0:r,g=e===void 0?1:e;this.useException(p=>{const d=_._api._MagickImage_Charcoal(this._instance,o,g,p.ptr);this._setInstance(d,p)})}clahe(r,e,o,g){this.useExceptionPointer(p=>{const d=r instanceof re?r.multiply(this.width):r,S=e instanceof re?e.multiply(this.height):e;_._api._MagickImage_Clahe(this._instance,d,S,o,g,p)})}clone(r){return te._clone(this)._use(r)}colorAlpha(r){if(!this.hasAlpha)return;const e=te.create();e.read(r,this.width,this.height),e.composite(this,tt.SrcOver,new de(0,0)),this._instance=e._instance}compare(r,e,o,g){const p=e instanceof Rn,d=p?e.metric:e;let S=o;g!==void 0&&(S=g);let G=Q.Undefined;if(typeof S!="function")return S!==void 0&&(G=S),this.useExceptionPointer(N=>_._api._MagickImage_CompareDistortion(this._instance,r._instance,d,G,N));o!==void 0&&typeof o!="function"&&(G=o);const B=ze.use(this,N=>(p&&e._setArtifacts(N),en.use(se=>{const Ie=this.useExceptionPointer(ut=>_._api._MagickImage_Compare(this._instance,r._instance,d,G,se.ptr,ut)),Te=se.value,He=te._createFromImage(Ie,this._settings);return bt._create(Te,He)})));return B.difference._use(()=>S(B))}composite(r,e,o,g,p){let d=0,S=0,G=tt.In,B=Q.All,N=null;e instanceof de?(d=e.x,S=e.y):e!==void 0&&(G=e),o instanceof de?(d=o.x,S=o.y):typeof o=="string"?N=o:o!==void 0&&(B=o),typeof g=="string"?N=g:g!==void 0&&(B=g),p!==void 0&&(B=p),N!==null&&this.setArtifact("compose:args",N),this.useExceptionPointer(se=>{_._api._MagickImage_Composite(this._instance,r._instance,d,S,G,B,se)}),N!==null&&this.removeArtifact("compose:args")}compositeGravity(r,e,o,g,p,d){let S=0,G=0,B=tt.In,N=Q.All,se=null;o instanceof de?(S=o.x,G=o.y):o!==void 0&&(B=o),g instanceof de?(S=g.x,G=g.y):typeof g=="string"?se=g:g!==void 0&&(N=g),typeof p=="string"?se=p:p!==void 0&&(N=p),d!==void 0&&(N=d),se!==null&&this.setArtifact("compose:args",se),this.useExceptionPointer(Ie=>{_._api._MagickImage_CompositeGravity(this._instance,r._instance,e,S,G,B,N,Ie)}),se!==null&&this.removeArtifact("compose:args")}connectedComponents(r){const e=typeof r=="number"?new Cn(r):r;return ze.use(this,g=>(e._setArtifacts(g),this.useException(p=>ve.use(d=>{try{const S=_._api._MagickImage_ConnectedComponents(this._instance,e.connectivity,d.ptr,p.ptr);return this._setInstance(S,p),Gt._create(d.value,this.colormapSize)}finally{d.value!==0&&_._api._ConnectedComponent_DisposeList(d.value)}}))))}contrast=()=>this._contrast(!0);contrastStretch(r,e,o){const g=this.width*this.height,p=r.multiply(g);let d=0,S=this.valueOrDefault(o,Q.Undefined);e instanceof re?d=g-e.multiply(g):(d=g-r.multiply(g),e!==void 0&&(S=e)),this.useExceptionPointer(G=>{_._api._MagickImage_ContrastStretch(this._instance,p,d,S,G)})}static create(r,e,o){const g=new te(te.createInstance(),new Ve);return r!==void 0&&g.readOrPing(!1,r,e,o),g}crop(r,e,o){let g,p;typeof r!="number"?(g=r,p=this.valueOrDefault(e,at.Undefined)):e!==void 0&&(g=new ue(r,e),p=this.valueOrDefault(o,at.Undefined)),this.useException(d=>{W(g.toString(),S=>{const G=_._api._MagickImage_Crop(this._instance,S,p,d.ptr);this._setInstance(G,d)})})}cropToTiles(r,e,o){let g,p;return typeof r=="number"&&typeof e=="number"&&o!==void 0?(g=new ue(0,0,r,e),p=o):typeof r!="number"&&typeof e!="number"&&(g=r,p=e),this.useException(d=>W(g.toString(),S=>{const G=_._api._MagickImage_CropToTiles(this._instance,S,d.ptr);return we._createFromImages(G,this._settings)._use(p)}))}deskew(r,e){return ze.use(this,o=>{e!==void 0&&o.setArtifact("deskew:auto-crop",e),this.useException(p=>{const d=_._api._MagickImage_Deskew(this._instance,r._toQuantum(),p.ptr);this._setInstance(d,p)});const g=Number(this.getArtifact("deskew:angle"));return isNaN(g)?0:g})}distort(r,e){ze.use(this,o=>{let g,p=0;typeof r=="number"?g=r:(g=r.method,p=r.bestFit?1:0,r._setArtifacts(o)),this.useException(d=>{Hn(e,S=>{const G=_._api._MagickImage_Distort(this._instance,g,p,S,e.length,d.ptr);this._setInstance(G,d)})})})}draw(...r){const e=r.flat();e.length!==0&&rt._use(this,o=>{o.draw(e)})}evaluate(r,e,o,g){if(typeof e=="number"){const p=e,d=typeof o=="number"?o:o._toQuantum();this.useExceptionPointer(S=>{_._api._MagickImage_EvaluateOperator(this._instance,r,p,d,S)})}else if(g!==void 0){if(typeof o!="number")throw new Z("this should not happen");const p=e,d=o,S=typeof g=="number"?g:g._toQuantum();if(p.isPercentage)throw new Z("percentage is not supported");this.useExceptionPointer(G=>{Un.use(this,p,B=>{_._api._MagickImage_EvaluateGeometry(this._instance,r,B,d,S,G)})})}}extent(r,e,o){let g=at.Undefined,p;typeof r!="number"?p=r:typeof e=="number"&&(p=new ue(r,e)),typeof e=="number"?g=e:e!==void 0&&(this.backgroundColor=e),typeof o=="number"?g=o:o!==void 0&&(this.backgroundColor=o),this.useException(d=>{W(p.toString(),S=>{const G=_._api._MagickImage_Extent(this._instance,S,g,d.ptr);this._setInstance(G,d)})})}flip(){this.useException(r=>{const e=_._api._MagickImage_Flip(this._instance,r.ptr);this._setInstance(e,r)})}flop(){this.useException(r=>{const e=_._api._MagickImage_Flop(this._instance,r.ptr);this._setInstance(e,r)})}gammaCorrect(r,e){const o=this.valueOrDefault(e,Q.Undefined);this.useExceptionPointer(g=>{_._api._MagickImage_GammaCorrect(this._instance,r,o,g)})}gaussianBlur(r,e,o){const g=this.valueOrDefault(e,1),p=this.valueOrDefault(o,Q.Undefined);this.useException(d=>{const S=_._api._MagickImage_GaussianBlur(this._instance,r,g,p,d.ptr);this._setInstance(S,d)})}getArtifact(r){return W(r,e=>{const o=_._api._MagickImage_GetArtifact(this._instance,e);return ge(o)})}getAttribute(r){return this.useException(e=>W(r,o=>{const g=_._api._MagickImage_GetAttribute(this._instance,o,e.ptr);return ge(g)}))}getPixels(r){if(this._settings._ping)throw new Z("image contains no pixel data");return Ne._use(this,r)}getProfile(r){return W(r,e=>{const o=_._api._MagickImage_GetProfile(this._instance,e),g=Ga.toArray(o);return g===null?null:new Ln(r,g)})}getWriteMask(r){const e=this.useExceptionPointer(g=>_._api._MagickImage_GetWriteMask(this._instance,g)),o=e===0?null:new te(e,new Ve);return o==null?r(o):o._use(r)}grayscale(r=tn.Undefined){this.useExceptionPointer(e=>{_._api._MagickImage_Grayscale(this._instance,r,e)})}histogram(){const r=new Map;return this.useExceptionPointer(e=>{ve.use(o=>{const g=_._api._MagickImage_Histogram(this._instance,o.ptr,e);if(g!==0){const p=o.value;for(let d=0;dthis._contrast(!1);inverseLevel(r,e,o,g){const p=this.valueOrDefault(o,1),d=this.valueOrDefault(g,Q.Composite);this.useExceptionPointer(S=>{_._api._MagickImage_InverseLevel(this._instance,r.toDouble(),e._toQuantum(),p,d,S)})}inverseOpaque=(r,e)=>this._opaque(r,e,!0);inverseSigmoidalContrast(r,e,o){this._sigmoidalContrast(!1,r,e,o)}inverseTransparent=r=>this._transparent(r,!0);level(r,e,o,g){const p=this.valueOrDefault(o,1),d=this.valueOrDefault(g,Q.Composite);this.useExceptionPointer(S=>{_._api._MagickImage_Level(this._instance,r.toDouble(),e._toQuantum(),p,d,S)})}linearStretch(r,e){this.useExceptionPointer(o=>{_._api._MagickImage_LinearStretch(this._instance,r.toDouble(),e._toQuantum(),o)})}liquidRescale(r,e){const o=typeof r=="number"?new ue(r,e):r;this.useException(g=>{W(o.toString(),p=>{const d=_._api._MagickImage_LiquidRescale(this._instance,p,o.x,o.y,g.ptr);this._setInstance(d,g)})})}negate(r){this.useExceptionPointer(e=>{const o=this.valueOrDefault(r,Q.Undefined);_._api._MagickImage_Negate(this._instance,0,o,e)})}negateGrayScale(r){this.useExceptionPointer(e=>{const o=this.valueOrDefault(r,Q.Undefined);_._api._MagickImage_Negate(this._instance,1,o,e)})}normalize(){this.useExceptionPointer(r=>{_._api._MagickImage_Normalize(this._instance,r)})}modulate(r,e,o){const g=this.valueOrDefault(e,new re(100)),p=this.valueOrDefault(o,new re(100));this.useExceptionPointer(d=>{const S=`${r.toDouble()}/${g.toDouble()}/${p.toDouble()}`;W(S,G=>{_._api._MagickImage_Modulate(this._instance,G,d)})})}morphology(r){this.useException(e=>{W(r.kernel,o=>{const g=_._api._MagickImage_Morphology(this._instance,r.method,o,r.channels,r.iterations,e.ptr);this._setInstance(g,e)})})}motionBlur(r,e,o){this.useException(g=>{const p=_._api._MagickImage_MotionBlur(this._instance,r,e,o,g.ptr);this._setInstance(p,g)})}oilPaint(r){const e=this.valueOrDefault(r,3),o=0;this.useException(g=>{const p=_._api._MagickImage_OilPaint(this._instance,e,o,g.ptr);this._setInstance(p,g)})}opaque=(r,e)=>this._opaque(r,e,!1);ping(r,e){this.readOrPing(!0,r,e)}quantize(r){const e=this.valueOrDefault(r,new Et);return this.useException(o=>{e._use(g=>{_._api._MagickImage_Quantize(this._instance,g._instance,o.ptr)})}),e.measureErrors?it._create(this):null}read(r,e,o){this.readOrPing(!1,r,e,o)}readFromCanvas(r,e){const o=r.getContext("2d",e);if(o===null)return;const g=o.getImageData(0,0,r.width,r.height),p=new ye;p.format=he.Rgba,p.width=r.width,p.height=r.height,this.useException(d=>{this.readFromArray(g.data,p,d)})}removeArtifact(r){W(r,e=>{_._api._MagickImage_RemoveArtifact(this._instance,e)})}removeAttribute(r){W(r,e=>{_._api._MagickImage_RemoveAttribute(this._instance,e)})}removeProfile(r){const e=typeof r=="string"?r:r.name;W(e,o=>{_._api._MagickImage_RemoveProfile(this._instance,o)})}removeWriteMask(){this.useExceptionPointer(r=>{_._api._MagickImage_SetWriteMask(this._instance,0,r)})}resetPage(){this.page=new ue(0,0,0,0)}resize(r,e){const o=typeof r=="number"?new ue(r,e):r;this.useException(g=>{W(o.toString(),p=>{const d=_._api._MagickImage_Resize(this._instance,p,g.ptr);this._setInstance(d,g)})})}rotate(r){this.useException(e=>{const o=_._api._MagickImage_Rotate(this._instance,r,e.ptr);this._setInstance(o,e)})}separate(r,e){return this.useException(o=>{let g,p=Q.Undefined;if(typeof r=="number"&&e!==void 0)p=r,g=e;else if(typeof r=="function")g=r;else throw new Z("invalid arguments");const d=_._api._MagickImage_Separate(this._instance,p,o.ptr);return we._createFromImages(d,this._settings)._use(g)})}sepiaTone(r=new re(80)){this.useException(e=>{const o=typeof r=="number"?new re(r):r,g=_._api._MagickImage_SepiaTone(this._instance,o._toQuantum(),e.ptr);this._setInstance(g,e)})}setArtifact(r,e){let o;typeof e=="string"?o=e:typeof e=="boolean"?o=this.fromBool(e).toString():o=e.toString(),W(r,g=>{W(o,p=>{_._api._MagickImage_SetArtifact(this._instance,g,p)})})}setAttribute(r,e){this.useException(o=>{W(r,g=>{W(e,p=>{_._api._MagickImage_SetAttribute(this._instance,g,p,o.ptr)})})})}setProfile(r,e){const o=typeof r=="string"?r:r.name;let g;e!==void 0?g=e:typeof r!="string"&&(g=r.data),this.useException(p=>{W(o,d=>{Nn(g,S=>{_._api._MagickImage_SetProfile(this._instance,d,S,g.byteLength,p.ptr)})})})}setWriteMask(r){this.useExceptionPointer(e=>{_._api._MagickImage_SetWriteMask(this._instance,r._instance,e)})}sharpen(r,e,o){const g=this.valueOrDefault(r,0),p=this.valueOrDefault(e,1),d=this.valueOrDefault(o,Q.Undefined);this.useException(S=>{const G=_._api._MagickImage_Sharpen(this._instance,g,p,d,S.ptr);this._setInstance(G,S)})}shave(r,e){this.useException(o=>{const g=_._api._MagickImage_Shave(this._instance,r,e,o.ptr);this._setInstance(g,o)})}sigmoidalContrast(r,e,o){this._sigmoidalContrast(!0,r,e,o)}solarize(r=new re(50)){this.useException(e=>{const o=typeof r=="number"?new re(r):r;_._api._MagickImage_Solarize(this._instance,o._toQuantum(),e.ptr)})}splice(r){Un.use(this,r,e=>{this.useException(o=>{const g=_._api._MagickImage_Splice(this._instance,e,o.ptr);this._setInstance(g,o)})})}statistics(r){const e=this.valueOrDefault(r,Q.All);return this.useExceptionPointer(o=>{const g=_._api._MagickImage_Statistics(this._instance,e,o),p=Rt._create(this,g,e);return _._api._Statistics_DisposeList(g),p})}strip(){this.useExceptionPointer(r=>{_._api._MagickImage_Strip(this._instance,r)})}threshold(r,e){const o=this.valueOrDefault(e,Q.Undefined);this.useExceptionPointer(g=>{_._api._MagickImage_Threshold(this._instance,r._toQuantum(),o,g)})}toString=()=>`${this.format} ${this.width}x${this.height} ${this.depth}-bit ${Xe[this.colorSpace]}`;transparent(r){r._use(e=>{this.useExceptionPointer(o=>{_._api._MagickImage_Transparent(this._instance,e,0,o)})})}trim(...r){if(r.length>0)if(r.length==1&&r[0]instanceof re){const e=r[0];this.setArtifact("trim:percent-background",e.toDouble().toString())}else{const e=r,o=[...new Set(Bn(e))].join(",");this.setArtifact("trim:edges",o)}this.useException(e=>{const o=_._api._MagickImage_Trim(this._instance,e.ptr);this._setInstance(o,e),this.removeArtifact("trim:edges"),this.removeArtifact("trim:percent-background")})}wave(r,e,o){const g=this.valueOrDefault(r,this.interpolate),p=this.valueOrDefault(e,25),d=this.valueOrDefault(o,150);this.useException(S=>{const G=_._api._MagickImage_Wave(this._instance,g,p,d,S.ptr);this._setInstance(G,S)})}vignette(r,e,o,g){const p=this.valueOrDefault(r,0),d=this.valueOrDefault(e,1),S=this.valueOrDefault(o,0),G=this.valueOrDefault(g,0);this.useException(B=>{const N=_._api._MagickImage_Vignette(this._instance,p,d,S,G,B.ptr);this._setInstance(N,B)})}write(r,e){let o=0,g=0;e!==void 0?this._settings.format=r:e=r,this.useException(d=>{ve.use(S=>{this._settings._use(G=>{try{o=_._api._MagickImage_WriteBlob(this._instance,G._instance,S.ptr,d.ptr),g=S.value}catch{o!==0&&(o=_._api._MagickMemory_Relinquish(o))}})})});const p=new Tn(o,g,e);return oe._disposeAfterExecution(p,p.func)}writeToCanvas(r,e){r.width=this.width,r.height=this.height;const o=r.getContext("2d",e);o!==null&&Ne._map(this,"RGBA",g=>{const p=o.createImageData(this.width,this.height);let d=0;for(let S=0;Snew te(_._api._MagickImage_Clone(r._instance,e),r._settings._clone()))}_getSettings(){return this._settings}_instanceNotInitialized(){throw new Z("no image has been read")}_setInstance(r,e){if(super._setInstance(r,e)===!0||r===0&&this.onProgress!==void 0)return!0;throw new Z("out of memory")}_use(r){return oe._disposeAfterExecution(this,r)}static _create(r){return te.create()._use(r)}onDispose(){this.disposeProgressDelegate()}_contrast(r){this.useExceptionPointer(e=>{_._api._MagickImage_Contrast(this._instance,this.fromBool(r),e)})}_opaque(r,e,o){this.useExceptionPointer(g=>{r._use(p=>{e._use(d=>{_._api._MagickImage_Opaque(this._instance,p,d,this.fromBool(o),g)})})})}_sigmoidalContrast(r,e,o,g){let p;o!==void 0?typeof o=="number"?p=o:p=o.multiply(Ee.max):p=Ee.max*.5;const d=this.valueOrDefault(g,Q.Undefined);this.useExceptionPointer(S=>{_._api._MagickImage_SigmoidalContrast(this._instance,this.fromBool(r),e,p,d,S)})}_transparent(r,e){r._use(o=>{this.useExceptionPointer(g=>{_._api._MagickImage_Transparent(this._instance,o,this.fromBool(e),g)})})}static createInstance(){return R.usePointer(r=>_._api._MagickImage_Create(0,r))}fromBool(r){return r?1:0}disposeProgressDelegate(){ie.removeProgressDelegate(this),this._progress=void 0}readOrPing(r,e,o,g){this.useException(p=>{const d=o instanceof ye?o:new ye(this._settings);if(d._ping=r,this._settings._ping=r,d.frameCount!==void 0&&d.frameCount>1)throw new Z("The frame count can only be set to 1 when a single image is being read.");if(typeof e=="string")d._fileName=e;else if(Le(e)){this.readFromArray(e,d,p);return}else d._fileName="xc:"+e.toShortString(),d.width=typeof o=="number"?o:0,d.height=typeof g=="number"?g:0;d._use(S=>{const G=_._api._MagickImage_ReadFile(S._instance,p.ptr);this._setInstance(G,p)})})}readFromArray(r,e,o){e._use(g=>{Nn(r,p=>{const d=_._api._MagickImage_ReadBlob(g._instance,p,0,r.byteLength,o.ptr);this._setInstance(d,o)})})}toBool(r){return r===1}valueOrDefault(r,e){return r===void 0?e:r}useException(r){return R.use(r,e=>{this.onWarning!==void 0&&this.onWarning(new nn(e))})}useExceptionPointer(r){return R.usePointer(r,e=>{this.onWarning!==void 0&&this.onWarning(new nn(e))})}}var Pa=(()=>{var t=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(r={}){var e=r,o,g;e.ready=new Promise((n,a)=>{o=n,g=a}),(!globalThis.crypto||!globalThis.crypto.getRandomValues)&&(globalThis.crypto={getRandomValues:n=>{for(let a=0;a{throw a},G=typeof window=="object",B=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var N="";function se(n){return e.locateFile?e.locateFile(n,N):N+n}var Ie,Te,He;(G||B)&&(B?N=self.location.href:typeof document<"u"&&document.currentScript&&(N=document.currentScript.src),t&&(N=t),N.indexOf("blob:")!==0?N=N.substr(0,N.replace(/[?#].*/,"").lastIndexOf("/")+1):N="",Ie=n=>{var a=new XMLHttpRequest;return a.open("GET",n,!1),a.send(null),a.responseText},B&&(He=n=>{var a=new XMLHttpRequest;return a.open("GET",n,!1),a.responseType="arraybuffer",a.send(null),new Uint8Array(a.response)}),Te=(n,a,i)=>{var s=new XMLHttpRequest;s.open("GET",n,!0),s.responseType="arraybuffer",s.onload=()=>{if(s.status==200||s.status==0&&s.response){a(s.response);return}i()},s.onerror=i,s.send(null)});var ut=e.print||console.log.bind(console),We=e.printErr||console.error.bind(console);Object.assign(e,p),p=null,e.arguments&&e.arguments,e.thisProgram&&(d=e.thisProgram),e.quit&&(S=e.quit);var ot;e.wasmBinary&&(ot=e.wasmBinary);var Ha=e.noExitRuntime||!0;typeof WebAssembly!="object"&&De("no native wasm support detected");var Tt,on=!1;function Ua(n,a){n||De(a)}var q,ae,_e,_t,P,L,Wt,le,br,Bt;function Gr(){var n=Tt.buffer;e.HEAP8=q=new Int8Array(n),e.HEAP16=_e=new Int16Array(n),e.HEAP32=P=new Int32Array(n),e.HEAPU8=ae=new Uint8Array(n),e.HEAPU16=_t=new Uint16Array(n),e.HEAPU32=L=new Uint32Array(n),e.HEAPF32=Wt=new Float32Array(n),e.HEAPF64=Bt=new Float64Array(n),e.HEAP64=le=new BigInt64Array(n),e.HEAPU64=br=new BigUint64Array(n)}var Ue,Pr=[],Ar=[],Er=[],Fa=0;function xa(){return Ha||Fa>0}function $a(){if(e.preRun)for(typeof e.preRun=="function"&&(e.preRun=[e.preRun]);e.preRun.length;)Xa(e.preRun.shift());ln(Pr)}function Ya(){!e.noFSInit&&!l.init.initialized&&l.init(),l.ignorePermissions=!1,ln(Ar)}function ja(){if(e.postRun)for(typeof e.postRun=="function"&&(e.postRun=[e.postRun]);e.postRun.length;)qa(e.postRun.shift());ln(Er)}function Xa(n){Pr.unshift(n)}function Va(n){Ar.unshift(n)}function qa(n){Er.unshift(n)}var Fe=0,lt=null;function ho(n){return n}function _n(n){Fe++,e.monitorRunDependencies&&e.monitorRunDependencies(Fe)}function Lt(n){if(Fe--,e.monitorRunDependencies&&e.monitorRunDependencies(Fe),Fe==0&<){var a=lt;lt=null,a()}}function De(n){e.onAbort&&e.onAbort(n),n="Aborted("+n+")",We(n),on=!0,n+=". Build with -sASSERTIONS for more info.";var a=new WebAssembly.RuntimeError(n);throw g(a),a}var Qa="data:application/octet-stream;base64,";function Rr(n){return n.startsWith(Qa)}function Cr(n){return n.startsWith("file://")}var Qe;Qe="magick.wasm",Rr(Qe)||(Qe=se(Qe));function Tr(n){try{if(n==Qe&&ot)return new Uint8Array(ot);if(He)return He(n);throw"both async and sync fetching of the wasm failed"}catch(a){De(a)}}function Ja(n){if(!ot&&(G||B)){if(typeof fetch=="function"&&!Cr(n))return fetch(n,{credentials:"same-origin"}).then(a=>{if(!a.ok)throw"failed to load wasm binary file at '"+n+"'";return a.arrayBuffer()}).catch(()=>Tr(n));if(Te)return new Promise((a,i)=>{Te(n,s=>a(new Uint8Array(s)),i)})}return Promise.resolve().then(()=>Tr(n))}function Wr(n,a,i){return Ja(n).then(s=>WebAssembly.instantiate(s,a)).then(s=>s).then(i,s=>{We("failed to asynchronously prepare wasm: "+s),De(s)})}function Ka(n,a,i,s){return!n&&typeof WebAssembly.instantiateStreaming=="function"&&!Rr(a)&&!Cr(a)&&typeof fetch=="function"?fetch(a,{credentials:"same-origin"}).then(u=>{var c=WebAssembly.instantiateStreaming(u,i);return c.then(s,function(m){return We("wasm streaming compile failed: "+m),We("falling back to ArrayBuffer instantiation"),Wr(a,i,s)})}):Wr(a,i,s)}function Za(){var n={a:Nu};function a(s,u){var c=s.exports;return e.asm=c,Tt=e.asm.ab,Gr(),Ue=e.asm.ub,Va(e.asm.bb),Lt(),c}_n();function i(s){a(s.instance)}if(e.instantiateWasm)try{return e.instantiateWasm(n,a)}catch(s){We("Module.instantiateWasm callback failed with error: "+s),g(s)}return Ka(ot,Qe,n,i).catch(g),{}}function Oa(n){this.name="ExitStatus",this.message=`Program terminated with exit(${n})`,this.status=n}var ln=n=>{for(;n.length>0;)n.shift()(e)};function ei(n,a="i8"){switch(a.endsWith("*")&&(a="*"),a){case"i1":return q[n>>>0];case"i8":return q[n>>>0];case"i16":return _e[n>>>1];case"i32":return P[n>>>2];case"i64":return le[n>>3];case"float":return Wt[n>>>2];case"double":return Bt[n>>>3];case"*":return L[n>>>2];default:De(`invalid type for getValue: ${a}`)}}function ti(n,a,i="i8"){switch(i.endsWith("*")&&(i="*"),i){case"i1":q[n>>>0]=a;break;case"i8":q[n>>>0]=a;break;case"i16":_e[n>>>1]=a;break;case"i32":P[n>>>2]=a;break;case"i64":le[n>>3]=BigInt(a);break;case"float":Wt[n>>>2]=a;break;case"double":Bt[n>>>3]=a;break;case"*":L[n>>>2]=a;break;default:De(`invalid type for setValue: ${i}`)}}var ct=[],H=n=>{var a=ct[n];return a||(n>=ct.length&&(ct.length=n+1),ct[n]=a=Ue.get(n)),a},ni=(n,a)=>H(n)(a),Je=0;function Br(n){this.excPtr=n,this.ptr=n-24,this.set_type=function(a){L[this.ptr+4>>>2]=a},this.get_type=function(){return L[this.ptr+4>>>2]},this.set_destructor=function(a){L[this.ptr+8>>>2]=a},this.get_destructor=function(){return L[this.ptr+8>>>2]},this.set_caught=function(a){a=a?1:0,q[this.ptr+12>>>0]=a},this.get_caught=function(){return q[this.ptr+12>>>0]!=0},this.set_rethrown=function(a){a=a?1:0,q[this.ptr+13>>>0]=a},this.get_rethrown=function(){return q[this.ptr+13>>>0]!=0},this.init=function(a,i){this.set_adjusted_ptr(0),this.set_type(a),this.set_destructor(i)},this.set_adjusted_ptr=function(a){L[this.ptr+16>>>2]=a},this.get_adjusted_ptr=function(){return L[this.ptr+16>>>2]},this.get_exception_ptr=function(){var a=ka(this.get_type());if(a)return L[this.excPtr>>>2];var i=this.get_adjusted_ptr();return i!==0?i:this.excPtr}}function ri(n){throw Je||(Je=n),Je}function ai(){var n=Je;if(!n)return Mt(0),0;var a=new Br(n);a.set_adjusted_ptr(n);var i=a.get_type();if(!i)return Mt(0),n;for(var s=0;sn.charAt(0)==="/",splitPath:n=>{var a=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return a.exec(n).slice(1)},normalizeArray:(n,a)=>{for(var i=0,s=n.length-1;s>=0;s--){var u=n[s];u==="."?n.splice(s,1):u===".."?(n.splice(s,1),i++):i&&(n.splice(s,1),i--)}if(a)for(;i;i--)n.unshift("..");return n},normalize:n=>{var a=j.isAbs(n),i=n.substr(-1)==="/";return n=j.normalizeArray(n.split("/").filter(s=>!!s),!a).join("/"),!n&&!a&&(n="."),n&&i&&(n+="/"),(a?"/":"")+n},dirname:n=>{var a=j.splitPath(n),i=a[0],s=a[1];return!i&&!s?".":(s&&(s=s.substr(0,s.length-1)),i+s)},basename:n=>{if(n==="/")return"/";n=j.normalize(n),n=n.replace(/\/$/,"");var a=n.lastIndexOf("/");return a===-1?n:n.substr(a+1)},join:function(){var n=Array.prototype.slice.call(arguments);return j.normalize(n.join("/"))},join2:(n,a)=>j.normalize(n+"/"+a)},ui=()=>{if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return n=>crypto.getRandomValues(n);De("initRandomDevice")},cn=n=>(cn=ui())(n),be={resolve:function(){for(var n="",a=!1,i=arguments.length-1;i>=-1&&!a;i--){var s=i>=0?arguments[i]:l.cwd();if(typeof s!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!s)return"";n=s+"/"+n,a=j.isAbs(s)}return n=j.normalizeArray(n.split("/").filter(u=>!!u),!a).join("/"),(a?"/":"")+n||"."},relative:(n,a)=>{n=be.resolve(n).substr(1),a=be.resolve(a).substr(1);function i(y){for(var v=0;v=0&&y[b]==="";b--);return v>b?[]:y.slice(v,b-v+1)}for(var s=i(n.split("/")),u=i(a.split("/")),c=Math.min(s.length,u.length),m=c,f=0;f{for(var a=0,i=0;i=55296&&s<=57343?(a+=4,++i):a+=3}return a},gn=(n,a,i,s)=>{if(i>>>=0,!(s>0))return 0;for(var u=i,c=i+s-1,m=0;m=55296&&f<=57343){var h=n.charCodeAt(++m);f=65536+((f&1023)<<10)|h&1023}if(f<=127){if(i>=c)break;a[i++>>>0]=f}else if(f<=2047){if(i+1>=c)break;a[i++>>>0]=192|f>>6,a[i++>>>0]=128|f&63}else if(f<=65535){if(i+2>=c)break;a[i++>>>0]=224|f>>12,a[i++>>>0]=128|f>>6&63,a[i++>>>0]=128|f&63}else{if(i+3>=c)break;a[i++>>>0]=240|f>>18,a[i++>>>0]=128|f>>12&63,a[i++>>>0]=128|f>>6&63,a[i++>>>0]=128|f&63}}return a[i>>>0]=0,i-u};function zt(n,a,i){var s=xe(n)+1,u=new Array(s),c=gn(n,u,0,u.length);return a&&(u.length=c),u}var Lr=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Ke=(n,a,i)=>{a>>>=0;for(var s=a+i,u=a;n[u]&&!(u>=s);)++u;if(u-a>16&&n.buffer&&Lr)return Lr.decode(n.subarray(a,u));for(var c="";a>10,56320|y&1023)}}return c},$e={ttys:[],init:function(){},shutdown:function(){},register:function(n,a){$e.ttys[n]={input:[],output:[],ops:a},l.registerDevice(n,$e.stream_ops)},stream_ops:{open:function(n){var a=$e.ttys[n.node.rdev];if(!a)throw new l.ErrnoError(43);n.tty=a,n.seekable=!1},close:function(n){n.tty.ops.fsync(n.tty)},fsync:function(n){n.tty.ops.fsync(n.tty)},read:function(n,a,i,s,u){if(!n.tty||!n.tty.ops.get_char)throw new l.ErrnoError(60);for(var c=0,m=0;m0&&(ut(Ke(n.output,0)),n.output=[])},ioctl_tcgets:function(n){return{c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ioctl_tcsets:function(n,a,i){return 0},ioctl_tiocgwinsz:function(n){return[24,80]}},default_tty1_ops:{put_char:function(n,a){a===null||a===10?(We(Ke(n.output,0)),n.output=[]):a!=0&&n.output.push(a)},fsync:function(n){n.output&&n.output.length>0&&(We(Ke(n.output,0)),n.output=[])}}},oi=(n,a)=>(ae.fill(0,n,n+a),n),_i=(n,a)=>Math.ceil(n/a)*a,zr=n=>{n=_i(n,65536);var a=wa(65536,n);return a?oi(a,n):0},z={ops_table:null,mount:function(n){return z.createNode(null,"/",16895,0)},createNode:function(n,a,i,s){if(l.isBlkdev(i)||l.isFIFO(i))throw new l.ErrnoError(63);z.ops_table||(z.ops_table={dir:{node:{getattr:z.node_ops.getattr,setattr:z.node_ops.setattr,lookup:z.node_ops.lookup,mknod:z.node_ops.mknod,rename:z.node_ops.rename,unlink:z.node_ops.unlink,rmdir:z.node_ops.rmdir,readdir:z.node_ops.readdir,symlink:z.node_ops.symlink},stream:{llseek:z.stream_ops.llseek}},file:{node:{getattr:z.node_ops.getattr,setattr:z.node_ops.setattr},stream:{llseek:z.stream_ops.llseek,read:z.stream_ops.read,write:z.stream_ops.write,allocate:z.stream_ops.allocate,mmap:z.stream_ops.mmap,msync:z.stream_ops.msync}},link:{node:{getattr:z.node_ops.getattr,setattr:z.node_ops.setattr,readlink:z.node_ops.readlink},stream:{}},chrdev:{node:{getattr:z.node_ops.getattr,setattr:z.node_ops.setattr},stream:l.chrdev_stream_ops}});var u=l.createNode(n,a,i,s);return l.isDir(u.mode)?(u.node_ops=z.ops_table.dir.node,u.stream_ops=z.ops_table.dir.stream,u.contents={}):l.isFile(u.mode)?(u.node_ops=z.ops_table.file.node,u.stream_ops=z.ops_table.file.stream,u.usedBytes=0,u.contents=null):l.isLink(u.mode)?(u.node_ops=z.ops_table.link.node,u.stream_ops=z.ops_table.link.stream):l.isChrdev(u.mode)&&(u.node_ops=z.ops_table.chrdev.node,u.stream_ops=z.ops_table.chrdev.stream),u.timestamp=Date.now(),n&&(n.contents[a]=u,n.timestamp=u.timestamp),u},getFileDataAsTypedArray:function(n){return n.contents?n.contents.subarray?n.contents.subarray(0,n.usedBytes):new Uint8Array(n.contents):new Uint8Array(0)},expandFileStorage:function(n,a){a>>>=0;var i=n.contents?n.contents.length:0;if(!(i>=a)){var s=1024*1024;a=Math.max(a,i*(i>>0),i!=0&&(a=Math.max(a,256));var u=n.contents;n.contents=new Uint8Array(a),n.usedBytes>0&&n.contents.set(u.subarray(0,n.usedBytes),0)}},resizeFileStorage:function(n,a){if(a>>>=0,n.usedBytes!=a)if(a==0)n.contents=null,n.usedBytes=0;else{var i=n.contents;n.contents=new Uint8Array(a),i&&n.contents.set(i.subarray(0,Math.min(a,n.usedBytes))),n.usedBytes=a}},node_ops:{getattr:function(n){var a={};return a.dev=l.isChrdev(n.mode)?n.id:1,a.ino=n.id,a.mode=n.mode,a.nlink=1,a.uid=0,a.gid=0,a.rdev=n.rdev,l.isDir(n.mode)?a.size=4096:l.isFile(n.mode)?a.size=n.usedBytes:l.isLink(n.mode)?a.size=n.link.length:a.size=0,a.atime=new Date(n.timestamp),a.mtime=new Date(n.timestamp),a.ctime=new Date(n.timestamp),a.blksize=4096,a.blocks=Math.ceil(a.size/a.blksize),a},setattr:function(n,a){a.mode!==void 0&&(n.mode=a.mode),a.timestamp!==void 0&&(n.timestamp=a.timestamp),a.size!==void 0&&z.resizeFileStorage(n,a.size)},lookup:function(n,a){throw l.genericErrors[44]},mknod:function(n,a,i,s){return z.createNode(n,a,i,s)},rename:function(n,a,i){if(l.isDir(n.mode)){var s;try{s=l.lookupNode(a,i)}catch{}if(s)for(var u in s.contents)throw new l.ErrnoError(55)}delete n.parent.contents[n.name],n.parent.timestamp=Date.now(),n.name=i,a.contents[i]=n,a.timestamp=n.parent.timestamp,n.parent=a},unlink:function(n,a){delete n.contents[a],n.timestamp=Date.now()},rmdir:function(n,a){var i=l.lookupNode(n,a);for(var s in i.contents)throw new l.ErrnoError(55);delete n.contents[a],n.timestamp=Date.now()},readdir:function(n){var a=[".",".."];for(var i in n.contents)n.contents.hasOwnProperty(i)&&a.push(i);return a},symlink:function(n,a,i){var s=z.createNode(n,a,41471,0);return s.link=i,s},readlink:function(n){if(!l.isLink(n.mode))throw new l.ErrnoError(28);return n.link}},stream_ops:{read:function(n,a,i,s,u){var c=n.node.contents;if(u>=n.node.usedBytes)return 0;var m=Math.min(n.node.usedBytes-u,s);if(m>8&&c.subarray)a.set(c.subarray(u,u+m),i);else for(var f=0;f0||i+a>>=0,q.set(f,c>>>0)}return{ptr:c,allocated:m}},msync:function(n,a,i,s,u){return z.stream_ops.write(n,a,0,s,i,!1),0}}},li=(n,a,i,s)=>{var u=`al ${n}`;Te(n,c=>{Ua(c,`Loading data file "${n}" failed (no arrayBuffer).`),a(new Uint8Array(c)),u&&Lt()},c=>{if(i)i();else throw`Loading data file "${n}" failed.`}),u&&_n()},ci=e.preloadPlugins||[];function gi(n,a,i,s){typeof Browser<"u"&&Browser.init();var u=!1;return ci.forEach(function(c){u||c.canHandle(a)&&(c.handle(n,a,i,s),u=!0)}),u}function mi(n,a,i,s,u,c,m,f,h,y){var v=a?be.resolve(j.join2(n,a)):n;function b(I){function D(T){y&&y(),f||l.createDataFile(n,a,T,s,u,h),c&&c(),Lt()}gi(I,v,D,()=>{m&&m(),Lt()})||D(I)}_n(),typeof i=="string"?li(i,I=>b(I),m):b(i)}function fi(n){var a={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},i=a[n];if(typeof i>"u")throw new Error(`Unknown file open mode: ${n}`);return i}function mn(n,a){var i=0;return n&&(i|=365),a&&(i|=146),i}var l={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(n,a={})=>{if(n=be.resolve(n),!n)return{path:"",node:null};var i={follow_mount:!0,recurse_count:0};if(a=Object.assign(i,a),a.recurse_count>8)throw new l.ErrnoError(32);for(var s=n.split("/").filter(b=>!!b),u=l.root,c="/",m=0;m40)throw new l.ErrnoError(32)}}return{path:c,node:u}},getPath:n=>{for(var a;;){if(l.isRoot(n)){var i=n.mount.mountpoint;return a?i[i.length-1]!=="/"?`${i}/${a}`:i+a:i}a=a?`${n.name}/${a}`:n.name,n=n.parent}},hashName:(n,a)=>{for(var i=0,s=0;s>>0)%l.nameTable.length},hashAddNode:n=>{var a=l.hashName(n.parent.id,n.name);n.name_next=l.nameTable[a],l.nameTable[a]=n},hashRemoveNode:n=>{var a=l.hashName(n.parent.id,n.name);if(l.nameTable[a]===n)l.nameTable[a]=n.name_next;else for(var i=l.nameTable[a];i;){if(i.name_next===n){i.name_next=n.name_next;break}i=i.name_next}},lookupNode:(n,a)=>{var i=l.mayLookup(n);if(i)throw new l.ErrnoError(i,n);for(var s=l.hashName(n.id,a),u=l.nameTable[s];u;u=u.name_next){var c=u.name;if(u.parent.id===n.id&&c===a)return u}return l.lookup(n,a)},createNode:(n,a,i,s)=>{var u=new l.FSNode(n,a,i,s);return l.hashAddNode(u),u},destroyNode:n=>{l.hashRemoveNode(n)},isRoot:n=>n===n.parent,isMountpoint:n=>!!n.mounted,isFile:n=>(n&61440)===32768,isDir:n=>(n&61440)===16384,isLink:n=>(n&61440)===40960,isChrdev:n=>(n&61440)===8192,isBlkdev:n=>(n&61440)===24576,isFIFO:n=>(n&61440)===4096,isSocket:n=>(n&49152)===49152,flagsToPermissionString:n=>{var a=["r","w","rw"][n&3];return n&512&&(a+="w"),a},nodePermissions:(n,a)=>l.ignorePermissions?0:a.includes("r")&&!(n.mode&292)||a.includes("w")&&!(n.mode&146)||a.includes("x")&&!(n.mode&73)?2:0,mayLookup:n=>{var a=l.nodePermissions(n,"x");return a||(n.node_ops.lookup?0:2)},mayCreate:(n,a)=>{try{var i=l.lookupNode(n,a);return 20}catch{}return l.nodePermissions(n,"wx")},mayDelete:(n,a,i)=>{var s;try{s=l.lookupNode(n,a)}catch(c){return c.errno}var u=l.nodePermissions(n,"wx");if(u)return u;if(i){if(!l.isDir(s.mode))return 54;if(l.isRoot(s)||l.getPath(s)===l.cwd())return 10}else if(l.isDir(s.mode))return 31;return 0},mayOpen:(n,a)=>n?l.isLink(n.mode)?32:l.isDir(n.mode)&&(l.flagsToPermissionString(a)!=="r"||a&512)?31:l.nodePermissions(n,l.flagsToPermissionString(a)):44,MAX_OPEN_FDS:4096,nextfd:()=>{for(var n=0;n<=l.MAX_OPEN_FDS;n++)if(!l.streams[n])return n;throw new l.ErrnoError(33)},getStreamChecked:n=>{var a=l.getStream(n);if(!a)throw new l.ErrnoError(8);return a},getStream:n=>l.streams[n],createStream:(n,a=-1)=>(l.FSStream||(l.FSStream=function(){this.shared={}},l.FSStream.prototype={},Object.defineProperties(l.FSStream.prototype,{object:{get:function(){return this.node},set:function(i){this.node=i}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}},flags:{get:function(){return this.shared.flags},set:function(i){this.shared.flags=i}},position:{get:function(){return this.shared.position},set:function(i){this.shared.position=i}}})),n=Object.assign(new l.FSStream,n),a==-1&&(a=l.nextfd()),n.fd=a,l.streams[a]=n,n),closeStream:n=>{l.streams[n]=null},chrdev_stream_ops:{open:n=>{var a=l.getDevice(n.node.rdev);n.stream_ops=a.stream_ops,n.stream_ops.open&&n.stream_ops.open(n)},llseek:()=>{throw new l.ErrnoError(70)}},major:n=>n>>8,minor:n=>n&255,makedev:(n,a)=>n<<8|a,registerDevice:(n,a)=>{l.devices[n]={stream_ops:a}},getDevice:n=>l.devices[n],getMounts:n=>{for(var a=[],i=[n];i.length;){var s=i.pop();a.push(s),i.push.apply(i,s.mounts)}return a},syncfs:(n,a)=>{typeof n=="function"&&(a=n,n=!1),l.syncFSRequests++,l.syncFSRequests>1&&We(`warning: ${l.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var i=l.getMounts(l.root.mount),s=0;function u(m){return l.syncFSRequests--,a(m)}function c(m){if(m)return c.errored?void 0:(c.errored=!0,u(m));++s>=i.length&&u(null)}i.forEach(m=>{if(!m.type.syncfs)return c(null);m.type.syncfs(m,n,c)})},mount:(n,a,i)=>{var s=i==="/",u=!i,c;if(s&&l.root)throw new l.ErrnoError(10);if(!s&&!u){var m=l.lookupPath(i,{follow_mount:!1});if(i=m.path,c=m.node,l.isMountpoint(c))throw new l.ErrnoError(10);if(!l.isDir(c.mode))throw new l.ErrnoError(54)}var f={type:n,opts:a,mountpoint:i,mounts:[]},h=n.mount(f);return h.mount=f,f.root=h,s?l.root=h:c&&(c.mounted=f,c.mount&&c.mount.mounts.push(f)),h},unmount:n=>{var a=l.lookupPath(n,{follow_mount:!1});if(!l.isMountpoint(a.node))throw new l.ErrnoError(28);var i=a.node,s=i.mounted,u=l.getMounts(s);Object.keys(l.nameTable).forEach(m=>{for(var f=l.nameTable[m];f;){var h=f.name_next;u.includes(f.mount)&&l.destroyNode(f),f=h}}),i.mounted=null;var c=i.mount.mounts.indexOf(s);i.mount.mounts.splice(c,1)},lookup:(n,a)=>n.node_ops.lookup(n,a),mknod:(n,a,i)=>{var s=l.lookupPath(n,{parent:!0}),u=s.node,c=j.basename(n);if(!c||c==="."||c==="..")throw new l.ErrnoError(28);var m=l.mayCreate(u,c);if(m)throw new l.ErrnoError(m);if(!u.node_ops.mknod)throw new l.ErrnoError(63);return u.node_ops.mknod(u,c,a,i)},create:(n,a)=>(a=a!==void 0?a:438,a&=4095,a|=32768,l.mknod(n,a,0)),mkdir:(n,a)=>(a=a!==void 0?a:511,a&=1023,a|=16384,l.mknod(n,a,0)),mkdirTree:(n,a)=>{for(var i=n.split("/"),s="",u=0;u(typeof i>"u"&&(i=a,a=438),a|=8192,l.mknod(n,a,i)),symlink:(n,a)=>{if(!be.resolve(n))throw new l.ErrnoError(44);var i=l.lookupPath(a,{parent:!0}),s=i.node;if(!s)throw new l.ErrnoError(44);var u=j.basename(a),c=l.mayCreate(s,u);if(c)throw new l.ErrnoError(c);if(!s.node_ops.symlink)throw new l.ErrnoError(63);return s.node_ops.symlink(s,u,n)},rename:(n,a)=>{var i=j.dirname(n),s=j.dirname(a),u=j.basename(n),c=j.basename(a),m,f,h;if(m=l.lookupPath(n,{parent:!0}),f=m.node,m=l.lookupPath(a,{parent:!0}),h=m.node,!f||!h)throw new l.ErrnoError(44);if(f.mount!==h.mount)throw new l.ErrnoError(75);var y=l.lookupNode(f,u),v=be.relative(n,s);if(v.charAt(0)!==".")throw new l.ErrnoError(28);if(v=be.relative(a,i),v.charAt(0)!==".")throw new l.ErrnoError(55);var b;try{b=l.lookupNode(h,c)}catch{}if(y!==b){var I=l.isDir(y.mode),D=l.mayDelete(f,u,I);if(D)throw new l.ErrnoError(D);if(D=b?l.mayDelete(h,c,I):l.mayCreate(h,c),D)throw new l.ErrnoError(D);if(!f.node_ops.rename)throw new l.ErrnoError(63);if(l.isMountpoint(y)||b&&l.isMountpoint(b))throw new l.ErrnoError(10);if(h!==f&&(D=l.nodePermissions(f,"w"),D))throw new l.ErrnoError(D);l.hashRemoveNode(y);try{f.node_ops.rename(y,h,c)}catch(T){throw T}finally{l.hashAddNode(y)}}},rmdir:n=>{var a=l.lookupPath(n,{parent:!0}),i=a.node,s=j.basename(n),u=l.lookupNode(i,s),c=l.mayDelete(i,s,!0);if(c)throw new l.ErrnoError(c);if(!i.node_ops.rmdir)throw new l.ErrnoError(63);if(l.isMountpoint(u))throw new l.ErrnoError(10);i.node_ops.rmdir(i,s),l.destroyNode(u)},readdir:n=>{var a=l.lookupPath(n,{follow:!0}),i=a.node;if(!i.node_ops.readdir)throw new l.ErrnoError(54);return i.node_ops.readdir(i)},unlink:n=>{var a=l.lookupPath(n,{parent:!0}),i=a.node;if(!i)throw new l.ErrnoError(44);var s=j.basename(n),u=l.lookupNode(i,s),c=l.mayDelete(i,s,!1);if(c)throw new l.ErrnoError(c);if(!i.node_ops.unlink)throw new l.ErrnoError(63);if(l.isMountpoint(u))throw new l.ErrnoError(10);i.node_ops.unlink(i,s),l.destroyNode(u)},readlink:n=>{var a=l.lookupPath(n),i=a.node;if(!i)throw new l.ErrnoError(44);if(!i.node_ops.readlink)throw new l.ErrnoError(28);return be.resolve(l.getPath(i.parent),i.node_ops.readlink(i))},stat:(n,a)=>{var i=l.lookupPath(n,{follow:!a}),s=i.node;if(!s)throw new l.ErrnoError(44);if(!s.node_ops.getattr)throw new l.ErrnoError(63);return s.node_ops.getattr(s)},lstat:n=>l.stat(n,!0),chmod:(n,a,i)=>{var s;if(typeof n=="string"){var u=l.lookupPath(n,{follow:!i});s=u.node}else s=n;if(!s.node_ops.setattr)throw new l.ErrnoError(63);s.node_ops.setattr(s,{mode:a&4095|s.mode&-4096,timestamp:Date.now()})},lchmod:(n,a)=>{l.chmod(n,a,!0)},fchmod:(n,a)=>{var i=l.getStreamChecked(n);l.chmod(i.node,a)},chown:(n,a,i,s)=>{var u;if(typeof n=="string"){var c=l.lookupPath(n,{follow:!s});u=c.node}else u=n;if(!u.node_ops.setattr)throw new l.ErrnoError(63);u.node_ops.setattr(u,{timestamp:Date.now()})},lchown:(n,a,i)=>{l.chown(n,a,i,!0)},fchown:(n,a,i)=>{var s=l.getStreamChecked(n);l.chown(s.node,a,i)},truncate:(n,a)=>{if(a<0)throw new l.ErrnoError(28);var i;if(typeof n=="string"){var s=l.lookupPath(n,{follow:!0});i=s.node}else i=n;if(!i.node_ops.setattr)throw new l.ErrnoError(63);if(l.isDir(i.mode))throw new l.ErrnoError(31);if(!l.isFile(i.mode))throw new l.ErrnoError(28);var u=l.nodePermissions(i,"w");if(u)throw new l.ErrnoError(u);i.node_ops.setattr(i,{size:a,timestamp:Date.now()})},ftruncate:(n,a)=>{var i=l.getStreamChecked(n);if(!(i.flags&2097155))throw new l.ErrnoError(28);l.truncate(i.node,a)},utime:(n,a,i)=>{var s=l.lookupPath(n,{follow:!0}),u=s.node;u.node_ops.setattr(u,{timestamp:Math.max(a,i)})},open:(n,a,i)=>{if(n==="")throw new l.ErrnoError(44);a=typeof a=="string"?fi(a):a,i=typeof i>"u"?438:i,a&64?i=i&4095|32768:i=0;var s;if(typeof n=="object")s=n;else{n=j.normalize(n);try{var u=l.lookupPath(n,{follow:!(a&131072)});s=u.node}catch{}}var c=!1;if(a&64)if(s){if(a&128)throw new l.ErrnoError(20)}else s=l.mknod(n,i,0),c=!0;if(!s)throw new l.ErrnoError(44);if(l.isChrdev(s.mode)&&(a&=-513),a&65536&&!l.isDir(s.mode))throw new l.ErrnoError(54);if(!c){var m=l.mayOpen(s,a);if(m)throw new l.ErrnoError(m)}a&512&&!c&&l.truncate(s,0),a&=-131713;var f=l.createStream({node:s,path:l.getPath(s),flags:a,seekable:!0,position:0,stream_ops:s.stream_ops,ungotten:[],error:!1});return f.stream_ops.open&&f.stream_ops.open(f),e.logReadFiles&&!(a&1)&&(l.readFiles||(l.readFiles={}),n in l.readFiles||(l.readFiles[n]=1)),f},close:n=>{if(l.isClosed(n))throw new l.ErrnoError(8);n.getdents&&(n.getdents=null);try{n.stream_ops.close&&n.stream_ops.close(n)}catch(a){throw a}finally{l.closeStream(n.fd)}n.fd=null},isClosed:n=>n.fd===null,llseek:(n,a,i)=>{if(l.isClosed(n))throw new l.ErrnoError(8);if(!n.seekable||!n.stream_ops.llseek)throw new l.ErrnoError(70);if(i!=0&&i!=1&&i!=2)throw new l.ErrnoError(28);return n.position=n.stream_ops.llseek(n,a,i),n.ungotten=[],n.position},read:(n,a,i,s,u)=>{if(i>>>=0,s<0||u<0)throw new l.ErrnoError(28);if(l.isClosed(n))throw new l.ErrnoError(8);if((n.flags&2097155)===1)throw new l.ErrnoError(8);if(l.isDir(n.node.mode))throw new l.ErrnoError(31);if(!n.stream_ops.read)throw new l.ErrnoError(28);var c=typeof u<"u";if(!c)u=n.position;else if(!n.seekable)throw new l.ErrnoError(70);var m=n.stream_ops.read(n,a,i,s,u);return c||(n.position+=m),m},write:(n,a,i,s,u,c)=>{if(i>>>=0,s<0||u<0)throw new l.ErrnoError(28);if(l.isClosed(n))throw new l.ErrnoError(8);if(!(n.flags&2097155))throw new l.ErrnoError(8);if(l.isDir(n.node.mode))throw new l.ErrnoError(31);if(!n.stream_ops.write)throw new l.ErrnoError(28);n.seekable&&n.flags&1024&&l.llseek(n,0,2);var m=typeof u<"u";if(!m)u=n.position;else if(!n.seekable)throw new l.ErrnoError(70);var f=n.stream_ops.write(n,a,i,s,u,c);return m||(n.position+=f),f},allocate:(n,a,i)=>{if(l.isClosed(n))throw new l.ErrnoError(8);if(a<0||i<=0)throw new l.ErrnoError(28);if(!(n.flags&2097155))throw new l.ErrnoError(8);if(!l.isFile(n.node.mode)&&!l.isDir(n.node.mode))throw new l.ErrnoError(43);if(!n.stream_ops.allocate)throw new l.ErrnoError(138);n.stream_ops.allocate(n,a,i)},mmap:(n,a,i,s,u)=>{if(s&2&&!(u&2)&&(n.flags&2097155)!==2)throw new l.ErrnoError(2);if((n.flags&2097155)===1)throw new l.ErrnoError(2);if(!n.stream_ops.mmap)throw new l.ErrnoError(43);return n.stream_ops.mmap(n,a,i,s,u)},msync:(n,a,i,s,u)=>(i>>>=0,n.stream_ops.msync?n.stream_ops.msync(n,a,i,s,u):0),munmap:n=>0,ioctl:(n,a,i)=>{if(!n.stream_ops.ioctl)throw new l.ErrnoError(59);return n.stream_ops.ioctl(n,a,i)},readFile:(n,a={})=>{if(a.flags=a.flags||0,a.encoding=a.encoding||"binary",a.encoding!=="utf8"&&a.encoding!=="binary")throw new Error(`Invalid encoding type "${a.encoding}"`);var i,s=l.open(n,a.flags),u=l.stat(n),c=u.size,m=new Uint8Array(c);return l.read(s,m,0,c,0),a.encoding==="utf8"?i=Ke(m,0):a.encoding==="binary"&&(i=m),l.close(s),i},writeFile:(n,a,i={})=>{i.flags=i.flags||577;var s=l.open(n,i.flags,i.mode);if(typeof a=="string"){var u=new Uint8Array(xe(a)+1),c=gn(a,u,0,u.length);l.write(s,u,0,c,void 0,i.canOwn)}else if(ArrayBuffer.isView(a))l.write(s,a,0,a.byteLength,void 0,i.canOwn);else throw new Error("Unsupported data type");l.close(s)},cwd:()=>l.currentPath,chdir:n=>{var a=l.lookupPath(n,{follow:!0});if(a.node===null)throw new l.ErrnoError(44);if(!l.isDir(a.node.mode))throw new l.ErrnoError(54);var i=l.nodePermissions(a.node,"x");if(i)throw new l.ErrnoError(i);l.currentPath=a.path},createDefaultDirectories:()=>{l.mkdir("/tmp"),l.mkdir("/home"),l.mkdir("/home/web_user")},createDefaultDevices:()=>{l.mkdir("/dev"),l.registerDevice(l.makedev(1,3),{read:()=>0,write:(s,u,c,m,f)=>m}),l.mkdev("/dev/null",l.makedev(1,3)),$e.register(l.makedev(5,0),$e.default_tty_ops),$e.register(l.makedev(6,0),$e.default_tty1_ops),l.mkdev("/dev/tty",l.makedev(5,0)),l.mkdev("/dev/tty1",l.makedev(6,0));var n=new Uint8Array(1024),a=0,i=()=>(a===0&&(a=cn(n).byteLength),n[--a]);l.createDevice("/dev","random",i),l.createDevice("/dev","urandom",i),l.mkdir("/dev/shm"),l.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{l.mkdir("/proc");var n=l.mkdir("/proc/self");l.mkdir("/proc/self/fd"),l.mount({mount:()=>{var a=l.createNode(n,"fd",16895,73);return a.node_ops={lookup:(i,s)=>{var u=+s,c=l.getStreamChecked(u),m={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>c.path}};return m.parent=m,m}},a}},{},"/proc/self/fd")},createStandardStreams:()=>{e.stdin?l.createDevice("/dev","stdin",e.stdin):l.symlink("/dev/tty","/dev/stdin"),e.stdout?l.createDevice("/dev","stdout",null,e.stdout):l.symlink("/dev/tty","/dev/stdout"),e.stderr?l.createDevice("/dev","stderr",null,e.stderr):l.symlink("/dev/tty1","/dev/stderr"),l.open("/dev/stdin",0),l.open("/dev/stdout",1),l.open("/dev/stderr",1)},ensureErrnoError:()=>{l.ErrnoError||(l.ErrnoError=function(a,i){this.name="ErrnoError",this.node=i,this.setErrno=function(s){this.errno=s},this.setErrno(a),this.message="FS error"},l.ErrnoError.prototype=new Error,l.ErrnoError.prototype.constructor=l.ErrnoError,[44].forEach(n=>{l.genericErrors[n]=new l.ErrnoError(n),l.genericErrors[n].stack=""}))},staticInit:()=>{l.ensureErrnoError(),l.nameTable=new Array(4096),l.mount(z,{},"/"),l.createDefaultDirectories(),l.createDefaultDevices(),l.createSpecialDirectories(),l.filesystems={MEMFS:z}},init:(n,a,i)=>{l.init.initialized=!0,l.ensureErrnoError(),e.stdin=n||e.stdin,e.stdout=a||e.stdout,e.stderr=i||e.stderr,l.createStandardStreams()},quit:()=>{l.init.initialized=!1;for(var n=0;n{var i=l.analyzePath(n,a);return i.exists?i.object:null},analyzePath:(n,a)=>{try{var i=l.lookupPath(n,{follow:!a});n=i.path}catch{}var s={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var i=l.lookupPath(n,{parent:!0});s.parentExists=!0,s.parentPath=i.path,s.parentObject=i.node,s.name=j.basename(n),i=l.lookupPath(n,{follow:!a}),s.exists=!0,s.path=i.path,s.object=i.node,s.name=i.node.name,s.isRoot=i.path==="/"}catch(u){s.error=u.errno}return s},createPath:(n,a,i,s)=>{n=typeof n=="string"?n:l.getPath(n);for(var u=a.split("/").reverse();u.length;){var c=u.pop();if(c){var m=j.join2(n,c);try{l.mkdir(m)}catch{}n=m}}return m},createFile:(n,a,i,s,u)=>{var c=j.join2(typeof n=="string"?n:l.getPath(n),a),m=mn(s,u);return l.create(c,m)},createDataFile:(n,a,i,s,u,c)=>{var m=a;n&&(n=typeof n=="string"?n:l.getPath(n),m=a?j.join2(n,a):n);var f=mn(s,u),h=l.create(m,f);if(i){if(typeof i=="string"){for(var y=new Array(i.length),v=0,b=i.length;v{var u=j.join2(typeof n=="string"?n:l.getPath(n),a),c=mn(!!i,!!s);l.createDevice.major||(l.createDevice.major=64);var m=l.makedev(l.createDevice.major++,0);return l.registerDevice(m,{open:f=>{f.seekable=!1},close:f=>{s&&s.buffer&&s.buffer.length&&s(10)},read:(f,h,y,v,b)=>{for(var I=0,D=0;D{for(var I=0;I{if(n.isDevice||n.isFolder||n.link||n.contents)return!0;if(typeof XMLHttpRequest<"u")throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(Ie)try{n.contents=zt(Ie(n.url),!0),n.usedBytes=n.contents.length}catch{throw new l.ErrnoError(29)}else throw new Error("Cannot load without read() or XMLHttpRequest.")},createLazyFile:(n,a,i,s,u)=>{function c(){this.lengthKnown=!1,this.chunks=[]}if(c.prototype.get=function(D){if(!(D>this.length-1||D<0)){var T=D%this.chunkSize,Y=D/this.chunkSize|0;return this.getter(Y)[T]}},c.prototype.setDataGetter=function(D){this.getter=D},c.prototype.cacheLength=function(){var D=new XMLHttpRequest;if(D.open("HEAD",i,!1),D.send(null),!(D.status>=200&&D.status<300||D.status===304))throw new Error("Couldn't load "+i+". Status: "+D.status);var T=Number(D.getResponseHeader("Content-length")),Y,K=(Y=D.getResponseHeader("Accept-Ranges"))&&Y==="bytes",X=(Y=D.getResponseHeader("Content-Encoding"))&&Y==="gzip",M=1024*1024;K||(M=T);var A=(V,ce)=>{if(V>ce)throw new Error("invalid range ("+V+", "+ce+") or no bytes requested!");if(ce>T-1)throw new Error("only "+T+" bytes available! programmer error!");var O=new XMLHttpRequest;if(O.open("GET",i,!1),T!==M&&O.setRequestHeader("Range","bytes="+V+"-"+ce),O.responseType="arraybuffer",O.overrideMimeType&&O.overrideMimeType("text/plain; charset=x-user-defined"),O.send(null),!(O.status>=200&&O.status<300||O.status===304))throw new Error("Couldn't load "+i+". Status: "+O.status);return O.response!==void 0?new Uint8Array(O.response||[]):zt(O.responseText||"",!0)},ee=this;ee.setDataGetter(V=>{var ce=V*M,O=(V+1)*M-1;if(O=Math.min(O,T-1),typeof ee.chunks[V]>"u"&&(ee.chunks[V]=A(ce,O)),typeof ee.chunks[V]>"u")throw new Error("doXHR failed!");return ee.chunks[V]}),(X||!T)&&(M=T=1,T=this.getter(0).length,M=T,ut("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=T,this._chunkSize=M,this.lengthKnown=!0},typeof XMLHttpRequest<"u"){if(!B)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var m=new c;Object.defineProperties(m,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var f={isDevice:!1,contents:m}}else var f={isDevice:!1,url:i};var h=l.createFile(n,a,f,s,u);f.contents?h.contents=f.contents:f.url&&(h.contents=null,h.url=f.url),Object.defineProperties(h,{usedBytes:{get:function(){return this.contents.length}}});var y={},v=Object.keys(h.stream_ops);v.forEach(I=>{var D=h.stream_ops[I];y[I]=function(){return l.forceLoadFile(h),D.apply(null,arguments)}});function b(I,D,T,Y,K){var X=I.node.contents;if(K>=X.length)return 0;var M=Math.min(X.length-K,Y);if(X.slice)for(var A=0;A(l.forceLoadFile(h),b(I,D,T,Y,K)),y.mmap=(I,D,T,Y,K)=>{l.forceLoadFile(h);var X=zr(D);if(!X)throw new l.ErrnoError(48);return b(I,q,X,D,T),{ptr:X,allocated:!0}},h.stream_ops=y,h}},gt=(n,a)=>(n>>>=0,n?Ke(ae,n,a):""),C={DEFAULT_POLLMASK:5,calculateAt:function(n,a,i){if(j.isAbs(a))return a;var s;if(n===-100)s=l.cwd();else{var u=C.getStreamFromFD(n);s=u.path}if(a.length==0){if(!i)throw new l.ErrnoError(44);return s}return j.join2(s,a)},doStat:function(n,a,i){try{var s=n(a)}catch(f){if(f&&f.node&&j.normalize(a)!==j.normalize(l.getPath(f.node)))return-54;throw f}P[i>>>2]=s.dev,P[i+4>>>2]=s.mode,L[i+8>>>2]=s.nlink,P[i+12>>>2]=s.uid,P[i+16>>>2]=s.gid,P[i+20>>>2]=s.rdev,le[i+24>>3]=BigInt(s.size),P[i+32>>>2]=4096,P[i+36>>>2]=s.blocks;var u=s.atime.getTime(),c=s.mtime.getTime(),m=s.ctime.getTime();return le[i+40>>3]=BigInt(Math.floor(u/1e3)),L[i+48>>>2]=u%1e3*1e3,le[i+56>>3]=BigInt(Math.floor(c/1e3)),L[i+64>>>2]=c%1e3*1e3,le[i+72>>3]=BigInt(Math.floor(m/1e3)),L[i+80>>>2]=m%1e3*1e3,le[i+88>>3]=BigInt(s.ino),0},doMsync:function(n,a,i,s,u){if(!l.isFile(a.node.mode))throw new l.ErrnoError(43);if(s&2)return 0;n>>>=0;var c=ae.slice(n,n+i);l.msync(a,c,u,i,s)},varargs:void 0,get:function(){C.varargs+=4;var n=P[C.varargs-4>>>2];return n},getStr:function(n){var a=gt(n);return a},getStreamFromFD:function(n){var a=l.getStreamChecked(n);return a}};function pi(n,a){try{return n=C.getStr(n),l.chmod(n,a),0}catch(i){if(typeof l>"u"||i.name!=="ErrnoError")throw i;return-i.errno}}function di(n,a,i,s){try{if(a=C.getStr(a),a=C.calculateAt(n,a),i&-8)return-28;var u=l.lookupPath(a,{follow:!0}),c=u.node;if(!c)return-44;var m="";return i&4&&(m+="r"),i&2&&(m+="w"),i&1&&(m+="x"),m&&l.nodePermissions(c,m)?-2:0}catch(f){if(typeof l>"u"||f.name!=="ErrnoError")throw f;return-f.errno}}var hi=9007199254740992,yi=-9007199254740992;function Ye(n){return nhi?NaN:Number(n)}function wi(n,a,i,s){try{if(i=Ye(i),isNaN(i)||(s=Ye(s),isNaN(s)))return-61;var u=C.getStreamFromFD(n);return l.allocate(u,i,s),0}catch(c){if(typeof l>"u"||c.name!=="ErrnoError")throw c;return-c.errno}}function Si(n,a){try{return l.fchmod(n,a),0}catch(i){if(typeof l>"u"||i.name!=="ErrnoError")throw i;return-i.errno}}var Nr=n=>(P[ha()>>>2]=n,n);function ki(n,a,i){C.varargs=i;try{var s=C.getStreamFromFD(n);switch(a){case 0:{var u=C.get();if(u<0)return-28;var c;return c=l.createStream(s,u),c.fd}case 1:case 2:return 0;case 3:return s.flags;case 4:{var u=C.get();return s.flags|=u,0}case 5:{var u=C.get(),m=0;return _e[u+m>>>1]=2,0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:return Nr(28),-1;default:return-28}}catch(f){if(typeof l>"u"||f.name!=="ErrnoError")throw f;return-f.errno}}function vi(n,a){try{var i=C.getStreamFromFD(n);return C.doStat(l.stat,i.path,a)}catch(s){if(typeof l>"u"||s.name!=="ErrnoError")throw s;return-s.errno}}var Ze=(n,a,i)=>gn(n,ae,a,i);function Mi(n,a){try{if(a===0)return-28;var i=l.cwd(),s=xe(i)+1;return a"u"||u.name!=="ErrnoError")throw u;return-u.errno}}function Ii(n,a,i){try{var s=C.getStreamFromFD(n);s.getdents||(s.getdents=l.readdir(s.path));for(var u=280,c=0,m=l.llseek(s,0,1),f=Math.floor(m/u);f>3]=BigInt(h),le[a+c+8>>3]=BigInt((f+1)*u),_e[a+c+16>>>1]=280,q[a+c+18>>>0]=y,Ze(v,a+c+19,256),c+=u,f+=1}return l.llseek(s,f*u,0),c}catch(D){if(typeof l>"u"||D.name!=="ErrnoError")throw D;return-D.errno}}function Di(n,a,i){C.varargs=i;try{var s=C.getStreamFromFD(n);switch(a){case 21509:return s.tty?0:-59;case 21505:{if(!s.tty)return-59;if(s.tty.ops.ioctl_tcgets){var u=s.tty.ops.ioctl_tcgets(s),c=C.get();P[c>>>2]=u.c_iflag||0,P[c+4>>>2]=u.c_oflag||0,P[c+8>>>2]=u.c_cflag||0,P[c+12>>>2]=u.c_lflag||0;for(var m=0;m<32;m++)q[c+m+17>>>0]=u.c_cc[m]||0;return 0}return 0}case 21510:case 21511:case 21512:return s.tty?0:-59;case 21506:case 21507:case 21508:{if(!s.tty)return-59;if(s.tty.ops.ioctl_tcsets){for(var c=C.get(),f=P[c>>>2],h=P[c+4>>>2],y=P[c+8>>>2],v=P[c+12>>>2],b=[],m=0;m<32;m++)b.push(q[c+m+17>>>0]);return s.tty.ops.ioctl_tcsets(s.tty,a,{c_iflag:f,c_oflag:h,c_cflag:y,c_lflag:v,c_cc:b})}return 0}case 21519:{if(!s.tty)return-59;var c=C.get();return P[c>>>2]=0,0}case 21520:return s.tty?-28:-59;case 21531:{var c=C.get();return l.ioctl(s,a,c)}case 21523:{if(!s.tty)return-59;if(s.tty.ops.ioctl_tiocgwinsz){var I=s.tty.ops.ioctl_tiocgwinsz(s.tty),c=C.get();_e[c>>>1]=I[0],_e[c+2>>>1]=I[1]}return 0}case 21524:return s.tty?0:-59;case 21515:return s.tty?0:-59;default:return-28}}catch(D){if(typeof l>"u"||D.name!=="ErrnoError")throw D;return-D.errno}}function bi(n,a){try{return n=C.getStr(n),C.doStat(l.lstat,n,a)}catch(i){if(typeof l>"u"||i.name!=="ErrnoError")throw i;return-i.errno}}function Gi(n,a,i,s){try{a=C.getStr(a);var u=s&256,c=s&4096;return s=s&-6401,a=C.calculateAt(n,a,c),C.doStat(u?l.lstat:l.stat,a,i)}catch(m){if(typeof l>"u"||m.name!=="ErrnoError")throw m;return-m.errno}}function Pi(n,a,i,s){C.varargs=s;try{a=C.getStr(a),a=C.calculateAt(n,a);var u=s?C.get():0;return l.open(a,i,u).fd}catch(c){if(typeof l>"u"||c.name!=="ErrnoError")throw c;return-c.errno}}function Ai(n,a,i,s){try{if(a=C.getStr(a),a=C.calculateAt(n,a),s<=0)return-28;var u=l.readlink(a),c=Math.min(s,xe(u)),m=q[i+c>>>0];return Ze(u,i,s+1),q[i+c>>>0]=m,c}catch(f){if(typeof l>"u"||f.name!=="ErrnoError")throw f;return-f.errno}}function Ei(n,a,i,s){try{return a=C.getStr(a),s=C.getStr(s),a=C.calculateAt(n,a),s=C.calculateAt(i,s),l.rename(a,s),0}catch(u){if(typeof l>"u"||u.name!=="ErrnoError")throw u;return-u.errno}}function Ri(n){try{return n=C.getStr(n),l.rmdir(n),0}catch(a){if(typeof l>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}function Ci(n,a){try{return n=C.getStr(n),C.doStat(l.stat,n,a)}catch(i){if(typeof l>"u"||i.name!=="ErrnoError")throw i;return-i.errno}}function Ti(n,a){try{return n=C.getStr(n),a=C.getStr(a),l.symlink(n,a),0}catch(i){if(typeof l>"u"||i.name!=="ErrnoError")throw i;return-i.errno}}function Wi(n,a,i){try{return a=C.getStr(a),a=C.calculateAt(n,a),i===0?l.unlink(a):i===512?l.rmdir(a):De("Invalid flags passed to unlinkat"),0}catch(s){if(typeof l>"u"||s.name!=="ErrnoError")throw s;return-s.errno}}var Nt={};function Hr(n){for(;n.length;){var a=n.pop(),i=n.pop();i(a)}}function mt(n){return this.fromWireType(P[n>>>2])}var Oe={},je={},Ht={},Bi=48,Li=57;function Ut(n){if(n===void 0)return"_unknown";n=n.replace(/[^a-zA-Z0-9_]/g,"$");var a=n.charCodeAt(0);return a>=Bi&&a<=Li?`_${n}`:n}function Ft(n,a){return n=Ut(n),{[n]:function(){return a.apply(this,arguments)}}[n]}function fn(n,a){var i=Ft(a,function(s){this.name=a,this.message=s;var u=new Error(s).stack;u!==void 0&&(this.stack=this.toString()+`
`+u.replace(/^Error(:[^\n]*)?\n/,""))});return i.prototype=Object.create(n.prototype),i.prototype.constructor=i,i.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},i}var Ur=void 0;function xt(n){throw new Ur(n)}function pn(n,a,i){n.forEach(function(f){Ht[f]=a});function s(f){var h=i(f);h.length!==n.length&&xt("Mismatched type converter count");for(var y=0;y{je.hasOwnProperty(f)?u[h]=je[f]:(c.push(f),Oe.hasOwnProperty(f)||(Oe[f]=[]),Oe[f].push(()=>{u[h]=je[f],++m,m===c.length&&s(u)}))}),c.length===0&&s(u)}var zi=function(n){var a=Nt[n];delete Nt[n];var i=a.rawConstructor,s=a.rawDestructor,u=a.fields,c=u.map(m=>m.getterReturnType).concat(u.map(m=>m.setterArgumentType));pn([n],c,m=>{var f={};return u.forEach((h,y)=>{var v=h.fieldName,b=m[y],I=h.getter,D=h.getterContext,T=m[y+u.length],Y=h.setter,K=h.setterContext;f[v]={read:X=>b.fromWireType(I(D,X)),write:(X,M)=>{var A=[];Y(K,X,T.toWireType(A,M)),Hr(A)}}}),[{name:a.name,fromWireType:function(h){var y={};for(var v in f)y[v]=f[v].read(h);return s(h),y},toWireType:function(h,y){for(var v in f)if(!(v in y))throw new TypeError(`Missing field: "${v}"`);var b=i();for(v in f)f[v].write(b,y[v]);return h!==null&&h.push(s,b),b},argPackAdvance:8,readValueFromPointer:mt,destructorFunction:s}]})};function ft(n){if(n===null)return"null";var a=typeof n;return a==="object"||a==="array"||a==="function"?n.toString():""+n}function Ni(){for(var n=new Array(256),a=0;a<256;++a)n[a]=String.fromCharCode(a);Fr=n}var Fr=void 0;function ne(n){for(var a="",i=n;ae[i>>>0];)a+=Fr[ae[i++>>>0]];return a}var pt=void 0;function U(n){throw new pt(n)}function fe(n,a,i={}){if(!("argPackAdvance"in a))throw new TypeError("registerType registeredInstance requires argPackAdvance");var s=a.name;if(n||U(`type "${s}" must have a positive integer typeid pointer`),je.hasOwnProperty(n)){if(i.ignoreDuplicateRegistrations)return;U(`Cannot register type '${s}' twice`)}if(je[n]=a,delete Ht[n],Oe.hasOwnProperty(n)){var u=Oe[n];delete Oe[n],u.forEach(c=>c())}}function xr(n,a,i){switch(a){case 0:return i?function(u){return q[u>>>0]}:function(u){return ae[u>>>0]};case 1:return i?function(u){return _e[u>>>1]}:function(u){return _t[u>>>1]};case 2:return i?function(u){return P[u>>>2]}:function(u){return L[u>>>2]};case 3:return i?function(u){return le[u>>3]}:function(u){return br[u>>3]};default:throw new TypeError("Unknown integer type: "+n)}}function Hi(n,a,i,s,u){a=ne(a);var c=dt(i),m=a.indexOf("u")!=-1;m&&(u=(1n<<64n)-1n),fe(n,{name:a,fromWireType:function(f){return f},toWireType:function(f,h){if(typeof h!="bigint"&&typeof h!="number")throw new TypeError(`Cannot convert "${ft(h)}" to ${this.name}`);if(hu)throw new TypeError(`Passing a number "${ft(h)}" from JS side to C/C++ side to an argument of type "${a}", which is outside the valid range [${s}, ${u}]!`);return h},argPackAdvance:8,readValueFromPointer:xr(a,c,!m),destructorFunction:null})}function dt(n){switch(n){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(`Unknown type size: ${n}`)}}function Ui(n,a,i,s,u){var c=dt(i);a=ne(a),fe(n,{name:a,fromWireType:function(m){return!!m},toWireType:function(m,f){return f?s:u},argPackAdvance:8,readValueFromPointer:function(m){var f;if(i===1)f=q;else if(i===2)f=_e;else if(i===4)f=P;else throw new TypeError("Unknown boolean type size: "+a);return this.fromWireType(f[m>>>c])},destructorFunction:null})}function Fi(n){if(!(this instanceof Be)||!(n instanceof Be))return!1;for(var a=this.$$.ptrType.registeredClass,i=this.$$.ptr,s=n.$$.ptrType.registeredClass,u=n.$$.ptr;a.baseClass;)i=a.upcast(i),a=a.baseClass;for(;s.baseClass;)u=s.upcast(u),s=s.baseClass;return a===s&&i===u}function xi(n){return{count:n.count,deleteScheduled:n.deleteScheduled,preservePointerOnDelete:n.preservePointerOnDelete,ptr:n.ptr,ptrType:n.ptrType,smartPtr:n.smartPtr,smartPtrType:n.smartPtrType}}function dn(n){function a(i){return i.$$.ptrType.registeredClass.name}U(a(n)+" instance already deleted")}var hn=!1;function $r(n){}function $i(n){n.smartPtr?n.smartPtrType.rawDestructor(n.smartPtr):n.ptrType.registeredClass.rawDestructor(n.ptr)}function Yr(n){n.count.value-=1;var a=n.count.value===0;a&&$i(n)}function jr(n,a,i){if(a===i)return n;if(i.baseClass===void 0)return null;var s=jr(n,a,i.baseClass);return s===null?null:i.downcast(s)}var Xr={};function Yi(){return Object.keys(wt).length}function ji(){var n=[];for(var a in wt)wt.hasOwnProperty(a)&&n.push(wt[a]);return n}var ht=[];function yn(){for(;ht.length;){var n=ht.pop();n.$$.deleteScheduled=!1,n.delete()}}var yt=void 0;function Xi(n){yt=n,ht.length&&yt&&yt(yn)}function Vi(){e.getInheritedInstanceCount=Yi,e.getLiveInheritedInstances=ji,e.flushPendingDeletes=yn,e.setDelayFunction=Xi}var wt={};function qi(n,a){for(a===void 0&&U("ptr should not be undefined");n.baseClass;)a=n.upcast(a),n=n.baseClass;return a}function Qi(n,a){return a=qi(n,a),wt[a]}function $t(n,a){(!a.ptrType||!a.ptr)&&xt("makeClassHandle requires ptr and ptrType");var i=!!a.smartPtrType,s=!!a.smartPtr;return i!==s&&xt("Both smartPtrType and smartPtr must be specified"),a.count={value:1},St(Object.create(n,{$$:{value:a}}))}function Ji(n){var a=this.getPointee(n);if(!a)return this.destructor(n),null;var i=Qi(this.registeredClass,a);if(i!==void 0){if(i.$$.count.value===0)return i.$$.ptr=a,i.$$.smartPtr=n,i.clone();var s=i.clone();return this.destructor(n),s}function u(){return this.isSmartPointer?$t(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:a,smartPtrType:this,smartPtr:n}):$t(this.registeredClass.instancePrototype,{ptrType:this,ptr:n})}var c=this.registeredClass.getActualType(a),m=Xr[c];if(!m)return u.call(this);var f;this.isConst?f=m.constPointerType:f=m.pointerType;var h=jr(a,this.registeredClass,f.registeredClass);return h===null?u.call(this):this.isSmartPointer?$t(f.registeredClass.instancePrototype,{ptrType:f,ptr:h,smartPtrType:this,smartPtr:n}):$t(f.registeredClass.instancePrototype,{ptrType:f,ptr:h})}var St=function(n){return typeof FinalizationRegistry>"u"?(St=a=>a,n):(hn=new FinalizationRegistry(a=>{Yr(a.$$)}),St=a=>{var i=a.$$,s=!!i.smartPtr;if(s){var u={$$:i};hn.register(a,u,a)}return a},$r=a=>hn.unregister(a),St(n))};function Ki(){if(this.$$.ptr||dn(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var n=St(Object.create(Object.getPrototypeOf(this),{$$:{value:xi(this.$$)}}));return n.$$.count.value+=1,n.$$.deleteScheduled=!1,n}function Zi(){this.$$.ptr||dn(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&U("Object already scheduled for deletion"),$r(this),Yr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Oi(){return!this.$$.ptr}function es(){return this.$$.ptr||dn(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&U("Object already scheduled for deletion"),ht.push(this),ht.length===1&&yt&&yt(yn),this.$$.deleteScheduled=!0,this}function ts(){Be.prototype.isAliasOf=Fi,Be.prototype.clone=Ki,Be.prototype.delete=Zi,Be.prototype.isDeleted=Oi,Be.prototype.deleteLater=es}function Be(){}function ns(n,a,i){if(n[a].overloadTable===void 0){var s=n[a];n[a]=function(){return n[a].overloadTable.hasOwnProperty(arguments.length)||U(`Function '${i}' called with an invalid number of arguments (${arguments.length}) - expects one of (${n[a].overloadTable})!`),n[a].overloadTable[arguments.length].apply(this,arguments)},n[a].overloadTable=[],n[a].overloadTable[s.argCount]=s}}function wn(n,a,i){e.hasOwnProperty(n)?((i===void 0||e[n].overloadTable!==void 0&&e[n].overloadTable[i]!==void 0)&&U(`Cannot register public name '${n}' twice`),ns(e,n,n),e.hasOwnProperty(i)&&U(`Cannot register multiple overloads of a function with the same number of arguments (${i})!`),e[n].overloadTable[i]=a):(e[n]=a,i!==void 0&&(e[n].numArguments=i))}function rs(n,a,i,s,u,c,m,f){this.name=n,this.constructor=a,this.instancePrototype=i,this.rawDestructor=s,this.baseClass=u,this.getActualType=c,this.upcast=m,this.downcast=f,this.pureVirtualFunctions=[]}function Sn(n,a,i){for(;a!==i;)a.upcast||U(`Expected null or instance of ${i.name}, got an instance of ${a.name}`),n=a.upcast(n),a=a.baseClass;return n}function as(n,a){if(a===null)return this.isReference&&U(`null is not a valid ${this.name}`),0;a.$$||U(`Cannot pass "${ft(a)}" as a ${this.name}`),a.$$.ptr||U(`Cannot pass deleted object as a pointer of type ${this.name}`);var i=a.$$.ptrType.registeredClass,s=Sn(a.$$.ptr,i,this.registeredClass);return s}function is(n,a){var i;if(a===null)return this.isReference&&U(`null is not a valid ${this.name}`),this.isSmartPointer?(i=this.rawConstructor(),n!==null&&n.push(this.rawDestructor,i),i):0;a.$$||U(`Cannot pass "${ft(a)}" as a ${this.name}`),a.$$.ptr||U(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&a.$$.ptrType.isConst&&U(`Cannot convert argument of type ${a.$$.smartPtrType?a.$$.smartPtrType.name:a.$$.ptrType.name} to parameter type ${this.name}`);var s=a.$$.ptrType.registeredClass;if(i=Sn(a.$$.ptr,s,this.registeredClass),this.isSmartPointer)switch(a.$$.smartPtr===void 0&&U("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:a.$$.smartPtrType===this?i=a.$$.smartPtr:U(`Cannot convert argument of type ${a.$$.smartPtrType?a.$$.smartPtrType.name:a.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:i=a.$$.smartPtr;break;case 2:if(a.$$.smartPtrType===this)i=a.$$.smartPtr;else{var u=a.clone();i=this.rawShare(i,pe.toHandle(function(){u.delete()})),n!==null&&n.push(this.rawDestructor,i)}break;default:U("Unsupporting sharing policy")}return i}function ss(n,a){if(a===null)return this.isReference&&U(`null is not a valid ${this.name}`),0;a.$$||U(`Cannot pass "${ft(a)}" as a ${this.name}`),a.$$.ptr||U(`Cannot pass deleted object as a pointer of type ${this.name}`),a.$$.ptrType.isConst&&U(`Cannot convert argument of type ${a.$$.ptrType.name} to parameter type ${this.name}`);var i=a.$$.ptrType.registeredClass,s=Sn(a.$$.ptr,i,this.registeredClass);return s}function us(n){return this.rawGetPointee&&(n=this.rawGetPointee(n)),n}function os(n){this.rawDestructor&&this.rawDestructor(n)}function _s(n){n!==null&&n.delete()}function ls(){Ge.prototype.getPointee=us,Ge.prototype.destructor=os,Ge.prototype.argPackAdvance=8,Ge.prototype.readValueFromPointer=mt,Ge.prototype.deleteObject=_s,Ge.prototype.fromWireType=Ji}function Ge(n,a,i,s,u,c,m,f,h,y,v){this.name=n,this.registeredClass=a,this.isReference=i,this.isConst=s,this.isSmartPointer=u,this.pointeeType=c,this.sharingPolicy=m,this.rawGetPointee=f,this.rawConstructor=h,this.rawShare=y,this.rawDestructor=v,!u&&a.baseClass===void 0?s?(this.toWireType=as,this.destructorFunction=null):(this.toWireType=ss,this.destructorFunction=null):this.toWireType=is}function Vr(n,a,i){e.hasOwnProperty(n)||xt("Replacing nonexistant public symbol"),e[n].overloadTable!==void 0&&i!==void 0?e[n].overloadTable[i]=a:(e[n]=a,e[n].argCount=i)}function Pe(n,a){n=ne(n);function i(){return H(a)}var s=i();return typeof s!="function"&&U(`unknown function pointer with signature ${n}: ${a}`),s}var qr=void 0;function Qr(n){var a=ya(n),i=ne(a);return Ae(a),i}function Jr(n,a){var i=[],s={};function u(c){if(!s[c]&&!je[c]){if(Ht[c]){Ht[c].forEach(u);return}i.push(c),s[c]=!0}}throw a.forEach(u),new qr(`${n}: `+i.map(Qr).join([", "]))}function cs(n,a,i,s,u,c,m,f,h,y,v,b,I){v=ne(v),c=Pe(u,c),f&&(f=Pe(m,f)),y&&(y=Pe(h,y)),I=Pe(b,I);var D=Ut(v);wn(D,function(){Jr(`Cannot construct ${v} due to unbound types`,[s])}),pn([n,a,i],s?[s]:[],function(T){T=T[0];var Y,K;s?(Y=T.registeredClass,K=Y.instancePrototype):K=Be.prototype;var X=Ft(D,function(){if(Object.getPrototypeOf(this)!==M)throw new pt("Use 'new' to construct "+v);if(A.constructor_body===void 0)throw new pt(v+" has no accessible constructor");var O=A.constructor_body[arguments.length];if(O===void 0)throw new pt(`Tried to invoke ctor of ${v} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(A.constructor_body).toString()}) parameters instead!`);return O.apply(this,arguments)}),M=Object.create(K,{constructor:{value:X}});X.prototype=M;var A=new rs(v,X,M,I,Y,c,f,y);A.baseClass&&(A.baseClass.__derivedClasses===void 0&&(A.baseClass.__derivedClasses=[]),A.baseClass.__derivedClasses.push(A));var ee=new Ge(v,A,!0,!1,!1),V=new Ge(v+"*",A,!1,!1,!1),ce=new Ge(v+" const*",A,!1,!0,!1);return Xr[n]={pointerType:V,constPointerType:ce},Vr(D,X),[ee,V,ce]})}function gs(){this.allocated=[void 0],this.freelist=[],this.get=function(n){return this.allocated[n]},this.has=function(n){return this.allocated[n]!==void 0},this.allocate=function(n){var a=this.freelist.pop()||this.allocated.length;return this.allocated[a]=n,a},this.free=function(n){this.allocated[n]=void 0,this.freelist.push(n)}}var me=new gs;function Kr(n){n>=me.reserved&&--me.get(n).refcount===0&&me.free(n)}function ms(){for(var n=0,a=me.reserved;a(n||U("Cannot use deleted val. handle = "+n),me.get(n).value),toHandle:n=>{switch(n){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return me.allocate({refcount:1,value:n})}}};function ps(n,a){a=ne(a),fe(n,{name:a,fromWireType:function(i){var s=pe.toValue(i);return Kr(i),s},toWireType:function(i,s){return pe.toHandle(s)},argPackAdvance:8,readValueFromPointer:mt,destructorFunction:null})}function ds(n,a,i){switch(a){case 0:return function(s){var u=i?q:ae;return this.fromWireType(u[s>>>0])};case 1:return function(s){var u=i?_e:_t;return this.fromWireType(u[s>>>1])};case 2:return function(s){var u=i?P:L;return this.fromWireType(u[s>>>2])};default:throw new TypeError("Unknown integer type: "+n)}}function hs(n,a,i,s){var u=dt(i);a=ne(a);function c(){}c.values={},fe(n,{name:a,constructor:c,fromWireType:function(m){return this.constructor.values[m]},toWireType:function(m,f){return f.value},argPackAdvance:8,readValueFromPointer:ds(a,u,s),destructorFunction:null}),wn(a,c)}function kn(n,a){var i=je[n];return i===void 0&&U(a+" has unknown type "+Qr(n)),i}function ys(n,a,i){var s=kn(n,"enum");a=ne(a);var u=s.constructor,c=Object.create(s.constructor.prototype,{value:{value:i},constructor:{value:Ft(`${s.name}_${a}`,function(){})}});u.values[i]=c,u[a]=c}function ws(n,a){switch(a){case 2:return function(i){return this.fromWireType(Wt[i>>>2])};case 3:return function(i){return this.fromWireType(Bt[i>>>3])};default:throw new TypeError("Unknown float type: "+n)}}function Ss(n,a,i){var s=dt(i);a=ne(a),fe(n,{name:a,fromWireType:function(u){return u},toWireType:function(u,c){return c},argPackAdvance:8,readValueFromPointer:ws(a,s),destructorFunction:null})}function Zr(n,a){if(!(n instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof n} which is not a function`);var i=Ft(n.name||"unknownFunctionName",function(){});i.prototype=n.prototype;var s=new i,u=n.apply(s,a);return u instanceof Object?u:s}function ks(n,a,i,s,u,c){var m=a.length;m<2&&U("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var f=a[1]!==null&&i!==null,h=!1,y=1;y0?", ":"")+I),D+=(v||c?"var rv = ":"")+"invoker(fn"+(I.length>0?", ":"")+I+`);
`,h)D+=`runDestructors(destructors);
`;else for(var y=f?1:2;y>>2]);return i}function Ms(n,a,i,s,u,c,m){var f=vs(a,i);n=ne(n),u=Pe(s,u),wn(n,function(){Jr(`Cannot call ${n} due to unbound types`,f)},a-1),pn([],f,function(h){var y=[h[0],null].concat(h.slice(1));return Vr(n,ks(n,y,null,u,c,m),a-1),[]})}function Is(n,a,i,s,u){a=ne(a);var c=dt(i),m=b=>b;if(s===0){var f=32-8*i;m=b=>b<>>f}var h=a.includes("unsigned"),y=(b,I)=>{},v;h?v=function(b,I){return y(I,this.name),I>>>0}:v=function(b,I){return y(I,this.name),I},fe(n,{name:a,fromWireType:m,toWireType:v,argPackAdvance:8,readValueFromPointer:xr(a,c,s!==0),destructorFunction:null})}function Ds(n,a,i){var s=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array],u=s[a];function c(m){m=m>>2;var f=L,h=f[m>>>0],y=f[m+1>>>0];return new u(f.buffer,y,h)}i=ne(i),fe(n,{name:i,fromWireType:c,argPackAdvance:8,readValueFromPointer:c},{ignoreDuplicateRegistrations:!0})}function bs(n,a){a=ne(a);var i=a==="std::string";fe(n,{name:a,fromWireType:function(s){var u=L[s>>>2],c=s+4,m;if(i)for(var f=c,h=0;h<=u;++h){var y=c+h;if(h==u||ae[y>>>0]==0){var v=y-f,b=gt(f,v);m===void 0?m=b:(m+="\0",m+=b),f=y+1}}else{for(var I=new Array(u),h=0;h>>0]);m=I.join("")}return Ae(s),m},toWireType:function(s,u){u instanceof ArrayBuffer&&(u=new Uint8Array(u));var c,m=typeof u=="string";m||u instanceof Uint8Array||u instanceof Uint8ClampedArray||u instanceof Int8Array||U("Cannot pass non-string to std::string"),i&&m?c=xe(u):c=u.length;var f=Xt(4+c+1),h=f+4;if(h>>>=0,L[f>>>2]=c,i&&m)Ze(u,h,c+1);else if(m)for(var y=0;y255&&(Ae(h),U("String has UTF-16 code units that do not fit in 8 bits")),ae[h+y>>>0]=v}else for(var y=0;y>>0]=u[y];return s!==null&&s.push(Ae,f),f},argPackAdvance:8,readValueFromPointer:mt,destructorFunction:function(s){Ae(s)}})}var Or=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Gs=(n,a)=>{for(var i=n,s=i>>1,u=s+a/2;!(s>=u)&&_t[s>>>0];)++s;if(i=s<<1,i-n>32&&Or)return Or.decode(ae.subarray(n>>>0,i>>>0));for(var c="",m=0;!(m>=a/2);++m){var f=_e[n+m*2>>>1];if(f==0)break;c+=String.fromCharCode(f)}return c},Ps=(n,a,i)=>{if(i===void 0&&(i=2147483647),i<2)return 0;i-=2;for(var s=a,u=i>>1]=m,a+=2}return _e[a>>>1]=0,a-s},As=n=>n.length*2,Es=(n,a)=>{for(var i=0,s="";!(i>=a/4);){var u=P[n+i*4>>>2];if(u==0)break;if(++i,u>=65536){var c=u-65536;s+=String.fromCharCode(55296|c>>10,56320|c&1023)}else s+=String.fromCharCode(u)}return s},Rs=(n,a,i)=>{if(a>>>=0,i===void 0&&(i=2147483647),i<4)return 0;for(var s=a,u=s+i-4,c=0;c=55296&&m<=57343){var f=n.charCodeAt(++c);m=65536+((m&1023)<<10)|f&1023}if(P[a>>>2]=m,a+=4,a+4>u)break}return P[a>>>2]=0,a-s},Cs=n=>{for(var a=0,i=0;i=55296&&s<=57343&&++i,a+=4}return a},Ts=function(n,a,i){i=ne(i);var s,u,c,m,f;a===2?(s=Gs,u=Ps,m=As,c=()=>_t,f=1):a===4&&(s=Es,u=Rs,m=Cs,c=()=>L,f=2),fe(n,{name:i,fromWireType:function(h){for(var y=L[h>>>2],v=c(),b,I=h+4,D=0;D<=y;++D){var T=h+4+D*a;if(D==y||v[T>>>f]==0){var Y=T-I,K=s(I,Y);b===void 0?b=K:(b+="\0",b+=K),I=T+a}}return Ae(h),b},toWireType:function(h,y){typeof y!="string"&&U(`Cannot pass non-string to C++ string type ${i}`);var v=m(y),b=Xt(4+v+a);return b>>>=0,L[b>>>2]=v>>f,u(y,b+4,v+a),h!==null&&h.push(Ae,b),b},argPackAdvance:8,readValueFromPointer:mt,destructorFunction:function(h){Ae(h)}})};function Ws(n,a,i,s,u,c){Nt[n]={name:ne(a),rawConstructor:Pe(i,s),rawDestructor:Pe(u,c),fields:[]}}function Bs(n,a,i,s,u,c,m,f,h,y){Nt[n].fields.push({fieldName:ne(a),getterReturnType:i,getter:Pe(s,u),getterContext:c,setterArgumentType:m,setter:Pe(f,h),setterContext:y})}function Ls(n,a){a=ne(a),fe(n,{isVoid:!0,name:a,argPackAdvance:0,fromWireType:function(){},toWireType:function(i,s){}})}var zs=!0,Ns=()=>zs,Hs=()=>{throw 1/0},Us={};function ea(n){var a=Us[n];return a===void 0?ne(n):a}var vn=[];function Fs(n,a,i,s){n=vn[n],a=pe.toValue(a),i=ea(i),n(a,i,null,s)}function xs(n){var a=vn.length;return vn.push(n),a}function $s(n,a){for(var i=new Array(n),s=0;s>>2],"parameter "+s);return i}var ta=[];function Ys(n,a){var i=$s(n,a),s=i[0],u=s.name+"_$"+i.slice(1).map(function(T){return T.name}).join("_")+"$",c=ta[u];if(c!==void 0)return c;for(var m=["retType"],f=[s],h="",y=0;y4&&(me.get(n).refcount+=1)}function Xs(){return pe.toHandle([])}function Vs(n){return pe.toHandle(ea(n))}function qs(){return pe.toHandle({})}function Qs(n,a,i){n=pe.toValue(n),a=pe.toValue(a),i=pe.toValue(i),n[a]=i}function Js(n,a){n=kn(n,"_emval_take_value");var i=n.readValueFromPointer(a);return pe.toHandle(i)}function na(n){return L[n>>>2]+P[n+4>>>2]*4294967296}var Ks=(n,a)=>{var i=new Date(na(n)*1e3);P[a>>>2]=i.getUTCSeconds(),P[a+4>>>2]=i.getUTCMinutes(),P[a+8>>>2]=i.getUTCHours(),P[a+12>>>2]=i.getUTCDate(),P[a+16>>>2]=i.getUTCMonth(),P[a+20>>>2]=i.getUTCFullYear()-1900,P[a+24>>>2]=i.getUTCDay();var s=Date.UTC(i.getUTCFullYear(),0,1,0,0,0,0),u=(i.getTime()-s)/(1e3*60*60*24)|0;P[a+28>>>2]=u},kt=n=>n%4===0&&(n%100!==0||n%400===0),Zs=[0,31,60,91,121,152,182,213,244,274,305,335],Os=[0,31,59,90,120,151,181,212,243,273,304,334],ra=n=>{var a=kt(n.getFullYear()),i=a?Zs:Os,s=i[n.getMonth()]+n.getDate()-1;return s},eu=(n,a)=>{var i=new Date(na(n)*1e3);P[a>>>2]=i.getSeconds(),P[a+4>>>2]=i.getMinutes(),P[a+8>>>2]=i.getHours(),P[a+12>>>2]=i.getDate(),P[a+16>>>2]=i.getMonth(),P[a+20>>>2]=i.getFullYear()-1900,P[a+24>>>2]=i.getDay();var s=ra(i)|0;P[a+28>>>2]=s,P[a+36>>>2]=-(i.getTimezoneOffset()*60);var u=new Date(i.getFullYear(),0,1),c=new Date(i.getFullYear(),6,1).getTimezoneOffset(),m=u.getTimezoneOffset(),f=(c!=m&&i.getTimezoneOffset()==Math.min(m,c))|0;P[a+32>>>2]=f},tu=n=>{var a=new Date(P[n+20>>>2]+1900,P[n+16>>>2],P[n+12>>>2],P[n+8>>>2],P[n+4>>>2],P[n>>>2],0),i=P[n+32>>>2],s=a.getTimezoneOffset(),u=new Date(a.getFullYear(),0,1),c=new Date(a.getFullYear(),6,1).getTimezoneOffset(),m=u.getTimezoneOffset(),f=Math.min(m,c);if(i<0)P[n+32>>>2]=+(c!=m&&f==s);else if(i>0!=(f==s)){var h=Math.max(m,c),y=i>0?f:h;a.setTime(a.getTime()+(y-s)*6e4)}P[n+24>>>2]=a.getDay();var v=ra(a)|0;return P[n+28>>>2]=v,P[n>>>2]=a.getSeconds(),P[n+4>>>2]=a.getMinutes(),P[n+8>>>2]=a.getHours(),P[n+12>>>2]=a.getDate(),P[n+16>>>2]=a.getMonth(),P[n+20>>>2]=a.getYear(),a.getTime()/1e3|0};function nu(n,a,i,s,u,c,m){try{if(u=Ye(u),isNaN(u))return-61;var f=C.getStreamFromFD(s),h=l.mmap(f,n,u,a,i),y=h.ptr;return P[c>>>2]=h.allocated,y>>>=0,L[m>>>2]=y,0}catch(v){if(typeof l>"u"||v.name!=="ErrnoError")throw v;return-v.errno}}function ru(n,a,i,s,u,c){try{if(c=Ye(c),isNaN(c))return-61;var m=C.getStreamFromFD(u);i&2&&C.doMsync(n,m,a,s,c),l.munmap(m)}catch(f){if(typeof l>"u"||f.name!=="ErrnoError")throw f;return-f.errno}}var aa=n=>{var a=xe(n)+1,i=Xt(a);return i&&Ze(n,i,a),i},au=(n,a,i)=>{var s=new Date().getFullYear(),u=new Date(s,0,1),c=new Date(s,6,1),m=u.getTimezoneOffset(),f=c.getTimezoneOffset(),h=Math.max(m,f);L[n>>>2]=h*60,P[a>>>2]=+(m!=f);function y(T){var Y=T.toTimeString().match(/\(([A-Za-z ]+)\)$/);return Y?Y[1]:"GMT"}var v=y(u),b=y(c),I=aa(v),D=aa(b);f>>2]=I,L[i+4>>>2]=D):(L[i>>>2]=D,L[i+4>>>2]=I)},iu=()=>{De("")};function su(){return Date.now()}var ia=()=>4294901760,uu=()=>ia(),sa;sa=()=>performance.now();var ou=(n,a,i)=>ae.copyWithin(n>>>0,a>>>0,a+i>>>0),_u=n=>{var a=Tt.buffer,i=n-a.byteLength+65535>>>16;try{return Tt.grow(i),Gr(),1}catch{}},lu=n=>{var a=ae.length;n=n>>>0;var i=ia();if(n>i)return!1;for(var s=(h,y)=>h+(y-h%y)%y,u=1;u<=4;u*=2){var c=a*(1+.2/u);c=Math.min(c,n+100663296);var m=Math.min(i,s(Math.max(n,c),65536)),f=_u(m);if(f)return!0}return!1},Mn={},cu=()=>d||"./this.program",vt=()=>{if(!vt.strings){var n=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:n,_:cu()};for(var i in Mn)Mn[i]===void 0?delete a[i]:a[i]=Mn[i];var s=[];for(var i in a)s.push(`${i}=${a[i]}`);vt.strings=s}return vt.strings},gu=(n,a)=>{for(var i=0;i>>0]=n.charCodeAt(i);q[a>>>0]=0},mu=(n,a)=>{var i=0;return vt().forEach(function(s,u){var c=a+i;L[n+u*4>>>2]=c,gu(s,c),i+=s.length+1}),0},fu=(n,a)=>{var i=vt();L[n>>>2]=i.length;var s=0;return i.forEach(function(u){s+=u.length+1}),L[a>>>2]=s,0},ua=n=>{xa()||(e.onExit&&e.onExit(n),on=!0),S(n,new Oa(n))},pu=(n,a)=>{ua(n)},du=pu;function hu(n){try{var a=C.getStreamFromFD(n);return l.close(a),0}catch(i){if(typeof l>"u"||i.name!=="ErrnoError")throw i;return i.errno}}function yu(n,a){try{var i=0,s=0,u=0,c=C.getStreamFromFD(n),m=c.tty?2:l.isDir(c.mode)?3:l.isLink(c.mode)?7:4;return q[a>>>0]=m,_e[a+2>>>1]=u,le[a+8>>3]=BigInt(i),le[a+16>>3]=BigInt(s),0}catch(f){if(typeof l>"u"||f.name!=="ErrnoError")throw f;return f.errno}}var oa=(n,a,i,s)=>{for(var u=0,c=0;c>>2],f=L[a+4>>>2];a+=8;var h=l.read(n,q,m,f,s);if(h<0)return-1;if(u+=h,h>>2]=m,0}catch(f){if(typeof l>"u"||f.name!=="ErrnoError")throw f;return f.errno}}var _a=(n,a,i,s)=>{for(var u=0,c=0;c>>2],f=L[a+4>>>2];a+=8;var h=l.write(n,q,m,f,s);if(h<0)return-1;u+=h,typeof s<"u"&&(s+=h)}return u};function Su(n,a,i,s,u){try{if(s=Ye(s),isNaN(s))return 61;var c=C.getStreamFromFD(n),m=_a(c,a,i,s);return L[u>>>2]=m,0}catch(f){if(typeof l>"u"||f.name!=="ErrnoError")throw f;return f.errno}}function ku(n,a,i,s){try{var u=C.getStreamFromFD(n),c=oa(u,a,i);return L[s>>>2]=c,0}catch(m){if(typeof l>"u"||m.name!=="ErrnoError")throw m;return m.errno}}function vu(n,a,i,s){try{if(a=Ye(a),isNaN(a))return 61;var u=C.getStreamFromFD(n);return l.llseek(u,a,i),le[s>>3]=BigInt(u.position),u.getdents&&a===0&&i===0&&(u.getdents=null),0}catch(c){if(typeof l>"u"||c.name!=="ErrnoError")throw c;return c.errno}}function Mu(n){try{var a=C.getStreamFromFD(n);return a.stream_ops&&a.stream_ops.fsync?a.stream_ops.fsync(a):0}catch(i){if(typeof l>"u"||i.name!=="ErrnoError")throw i;return i.errno}}function Iu(n,a,i,s){try{var u=C.getStreamFromFD(n),c=_a(u,a,i);return L[s>>>2]=c,0}catch(m){if(typeof l>"u"||m.name!=="ErrnoError")throw m;return m.errno}}var Du=(n,a)=>(cn(ae.subarray(n>>>0,n+a>>>0)),0),bu=(n,a)=>{for(var i=0,s=0;s<=a;i+=n[s++]);return i},la=[31,29,31,30,31,30,31,31,30,31,30,31],ca=[31,28,31,30,31,30,31,31,30,31,30,31],Gu=(n,a)=>{for(var i=new Date(n.getTime());a>0;){var s=kt(i.getFullYear()),u=i.getMonth(),c=(s?la:ca)[u];if(a>c-i.getDate())a-=c-i.getDate()+1,i.setDate(1),u<11?i.setMonth(u+1):(i.setMonth(0),i.setFullYear(i.getFullYear()+1));else return i.setDate(i.getDate()+a),i}return i},Pu=(n,a)=>{q.set(n,a>>>0)},ga=(n,a,i,s)=>{var u=P[s+40>>>2],c={tm_sec:P[s>>>2],tm_min:P[s+4>>>2],tm_hour:P[s+8>>>2],tm_mday:P[s+12>>>2],tm_mon:P[s+16>>>2],tm_year:P[s+20>>>2],tm_wday:P[s+24>>>2],tm_yday:P[s+28>>>2],tm_isdst:P[s+32>>>2],tm_gmtoff:P[s+36>>>2],tm_zone:u?gt(u):""},m=gt(i),f={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var h in f)m=m.replace(new RegExp(h,"g"),f[h]);var y=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],v=["January","February","March","April","May","June","July","August","September","October","November","December"];function b(M,A,ee){for(var V=typeof M=="number"?M.toString():M||"";V.length0?1:0}var V;return(V=ee(M.getFullYear()-A.getFullYear()))===0&&(V=ee(M.getMonth()-A.getMonth()))===0&&(V=ee(M.getDate()-A.getDate())),V}function T(M){switch(M.getDay()){case 0:return new Date(M.getFullYear()-1,11,29);case 1:return M;case 2:return new Date(M.getFullYear(),0,3);case 3:return new Date(M.getFullYear(),0,2);case 4:return new Date(M.getFullYear(),0,1);case 5:return new Date(M.getFullYear()-1,11,31);case 6:return new Date(M.getFullYear()-1,11,30)}}function Y(M){var A=Gu(new Date(M.tm_year+1900,0,1),M.tm_yday),ee=new Date(A.getFullYear(),0,4),V=new Date(A.getFullYear()+1,0,4),ce=T(ee),O=T(V);return D(ce,A)<=0?D(O,A)<=0?A.getFullYear()+1:A.getFullYear():A.getFullYear()-1}var K={"%a":M=>y[M.tm_wday].substring(0,3),"%A":M=>y[M.tm_wday],"%b":M=>v[M.tm_mon].substring(0,3),"%B":M=>v[M.tm_mon],"%C":M=>{var A=M.tm_year+1900;return I(A/100|0,2)},"%d":M=>I(M.tm_mday,2),"%e":M=>b(M.tm_mday,2," "),"%g":M=>Y(M).toString().substring(2),"%G":M=>Y(M),"%H":M=>I(M.tm_hour,2),"%I":M=>{var A=M.tm_hour;return A==0?A=12:A>12&&(A-=12),I(A,2)},"%j":M=>I(M.tm_mday+bu(kt(M.tm_year+1900)?la:ca,M.tm_mon-1),3),"%m":M=>I(M.tm_mon+1,2),"%M":M=>I(M.tm_min,2),"%n":()=>`
`,"%p":M=>M.tm_hour>=0&&M.tm_hour<12?"AM":"PM","%S":M=>I(M.tm_sec,2),"%t":()=>" ","%u":M=>M.tm_wday||7,"%U":M=>{var A=M.tm_yday+7-M.tm_wday;return I(Math.floor(A/7),2)},"%V":M=>{var A=Math.floor((M.tm_yday+7-(M.tm_wday+6)%7)/7);if((M.tm_wday+371-M.tm_yday-2)%7<=2&&A++,A){if(A==53){var V=(M.tm_wday+371-M.tm_yday)%7;V!=4&&(V!=3||!kt(M.tm_year))&&(A=1)}}else{A=52;var ee=(M.tm_wday+7-M.tm_yday-1)%7;(ee==4||ee==5&&kt(M.tm_year%400-1))&&A++}return I(A,2)},"%w":M=>M.tm_wday,"%W":M=>{var A=M.tm_yday+7-(M.tm_wday+6)%7;return I(Math.floor(A/7),2)},"%y":M=>(M.tm_year+1900).toString().substring(2),"%Y":M=>M.tm_year+1900,"%z":M=>{var A=M.tm_gmtoff,ee=A>=0;return A=Math.abs(A)/60,A=A/60*100+A%60,(ee?"+":"-")+("0000"+A).slice(-4)},"%Z":M=>M.tm_zone,"%%":()=>"%"};m=m.replace(/%%/g,"\0\0");for(var h in K)m.includes(h)&&(m=m.replace(new RegExp(h,"g"),K[h](c)));m=m.replace(/\0\0/g,"%");var X=zt(m,!1);return X.length>a?0:(Pu(X,n),X.length-1)},Au=(n,a,i,s,u)=>ga(n,a,i,s),Eu=n=>n?(Nr(52),-1):0;function ma(n,a){n<128?a.push(n):a.push(n%128|128,n>>7)}function Ru(n){for(var a={i:"i32",j:"i64",f:"f32",d:"f64",p:"i32"},i={parameters:[],results:n[0]=="v"?[]:[a[n[0]]]},s=1;s{Ue.set(n,a),ct[n]=Ue.get(n)};function zu(n,a){var i=Bu(n);if(i)return i;var s=Lu();try{pa(s,n)}catch(c){if(!(c instanceof TypeError))throw c;var u=Tu(n,a);pa(s,u)}return et.set(n,s),s}var da=function(n,a,i,s){n||(n=this),this.parent=n,this.mount=n.mount,this.mounted=null,this.id=l.nextInode++,this.name=a,this.mode=i,this.node_ops={},this.stream_ops={},this.rdev=s},Yt=365,jt=146;Object.defineProperties(da.prototype,{read:{get:function(){return(this.mode&Yt)===Yt},set:function(n){n?this.mode|=Yt:this.mode&=~Yt}},write:{get:function(){return(this.mode&jt)===jt},set:function(n){n?this.mode|=jt:this.mode&=~jt}},isFolder:{get:function(){return l.isDir(this.mode)}},isDevice:{get:function(){return l.isChrdev(this.mode)}}}),l.FSNode=da,l.createPreloadedFile=mi,l.staticInit(),Ur=e.InternalError=fn(Error,"InternalError"),Ni(),pt=e.BindingError=fn(Error,"BindingError"),ts(),Vi(),ls(),qr=e.UnboundTypeError=fn(Error,"UnboundTypeError"),fs();var Nu={ga:ni,H:ii,a:si,G:ri,ya:pi,za:di,ja:wi,va:Si,K:ki,S:vi,qa:Mi,fa:Ii,Ba:Di,sa:bi,ta:Gi,I:Pi,ea:Ai,_a:Ei,$a:Ri,ua:Ci,Za:Ti,Q:Wi,Na:zi,W:Hi,Fa:Ui,N:cs,Ea:ps,x:hs,f:ys,V:Ss,q:Ms,w:Is,o:Ds,U:bs,L:Ts,Oa:Ws,M:Bs,Ga:Ls,wa:Ns,Va:Hs,La:Fs,m:Kr,Ma:Ys,E:js,Y:Xs,u:Vs,F:qs,s:Qs,p:Js,ma:Ks,na:eu,oa:tu,ka:nu,la:ru,Xa:au,c:iu,z:su,Ya:uu,D:sa,xa:ou,Wa:lu,Ca:mu,Da:fu,y:du,B:hu,R:yu,ia:wu,ha:Su,T:ku,pa:vu,ra:Mu,J:Iu,da:Du,Qa:no,P:Ju,d:xu,e:Fu,g:Uu,j:Xu,ca:to,b:Ku,ba:io,n:Qu,aa:so,Ka:go,Ja:mo,v:Zu,Sa:Ou,t:qu,Ta:Vu,O:ro,l:$u,h:Yu,$:uo,_:oo,k:Hu,i:ju,r:ao,Pa:lo,X:co,Ia:fo,Z:_o,Ha:po,Ra:eo,Aa:ua,C:ga,Ua:Au,A:Eu};Za(),e._MagickColor_Create=function(){return(e._MagickColor_Create=e.asm.cb).apply(null,arguments)},e._MagickColor_Dispose=function(){return(e._MagickColor_Dispose=e.asm.db).apply(null,arguments)},e._MagickColor_Count_Get=function(){return(e._MagickColor_Count_Get=e.asm.eb).apply(null,arguments)},e._MagickColor_Red_Get=function(){return(e._MagickColor_Red_Get=e.asm.fb).apply(null,arguments)},e._MagickColor_Red_Set=function(){return(e._MagickColor_Red_Set=e.asm.gb).apply(null,arguments)},e._MagickColor_Green_Get=function(){return(e._MagickColor_Green_Get=e.asm.hb).apply(null,arguments)},e._MagickColor_Green_Set=function(){return(e._MagickColor_Green_Set=e.asm.ib).apply(null,arguments)},e._MagickColor_Blue_Get=function(){return(e._MagickColor_Blue_Get=e.asm.jb).apply(null,arguments)},e._MagickColor_Blue_Set=function(){return(e._MagickColor_Blue_Set=e.asm.kb).apply(null,arguments)},e._MagickColor_Alpha_Get=function(){return(e._MagickColor_Alpha_Get=e.asm.lb).apply(null,arguments)},e._MagickColor_Alpha_Set=function(){return(e._MagickColor_Alpha_Set=e.asm.mb).apply(null,arguments)},e._MagickColor_Black_Get=function(){return(e._MagickColor_Black_Get=e.asm.nb).apply(null,arguments)},e._MagickColor_Black_Set=function(){return(e._MagickColor_Black_Set=e.asm.ob).apply(null,arguments)},e._MagickColor_IsCMYK_Get=function(){return(e._MagickColor_IsCMYK_Get=e.asm.pb).apply(null,arguments)},e._MagickColor_IsCMYK_Set=function(){return(e._MagickColor_IsCMYK_Set=e.asm.qb).apply(null,arguments)},e._MagickColor_Clone=function(){return(e._MagickColor_Clone=e.asm.rb).apply(null,arguments)},e._MagickColor_FuzzyEquals=function(){return(e._MagickColor_FuzzyEquals=e.asm.sb).apply(null,arguments)},e._MagickColor_Initialize=function(){return(e._MagickColor_Initialize=e.asm.tb).apply(null,arguments)},e._MagickColorCollection_DisposeList=function(){return(e._MagickColorCollection_DisposeList=e.asm.vb).apply(null,arguments)},e._MagickColorCollection_GetInstance=function(){return(e._MagickColorCollection_GetInstance=e.asm.wb).apply(null,arguments)},e._DrawingWand_Create=function(){return(e._DrawingWand_Create=e.asm.xb).apply(null,arguments)},e._DrawingWand_Dispose=function(){return(e._DrawingWand_Dispose=e.asm.yb).apply(null,arguments)},e._DrawingWand_Affine=function(){return(e._DrawingWand_Affine=e.asm.zb).apply(null,arguments)},e._DrawingWand_Alpha=function(){return(e._DrawingWand_Alpha=e.asm.Ab).apply(null,arguments)},e._DrawingWand_Arc=function(){return(e._DrawingWand_Arc=e.asm.Bb).apply(null,arguments)},e._DrawingWand_Bezier=function(){return(e._DrawingWand_Bezier=e.asm.Cb).apply(null,arguments)},e._DrawingWand_BorderColor=function(){return(e._DrawingWand_BorderColor=e.asm.Db).apply(null,arguments)},e._DrawingWand_Circle=function(){return(e._DrawingWand_Circle=e.asm.Eb).apply(null,arguments)},e._DrawingWand_ClipPath=function(){return(e._DrawingWand_ClipPath=e.asm.Fb).apply(null,arguments)},e._DrawingWand_ClipRule=function(){return(e._DrawingWand_ClipRule=e.asm.Gb).apply(null,arguments)},e._DrawingWand_ClipUnits=function(){return(e._DrawingWand_ClipUnits=e.asm.Hb).apply(null,arguments)},e._DrawingWand_Color=function(){return(e._DrawingWand_Color=e.asm.Ib).apply(null,arguments)},e._DrawingWand_Composite=function(){return(e._DrawingWand_Composite=e.asm.Jb).apply(null,arguments)},e._DrawingWand_Density=function(){return(e._DrawingWand_Density=e.asm.Kb).apply(null,arguments)},e._DrawingWand_Ellipse=function(){return(e._DrawingWand_Ellipse=e.asm.Lb).apply(null,arguments)},e._DrawingWand_FillColor=function(){return(e._DrawingWand_FillColor=e.asm.Mb).apply(null,arguments)},e._DrawingWand_FillOpacity=function(){return(e._DrawingWand_FillOpacity=e.asm.Nb).apply(null,arguments)},e._DrawingWand_FillPatternUrl=function(){return(e._DrawingWand_FillPatternUrl=e.asm.Ob).apply(null,arguments)},e._DrawingWand_FillRule=function(){return(e._DrawingWand_FillRule=e.asm.Pb).apply(null,arguments)},e._DrawingWand_Font=function(){return(e._DrawingWand_Font=e.asm.Qb).apply(null,arguments)},e._DrawingWand_FontFamily=function(){return(e._DrawingWand_FontFamily=e.asm.Rb).apply(null,arguments)},e._DrawingWand_FontPointSize=function(){return(e._DrawingWand_FontPointSize=e.asm.Sb).apply(null,arguments)},e._DrawingWand_FontTypeMetrics=function(){return(e._DrawingWand_FontTypeMetrics=e.asm.Tb).apply(null,arguments)},e._TypeMetric_Create=function(){return(e._TypeMetric_Create=e.asm.Ub).apply(null,arguments)},e._DrawingWand_Gravity=function(){return(e._DrawingWand_Gravity=e.asm.Vb).apply(null,arguments)},e._DrawingWand_Line=function(){return(e._DrawingWand_Line=e.asm.Wb).apply(null,arguments)},e._DrawingWand_PathArcAbs=function(){return(e._DrawingWand_PathArcAbs=e.asm.Xb).apply(null,arguments)},e._DrawingWand_PathArcRel=function(){return(e._DrawingWand_PathArcRel=e.asm.Yb).apply(null,arguments)},e._DrawingWand_PathClose=function(){return(e._DrawingWand_PathClose=e.asm.Zb).apply(null,arguments)},e._DrawingWand_PathCurveToAbs=function(){return(e._DrawingWand_PathCurveToAbs=e.asm._b).apply(null,arguments)},e._DrawingWand_PathCurveToRel=function(){return(e._DrawingWand_PathCurveToRel=e.asm.$b).apply(null,arguments)},e._DrawingWand_PathFinish=function(){return(e._DrawingWand_PathFinish=e.asm.ac).apply(null,arguments)},e._DrawingWand_PathLineToAbs=function(){return(e._DrawingWand_PathLineToAbs=e.asm.bc).apply(null,arguments)},e._DrawingWand_PathLineToHorizontalAbs=function(){return(e._DrawingWand_PathLineToHorizontalAbs=e.asm.cc).apply(null,arguments)},e._DrawingWand_PathLineToHorizontalRel=function(){return(e._DrawingWand_PathLineToHorizontalRel=e.asm.dc).apply(null,arguments)},e._DrawingWand_PathLineToRel=function(){return(e._DrawingWand_PathLineToRel=e.asm.ec).apply(null,arguments)},e._DrawingWand_PathLineToVerticalAbs=function(){return(e._DrawingWand_PathLineToVerticalAbs=e.asm.fc).apply(null,arguments)},e._DrawingWand_PathLineToVerticalRel=function(){return(e._DrawingWand_PathLineToVerticalRel=e.asm.gc).apply(null,arguments)},e._DrawingWand_PathMoveToAbs=function(){return(e._DrawingWand_PathMoveToAbs=e.asm.hc).apply(null,arguments)},e._DrawingWand_PathMoveToRel=function(){return(e._DrawingWand_PathMoveToRel=e.asm.ic).apply(null,arguments)},e._DrawingWand_PathQuadraticCurveToAbs=function(){return(e._DrawingWand_PathQuadraticCurveToAbs=e.asm.jc).apply(null,arguments)},e._DrawingWand_PathQuadraticCurveToRel=function(){return(e._DrawingWand_PathQuadraticCurveToRel=e.asm.kc).apply(null,arguments)},e._DrawingWand_PathSmoothCurveToAbs=function(){return(e._DrawingWand_PathSmoothCurveToAbs=e.asm.lc).apply(null,arguments)},e._DrawingWand_PathSmoothCurveToRel=function(){return(e._DrawingWand_PathSmoothCurveToRel=e.asm.mc).apply(null,arguments)},e._DrawingWand_PathSmoothQuadraticCurveToAbs=function(){return(e._DrawingWand_PathSmoothQuadraticCurveToAbs=e.asm.nc).apply(null,arguments)},e._DrawingWand_PathSmoothQuadraticCurveToRel=function(){return(e._DrawingWand_PathSmoothQuadraticCurveToRel=e.asm.oc).apply(null,arguments)},e._DrawingWand_PathStart=function(){return(e._DrawingWand_PathStart=e.asm.pc).apply(null,arguments)},e._DrawingWand_Point=function(){return(e._DrawingWand_Point=e.asm.qc).apply(null,arguments)},e._DrawingWand_Polygon=function(){return(e._DrawingWand_Polygon=e.asm.rc).apply(null,arguments)},e._DrawingWand_Polyline=function(){return(e._DrawingWand_Polyline=e.asm.sc).apply(null,arguments)},e._DrawingWand_PopClipPath=function(){return(e._DrawingWand_PopClipPath=e.asm.tc).apply(null,arguments)},e._DrawingWand_PopGraphicContext=function(){return(e._DrawingWand_PopGraphicContext=e.asm.uc).apply(null,arguments)},e._DrawingWand_PopPattern=function(){return(e._DrawingWand_PopPattern=e.asm.vc).apply(null,arguments)},e._DrawingWand_PushClipPath=function(){return(e._DrawingWand_PushClipPath=e.asm.wc).apply(null,arguments)},e._DrawingWand_PushGraphicContext=function(){return(e._DrawingWand_PushGraphicContext=e.asm.xc).apply(null,arguments)},e._DrawingWand_PushPattern=function(){return(e._DrawingWand_PushPattern=e.asm.yc).apply(null,arguments)},e._DrawingWand_Rectangle=function(){return(e._DrawingWand_Rectangle=e.asm.zc).apply(null,arguments)},e._DrawingWand_Render=function(){return(e._DrawingWand_Render=e.asm.Ac).apply(null,arguments)},e._DrawingWand_Rotation=function(){return(e._DrawingWand_Rotation=e.asm.Bc).apply(null,arguments)},e._DrawingWand_RoundRectangle=function(){return(e._DrawingWand_RoundRectangle=e.asm.Cc).apply(null,arguments)},e._DrawingWand_Scaling=function(){return(e._DrawingWand_Scaling=e.asm.Dc).apply(null,arguments)},e._DrawingWand_SkewX=function(){return(e._DrawingWand_SkewX=e.asm.Ec).apply(null,arguments)},e._DrawingWand_SkewY=function(){return(e._DrawingWand_SkewY=e.asm.Fc).apply(null,arguments)},e._DrawingWand_StrokeAntialias=function(){return(e._DrawingWand_StrokeAntialias=e.asm.Gc).apply(null,arguments)},e._DrawingWand_StrokeColor=function(){return(e._DrawingWand_StrokeColor=e.asm.Hc).apply(null,arguments)},e._DrawingWand_StrokeDashArray=function(){return(e._DrawingWand_StrokeDashArray=e.asm.Ic).apply(null,arguments)},e._DrawingWand_StrokeDashOffset=function(){return(e._DrawingWand_StrokeDashOffset=e.asm.Jc).apply(null,arguments)},e._DrawingWand_StrokeLineCap=function(){return(e._DrawingWand_StrokeLineCap=e.asm.Kc).apply(null,arguments)},e._DrawingWand_StrokeLineJoin=function(){return(e._DrawingWand_StrokeLineJoin=e.asm.Lc).apply(null,arguments)},e._DrawingWand_StrokeMiterLimit=function(){return(e._DrawingWand_StrokeMiterLimit=e.asm.Mc).apply(null,arguments)},e._DrawingWand_StrokeOpacity=function(){return(e._DrawingWand_StrokeOpacity=e.asm.Nc).apply(null,arguments)},e._DrawingWand_StrokePatternUrl=function(){return(e._DrawingWand_StrokePatternUrl=e.asm.Oc).apply(null,arguments)},e._DrawingWand_StrokeWidth=function(){return(e._DrawingWand_StrokeWidth=e.asm.Pc).apply(null,arguments)},e._DrawingWand_Text=function(){return(e._DrawingWand_Text=e.asm.Qc).apply(null,arguments)},e._DrawingWand_TextAlignment=function(){return(e._DrawingWand_TextAlignment=e.asm.Rc).apply(null,arguments)},e._DrawingWand_TextAntialias=function(){return(e._DrawingWand_TextAntialias=e.asm.Sc).apply(null,arguments)},e._DrawingWand_TextDecoration=function(){return(e._DrawingWand_TextDecoration=e.asm.Tc).apply(null,arguments)},e._DrawingWand_TextDirection=function(){return(e._DrawingWand_TextDirection=e.asm.Uc).apply(null,arguments)},e._DrawingWand_TextEncoding=function(){return(e._DrawingWand_TextEncoding=e.asm.Vc).apply(null,arguments)},e._DrawingWand_TextInterlineSpacing=function(){return(e._DrawingWand_TextInterlineSpacing=e.asm.Wc).apply(null,arguments)},e._DrawingWand_TextInterwordSpacing=function(){return(e._DrawingWand_TextInterwordSpacing=e.asm.Xc).apply(null,arguments)},e._DrawingWand_TextKerning=function(){return(e._DrawingWand_TextKerning=e.asm.Yc).apply(null,arguments)},e._DrawingWand_TextUnderColor=function(){return(e._DrawingWand_TextUnderColor=e.asm.Zc).apply(null,arguments)},e._DrawingWand_Translation=function(){return(e._DrawingWand_Translation=e.asm._c).apply(null,arguments)},e._DrawingWand_Viewbox=function(){return(e._DrawingWand_Viewbox=e.asm.$c).apply(null,arguments)},e._MagickExceptionHelper_Description=function(){return(e._MagickExceptionHelper_Description=e.asm.ad).apply(null,arguments)},e._MagickExceptionHelper_Dispose=function(){return(e._MagickExceptionHelper_Dispose=e.asm.bd).apply(null,arguments)},e._MagickExceptionHelper_Related=function(){return(e._MagickExceptionHelper_Related=e.asm.cd).apply(null,arguments)},e._MagickExceptionHelper_RelatedCount=function(){return(e._MagickExceptionHelper_RelatedCount=e.asm.dd).apply(null,arguments)},e._MagickExceptionHelper_Message=function(){return(e._MagickExceptionHelper_Message=e.asm.ed).apply(null,arguments)},e._MagickExceptionHelper_Severity=function(){return(e._MagickExceptionHelper_Severity=e.asm.fd).apply(null,arguments)},e._PdfInfo_PageCount=function(){return(e._PdfInfo_PageCount=e.asm.gd).apply(null,arguments)},e._Environment_Initialize=function(){return(e._Environment_Initialize=e.asm.hd).apply(null,arguments)},e._Environment_GetEnv=function(){return(e._Environment_GetEnv=e.asm.id).apply(null,arguments)},e._Environment_SetEnv=function(){return(e._Environment_SetEnv=e.asm.jd).apply(null,arguments)},e._MagickMemory_Relinquish=function(){return(e._MagickMemory_Relinquish=e.asm.kd).apply(null,arguments)},e._Magick_Delegates_Get=function(){return(e._Magick_Delegates_Get=e.asm.ld).apply(null,arguments)},e._Magick_Features_Get=function(){return(e._Magick_Features_Get=e.asm.md).apply(null,arguments)},e._Magick_ImageMagickVersion_Get=function(){return(e._Magick_ImageMagickVersion_Get=e.asm.nd).apply(null,arguments)},e._Magick_GetFonts=function(){return(e._Magick_GetFonts=e.asm.od).apply(null,arguments)},e._Magick_GetFontFamily=function(){return(e._Magick_GetFontFamily=e.asm.pd).apply(null,arguments)},e._Magick_GetFontName=function(){return(e._Magick_GetFontName=e.asm.qd).apply(null,arguments)},e._Magick_DisposeFonts=function(){return(e._Magick_DisposeFonts=e.asm.rd).apply(null,arguments)},e._Magick_ResetRandomSeed=function(){return(e._Magick_ResetRandomSeed=e.asm.sd).apply(null,arguments)},e._Magick_SetDefaultFontFile=function(){return(e._Magick_SetDefaultFontFile=e.asm.td).apply(null,arguments)},e._Magick_SetRandomSeed=function(){return(e._Magick_SetRandomSeed=e.asm.ud).apply(null,arguments)},e._Magick_SetLogDelegate=function(){return(e._Magick_SetLogDelegate=e.asm.vd).apply(null,arguments)},e._Magick_SetLogEvents=function(){return(e._Magick_SetLogEvents=e.asm.wd).apply(null,arguments)},e._MagickFormatInfo_CreateList=function(){return(e._MagickFormatInfo_CreateList=e.asm.xd).apply(null,arguments)},e._MagickFormatInfo_DisposeList=function(){return(e._MagickFormatInfo_DisposeList=e.asm.yd).apply(null,arguments)},e._MagickFormatInfo_CanReadMultithreaded_Get=function(){return(e._MagickFormatInfo_CanReadMultithreaded_Get=e.asm.zd).apply(null,arguments)},e._MagickFormatInfo_CanWriteMultithreaded_Get=function(){return(e._MagickFormatInfo_CanWriteMultithreaded_Get=e.asm.Ad).apply(null,arguments)},e._MagickFormatInfo_Description_Get=function(){return(e._MagickFormatInfo_Description_Get=e.asm.Bd).apply(null,arguments)},e._MagickFormatInfo_Format_Get=function(){return(e._MagickFormatInfo_Format_Get=e.asm.Cd).apply(null,arguments)},e._MagickFormatInfo_MimeType_Get=function(){return(e._MagickFormatInfo_MimeType_Get=e.asm.Dd).apply(null,arguments)},e._MagickFormatInfo_Module_Get=function(){return(e._MagickFormatInfo_Module_Get=e.asm.Ed).apply(null,arguments)},e._MagickFormatInfo_SupportsMultipleFrames_Get=function(){return(e._MagickFormatInfo_SupportsMultipleFrames_Get=e.asm.Fd).apply(null,arguments)},e._MagickFormatInfo_SupportsReading_Get=function(){return(e._MagickFormatInfo_SupportsReading_Get=e.asm.Gd).apply(null,arguments)},e._MagickFormatInfo_SupportsWriting_Get=function(){return(e._MagickFormatInfo_SupportsWriting_Get=e.asm.Hd).apply(null,arguments)},e._MagickFormatInfo_GetInfo=function(){return(e._MagickFormatInfo_GetInfo=e.asm.Id).apply(null,arguments)},e._MagickFormatInfo_GetInfoByName=function(){return(e._MagickFormatInfo_GetInfoByName=e.asm.Jd).apply(null,arguments)},e._MagickFormatInfo_GetInfoWithBlob=function(){return(e._MagickFormatInfo_GetInfoWithBlob=e.asm.Kd).apply(null,arguments)},e._MagickFormatInfo_Unregister=function(){return(e._MagickFormatInfo_Unregister=e.asm.Ld).apply(null,arguments)},e._MagickImage_Create=function(){return(e._MagickImage_Create=e.asm.Md).apply(null,arguments)},e._MagickImage_Dispose=function(){return(e._MagickImage_Dispose=e.asm.Nd).apply(null,arguments)},e._MagickImage_AnimationDelay_Get=function(){return(e._MagickImage_AnimationDelay_Get=e.asm.Od).apply(null,arguments)},e._MagickImage_AnimationDelay_Set=function(){return(e._MagickImage_AnimationDelay_Set=e.asm.Pd).apply(null,arguments)},e._MagickImage_AnimationIterations_Get=function(){return(e._MagickImage_AnimationIterations_Get=e.asm.Qd).apply(null,arguments)},e._MagickImage_AnimationIterations_Set=function(){return(e._MagickImage_AnimationIterations_Set=e.asm.Rd).apply(null,arguments)},e._MagickImage_AnimationTicksPerSecond_Get=function(){return(e._MagickImage_AnimationTicksPerSecond_Get=e.asm.Sd).apply(null,arguments)},e._MagickImage_AnimationTicksPerSecond_Set=function(){return(e._MagickImage_AnimationTicksPerSecond_Set=e.asm.Td).apply(null,arguments)},e._MagickImage_BackgroundColor_Get=function(){return(e._MagickImage_BackgroundColor_Get=e.asm.Ud).apply(null,arguments)},e._MagickImage_BackgroundColor_Set=function(){return(e._MagickImage_BackgroundColor_Set=e.asm.Vd).apply(null,arguments)},e._MagickImage_BaseHeight_Get=function(){return(e._MagickImage_BaseHeight_Get=e.asm.Wd).apply(null,arguments)},e._MagickImage_BaseWidth_Get=function(){return(e._MagickImage_BaseWidth_Get=e.asm.Xd).apply(null,arguments)},e._MagickImage_BlackPointCompensation_Get=function(){return(e._MagickImage_BlackPointCompensation_Get=e.asm.Yd).apply(null,arguments)},e._MagickImage_BlackPointCompensation_Set=function(){return(e._MagickImage_BlackPointCompensation_Set=e.asm.Zd).apply(null,arguments)},e._MagickImage_BorderColor_Get=function(){return(e._MagickImage_BorderColor_Get=e.asm._d).apply(null,arguments)},e._MagickImage_BorderColor_Set=function(){return(e._MagickImage_BorderColor_Set=e.asm.$d).apply(null,arguments)},e._MagickImage_BoundingBox_Get=function(){return(e._MagickImage_BoundingBox_Get=e.asm.ae).apply(null,arguments)},e._MagickRectangle_Create=function(){return(e._MagickRectangle_Create=e.asm.be).apply(null,arguments)},e._MagickImage_ChannelCount_Get=function(){return(e._MagickImage_ChannelCount_Get=e.asm.ce).apply(null,arguments)},e._MagickImage_ChromaBlue_Get=function(){return(e._MagickImage_ChromaBlue_Get=e.asm.de).apply(null,arguments)},e._PrimaryInfo_Create=function(){return(e._PrimaryInfo_Create=e.asm.ee).apply(null,arguments)},e._MagickImage_ChromaBlue_Set=function(){return(e._MagickImage_ChromaBlue_Set=e.asm.fe).apply(null,arguments)},e._MagickImage_ChromaGreen_Get=function(){return(e._MagickImage_ChromaGreen_Get=e.asm.ge).apply(null,arguments)},e._MagickImage_ChromaGreen_Set=function(){return(e._MagickImage_ChromaGreen_Set=e.asm.he).apply(null,arguments)},e._MagickImage_ChromaRed_Get=function(){return(e._MagickImage_ChromaRed_Get=e.asm.ie).apply(null,arguments)},e._MagickImage_ChromaRed_Set=function(){return(e._MagickImage_ChromaRed_Set=e.asm.je).apply(null,arguments)},e._MagickImage_ChromaWhite_Get=function(){return(e._MagickImage_ChromaWhite_Get=e.asm.ke).apply(null,arguments)},e._MagickImage_ChromaWhite_Set=function(){return(e._MagickImage_ChromaWhite_Set=e.asm.le).apply(null,arguments)},e._MagickImage_ClassType_Get=function(){return(e._MagickImage_ClassType_Get=e.asm.me).apply(null,arguments)},e._MagickImage_ClassType_Set=function(){return(e._MagickImage_ClassType_Set=e.asm.ne).apply(null,arguments)},e._QuantizeSettings_Create=function(){return(e._QuantizeSettings_Create=e.asm.oe).apply(null,arguments)},e._QuantizeSettings_Dispose=function(){return(e._QuantizeSettings_Dispose=e.asm.pe).apply(null,arguments)},e._MagickImage_ColorFuzz_Get=function(){return(e._MagickImage_ColorFuzz_Get=e.asm.qe).apply(null,arguments)},e._MagickImage_ColorFuzz_Set=function(){return(e._MagickImage_ColorFuzz_Set=e.asm.re).apply(null,arguments)},e._MagickImage_ColormapSize_Get=function(){return(e._MagickImage_ColormapSize_Get=e.asm.se).apply(null,arguments)},e._MagickImage_ColormapSize_Set=function(){return(e._MagickImage_ColormapSize_Set=e.asm.te).apply(null,arguments)},e._MagickImage_ColorSpace_Get=function(){return(e._MagickImage_ColorSpace_Get=e.asm.ue).apply(null,arguments)},e._MagickImage_ColorSpace_Set=function(){return(e._MagickImage_ColorSpace_Set=e.asm.ve).apply(null,arguments)},e._MagickImage_ColorType_Get=function(){return(e._MagickImage_ColorType_Get=e.asm.we).apply(null,arguments)},e._MagickImage_ColorType_Set=function(){return(e._MagickImage_ColorType_Set=e.asm.xe).apply(null,arguments)},e._MagickImage_Compose_Get=function(){return(e._MagickImage_Compose_Get=e.asm.ye).apply(null,arguments)},e._MagickImage_Compose_Set=function(){return(e._MagickImage_Compose_Set=e.asm.ze).apply(null,arguments)},e._MagickImage_Compression_Get=function(){return(e._MagickImage_Compression_Get=e.asm.Ae).apply(null,arguments)},e._MagickImage_Compression_Set=function(){return(e._MagickImage_Compression_Set=e.asm.Be).apply(null,arguments)},e._MagickImage_Depth_Get=function(){return(e._MagickImage_Depth_Get=e.asm.Ce).apply(null,arguments)},e._MagickImage_Depth_Set=function(){return(e._MagickImage_Depth_Set=e.asm.De).apply(null,arguments)},e._MagickImage_EncodingGeometry_Get=function(){return(e._MagickImage_EncodingGeometry_Get=e.asm.Ee).apply(null,arguments)},e._MagickImage_Endian_Get=function(){return(e._MagickImage_Endian_Get=e.asm.Fe).apply(null,arguments)},e._MagickImage_Endian_Set=function(){return(e._MagickImage_Endian_Set=e.asm.Ge).apply(null,arguments)},e._MagickImage_FileName_Get=function(){return(e._MagickImage_FileName_Get=e.asm.He).apply(null,arguments)},e._MagickImage_FileName_Set=function(){return(e._MagickImage_FileName_Set=e.asm.Ie).apply(null,arguments)},e._MagickImage_FilterType_Get=function(){return(e._MagickImage_FilterType_Get=e.asm.Je).apply(null,arguments)},e._MagickImage_FilterType_Set=function(){return(e._MagickImage_FilterType_Set=e.asm.Ke).apply(null,arguments)},e._MagickImage_Format_Get=function(){return(e._MagickImage_Format_Get=e.asm.Le).apply(null,arguments)},e._MagickImage_Format_Set=function(){return(e._MagickImage_Format_Set=e.asm.Me).apply(null,arguments)},e._MagickImage_Gamma_Get=function(){return(e._MagickImage_Gamma_Get=e.asm.Ne).apply(null,arguments)},e._MagickImage_GifDisposeMethod_Get=function(){return(e._MagickImage_GifDisposeMethod_Get=e.asm.Oe).apply(null,arguments)},e._MagickImage_GifDisposeMethod_Set=function(){return(e._MagickImage_GifDisposeMethod_Set=e.asm.Pe).apply(null,arguments)},e._MagickImage_HasAlpha_Get=function(){return(e._MagickImage_HasAlpha_Get=e.asm.Qe).apply(null,arguments)},e._MagickImage_HasAlpha_Set=function(){return(e._MagickImage_HasAlpha_Set=e.asm.Re).apply(null,arguments)},e._MagickImage_Height_Get=function(){return(e._MagickImage_Height_Get=e.asm.Se).apply(null,arguments)},e._MagickImage_Interlace_Get=function(){return(e._MagickImage_Interlace_Get=e.asm.Te).apply(null,arguments)},e._MagickImage_Interlace_Set=function(){return(e._MagickImage_Interlace_Set=e.asm.Ue).apply(null,arguments)},e._MagickImage_Interpolate_Get=function(){return(e._MagickImage_Interpolate_Get=e.asm.Ve).apply(null,arguments)},e._MagickImage_Interpolate_Set=function(){return(e._MagickImage_Interpolate_Set=e.asm.We).apply(null,arguments)},e._MagickImage_IsOpaque_Get=function(){return(e._MagickImage_IsOpaque_Get=e.asm.Xe).apply(null,arguments)},e._MagickImage_MatteColor_Get=function(){return(e._MagickImage_MatteColor_Get=e.asm.Ye).apply(null,arguments)},e._MagickImage_MatteColor_Set=function(){return(e._MagickImage_MatteColor_Set=e.asm.Ze).apply(null,arguments)},e._MagickImage_MeanErrorPerPixel_Get=function(){return(e._MagickImage_MeanErrorPerPixel_Get=e.asm._e).apply(null,arguments)},e._MagickImage_MetaChannelCount_Get=function(){return(e._MagickImage_MetaChannelCount_Get=e.asm.$e).apply(null,arguments)},e._MagickImage_MetaChannelCount_Set=function(){return(e._MagickImage_MetaChannelCount_Set=e.asm.af).apply(null,arguments)},e._MagickImage_NormalizedMaximumError_Get=function(){return(e._MagickImage_NormalizedMaximumError_Get=e.asm.bf).apply(null,arguments)},e._MagickImage_NormalizedMeanError_Get=function(){return(e._MagickImage_NormalizedMeanError_Get=e.asm.cf).apply(null,arguments)},e._MagickImage_Orientation_Get=function(){return(e._MagickImage_Orientation_Get=e.asm.df).apply(null,arguments)},e._MagickImage_Orientation_Set=function(){return(e._MagickImage_Orientation_Set=e.asm.ef).apply(null,arguments)},e._MagickImage_Page_Get=function(){return(e._MagickImage_Page_Get=e.asm.ff).apply(null,arguments)},e._MagickImage_Page_Set=function(){return(e._MagickImage_Page_Set=e.asm.gf).apply(null,arguments)},e._MagickImage_Quality_Get=function(){return(e._MagickImage_Quality_Get=e.asm.hf).apply(null,arguments)},e._MagickImage_Quality_Set=function(){return(e._MagickImage_Quality_Set=e.asm.jf).apply(null,arguments)},e._MagickImage_RenderingIntent_Get=function(){return(e._MagickImage_RenderingIntent_Get=e.asm.kf).apply(null,arguments)},e._MagickImage_RenderingIntent_Set=function(){return(e._MagickImage_RenderingIntent_Set=e.asm.lf).apply(null,arguments)},e._MagickImage_ResolutionUnits_Get=function(){return(e._MagickImage_ResolutionUnits_Get=e.asm.mf).apply(null,arguments)},e._MagickImage_ResolutionUnits_Set=function(){return(e._MagickImage_ResolutionUnits_Set=e.asm.nf).apply(null,arguments)},e._MagickImage_ResolutionX_Get=function(){return(e._MagickImage_ResolutionX_Get=e.asm.of).apply(null,arguments)},e._MagickImage_ResolutionX_Set=function(){return(e._MagickImage_ResolutionX_Set=e.asm.pf).apply(null,arguments)},e._MagickImage_ResolutionY_Get=function(){return(e._MagickImage_ResolutionY_Get=e.asm.qf).apply(null,arguments)},e._MagickImage_ResolutionY_Set=function(){return(e._MagickImage_ResolutionY_Set=e.asm.rf).apply(null,arguments)},e._MagickImage_Signature_Get=function(){return(e._MagickImage_Signature_Get=e.asm.sf).apply(null,arguments)},e._MagickImage_TotalColors_Get=function(){return(e._MagickImage_TotalColors_Get=e.asm.tf).apply(null,arguments)},e._MagickImage_VirtualPixelMethod_Get=function(){return(e._MagickImage_VirtualPixelMethod_Get=e.asm.uf).apply(null,arguments)},e._MagickImage_VirtualPixelMethod_Set=function(){return(e._MagickImage_VirtualPixelMethod_Set=e.asm.vf).apply(null,arguments)},e._MagickImage_Width_Get=function(){return(e._MagickImage_Width_Get=e.asm.wf).apply(null,arguments)},e._MagickImage_AdaptiveBlur=function(){return(e._MagickImage_AdaptiveBlur=e.asm.xf).apply(null,arguments)},e._MagickImage_AdaptiveResize=function(){return(e._MagickImage_AdaptiveResize=e.asm.yf).apply(null,arguments)},e._MagickImage_AdaptiveSharpen=function(){return(e._MagickImage_AdaptiveSharpen=e.asm.zf).apply(null,arguments)},e._MagickImage_AdaptiveThreshold=function(){return(e._MagickImage_AdaptiveThreshold=e.asm.Af).apply(null,arguments)},e._MagickImage_AddNoise=function(){return(e._MagickImage_AddNoise=e.asm.Bf).apply(null,arguments)},e._MagickImage_AffineTransform=function(){return(e._MagickImage_AffineTransform=e.asm.Cf).apply(null,arguments)},e._MagickImage_Annotate=function(){return(e._MagickImage_Annotate=e.asm.Df).apply(null,arguments)},e._MagickImage_AnnotateGravity=function(){return(e._MagickImage_AnnotateGravity=e.asm.Ef).apply(null,arguments)},e._MagickImage_AutoGamma=function(){return(e._MagickImage_AutoGamma=e.asm.Ff).apply(null,arguments)},e._MagickImage_AutoLevel=function(){return(e._MagickImage_AutoLevel=e.asm.Gf).apply(null,arguments)},e._MagickImage_AutoOrient=function(){return(e._MagickImage_AutoOrient=e.asm.Hf).apply(null,arguments)},e._MagickImage_AutoThreshold=function(){return(e._MagickImage_AutoThreshold=e.asm.If).apply(null,arguments)},e._MagickImage_BilateralBlur=function(){return(e._MagickImage_BilateralBlur=e.asm.Jf).apply(null,arguments)},e._MagickImage_BlackThreshold=function(){return(e._MagickImage_BlackThreshold=e.asm.Kf).apply(null,arguments)},e._MagickImage_BlueShift=function(){return(e._MagickImage_BlueShift=e.asm.Lf).apply(null,arguments)},e._MagickImage_Blur=function(){return(e._MagickImage_Blur=e.asm.Mf).apply(null,arguments)},e._MagickImage_Border=function(){return(e._MagickImage_Border=e.asm.Nf).apply(null,arguments)},e._MagickImage_BrightnessContrast=function(){return(e._MagickImage_BrightnessContrast=e.asm.Of).apply(null,arguments)},e._MagickImage_CannyEdge=function(){return(e._MagickImage_CannyEdge=e.asm.Pf).apply(null,arguments)},e._MagickImage_ChannelOffset=function(){return(e._MagickImage_ChannelOffset=e.asm.Qf).apply(null,arguments)},e._MagickImage_Charcoal=function(){return(e._MagickImage_Charcoal=e.asm.Rf).apply(null,arguments)},e._MagickImage_Chop=function(){return(e._MagickImage_Chop=e.asm.Sf).apply(null,arguments)},e._MagickImage_Clahe=function(){return(e._MagickImage_Clahe=e.asm.Tf).apply(null,arguments)},e._MagickImage_Clamp=function(){return(e._MagickImage_Clamp=e.asm.Uf).apply(null,arguments)},e._MagickImage_ClipPath=function(){return(e._MagickImage_ClipPath=e.asm.Vf).apply(null,arguments)},e._MagickImage_Clone=function(){return(e._MagickImage_Clone=e.asm.Wf).apply(null,arguments)},e._MagickImage_CloneArea=function(){return(e._MagickImage_CloneArea=e.asm.Xf).apply(null,arguments)},e._MagickImage_Clut=function(){return(e._MagickImage_Clut=e.asm.Yf).apply(null,arguments)},e._MagickImage_ColorDecisionList=function(){return(e._MagickImage_ColorDecisionList=e.asm.Zf).apply(null,arguments)},e._MagickImage_Colorize=function(){return(e._MagickImage_Colorize=e.asm._f).apply(null,arguments)},e._MagickImage_ColorMatrix=function(){return(e._MagickImage_ColorMatrix=e.asm.$f).apply(null,arguments)},e._MagickImage_ColorThreshold=function(){return(e._MagickImage_ColorThreshold=e.asm.ag).apply(null,arguments)},e._MagickImage_Compare=function(){return(e._MagickImage_Compare=e.asm.bg).apply(null,arguments)},e._MagickImage_CompareDistortion=function(){return(e._MagickImage_CompareDistortion=e.asm.cg).apply(null,arguments)},e._MagickImage_Composite=function(){return(e._MagickImage_Composite=e.asm.dg).apply(null,arguments)},e._MagickImage_CompositeGravity=function(){return(e._MagickImage_CompositeGravity=e.asm.eg).apply(null,arguments)},e._MagickImage_ConnectedComponents=function(){return(e._MagickImage_ConnectedComponents=e.asm.fg).apply(null,arguments)},e._MagickImage_Contrast=function(){return(e._MagickImage_Contrast=e.asm.gg).apply(null,arguments)},e._MagickImage_ContrastStretch=function(){return(e._MagickImage_ContrastStretch=e.asm.hg).apply(null,arguments)},e._MagickImage_ConvexHull=function(){return(e._MagickImage_ConvexHull=e.asm.ig).apply(null,arguments)},e._MagickImage_Convolve=function(){return(e._MagickImage_Convolve=e.asm.jg).apply(null,arguments)},e._MagickImage_CopyPixels=function(){return(e._MagickImage_CopyPixels=e.asm.kg).apply(null,arguments)},e._MagickImage_Crop=function(){return(e._MagickImage_Crop=e.asm.lg).apply(null,arguments)},e._MagickImage_CropToTiles=function(){return(e._MagickImage_CropToTiles=e.asm.mg).apply(null,arguments)},e._MagickImage_CycleColormap=function(){return(e._MagickImage_CycleColormap=e.asm.ng).apply(null,arguments)},e._MagickImage_Decipher=function(){return(e._MagickImage_Decipher=e.asm.og).apply(null,arguments)},e._MagickImage_Deskew=function(){return(e._MagickImage_Deskew=e.asm.pg).apply(null,arguments)},e._MagickImage_Despeckle=function(){return(e._MagickImage_Despeckle=e.asm.qg).apply(null,arguments)},e._MagickImage_DetermineBitDepth=function(){return(e._MagickImage_DetermineBitDepth=e.asm.rg).apply(null,arguments)},e._MagickImage_DetermineColorType=function(){return(e._MagickImage_DetermineColorType=e.asm.sg).apply(null,arguments)},e._MagickImage_Distort=function(){return(e._MagickImage_Distort=e.asm.tg).apply(null,arguments)},e._MagickImage_Edge=function(){return(e._MagickImage_Edge=e.asm.ug).apply(null,arguments)},e._MagickImage_Emboss=function(){return(e._MagickImage_Emboss=e.asm.vg).apply(null,arguments)},e._MagickImage_Encipher=function(){return(e._MagickImage_Encipher=e.asm.wg).apply(null,arguments)},e._MagickImage_Enhance=function(){return(e._MagickImage_Enhance=e.asm.xg).apply(null,arguments)},e._MagickImage_Equalize=function(){return(e._MagickImage_Equalize=e.asm.yg).apply(null,arguments)},e._MagickImage_Equals=function(){return(e._MagickImage_Equals=e.asm.zg).apply(null,arguments)},e._MagickImage_EvaluateFunction=function(){return(e._MagickImage_EvaluateFunction=e.asm.Ag).apply(null,arguments)},e._MagickImage_EvaluateGeometry=function(){return(e._MagickImage_EvaluateGeometry=e.asm.Bg).apply(null,arguments)},e._MagickImage_EvaluateOperator=function(){return(e._MagickImage_EvaluateOperator=e.asm.Cg).apply(null,arguments)},e._MagickImage_Extent=function(){return(e._MagickImage_Extent=e.asm.Dg).apply(null,arguments)},e._MagickImage_Flip=function(){return(e._MagickImage_Flip=e.asm.Eg).apply(null,arguments)},e._MagickImage_FloodFill=function(){return(e._MagickImage_FloodFill=e.asm.Fg).apply(null,arguments)},e._MagickImage_Flop=function(){return(e._MagickImage_Flop=e.asm.Gg).apply(null,arguments)},e._MagickImage_FontTypeMetrics=function(){return(e._MagickImage_FontTypeMetrics=e.asm.Hg).apply(null,arguments)},e._MagickImage_FormatExpression=function(){return(e._MagickImage_FormatExpression=e.asm.Ig).apply(null,arguments)},e._MagickImage_Frame=function(){return(e._MagickImage_Frame=e.asm.Jg).apply(null,arguments)},e._MagickImage_Fx=function(){return(e._MagickImage_Fx=e.asm.Kg).apply(null,arguments)},e._MagickImage_GammaCorrect=function(){return(e._MagickImage_GammaCorrect=e.asm.Lg).apply(null,arguments)},e._MagickImage_GaussianBlur=function(){return(e._MagickImage_GaussianBlur=e.asm.Mg).apply(null,arguments)},e._MagickImage_GetArtifact=function(){return(e._MagickImage_GetArtifact=e.asm.Ng).apply(null,arguments)},e._MagickImage_GetAttribute=function(){return(e._MagickImage_GetAttribute=e.asm.Og).apply(null,arguments)},e._MagickImage_GetColormapColor=function(){return(e._MagickImage_GetColormapColor=e.asm.Pg).apply(null,arguments)},e._MagickImage_GetNext=function(){return(e._MagickImage_GetNext=e.asm.Qg).apply(null,arguments)},e._MagickImage_GetNextArtifactName=function(){return(e._MagickImage_GetNextArtifactName=e.asm.Rg).apply(null,arguments)},e._MagickImage_GetNextAttributeName=function(){return(e._MagickImage_GetNextAttributeName=e.asm.Sg).apply(null,arguments)},e._MagickImage_GetNextProfileName=function(){return(e._MagickImage_GetNextProfileName=e.asm.Tg).apply(null,arguments)},e._MagickImage_GetProfile=function(){return(e._MagickImage_GetProfile=e.asm.Ug).apply(null,arguments)},e._MagickImage_GetReadMask=function(){return(e._MagickImage_GetReadMask=e.asm.Vg).apply(null,arguments)},e._MagickImage_GetWriteMask=function(){return(e._MagickImage_GetWriteMask=e.asm.Wg).apply(null,arguments)},e._MagickImage_Grayscale=function(){return(e._MagickImage_Grayscale=e.asm.Xg).apply(null,arguments)},e._MagickImage_HaldClut=function(){return(e._MagickImage_HaldClut=e.asm.Yg).apply(null,arguments)},e._MagickImage_HasChannel=function(){return(e._MagickImage_HasChannel=e.asm.Zg).apply(null,arguments)},e._MagickImage_HasProfile=function(){return(e._MagickImage_HasProfile=e.asm._g).apply(null,arguments)},e._MagickImage_Histogram=function(){return(e._MagickImage_Histogram=e.asm.$g).apply(null,arguments)},e._MagickImage_HoughLine=function(){return(e._MagickImage_HoughLine=e.asm.ah).apply(null,arguments)},e._MagickImage_Implode=function(){return(e._MagickImage_Implode=e.asm.bh).apply(null,arguments)},e._MagickImage_ImportPixels=function(){return(e._MagickImage_ImportPixels=e.asm.ch).apply(null,arguments)},e._MagickImage_Integral=function(){return(e._MagickImage_Integral=e.asm.dh).apply(null,arguments)},e._MagickImage_InterpolativeResize=function(){return(e._MagickImage_InterpolativeResize=e.asm.eh).apply(null,arguments)},e._MagickImage_InverseLevel=function(){return(e._MagickImage_InverseLevel=e.asm.fh).apply(null,arguments)},e._MagickImage_Kmeans=function(){return(e._MagickImage_Kmeans=e.asm.gh).apply(null,arguments)},e._MagickImage_Kuwahara=function(){return(e._MagickImage_Kuwahara=e.asm.hh).apply(null,arguments)},e._MagickImage_Level=function(){return(e._MagickImage_Level=e.asm.ih).apply(null,arguments)},e._MagickImage_LevelColors=function(){return(e._MagickImage_LevelColors=e.asm.jh).apply(null,arguments)},e._MagickImage_LinearStretch=function(){return(e._MagickImage_LinearStretch=e.asm.kh).apply(null,arguments)},e._MagickImage_LiquidRescale=function(){return(e._MagickImage_LiquidRescale=e.asm.lh).apply(null,arguments)},e._MagickImage_LocalContrast=function(){return(e._MagickImage_LocalContrast=e.asm.mh).apply(null,arguments)},e._MagickImage_Magnify=function(){return(e._MagickImage_Magnify=e.asm.nh).apply(null,arguments)},e._MagickImage_MeanShift=function(){return(e._MagickImage_MeanShift=e.asm.oh).apply(null,arguments)},e._MagickImage_Minify=function(){return(e._MagickImage_Minify=e.asm.ph).apply(null,arguments)},e._MagickImage_MinimumBoundingBox=function(){return(e._MagickImage_MinimumBoundingBox=e.asm.qh).apply(null,arguments)},e._MagickImage_Modulate=function(){return(e._MagickImage_Modulate=e.asm.rh).apply(null,arguments)},e._MagickImage_Moments=function(){return(e._MagickImage_Moments=e.asm.sh).apply(null,arguments)},e._MagickImage_Morphology=function(){return(e._MagickImage_Morphology=e.asm.th).apply(null,arguments)},e._MagickImage_MotionBlur=function(){return(e._MagickImage_MotionBlur=e.asm.uh).apply(null,arguments)},e._MagickImage_Negate=function(){return(e._MagickImage_Negate=e.asm.vh).apply(null,arguments)},e._MagickImage_Normalize=function(){return(e._MagickImage_Normalize=e.asm.wh).apply(null,arguments)},e._MagickImage_OilPaint=function(){return(e._MagickImage_OilPaint=e.asm.xh).apply(null,arguments)},e._MagickImage_Opaque=function(){return(e._MagickImage_Opaque=e.asm.yh).apply(null,arguments)},e._MagickImage_OrderedDither=function(){return(e._MagickImage_OrderedDither=e.asm.zh).apply(null,arguments)},e._MagickImage_Perceptible=function(){return(e._MagickImage_Perceptible=e.asm.Ah).apply(null,arguments)},e._MagickImage_PerceptualHash=function(){return(e._MagickImage_PerceptualHash=e.asm.Bh).apply(null,arguments)},e._MagickImage_Quantize=function(){return(e._MagickImage_Quantize=e.asm.Ch).apply(null,arguments)},e._MagickImage_Polaroid=function(){return(e._MagickImage_Polaroid=e.asm.Dh).apply(null,arguments)},e._MagickImage_Posterize=function(){return(e._MagickImage_Posterize=e.asm.Eh).apply(null,arguments)},e._MagickImage_RaiseOrLower=function(){return(e._MagickImage_RaiseOrLower=e.asm.Fh).apply(null,arguments)},e._MagickImage_RandomThreshold=function(){return(e._MagickImage_RandomThreshold=e.asm.Gh).apply(null,arguments)},e._MagickImage_RangeThreshold=function(){return(e._MagickImage_RangeThreshold=e.asm.Hh).apply(null,arguments)},e._MagickImage_ReadBlob=function(){return(e._MagickImage_ReadBlob=e.asm.Ih).apply(null,arguments)},e._MagickImage_ReadFile=function(){return(e._MagickImage_ReadFile=e.asm.Jh).apply(null,arguments)},e._MagickImage_ReadPixels=function(){return(e._MagickImage_ReadPixels=e.asm.Kh).apply(null,arguments)},e._MagickImage_ReadStream=function(){return(e._MagickImage_ReadStream=e.asm.Lh).apply(null,arguments)},e._MagickImage_RegionMask=function(){return(e._MagickImage_RegionMask=e.asm.Mh).apply(null,arguments)},e._MagickImage_Remap=function(){return(e._MagickImage_Remap=e.asm.Nh).apply(null,arguments)},e._MagickImage_RemoveArtifact=function(){return(e._MagickImage_RemoveArtifact=e.asm.Oh).apply(null,arguments)},e._MagickImage_RemoveAttribute=function(){return(e._MagickImage_RemoveAttribute=e.asm.Ph).apply(null,arguments)},e._MagickImage_RemoveProfile=function(){return(e._MagickImage_RemoveProfile=e.asm.Qh).apply(null,arguments)},e._MagickImage_ResetArtifactIterator=function(){return(e._MagickImage_ResetArtifactIterator=e.asm.Rh).apply(null,arguments)},e._MagickImage_ResetAttributeIterator=function(){return(e._MagickImage_ResetAttributeIterator=e.asm.Sh).apply(null,arguments)},e._MagickImage_ResetProfileIterator=function(){return(e._MagickImage_ResetProfileIterator=e.asm.Th).apply(null,arguments)},e._MagickImage_Resample=function(){return(e._MagickImage_Resample=e.asm.Uh).apply(null,arguments)},e._MagickImage_Resize=function(){return(e._MagickImage_Resize=e.asm.Vh).apply(null,arguments)},e._MagickImage_Roll=function(){return(e._MagickImage_Roll=e.asm.Wh).apply(null,arguments)},e._MagickImage_Rotate=function(){return(e._MagickImage_Rotate=e.asm.Xh).apply(null,arguments)},e._MagickImage_RotationalBlur=function(){return(e._MagickImage_RotationalBlur=e.asm.Yh).apply(null,arguments)},e._MagickImage_Sample=function(){return(e._MagickImage_Sample=e.asm.Zh).apply(null,arguments)},e._MagickImage_Scale=function(){return(e._MagickImage_Scale=e.asm._h).apply(null,arguments)},e._MagickImage_Segment=function(){return(e._MagickImage_Segment=e.asm.$h).apply(null,arguments)},e._MagickImage_SelectiveBlur=function(){return(e._MagickImage_SelectiveBlur=e.asm.ai).apply(null,arguments)},e._MagickImage_Separate=function(){return(e._MagickImage_Separate=e.asm.bi).apply(null,arguments)},e._MagickImage_SepiaTone=function(){return(e._MagickImage_SepiaTone=e.asm.ci).apply(null,arguments)},e._MagickImage_SetAlpha=function(){return(e._MagickImage_SetAlpha=e.asm.di).apply(null,arguments)},e._MagickImage_SetArtifact=function(){return(e._MagickImage_SetArtifact=e.asm.ei).apply(null,arguments)},e._MagickImage_SetAttribute=function(){return(e._MagickImage_SetAttribute=e.asm.fi).apply(null,arguments)},e._MagickImage_SetBitDepth=function(){return(e._MagickImage_SetBitDepth=e.asm.gi).apply(null,arguments)},e._MagickImage_SetClientData=function(){return(e._MagickImage_SetClientData=e.asm.hi).apply(null,arguments)},e._MagickImage_SetColormapColor=function(){return(e._MagickImage_SetColormapColor=e.asm.ii).apply(null,arguments)},e._MagickImage_SetColorMetric=function(){return(e._MagickImage_SetColorMetric=e.asm.ji).apply(null,arguments)},e._MagickImage_SetNext=function(){return(e._MagickImage_SetNext=e.asm.ki).apply(null,arguments)},e._MagickImage_SetProfile=function(){return(e._MagickImage_SetProfile=e.asm.li).apply(null,arguments)},e._MagickImage_SetProgressDelegate=function(){return(e._MagickImage_SetProgressDelegate=e.asm.mi).apply(null,arguments)},e._MagickImage_SetReadMask=function(){return(e._MagickImage_SetReadMask=e.asm.ni).apply(null,arguments)},e._MagickImage_SetWriteMask=function(){return(e._MagickImage_SetWriteMask=e.asm.oi).apply(null,arguments)},e._MagickImage_Shade=function(){return(e._MagickImage_Shade=e.asm.pi).apply(null,arguments)},e._MagickImage_Shadow=function(){return(e._MagickImage_Shadow=e.asm.qi).apply(null,arguments)},e._MagickImage_Sharpen=function(){return(e._MagickImage_Sharpen=e.asm.ri).apply(null,arguments)},e._MagickImage_Shave=function(){return(e._MagickImage_Shave=e.asm.si).apply(null,arguments)},e._MagickImage_Shear=function(){return(e._MagickImage_Shear=e.asm.ti).apply(null,arguments)},e._MagickImage_SigmoidalContrast=function(){return(e._MagickImage_SigmoidalContrast=e.asm.ui).apply(null,arguments)},e._MagickImage_SparseColor=function(){return(e._MagickImage_SparseColor=e.asm.vi).apply(null,arguments)},e._MagickImage_Spread=function(){return(e._MagickImage_Spread=e.asm.wi).apply(null,arguments)},e._MagickImage_Sketch=function(){return(e._MagickImage_Sketch=e.asm.xi).apply(null,arguments)},e._MagickImage_Solarize=function(){return(e._MagickImage_Solarize=e.asm.yi).apply(null,arguments)},e._MagickImage_SortPixels=function(){return(e._MagickImage_SortPixels=e.asm.zi).apply(null,arguments)},e._MagickImage_Splice=function(){return(e._MagickImage_Splice=e.asm.Ai).apply(null,arguments)},e._MagickImage_Statistic=function(){return(e._MagickImage_Statistic=e.asm.Bi).apply(null,arguments)},e._MagickImage_Statistics=function(){return(e._MagickImage_Statistics=e.asm.Ci).apply(null,arguments)},e._MagickImage_Stegano=function(){return(e._MagickImage_Stegano=e.asm.Di).apply(null,arguments)},e._MagickImage_Stereo=function(){return(e._MagickImage_Stereo=e.asm.Ei).apply(null,arguments)},e._MagickImage_Strip=function(){return(e._MagickImage_Strip=e.asm.Fi).apply(null,arguments)},e._MagickImage_SubImageSearch=function(){return(e._MagickImage_SubImageSearch=e.asm.Gi).apply(null,arguments)},e._MagickImage_Swirl=function(){return(e._MagickImage_Swirl=e.asm.Hi).apply(null,arguments)},e._MagickImage_Texture=function(){return(e._MagickImage_Texture=e.asm.Ii).apply(null,arguments)},e._MagickImage_Threshold=function(){return(e._MagickImage_Threshold=e.asm.Ji).apply(null,arguments)},e._MagickImage_Thumbnail=function(){return(e._MagickImage_Thumbnail=e.asm.Ki).apply(null,arguments)},e._MagickImage_Tint=function(){return(e._MagickImage_Tint=e.asm.Li).apply(null,arguments)},e._MagickImage_Transparent=function(){return(e._MagickImage_Transparent=e.asm.Mi).apply(null,arguments)},e._MagickImage_TransparentChroma=function(){return(e._MagickImage_TransparentChroma=e.asm.Ni).apply(null,arguments)},e._MagickImage_Transpose=function(){return(e._MagickImage_Transpose=e.asm.Oi).apply(null,arguments)},e._MagickImage_Transverse=function(){return(e._MagickImage_Transverse=e.asm.Pi).apply(null,arguments)},e._MagickImage_Trim=function(){return(e._MagickImage_Trim=e.asm.Qi).apply(null,arguments)},e._MagickImage_UniqueColors=function(){return(e._MagickImage_UniqueColors=e.asm.Ri).apply(null,arguments)},e._MagickImage_UnsharpMask=function(){return(e._MagickImage_UnsharpMask=e.asm.Si).apply(null,arguments)},e._MagickImage_Vignette=function(){return(e._MagickImage_Vignette=e.asm.Ti).apply(null,arguments)},e._MagickImage_Wave=function(){return(e._MagickImage_Wave=e.asm.Ui).apply(null,arguments)},e._MagickImage_WaveletDenoise=function(){return(e._MagickImage_WaveletDenoise=e.asm.Vi).apply(null,arguments)},e._MagickImage_WhiteBalance=function(){return(e._MagickImage_WhiteBalance=e.asm.Wi).apply(null,arguments)},e._MagickImage_WhiteThreshold=function(){return(e._MagickImage_WhiteThreshold=e.asm.Xi).apply(null,arguments)},e._MagickImage_WriteBlob=function(){return(e._MagickImage_WriteBlob=e.asm.Yi).apply(null,arguments)},e._MagickImage_WriteFile=function(){return(e._MagickImage_WriteFile=e.asm.Zi).apply(null,arguments)},e._MagickImage_WriteStream=function(){return(e._MagickImage_WriteStream=e.asm._i).apply(null,arguments)},e._MagickImageCollection_Append=function(){return(e._MagickImageCollection_Append=e.asm.$i).apply(null,arguments)},e._MagickImageCollection_Coalesce=function(){return(e._MagickImageCollection_Coalesce=e.asm.aj).apply(null,arguments)},e._MagickImageCollection_Combine=function(){return(e._MagickImageCollection_Combine=e.asm.bj).apply(null,arguments)},e._MagickImageCollection_Complex=function(){return(e._MagickImageCollection_Complex=e.asm.cj).apply(null,arguments)},e._MagickImageCollection_Deconstruct=function(){return(e._MagickImageCollection_Deconstruct=e.asm.dj).apply(null,arguments)},e._MagickImageCollection_Dispose=function(){return(e._MagickImageCollection_Dispose=e.asm.ej).apply(null,arguments)},e._MagickImageCollection_Evaluate=function(){return(e._MagickImageCollection_Evaluate=e.asm.fj).apply(null,arguments)},e._MagickImageCollection_Fx=function(){return(e._MagickImageCollection_Fx=e.asm.gj).apply(null,arguments)},e._MagickImageCollection_Merge=function(){return(e._MagickImageCollection_Merge=e.asm.hj).apply(null,arguments)},e._MagickImageCollection_Montage=function(){return(e._MagickImageCollection_Montage=e.asm.ij).apply(null,arguments)},e._MagickImageCollection_Morph=function(){return(e._MagickImageCollection_Morph=e.asm.jj).apply(null,arguments)},e._MagickImageCollection_Optimize=function(){return(e._MagickImageCollection_Optimize=e.asm.kj).apply(null,arguments)},e._MagickImageCollection_OptimizePlus=function(){return(e._MagickImageCollection_OptimizePlus=e.asm.lj).apply(null,arguments)},e._MagickImageCollection_OptimizeTransparency=function(){return(e._MagickImageCollection_OptimizeTransparency=e.asm.mj).apply(null,arguments)},e._MagickImageCollection_Polynomial=function(){return(e._MagickImageCollection_Polynomial=e.asm.nj).apply(null,arguments)},e._MagickImageCollection_Quantize=function(){return(e._MagickImageCollection_Quantize=e.asm.oj).apply(null,arguments)},e._MagickImageCollection_ReadBlob=function(){return(e._MagickImageCollection_ReadBlob=e.asm.pj).apply(null,arguments)},e._MagickImageCollection_ReadFile=function(){return(e._MagickImageCollection_ReadFile=e.asm.qj).apply(null,arguments)},e._MagickImageCollection_ReadStream=function(){return(e._MagickImageCollection_ReadStream=e.asm.rj).apply(null,arguments)},e._MagickImageCollection_Remap=function(){return(e._MagickImageCollection_Remap=e.asm.sj).apply(null,arguments)},e._MagickImageCollection_Smush=function(){return(e._MagickImageCollection_Smush=e.asm.tj).apply(null,arguments)},e._MagickImageCollection_WriteFile=function(){return(e._MagickImageCollection_WriteFile=e.asm.uj).apply(null,arguments)},e._MagickImageCollection_WriteStream=function(){return(e._MagickImageCollection_WriteStream=e.asm.vj).apply(null,arguments)},e._DoubleMatrix_Create=function(){return(e._DoubleMatrix_Create=e.asm.wj).apply(null,arguments)},e._DoubleMatrix_Dispose=function(){return(e._DoubleMatrix_Dispose=e.asm.xj).apply(null,arguments)},e._OpenCL_GetDevices=function(){return(e._OpenCL_GetDevices=e.asm.yj).apply(null,arguments)},e._OpenCL_GetDevice=function(){return(e._OpenCL_GetDevice=e.asm.zj).apply(null,arguments)},e._OpenCL_GetEnabled=function(){return(e._OpenCL_GetEnabled=e.asm.Aj).apply(null,arguments)},e._OpenCL_SetEnabled=function(){return(e._OpenCL_SetEnabled=e.asm.Bj).apply(null,arguments)},e._OpenCLDevice_DeviceType_Get=function(){return(e._OpenCLDevice_DeviceType_Get=e.asm.Cj).apply(null,arguments)},e._OpenCLDevice_BenchmarkScore_Get=function(){return(e._OpenCLDevice_BenchmarkScore_Get=e.asm.Dj).apply(null,arguments)},e._OpenCLDevice_IsEnabled_Get=function(){return(e._OpenCLDevice_IsEnabled_Get=e.asm.Ej).apply(null,arguments)},e._OpenCLDevice_IsEnabled_Set=function(){return(e._OpenCLDevice_IsEnabled_Set=e.asm.Fj).apply(null,arguments)},e._OpenCLDevice_Name_Get=function(){return(e._OpenCLDevice_Name_Get=e.asm.Gj).apply(null,arguments)},e._OpenCLDevice_Version_Get=function(){return(e._OpenCLDevice_Version_Get=e.asm.Hj).apply(null,arguments)},e._OpenCLDevice_GetKernelProfileRecords=function(){return(e._OpenCLDevice_GetKernelProfileRecords=e.asm.Ij).apply(null,arguments)},e._OpenCLDevice_GetKernelProfileRecord=function(){return(e._OpenCLDevice_GetKernelProfileRecord=e.asm.Jj).apply(null,arguments)},e._OpenCLDevice_SetProfileKernels=function(){return(e._OpenCLDevice_SetProfileKernels=e.asm.Kj).apply(null,arguments)},e._OpenCLKernelProfileRecord_Count_Get=function(){return(e._OpenCLKernelProfileRecord_Count_Get=e.asm.Lj).apply(null,arguments)},e._OpenCLKernelProfileRecord_Name_Get=function(){return(e._OpenCLKernelProfileRecord_Name_Get=e.asm.Mj).apply(null,arguments)},e._OpenCLKernelProfileRecord_MaximumDuration_Get=function(){return(e._OpenCLKernelProfileRecord_MaximumDuration_Get=e.asm.Nj).apply(null,arguments)},e._OpenCLKernelProfileRecord_MinimumDuration_Get=function(){return(e._OpenCLKernelProfileRecord_MinimumDuration_Get=e.asm.Oj).apply(null,arguments)},e._OpenCLKernelProfileRecord_TotalDuration_Get=function(){return(e._OpenCLKernelProfileRecord_TotalDuration_Get=e.asm.Pj).apply(null,arguments)},e._JpegOptimizer_CompressFile=function(){return(e._JpegOptimizer_CompressFile=e.asm.Qj).apply(null,arguments)},e._JpegOptimizer_CompressStream=function(){return(e._JpegOptimizer_CompressStream=e.asm.Rj).apply(null,arguments)};var Xt=e._malloc=function(){return(Xt=e._malloc=e.asm.Sj).apply(null,arguments)},Ae=e._free=function(){return(Ae=e._free=e.asm.Tj).apply(null,arguments)},Mt=function(){return(Mt=e.asm.Uj).apply(null,arguments)};e._PixelCollection_Create=function(){return(e._PixelCollection_Create=e.asm.Vj).apply(null,arguments)},e._PixelCollection_Dispose=function(){return(e._PixelCollection_Dispose=e.asm.Wj).apply(null,arguments)},e._PixelCollection_GetArea=function(){return(e._PixelCollection_GetArea=e.asm.Xj).apply(null,arguments)},e._PixelCollection_GetReadOnlyArea=function(){return(e._PixelCollection_GetReadOnlyArea=e.asm.Yj).apply(null,arguments)},e._PixelCollection_SetArea=function(){return(e._PixelCollection_SetArea=e.asm.Zj).apply(null,arguments)},e._PixelCollection_ToByteArray=function(){return(e._PixelCollection_ToByteArray=e.asm._j).apply(null,arguments)},e._PixelCollection_ToShortArray=function(){return(e._PixelCollection_ToShortArray=e.asm.$j).apply(null,arguments)},e._Quantum_Depth_Get=function(){return(e._Quantum_Depth_Get=e.asm.ak).apply(null,arguments)},e._Quantum_Max_Get=function(){return(e._Quantum_Max_Get=e.asm.bk).apply(null,arguments)},e._Quantum_ScaleToByte=function(){return(e._Quantum_ScaleToByte=e.asm.ck).apply(null,arguments)},e._ResourceLimits_Area_Get=function(){return(e._ResourceLimits_Area_Get=e.asm.dk).apply(null,arguments)},e._ResourceLimits_Area_Set=function(){return(e._ResourceLimits_Area_Set=e.asm.ek).apply(null,arguments)},e._ResourceLimits_Disk_Get=function(){return(e._ResourceLimits_Disk_Get=e.asm.fk).apply(null,arguments)},e._ResourceLimits_Disk_Set=function(){return(e._ResourceLimits_Disk_Set=e.asm.gk).apply(null,arguments)},e._ResourceLimits_Height_Get=function(){return(e._ResourceLimits_Height_Get=e.asm.hk).apply(null,arguments)},e._ResourceLimits_Height_Set=function(){return(e._ResourceLimits_Height_Set=e.asm.ik).apply(null,arguments)},e._ResourceLimits_ListLength_Get=function(){return(e._ResourceLimits_ListLength_Get=e.asm.jk).apply(null,arguments)},e._ResourceLimits_ListLength_Set=function(){return(e._ResourceLimits_ListLength_Set=e.asm.kk).apply(null,arguments)},e._ResourceLimits_MaxMemoryRequest_Get=function(){return(e._ResourceLimits_MaxMemoryRequest_Get=e.asm.lk).apply(null,arguments)},e._ResourceLimits_MaxMemoryRequest_Set=function(){return(e._ResourceLimits_MaxMemoryRequest_Set=e.asm.mk).apply(null,arguments)},e._ResourceLimits_MaxProfileSize_Get=function(){return(e._ResourceLimits_MaxProfileSize_Get=e.asm.nk).apply(null,arguments)},e._ResourceLimits_MaxProfileSize_Set=function(){return(e._ResourceLimits_MaxProfileSize_Set=e.asm.ok).apply(null,arguments)},e._ResourceLimits_Memory_Get=function(){return(e._ResourceLimits_Memory_Get=e.asm.pk).apply(null,arguments)},e._ResourceLimits_Memory_Set=function(){return(e._ResourceLimits_Memory_Set=e.asm.qk).apply(null,arguments)},e._ResourceLimits_Thread_Get=function(){return(e._ResourceLimits_Thread_Get=e.asm.rk).apply(null,arguments)},e._ResourceLimits_Thread_Set=function(){return(e._ResourceLimits_Thread_Set=e.asm.sk).apply(null,arguments)},e._ResourceLimits_Throttle_Get=function(){return(e._ResourceLimits_Throttle_Get=e.asm.tk).apply(null,arguments)},e._ResourceLimits_Throttle_Set=function(){return(e._ResourceLimits_Throttle_Set=e.asm.uk).apply(null,arguments)},e._ResourceLimits_Time_Get=function(){return(e._ResourceLimits_Time_Get=e.asm.vk).apply(null,arguments)},e._ResourceLimits_Time_Set=function(){return(e._ResourceLimits_Time_Set=e.asm.wk).apply(null,arguments)},e._ResourceLimits_Width_Get=function(){return(e._ResourceLimits_Width_Get=e.asm.xk).apply(null,arguments)},e._ResourceLimits_Width_Set=function(){return(e._ResourceLimits_Width_Set=e.asm.yk).apply(null,arguments)},e._ResourceLimits_LimitMemory=function(){return(e._ResourceLimits_LimitMemory=e.asm.zk).apply(null,arguments)},e._DrawingSettings_Create=function(){return(e._DrawingSettings_Create=e.asm.Ak).apply(null,arguments)},e._DrawingSettings_Dispose=function(){return(e._DrawingSettings_Dispose=e.asm.Bk).apply(null,arguments)},e._DrawingSettings_BorderColor_Get=function(){return(e._DrawingSettings_BorderColor_Get=e.asm.Ck).apply(null,arguments)},e._DrawingSettings_BorderColor_Set=function(){return(e._DrawingSettings_BorderColor_Set=e.asm.Dk).apply(null,arguments)},e._DrawingSettings_FillColor_Get=function(){return(e._DrawingSettings_FillColor_Get=e.asm.Ek).apply(null,arguments)},e._DrawingSettings_FillColor_Set=function(){return(e._DrawingSettings_FillColor_Set=e.asm.Fk).apply(null,arguments)},e._DrawingSettings_FillRule_Get=function(){return(e._DrawingSettings_FillRule_Get=e.asm.Gk).apply(null,arguments)},e._DrawingSettings_FillRule_Set=function(){return(e._DrawingSettings_FillRule_Set=e.asm.Hk).apply(null,arguments)},e._DrawingSettings_Font_Get=function(){return(e._DrawingSettings_Font_Get=e.asm.Ik).apply(null,arguments)},e._DrawingSettings_Font_Set=function(){return(e._DrawingSettings_Font_Set=e.asm.Jk).apply(null,arguments)},e._DrawingSettings_FontFamily_Get=function(){return(e._DrawingSettings_FontFamily_Get=e.asm.Kk).apply(null,arguments)},e._DrawingSettings_FontFamily_Set=function(){return(e._DrawingSettings_FontFamily_Set=e.asm.Lk).apply(null,arguments)},e._DrawingSettings_FontPointsize_Get=function(){return(e._DrawingSettings_FontPointsize_Get=e.asm.Mk).apply(null,arguments)},e._DrawingSettings_FontPointsize_Set=function(){return(e._DrawingSettings_FontPointsize_Set=e.asm.Nk).apply(null,arguments)},e._DrawingSettings_FontStyle_Get=function(){return(e._DrawingSettings_FontStyle_Get=e.asm.Ok).apply(null,arguments)},e._DrawingSettings_FontStyle_Set=function(){return(e._DrawingSettings_FontStyle_Set=e.asm.Pk).apply(null,arguments)},e._DrawingSettings_FontWeight_Get=function(){return(e._DrawingSettings_FontWeight_Get=e.asm.Qk).apply(null,arguments)},e._DrawingSettings_FontWeight_Set=function(){return(e._DrawingSettings_FontWeight_Set=e.asm.Rk).apply(null,arguments)},e._DrawingSettings_StrokeAntiAlias_Get=function(){return(e._DrawingSettings_StrokeAntiAlias_Get=e.asm.Sk).apply(null,arguments)},e._DrawingSettings_StrokeAntiAlias_Set=function(){return(e._DrawingSettings_StrokeAntiAlias_Set=e.asm.Tk).apply(null,arguments)},e._DrawingSettings_StrokeColor_Get=function(){return(e._DrawingSettings_StrokeColor_Get=e.asm.Uk).apply(null,arguments)},e._DrawingSettings_StrokeColor_Set=function(){return(e._DrawingSettings_StrokeColor_Set=e.asm.Vk).apply(null,arguments)},e._DrawingSettings_StrokeDashOffset_Get=function(){return(e._DrawingSettings_StrokeDashOffset_Get=e.asm.Wk).apply(null,arguments)},e._DrawingSettings_StrokeDashOffset_Set=function(){return(e._DrawingSettings_StrokeDashOffset_Set=e.asm.Xk).apply(null,arguments)},e._DrawingSettings_StrokeLineCap_Get=function(){return(e._DrawingSettings_StrokeLineCap_Get=e.asm.Yk).apply(null,arguments)},e._DrawingSettings_StrokeLineCap_Set=function(){return(e._DrawingSettings_StrokeLineCap_Set=e.asm.Zk).apply(null,arguments)},e._DrawingSettings_StrokeLineJoin_Get=function(){return(e._DrawingSettings_StrokeLineJoin_Get=e.asm._k).apply(null,arguments)},e._DrawingSettings_StrokeLineJoin_Set=function(){return(e._DrawingSettings_StrokeLineJoin_Set=e.asm.$k).apply(null,arguments)},e._DrawingSettings_StrokeMiterLimit_Get=function(){return(e._DrawingSettings_StrokeMiterLimit_Get=e.asm.al).apply(null,arguments)},e._DrawingSettings_StrokeMiterLimit_Set=function(){return(e._DrawingSettings_StrokeMiterLimit_Set=e.asm.bl).apply(null,arguments)},e._DrawingSettings_StrokeWidth_Get=function(){return(e._DrawingSettings_StrokeWidth_Get=e.asm.cl).apply(null,arguments)},e._DrawingSettings_StrokeWidth_Set=function(){return(e._DrawingSettings_StrokeWidth_Set=e.asm.dl).apply(null,arguments)},e._DrawingSettings_TextAntiAlias_Get=function(){return(e._DrawingSettings_TextAntiAlias_Get=e.asm.el).apply(null,arguments)},e._DrawingSettings_TextAntiAlias_Set=function(){return(e._DrawingSettings_TextAntiAlias_Set=e.asm.fl).apply(null,arguments)},e._DrawingSettings_TextDirection_Get=function(){return(e._DrawingSettings_TextDirection_Get=e.asm.gl).apply(null,arguments)},e._DrawingSettings_TextDirection_Set=function(){return(e._DrawingSettings_TextDirection_Set=e.asm.hl).apply(null,arguments)},e._DrawingSettings_TextEncoding_Get=function(){return(e._DrawingSettings_TextEncoding_Get=e.asm.il).apply(null,arguments)},e._DrawingSettings_TextEncoding_Set=function(){return(e._DrawingSettings_TextEncoding_Set=e.asm.jl).apply(null,arguments)},e._DrawingSettings_TextGravity_Get=function(){return(e._DrawingSettings_TextGravity_Get=e.asm.kl).apply(null,arguments)},e._DrawingSettings_TextGravity_Set=function(){return(e._DrawingSettings_TextGravity_Set=e.asm.ll).apply(null,arguments)},e._DrawingSettings_TextInterlineSpacing_Get=function(){return(e._DrawingSettings_TextInterlineSpacing_Get=e.asm.ml).apply(null,arguments)},e._DrawingSettings_TextInterlineSpacing_Set=function(){return(e._DrawingSettings_TextInterlineSpacing_Set=e.asm.nl).apply(null,arguments)},e._DrawingSettings_TextInterwordSpacing_Get=function(){return(e._DrawingSettings_TextInterwordSpacing_Get=e.asm.ol).apply(null,arguments)},e._DrawingSettings_TextInterwordSpacing_Set=function(){return(e._DrawingSettings_TextInterwordSpacing_Set=e.asm.pl).apply(null,arguments)},e._DrawingSettings_TextKerning_Get=function(){return(e._DrawingSettings_TextKerning_Get=e.asm.ql).apply(null,arguments)},e._DrawingSettings_TextKerning_Set=function(){return(e._DrawingSettings_TextKerning_Set=e.asm.rl).apply(null,arguments)},e._DrawingSettings_TextUnderColor_Get=function(){return(e._DrawingSettings_TextUnderColor_Get=e.asm.sl).apply(null,arguments)},e._DrawingSettings_TextUnderColor_Set=function(){return(e._DrawingSettings_TextUnderColor_Set=e.asm.tl).apply(null,arguments)},e._DrawingSettings_SetAffine=function(){return(e._DrawingSettings_SetAffine=e.asm.ul).apply(null,arguments)},e._DrawingSettings_SetFillPattern=function(){return(e._DrawingSettings_SetFillPattern=e.asm.vl).apply(null,arguments)},e._DrawingSettings_SetStrokeDashArray=function(){return(e._DrawingSettings_SetStrokeDashArray=e.asm.wl).apply(null,arguments)},e._DrawingSettings_SetStrokePattern=function(){return(e._DrawingSettings_SetStrokePattern=e.asm.xl).apply(null,arguments)},e._DrawingSettings_SetText=function(){return(e._DrawingSettings_SetText=e.asm.yl).apply(null,arguments)},e._MagickSettings_Create=function(){return(e._MagickSettings_Create=e.asm.zl).apply(null,arguments)},e._MagickSettings_Dispose=function(){return(e._MagickSettings_Dispose=e.asm.Al).apply(null,arguments)},e._MagickSettings_AntiAlias_Get=function(){return(e._MagickSettings_AntiAlias_Get=e.asm.Bl).apply(null,arguments)},e._MagickSettings_AntiAlias_Set=function(){return(e._MagickSettings_AntiAlias_Set=e.asm.Cl).apply(null,arguments)},e._MagickSettings_BackgroundColor_Get=function(){return(e._MagickSettings_BackgroundColor_Get=e.asm.Dl).apply(null,arguments)},e._MagickSettings_BackgroundColor_Set=function(){return(e._MagickSettings_BackgroundColor_Set=e.asm.El).apply(null,arguments)},e._MagickSettings_ColorSpace_Get=function(){return(e._MagickSettings_ColorSpace_Get=e.asm.Fl).apply(null,arguments)},e._MagickSettings_ColorSpace_Set=function(){return(e._MagickSettings_ColorSpace_Set=e.asm.Gl).apply(null,arguments)},e._MagickSettings_ColorType_Get=function(){return(e._MagickSettings_ColorType_Get=e.asm.Hl).apply(null,arguments)},e._MagickSettings_ColorType_Set=function(){return(e._MagickSettings_ColorType_Set=e.asm.Il).apply(null,arguments)},e._MagickSettings_Compression_Get=function(){return(e._MagickSettings_Compression_Get=e.asm.Jl).apply(null,arguments)},e._MagickSettings_Compression_Set=function(){return(e._MagickSettings_Compression_Set=e.asm.Kl).apply(null,arguments)},e._MagickSettings_Debug_Get=function(){return(e._MagickSettings_Debug_Get=e.asm.Ll).apply(null,arguments)},e._MagickSettings_Debug_Set=function(){return(e._MagickSettings_Debug_Set=e.asm.Ml).apply(null,arguments)},e._MagickSettings_Density_Get=function(){return(e._MagickSettings_Density_Get=e.asm.Nl).apply(null,arguments)},e._MagickSettings_Density_Set=function(){return(e._MagickSettings_Density_Set=e.asm.Ol).apply(null,arguments)},e._MagickSettings_Depth_Get=function(){return(e._MagickSettings_Depth_Get=e.asm.Pl).apply(null,arguments)},e._MagickSettings_Depth_Set=function(){return(e._MagickSettings_Depth_Set=e.asm.Ql).apply(null,arguments)},e._MagickSettings_Endian_Get=function(){return(e._MagickSettings_Endian_Get=e.asm.Rl).apply(null,arguments)},e._MagickSettings_Endian_Set=function(){return(e._MagickSettings_Endian_Set=e.asm.Sl).apply(null,arguments)},e._MagickSettings_Extract_Get=function(){return(e._MagickSettings_Extract_Get=e.asm.Tl).apply(null,arguments)},e._MagickSettings_Extract_Set=function(){return(e._MagickSettings_Extract_Set=e.asm.Ul).apply(null,arguments)},e._MagickSettings_Format_Get=function(){return(e._MagickSettings_Format_Get=e.asm.Vl).apply(null,arguments)},e._MagickSettings_Format_Set=function(){return(e._MagickSettings_Format_Set=e.asm.Wl).apply(null,arguments)},e._MagickSettings_FontPointsize_Get=function(){return(e._MagickSettings_FontPointsize_Get=e.asm.Xl).apply(null,arguments)},e._MagickSettings_FontPointsize_Set=function(){return(e._MagickSettings_FontPointsize_Set=e.asm.Yl).apply(null,arguments)},e._MagickSettings_Interlace_Get=function(){return(e._MagickSettings_Interlace_Get=e.asm.Zl).apply(null,arguments)},e._MagickSettings_Interlace_Set=function(){return(e._MagickSettings_Interlace_Set=e.asm._l).apply(null,arguments)},e._MagickSettings_Monochrome_Get=function(){return(e._MagickSettings_Monochrome_Get=e.asm.$l).apply(null,arguments)},e._MagickSettings_Monochrome_Set=function(){return(e._MagickSettings_Monochrome_Set=e.asm.am).apply(null,arguments)},e._MagickSettings_Verbose_Get=function(){return(e._MagickSettings_Verbose_Get=e.asm.bm).apply(null,arguments)},e._MagickSettings_Verbose_Set=function(){return(e._MagickSettings_Verbose_Set=e.asm.cm).apply(null,arguments)},e._MagickSettings_SetColorFuzz=function(){return(e._MagickSettings_SetColorFuzz=e.asm.dm).apply(null,arguments)},e._MagickSettings_SetFileName=function(){return(e._MagickSettings_SetFileName=e.asm.em).apply(null,arguments)},e._MagickSettings_SetFont=function(){return(e._MagickSettings_SetFont=e.asm.fm).apply(null,arguments)},e._MagickSettings_SetNumberScenes=function(){return(e._MagickSettings_SetNumberScenes=e.asm.gm).apply(null,arguments)},e._MagickSettings_SetOption=function(){return(e._MagickSettings_SetOption=e.asm.hm).apply(null,arguments)},e._MagickSettings_SetPage=function(){return(e._MagickSettings_SetPage=e.asm.im).apply(null,arguments)},e._MagickSettings_SetPing=function(){return(e._MagickSettings_SetPing=e.asm.jm).apply(null,arguments)},e._MagickSettings_SetQuality=function(){return(e._MagickSettings_SetQuality=e.asm.km).apply(null,arguments)},e._MagickSettings_SetScenes=function(){return(e._MagickSettings_SetScenes=e.asm.lm).apply(null,arguments)},e._MagickSettings_SetScene=function(){return(e._MagickSettings_SetScene=e.asm.mm).apply(null,arguments)},e._MagickSettings_SetSize=function(){return(e._MagickSettings_SetSize=e.asm.nm).apply(null,arguments)},e._MontageSettings_Create=function(){return(e._MontageSettings_Create=e.asm.om).apply(null,arguments)},e._MontageSettings_Dispose=function(){return(e._MontageSettings_Dispose=e.asm.pm).apply(null,arguments)},e._MontageSettings_SetBackgroundColor=function(){return(e._MontageSettings_SetBackgroundColor=e.asm.qm).apply(null,arguments)},e._MontageSettings_SetBorderColor=function(){return(e._MontageSettings_SetBorderColor=e.asm.rm).apply(null,arguments)},e._MontageSettings_SetBorderWidth=function(){return(e._MontageSettings_SetBorderWidth=e.asm.sm).apply(null,arguments)},e._MontageSettings_SetFillColor=function(){return(e._MontageSettings_SetFillColor=e.asm.tm).apply(null,arguments)},e._MontageSettings_SetFont=function(){return(e._MontageSettings_SetFont=e.asm.um).apply(null,arguments)},e._MontageSettings_SetFontPointsize=function(){return(e._MontageSettings_SetFontPointsize=e.asm.vm).apply(null,arguments)},e._MontageSettings_SetFrameGeometry=function(){return(e._MontageSettings_SetFrameGeometry=e.asm.wm).apply(null,arguments)},e._MontageSettings_SetGeometry=function(){return(e._MontageSettings_SetGeometry=e.asm.xm).apply(null,arguments)},e._MontageSettings_SetGravity=function(){return(e._MontageSettings_SetGravity=e.asm.ym).apply(null,arguments)},e._MontageSettings_SetShadow=function(){return(e._MontageSettings_SetShadow=e.asm.zm).apply(null,arguments)},e._MontageSettings_SetStrokeColor=function(){return(e._MontageSettings_SetStrokeColor=e.asm.Am).apply(null,arguments)},e._MontageSettings_SetTextureFileName=function(){return(e._MontageSettings_SetTextureFileName=e.asm.Bm).apply(null,arguments)},e._MontageSettings_SetTileGeometry=function(){return(e._MontageSettings_SetTileGeometry=e.asm.Cm).apply(null,arguments)},e._MontageSettings_SetTitle=function(){return(e._MontageSettings_SetTitle=e.asm.Dm).apply(null,arguments)},e._QuantizeSettings_SetColors=function(){return(e._QuantizeSettings_SetColors=e.asm.Em).apply(null,arguments)},e._QuantizeSettings_SetColorSpace=function(){return(e._QuantizeSettings_SetColorSpace=e.asm.Fm).apply(null,arguments)},e._QuantizeSettings_SetDitherMethod=function(){return(e._QuantizeSettings_SetDitherMethod=e.asm.Gm).apply(null,arguments)},e._QuantizeSettings_SetMeasureErrors=function(){return(e._QuantizeSettings_SetMeasureErrors=e.asm.Hm).apply(null,arguments)},e._QuantizeSettings_SetTreeDepth=function(){return(e._QuantizeSettings_SetTreeDepth=e.asm.Im).apply(null,arguments)},e._ChannelMoments_Centroid_Get=function(){return(e._ChannelMoments_Centroid_Get=e.asm.Jm).apply(null,arguments)},e._ChannelMoments_EllipseAngle_Get=function(){return(e._ChannelMoments_EllipseAngle_Get=e.asm.Km).apply(null,arguments)},e._ChannelMoments_EllipseAxis_Get=function(){return(e._ChannelMoments_EllipseAxis_Get=e.asm.Lm).apply(null,arguments)},e._ChannelMoments_EllipseEccentricity_Get=function(){return(e._ChannelMoments_EllipseEccentricity_Get=e.asm.Mm).apply(null,arguments)},e._ChannelMoments_EllipseIntensity_Get=function(){return(e._ChannelMoments_EllipseIntensity_Get=e.asm.Nm).apply(null,arguments)},e._ChannelMoments_GetHuInvariants=function(){return(e._ChannelMoments_GetHuInvariants=e.asm.Om).apply(null,arguments)},e._ChannelPerceptualHash_GetHuPhash=function(){return(e._ChannelPerceptualHash_GetHuPhash=e.asm.Pm).apply(null,arguments)},e._ChannelStatistics_Depth_Get=function(){return(e._ChannelStatistics_Depth_Get=e.asm.Qm).apply(null,arguments)},e._ChannelStatistics_Entropy_Get=function(){return(e._ChannelStatistics_Entropy_Get=e.asm.Rm).apply(null,arguments)},e._ChannelStatistics_Kurtosis_Get=function(){return(e._ChannelStatistics_Kurtosis_Get=e.asm.Sm).apply(null,arguments)},e._ChannelStatistics_Maximum_Get=function(){return(e._ChannelStatistics_Maximum_Get=e.asm.Tm).apply(null,arguments)},e._ChannelStatistics_Mean_Get=function(){return(e._ChannelStatistics_Mean_Get=e.asm.Um).apply(null,arguments)},e._ChannelStatistics_Minimum_Get=function(){return(e._ChannelStatistics_Minimum_Get=e.asm.Vm).apply(null,arguments)},e._ChannelStatistics_Skewness_Get=function(){return(e._ChannelStatistics_Skewness_Get=e.asm.Wm).apply(null,arguments)},e._ChannelStatistics_StandardDeviation_Get=function(){return(e._ChannelStatistics_StandardDeviation_Get=e.asm.Xm).apply(null,arguments)},e._Moments_DisposeList=function(){return(e._Moments_DisposeList=e.asm.Ym).apply(null,arguments)},e._Moments_GetInstance=function(){return(e._Moments_GetInstance=e.asm.Zm).apply(null,arguments)},e._PerceptualHash_DisposeList=function(){return(e._PerceptualHash_DisposeList=e.asm._m).apply(null,arguments)},e._PerceptualHash_GetInstance=function(){return(e._PerceptualHash_GetInstance=e.asm.$m).apply(null,arguments)},e._Statistics_DisposeList=function(){return(e._Statistics_DisposeList=e.asm.an).apply(null,arguments)},e._Statistics_GetInstance=function(){return(e._Statistics_GetInstance=e.asm.bn).apply(null,arguments)},e._ConnectedComponent_DisposeList=function(){return(e._ConnectedComponent_DisposeList=e.asm.cn).apply(null,arguments)},e._ConnectedComponent_GetArea=function(){return(e._ConnectedComponent_GetArea=e.asm.dn).apply(null,arguments)},e._ConnectedComponent_GetCentroid=function(){return(e._ConnectedComponent_GetCentroid=e.asm.en).apply(null,arguments)},e._ConnectedComponent_GetColor=function(){return(e._ConnectedComponent_GetColor=e.asm.fn).apply(null,arguments)},e._ConnectedComponent_GetHeight=function(){return(e._ConnectedComponent_GetHeight=e.asm.gn).apply(null,arguments)},e._ConnectedComponent_GetId=function(){return(e._ConnectedComponent_GetId=e.asm.hn).apply(null,arguments)},e._ConnectedComponent_GetWidth=function(){return(e._ConnectedComponent_GetWidth=e.asm.jn).apply(null,arguments)},e._ConnectedComponent_GetX=function(){return(e._ConnectedComponent_GetX=e.asm.kn).apply(null,arguments)},e._ConnectedComponent_GetY=function(){return(e._ConnectedComponent_GetY=e.asm.ln).apply(null,arguments)},e._ConnectedComponent_GetInstance=function(){return(e._ConnectedComponent_GetInstance=e.asm.mn).apply(null,arguments)},e._MagickGeometry_Create=function(){return(e._MagickGeometry_Create=e.asm.nn).apply(null,arguments)},e._MagickGeometry_Dispose=function(){return(e._MagickGeometry_Dispose=e.asm.on).apply(null,arguments)},e._MagickGeometry_X_Get=function(){return(e._MagickGeometry_X_Get=e.asm.pn).apply(null,arguments)};var ha=function(){return(ha=e.asm.qn).apply(null,arguments)};e._MagickGeometry_Y_Get=function(){return(e._MagickGeometry_Y_Get=e.asm.rn).apply(null,arguments)},e._MagickGeometry_Width_Get=function(){return(e._MagickGeometry_Width_Get=e.asm.sn).apply(null,arguments)},e._MagickGeometry_Height_Get=function(){return(e._MagickGeometry_Height_Get=e.asm.tn).apply(null,arguments)},e._MagickGeometry_Initialize=function(){return(e._MagickGeometry_Initialize=e.asm.un).apply(null,arguments)},e._MagickRectangle_Dispose=function(){return(e._MagickRectangle_Dispose=e.asm.vn).apply(null,arguments)},e._MagickRectangle_X_Get=function(){return(e._MagickRectangle_X_Get=e.asm.wn).apply(null,arguments)},e._MagickRectangle_X_Set=function(){return(e._MagickRectangle_X_Set=e.asm.xn).apply(null,arguments)},e._MagickRectangle_Y_Get=function(){return(e._MagickRectangle_Y_Get=e.asm.yn).apply(null,arguments)},e._MagickRectangle_Y_Set=function(){return(e._MagickRectangle_Y_Set=e.asm.zn).apply(null,arguments)},e._MagickRectangle_Width_Get=function(){return(e._MagickRectangle_Width_Get=e.asm.An).apply(null,arguments)},e._MagickRectangle_Width_Set=function(){return(e._MagickRectangle_Width_Set=e.asm.Bn).apply(null,arguments)},e._MagickRectangle_Height_Get=function(){return(e._MagickRectangle_Height_Get=e.asm.Cn).apply(null,arguments)},e._MagickRectangle_Height_Set=function(){return(e._MagickRectangle_Height_Set=e.asm.Dn).apply(null,arguments)},e._MagickRectangle_FromPageSize=function(){return(e._MagickRectangle_FromPageSize=e.asm.En).apply(null,arguments)},e._OffsetInfo_Create=function(){return(e._OffsetInfo_Create=e.asm.Fn).apply(null,arguments)},e._OffsetInfo_Dispose=function(){return(e._OffsetInfo_Dispose=e.asm.Gn).apply(null,arguments)},e._OffsetInfo_SetX=function(){return(e._OffsetInfo_SetX=e.asm.Hn).apply(null,arguments)},e._OffsetInfo_SetY=function(){return(e._OffsetInfo_SetY=e.asm.In).apply(null,arguments)},e._PointInfo_X_Get=function(){return(e._PointInfo_X_Get=e.asm.Jn).apply(null,arguments)},e._PointInfo_Y_Get=function(){return(e._PointInfo_Y_Get=e.asm.Kn).apply(null,arguments)},e._PointInfoCollection_Create=function(){return(e._PointInfoCollection_Create=e.asm.Ln).apply(null,arguments)},e._PointInfoCollection_Dispose=function(){return(e._PointInfoCollection_Dispose=e.asm.Mn).apply(null,arguments)},e._PointInfoCollection_GetX=function(){return(e._PointInfoCollection_GetX=e.asm.Nn).apply(null,arguments)},e._PointInfoCollection_GetY=function(){return(e._PointInfoCollection_GetY=e.asm.On).apply(null,arguments)},e._PointInfoCollection_Set=function(){return(e._PointInfoCollection_Set=e.asm.Pn).apply(null,arguments)},e._PrimaryInfo_Dispose=function(){return(e._PrimaryInfo_Dispose=e.asm.Qn).apply(null,arguments)},e._PrimaryInfo_X_Get=function(){return(e._PrimaryInfo_X_Get=e.asm.Rn).apply(null,arguments)},e._PrimaryInfo_X_Set=function(){return(e._PrimaryInfo_X_Set=e.asm.Sn).apply(null,arguments)},e._PrimaryInfo_Y_Get=function(){return(e._PrimaryInfo_Y_Get=e.asm.Tn).apply(null,arguments)},e._PrimaryInfo_Y_Set=function(){return(e._PrimaryInfo_Y_Set=e.asm.Un).apply(null,arguments)},e._PrimaryInfo_Z_Get=function(){return(e._PrimaryInfo_Z_Get=e.asm.Vn).apply(null,arguments)},e._PrimaryInfo_Z_Set=function(){return(e._PrimaryInfo_Z_Set=e.asm.Wn).apply(null,arguments)},e._StringInfo_Length_Get=function(){return(e._StringInfo_Length_Get=e.asm.Xn).apply(null,arguments)},e._StringInfo_Datum_Get=function(){return(e._StringInfo_Datum_Get=e.asm.Yn).apply(null,arguments)},e._TypeMetric_Dispose=function(){return(e._TypeMetric_Dispose=e.asm.Zn).apply(null,arguments)},e._TypeMetric_Ascent_Get=function(){return(e._TypeMetric_Ascent_Get=e.asm._n).apply(null,arguments)},e._TypeMetric_Descent_Get=function(){return(e._TypeMetric_Descent_Get=e.asm.$n).apply(null,arguments)},e._TypeMetric_MaxHorizontalAdvance_Get=function(){return(e._TypeMetric_MaxHorizontalAdvance_Get=e.asm.ao).apply(null,arguments)},e._TypeMetric_TextHeight_Get=function(){return(e._TypeMetric_TextHeight_Get=e.asm.bo).apply(null,arguments)},e._TypeMetric_TextWidth_Get=function(){return(e._TypeMetric_TextWidth_Get=e.asm.co).apply(null,arguments)},e._TypeMetric_UnderlinePosition_Get=function(){return(e._TypeMetric_UnderlinePosition_Get=e.asm.eo).apply(null,arguments)},e._TypeMetric_UnderlineThickness_Get=function(){return(e._TypeMetric_UnderlineThickness_Get=e.asm.fo).apply(null,arguments)};var ya=function(){return(ya=e.asm.go).apply(null,arguments)};e.__embind_initialize_bindings=function(){return(e.__embind_initialize_bindings=e.asm.ho).apply(null,arguments)};var wa=function(){return(wa=e.asm.io).apply(null,arguments)},F=function(){return(F=e.asm.jo).apply(null,arguments)},x=function(){return(x=e.asm.ko).apply(null,arguments)},$=function(){return($=e.asm.lo).apply(null,arguments)},Sa=function(){return(Sa=e.asm.mo).apply(null,arguments)},ka=function(){return(ka=e.asm.no).apply(null,arguments)};function Hu(n,a,i,s){var u=x();try{H(n)(a,i,s)}catch(c){if($(u),c!==c+0)throw c;F(1,0)}}function Uu(n,a,i,s){var u=x();try{return H(n)(a,i,s)}catch(c){if($(u),c!==c+0)throw c;F(1,0)}}function Fu(n,a,i){var s=x();try{return H(n)(a,i)}catch(u){if($(s),u!==u+0)throw u;F(1,0)}}function xu(n,a){var i=x();try{return H(n)(a)}catch(s){if($(i),s!==s+0)throw s;F(1,0)}}function $u(n,a){var i=x();try{H(n)(a)}catch(s){if($(i),s!==s+0)throw s;F(1,0)}}function Yu(n,a,i){var s=x();try{H(n)(a,i)}catch(u){if($(s),u!==u+0)throw u;F(1,0)}}function ju(n,a,i,s,u){var c=x();try{H(n)(a,i,s,u)}catch(m){if($(c),m!==m+0)throw m;F(1,0)}}function Xu(n,a,i,s,u){var c=x();try{return H(n)(a,i,s,u)}catch(m){if($(c),m!==m+0)throw m;F(1,0)}}function Vu(n,a,i,s){var u=x();try{return H(n)(a,i,s)}catch(c){if($(u),c!==c+0)throw c;return F(1,0),0n}}function qu(n,a){var i=x();try{return H(n)(a)}catch(s){if($(i),s!==s+0)throw s;return F(1,0),0n}}function Qu(n,a,i,s,u,c,m,f,h){var y=x();try{return H(n)(a,i,s,u,c,m,f,h)}catch(v){if($(y),v!==v+0)throw v;F(1,0)}}function Ju(n){var a=x();try{return H(n)()}catch(i){if($(a),i!==i+0)throw i;F(1,0)}}function Ku(n,a,i,s,u,c,m){var f=x();try{return H(n)(a,i,s,u,c,m)}catch(h){if($(f),h!==h+0)throw h;F(1,0)}}function Zu(n,a,i,s,u){var c=x();try{return H(n)(a,i,s,u)}catch(m){if($(c),m!==m+0)throw m;F(1,0)}}function Ou(n,a,i){var s=x();try{return H(n)(a,i)}catch(u){if($(s),u!==u+0)throw u;F(1,0)}}function eo(n,a,i){var s=x();try{H(n)(a,i)}catch(u){if($(s),u!==u+0)throw u;F(1,0)}}function to(n,a,i,s,u,c){var m=x();try{return H(n)(a,i,s,u,c)}catch(f){if($(m),f!==f+0)throw f;F(1,0)}}function no(n,a,i){var s=x();try{return H(n)(a,i)}catch(u){if($(s),u!==u+0)throw u;F(1,0)}}function ro(n){var a=x();try{H(n)()}catch(i){if($(a),i!==i+0)throw i;F(1,0)}}function ao(n,a,i,s,u,c){var m=x();try{H(n)(a,i,s,u,c)}catch(f){if($(m),f!==f+0)throw f;F(1,0)}}function io(n,a,i,s,u,c,m,f){var h=x();try{return H(n)(a,i,s,u,c,m,f)}catch(y){if($(h),y!==y+0)throw y;F(1,0)}}function so(n,a,i,s,u,c,m,f,h,y){var v=x();try{return H(n)(a,i,s,u,c,m,f,h,y)}catch(b){if($(v),b!==b+0)throw b;F(1,0)}}function uo(n,a,i,s){var u=x();try{H(n)(a,i,s)}catch(c){if($(u),c!==c+0)throw c;F(1,0)}}function oo(n,a,i,s,u,c,m,f,h,y,v){var b=x();try{H(n)(a,i,s,u,c,m,f,h,y,v)}catch(I){if($(b),I!==I+0)throw I;F(1,0)}}function _o(n,a,i,s,u,c,m,f,h,y){var v=x();try{H(n)(a,i,s,u,c,m,f,h,y)}catch(b){if($(v),b!==b+0)throw b;F(1,0)}}function lo(n,a,i,s,u,c,m){var f=x();try{H(n)(a,i,s,u,c,m)}catch(h){if($(f),h!==h+0)throw h;F(1,0)}}function co(n,a,i,s,u,c,m,f){var h=x();try{H(n)(a,i,s,u,c,m,f)}catch(y){if($(h),y!==y+0)throw y;F(1,0)}}function go(n,a,i,s,u,c,m,f,h,y,v,b){var I=x();try{return H(n)(a,i,s,u,c,m,f,h,y,v,b)}catch(D){if($(I),D!==D+0)throw D;F(1,0)}}function mo(n,a,i,s,u,c){var m=x();try{return H(n)(a,i,s,u,c)}catch(f){if($(m),f!==f+0)throw f;F(1,0)}}function fo(n,a,i,s,u,c,m,f,h){var y=x();try{H(n)(a,i,s,u,c,m,f,h)}catch(v){if($(y),v!==v+0)throw v;F(1,0)}}function po(n,a,i,s,u,c,m,f,h,y,v,b){var I=x();try{H(n)(a,i,s,u,c,m,f,h,y,v,b)}catch(D){if($(I),D!==D+0)throw D;F(1,0)}}e.addFunction=zu,e.setValue=ti,e.getValue=ei,e.UTF8ToString=gt,e.stringToUTF8=Ze,e.lengthBytesUTF8=xe,e.FS=l;var Vt;lt=function n(){Vt||va(),Vt||(lt=n)};function va(){if(Fe>0||($a(),Fe>0))return;function n(){Vt||(Vt=!0,e.calledRun=!0,!on&&(Ya(),o(e),e.onRuntimeInitialized&&e.onRuntimeInitialized(),ja()))}e.setStatus?(e.setStatus("Running..."),setTimeout(function(){setTimeout(function(){e.setStatus("")},1),n()},1)):n()}if(e.preInit)for(typeof e.preInit=="function"&&(e.preInit=[e.preInit]);e.preInit.length>0;)e.preInit.pop()();return va(),r.ready}})();class Aa{constructor(r){if(r instanceof URL){if(r.protocol!=="http:"&&r.protocol!=="https:")throw new Error("Only http/https protocol is supported");this.locateFile=()=>r.href}else r instanceof WebAssembly.Module?this.instantiateWasm=(e,o)=>{const g=new WebAssembly.Instance(r,e);o(g)}:this.wasmBinary=r}wasmBinary;instantiateWasm;locateFile}class _{loader;api;constructor(){this.loader=(r,e)=>new Promise((o,g)=>{if(this.api!==void 0){o();return}const p=new Aa(r);Pa(p).then(d=>{try{this.writeConfigurationFiles(d,e),Jt(d,"MAGICK_CONFIGURE_PATH",S=>{Jt(d,"/xml",G=>{d._Environment_SetEnv(S,G),this.api=d,o()})})}catch(S){g(S)}})})}async _initialize(r,e){await this.loader(r,e)}static get _api(){if(!Ct.api)throw new Z("`await initializeImageMagick` should be called to initialize the library");return Ct.api}static set _api(r){Ct.api=r}static read(r,e,o,g){return te._create(p=>{let d=g;if(typeof r!="string"&&!Le(r))typeof e=="number"&&typeof o=="number"&&p.read(r,e,o);else if(typeof e!="number"&&typeof o!="number"){d=o;let S;e instanceof ye?S=e:typeof e=="string"?(S=new ye,S.format=e):d=e,p.read(r,S)}return d(p)})}static readCollection(r,e,o){return we.create()._use(p=>{let d=o,S;return e instanceof ye?S=e:typeof e=="string"?(S=new ye,S.format=e):d=e,p.read(r,S),d(p)})}static readFromCanvas(r,e,o){return te._create(g=>(g.readFromCanvas(r,o),e(g)))}writeConfigurationFiles(r,e){r.FS.analyzePath("/xml").exists||r.FS.mkdir("/xml");for(const g of e.all()){const p=r.FS.open(`/xml/${g.fileName}`,"w"),d=new TextEncoder().encode(g.data);r.FS.write(p,d,0,d.length),r.FS.close(p)}}}const Ct=new _;async function Ea(t,r){await Ct._initialize(t,r??It.default)}class xn{constructor(r,e,o){this.origin=r,this.progress=new re((e+1)/(o*100))}origin;progress;cancel=!1}class ie{static _logDelegate=0;static _onLog;static _progressDelegate=0;static _images={};static setLogDelegate(r){ie._logDelegate===0&&r!==void 0&&(ie._logDelegate=_._api.addFunction(ie.logDelegate,"vii")),_._api._Magick_SetLogDelegate(r===void 0?0:ie._logDelegate),ie._onLog=r}static setProgressDelegate(r){ie._progressDelegate===0&&(this._progressDelegate=_._api.addFunction(ie.progressDelegate,"iijji")),this._images[r._instance]=r,_._api._MagickImage_SetClientData(r._instance,r._instance),_._api._MagickImage_SetProgressDelegate(r._instance,ie._progressDelegate)}static removeProgressDelegate(r){_._api._MagickImage_SetClientData(r._instance,0),_._api._MagickImage_SetProgressDelegate(r._instance,0),delete ie._images[r._instance]}static logDelegate(r,e){if(ie._onLog===void 0)return;const o=ge(e);ie._onLog(new An(r,o))}static progressDelegate(r,e,o,g){const p=ie._images[g];if(p===void 0||p.onProgress===void 0)return 1;const d=Number(e),S=Number(o),G=ge(r),B=new xn(G,d,S);return p.onProgress(B),B.cancel?0:1}}class Me{static _allFormats;constructor(r,e,o,g,p){this.format=r,this.description=e,this.supportsMultipleFrames=o,this.supportsReading=g,this.supportsWriting=p}description;format;supportsMultipleFrames;supportsReading;supportsWriting;static get all(){return Me._allFormats===void 0&&(Me._allFormats=Me.loadFormats()),Me._allFormats}static loadFormats(){return R.usePointer(r=>ve.use(e=>{const o=_._api._MagickFormatInfo_CreateList(e.ptr,r),g=e.value;try{const p=new Array(g),d=Object.values(he);for(let S=0;S(t[t.None=0]="None",t[t.Accelerate=1]="Accelerate",t[t.Annotate=2]="Annotate",t[t.Blob=4]="Blob",t[t.Cache=8]="Cache",t[t.Coder=16]="Coder",t[t.Configure=32]="Configure",t[t.Deprecate=64]="Deprecate",t[t.Draw=128]="Draw",t[t.Exception=256]="Exception",t[t.Image=512]="Image",t[t.Locale=1024]="Locale",t[t.Module=2048]="Module",t[t.Pixel=4096]="Pixel",t[t.Policy=8192]="Policy",t[t.Resource=16384]="Resource",t[t.Trace=32768]="Trace",t[t.Transform=65536]="Transform",t[t.User=131072]="User",t[t.Wand=262144]="Wand",t[t.Detailed=2147450879]="Detailed",t[t.All=2147483647]="All",t))(J||{});class Se{static get delegates(){return ge(_._api._Magick_Delegates_Get())}static get features(){return ge(_._api._Magick_Features_Get()).slice(0,-1)}static get imageMagickVersion(){return ge(_._api._Magick_ImageMagickVersion_Get())}static get supportedFormats(){return Me.all}static onLog;static addFont(r,e){const o=_._api.FS;o.analyzePath("/fonts").exists||o.mkdir("/fonts");const p=o.open(`/fonts/${r}`,"w");o.write(p,e,0,e.length),o.close(p)}static resetRandomSeed=()=>_._api._Magick_ResetRandomSeed();static setRandomSeed=r=>_._api._Magick_SetRandomSeed(r);static setLogEvents(r){const e=r==J.None?void 0:Se.logDelegate;ie.setLogDelegate(e);const o=Se.getEventTypeString(r);W(o,g=>_._api._Magick_SetLogEvents(g))}static _getFontFileName(r){const e=`/fonts/${r}`;if(!_._api.FS.analyzePath(e).exists)throw`Unable to find a font with the name '${r}', add it with Magick.addFont.`;return e}static getEventTypeString(r){if(r==J.All)return"All,Trace";if(r==J.Detailed)return"All";switch(r){case J.Accelerate:return"Accelerate";case J.Annotate:return"Annotate";case J.Blob:return"Blob";case J.Cache:return"Cache";case J.Coder:return"Coder";case J.Configure:return"Configure";case J.Deprecate:return"Deprecate";case J.Draw:return"Draw";case J.Exception:return"Exception";case J.Image:return"Image";case J.Locale:return"Locale";case J.Module:return"Module";case J.Pixel:return"Pixel";case J.Policy:return"Policy";case J.Resource:return"Resource";case J.Trace:return"Trace";case J.Transform:return"Transform";case J.User:return"User";case J.Wand:return"Wand";case J.None:default:return"None"}}static logDelegate(r){Se.onLog!==void 0&&Se.onLog(r)}}class $n{_font;constructor(r){this._font=r}draw(r){const e=Se._getFontFileName(this._font);r.font(e)}}class Yn{_gravity;constructor(r){this._gravity=r}draw(r){r.gravity(this._gravity)}}class jn{_startX;_startY;_endX;_endY;constructor(r,e,o,g){this._startX=r,this._startY=e,this._endX=o,this._endY=g}draw(r){r.line(this._startX,this._startY,this._endX,this._endY)}}class Xn{_x;_y;constructor(r,e){this._x=r,this._y=e}draw(r){r.point(this._x,this._y)}}class Vn{_upperLeftX;_upperLeftY;_lowerRightX;_lowerRightY;constructor(r,e,o,g){this._upperLeftX=r,this._upperLeftY=e,this._lowerRightX=o,this._lowerRightY=g}draw(r){r.rectangle(this._upperLeftX,this._upperLeftY,this._lowerRightX,this._lowerRightY)}}class qn{_upperLeftX;_upperLeftY;_lowerRightX;_lowerRightY;_cornerWidth;_cornerHeight;constructor(r,e,o,g,p,d){this._upperLeftX=r,this._upperLeftY=e,this._lowerRightX=o,this._lowerRightY=g,this._cornerWidth=p,this._cornerHeight=d}draw(r){r.roundRectangle(this._upperLeftX,this._upperLeftY,this._lowerRightX,this._lowerRightY,this._cornerWidth,this._cornerHeight)}}class Qn{_color;constructor(r){this._color=r}draw(r){r.strokeColor(this._color)}}class Jn{_width;constructor(r){this._width=r}draw(r){r.strokeWidth(this._width)}}class Kn{_alignment;constructor(r){this._alignment=r}draw(r){r.textAlignment(this._alignment)}}class qe{_isEnabled;constructor(r){this._isEnabled=r}static get disabled(){return new qe(!1)}static get enabled(){return new qe(!0)}draw(r){r.textAntialias(this._isEnabled)}}class Zn{_decoration;constructor(r){this._decoration=r}draw(r){r.textDecoration(this._decoration)}}class On{_spacing;constructor(r){this._spacing=r}draw(r){r.textInterlineSpacing(this._spacing)}}class er{_spacing;constructor(r){this._spacing=r}draw(r){r.textInterwordspacing(this._spacing)}}class tr{_kerning;constructor(r){this._kerning=r}draw(r){r.textKerning(this._kerning)}}class nr{_color;constructor(r){this._color=r}draw(r){r.textUnderColor(this._color)}}class rr{_x;_y;_value;constructor(r,e,o){this._x=r,this._y=e,this._value=o}draw(r){r.text(this._x,this._y,this._value)}}class ar{static get None(){return new w(0,0,0,0)}static get Transparent(){return new w(0,0,0,0)}static get AliceBlue(){return new w(240,248,255,255)}static get AntiqueWhite(){return new w(250,235,215,255)}static get Aqua(){return new w(0,255,255,255)}static get Aquamarine(){return new w(127,255,212,255)}static get Azure(){return new w(240,255,255,255)}static get Beige(){return new w(245,245,220,255)}static get Bisque(){return new w(255,228,196,255)}static get Black(){return new w(0,0,0,255)}static get BlanchedAlmond(){return new w(255,235,205,255)}static get Blue(){return new w(0,0,255,255)}static get BlueViolet(){return new w(138,43,226,255)}static get Brown(){return new w(165,42,42,255)}static get BurlyWood(){return new w(222,184,135,255)}static get CadetBlue(){return new w(95,158,160,255)}static get Chartreuse(){return new w(127,255,0,255)}static get Chocolate(){return new w(210,105,30,255)}static get Coral(){return new w(255,127,80,255)}static get CornflowerBlue(){return new w(100,149,237,255)}static get Cornsilk(){return new w(255,248,220,255)}static get Crimson(){return new w(220,20,60,255)}static get Cyan(){return new w(0,255,255,255)}static get DarkBlue(){return new w(0,0,139,255)}static get DarkCyan(){return new w(0,139,139,255)}static get DarkGoldenrod(){return new w(184,134,11,255)}static get DarkGray(){return new w(169,169,169,255)}static get DarkGreen(){return new w(0,100,0,255)}static get DarkKhaki(){return new w(189,183,107,255)}static get DarkMagenta(){return new w(139,0,139,255)}static get DarkOliveGreen(){return new w(85,107,47,255)}static get DarkOrange(){return new w(255,140,0,255)}static get DarkOrchid(){return new w(153,50,204,255)}static get DarkRed(){return new w(139,0,0,255)}static get DarkSalmon(){return new w(233,150,122,255)}static get DarkSeaGreen(){return new w(143,188,143,255)}static get DarkSlateBlue(){return new w(72,61,139,255)}static get DarkSlateGray(){return new w(47,79,79,255)}static get DarkTurquoise(){return new w(0,206,209,255)}static get DarkViolet(){return new w(148,0,211,255)}static get DeepPink(){return new w(255,20,147,255)}static get DeepSkyBlue(){return new w(0,191,255,255)}static get DimGray(){return new w(105,105,105,255)}static get DodgerBlue(){return new w(30,144,255,255)}static get Firebrick(){return new w(178,34,34,255)}static get FloralWhite(){return new w(255,250,240,255)}static get ForestGreen(){return new w(34,139,34,255)}static get Fuchsia(){return new w(255,0,255,255)}static get Gainsboro(){return new w(220,220,220,255)}static get GhostWhite(){return new w(248,248,255,255)}static get Gold(){return new w(255,215,0,255)}static get Goldenrod(){return new w(218,165,32,255)}static get Gray(){return new w(128,128,128,255)}static get Green(){return new w(0,128,0,255)}static get GreenYellow(){return new w(173,255,47,255)}static get Honeydew(){return new w(240,255,240,255)}static get HotPink(){return new w(255,105,180,255)}static get IndianRed(){return new w(205,92,92,255)}static get Indigo(){return new w(75,0,130,255)}static get Ivory(){return new w(255,255,240,255)}static get Khaki(){return new w(240,230,140,255)}static get Lavender(){return new w(230,230,250,255)}static get LavenderBlush(){return new w(255,240,245,255)}static get LawnGreen(){return new w(124,252,0,255)}static get LemonChiffon(){return new w(255,250,205,255)}static get LightBlue(){return new w(173,216,230,255)}static get LightCoral(){return new w(240,128,128,255)}static get LightCyan(){return new w(224,255,255,255)}static get LightGoldenrodYellow(){return new w(250,250,210,255)}static get LightGreen(){return new w(144,238,144,255)}static get LightGray(){return new w(211,211,211,255)}static get LightPink(){return new w(255,182,193,255)}static get LightSalmon(){return new w(255,160,122,255)}static get LightSeaGreen(){return new w(32,178,170,255)}static get LightSkyBlue(){return new w(135,206,250,255)}static get LightSlateGray(){return new w(119,136,153,255)}static get LightSteelBlue(){return new w(176,196,222,255)}static get LightYellow(){return new w(255,255,224,255)}static get Lime(){return new w(0,255,0,255)}static get LimeGreen(){return new w(50,205,50,255)}static get Linen(){return new w(250,240,230,255)}static get Magenta(){return new w(255,0,255,255)}static get Maroon(){return new w(128,0,0,255)}static get MediumAquamarine(){return new w(102,205,170,255)}static get MediumBlue(){return new w(0,0,205,255)}static get MediumOrchid(){return new w(186,85,211,255)}static get MediumPurple(){return new w(147,112,219,255)}static get MediumSeaGreen(){return new w(60,179,113,255)}static get MediumSlateBlue(){return new w(123,104,238,255)}static get MediumSpringGreen(){return new w(0,250,154,255)}static get MediumTurquoise(){return new w(72,209,204,255)}static get MediumVioletRed(){return new w(199,21,133,255)}static get MidnightBlue(){return new w(25,25,112,255)}static get MintCream(){return new w(245,255,250,255)}static get MistyRose(){return new w(255,228,225,255)}static get Moccasin(){return new w(255,228,181,255)}static get NavajoWhite(){return new w(255,222,173,255)}static get Navy(){return new w(0,0,128,255)}static get OldLace(){return new w(253,245,230,255)}static get Olive(){return new w(128,128,0,255)}static get OliveDrab(){return new w(107,142,35,255)}static get Orange(){return new w(255,165,0,255)}static get OrangeRed(){return new w(255,69,0,255)}static get Orchid(){return new w(218,112,214,255)}static get PaleGoldenrod(){return new w(238,232,170,255)}static get PaleGreen(){return new w(152,251,152,255)}static get PaleTurquoise(){return new w(175,238,238,255)}static get PaleVioletRed(){return new w(219,112,147,255)}static get PapayaWhip(){return new w(255,239,213,255)}static get PeachPuff(){return new w(255,218,185,255)}static get Peru(){return new w(205,133,63,255)}static get Pink(){return new w(255,192,203,255)}static get Plum(){return new w(221,160,221,255)}static get PowderBlue(){return new w(176,224,230,255)}static get Purple(){return new w(128,0,128,255)}static get RebeccaPurple(){return new w(102,51,153,255)}static get Red(){return new w(255,0,0,255)}static get RosyBrown(){return new w(188,143,143,255)}static get RoyalBlue(){return new w(65,105,225,255)}static get SaddleBrown(){return new w(139,69,19,255)}static get Salmon(){return new w(250,128,114,255)}static get SandyBrown(){return new w(244,164,96,255)}static get SeaGreen(){return new w(46,139,87,255)}static get SeaShell(){return new w(255,245,238,255)}static get Sienna(){return new w(160,82,45,255)}static get Silver(){return new w(192,192,192,255)}static get SkyBlue(){return new w(135,206,235,255)}static get SlateBlue(){return new w(106,90,205,255)}static get SlateGray(){return new w(112,128,144,255)}static get Snow(){return new w(255,250,250,255)}static get SpringGreen(){return new w(0,255,127,255)}static get SteelBlue(){return new w(70,130,180,255)}static get Tan(){return new w(210,180,140,255)}static get Teal(){return new w(0,128,128,255)}static get Thistle(){return new w(216,191,216,255)}static get Tomato(){return new w(255,99,71,255)}static get Turquoise(){return new w(64,224,208,255)}static get Violet(){return new w(238,130,238,255)}static get Wheat(){return new w(245,222,179,255)}static get White(){return new w(255,255,255,255)}static get WhiteSmoke(){return new w(245,245,245,255)}static get Yellow(){return new w(255,255,0,255)}static get YellowGreen(){return new w(154,205,50,255)}}class Ra{_drawables=[];disableStrokeAntialias(){return this._drawables.push(qe.disabled),this}enableStrokeAntialias(){return this._drawables.push(qe.enabled),this}fillColor(r){return this._drawables.push(new bn(r)),this}fillOpacity(r){return this._drawables.push(new Gn(r)),this}font(r){return this._drawables.push(new $n(r)),this}fontPointSize(r){return this._drawables.push(new Pn(r)),this}fontTypeMetrics(r,e=!1){return te._create(o=>(o.read(ar.Transparent,1,1),rt._use(o,g=>(g.draw(this._drawables),g.fontTypeMetrics(r,e)))))}gravity(r){return this._drawables.push(new Yn(r)),this}line(r,e,o,g){return this._drawables.push(new jn(r,e,o,g)),this}point(r,e){return this._drawables.push(new Xn(r,e)),this}rectangle(r,e,o,g){return this._drawables.push(new Vn(r,e,o,g)),this}roundRectangle(r,e,o,g,p,d){return this._drawables.push(new qn(r,e,o,g,p,d)),this}strokeColor(r){return this._drawables.push(new Qn(r)),this}strokeWidth(r){return this._drawables.push(new Jn(r)),this}text(r,e,o){return this._drawables.push(new rr(r,e,o)),this}textAlignment(r){return this._drawables.push(new Kn(r)),this}textDecoration(r){return this._drawables.push(new Zn(r)),this}textInterlineSpacing(r){return this._drawables.push(new On(r)),this}textInterwordSpacing(r){return this._drawables.push(new er(r)),this}textKerning(r){return this._drawables.push(new tr(r)),this}textUnderColor(r){return this._drawables.push(new nr(r)),this}draw(r){return r.draw(this._drawables),this}}var ir=(t=>(t[t.Undefined=0]="Undefined",t[t.Kapur=1]="Kapur",t[t.OTSU=2]="OTSU",t[t.Triangle=3]="Triangle",t))(ir||{}),sr=(t=>(t[t.Undefined=0]="Undefined",t[t.Direct=1]="Direct",t[t.Pseudo=2]="Pseudo",t))(sr||{}),ur=(t=>(t[t.Undefined=0]="Undefined",t[t.Bilevel=1]="Bilevel",t[t.Grayscale=2]="Grayscale",t[t.GrayscaleAlpha=3]="GrayscaleAlpha",t[t.Palette=4]="Palette",t[t.PaletteAlpha=5]="PaletteAlpha",t[t.TrueColor=6]="TrueColor",t[t.TrueColorAlpha=7]="TrueColorAlpha",t[t.ColorSeparation=8]="ColorSeparation",t[t.ColorSeparationAlpha=9]="ColorSeparationAlpha",t[t.Optimize=10]="Optimize",t[t.PaletteBilevelAlpha=11]="PaletteBilevelAlpha",t))(ur||{}),or=(t=>(t[t.Undefined=0]="Undefined",t[t.Add=1]="Add",t[t.Conjugate=2]="Conjugate",t[t.Divide=3]="Divide",t[t.MagnitudePhase=4]="MagnitudePhase",t[t.Multiply=5]="Multiply",t[t.RealImaginary=6]="RealImaginary",t[t.Subtract=7]="Subtract",t))(or||{}),rn=(t=>(t[t.Undefined=0]="Undefined",t[t.B44A=1]="B44A",t[t.B44=2]="B44",t[t.BZip=3]="BZip",t[t.DXT1=4]="DXT1",t[t.DXT3=5]="DXT3",t[t.DXT5=6]="DXT5",t[t.Fax=7]="Fax",t[t.Group4=8]="Group4",t[t.JBIG1=9]="JBIG1",t[t.JBIG2=10]="JBIG2",t[t.JPEG2000=11]="JPEG2000",t[t.JPEG=12]="JPEG",t[t.LosslessJPEG=13]="LosslessJPEG",t[t.LZMA=14]="LZMA",t[t.LZW=15]="LZW",t[t.NoCompression=16]="NoCompression",t[t.Piz=17]="Piz",t[t.Pxr24=18]="Pxr24",t[t.RLE=19]="RLE",t[t.Zip=20]="Zip",t[t.ZipS=21]="ZipS",t[t.Zstd=22]="Zstd",t[t.WebP=23]="WebP",t[t.DWAA=24]="DWAA",t[t.DWAB=25]="DWAB",t[t.BC7=26]="BC7",t[t.BC5=27]="BC5",t))(rn||{}),_r=(t=>(t[t.Undefined=0]="Undefined",t[t.Affine=1]="Affine",t[t.AffineProjection=2]="AffineProjection",t[t.ScaleRotateTranslate=3]="ScaleRotateTranslate",t[t.Perspective=4]="Perspective",t[t.PerspectiveProjection=5]="PerspectiveProjection",t[t.BilinearForward=6]="BilinearForward",t[t.BilinearReverse=7]="BilinearReverse",t[t.Polynomial=8]="Polynomial",t[t.Arc=9]="Arc",t[t.Polar=10]="Polar",t[t.DePolar=11]="DePolar",t[t.Cylinder2Plane=12]="Cylinder2Plane",t[t.Plane2Cylinder=13]="Plane2Cylinder",t[t.Barrel=14]="Barrel",t[t.BarrelInverse=15]="BarrelInverse",t[t.Shepards=16]="Shepards",t[t.Resize=17]="Resize",t[t.Sentinel=18]="Sentinel",t[t.RigidAffine=19]="RigidAffine",t))(_r||{}),lr=(t=>(t[t.Undefined=0]="Undefined",t[t.LSB=1]="LSB",t[t.MSB=2]="MSB",t))(lr||{}),cr=(t=>(t[t.Undefined=0]="Undefined",t[t.Absolute=1]="Absolute",t[t.Fuzz=2]="Fuzz",t[t.MeanAbsolute=3]="MeanAbsolute",t[t.MeanErrorPerPixel=4]="MeanErrorPerPixel",t[t.MeanSquared=5]="MeanSquared",t[t.NormalizedCrossCorrelation=6]="NormalizedCrossCorrelation",t[t.PeakAbsolute=7]="PeakAbsolute",t[t.PeakSignalToNoiseRatio=8]="PeakSignalToNoiseRatio",t[t.PerceptualHash=9]="PerceptualHash",t[t.RootMeanSquared=10]="RootMeanSquared",t[t.StructuralSimilarity=11]="StructuralSimilarity",t[t.StructuralDissimilarity=12]="StructuralDissimilarity",t))(cr||{}),gr=(t=>(t[t.Undefined=0]="Undefined",t[t.Abs=1]="Abs",t[t.Add=2]="Add",t[t.AddModulus=3]="AddModulus",t[t.And=4]="And",t[t.Cosine=5]="Cosine",t[t.Divide=6]="Divide",t[t.Exponential=7]="Exponential",t[t.GaussianNoise=8]="GaussianNoise",t[t.ImpulseNoise=9]="ImpulseNoise",t[t.LaplacianNoise=10]="LaplacianNoise",t[t.LeftShift=11]="LeftShift",t[t.Log=12]="Log",t[t.Max=13]="Max",t[t.Mean=14]="Mean",t[t.Median=15]="Median",t[t.Min=16]="Min",t[t.MultiplicativeNoise=17]="MultiplicativeNoise",t[t.Multiply=18]="Multiply",t[t.Or=19]="Or",t[t.PoissonNoise=20]="PoissonNoise",t[t.Pow=21]="Pow",t[t.RightShift=22]="RightShift",t[t.RootMeanSquare=23]="RootMeanSquare",t[t.Set=24]="Set",t[t.Sine=25]="Sine",t[t.Subtract=26]="Subtract",t[t.Sum=27]="Sum",t[t.ThresholdBlack=28]="ThresholdBlack",t[t.Threshold=29]="Threshold",t[t.ThresholdWhite=30]="ThresholdWhite",t[t.UniformNoise=31]="UniformNoise",t[t.Xor=32]="Xor",t[t.InverseLog=33]="InverseLog",t))(gr||{}),mr=(t=>(t[t.Undefined=0]="Undefined",t[t.Point=1]="Point",t[t.Box=2]="Box",t[t.Triangle=3]="Triangle",t[t.Hermite=4]="Hermite",t[t.Hann=5]="Hann",t[t.Hamming=6]="Hamming",t[t.Blackman=7]="Blackman",t[t.Gaussian=8]="Gaussian",t[t.Quadratic=9]="Quadratic",t[t.Cubic=10]="Cubic",t[t.Catrom=11]="Catrom",t[t.Mitchell=12]="Mitchell",t[t.Jinc=13]="Jinc",t[t.Sinc=14]="Sinc",t[t.SincFast=15]="SincFast",t[t.Kaiser=16]="Kaiser",t[t.Welch=17]="Welch",t[t.Parzen=18]="Parzen",t[t.Bohman=19]="Bohman",t[t.Bartlett=20]="Bartlett",t[t.Lagrange=21]="Lagrange",t[t.Lanczos=22]="Lanczos",t[t.LanczosSharp=23]="LanczosSharp",t[t.Lanczos2=24]="Lanczos2",t[t.Lanczos2Sharp=25]="Lanczos2Sharp",t[t.Robidoux=26]="Robidoux",t[t.RobidouxSharp=27]="RobidouxSharp",t[t.Cosine=28]="Cosine",t[t.Spline=29]="Spline",t[t.LanczosRadius=30]="LanczosRadius",t[t.CubicSpline=31]="CubicSpline",t))(mr||{}),fr=(t=>(t[t.Undefined=0]="Undefined",t[t.None=1]="None",t[t.Background=2]="Background",t[t.Previous=3]="Previous",t))(fr||{}),an=(t=>(t[t.Undefined=0]="Undefined",t[t.NoInterlace=1]="NoInterlace",t[t.Line=2]="Line",t[t.Plane=3]="Plane",t[t.Partition=4]="Partition",t[t.Gif=5]="Gif",t[t.Jpeg=6]="Jpeg",t[t.Png=7]="Png",t))(an||{}),pr=(t=>(t.Undefined="Undefined",t.Unity="Unity",t.Gaussian="Gaussian",t.DoG="DoG",t.LoG="LoG",t.Blur="Blur",t.Comet="Comet",t.Binomial="Binomial",t.Laplacian="Laplacian",t.Sobel="Sobel",t.FreiChen="FreiChen",t.Roberts="Roberts",t.Prewitt="Prewitt",t.Compass="Compass",t.Kirsch="Kirsch",t.Diamond="Diamond",t.Square="Square",t.Rectangle="Rectangle",t.Octagon="Octagon",t.Disk="Disk",t.Plus="Plus",t.Cross="Cross",t.Ring="Ring",t.Peaks="Peaks",t.Edges="Edges",t.Corners="Corners",t.Diagonals="Diagonals",t.LineEnds="LineEnds",t.LineJunctions="LineJunctions",t.Ridges="Ridges",t.ConvexHull="ConvexHull",t.ThinSE="ThinSE",t.Skeleton="Skeleton",t.Chebyshev="Chebyshev",t.Manhattan="Manhattan",t.Octagonal="Octagonal",t.Euclidean="Euclidean",t.UserDefined="UserDefined",t))(pr||{}),dr=(t=>(t[t.Undefined=0]="Undefined",t[t.Convolve=1]="Convolve",t[t.Correlate=2]="Correlate",t[t.Erode=3]="Erode",t[t.Dilate=4]="Dilate",t[t.ErodeIntensity=5]="ErodeIntensity",t[t.DilateIntensity=6]="DilateIntensity",t[t.IterativeDistance=7]="IterativeDistance",t[t.Open=8]="Open",t[t.Close=9]="Close",t[t.OpenIntensity=10]="OpenIntensity",t[t.CloseIntensity=11]="CloseIntensity",t[t.Smooth=12]="Smooth",t[t.EdgeIn=13]="EdgeIn",t[t.EdgeOut=14]="EdgeOut",t[t.Edge=15]="Edge",t[t.TopHat=16]="TopHat",t[t.BottomHat=17]="BottomHat",t[t.HitAndMiss=18]="HitAndMiss",t[t.Thinning=19]="Thinning",t[t.Thicken=20]="Thicken",t[t.Distance=21]="Distance",t[t.Voronoi=22]="Voronoi",t))(dr||{}),hr=(t=>(t[t.Undefined=0]="Undefined",t[t.Uniform=1]="Uniform",t[t.Gaussian=2]="Gaussian",t[t.MultiplicativeGaussian=3]="MultiplicativeGaussian",t[t.Impulse=4]="Impulse",t[t.Laplacian=5]="Laplacian",t[t.Poisson=6]="Poisson",t[t.Random=7]="Random",t))(hr||{}),sn=(t=>(t[t.Undefined=0]="Undefined",t[t.TopLeft=1]="TopLeft",t[t.TopRight=2]="TopRight",t[t.BottomRight=3]="BottomRight",t[t.BottomLeft=4]="BottomLeft",t[t.LeftTop=5]="LeftTop",t[t.RightTop=6]="RightTop",t[t.RightBottom=7]="RightBottom",t[t.LeftBottom=8]="LeftBottom",t))(sn||{}),yr=(t=>(t[t.Undefined=0]="Undefined",t[t.Point=1]="Point",t[t.Replace=2]="Replace",t[t.Floodfill=3]="Floodfill",t[t.FillToBorder=4]="FillToBorder",t[t.Reset=5]="Reset",t))(yr||{}),wr=(t=>(t[t.Undefined=0]="Undefined",t[t.Average=1]="Average",t[t.Average9=2]="Average9",t[t.Average16=3]="Average16",t[t.Background=4]="Background",t[t.Bilinear=5]="Bilinear",t[t.Blend=6]="Blend",t[t.Catrom=7]="Catrom",t[t.Integer=8]="Integer",t[t.Mesh=9]="Mesh",t[t.Nearest=10]="Nearest",t[t.Spline=11]="Spline",t))(wr||{}),Sr=(t=>(t[t.Undefined=0]="Undefined",t[t.Saturation=1]="Saturation",t[t.Perceptual=2]="Perceptual",t[t.Absolute=3]="Absolute",t[t.Relative=4]="Relative",t))(Sr||{}),kr=(t=>(t[t.Undefined=0]="Undefined",t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=3]="Right",t))(kr||{}),vr=(t=>(t[t.Undefined=0]="Undefined",t[t.None=1]="None",t[t.Underline=2]="Underline",t[t.Overline=3]="Overline",t[t.LineThrough=4]="LineThrough",t))(vr||{}),Mr=(t=>(t[t.Undefined=0]="Undefined",t[t.Background=1]="Background",t[t.Dither=2]="Dither",t[t.Edge=3]="Edge",t[t.Mirror=4]="Mirror",t[t.Random=5]="Random",t[t.Tile=6]="Tile",t[t.Transparent=7]="Transparent",t[t.Mask=8]="Mask",t[t.Black=9]="Black",t[t.Gray=10]="Gray",t[t.White=11]="White",t[t.HorizontalTile=12]="HorizontalTile",t[t.VerticalTile=13]="VerticalTile",t[t.HorizontalTileEdge=14]="HorizontalTileEdge",t[t.VerticalTileEdge=15]="VerticalTileEdge",t[t.CheckerTile=16]="CheckerTile",t))(Mr||{}),Ir=(t=>(t[t.Disabled=-1]="Disabled",t[t.Linear=0]="Linear",t[t.Vng=1]="Vng",t[t.Ppg=2]="Ppg",t[t.Ahd=3]="Ahd",t[t.DCB=4]="DCB",t[t.Dht=11]="Dht",t[t.ModifiedAhd=12]="ModifiedAhd",t))(Ir||{}),Dr=(t=>(t[t.Raw=0]="Raw",t[t.SRGB=1]="SRGB",t[t.AdobeRGB=2]="AdobeRGB",t[t.WideGamutRGB=3]="WideGamutRGB",t[t.KodakProPhotoRGB=4]="KodakProPhotoRGB",t[t.XYZ=5]="XYZ",t[t.ACES=6]="ACES",t))(Dr||{});class Ca extends Dn{constructor(){super(he.Dng)}disableAutoBrightness;interpolationQuality;outputColor;useAutoWhitebalance;useCameraWhitebalance;getDefines(){const r=[];return this.hasValue(this.interpolationQuality)&&r.push(this.createDefine("interpolation-quality",this.interpolationQuality)),this.hasValue(this.disableAutoBrightness)&&r.push(this.createDefine("no-auto-bright",this.disableAutoBrightness)),this.hasValue(this.outputColor)&&r.push(this.createDefine("output-color",this.outputColor)),this.hasValue(this.useCameraWhitebalance)&&r.push(this.createDefine("use-camera-wb",this.useCameraWhitebalance)),this.hasValue(this.useAutoWhitebalance)&&r.push(this.createDefine("use-auto-wb",this.useAutoWhitebalance)),r}}class un{_colorSpace=Xe.Undefined;_compression=rn.Undefined;_density=new Zt(0,0);_format=he.Unknown;_height=0;_interlace=an.Undefined;_orientation=sn.Undefined;_quality=0;_width=0;get colorSpace(){return this._colorSpace}get compression(){return this._compression}get density(){return this._density}get format(){return this._format}get height(){return this._height}get interlace(){return this._interlace}get orientation(){return this._orientation}get quality(){return this._quality}get width(){return this._width}constructor(){}read(r,e){te._create(o=>{o.ping(r,e),this._colorSpace=o.colorSpace,this._compression=o.compression,this._density=o.density,this._format=o.format,this._height=o.height,this._interlace=o.interlace,this._orientation=o.orientation,this._quality=o.quality,this._width=o.width})}static create(r,e){const o=new un;return o.read(r,e),o}}class Ta{constructor(r){this.complexOperator=r}complexOperator;signalToNoiseRatio;_setArtifacts(r){this.signalToNoiseRatio!==void 0&&r.setArtifact("complex:snr",this.signalToNoiseRatio)}}class Wa{constructor(r){this.method=r}method;bestFit=!1;scale;viewport;_setArtifacts(r){this.scale!==void 0&&r.setArtifact("distort:scale",this.scale.toString()),this.viewport!==void 0&&r.setArtifact("distort:viewport",this.viewport.toString())}}class Ba extends Re{constructor(r){const e=_._api._MontageSettings_Create(),o=_._api._MontageSettings_Dispose;if(super(e,o),r.backgroundColor!==void 0&&r.backgroundColor._use(g=>{_._api._MontageSettings_SetBackgroundColor(this._instance,g)}),r.borderColor!==void 0&&r.borderColor._use(g=>{_._api._MontageSettings_SetBorderColor(this._instance,g)}),r.borderWidth!==void 0&&_._api._MontageSettings_SetBorderWidth(this._instance,r.borderWidth),r.fillColor!==void 0&&r.fillColor._use(g=>{_._api._MontageSettings_SetFillColor(this._instance,g)}),r.font!==void 0){const g=Se._getFontFileName(r.font);W(g,p=>{_._api._MontageSettings_SetFont(this._instance,p)})}r.fontPointsize!==void 0&&_._api._MontageSettings_SetFontPointsize(this._instance,r.fontPointsize),r.frameGeometry!==void 0&&W(r.frameGeometry.toString(),g=>{_._api._MontageSettings_SetFrameGeometry(this._instance,g)}),r.geometry!==void 0&&W(r.geometry.toString(),g=>{_._api._MontageSettings_SetGeometry(this._instance,g)}),r.gravity!==void 0&&_._api._MontageSettings_SetGravity(this._instance,r.gravity),r.shadow!==void 0&&_._api._MontageSettings_SetShadow(this._instance,r.shadow?1:0),r.strokeColor!==void 0&&r.strokeColor._use(g=>{_._api._MontageSettings_SetStrokeColor(this._instance,g)}),r.textureFileName!==void 0&&W(r.textureFileName,g=>{_._api._MontageSettings_SetTextureFileName(this._instance,g)}),r.tileGeometry!==void 0&&W(r.tileGeometry.toString(),g=>{_._api._MontageSettings_SetTileGeometry(this._instance,g)}),r.title!==void 0&&W(r.title,g=>{_._api._MontageSettings_SetTitle(this._instance,g)})}}class La{backgroundColor;borderColor;borderWidth;fillColor;font;fontPointsize;frameGeometry;geometry;gravity;label;shadow;strokeColor;textureFileName;tileGeometry;title;transparentColor;_use(r){const e=new Ba(this);return oe._disposeAfterExecution(e,r)}}class za{constructor(r,e,o){this.method=r,this.kernel=e,o!==void 0&&(this.kernel+=`:${o}`)}channels=Q.Composite;convolveBias;convolveScale;iterations=1;kernel;method}class Na{constructor(r,e=0){this.minimum=r,this.maximum=e}minimum;maximum;toString(){return this.maximum===0?this.minimum.toString():`${this.minimum}-${this.maximum}`}}k.AlphaOption=Qt,k.AutoThresholdMethod=ir,k.ChannelStatistics=Fn,k.Channels=Q,k.ChromaticityInfo=En,k.ClassType=sr,k.ColorSpace=Xe,k.ColorType=ur,k.CompareResult=bt,k.CompareSettings=Rn,k.ComplexOperator=or,k.ComplexSettings=Ta,k.CompositeOperator=tt,k.CompressionMethod=rn,k.ConfigurationFile=qt,k.ConfigurationFiles=It,k.ConnectedComponent=Gt,k.ConnectedComponentsSettings=Cn,k.DefinesCreator=Dn,k.Density=Zt,k.DensityUnit=Kt,k.DistortMethod=_r,k.DistortSettings=Wa,k.DitherMethod=At,k.DngInterpolation=Ir,k.DngOutputColor=Dr,k.DngReadDefines=Ca,k.DrawableColor=Ma,k.DrawableFillColor=bn,k.DrawableFillOpacity=Gn,k.DrawableFont=$n,k.DrawableFontPointSize=Pn,k.DrawableGravity=Yn,k.DrawableLine=jn,k.DrawablePoint=Xn,k.DrawableRectangle=Vn,k.DrawableRoundRectangle=qn,k.DrawableStrokeColor=Qn,k.DrawableStrokeWidth=Jn,k.DrawableText=rr,k.DrawableTextAlignment=Kn,k.DrawableTextAntialias=qe,k.DrawableTextDecoration=Zn,k.DrawableTextInterlineSpacing=On,k.DrawableTextInterwordSpacing=er,k.DrawableTextKerning=tr,k.DrawableTextUnderColor=nr,k.Drawables=Ra,k.DrawingWand=rt,k.Endian=lr,k.ErrorMetric=cr,k.EvaluateOperator=gr,k.FilterType=mr,k.GifDisposeMethod=fr,k.Gravity=at,k.ImageMagick=_,k.ImageProfile=Ln,k.Interlace=an,k.Kernel=pr,k.LogEvent=An,k.LogEventTypes=J,k.Magick=Se,k.MagickColor=w,k.MagickColors=ar,k.MagickDefine=Dt,k.MagickError=Z,k.MagickErrorInfo=it,k.MagickErrorSeverity=nt,k.MagickFormat=he,k.MagickFormatInfo=Me,k.MagickGeometry=ue,k.MagickImage=te,k.MagickImageCollection=we,k.MagickImageInfo=un,k.MagickReadSettings=ye,k.MagickSettings=Ve,k.MontageSettings=La,k.MorphologyMethod=dr,k.MorphologySettings=za,k.NativeInstance=Re,k.NoiseType=hr,k.OrientationType=sn,k.PaintMethod=yr,k.Percentage=re,k.PixelChannel=E,k.PixelCollection=Ne,k.PixelIntensityMethod=tn,k.PixelInterpolateMethod=wr,k.Point=de,k.PrimaryInfo=Ce,k.ProgressEvent=xn,k.QuantizeSettings=Et,k.Quantum=Ee,k.RenderingIntent=Sr,k.Statistics=Rt,k.TextAlignment=kr,k.TextDecoration=vr,k.Threshold=Na,k.TypeMetric=Pt,k.VirtualPixelMethod=Mr,k.WarningEvent=nn,k._getEdges=Bn,k._isByteArray=Le,k.initializeImageMagick=Ea,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});