@imagemagick/magick-wasm 0.0.32 → 0.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +17 -17
- package/README.md +3 -3
- package/dist/index.d.ts +1101 -988
- package/dist/index.js +10962 -8512
- package/dist/index.umd.cjs +17 -24
- package/dist/magick.wasm +0 -0
- package/package.json +11 -12
package/dist/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(I,ze){typeof exports=="object"&&typeof module<"u"?ze(exports):typeof define=="function"&&define.amd?define(["exports"],ze):(I=typeof globalThis<"u"?globalThis:I||self,ze(I["magick-wasm"]={}))})(this,function(I){"use strict";function ze(S){return S instanceof Int8Array||S instanceof Uint8Array||S instanceof Uint8ClampedArray}class Ut{fileName;data;constructor(a,o){this.fileName=a,this.data=o}}const vi={XmlResourceFiles:{log:`<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<!DOCTYPE logmap [
|
|
3
3
|
<!ELEMENT logmap (log)+>
|
|
4
4
|
<!ELEMENT log (#PCDATA)>
|
|
@@ -39,27 +39,20 @@
|
|
|
39
39
|
<policy domain="path" rights="none" pattern="@*" />
|
|
40
40
|
<policy domain="path" rights="none" pattern="|*" />
|
|
41
41
|
</policymap>
|
|
42
|
-
`}};class bt{constructor(){this.log=new Jt("log.xml",bn.XmlResourceFiles.log),this.policy=new Jt("policy.xml",bn.XmlResourceFiles.policy)}static default=new bt;*all(){yield this.log,yield this.policy}log;policy}class Ct{constructor(n,e,u){this.format=n,this.name=e,this.value=u}format;name;value}class Cn{format;constructor(n){this.format=n}createDefine(n,e){return typeof e=="boolean"?new Ct(this.format,n,e?"true":"false"):typeof e=="string"?new Ct(this.format,n,e):new Ct(this.format,n,e.toString())}hasValue(n){return n!=null}}class Da{_x;_y;_paintMethod;constructor(n,e,u){this._x=n,this._y=e,this._paintMethod=u}draw(n){n.color(this._x,this._y,this._paintMethod)}}class Gn{_color;constructor(n){this._color=n}draw(n){n.fillColor(this._color)}}class Pn{_opacity;constructor(n){this._opacity=n}draw(n){n.fillOpacity(this._opacity.toDouble()/100)}}class An{_pointSize;constructor(n){this._pointSize=n}draw(n){n.fontPointSize(this._pointSize)}}class Tn{constructor(n,e){this.eventType=n,this.message=e??""}eventType;message}var Kt=(t=>(t[t.Undefined=0]="Undefined",t[t.Activate=1]="Activate",t[t.Associate=2]="Associate",t[t.Background=3]="Background",t[t.Copy=4]="Copy",t[t.Deactivate=5]="Deactivate",t[t.Discrete=6]="Discrete",t[t.Disassociate=7]="Disassociate",t[t.Extract=8]="Extract",t[t.Off=9]="Off",t[t.On=10]="On",t[t.Opaque=11]="Opaque",t[t.Remove=12]="Remove",t[t.Set=13]="Set",t[t.Shape=14]="Shape",t[t.Transparent=15]="Transparent",t[t.OffIfOpaque=16]="OffIfOpaque",t))(Kt||{}),$=(t=>(t[t.Red=0]="Red",t[t.Cyan=0]="Cyan",t[t.Gray=0]="Gray",t[t.Green=1]="Green",t[t.Magenta=1]="Magenta",t[t.Blue=2]="Blue",t[t.Yellow=2]="Yellow",t[t.Black=3]="Black",t[t.Alpha=4]="Alpha",t[t.Index=5]="Index",t[t.Meta0=10]="Meta0",t[t.Meta1=11]="Meta1",t[t.Meta2=12]="Meta2",t[t.Meta3=13]="Meta3",t[t.Meta4=14]="Meta4",t[t.Meta5=15]="Meta5",t[t.Meta6=16]="Meta6",t[t.Meta7=17]="Meta7",t[t.Meta8=18]="Meta8",t[t.Meta9=19]="Meta9",t[t.Meta10=20]="Meta10",t[t.Meta11=21]="Meta11",t[t.Meta12=22]="Meta12",t[t.Meta13=23]="Meta13",t[t.Meta14=24]="Meta14",t[t.Meta15=25]="Meta15",t[t.Meta16=26]="Meta16",t[t.Meta17=27]="Meta17",t[t.Meta18=28]="Meta18",t[t.Meta19=29]="Meta19",t[t.Meta20=30]="Meta20",t[t.Meta21=31]="Meta21",t[t.Meta22=32]="Meta22",t[t.Meta23=33]="Meta23",t[t.Meta24=34]="Meta24",t[t.Meta25=35]="Meta25",t[t.Meta26=36]="Meta26",t[t.Meta27=37]="Meta27",t[t.Meta28=38]="Meta28",t[t.Meta29=39]="Meta29",t[t.Meta30=40]="Meta30",t[t.Meta31=41]="Meta31",t[t.Meta32=42]="Meta32",t[t.Meta33=43]="Meta33",t[t.Meta34=44]="Meta34",t[t.Meta35=45]="Meta35",t[t.Meta36=46]="Meta36",t[t.Meta37=47]="Meta37",t[t.Meta38=48]="Meta38",t[t.Meta39=49]="Meta39",t[t.Meta40=50]="Meta40",t[t.Meta41=51]="Meta41",t[t.Meta42=52]="Meta42",t[t.Meta43=53]="Meta43",t[t.Meta44=54]="Meta44",t[t.Meta45=55]="Meta45",t[t.Meta46=56]="Meta46",t[t.Meta47=57]="Meta47",t[t.Meta48=58]="Meta48",t[t.Meta49=59]="Meta49",t[t.Meta50=60]="Meta50",t[t.Meta51=61]="Meta51",t[t.Meta52=62]="Meta52",t[t.Composite=64]="Composite",t))($||{}),Q=(t=>(t[t.Undefined=0]="Undefined",t[t.Red=1]="Red",t[t.Gray=1]="Gray",t[t.Cyan=1]="Cyan",t[t.Green=2]="Green",t[t.Magenta=2]="Magenta",t[t.Blue=4]="Blue",t[t.Yellow=4]="Yellow",t[t.Black=8]="Black",t[t.Alpha=16]="Alpha",t[t.Opacity=16]="Opacity",t[t.Index=32]="Index",t[t.Composite=31]="Composite",t[t.TrueAlpha=256]="TrueAlpha",t[t.RGB=7]="RGB",t[t.CMYK=15]="CMYK",t[t.CMYKA=31]="CMYKA",t[t.Meta0=1<<$.Meta0]="Meta0",t[t.Meta1=1<<$.Meta1]="Meta1",t[t.Meta2=1<<$.Meta2]="Meta2",t[t.Meta3=1<<$.Meta3]="Meta3",t[t.Meta4=1<<$.Meta4]="Meta4",t[t.Meta5=1<<$.Meta5]="Meta5",t[t.Meta6=1<<$.Meta6]="Meta6",t[t.Meta7=1<<$.Meta7]="Meta7",t[t.Meta8=1<<$.Meta8]="Meta8",t[t.Meta9=1<<$.Meta9]="Meta9",t[t.Meta10=1<<$.Meta10]="Meta10",t[t.Meta11=1<<$.Meta11]="Meta11",t[t.Meta12=1<<$.Meta12]="Meta12",t[t.Meta13=1<<$.Meta13]="Meta13",t[t.Meta14=1<<$.Meta14]="Meta14",t[t.Meta15=1<<$.Meta15]="Meta15",t[t.Meta16=1<<$.Meta16]="Meta16",t[t.Meta17=1<<$.Meta17]="Meta17",t[t.Meta18=1<<$.Meta18]="Meta18",t[t.Meta19=1<<$.Meta19]="Meta19",t[t.Meta20=1<<$.Meta20]="Meta20",t[t.Meta21=1<<$.Meta21]="Meta21",t[t.All=134217727]="All",t))(Q||{});class Rn{constructor(n,e,u,c){this.red=n,this.green=e,this.blue=u,this.white=c}red;green;blue;white}var te=(t=>(t[t.Undefined=0]="Undefined",t[t.CMY=1]="CMY",t[t.CMYK=2]="CMYK",t[t.Gray=3]="Gray",t[t.HCL=4]="HCL",t[t.HCLp=5]="HCLp",t[t.HSB=6]="HSB",t[t.HSI=7]="HSI",t[t.HSL=8]="HSL",t[t.HSV=9]="HSV",t[t.HWB=10]="HWB",t[t.Lab=11]="Lab",t[t.LCH=12]="LCH",t[t.LCHab=13]="LCHab",t[t.LCHuv=14]="LCHuv",t[t.Log=15]="Log",t[t.LMS=16]="LMS",t[t.Luv=17]="Luv",t[t.OHTA=18]="OHTA",t[t.Rec601YCbCr=19]="Rec601YCbCr",t[t.Rec709YCbCr=20]="Rec709YCbCr",t[t.RGB=21]="RGB",t[t.scRGB=22]="scRGB",t[t.sRGB=23]="sRGB",t[t.Transparent=24]="Transparent",t[t.XyY=25]="XyY",t[t.XYZ=26]="XYZ",t[t.YCbCr=27]="YCbCr",t[t.YCC=28]="YCC",t[t.YDbDr=29]="YDbDr",t[t.YIQ=30]="YIQ",t[t.YPbPr=31]="YPbPr",t[t.YUV=32]="YUV",t[t.LinearGray=33]="LinearGray",t[t.Jzazbz=34]="Jzazbz",t[t.DisplayP3=35]="DisplayP3",t[t.Adobe98=36]="Adobe98",t[t.ProPhoto=37]="ProPhoto",t[t.Oklab=38]="Oklab",t[t.Oklch=39]="Oklch",t))(te||{});class ba{colorSpace=te.Undefined;copyright=null;description=null;manufacturer=null;model=null}class Ca{_data;_index;constructor(n){this._data=n,this._index=0,this.isLittleEndian=!1}get index(){return this._index}isLittleEndian;readLong(){return this.canRead(4)?this.isLittleEndian?this.readLongLSB():this.readLongMSB():null}readString(n){if(n==0)return"";if(!this.canRead(n))return null;let u=new TextDecoder("utf-8").decode(this._data.subarray(this._index,this._index+n));const c=u.indexOf("\0");return c!=-1&&(u=u.substring(0,c)),this._index+=n,u}seek(n){return n>=this._data.length?!1:(this._index=n,!0)}skip(n){return this._index+n>=this._data.length?!1:(this._index+=n,!0)}canRead(n){return n>this._data.length?!1:this._index+n<=this._data.length}readLongLSB(){let n=this._data[this._index];return n|=this._data[this._index+1]<<8,n|=this._data[this._index+2]<<16,n|=this._data[this._index+3]<<24,this._index+=4,n}readLongMSB(){let n=this._data[this._index]<<24;return n|=this._data[this._index+1]<<16,n|=this._data[this._index+2]<<8,n|=this._data[this._index+3],this._index+=4,n}}class Zt{_data=new ba;_reader;constructor(n){this._reader=new Ca(n)}static read(n){const e=new Zt(n);return e.readColorSpace(),e.readTagTable(),e._data}readColorSpace(){this._reader.seek(16);const n=this._reader.readString(4);n!=null&&(this._data.colorSpace=this.determineColorSpace(n.trimEnd()))}determineColorSpace(n){switch(n){case"CMY":return te.CMY;case"CMYK":return te.CMYK;case"GRAY":return te.Gray;case"HSL":return te.HSL;case"HSV":return te.HSV;case"Lab":return te.Lab;case"Luv":return te.Luv;case"RGB":return te.sRGB;case"XYZ":return te.XYZ;case"YCbr":return te.YCbCr;default:return te.Undefined}}readTagTable(){if(!this._reader.seek(128))return;const n=this._reader.readLong();if(n!=null)for(let e=0;e<n;e++)switch(this._reader.readLong()){case 1668313716:this._data.copyright=this.readTag();break;case 1684370275:this._data.description=this.readTag();break;case 1684893284:this._data.manufacturer=this.readTag();break;case 1684890724:this._data.model=this.readTag();break;default:this._reader.skip(8);break}}readTag(){const n=this._reader.readLong(),e=this._reader.readLong();if(n===null||e===null)return null;const u=this._reader.index;if(!this._reader.seek(n))return null;const c=this.readTagValue(e);return this._reader.seek(u),c}readTagValue(n){switch(this._reader.readString(4)){case"desc":return this.readTextDescriptionTypeValue();case"text":return this.readTextTypeValue(n);default:return null}}readTextDescriptionTypeValue(){if(!this._reader.skip(4))return null;const n=this._reader.readLong();return n==null?null:this._reader.readString(n)}readTextTypeValue(n){return this._reader.skip(4)?this._reader.readString(n):null}}class Ot{constructor(n,e){this.name=n,this.data=e}name;data}var rt=(t=>(t[t.Warning=300]="Warning",t[t.ResourceLimitWarning=300]="ResourceLimitWarning",t[t.TypeWarning=305]="TypeWarning",t[t.OptionWarning=310]="OptionWarning",t[t.DelegateWarning=315]="DelegateWarning",t[t.MissingDelegateWarning=320]="MissingDelegateWarning",t[t.CorruptImageWarning=325]="CorruptImageWarning",t[t.FileOpenWarning=330]="FileOpenWarning",t[t.BlobWarning=335]="BlobWarning",t[t.StreamWarning=340]="StreamWarning",t[t.CacheWarning=345]="CacheWarning",t[t.CoderWarning=350]="CoderWarning",t[t.FilterWarning=352]="FilterWarning",t[t.ModuleWarning=355]="ModuleWarning",t[t.DrawWarning=360]="DrawWarning",t[t.ImageWarning=365]="ImageWarning",t[t.WandWarning=370]="WandWarning",t[t.RandomWarning=375]="RandomWarning",t[t.XServerWarning=380]="XServerWarning",t[t.MonitorWarning=385]="MonitorWarning",t[t.RegistryWarning=390]="RegistryWarning",t[t.ConfigureWarning=395]="ConfigureWarning",t[t.PolicyWarning=399]="PolicyWarning",t[t.Error=400]="Error",t[t.ResourceLimitError=400]="ResourceLimitError",t[t.TypeError=405]="TypeError",t[t.OptionError=410]="OptionError",t[t.DelegateError=415]="DelegateError",t[t.MissingDelegateError=420]="MissingDelegateError",t[t.CorruptImageError=425]="CorruptImageError",t[t.FileOpenError=430]="FileOpenError",t[t.BlobError=435]="BlobError",t[t.StreamError=440]="StreamError",t[t.CacheError=445]="CacheError",t[t.CoderError=450]="CoderError",t[t.FilterError=452]="FilterError",t[t.ModuleError=455]="ModuleError",t[t.DrawError=460]="DrawError",t[t.ImageError=465]="ImageError",t[t.WandError=470]="WandError",t[t.RandomError=475]="RandomError",t[t.XServerError=480]="XServerError",t[t.MonitorError=485]="MonitorError",t[t.RegistryError=490]="RegistryError",t[t.ConfigureError=495]="ConfigureError",t[t.PolicyError=499]="PolicyError",t))(rt||{});class J extends Error{_relatedErrors=[];constructor(n,e=rt.Error){super(n),this.severity=e}severity;get relatedErrors(){return this._relatedErrors}_setRelatedErrors(n){this._relatedErrors=n}}class En extends Ot{_data;constructor(n,e){const u=typeof n=="string"?n:"icc",c=typeof n!="string"?n:e;if(super(u,c),u!=="icm"&&u!=="icc")throw new J(`Invalid profile name: ${u}.`)}get colorSpace(){return this.initialize(),this._data.colorSpace}get copyright(){return this.initialize(),this._data.copyright}get description(){return this.initialize(),this._data.description}get manufacturer(){return this.initialize(),this._data.manufacturer}get model(){return this.initialize(),this._data.model}initialize(){this._data||(this._data=Zt.read(this.data))}}class Gt{constructor(n,e){this.distortion=n,this.difference=e}difference;distortion;static _create(n,e){return new Gt(n,e)}}class Wn{constructor(n){this.metric=n}metric;highlightColor;lowlightColor;masklightColor;_setArtifacts(n){this.highlightColor!==void 0&&n.setArtifact("compare:highlight-color",this.highlightColor),this.lowlightColor!==void 0&&n.setArtifact("compare:lowlight-color",this.lowlightColor),this.masklightColor!==void 0&&n.setArtifact("compare:masklight-color",this.masklightColor)}}var at=(t=>(t[t.Undefined=0]="Undefined",t[t.Alpha=1]="Alpha",t[t.Atop=2]="Atop",t[t.Blend=3]="Blend",t[t.Blur=4]="Blur",t[t.Bumpmap=5]="Bumpmap",t[t.ChangeMask=6]="ChangeMask",t[t.Clear=7]="Clear",t[t.ColorBurn=8]="ColorBurn",t[t.ColorDodge=9]="ColorDodge",t[t.Colorize=10]="Colorize",t[t.CopyBlack=11]="CopyBlack",t[t.CopyBlue=12]="CopyBlue",t[t.Copy=13]="Copy",t[t.CopyCyan=14]="CopyCyan",t[t.CopyGreen=15]="CopyGreen",t[t.CopyMagenta=16]="CopyMagenta",t[t.CopyAlpha=17]="CopyAlpha",t[t.CopyRed=18]="CopyRed",t[t.CopyYellow=19]="CopyYellow",t[t.Darken=20]="Darken",t[t.DarkenIntensity=21]="DarkenIntensity",t[t.Difference=22]="Difference",t[t.Displace=23]="Displace",t[t.Dissolve=24]="Dissolve",t[t.Distort=25]="Distort",t[t.DivideDst=26]="DivideDst",t[t.DivideSrc=27]="DivideSrc",t[t.DstAtop=28]="DstAtop",t[t.Dst=29]="Dst",t[t.DstIn=30]="DstIn",t[t.DstOut=31]="DstOut",t[t.DstOver=32]="DstOver",t[t.Exclusion=33]="Exclusion",t[t.HardLight=34]="HardLight",t[t.HardMix=35]="HardMix",t[t.Hue=36]="Hue",t[t.In=37]="In",t[t.Intensity=38]="Intensity",t[t.Lighten=39]="Lighten",t[t.LightenIntensity=40]="LightenIntensity",t[t.LinearBurn=41]="LinearBurn",t[t.LinearDodge=42]="LinearDodge",t[t.LinearLight=43]="LinearLight",t[t.Luminize=44]="Luminize",t[t.Mathematics=45]="Mathematics",t[t.MinusDst=46]="MinusDst",t[t.MinusSrc=47]="MinusSrc",t[t.Modulate=48]="Modulate",t[t.ModulusAdd=49]="ModulusAdd",t[t.ModulusSubtract=50]="ModulusSubtract",t[t.Multiply=51]="Multiply",t[t.No=52]="No",t[t.Out=53]="Out",t[t.Over=54]="Over",t[t.Overlay=55]="Overlay",t[t.PegtopLight=56]="PegtopLight",t[t.PinLight=57]="PinLight",t[t.Plus=58]="Plus",t[t.Replace=59]="Replace",t[t.Saturate=60]="Saturate",t[t.Screen=61]="Screen",t[t.SoftLight=62]="SoftLight",t[t.SrcAtop=63]="SrcAtop",t[t.Src=64]="Src",t[t.SrcIn=65]="SrcIn",t[t.SrcOut=66]="SrcOut",t[t.SrcOver=67]="SrcOver",t[t.Threshold=68]="Threshold",t[t.VividLight=69]="VividLight",t[t.Xor=70]="Xor",t[t.Stereo=71]="Stereo",t[t.Freeze=72]="Freeze",t[t.Interpolate=73]="Interpolate",t[t.Negate=74]="Negate",t[t.Reflect=75]="Reflect",t[t.SoftBurn=76]="SoftBurn",t[t.SoftDodge=77]="SoftDodge",t[t.Stamp=78]="Stamp",t[t.RMSE=79]="RMSE",t[t.SaliencyBlend=80]="SaliencyBlend",t[t.SeamlessBlend=81]="SeamlessBlend",t))(at||{});class Re{static get depth(){return _._api._Quantum_Depth_Get()}static get max(){return _._api._Quantum_Max_Get()}}function me(t){return t===0?null:_._api.UTF8ToString(t)}function en(t,n,e){const u=t.lengthBytesUTF8(n)+1,c=t._malloc(u);try{return t.stringToUTF8(n,c,u),e(c)}finally{t._free(c)}}function E(t,n){return en(_._api,t,n)}class w{constructor(n,e,u,c,p){if(n!==void 0)if(typeof n=="string"){let h=0;try{h=_._api._MagickColor_Create(),E(n,S=>{if(_._api._MagickColor_Initialize(h,S)===0)throw new J("invalid color specified");this.initialize(h)})}finally{_._api._free(h)}}else this.r=n,this.g=e??0,this.b=u??0,p===void 0?this.a=c??Re.max:(this.k=c??0,this.a=p,this.isCmyk=!0)}r=0;g=0;b=0;a=0;k=0;isCmyk=!1;static _create(n){const e=new w;return e.initialize(n),e}toShortString(){return this.a!==Re.max?this.toString():this.isCmyk?`cmyka(${this.r},${this.g},${this.b},${this.k})`:`#${this.toHex(this.r)}${this.toHex(this.g)}${this.toHex(this.b)}`}toString(){return this.isCmyk?`cmyka(${this.r},${this.g},${this.b},${this.k},${(this.a/Re.max).toFixed(4)})`:`#${this.toHex(this.r)}${this.toHex(this.g)}${this.toHex(this.b)}${this.toHex(this.a)}`}_use(n){let e=0;try{e=_._api._MagickColor_Create(),_._api._MagickColor_Red_Set(e,this.r),_._api._MagickColor_Green_Set(e,this.g),_._api._MagickColor_Blue_Set(e,this.b),_._api._MagickColor_Alpha_Set(e,this.a),_._api._MagickColor_IsCMYK_Set(e,this.isCmyk?1:0),n(e)}finally{_._api._free(e)}}initialize(n){this.r=_._api._MagickColor_Red_Get(n),this.g=_._api._MagickColor_Green_Get(n),this.b=_._api._MagickColor_Blue_Get(n),this.a=_._api._MagickColor_Alpha_Get(n),this.isCmyk=_._api._MagickColor_IsCMYK_Get(n)===1}toHex(n){return n.toString(16).padStart(2,"0")}}var ve=(t=>(t[t.NoValue=0]="NoValue",t[t.PercentValue=4096]="PercentValue",t[t.IgnoreAspectRatio=8192]="IgnoreAspectRatio",t[t.Less=16384]="Less",t[t.Greater=32768]="Greater",t[t.FillArea=65536]="FillArea",t[t.LimitPixels=131072]="LimitPixels",t[t.AspectRatio=1048576]="AspectRatio",t))(ve||{});class oe{_includeXyInToString;_width=0;_height=0;_x=0;_y=0;_aspectRatio=!1;_fillArea=!1;_greater=!1;_isPercentage=!1;_ignoreAspectRatio=!1;_less=!1;_limitPixels=!1;constructor(n,e,u,c){if(typeof n=="number"){if(u!==void 0&&c!==void 0?(this._width=u,this._height=c,this._x=n,this._y=e??0,this._includeXyInToString=!0):(this._width=n,this._height=e??this._width,this._x=0,this._y=0,this._includeXyInToString=!1),this._width<0)throw new J("negative width is not allowed");if(this._height<0)throw new J("negative height is not allowed")}else{this._includeXyInToString=n.indexOf("+")>=0||n.indexOf("-")>=0;const p=_._api._MagickGeometry_Create();try{E(n,h=>{const S=_._api._MagickGeometry_Initialize(p,h);if(S===ve.NoValue)throw new J("invalid geometry specified");this.hasFlag(S,ve.AspectRatio)?this.initializeFromAspectRation(p,n):this.initialize(p,S)})}finally{_._api._MagickGeometry_Dispose(p)}}}get aspectRatio(){return this._aspectRatio}get fillArea(){return this._fillArea}set fillArea(n){this._fillArea=n}get greater(){return this._greater}set greater(n){this._greater=n}get height(){return this._height}set height(n){this._height=n}get ignoreAspectRatio(){return this._ignoreAspectRatio}set ignoreAspectRatio(n){this._ignoreAspectRatio=n}get isPercentage(){return this._isPercentage}set isPercentage(n){this._isPercentage=n}get less(){return this._less}set less(n){this._less=n}get limitPixels(){return this._limitPixels}set limitPixels(n){this._limitPixels=n}get width(){return this._width}set width(n){this._width=n}get x(){return this._x}set x(n){this._x=n}get y(){return this._y}set y(n){this._y=n}toString(){if(this._aspectRatio)return this._width+":"+this._height;let n="";return this._width==0&&this._height==0?n+="0x0":(this._width>0&&(n+=this._width.toString()),this._height>0?n+="x"+this._height.toString():n+="x"),(this._x!=0||this._y!=0||this._includeXyInToString)&&(this._x>=0&&(n+="+"),n+=this._x,this.y>=0&&(n+="+"),n+=this.y),this._fillArea&&(n+="^"),this._greater&&(n+=">"),this._isPercentage&&(n+="%"),this._ignoreAspectRatio&&(n+="!"),this._less&&(n+="<"),this._limitPixels&&(n+="@"),n}static _fromRectangle(n){if(n===0)throw new J("unable to allocate memory");try{const e=_._api._MagickRectangle_Width_Get(n),u=_._api._MagickRectangle_Height_Get(n),c=_._api._MagickRectangle_X_Get(n),p=_._api._MagickRectangle_Y_Get(n);return new oe(c,p,e,u)}finally{_._api._MagickRectangle_Dispose(n)}}_toRectangle(n){const e=_._api._MagickRectangle_Create();if(e===0)throw new J("unable to allocate memory");try{_._api._MagickRectangle_Width_Set(e,this._width),_._api._MagickRectangle_Height_Set(e,this._height),_._api._MagickRectangle_X_Set(e,this._x),_._api._MagickRectangle_Y_Set(e,this._y),n(e)}finally{_._api._MagickRectangle_Dispose(e)}}initialize(n,e){this._width=_._api._MagickGeometry_Width_Get(n),this._height=_._api._MagickGeometry_Height_Get(n),this._x=_._api._MagickGeometry_X_Get(n),this._y=_._api._MagickGeometry_Y_Get(n),this._ignoreAspectRatio=this.hasFlag(e,ve.IgnoreAspectRatio),this._isPercentage=this.hasFlag(e,ve.PercentValue),this._fillArea=this.hasFlag(e,ve.FillArea),this._greater=this.hasFlag(e,ve.Greater),this._less=this.hasFlag(e,ve.Less),this._limitPixels=this.hasFlag(e,ve.LimitPixels)}initializeFromAspectRation(n,e){this._aspectRatio=!0;const u=e.split(":");this._width=this.parseNumber(u[0]),this._height=this.parseNumber(u[1]),this._x=_._api._MagickGeometry_X_Get(n),this._y=_._api._MagickGeometry_Y_Get(n)}parseNumber(n){let e=0;for(;e<n.length&&!this.isNumber(n[e]);)e++;const u=e;for(;e<n.length&&this.isNumber(n[e]);)e++;return parseInt(n.substr(u,e-u))}isNumber(n){return n>="0"&&n<="9"}hasFlag(n,e){return(n&e)===e}}class de{constructor(n,e){this.x=n,this.y=e??n}x;y;static _create(n){return n===0?new de(0,0):new de(_._api._PointInfo_X_Get(n),_._api._PointInfo_Y_Get(n))}}class Pt{constructor(n){this.area=_._api._ConnectedComponent_GetArea(n),this.centroid=de._create(_._api._ConnectedComponent_GetCentroid(n)),this.color=w._create(_._api._ConnectedComponent_GetColor(n)),this.height=_._api._ConnectedComponent_GetHeight(n),this.id=_._api._ConnectedComponent_GetId(n),this.width=_._api._ConnectedComponent_GetWidth(n),this.x=_._api._ConnectedComponent_GetX(n),this.y=_._api._ConnectedComponent_GetY(n)}area;centroid;color;height;id;width;x;y;static _create(n,e){const u=[];if(n===0)return u;for(let c=0;c<e;c++){const p=_._api._ConnectedComponent_GetInstance(n,c);p===0||_._api._ConnectedComponent_GetArea(p)<Number.EPSILON||u.push(new Pt(p))}return u}toGeometry(){return new oe(this.x,this.y,this.width,this.height)}}class Ln{angleThreshold;areaThreshold;circularityThreshold;connectivity;diameterThreshold;eccentricityThreshold;majorAxisThreshold;meanColor;minorAxisThreshold;perimeterThreshold;constructor(n){this.connectivity=n}_setArtifacts(n){this.angleThreshold!==void 0&&n.setArtifact("connected-components:angle-threshold",this.angleThreshold.toString()),this.areaThreshold!==void 0&&n.setArtifact("connected-components:area-threshold",this.areaThreshold.toString()),this.circularityThreshold!==void 0&&n.setArtifact("connected-components:circularity-threshold",this.circularityThreshold.toString()),this.diameterThreshold!==void 0&&n.setArtifact("connected-components:diameter-threshold",this.diameterThreshold.toString()),this.eccentricityThreshold!==void 0&&n.setArtifact("connected-components:eccentricity-threshold",this.eccentricityThreshold.toString()),this.majorAxisThreshold!==void 0&&n.setArtifact("connected-components:major-axis-threshold",this.majorAxisThreshold.toString()),this.meanColor!==void 0&&n.setArtifact("connected-components:mean-color",this.meanColor.toString()),this.minorAxisThreshold!==void 0&&n.setArtifact("connected-components:minor-axis-threshold",this.minorAxisThreshold.toString()),this.perimeterThreshold!==void 0&&n.setArtifact("connected-components:perimeter-threshold",this.perimeterThreshold.toString())}}var Ie=(t=>(t[t.Undefined=0]="Undefined",t[t.PixelsPerInch=1]="PixelsPerInch",t[t.PixelsPerCentimeter=2]="PixelsPerCentimeter",t))(Ie||{});class xe{constructor(n,e,u){e===void 0?(this.x=n,this.y=n,this.units=Ie.PixelsPerInch):u!==void 0?(this.x=n,this.y=e,this.units=u):(this.x=n,this.y=n,this.units=e)}x;y;units;toString(n){return n==this.units||n===Ie.Undefined||n===void 0?xe.toString(this.x,this.y,n??Ie.Undefined):this.units==Ie.PixelsPerCentimeter&&n==Ie.PixelsPerInch?xe.toString(this.x*2.54,this.y*2.54,n):xe.toString(this.x/2.54,this.y/2.54,n)}static toString(n,e,u){let c=`${n}x${e}`;switch(u){case Ie.PixelsPerCentimeter:c+="cm";break;case Ie.PixelsPerInch:c+="inch";break}return c}}class _e{static _disposeAfterExecution(n,e){try{const u=e(n);return u instanceof Promise?Promise.resolve(u).then(c=>(n.dispose(),_e.checkResult(n,c),c)):(n.dispose(),_e.checkResult(n,u),u)}catch(u){throw n.dispose(),u}}static checkResult(n,e){if(e===n)throw new J("The result of the function cannot be the instance that has been disposed.");return e}}class Bn{_pointer;_bytes;_func;constructor(n,e,u){this._pointer=n,this._func=u,this._bytes=_._api.HEAPU8.subarray(n,n+e)}func(n){return n._bytes===void 0?n._func(new Uint8Array):n._func(n._bytes)}dispose(){this._pointer=_._api._MagickMemory_Relinquish(this._pointer)}}class Ee{disposeMethod;instance;constructor(n,e){this.instance=n,this.disposeMethod=e}get _instance(){if(this.instance>0)return this.instance;throw this.instance===-1&&this._instanceNotInitialized(),new J("instance is disposed")}set _instance(n){this.disposeInstance(this.instance),this.instance=n}dispose(){this.instance=this.disposeInstance(this.instance)}_instanceNotInitialized(){throw new J("instance is not initialized")}_setInstance(n,e){return e.check(()=>this.instance===0?!1:(this.dispose(),this.instance=n,!0),()=>(this.disposeInstance(n),!0))}disposeInstance(n){return n>0&&(this.onDispose!==void 0&&this.onDispose(),this.disposeMethod(n)),0}}class Ga extends Ee{constructor(n){const e=_._api._DrawingSettings_Create(),u=_._api._DrawingSettings_Dispose;if(super(e,u),n.fillColor!==void 0&&n.fillColor._use(c=>{_._api._DrawingSettings_FillColor_Set(this._instance,c)}),n.font!==void 0){const c=ke._getFontFileName(n.font);E(c,p=>{_._api._DrawingSettings_Font_Set(this._instance,p)})}n.fontPointsize!==void 0&&_._api._DrawingSettings_FontPointsize_Set(this._instance,n.fontPointsize),n.strokeColor!==void 0&&n.strokeColor._use(c=>{_._api._DrawingSettings_StrokeColor_Set(this._instance,c)}),n.strokeWidth!==void 0&&_._api._DrawingSettings_StrokeWidth_Set(this._instance,n.strokeWidth)}}class tn{backgroundColor;fillColor;font;fontPointsize;strokeColor;strokeWidth;static _create(n){const e=new tn;return e.fillColor=n.fillColor,e.font=n.font,e.fontPointsize=n.fontPointsize,e.strokeColor=n.strokeColor,e.strokeWidth=n.strokeWidth,e}_use(n){const e=new Ga(this);return _e._disposeAfterExecution(e,n)}}class zn{instance;type;constructor(n,e){this.instance=_._api._malloc(n),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 Me extends zn{constructor(){super(4,"i32")}static use(n){const e=new Me;try{return n(e)}finally{_._api._free(e.ptr)}}}class A{pointer;constructor(n){this.pointer=n}get ptr(){return this.pointer.ptr}check(n,e){return this.isError()?e():n()}static usePointer(n,e){return Me.use(u=>{const c=n(u.ptr);return A.checkException(u,c,e)})}static use(n,e){return Me.use(u=>{const c=n(new A(u));return A.checkException(u,c,e)})}static checkException(n,e,u){if(!A.isRaised(n))return e;const c=A.getErrorSeverity(n.value);if(c>=rt.Error)A.throw(n,c);else if(u!==void 0){const p=A.createError(n.value,c);u(p)}else A.dispose(n);return e}isError(){return A.isRaised(this.pointer)?A.getErrorSeverity(this.pointer.value)>=rt.Error:!1}static getErrorSeverity(n){return _._api._MagickExceptionHelper_Severity(n)}static isRaised(n){return n.value!==0}static throw(n,e){const u=A.createError(n.value,e);throw A.dispose(n),u}static createError(n,e){const u=A.getMessage(n),c=new J(u,e),p=_._api._MagickExceptionHelper_RelatedCount(n);if(p===0)return c;const h=[];for(let S=0;S<p;S++){const C=_._api._MagickExceptionHelper_Related(n,S),W=A.getErrorSeverity(C),z=A.createError(C,W);h.push(z)}return c._setRelatedErrors(h),c}static getMessage(n){const e=_._api._MagickExceptionHelper_Message(n),u=_._api._MagickExceptionHelper_Description(n);let c=me(e);return u!==0&&(c+=`(${_._api.UTF8ToString(u)})`),c}static dispose(n){_._api._MagickExceptionHelper_Dispose(n.value)}}class At{constructor(n,e,u,c,p,h,S){this.ascent=n,this.descent=e,this.maxHorizontalAdvance=u,this.textHeight=c,this.textWidth=p,this.underlinePosition=h,this.underlineThickness=S}ascent;descent;maxHorizontalAdvance;textHeight;textWidth;underlinePosition;underlineThickness;static _create(n){if(n==0)return null;try{const e=_._api._TypeMetric_Ascent_Get(n),u=_._api._TypeMetric_Descent_Get(n),c=_._api._TypeMetric_MaxHorizontalAdvance_Get(n),p=_._api._TypeMetric_TextHeight_Get(n),h=_._api._TypeMetric_TextWidth_Get(n),S=_._api._TypeMetric_UnderlinePosition_Get(n),C=_._api._TypeMetric_UnderlineThickness_Get(n);return new At(e,u,c,p,h,S,C)}finally{_._api._TypeMetric_Dispose(n)}}}class it extends Ee{constructor(n,e){const c=tn._create(e)._use(h=>_._api._DrawingWand_Create(n._instance,h._instance)),p=_._api._DrawingWand_Dispose;super(c,p)}color(n,e,u){A.usePointer(c=>{_._api._DrawingWand_Color(this._instance,n,e,u,c)})}draw(n){n.forEach(e=>{e.draw(this)}),A.usePointer(e=>{_._api._DrawingWand_Render(this._instance,e)})}fillColor(n){A.usePointer(e=>{n._use(u=>{_._api._DrawingWand_FillColor(this._instance,u,e)})})}fillOpacity(n){A.usePointer(e=>{_._api._DrawingWand_FillOpacity(this._instance,n,e)})}font(n){A.usePointer(e=>{E(n,u=>{_._api._DrawingWand_Font(this._instance,u,e)})})}fontPointSize(n){A.usePointer(e=>{_._api._DrawingWand_FontPointSize(this._instance,n,e)})}fontTypeMetrics(n,e){return A.usePointer(u=>E(n,c=>{const p=_._api._DrawingWand_FontTypeMetrics(this._instance,c,e?1:0,u);return At._create(p)}))}gravity(n){A.usePointer(e=>{_._api._DrawingWand_Gravity(this._instance,n,e)})}line(n,e,u,c){A.usePointer(p=>{_._api._DrawingWand_Line(this._instance,n,e,u,c,p)})}point(n,e){A.usePointer(u=>{_._api._DrawingWand_Point(this._instance,n,e,u)})}rectangle(n,e,u,c){A.usePointer(p=>{_._api._DrawingWand_Rectangle(this._instance,n,e,u,c,p)})}roundRectangle(n,e,u,c,p,h){A.usePointer(S=>{_._api._DrawingWand_RoundRectangle(this._instance,n,e,u,c,p,h,S)})}strokeColor(n){A.usePointer(e=>{n._use(u=>{_._api._DrawingWand_StrokeColor(this._instance,u,e)})})}strokeWidth(n){A.usePointer(e=>{_._api._DrawingWand_StrokeWidth(this._instance,n,e)})}text(n,e,u){A.usePointer(c=>{E(u,p=>{_._api._DrawingWand_Text(this._instance,n,e,p,c)})})}textAlignment(n){A.usePointer(e=>{_._api._DrawingWand_TextAlignment(this._instance,n,e)})}textAntialias(n){A.usePointer(e=>{_._api._DrawingWand_TextAntialias(this._instance,n?1:0,e)})}textDecoration(n){A.usePointer(e=>{_._api._DrawingWand_TextDecoration(this._instance,n,e)})}textInterlineSpacing(n){A.usePointer(e=>{_._api._DrawingWand_TextInterlineSpacing(this._instance,n,e)})}textInterwordspacing(n){A.usePointer(e=>{_._api._DrawingWand_TextInterwordSpacing(this._instance,n,e)})}textKerning(n){A.usePointer(e=>{_._api._DrawingWand_TextKerning(this._instance,n,e)})}textUnderColor(n){A.usePointer(e=>{n._use(u=>{_._api._DrawingWand_TextUnderColor(this._instance,u,e)})})}static _use(n,e){const u=new it(n,n.settings);return _e._disposeAfterExecution(u,e)}}class nn extends zn{constructor(){super(8,"double")}static use(n){const e=new nn;try{return n(e)}finally{_._api._free(e.ptr)}}}var st=(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))(st||{});function*Nn(t){for(const n of t)switch(n){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 ut{constructor(n,e,u){this.meanErrorPerPixel=n,this.normalizedMeanError=e,this.normalizedMaximumError=u}meanErrorPerPixel;normalizedMaximumError;normalizedMeanError;static _create(n){const e=_._api._MagickImage_MeanErrorPerPixel_Get(n._instance),u=_._api._MagickImage_NormalizedMeanError_Get(n._instance),c=_._api._MagickImage_NormalizedMaximumError_Get(n._instance);return new ut(e,u,c)}}var ye=(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))(ye||{}),ot=(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))(ot||{});class xn extends Ee{constructor(n){const e=_._api._MagickSettings_Create(),u=_._api._MagickSettings_Dispose;if(super(e,u),n._fileName!==void 0&&E(n._fileName,c=>{_._api._MagickSettings_SetFileName(this._instance,c)}),n._ping&&_._api._MagickSettings_SetPing(this._instance,1),n._quality!==void 0&&_._api._MagickSettings_SetQuality(this._instance,n._quality),n.antiAlias!==void 0&&_._api._MagickSettings_AntiAlias_Set(this._instance,n.antiAlias?1:0),n.backgroundColor!==void 0&&n.backgroundColor._use(c=>{_._api._MagickSettings_BackgroundColor_Set(this._instance,c)}),n.colorSpace!==void 0&&_._api._MagickSettings_ColorSpace_Set(this._instance,n.colorSpace),n.colorType!==void 0&&_._api._MagickSettings_ColorType_Set(this._instance,n.colorType),n.compression!==void 0&&_._api._MagickSettings_Compression_Set(this._instance,n.compression),n.debug!==void 0&&_._api._MagickSettings_Debug_Set(this._instance,n.debug?1:0),n.density!==void 0){const c=n.density.toString();E(c,p=>{_._api._MagickSettings_Density_Set(this._instance,p)})}if(n.depth!==void 0&&_._api._MagickSettings_Depth_Set(this._instance,n.depth),n.endian!==void 0&&_._api._MagickSettings_Endian_Set(this._instance,n.endian),n.fillColor!==void 0&&this.setOption("fill",n.fillColor.toString()),n.font!==void 0){const c=ke._getFontFileName(n.font);E(c,p=>{_._api._MagickSettings_SetFont(this._instance,p)})}n.fontPointsize!==void 0&&_._api._MagickSettings_FontPointsize_Set(this._instance,n.fontPointsize),n.format!==void 0&&E(n.format,c=>{_._api._MagickSettings_Format_Set(this._instance,c)}),n.interlace!==void 0&&_._api._MagickSettings_Interlace_Set(this._instance,n.interlace),n.strokeColor!==void 0&&this.setOption("stroke",n.strokeColor.toString()),n.strokeWidth!==void 0&&this.setOption("strokeWidth",n.strokeWidth.toString()),n.textInterlineSpacing!==void 0&&this.setOption("interline-spacing",n.textInterlineSpacing.toString()),n.textKerning!==void 0&&this.setOption("kerning",n.textKerning.toString());for(const c in n._options)this.setOption(c,n._options[c])}setOption(n,e){E(n,u=>{E(e,c=>{_._api._MagickSettings_SetOption(this._instance,u,c)})})}}class Qe{_options={};_fileName;_ping=!1;_quality;antiAlias;backgroundColor;colorSpace;colorType;compression;debug;density;depth;endian;fillColor;font;fontPointsize;format;interlace;strokeColor;strokeWidth;textInterlineSpacing;textKerning;getDefine(n,e){return e!==void 0?this._options[`${n}:${e}`]??null:this._options[n]??null}setDefine(n,e,u){if(u===void 0)this._options[n]=e;else{const c=this.parseDefine(n,e);typeof u=="string"?this._options[c]=u:typeof u=="number"?this._options[c]=u.toString():this._options[c]=u?"true":"false"}}setDefines(n){n.getDefines().forEach(e=>{e!==void 0&&this.setDefine(e.format,e.name,e.value)})}_clone(){const n=new Qe;return Object.assign(n,this),n}_use(n){const e=new xn(this);return _e._disposeAfterExecution(e,n)}parseDefine(n,e){return n===ye.Unknown?e:`${n}:${e}`}}class we extends Qe{constructor(n){super(),Object.assign(this,n)}extractArea;frameIndex;frameCount;height;get syncImageWithExifProfile(){const n=this.getDefine("exif:sync-image");return n===null?!0:n.toLowerCase()==="true"}set syncImageWithExifProfile(n){this.setDefine("exif:sync-image",n.toString())}get syncImageWithTiffProperties(){const n=this.getDefine("tiff:sync-image");return n===null?!0:n.toLowerCase()==="true"}set syncImageWithTiffProperties(n){this.setDefine("tiff:sync-image",n.toString())}width;_use(n){const e=new xn(this),u=this.getSize();if(u!==""&&E(u,c=>{_._api._MagickSettings_SetSize(e._instance,c)}),this.frameIndex!==void 0||this.frameCount!==void 0){const c=this.frameIndex??0,p=this.frameCount??1;_._api._MagickSettings_SetScene(e._instance,c),_._api._MagickSettings_SetNumberScenes(e._instance,p);const h=this.frameCount!==void 0?`${c}-${c+p}`:c.toString();E(h.toString(),S=>{_._api._MagickSettings_SetScenes(e._instance,S)})}return this.extractArea!==void 0&&E(this.extractArea.toString(),c=>{_._api._MagickSettings_Extract_Set(e._instance,c)}),_e._disposeAfterExecution(e,n)}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 Tt=(t=>(t[t.Undefined=0]="Undefined",t[t.No=1]="No",t[t.Riemersma=2]="Riemersma",t[t.FloydSteinberg=3]="FloydSteinberg",t))(Tt||{});class Pa extends Ee{constructor(n){const e=_._api._QuantizeSettings_Create(),u=_._api._QuantizeSettings_Dispose;super(e,u),_._api._QuantizeSettings_SetColors(this._instance,n.colors),_._api._QuantizeSettings_SetColorSpace(this._instance,n.colorSpace),_._api._QuantizeSettings_SetDitherMethod(this._instance,n.ditherMethod??Tt.No),_._api._QuantizeSettings_SetMeasureErrors(this._instance,n.measureErrors?1:0),_._api._QuantizeSettings_SetTreeDepth(this._instance,n.treeDepth)}}class Rt{constructor(){this.colors=256,this.colorSpace=te.Undefined,this.ditherMethod=Tt.Riemersma,this.measureErrors=!1,this.treeDepth=0}colors;colorSpace;ditherMethod;measureErrors;treeDepth;_use(n){const e=new Pa(this);return _e._disposeAfterExecution(e,n)}}class He{_image;_names=[];constructor(n){this._image=n}setArtifact(n,e){this._names.push(n),this._image.setArtifact(n,e)}static use(n,e){const u=new He(n);try{return e(u)}finally{u.dispose()}}dispose(){for(const n of this._names)this._image.removeArtifact(n)}}function Hn(t,n){if(t.byteLength===0)throw new J("The specified array cannot be empty");let e=0;try{return e=_._api._malloc(t.byteLength),_._api.HEAPU8.set(t,e),n(e)}finally{e!==0&&_._api._free(e)}}function Un(t,n){if(t.length===0)throw new J("The specified array cannot be empty");const e=t.length*8;let u=0;try{u=_._api._malloc(e);const c=new ArrayBuffer(e),p=new Float64Array(c);for(let h=0;h<t.length;h++)p[h]=t[h];return _._api.HEAPU8.set(new Int8Array(c),u),n(u)}finally{u!==0&&_._api._free(u)}}function Aa(t,n){if(t.byteLength===0)throw new J("The specified array cannot be empty");let e=0;try{return e=_._api._malloc(t.byteLength),_._api.HEAPU8.set(t,e),n(e)}finally{e!==0&&_._api._free(e)}}class Se extends Array{constructor(){super()}static create(n){const e=Se.createObject();return n!==void 0&&e.read(n),e}dispose(){let n=this.pop();for(;n!==void 0;)n.dispose(),n=this.pop()}appendHorizontally(n){return this.createImage((e,u)=>_._api._MagickImageCollection_Append(e,0,u.ptr),n)}appendVertically(n){return this.createImage((e,u)=>_._api._MagickImageCollection_Append(e,1,u.ptr),n)}clone(n){const e=Se.create();for(let u=0;u<this.length;u++)e.push(ne._clone(this[u]));return e._use(n)}coalesce(){this.replaceImages((n,e)=>_._api._MagickImageCollection_Coalesce(n,e.ptr))}combine(n,e){let u=e,c=te.sRGB;return typeof n=="number"?c=n:u=n,this.createImage((p,h)=>_._api._MagickImageCollection_Combine(p,c,h.ptr),u)}complex(n,e){return He.use(this[0],u=>(n._setArtifacts(u),this.createImage((c,p)=>_._api._MagickImageCollection_Complex(c,n.complexOperator,p.ptr),e)))}deconstruct(){this.replaceImages((n,e)=>_._api._MagickImageCollection_Deconstruct(n,e.ptr))}evaluate(n,e){return this.createImage((u,c)=>_._api._MagickImageCollection_Evaluate(u,n,c.ptr),e)}flatten(n){return this.mergeImages(ot.Flatten,n)}fx(n,e,u){this.throwIfEmpty();let c=Q.All,p=u;return typeof e=="number"?c=e:p=e,E(n,h=>this.createImage((S,C)=>_._api._MagickImageCollection_Fx(S,h,c,C.ptr),p))}merge(n){return this.mergeImages(ot.Merge,n)}montage(n,e){return this.throwIfEmpty(),this.attachImages(u=>{const c=n._use(p=>A.use(h=>{const S=_._api._MagickImageCollection_Montage(u,p._instance,h.ptr);return this.checkResult(S,h)}));return Se._createFromImages(c,this.getSettings())._use(p=>{const h=n.transparentColor;return h!==void 0&&p.forEach(S=>{S.transparent(h)}),p.merge(e)})})}morph(n){if(this.length<2)throw new J("operation requires at least two images");this.replaceImages((e,u)=>_._api._MagickImageCollection_Morph(e,n,u.ptr))}mosaic(n){return this.mergeImages(ot.Mosaic,n)}optimize(){this.replaceImages((n,e)=>_._api._MagickImageCollection_Optimize(n,e.ptr))}optimizePlus(){this.replaceImages((n,e)=>_._api._MagickImageCollection_OptimizePlus(n,e.ptr))}optimizeTransparency(){this.throwIfEmpty(),this.attachImages(n=>{A.usePointer(e=>{_._api._MagickImageCollection_OptimizeTransparency(n,e)})})}ping(n,e){this.readOrPing(!0,n,e)}polynomial(n,e){return this.createImage((u,c)=>Un(n,p=>_._api._MagickImageCollection_Polynomial(u,p,n.length,c.ptr)),e)}quantize(n){this.throwIfEmpty();const e=n===void 0?new Rt:n;return this.attachImages(u=>{e._use(c=>{A.usePointer(p=>{_._api._MagickImageCollection_Quantize(u,c._instance,p)})})}),e.measureErrors?ut._create(this[0]):null}read(n,e){this.readOrPing(!1,n,e)}remap(n,e){this.throwIfEmpty();const u=e===void 0?new Rt:e;this.attachImages(c=>{u._use(p=>{A.use(h=>{_._api._MagickImageCollection_Remap(c,p._instance,n._instance,h.ptr)})})})}resetPage(){this.forEach(n=>{n.resetPage()})}smushHorizontal(n,e){return this.smush(n,!1,e)}smushVertical(n,e){return this.smush(n,!0,e)}trimBounds(){this.mergeImages(ot.Trimbounds,()=>{})}write(n,e){this.throwIfEmpty();let u=0,c=0;const p=this[0],h=this.getSettings();e!==void 0?h.format=n:(e=n,h.format=p.format),A.use(C=>{Me.use(W=>{h._use(z=>{this.attachImages(ue=>{u=_._api._MagickImage_WriteBlob(ue,z._instance,W.ptr,C.ptr),c=W.value})})})});const S=new Bn(u,c,e);return _e._disposeAfterExecution(S,S.func)}static _createFromImages(n,e){const u=Se.createObject();return u.addImages(n,e._clone()),u}_use(n){return _e._disposeAfterExecution(this,n)}addImages(n,e){e.format=ye.Unknown;let u=n;for(;u!==0;){const c=_._api._MagickImage_GetNext(u);_._api._MagickImage_SetNext(u,0),this.push(ne._createFromImage(u,e)),u=c}}attachImages(n){try{for(let e=0;e<this.length-1;e++)_._api._MagickImage_SetNext(this[e]._instance,this[e+1]._instance);return n(this[0]._instance)}finally{for(let e=0;e<this.length-1;e++)_._api._MagickImage_SetNext(this[e]._instance,0)}}checkResult(n,e){return e.check(()=>n,()=>(_._api._MagickImageCollection_Dispose(n),0))}static createObject(){return Object.create(Se.prototype)}createImage(n,e){this.throwIfEmpty();const u=this.attachImages(p=>A.use(h=>{const S=n(p,h);return this.checkResult(S,h)}));return ne._createFromImage(u,this.getSettings())._use(e)}getSettings(){return this[0]._getSettings()._clone()}mergeImages(n,e){return this.createImage((u,c)=>_._api._MagickImageCollection_Merge(u,n,c.ptr),e)}readOrPing(n,e,u){this.dispose(),A.use(c=>{const p=u===void 0?new we:new we(u);p._ping=n,typeof e=="string"?(p._fileName=e,p._use(h=>{const S=_._api._MagickImageCollection_ReadFile(h._instance,c.ptr);this.addImages(S,p)})):p._use(h=>{const S=e.byteLength;let C=0;try{C=_._api._malloc(S),_._api.HEAPU8.set(e,C);const W=_._api._MagickImageCollection_ReadBlob(h._instance,C,0,S,c.ptr);this.addImages(W,p)}finally{C!==0&&_._api._free(C)}})})}replaceImages(n){this.throwIfEmpty();const e=this.attachImages(c=>A.use(p=>{const h=n(c,p);return this.checkResult(h,p)})),u=this.getSettings()._clone();this.dispose(),this.addImages(e,u)}smush(n,e,u){return this.createImage((c,p)=>_._api._MagickImageCollection_Smush(c,n,e?1:0,p.ptr),u)}throwIfEmpty(){if(this.length===0)throw new J("operation requires at least one image")}}class ae{_value;constructor(n){this._value=n}static _fromQuantum(n){return new ae(n/Re.max*100)}multiply(n){return n*this._value/100}toDouble(){return this._value}_toQuantum(){return Re.max*(this._value/100)}}class Fn{static use(n,e,u){const c=_._api._MagickRectangle_Create();try{_._api._MagickRectangle_X_Set(c,e.x),_._api._MagickRectangle_Y_Set(c,e.y);let p=e.width,h=e.height;return e.isPercentage&&(p=new ae(e.width).multiply(n.width),h=new ae(e.height).multiply(n.height)),_._api._MagickRectangle_Width_Set(c,p),_._api._MagickRectangle_Height_Set(c,h),u(c)}finally{_._api._MagickRectangle_Dispose(c)}}}class Ue extends Ee{image;constructor(n){const e=A.usePointer(c=>_._api._PixelCollection_Create(n._instance,c)),u=_._api._PixelCollection_Dispose;super(e,u),this.image=n}static _create(n){return new Ue(n)}static _use(n,e){const u=new Ue(n);return _e._disposeAfterExecution(u,e)}static _map(n,e,u){const c=new Ue(n);try{c.use(0,0,n.width,n.height,e,p=>{u(p)})}finally{c.dispose()}}getArea(n,e,u,c){return A.usePointer(p=>{const h=_._api._PixelCollection_GetArea(this._instance,n,e,u,c,p),S=u*c*this.image.channelCount;return _._api.HEAPU8.subarray(h,h+S)})}getPixel(n,e){return this.getArea(n,e,1,1)}setArea(n,e,u,c,p){A.usePointer(h=>{const S=p instanceof Uint8Array?p:new Uint8Array(p);Aa(S,C=>{_._api._PixelCollection_SetArea(this._instance,n,e,u,c,C,S.length,h)})})}setPixel(n,e,u){u instanceof Uint8Array?this.setArea(n,e,1,1,u):this.setArea(n,e,1,1,u)}toByteArray(n,e,u,c,p){return this.use(n,e,u,c,p,h=>{if(h===0)return null;const S=u*c*p.length;return _._api.HEAPU8.slice(h,h+S)})}use(n,e,u,c,p,h){return E(p,S=>A.use(C=>{let W=_._api._PixelCollection_ToByteArray(this._instance,n,e,u,c,S,C.ptr);return C.check(()=>{const z=h(W);return W=_._api._MagickMemory_Relinquish(W),z},()=>(W=_._api._MagickMemory_Relinquish(W),null))}))}}var rn=(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))(rn||{});class We{constructor(n,e,u){this.x=n,this.y=e,this.z=u}x;y;z;static _create(n){return n===0?new We(0,0,0):new We(_._api._PrimaryInfo_X_Get(n),_._api._PrimaryInfo_Y_Get(n),_._api._PrimaryInfo_Z_Get(n))}_use(n){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),n(e)}finally{_._api._free(e)}}}class $n{channel;depth;entropy;kurtosis;maximum;mean;minimum;skewness;standardDeviation;constructor(n,e){this.channel=n,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 Et{_channels={};get channels(){const n=[];for(const e in this._channels)n.push(parseInt(e));return n}composite(){return this._channels[$.Composite]}getChannel(n){const e=this._channels[n];return e!==void 0?e:null}static _create(n,e,u){const c=new Et;return n.channels.forEach(p=>{u>>p&1&&c.addChannel(e,p)}),c.addChannel(e,$.Composite),c}addChannel(n,e){const u=_._api._Statistics_GetInstance(n,e);u!==0&&(this._channels[e]=new $n(e,u))}}class Ta{static toArray(n){if(n===0)return null;const e=_._api._StringInfo_Datum_Get(n),u=_._api._StringInfo_Length_Get(n);return _._api.HEAPU8.subarray(e,e+u)}}class an{constructor(n){this.error=n}error}class ne extends Ee{_settings;_progress;_warning;constructor(n,e){super(n,_._api._MagickImage_Dispose),this._settings=e}get animationDelay(){return _._api._MagickImage_AnimationDelay_Get(this._instance)}set animationDelay(n){_._api._MagickImage_AnimationDelay_Set(this._instance,n)}get animationIterations(){return _._api._MagickImage_AnimationIterations_Get(this._instance)}set animationIterations(n){_._api._MagickImage_AnimationIterations_Set(this._instance,n)}get animationTicksPerSecond(){return _._api._MagickImage_AnimationTicksPerSecond_Get(this._instance)}set animationTicksPerSecond(n){_._api._MagickImage_AnimationTicksPerSecond_Set(this._instance,n)}get artifactNames(){const n=[];_._api._MagickImage_ResetArtifactIterator(this._instance);let e=_._api._MagickImage_GetNextArtifactName(this._instance);for(;e!==0;)n.push(_._api.UTF8ToString(e)),e=_._api._MagickImage_GetNextArtifactName(this._instance);return n}get attributeNames(){const n=[];_._api._MagickImage_ResetAttributeIterator(this._instance);let e=_._api._MagickImage_GetNextAttributeName(this._instance);for(;e!==0;)n.push(_._api.UTF8ToString(e)),e=_._api._MagickImage_GetNextAttributeName(this._instance);return n}get backgroundColor(){const n=_._api._MagickImage_BackgroundColor_Get(this._instance);return w._create(n)}set backgroundColor(n){n._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(n){_._api._MagickImage_BlackPointCompensation_Set(this._instance,n?1:0)}get borderColor(){const n=_._api._MagickImage_BorderColor_Get(this._instance);return w._create(n)}set borderColor(n){n._use(e=>{_._api._MagickImage_BorderColor_Set(this._instance,e)})}get boundingBox(){return this.useExceptionPointer(n=>{const e=_._api._MagickImage_BoundingBox_Get(this._instance,n),u=oe._fromRectangle(e);return u.width===0||u.height===0?null:u})}get channelCount(){return _._api._MagickImage_ChannelCount_Get(this._instance)}get channels(){const n=[];return[$.Red,$.Green,$.Blue,$.Black,$.Alpha].forEach(e=>{_._api._MagickImage_HasChannel(this._instance,e)&&n.push(e)}),n}get chromaticity(){return new Rn(We._create(_._api._MagickImage_ChromaRed_Get(this._instance)),We._create(_._api._MagickImage_ChromaGreen_Get(this._instance)),We._create(_._api._MagickImage_ChromaBlue_Get(this._instance)),We._create(_._api._MagickImage_ChromaWhite_Get(this._instance)))}set chromaticity(n){n.blue._use(e=>_._api._MagickImage_ChromaBlue_Set(this._instance,e)),n.green._use(e=>_._api._MagickImage_ChromaGreen_Set(this._instance,e)),n.red._use(e=>_._api._MagickImage_ChromaRed_Set(this._instance,e)),n.white._use(e=>_._api._MagickImage_ChromaWhite_Set(this._instance,e))}get classType(){return _._api._MagickImage_ClassType_Get(this._instance)}set classType(n){this.useExceptionPointer(e=>{_._api._MagickImage_ClassType_Set(this._instance,n,e)})}get colorFuzz(){return ae._fromQuantum(_._api._MagickImage_ColorFuzz_Get(this._instance))}set colorFuzz(n){_._api._MagickImage_ColorFuzz_Set(this._instance,n._toQuantum())}get colormapSize(){return _._api._MagickImage_ColormapSize_Get(this._instance)}set colormapSize(n){this.useExceptionPointer(e=>{_._api._MagickImage_ColormapSize_Set(this._instance,n,e)})}get colorSpace(){return _._api._MagickImage_ColorSpace_Get(this._instance)}set colorSpace(n){this.useExceptionPointer(e=>{_._api._MagickImage_ColorSpace_Set(this._instance,n,e)})}get colorType(){return this.settings.colorType!==void 0?this.settings.colorType:_._api._MagickImage_ColorType_Get(this._instance)}set colorType(n){this.useExceptionPointer(e=>{_._api._MagickImage_ColorType_Set(this._instance,n,e)})}get comment(){return this.getAttribute("comment")}set comment(n){n===null?this.removeAttribute("comment"):this.setAttribute("comment",n)}get compose(){return _._api._MagickImage_Compose_Get(this._instance)}set compose(n){_._api._MagickImage_Compose_Set(this._instance,n)}get compression(){return _._api._MagickImage_Compression_Get(this._instance)}get density(){return new xe(_._api._MagickImage_ResolutionX_Get(this._instance),_._api._MagickImage_ResolutionY_Get(this._instance),_._api._MagickImage_ResolutionUnits_Get(this._instance))}set density(n){_._api._MagickImage_ResolutionX_Set(this._instance,n.x),_._api._MagickImage_ResolutionY_Set(this._instance,n.y),_._api._MagickImage_ResolutionUnits_Set(this._instance,n.units)}get depth(){return _._api._MagickImage_Depth_Get(this._instance)}set depth(n){_._api._MagickImage_Depth_Set(this._instance,n)}get endian(){return _._api._MagickImage_Endian_Get(this._instance)}set endian(n){_._api._MagickImage_Endian_Set(this._instance,n)}get fileName(){const n=_._api._MagickImage_FileName_Get(this._instance);return n===0?null:_._api.UTF8ToString(n)}get filterType(){return _._api._MagickImage_FilterType_Get(this._instance)}set filterType(n){_._api._MagickImage_FilterType_Set(this._instance,n)}get format(){return me(_._api._MagickImage_Format_Get(this._instance))}set format(n){E(n.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(n){_._api._MagickImage_GifDisposeMethod_Set(this._instance,n)}get hasAlpha(){return this.toBool(_._api._MagickImage_HasAlpha_Get(this._instance))}set hasAlpha(n){this.useExceptionPointer(e=>{n&&this.alpha(Kt.Opaque),_._api._MagickImage_HasAlpha_Set(this._instance,this.fromBool(n),e)})}get height(){return _._api._MagickImage_Height_Get(this._instance)}get interlace(){return _._api._MagickImage_Interlace_Get(this._instance)}get isOpaque(){return this.useExceptionPointer(n=>this.toBool(_._api._MagickImage_IsOpaque_Get(this._instance,n)))}get interpolate(){return _._api._MagickImage_Interpolate_Get(this._instance)}set interpolate(n){_._api._MagickImage_Interpolate_Set(this._instance,n)}get label(){return this.getAttribute("label")}set label(n){n===null?this.removeAttribute("label"):this.setAttribute("label",n)}get matteColor(){const n=_._api._MagickImage_MatteColor_Get(this._instance);return w._create(n)}set matteColor(n){n._use(e=>{_._api._MagickImage_MatteColor_Set(this._instance,e)})}get metaChannelCount(){return _._api._MagickImage_MetaChannelCount_Get(this._instance)}set metaChannelCount(n){this.useExceptionPointer(e=>{_._api._MagickImage_MetaChannelCount_Set(this._instance,n,e)})}get orientation(){return _._api._MagickImage_Orientation_Get(this._instance)}set orientation(n){_._api._MagickImage_Orientation_Set(this._instance,n)}get onProgress(){return this._progress}set onProgress(n){n!==void 0?se.setProgressDelegate(this):this.disposeProgressDelegate(),this._progress=n}get onWarning(){return this._warning}set onWarning(n){this._warning=n}get page(){const n=_._api._MagickImage_Page_Get(this._instance);return oe._fromRectangle(n)}set page(n){n._toRectangle(e=>{_._api._MagickImage_Page_Set(this._instance,e)})}get profileNames(){const n=[];_._api._MagickImage_ResetProfileIterator(this._instance);let e=_._api._MagickImage_GetNextProfileName(this._instance);for(;e!==0;)n.push(_._api.UTF8ToString(e)),e=_._api._MagickImage_GetNextProfileName(this._instance);return n}get quality(){return _._api._MagickImage_Quality_Get(this._instance)}set quality(n){let e=n<1?1:n;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(n){_._api._MagickImage_RenderingIntent_Set(this._instance,n)}get settings(){return this._settings}get signature(){return this.useExceptionPointer(n=>me(_._api._MagickImage_Signature_Get(this._instance,n)))}get totalColors(){return this.useExceptionPointer(n=>_._api._MagickImage_TotalColors_Get(this._instance,n))}get virtualPixelMethod(){return _._api._MagickImage_VirtualPixelMethod_Get(this._instance)}set virtualPixelMethod(n){this.useExceptionPointer(e=>{_._api._MagickImage_VirtualPixelMethod_Set(this._instance,n,e)})}get width(){return _._api._MagickImage_Width_Get(this._instance)}adaptiveBlur(n,e){const u=this.valueOrDefault(n,0),c=this.valueOrDefault(e,1);this.useException(p=>{const h=_._api._MagickImage_AdaptiveBlur(this._instance,u,c,p.ptr);this._setInstance(h,p)})}adaptiveResize(n,e){const u=typeof n=="number"?new oe(0,0,n,e):n;this.useException(c=>{E(u.toString(),p=>{const h=_._api._MagickImage_AdaptiveResize(this._instance,p,c.ptr);this._setInstance(h,c)})})}adaptiveSharpen(n,e,u){let c=0;const p=e??1;let h=u??Q.Undefined;n!==void 0&&(e===void 0?h=n:c=n),this.useException(S=>{const C=_._api._MagickImage_AdaptiveSharpen(this._instance,c,p,h,S.ptr);this._setInstance(C,S)})}addNoise(n,e,u){let c=1,p=u??Q.Undefined;e!==void 0&&(u===void 0?p=e:c=e),this.useException(h=>{const S=_._api._MagickImage_AddNoise(this._instance,n,c,p,h.ptr);this._setInstance(S,h)})}alpha(n){this.useExceptionPointer(e=>{_._api._MagickImage_SetAlpha(this._instance,n,e)})}autoGamma(n){this.useExceptionPointer(e=>{const u=this.valueOrDefault(n,Q.Composite);_._api._MagickImage_AutoGamma(this._instance,u,e)})}autoLevel(n){this.useExceptionPointer(e=>{const u=this.valueOrDefault(n,Q.Undefined);_._api._MagickImage_AutoLevel(this._instance,u,e)})}autoOrient(){this.useException(n=>{const e=_._api._MagickImage_AutoOrient(this._instance,n.ptr);this._setInstance(e,n)})}autoThreshold(n){this.useException(e=>{_._api._MagickImage_AutoThreshold(this._instance,n,e.ptr)})}blur(n,e,u){let c=0;const p=this.valueOrDefault(e,1);let h=this.valueOrDefault(u,Q.Undefined);n!==void 0&&(e===void 0?h=n:c=n),this.useException(S=>{const C=_._api._MagickImage_Blur(this._instance,c,p,h,S.ptr);this._setInstance(C,S)})}border(n,e){const u=n,c=this.valueOrDefault(e,n),p=new oe(0,0,u,c);this.useException(h=>{p._toRectangle(S=>{const C=_._api._MagickImage_Border(this._instance,S,h.ptr);this._setInstance(C,h)})})}brightnessContrast(n,e,u){const c=this.valueOrDefault(u,Q.Undefined);this.useException(p=>{_._api._MagickImage_BrightnessContrast(this._instance,n.toDouble(),e.toDouble(),c,p.ptr)})}charcoal(n,e){const u=n===void 0?0:n,c=e===void 0?1:e;this.useException(p=>{const h=_._api._MagickImage_Charcoal(this._instance,u,c,p.ptr);this._setInstance(h,p)})}clahe(n,e,u,c){this.useExceptionPointer(p=>{const h=n instanceof ae?n.multiply(this.width):n,S=e instanceof ae?e.multiply(this.height):e;_._api._MagickImage_Clahe(this._instance,h,S,u,c,p)})}clone(n){return ne._clone(this)._use(n)}colorAlpha(n){if(!this.hasAlpha)return;const e=ne.create();e.read(n,this.width,this.height),e.composite(this,at.SrcOver,new de(0,0)),this._instance=e._instance}compare(n,e,u,c){const p=e instanceof Wn,h=p?e.metric:e;let S=u;c!==void 0&&(S=c);let C=Q.Undefined;if(typeof S!="function")return S!==void 0&&(C=S),this.useExceptionPointer(z=>_._api._MagickImage_CompareDistortion(this._instance,n._instance,h,C,z));u!==void 0&&typeof u!="function"&&(C=u);const W=He.use(this,z=>(p&&e._setArtifacts(z),nn.use(ue=>{const be=this.useExceptionPointer(_t=>_._api._MagickImage_Compare(this._instance,n._instance,h,C,ue.ptr,_t)),Le=ue.value,Fe=ne._createFromImage(be,this._settings);return Gt._create(Le,Fe)})));return W.difference._use(()=>S(W))}composite(n,e,u,c,p){let h=0,S=0,C=at.In,W=Q.All,z=null;e instanceof de?(h=e.x,S=e.y):e!==void 0&&(C=e),u instanceof de?(h=u.x,S=u.y):typeof u=="string"?z=u:u!==void 0&&(W=u),typeof c=="string"?z=c:c!==void 0&&(W=c),p!==void 0&&(W=p),z!==null&&this.setArtifact("compose:args",z),this.useExceptionPointer(ue=>{_._api._MagickImage_Composite(this._instance,n._instance,h,S,C,W,ue)}),z!==null&&this.removeArtifact("compose:args")}compositeGravity(n,e,u,c,p,h){let S=0,C=0,W=at.In,z=Q.All,ue=null;u instanceof de?(S=u.x,C=u.y):u!==void 0&&(W=u),c instanceof de?(S=c.x,C=c.y):typeof c=="string"?ue=c:c!==void 0&&(z=c),typeof p=="string"?ue=p:p!==void 0&&(z=p),h!==void 0&&(z=h),ue!==null&&this.setArtifact("compose:args",ue),this.useExceptionPointer(be=>{_._api._MagickImage_CompositeGravity(this._instance,n._instance,e,S,C,W,z,be)}),ue!==null&&this.removeArtifact("compose:args")}connectedComponents(n){const e=typeof n=="number"?new Ln(n):n;return He.use(this,c=>(e._setArtifacts(c),this.useException(p=>Me.use(h=>{try{const S=_._api._MagickImage_ConnectedComponents(this._instance,e.connectivity,h.ptr,p.ptr);return this._setInstance(S,p),Pt._create(h.value,this.colormapSize)}finally{h.value!==0&&_._api._ConnectedComponent_DisposeList(h.value)}}))))}contrast=()=>this._contrast(!0);contrastStretch(n,e,u){const c=this.width*this.height,p=n.multiply(c);let h=0,S=this.valueOrDefault(u,Q.Undefined);e instanceof ae?h=c-e.multiply(c):(h=c-n.multiply(c),e!==void 0&&(S=e)),this.useExceptionPointer(C=>{_._api._MagickImage_ContrastStretch(this._instance,p,h,S,C)})}static create(n,e,u){const c=new ne(ne.createInstance(),new Qe);return n!==void 0&&c.readOrPing(!1,n,e,u),c}crop(n,e,u){let c,p;typeof n!="number"?(c=n,p=this.valueOrDefault(e,st.Undefined)):e!==void 0&&(c=new oe(n,e),p=this.valueOrDefault(u,st.Undefined)),this.useException(h=>{E(c.toString(),S=>{const C=_._api._MagickImage_Crop(this._instance,S,p,h.ptr);this._setInstance(C,h)})})}cropToTiles(n,e,u){let c,p;return typeof n=="number"&&typeof e=="number"&&u!==void 0?(c=new oe(0,0,n,e),p=u):typeof n!="number"&&typeof e!="number"&&(c=n,p=e),this.useException(h=>E(c.toString(),S=>{const C=_._api._MagickImage_CropToTiles(this._instance,S,h.ptr);return Se._createFromImages(C,this._settings)._use(p)}))}deskew(n,e){return He.use(this,u=>{e!==void 0&&u.setArtifact("deskew:auto-crop",e),this.useException(p=>{const h=_._api._MagickImage_Deskew(this._instance,n._toQuantum(),p.ptr);this._setInstance(h,p)});const c=Number(this.getArtifact("deskew:angle"));return isNaN(c)?0:c})}distort(n,e){He.use(this,u=>{let c,p=0;typeof n=="number"?c=n:(c=n.method,p=n.bestFit?1:0,n._setArtifacts(u)),this.useException(h=>{Un(e,S=>{const C=_._api._MagickImage_Distort(this._instance,c,p,S,e.length,h.ptr);this._setInstance(C,h)})})})}draw(...n){const e=n.flat();e.length!==0&&it._use(this,u=>{u.draw(e)})}evaluate(n,e,u,c){if(typeof e=="number"){const p=e,h=typeof u=="number"?u:u._toQuantum();this.useExceptionPointer(S=>{_._api._MagickImage_EvaluateOperator(this._instance,n,p,h,S)})}else if(c!==void 0){if(typeof u!="number")throw new J("this should not happen");const p=e,h=u,S=typeof c=="number"?c:c._toQuantum();if(p.isPercentage)throw new J("percentage is not supported");this.useExceptionPointer(C=>{Fn.use(this,p,W=>{_._api._MagickImage_EvaluateGeometry(this._instance,n,W,h,S,C)})})}}extent(n,e,u){let c=st.Undefined,p;typeof n!="number"?p=n:typeof e=="number"&&(p=new oe(n,e)),typeof e=="number"?c=e:e!==void 0&&(this.backgroundColor=e),typeof u=="number"?c=u:u!==void 0&&(this.backgroundColor=u),this.useException(h=>{E(p.toString(),S=>{const C=_._api._MagickImage_Extent(this._instance,S,c,h.ptr);this._setInstance(C,h)})})}flip(){this.useException(n=>{const e=_._api._MagickImage_Flip(this._instance,n.ptr);this._setInstance(e,n)})}flop(){this.useException(n=>{const e=_._api._MagickImage_Flop(this._instance,n.ptr);this._setInstance(e,n)})}gammaCorrect(n,e){const u=this.valueOrDefault(e,Q.Undefined);this.useExceptionPointer(c=>{_._api._MagickImage_GammaCorrect(this._instance,n,u,c)})}gaussianBlur(n,e,u){const c=this.valueOrDefault(e,1),p=this.valueOrDefault(u,Q.Undefined);this.useException(h=>{const S=_._api._MagickImage_GaussianBlur(this._instance,n,c,p,h.ptr);this._setInstance(S,h)})}getArtifact(n){return E(n,e=>{const u=_._api._MagickImage_GetArtifact(this._instance,e);return me(u)})}getAttribute(n){return this.useException(e=>E(n,u=>{const c=_._api._MagickImage_GetAttribute(this._instance,u,e.ptr);return me(c)}))}getColorProfile(){const n=["icc","icm"];for(const e of n){const u=this._getProfile(e);if(u!==null)return new En(e,u)}return null}getPixels(n){if(this._settings._ping)throw new J("image contains no pixel data");return Ue._use(this,n)}getProfile(n){const e=this._getProfile(n);return e===null?null:new Ot(n,e)}getWriteMask(n){const e=this.useExceptionPointer(c=>_._api._MagickImage_GetWriteMask(this._instance,c)),u=e===0?null:new ne(e,new Qe);return u==null?n(u):u._use(n)}grayscale(n=rn.Undefined){this.useExceptionPointer(e=>{_._api._MagickImage_Grayscale(this._instance,n,e)})}hasProfile(n){return E(n,e=>this.toBool(_._api._MagickImage_HasProfile(this._instance,e)))}histogram(){const n=new Map;return this.useExceptionPointer(e=>{Me.use(u=>{const c=_._api._MagickImage_Histogram(this._instance,u.ptr,e);if(c!==0){const p=u.value;for(let h=0;h<p;h++){const S=_._api._MagickColorCollection_GetInstance(c,h),C=w._create(S),W=_._api._MagickColor_Count_Get(S);n.set(C.toString(),W)}_._api._MagickColorCollection_DisposeList(c)}})}),n}inverseContrast=()=>this._contrast(!1);inverseLevel(n,e,u,c){const p=this.valueOrDefault(u,1),h=this.valueOrDefault(c,Q.Composite);this.useExceptionPointer(S=>{_._api._MagickImage_InverseLevel(this._instance,n.toDouble(),e._toQuantum(),p,h,S)})}inverseOpaque=(n,e)=>this._opaque(n,e,!0);inverseSigmoidalContrast(n,e,u){this._sigmoidalContrast(!1,n,e,u)}inverseTransparent=n=>this._transparent(n,!0);level(n,e,u,c){const p=this.valueOrDefault(u,1),h=this.valueOrDefault(c,Q.Composite);this.useExceptionPointer(S=>{_._api._MagickImage_Level(this._instance,n.toDouble(),e._toQuantum(),p,h,S)})}linearStretch(n,e){this.useExceptionPointer(u=>{_._api._MagickImage_LinearStretch(this._instance,n.toDouble(),e._toQuantum(),u)})}liquidRescale(n,e){const u=typeof n=="number"?new oe(n,e):n;this.useException(c=>{E(u.toString(),p=>{const h=_._api._MagickImage_LiquidRescale(this._instance,p,u.x,u.y,c.ptr);this._setInstance(h,c)})})}negate(n){this.useExceptionPointer(e=>{const u=this.valueOrDefault(n,Q.Undefined);_._api._MagickImage_Negate(this._instance,0,u,e)})}negateGrayScale(n){this.useExceptionPointer(e=>{const u=this.valueOrDefault(n,Q.Undefined);_._api._MagickImage_Negate(this._instance,1,u,e)})}normalize(){this.useExceptionPointer(n=>{_._api._MagickImage_Normalize(this._instance,n)})}modulate(n,e,u){const c=this.valueOrDefault(e,new ae(100)),p=this.valueOrDefault(u,new ae(100));this.useExceptionPointer(h=>{const S=`${n.toDouble()}/${c.toDouble()}/${p.toDouble()}`;E(S,C=>{_._api._MagickImage_Modulate(this._instance,C,h)})})}morphology(n){this.useException(e=>{E(n.kernel,u=>{const c=_._api._MagickImage_Morphology(this._instance,n.method,u,n.channels,n.iterations,e.ptr);this._setInstance(c,e)})})}motionBlur(n,e,u){this.useException(c=>{const p=_._api._MagickImage_MotionBlur(this._instance,n,e,u,c.ptr);this._setInstance(p,c)})}oilPaint(n){const e=this.valueOrDefault(n,3),u=0;this.useException(c=>{const p=_._api._MagickImage_OilPaint(this._instance,e,u,c.ptr);this._setInstance(p,c)})}opaque=(n,e)=>this._opaque(n,e,!1);ping(n,e){this.readOrPing(!0,n,e)}quantize(n){const e=this.valueOrDefault(n,new Rt);return this.useException(u=>{e._use(c=>{_._api._MagickImage_Quantize(this._instance,c._instance,u.ptr)})}),e.measureErrors?ut._create(this):null}read(n,e,u){this.readOrPing(!1,n,e,u)}readFromCanvas(n,e){const u=n.getContext("2d",e);if(u===null)return;const c=u.getImageData(0,0,n.width,n.height),p=new we;p.format=ye.Rgba,p.width=n.width,p.height=n.height,this.useException(h=>{this.readFromArray(c.data,p,h)})}removeArtifact(n){E(n,e=>{_._api._MagickImage_RemoveArtifact(this._instance,e)})}removeAttribute(n){E(n,e=>{_._api._MagickImage_RemoveAttribute(this._instance,e)})}removeProfile(n){const e=typeof n=="string"?n:n.name;E(e,u=>{_._api._MagickImage_RemoveProfile(this._instance,u)})}removeWriteMask(){this.useExceptionPointer(n=>{_._api._MagickImage_SetWriteMask(this._instance,0,n)})}resetPage(){this.page=new oe(0,0,0,0)}resize(n,e){const u=typeof n=="number"?new oe(n,e):n;this.useException(c=>{E(u.toString(),p=>{const h=_._api._MagickImage_Resize(this._instance,p,c.ptr);this._setInstance(h,c)})})}rotate(n){this.useException(e=>{const u=_._api._MagickImage_Rotate(this._instance,n,e.ptr);this._setInstance(u,e)})}separate(n,e){return this.useException(u=>{let c,p=Q.Undefined;if(typeof n=="number"&&e!==void 0)p=n,c=e;else if(typeof n=="function")c=n;else throw new J("invalid arguments");const h=_._api._MagickImage_Separate(this._instance,p,u.ptr);return Se._createFromImages(h,this._settings)._use(c)})}sepiaTone(n=new ae(80)){this.useException(e=>{const u=typeof n=="number"?new ae(n):n,c=_._api._MagickImage_SepiaTone(this._instance,u._toQuantum(),e.ptr);this._setInstance(c,e)})}setArtifact(n,e){let u;typeof e=="string"?u=e:typeof e=="boolean"?u=this.fromBool(e).toString():u=e.toString(),E(n,c=>{E(u,p=>{_._api._MagickImage_SetArtifact(this._instance,c,p)})})}setAttribute(n,e){this.useException(u=>{E(n,c=>{E(e,p=>{_._api._MagickImage_SetAttribute(this._instance,c,p,u.ptr)})})})}setProfile(n,e){const u=typeof n=="string"?n:n.name;let c;e!==void 0?c=e:typeof n!="string"&&(c=n.data),this.useException(p=>{E(u,h=>{Hn(c,S=>{_._api._MagickImage_SetProfile(this._instance,h,S,c.byteLength,p.ptr)})})})}setWriteMask(n){this.useExceptionPointer(e=>{_._api._MagickImage_SetWriteMask(this._instance,n._instance,e)})}sharpen(n,e,u){const c=this.valueOrDefault(n,0),p=this.valueOrDefault(e,1),h=this.valueOrDefault(u,Q.Undefined);this.useException(S=>{const C=_._api._MagickImage_Sharpen(this._instance,c,p,h,S.ptr);this._setInstance(C,S)})}shave(n,e){this.useException(u=>{const c=_._api._MagickImage_Shave(this._instance,n,e,u.ptr);this._setInstance(c,u)})}sigmoidalContrast(n,e,u){this._sigmoidalContrast(!0,n,e,u)}solarize(n=new ae(50)){this.useException(e=>{const u=typeof n=="number"?new ae(n):n;_._api._MagickImage_Solarize(this._instance,u._toQuantum(),e.ptr)})}splice(n){Fn.use(this,n,e=>{this.useException(u=>{const c=_._api._MagickImage_Splice(this._instance,e,u.ptr);this._setInstance(c,u)})})}statistics(n){const e=this.valueOrDefault(n,Q.All);return this.useExceptionPointer(u=>{const c=_._api._MagickImage_Statistics(this._instance,e,u),p=Et._create(this,c,e);return _._api._Statistics_DisposeList(c),p})}strip(){this.useExceptionPointer(n=>{_._api._MagickImage_Strip(this._instance,n)})}transformColorSpace(n,e){const u=n;let c;e!==void 0&&(c=e);const p=this.hasProfile("icc")||this.hasProfile("icm");if(c===void 0){if(!p)return!1;c=u}else{if(u.colorSpace!==this.colorSpace)return!1;p||this.setProfile(u)}return this.setProfile(c),!0}threshold(n,e){const u=this.valueOrDefault(e,Q.Undefined);this.useExceptionPointer(c=>{_._api._MagickImage_Threshold(this._instance,n._toQuantum(),u,c)})}thumbnail(n,e){const u=typeof n=="number"?new oe(n,e):n;this.useException(c=>{E(u.toString(),p=>{const h=_._api._MagickImage_Thumbnail(this._instance,p,c.ptr);this._setInstance(h,c)})})}toString=()=>`${this.format} ${this.width}x${this.height} ${this.depth}-bit ${te[this.colorSpace]}`;transparent(n){n._use(e=>{this.useExceptionPointer(u=>{_._api._MagickImage_Transparent(this._instance,e,0,u)})})}trim(...n){if(n.length>0)if(n.length==1&&n[0]instanceof ae){const e=n[0];this.setArtifact("trim:percent-background",e.toDouble().toString())}else{const e=n,u=[...new Set(Nn(e))].join(",");this.setArtifact("trim:edges",u)}this.useException(e=>{const u=_._api._MagickImage_Trim(this._instance,e.ptr);this._setInstance(u,e),this.removeArtifact("trim:edges"),this.removeArtifact("trim:percent-background")})}wave(n,e,u){const c=this.valueOrDefault(n,this.interpolate),p=this.valueOrDefault(e,25),h=this.valueOrDefault(u,150);this.useException(S=>{const C=_._api._MagickImage_Wave(this._instance,c,p,h,S.ptr);this._setInstance(C,S)})}vignette(n,e,u,c){const p=this.valueOrDefault(n,0),h=this.valueOrDefault(e,1),S=this.valueOrDefault(u,0),C=this.valueOrDefault(c,0);this.useException(W=>{const z=_._api._MagickImage_Vignette(this._instance,p,h,S,C,W.ptr);this._setInstance(z,W)})}write(n,e){let u=0,c=0;e!==void 0?this._settings.format=n:e=n,this.useException(h=>{Me.use(S=>{this._settings._use(C=>{try{u=_._api._MagickImage_WriteBlob(this._instance,C._instance,S.ptr,h.ptr),c=S.value}catch{u!==0&&(u=_._api._MagickMemory_Relinquish(u))}})})});const p=new Bn(u,c,e);return _e._disposeAfterExecution(p,p.func)}writeToCanvas(n,e){n.width=this.width,n.height=this.height;const u=n.getContext("2d",e);u!==null&&Ue._map(this,"RGBA",c=>{const p=u.createImageData(this.width,this.height);let h=0;for(let S=0;S<this.height;S++)for(let C=0;C<this.width;C++)p.data[h++]=_._api.HEAPU8[c++],p.data[h++]=_._api.HEAPU8[c++],p.data[h++]=_._api.HEAPU8[c++],p.data[h++]=_._api.HEAPU8[c++];u.putImageData(p,0,0)})}static _createFromImage(n,e){return new ne(n,e)}_channelOffset(n){return _._api._MagickImage_HasChannel(this._instance,n)?_._api._MagickImage_ChannelOffset(this._instance,n):-1}static _clone(n){return A.usePointer(e=>new ne(_._api._MagickImage_Clone(n._instance,e),n._settings._clone()))}_getSettings(){return this._settings}_instanceNotInitialized(){throw new J("no image has been read")}_setInstance(n,e){if(super._setInstance(n,e)===!0||n===0&&this.onProgress!==void 0)return!0;throw new J("out of memory")}_use(n){return _e._disposeAfterExecution(this,n)}static _create(n){return ne.create()._use(n)}onDispose(){this.disposeProgressDelegate()}_contrast(n){this.useExceptionPointer(e=>{_._api._MagickImage_Contrast(this._instance,this.fromBool(n),e)})}_getProfile(n){return E(n,e=>{const u=_._api._MagickImage_GetProfile(this._instance,e),c=Ta.toArray(u);return c===null?null:c})}_opaque(n,e,u){this.useExceptionPointer(c=>{n._use(p=>{e._use(h=>{_._api._MagickImage_Opaque(this._instance,p,h,this.fromBool(u),c)})})})}_sigmoidalContrast(n,e,u,c){let p;u!==void 0?typeof u=="number"?p=u:p=u.multiply(Re.max):p=Re.max*.5;const h=this.valueOrDefault(c,Q.Undefined);this.useExceptionPointer(S=>{_._api._MagickImage_SigmoidalContrast(this._instance,this.fromBool(n),e,p,h,S)})}_transparent(n,e){n._use(u=>{this.useExceptionPointer(c=>{_._api._MagickImage_Transparent(this._instance,u,this.fromBool(e),c)})})}static createInstance(){return A.usePointer(n=>_._api._MagickImage_Create(0,n))}fromBool(n){return n?1:0}disposeProgressDelegate(){se.removeProgressDelegate(this),this._progress=void 0}readOrPing(n,e,u,c){this.useException(p=>{const h=u instanceof we?u:new we(this._settings);if(h._ping=n,this._settings._ping=n,h.frameCount!==void 0&&h.frameCount>1)throw new J("The frame count can only be set to 1 when a single image is being read.");if(typeof e=="string")h._fileName=e;else if(Ne(e)){this.readFromArray(e,h,p);return}else h._fileName="xc:"+e.toShortString(),h.width=typeof u=="number"?u:0,h.height=typeof c=="number"?c:0;h._use(S=>{const C=_._api._MagickImage_ReadFile(S._instance,p.ptr);this._setInstance(C,p)})})}readFromArray(n,e,u){e._use(c=>{Hn(n,p=>{const h=_._api._MagickImage_ReadBlob(c._instance,p,0,n.byteLength,u.ptr);this._setInstance(h,u)})})}toBool(n){return n===1}valueOrDefault(n,e){return n===void 0?e:n}useException(n){return A.use(n,e=>{this.onWarning!==void 0&&this.onWarning(new an(e))})}useExceptionPointer(n){return A.usePointer(n,e=>{this.onWarning!==void 0&&this.onWarning(new an(e))})}}var Ra=(()=>{var t=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(n={}){var e=n,u,c;e.ready=new Promise((r,a)=>{u=r,c=a}),(!globalThis.crypto||!globalThis.crypto.getRandomValues)&&(globalThis.crypto={getRandomValues:r=>{for(let a=0;a<r.length;a++)r[a]=Math.random()*256|0}});var p=Object.assign({},e),h="./this.program",S=(r,a)=>{throw a},C=typeof window=="object",W=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var z="";function ue(r){return e.locateFile?e.locateFile(r,z):z+r}var be,Le,Fe;(C||W)&&(W?z=self.location.href:typeof document<"u"&&document.currentScript&&(z=document.currentScript.src),t&&(z=t),z.indexOf("blob:")!==0?z=z.substr(0,z.replace(/[?#].*/,"").lastIndexOf("/")+1):z="",be=r=>{var a=new XMLHttpRequest;return a.open("GET",r,!1),a.send(null),a.responseText},W&&(Fe=r=>{var a=new XMLHttpRequest;return a.open("GET",r,!1),a.responseType="arraybuffer",a.send(null),new Uint8Array(a.response)}),Le=(r,a,i)=>{var s=new XMLHttpRequest;s.open("GET",r,!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 _t=e.print||console.log.bind(console),Be=e.printErr||console.error.bind(console);Object.assign(e,p),p=null,e.arguments&&e.arguments,e.thisProgram&&(h=e.thisProgram),e.quit&&(S=e.quit);var lt;e.wasmBinary&&(lt=e.wasmBinary);var $a=e.noExitRuntime||!0;typeof WebAssembly!="object"&&Ce("no native wasm support detected");var Lt,ln=!1;function Ya(r,a){r||Ce(a)}var q,ie,le,ct,G,L,Bt,ce,Gr,zt;function Pr(){var r=Lt.buffer;e.HEAP8=q=new Int8Array(r),e.HEAP16=le=new Int16Array(r),e.HEAP32=G=new Int32Array(r),e.HEAPU8=ie=new Uint8Array(r),e.HEAPU16=ct=new Uint16Array(r),e.HEAPU32=L=new Uint32Array(r),e.HEAPF32=Bt=new Float32Array(r),e.HEAPF64=zt=new Float64Array(r),e.HEAP64=ce=new BigInt64Array(r),e.HEAPU64=Gr=new BigUint64Array(r)}var $e,Ar=[],Tr=[],Rr=[],ja=0;function Xa(){return $a||ja>0}function Va(){if(e.preRun)for(typeof e.preRun=="function"&&(e.preRun=[e.preRun]);e.preRun.length;)Ja(e.preRun.shift());gn(Ar)}function qa(){!e.noFSInit&&!l.init.initialized&&l.init(),l.ignorePermissions=!1,gn(Tr)}function Qa(){if(e.postRun)for(typeof e.postRun=="function"&&(e.postRun=[e.postRun]);e.postRun.length;)Za(e.postRun.shift());gn(Rr)}function Ja(r){Ar.unshift(r)}function Ka(r){Tr.unshift(r)}function Za(r){Rr.unshift(r)}var Ye=0,gt=null;function ko(r){return r}function cn(r){Ye++,e.monitorRunDependencies&&e.monitorRunDependencies(Ye)}function Nt(r){if(Ye--,e.monitorRunDependencies&&e.monitorRunDependencies(Ye),Ye==0&>){var a=gt;gt=null,a()}}function Ce(r){e.onAbort&&e.onAbort(r),r="Aborted("+r+")",Be(r),ln=!0,r+=". Build with -sASSERTIONS for more info.";var a=new WebAssembly.RuntimeError(r);throw c(a),a}var Oa="data:application/octet-stream;base64,";function Er(r){return r.startsWith(Oa)}function Wr(r){return r.startsWith("file://")}var Ke;Ke="magick.wasm",Er(Ke)||(Ke=ue(Ke));function Lr(r){try{if(r==Ke&<)return new Uint8Array(lt);if(Fe)return Fe(r);throw"both async and sync fetching of the wasm failed"}catch(a){Ce(a)}}function ei(r){if(!lt&&(C||W)){if(typeof fetch=="function"&&!Wr(r))return fetch(r,{credentials:"same-origin"}).then(a=>{if(!a.ok)throw"failed to load wasm binary file at '"+r+"'";return a.arrayBuffer()}).catch(()=>Lr(r));if(Le)return new Promise((a,i)=>{Le(r,s=>a(new Uint8Array(s)),i)})}return Promise.resolve().then(()=>Lr(r))}function Br(r,a,i){return ei(r).then(s=>WebAssembly.instantiate(s,a)).then(s=>s).then(i,s=>{Be("failed to asynchronously prepare wasm: "+s),Ce(s)})}function ti(r,a,i,s){return!r&&typeof WebAssembly.instantiateStreaming=="function"&&!Er(a)&&!Wr(a)&&typeof fetch=="function"?fetch(a,{credentials:"same-origin"}).then(o=>{var g=WebAssembly.instantiateStreaming(o,i);return g.then(s,function(m){return Be("wasm streaming compile failed: "+m),Be("falling back to ArrayBuffer instantiation"),Br(a,i,s)})}):Br(a,i,s)}function ni(){var r={a:Fu};function a(s,o){var g=s.exports;return e.asm=g,Lt=e.asm.ab,Pr(),$e=e.asm.ub,Ka(e.asm.bb),Nt(),g}cn();function i(s){a(s.instance)}if(e.instantiateWasm)try{return e.instantiateWasm(r,a)}catch(s){Be("Module.instantiateWasm callback failed with error: "+s),c(s)}return ti(lt,Ke,r,i).catch(c),{}}function ri(r){this.name="ExitStatus",this.message=`Program terminated with exit(${r})`,this.status=r}var gn=r=>{for(;r.length>0;)r.shift()(e)};function ai(r,a="i8"){switch(a.endsWith("*")&&(a="*"),a){case"i1":return q[r>>>0];case"i8":return q[r>>>0];case"i16":return le[r>>>1];case"i32":return G[r>>>2];case"i64":return ce[r>>3];case"float":return Bt[r>>>2];case"double":return zt[r>>>3];case"*":return L[r>>>2];default:Ce(`invalid type for getValue: ${a}`)}}function ii(r,a,i="i8"){switch(i.endsWith("*")&&(i="*"),i){case"i1":q[r>>>0]=a;break;case"i8":q[r>>>0]=a;break;case"i16":le[r>>>1]=a;break;case"i32":G[r>>>2]=a;break;case"i64":ce[r>>3]=BigInt(a);break;case"float":Bt[r>>>2]=a;break;case"double":zt[r>>>3]=a;break;case"*":L[r>>>2]=a;break;default:Ce(`invalid type for setValue: ${i}`)}}var mt=[],N=r=>{var a=mt[r];return a||(r>=mt.length&&(mt.length=r+1),mt[r]=a=$e.get(r)),a},si=(r,a)=>N(r)(a),Ze=0;function zr(r){this.excPtr=r,this.ptr=r-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=Ia(this.get_type());if(a)return L[this.excPtr>>>2];var i=this.get_adjusted_ptr();return i!==0?i:this.excPtr}}function ui(r){throw Ze||(Ze=r),Ze}function oi(){var r=Ze;if(!r)return Dt(0),0;var a=new zr(r);a.set_adjusted_ptr(r);var i=a.get_type();if(!i)return Dt(0),r;for(var s=0;s<arguments.length;s++){var o=arguments[s];if(o===0||o===i)break;var g=a.ptr+16;if(va(o,i,g))return Dt(o),r}return Dt(i),r}var _i=oi;function li(r,a,i){var s=new zr(r);throw s.init(a,i),Ze=r,Ze}var j={isAbs:r=>r.charAt(0)==="/",splitPath:r=>{var a=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return a.exec(r).slice(1)},normalizeArray:(r,a)=>{for(var i=0,s=r.length-1;s>=0;s--){var o=r[s];o==="."?r.splice(s,1):o===".."?(r.splice(s,1),i++):i&&(r.splice(s,1),i--)}if(a)for(;i;i--)r.unshift("..");return r},normalize:r=>{var a=j.isAbs(r),i=r.substr(-1)==="/";return r=j.normalizeArray(r.split("/").filter(s=>!!s),!a).join("/"),!r&&!a&&(r="."),r&&i&&(r+="/"),(a?"/":"")+r},dirname:r=>{var a=j.splitPath(r),i=a[0],s=a[1];return!i&&!s?".":(s&&(s=s.substr(0,s.length-1)),i+s)},basename:r=>{if(r==="/")return"/";r=j.normalize(r),r=r.replace(/\/$/,"");var a=r.lastIndexOf("/");return a===-1?r:r.substr(a+1)},join:function(){var r=Array.prototype.slice.call(arguments);return j.normalize(r.join("/"))},join2:(r,a)=>j.normalize(r+"/"+a)},ci=()=>{if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return r=>crypto.getRandomValues(r);Ce("initRandomDevice")},mn=r=>(mn=ci())(r),Ge={resolve:function(){for(var r="",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"";r=s+"/"+r,a=j.isAbs(s)}return r=j.normalizeArray(r.split("/").filter(o=>!!o),!a).join("/"),(a?"/":"")+r||"."},relative:(r,a)=>{r=Ge.resolve(r).substr(1),a=Ge.resolve(a).substr(1);function i(y){for(var v=0;v<y.length&&y[v]==="";v++);for(var b=y.length-1;b>=0&&y[b]==="";b--);return v>b?[]:y.slice(v,b-v+1)}for(var s=i(r.split("/")),o=i(a.split("/")),g=Math.min(s.length,o.length),m=g,f=0;f<g;f++)if(s[f]!==o[f]){m=f;break}for(var d=[],f=m;f<s.length;f++)d.push("..");return d=d.concat(o.slice(m)),d.join("/")}},je=r=>{for(var a=0,i=0;i<r.length;++i){var s=r.charCodeAt(i);s<=127?a++:s<=2047?a+=2:s>=55296&&s<=57343?(a+=4,++i):a+=3}return a},fn=(r,a,i,s)=>{if(i>>>=0,!(s>0))return 0;for(var o=i,g=i+s-1,m=0;m<r.length;++m){var f=r.charCodeAt(m);if(f>=55296&&f<=57343){var d=r.charCodeAt(++m);f=65536+((f&1023)<<10)|d&1023}if(f<=127){if(i>=g)break;a[i++>>>0]=f}else if(f<=2047){if(i+1>=g)break;a[i++>>>0]=192|f>>6,a[i++>>>0]=128|f&63}else if(f<=65535){if(i+2>=g)break;a[i++>>>0]=224|f>>12,a[i++>>>0]=128|f>>6&63,a[i++>>>0]=128|f&63}else{if(i+3>=g)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-o};function xt(r,a,i){var s=je(r)+1,o=new Array(s),g=fn(r,o,0,o.length);return a&&(o.length=g),o}var Nr=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Oe=(r,a,i)=>{a>>>=0;for(var s=a+i,o=a;r[o]&&!(o>=s);)++o;if(o-a>16&&r.buffer&&Nr)return Nr.decode(r.subarray(a,o));for(var g="";a<o;){var m=r[a++];if(!(m&128)){g+=String.fromCharCode(m);continue}var f=r[a++]&63;if((m&224)==192){g+=String.fromCharCode((m&31)<<6|f);continue}var d=r[a++]&63;if((m&240)==224?m=(m&15)<<12|f<<6|d:m=(m&7)<<18|f<<12|d<<6|r[a++]&63,m<65536)g+=String.fromCharCode(m);else{var y=m-65536;g+=String.fromCharCode(55296|y>>10,56320|y&1023)}}return g},Xe={ttys:[],init:function(){},shutdown:function(){},register:function(r,a){Xe.ttys[r]={input:[],output:[],ops:a},l.registerDevice(r,Xe.stream_ops)},stream_ops:{open:function(r){var a=Xe.ttys[r.node.rdev];if(!a)throw new l.ErrnoError(43);r.tty=a,r.seekable=!1},close:function(r){r.tty.ops.fsync(r.tty)},fsync:function(r){r.tty.ops.fsync(r.tty)},read:function(r,a,i,s,o){if(!r.tty||!r.tty.ops.get_char)throw new l.ErrnoError(60);for(var g=0,m=0;m<s;m++){var f;try{f=r.tty.ops.get_char(r.tty)}catch{throw new l.ErrnoError(29)}if(f===void 0&&g===0)throw new l.ErrnoError(6);if(f==null)break;g++,a[i+m]=f}return g&&(r.node.timestamp=Date.now()),g},write:function(r,a,i,s,o){if(!r.tty||!r.tty.ops.put_char)throw new l.ErrnoError(60);try{for(var g=0;g<s;g++)r.tty.ops.put_char(r.tty,a[i+g])}catch{throw new l.ErrnoError(29)}return s&&(r.node.timestamp=Date.now()),g}},default_tty_ops:{get_char:function(r){if(!r.input.length){var a=null;if(typeof window<"u"&&typeof window.prompt=="function"?(a=window.prompt("Input: "),a!==null&&(a+=`
|
|
43
|
-
`)):typeof readline=="function"&&(a=readline(),a!==null&&(a+=`
|
|
44
|
-
`)),!a)return null;r.input=xt(a,!0)}return r.input.shift()},put_char:function(r,a){a===null||a===10?(_t(Oe(r.output,0)),r.output=[]):a!=0&&r.output.push(a)},fsync:function(r){r.output&&r.output.length>0&&(_t(Oe(r.output,0)),r.output=[])},ioctl_tcgets:function(r){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(r,a,i){return 0},ioctl_tiocgwinsz:function(r){return[24,80]}},default_tty1_ops:{put_char:function(r,a){a===null||a===10?(Be(Oe(r.output,0)),r.output=[]):a!=0&&r.output.push(a)},fsync:function(r){r.output&&r.output.length>0&&(Be(Oe(r.output,0)),r.output=[])}}},gi=(r,a)=>(ie.fill(0,r,r+a),r),mi=(r,a)=>Math.ceil(r/a)*a,xr=r=>{r=mi(r,65536);var a=ka(65536,r);return a?gi(a,r):0},B={ops_table:null,mount:function(r){return B.createNode(null,"/",16895,0)},createNode:function(r,a,i,s){if(l.isBlkdev(i)||l.isFIFO(i))throw new l.ErrnoError(63);B.ops_table||(B.ops_table={dir:{node:{getattr:B.node_ops.getattr,setattr:B.node_ops.setattr,lookup:B.node_ops.lookup,mknod:B.node_ops.mknod,rename:B.node_ops.rename,unlink:B.node_ops.unlink,rmdir:B.node_ops.rmdir,readdir:B.node_ops.readdir,symlink:B.node_ops.symlink},stream:{llseek:B.stream_ops.llseek}},file:{node:{getattr:B.node_ops.getattr,setattr:B.node_ops.setattr},stream:{llseek:B.stream_ops.llseek,read:B.stream_ops.read,write:B.stream_ops.write,allocate:B.stream_ops.allocate,mmap:B.stream_ops.mmap,msync:B.stream_ops.msync}},link:{node:{getattr:B.node_ops.getattr,setattr:B.node_ops.setattr,readlink:B.node_ops.readlink},stream:{}},chrdev:{node:{getattr:B.node_ops.getattr,setattr:B.node_ops.setattr},stream:l.chrdev_stream_ops}});var o=l.createNode(r,a,i,s);return l.isDir(o.mode)?(o.node_ops=B.ops_table.dir.node,o.stream_ops=B.ops_table.dir.stream,o.contents={}):l.isFile(o.mode)?(o.node_ops=B.ops_table.file.node,o.stream_ops=B.ops_table.file.stream,o.usedBytes=0,o.contents=null):l.isLink(o.mode)?(o.node_ops=B.ops_table.link.node,o.stream_ops=B.ops_table.link.stream):l.isChrdev(o.mode)&&(o.node_ops=B.ops_table.chrdev.node,o.stream_ops=B.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[a]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(r,a){a>>>=0;var i=r.contents?r.contents.length:0;if(!(i>=a)){var s=1024*1024;a=Math.max(a,i*(i<s?2:1.125)>>>0),i!=0&&(a=Math.max(a,256));var o=r.contents;r.contents=new Uint8Array(a),r.usedBytes>0&&r.contents.set(o.subarray(0,r.usedBytes),0)}},resizeFileStorage:function(r,a){if(a>>>=0,r.usedBytes!=a)if(a==0)r.contents=null,r.usedBytes=0;else{var i=r.contents;r.contents=new Uint8Array(a),i&&r.contents.set(i.subarray(0,Math.min(a,r.usedBytes))),r.usedBytes=a}},node_ops:{getattr:function(r){var a={};return a.dev=l.isChrdev(r.mode)?r.id:1,a.ino=r.id,a.mode=r.mode,a.nlink=1,a.uid=0,a.gid=0,a.rdev=r.rdev,l.isDir(r.mode)?a.size=4096:l.isFile(r.mode)?a.size=r.usedBytes:l.isLink(r.mode)?a.size=r.link.length:a.size=0,a.atime=new Date(r.timestamp),a.mtime=new Date(r.timestamp),a.ctime=new Date(r.timestamp),a.blksize=4096,a.blocks=Math.ceil(a.size/a.blksize),a},setattr:function(r,a){a.mode!==void 0&&(r.mode=a.mode),a.timestamp!==void 0&&(r.timestamp=a.timestamp),a.size!==void 0&&B.resizeFileStorage(r,a.size)},lookup:function(r,a){throw l.genericErrors[44]},mknod:function(r,a,i,s){return B.createNode(r,a,i,s)},rename:function(r,a,i){if(l.isDir(r.mode)){var s;try{s=l.lookupNode(a,i)}catch{}if(s)for(var o in s.contents)throw new l.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=i,a.contents[i]=r,a.timestamp=r.parent.timestamp,r.parent=a},unlink:function(r,a){delete r.contents[a],r.timestamp=Date.now()},rmdir:function(r,a){var i=l.lookupNode(r,a);for(var s in i.contents)throw new l.ErrnoError(55);delete r.contents[a],r.timestamp=Date.now()},readdir:function(r){var a=[".",".."];for(var i in r.contents)r.contents.hasOwnProperty(i)&&a.push(i);return a},symlink:function(r,a,i){var s=B.createNode(r,a,41471,0);return s.link=i,s},readlink:function(r){if(!l.isLink(r.mode))throw new l.ErrnoError(28);return r.link}},stream_ops:{read:function(r,a,i,s,o){var g=r.node.contents;if(o>=r.node.usedBytes)return 0;var m=Math.min(r.node.usedBytes-o,s);if(m>8&&g.subarray)a.set(g.subarray(o,o+m),i);else for(var f=0;f<m;f++)a[i+f]=g[o+f];return m},write:function(r,a,i,s,o,g){if(a.buffer===q.buffer&&(g=!1),!s)return 0;var m=r.node;if(m.timestamp=Date.now(),a.subarray&&(!m.contents||m.contents.subarray)){if(g)return m.contents=a.subarray(i,i+s),m.usedBytes=s,s;if(m.usedBytes===0&&o===0)return m.contents=a.slice(i,i+s),m.usedBytes=s,s;if(o+s<=m.usedBytes)return m.contents.set(a.subarray(i,i+s),o),s}if(B.expandFileStorage(m,o+s),m.contents.subarray&&a.subarray)m.contents.set(a.subarray(i,i+s),o);else for(var f=0;f<s;f++)m.contents[o+f]=a[i+f];return m.usedBytes=Math.max(m.usedBytes,o+s),s},llseek:function(r,a,i){var s=a;if(i===1?s+=r.position:i===2&&l.isFile(r.node.mode)&&(s+=r.node.usedBytes),s<0)throw new l.ErrnoError(28);return s},allocate:function(r,a,i){B.expandFileStorage(r.node,a+i),r.node.usedBytes=Math.max(r.node.usedBytes,a+i)},mmap:function(r,a,i,s,o){if(!l.isFile(r.node.mode))throw new l.ErrnoError(43);var g,m,f=r.node.contents;if(!(o&2)&&f.buffer===q.buffer)m=!1,g=f.byteOffset;else{if((i>0||i+a<f.length)&&(f.subarray?f=f.subarray(i,i+a):f=Array.prototype.slice.call(f,i,i+a)),m=!0,g=xr(a),!g)throw new l.ErrnoError(48);g>>>=0,q.set(f,g>>>0)}return{ptr:g,allocated:m}},msync:function(r,a,i,s,o){return B.stream_ops.write(r,a,0,s,i,!1),0}}},fi=(r,a,i,s)=>{var o=`al ${r}`;Le(r,g=>{Ya(g,`Loading data file "${r}" failed (no arrayBuffer).`),a(new Uint8Array(g)),o&&Nt()},g=>{if(i)i();else throw`Loading data file "${r}" failed.`}),o&&cn()},pi=e.preloadPlugins||[];function hi(r,a,i,s){typeof Browser<"u"&&Browser.init();var o=!1;return pi.forEach(function(g){o||g.canHandle(a)&&(g.handle(r,a,i,s),o=!0)}),o}function di(r,a,i,s,o,g,m,f,d,y){var v=a?Ge.resolve(j.join2(r,a)):r;function b(M){function D(R){y&&y(),f||l.createDataFile(r,a,R,s,o,d),g&&g(),Nt()}hi(M,v,D,()=>{m&&m(),Nt()})||D(M)}cn(),typeof i=="string"?fi(i,M=>b(M),m):b(i)}function yi(r){var a={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},i=a[r];if(typeof i>"u")throw new Error(`Unknown file open mode: ${r}`);return i}function pn(r,a){var i=0;return r&&(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:(r,a={})=>{if(r=Ge.resolve(r),!r)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=r.split("/").filter(b=>!!b),o=l.root,g="/",m=0;m<s.length;m++){var f=m===s.length-1;if(f&&a.parent)break;if(o=l.lookupNode(o,s[m]),g=j.join2(g,s[m]),l.isMountpoint(o)&&(!f||f&&a.follow_mount)&&(o=o.mounted.root),!f||a.follow)for(var d=0;l.isLink(o.mode);){var y=l.readlink(g);g=Ge.resolve(j.dirname(g),y);var v=l.lookupPath(g,{recurse_count:a.recurse_count+1});if(o=v.node,d++>40)throw new l.ErrnoError(32)}}return{path:g,node:o}},getPath:r=>{for(var a;;){if(l.isRoot(r)){var i=r.mount.mountpoint;return a?i[i.length-1]!=="/"?`${i}/${a}`:i+a:i}a=a?`${r.name}/${a}`:r.name,r=r.parent}},hashName:(r,a)=>{for(var i=0,s=0;s<a.length;s++)i=(i<<5)-i+a.charCodeAt(s)|0;return(r+i>>>0)%l.nameTable.length},hashAddNode:r=>{var a=l.hashName(r.parent.id,r.name);r.name_next=l.nameTable[a],l.nameTable[a]=r},hashRemoveNode:r=>{var a=l.hashName(r.parent.id,r.name);if(l.nameTable[a]===r)l.nameTable[a]=r.name_next;else for(var i=l.nameTable[a];i;){if(i.name_next===r){i.name_next=r.name_next;break}i=i.name_next}},lookupNode:(r,a)=>{var i=l.mayLookup(r);if(i)throw new l.ErrnoError(i,r);for(var s=l.hashName(r.id,a),o=l.nameTable[s];o;o=o.name_next){var g=o.name;if(o.parent.id===r.id&&g===a)return o}return l.lookup(r,a)},createNode:(r,a,i,s)=>{var o=new l.FSNode(r,a,i,s);return l.hashAddNode(o),o},destroyNode:r=>{l.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>(r&61440)===32768,isDir:r=>(r&61440)===16384,isLink:r=>(r&61440)===40960,isChrdev:r=>(r&61440)===8192,isBlkdev:r=>(r&61440)===24576,isFIFO:r=>(r&61440)===4096,isSocket:r=>(r&49152)===49152,flagsToPermissionString:r=>{var a=["r","w","rw"][r&3];return r&512&&(a+="w"),a},nodePermissions:(r,a)=>l.ignorePermissions?0:a.includes("r")&&!(r.mode&292)||a.includes("w")&&!(r.mode&146)||a.includes("x")&&!(r.mode&73)?2:0,mayLookup:r=>{var a=l.nodePermissions(r,"x");return a||(r.node_ops.lookup?0:2)},mayCreate:(r,a)=>{try{var i=l.lookupNode(r,a);return 20}catch{}return l.nodePermissions(r,"wx")},mayDelete:(r,a,i)=>{var s;try{s=l.lookupNode(r,a)}catch(g){return g.errno}var o=l.nodePermissions(r,"wx");if(o)return o;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:(r,a)=>r?l.isLink(r.mode)?32:l.isDir(r.mode)&&(l.flagsToPermissionString(a)!=="r"||a&512)?31:l.nodePermissions(r,l.flagsToPermissionString(a)):44,MAX_OPEN_FDS:4096,nextfd:()=>{for(var r=0;r<=l.MAX_OPEN_FDS;r++)if(!l.streams[r])return r;throw new l.ErrnoError(33)},getStreamChecked:r=>{var a=l.getStream(r);if(!a)throw new l.ErrnoError(8);return a},getStream:r=>l.streams[r],createStream:(r,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}}})),r=Object.assign(new l.FSStream,r),a==-1&&(a=l.nextfd()),r.fd=a,l.streams[a]=r,r),closeStream:r=>{l.streams[r]=null},chrdev_stream_ops:{open:r=>{var a=l.getDevice(r.node.rdev);r.stream_ops=a.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:()=>{throw new l.ErrnoError(70)}},major:r=>r>>8,minor:r=>r&255,makedev:(r,a)=>r<<8|a,registerDevice:(r,a)=>{l.devices[r]={stream_ops:a}},getDevice:r=>l.devices[r],getMounts:r=>{for(var a=[],i=[r];i.length;){var s=i.pop();a.push(s),i.push.apply(i,s.mounts)}return a},syncfs:(r,a)=>{typeof r=="function"&&(a=r,r=!1),l.syncFSRequests++,l.syncFSRequests>1&&Be(`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 o(m){return l.syncFSRequests--,a(m)}function g(m){if(m)return g.errored?void 0:(g.errored=!0,o(m));++s>=i.length&&o(null)}i.forEach(m=>{if(!m.type.syncfs)return g(null);m.type.syncfs(m,r,g)})},mount:(r,a,i)=>{var s=i==="/",o=!i,g;if(s&&l.root)throw new l.ErrnoError(10);if(!s&&!o){var m=l.lookupPath(i,{follow_mount:!1});if(i=m.path,g=m.node,l.isMountpoint(g))throw new l.ErrnoError(10);if(!l.isDir(g.mode))throw new l.ErrnoError(54)}var f={type:r,opts:a,mountpoint:i,mounts:[]},d=r.mount(f);return d.mount=f,f.root=d,s?l.root=d:g&&(g.mounted=f,g.mount&&g.mount.mounts.push(f)),d},unmount:r=>{var a=l.lookupPath(r,{follow_mount:!1});if(!l.isMountpoint(a.node))throw new l.ErrnoError(28);var i=a.node,s=i.mounted,o=l.getMounts(s);Object.keys(l.nameTable).forEach(m=>{for(var f=l.nameTable[m];f;){var d=f.name_next;o.includes(f.mount)&&l.destroyNode(f),f=d}}),i.mounted=null;var g=i.mount.mounts.indexOf(s);i.mount.mounts.splice(g,1)},lookup:(r,a)=>r.node_ops.lookup(r,a),mknod:(r,a,i)=>{var s=l.lookupPath(r,{parent:!0}),o=s.node,g=j.basename(r);if(!g||g==="."||g==="..")throw new l.ErrnoError(28);var m=l.mayCreate(o,g);if(m)throw new l.ErrnoError(m);if(!o.node_ops.mknod)throw new l.ErrnoError(63);return o.node_ops.mknod(o,g,a,i)},create:(r,a)=>(a=a!==void 0?a:438,a&=4095,a|=32768,l.mknod(r,a,0)),mkdir:(r,a)=>(a=a!==void 0?a:511,a&=1023,a|=16384,l.mknod(r,a,0)),mkdirTree:(r,a)=>{for(var i=r.split("/"),s="",o=0;o<i.length;++o)if(i[o]){s+="/"+i[o];try{l.mkdir(s,a)}catch(g){if(g.errno!=20)throw g}}},mkdev:(r,a,i)=>(typeof i>"u"&&(i=a,a=438),a|=8192,l.mknod(r,a,i)),symlink:(r,a)=>{if(!Ge.resolve(r))throw new l.ErrnoError(44);var i=l.lookupPath(a,{parent:!0}),s=i.node;if(!s)throw new l.ErrnoError(44);var o=j.basename(a),g=l.mayCreate(s,o);if(g)throw new l.ErrnoError(g);if(!s.node_ops.symlink)throw new l.ErrnoError(63);return s.node_ops.symlink(s,o,r)},rename:(r,a)=>{var i=j.dirname(r),s=j.dirname(a),o=j.basename(r),g=j.basename(a),m,f,d;if(m=l.lookupPath(r,{parent:!0}),f=m.node,m=l.lookupPath(a,{parent:!0}),d=m.node,!f||!d)throw new l.ErrnoError(44);if(f.mount!==d.mount)throw new l.ErrnoError(75);var y=l.lookupNode(f,o),v=Ge.relative(r,s);if(v.charAt(0)!==".")throw new l.ErrnoError(28);if(v=Ge.relative(a,i),v.charAt(0)!==".")throw new l.ErrnoError(55);var b;try{b=l.lookupNode(d,g)}catch{}if(y!==b){var M=l.isDir(y.mode),D=l.mayDelete(f,o,M);if(D)throw new l.ErrnoError(D);if(D=b?l.mayDelete(d,g,M):l.mayCreate(d,g),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(d!==f&&(D=l.nodePermissions(f,"w"),D))throw new l.ErrnoError(D);l.hashRemoveNode(y);try{f.node_ops.rename(y,d,g)}catch(R){throw R}finally{l.hashAddNode(y)}}},rmdir:r=>{var a=l.lookupPath(r,{parent:!0}),i=a.node,s=j.basename(r),o=l.lookupNode(i,s),g=l.mayDelete(i,s,!0);if(g)throw new l.ErrnoError(g);if(!i.node_ops.rmdir)throw new l.ErrnoError(63);if(l.isMountpoint(o))throw new l.ErrnoError(10);i.node_ops.rmdir(i,s),l.destroyNode(o)},readdir:r=>{var a=l.lookupPath(r,{follow:!0}),i=a.node;if(!i.node_ops.readdir)throw new l.ErrnoError(54);return i.node_ops.readdir(i)},unlink:r=>{var a=l.lookupPath(r,{parent:!0}),i=a.node;if(!i)throw new l.ErrnoError(44);var s=j.basename(r),o=l.lookupNode(i,s),g=l.mayDelete(i,s,!1);if(g)throw new l.ErrnoError(g);if(!i.node_ops.unlink)throw new l.ErrnoError(63);if(l.isMountpoint(o))throw new l.ErrnoError(10);i.node_ops.unlink(i,s),l.destroyNode(o)},readlink:r=>{var a=l.lookupPath(r),i=a.node;if(!i)throw new l.ErrnoError(44);if(!i.node_ops.readlink)throw new l.ErrnoError(28);return Ge.resolve(l.getPath(i.parent),i.node_ops.readlink(i))},stat:(r,a)=>{var i=l.lookupPath(r,{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:r=>l.stat(r,!0),chmod:(r,a,i)=>{var s;if(typeof r=="string"){var o=l.lookupPath(r,{follow:!i});s=o.node}else s=r;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:(r,a)=>{l.chmod(r,a,!0)},fchmod:(r,a)=>{var i=l.getStreamChecked(r);l.chmod(i.node,a)},chown:(r,a,i,s)=>{var o;if(typeof r=="string"){var g=l.lookupPath(r,{follow:!s});o=g.node}else o=r;if(!o.node_ops.setattr)throw new l.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(r,a,i)=>{l.chown(r,a,i,!0)},fchown:(r,a,i)=>{var s=l.getStreamChecked(r);l.chown(s.node,a,i)},truncate:(r,a)=>{if(a<0)throw new l.ErrnoError(28);var i;if(typeof r=="string"){var s=l.lookupPath(r,{follow:!0});i=s.node}else i=r;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 o=l.nodePermissions(i,"w");if(o)throw new l.ErrnoError(o);i.node_ops.setattr(i,{size:a,timestamp:Date.now()})},ftruncate:(r,a)=>{var i=l.getStreamChecked(r);if(!(i.flags&2097155))throw new l.ErrnoError(28);l.truncate(i.node,a)},utime:(r,a,i)=>{var s=l.lookupPath(r,{follow:!0}),o=s.node;o.node_ops.setattr(o,{timestamp:Math.max(a,i)})},open:(r,a,i)=>{if(r==="")throw new l.ErrnoError(44);a=typeof a=="string"?yi(a):a,i=typeof i>"u"?438:i,a&64?i=i&4095|32768:i=0;var s;if(typeof r=="object")s=r;else{r=j.normalize(r);try{var o=l.lookupPath(r,{follow:!(a&131072)});s=o.node}catch{}}var g=!1;if(a&64)if(s){if(a&128)throw new l.ErrnoError(20)}else s=l.mknod(r,i,0),g=!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(!g){var m=l.mayOpen(s,a);if(m)throw new l.ErrnoError(m)}a&512&&!g&&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={}),r in l.readFiles||(l.readFiles[r]=1)),f},close:r=>{if(l.isClosed(r))throw new l.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(a){throw a}finally{l.closeStream(r.fd)}r.fd=null},isClosed:r=>r.fd===null,llseek:(r,a,i)=>{if(l.isClosed(r))throw new l.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new l.ErrnoError(70);if(i!=0&&i!=1&&i!=2)throw new l.ErrnoError(28);return r.position=r.stream_ops.llseek(r,a,i),r.ungotten=[],r.position},read:(r,a,i,s,o)=>{if(i>>>=0,s<0||o<0)throw new l.ErrnoError(28);if(l.isClosed(r))throw new l.ErrnoError(8);if((r.flags&2097155)===1)throw new l.ErrnoError(8);if(l.isDir(r.node.mode))throw new l.ErrnoError(31);if(!r.stream_ops.read)throw new l.ErrnoError(28);var g=typeof o<"u";if(!g)o=r.position;else if(!r.seekable)throw new l.ErrnoError(70);var m=r.stream_ops.read(r,a,i,s,o);return g||(r.position+=m),m},write:(r,a,i,s,o,g)=>{if(i>>>=0,s<0||o<0)throw new l.ErrnoError(28);if(l.isClosed(r))throw new l.ErrnoError(8);if(!(r.flags&2097155))throw new l.ErrnoError(8);if(l.isDir(r.node.mode))throw new l.ErrnoError(31);if(!r.stream_ops.write)throw new l.ErrnoError(28);r.seekable&&r.flags&1024&&l.llseek(r,0,2);var m=typeof o<"u";if(!m)o=r.position;else if(!r.seekable)throw new l.ErrnoError(70);var f=r.stream_ops.write(r,a,i,s,o,g);return m||(r.position+=f),f},allocate:(r,a,i)=>{if(l.isClosed(r))throw new l.ErrnoError(8);if(a<0||i<=0)throw new l.ErrnoError(28);if(!(r.flags&2097155))throw new l.ErrnoError(8);if(!l.isFile(r.node.mode)&&!l.isDir(r.node.mode))throw new l.ErrnoError(43);if(!r.stream_ops.allocate)throw new l.ErrnoError(138);r.stream_ops.allocate(r,a,i)},mmap:(r,a,i,s,o)=>{if(s&2&&!(o&2)&&(r.flags&2097155)!==2)throw new l.ErrnoError(2);if((r.flags&2097155)===1)throw new l.ErrnoError(2);if(!r.stream_ops.mmap)throw new l.ErrnoError(43);return r.stream_ops.mmap(r,a,i,s,o)},msync:(r,a,i,s,o)=>(i>>>=0,r.stream_ops.msync?r.stream_ops.msync(r,a,i,s,o):0),munmap:r=>0,ioctl:(r,a,i)=>{if(!r.stream_ops.ioctl)throw new l.ErrnoError(59);return r.stream_ops.ioctl(r,a,i)},readFile:(r,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(r,a.flags),o=l.stat(r),g=o.size,m=new Uint8Array(g);return l.read(s,m,0,g,0),a.encoding==="utf8"?i=Oe(m,0):a.encoding==="binary"&&(i=m),l.close(s),i},writeFile:(r,a,i={})=>{i.flags=i.flags||577;var s=l.open(r,i.flags,i.mode);if(typeof a=="string"){var o=new Uint8Array(je(a)+1),g=fn(a,o,0,o.length);l.write(s,o,0,g,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:r=>{var a=l.lookupPath(r,{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,o,g,m,f)=>m}),l.mkdev("/dev/null",l.makedev(1,3)),Xe.register(l.makedev(5,0),Xe.default_tty_ops),Xe.register(l.makedev(6,0),Xe.default_tty1_ops),l.mkdev("/dev/tty",l.makedev(5,0)),l.mkdev("/dev/tty1",l.makedev(6,0));var r=new Uint8Array(1024),a=0,i=()=>(a===0&&(a=mn(r).byteLength),r[--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 r=l.mkdir("/proc/self");l.mkdir("/proc/self/fd"),l.mount({mount:()=>{var a=l.createNode(r,"fd",16895,73);return a.node_ops={lookup:(i,s)=>{var o=+s,g=l.getStreamChecked(o),m={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>g.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(r=>{l.genericErrors[r]=new l.ErrnoError(r),l.genericErrors[r].stack="<generic error, no stack>"}))},staticInit:()=>{l.ensureErrnoError(),l.nameTable=new Array(4096),l.mount(B,{},"/"),l.createDefaultDirectories(),l.createDefaultDevices(),l.createSpecialDirectories(),l.filesystems={MEMFS:B}},init:(r,a,i)=>{l.init.initialized=!0,l.ensureErrnoError(),e.stdin=r||e.stdin,e.stdout=a||e.stdout,e.stderr=i||e.stderr,l.createStandardStreams()},quit:()=>{l.init.initialized=!1;for(var r=0;r<l.streams.length;r++){var a=l.streams[r];a&&l.close(a)}},findObject:(r,a)=>{var i=l.analyzePath(r,a);return i.exists?i.object:null},analyzePath:(r,a)=>{try{var i=l.lookupPath(r,{follow:!a});r=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(r,{parent:!0});s.parentExists=!0,s.parentPath=i.path,s.parentObject=i.node,s.name=j.basename(r),i=l.lookupPath(r,{follow:!a}),s.exists=!0,s.path=i.path,s.object=i.node,s.name=i.node.name,s.isRoot=i.path==="/"}catch(o){s.error=o.errno}return s},createPath:(r,a,i,s)=>{r=typeof r=="string"?r:l.getPath(r);for(var o=a.split("/").reverse();o.length;){var g=o.pop();if(g){var m=j.join2(r,g);try{l.mkdir(m)}catch{}r=m}}return m},createFile:(r,a,i,s,o)=>{var g=j.join2(typeof r=="string"?r:l.getPath(r),a),m=pn(s,o);return l.create(g,m)},createDataFile:(r,a,i,s,o,g)=>{var m=a;r&&(r=typeof r=="string"?r:l.getPath(r),m=a?j.join2(r,a):r);var f=pn(s,o),d=l.create(m,f);if(i){if(typeof i=="string"){for(var y=new Array(i.length),v=0,b=i.length;v<b;++v)y[v]=i.charCodeAt(v);i=y}l.chmod(d,f|146);var M=l.open(d,577);l.write(M,i,0,i.length,0,g),l.close(M),l.chmod(d,f)}return d},createDevice:(r,a,i,s)=>{var o=j.join2(typeof r=="string"?r:l.getPath(r),a),g=pn(!!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,d,y,v,b)=>{for(var M=0,D=0;D<v;D++){var R;try{R=i()}catch{throw new l.ErrnoError(29)}if(R===void 0&&M===0)throw new l.ErrnoError(6);if(R==null)break;M++,d[y+D]=R}return M&&(f.node.timestamp=Date.now()),M},write:(f,d,y,v,b)=>{for(var M=0;M<v;M++)try{s(d[y+M])}catch{throw new l.ErrnoError(29)}return v&&(f.node.timestamp=Date.now()),M}}),l.mkdev(o,g,m)},forceLoadFile:r=>{if(r.isDevice||r.isFolder||r.link||r.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(be)try{r.contents=xt(be(r.url),!0),r.usedBytes=r.contents.length}catch{throw new l.ErrnoError(29)}else throw new Error("Cannot load without read() or XMLHttpRequest.")},createLazyFile:(r,a,i,s,o)=>{function g(){this.lengthKnown=!1,this.chunks=[]}if(g.prototype.get=function(D){if(!(D>this.length-1||D<0)){var R=D%this.chunkSize,Y=D/this.chunkSize|0;return this.getter(Y)[R]}},g.prototype.setDataGetter=function(D){this.getter=D},g.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 R=Number(D.getResponseHeader("Content-length")),Y,Z=(Y=D.getResponseHeader("Accept-Ranges"))&&Y==="bytes",X=(Y=D.getResponseHeader("Content-Encoding"))&&Y==="gzip",I=1024*1024;Z||(I=R);var P=(V,ge)=>{if(V>ge)throw new Error("invalid range ("+V+", "+ge+") or no bytes requested!");if(ge>R-1)throw new Error("only "+R+" bytes available! programmer error!");var O=new XMLHttpRequest;if(O.open("GET",i,!1),R!==I&&O.setRequestHeader("Range","bytes="+V+"-"+ge),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||[]):xt(O.responseText||"",!0)},ee=this;ee.setDataGetter(V=>{var ge=V*I,O=(V+1)*I-1;if(O=Math.min(O,R-1),typeof ee.chunks[V]>"u"&&(ee.chunks[V]=P(ge,O)),typeof ee.chunks[V]>"u")throw new Error("doXHR failed!");return ee.chunks[V]}),(X||!R)&&(I=R=1,R=this.getter(0).length,I=R,_t("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=R,this._chunkSize=I,this.lengthKnown=!0},typeof XMLHttpRequest<"u"){if(!W)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var m=new g;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 d=l.createFile(r,a,f,s,o);f.contents?d.contents=f.contents:f.url&&(d.contents=null,d.url=f.url),Object.defineProperties(d,{usedBytes:{get:function(){return this.contents.length}}});var y={},v=Object.keys(d.stream_ops);v.forEach(M=>{var D=d.stream_ops[M];y[M]=function(){return l.forceLoadFile(d),D.apply(null,arguments)}});function b(M,D,R,Y,Z){var X=M.node.contents;if(Z>=X.length)return 0;var I=Math.min(X.length-Z,Y);if(X.slice)for(var P=0;P<I;P++)D[R+P]=X[Z+P];else for(var P=0;P<I;P++)D[R+P]=X.get(Z+P);return I}return y.read=(M,D,R,Y,Z)=>(l.forceLoadFile(d),b(M,D,R,Y,Z)),y.mmap=(M,D,R,Y,Z)=>{l.forceLoadFile(d);var X=xr(D);if(!X)throw new l.ErrnoError(48);return b(M,q,X,D,R),{ptr:X,allocated:!0}},d.stream_ops=y,d}},ft=(r,a)=>(r>>>=0,r?Oe(ie,r,a):""),T={DEFAULT_POLLMASK:5,calculateAt:function(r,a,i){if(j.isAbs(a))return a;var s;if(r===-100)s=l.cwd();else{var o=T.getStreamFromFD(r);s=o.path}if(a.length==0){if(!i)throw new l.ErrnoError(44);return s}return j.join2(s,a)},doStat:function(r,a,i){try{var s=r(a)}catch(f){if(f&&f.node&&j.normalize(a)!==j.normalize(l.getPath(f.node)))return-54;throw f}G[i>>>2]=s.dev,G[i+4>>>2]=s.mode,L[i+8>>>2]=s.nlink,G[i+12>>>2]=s.uid,G[i+16>>>2]=s.gid,G[i+20>>>2]=s.rdev,ce[i+24>>3]=BigInt(s.size),G[i+32>>>2]=4096,G[i+36>>>2]=s.blocks;var o=s.atime.getTime(),g=s.mtime.getTime(),m=s.ctime.getTime();return ce[i+40>>3]=BigInt(Math.floor(o/1e3)),L[i+48>>>2]=o%1e3*1e3,ce[i+56>>3]=BigInt(Math.floor(g/1e3)),L[i+64>>>2]=g%1e3*1e3,ce[i+72>>3]=BigInt(Math.floor(m/1e3)),L[i+80>>>2]=m%1e3*1e3,ce[i+88>>3]=BigInt(s.ino),0},doMsync:function(r,a,i,s,o){if(!l.isFile(a.node.mode))throw new l.ErrnoError(43);if(s&2)return 0;r>>>=0;var g=ie.slice(r,r+i);l.msync(a,g,o,i,s)},varargs:void 0,get:function(){T.varargs+=4;var r=G[T.varargs-4>>>2];return r},getStr:function(r){var a=ft(r);return a},getStreamFromFD:function(r){var a=l.getStreamChecked(r);return a}};function wi(r,a){try{return r=T.getStr(r),l.chmod(r,a),0}catch(i){if(typeof l>"u"||i.name!=="ErrnoError")throw i;return-i.errno}}function Si(r,a,i,s){try{if(a=T.getStr(a),a=T.calculateAt(r,a),i&-8)return-28;var o=l.lookupPath(a,{follow:!0}),g=o.node;if(!g)return-44;var m="";return i&4&&(m+="r"),i&2&&(m+="w"),i&1&&(m+="x"),m&&l.nodePermissions(g,m)?-2:0}catch(f){if(typeof l>"u"||f.name!=="ErrnoError")throw f;return-f.errno}}var ki=9007199254740992,vi=-9007199254740992;function Ve(r){return r<vi||r>ki?NaN:Number(r)}function Ii(r,a,i,s){try{if(i=Ve(i),isNaN(i)||(s=Ve(s),isNaN(s)))return-61;var o=T.getStreamFromFD(r);return l.allocate(o,i,s),0}catch(g){if(typeof l>"u"||g.name!=="ErrnoError")throw g;return-g.errno}}function Mi(r,a){try{return l.fchmod(r,a),0}catch(i){if(typeof l>"u"||i.name!=="ErrnoError")throw i;return-i.errno}}var Hr=r=>(G[wa()>>>2]=r,r);function Di(r,a,i){T.varargs=i;try{var s=T.getStreamFromFD(r);switch(a){case 0:{var o=T.get();if(o<0)return-28;var g;return g=l.createStream(s,o),g.fd}case 1:case 2:return 0;case 3:return s.flags;case 4:{var o=T.get();return s.flags|=o,0}case 5:{var o=T.get(),m=0;return le[o+m>>>1]=2,0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:return Hr(28),-1;default:return-28}}catch(f){if(typeof l>"u"||f.name!=="ErrnoError")throw f;return-f.errno}}function bi(r,a){try{var i=T.getStreamFromFD(r);return T.doStat(l.stat,i.path,a)}catch(s){if(typeof l>"u"||s.name!=="ErrnoError")throw s;return-s.errno}}var et=(r,a,i)=>fn(r,ie,a,i);function Ci(r,a){try{if(a===0)return-28;var i=l.cwd(),s=je(i)+1;return a<s?-68:(et(i,r,a),s)}catch(o){if(typeof l>"u"||o.name!=="ErrnoError")throw o;return-o.errno}}function Gi(r,a,i){try{var s=T.getStreamFromFD(r);s.getdents||(s.getdents=l.readdir(s.path));for(var o=280,g=0,m=l.llseek(s,0,1),f=Math.floor(m/o);f<s.getdents.length&&g+o<=i;){var d,y,v=s.getdents[f];if(v===".")d=s.node.id,y=4;else if(v===".."){var b=l.lookupPath(s.path,{parent:!0});d=b.node.id,y=4}else{var M=l.lookupNode(s.node,v);d=M.id,y=l.isChrdev(M.mode)?2:l.isDir(M.mode)?4:l.isLink(M.mode)?10:8}ce[a+g>>3]=BigInt(d),ce[a+g+8>>3]=BigInt((f+1)*o),le[a+g+16>>>1]=280,q[a+g+18>>>0]=y,et(v,a+g+19,256),g+=o,f+=1}return l.llseek(s,f*o,0),g}catch(D){if(typeof l>"u"||D.name!=="ErrnoError")throw D;return-D.errno}}function Pi(r,a,i){T.varargs=i;try{var s=T.getStreamFromFD(r);switch(a){case 21509:return s.tty?0:-59;case 21505:{if(!s.tty)return-59;if(s.tty.ops.ioctl_tcgets){var o=s.tty.ops.ioctl_tcgets(s),g=T.get();G[g>>>2]=o.c_iflag||0,G[g+4>>>2]=o.c_oflag||0,G[g+8>>>2]=o.c_cflag||0,G[g+12>>>2]=o.c_lflag||0;for(var m=0;m<32;m++)q[g+m+17>>>0]=o.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 g=T.get(),f=G[g>>>2],d=G[g+4>>>2],y=G[g+8>>>2],v=G[g+12>>>2],b=[],m=0;m<32;m++)b.push(q[g+m+17>>>0]);return s.tty.ops.ioctl_tcsets(s.tty,a,{c_iflag:f,c_oflag:d,c_cflag:y,c_lflag:v,c_cc:b})}return 0}case 21519:{if(!s.tty)return-59;var g=T.get();return G[g>>>2]=0,0}case 21520:return s.tty?-28:-59;case 21531:{var g=T.get();return l.ioctl(s,a,g)}case 21523:{if(!s.tty)return-59;if(s.tty.ops.ioctl_tiocgwinsz){var M=s.tty.ops.ioctl_tiocgwinsz(s.tty),g=T.get();le[g>>>1]=M[0],le[g+2>>>1]=M[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 Ai(r,a){try{return r=T.getStr(r),T.doStat(l.lstat,r,a)}catch(i){if(typeof l>"u"||i.name!=="ErrnoError")throw i;return-i.errno}}function Ti(r,a,i,s){try{a=T.getStr(a);var o=s&256,g=s&4096;return s=s&-6401,a=T.calculateAt(r,a,g),T.doStat(o?l.lstat:l.stat,a,i)}catch(m){if(typeof l>"u"||m.name!=="ErrnoError")throw m;return-m.errno}}function Ri(r,a,i,s){T.varargs=s;try{a=T.getStr(a),a=T.calculateAt(r,a);var o=s?T.get():0;return l.open(a,i,o).fd}catch(g){if(typeof l>"u"||g.name!=="ErrnoError")throw g;return-g.errno}}function Ei(r,a,i,s){try{if(a=T.getStr(a),a=T.calculateAt(r,a),s<=0)return-28;var o=l.readlink(a),g=Math.min(s,je(o)),m=q[i+g>>>0];return et(o,i,s+1),q[i+g>>>0]=m,g}catch(f){if(typeof l>"u"||f.name!=="ErrnoError")throw f;return-f.errno}}function Wi(r,a,i,s){try{return a=T.getStr(a),s=T.getStr(s),a=T.calculateAt(r,a),s=T.calculateAt(i,s),l.rename(a,s),0}catch(o){if(typeof l>"u"||o.name!=="ErrnoError")throw o;return-o.errno}}function Li(r){try{return r=T.getStr(r),l.rmdir(r),0}catch(a){if(typeof l>"u"||a.name!=="ErrnoError")throw a;return-a.errno}}function Bi(r,a){try{return r=T.getStr(r),T.doStat(l.stat,r,a)}catch(i){if(typeof l>"u"||i.name!=="ErrnoError")throw i;return-i.errno}}function zi(r,a){try{return r=T.getStr(r),a=T.getStr(a),l.symlink(r,a),0}catch(i){if(typeof l>"u"||i.name!=="ErrnoError")throw i;return-i.errno}}function Ni(r,a,i){try{return a=T.getStr(a),a=T.calculateAt(r,a),i===0?l.unlink(a):i===512?l.rmdir(a):Ce("Invalid flags passed to unlinkat"),0}catch(s){if(typeof l>"u"||s.name!=="ErrnoError")throw s;return-s.errno}}var Ht={};function Ur(r){for(;r.length;){var a=r.pop(),i=r.pop();i(a)}}function pt(r){return this.fromWireType(G[r>>>2])}var tt={},qe={},Ut={},xi=48,Hi=57;function Ft(r){if(r===void 0)return"_unknown";r=r.replace(/[^a-zA-Z0-9_]/g,"$");var a=r.charCodeAt(0);return a>=xi&&a<=Hi?`_${r}`:r}function $t(r,a){return r=Ft(r),{[r]:function(){return a.apply(this,arguments)}}[r]}function hn(r,a){var i=$t(a,function(s){this.name=a,this.message=s;var o=new Error(s).stack;o!==void 0&&(this.stack=this.toString()+`
|
|
45
|
-
`+o.replace(/^Error(:[^\n]*)?\n/,""))});return i.prototype=Object.create(r.prototype),i.prototype.constructor=i,i.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},i}var Fr=void 0;function Yt(r){throw new Fr(r)}function dn(r,a,i){r.forEach(function(f){Ut[f]=a});function s(f){var d=i(f);d.length!==r.length&&Yt("Mismatched type converter count");for(var y=0;y<r.length;++y)pe(r[y],d[y])}var o=new Array(a.length),g=[],m=0;a.forEach((f,d)=>{qe.hasOwnProperty(f)?o[d]=qe[f]:(g.push(f),tt.hasOwnProperty(f)||(tt[f]=[]),tt[f].push(()=>{o[d]=qe[f],++m,m===g.length&&s(o)}))}),g.length===0&&s(o)}var Ui=function(r){var a=Ht[r];delete Ht[r];var i=a.rawConstructor,s=a.rawDestructor,o=a.fields,g=o.map(m=>m.getterReturnType).concat(o.map(m=>m.setterArgumentType));dn([r],g,m=>{var f={};return o.forEach((d,y)=>{var v=d.fieldName,b=m[y],M=d.getter,D=d.getterContext,R=m[y+o.length],Y=d.setter,Z=d.setterContext;f[v]={read:X=>b.fromWireType(M(D,X)),write:(X,I)=>{var P=[];Y(Z,X,R.toWireType(P,I)),Ur(P)}}}),[{name:a.name,fromWireType:function(d){var y={};for(var v in f)y[v]=f[v].read(d);return s(d),y},toWireType:function(d,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 d!==null&&d.push(s,b),b},argPackAdvance:8,readValueFromPointer:pt,destructorFunction:s}]})};function ht(r){if(r===null)return"null";var a=typeof r;return a==="object"||a==="array"||a==="function"?r.toString():""+r}function Fi(){for(var r=new Array(256),a=0;a<256;++a)r[a]=String.fromCharCode(a);$r=r}var $r=void 0;function re(r){for(var a="",i=r;ie[i>>>0];)a+=$r[ie[i++>>>0]];return a}var dt=void 0;function x(r){throw new dt(r)}function pe(r,a,i={}){if(!("argPackAdvance"in a))throw new TypeError("registerType registeredInstance requires argPackAdvance");var s=a.name;if(r||x(`type "${s}" must have a positive integer typeid pointer`),qe.hasOwnProperty(r)){if(i.ignoreDuplicateRegistrations)return;x(`Cannot register type '${s}' twice`)}if(qe[r]=a,delete Ut[r],tt.hasOwnProperty(r)){var o=tt[r];delete tt[r],o.forEach(g=>g())}}function Yr(r,a,i){switch(a){case 0:return i?function(o){return q[o>>>0]}:function(o){return ie[o>>>0]};case 1:return i?function(o){return le[o>>>1]}:function(o){return ct[o>>>1]};case 2:return i?function(o){return G[o>>>2]}:function(o){return L[o>>>2]};case 3:return i?function(o){return ce[o>>3]}:function(o){return Gr[o>>3]};default:throw new TypeError("Unknown integer type: "+r)}}function $i(r,a,i,s,o){a=re(a);var g=yt(i),m=a.indexOf("u")!=-1;m&&(o=(1n<<64n)-1n),pe(r,{name:a,fromWireType:function(f){return f},toWireType:function(f,d){if(typeof d!="bigint"&&typeof d!="number")throw new TypeError(`Cannot convert "${ht(d)}" to ${this.name}`);if(d<s||d>o)throw new TypeError(`Passing a number "${ht(d)}" from JS side to C/C++ side to an argument of type "${a}", which is outside the valid range [${s}, ${o}]!`);return d},argPackAdvance:8,readValueFromPointer:Yr(a,g,!m),destructorFunction:null})}function yt(r){switch(r){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(`Unknown type size: ${r}`)}}function Yi(r,a,i,s,o){var g=yt(i);a=re(a),pe(r,{name:a,fromWireType:function(m){return!!m},toWireType:function(m,f){return f?s:o},argPackAdvance:8,readValueFromPointer:function(m){var f;if(i===1)f=q;else if(i===2)f=le;else if(i===4)f=G;else throw new TypeError("Unknown boolean type size: "+a);return this.fromWireType(f[m>>>g])},destructorFunction:null})}function ji(r){if(!(this instanceof ze)||!(r instanceof ze))return!1;for(var a=this.$$.ptrType.registeredClass,i=this.$$.ptr,s=r.$$.ptrType.registeredClass,o=r.$$.ptr;a.baseClass;)i=a.upcast(i),a=a.baseClass;for(;s.baseClass;)o=s.upcast(o),s=s.baseClass;return a===s&&i===o}function Xi(r){return{count:r.count,deleteScheduled:r.deleteScheduled,preservePointerOnDelete:r.preservePointerOnDelete,ptr:r.ptr,ptrType:r.ptrType,smartPtr:r.smartPtr,smartPtrType:r.smartPtrType}}function yn(r){function a(i){return i.$$.ptrType.registeredClass.name}x(a(r)+" instance already deleted")}var wn=!1;function jr(r){}function Vi(r){r.smartPtr?r.smartPtrType.rawDestructor(r.smartPtr):r.ptrType.registeredClass.rawDestructor(r.ptr)}function Xr(r){r.count.value-=1;var a=r.count.value===0;a&&Vi(r)}function Vr(r,a,i){if(a===i)return r;if(i.baseClass===void 0)return null;var s=Vr(r,a,i.baseClass);return s===null?null:i.downcast(s)}var qr={};function qi(){return Object.keys(kt).length}function Qi(){var r=[];for(var a in kt)kt.hasOwnProperty(a)&&r.push(kt[a]);return r}var wt=[];function Sn(){for(;wt.length;){var r=wt.pop();r.$$.deleteScheduled=!1,r.delete()}}var St=void 0;function Ji(r){St=r,wt.length&&St&&St(Sn)}function Ki(){e.getInheritedInstanceCount=qi,e.getLiveInheritedInstances=Qi,e.flushPendingDeletes=Sn,e.setDelayFunction=Ji}var kt={};function Zi(r,a){for(a===void 0&&x("ptr should not be undefined");r.baseClass;)a=r.upcast(a),r=r.baseClass;return a}function Oi(r,a){return a=Zi(r,a),kt[a]}function jt(r,a){(!a.ptrType||!a.ptr)&&Yt("makeClassHandle requires ptr and ptrType");var i=!!a.smartPtrType,s=!!a.smartPtr;return i!==s&&Yt("Both smartPtrType and smartPtr must be specified"),a.count={value:1},vt(Object.create(r,{$$:{value:a}}))}function es(r){var a=this.getPointee(r);if(!a)return this.destructor(r),null;var i=Oi(this.registeredClass,a);if(i!==void 0){if(i.$$.count.value===0)return i.$$.ptr=a,i.$$.smartPtr=r,i.clone();var s=i.clone();return this.destructor(r),s}function o(){return this.isSmartPointer?jt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:a,smartPtrType:this,smartPtr:r}):jt(this.registeredClass.instancePrototype,{ptrType:this,ptr:r})}var g=this.registeredClass.getActualType(a),m=qr[g];if(!m)return o.call(this);var f;this.isConst?f=m.constPointerType:f=m.pointerType;var d=Vr(a,this.registeredClass,f.registeredClass);return d===null?o.call(this):this.isSmartPointer?jt(f.registeredClass.instancePrototype,{ptrType:f,ptr:d,smartPtrType:this,smartPtr:r}):jt(f.registeredClass.instancePrototype,{ptrType:f,ptr:d})}var vt=function(r){return typeof FinalizationRegistry>"u"?(vt=a=>a,r):(wn=new FinalizationRegistry(a=>{Xr(a.$$)}),vt=a=>{var i=a.$$,s=!!i.smartPtr;if(s){var o={$$:i};wn.register(a,o,a)}return a},jr=a=>wn.unregister(a),vt(r))};function ts(){if(this.$$.ptr||yn(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var r=vt(Object.create(Object.getPrototypeOf(this),{$$:{value:Xi(this.$$)}}));return r.$$.count.value+=1,r.$$.deleteScheduled=!1,r}function ns(){this.$$.ptr||yn(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&x("Object already scheduled for deletion"),jr(this),Xr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function rs(){return!this.$$.ptr}function as(){return this.$$.ptr||yn(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&x("Object already scheduled for deletion"),wt.push(this),wt.length===1&&St&&St(Sn),this.$$.deleteScheduled=!0,this}function is(){ze.prototype.isAliasOf=ji,ze.prototype.clone=ts,ze.prototype.delete=ns,ze.prototype.isDeleted=rs,ze.prototype.deleteLater=as}function ze(){}function ss(r,a,i){if(r[a].overloadTable===void 0){var s=r[a];r[a]=function(){return r[a].overloadTable.hasOwnProperty(arguments.length)||x(`Function '${i}' called with an invalid number of arguments (${arguments.length}) - expects one of (${r[a].overloadTable})!`),r[a].overloadTable[arguments.length].apply(this,arguments)},r[a].overloadTable=[],r[a].overloadTable[s.argCount]=s}}function kn(r,a,i){e.hasOwnProperty(r)?((i===void 0||e[r].overloadTable!==void 0&&e[r].overloadTable[i]!==void 0)&&x(`Cannot register public name '${r}' twice`),ss(e,r,r),e.hasOwnProperty(i)&&x(`Cannot register multiple overloads of a function with the same number of arguments (${i})!`),e[r].overloadTable[i]=a):(e[r]=a,i!==void 0&&(e[r].numArguments=i))}function us(r,a,i,s,o,g,m,f){this.name=r,this.constructor=a,this.instancePrototype=i,this.rawDestructor=s,this.baseClass=o,this.getActualType=g,this.upcast=m,this.downcast=f,this.pureVirtualFunctions=[]}function vn(r,a,i){for(;a!==i;)a.upcast||x(`Expected null or instance of ${i.name}, got an instance of ${a.name}`),r=a.upcast(r),a=a.baseClass;return r}function os(r,a){if(a===null)return this.isReference&&x(`null is not a valid ${this.name}`),0;a.$$||x(`Cannot pass "${ht(a)}" as a ${this.name}`),a.$$.ptr||x(`Cannot pass deleted object as a pointer of type ${this.name}`);var i=a.$$.ptrType.registeredClass,s=vn(a.$$.ptr,i,this.registeredClass);return s}function _s(r,a){var i;if(a===null)return this.isReference&&x(`null is not a valid ${this.name}`),this.isSmartPointer?(i=this.rawConstructor(),r!==null&&r.push(this.rawDestructor,i),i):0;a.$$||x(`Cannot pass "${ht(a)}" as a ${this.name}`),a.$$.ptr||x(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&a.$$.ptrType.isConst&&x(`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=vn(a.$$.ptr,s,this.registeredClass),this.isSmartPointer)switch(a.$$.smartPtr===void 0&&x("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:a.$$.smartPtrType===this?i=a.$$.smartPtr:x(`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 o=a.clone();i=this.rawShare(i,he.toHandle(function(){o.delete()})),r!==null&&r.push(this.rawDestructor,i)}break;default:x("Unsupporting sharing policy")}return i}function ls(r,a){if(a===null)return this.isReference&&x(`null is not a valid ${this.name}`),0;a.$$||x(`Cannot pass "${ht(a)}" as a ${this.name}`),a.$$.ptr||x(`Cannot pass deleted object as a pointer of type ${this.name}`),a.$$.ptrType.isConst&&x(`Cannot convert argument of type ${a.$$.ptrType.name} to parameter type ${this.name}`);var i=a.$$.ptrType.registeredClass,s=vn(a.$$.ptr,i,this.registeredClass);return s}function cs(r){return this.rawGetPointee&&(r=this.rawGetPointee(r)),r}function gs(r){this.rawDestructor&&this.rawDestructor(r)}function ms(r){r!==null&&r.delete()}function fs(){Pe.prototype.getPointee=cs,Pe.prototype.destructor=gs,Pe.prototype.argPackAdvance=8,Pe.prototype.readValueFromPointer=pt,Pe.prototype.deleteObject=ms,Pe.prototype.fromWireType=es}function Pe(r,a,i,s,o,g,m,f,d,y,v){this.name=r,this.registeredClass=a,this.isReference=i,this.isConst=s,this.isSmartPointer=o,this.pointeeType=g,this.sharingPolicy=m,this.rawGetPointee=f,this.rawConstructor=d,this.rawShare=y,this.rawDestructor=v,!o&&a.baseClass===void 0?s?(this.toWireType=os,this.destructorFunction=null):(this.toWireType=ls,this.destructorFunction=null):this.toWireType=_s}function Qr(r,a,i){e.hasOwnProperty(r)||Yt("Replacing nonexistant public symbol"),e[r].overloadTable!==void 0&&i!==void 0?e[r].overloadTable[i]=a:(e[r]=a,e[r].argCount=i)}function Ae(r,a){r=re(r);function i(){return N(a)}var s=i();return typeof s!="function"&&x(`unknown function pointer with signature ${r}: ${a}`),s}var Jr=void 0;function Kr(r){var a=Sa(r),i=re(a);return Te(a),i}function Zr(r,a){var i=[],s={};function o(g){if(!s[g]&&!qe[g]){if(Ut[g]){Ut[g].forEach(o);return}i.push(g),s[g]=!0}}throw a.forEach(o),new Jr(`${r}: `+i.map(Kr).join([", "]))}function ps(r,a,i,s,o,g,m,f,d,y,v,b,M){v=re(v),g=Ae(o,g),f&&(f=Ae(m,f)),y&&(y=Ae(d,y)),M=Ae(b,M);var D=Ft(v);kn(D,function(){Zr(`Cannot construct ${v} due to unbound types`,[s])}),dn([r,a,i],s?[s]:[],function(R){R=R[0];var Y,Z;s?(Y=R.registeredClass,Z=Y.instancePrototype):Z=ze.prototype;var X=$t(D,function(){if(Object.getPrototypeOf(this)!==I)throw new dt("Use 'new' to construct "+v);if(P.constructor_body===void 0)throw new dt(v+" has no accessible constructor");var O=P.constructor_body[arguments.length];if(O===void 0)throw new dt(`Tried to invoke ctor of ${v} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(P.constructor_body).toString()}) parameters instead!`);return O.apply(this,arguments)}),I=Object.create(Z,{constructor:{value:X}});X.prototype=I;var P=new us(v,X,I,M,Y,g,f,y);P.baseClass&&(P.baseClass.__derivedClasses===void 0&&(P.baseClass.__derivedClasses=[]),P.baseClass.__derivedClasses.push(P));var ee=new Pe(v,P,!0,!1,!1),V=new Pe(v+"*",P,!1,!1,!1),ge=new Pe(v+" const*",P,!1,!0,!1);return qr[r]={pointerType:V,constPointerType:ge},Qr(D,X),[ee,V,ge]})}function hs(){this.allocated=[void 0],this.freelist=[],this.get=function(r){return this.allocated[r]},this.has=function(r){return this.allocated[r]!==void 0},this.allocate=function(r){var a=this.freelist.pop()||this.allocated.length;return this.allocated[a]=r,a},this.free=function(r){this.allocated[r]=void 0,this.freelist.push(r)}}var fe=new hs;function Or(r){r>=fe.reserved&&--fe.get(r).refcount===0&&fe.free(r)}function ds(){for(var r=0,a=fe.reserved;a<fe.allocated.length;++a)fe.allocated[a]!==void 0&&++r;return r}function ys(){fe.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),fe.reserved=fe.allocated.length,e.count_emval_handles=ds}var he={toValue:r=>(r||x("Cannot use deleted val. handle = "+r),fe.get(r).value),toHandle:r=>{switch(r){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return fe.allocate({refcount:1,value:r})}}};function ws(r,a){a=re(a),pe(r,{name:a,fromWireType:function(i){var s=he.toValue(i);return Or(i),s},toWireType:function(i,s){return he.toHandle(s)},argPackAdvance:8,readValueFromPointer:pt,destructorFunction:null})}function Ss(r,a,i){switch(a){case 0:return function(s){var o=i?q:ie;return this.fromWireType(o[s>>>0])};case 1:return function(s){var o=i?le:ct;return this.fromWireType(o[s>>>1])};case 2:return function(s){var o=i?G:L;return this.fromWireType(o[s>>>2])};default:throw new TypeError("Unknown integer type: "+r)}}function ks(r,a,i,s){var o=yt(i);a=re(a);function g(){}g.values={},pe(r,{name:a,constructor:g,fromWireType:function(m){return this.constructor.values[m]},toWireType:function(m,f){return f.value},argPackAdvance:8,readValueFromPointer:Ss(a,o,s),destructorFunction:null}),kn(a,g)}function In(r,a){var i=qe[r];return i===void 0&&x(a+" has unknown type "+Kr(r)),i}function vs(r,a,i){var s=In(r,"enum");a=re(a);var o=s.constructor,g=Object.create(s.constructor.prototype,{value:{value:i},constructor:{value:$t(`${s.name}_${a}`,function(){})}});o.values[i]=g,o[a]=g}function Is(r,a){switch(a){case 2:return function(i){return this.fromWireType(Bt[i>>>2])};case 3:return function(i){return this.fromWireType(zt[i>>>3])};default:throw new TypeError("Unknown float type: "+r)}}function Ms(r,a,i){var s=yt(i);a=re(a),pe(r,{name:a,fromWireType:function(o){return o},toWireType:function(o,g){return g},argPackAdvance:8,readValueFromPointer:Is(a,s),destructorFunction:null})}function ea(r,a){if(!(r instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof r} which is not a function`);var i=$t(r.name||"unknownFunctionName",function(){});i.prototype=r.prototype;var s=new i,o=r.apply(s,a);return o instanceof Object?o:s}function Ds(r,a,i,s,o,g){var m=a.length;m<2&&x("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var f=a[1]!==null&&i!==null,d=!1,y=1;y<a.length;++y)if(a[y]!==null&&a[y].destructorFunction===void 0){d=!0;break}for(var v=a[0].name!=="void",b="",M="",y=0;y<m-2;++y)b+=(y!==0?", ":"")+"arg"+y,M+=(y!==0?", ":"")+"arg"+y+"Wired";var D=`
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
`)
|
|
51
|
-
`);for(var y=0;y<m-2;++y)D+="var arg"+y+"Wired = argType"+y+".toWireType("+R+", arg"+y+"); // "+a[y+2].name+`
|
|
52
|
-
`,Y.push("argType"+y),Z.push(a[y+2]);if(f&&(M="thisWired"+(M.length>0?", ":"")+M),D+=(v||g?"var rv = ":"")+"invoker(fn"+(M.length>0?", ":"")+M+`);
|
|
53
|
-
`,d)D+=`runDestructors(destructors);
|
|
54
|
-
`;else for(var y=f?1:2;y<a.length;++y){var X=y===1?"thisWired":"arg"+(y-2)+"Wired";a[y].destructorFunction!==null&&(D+=X+"_dtor("+X+"); // "+a[y].name+`
|
|
55
|
-
`,Y.push(X+"_dtor"),Z.push(a[y].destructorFunction))}return v&&(D+=`var ret = retType.fromWireType(rv);
|
|
42
|
+
`}};class pt{constructor(){this.log=new Ut("log.xml",vi.XmlResourceFiles.log),this.policy=new Ut("policy.xml",vi.XmlResourceFiles.policy)}static default=new pt;*all(){yield this.log,yield this.policy}log;policy}class Mt{constructor(a,o,i){this.format=a,this.name=o,this.value=i}format;name;value}class wi{format;constructor(a){this.format=a}createDefine(a,o){return typeof o=="boolean"?new Mt(this.format,a,o?"true":"false"):typeof o=="string"?new Mt(this.format,a,o):new Mt(this.format,a,o.toString())}hasValue(a){return a!=null}}class aa{_x;_y;_paintMethod;constructor(a,o,i){this._x=a,this._y=o,this._paintMethod=i}draw(a){a.color(this._x,this._y,this._paintMethod)}}class Ii{_color;constructor(a){this._color=a}draw(a){a.fillColor(this._color)}}class yi{_opacity;constructor(a){this._opacity=a}draw(a){a.fillOpacity(this._opacity.toDouble()/100)}}class Ci{_pointSize;constructor(a){this._pointSize=a}draw(a){a.fontPointSize(this._pointSize)}}class Di{constructor(a,o){this.eventType=a,this.message=o??""}eventType;message}const Pi={Undefined:0,Activate:1,Associate:2,Background:3,Copy:4,Deactivate:5,Discrete:6,Disassociate:7,Extract:8,Off:9,On:10,Opaque:11,Remove:12,Set:13,Shape:14,Transparent:15,OffIfOpaque:16},L={Red:0,Cyan:0,Gray:0,Green:1,Magenta:1,Blue:2,Yellow:2,Black:3,Alpha:4,Index:5,Meta0:10,Meta1:11,Meta2:12,Meta3:13,Meta4:14,Meta5:15,Meta6:16,Meta7:17,Meta8:18,Meta9:19,Meta10:20,Meta11:21,Meta12:22,Meta13:23,Meta14:24,Meta15:25,Meta16:26,Meta17:27,Meta18:28,Meta19:29,Meta20:30,Meta21:31,Meta22:32,Meta23:33,Meta24:34,Meta25:35,Meta26:36,Meta27:37,Meta28:38,Meta29:39,Meta30:40,Meta31:41,Meta32:42,Meta33:43,Meta34:44,Meta35:45,Meta36:46,Meta37:47,Meta38:48,Meta39:49,Meta40:50,Meta41:51,Meta42:52,Meta43:53,Meta44:54,Meta45:55,Meta46:56,Meta47:57,Meta48:58,Meta49:59,Meta50:60,Meta51:61,Meta52:62,Composite:64},X={Undefined:0,Red:1,Gray:1,Cyan:1,Green:2,Magenta:2,Blue:4,Yellow:4,Black:8,Alpha:16,Opacity:16,Index:32,Composite:31,TrueAlpha:256,get RGB(){return this.Red|this.Green|this.Blue},get CMYK(){return this.Cyan|this.Magenta|this.Yellow|this.Black},get CMYKA(){return this.Cyan|this.Magenta|this.Yellow|this.Black|this.Alpha},Meta0:1<<L.Meta0,Meta1:1<<L.Meta1,Meta2:1<<L.Meta2,Meta3:1<<L.Meta3,Meta4:1<<L.Meta4,Meta5:1<<L.Meta5,Meta6:1<<L.Meta6,Meta7:1<<L.Meta7,Meta8:1<<L.Meta8,Meta9:1<<L.Meta9,Meta10:1<<L.Meta10,Meta11:1<<L.Meta11,Meta12:1<<L.Meta12,Meta13:1<<L.Meta13,Meta14:1<<L.Meta14,Meta15:1<<L.Meta15,Meta16:1<<L.Meta16,Meta17:1<<L.Meta17,Meta18:1<<L.Meta18,Meta19:1<<L.Meta19,Meta20:1<<L.Meta20,Meta21:1<<L.Meta21,All:134217727};class Ei{constructor(a,o,i,g){this.red=a,this.green=o,this.blue=i,this.white=g}red;green;blue;white}const T={Undefined:0,CMY:1,CMYK:2,Gray:3,HCL:4,HCLp:5,HSB:6,HSI:7,HSL:8,HSV:9,HWB:10,Lab:11,LCH:12,LCHab:13,LCHuv:14,Log:15,LMS:16,Luv:17,OHTA:18,Rec601YCbCr:19,Rec709YCbCr:20,RGB:21,scRGB:22,sRGB:23,Transparent:24,XyY:25,XYZ:26,YCbCr:27,YCC:28,YDbDr:29,YIQ:30,YPbPr:31,YUV:32,LinearGray:33,Jzazbz:34,DisplayP3:35,Adobe98:36,ProPhoto:37,Oklab:38,Oklch:39,CAT02LMSC:40},jt={[T.Undefined]:"Undefined",[T.CMY]:"CMY",[T.CMYK]:"CMYK",[T.Gray]:"Gray",[T.HCL]:"HCL",[T.HCLp]:"HCLp",[T.HSB]:"HSB",[T.HSI]:"HSI",[T.HSL]:"HSL",[T.HSV]:"HSV",[T.HWB]:"HWB",[T.Lab]:"Lab",[T.LCH]:"LCH",[T.LCHab]:"LCHab",[T.LCHuv]:"LCHuv",[T.Log]:"Log",[T.LMS]:"LMS",[T.Luv]:"Luv",[T.OHTA]:"OHTA",[T.Rec601YCbCr]:"Rec601YCbCr",[T.Rec709YCbCr]:"Rec709YCbCr",[T.RGB]:"RGB",[T.scRGB]:"scRGB",[T.sRGB]:"sRGB",[T.Transparent]:"Transparent",[T.XyY]:"XyY",[T.XYZ]:"XYZ",[T.YCbCr]:"YCbCr",[T.YCC]:"YCC",[T.YDbDr]:"YDbDr",[T.YIQ]:"YIQ",[T.YPbPr]:"YPbPr",[T.YUV]:"YUV",[T.LinearGray]:"LinearGray",[T.Jzazbz]:"Jzazbz",[T.DisplayP3]:"DisplayP3",[T.Adobe98]:"Adobe98",[T.ProPhoto]:"ProPhoto",[T.Oklab]:"Oklab",[T.Oklch]:"Oklch",[T.CAT02LMSC]:"CAT02LMS"};class na{colorSpace=T.Undefined;copyright=null;description=null;manufacturer=null;model=null}class oa{_data;_index;constructor(a){this._data=a,this._index=0,this.isLittleEndian=!1}get index(){return this._index}isLittleEndian;readLong(){return this.canRead(4)?this.isLittleEndian?this.readLongLSB():this.readLongMSB():null}readString(a){if(a==0)return"";if(!this.canRead(a))return null;let i=new TextDecoder("utf-8").decode(this._data.subarray(this._index,this._index+a));const g=i.indexOf("\0");return g!=-1&&(i=i.substring(0,g)),this._index+=a,i}seek(a){return a>=this._data.length?!1:(this._index=a,!0)}skip(a){return this._index+a>=this._data.length?!1:(this._index+=a,!0)}canRead(a){return a>this._data.length?!1:this._index+a<=this._data.length}readLongLSB(){let a=this._data[this._index];return a|=this._data[this._index+1]<<8,a|=this._data[this._index+2]<<16,a|=this._data[this._index+3]<<24,this._index+=4,a}readLongMSB(){let a=this._data[this._index]<<24;return a|=this._data[this._index+1]<<16,a|=this._data[this._index+2]<<8,a|=this._data[this._index+3],this._index+=4,a}}class Yt{_data=new na;_reader;constructor(a){this._reader=new oa(a)}static read(a){const o=new Yt(a);return o.readColorSpace(),o.readTagTable(),o._data}readColorSpace(){this._reader.seek(16);const a=this._reader.readString(4);a!=null&&(this._data.colorSpace=this.determineColorSpace(a.trimEnd()))}determineColorSpace(a){switch(a){case"CMY":return T.CMY;case"CMYK":return T.CMYK;case"GRAY":return T.Gray;case"HSL":return T.HSL;case"HSV":return T.HSV;case"Lab":return T.Lab;case"Luv":return T.Luv;case"RGB":return T.sRGB;case"XYZ":return T.XYZ;case"YCbr":return T.YCbCr;default:return T.Undefined}}readTagTable(){if(!this._reader.seek(128))return;const a=this._reader.readLong();if(a!=null)for(let o=0;o<a;o++)switch(this._reader.readLong()){case 1668313716:this._data.copyright=this.readTag();break;case 1684370275:this._data.description=this.readTag();break;case 1684893284:this._data.manufacturer=this.readTag();break;case 1684890724:this._data.model=this.readTag();break;default:this._reader.skip(8);break}}readTag(){const a=this._reader.readLong(),o=this._reader.readLong();if(a===null||o===null)return null;const i=this._reader.index;if(!this._reader.seek(a))return null;const g=this.readTagValue(o);return this._reader.seek(i),g}readTagValue(a){switch(this._reader.readString(4)){case"desc":return this.readTextDescriptionTypeValue();case"text":return this.readTextTypeValue(a);default:return null}}readTextDescriptionTypeValue(){if(!this._reader.skip(4))return null;const a=this._reader.readLong();return a==null?null:this._reader.readString(a)}readTextTypeValue(a){return this._reader.skip(4)?this._reader.readString(a):null}}class Vt{constructor(a,o){this.name=a,this.data=o}name;data}class Ti extends Vt{_data;constructor(a){super("icc",a)}get colorSpace(){return this.initialize(),this._data.colorSpace}get copyright(){return this.initialize(),this._data.copyright}get description(){return this.initialize(),this._data.description}get manufacturer(){return this.initialize(),this._data.manufacturer}get model(){return this.initialize(),this._data.model}initialize(){this._data||(this._data=Yt.read(this.data))}}const Xt={HighRes:0,Quantum:1};class kt{constructor(a,o){this.distortion=a,this.difference=o}difference;distortion;static _create(a,o){return new kt(a,o)}}class bi{constructor(a){this.metric=a}metric;highlightColor;lowlightColor;masklightColor;_setArtifacts(a){this.highlightColor!==void 0&&a.setArtifact("compare:highlight-color",this.highlightColor),this.lowlightColor!==void 0&&a.setArtifact("compare:lowlight-color",this.lowlightColor),this.masklightColor!==void 0&&a.setArtifact("compare:masklight-color",this.masklightColor)}}const St={Undefined:0,Alpha:1,Atop:2,Blend:3,Blur:4,Bumpmap:5,ChangeMask:6,Clear:7,ColorBurn:8,ColorDodge:9,Colorize:10,CopyBlack:11,CopyBlue:12,Copy:13,CopyCyan:14,CopyGreen:15,CopyMagenta:16,CopyAlpha:17,CopyRed:18,CopyYellow:19,Darken:20,DarkenIntensity:21,Difference:22,Displace:23,Dissolve:24,Distort:25,DivideDst:26,DivideSrc:27,DstAtop:28,Dst:29,DstIn:30,DstOut:31,DstOver:32,Exclusion:33,HardLight:34,HardMix:35,Hue:36,In:37,Intensity:38,Lighten:39,LightenIntensity:40,LinearBurn:41,LinearDodge:42,LinearLight:43,Luminize:44,Mathematics:45,MinusDst:46,MinusSrc:47,Modulate:48,ModulusAdd:49,ModulusSubtract:50,Multiply:51,No:52,Out:53,Over:54,Overlay:55,PegtopLight:56,PinLight:57,Plus:58,Replace:59,Saturate:60,Screen:61,SoftLight:62,SrcAtop:63,Src:64,SrcIn:65,SrcOut:66,SrcOver:67,Threshold:68,VividLight:69,Xor:70,Stereo:71,Freeze:72,Interpolate:73,Negate:74,Reflect:75,SoftBurn:76,SoftDodge:77,Stamp:78,RMSE:79,SaliencyBlend:80,SeamlessBlend:81},vt={Warning:300,ResourceLimitWarning:300,TypeWarning:305,OptionWarning:310,DelegateWarning:315,MissingDelegateWarning:320,CorruptImageWarning:325,FileOpenWarning:330,BlobWarning:335,StreamWarning:340,CacheWarning:345,CoderWarning:350,FilterWarning:352,ModuleWarning:355,DrawWarning:360,ImageWarning:365,WandWarning:370,RandomWarning:375,XServerWarning:380,MonitorWarning:385,RegistryWarning:390,ConfigureWarning:395,PolicyWarning:399,Error:400,ResourceLimitError:400,TypeError:405,OptionError:410,DelegateError:415,MissingDelegateError:420,CorruptImageError:425,FileOpenError:430,BlobError:435,StreamError:440,CacheError:445,CoderError:450,FilterError:452,ModuleError:455,DrawError:460,ImageError:465,WandError:470,RandomError:475,XServerError:480,MonitorError:485,RegistryError:490,ConfigureError:495,PolicyError:499};class z extends Error{_relatedErrors=[];constructor(a,o=vt.Error){super(a),this.severity=o}severity;get relatedErrors(){return this._relatedErrors}_setRelatedErrors(a){this._relatedErrors=a}}class Fe{static get depth(){return l._api._Quantum_Depth_Get()}static get max(){return l._api._Quantum_Max_Get()}}function ge(S,a){return S===0?a??null:l._api.UTF8ToString(S)}function sa(S,a){const o=ge(a);return S._MagickMemory_Relinquish(a),o}function qt(S,a,o){const i=S.lengthBytesUTF8(a)+1,g=S._malloc(i);try{return S.stringToUTF8(a,g,i),o(g)}finally{S._free(g)}}function A(S,a){return S===null?a(0):qt(l._api,S,a)}class k{constructor(a,o,i,g,m){if(a!==void 0)if(typeof a=="string"){let f=0;try{f=l._api._MagickColor_Create(),A(a,M=>{if(l._api._MagickColor_Initialize(f,M)===0)throw new z("invalid color specified");this.initialize(f)})}finally{l._api._free(f)}}else this.r=a,this.g=o??0,this.b=i??0,m===void 0?this.a=g??Fe.max:(this.k=g??0,this.a=m,this.isCmyk=!0)}r=0;g=0;b=0;a=0;k=0;isCmyk=!1;static _create(a){const o=new k;return o.initialize(a),o}toShortString(){return this.a!==Fe.max?this.toString():this.isCmyk?`cmyka(${this.r},${this.g},${this.b},${this.k})`:`#${this.toHex(this.r)}${this.toHex(this.g)}${this.toHex(this.b)}`}toString(){return this.isCmyk?`cmyka(${this.r},${this.g},${this.b},${this.k},${(this.a/Fe.max).toFixed(4)})`:`#${this.toHex(this.r)}${this.toHex(this.g)}${this.toHex(this.b)}${this.toHex(this.a)}`}_use(a){let o=0;try{o=l._api._MagickColor_Create(),l._api._MagickColor_Red_Set(o,this.r),l._api._MagickColor_Green_Set(o,this.g),l._api._MagickColor_Blue_Set(o,this.b),l._api._MagickColor_Alpha_Set(o,this.a),l._api._MagickColor_IsCMYK_Set(o,this.isCmyk?1:0),a(o)}finally{l._api._free(o)}}initialize(a){this.r=l._api._MagickColor_Red_Get(a),this.g=l._api._MagickColor_Green_Get(a),this.b=l._api._MagickColor_Blue_Get(a),this.a=l._api._MagickColor_Alpha_Get(a),this.isCmyk=l._api._MagickColor_IsCMYK_Get(a)===1}toHex(a){return a.toString(16).padStart(2,"0")}}var Ie=(S=>(S[S.NoValue=0]="NoValue",S[S.PercentValue=4096]="PercentValue",S[S.IgnoreAspectRatio=8192]="IgnoreAspectRatio",S[S.Less=16384]="Less",S[S.Greater=32768]="Greater",S[S.FillArea=65536]="FillArea",S[S.LimitPixels=131072]="LimitPixels",S[S.AspectRatio=1048576]="AspectRatio",S))(Ie||{});class _e{_includeXyInToString;_width=0;_height=0;_x=0;_y=0;_aspectRatio=!1;_fillArea=!1;_greater=!1;_isPercentage=!1;_ignoreAspectRatio=!1;_less=!1;_limitPixels=!1;constructor(a,o,i,g){if(typeof a=="number"){if(i!==void 0&&g!==void 0?(this._width=i,this._height=g,this._x=a,this._y=o??0,this._includeXyInToString=!0):(this._width=a,this._height=o??this._width,this._x=0,this._y=0,this._includeXyInToString=!1),this._width<0)throw new z("negative width is not allowed");if(this._height<0)throw new z("negative height is not allowed")}else{this._includeXyInToString=a.indexOf("+")>=0||a.indexOf("-")>=0;const m=l._api._MagickGeometry_Create();try{A(a,f=>{const M=l._api._MagickGeometry_Initialize(m,f);if(M===Ie.NoValue)throw new z("invalid geometry specified");this.hasFlag(M,Ie.AspectRatio)?this.initializeFromAspectRation(m,a):this.initialize(m,M)})}finally{l._api._MagickGeometry_Dispose(m)}}}get aspectRatio(){return this._aspectRatio}get fillArea(){return this._fillArea}set fillArea(a){this._fillArea=a}get greater(){return this._greater}set greater(a){this._greater=a}get height(){return this._height}set height(a){this._height=a}get ignoreAspectRatio(){return this._ignoreAspectRatio}set ignoreAspectRatio(a){this._ignoreAspectRatio=a}get isPercentage(){return this._isPercentage}set isPercentage(a){this._isPercentage=a}get less(){return this._less}set less(a){this._less=a}get limitPixels(){return this._limitPixels}set limitPixels(a){this._limitPixels=a}get width(){return this._width}set width(a){this._width=a}get x(){return this._x}set x(a){this._x=a}get y(){return this._y}set y(a){this._y=a}toString(){if(this._aspectRatio)return this._width+":"+this._height;let a="";return this._width==0&&this._height==0?a+="0x0":(this._width>0&&(a+=this._width.toString()),this._height>0?a+="x"+this._height.toString():a+="x"),(this._x!=0||this._y!=0||this._includeXyInToString)&&(this._x>=0&&(a+="+"),a+=this._x,this.y>=0&&(a+="+"),a+=this.y),this._fillArea&&(a+="^"),this._greater&&(a+=">"),this._isPercentage&&(a+="%"),this._ignoreAspectRatio&&(a+="!"),this._less&&(a+="<"),this._limitPixels&&(a+="@"),a}static _fromRectangle(a){if(a===0)throw new z("unable to allocate memory");try{const o=l._api._MagickRectangle_Width_Get(a),i=l._api._MagickRectangle_Height_Get(a),g=l._api._MagickRectangle_X_Get(a),m=l._api._MagickRectangle_Y_Get(a);return new _e(g,m,o,i)}finally{l._api._MagickRectangle_Dispose(a)}}_toRectangle(a){const o=l._api._MagickRectangle_Create();if(o===0)throw new z("unable to allocate memory");try{l._api._MagickRectangle_Width_Set(o,this._width),l._api._MagickRectangle_Height_Set(o,this._height),l._api._MagickRectangle_X_Set(o,this._x),l._api._MagickRectangle_Y_Set(o,this._y),a(o)}finally{l._api._MagickRectangle_Dispose(o)}}initialize(a,o){this._width=l._api._MagickGeometry_Width_Get(a),this._height=l._api._MagickGeometry_Height_Get(a),this._x=l._api._MagickGeometry_X_Get(a),this._y=l._api._MagickGeometry_Y_Get(a),this._ignoreAspectRatio=this.hasFlag(o,Ie.IgnoreAspectRatio),this._isPercentage=this.hasFlag(o,Ie.PercentValue),this._fillArea=this.hasFlag(o,Ie.FillArea),this._greater=this.hasFlag(o,Ie.Greater),this._less=this.hasFlag(o,Ie.Less),this._limitPixels=this.hasFlag(o,Ie.LimitPixels)}initializeFromAspectRation(a,o){this._aspectRatio=!0;const i=o.split(":");this._width=this.parseNumber(i[0]),this._height=this.parseNumber(i[1]),this._x=l._api._MagickGeometry_X_Get(a),this._y=l._api._MagickGeometry_Y_Get(a)}parseNumber(a){let o=0;for(;o<a.length&&!this.isNumber(a[o]);)o++;const i=o;for(;o<a.length&&this.isNumber(a[o]);)o++;return parseInt(a.substr(i,o-i))}isNumber(a){return a>="0"&&a<="9"}hasFlag(a,o){return(a&o)===o}}class ke{constructor(a,o){this.x=a,this.y=o??a}x;y;static _create(a){return a===0?new ke(0,0):new ke(l._api._PointInfo_X_Get(a),l._api._PointInfo_Y_Get(a))}}class wt{constructor(a){this.area=l._api._ConnectedComponent_GetArea(a),this.centroid=ke._create(l._api._ConnectedComponent_GetCentroid(a)),this.color=k._create(l._api._ConnectedComponent_GetColor(a)),this.height=l._api._ConnectedComponent_GetHeight(a),this.id=l._api._ConnectedComponent_GetId(a),this.width=l._api._ConnectedComponent_GetWidth(a),this.x=l._api._ConnectedComponent_GetX(a),this.y=l._api._ConnectedComponent_GetY(a)}area;centroid;color;height;id;width;x;y;static _create(a,o){const i=[];if(a===0)return i;for(let g=0;g<o;g++){const m=l._api._ConnectedComponent_GetInstance(a,g);m===0||l._api._ConnectedComponent_GetArea(m)<Number.EPSILON||i.push(new wt(m))}return i}toGeometry(){return new _e(this.x,this.y,this.width,this.height)}}class Gi{angleThreshold;areaThreshold;circularityThreshold;connectivity;diameterThreshold;eccentricityThreshold;majorAxisThreshold;meanColor;minorAxisThreshold;perimeterThreshold;constructor(a){this.connectivity=a}_setArtifacts(a){this.angleThreshold!==void 0&&a.setArtifact("connected-components:angle-threshold",this.angleThreshold.toString()),this.areaThreshold!==void 0&&a.setArtifact("connected-components:area-threshold",this.areaThreshold.toString()),this.circularityThreshold!==void 0&&a.setArtifact("connected-components:circularity-threshold",this.circularityThreshold.toString()),this.diameterThreshold!==void 0&&a.setArtifact("connected-components:diameter-threshold",this.diameterThreshold.toString()),this.eccentricityThreshold!==void 0&&a.setArtifact("connected-components:eccentricity-threshold",this.eccentricityThreshold.toString()),this.majorAxisThreshold!==void 0&&a.setArtifact("connected-components:major-axis-threshold",this.majorAxisThreshold.toString()),this.meanColor!==void 0&&a.setArtifact("connected-components:mean-color",this.meanColor.toString()),this.minorAxisThreshold!==void 0&&a.setArtifact("connected-components:minor-axis-threshold",this.minorAxisThreshold.toString()),this.perimeterThreshold!==void 0&&a.setArtifact("connected-components:perimeter-threshold",this.perimeterThreshold.toString())}}const xe={Undefined:0,PixelsPerInch:1,PixelsPerCentimeter:2};class Ne{constructor(a,o,i){o===void 0?(this.x=a,this.y=a,this.units=xe.PixelsPerInch):i!==void 0?(this.x=a,this.y=o,this.units=i):(this.x=a,this.y=a,this.units=o)}x;y;units;toString(a){return a==this.units||a===xe.Undefined||a===void 0?Ne.toString(this.x,this.y,a??xe.Undefined):this.units==xe.PixelsPerCentimeter&&a==xe.PixelsPerInch?Ne.toString(this.x*2.54,this.y*2.54,a):Ne.toString(this.x/2.54,this.y/2.54,a)}static toString(a,o,i){let g=`${a}x${o}`;switch(i){case xe.PixelsPerCentimeter:g+="cm";break;case xe.PixelsPerInch:g+="inch";break}return g}}class le{static _disposeAfterExecution(a,o){try{const i=o(a);return i instanceof Promise?Promise.resolve(i).then(g=>(a.dispose(),le.checkResult(a,g),g)):(a.dispose(),le.checkResult(a,i),i)}catch(i){throw a.dispose(),i}}static checkResult(a,o){if(o===a)throw new z("The result of the function cannot be the instance that has been disposed.");return o}}class Ai{_pointer;_bytes;_func;constructor(a,o,i){this._pointer=a,this._func=i,this._bytes=l._api.HEAPU8.subarray(a,a+o)}func(a){return a._bytes===void 0?a._func(new Uint8Array):a._func(a._bytes)}dispose(){this._pointer=l._api._MagickMemory_Relinquish(this._pointer)}}class Le{disposeMethod;instance;constructor(a,o){this.instance=a,this.disposeMethod=o}get _instance(){if(this.instance>0)return this.instance;throw this.instance===-1&&this._instanceNotInitialized(),new z("instance is disposed")}set _instance(a){this.disposeInstance(this.instance),this.instance=a}dispose(){this.instance=this.disposeInstance(this.instance)}_instanceNotInitialized(){throw new z("instance is not initialized")}_setInstance(a,o){return o.check(()=>this.instance===0?!1:(this.dispose(),this.instance=a,!0),()=>(this.disposeInstance(a),!0))}disposeInstance(a){return a>0&&(this.onDispose!==void 0&&this.onDispose(),this.disposeMethod(a)),0}}class _a extends Le{constructor(a){const o=l._api._DrawingSettings_Create(),i=l._api._DrawingSettings_Dispose;if(super(o,i),a.fillColor!==void 0&&a.fillColor._use(g=>{l._api._DrawingSettings_FillColor_Set(this._instance,g)}),a.font!==void 0){const g=we._getFontFileName(a.font);A(g,m=>{l._api._DrawingSettings_Font_Set(this._instance,m)})}a.fontPointsize!==void 0&&l._api._DrawingSettings_FontPointsize_Set(this._instance,a.fontPointsize),a.strokeColor!==void 0&&a.strokeColor._use(g=>{l._api._DrawingSettings_StrokeColor_Set(this._instance,g)}),a.strokeWidth!==void 0&&l._api._DrawingSettings_StrokeWidth_Set(this._instance,a.strokeWidth)}}class It{backgroundColor;fillColor;font;fontPointsize;strokeColor;strokeWidth;static _create(a){const o=new It;return o.fillColor=a.fillColor,o.font=a.font,o.fontPointsize=a.fontPointsize,o.strokeColor=a.strokeColor,o.strokeWidth=a.strokeWidth,o}_use(a){const o=new _a(this);return le._disposeAfterExecution(o,a)}}class Ri{instance;type;constructor(a,o){this.instance=l._api._malloc(a),this.type=o,l._api.setValue(this.instance,0,this.type)}get ptr(){return this.instance}get value(){return l._api.getValue(this.instance,this.type)}}class ye extends Ri{constructor(){super(4,"i32")}static use(a){const o=new ye;try{return a(o)}finally{l._api._free(o.ptr)}}}class b{pointer;constructor(a){this.pointer=a}get ptr(){return this.pointer.ptr}check(a,o){return this.isError()?o():a()}static usePointer(a,o){return ye.use(i=>{const g=a(i.ptr);return b.checkException(i,g,o)})}static use(a,o){return ye.use(i=>{const g=a(new b(i));return b.checkException(i,g,o)})}static checkException(a,o,i){if(!b.isRaised(a))return o;const g=b.getErrorSeverity(a.value);if(g>=vt.Error)b.throw(a,g);else if(i!==void 0){const m=b.createError(a.value,g);i(m)}else b.dispose(a);return o}isError(){return b.isRaised(this.pointer)?b.getErrorSeverity(this.pointer.value)>=vt.Error:!1}static getErrorSeverity(a){return l._api._MagickExceptionHelper_Severity(a)}static isRaised(a){return a.value!==0}static throw(a,o){const i=b.createError(a.value,o);throw b.dispose(a),i}static createError(a,o){const i=b.getMessage(a),g=new z(i,o),m=l._api._MagickExceptionHelper_RelatedCount(a);if(m===0)return g;const f=[];for(let M=0;M<m;M++){const y=l._api._MagickExceptionHelper_Related(a,M),F=b.getErrorSeverity(y),N=b.createError(y,F);f.push(N)}return g._setRelatedErrors(f),g}static getMessage(a){const o=l._api._MagickExceptionHelper_Message(a),i=l._api._MagickExceptionHelper_Description(a);let g=ge(o,"Unknown error");return i!==0&&(g+=`(${l._api.UTF8ToString(i)})`),g}static dispose(a){l._api._MagickExceptionHelper_Dispose(a.value)}}class yt{constructor(a,o,i,g,m,f,M){this.ascent=a,this.descent=o,this.maxHorizontalAdvance=i,this.textHeight=g,this.textWidth=m,this.underlinePosition=f,this.underlineThickness=M}ascent;descent;maxHorizontalAdvance;textHeight;textWidth;underlinePosition;underlineThickness;static _create(a){if(a==0)return null;try{const o=l._api._TypeMetric_Ascent_Get(a),i=l._api._TypeMetric_Descent_Get(a),g=l._api._TypeMetric_MaxHorizontalAdvance_Get(a),m=l._api._TypeMetric_TextHeight_Get(a),f=l._api._TypeMetric_TextWidth_Get(a),M=l._api._TypeMetric_UnderlinePosition_Get(a),y=l._api._TypeMetric_UnderlineThickness_Get(a);return new yt(o,i,g,m,f,M,y)}finally{l._api._TypeMetric_Dispose(a)}}}class st extends Le{constructor(a,o){const g=It._create(o)._use(f=>l._api._DrawingWand_Create(a._instance,f._instance)),m=l._api._DrawingWand_Dispose;super(g,m)}color(a,o,i){b.usePointer(g=>{l._api._DrawingWand_Color(this._instance,a,o,i,g)})}draw(a){a.forEach(o=>{o.draw(this)}),b.usePointer(o=>{l._api._DrawingWand_Render(this._instance,o)})}fillColor(a){b.usePointer(o=>{a._use(i=>{l._api._DrawingWand_FillColor(this._instance,i,o)})})}fillOpacity(a){b.usePointer(o=>{l._api._DrawingWand_FillOpacity(this._instance,a,o)})}font(a){b.usePointer(o=>{A(a,i=>{l._api._DrawingWand_Font(this._instance,i,o)})})}fontPointSize(a){b.usePointer(o=>{l._api._DrawingWand_FontPointSize(this._instance,a,o)})}fontTypeMetrics(a,o){return b.usePointer(i=>A(a,g=>{const m=l._api._DrawingWand_FontTypeMetrics(this._instance,g,o?1:0,i);return yt._create(m)}))}gravity(a){b.usePointer(o=>{l._api._DrawingWand_Gravity(this._instance,a,o)})}line(a,o,i,g){b.usePointer(m=>{l._api._DrawingWand_Line(this._instance,a,o,i,g,m)})}point(a,o){b.usePointer(i=>{l._api._DrawingWand_Point(this._instance,a,o,i)})}rectangle(a,o,i,g){b.usePointer(m=>{l._api._DrawingWand_Rectangle(this._instance,a,o,i,g,m)})}roundRectangle(a,o,i,g,m,f){b.usePointer(M=>{l._api._DrawingWand_RoundRectangle(this._instance,a,o,i,g,m,f,M)})}strokeColor(a){b.usePointer(o=>{a._use(i=>{l._api._DrawingWand_StrokeColor(this._instance,i,o)})})}strokeWidth(a){b.usePointer(o=>{l._api._DrawingWand_StrokeWidth(this._instance,a,o)})}text(a,o,i){b.usePointer(g=>{A(i,m=>{l._api._DrawingWand_Text(this._instance,a,o,m,g)})})}textAlignment(a){b.usePointer(o=>{l._api._DrawingWand_TextAlignment(this._instance,a,o)})}textAntialias(a){b.usePointer(o=>{l._api._DrawingWand_TextAntialias(this._instance,a?1:0,o)})}textDecoration(a){b.usePointer(o=>{l._api._DrawingWand_TextDecoration(this._instance,a,o)})}textInterlineSpacing(a){b.usePointer(o=>{l._api._DrawingWand_TextInterlineSpacing(this._instance,a,o)})}textInterwordspacing(a){b.usePointer(o=>{l._api._DrawingWand_TextInterwordSpacing(this._instance,a,o)})}textKerning(a){b.usePointer(o=>{l._api._DrawingWand_TextKerning(this._instance,a,o)})}textUnderColor(a){b.usePointer(o=>{a._use(i=>{l._api._DrawingWand_TextUnderColor(this._instance,i,o)})})}static _use(a,o){const i=new st(a,a.settings);return le._disposeAfterExecution(i,o)}}class Ot extends Ri{constructor(){super(8,"double")}static use(a){const o=new Ot;try{return a(o)}finally{l._api._free(o.ptr)}}}const ue={Undefined:0,Forget:0,Northwest:1,North:2,Northeast:3,West:4,Center:5,East:6,Southwest:7,South:8,Southeast:9};function*Fi(S){for(const a of S)switch(a){case ue.North:yield"north";break;case ue.Northeast:yield"north",yield"east";break;case ue.Northwest:yield"north",yield"west";break;case ue.East:yield"east";break;case ue.West:yield"west";break;case ue.South:yield"south";break;case ue.Southeast:yield"south",yield"east";break;case ue.Southwest:yield"south",yield"west"}}class _t{constructor(a,o,i){this.meanErrorPerPixel=a,this.normalizedMeanError=o,this.normalizedMaximumError=i}meanErrorPerPixel;normalizedMaximumError;normalizedMeanError;static _create(a){const o=l._api._MagickImage_MeanErrorPerPixel_Get(a._instance),i=l._api._MagickImage_NormalizedMeanError_Get(a._instance),g=l._api._MagickImage_NormalizedMaximumError_Get(a._instance);return new _t(o,i,g)}}const Ce={Unknown:"UNKNOWN",ThreeFr:"3FR",ThreeG2:"3G2",ThreeGp:"3GP",A:"A",Aai:"AAI",Ai:"AI",APng:"APNG",Art:"ART",Arw:"ARW",Ashlar:"ASHLAR",Avci:"AVCI",Avi:"AVI",Avif:"AVIF",Avs:"AVS",B:"B",Bayer:"BAYER",Bayera:"BAYERA",Bgr:"BGR",Bgra:"BGRA",Bgro:"BGRO",Bmp:"BMP",Bmp2:"BMP2",Bmp3:"BMP3",Brf:"BRF",C:"C",Cal:"CAL",Cals:"CALS",Canvas:"CANVAS",Caption:"CAPTION",Cin:"CIN",Cip:"CIP",Clip:"CLIP",Cmyk:"CMYK",Cmyka:"CMYKA",Cr2:"CR2",Cr3:"CR3",Crw:"CRW",Cube:"CUBE",Cur:"CUR",Cut:"CUT",Data:"DATA",Dcm:"DCM",Dcr:"DCR",Dcraw:"DCRAW",Dcx:"DCX",Dds:"DDS",Dfont:"DFONT",Dng:"DNG",Dpx:"DPX",Dxt1:"DXT1",Dxt5:"DXT5",Epdf:"EPDF",Epi:"EPI",Eps:"EPS",Eps2:"EPS2",Eps3:"EPS3",Epsf:"EPSF",Epsi:"EPSI",Ept:"EPT",Ept2:"EPT2",Ept3:"EPT3",Erf:"ERF",Exr:"EXR",Farbfeld:"FARBFELD",Fax:"FAX",Ff:"FF",Fff:"FFF",File:"FILE",Fits:"FITS",Fl32:"FL32",Flv:"FLV",Fractal:"FRACTAL",Ftp:"FTP",Fts:"FTS",Ftxt:"FTXT",G:"G",G3:"G3",G4:"G4",Gif:"GIF",Gif87:"GIF87",Gradient:"GRADIENT",Gray:"GRAY",Graya:"GRAYA",Group4:"GROUP4",Hald:"HALD",Hdr:"HDR",Heic:"HEIC",Heif:"HEIF",Histogram:"HISTOGRAM",Hrz:"HRZ",Htm:"HTM",Html:"HTML",Http:"HTTP",Https:"HTTPS",Icb:"ICB",Ico:"ICO",Icon:"ICON",Iiq:"IIQ",Info:"INFO",Inline:"INLINE",Ipl:"IPL",Isobrl:"ISOBRL",Isobrl6:"ISOBRL6",J2c:"J2C",J2k:"J2K",Jng:"JNG",Jnx:"JNX",Jp2:"JP2",Jpc:"JPC",Jpe:"JPE",Jpeg:"JPEG",Jpg:"JPG",Jpm:"JPM",Jps:"JPS",Jpt:"JPT",Json:"JSON",Jxl:"JXL",K:"K",K25:"K25",Kdc:"KDC",Label:"LABEL",M:"M",M2v:"M2V",M4v:"M4V",Mac:"MAC",Map:"MAP",Mask:"MASK",Mat:"MAT",Matte:"MATTE",Mdc:"MDC",Mef:"MEF",Miff:"MIFF",Mkv:"MKV",Mng:"MNG",Mono:"MONO",Mov:"MOV",Mos:"MOS",Mp4:"MP4",Mpc:"MPC",Mpeg:"MPEG",Mpg:"MPG",Mpo:"MPO",Mrw:"MRW",Msl:"MSL",Msvg:"MSVG",Mtv:"MTV",Mvg:"MVG",Nef:"NEF",Nrw:"NRW",Null:"NULL",O:"O",Ora:"ORA",Orf:"ORF",Otb:"OTB",Otf:"OTF",Pal:"PAL",Palm:"PALM",Pam:"PAM",Pango:"PANGO",Pattern:"PATTERN",Pbm:"PBM",Pcd:"PCD",Pcds:"PCDS",Pcl:"PCL",Pct:"PCT",Pcx:"PCX",Pdb:"PDB",Pdf:"PDF",Pdfa:"PDFA",Pef:"PEF",Pes:"PES",Pfa:"PFA",Pfb:"PFB",Pfm:"PFM",Pgm:"PGM",Pgx:"PGX",Phm:"PHM",Picon:"PICON",Pict:"PICT",Pix:"PIX",Pjpeg:"PJPEG",Plasma:"PLASMA",Png:"PNG",Png00:"PNG00",Png24:"PNG24",Png32:"PNG32",Png48:"PNG48",Png64:"PNG64",Png8:"PNG8",Pnm:"PNM",Pocketmod:"POCKETMOD",Ppm:"PPM",Ps:"PS",Ps2:"PS2",Ps3:"PS3",Psb:"PSB",Psd:"PSD",Ptif:"PTIF",Pwp:"PWP",Qoi:"QOI",R:"R",RadialGradient:"RADIAL-GRADIENT",Raf:"RAF",Ras:"RAS",Raw:"RAW",Rgb:"RGB",Rgb565:"RGB565",Rgba:"RGBA",Rgbo:"RGBO",Rgf:"RGF",Rla:"RLA",Rle:"RLE",Rmf:"RMF",Rw2:"RW2",Rwl:"RWL",Scr:"SCR",Screenshot:"SCREENSHOT",Sct:"SCT",Sfw:"SFW",Sgi:"SGI",Shtml:"SHTML",Six:"SIX",Sixel:"SIXEL",SparseColor:"SPARSE-COLOR",Sr2:"SR2",Srf:"SRF",Srw:"SRW",Stegano:"STEGANO",Sti:"STI",StrImg:"STRIMG",Sun:"SUN",Svg:"SVG",Svgz:"SVGZ",Text:"TEXT",Tga:"TGA",Thumbnail:"THUMBNAIL",Tif:"TIF",Tiff:"TIFF",Tiff64:"TIFF64",Tile:"TILE",Tim:"TIM",Tm2:"TM2",Ttc:"TTC",Ttf:"TTF",Txt:"TXT",Ubrl:"UBRL",Ubrl6:"UBRL6",Uil:"UIL",Uyvy:"UYVY",Vda:"VDA",Vicar:"VICAR",Vid:"VID",Viff:"VIFF",Vips:"VIPS",Vst:"VST",WebM:"WEBM",WebP:"WEBP",Wbmp:"WBMP",Wmv:"WMV",Wpg:"WPG",X3f:"X3F",Xbm:"XBM",Xc:"XC",Xcf:"XCF",Xpm:"XPM",Xps:"XPS",Xv:"XV",Y:"Y",Yaml:"YAML",Ycbcr:"YCBCR",Ycbcra:"YCBCRA",Yuv:"YUV"},Ct={Merge:13,Flatten:14,Mosaic:15,Trimbounds:16};class xi extends Le{constructor(a){const o=l._api._MagickSettings_Create(),i=l._api._MagickSettings_Dispose;if(super(o,i),a._fileName!==void 0&&A(a._fileName,g=>{l._api._MagickSettings_SetFileName(this._instance,g)}),a._ping&&l._api._MagickSettings_SetPing(this._instance,1),a._quality!==void 0&&l._api._MagickSettings_SetQuality(this._instance,a._quality),a.antiAlias!==void 0&&l._api._MagickSettings_AntiAlias_Set(this._instance,a.antiAlias?1:0),a.backgroundColor!==void 0&&a.backgroundColor._use(g=>{l._api._MagickSettings_BackgroundColor_Set(this._instance,g)}),a.colorSpace!==void 0&&l._api._MagickSettings_ColorSpace_Set(this._instance,a.colorSpace),a.colorType!==void 0&&l._api._MagickSettings_ColorType_Set(this._instance,a.colorType),a.compression!==void 0&&l._api._MagickSettings_Compression_Set(this._instance,a.compression),a.debug!==void 0&&l._api._MagickSettings_Debug_Set(this._instance,a.debug?1:0),a.density!==void 0){const g=a.density.toString();A(g,m=>{l._api._MagickSettings_Density_Set(this._instance,m)})}if(a.depth!==void 0&&l._api._MagickSettings_Depth_Set(this._instance,a.depth),a.endian!==void 0&&l._api._MagickSettings_Endian_Set(this._instance,a.endian),a.fillColor!==void 0&&this.setOption("fill",a.fillColor.toString()),a.font!==void 0){const g=we._getFontFileName(a.font);A(g,m=>{l._api._MagickSettings_SetFont(this._instance,m)})}a.fontPointsize!==void 0&&l._api._MagickSettings_FontPointsize_Set(this._instance,a.fontPointsize),a.format!==void 0&&A(a.format,g=>{l._api._MagickSettings_Format_Set(this._instance,g)}),a.interlace!==void 0&&l._api._MagickSettings_Interlace_Set(this._instance,a.interlace),a.strokeColor!==void 0&&this.setOption("stroke",a.strokeColor.toString()),a.strokeWidth!==void 0&&this.setOption("strokeWidth",a.strokeWidth.toString()),a.textInterlineSpacing!==void 0&&this.setOption("interline-spacing",a.textInterlineSpacing.toString()),a.textKerning!==void 0&&this.setOption("kerning",a.textKerning.toString());for(const g in a._options)this.setOption(g,a._options[g])}setOption(a,o){A(a,i=>{A(o,g=>{l._api._MagickSettings_SetOption(this._instance,i,g)})})}}class Oe{_options={};_fileName;_ping=!1;_quality;antiAlias;backgroundColor;colorSpace;colorType;compression;debug;density;depth;endian;fillColor;font;fontPointsize;format;interlace;strokeColor;strokeWidth;textInterlineSpacing;textKerning;getDefine(a,o){return o!==void 0?this._options[`${a}:${o}`]??null:this._options[a]??null}setDefine(a,o,i){if(i===void 0)this._options[a]=o;else{const g=this.parseDefine(a,o);typeof i=="string"?this._options[g]=i:typeof i=="number"?this._options[g]=i.toString():this._options[g]=i?"true":"false"}}setDefines(a){a.getDefines().forEach(o=>{o!==void 0&&this.setDefine(o.format,o.name,o.value)})}_clone(){const a=new Oe;return Object.assign(a,this),a}_use(a){const o=new xi(this);return le._disposeAfterExecution(o,a)}parseDefine(a,o){return a===Ce.Unknown?o:`${a}:${o}`}}class Se extends Oe{constructor(a){super(),Object.assign(this,a)}extractArea;frameIndex;frameCount;height;get syncImageWithExifProfile(){const a=this.getDefine("exif:sync-image");return a===null?!0:a.toLowerCase()==="true"}set syncImageWithExifProfile(a){this.setDefine("exif:sync-image",a.toString())}get syncImageWithTiffProperties(){const a=this.getDefine("tiff:sync-image");return a===null?!0:a.toLowerCase()==="true"}set syncImageWithTiffProperties(a){this.setDefine("tiff:sync-image",a.toString())}width;_use(a){const o=new xi(this),i=this.getSize();if(i!==""&&A(i,g=>{l._api._MagickSettings_SetSize(o._instance,g)}),this.frameIndex!==void 0||this.frameCount!==void 0){const g=this.frameIndex??0,m=this.frameCount??1;l._api._MagickSettings_SetScene(o._instance,g),l._api._MagickSettings_SetNumberScenes(o._instance,m);const f=this.frameCount!==void 0?`${g}-${g+m}`:g.toString();A(f.toString(),M=>{l._api._MagickSettings_SetScenes(o._instance,M)})}return this.extractArea!==void 0&&A(this.extractArea.toString(),g=>{l._api._MagickSettings_Extract_Set(o._instance,g)}),le._disposeAfterExecution(o,a)}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}`:""}}const Qt={Undefined:0,No:1,Riemersma:2,FloydSteinberg:3};class ca extends Le{constructor(a){const o=l._api._QuantizeSettings_Create(),i=l._api._QuantizeSettings_Dispose;super(o,i),l._api._QuantizeSettings_SetColors(this._instance,a.colors),l._api._QuantizeSettings_SetColorSpace(this._instance,a.colorSpace),l._api._QuantizeSettings_SetDitherMethod(this._instance,a.ditherMethod??Qt.No),l._api._QuantizeSettings_SetMeasureErrors(this._instance,a.measureErrors?1:0),l._api._QuantizeSettings_SetTreeDepth(this._instance,a.treeDepth)}}class Dt{constructor(){this.colors=256,this.colorSpace=T.Undefined,this.ditherMethod=Qt.Riemersma,this.measureErrors=!1,this.treeDepth=0}colors;colorSpace;ditherMethod;measureErrors;treeDepth;_use(a){const o=new ca(this);return le._disposeAfterExecution(o,a)}}class De{_image;_names=[];constructor(a){this._image=a}setArtifact(a,o){this._names.push(a),this._image.setArtifact(a,o)}static use(a,o){const i=new De(a);try{return o(i)}finally{i.dispose()}}dispose(){for(const a of this._names)this._image.removeArtifact(a)}}function Li(S,a){if(S.byteLength===0)throw new z("The specified array cannot be empty");let o=0;try{return o=l._api._malloc(S.byteLength),l._api.HEAPU8.set(S,o),a(o)}finally{o!==0&&l._api._free(o)}}function Wi(S,a){if(S.length===0)throw new z("The specified array cannot be empty");const o=S.length*8;let i=0;try{i=l._api._malloc(o);const g=new ArrayBuffer(o),m=new Float64Array(g);for(let f=0;f<S.length;f++)m[f]=S[f];return l._api.HEAPU8.set(new Int8Array(g),i),a(i)}finally{i!==0&&l._api._free(i)}}function la(S,a){if(S.byteLength===0)throw new z("The specified array cannot be empty");let o=0;try{return o=l._api._malloc(S.byteLength),l._api.HEAPU8.set(S,o),a(o)}finally{o!==0&&l._api._free(o)}}class ve extends Array{constructor(){super()}static create(a){const o=ve.createObject();return a!==void 0&&o.read(a),o}dispose(){let a=this.pop();for(;a!==void 0;)a.dispose(),a=this.pop()}appendHorizontally(a){return this.createImage((o,i)=>l._api._MagickImageCollection_Append(o,0,i.ptr),a)}appendVertically(a){return this.createImage((o,i)=>l._api._MagickImageCollection_Append(o,1,i.ptr),a)}clone(a){const o=ve.create();for(let i=0;i<this.length;i++)o.push(te._clone(this[i]));return o._use(a)}coalesce(){this.replaceImages((a,o)=>l._api._MagickImageCollection_Coalesce(a,o.ptr))}combine(a,o){let i=o,g=T.sRGB;return typeof a=="number"?g=a:i=a,this.createImage((m,f)=>l._api._MagickImageCollection_Combine(m,g,f.ptr),i)}complex(a,o){return De.use(this[0],i=>(a._setArtifacts(i),this.createImage((g,m)=>l._api._MagickImageCollection_Complex(g,a.complexOperator,m.ptr),o)))}deconstruct(){this.replaceImages((a,o)=>l._api._MagickImageCollection_Deconstruct(a,o.ptr))}evaluate(a,o){return this.createImage((i,g)=>l._api._MagickImageCollection_Evaluate(i,a,g.ptr),o)}flatten(a){return this.mergeImages(Ct.Flatten,a)}fx(a,o,i){this.throwIfEmpty();let g=X.All,m=i;return typeof o=="number"?g=o:m=o,A(a,f=>this.createImage((M,y)=>l._api._MagickImageCollection_Fx(M,f,g,y.ptr),m))}merge(a){return this.mergeImages(Ct.Merge,a)}montage(a,o){return this.throwIfEmpty(),this.attachImages(i=>{const g=a._use(m=>b.use(f=>{const M=l._api._MagickImageCollection_Montage(i,m._instance,f.ptr);return this.checkResult(M,f)}));return ve._createFromImages(g,this.getSettings())._use(m=>{const f=a.transparentColor;return f!==void 0&&m.forEach(M=>{M.transparent(f)}),m.merge(o)})})}morph(a){if(this.length<2)throw new z("operation requires at least two images");this.replaceImages((o,i)=>l._api._MagickImageCollection_Morph(o,a,i.ptr))}mosaic(a){return this.mergeImages(Ct.Mosaic,a)}optimize(){this.replaceImages((a,o)=>l._api._MagickImageCollection_Optimize(a,o.ptr))}optimizePlus(){this.replaceImages((a,o)=>l._api._MagickImageCollection_OptimizePlus(a,o.ptr))}optimizeTransparency(){this.throwIfEmpty(),this.attachImages(a=>{b.usePointer(o=>{l._api._MagickImageCollection_OptimizeTransparency(a,o)})})}ping(a,o){this.readOrPing(!0,a,o)}polynomial(a,o){return this.createImage((i,g)=>Wi(a,m=>l._api._MagickImageCollection_Polynomial(i,m,a.length,g.ptr)),o)}quantize(a){this.throwIfEmpty();const o=a===void 0?new Dt:a;return this.attachImages(i=>{o._use(g=>{b.usePointer(m=>{l._api._MagickImageCollection_Quantize(i,g._instance,m)})})}),o.measureErrors?_t._create(this[0]):null}read(a,o){this.readOrPing(!1,a,o)}remap(a,o){this.throwIfEmpty();const i=o===void 0?new Dt:o;this.attachImages(g=>{i._use(m=>{b.use(f=>{l._api._MagickImageCollection_Remap(g,m._instance,a._instance,f.ptr)})})})}resetPage(){this.forEach(a=>{a.resetPage()})}smushHorizontal(a,o){return this.smush(a,!1,o)}smushVertical(a,o){return this.smush(a,!0,o)}trimBounds(){this.mergeImages(Ct.Trimbounds,()=>{})}write(a,o){this.throwIfEmpty();let i=0,g=0;const m=this[0],f=this.getSettings();o!==void 0?f.format=a:(o=a,f.format=m.format),b.use(y=>{ye.use(F=>{f._use(N=>{this.attachImages(ee=>{i=l._api._MagickImage_WriteBlob(ee,N._instance,F.ptr,y.ptr),g=F.value})})})});const M=new Ai(i,g,o);return le._disposeAfterExecution(M,M.func)}static _createFromImages(a,o){const i=ve.createObject();return i.addImages(a,o._clone()),i}_use(a){return le._disposeAfterExecution(this,a)}addImages(a,o){o.format=Ce.Unknown;let i=a;for(;i!==0;){const g=l._api._MagickImage_GetNext(i);l._api._MagickImage_SetNext(i,0),this.push(te._createFromImage(i,o)),i=g}}attachImages(a){try{for(let o=0;o<this.length-1;o++)l._api._MagickImage_SetNext(this[o]._instance,this[o+1]._instance);return a(this[0]._instance)}finally{for(let o=0;o<this.length-1;o++)l._api._MagickImage_SetNext(this[o]._instance,0)}}checkResult(a,o){return o.check(()=>a,()=>(l._api._MagickImageCollection_Dispose(a),0))}static createObject(){return Object.create(ve.prototype)}createImage(a,o){this.throwIfEmpty();const i=this.attachImages(m=>b.use(f=>{const M=a(m,f);return this.checkResult(M,f)}));return te._createFromImage(i,this.getSettings())._use(o)}getSettings(){return this[0]._getSettings()._clone()}mergeImages(a,o){return this.createImage((i,g)=>l._api._MagickImageCollection_Merge(i,a,g.ptr),o)}readOrPing(a,o,i){this.dispose(),b.use(g=>{const m=i===void 0?new Se:new Se(i);m._ping=a,typeof o=="string"?(m._fileName=o,m._use(f=>{const M=l._api._MagickImageCollection_ReadFile(f._instance,g.ptr);this.addImages(M,m)})):m._use(f=>{const M=o.byteLength;let y=0;try{y=l._api._malloc(M),l._api.HEAPU8.set(o,y);const F=l._api._MagickImageCollection_ReadBlob(f._instance,y,0,M,g.ptr);this.addImages(F,m)}finally{y!==0&&l._api._free(y)}})})}replaceImages(a){this.throwIfEmpty();const o=this.attachImages(g=>b.use(m=>{const f=a(g,m);return this.checkResult(f,m)})),i=this.getSettings()._clone();this.dispose(),this.addImages(o,i)}smush(a,o,i){return this.createImage((g,m)=>l._api._MagickImageCollection_Smush(g,a,o?1:0,m.ptr),i)}throwIfEmpty(){if(this.length===0)throw new z("operation requires at least one image")}}class Z{_value;constructor(a){this._value=a}static _fromQuantum(a){return new Z(a/Fe.max*100)}multiply(a){return a*this._value/100}toDouble(){return this._value}toString(){return`${parseFloat(this._value.toFixed(2))}%`}_toQuantum(){return Fe.max*(this._value/100)}}class Bi{static use(a,o,i){const g=l._api._MagickRectangle_Create();try{l._api._MagickRectangle_X_Set(g,o.x),l._api._MagickRectangle_Y_Set(g,o.y);let m=o.width,f=o.height;return o.isPercentage&&(m=new Z(o.width).multiply(a.width),f=new Z(o.height).multiply(a.height)),l._api._MagickRectangle_Width_Set(g,m),l._api._MagickRectangle_Height_Set(g,f),i(g)}finally{l._api._MagickRectangle_Dispose(g)}}}class zi{_values;constructor(){this._values=new Array(7).fill(0)}get(a){return this._values[a]}set(a,o){this._values[a]=o}}class He{_huPhashes=new Map;_hash="";channel;constructor(a,o,i){if(this.channel=a,typeof i=="number")for(let g=0;g<o.length;g++){const m=new zi;for(let f=0;f<7;f++){const M=l._api._ChannelPerceptualHash_GetHuPhash(i,g,f);m.set(f,M)}this._huPhashes.set(o[g],m)}else this.parseHash(o,i)}huPhash(a,o){if(o<0||o>6)throw new z("Invalid index specified");const i=this._huPhashes.get(a);if(i===void 0)throw new z("Invalid color space specified");return i.get(o)}sumSquaredDistance(a){let o=0;return this._huPhashes.forEach((i,g)=>{for(let m=0;m<7;m++){const f=i.get(m),M=a.huPhash(g,m);o+=(f-M)*(f-M)}}),o}toString(){return this._hash==""&&this.setHash(),this._hash}parseHash(a,o){this._hash=o;let i=0;for(const g of a){const m=new zi;for(let f=0;f<7;f++,i+=5){const M=Number.parseInt(o.substring(i,i+5),16);if(isNaN(M))throw new z("Invalid hash specified");let y=M/He.powerOfTen(M>>17);M&65536&&(y=-y),m.set(f,y)}this._huPhashes.set(g,m)}}static powerOfTen(a){switch(a){case 2:return 100;case 3:return 1e3;case 4:return 1e4;case 5:return 1e5;case 6:return 1e6;default:return 10}}setHash(){this._hash="",this._huPhashes.forEach(a=>{for(let o=0;o<7;o++){let i=a.get(o),g=0;for(;g<7&&Math.abs(i*10)<65356;)i*=10,g++;g<<=1,g<0&&(g|=1),g=(g<<16)+Math.floor(i<0?-(i-.5):i+.5),this._hash+=g.toString(16)}})}}class fe{_red;_green;_blue;constructor(a,o,i){if(typeof a=="string"){const g=o??fe._defaultColorspaces();fe._validateColorSpaces(g);const m=35*g.length;if(a.length!==3*m)throw new z("Invalid hash size");this._red=new He(L.Red,g,a.substring(0,m)),this._blue=new He(L.Blue,g,a.substring(m,m+m)),this._green=new He(L.Green,g,a.substring(m+m))}else this._red=a,this._green=o,this._blue=i}static _create(a,o,i){if(i===0)throw new z("The native operation failed to create an instance");const g=fe.createChannel(a,o,i,L.Red),m=fe.createChannel(a,o,i,L.Green),f=fe.createChannel(a,o,i,L.Blue);return new fe(g,m,f)}static _defaultColorspaces(){return[T.XyY,T.HSB]}static _validateColorSpaces(a){if(a.length<1||a.length>6)throw new z("Invalid number of colorspaces, the minimum is 1 and the maximum is 6");if(new Set(a).size!==a.length)throw new z("Specifying the same colorspace more than once is not allowed")}getChannel(a){switch(a){case L.Red:return this._red;case L.Green:return this._green;case L.Blue:return this._blue;default:return null}}sumSquaredDistance(a){const o=a.getChannel(L.Red),i=a.getChannel(L.Green),g=a.getChannel(L.Blue);if(o===null||i===null||g===null)throw new z("The other perceptual hash should contain a red, green and blue channel.");return this._red.sumSquaredDistance(o)+this._green.sumSquaredDistance(i)+this._blue.sumSquaredDistance(g)}toString(){return this._red.toString()+this._green.toString()+this._blue.toString()}static createChannel(a,o,i,g){const m=l._api._PerceptualHash_GetInstance(a._instance,i,g);return new He(g,o,m)}}class $e extends Le{image;constructor(a){const o=b.usePointer(g=>l._api._PixelCollection_Create(a._instance,g)),i=l._api._PixelCollection_Dispose;super(o,i),this.image=a}static _create(a){return new $e(a)}static _use(a,o){const i=new $e(a);return le._disposeAfterExecution(i,o)}static _map(a,o,i){const g=new $e(a);try{g.use(0,0,a.width,a.height,o,m=>{i(m)})}finally{g.dispose()}}getArea(a,o,i,g){return b.usePointer(m=>{const f=l._api._PixelCollection_GetArea(this._instance,a,o,i,g,m),M=i*g*this.image.channelCount;return l._api.HEAPU8.subarray(f,f+M)})}getPixel(a,o){return this.getArea(a,o,1,1)}setArea(a,o,i,g,m){b.usePointer(f=>{const M=m instanceof Uint8Array?m:new Uint8Array(m);la(M,y=>{l._api._PixelCollection_SetArea(this._instance,a,o,i,g,y,M.length,f)})})}setPixel(a,o,i){i instanceof Uint8Array?this.setArea(a,o,1,1,i):this.setArea(a,o,1,1,i)}toByteArray(a,o,i,g,m){return this.use(a,o,i,g,m,f=>{if(f===0)return null;const M=i*g*m.length;return l._api.HEAPU8.slice(f,f+M)})}use(a,o,i,g,m,f){return A(m,M=>b.use(y=>{let F=l._api._PixelCollection_ToByteArray(this._instance,a,o,i,g,M,y.ptr);return y.check(()=>{const N=f(F);return F=l._api._MagickMemory_Relinquish(F),N},()=>(F=l._api._MagickMemory_Relinquish(F),null))}))}}const Ni={Undefined:0,Average:1,Brightness:2,Lightness:3,MS:4,Rec601Luma:5,Rec601Luminance:6,Rec709Luma:7,Rec709Luminance:8,RMS:9};class We{constructor(a,o,i){this.x=a,this.y=o,this.z=i}x;y;z;static _create(a){return a===0?new We(0,0,0):new We(l._api._PrimaryInfo_X_Get(a),l._api._PrimaryInfo_Y_Get(a),l._api._PrimaryInfo_Z_Get(a))}_use(a){let o=0;try{o=l._api._PrimaryInfo_Create(),l._api._PrimaryInfo_X_Set(o,this.x),l._api._PrimaryInfo_Y_Set(o,this.y),l._api._PrimaryInfo_Z_Set(o,this.z),a(o)}finally{l._api._free(o)}}}class Hi{channel;depth;entropy;kurtosis;maximum;mean;minimum;skewness;standardDeviation;constructor(a,o){this.channel=a,this.depth=l._api._ChannelStatistics_Depth_Get(o),this.entropy=l._api._ChannelStatistics_Entropy_Get(o),this.kurtosis=l._api._ChannelStatistics_Kurtosis_Get(o),this.maximum=l._api._ChannelStatistics_Maximum_Get(o),this.mean=l._api._ChannelStatistics_Mean_Get(o),this.minimum=l._api._ChannelStatistics_Minimum_Get(o),this.skewness=l._api._ChannelStatistics_Skewness_Get(o),this.standardDeviation=l._api._ChannelStatistics_StandardDeviation_Get(o)}}class Pt{_channels=new Map;get channels(){return Array.from(this._channels.keys())}composite(){return this._channels.get(L.Composite)}getChannel(a){const o=this._channels.get(a);return o!==void 0?o:null}static _create(a,o,i){const g=new Pt;return a.channels.forEach(m=>{i>>m&1&&g.addChannel(o,m)}),g.addChannel(o,L.Composite),g}addChannel(a,o){const i=l._api._Statistics_GetInstance(a,o);i!==0&&this._channels.set(o,new Hi(o,i))}}class ga{static toArray(a){if(a===0)return null;const o=l._api._StringInfo_Datum_Get(a),i=l._api._StringInfo_Length_Get(a);return l._api.HEAPU8.subarray(o,o+i)}}class Kt{constructor(a){this.error=a}error}class te extends Le{_settings;_progress;_warning;constructor(a,o){super(a,l._api._MagickImage_Dispose),this._settings=o}get animationDelay(){return l._api._MagickImage_AnimationDelay_Get(this._instance)}set animationDelay(a){l._api._MagickImage_AnimationDelay_Set(this._instance,a)}get animationIterations(){return l._api._MagickImage_AnimationIterations_Get(this._instance)}set animationIterations(a){l._api._MagickImage_AnimationIterations_Set(this._instance,a)}get animationTicksPerSecond(){return l._api._MagickImage_AnimationTicksPerSecond_Get(this._instance)}set animationTicksPerSecond(a){l._api._MagickImage_AnimationTicksPerSecond_Set(this._instance,a)}get artifactNames(){const a=[];l._api._MagickImage_ResetArtifactIterator(this._instance);let o=l._api._MagickImage_GetNextArtifactName(this._instance);for(;o!==0;)a.push(l._api.UTF8ToString(o)),o=l._api._MagickImage_GetNextArtifactName(this._instance);return a}get attributeNames(){const a=[];l._api._MagickImage_ResetAttributeIterator(this._instance);let o=l._api._MagickImage_GetNextAttributeName(this._instance);for(;o!==0;)a.push(l._api.UTF8ToString(o)),o=l._api._MagickImage_GetNextAttributeName(this._instance);return a}get backgroundColor(){const a=l._api._MagickImage_BackgroundColor_Get(this._instance);return k._create(a)}set backgroundColor(a){a._use(o=>{l._api._MagickImage_BackgroundColor_Set(this._instance,o)})}get baseHeight(){return l._api._MagickImage_BaseHeight_Get(this._instance)}get baseWidth(){return l._api._MagickImage_BaseWidth_Get(this._instance)}get blackPointCompensation(){return l._api._MagickImage_BlackPointCompensation_Get(this._instance)===1}set blackPointCompensation(a){l._api._MagickImage_BlackPointCompensation_Set(this._instance,a?1:0)}get borderColor(){const a=l._api._MagickImage_BorderColor_Get(this._instance);return k._create(a)}set borderColor(a){a._use(o=>{l._api._MagickImage_BorderColor_Set(this._instance,o)})}get boundingBox(){return this.useExceptionPointer(a=>{const o=l._api._MagickImage_BoundingBox_Get(this._instance,a),i=_e._fromRectangle(o);return i.width===0||i.height===0?null:i})}get channelCount(){return l._api._MagickImage_ChannelCount_Get(this._instance)}get channels(){const a=[];return[L.Red,L.Green,L.Blue,L.Black,L.Alpha].forEach(o=>{l._api._MagickImage_HasChannel(this._instance,o)&&a.push(o)}),a}get chromaticity(){return new Ei(We._create(l._api._MagickImage_ChromaRed_Get(this._instance)),We._create(l._api._MagickImage_ChromaGreen_Get(this._instance)),We._create(l._api._MagickImage_ChromaBlue_Get(this._instance)),We._create(l._api._MagickImage_ChromaWhite_Get(this._instance)))}set chromaticity(a){a.blue._use(o=>l._api._MagickImage_ChromaBlue_Set(this._instance,o)),a.green._use(o=>l._api._MagickImage_ChromaGreen_Set(this._instance,o)),a.red._use(o=>l._api._MagickImage_ChromaRed_Set(this._instance,o)),a.white._use(o=>l._api._MagickImage_ChromaWhite_Set(this._instance,o))}get classType(){return l._api._MagickImage_ClassType_Get(this._instance)}set classType(a){this.useExceptionPointer(o=>{l._api._MagickImage_ClassType_Set(this._instance,a,o)})}get colorFuzz(){return Z._fromQuantum(l._api._MagickImage_ColorFuzz_Get(this._instance))}set colorFuzz(a){l._api._MagickImage_ColorFuzz_Set(this._instance,a._toQuantum())}get colormapSize(){return l._api._MagickImage_ColormapSize_Get(this._instance)}set colormapSize(a){this.useExceptionPointer(o=>{l._api._MagickImage_ColormapSize_Set(this._instance,a,o)})}get colorSpace(){return l._api._MagickImage_ColorSpace_Get(this._instance)}set colorSpace(a){this.useExceptionPointer(o=>{l._api._MagickImage_ColorSpace_Set(this._instance,a,o)})}get colorType(){return this.settings.colorType!==void 0?this.settings.colorType:l._api._MagickImage_ColorType_Get(this._instance)}set colorType(a){this.useExceptionPointer(o=>{l._api._MagickImage_ColorType_Set(this._instance,a,o)})}get comment(){return this.getAttribute("comment")}set comment(a){a===null?this.removeAttribute("comment"):this.setAttribute("comment",a)}get compose(){return l._api._MagickImage_Compose_Get(this._instance)}set compose(a){l._api._MagickImage_Compose_Set(this._instance,a)}get compression(){return l._api._MagickImage_Compression_Get(this._instance)}get density(){return new Ne(l._api._MagickImage_ResolutionX_Get(this._instance),l._api._MagickImage_ResolutionY_Get(this._instance),l._api._MagickImage_ResolutionUnits_Get(this._instance))}set density(a){l._api._MagickImage_ResolutionX_Set(this._instance,a.x),l._api._MagickImage_ResolutionY_Set(this._instance,a.y),l._api._MagickImage_ResolutionUnits_Set(this._instance,a.units)}get depth(){return l._api._MagickImage_Depth_Get(this._instance)}set depth(a){l._api._MagickImage_Depth_Set(this._instance,a)}get endian(){return l._api._MagickImage_Endian_Get(this._instance)}set endian(a){l._api._MagickImage_Endian_Set(this._instance,a)}get fileName(){const a=l._api._MagickImage_FileName_Get(this._instance);return a===0?null:l._api.UTF8ToString(a)}get filterType(){return l._api._MagickImage_FilterType_Get(this._instance)}set filterType(a){l._api._MagickImage_FilterType_Set(this._instance,a)}get format(){return ge(l._api._MagickImage_Format_Get(this._instance),"")}set format(a){A(a.toString(),o=>l._api._MagickImage_Format_Set(this._instance,o))}get gamma(){return l._api._MagickImage_Gamma_Get(this._instance)}get gifDisposeMethod(){return l._api._MagickImage_GifDisposeMethod_Get(this._instance)}set gifDisposeMethod(a){l._api._MagickImage_GifDisposeMethod_Set(this._instance,a)}get hasAlpha(){return this.toBool(l._api._MagickImage_HasAlpha_Get(this._instance))}set hasAlpha(a){this.useExceptionPointer(o=>{a&&this.alpha(Pi.Opaque),l._api._MagickImage_HasAlpha_Set(this._instance,this.fromBool(a),o)})}get height(){return l._api._MagickImage_Height_Get(this._instance)}get interlace(){return l._api._MagickImage_Interlace_Get(this._instance)}get isOpaque(){return this.useExceptionPointer(a=>this.toBool(l._api._MagickImage_IsOpaque_Get(this._instance,a)))}get interpolate(){return l._api._MagickImage_Interpolate_Get(this._instance)}set interpolate(a){l._api._MagickImage_Interpolate_Set(this._instance,a)}get label(){return this.getAttribute("label")}set label(a){a===null?this.removeAttribute("label"):this.setAttribute("label",a)}get matteColor(){const a=l._api._MagickImage_MatteColor_Get(this._instance);return k._create(a)}set matteColor(a){a._use(o=>{l._api._MagickImage_MatteColor_Set(this._instance,o)})}get metaChannelCount(){return l._api._MagickImage_MetaChannelCount_Get(this._instance)}set metaChannelCount(a){this.useExceptionPointer(o=>{l._api._MagickImage_MetaChannelCount_Set(this._instance,a,o)})}get orientation(){return l._api._MagickImage_Orientation_Get(this._instance)}set orientation(a){l._api._MagickImage_Orientation_Set(this._instance,a)}get onProgress(){return this._progress}set onProgress(a){a!==void 0?oe.setProgressDelegate(this):this.disposeProgressDelegate(),this._progress=a}get onWarning(){return this._warning}set onWarning(a){this._warning=a}get page(){const a=l._api._MagickImage_Page_Get(this._instance);return _e._fromRectangle(a)}set page(a){a._toRectangle(o=>{l._api._MagickImage_Page_Set(this._instance,o)})}get profileNames(){const a=[];l._api._MagickImage_ResetProfileIterator(this._instance);let o=l._api._MagickImage_GetNextProfileName(this._instance);for(;o!==0;)a.push(l._api.UTF8ToString(o)),o=l._api._MagickImage_GetNextProfileName(this._instance);return a}get quality(){return l._api._MagickImage_Quality_Get(this._instance)}set quality(a){let o=a<1?1:a;o=o>100?100:o,l._api._MagickImage_Quality_Set(this._instance,o),this._settings._quality=o}get renderingIntent(){return l._api._MagickImage_RenderingIntent_Get(this._instance)}set renderingIntent(a){l._api._MagickImage_RenderingIntent_Set(this._instance,a)}get settings(){return this._settings}get signature(){return this.useExceptionPointer(a=>ge(l._api._MagickImage_Signature_Get(this._instance,a)))}get totalColors(){return this.useExceptionPointer(a=>l._api._MagickImage_TotalColors_Get(this._instance,a))}get virtualPixelMethod(){return l._api._MagickImage_VirtualPixelMethod_Get(this._instance)}set virtualPixelMethod(a){this.useExceptionPointer(o=>{l._api._MagickImage_VirtualPixelMethod_Set(this._instance,a,o)})}get width(){return l._api._MagickImage_Width_Get(this._instance)}adaptiveBlur(a,o){const i=this.valueOrDefault(a,0),g=this.valueOrDefault(o,1);this.useException(m=>{const f=l._api._MagickImage_AdaptiveBlur(this._instance,i,g,m.ptr);this._setInstance(f,m)})}adaptiveResize(a,o){const i=typeof a=="number"?new _e(0,0,a,o):a;this.useException(g=>{A(i.toString(),m=>{const f=l._api._MagickImage_AdaptiveResize(this._instance,m,g.ptr);this._setInstance(f,g)})})}adaptiveSharpen(a,o,i){let g=0;const m=o??1;let f=i??X.Undefined;a!==void 0&&(o===void 0?f=a:g=a),this.useException(M=>{const y=l._api._MagickImage_AdaptiveSharpen(this._instance,g,m,f,M.ptr);this._setInstance(y,M)})}adaptiveThreshold(a,o,i,g){const m=i instanceof Z?i._toQuantum():0;let f=g??X.Undefined;typeof i=="number"&&(f=i),this.useException(M=>{const y=l._api._MagickImage_AdaptiveThreshold(this._instance,a,o,m,f,M.ptr);this._setInstance(y,M)})}addNoise(a,o,i){let g=1,m=i??X.Undefined;o!==void 0&&(i===void 0?m=o:g=o),this.useException(f=>{const M=l._api._MagickImage_AddNoise(this._instance,a,g,m,f.ptr);this._setInstance(M,f)})}alpha(a){this.useExceptionPointer(o=>{l._api._MagickImage_SetAlpha(this._instance,a,o)})}annotate(a,o,i,g){const m=It._create(this._settings);return this.useExceptionPointer(f=>m._use(M=>{A(a,y=>{let F=null,N=ue.Undefined,ee=0;typeof o=="object"?(F=o.toString(),i!==void 0&&(N=i),g!==void 0&&(ee=g)):(N=o,i!==void 0&&(ee=i)),A(F,ie=>{l._api._MagickImage_Annotate(this._instance,M._instance,y,ie,N,ee,f)})})}))}autoGamma(a){this.useExceptionPointer(o=>{const i=this.valueOrDefault(a,X.Composite);l._api._MagickImage_AutoGamma(this._instance,i,o)})}autoLevel(a){this.useExceptionPointer(o=>{const i=this.valueOrDefault(a,X.Undefined);l._api._MagickImage_AutoLevel(this._instance,i,o)})}autoOrient(){this.useException(a=>{const o=l._api._MagickImage_AutoOrient(this._instance,a.ptr);this._setInstance(o,a)})}autoThreshold(a){this.useException(o=>{l._api._MagickImage_AutoThreshold(this._instance,a,o.ptr)})}bilateralBlur(a,o,i,g){const m=this.valueOrComputedDefault(i,()=>Math.sqrt(a*a+o*o)),f=this.valueOrDefault(g,m*.25);this.useException(M=>{const y=l._api._MagickImage_BilateralBlur(this._instance,a,o,m,f,M.ptr);this._setInstance(y,M)})}blackThreshold(a,o){const i=this.valueOrDefault(o,X.Composite);this.useException(g=>{A(a.toString(),m=>{l._api._MagickImage_BlackThreshold(this._instance,m,i,g.ptr)})})}blueShift(a){const o=this.valueOrDefault(a,1.5);this.useException(i=>{const g=l._api._MagickImage_BlueShift(this._instance,o,i.ptr);this._setInstance(g,i)})}blur(a,o,i){let g=0;const m=this.valueOrDefault(o,1);let f=this.valueOrDefault(i,X.Undefined);a!==void 0&&(o===void 0?f=a:g=a),this.useException(M=>{const y=l._api._MagickImage_Blur(this._instance,g,m,f,M.ptr);this._setInstance(y,M)})}border(a,o){const i=a,g=this.valueOrDefault(o,a),m=new _e(0,0,i,g);this.useException(f=>{m._toRectangle(M=>{const y=l._api._MagickImage_Border(this._instance,M,f.ptr);this._setInstance(y,f)})})}brightnessContrast(a,o,i){const g=this.valueOrDefault(i,X.Undefined);this.useException(m=>{l._api._MagickImage_BrightnessContrast(this._instance,a.toDouble(),o.toDouble(),g,m.ptr)})}cannyEdge(a,o,i,g){const m=this.valueOrDefault(a,0),f=this.valueOrDefault(o,1),M=this.valueOrDefault(i,new Z(10)).toDouble()/100,y=this.valueOrDefault(g,new Z(30)).toDouble()/100;this.useException(F=>{const N=l._api._MagickImage_CannyEdge(this._instance,m,f,M,y,F.ptr);this._setInstance(N,F)})}charcoal(a,o){const i=a===void 0?0:a,g=o===void 0?1:o;this.useException(m=>{const f=l._api._MagickImage_Charcoal(this._instance,i,g,m.ptr);this._setInstance(f,m)})}chop(a){this.useException(o=>{a._toRectangle(i=>{const g=l._api._MagickImage_Chop(this._instance,i,o.ptr);this._setInstance(g,o)})})}clahe(a,o,i,g){this.useExceptionPointer(m=>{const f=a instanceof Z?a.multiply(this.width):a,M=o instanceof Z?o.multiply(this.height):o;l._api._MagickImage_Clahe(this._instance,f,M,i,g,m)})}clone(a){return te._clone(this)._use(a)}colorAlpha(a){if(!this.hasAlpha)return;const o=te.create();o.read(a,this.width,this.height),o.composite(this,St.SrcOver,new ke(0,0)),this._instance=o._instance}compare(a,o,i,g){const m=o instanceof bi,f=m?o.metric:o;let M=i;g!==void 0&&(M=g);let y=X.Undefined;if(typeof M!="function")return M!==void 0&&(y=M),this.useExceptionPointer(N=>l._api._MagickImage_CompareDistortion(this._instance,a._instance,f,y,N));i!==void 0&&typeof i!="function"&&(y=i);const F=De.use(this,N=>(m&&o._setArtifacts(N),Ot.use(ee=>{const ie=this.useExceptionPointer(Ke=>l._api._MagickImage_Compare(this._instance,a._instance,f,y,ee.ptr,Ke)),ct=ee.value,Ue=te._createFromImage(ie,this._settings);return kt._create(ct,Ue)})));return F.difference._use(()=>M(F))}composite(a,o,i,g,m){let f=0,M=0,y=St.In,F=X.All,N=null;o instanceof ke?(f=o.x,M=o.y):o!==void 0&&(y=o),i instanceof ke?(f=i.x,M=i.y):typeof i=="string"?N=i:i!==void 0&&(F=i),typeof g=="string"?N=g:g!==void 0&&(F=g),m!==void 0&&(F=m),N!==null&&this.setArtifact("compose:args",N),this.useExceptionPointer(ee=>{l._api._MagickImage_Composite(this._instance,a._instance,f,M,y,F,ee)}),N!==null&&this.removeArtifact("compose:args")}compositeGravity(a,o,i,g,m,f){let M=0,y=0,F=St.In,N=X.All,ee=null;i instanceof ke?(M=i.x,y=i.y):i!==void 0&&(F=i),g instanceof ke?(M=g.x,y=g.y):typeof g=="string"?ee=g:g!==void 0&&(N=g),typeof m=="string"?ee=m:m!==void 0&&(N=m),f!==void 0&&(N=f),ee!==null&&this.setArtifact("compose:args",ee),this.useExceptionPointer(ie=>{l._api._MagickImage_CompositeGravity(this._instance,a._instance,o,M,y,F,N,ie)}),ee!==null&&this.removeArtifact("compose:args")}connectedComponents(a){const o=typeof a=="number"?new Gi(a):a;return De.use(this,g=>(o._setArtifacts(g),this.useException(m=>ye.use(f=>{try{const M=l._api._MagickImage_ConnectedComponents(this._instance,o.connectivity,f.ptr,m.ptr);return this._setInstance(M,m),wt._create(f.value,this.colormapSize)}finally{f.value!==0&&l._api._ConnectedComponent_DisposeList(f.value)}}))))}contrast=()=>this._contrast(!0);contrastStretch(a,o,i){const g=this.width*this.height,m=a.multiply(g);let f=0,M=this.valueOrDefault(i,X.Undefined);o instanceof Z?f=g-o.multiply(g):(f=g-a.multiply(g),o!==void 0&&(M=o)),this.useExceptionPointer(y=>{l._api._MagickImage_ContrastStretch(this._instance,m,f,M,y)})}static create(a,o,i){const g=new te(te.createInstance(),new Oe);return a!==void 0&&g.readOrPing(!1,a,o,i),g}crop(a,o,i){let g,m;typeof a!="number"?(g=a,m=this.valueOrDefault(o,ue.Undefined)):o!==void 0&&(g=new _e(a,o),m=this.valueOrDefault(i,ue.Undefined)),this.useException(f=>{A(g.toString(),M=>{const y=l._api._MagickImage_Crop(this._instance,M,m,f.ptr);this._setInstance(y,f)})})}cropToTiles(a,o,i){let g,m;return typeof a=="number"&&typeof o=="number"&&i!==void 0?(g=new _e(0,0,a,o),m=i):typeof a!="number"&&typeof o!="number"&&(g=a,m=o),this.useException(f=>A(g.toString(),M=>{const y=l._api._MagickImage_CropToTiles(this._instance,M,f.ptr);return ve._createFromImages(y,this._settings)._use(m)}))}deskew(a,o){return De.use(this,i=>{o!==void 0&&i.setArtifact("deskew:auto-crop",o),this.useException(m=>{const f=l._api._MagickImage_Deskew(this._instance,a._toQuantum(),m.ptr);this._setInstance(f,m)});const g=Number(this.getArtifact("deskew:angle"));return isNaN(g)?0:g})}distort(a,o){De.use(this,i=>{let g,m=0;typeof a=="number"?g=a:(g=a.method,m=a.bestFit?1:0,a._setArtifacts(i)),this.useException(f=>{Wi(o,M=>{const y=l._api._MagickImage_Distort(this._instance,g,m,M,o.length,f.ptr);this._setInstance(y,f)})})})}draw(...a){const o=a.flat();o.length!==0&&st._use(this,i=>{i.draw(o)})}evaluate(a,o,i,g){if(typeof o=="number"){const m=o,f=typeof i=="number"?i:i._toQuantum();this.useExceptionPointer(M=>{l._api._MagickImage_EvaluateOperator(this._instance,a,m,f,M)})}else if(g!==void 0){if(typeof i!="number")throw new z("this should not happen");const m=o,f=i,M=typeof g=="number"?g:g._toQuantum();if(m.isPercentage)throw new z("percentage is not supported");this.useExceptionPointer(y=>{Bi.use(this,m,F=>{l._api._MagickImage_EvaluateGeometry(this._instance,a,F,f,M,y)})})}}extent(a,o,i){let g=ue.Undefined,m;typeof a!="number"?m=a:typeof o=="number"&&(m=new _e(a,o)),typeof o=="number"?g=o:o!==void 0&&(this.backgroundColor=o),typeof i=="number"?g=i:i!==void 0&&(this.backgroundColor=i),this.useException(f=>{A(m.toString(),M=>{const y=l._api._MagickImage_Extent(this._instance,M,g,f.ptr);this._setInstance(y,f)})})}flip(){this.useException(a=>{const o=l._api._MagickImage_Flip(this._instance,a.ptr);this._setInstance(o,a)})}flop(){this.useException(a=>{const o=l._api._MagickImage_Flop(this._instance,a.ptr);this._setInstance(o,a)})}formatExpression(a){return this.useExceptionPointer(o=>this._settings._use(i=>A(a,g=>{const m=l._api._MagickImage_FormatExpression(this._instance,i._instance,g,o);return sa(l._api,m)})))}gammaCorrect(a,o){const i=this.valueOrDefault(o,X.Undefined);this.useExceptionPointer(g=>{l._api._MagickImage_GammaCorrect(this._instance,a,i,g)})}gaussianBlur(a,o,i){const g=this.valueOrDefault(o,1),m=this.valueOrDefault(i,X.Undefined);this.useException(f=>{const M=l._api._MagickImage_GaussianBlur(this._instance,a,g,m,f.ptr);this._setInstance(M,f)})}getArtifact(a){return A(a,o=>{const i=l._api._MagickImage_GetArtifact(this._instance,o);return ge(i)})}getAttribute(a){return this.useException(o=>A(a,i=>{const g=l._api._MagickImage_GetAttribute(this._instance,i,o.ptr);return ge(g)}))}getColorProfile(){const a=["icc","icm"];for(const o of a){const i=this._getProfile(o);if(i!==null)return new Ti(i)}return null}getPixels(a){if(this._settings._ping)throw new z("image contains no pixel data");return $e._use(this,a)}getProfile(a){const o=this._getProfile(a);return o===null?null:new Vt(a,o)}getWriteMask(a){const o=this.useExceptionPointer(g=>l._api._MagickImage_GetWriteMask(this._instance,g)),i=o===0?null:new te(o,new Oe);return i==null?a(i):i._use(a)}grayscale(a=Ni.Undefined){this.useExceptionPointer(o=>{l._api._MagickImage_Grayscale(this._instance,a,o)})}hasProfile(a){return A(a,o=>this.toBool(l._api._MagickImage_HasProfile(this._instance,o)))}histogram(){const a=new Map;return this.useExceptionPointer(o=>{ye.use(i=>{const g=l._api._MagickImage_Histogram(this._instance,i.ptr,o);if(g!==0){const m=i.value;for(let f=0;f<m;f++){const M=l._api._MagickColorCollection_GetInstance(g,f),y=k._create(M),F=l._api._MagickColor_Count_Get(M);a.set(y.toString(),F)}l._api._MagickColorCollection_DisposeList(g)}})}),a}inverseContrast=()=>this._contrast(!1);inverseLevel(a,o,i,g){const m=this.valueOrDefault(i,1),f=this.valueOrDefault(g,X.Composite);this.useExceptionPointer(M=>{l._api._MagickImage_InverseLevel(this._instance,a.toDouble(),o._toQuantum(),m,f,M)})}inverseOpaque=(a,o)=>this._opaque(a,o,!0);inverseSigmoidalContrast(a,o,i){this._sigmoidalContrast(!1,a,o,i)}inverseTransparent=a=>this._transparent(a,!0);level(a,o,i,g){const m=this.valueOrDefault(i,1),f=this.valueOrDefault(g,X.Composite);this.useExceptionPointer(M=>{l._api._MagickImage_Level(this._instance,a.toDouble(),o._toQuantum(),m,f,M)})}linearStretch(a,o){this.useExceptionPointer(i=>{l._api._MagickImage_LinearStretch(this._instance,a.toDouble(),o._toQuantum(),i)})}liquidRescale(a,o){const i=typeof a=="number"?new _e(a,o):a;this.useException(g=>{A(i.toString(),m=>{const f=l._api._MagickImage_LiquidRescale(this._instance,m,i.x,i.y,g.ptr);this._setInstance(f,g)})})}negate(a){this.useExceptionPointer(o=>{const i=this.valueOrDefault(a,X.Undefined);l._api._MagickImage_Negate(this._instance,0,i,o)})}negateGrayScale(a){this.useExceptionPointer(o=>{const i=this.valueOrDefault(a,X.Undefined);l._api._MagickImage_Negate(this._instance,1,i,o)})}normalize(){this.useExceptionPointer(a=>{l._api._MagickImage_Normalize(this._instance,a)})}modulate(a,o,i){const g=this.valueOrDefault(o,new Z(100)),m=this.valueOrDefault(i,new Z(100));this.useExceptionPointer(f=>{const M=`${a.toDouble()}/${g.toDouble()}/${m.toDouble()}`;A(M,y=>{l._api._MagickImage_Modulate(this._instance,y,f)})})}morphology(a){this.useException(o=>{A(a.kernel,i=>{const g=l._api._MagickImage_Morphology(this._instance,a.method,i,a.channels,a.iterations,o.ptr);this._setInstance(g,o)})})}motionBlur(a,o,i){this.useException(g=>{const m=l._api._MagickImage_MotionBlur(this._instance,a,o,i,g.ptr);this._setInstance(m,g)})}oilPaint(a){const o=this.valueOrDefault(a,3),i=0;this.useException(g=>{const m=l._api._MagickImage_OilPaint(this._instance,o,i,g.ptr);this._setInstance(m,g)})}opaque=(a,o)=>this._opaque(a,o,!1);ping(a,o){this.readOrPing(!0,a,o)}perceptualHash(a){const o=this.valueOrDefault(a,fe._defaultColorspaces());return fe._validateColorSpaces(o),De.use(this,i=>{const g=o.map(m=>jt[m]).join(",");return i.setArtifact("phash:colorspaces",g),this.useExceptionPointer(m=>{const f=l._api._MagickImage_PerceptualHash(this._instance,m);return fe._create(this,o,f)})})}quantize(a){const o=this.valueOrDefault(a,new Dt);return this.useException(i=>{o._use(g=>{l._api._MagickImage_Quantize(this._instance,g._instance,i.ptr)})}),o.measureErrors?_t._create(this):null}read(a,o,i){this.readOrPing(!1,a,o,i)}readFromCanvas(a,o){const i=a.getContext("2d",o);if(i===null)return;const g=i.getImageData(0,0,a.width,a.height),m=new Se;m.format=Ce.Rgba,m.width=a.width,m.height=a.height,this.useException(f=>{this.readFromArray(g.data,m,f)})}removeArtifact(a){A(a,o=>{l._api._MagickImage_RemoveArtifact(this._instance,o)})}removeAttribute(a){A(a,o=>{l._api._MagickImage_RemoveAttribute(this._instance,o)})}removeProfile(a){const o=typeof a=="string"?a:a.name;A(o,i=>{l._api._MagickImage_RemoveProfile(this._instance,i)})}removeWriteMask(){this.useExceptionPointer(a=>{l._api._MagickImage_SetWriteMask(this._instance,0,a)})}resetPage(){this.page=new _e(0,0,0,0)}resize(a,o){const i=typeof a=="number"?new _e(a,o):a;this.useException(g=>{A(i.toString(),m=>{const f=l._api._MagickImage_Resize(this._instance,m,g.ptr);this._setInstance(f,g)})})}rotate(a){this.useException(o=>{const i=l._api._MagickImage_Rotate(this._instance,a,o.ptr);this._setInstance(i,o)})}separate(a,o){return this.useException(i=>{let g,m=X.Undefined;if(typeof a=="number"&&o!==void 0)m=a,g=o;else if(typeof a=="function")g=a;else throw new z("invalid arguments");const f=l._api._MagickImage_Separate(this._instance,m,i.ptr);return ve._createFromImages(f,this._settings)._use(g)})}sepiaTone(a=new Z(80)){this.useException(o=>{const i=typeof a=="number"?new Z(a):a,g=l._api._MagickImage_SepiaTone(this._instance,i._toQuantum(),o.ptr);this._setInstance(g,o)})}setArtifact(a,o){let i;typeof o=="string"?i=o:typeof o=="boolean"?i=this.fromBool(o).toString():i=o.toString(),A(a,g=>{A(i,m=>{l._api._MagickImage_SetArtifact(this._instance,g,m)})})}setAttribute(a,o){this.useException(i=>{A(a,g=>{A(o,m=>{l._api._MagickImage_SetAttribute(this._instance,g,m,i.ptr)})})})}setProfile(a,o){const i=typeof a=="string"?a:a.name;let g;o!==void 0?g=o:typeof a!="string"&&(g=a.data),this.useException(m=>{A(i,f=>{Li(g,M=>{l._api._MagickImage_SetProfile(this._instance,f,M,g.byteLength,m.ptr)})})})}setWriteMask(a){this.useExceptionPointer(o=>{l._api._MagickImage_SetWriteMask(this._instance,a._instance,o)})}sharpen(a,o,i){const g=this.valueOrDefault(a,0),m=this.valueOrDefault(o,1),f=this.valueOrDefault(i,X.Undefined);this.useException(M=>{const y=l._api._MagickImage_Sharpen(this._instance,g,m,f,M.ptr);this._setInstance(y,M)})}shave(a,o){this.useException(i=>{const g=l._api._MagickImage_Shave(this._instance,a,o,i.ptr);this._setInstance(g,i)})}sigmoidalContrast(a,o,i){this._sigmoidalContrast(!0,a,o,i)}solarize(a=new Z(50)){this.useException(o=>{const i=typeof a=="number"?new Z(a):a;l._api._MagickImage_Solarize(this._instance,i._toQuantum(),o.ptr)})}splice(a){Bi.use(this,a,o=>{this.useException(i=>{const g=l._api._MagickImage_Splice(this._instance,o,i.ptr);this._setInstance(g,i)})})}statistics(a){const o=this.valueOrDefault(a,X.All);return this.useExceptionPointer(i=>{const g=l._api._MagickImage_Statistics(this._instance,o,i),m=Pt._create(this,g,o);return l._api._Statistics_DisposeList(g),m})}strip(){this.useExceptionPointer(a=>{l._api._MagickImage_Strip(this._instance,a)})}transformColorSpace(a,o,i){const g=a;let m,f=Xt.Quantum;o!==void 0&&(typeof o=="number"?f=o:m=o),i!==void 0&&(f=i);const M=this.hasProfile("icc")||this.hasProfile("icm");if(m===void 0){if(!M)return!1;m=g}else{if(g.colorSpace!==this.colorSpace)return!1;M||this.setProfile(g)}return f===Xt.Quantum?De.use(this,y=>{y.setArtifact("profile:highres-transform",!1),this.setProfile(m)}):this.setProfile(m),!0}threshold(a,o){const i=this.valueOrDefault(o,X.Undefined);this.useExceptionPointer(g=>{l._api._MagickImage_Threshold(this._instance,a._toQuantum(),i,g)})}thumbnail(a,o){const i=typeof a=="number"?new _e(a,o):a;this.useException(g=>{A(i.toString(),m=>{const f=l._api._MagickImage_Thumbnail(this._instance,m,g.ptr);this._setInstance(f,g)})})}toString=()=>`${this.format} ${this.width}x${this.height} ${this.depth}-bit ${jt[this.colorSpace]}`;transparent(a){a._use(o=>{this.useExceptionPointer(i=>{l._api._MagickImage_Transparent(this._instance,o,0,i)})})}trim(...a){if(a.length>0)if(a.length==1&&a[0]instanceof Z){const o=a[0];this.setArtifact("trim:percent-background",o.toDouble().toString())}else{const o=a,i=[...new Set(Fi(o))].join(",");this.setArtifact("trim:edges",i)}this.useException(o=>{const i=l._api._MagickImage_Trim(this._instance,o.ptr);this._setInstance(i,o),this.removeArtifact("trim:edges"),this.removeArtifact("trim:percent-background")})}wave(a,o,i){const g=this.valueOrDefault(a,this.interpolate),m=this.valueOrDefault(o,25),f=this.valueOrDefault(i,150);this.useException(M=>{const y=l._api._MagickImage_Wave(this._instance,g,m,f,M.ptr);this._setInstance(y,M)})}vignette(a,o,i,g){const m=this.valueOrDefault(a,0),f=this.valueOrDefault(o,1),M=this.valueOrDefault(i,0),y=this.valueOrDefault(g,0);this.useException(F=>{const N=l._api._MagickImage_Vignette(this._instance,m,f,M,y,F.ptr);this._setInstance(N,F)})}whiteThreshold(a,o){const i=this.valueOrDefault(o,X.Composite);this.useException(g=>{A(a.toString(),m=>{l._api._MagickImage_WhiteThreshold(this._instance,m,i,g.ptr)})})}write(a,o){let i=0,g=0;o!==void 0?this._settings.format=a:o=a,this.useException(f=>{ye.use(M=>{this._settings._use(y=>{try{i=l._api._MagickImage_WriteBlob(this._instance,y._instance,M.ptr,f.ptr),g=M.value}catch{i!==0&&(i=l._api._MagickMemory_Relinquish(i))}})})});const m=new Ai(i,g,o);return le._disposeAfterExecution(m,m.func)}writeToCanvas(a,o){a.width=this.width,a.height=this.height;const i=a.getContext("2d",o);i!==null&&$e._map(this,"RGBA",g=>{const m=i.createImageData(this.width,this.height);let f=0;for(let M=0;M<this.height;M++)for(let y=0;y<this.width;y++)m.data[f++]=l._api.HEAPU8[g++],m.data[f++]=l._api.HEAPU8[g++],m.data[f++]=l._api.HEAPU8[g++],m.data[f++]=l._api.HEAPU8[g++];i.putImageData(m,0,0)})}static _createFromImage(a,o){return new te(a,o)}_channelOffset(a){return l._api._MagickImage_HasChannel(this._instance,a)?l._api._MagickImage_ChannelOffset(this._instance,a):-1}static _clone(a){return b.usePointer(o=>new te(l._api._MagickImage_Clone(a._instance,o),a._settings._clone()))}_getSettings(){return this._settings}_instanceNotInitialized(){throw new z("no image has been read")}_setInstance(a,o){if(super._setInstance(a,o)===!0||a===0&&this.onProgress!==void 0)return!0;throw new z("out of memory")}_use(a){return le._disposeAfterExecution(this,a)}static _create(a){return te.create()._use(a)}onDispose(){this.disposeProgressDelegate()}_contrast(a){this.useExceptionPointer(o=>{l._api._MagickImage_Contrast(this._instance,this.fromBool(a),o)})}_getProfile(a){return A(a,o=>{const i=l._api._MagickImage_GetProfile(this._instance,o),g=ga.toArray(i);return g===null?null:g})}_opaque(a,o,i){this.useExceptionPointer(g=>{a._use(m=>{o._use(f=>{l._api._MagickImage_Opaque(this._instance,m,f,this.fromBool(i),g)})})})}_sigmoidalContrast(a,o,i,g){let m;i!==void 0?typeof i=="number"?m=i:m=i.multiply(Fe.max):m=Fe.max*.5;const f=this.valueOrDefault(g,X.Undefined);this.useExceptionPointer(M=>{l._api._MagickImage_SigmoidalContrast(this._instance,this.fromBool(a),o,m,f,M)})}_transparent(a,o){a._use(i=>{this.useExceptionPointer(g=>{l._api._MagickImage_Transparent(this._instance,i,this.fromBool(o),g)})})}static createInstance(){return b.usePointer(a=>l._api._MagickImage_Create(0,a))}fromBool(a){return a?1:0}disposeProgressDelegate(){oe.removeProgressDelegate(this),this._progress=void 0}readOrPing(a,o,i,g){this.useException(m=>{const f=i instanceof Se?i:new Se(this._settings);if(f._ping=a,this._settings._ping=a,f.frameCount!==void 0&&f.frameCount>1)throw new z("The frame count can only be set to 1 when a single image is being read.");if(typeof o=="string")f._fileName=o;else if(ze(o)){this.readFromArray(o,f,m);return}else f._fileName="xc:"+o.toShortString(),f.width=typeof i=="number"?i:0,f.height=typeof g=="number"?g:0;f._use(M=>{const y=l._api._MagickImage_ReadFile(M._instance,m.ptr);this._setInstance(y,m)})})}readFromArray(a,o,i){o._use(g=>{Li(a,m=>{const f=l._api._MagickImage_ReadBlob(g._instance,m,0,a.byteLength,i.ptr);this._setInstance(f,i)})})}toBool(a){return a===1}valueOrDefault(a,o){return a===void 0?o:a}valueOrComputedDefault(a,o){return a===void 0?o():a}useException(a){return b.use(a,o=>{this.onWarning!==void 0&&this.onWarning(new Kt(o))})}useExceptionPointer(a){return b.usePointer(a,o=>{this.onWarning!==void 0&&this.onWarning(new Kt(o))})}}var ua=(()=>{var S=typeof document<"u"?document.currentScript?.src:void 0;return function(a={}){var o,i=a,g,m,f=new Promise((e,t)=>{g=e,m=t}),M=typeof window=="object",y=typeof WorkerGlobalScope<"u";typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer",(!globalThis.crypto||!globalThis.crypto.getRandomValues)&&(globalThis.crypto={getRandomValues:e=>{for(let t=0;t<e.length;t++)e[t]=Math.random()*256|0}});var F=Object.assign({},i),N="./this.program",ee=(e,t)=>{throw t},ie="";function ct(e){return i.locateFile?i.locateFile(e,ie):ie+e}var Ue,Ke;(M||y)&&(y?ie=self.location.href:typeof document<"u"&&document.currentScript&&(ie=document.currentScript.src),S&&(ie=S),ie.startsWith("blob:")?ie="":ie=ie.substr(0,ie.replace(/[?#].*/,"").lastIndexOf("/")+1),y&&(Ke=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),Ue=async e=>{if(pr(e))return new Promise((r,n)=>{var _=new XMLHttpRequest;_.open("GET",e,!0),_.responseType="arraybuffer",_.onload=()=>{if(_.status==200||_.status==0&&_.response){r(_.response);return}n(_.status)},_.onerror=n,_.send(null)});var t=await fetch(e,{credentials:"same-origin"});if(t.ok)return t.arrayBuffer();throw new Error(t.status+" : "+t.url)});var Zt=i.print||console.log.bind(console),Be=i.printErr||console.error.bind(console);Object.assign(i,F),F=null,i.arguments&&i.arguments,i.thisProgram&&(N=i.thisProgram);var Tt=i.wasmBinary,bt,ei=!1,q,se,he,lt,E,W,Gt,ce,lr,At;function gr(){var e=bt.buffer;i.HEAP8=q=new Int8Array(e),i.HEAP16=he=new Int16Array(e),i.HEAPU8=se=new Uint8Array(e),i.HEAPU16=lt=new Uint16Array(e),i.HEAP32=E=new Int32Array(e),i.HEAPU32=W=new Uint32Array(e),i.HEAPF32=Gt=new Float32Array(e),i.HEAPF64=At=new Float64Array(e),i.HEAP64=ce=new BigInt64Array(e),i.HEAPU64=lr=new BigUint64Array(e)}var ur=[],hr=[],dr=[];function $a(){if(i.preRun)for(typeof i.preRun=="function"&&(i.preRun=[i.preRun]);i.preRun.length;)Ya(i.preRun.shift());ri(ur)}function Ua(){!i.noFSInit&&!u.initialized&&u.init(),u.ignorePermissions=!1,ri(hr)}function ja(){if(i.postRun)for(typeof i.postRun=="function"&&(i.postRun=[i.postRun]);i.postRun.length;)Xa(i.postRun.shift());ri(dr)}function Ya(e){ur.unshift(e)}function Va(e){hr.unshift(e)}function Xa(e){dr.unshift(e)}var je=0,gt=null;function mr(e){je++,i.monitorRunDependencies?.(je)}function ti(e){if(je--,i.monitorRunDependencies?.(je),je==0&>){var t=gt;gt=null,t()}}function Je(e){i.onAbort?.(e),e="Aborted("+e+")",Be(e),ei=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw m(t),t}var qa="data:application/octet-stream;base64,",fr=e=>e.startsWith(qa),pr=e=>e.startsWith("file://");function Oa(){var e="magick.wasm";return fr(e)?e:ct(e)}var ii;function Qa(e){if(e==ii&&Tt)return new Uint8Array(Tt);if(Ke)return Ke(e);throw"both async and sync fetching of the wasm failed"}async function Ka(e){if(!Tt)try{var t=await Ue(e);return new Uint8Array(t)}catch{}return Qa(e)}async function Ja(e,t){try{var r=await Ka(e),n=await WebAssembly.instantiate(r,t);return n}catch(_){Be(`failed to asynchronously prepare wasm: ${_}`),Je(_)}}async function Za(e,t,r){if(!e&&typeof WebAssembly.instantiateStreaming=="function"&&!fr(t)&&!pr(t)&&typeof fetch=="function")try{var n=fetch(t,{credentials:"same-origin"}),_=await WebAssembly.instantiateStreaming(n,r);return _}catch(c){Be(`wasm streaming compile failed: ${c}`),Be("falling back to ArrayBuffer instantiation")}return Ja(t,r)}function en(){return{a:zs}}async function tn(){function e(_,c){return s=_.exports,s=M_(s),bt=s.ab,gr(),Ye=s.vb,Va(s.bb),ti(),s}mr();function t(_){e(_.instance)}var r=en();if(i.instantiateWasm)try{return i.instantiateWasm(r,e)}catch(_){Be(`Module.instantiateWasm callback failed with error: ${_}`),m(_)}ii??=Oa();try{var n=await Za(Tt,ii,r);return t(n),n}catch(_){m(_);return}}class rn{name="ExitStatus";constructor(t){this.message=`Program terminated with exit(${t})`,this.status=t}}var ri=e=>{for(;e.length>0;)e.shift()(i)};function an(e,t="i8"){switch(t.endsWith("*")&&(t="*"),t){case"i1":return q[e>>>0];case"i8":return q[e>>>0];case"i16":return he[e>>>1>>>0];case"i32":return E[e>>>2>>>0];case"i64":return ce[e>>>3];case"float":return Gt[e>>>2>>>0];case"double":return At[e>>>3>>>0];case"*":return W[e>>>2>>>0];default:Je(`invalid type for getValue: ${t}`)}}var Mr=i.noExitRuntime||!0;function nn(e,t,r="i8"){switch(r.endsWith("*")&&(r="*"),r){case"i1":q[e>>>0]=t;break;case"i8":q[e>>>0]=t;break;case"i16":he[e>>>1>>>0]=t;break;case"i32":E[e>>>2>>>0]=t;break;case"i64":ce[e>>>3]=BigInt(t);break;case"float":Gt[e>>>2>>>0]=t;break;case"double":At[e>>>3>>>0]=t;break;case"*":W[e>>>2>>>0]=t;break;default:Je(`invalid type for setValue: ${r}`)}}var $=e=>Zr(e),U=()=>ea(),on=9007199254740992,sn=-9007199254740992,Ee=e=>e<sn||e>on?NaN:Number(e),ut=[],Ye,B=e=>{var t=ut[e];return t||(e>=ut.length&&(ut.length=e+1),ut[e]=t=Ye.get(e)),t};function _n(e,t){return e>>>=0,B(e)(t)}var Ze=0;class kr{constructor(t){this.excPtr=t,this.ptr=t-24}set_type(t){W[this.ptr+4>>>2>>>0]=t}get_type(){return W[this.ptr+4>>>2>>>0]}set_destructor(t){W[this.ptr+8>>>2>>>0]=t}get_destructor(){return W[this.ptr+8>>>2>>>0]}set_caught(t){t=t?1:0,q[this.ptr+12>>>0]=t}get_caught(){return q[this.ptr+12>>>0]!=0}set_rethrown(t){t=t?1:0,q[this.ptr+13>>>0]=t}get_rethrown(){return q[this.ptr+13>>>0]!=0}init(t,r){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(r)}set_adjusted_ptr(t){W[this.ptr+16>>>2>>>0]=t}get_adjusted_ptr(){return W[this.ptr+16>>>2>>>0]}}function cn(e){throw e>>>=0,Ze||(Ze=e),Ze}var Rt=e=>Jr(e),ln=e=>{var t=Ze;if(!t)return Rt(0),0;var r=new kr(t);r.set_adjusted_ptr(t);var n=r.get_type();if(!n)return Rt(0),t;for(var _ of e){if(_===0||_===n)break;var c=r.ptr+16;if(ta(_,n,c))return Rt(_),t}return Rt(n),t};function gn(){return ln([])}function un(e,t,r){e>>>=0,t>>>=0,r>>>=0;var n=new kr(e);throw n.init(t,r),Ze=e,Ze}var Y={isAbs:e=>e.charAt(0)==="/",splitPath:e=>{var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return t.exec(e).slice(1)},normalizeArray:(e,t)=>{for(var r=0,n=e.length-1;n>=0;n--){var _=e[n];_==="."?e.splice(n,1):_===".."?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=Y.isAbs(e),r=e.substr(-1)==="/";return e=Y.normalizeArray(e.split("/").filter(n=>!!n),!t).join("/"),!e&&!t&&(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=Y.splitPath(e),r=t[0],n=t[1];return!r&&!n?".":(n&&(n=n.substr(0,n.length-1)),r+n)},basename:e=>{if(e==="/")return"/";e=Y.normalize(e),e=e.replace(/\/$/,"");var t=e.lastIndexOf("/");return t===-1?e:e.substr(t+1)},join:(...e)=>Y.normalize(e.join("/")),join2:(e,t)=>Y.normalize(e+"/"+t)},hn=()=>{if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return e=>crypto.getRandomValues(e);Je("initRandomDevice")},ai=e=>(ai=hn())(e),et={resolve:(...e)=>{for(var t="",r=!1,n=e.length-1;n>=-1&&!r;n--){var _=n>=0?e[n]:u.cwd();if(typeof _!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!_)return"";t=_+"/"+t,r=Y.isAbs(_)}return t=Y.normalizeArray(t.split("/").filter(c=>!!c),!r).join("/"),(r?"/":"")+t||"."},relative:(e,t)=>{e=et.resolve(e).substr(1),t=et.resolve(t).substr(1);function r(v){for(var w=0;w<v.length&&v[w]==="";w++);for(var C=v.length-1;C>=0&&v[C]==="";C--);return w>C?[]:v.slice(w,C-w+1)}for(var n=r(e.split("/")),_=r(t.split("/")),c=Math.min(n.length,_.length),h=c,d=0;d<c;d++)if(n[d]!==_[d]){h=d;break}for(var p=[],d=h;d<n.length;d++)p.push("..");return p=p.concat(_.slice(h)),p.join("/")}},Sr=typeof TextDecoder<"u"?new TextDecoder:void 0,tt=(e,t=0,r=NaN)=>{t>>>=0;for(var n=t+r,_=t;e[_]&&!(_>=n);)++_;if(_-t>16&&e.buffer&&Sr)return Sr.decode(e.subarray(t,_));for(var c="";t<_;){var h=e[t++];if(!(h&128)){c+=String.fromCharCode(h);continue}var d=e[t++]&63;if((h&224)==192){c+=String.fromCharCode((h&31)<<6|d);continue}var p=e[t++]&63;if((h&240)==224?h=(h&15)<<12|d<<6|p:h=(h&7)<<18|d<<12|p<<6|e[t++]&63,h<65536)c+=String.fromCharCode(h);else{var v=h-65536;c+=String.fromCharCode(55296|v>>10,56320|v&1023)}}return c},ni=[],it=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++r):t+=3}return t},oi=(e,t,r,n)=>{if(r>>>=0,!(n>0))return 0;for(var _=r,c=r+n-1,h=0;h<e.length;++h){var d=e.charCodeAt(h);if(d>=55296&&d<=57343){var p=e.charCodeAt(++h);d=65536+((d&1023)<<10)|p&1023}if(d<=127){if(r>=c)break;t[r++>>>0]=d}else if(d<=2047){if(r+1>=c)break;t[r++>>>0]=192|d>>6,t[r++>>>0]=128|d&63}else if(d<=65535){if(r+2>=c)break;t[r++>>>0]=224|d>>12,t[r++>>>0]=128|d>>6&63,t[r++>>>0]=128|d&63}else{if(r+3>=c)break;t[r++>>>0]=240|d>>18,t[r++>>>0]=128|d>>12&63,t[r++>>>0]=128|d>>6&63,t[r++>>>0]=128|d&63}}return t[r>>>0]=0,r-_};function vr(e,t,r){var n=it(e)+1,_=new Array(n),c=oi(e,_,0,_.length);return _.length=c,_}var dn=()=>{if(!ni.length){var e=null;if(typeof window<"u"&&typeof window.prompt=="function"&&(e=window.prompt("Input: "),e!==null&&(e+=`
|
|
43
|
+
`)),!e)return null;ni=vr(e)}return ni.shift()},Ve={ttys:[],init(){},shutdown(){},register(e,t){Ve.ttys[e]={input:[],output:[],ops:t},u.registerDevice(e,Ve.stream_ops)},stream_ops:{open(e){var t=Ve.ttys[e.node.rdev];if(!t)throw new u.ErrnoError(43);e.tty=t,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,t,r,n,_){if(!e.tty||!e.tty.ops.get_char)throw new u.ErrnoError(60);for(var c=0,h=0;h<n;h++){var d;try{d=e.tty.ops.get_char(e.tty)}catch{throw new u.ErrnoError(29)}if(d===void 0&&c===0)throw new u.ErrnoError(6);if(d==null)break;c++,t[r+h]=d}return c&&(e.node.atime=Date.now()),c},write(e,t,r,n,_){if(!e.tty||!e.tty.ops.put_char)throw new u.ErrnoError(60);try{for(var c=0;c<n;c++)e.tty.ops.put_char(e.tty,t[r+c])}catch{throw new u.ErrnoError(29)}return n&&(e.node.mtime=e.node.ctime=Date.now()),c}},default_tty_ops:{get_char(e){return dn()},put_char(e,t){t===null||t===10?(Zt(tt(e.output)),e.output=[]):t!=0&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(Zt(tt(e.output)),e.output=[])},ioctl_tcgets(e){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(e,t,r){return 0},ioctl_tiocgwinsz(e){return[24,80]}},default_tty1_ops:{put_char(e,t){t===null||t===10?(Be(tt(e.output)),e.output=[]):t!=0&&e.output.push(t)},fsync(e){e.output&&e.output.length>0&&(Be(tt(e.output)),e.output=[])}}},mn=(e,t)=>{se.fill(0,e,e+t)},wr=(e,t)=>Math.ceil(e/t)*t,Ir=e=>{e=wr(e,65536);var t=Kr(65536,e);return t&&mn(t,e),t},x={ops_table:null,mount(e){return x.createNode(null,"/",16895,0)},createNode(e,t,r,n){if(u.isBlkdev(r)||u.isFIFO(r))throw new u.ErrnoError(63);x.ops_table||={dir:{node:{getattr:x.node_ops.getattr,setattr:x.node_ops.setattr,lookup:x.node_ops.lookup,mknod:x.node_ops.mknod,rename:x.node_ops.rename,unlink:x.node_ops.unlink,rmdir:x.node_ops.rmdir,readdir:x.node_ops.readdir,symlink:x.node_ops.symlink},stream:{llseek:x.stream_ops.llseek}},file:{node:{getattr:x.node_ops.getattr,setattr:x.node_ops.setattr},stream:{llseek:x.stream_ops.llseek,read:x.stream_ops.read,write:x.stream_ops.write,allocate:x.stream_ops.allocate,mmap:x.stream_ops.mmap,msync:x.stream_ops.msync}},link:{node:{getattr:x.node_ops.getattr,setattr:x.node_ops.setattr,readlink:x.node_ops.readlink},stream:{}},chrdev:{node:{getattr:x.node_ops.getattr,setattr:x.node_ops.setattr},stream:u.chrdev_stream_ops}};var _=u.createNode(e,t,r,n);return u.isDir(_.mode)?(_.node_ops=x.ops_table.dir.node,_.stream_ops=x.ops_table.dir.stream,_.contents={}):u.isFile(_.mode)?(_.node_ops=x.ops_table.file.node,_.stream_ops=x.ops_table.file.stream,_.usedBytes=0,_.contents=null):u.isLink(_.mode)?(_.node_ops=x.ops_table.link.node,_.stream_ops=x.ops_table.link.stream):u.isChrdev(_.mode)&&(_.node_ops=x.ops_table.chrdev.node,_.stream_ops=x.ops_table.chrdev.stream),_.atime=_.mtime=_.ctime=Date.now(),e&&(e.contents[t]=_,e.atime=e.mtime=e.ctime=_.atime),_},getFileDataAsTypedArray(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){var n=1024*1024;t=Math.max(t,r*(r<n?2:1.125)>>>0),r!=0&&(t=Math.max(t,256));var _=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(_.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,t){if(e.usedBytes!=t)if(t==0)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr(e){var t={};return t.dev=u.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,u.isDir(e.mode)?t.size=4096:u.isFile(e.mode)?t.size=e.usedBytes:u.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.atime),t.mtime=new Date(e.mtime),t.ctime=new Date(e.ctime),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(e,t){for(const r of["mode","atime","mtime","ctime"])t[r]&&(e[r]=t[r]);t.size!==void 0&&x.resizeFileStorage(e,t.size)},lookup(e,t){throw x.doesNotExistError},mknod(e,t,r,n){return x.createNode(e,t,r,n)},rename(e,t,r){var n;try{n=u.lookupNode(t,r)}catch{}if(n){if(u.isDir(e.mode))for(var _ in n.contents)throw new u.ErrnoError(55);u.hashRemoveNode(n)}delete e.parent.contents[e.name],t.contents[r]=e,e.name=r,t.ctime=t.mtime=e.parent.ctime=e.parent.mtime=Date.now()},unlink(e,t){delete e.contents[t],e.ctime=e.mtime=Date.now()},rmdir(e,t){var r=u.lookupNode(e,t);for(var n in r.contents)throw new u.ErrnoError(55);delete e.contents[t],e.ctime=e.mtime=Date.now()},readdir(e){return[".","..",...Object.keys(e.contents)]},symlink(e,t,r){var n=x.createNode(e,t,41471,0);return n.link=r,n},readlink(e){if(!u.isLink(e.mode))throw new u.ErrnoError(28);return e.link}},stream_ops:{read(e,t,r,n,_){var c=e.node.contents;if(_>=e.node.usedBytes)return 0;var h=Math.min(e.node.usedBytes-_,n);if(h>8&&c.subarray)t.set(c.subarray(_,_+h),r);else for(var d=0;d<h;d++)t[r+d]=c[_+d];return h},write(e,t,r,n,_,c){if(t.buffer===q.buffer&&(c=!1),!n)return 0;var h=e.node;if(h.mtime=h.ctime=Date.now(),t.subarray&&(!h.contents||h.contents.subarray)){if(c)return h.contents=t.subarray(r,r+n),h.usedBytes=n,n;if(h.usedBytes===0&&_===0)return h.contents=t.slice(r,r+n),h.usedBytes=n,n;if(_+n<=h.usedBytes)return h.contents.set(t.subarray(r,r+n),_),n}if(x.expandFileStorage(h,_+n),h.contents.subarray&&t.subarray)h.contents.set(t.subarray(r,r+n),_);else for(var d=0;d<n;d++)h.contents[_+d]=t[r+d];return h.usedBytes=Math.max(h.usedBytes,_+n),n},llseek(e,t,r){var n=t;if(r===1?n+=e.position:r===2&&u.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new u.ErrnoError(28);return n},allocate(e,t,r){x.expandFileStorage(e.node,t+r),e.node.usedBytes=Math.max(e.node.usedBytes,t+r)},mmap(e,t,r,n,_){if(!u.isFile(e.node.mode))throw new u.ErrnoError(43);var c,h,d=e.node.contents;if(!(_&2)&&d&&d.buffer===q.buffer)h=!1,c=d.byteOffset;else{if(h=!0,c=Ir(t),!c)throw new u.ErrnoError(48);d&&((r>0||r+t<d.length)&&(d.subarray?d=d.subarray(r,r+t):d=Array.prototype.slice.call(d,r,r+t)),q.set(d,c>>>0))}return{ptr:c,allocated:h}},msync(e,t,r,n,_){return x.stream_ops.write(e,t,0,n,r,!1),0}}},fn=async e=>{var t=await Ue(e);return new Uint8Array(t)},pn=(e,t,r,n,_,c)=>{u.createDataFile(e,t,r,n,_,c)},Mn=i.preloadPlugins||[],kn=(e,t,r,n)=>{typeof Browser<"u"&&Browser.init();var _=!1;return Mn.forEach(c=>{_||c.canHandle(t)&&(c.handle(e,t,r,n),_=!0)}),_},Sn=(e,t,r,n,_,c,h,d,p,v)=>{var w=t?et.resolve(Y.join2(e,t)):e;function C(D){function P(G){v?.(),d||pn(e,t,G,n,_,p),c?.(),ti()}kn(D,w,P,()=>{h?.(),ti()})||P(D)}mr(),typeof r=="string"?fn(r).then(C,h):C(r)},vn=e=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},r=t[e];if(typeof r>"u")throw new Error(`Unknown file open mode: ${e}`);return r},si=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},u={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:class{name="ErrnoError";constructor(e){this.errno=e}},filesystems:null,syncFSRequests:0,readFiles:{},FSStream:class{shared={};get object(){return this.node}set object(e){this.node=e}get isRead(){return(this.flags&2097155)!==1}get isWrite(){return(this.flags&2097155)!==0}get isAppend(){return this.flags&1024}get flags(){return this.shared.flags}set flags(e){this.shared.flags=e}get position(){return this.shared.position}set position(e){this.shared.position=e}},FSNode:class{node_ops={};stream_ops={};readMode=365;writeMode=146;mounted=null;constructor(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.id=u.nextInode++,this.name=t,this.mode=r,this.rdev=n,this.atime=this.mtime=this.ctime=Date.now()}get read(){return(this.mode&this.readMode)===this.readMode}set read(e){e?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(e){e?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return u.isDir(this.mode)}get isDevice(){return u.isChrdev(this.mode)}},lookupPath(e,t={}){if(!e)return{path:"",node:null};t.follow_mount??=!0,Y.isAbs(e)||(e=u.cwd()+"/"+e);e:for(var r=0;r<40;r++){for(var n=e.split("/").filter(v=>!!v&&v!=="."),_=u.root,c="/",h=0;h<n.length;h++){var d=h===n.length-1;if(d&&t.parent)break;if(n[h]===".."){c=Y.dirname(c),_=_.parent;continue}c=Y.join2(c,n[h]);try{_=u.lookupNode(_,n[h])}catch(v){if(v?.errno===44&&d&&t.noent_okay)return{path:c};throw v}if(u.isMountpoint(_)&&(!d||t.follow_mount)&&(_=_.mounted.root),u.isLink(_.mode)&&(!d||t.follow)){if(!_.node_ops.readlink)throw new u.ErrnoError(52);var p=_.node_ops.readlink(_);Y.isAbs(p)||(p=Y.dirname(c)+"/"+p),e=p+"/"+n.slice(h+1).join("/");continue e}}return{path:c,node:_}}throw new u.ErrnoError(32)},getPath(e){for(var t;;){if(u.isRoot(e)){var r=e.mount.mountpoint;return t?r[r.length-1]!=="/"?`${r}/${t}`:r+t:r}t=t?`${e.name}/${t}`:e.name,e=e.parent}},hashName(e,t){for(var r=0,n=0;n<t.length;n++)r=(r<<5)-r+t.charCodeAt(n)|0;return(e+r>>>0)%u.nameTable.length},hashAddNode(e){var t=u.hashName(e.parent.id,e.name);e.name_next=u.nameTable[t],u.nameTable[t]=e},hashRemoveNode(e){var t=u.hashName(e.parent.id,e.name);if(u.nameTable[t]===e)u.nameTable[t]=e.name_next;else for(var r=u.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode(e,t){var r=u.mayLookup(e);if(r)throw new u.ErrnoError(r);for(var n=u.hashName(e.id,t),_=u.nameTable[n];_;_=_.name_next){var c=_.name;if(_.parent.id===e.id&&c===t)return _}return u.lookup(e,t)},createNode(e,t,r,n){var _=new u.FSNode(e,t,r,n);return u.hashAddNode(_),_},destroyNode(e){u.hashRemoveNode(e)},isRoot(e){return e===e.parent},isMountpoint(e){return!!e.mounted},isFile(e){return(e&61440)===32768},isDir(e){return(e&61440)===16384},isLink(e){return(e&61440)===40960},isChrdev(e){return(e&61440)===8192},isBlkdev(e){return(e&61440)===24576},isFIFO(e){return(e&61440)===4096},isSocket(e){return(e&49152)===49152},flagsToPermissionString(e){var t=["r","w","rw"][e&3];return e&512&&(t+="w"),t},nodePermissions(e,t){return u.ignorePermissions?0:t.includes("r")&&!(e.mode&292)||t.includes("w")&&!(e.mode&146)||t.includes("x")&&!(e.mode&73)?2:0},mayLookup(e){if(!u.isDir(e.mode))return 54;var t=u.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate(e,t){if(!u.isDir(e.mode))return 54;try{var r=u.lookupNode(e,t);return 20}catch{}return u.nodePermissions(e,"wx")},mayDelete(e,t,r){var n;try{n=u.lookupNode(e,t)}catch(c){return c.errno}var _=u.nodePermissions(e,"wx");if(_)return _;if(r){if(!u.isDir(n.mode))return 54;if(u.isRoot(n)||u.getPath(n)===u.cwd())return 10}else if(u.isDir(n.mode))return 31;return 0},mayOpen(e,t){return e?u.isLink(e.mode)?32:u.isDir(e.mode)&&(u.flagsToPermissionString(t)!=="r"||t&512)?31:u.nodePermissions(e,u.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=u.MAX_OPEN_FDS;e++)if(!u.streams[e])return e;throw new u.ErrnoError(33)},getStreamChecked(e){var t=u.getStream(e);if(!t)throw new u.ErrnoError(8);return t},getStream:e=>u.streams[e],createStream(e,t=-1){return e=Object.assign(new u.FSStream,e),t==-1&&(t=u.nextfd()),e.fd=t,u.streams[t]=e,e},closeStream(e){u.streams[e]=null},dupStream(e,t=-1){var r=u.createStream(e,t);return r.stream_ops?.dup?.(r),r},chrdev_stream_ops:{open(e){var t=u.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open?.(e)},llseek(){throw new u.ErrnoError(70)}},major:e=>e>>8,minor:e=>e&255,makedev:(e,t)=>e<<8|t,registerDevice(e,t){u.devices[e]={stream_ops:t}},getDevice:e=>u.devices[e],getMounts(e){for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push(...n.mounts)}return t},syncfs(e,t){typeof e=="function"&&(t=e,e=!1),u.syncFSRequests++,u.syncFSRequests>1&&Be(`warning: ${u.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var r=u.getMounts(u.root.mount),n=0;function _(h){return u.syncFSRequests--,t(h)}function c(h){if(h)return c.errored?void 0:(c.errored=!0,_(h));++n>=r.length&&_(null)}r.forEach(h=>{if(!h.type.syncfs)return c(null);h.type.syncfs(h,e,c)})},mount(e,t,r){var n=r==="/",_=!r,c;if(n&&u.root)throw new u.ErrnoError(10);if(!n&&!_){var h=u.lookupPath(r,{follow_mount:!1});if(r=h.path,c=h.node,u.isMountpoint(c))throw new u.ErrnoError(10);if(!u.isDir(c.mode))throw new u.ErrnoError(54)}var d={type:e,opts:t,mountpoint:r,mounts:[]},p=e.mount(d);return p.mount=d,d.root=p,n?u.root=p:c&&(c.mounted=d,c.mount&&c.mount.mounts.push(d)),p},unmount(e){var t=u.lookupPath(e,{follow_mount:!1});if(!u.isMountpoint(t.node))throw new u.ErrnoError(28);var r=t.node,n=r.mounted,_=u.getMounts(n);Object.keys(u.nameTable).forEach(h=>{for(var d=u.nameTable[h];d;){var p=d.name_next;_.includes(d.mount)&&u.destroyNode(d),d=p}}),r.mounted=null;var c=r.mount.mounts.indexOf(n);r.mount.mounts.splice(c,1)},lookup(e,t){return e.node_ops.lookup(e,t)},mknod(e,t,r){var n=u.lookupPath(e,{parent:!0}),_=n.node,c=Y.basename(e);if(!c||c==="."||c==="..")throw new u.ErrnoError(28);var h=u.mayCreate(_,c);if(h)throw new u.ErrnoError(h);if(!_.node_ops.mknod)throw new u.ErrnoError(63);return _.node_ops.mknod(_,c,t,r)},statfs(e){var t={bsize:4096,frsize:4096,blocks:1e6,bfree:5e5,bavail:5e5,files:u.nextInode,ffree:u.nextInode-1,fsid:42,flags:2,namelen:255},r=u.lookupPath(e,{follow:!0}).node;return r?.node_ops.statfs&&Object.assign(t,r.node_ops.statfs(r.mount.opts.root)),t},create(e,t=438){return t&=4095,t|=32768,u.mknod(e,t,0)},mkdir(e,t=511){return t&=1023,t|=16384,u.mknod(e,t,0)},mkdirTree(e,t){for(var r=e.split("/"),n="",_=0;_<r.length;++_)if(r[_]){n+="/"+r[_];try{u.mkdir(n,t)}catch(c){if(c.errno!=20)throw c}}},mkdev(e,t,r){return typeof r>"u"&&(r=t,t=438),t|=8192,u.mknod(e,t,r)},symlink(e,t){if(!et.resolve(e))throw new u.ErrnoError(44);var r=u.lookupPath(t,{parent:!0}),n=r.node;if(!n)throw new u.ErrnoError(44);var _=Y.basename(t),c=u.mayCreate(n,_);if(c)throw new u.ErrnoError(c);if(!n.node_ops.symlink)throw new u.ErrnoError(63);return n.node_ops.symlink(n,_,e)},rename(e,t){var r=Y.dirname(e),n=Y.dirname(t),_=Y.basename(e),c=Y.basename(t),h,d,p;if(h=u.lookupPath(e,{parent:!0}),d=h.node,h=u.lookupPath(t,{parent:!0}),p=h.node,!d||!p)throw new u.ErrnoError(44);if(d.mount!==p.mount)throw new u.ErrnoError(75);var v=u.lookupNode(d,_),w=et.relative(e,n);if(w.charAt(0)!==".")throw new u.ErrnoError(28);if(w=et.relative(t,r),w.charAt(0)!==".")throw new u.ErrnoError(55);var C;try{C=u.lookupNode(p,c)}catch{}if(v!==C){var D=u.isDir(v.mode),P=u.mayDelete(d,_,D);if(P)throw new u.ErrnoError(P);if(P=C?u.mayDelete(p,c,D):u.mayCreate(p,c),P)throw new u.ErrnoError(P);if(!d.node_ops.rename)throw new u.ErrnoError(63);if(u.isMountpoint(v)||C&&u.isMountpoint(C))throw new u.ErrnoError(10);if(p!==d&&(P=u.nodePermissions(d,"w"),P))throw new u.ErrnoError(P);u.hashRemoveNode(v);try{d.node_ops.rename(v,p,c),v.parent=p}catch(G){throw G}finally{u.hashAddNode(v)}}},rmdir(e){var t=u.lookupPath(e,{parent:!0}),r=t.node,n=Y.basename(e),_=u.lookupNode(r,n),c=u.mayDelete(r,n,!0);if(c)throw new u.ErrnoError(c);if(!r.node_ops.rmdir)throw new u.ErrnoError(63);if(u.isMountpoint(_))throw new u.ErrnoError(10);r.node_ops.rmdir(r,n),u.destroyNode(_)},readdir(e){var t=u.lookupPath(e,{follow:!0}),r=t.node;if(!r.node_ops.readdir)throw new u.ErrnoError(54);return r.node_ops.readdir(r)},unlink(e){var t=u.lookupPath(e,{parent:!0}),r=t.node;if(!r)throw new u.ErrnoError(44);var n=Y.basename(e),_=u.lookupNode(r,n),c=u.mayDelete(r,n,!1);if(c)throw new u.ErrnoError(c);if(!r.node_ops.unlink)throw new u.ErrnoError(63);if(u.isMountpoint(_))throw new u.ErrnoError(10);r.node_ops.unlink(r,n),u.destroyNode(_)},readlink(e){var t=u.lookupPath(e),r=t.node;if(!r)throw new u.ErrnoError(44);if(!r.node_ops.readlink)throw new u.ErrnoError(28);return r.node_ops.readlink(r)},stat(e,t){var r=u.lookupPath(e,{follow:!t}),n=r.node;if(!n)throw new u.ErrnoError(44);if(!n.node_ops.getattr)throw new u.ErrnoError(63);return n.node_ops.getattr(n)},lstat(e){return u.stat(e,!0)},chmod(e,t,r){var n;if(typeof e=="string"){var _=u.lookupPath(e,{follow:!r});n=_.node}else n=e;if(!n.node_ops.setattr)throw new u.ErrnoError(63);n.node_ops.setattr(n,{mode:t&4095|n.mode&-4096,ctime:Date.now()})},lchmod(e,t){u.chmod(e,t,!0)},fchmod(e,t){var r=u.getStreamChecked(e);u.chmod(r.node,t)},chown(e,t,r,n){var _;if(typeof e=="string"){var c=u.lookupPath(e,{follow:!n});_=c.node}else _=e;if(!_.node_ops.setattr)throw new u.ErrnoError(63);_.node_ops.setattr(_,{timestamp:Date.now()})},lchown(e,t,r){u.chown(e,t,r,!0)},fchown(e,t,r){var n=u.getStreamChecked(e);u.chown(n.node,t,r)},truncate(e,t){if(t<0)throw new u.ErrnoError(28);var r;if(typeof e=="string"){var n=u.lookupPath(e,{follow:!0});r=n.node}else r=e;if(!r.node_ops.setattr)throw new u.ErrnoError(63);if(u.isDir(r.mode))throw new u.ErrnoError(31);if(!u.isFile(r.mode))throw new u.ErrnoError(28);var _=u.nodePermissions(r,"w");if(_)throw new u.ErrnoError(_);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate(e,t){var r=u.getStreamChecked(e);if(!(r.flags&2097155))throw new u.ErrnoError(28);u.truncate(r.node,t)},utime(e,t,r){var n=u.lookupPath(e,{follow:!0}),_=n.node;_.node_ops.setattr(_,{atime:t,mtime:r})},open(e,t,r=438){if(e==="")throw new u.ErrnoError(44);t=typeof t=="string"?vn(t):t,t&64?r=r&4095|32768:r=0;var n;if(typeof e=="object")n=e;else{var _=u.lookupPath(e,{follow:!(t&131072),noent_okay:!0});n=_.node,e=_.path}var c=!1;if(t&64)if(n){if(t&128)throw new u.ErrnoError(20)}else n=u.mknod(e,r,0),c=!0;if(!n)throw new u.ErrnoError(44);if(u.isChrdev(n.mode)&&(t&=-513),t&65536&&!u.isDir(n.mode))throw new u.ErrnoError(54);if(!c){var h=u.mayOpen(n,t);if(h)throw new u.ErrnoError(h)}t&512&&!c&&u.truncate(n,0),t&=-131713;var d=u.createStream({node:n,path:u.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return d.stream_ops.open&&d.stream_ops.open(d),i.logReadFiles&&!(t&1)&&(e in u.readFiles||(u.readFiles[e]=1)),d},close(e){if(u.isClosed(e))throw new u.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(t){throw t}finally{u.closeStream(e.fd)}e.fd=null},isClosed(e){return e.fd===null},llseek(e,t,r){if(u.isClosed(e))throw new u.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new u.ErrnoError(70);if(r!=0&&r!=1&&r!=2)throw new u.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read(e,t,r,n,_){if(n<0||_<0)throw new u.ErrnoError(28);if(u.isClosed(e))throw new u.ErrnoError(8);if((e.flags&2097155)===1)throw new u.ErrnoError(8);if(u.isDir(e.node.mode))throw new u.ErrnoError(31);if(!e.stream_ops.read)throw new u.ErrnoError(28);var c=typeof _<"u";if(!c)_=e.position;else if(!e.seekable)throw new u.ErrnoError(70);var h=e.stream_ops.read(e,t,r,n,_);return c||(e.position+=h),h},write(e,t,r,n,_,c){if(n<0||_<0)throw new u.ErrnoError(28);if(u.isClosed(e))throw new u.ErrnoError(8);if(!(e.flags&2097155))throw new u.ErrnoError(8);if(u.isDir(e.node.mode))throw new u.ErrnoError(31);if(!e.stream_ops.write)throw new u.ErrnoError(28);e.seekable&&e.flags&1024&&u.llseek(e,0,2);var h=typeof _<"u";if(!h)_=e.position;else if(!e.seekable)throw new u.ErrnoError(70);var d=e.stream_ops.write(e,t,r,n,_,c);return h||(e.position+=d),d},allocate(e,t,r){if(u.isClosed(e))throw new u.ErrnoError(8);if(t<0||r<=0)throw new u.ErrnoError(28);if(!(e.flags&2097155))throw new u.ErrnoError(8);if(!u.isFile(e.node.mode)&&!u.isDir(e.node.mode))throw new u.ErrnoError(43);if(!e.stream_ops.allocate)throw new u.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap(e,t,r,n,_){if(n&2&&!(_&2)&&(e.flags&2097155)!==2)throw new u.ErrnoError(2);if((e.flags&2097155)===1)throw new u.ErrnoError(2);if(!e.stream_ops.mmap)throw new u.ErrnoError(43);if(!t)throw new u.ErrnoError(28);return e.stream_ops.mmap(e,t,r,n,_)},msync(e,t,r,n,_){return e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,_):0},ioctl(e,t,r){if(!e.stream_ops.ioctl)throw new u.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile(e,t={}){if(t.flags=t.flags||0,t.encoding=t.encoding||"binary",t.encoding!=="utf8"&&t.encoding!=="binary")throw new Error(`Invalid encoding type "${t.encoding}"`);var r,n=u.open(e,t.flags),_=u.stat(e),c=_.size,h=new Uint8Array(c);return u.read(n,h,0,c,0),t.encoding==="utf8"?r=tt(h):t.encoding==="binary"&&(r=h),u.close(n),r},writeFile(e,t,r={}){r.flags=r.flags||577;var n=u.open(e,r.flags,r.mode);if(typeof t=="string"){var _=new Uint8Array(it(t)+1),c=oi(t,_,0,_.length);u.write(n,_,0,c,void 0,r.canOwn)}else if(ArrayBuffer.isView(t))u.write(n,t,0,t.byteLength,void 0,r.canOwn);else throw new Error("Unsupported data type");u.close(n)},cwd:()=>u.currentPath,chdir(e){var t=u.lookupPath(e,{follow:!0});if(t.node===null)throw new u.ErrnoError(44);if(!u.isDir(t.node.mode))throw new u.ErrnoError(54);var r=u.nodePermissions(t.node,"x");if(r)throw new u.ErrnoError(r);u.currentPath=t.path},createDefaultDirectories(){u.mkdir("/tmp"),u.mkdir("/home"),u.mkdir("/home/web_user")},createDefaultDevices(){u.mkdir("/dev"),u.registerDevice(u.makedev(1,3),{read:()=>0,write:(n,_,c,h,d)=>h,llseek:()=>0}),u.mkdev("/dev/null",u.makedev(1,3)),Ve.register(u.makedev(5,0),Ve.default_tty_ops),Ve.register(u.makedev(6,0),Ve.default_tty1_ops),u.mkdev("/dev/tty",u.makedev(5,0)),u.mkdev("/dev/tty1",u.makedev(6,0));var e=new Uint8Array(1024),t=0,r=()=>(t===0&&(t=ai(e).byteLength),e[--t]);u.createDevice("/dev","random",r),u.createDevice("/dev","urandom",r),u.mkdir("/dev/shm"),u.mkdir("/dev/shm/tmp")},createSpecialDirectories(){u.mkdir("/proc");var e=u.mkdir("/proc/self");u.mkdir("/proc/self/fd"),u.mount({mount(){var t=u.createNode(e,"fd",16895,73);return t.stream_ops={llseek:x.stream_ops.llseek},t.node_ops={lookup(r,n){var _=+n,c=u.getStreamChecked(_),h={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>c.path},id:_+1};return h.parent=h,h},readdir(){return Array.from(u.streams.entries()).filter(([r,n])=>n).map(([r,n])=>r.toString())}},t}},{},"/proc/self/fd")},createStandardStreams(e,t,r){e?u.createDevice("/dev","stdin",e):u.symlink("/dev/tty","/dev/stdin"),t?u.createDevice("/dev","stdout",null,t):u.symlink("/dev/tty","/dev/stdout"),r?u.createDevice("/dev","stderr",null,r):u.symlink("/dev/tty1","/dev/stderr"),u.open("/dev/stdin",0),u.open("/dev/stdout",1),u.open("/dev/stderr",1)},staticInit(){u.nameTable=new Array(4096),u.mount(x,{},"/"),u.createDefaultDirectories(),u.createDefaultDevices(),u.createSpecialDirectories(),u.filesystems={MEMFS:x}},init(e,t,r){u.initialized=!0,e??=i.stdin,t??=i.stdout,r??=i.stderr,u.createStandardStreams(e,t,r)},quit(){u.initialized=!1;for(var e=0;e<u.streams.length;e++){var t=u.streams[e];t&&u.close(t)}},findObject(e,t){var r=u.analyzePath(e,t);return r.exists?r.object:null},analyzePath(e,t){try{var r=u.lookupPath(e,{follow:!t});e=r.path}catch{}var n={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var r=u.lookupPath(e,{parent:!0});n.parentExists=!0,n.parentPath=r.path,n.parentObject=r.node,n.name=Y.basename(e),r=u.lookupPath(e,{follow:!t}),n.exists=!0,n.path=r.path,n.object=r.node,n.name=r.node.name,n.isRoot=r.path==="/"}catch(_){n.error=_.errno}return n},createPath(e,t,r,n){e=typeof e=="string"?e:u.getPath(e);for(var _=t.split("/").reverse();_.length;){var c=_.pop();if(c){var h=Y.join2(e,c);try{u.mkdir(h)}catch{}e=h}}return h},createFile(e,t,r,n,_){var c=Y.join2(typeof e=="string"?e:u.getPath(e),t),h=si(n,_);return u.create(c,h)},createDataFile(e,t,r,n,_,c){var h=t;e&&(e=typeof e=="string"?e:u.getPath(e),h=t?Y.join2(e,t):e);var d=si(n,_),p=u.create(h,d);if(r){if(typeof r=="string"){for(var v=new Array(r.length),w=0,C=r.length;w<C;++w)v[w]=r.charCodeAt(w);r=v}u.chmod(p,d|146);var D=u.open(p,577);u.write(D,r,0,r.length,0,c),u.close(D),u.chmod(p,d)}},createDevice(e,t,r,n){var _=Y.join2(typeof e=="string"?e:u.getPath(e),t),c=si(!!r,!!n);u.createDevice.major??=64;var h=u.makedev(u.createDevice.major++,0);return u.registerDevice(h,{open(d){d.seekable=!1},close(d){n?.buffer?.length&&n(10)},read(d,p,v,w,C){for(var D=0,P=0;P<w;P++){var G;try{G=r()}catch{throw new u.ErrnoError(29)}if(G===void 0&&D===0)throw new u.ErrnoError(6);if(G==null)break;D++,p[v+P]=G}return D&&(d.node.atime=Date.now()),D},write(d,p,v,w,C){for(var D=0;D<w;D++)try{n(p[v+D])}catch{throw new u.ErrnoError(29)}return w&&(d.node.mtime=d.node.ctime=Date.now()),D}}),u.mkdev(_,c,h)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.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.");try{e.contents=Ke(e.url),e.usedBytes=e.contents.length}catch{throw new u.ErrnoError(29)}},createLazyFile(e,t,r,n,_){class c{lengthKnown=!1;chunks=[];get(P){if(!(P>this.length-1||P<0)){var G=P%this.chunkSize,V=P/this.chunkSize|0;return this.getter(V)[G]}}setDataGetter(P){this.getter=P}cacheLength(){var P=new XMLHttpRequest;if(P.open("HEAD",r,!1),P.send(null),!(P.status>=200&&P.status<300||P.status===304))throw new Error("Couldn't load "+r+". Status: "+P.status);var G=Number(P.getResponseHeader("Content-length")),V,ae=(V=P.getResponseHeader("Accept-Ranges"))&&V==="bytes",K=(V=P.getResponseHeader("Content-Encoding"))&&V==="gzip",ne=1024*1024;ae||(ne=G);var O=(me,Re)=>{if(me>Re)throw new Error("invalid range ("+me+", "+Re+") or no bytes requested!");if(Re>G-1)throw new Error("only "+G+" bytes available! programmer error!");var J=new XMLHttpRequest;if(J.open("GET",r,!1),G!==ne&&J.setRequestHeader("Range","bytes="+me+"-"+Re),J.responseType="arraybuffer",J.overrideMimeType&&J.overrideMimeType("text/plain; charset=x-user-defined"),J.send(null),!(J.status>=200&&J.status<300||J.status===304))throw new Error("Couldn't load "+r+". Status: "+J.status);return J.response!==void 0?new Uint8Array(J.response||[]):vr(J.responseText||"")},qe=this;qe.setDataGetter(me=>{var Re=me*ne,J=(me+1)*ne-1;if(J=Math.min(J,G-1),typeof qe.chunks[me]>"u"&&(qe.chunks[me]=O(Re,J)),typeof qe.chunks[me]>"u")throw new Error("doXHR failed!");return qe.chunks[me]}),(K||!G)&&(ne=G=1,G=this.getter(0).length,ne=G,Zt("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=G,this._chunkSize=ne,this.lengthKnown=!0}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}if(typeof XMLHttpRequest<"u"){if(!y)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var h=new c,d={isDevice:!1,contents:h}}else var d={isDevice:!1,url:r};var p=u.createFile(e,t,d,n,_);d.contents?p.contents=d.contents:d.url&&(p.contents=null,p.url=d.url),Object.defineProperties(p,{usedBytes:{get:function(){return this.contents.length}}});var v={},w=Object.keys(p.stream_ops);w.forEach(D=>{var P=p.stream_ops[D];v[D]=(...G)=>(u.forceLoadFile(p),P(...G))});function C(D,P,G,V,ae){var K=D.node.contents;if(ae>=K.length)return 0;var ne=Math.min(K.length-ae,V);if(K.slice)for(var O=0;O<ne;O++)P[G+O]=K[ae+O];else for(var O=0;O<ne;O++)P[G+O]=K.get(ae+O);return ne}return v.read=(D,P,G,V,ae)=>(u.forceLoadFile(p),C(D,P,G,V,ae)),v.mmap=(D,P,G,V,ae)=>{u.forceLoadFile(p);var K=Ir(P);if(!K)throw new u.ErrnoError(48);return C(D,q,K,P,G),{ptr:K,allocated:!0}},p.stream_ops=v,p}},_i=(e,t)=>(e>>>=0,e?tt(se,e,t):""),R={DEFAULT_POLLMASK:5,calculateAt(e,t,r){if(Y.isAbs(t))return t;var n;if(e===-100)n=u.cwd();else{var _=R.getStreamFromFD(e);n=_.path}if(t.length==0){if(!r)throw new u.ErrnoError(44);return n}return n+"/"+t},doStat(e,t,r){var n=e(t);E[r>>>2>>>0]=n.dev,E[r+4>>>2>>>0]=n.mode,W[r+8>>>2>>>0]=n.nlink,E[r+12>>>2>>>0]=n.uid,E[r+16>>>2>>>0]=n.gid,E[r+20>>>2>>>0]=n.rdev,ce[r+24>>>3]=BigInt(n.size),E[r+32>>>2>>>0]=4096,E[r+36>>>2>>>0]=n.blocks;var _=n.atime.getTime(),c=n.mtime.getTime(),h=n.ctime.getTime();return ce[r+40>>>3]=BigInt(Math.floor(_/1e3)),W[r+48>>>2>>>0]=_%1e3*1e3*1e3,ce[r+56>>>3]=BigInt(Math.floor(c/1e3)),W[r+64>>>2>>>0]=c%1e3*1e3*1e3,ce[r+72>>>3]=BigInt(Math.floor(h/1e3)),W[r+80>>>2>>>0]=h%1e3*1e3*1e3,ce[r+88>>>3]=BigInt(n.ino),0},doMsync(e,t,r,n,_){if(!u.isFile(t.node.mode))throw new u.ErrnoError(43);if(n&2)return 0;var c=se.slice(e,e+r);u.msync(t,c,_,r,n)},getStreamFromFD(e){var t=u.getStreamChecked(e);return t},varargs:void 0,getStr(e){var t=_i(e);return t}};function wn(e,t){e>>>=0;try{return e=R.getStr(e),u.chmod(e,t),0}catch(r){if(typeof u>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}function In(e,t,r,n){t>>>=0;try{if(t=R.getStr(t),t=R.calculateAt(e,t),r&-8)return-28;var _=u.lookupPath(t,{follow:!0}),c=_.node;if(!c)return-44;var h="";return r&4&&(h+="r"),r&2&&(h+="w"),r&1&&(h+="x"),h&&u.nodePermissions(c,h)?-2:0}catch(d){if(typeof u>"u"||d.name!=="ErrnoError")throw d;return-d.errno}}function yn(e,t,r,n){r=Ee(r),n=Ee(n);try{if(isNaN(r))return 61;var _=R.getStreamFromFD(e);return u.allocate(_,r,n),0}catch(c){if(typeof u>"u"||c.name!=="ErrnoError")throw c;return-c.errno}}function Cn(e,t){try{return u.fchmod(e,t),0}catch(r){if(typeof u>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}var Ft=()=>{var e=E[+R.varargs>>>2>>>0];return R.varargs+=4,e},rt=Ft;function Dn(e,t,r){r>>>=0,R.varargs=r;try{var n=R.getStreamFromFD(e);switch(t){case 0:{var _=Ft();if(_<0)return-28;for(;u.streams[_];)_++;var c;return c=u.dupStream(n,_),c.fd}case 1:case 2:return 0;case 3:return n.flags;case 4:{var _=Ft();return n.flags|=_,0}case 12:{var _=rt(),h=0;return he[_+h>>>1>>>0]=2,0}case 13:case 14:return 0}return-28}catch(d){if(typeof u>"u"||d.name!=="ErrnoError")throw d;return-d.errno}}function Pn(e,t){t>>>=0;try{var r=R.getStreamFromFD(e);return R.doStat(u.stat,r.path,t)}catch(n){if(typeof u>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}var Te=(e,t,r)=>oi(e,se,t,r);function En(e,t){e>>>=0,t>>>=0;try{if(t===0)return-28;var r=u.cwd(),n=it(r)+1;return t<n?-68:(Te(r,e,t),n)}catch(_){if(typeof u>"u"||_.name!=="ErrnoError")throw _;return-_.errno}}function Tn(e,t,r){t>>>=0,r>>>=0;try{var n=R.getStreamFromFD(e);n.getdents||=u.readdir(n.path);for(var _=280,c=0,h=u.llseek(n,0,1),d=Math.floor(h/_),p=Math.min(n.getdents.length,d+Math.floor(r/_)),v=d;v<p;v++){var w,C,D=n.getdents[v];if(D===".")w=n.node.id,C=4;else if(D===".."){var P=u.lookupPath(n.path,{parent:!0});w=P.node.id,C=4}else{var G;try{G=u.lookupNode(n.node,D)}catch(V){if(V?.errno===28)continue;throw V}w=G.id,C=u.isChrdev(G.mode)?2:u.isDir(G.mode)?4:u.isLink(G.mode)?10:8}ce[t+c>>>3]=BigInt(w),ce[t+c+8>>>3]=BigInt((v+1)*_),he[t+c+16>>>1>>>0]=280,q[t+c+18>>>0]=C,Te(D,t+c+19,256),c+=_}return u.llseek(n,v*_,0),c}catch(V){if(typeof u>"u"||V.name!=="ErrnoError")throw V;return-V.errno}}function bn(e,t,r){r>>>=0,R.varargs=r;try{var n=R.getStreamFromFD(e);switch(t){case 21509:return n.tty?0:-59;case 21505:{if(!n.tty)return-59;if(n.tty.ops.ioctl_tcgets){var _=n.tty.ops.ioctl_tcgets(n),c=rt();E[c>>>2>>>0]=_.c_iflag||0,E[c+4>>>2>>>0]=_.c_oflag||0,E[c+8>>>2>>>0]=_.c_cflag||0,E[c+12>>>2>>>0]=_.c_lflag||0;for(var h=0;h<32;h++)q[c+h+17>>>0]=_.c_cc[h]||0;return 0}return 0}case 21510:case 21511:case 21512:return n.tty?0:-59;case 21506:case 21507:case 21508:{if(!n.tty)return-59;if(n.tty.ops.ioctl_tcsets){for(var c=rt(),d=E[c>>>2>>>0],p=E[c+4>>>2>>>0],v=E[c+8>>>2>>>0],w=E[c+12>>>2>>>0],C=[],h=0;h<32;h++)C.push(q[c+h+17>>>0]);return n.tty.ops.ioctl_tcsets(n.tty,t,{c_iflag:d,c_oflag:p,c_cflag:v,c_lflag:w,c_cc:C})}return 0}case 21519:{if(!n.tty)return-59;var c=rt();return E[c>>>2>>>0]=0,0}case 21520:return n.tty?-28:-59;case 21531:{var c=rt();return u.ioctl(n,t,c)}case 21523:{if(!n.tty)return-59;if(n.tty.ops.ioctl_tiocgwinsz){var D=n.tty.ops.ioctl_tiocgwinsz(n.tty),c=rt();he[c>>>1>>>0]=D[0],he[c+2>>>1>>>0]=D[1]}return 0}case 21524:return n.tty?0:-59;case 21515:return n.tty?0:-59;default:return-28}}catch(P){if(typeof u>"u"||P.name!=="ErrnoError")throw P;return-P.errno}}function Gn(e,t){e>>>=0,t>>>=0;try{return e=R.getStr(e),R.doStat(u.lstat,e,t)}catch(r){if(typeof u>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}function An(e,t,r,n){t>>>=0,r>>>=0;try{t=R.getStr(t);var _=n&256,c=n&4096;return n=n&-6401,t=R.calculateAt(e,t,c),R.doStat(_?u.lstat:u.stat,t,r)}catch(h){if(typeof u>"u"||h.name!=="ErrnoError")throw h;return-h.errno}}function Rn(e,t,r,n){t>>>=0,n>>>=0,R.varargs=n;try{t=R.getStr(t),t=R.calculateAt(e,t);var _=n?Ft():0;return u.open(t,r,_).fd}catch(c){if(typeof u>"u"||c.name!=="ErrnoError")throw c;return-c.errno}}function Fn(e,t,r,n){t>>>=0,r>>>=0,n>>>=0;try{if(t=R.getStr(t),t=R.calculateAt(e,t),n<=0)return-28;var _=u.readlink(t),c=Math.min(n,it(_)),h=q[r+c>>>0];return Te(_,r,n+1),q[r+c>>>0]=h,c}catch(d){if(typeof u>"u"||d.name!=="ErrnoError")throw d;return-d.errno}}function xn(e,t,r,n){t>>>=0,n>>>=0;try{return t=R.getStr(t),n=R.getStr(n),t=R.calculateAt(e,t),n=R.calculateAt(r,n),u.rename(t,n),0}catch(_){if(typeof u>"u"||_.name!=="ErrnoError")throw _;return-_.errno}}function Ln(e){e>>>=0;try{return e=R.getStr(e),u.rmdir(e),0}catch(t){if(typeof u>"u"||t.name!=="ErrnoError")throw t;return-t.errno}}function Wn(e,t){e>>>=0,t>>>=0;try{return e=R.getStr(e),R.doStat(u.stat,e,t)}catch(r){if(typeof u>"u"||r.name!=="ErrnoError")throw r;return-r.errno}}function Bn(e,t,r){e>>>=0,r>>>=0;try{return e=R.getStr(e),r=R.getStr(r),r=R.calculateAt(t,r),u.symlink(e,r),0}catch(n){if(typeof u>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}function zn(e,t,r){t>>>=0;try{return t=R.getStr(t),t=R.calculateAt(e,t),r===0?u.unlink(t):r===512?u.rmdir(t):Je("Invalid flags passed to unlinkat"),0}catch(n){if(typeof u>"u"||n.name!=="ErrnoError")throw n;return-n.errno}}var Nn=()=>Je(""),xt={},ci=e=>{for(;e.length;){var t=e.pop(),r=e.pop();r(t)}};function ht(e){return this.fromWireType(W[e>>>2>>>0])}var at={},Xe={},Lt={},yr,Wt=e=>{throw new yr(e)},li=(e,t,r)=>{e.forEach(d=>Lt[d]=t);function n(d){var p=r(d);p.length!==e.length&&Wt("Mismatched type converter count");for(var v=0;v<e.length;++v)pe(e[v],p[v])}var _=new Array(t.length),c=[],h=0;t.forEach((d,p)=>{Xe.hasOwnProperty(d)?_[p]=Xe[d]:(c.push(d),at.hasOwnProperty(d)||(at[d]=[]),at[d].push(()=>{_[p]=Xe[d],++h,h===c.length&&n(_)}))}),c.length===0&&n(_)},Hn=function(e){e>>>=0;var t=xt[e];delete xt[e];var r=t.rawConstructor,n=t.rawDestructor,_=t.fields,c=_.map(h=>h.getterReturnType).concat(_.map(h=>h.setterArgumentType));li([e],c,h=>{var d={};return _.forEach((p,v)=>{var w=p.fieldName,C=h[v],D=p.getter,P=p.getterContext,G=h[v+_.length],V=p.setter,ae=p.setterContext;d[w]={read:K=>C.fromWireType(D(P,K)),write:(K,ne)=>{var O=[];V(ae,K,G.toWireType(O,ne)),ci(O)}}}),[{name:t.name,fromWireType:p=>{var v={};for(var w in d)v[w]=d[w].read(p);return n(p),v},toWireType:(p,v)=>{for(var w in d)if(!(w in v))throw new TypeError(`Missing field: "${w}"`);var C=r();for(w in d)d[w].write(C,v[w]);return p!==null&&p.push(n,C),C},argPackAdvance:Me,readValueFromPointer:ht,destructorFunction:n}]})},Bt=e=>{if(e===null)return"null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e},$n=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Cr=e},Cr,re=e=>{for(var t="",r=e;se[r>>>0];)t+=Cr[se[r++>>>0]];return t},dt,j=e=>{throw new dt(e)};function Un(e,t,r={}){var n=t.name;if(e||j(`type "${n}" must have a positive integer typeid pointer`),Xe.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;j(`Cannot register type '${n}' twice`)}if(Xe[e]=t,delete Lt[e],at.hasOwnProperty(e)){var _=at[e];delete at[e],_.forEach(c=>c())}}function pe(e,t,r={}){return Un(e,t,r)}var Dr=(e,t,r)=>{switch(t){case 1:return r?n=>q[n>>>0]:n=>se[n>>>0];case 2:return r?n=>he[n>>>1>>>0]:n=>lt[n>>>1>>>0];case 4:return r?n=>E[n>>>2>>>0]:n=>W[n>>>2>>>0];case 8:return r?n=>ce[n>>>3]:n=>lr[n>>>3];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}};function jn(e,t,r,n,_){e>>>=0,t>>>=0,r>>>=0,t=re(t);var c=t.indexOf("u")!=-1;pe(e,{name:t,fromWireType:h=>h,toWireType:function(h,d){if(typeof d!="bigint"&&typeof d!="number")throw new TypeError(`Cannot convert "${Bt(d)}" to ${this.name}`);return typeof d=="number"&&(d=BigInt(d)),d},argPackAdvance:Me,readValueFromPointer:Dr(t,r,!c),destructorFunction:null})}var Me=8;function Yn(e,t,r,n){e>>>=0,t>>>=0,t=re(t),pe(e,{name:t,fromWireType:function(_){return!!_},toWireType:function(_,c){return c?r:n},argPackAdvance:Me,readValueFromPointer:function(_){return this.fromWireType(se[_>>>0])},destructorFunction:null})}var Vn=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),gi=e=>{function t(r){return r.$$.ptrType.registeredClass.name}j(t(e)+" instance already deleted")},ui=!1,Pr=e=>{},Xn=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},Er=e=>{e.count.value-=1;var t=e.count.value===0;t&&Xn(e)},Tr=(e,t,r)=>{if(t===r)return e;if(r.baseClass===void 0)return null;var n=Tr(e,t,r.baseClass);return n===null?null:r.downcast(n)},br={},qn={},On=(e,t)=>{for(t===void 0&&j("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},Qn=(e,t)=>(t=On(e,t),qn[t]),zt=(e,t)=>{(!t.ptrType||!t.ptr)&&Wt("makeClassHandle requires ptr and ptrType");var r=!!t.smartPtrType,n=!!t.smartPtr;return r!==n&&Wt("Both smartPtrType and smartPtr must be specified"),t.count={value:1},mt(Object.create(e,{$$:{value:t,writable:!0}}))};function Kn(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=Qn(this.registeredClass,t);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function _(){return this.isSmartPointer?zt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):zt(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var c=this.registeredClass.getActualType(t),h=br[c];if(!h)return _.call(this);var d;this.isConst?d=h.constPointerType:d=h.pointerType;var p=Tr(t,this.registeredClass,d.registeredClass);return p===null?_.call(this):this.isSmartPointer?zt(d.registeredClass.instancePrototype,{ptrType:d,ptr:p,smartPtrType:this,smartPtr:e}):zt(d.registeredClass.instancePrototype,{ptrType:d,ptr:p})}var mt=e=>typeof FinalizationRegistry>"u"?(mt=t=>t,e):(ui=new FinalizationRegistry(t=>{Er(t.$$)}),mt=t=>{var r=t.$$,n=!!r.smartPtr;if(n){var _={$$:r};ui.register(t,_,t)}return t},Pr=t=>ui.unregister(t),mt(e)),Jn=()=>{Object.assign(Nt.prototype,{isAliasOf(e){if(!(this instanceof Nt)||!(e instanceof Nt))return!1;var t=this.$$.ptrType.registeredClass,r=this.$$.ptr;e.$$=e.$$;for(var n=e.$$.ptrType.registeredClass,_=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)_=n.upcast(_),n=n.baseClass;return t===n&&r===_},clone(){if(this.$$.ptr||gi(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=mt(Object.create(Object.getPrototypeOf(this),{$$:{value:Vn(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||gi(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&j("Object already scheduled for deletion"),Pr(this),Er(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||gi(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&j("Object already scheduled for deletion"),this.$$.deleteScheduled=!0,this}})};function Nt(){}var nt=(e,t)=>Object.defineProperty(t,"name",{value:e}),Zn=(e,t,r)=>{if(e[t].overloadTable===void 0){var n=e[t];e[t]=function(..._){return e[t].overloadTable.hasOwnProperty(_.length)||j(`Function '${r}' called with an invalid number of arguments (${_.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[_.length].apply(this,_)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}},hi=(e,t,r)=>{i.hasOwnProperty(e)?((r===void 0||i[e].overloadTable!==void 0&&i[e].overloadTable[r]!==void 0)&&j(`Cannot register public name '${e}' twice`),Zn(i,e,e),i[e].overloadTable.hasOwnProperty(r)&&j(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),i[e].overloadTable[r]=t):(i[e]=t,i[e].argCount=r)},eo=48,to=57,io=e=>{e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=eo&&t<=to?`_${e}`:e};function ro(e,t,r,n,_,c,h,d){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=_,this.getActualType=c,this.upcast=h,this.downcast=d,this.pureVirtualFunctions=[]}var di=(e,t,r)=>{for(;t!==r;)t.upcast||j(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function ao(e,t){if(t===null)return this.isReference&&j(`null is not a valid ${this.name}`),0;t.$$||j(`Cannot pass "${Bt(t)}" as a ${this.name}`),t.$$.ptr||j(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass,n=di(t.$$.ptr,r,this.registeredClass);return n}function no(e,t){var r;if(t===null)return this.isReference&&j(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,r),r):0;(!t||!t.$$)&&j(`Cannot pass "${Bt(t)}" as a ${this.name}`),t.$$.ptr||j(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&j(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;if(r=di(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&j("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:j(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var _=t.clone();r=this.rawShare(r,de.toHandle(()=>_.delete())),e!==null&&e.push(this.rawDestructor,r)}break;default:j("Unsupporting sharing policy")}return r}function oo(e,t){if(t===null)return this.isReference&&j(`null is not a valid ${this.name}`),0;t.$$||j(`Cannot pass "${Bt(t)}" as a ${this.name}`),t.$$.ptr||j(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&j(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass,n=di(t.$$.ptr,r,this.registeredClass);return n}var so=()=>{Object.assign(Ht.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor?.(e)},argPackAdvance:Me,readValueFromPointer:ht,fromWireType:Kn})};function Ht(e,t,r,n,_,c,h,d,p,v,w){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=_,this.pointeeType=c,this.sharingPolicy=h,this.rawGetPointee=d,this.rawConstructor=p,this.rawShare=v,this.rawDestructor=w,!_&&t.baseClass===void 0?n?(this.toWireType=ao,this.destructorFunction=null):(this.toWireType=oo,this.destructorFunction=null):this.toWireType=no}var Gr=(e,t,r)=>{i.hasOwnProperty(e)||Wt("Replacing nonexistent public symbol"),i[e].overloadTable!==void 0&&r!==void 0?i[e].overloadTable[r]=t:(i[e]=t,i[e].argCount=r)},_o=(e,t,r=[])=>{var n=B(t)(...r);return e[0]=="p"?n>>>0:n},co=(e,t)=>(...r)=>_o(e,t,r),be=(e,t)=>{e=re(e);function r(){return e.includes("p")?co(e,t):B(t)}var n=r();return typeof n!="function"&&j(`unknown function pointer with signature ${e}: ${t}`),n},lo=(e,t)=>{var r=nt(t,function(n){this.name=t,this.message=n;var _=new Error(n).stack;_!==void 0&&(this.stack=this.toString()+`
|
|
44
|
+
`+_.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},r},Ar,Rr=e=>{var t=Qr(e),r=re(t);return Ae(t),r},Fr=(e,t)=>{var r=[],n={};function _(c){if(!n[c]&&!Xe[c]){if(Lt[c]){Lt[c].forEach(_);return}r.push(c),n[c]=!0}}throw t.forEach(_),new Ar(`${e}: `+r.map(Rr).join([", "]))};function go(e,t,r,n,_,c,h,d,p,v,w,C,D){e>>>=0,t>>>=0,r>>>=0,n>>>=0,_>>>=0,c>>>=0,h>>>=0,d>>>=0,p>>>=0,v>>>=0,w>>>=0,C>>>=0,D>>>=0,w=re(w),c=be(_,c),d&&=be(h,d),v&&=be(p,v),D=be(C,D);var P=io(w);hi(P,function(){Fr(`Cannot construct ${w} due to unbound types`,[n])}),li([e,t,r],n?[n]:[],G=>{G=G[0];var V,ae;n?(V=G.registeredClass,ae=V.instancePrototype):ae=Nt.prototype;var K=nt(w,function(...J){if(Object.getPrototypeOf(this)!==ne)throw new dt("Use 'new' to construct "+w);if(O.constructor_body===void 0)throw new dt(w+" has no accessible constructor");var ra=O.constructor_body[J.length];if(ra===void 0)throw new dt(`Tried to invoke ctor of ${w} with invalid number of parameters (${J.length}) - expected (${Object.keys(O.constructor_body).toString()}) parameters instead!`);return ra.apply(this,J)}),ne=Object.create(ae,{constructor:{value:K}});K.prototype=ne;var O=new ro(w,K,ne,D,V,c,d,v);O.baseClass&&(O.baseClass.__derivedClasses??=[],O.baseClass.__derivedClasses.push(O));var qe=new Ht(w,O,!0,!1,!1),me=new Ht(w+"*",O,!1,!1,!1),Re=new Ht(w+" const*",O,!1,!0,!1);return br[e]={pointerType:me,constPointerType:Re},Gr(P,K),[qe,me,Re]})}var mi=[],Ge=[];function fi(e){e>>>=0,e>9&&--Ge[e+1]===0&&(Ge[e]=void 0,mi.push(e))}var uo=()=>Ge.length/2-5-mi.length,ho=()=>{Ge.push(0,1,void 0,1,null,1,!0,1,!1,1),i.count_emval_handles=uo},de={toValue:e=>(e||j("Cannot use deleted val. handle = "+e),Ge[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const t=mi.pop()||Ge.length;return Ge[t]=e,Ge[t+1]=1,t}}}},mo={name:"emscripten::val",fromWireType:e=>{var t=de.toValue(e);return fi(e),t},toWireType:(e,t)=>de.toHandle(t),argPackAdvance:Me,readValueFromPointer:ht,destructorFunction:null};function fo(e){return e>>>=0,pe(e,mo)}var po=(e,t,r)=>{switch(t){case 1:return r?function(n){return this.fromWireType(q[n>>>0])}:function(n){return this.fromWireType(se[n>>>0])};case 2:return r?function(n){return this.fromWireType(he[n>>>1>>>0])}:function(n){return this.fromWireType(lt[n>>>1>>>0])};case 4:return r?function(n){return this.fromWireType(E[n>>>2>>>0])}:function(n){return this.fromWireType(W[n>>>2>>>0])};default:throw new TypeError(`invalid integer width (${t}): ${e}`)}};function Mo(e,t,r,n){e>>>=0,t>>>=0,r>>>=0,t=re(t);function _(){}_.values={},pe(e,{name:t,constructor:_,fromWireType:function(c){return this.constructor.values[c]},toWireType:(c,h)=>h.value,argPackAdvance:Me,readValueFromPointer:po(t,r,n),destructorFunction:null}),hi(t,_)}var pi=(e,t)=>{var r=Xe[e];return r===void 0&&j(`${t} has unknown type ${Rr(e)}`),r};function ko(e,t,r){e>>>=0,t>>>=0;var n=pi(e,"enum");t=re(t);var _=n.constructor,c=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:nt(`${n.name}_${t}`,function(){})}});_.values[r]=c,_[t]=c}var So=(e,t)=>{switch(t){case 4:return function(r){return this.fromWireType(Gt[r>>>2>>>0])};case 8:return function(r){return this.fromWireType(At[r>>>3>>>0])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},vo=function(e,t,r){e>>>=0,t>>>=0,r>>>=0,t=re(t),pe(e,{name:t,fromWireType:n=>n,toWireType:(n,_)=>_,argPackAdvance:Me,readValueFromPointer:So(t,r),destructorFunction:null})};function xr(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].destructorFunction===void 0)return!0;return!1}function Lr(e,t){if(!(e instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof e} which is not a function`);var r=nt(e.name||"unknownFunctionName",function(){});r.prototype=e.prototype;var n=new r,_=e.apply(n,t);return _ instanceof Object?_:n}function wo(e,t,r,n){for(var _=xr(e),c=e.length-2,h=[],d=["fn"],p=0;p<c;++p)h.push(`arg${p}`),d.push(`arg${p}Wired`);h=h.join(","),d=d.join(",");var v=`return function (${h}) {
|
|
45
|
+
`;_&&(v+=`var destructors = [];
|
|
46
|
+
`);for(var w=_?"destructors":"null",C=["humanName","throwBindingError","invoker","fn","runDestructors","retType","classParam"],p=0;p<c;++p)v+=`var arg${p}Wired = argType${p}['toWireType'](${w}, arg${p});
|
|
47
|
+
`,C.push(`argType${p}`);if(v+=(r||n?"var rv = ":"")+`invoker(${d});
|
|
48
|
+
`,_)v+=`runDestructors(destructors);
|
|
49
|
+
`;else for(var p=2;p<e.length;++p){var D=p===1?"thisWired":"arg"+(p-2)+"Wired";e[p].destructorFunction!==null&&(v+=`${D}_dtor(${D});
|
|
50
|
+
`,C.push(`${D}_dtor`))}return r&&(v+=`var ret = retType['fromWireType'](rv);
|
|
56
51
|
return ret;
|
|
57
|
-
`),
|
|
58
|
-
`,
|
|
59
|
-
`,
|
|
60
|
-
`,
|
|
61
|
-
|
|
62
|
-
`)
|
|
63
|
-
`),b+=`};
|
|
64
|
-
`,m.push(b);var D=ea(Function,m).apply(null,f);return g=Xs(D),ra[o]=g,g}function Qs(r){r>4&&(fe.get(r).refcount+=1)}function Js(){return he.toHandle([])}function Ks(r){return he.toHandle(na(r))}function Zs(){return he.toHandle({})}function Os(r,a,i){r=he.toValue(r),a=he.toValue(a),i=he.toValue(i),r[a]=i}function eu(r,a){r=In(r,"_emval_take_value");var i=r.readValueFromPointer(a);return he.toHandle(i)}function aa(r){return L[r>>>2]+G[r+4>>>2]*4294967296}var tu=(r,a)=>{var i=new Date(aa(r)*1e3);G[a>>>2]=i.getUTCSeconds(),G[a+4>>>2]=i.getUTCMinutes(),G[a+8>>>2]=i.getUTCHours(),G[a+12>>>2]=i.getUTCDate(),G[a+16>>>2]=i.getUTCMonth(),G[a+20>>>2]=i.getUTCFullYear()-1900,G[a+24>>>2]=i.getUTCDay();var s=Date.UTC(i.getUTCFullYear(),0,1,0,0,0,0),o=(i.getTime()-s)/(1e3*60*60*24)|0;G[a+28>>>2]=o},It=r=>r%4===0&&(r%100!==0||r%400===0),nu=[0,31,60,91,121,152,182,213,244,274,305,335],ru=[0,31,59,90,120,151,181,212,243,273,304,334],ia=r=>{var a=It(r.getFullYear()),i=a?nu:ru,s=i[r.getMonth()]+r.getDate()-1;return s},au=(r,a)=>{var i=new Date(aa(r)*1e3);G[a>>>2]=i.getSeconds(),G[a+4>>>2]=i.getMinutes(),G[a+8>>>2]=i.getHours(),G[a+12>>>2]=i.getDate(),G[a+16>>>2]=i.getMonth(),G[a+20>>>2]=i.getFullYear()-1900,G[a+24>>>2]=i.getDay();var s=ia(i)|0;G[a+28>>>2]=s,G[a+36>>>2]=-(i.getTimezoneOffset()*60);var o=new Date(i.getFullYear(),0,1),g=new Date(i.getFullYear(),6,1).getTimezoneOffset(),m=o.getTimezoneOffset(),f=(g!=m&&i.getTimezoneOffset()==Math.min(m,g))|0;G[a+32>>>2]=f},iu=r=>{var a=new Date(G[r+20>>>2]+1900,G[r+16>>>2],G[r+12>>>2],G[r+8>>>2],G[r+4>>>2],G[r>>>2],0),i=G[r+32>>>2],s=a.getTimezoneOffset(),o=new Date(a.getFullYear(),0,1),g=new Date(a.getFullYear(),6,1).getTimezoneOffset(),m=o.getTimezoneOffset(),f=Math.min(m,g);if(i<0)G[r+32>>>2]=+(g!=m&&f==s);else if(i>0!=(f==s)){var d=Math.max(m,g),y=i>0?f:d;a.setTime(a.getTime()+(y-s)*6e4)}G[r+24>>>2]=a.getDay();var v=ia(a)|0;return G[r+28>>>2]=v,G[r>>>2]=a.getSeconds(),G[r+4>>>2]=a.getMinutes(),G[r+8>>>2]=a.getHours(),G[r+12>>>2]=a.getDate(),G[r+16>>>2]=a.getMonth(),G[r+20>>>2]=a.getYear(),a.getTime()/1e3|0};function su(r,a,i,s,o,g,m){try{if(o=Ve(o),isNaN(o))return-61;var f=T.getStreamFromFD(s),d=l.mmap(f,r,o,a,i),y=d.ptr;return G[g>>>2]=d.allocated,y>>>=0,L[m>>>2]=y,0}catch(v){if(typeof l>"u"||v.name!=="ErrnoError")throw v;return-v.errno}}function uu(r,a,i,s,o,g){try{if(g=Ve(g),isNaN(g))return-61;var m=T.getStreamFromFD(o);i&2&&T.doMsync(r,m,a,s,g),l.munmap(m)}catch(f){if(typeof l>"u"||f.name!=="ErrnoError")throw f;return-f.errno}}var sa=r=>{var a=je(r)+1,i=qt(a);return i&&et(r,i,a),i},ou=(r,a,i)=>{var s=new Date().getFullYear(),o=new Date(s,0,1),g=new Date(s,6,1),m=o.getTimezoneOffset(),f=g.getTimezoneOffset(),d=Math.max(m,f);L[r>>>2]=d*60,G[a>>>2]=+(m!=f);function y(R){var Y=R.toTimeString().match(/\(([A-Za-z ]+)\)$/);return Y?Y[1]:"GMT"}var v=y(o),b=y(g),M=sa(v),D=sa(b);f<m?(L[i>>>2]=M,L[i+4>>>2]=D):(L[i>>>2]=D,L[i+4>>>2]=M)},_u=()=>{Ce("")};function lu(){return Date.now()}var ua=()=>4294901760,cu=()=>ua(),oa;oa=()=>performance.now();var gu=(r,a,i)=>ie.copyWithin(r>>>0,a>>>0,a+i>>>0),mu=r=>{var a=Lt.buffer,i=r-a.byteLength+65535>>>16;try{return Lt.grow(i),Pr(),1}catch{}},fu=r=>{var a=ie.length;r=r>>>0;var i=ua();if(r>i)return!1;for(var s=(d,y)=>d+(y-d%y)%y,o=1;o<=4;o*=2){var g=a*(1+.2/o);g=Math.min(g,r+100663296);var m=Math.min(i,s(Math.max(r,g),65536)),f=mu(m);if(f)return!0}return!1},Dn={},pu=()=>h||"./this.program",Mt=()=>{if(!Mt.strings){var r=(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:r,_:pu()};for(var i in Dn)Dn[i]===void 0?delete a[i]:a[i]=Dn[i];var s=[];for(var i in a)s.push(`${i}=${a[i]}`);Mt.strings=s}return Mt.strings},hu=(r,a)=>{for(var i=0;i<r.length;++i)q[a++>>>0]=r.charCodeAt(i);q[a>>>0]=0},du=(r,a)=>{var i=0;return Mt().forEach(function(s,o){var g=a+i;L[r+o*4>>>2]=g,hu(s,g),i+=s.length+1}),0},yu=(r,a)=>{var i=Mt();L[r>>>2]=i.length;var s=0;return i.forEach(function(o){s+=o.length+1}),L[a>>>2]=s,0},_a=r=>{Xa()||(e.onExit&&e.onExit(r),ln=!0),S(r,new ri(r))},wu=(r,a)=>{_a(r)},Su=wu;function ku(r){try{var a=T.getStreamFromFD(r);return l.close(a),0}catch(i){if(typeof l>"u"||i.name!=="ErrnoError")throw i;return i.errno}}function vu(r,a){try{var i=0,s=0,o=0,g=T.getStreamFromFD(r),m=g.tty?2:l.isDir(g.mode)?3:l.isLink(g.mode)?7:4;return q[a>>>0]=m,le[a+2>>>1]=o,ce[a+8>>3]=BigInt(i),ce[a+16>>3]=BigInt(s),0}catch(f){if(typeof l>"u"||f.name!=="ErrnoError")throw f;return f.errno}}var la=(r,a,i,s)=>{for(var o=0,g=0;g<i;g++){var m=L[a>>>2],f=L[a+4>>>2];a+=8;var d=l.read(r,q,m,f,s);if(d<0)return-1;if(o+=d,d<f)break;typeof s<"u"&&(s+=d)}return o};function Iu(r,a,i,s,o){try{if(s=Ve(s),isNaN(s))return 61;var g=T.getStreamFromFD(r),m=la(g,a,i,s);return L[o>>>2]=m,0}catch(f){if(typeof l>"u"||f.name!=="ErrnoError")throw f;return f.errno}}var ca=(r,a,i,s)=>{for(var o=0,g=0;g<i;g++){var m=L[a>>>2],f=L[a+4>>>2];a+=8;var d=l.write(r,q,m,f,s);if(d<0)return-1;o+=d,typeof s<"u"&&(s+=d)}return o};function Mu(r,a,i,s,o){try{if(s=Ve(s),isNaN(s))return 61;var g=T.getStreamFromFD(r),m=ca(g,a,i,s);return L[o>>>2]=m,0}catch(f){if(typeof l>"u"||f.name!=="ErrnoError")throw f;return f.errno}}function Du(r,a,i,s){try{var o=T.getStreamFromFD(r),g=la(o,a,i);return L[s>>>2]=g,0}catch(m){if(typeof l>"u"||m.name!=="ErrnoError")throw m;return m.errno}}function bu(r,a,i,s){try{if(a=Ve(a),isNaN(a))return 61;var o=T.getStreamFromFD(r);return l.llseek(o,a,i),ce[s>>3]=BigInt(o.position),o.getdents&&a===0&&i===0&&(o.getdents=null),0}catch(g){if(typeof l>"u"||g.name!=="ErrnoError")throw g;return g.errno}}function Cu(r){try{var a=T.getStreamFromFD(r);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 Gu(r,a,i,s){try{var o=T.getStreamFromFD(r),g=ca(o,a,i);return L[s>>>2]=g,0}catch(m){if(typeof l>"u"||m.name!=="ErrnoError")throw m;return m.errno}}var Pu=(r,a)=>(mn(ie.subarray(r>>>0,r+a>>>0)),0),Au=(r,a)=>{for(var i=0,s=0;s<=a;i+=r[s++]);return i},ga=[31,29,31,30,31,30,31,31,30,31,30,31],ma=[31,28,31,30,31,30,31,31,30,31,30,31],Tu=(r,a)=>{for(var i=new Date(r.getTime());a>0;){var s=It(i.getFullYear()),o=i.getMonth(),g=(s?ga:ma)[o];if(a>g-i.getDate())a-=g-i.getDate()+1,i.setDate(1),o<11?i.setMonth(o+1):(i.setMonth(0),i.setFullYear(i.getFullYear()+1));else return i.setDate(i.getDate()+a),i}return i},Ru=(r,a)=>{q.set(r,a>>>0)},fa=(r,a,i,s)=>{var o=G[s+40>>>2],g={tm_sec:G[s>>>2],tm_min:G[s+4>>>2],tm_hour:G[s+8>>>2],tm_mday:G[s+12>>>2],tm_mon:G[s+16>>>2],tm_year:G[s+20>>>2],tm_wday:G[s+24>>>2],tm_yday:G[s+28>>>2],tm_isdst:G[s+32>>>2],tm_gmtoff:G[s+36>>>2],tm_zone:o?ft(o):""},m=ft(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 d in f)m=m.replace(new RegExp(d,"g"),f[d]);var y=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],v=["January","February","March","April","May","June","July","August","September","October","November","December"];function b(I,P,ee){for(var V=typeof I=="number"?I.toString():I||"";V.length<P;)V=ee[0]+V;return V}function M(I,P){return b(I,P,"0")}function D(I,P){function ee(ge){return ge<0?-1:ge>0?1:0}var V;return(V=ee(I.getFullYear()-P.getFullYear()))===0&&(V=ee(I.getMonth()-P.getMonth()))===0&&(V=ee(I.getDate()-P.getDate())),V}function R(I){switch(I.getDay()){case 0:return new Date(I.getFullYear()-1,11,29);case 1:return I;case 2:return new Date(I.getFullYear(),0,3);case 3:return new Date(I.getFullYear(),0,2);case 4:return new Date(I.getFullYear(),0,1);case 5:return new Date(I.getFullYear()-1,11,31);case 6:return new Date(I.getFullYear()-1,11,30)}}function Y(I){var P=Tu(new Date(I.tm_year+1900,0,1),I.tm_yday),ee=new Date(P.getFullYear(),0,4),V=new Date(P.getFullYear()+1,0,4),ge=R(ee),O=R(V);return D(ge,P)<=0?D(O,P)<=0?P.getFullYear()+1:P.getFullYear():P.getFullYear()-1}var Z={"%a":I=>y[I.tm_wday].substring(0,3),"%A":I=>y[I.tm_wday],"%b":I=>v[I.tm_mon].substring(0,3),"%B":I=>v[I.tm_mon],"%C":I=>{var P=I.tm_year+1900;return M(P/100|0,2)},"%d":I=>M(I.tm_mday,2),"%e":I=>b(I.tm_mday,2," "),"%g":I=>Y(I).toString().substring(2),"%G":I=>Y(I),"%H":I=>M(I.tm_hour,2),"%I":I=>{var P=I.tm_hour;return P==0?P=12:P>12&&(P-=12),M(P,2)},"%j":I=>M(I.tm_mday+Au(It(I.tm_year+1900)?ga:ma,I.tm_mon-1),3),"%m":I=>M(I.tm_mon+1,2),"%M":I=>M(I.tm_min,2),"%n":()=>`
|
|
65
|
-
`,"%p":I=>I.tm_hour>=0&&I.tm_hour<12?"AM":"PM","%S":I=>M(I.tm_sec,2),"%t":()=>" ","%u":I=>I.tm_wday||7,"%U":I=>{var P=I.tm_yday+7-I.tm_wday;return M(Math.floor(P/7),2)},"%V":I=>{var P=Math.floor((I.tm_yday+7-(I.tm_wday+6)%7)/7);if((I.tm_wday+371-I.tm_yday-2)%7<=2&&P++,P){if(P==53){var V=(I.tm_wday+371-I.tm_yday)%7;V!=4&&(V!=3||!It(I.tm_year))&&(P=1)}}else{P=52;var ee=(I.tm_wday+7-I.tm_yday-1)%7;(ee==4||ee==5&&It(I.tm_year%400-1))&&P++}return M(P,2)},"%w":I=>I.tm_wday,"%W":I=>{var P=I.tm_yday+7-(I.tm_wday+6)%7;return M(Math.floor(P/7),2)},"%y":I=>(I.tm_year+1900).toString().substring(2),"%Y":I=>I.tm_year+1900,"%z":I=>{var P=I.tm_gmtoff,ee=P>=0;return P=Math.abs(P)/60,P=P/60*100+P%60,(ee?"+":"-")+("0000"+P).slice(-4)},"%Z":I=>I.tm_zone,"%%":()=>"%"};m=m.replace(/%%/g,"\0\0");for(var d in Z)m.includes(d)&&(m=m.replace(new RegExp(d,"g"),Z[d](g)));m=m.replace(/\0\0/g,"%");var X=xt(m,!1);return X.length>a?0:(Ru(X,r),X.length-1)},Eu=(r,a,i,s,o)=>fa(r,a,i,s),Wu=r=>r?(Hr(52),-1):0;function pa(r,a){r<128?a.push(r):a.push(r%128|128,r>>7)}function Lu(r){for(var a={i:"i32",j:"i64",f:"f32",d:"f64",p:"i32"},i={parameters:[],results:r[0]=="v"?[]:[a[r[0]]]},s=1;s<r.length;++s)i.parameters.push(a[r[s]]);return i}function Bu(r,a){var i=r.slice(0,1),s=r.slice(1),o={i:127,p:127,j:126,f:125,d:124};a.push(96),pa(s.length,a);for(var g=0;g<s.length;++g)a.push(o[s[g]]);i=="v"?a.push(0):a.push(1,o[i])}function zu(r,a){if(typeof WebAssembly.Function=="function")return new WebAssembly.Function(Lu(a),r);var i=[1];Bu(a,i);var s=[0,97,115,109,1,0,0,0,1];pa(i.length,s),s.push.apply(s,i),s.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var o=new WebAssembly.Module(new Uint8Array(s)),g=new WebAssembly.Instance(o,{e:{f:r}}),m=g.exports.f;return m}function Nu(r,a){if(nt)for(var i=r;i<r+a;i++){var s=N(i);s&&nt.set(s,i)}}var nt=void 0;function xu(r){return nt||(nt=new WeakMap,Nu(0,$e.length)),nt.get(r)||0}var ha=[];function Hu(){if(ha.length)return ha.pop();try{$e.grow(1)}catch(r){throw r instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":r}return $e.length-1}var da=(r,a)=>{$e.set(r,a),mt[r]=$e.get(r)};function Uu(r,a){var i=xu(r);if(i)return i;var s=Hu();try{da(s,r)}catch(g){if(!(g instanceof TypeError))throw g;var o=zu(r,a);da(s,o)}return nt.set(r,s),s}var ya=function(r,a,i,s){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=l.nextInode++,this.name=a,this.mode=i,this.node_ops={},this.stream_ops={},this.rdev=s},Xt=365,Vt=146;Object.defineProperties(ya.prototype,{read:{get:function(){return(this.mode&Xt)===Xt},set:function(r){r?this.mode|=Xt:this.mode&=~Xt}},write:{get:function(){return(this.mode&Vt)===Vt},set:function(r){r?this.mode|=Vt:this.mode&=~Vt}},isFolder:{get:function(){return l.isDir(this.mode)}},isDevice:{get:function(){return l.isChrdev(this.mode)}}}),l.FSNode=ya,l.createPreloadedFile=di,l.staticInit(),Fr=e.InternalError=hn(Error,"InternalError"),Fi(),dt=e.BindingError=hn(Error,"BindingError"),is(),Ki(),fs(),Jr=e.UnboundTypeError=hn(Error,"UnboundTypeError"),ys();var Fu={ga:si,H:_i,a:li,G:ui,ya:wi,za:Si,ja:Ii,va:Mi,K:Di,S:bi,qa:Ci,fa:Gi,Ba:Pi,sa:Ai,ta:Ti,I:Ri,ea:Ei,_a:Wi,$a:Li,ua:Bi,Za:zi,Q:Ni,Na:Ui,W:$i,Fa:Yi,N:ps,Ea:ws,x:ks,f:vs,V:Ms,q:Cs,w:Gs,o:Ps,U:As,L:zs,Oa:Ns,M:xs,Ga:Hs,wa:Fs,Va:$s,La:js,m:Or,Ma:qs,E:Qs,Y:Js,u:Ks,F:Zs,s:Os,p:eu,ma:tu,na:au,oa:iu,ka:su,la:uu,Xa:ou,c:_u,z:lu,Ya:cu,D:oa,xa:gu,Wa:fu,Ca:du,Da:yu,y:Su,B:ku,R:vu,ia:Iu,ha:Mu,T:Du,pa:bu,ra:Cu,J:Gu,da:Pu,Qa:so,P:eo,d:Xu,e:ju,g:Yu,j:Ju,ca:io,b:to,ba:_o,n:Ou,aa:lo,Ka:ho,Ja:yo,v:no,Sa:ro,t:Zu,Ta:Ku,O:uo,l:Vu,h:qu,$:co,_:go,k:$u,i:Qu,r:oo,Pa:fo,X:po,Ia:wo,Z:mo,Ha:So,Ra:ao,Aa:_a,C:fa,Ua:Eu,A:Wu};ni(),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 qt=e._malloc=function(){return(qt=e._malloc=e.asm.Sj).apply(null,arguments)},Te=e._free=function(){return(Te=e._free=e.asm.Tj).apply(null,arguments)},Dt=function(){return(Dt=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 wa=function(){return(wa=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 Sa=function(){return(Sa=e.asm.go).apply(null,arguments)};e.__embind_initialize_bindings=function(){return(e.__embind_initialize_bindings=e.asm.ho).apply(null,arguments)};var ka=function(){return(ka=e.asm.io).apply(null,arguments)},H=function(){return(H=e.asm.jo).apply(null,arguments)},U=function(){return(U=e.asm.ko).apply(null,arguments)},F=function(){return(F=e.asm.lo).apply(null,arguments)},va=function(){return(va=e.asm.mo).apply(null,arguments)},Ia=function(){return(Ia=e.asm.no).apply(null,arguments)};function $u(r,a,i,s){var o=U();try{N(r)(a,i,s)}catch(g){if(F(o),g!==g+0)throw g;H(1,0)}}function Yu(r,a,i,s){var o=U();try{return N(r)(a,i,s)}catch(g){if(F(o),g!==g+0)throw g;H(1,0)}}function ju(r,a,i){var s=U();try{return N(r)(a,i)}catch(o){if(F(s),o!==o+0)throw o;H(1,0)}}function Xu(r,a){var i=U();try{return N(r)(a)}catch(s){if(F(i),s!==s+0)throw s;H(1,0)}}function Vu(r,a){var i=U();try{N(r)(a)}catch(s){if(F(i),s!==s+0)throw s;H(1,0)}}function qu(r,a,i){var s=U();try{N(r)(a,i)}catch(o){if(F(s),o!==o+0)throw o;H(1,0)}}function Qu(r,a,i,s,o){var g=U();try{N(r)(a,i,s,o)}catch(m){if(F(g),m!==m+0)throw m;H(1,0)}}function Ju(r,a,i,s,o){var g=U();try{return N(r)(a,i,s,o)}catch(m){if(F(g),m!==m+0)throw m;H(1,0)}}function Ku(r,a,i,s){var o=U();try{return N(r)(a,i,s)}catch(g){if(F(o),g!==g+0)throw g;return H(1,0),0n}}function Zu(r,a){var i=U();try{return N(r)(a)}catch(s){if(F(i),s!==s+0)throw s;return H(1,0),0n}}function Ou(r,a,i,s,o,g,m,f,d){var y=U();try{return N(r)(a,i,s,o,g,m,f,d)}catch(v){if(F(y),v!==v+0)throw v;H(1,0)}}function eo(r){var a=U();try{return N(r)()}catch(i){if(F(a),i!==i+0)throw i;H(1,0)}}function to(r,a,i,s,o,g,m){var f=U();try{return N(r)(a,i,s,o,g,m)}catch(d){if(F(f),d!==d+0)throw d;H(1,0)}}function no(r,a,i,s,o){var g=U();try{return N(r)(a,i,s,o)}catch(m){if(F(g),m!==m+0)throw m;H(1,0)}}function ro(r,a,i){var s=U();try{return N(r)(a,i)}catch(o){if(F(s),o!==o+0)throw o;H(1,0)}}function ao(r,a,i){var s=U();try{N(r)(a,i)}catch(o){if(F(s),o!==o+0)throw o;H(1,0)}}function io(r,a,i,s,o,g){var m=U();try{return N(r)(a,i,s,o,g)}catch(f){if(F(m),f!==f+0)throw f;H(1,0)}}function so(r,a,i){var s=U();try{return N(r)(a,i)}catch(o){if(F(s),o!==o+0)throw o;H(1,0)}}function uo(r){var a=U();try{N(r)()}catch(i){if(F(a),i!==i+0)throw i;H(1,0)}}function oo(r,a,i,s,o,g){var m=U();try{N(r)(a,i,s,o,g)}catch(f){if(F(m),f!==f+0)throw f;H(1,0)}}function _o(r,a,i,s,o,g,m,f){var d=U();try{return N(r)(a,i,s,o,g,m,f)}catch(y){if(F(d),y!==y+0)throw y;H(1,0)}}function lo(r,a,i,s,o,g,m,f,d,y){var v=U();try{return N(r)(a,i,s,o,g,m,f,d,y)}catch(b){if(F(v),b!==b+0)throw b;H(1,0)}}function co(r,a,i,s){var o=U();try{N(r)(a,i,s)}catch(g){if(F(o),g!==g+0)throw g;H(1,0)}}function go(r,a,i,s,o,g,m,f,d,y,v){var b=U();try{N(r)(a,i,s,o,g,m,f,d,y,v)}catch(M){if(F(b),M!==M+0)throw M;H(1,0)}}function mo(r,a,i,s,o,g,m,f,d,y){var v=U();try{N(r)(a,i,s,o,g,m,f,d,y)}catch(b){if(F(v),b!==b+0)throw b;H(1,0)}}function fo(r,a,i,s,o,g,m){var f=U();try{N(r)(a,i,s,o,g,m)}catch(d){if(F(f),d!==d+0)throw d;H(1,0)}}function po(r,a,i,s,o,g,m,f){var d=U();try{N(r)(a,i,s,o,g,m,f)}catch(y){if(F(d),y!==y+0)throw y;H(1,0)}}function ho(r,a,i,s,o,g,m,f,d,y,v,b){var M=U();try{return N(r)(a,i,s,o,g,m,f,d,y,v,b)}catch(D){if(F(M),D!==D+0)throw D;H(1,0)}}function yo(r,a,i,s,o,g){var m=U();try{return N(r)(a,i,s,o,g)}catch(f){if(F(m),f!==f+0)throw f;H(1,0)}}function wo(r,a,i,s,o,g,m,f,d){var y=U();try{N(r)(a,i,s,o,g,m,f,d)}catch(v){if(F(y),v!==v+0)throw v;H(1,0)}}function So(r,a,i,s,o,g,m,f,d,y,v,b){var M=U();try{N(r)(a,i,s,o,g,m,f,d,y,v,b)}catch(D){if(F(M),D!==D+0)throw D;H(1,0)}}e.addFunction=Uu,e.setValue=ii,e.getValue=ai,e.UTF8ToString=ft,e.stringToUTF8=et,e.lengthBytesUTF8=je,e.FS=l;var Qt;gt=function r(){Qt||Ma(),Qt||(gt=r)};function Ma(){if(Ye>0||(Va(),Ye>0))return;function r(){Qt||(Qt=!0,e.calledRun=!0,!ln&&(qa(),u(e),e.onRuntimeInitialized&&e.onRuntimeInitialized(),Qa()))}e.setStatus?(e.setStatus("Running..."),setTimeout(function(){setTimeout(function(){e.setStatus("")},1),r()},1)):r()}if(e.preInit)for(typeof e.preInit=="function"&&(e.preInit=[e.preInit]);e.preInit.length>0;)e.preInit.pop()();return Ma(),n.ready}})();class Ea{constructor(n){if(n instanceof URL){if(n.protocol!=="http:"&&n.protocol!=="https:")throw new Error("Only http/https protocol is supported");this.locateFile=()=>n.href}else n instanceof WebAssembly.Module?this.instantiateWasm=(e,u)=>{const c=new WebAssembly.Instance(n,e);u(c)}:this.wasmBinary=n}wasmBinary;instantiateWasm;locateFile}class _{loader;api;constructor(){this.loader=(n,e)=>new Promise((u,c)=>{if(this.api!==void 0){u();return}const p=new Ea(n);Ra(p).then(h=>{try{this.writeConfigurationFiles(h,e),en(h,"MAGICK_CONFIGURE_PATH",S=>{en(h,"/xml",C=>{h._Environment_SetEnv(S,C),this.api=h,u()})})}catch(S){c(S)}})})}async _initialize(n,e){await this.loader(n,e)}static get _api(){if(!Wt.api)throw new J("`await initializeImageMagick` should be called to initialize the library");return Wt.api}static set _api(n){Wt.api=n}static read(n,e,u,c){return ne._create(p=>{let h=c;if(typeof n!="string"&&!Ne(n))typeof e=="number"&&typeof u=="number"&&p.read(n,e,u);else if(typeof e!="number"&&typeof u!="number"){h=u;let S;e instanceof we?S=e:typeof e=="string"?(S=new we,S.format=e):h=e,p.read(n,S)}return h(p)})}static readCollection(n,e,u){return Se.create()._use(p=>{let h=u,S;return e instanceof we?S=e:typeof e=="string"?(S=new we,S.format=e):h=e,p.read(n,S),h(p)})}static readFromCanvas(n,e,u){return ne._create(c=>(c.readFromCanvas(n,u),e(c)))}writeConfigurationFiles(n,e){n.FS.analyzePath("/xml").exists||n.FS.mkdir("/xml");for(const c of e.all()){const p=n.FS.open(`/xml/${c.fileName}`,"w"),h=new TextEncoder().encode(c.data);n.FS.write(p,h,0,h.length),n.FS.close(p)}}}const Wt=new _;async function Wa(t,n){await Wt._initialize(t,n??bt.default)}class Yn{constructor(n,e,u){this.origin=n,this.progress=new ae((e+1)/(u*100))}origin;progress;cancel=!1}class se{static _logDelegate=0;static _onLog;static _progressDelegate=0;static _images={};static setLogDelegate(n){se._logDelegate===0&&n!==void 0&&(se._logDelegate=_._api.addFunction(se.logDelegate,"vii")),_._api._Magick_SetLogDelegate(n===void 0?0:se._logDelegate),se._onLog=n}static setProgressDelegate(n){se._progressDelegate===0&&(this._progressDelegate=_._api.addFunction(se.progressDelegate,"iijji")),this._images[n._instance]=n,_._api._MagickImage_SetClientData(n._instance,n._instance),_._api._MagickImage_SetProgressDelegate(n._instance,se._progressDelegate)}static removeProgressDelegate(n){_._api._MagickImage_SetClientData(n._instance,0),_._api._MagickImage_SetProgressDelegate(n._instance,0),delete se._images[n._instance]}static logDelegate(n,e){if(se._onLog===void 0)return;const u=me(e);se._onLog(new Tn(n,u))}static progressDelegate(n,e,u,c){const p=se._images[c];if(p===void 0||p.onProgress===void 0)return 1;const h=Number(e),S=Number(u),C=me(n),W=new Yn(C,h,S);return p.onProgress(W),W.cancel?0:1}}class De{static _allFormats;constructor(n,e,u,c,p){this.format=n,this.description=e,this.supportsMultipleFrames=u,this.supportsReading=c,this.supportsWriting=p}description;format;supportsMultipleFrames;supportsReading;supportsWriting;static get all(){return De._allFormats===void 0&&(De._allFormats=De.loadFormats()),De._allFormats}static loadFormats(){return A.usePointer(n=>Me.use(e=>{const u=_._api._MagickFormatInfo_CreateList(e.ptr,n),c=e.value;try{const p=new Array(c),h=Object.values(ye);for(let S=0;S<c;S++){const C=_._api._MagickFormatInfo_GetInfo(u,S,n),W=me(_._api._MagickFormatInfo_Format_Get(C)),z=De.convertFormat(W,h),ue=me(_._api._MagickFormatInfo_Description_Get(C),""),be=_._api._MagickFormatInfo_SupportsMultipleFrames_Get(C)==1,Le=_._api._MagickFormatInfo_SupportsReading_Get(C)==1,Fe=_._api._MagickFormatInfo_SupportsWriting_Get(C)==1;p[S]=new De(z,ue,be,Le,Fe)}return p}finally{_._api._MagickFormatInfo_DisposeList(u,c)}}))}static convertFormat(n,e){return n===null?ye.Unknown:e.includes(n)?n:ye.Unknown}}var K=(t=>(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))(K||{});class ke{static get delegates(){return me(_._api._Magick_Delegates_Get())}static get features(){return me(_._api._Magick_Features_Get()).slice(0,-1)}static get imageMagickVersion(){return me(_._api._Magick_ImageMagickVersion_Get())}static get supportedFormats(){return De.all}static onLog;static addFont(n,e){const u=_._api.FS;u.analyzePath("/fonts").exists||u.mkdir("/fonts");const p=u.open(`/fonts/${n}`,"w");u.write(p,e,0,e.length),u.close(p)}static resetRandomSeed=()=>_._api._Magick_ResetRandomSeed();static setRandomSeed=n=>_._api._Magick_SetRandomSeed(n);static setLogEvents(n){const e=n==K.None?void 0:ke.logDelegate;se.setLogDelegate(e);const u=ke.getEventTypeString(n);E(u,c=>_._api._Magick_SetLogEvents(c))}static _getFontFileName(n){const e=`/fonts/${n}`;if(!_._api.FS.analyzePath(e).exists)throw`Unable to find a font with the name '${n}', add it with Magick.addFont.`;return e}static getEventTypeString(n){if(n==K.All)return"All,Trace";if(n==K.Detailed)return"All";switch(n){case K.Accelerate:return"Accelerate";case K.Annotate:return"Annotate";case K.Blob:return"Blob";case K.Cache:return"Cache";case K.Coder:return"Coder";case K.Configure:return"Configure";case K.Deprecate:return"Deprecate";case K.Draw:return"Draw";case K.Exception:return"Exception";case K.Image:return"Image";case K.Locale:return"Locale";case K.Module:return"Module";case K.Pixel:return"Pixel";case K.Policy:return"Policy";case K.Resource:return"Resource";case K.Trace:return"Trace";case K.Transform:return"Transform";case K.User:return"User";case K.Wand:return"Wand";case K.None:default:return"None"}}static logDelegate(n){ke.onLog!==void 0&&ke.onLog(n)}}class jn{_font;constructor(n){this._font=n}draw(n){const e=ke._getFontFileName(this._font);n.font(e)}}class Xn{_gravity;constructor(n){this._gravity=n}draw(n){n.gravity(this._gravity)}}class Vn{_startX;_startY;_endX;_endY;constructor(n,e,u,c){this._startX=n,this._startY=e,this._endX=u,this._endY=c}draw(n){n.line(this._startX,this._startY,this._endX,this._endY)}}class qn{_x;_y;constructor(n,e){this._x=n,this._y=e}draw(n){n.point(this._x,this._y)}}class Qn{_upperLeftX;_upperLeftY;_lowerRightX;_lowerRightY;constructor(n,e,u,c){this._upperLeftX=n,this._upperLeftY=e,this._lowerRightX=u,this._lowerRightY=c}draw(n){n.rectangle(this._upperLeftX,this._upperLeftY,this._lowerRightX,this._lowerRightY)}}class Jn{_upperLeftX;_upperLeftY;_lowerRightX;_lowerRightY;_cornerWidth;_cornerHeight;constructor(n,e,u,c,p,h){this._upperLeftX=n,this._upperLeftY=e,this._lowerRightX=u,this._lowerRightY=c,this._cornerWidth=p,this._cornerHeight=h}draw(n){n.roundRectangle(this._upperLeftX,this._upperLeftY,this._lowerRightX,this._lowerRightY,this._cornerWidth,this._cornerHeight)}}class Kn{_color;constructor(n){this._color=n}draw(n){n.strokeColor(this._color)}}class Zn{_width;constructor(n){this._width=n}draw(n){n.strokeWidth(this._width)}}class On{_alignment;constructor(n){this._alignment=n}draw(n){n.textAlignment(this._alignment)}}class Je{_isEnabled;constructor(n){this._isEnabled=n}static get disabled(){return new Je(!1)}static get enabled(){return new Je(!0)}draw(n){n.textAntialias(this._isEnabled)}}class er{_decoration;constructor(n){this._decoration=n}draw(n){n.textDecoration(this._decoration)}}class tr{_spacing;constructor(n){this._spacing=n}draw(n){n.textInterlineSpacing(this._spacing)}}class nr{_spacing;constructor(n){this._spacing=n}draw(n){n.textInterwordspacing(this._spacing)}}class rr{_kerning;constructor(n){this._kerning=n}draw(n){n.textKerning(this._kerning)}}class ar{_color;constructor(n){this._color=n}draw(n){n.textUnderColor(this._color)}}class ir{_x;_y;_value;constructor(n,e,u){this._x=n,this._y=e,this._value=u}draw(n){n.text(this._x,this._y,this._value)}}class sr{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 La{_drawables=[];disableStrokeAntialias(){return this._drawables.push(Je.disabled),this}enableStrokeAntialias(){return this._drawables.push(Je.enabled),this}fillColor(n){return this._drawables.push(new Gn(n)),this}fillOpacity(n){return this._drawables.push(new Pn(n)),this}font(n){return this._drawables.push(new jn(n)),this}fontPointSize(n){return this._drawables.push(new An(n)),this}fontTypeMetrics(n,e=!1){return ne._create(u=>(u.read(sr.Transparent,1,1),it._use(u,c=>(c.draw(this._drawables),c.fontTypeMetrics(n,e)))))}gravity(n){return this._drawables.push(new Xn(n)),this}line(n,e,u,c){return this._drawables.push(new Vn(n,e,u,c)),this}point(n,e){return this._drawables.push(new qn(n,e)),this}rectangle(n,e,u,c){return this._drawables.push(new Qn(n,e,u,c)),this}roundRectangle(n,e,u,c,p,h){return this._drawables.push(new Jn(n,e,u,c,p,h)),this}strokeColor(n){return this._drawables.push(new Kn(n)),this}strokeWidth(n){return this._drawables.push(new Zn(n)),this}text(n,e,u){return this._drawables.push(new ir(n,e,u)),this}textAlignment(n){return this._drawables.push(new On(n)),this}textDecoration(n){return this._drawables.push(new er(n)),this}textInterlineSpacing(n){return this._drawables.push(new tr(n)),this}textInterwordSpacing(n){return this._drawables.push(new nr(n)),this}textKerning(n){return this._drawables.push(new rr(n)),this}textUnderColor(n){return this._drawables.push(new ar(n)),this}draw(n){return n.draw(this._drawables),this}}var ur=(t=>(t[t.Undefined=0]="Undefined",t[t.Kapur=1]="Kapur",t[t.OTSU=2]="OTSU",t[t.Triangle=3]="Triangle",t))(ur||{}),or=(t=>(t[t.Undefined=0]="Undefined",t[t.Direct=1]="Direct",t[t.Pseudo=2]="Pseudo",t))(or||{}),_r=(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))(_r||{}),lr=(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))(lr||{}),sn=(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))(sn||{}),cr=(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))(cr||{}),gr=(t=>(t[t.Undefined=0]="Undefined",t[t.LSB=1]="LSB",t[t.MSB=2]="MSB",t))(gr||{}),mr=(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))(mr||{}),fr=(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))(fr||{}),pr=(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))(pr||{}),hr=(t=>(t[t.Undefined=0]="Undefined",t[t.None=1]="None",t[t.Background=2]="Background",t[t.Previous=3]="Previous",t))(hr||{}),un=(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))(un||{}),dr=(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))(dr||{}),yr=(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))(yr||{}),wr=(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))(wr||{}),on=(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))(on||{}),Sr=(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))(Sr||{}),kr=(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))(kr||{}),vr=(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))(vr||{}),Ir=(t=>(t[t.Undefined=0]="Undefined",t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=3]="Right",t))(Ir||{}),Mr=(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))(Mr||{}),Dr=(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))(Dr||{}),br=(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))(br||{}),Cr=(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))(Cr||{});class Ba extends Cn{constructor(){super(ye.Dng)}disableAutoBrightness;interpolationQuality;outputColor;useAutoWhitebalance;useCameraWhitebalance;getDefines(){const n=[];return this.hasValue(this.interpolationQuality)&&n.push(this.createDefine("interpolation-quality",this.interpolationQuality)),this.hasValue(this.disableAutoBrightness)&&n.push(this.createDefine("no-auto-bright",this.disableAutoBrightness)),this.hasValue(this.outputColor)&&n.push(this.createDefine("output-color",this.outputColor)),this.hasValue(this.useCameraWhitebalance)&&n.push(this.createDefine("use-camera-wb",this.useCameraWhitebalance)),this.hasValue(this.useAutoWhitebalance)&&n.push(this.createDefine("use-auto-wb",this.useAutoWhitebalance)),n}}class _n{_colorSpace=te.Undefined;_compression=sn.Undefined;_density=new xe(0,0);_format=ye.Unknown;_height=0;_interlace=un.Undefined;_orientation=on.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(n,e){ne._create(u=>{u.ping(n,e),this._colorSpace=u.colorSpace,this._compression=u.compression,this._density=u.density,this._format=u.format,this._height=u.height,this._interlace=u.interlace,this._orientation=u.orientation,this._quality=u.quality,this._width=u.width})}static create(n,e){const u=new _n;return u.read(n,e),u}}class za{constructor(n){this.complexOperator=n}complexOperator;signalToNoiseRatio;_setArtifacts(n){this.signalToNoiseRatio!==void 0&&n.setArtifact("complex:snr",this.signalToNoiseRatio)}}class Na{constructor(n){this.method=n}method;bestFit=!1;scale;viewport;_setArtifacts(n){this.scale!==void 0&&n.setArtifact("distort:scale",this.scale.toString()),this.viewport!==void 0&&n.setArtifact("distort:viewport",this.viewport.toString())}}class xa extends Ee{constructor(n){const e=_._api._MontageSettings_Create(),u=_._api._MontageSettings_Dispose;if(super(e,u),n.backgroundColor!==void 0&&n.backgroundColor._use(c=>{_._api._MontageSettings_SetBackgroundColor(this._instance,c)}),n.borderColor!==void 0&&n.borderColor._use(c=>{_._api._MontageSettings_SetBorderColor(this._instance,c)}),n.borderWidth!==void 0&&_._api._MontageSettings_SetBorderWidth(this._instance,n.borderWidth),n.fillColor!==void 0&&n.fillColor._use(c=>{_._api._MontageSettings_SetFillColor(this._instance,c)}),n.font!==void 0){const c=ke._getFontFileName(n.font);E(c,p=>{_._api._MontageSettings_SetFont(this._instance,p)})}n.fontPointsize!==void 0&&_._api._MontageSettings_SetFontPointsize(this._instance,n.fontPointsize),n.frameGeometry!==void 0&&E(n.frameGeometry.toString(),c=>{_._api._MontageSettings_SetFrameGeometry(this._instance,c)}),n.geometry!==void 0&&E(n.geometry.toString(),c=>{_._api._MontageSettings_SetGeometry(this._instance,c)}),n.gravity!==void 0&&_._api._MontageSettings_SetGravity(this._instance,n.gravity),n.shadow!==void 0&&_._api._MontageSettings_SetShadow(this._instance,n.shadow?1:0),n.strokeColor!==void 0&&n.strokeColor._use(c=>{_._api._MontageSettings_SetStrokeColor(this._instance,c)}),n.textureFileName!==void 0&&E(n.textureFileName,c=>{_._api._MontageSettings_SetTextureFileName(this._instance,c)}),n.tileGeometry!==void 0&&E(n.tileGeometry.toString(),c=>{_._api._MontageSettings_SetTileGeometry(this._instance,c)}),n.title!==void 0&&E(n.title,c=>{_._api._MontageSettings_SetTitle(this._instance,c)})}}class Ha{backgroundColor;borderColor;borderWidth;fillColor;font;fontPointsize;frameGeometry;geometry;gravity;label;shadow;strokeColor;textureFileName;tileGeometry;title;transparentColor;_use(n){const e=new xa(this);return _e._disposeAfterExecution(e,n)}}class Ua{constructor(n,e,u){this.method=n,this.kernel=e,u!==void 0&&(this.kernel+=`:${u}`)}channels=Q.Composite;convolveBias;convolveScale;iterations=1;kernel;method}class Fa{constructor(n,e=0){this.minimum=n,this.maximum=e}minimum;maximum;toString(){return this.maximum===0?this.minimum.toString():`${this.minimum}-${this.maximum}`}}k.AlphaOption=Kt,k.AutoThresholdMethod=ur,k.ChannelStatistics=$n,k.Channels=Q,k.ChromaticityInfo=Rn,k.ClassType=or,k.ColorProfile=En,k.ColorSpace=te,k.ColorType=_r,k.CompareResult=Gt,k.CompareSettings=Wn,k.ComplexOperator=lr,k.ComplexSettings=za,k.CompositeOperator=at,k.CompressionMethod=sn,k.ConfigurationFile=Jt,k.ConfigurationFiles=bt,k.ConnectedComponent=Pt,k.ConnectedComponentsSettings=Ln,k.DefinesCreator=Cn,k.Density=xe,k.DensityUnit=Ie,k.DistortMethod=cr,k.DistortSettings=Na,k.DitherMethod=Tt,k.DngInterpolation=br,k.DngOutputColor=Cr,k.DngReadDefines=Ba,k.DrawableColor=Da,k.DrawableFillColor=Gn,k.DrawableFillOpacity=Pn,k.DrawableFont=jn,k.DrawableFontPointSize=An,k.DrawableGravity=Xn,k.DrawableLine=Vn,k.DrawablePoint=qn,k.DrawableRectangle=Qn,k.DrawableRoundRectangle=Jn,k.DrawableStrokeColor=Kn,k.DrawableStrokeWidth=Zn,k.DrawableText=ir,k.DrawableTextAlignment=On,k.DrawableTextAntialias=Je,k.DrawableTextDecoration=er,k.DrawableTextInterlineSpacing=tr,k.DrawableTextInterwordSpacing=nr,k.DrawableTextKerning=rr,k.DrawableTextUnderColor=ar,k.Drawables=La,k.DrawingWand=it,k.Endian=gr,k.ErrorMetric=mr,k.EvaluateOperator=fr,k.FilterType=pr,k.GifDisposeMethod=hr,k.Gravity=st,k.ImageMagick=_,k.ImageProfile=Ot,k.Interlace=un,k.Kernel=dr,k.LogEvent=Tn,k.LogEventTypes=K,k.Magick=ke,k.MagickColor=w,k.MagickColors=sr,k.MagickDefine=Ct,k.MagickError=J,k.MagickErrorInfo=ut,k.MagickErrorSeverity=rt,k.MagickFormat=ye,k.MagickFormatInfo=De,k.MagickGeometry=oe,k.MagickImage=ne,k.MagickImageCollection=Se,k.MagickImageInfo=_n,k.MagickReadSettings=we,k.MagickSettings=Qe,k.MontageSettings=Ha,k.MorphologyMethod=yr,k.MorphologySettings=Ua,k.NativeInstance=Ee,k.NoiseType=wr,k.OrientationType=on,k.PaintMethod=Sr,k.Percentage=ae,k.PixelChannel=$,k.PixelCollection=Ue,k.PixelIntensityMethod=rn,k.PixelInterpolateMethod=kr,k.Point=de,k.PrimaryInfo=We,k.ProgressEvent=Yn,k.QuantizeSettings=Rt,k.Quantum=Re,k.RenderingIntent=vr,k.Statistics=Et,k.TextAlignment=Ir,k.TextDecoration=Mr,k.Threshold=Fa,k.TypeMetric=At,k.VirtualPixelMethod=Dr,k.WarningEvent=an,k._getEdges=Nn,k._isByteArray=Ne,k.initializeImageMagick=Wa,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});
|
|
52
|
+
`),v+=`}
|
|
53
|
+
`,[C,v]}function Io(e,t,r,n,_,c){var h=t.length;h<2&&j("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var d=t[1]!==null&&r!==null,p=xr(t),v=t[0].name!=="void",w=[e,j,n,_,ci,t[0],t[1]],C=0;C<h-2;++C)w.push(t[C+2]);if(!p)for(var C=2;C<t.length;++C)t[C].destructorFunction!==null&&w.push(t[C].destructorFunction);let[D,P]=wo(t,d,v,c);D.push(P);var G=Lr(Function,D)(...w);return nt(e,G)}var yo=(e,t)=>{for(var r=[],n=0;n<e;n++)r.push(W[t+n*4>>>2>>>0]);return r},Co=e=>{e=e.trim();const t=e.indexOf("(");return t!==-1?e.substr(0,t):e};function Do(e,t,r,n,_,c,h,d){e>>>=0,r>>>=0,n>>>=0,_>>>=0,c>>>=0;var p=yo(t,r);e=re(e),e=Co(e),_=be(n,_),hi(e,function(){Fr(`Cannot call ${e} due to unbound types`,p)},t-1),li([],p,v=>{var w=[v[0],null].concat(v.slice(1));return Gr(e,Io(e,w,null,_,c,h),t-1),[]})}function Po(e,t,r,n,_){e>>>=0,t>>>=0,r>>>=0,t=re(t);var c=w=>w;if(n===0){var h=32-8*r;c=w=>w<<h>>>h}var d=t.includes("unsigned"),p=(w,C)=>{},v;d?v=function(w,C){return p(C,this.name),C>>>0}:v=function(w,C){return p(C,this.name),C},pe(e,{name:t,fromWireType:c,toWireType:v,argPackAdvance:Me,readValueFromPointer:Dr(t,r,n!==0),destructorFunction:null})}function Eo(e,t,r){e>>>=0,r>>>=0;var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array],_=n[t];function c(h){var d=W[h>>>2>>>0],p=W[h+4>>>2>>>0];return new _(q.buffer,p,d)}r=re(r),pe(e,{name:r,fromWireType:c,argPackAdvance:Me,readValueFromPointer:c},{ignoreDuplicateRegistrations:!0})}function To(e,t){e>>>=0,t>>>=0,t=re(t),pe(e,{name:t,fromWireType(r){for(var n=W[r>>>2>>>0],_=r+4,c,h,d=_,h=0;h<=n;++h){var p=_+h;if(h==n||se[p>>>0]==0){var v=p-d,w=_i(d,v);c===void 0?c=w:(c+="\0",c+=w),d=p+1}}return Ae(r),c},toWireType(r,n){n instanceof ArrayBuffer&&(n=new Uint8Array(n));var _,c=typeof n=="string";c||n instanceof Uint8Array||n instanceof Uint8ClampedArray||n instanceof Int8Array||j("Cannot pass non-string to std::string"),c?_=it(n):_=n.length;var h=Si(4+_+1),d=h+4;if(W[h>>>2>>>0]=_,c)Te(n,d,_+1);else if(c)for(var p=0;p<_;++p){var v=n.charCodeAt(p);v>255&&(Ae(d),j("String has UTF-16 code units that do not fit in 8 bits")),se[d+p>>>0]=v}else for(var p=0;p<_;++p)se[d+p>>>0]=n[p];return r!==null&&r.push(Ae,h),h},argPackAdvance:Me,readValueFromPointer:ht,destructorFunction(r){Ae(r)}})}var Wr=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,bo=(e,t)=>{for(var r=e,n=r>>1,_=n+t/2;!(n>=_)&<[n>>>0];)++n;if(r=n<<1,r-e>32&&Wr)return Wr.decode(se.subarray(e>>>0,r>>>0));for(var c="",h=0;!(h>=t/2);++h){var d=he[e+h*2>>>1>>>0];if(d==0)break;c+=String.fromCharCode(d)}return c},Go=(e,t,r)=>{if(r??=2147483647,r<2)return 0;r-=2;for(var n=t,_=r<e.length*2?r/2:e.length,c=0;c<_;++c){var h=e.charCodeAt(c);he[t>>>1>>>0]=h,t+=2}return he[t>>>1>>>0]=0,t-n},Ao=e=>e.length*2,Ro=(e,t)=>{for(var r=0,n="";!(r>=t/4);){var _=E[e+r*4>>>2>>>0];if(_==0)break;if(++r,_>=65536){var c=_-65536;n+=String.fromCharCode(55296|c>>10,56320|c&1023)}else n+=String.fromCharCode(_)}return n},Fo=(e,t,r)=>{if(t>>>=0,r??=2147483647,r<4)return 0;for(var n=t,_=n+r-4,c=0;c<e.length;++c){var h=e.charCodeAt(c);if(h>=55296&&h<=57343){var d=e.charCodeAt(++c);h=65536+((h&1023)<<10)|d&1023}if(E[t>>>2>>>0]=h,t+=4,t+4>_)break}return E[t>>>2>>>0]=0,t-n},xo=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&++r,t+=4}return t},Lo=function(e,t,r){e>>>=0,t>>>=0,r>>>=0,r=re(r);var n,_,c,h;t===2?(n=bo,_=Go,h=Ao,c=d=>lt[d>>>1>>>0]):t===4&&(n=Ro,_=Fo,h=xo,c=d=>W[d>>>2>>>0]),pe(e,{name:r,fromWireType:d=>{for(var p=W[d>>>2>>>0],v,w=d+4,C=0;C<=p;++C){var D=d+4+C*t;if(C==p||c(D)==0){var P=D-w,G=n(w,P);v===void 0?v=G:(v+="\0",v+=G),w=D+t}}return Ae(d),v},toWireType:(d,p)=>{typeof p!="string"&&j(`Cannot pass non-string to C++ string type ${r}`);var v=h(p),w=Si(4+v+t);return W[w>>>2>>>0]=v/t,_(p,w+4,v+t),d!==null&&d.push(Ae,w),w},argPackAdvance:Me,readValueFromPointer:ht,destructorFunction(d){Ae(d)}})};function Wo(e,t,r,n,_,c){e>>>=0,t>>>=0,r>>>=0,n>>>=0,_>>>=0,c>>>=0,xt[e]={name:re(t),rawConstructor:be(r,n),rawDestructor:be(_,c),fields:[]}}function Bo(e,t,r,n,_,c,h,d,p,v){e>>>=0,t>>>=0,r>>>=0,n>>>=0,_>>>=0,c>>>=0,h>>>=0,d>>>=0,p>>>=0,v>>>=0,xt[e].fields.push({fieldName:re(t),getterReturnType:r,getter:be(n,_),getterContext:c,setterArgumentType:h,setter:be(d,p),setterContext:v})}var zo=function(e,t){e>>>=0,t>>>=0,t=re(t),pe(e,{isVoid:!0,name:t,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},Br=0,No=()=>{Mr=!1,Br=0};function Ho(e){return e>>>=0,e?-52:0}var $o=()=>{throw 1/0},Uo={},zr=e=>{var t=Uo[e];return t===void 0?re(e):t},Mi=[];function jo(e,t,r,n,_){return e>>>=0,t>>>=0,r>>>=0,n>>>=0,_>>>=0,e=Mi[e],t=de.toValue(t),r=zr(r),e(t,t[r],n,_)}var Yo=e=>{var t=Mi.length;return Mi.push(e),t},Vo=(e,t)=>{for(var r=new Array(e),n=0;n<e;++n)r[n]=pi(W[t+n*4>>>2>>>0],"parameter "+n);return r},Xo=(e,t,r)=>{var n=[],_=e.toWireType(n,r);return n.length&&(W[t>>>2>>>0]=de.toHandle(n)),_};function qo(e,t,r){t>>>=0;var n=Vo(e,t),_=n.shift();e--;var c=`return function (obj, func, destructorsRef, args) {
|
|
54
|
+
`,h=0,d=[];r===0&&d.push("obj");for(var p=["retType"],v=[_],w=0;w<e;++w)d.push("arg"+w),p.push("argType"+w),v.push(n[w]),c+=` var arg${w} = argType${w}.readValueFromPointer(args${h?"+"+h:""});
|
|
55
|
+
`,h+=n[w].argPackAdvance;var C=r===1?"new func":"func.call";c+=` var rv = ${C}(${d.join(", ")});
|
|
56
|
+
`,_.isVoid||(p.push("emval_returnValue"),v.push(Xo),c+=` return emval_returnValue(retType, destructorsRef, rv);
|
|
57
|
+
`),c+=`};
|
|
58
|
+
`,p.push(c);var D=Lr(Function,p)(...v),P=`methodCaller<(${n.map(G=>G.name).join(", ")}) => ${_.name}>`;return Yo(nt(P,D))}function Oo(e){e>>>=0,e>9&&(Ge[e+1]+=1)}function Qo(){return de.toHandle([])}function Ko(e){return e>>>=0,de.toHandle(zr(e))}function Jo(){return de.toHandle({})}function Zo(e){e>>>=0;var t=de.toValue(e);ci(t),fi(e)}function es(e,t,r){e>>>=0,t>>>=0,r>>>=0,e=de.toValue(e),t=de.toValue(t),r=de.toValue(r),e[t]=r}function ts(e,t){e>>>=0,t>>>=0,e=pi(e,"_emval_take_value");var r=e.readValueFromPointer(t);return de.toHandle(r)}function is(e,t){e=Ee(e),t>>>=0;var r=new Date(e*1e3);E[t>>>2>>>0]=r.getUTCSeconds(),E[t+4>>>2>>>0]=r.getUTCMinutes(),E[t+8>>>2>>>0]=r.getUTCHours(),E[t+12>>>2>>>0]=r.getUTCDate(),E[t+16>>>2>>>0]=r.getUTCMonth(),E[t+20>>>2>>>0]=r.getUTCFullYear()-1900,E[t+24>>>2>>>0]=r.getUTCDay();var n=Date.UTC(r.getUTCFullYear(),0,1,0,0,0,0),_=(r.getTime()-n)/(1e3*60*60*24)|0;E[t+28>>>2>>>0]=_}var rs=e=>e%4===0&&(e%100!==0||e%400===0),as=[0,31,60,91,121,152,182,213,244,274,305,335],ns=[0,31,59,90,120,151,181,212,243,273,304,334],Nr=e=>{var t=rs(e.getFullYear()),r=t?as:ns,n=r[e.getMonth()]+e.getDate()-1;return n};function os(e,t){e=Ee(e),t>>>=0;var r=new Date(e*1e3);E[t>>>2>>>0]=r.getSeconds(),E[t+4>>>2>>>0]=r.getMinutes(),E[t+8>>>2>>>0]=r.getHours(),E[t+12>>>2>>>0]=r.getDate(),E[t+16>>>2>>>0]=r.getMonth(),E[t+20>>>2>>>0]=r.getFullYear()-1900,E[t+24>>>2>>>0]=r.getDay();var n=Nr(r)|0;E[t+28>>>2>>>0]=n,E[t+36>>>2>>>0]=-(r.getTimezoneOffset()*60);var _=new Date(r.getFullYear(),0,1),c=new Date(r.getFullYear(),6,1).getTimezoneOffset(),h=_.getTimezoneOffset(),d=(c!=h&&r.getTimezoneOffset()==Math.min(h,c))|0;E[t+32>>>2>>>0]=d}var ss=function(e){e>>>=0;var t=(()=>{var r=new Date(E[e+20>>>2>>>0]+1900,E[e+16>>>2>>>0],E[e+12>>>2>>>0],E[e+8>>>2>>>0],E[e+4>>>2>>>0],E[e>>>2>>>0],0),n=E[e+32>>>2>>>0],_=r.getTimezoneOffset(),c=new Date(r.getFullYear(),0,1),h=new Date(r.getFullYear(),6,1).getTimezoneOffset(),d=c.getTimezoneOffset(),p=Math.min(d,h);if(n<0)E[e+32>>>2>>>0]=+(h!=d&&p==_);else if(n>0!=(p==_)){var v=Math.max(d,h),w=n>0?p:v;r.setTime(r.getTime()+(w-_)*6e4)}E[e+24>>>2>>>0]=r.getDay();var C=Nr(r)|0;E[e+28>>>2>>>0]=C,E[e>>>2>>>0]=r.getSeconds(),E[e+4>>>2>>>0]=r.getMinutes(),E[e+8>>>2>>>0]=r.getHours(),E[e+12>>>2>>>0]=r.getDate(),E[e+16>>>2>>>0]=r.getMonth(),E[e+20>>>2>>>0]=r.getYear();var D=r.getTime();return isNaN(D)?-1:D/1e3})();return BigInt(t)};function _s(e,t,r,n,_,c,h){e>>>=0,_=Ee(_),c>>>=0,h>>>=0;try{if(isNaN(_))return 61;var d=R.getStreamFromFD(n),p=u.mmap(d,e,_,t,r),v=p.ptr;return E[c>>>2>>>0]=p.allocated,W[h>>>2>>>0]=v,0}catch(w){if(typeof u>"u"||w.name!=="ErrnoError")throw w;return-w.errno}}function cs(e,t,r,n,_,c){e>>>=0,t>>>=0,c=Ee(c);try{var h=R.getStreamFromFD(_);r&2&&R.doMsync(e,h,t,n,c)}catch(d){if(typeof u>"u"||d.name!=="ErrnoError")throw d;return-d.errno}}var ls=function(e,t,r,n){e>>>=0,t>>>=0,r>>>=0,n>>>=0;var _=new Date().getFullYear(),c=new Date(_,0,1),h=new Date(_,6,1),d=c.getTimezoneOffset(),p=h.getTimezoneOffset(),v=Math.max(d,p);W[e>>>2>>>0]=v*60,E[t>>>2>>>0]=+(d!=p);var w=P=>{var G=P>=0?"-":"+",V=Math.abs(P),ae=String(Math.floor(V/60)).padStart(2,"0"),K=String(V%60).padStart(2,"0");return`UTC${G}${ae}${K}`},C=w(d),D=w(p);p<d?(Te(C,r,17),Te(D,n,17)):(Te(C,n,17),Te(D,r,17))},Hr=()=>performance.now(),$r=()=>Date.now(),gs=e=>e>=0&&e<=3;function us(e,t,r){if(r>>>=0,!gs(e))return 28;var n;e===0?n=$r():n=Hr();var _=Math.round(n*1e3*1e3);return ce[r>>>3]=BigInt(_),0}var Ur=()=>4294901760;function hs(){return Ur()}var ds=e=>{var t=bt.buffer,r=(e-t.byteLength+65535)/65536|0;try{return bt.grow(r),gr(),1}catch{}};function ms(e){e>>>=0;var t=se.length,r=Ur();if(e>r)return!1;for(var n=1;n<=4;n*=2){var _=t*(1+.2/n);_=Math.min(_,e+100663296);var c=Math.min(r,wr(Math.max(e,_),65536)),h=ds(c);if(h)return!0}return!1}var ki={},fs=()=>N||"./this.program",ft=()=>{if(!ft.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:fs()};for(var r in ki)ki[r]===void 0?delete t[r]:t[r]=ki[r];var n=[];for(var r in t)n.push(`${r}=${t[r]}`);ft.strings=n}return ft.strings},ps=(e,t)=>{for(var r=0;r<e.length;++r)q[t++>>>0]=e.charCodeAt(r);q[t>>>0]=0},Ms=function(e,t){e>>>=0,t>>>=0;var r=0;return ft().forEach((n,_)=>{var c=t+r;W[e+_*4>>>2>>>0]=c,ps(n,c),r+=n.length+1}),0},ks=function(e,t){e>>>=0,t>>>=0;var r=ft();W[e>>>2>>>0]=r.length;var n=0;return r.forEach(_=>n+=_.length+1),W[t>>>2>>>0]=n,0},Ss=()=>Mr||Br>0,jr=e=>{Ss()||(i.onExit?.(e),ei=!0),ee(e,new rn(e))},vs=(e,t)=>{jr(e)},ws=vs;function Is(e){try{var t=R.getStreamFromFD(e);return u.close(t),0}catch(r){if(typeof u>"u"||r.name!=="ErrnoError")throw r;return r.errno}}function ys(e,t){t>>>=0;try{var r=0,n=0,_=0,c=R.getStreamFromFD(e),h=c.tty?2:u.isDir(c.mode)?3:u.isLink(c.mode)?7:4;return q[t>>>0]=h,he[t+2>>>1>>>0]=_,ce[t+8>>>3]=BigInt(r),ce[t+16>>>3]=BigInt(n),0}catch(d){if(typeof u>"u"||d.name!=="ErrnoError")throw d;return d.errno}}var Yr=(e,t,r,n)=>{for(var _=0,c=0;c<r;c++){var h=W[t>>>2>>>0],d=W[t+4>>>2>>>0];t+=8;var p=u.read(e,q,h,d,n);if(p<0)return-1;if(_+=p,p<d)break;typeof n<"u"&&(n+=p)}return _};function Cs(e,t,r,n,_){t>>>=0,r>>>=0,n=Ee(n),_>>>=0;try{if(isNaN(n))return 61;var c=R.getStreamFromFD(e),h=Yr(c,t,r,n);return W[_>>>2>>>0]=h,0}catch(d){if(typeof u>"u"||d.name!=="ErrnoError")throw d;return d.errno}}var Vr=(e,t,r,n)=>{for(var _=0,c=0;c<r;c++){var h=W[t>>>2>>>0],d=W[t+4>>>2>>>0];t+=8;var p=u.write(e,q,h,d,n);if(p<0)return-1;if(_+=p,p<d)break;typeof n<"u"&&(n+=p)}return _};function Ds(e,t,r,n,_){t>>>=0,r>>>=0,n=Ee(n),_>>>=0;try{if(isNaN(n))return 61;var c=R.getStreamFromFD(e),h=Vr(c,t,r,n);return W[_>>>2>>>0]=h,0}catch(d){if(typeof u>"u"||d.name!=="ErrnoError")throw d;return d.errno}}function Ps(e,t,r,n){t>>>=0,r>>>=0,n>>>=0;try{var _=R.getStreamFromFD(e),c=Yr(_,t,r);return W[n>>>2>>>0]=c,0}catch(h){if(typeof u>"u"||h.name!=="ErrnoError")throw h;return h.errno}}function Es(e,t,r,n){t=Ee(t),n>>>=0;try{if(isNaN(t))return 61;var _=R.getStreamFromFD(e);return u.llseek(_,t,r),ce[n>>>3]=BigInt(_.position),_.getdents&&t===0&&r===0&&(_.getdents=null),0}catch(c){if(typeof u>"u"||c.name!=="ErrnoError")throw c;return c.errno}}function Ts(e){try{var t=R.getStreamFromFD(e);return t.stream_ops?.fsync?t.stream_ops.fsync(t):0}catch(r){if(typeof u>"u"||r.name!=="ErrnoError")throw r;return r.errno}}function bs(e,t,r,n){t>>>=0,r>>>=0,n>>>=0;try{var _=R.getStreamFromFD(e),c=Vr(_,t,r);return W[n>>>2>>>0]=c,0}catch(h){if(typeof u>"u"||h.name!=="ErrnoError")throw h;return h.errno}}function Gs(e,t){e>>>=0,t>>>=0;try{return ai(se.subarray(e>>>0,e+t>>>0)),0}catch(r){if(typeof u>"u"||r.name!=="ErrnoError")throw r;return r.errno}}var Xr=(e,t)=>{e<128?t.push(e):t.push(e%128|128,e>>7)},As=e=>{for(var t={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},r={parameters:[],results:e[0]=="v"?[]:[t[e[0]]]},n=1;n<e.length;++n)r.parameters.push(t[e[n]]);return r},Rs=(e,t)=>{var r=e.slice(0,1),n=e.slice(1),_={i:127,p:127,j:126,f:125,d:124,e:111};t.push(96),Xr(n.length,t);for(var c=0;c<n.length;++c)t.push(_[n[c]]);r=="v"?t.push(0):t.push(1,_[r])},Fs=(e,t)=>{if(typeof WebAssembly.Function=="function")return new WebAssembly.Function(As(t),e);var r=[1];Rs(t,r);var n=[0,97,115,109,1,0,0,0,1];Xr(r.length,n),n.push(...r),n.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var _=new WebAssembly.Module(new Uint8Array(n)),c=new WebAssembly.Instance(_,{e:{f:e}}),h=c.exports.f;return h},xs=(e,t)=>{if(ot)for(var r=e;r<e+t;r++){var n=B(r);n&&ot.set(n,r)}},ot,Ls=e=>(ot||(ot=new WeakMap,xs(0,Ye.length)),ot.get(e)||0),qr=[],Ws=()=>{if(qr.length)return qr.pop();try{Ye.grow(1)}catch(e){throw e instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":e}return Ye.length-1},Or=(e,t)=>{Ye.set(e,t),ut[e]=Ye.get(e)},Bs=(e,t)=>{var r=Ls(e);if(r)return r;var n=Ws();try{Or(n,e)}catch(c){if(!(c instanceof TypeError))throw c;var _=Fs(e,t);Or(n,_)}return ot.set(e,n),n};u.createPreloadedFile=Sn,u.staticInit(),x.doesNotExistError=new u.ErrnoError(44),x.doesNotExistError.stack="<generic error, no stack>",yr=i.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},$n(),dt=i.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},Jn(),so(),Ar=i.UnboundTypeError=lo(Error,"UnboundTypeError"),ho();var zs={_:_n,B:gn,a:un,A:cn,ua:wn,va:In,ca:yn,sa:Cn,F:Dn,ra:Pn,ma:En,Z:Tn,ya:bn,oa:Gn,pa:An,D:Rn,Y:Fn,_a:xn,$a:Ln,qa:Wn,Za:Bn,X:zn,wa:Nn,Na:Hn,P:jn,Ha:Yn,I:go,Fa:fo,w:Mo,e:ko,O:vo,p:Do,v:Po,n:Eo,Ga:To,G:Lo,Oa:Wo,H:Bo,Ia:zo,$:No,Xa:Ho,Va:$o,Ka:jo,l:fi,La:qo,Ma:Oo,Q:Qo,u:Ko,z:Jo,Ja:Zo,r:es,o:ts,fa:is,ha:os,ia:ss,da:_s,ea:cs,ja:ls,ta:us,L:$r,Ya:hs,C:Hr,Wa:ms,za:Ms,Aa:ks,x:ws,y:Is,K:ys,ba:Cs,aa:Ds,M:Ps,ka:Es,na:Ts,E:bs,Sa:r_,J:Zs,c:Us,d:$s,f:Hs,i:Xs,W:i_,b:Ks,U:o_,m:Qs,Ra:s_,Qa:l_,Ea:d_,Da:m_,q:Js,Ua:e_,t:Os,ga:qs,V:a_,k:js,h:Ys,T:__,S:c_,j:Ns,g:Vs,s:n_,Pa:u_,N:h_,Ca:f_,R:g_,Ba:p_,Ta:t_,xa:jr,la:Gs},s;tn();var Qr=e=>(Qr=s.cb)(e);i._MagickColor_Create=()=>(i._MagickColor_Create=s.db)(),i._MagickColor_Dispose=e=>(i._MagickColor_Dispose=s.eb)(e),i._MagickColor_Count_Get=e=>(i._MagickColor_Count_Get=s.fb)(e),i._MagickColor_Red_Get=e=>(i._MagickColor_Red_Get=s.gb)(e),i._MagickColor_Red_Set=(e,t)=>(i._MagickColor_Red_Set=s.hb)(e,t),i._MagickColor_Green_Get=e=>(i._MagickColor_Green_Get=s.ib)(e),i._MagickColor_Green_Set=(e,t)=>(i._MagickColor_Green_Set=s.jb)(e,t),i._MagickColor_Blue_Get=e=>(i._MagickColor_Blue_Get=s.kb)(e),i._MagickColor_Blue_Set=(e,t)=>(i._MagickColor_Blue_Set=s.lb)(e,t),i._MagickColor_Alpha_Get=e=>(i._MagickColor_Alpha_Get=s.mb)(e),i._MagickColor_Alpha_Set=(e,t)=>(i._MagickColor_Alpha_Set=s.nb)(e,t),i._MagickColor_Black_Get=e=>(i._MagickColor_Black_Get=s.ob)(e),i._MagickColor_Black_Set=(e,t)=>(i._MagickColor_Black_Set=s.pb)(e,t),i._MagickColor_IsCMYK_Get=e=>(i._MagickColor_IsCMYK_Get=s.qb)(e),i._MagickColor_IsCMYK_Set=(e,t)=>(i._MagickColor_IsCMYK_Set=s.rb)(e,t),i._MagickColor_Clone=e=>(i._MagickColor_Clone=s.sb)(e),i._MagickColor_FuzzyEquals=(e,t,r)=>(i._MagickColor_FuzzyEquals=s.tb)(e,t,r),i._MagickColor_Initialize=(e,t)=>(i._MagickColor_Initialize=s.ub)(e,t),i._MagickColorCollection_DisposeList=e=>(i._MagickColorCollection_DisposeList=s.wb)(e),i._MagickColorCollection_GetInstance=(e,t)=>(i._MagickColorCollection_GetInstance=s.xb)(e,t),i._DrawingWand_Create=(e,t)=>(i._DrawingWand_Create=s.yb)(e,t),i._DrawingWand_Dispose=e=>(i._DrawingWand_Dispose=s.zb)(e),i._DrawingWand_Affine=(e,t,r,n,_,c,h,d)=>(i._DrawingWand_Affine=s.Ab)(e,t,r,n,_,c,h,d),i._DrawingWand_Alpha=(e,t,r,n,_)=>(i._DrawingWand_Alpha=s.Bb)(e,t,r,n,_),i._DrawingWand_Arc=(e,t,r,n,_,c,h,d)=>(i._DrawingWand_Arc=s.Cb)(e,t,r,n,_,c,h,d),i._DrawingWand_Bezier=(e,t,r,n)=>(i._DrawingWand_Bezier=s.Db)(e,t,r,n),i._DrawingWand_BorderColor=(e,t,r)=>(i._DrawingWand_BorderColor=s.Eb)(e,t,r),i._DrawingWand_Circle=(e,t,r,n,_,c)=>(i._DrawingWand_Circle=s.Fb)(e,t,r,n,_,c),i._DrawingWand_ClipPath=(e,t,r)=>(i._DrawingWand_ClipPath=s.Gb)(e,t,r),i._DrawingWand_ClipRule=(e,t,r)=>(i._DrawingWand_ClipRule=s.Hb)(e,t,r),i._DrawingWand_ClipUnits=(e,t,r)=>(i._DrawingWand_ClipUnits=s.Ib)(e,t,r),i._DrawingWand_Color=(e,t,r,n,_)=>(i._DrawingWand_Color=s.Jb)(e,t,r,n,_),i._DrawingWand_Composite=(e,t,r,n,_,c,h,d)=>(i._DrawingWand_Composite=s.Kb)(e,t,r,n,_,c,h,d),i._DrawingWand_Density=(e,t,r)=>(i._DrawingWand_Density=s.Lb)(e,t,r),i._DrawingWand_Ellipse=(e,t,r,n,_,c,h,d)=>(i._DrawingWand_Ellipse=s.Mb)(e,t,r,n,_,c,h,d),i._DrawingWand_FillColor=(e,t,r)=>(i._DrawingWand_FillColor=s.Nb)(e,t,r),i._DrawingWand_FillOpacity=(e,t,r)=>(i._DrawingWand_FillOpacity=s.Ob)(e,t,r),i._DrawingWand_FillPatternUrl=(e,t,r)=>(i._DrawingWand_FillPatternUrl=s.Pb)(e,t,r),i._DrawingWand_FillRule=(e,t,r)=>(i._DrawingWand_FillRule=s.Qb)(e,t,r),i._DrawingWand_Font=(e,t,r)=>(i._DrawingWand_Font=s.Rb)(e,t,r),i._DrawingWand_FontFamily=(e,t,r,n,_,c)=>(i._DrawingWand_FontFamily=s.Sb)(e,t,r,n,_,c),i._DrawingWand_FontPointSize=(e,t,r)=>(i._DrawingWand_FontPointSize=s.Tb)(e,t,r),i._DrawingWand_FontTypeMetrics=(e,t,r,n)=>(i._DrawingWand_FontTypeMetrics=s.Ub)(e,t,r,n),i._TypeMetric_Create=()=>(i._TypeMetric_Create=s.Vb)(),i._DrawingWand_Gravity=(e,t,r)=>(i._DrawingWand_Gravity=s.Wb)(e,t,r),i._DrawingWand_Line=(e,t,r,n,_,c)=>(i._DrawingWand_Line=s.Xb)(e,t,r,n,_,c),i._DrawingWand_PathArcAbs=(e,t,r,n,_,c,h,d,p)=>(i._DrawingWand_PathArcAbs=s.Yb)(e,t,r,n,_,c,h,d,p),i._DrawingWand_PathArcRel=(e,t,r,n,_,c,h,d,p)=>(i._DrawingWand_PathArcRel=s.Zb)(e,t,r,n,_,c,h,d,p),i._DrawingWand_PathClose=(e,t)=>(i._DrawingWand_PathClose=s._b)(e,t),i._DrawingWand_PathCurveToAbs=(e,t,r,n,_,c,h,d)=>(i._DrawingWand_PathCurveToAbs=s.$b)(e,t,r,n,_,c,h,d),i._DrawingWand_PathCurveToRel=(e,t,r,n,_,c,h,d)=>(i._DrawingWand_PathCurveToRel=s.ac)(e,t,r,n,_,c,h,d),i._DrawingWand_PathFinish=(e,t)=>(i._DrawingWand_PathFinish=s.bc)(e,t),i._DrawingWand_PathLineToAbs=(e,t,r,n)=>(i._DrawingWand_PathLineToAbs=s.cc)(e,t,r,n),i._DrawingWand_PathLineToHorizontalAbs=(e,t,r)=>(i._DrawingWand_PathLineToHorizontalAbs=s.dc)(e,t,r),i._DrawingWand_PathLineToHorizontalRel=(e,t,r)=>(i._DrawingWand_PathLineToHorizontalRel=s.ec)(e,t,r),i._DrawingWand_PathLineToRel=(e,t,r,n)=>(i._DrawingWand_PathLineToRel=s.fc)(e,t,r,n),i._DrawingWand_PathLineToVerticalAbs=(e,t,r)=>(i._DrawingWand_PathLineToVerticalAbs=s.gc)(e,t,r),i._DrawingWand_PathLineToVerticalRel=(e,t,r)=>(i._DrawingWand_PathLineToVerticalRel=s.hc)(e,t,r),i._DrawingWand_PathMoveToAbs=(e,t,r,n)=>(i._DrawingWand_PathMoveToAbs=s.ic)(e,t,r,n),i._DrawingWand_PathMoveToRel=(e,t,r,n)=>(i._DrawingWand_PathMoveToRel=s.jc)(e,t,r,n),i._DrawingWand_PathQuadraticCurveToAbs=(e,t,r,n,_,c)=>(i._DrawingWand_PathQuadraticCurveToAbs=s.kc)(e,t,r,n,_,c),i._DrawingWand_PathQuadraticCurveToRel=(e,t,r,n,_,c)=>(i._DrawingWand_PathQuadraticCurveToRel=s.lc)(e,t,r,n,_,c),i._DrawingWand_PathSmoothCurveToAbs=(e,t,r,n,_,c)=>(i._DrawingWand_PathSmoothCurveToAbs=s.mc)(e,t,r,n,_,c),i._DrawingWand_PathSmoothCurveToRel=(e,t,r,n,_,c)=>(i._DrawingWand_PathSmoothCurveToRel=s.nc)(e,t,r,n,_,c),i._DrawingWand_PathSmoothQuadraticCurveToAbs=(e,t,r,n)=>(i._DrawingWand_PathSmoothQuadraticCurveToAbs=s.oc)(e,t,r,n),i._DrawingWand_PathSmoothQuadraticCurveToRel=(e,t,r,n)=>(i._DrawingWand_PathSmoothQuadraticCurveToRel=s.pc)(e,t,r,n),i._DrawingWand_PathStart=(e,t)=>(i._DrawingWand_PathStart=s.qc)(e,t),i._DrawingWand_Point=(e,t,r,n)=>(i._DrawingWand_Point=s.rc)(e,t,r,n),i._DrawingWand_Polygon=(e,t,r,n)=>(i._DrawingWand_Polygon=s.sc)(e,t,r,n),i._DrawingWand_Polyline=(e,t,r,n)=>(i._DrawingWand_Polyline=s.tc)(e,t,r,n),i._DrawingWand_PopClipPath=(e,t)=>(i._DrawingWand_PopClipPath=s.uc)(e,t),i._DrawingWand_PopGraphicContext=(e,t)=>(i._DrawingWand_PopGraphicContext=s.vc)(e,t),i._DrawingWand_PopPattern=(e,t)=>(i._DrawingWand_PopPattern=s.wc)(e,t),i._DrawingWand_PushClipPath=(e,t,r)=>(i._DrawingWand_PushClipPath=s.xc)(e,t,r),i._DrawingWand_PushGraphicContext=(e,t)=>(i._DrawingWand_PushGraphicContext=s.yc)(e,t),i._DrawingWand_PushPattern=(e,t,r,n,_,c,h)=>(i._DrawingWand_PushPattern=s.zc)(e,t,r,n,_,c,h),i._DrawingWand_Rectangle=(e,t,r,n,_,c)=>(i._DrawingWand_Rectangle=s.Ac)(e,t,r,n,_,c),i._DrawingWand_Render=(e,t)=>(i._DrawingWand_Render=s.Bc)(e,t),i._DrawingWand_Rotation=(e,t,r)=>(i._DrawingWand_Rotation=s.Cc)(e,t,r),i._DrawingWand_RoundRectangle=(e,t,r,n,_,c,h,d)=>(i._DrawingWand_RoundRectangle=s.Dc)(e,t,r,n,_,c,h,d),i._DrawingWand_Scaling=(e,t,r,n)=>(i._DrawingWand_Scaling=s.Ec)(e,t,r,n),i._DrawingWand_SkewX=(e,t,r)=>(i._DrawingWand_SkewX=s.Fc)(e,t,r),i._DrawingWand_SkewY=(e,t,r)=>(i._DrawingWand_SkewY=s.Gc)(e,t,r),i._DrawingWand_StrokeAntialias=(e,t,r)=>(i._DrawingWand_StrokeAntialias=s.Hc)(e,t,r),i._DrawingWand_StrokeColor=(e,t,r)=>(i._DrawingWand_StrokeColor=s.Ic)(e,t,r),i._DrawingWand_StrokeDashArray=(e,t,r,n)=>(i._DrawingWand_StrokeDashArray=s.Jc)(e,t,r,n),i._DrawingWand_StrokeDashOffset=(e,t,r)=>(i._DrawingWand_StrokeDashOffset=s.Kc)(e,t,r),i._DrawingWand_StrokeLineCap=(e,t,r)=>(i._DrawingWand_StrokeLineCap=s.Lc)(e,t,r),i._DrawingWand_StrokeLineJoin=(e,t,r)=>(i._DrawingWand_StrokeLineJoin=s.Mc)(e,t,r),i._DrawingWand_StrokeMiterLimit=(e,t,r)=>(i._DrawingWand_StrokeMiterLimit=s.Nc)(e,t,r),i._DrawingWand_StrokeOpacity=(e,t,r)=>(i._DrawingWand_StrokeOpacity=s.Oc)(e,t,r),i._DrawingWand_StrokePatternUrl=(e,t,r)=>(i._DrawingWand_StrokePatternUrl=s.Pc)(e,t,r),i._DrawingWand_StrokeWidth=(e,t,r)=>(i._DrawingWand_StrokeWidth=s.Qc)(e,t,r),i._DrawingWand_Text=(e,t,r,n,_)=>(i._DrawingWand_Text=s.Rc)(e,t,r,n,_),i._DrawingWand_TextAlignment=(e,t,r)=>(i._DrawingWand_TextAlignment=s.Sc)(e,t,r),i._DrawingWand_TextAntialias=(e,t,r)=>(i._DrawingWand_TextAntialias=s.Tc)(e,t,r),i._DrawingWand_TextDecoration=(e,t,r)=>(i._DrawingWand_TextDecoration=s.Uc)(e,t,r),i._DrawingWand_TextDirection=(e,t,r)=>(i._DrawingWand_TextDirection=s.Vc)(e,t,r),i._DrawingWand_TextEncoding=(e,t,r)=>(i._DrawingWand_TextEncoding=s.Wc)(e,t,r),i._DrawingWand_TextInterlineSpacing=(e,t,r)=>(i._DrawingWand_TextInterlineSpacing=s.Xc)(e,t,r),i._DrawingWand_TextInterwordSpacing=(e,t,r)=>(i._DrawingWand_TextInterwordSpacing=s.Yc)(e,t,r),i._DrawingWand_TextKerning=(e,t,r)=>(i._DrawingWand_TextKerning=s.Zc)(e,t,r),i._DrawingWand_TextUnderColor=(e,t,r)=>(i._DrawingWand_TextUnderColor=s._c)(e,t,r),i._DrawingWand_Translation=(e,t,r,n)=>(i._DrawingWand_Translation=s.$c)(e,t,r,n),i._DrawingWand_Viewbox=(e,t,r,n,_,c)=>(i._DrawingWand_Viewbox=s.ad)(e,t,r,n,_,c),i._MagickExceptionHelper_Description=e=>(i._MagickExceptionHelper_Description=s.bd)(e),i._MagickExceptionHelper_Dispose=e=>(i._MagickExceptionHelper_Dispose=s.cd)(e),i._MagickExceptionHelper_Related=(e,t)=>(i._MagickExceptionHelper_Related=s.dd)(e,t),i._MagickExceptionHelper_RelatedCount=e=>(i._MagickExceptionHelper_RelatedCount=s.ed)(e),i._MagickExceptionHelper_Message=e=>(i._MagickExceptionHelper_Message=s.fd)(e),i._MagickExceptionHelper_Severity=e=>(i._MagickExceptionHelper_Severity=s.gd)(e),i._PdfInfo_PageCount=(e,t,r)=>(i._PdfInfo_PageCount=s.hd)(e,t,r),i._Environment_Initialize=()=>(i._Environment_Initialize=s.id)(),i._Environment_GetEnv=e=>(i._Environment_GetEnv=s.jd)(e),i._Environment_SetEnv=(e,t)=>(i._Environment_SetEnv=s.kd)(e,t),i._MagickMemory_Relinquish=e=>(i._MagickMemory_Relinquish=s.ld)(e),i._Magick_Delegates_Get=()=>(i._Magick_Delegates_Get=s.md)(),i._Magick_Features_Get=()=>(i._Magick_Features_Get=s.nd)(),i._Magick_ImageMagickVersion_Get=()=>(i._Magick_ImageMagickVersion_Get=s.od)(),i._Magick_GetFonts=(e,t)=>(i._Magick_GetFonts=s.pd)(e,t),i._Magick_GetFontFamily=(e,t)=>(i._Magick_GetFontFamily=s.qd)(e,t),i._Magick_GetFontName=(e,t)=>(i._Magick_GetFontName=s.rd)(e,t),i._Magick_DisposeFonts=e=>(i._Magick_DisposeFonts=s.sd)(e),i._Magick_ResetRandomSeed=()=>(i._Magick_ResetRandomSeed=s.td)(),i._Magick_SetDefaultFontFile=(e,t)=>(i._Magick_SetDefaultFontFile=s.ud)(e,t),i._Magick_SetRandomSeed=e=>(i._Magick_SetRandomSeed=s.vd)(e),i._Magick_SetLogDelegate=e=>(i._Magick_SetLogDelegate=s.wd)(e),i._Magick_SetLogEvents=e=>(i._Magick_SetLogEvents=s.xd)(e),i._MagickFormatInfo_CreateList=(e,t)=>(i._MagickFormatInfo_CreateList=s.yd)(e,t),i._MagickFormatInfo_DisposeList=(e,t)=>(i._MagickFormatInfo_DisposeList=s.zd)(e,t),i._MagickFormatInfo_CanReadMultithreaded_Get=e=>(i._MagickFormatInfo_CanReadMultithreaded_Get=s.Ad)(e),i._MagickFormatInfo_CanWriteMultithreaded_Get=e=>(i._MagickFormatInfo_CanWriteMultithreaded_Get=s.Bd)(e),i._MagickFormatInfo_Description_Get=e=>(i._MagickFormatInfo_Description_Get=s.Cd)(e),i._MagickFormatInfo_Format_Get=e=>(i._MagickFormatInfo_Format_Get=s.Dd)(e),i._MagickFormatInfo_MimeType_Get=e=>(i._MagickFormatInfo_MimeType_Get=s.Ed)(e),i._MagickFormatInfo_Module_Get=e=>(i._MagickFormatInfo_Module_Get=s.Fd)(e),i._MagickFormatInfo_SupportsMultipleFrames_Get=e=>(i._MagickFormatInfo_SupportsMultipleFrames_Get=s.Gd)(e),i._MagickFormatInfo_SupportsReading_Get=e=>(i._MagickFormatInfo_SupportsReading_Get=s.Hd)(e),i._MagickFormatInfo_SupportsWriting_Get=e=>(i._MagickFormatInfo_SupportsWriting_Get=s.Id)(e),i._MagickFormatInfo_GetInfo=(e,t,r)=>(i._MagickFormatInfo_GetInfo=s.Jd)(e,t,r),i._MagickFormatInfo_GetInfoByName=(e,t)=>(i._MagickFormatInfo_GetInfoByName=s.Kd)(e,t),i._MagickFormatInfo_GetInfoWithBlob=(e,t,r)=>(i._MagickFormatInfo_GetInfoWithBlob=s.Ld)(e,t,r),i._MagickFormatInfo_Unregister=e=>(i._MagickFormatInfo_Unregister=s.Md)(e),i._MagickImage_Create=(e,t)=>(i._MagickImage_Create=s.Nd)(e,t),i._MagickImage_Dispose=e=>(i._MagickImage_Dispose=s.Od)(e),i._MagickImage_AnimationDelay_Get=e=>(i._MagickImage_AnimationDelay_Get=s.Pd)(e),i._MagickImage_AnimationDelay_Set=(e,t)=>(i._MagickImage_AnimationDelay_Set=s.Qd)(e,t),i._MagickImage_AnimationIterations_Get=e=>(i._MagickImage_AnimationIterations_Get=s.Rd)(e),i._MagickImage_AnimationIterations_Set=(e,t)=>(i._MagickImage_AnimationIterations_Set=s.Sd)(e,t),i._MagickImage_AnimationTicksPerSecond_Get=e=>(i._MagickImage_AnimationTicksPerSecond_Get=s.Td)(e),i._MagickImage_AnimationTicksPerSecond_Set=(e,t)=>(i._MagickImage_AnimationTicksPerSecond_Set=s.Ud)(e,t),i._MagickImage_BackgroundColor_Get=e=>(i._MagickImage_BackgroundColor_Get=s.Vd)(e),i._MagickImage_BackgroundColor_Set=(e,t)=>(i._MagickImage_BackgroundColor_Set=s.Wd)(e,t),i._MagickImage_BaseHeight_Get=e=>(i._MagickImage_BaseHeight_Get=s.Xd)(e),i._MagickImage_BaseWidth_Get=e=>(i._MagickImage_BaseWidth_Get=s.Yd)(e),i._MagickImage_BlackPointCompensation_Get=e=>(i._MagickImage_BlackPointCompensation_Get=s.Zd)(e),i._MagickImage_BlackPointCompensation_Set=(e,t)=>(i._MagickImage_BlackPointCompensation_Set=s._d)(e,t),i._MagickImage_BorderColor_Get=e=>(i._MagickImage_BorderColor_Get=s.$d)(e),i._MagickImage_BorderColor_Set=(e,t)=>(i._MagickImage_BorderColor_Set=s.ae)(e,t),i._MagickImage_BoundingBox_Get=(e,t)=>(i._MagickImage_BoundingBox_Get=s.be)(e,t),i._MagickRectangle_Create=()=>(i._MagickRectangle_Create=s.ce)(),i._MagickImage_ChannelCount_Get=e=>(i._MagickImage_ChannelCount_Get=s.de)(e),i._MagickImage_ChromaBlue_Get=e=>(i._MagickImage_ChromaBlue_Get=s.ee)(e),i._PrimaryInfo_Create=()=>(i._PrimaryInfo_Create=s.fe)(),i._MagickImage_ChromaBlue_Set=(e,t)=>(i._MagickImage_ChromaBlue_Set=s.ge)(e,t),i._MagickImage_ChromaGreen_Get=e=>(i._MagickImage_ChromaGreen_Get=s.he)(e),i._MagickImage_ChromaGreen_Set=(e,t)=>(i._MagickImage_ChromaGreen_Set=s.ie)(e,t),i._MagickImage_ChromaRed_Get=e=>(i._MagickImage_ChromaRed_Get=s.je)(e),i._MagickImage_ChromaRed_Set=(e,t)=>(i._MagickImage_ChromaRed_Set=s.ke)(e,t),i._MagickImage_ChromaWhite_Get=e=>(i._MagickImage_ChromaWhite_Get=s.le)(e),i._MagickImage_ChromaWhite_Set=(e,t)=>(i._MagickImage_ChromaWhite_Set=s.me)(e,t),i._MagickImage_ClassType_Get=e=>(i._MagickImage_ClassType_Get=s.ne)(e),i._MagickImage_ClassType_Set=(e,t,r)=>(i._MagickImage_ClassType_Set=s.oe)(e,t,r),i._QuantizeSettings_Create=()=>(i._QuantizeSettings_Create=s.pe)(),i._QuantizeSettings_Dispose=e=>(i._QuantizeSettings_Dispose=s.qe)(e),i._MagickImage_ColorFuzz_Get=e=>(i._MagickImage_ColorFuzz_Get=s.re)(e),i._MagickImage_ColorFuzz_Set=(e,t)=>(i._MagickImage_ColorFuzz_Set=s.se)(e,t),i._MagickImage_ColormapSize_Get=e=>(i._MagickImage_ColormapSize_Get=s.te)(e),i._MagickImage_ColormapSize_Set=(e,t,r)=>(i._MagickImage_ColormapSize_Set=s.ue)(e,t,r),i._MagickImage_ColorSpace_Get=e=>(i._MagickImage_ColorSpace_Get=s.ve)(e),i._MagickImage_ColorSpace_Set=(e,t,r)=>(i._MagickImage_ColorSpace_Set=s.we)(e,t,r),i._MagickImage_ColorType_Get=e=>(i._MagickImage_ColorType_Get=s.xe)(e),i._MagickImage_ColorType_Set=(e,t,r)=>(i._MagickImage_ColorType_Set=s.ye)(e,t,r),i._MagickImage_Compose_Get=e=>(i._MagickImage_Compose_Get=s.ze)(e),i._MagickImage_Compose_Set=(e,t)=>(i._MagickImage_Compose_Set=s.Ae)(e,t),i._MagickImage_Compression_Get=e=>(i._MagickImage_Compression_Get=s.Be)(e),i._MagickImage_Compression_Set=(e,t)=>(i._MagickImage_Compression_Set=s.Ce)(e,t),i._MagickImage_Depth_Get=e=>(i._MagickImage_Depth_Get=s.De)(e),i._MagickImage_Depth_Set=(e,t)=>(i._MagickImage_Depth_Set=s.Ee)(e,t),i._MagickImage_EncodingGeometry_Get=e=>(i._MagickImage_EncodingGeometry_Get=s.Fe)(e),i._MagickImage_Endian_Get=e=>(i._MagickImage_Endian_Get=s.Ge)(e),i._MagickImage_Endian_Set=(e,t)=>(i._MagickImage_Endian_Set=s.He)(e,t),i._MagickImage_FileName_Get=e=>(i._MagickImage_FileName_Get=s.Ie)(e),i._MagickImage_FileName_Set=(e,t)=>(i._MagickImage_FileName_Set=s.Je)(e,t),i._MagickImage_FilterType_Get=e=>(i._MagickImage_FilterType_Get=s.Ke)(e),i._MagickImage_FilterType_Set=(e,t)=>(i._MagickImage_FilterType_Set=s.Le)(e,t),i._MagickImage_Format_Get=e=>(i._MagickImage_Format_Get=s.Me)(e),i._MagickImage_Format_Set=(e,t)=>(i._MagickImage_Format_Set=s.Ne)(e,t),i._MagickImage_Gamma_Get=e=>(i._MagickImage_Gamma_Get=s.Oe)(e),i._MagickImage_GifDisposeMethod_Get=e=>(i._MagickImage_GifDisposeMethod_Get=s.Pe)(e),i._MagickImage_GifDisposeMethod_Set=(e,t)=>(i._MagickImage_GifDisposeMethod_Set=s.Qe)(e,t),i._MagickImage_HasAlpha_Get=e=>(i._MagickImage_HasAlpha_Get=s.Re)(e),i._MagickImage_HasAlpha_Set=(e,t,r)=>(i._MagickImage_HasAlpha_Set=s.Se)(e,t,r),i._MagickImage_Height_Get=e=>(i._MagickImage_Height_Get=s.Te)(e),i._MagickImage_Interlace_Get=e=>(i._MagickImage_Interlace_Get=s.Ue)(e),i._MagickImage_Interlace_Set=(e,t)=>(i._MagickImage_Interlace_Set=s.Ve)(e,t),i._MagickImage_Interpolate_Get=e=>(i._MagickImage_Interpolate_Get=s.We)(e),i._MagickImage_Interpolate_Set=(e,t)=>(i._MagickImage_Interpolate_Set=s.Xe)(e,t),i._MagickImage_IsOpaque_Get=(e,t)=>(i._MagickImage_IsOpaque_Get=s.Ye)(e,t),i._MagickImage_MatteColor_Get=e=>(i._MagickImage_MatteColor_Get=s.Ze)(e),i._MagickImage_MatteColor_Set=(e,t)=>(i._MagickImage_MatteColor_Set=s._e)(e,t),i._MagickImage_MeanErrorPerPixel_Get=e=>(i._MagickImage_MeanErrorPerPixel_Get=s.$e)(e),i._MagickImage_MetaChannelCount_Get=e=>(i._MagickImage_MetaChannelCount_Get=s.af)(e),i._MagickImage_MetaChannelCount_Set=(e,t,r)=>(i._MagickImage_MetaChannelCount_Set=s.bf)(e,t,r),i._MagickImage_NormalizedMaximumError_Get=e=>(i._MagickImage_NormalizedMaximumError_Get=s.cf)(e),i._MagickImage_NormalizedMeanError_Get=e=>(i._MagickImage_NormalizedMeanError_Get=s.df)(e),i._MagickImage_Orientation_Get=e=>(i._MagickImage_Orientation_Get=s.ef)(e),i._MagickImage_Orientation_Set=(e,t)=>(i._MagickImage_Orientation_Set=s.ff)(e,t),i._MagickImage_Page_Get=e=>(i._MagickImage_Page_Get=s.gf)(e),i._MagickImage_Page_Set=(e,t)=>(i._MagickImage_Page_Set=s.hf)(e,t),i._MagickImage_Quality_Get=e=>(i._MagickImage_Quality_Get=s.jf)(e),i._MagickImage_Quality_Set=(e,t)=>(i._MagickImage_Quality_Set=s.kf)(e,t),i._MagickImage_RenderingIntent_Get=e=>(i._MagickImage_RenderingIntent_Get=s.lf)(e),i._MagickImage_RenderingIntent_Set=(e,t)=>(i._MagickImage_RenderingIntent_Set=s.mf)(e,t),i._MagickImage_ResolutionUnits_Get=e=>(i._MagickImage_ResolutionUnits_Get=s.nf)(e),i._MagickImage_ResolutionUnits_Set=(e,t)=>(i._MagickImage_ResolutionUnits_Set=s.of)(e,t),i._MagickImage_ResolutionX_Get=e=>(i._MagickImage_ResolutionX_Get=s.pf)(e),i._MagickImage_ResolutionX_Set=(e,t)=>(i._MagickImage_ResolutionX_Set=s.qf)(e,t),i._MagickImage_ResolutionY_Get=e=>(i._MagickImage_ResolutionY_Get=s.rf)(e),i._MagickImage_ResolutionY_Set=(e,t)=>(i._MagickImage_ResolutionY_Set=s.sf)(e,t),i._MagickImage_Signature_Get=(e,t)=>(i._MagickImage_Signature_Get=s.tf)(e,t),i._MagickImage_TotalColors_Get=(e,t)=>(i._MagickImage_TotalColors_Get=s.uf)(e,t),i._MagickImage_VirtualPixelMethod_Get=e=>(i._MagickImage_VirtualPixelMethod_Get=s.vf)(e),i._MagickImage_VirtualPixelMethod_Set=(e,t,r)=>(i._MagickImage_VirtualPixelMethod_Set=s.wf)(e,t,r),i._MagickImage_Width_Get=e=>(i._MagickImage_Width_Get=s.xf)(e),i._MagickImage_AdaptiveBlur=(e,t,r,n)=>(i._MagickImage_AdaptiveBlur=s.yf)(e,t,r,n),i._MagickImage_AdaptiveResize=(e,t,r)=>(i._MagickImage_AdaptiveResize=s.zf)(e,t,r),i._MagickImage_AdaptiveSharpen=(e,t,r,n,_)=>(i._MagickImage_AdaptiveSharpen=s.Af)(e,t,r,n,_),i._MagickImage_AdaptiveThreshold=(e,t,r,n,_,c)=>(i._MagickImage_AdaptiveThreshold=s.Bf)(e,t,r,n,_,c),i._MagickImage_AddNoise=(e,t,r,n,_)=>(i._MagickImage_AddNoise=s.Cf)(e,t,r,n,_),i._MagickImage_AffineTransform=(e,t,r,n,_,c,h,d)=>(i._MagickImage_AffineTransform=s.Df)(e,t,r,n,_,c,h,d),i._MagickImage_Annotate=(e,t,r,n,_,c,h)=>(i._MagickImage_Annotate=s.Ef)(e,t,r,n,_,c,h),i._MagickImage_AutoGamma=(e,t,r)=>(i._MagickImage_AutoGamma=s.Ff)(e,t,r),i._MagickImage_AutoLevel=(e,t,r)=>(i._MagickImage_AutoLevel=s.Gf)(e,t,r),i._MagickImage_AutoOrient=(e,t)=>(i._MagickImage_AutoOrient=s.Hf)(e,t),i._MagickImage_AutoThreshold=(e,t,r)=>(i._MagickImage_AutoThreshold=s.If)(e,t,r),i._MagickImage_BilateralBlur=(e,t,r,n,_,c)=>(i._MagickImage_BilateralBlur=s.Jf)(e,t,r,n,_,c),i._MagickImage_BlackThreshold=(e,t,r,n)=>(i._MagickImage_BlackThreshold=s.Kf)(e,t,r,n),i._MagickImage_BlueShift=(e,t,r)=>(i._MagickImage_BlueShift=s.Lf)(e,t,r),i._MagickImage_Blur=(e,t,r,n,_)=>(i._MagickImage_Blur=s.Mf)(e,t,r,n,_),i._MagickImage_Border=(e,t,r)=>(i._MagickImage_Border=s.Nf)(e,t,r),i._MagickImage_BrightnessContrast=(e,t,r,n,_)=>(i._MagickImage_BrightnessContrast=s.Of)(e,t,r,n,_),i._MagickImage_CannyEdge=(e,t,r,n,_,c)=>(i._MagickImage_CannyEdge=s.Pf)(e,t,r,n,_,c),i._MagickImage_ChannelOffset=(e,t)=>(i._MagickImage_ChannelOffset=s.Qf)(e,t),i._MagickImage_Charcoal=(e,t,r,n)=>(i._MagickImage_Charcoal=s.Rf)(e,t,r,n),i._MagickImage_Chop=(e,t,r)=>(i._MagickImage_Chop=s.Sf)(e,t,r),i._MagickImage_Clahe=(e,t,r,n,_,c)=>(i._MagickImage_Clahe=s.Tf)(e,t,r,n,_,c),i._MagickImage_Clamp=(e,t,r)=>(i._MagickImage_Clamp=s.Uf)(e,t,r),i._MagickImage_ClipPath=(e,t,r,n)=>(i._MagickImage_ClipPath=s.Vf)(e,t,r,n),i._MagickImage_Clone=(e,t)=>(i._MagickImage_Clone=s.Wf)(e,t),i._MagickImage_CloneArea=(e,t,r,n)=>(i._MagickImage_CloneArea=s.Xf)(e,t,r,n),i._MagickImage_Clut=(e,t,r,n,_)=>(i._MagickImage_Clut=s.Yf)(e,t,r,n,_),i._MagickImage_ColorDecisionList=(e,t,r)=>(i._MagickImage_ColorDecisionList=s.Zf)(e,t,r),i._MagickImage_Colorize=(e,t,r,n)=>(i._MagickImage_Colorize=s._f)(e,t,r,n),i._MagickImage_ColorMatrix=(e,t,r)=>(i._MagickImage_ColorMatrix=s.$f)(e,t,r),i._MagickImage_ColorThreshold=(e,t,r,n)=>(i._MagickImage_ColorThreshold=s.ag)(e,t,r,n),i._MagickImage_Compare=(e,t,r,n,_,c)=>(i._MagickImage_Compare=s.bg)(e,t,r,n,_,c),i._MagickImage_CompareDistortion=(e,t,r,n,_)=>(i._MagickImage_CompareDistortion=s.cg)(e,t,r,n,_),i._MagickImage_Composite=(e,t,r,n,_,c,h)=>(i._MagickImage_Composite=s.dg)(e,t,r,n,_,c,h),i._MagickImage_CompositeGravity=(e,t,r,n,_,c,h,d)=>(i._MagickImage_CompositeGravity=s.eg)(e,t,r,n,_,c,h,d),i._MagickImage_ConnectedComponents=(e,t,r,n)=>(i._MagickImage_ConnectedComponents=s.fg)(e,t,r,n),i._MagickImage_Contrast=(e,t,r)=>(i._MagickImage_Contrast=s.gg)(e,t,r),i._MagickImage_ContrastStretch=(e,t,r,n,_)=>(i._MagickImage_ContrastStretch=s.hg)(e,t,r,n,_),i._MagickImage_ConvexHull=(e,t,r)=>(i._MagickImage_ConvexHull=s.ig)(e,t,r),i._MagickImage_Convolve=(e,t,r)=>(i._MagickImage_Convolve=s.jg)(e,t,r),i._MagickImage_CopyPixels=(e,t,r,n,_,c)=>(i._MagickImage_CopyPixels=s.kg)(e,t,r,n,_,c),i._MagickImage_Crop=(e,t,r,n)=>(i._MagickImage_Crop=s.lg)(e,t,r,n),i._MagickImage_CropToTiles=(e,t,r)=>(i._MagickImage_CropToTiles=s.mg)(e,t,r),i._MagickImage_CycleColormap=(e,t,r)=>(i._MagickImage_CycleColormap=s.ng)(e,t,r),i._MagickImage_Decipher=(e,t,r)=>(i._MagickImage_Decipher=s.og)(e,t,r),i._MagickImage_Deskew=(e,t,r)=>(i._MagickImage_Deskew=s.pg)(e,t,r),i._MagickImage_Despeckle=(e,t)=>(i._MagickImage_Despeckle=s.qg)(e,t),i._MagickImage_DetermineBitDepth=(e,t,r)=>(i._MagickImage_DetermineBitDepth=s.rg)(e,t,r),i._MagickImage_DetermineColorType=(e,t)=>(i._MagickImage_DetermineColorType=s.sg)(e,t),i._MagickImage_Distort=(e,t,r,n,_,c)=>(i._MagickImage_Distort=s.tg)(e,t,r,n,_,c),i._MagickImage_Edge=(e,t,r)=>(i._MagickImage_Edge=s.ug)(e,t,r),i._MagickImage_Emboss=(e,t,r,n)=>(i._MagickImage_Emboss=s.vg)(e,t,r,n),i._MagickImage_Encipher=(e,t,r)=>(i._MagickImage_Encipher=s.wg)(e,t,r),i._MagickImage_Enhance=(e,t)=>(i._MagickImage_Enhance=s.xg)(e,t),i._MagickImage_Equalize=(e,t,r)=>(i._MagickImage_Equalize=s.yg)(e,t,r),i._MagickImage_Equals=(e,t,r)=>(i._MagickImage_Equals=s.zg)(e,t,r),i._MagickImage_EvaluateFunction=(e,t,r,n,_,c)=>(i._MagickImage_EvaluateFunction=s.Ag)(e,t,r,n,_,c),i._MagickImage_EvaluateGeometry=(e,t,r,n,_,c)=>(i._MagickImage_EvaluateGeometry=s.Bg)(e,t,r,n,_,c),i._MagickImage_EvaluateOperator=(e,t,r,n,_)=>(i._MagickImage_EvaluateOperator=s.Cg)(e,t,r,n,_),i._MagickImage_Extent=(e,t,r,n)=>(i._MagickImage_Extent=s.Dg)(e,t,r,n),i._MagickImage_Flip=(e,t)=>(i._MagickImage_Flip=s.Eg)(e,t),i._MagickImage_FloodFill=(e,t,r,n,_,c,h)=>(i._MagickImage_FloodFill=s.Fg)(e,t,r,n,_,c,h),i._MagickImage_Flop=(e,t)=>(i._MagickImage_Flop=s.Gg)(e,t),i._MagickImage_FontTypeMetrics=(e,t,r,n)=>(i._MagickImage_FontTypeMetrics=s.Hg)(e,t,r,n),i._MagickImage_FormatExpression=(e,t,r,n)=>(i._MagickImage_FormatExpression=s.Ig)(e,t,r,n),i._MagickImage_Frame=(e,t,r)=>(i._MagickImage_Frame=s.Jg)(e,t,r),i._MagickImage_Fx=(e,t,r,n)=>(i._MagickImage_Fx=s.Kg)(e,t,r,n),i._MagickImage_GammaCorrect=(e,t,r,n)=>(i._MagickImage_GammaCorrect=s.Lg)(e,t,r,n),i._MagickImage_GaussianBlur=(e,t,r,n,_)=>(i._MagickImage_GaussianBlur=s.Mg)(e,t,r,n,_),i._MagickImage_GetArtifact=(e,t)=>(i._MagickImage_GetArtifact=s.Ng)(e,t),i._MagickImage_GetAttribute=(e,t,r)=>(i._MagickImage_GetAttribute=s.Og)(e,t,r),i._MagickImage_GetColormapColor=(e,t)=>(i._MagickImage_GetColormapColor=s.Pg)(e,t),i._MagickImage_GetNext=e=>(i._MagickImage_GetNext=s.Qg)(e),i._MagickImage_GetNextArtifactName=e=>(i._MagickImage_GetNextArtifactName=s.Rg)(e),i._MagickImage_GetNextAttributeName=e=>(i._MagickImage_GetNextAttributeName=s.Sg)(e),i._MagickImage_GetNextProfileName=e=>(i._MagickImage_GetNextProfileName=s.Tg)(e),i._MagickImage_GetProfile=(e,t)=>(i._MagickImage_GetProfile=s.Ug)(e,t),i._MagickImage_GetReadMask=(e,t)=>(i._MagickImage_GetReadMask=s.Vg)(e,t),i._MagickImage_GetWriteMask=(e,t)=>(i._MagickImage_GetWriteMask=s.Wg)(e,t),i._MagickImage_Grayscale=(e,t,r)=>(i._MagickImage_Grayscale=s.Xg)(e,t,r),i._MagickImage_HaldClut=(e,t,r,n)=>(i._MagickImage_HaldClut=s.Yg)(e,t,r,n),i._MagickImage_HasChannel=(e,t)=>(i._MagickImage_HasChannel=s.Zg)(e,t),i._MagickImage_HasProfile=(e,t)=>(i._MagickImage_HasProfile=s._g)(e,t),i._MagickImage_Histogram=(e,t,r)=>(i._MagickImage_Histogram=s.$g)(e,t,r),i._MagickImage_HoughLine=(e,t,r,n,_)=>(i._MagickImage_HoughLine=s.ah)(e,t,r,n,_),i._MagickImage_Implode=(e,t,r,n)=>(i._MagickImage_Implode=s.bh)(e,t,r,n),i._MagickImage_ImportPixels=(e,t,r,n,_,c,h,d,p,v)=>(i._MagickImage_ImportPixels=s.ch)(e,t,r,n,_,c,h,d,p,v),i._MagickImage_Integral=(e,t)=>(i._MagickImage_Integral=s.dh)(e,t),i._MagickImage_InterpolativeResize=(e,t,r,n)=>(i._MagickImage_InterpolativeResize=s.eh)(e,t,r,n),i._MagickImage_InverseLevel=(e,t,r,n,_,c)=>(i._MagickImage_InverseLevel=s.fh)(e,t,r,n,_,c),i._MagickImage_Kmeans=(e,t,r,n,_)=>(i._MagickImage_Kmeans=s.gh)(e,t,r,n,_),i._MagickImage_Kuwahara=(e,t,r,n)=>(i._MagickImage_Kuwahara=s.hh)(e,t,r,n),i._MagickImage_Level=(e,t,r,n,_,c)=>(i._MagickImage_Level=s.ih)(e,t,r,n,_,c),i._MagickImage_LevelColors=(e,t,r,n,_,c)=>(i._MagickImage_LevelColors=s.jh)(e,t,r,n,_,c),i._MagickImage_LinearStretch=(e,t,r,n)=>(i._MagickImage_LinearStretch=s.kh)(e,t,r,n),i._MagickImage_LiquidRescale=(e,t,r,n,_)=>(i._MagickImage_LiquidRescale=s.lh)(e,t,r,n,_),i._MagickImage_LocalContrast=(e,t,r,n,_)=>(i._MagickImage_LocalContrast=s.mh)(e,t,r,n,_),i._MagickImage_Magnify=(e,t)=>(i._MagickImage_Magnify=s.nh)(e,t),i._MagickImage_MeanShift=(e,t,r,n,_)=>(i._MagickImage_MeanShift=s.oh)(e,t,r,n,_),i._MagickImage_Minify=(e,t)=>(i._MagickImage_Minify=s.ph)(e,t),i._MagickImage_MinimumBoundingBox=(e,t,r)=>(i._MagickImage_MinimumBoundingBox=s.qh)(e,t,r),i._MagickImage_Modulate=(e,t,r)=>(i._MagickImage_Modulate=s.rh)(e,t,r),i._MagickImage_Moments=(e,t)=>(i._MagickImage_Moments=s.sh)(e,t),i._MagickImage_Morphology=(e,t,r,n,_,c)=>(i._MagickImage_Morphology=s.th)(e,t,r,n,_,c),i._MagickImage_MotionBlur=(e,t,r,n,_)=>(i._MagickImage_MotionBlur=s.uh)(e,t,r,n,_),i._MagickImage_Negate=(e,t,r,n)=>(i._MagickImage_Negate=s.vh)(e,t,r,n),i._MagickImage_Normalize=(e,t)=>(i._MagickImage_Normalize=s.wh)(e,t),i._MagickImage_OilPaint=(e,t,r,n)=>(i._MagickImage_OilPaint=s.xh)(e,t,r,n),i._MagickImage_Opaque=(e,t,r,n,_)=>(i._MagickImage_Opaque=s.yh)(e,t,r,n,_),i._MagickImage_OrderedDither=(e,t,r,n)=>(i._MagickImage_OrderedDither=s.zh)(e,t,r,n),i._MagickImage_Perceptible=(e,t,r,n)=>(i._MagickImage_Perceptible=s.Ah)(e,t,r,n),i._MagickImage_PerceptualHash=(e,t)=>(i._MagickImage_PerceptualHash=s.Bh)(e,t),i._MagickImage_Quantize=(e,t,r)=>(i._MagickImage_Quantize=s.Ch)(e,t,r),i._MagickImage_Polaroid=(e,t,r,n,_,c)=>(i._MagickImage_Polaroid=s.Dh)(e,t,r,n,_,c),i._MagickImage_Posterize=(e,t,r,n,_)=>(i._MagickImage_Posterize=s.Eh)(e,t,r,n,_),i._MagickImage_RaiseOrLower=(e,t,r,n)=>(i._MagickImage_RaiseOrLower=s.Fh)(e,t,r,n),i._MagickImage_RandomThreshold=(e,t,r,n,_)=>(i._MagickImage_RandomThreshold=s.Gh)(e,t,r,n,_),i._MagickImage_RangeThreshold=(e,t,r,n,_,c)=>(i._MagickImage_RangeThreshold=s.Hh)(e,t,r,n,_,c),i._MagickImage_ReadBlob=(e,t,r,n,_)=>(i._MagickImage_ReadBlob=s.Ih)(e,t,r,n,_),i._MagickImage_ReadFile=(e,t)=>(i._MagickImage_ReadFile=s.Jh)(e,t),i._MagickImage_ReadPixels=(e,t,r,n,_,c,h)=>(i._MagickImage_ReadPixels=s.Kh)(e,t,r,n,_,c,h),i._MagickImage_ReadStream=(e,t,r,n,_,c)=>(i._MagickImage_ReadStream=s.Lh)(e,t,r,n,_,c),i._MagickImage_RegionMask=(e,t,r)=>(i._MagickImage_RegionMask=s.Mh)(e,t,r),i._MagickImage_Remap=(e,t,r,n)=>(i._MagickImage_Remap=s.Nh)(e,t,r,n),i._MagickImage_RemoveArtifact=(e,t)=>(i._MagickImage_RemoveArtifact=s.Oh)(e,t),i._MagickImage_RemoveAttribute=(e,t)=>(i._MagickImage_RemoveAttribute=s.Ph)(e,t),i._MagickImage_RemoveProfile=(e,t)=>(i._MagickImage_RemoveProfile=s.Qh)(e,t),i._MagickImage_ResetArtifactIterator=e=>(i._MagickImage_ResetArtifactIterator=s.Rh)(e),i._MagickImage_ResetAttributeIterator=e=>(i._MagickImage_ResetAttributeIterator=s.Sh)(e),i._MagickImage_ResetProfileIterator=e=>(i._MagickImage_ResetProfileIterator=s.Th)(e),i._MagickImage_Resample=(e,t,r,n)=>(i._MagickImage_Resample=s.Uh)(e,t,r,n),i._MagickImage_Resize=(e,t,r)=>(i._MagickImage_Resize=s.Vh)(e,t,r),i._MagickImage_Roll=(e,t,r,n)=>(i._MagickImage_Roll=s.Wh)(e,t,r,n),i._MagickImage_Rotate=(e,t,r)=>(i._MagickImage_Rotate=s.Xh)(e,t,r),i._MagickImage_RotationalBlur=(e,t,r,n)=>(i._MagickImage_RotationalBlur=s.Yh)(e,t,r,n),i._MagickImage_Sample=(e,t,r)=>(i._MagickImage_Sample=s.Zh)(e,t,r),i._MagickImage_Scale=(e,t,r)=>(i._MagickImage_Scale=s._h)(e,t,r),i._MagickImage_Segment=(e,t,r,n,_)=>(i._MagickImage_Segment=s.$h)(e,t,r,n,_),i._MagickImage_SelectiveBlur=(e,t,r,n,_,c)=>(i._MagickImage_SelectiveBlur=s.ai)(e,t,r,n,_,c),i._MagickImage_Separate=(e,t,r)=>(i._MagickImage_Separate=s.bi)(e,t,r),i._MagickImage_SepiaTone=(e,t,r)=>(i._MagickImage_SepiaTone=s.ci)(e,t,r),i._MagickImage_SetAlpha=(e,t,r)=>(i._MagickImage_SetAlpha=s.di)(e,t,r),i._MagickImage_SetArtifact=(e,t,r)=>(i._MagickImage_SetArtifact=s.ei)(e,t,r),i._MagickImage_SetAttribute=(e,t,r,n)=>(i._MagickImage_SetAttribute=s.fi)(e,t,r,n),i._MagickImage_SetBitDepth=(e,t,r,n)=>(i._MagickImage_SetBitDepth=s.gi)(e,t,r,n),i._MagickImage_SetClientData=(e,t)=>(i._MagickImage_SetClientData=s.hi)(e,t),i._MagickImage_SetColormapColor=(e,t,r,n)=>(i._MagickImage_SetColormapColor=s.ii)(e,t,r,n),i._MagickImage_SetColorMetric=(e,t,r)=>(i._MagickImage_SetColorMetric=s.ji)(e,t,r),i._MagickImage_SetNext=(e,t)=>(i._MagickImage_SetNext=s.ki)(e,t),i._MagickImage_SetProfile=(e,t,r,n,_)=>(i._MagickImage_SetProfile=s.li)(e,t,r,n,_),i._MagickImage_SetProgressDelegate=(e,t)=>(i._MagickImage_SetProgressDelegate=s.mi)(e,t),i._MagickImage_SetReadMask=(e,t,r)=>(i._MagickImage_SetReadMask=s.ni)(e,t,r),i._MagickImage_SetWriteMask=(e,t,r)=>(i._MagickImage_SetWriteMask=s.oi)(e,t,r),i._MagickImage_Shade=(e,t,r,n,_,c)=>(i._MagickImage_Shade=s.pi)(e,t,r,n,_,c),i._MagickImage_Shadow=(e,t,r,n,_,c)=>(i._MagickImage_Shadow=s.qi)(e,t,r,n,_,c),i._MagickImage_Sharpen=(e,t,r,n,_)=>(i._MagickImage_Sharpen=s.ri)(e,t,r,n,_),i._MagickImage_Shave=(e,t,r,n)=>(i._MagickImage_Shave=s.si)(e,t,r,n),i._MagickImage_Shear=(e,t,r,n)=>(i._MagickImage_Shear=s.ti)(e,t,r,n),i._MagickImage_SigmoidalContrast=(e,t,r,n,_,c)=>(i._MagickImage_SigmoidalContrast=s.ui)(e,t,r,n,_,c),i._MagickImage_SparseColor=(e,t,r,n,_,c)=>(i._MagickImage_SparseColor=s.vi)(e,t,r,n,_,c),i._MagickImage_Spread=(e,t,r,n)=>(i._MagickImage_Spread=s.wi)(e,t,r,n),i._MagickImage_Sketch=(e,t,r,n,_)=>(i._MagickImage_Sketch=s.xi)(e,t,r,n,_),i._MagickImage_Solarize=(e,t,r)=>(i._MagickImage_Solarize=s.yi)(e,t,r),i._MagickImage_SortPixels=(e,t)=>(i._MagickImage_SortPixels=s.zi)(e,t),i._MagickImage_Splice=(e,t,r)=>(i._MagickImage_Splice=s.Ai)(e,t,r),i._MagickImage_Statistic=(e,t,r,n,_)=>(i._MagickImage_Statistic=s.Bi)(e,t,r,n,_),i._MagickImage_Statistics=(e,t,r)=>(i._MagickImage_Statistics=s.Ci)(e,t,r),i._MagickImage_Stegano=(e,t,r)=>(i._MagickImage_Stegano=s.Di)(e,t,r),i._MagickImage_Stereo=(e,t,r)=>(i._MagickImage_Stereo=s.Ei)(e,t,r),i._MagickImage_Strip=(e,t)=>(i._MagickImage_Strip=s.Fi)(e,t),i._MagickImage_SubImageSearch=(e,t,r,n,_,c,h)=>(i._MagickImage_SubImageSearch=s.Gi)(e,t,r,n,_,c,h),i._MagickImage_Swirl=(e,t,r,n)=>(i._MagickImage_Swirl=s.Hi)(e,t,r,n),i._MagickImage_Texture=(e,t,r)=>(i._MagickImage_Texture=s.Ii)(e,t,r),i._MagickImage_Threshold=(e,t,r,n)=>(i._MagickImage_Threshold=s.Ji)(e,t,r,n),i._MagickImage_Thumbnail=(e,t,r)=>(i._MagickImage_Thumbnail=s.Ki)(e,t,r),i._MagickImage_Tint=(e,t,r,n)=>(i._MagickImage_Tint=s.Li)(e,t,r,n),i._MagickImage_Transparent=(e,t,r,n)=>(i._MagickImage_Transparent=s.Mi)(e,t,r,n),i._MagickImage_TransparentChroma=(e,t,r,n,_)=>(i._MagickImage_TransparentChroma=s.Ni)(e,t,r,n,_),i._MagickImage_Transpose=(e,t)=>(i._MagickImage_Transpose=s.Oi)(e,t),i._MagickImage_Transverse=(e,t)=>(i._MagickImage_Transverse=s.Pi)(e,t),i._MagickImage_Trim=(e,t)=>(i._MagickImage_Trim=s.Qi)(e,t),i._MagickImage_UniqueColors=(e,t)=>(i._MagickImage_UniqueColors=s.Ri)(e,t),i._MagickImage_UnsharpMask=(e,t,r,n,_,c,h)=>(i._MagickImage_UnsharpMask=s.Si)(e,t,r,n,_,c,h),i._MagickImage_Vignette=(e,t,r,n,_,c)=>(i._MagickImage_Vignette=s.Ti)(e,t,r,n,_,c),i._MagickImage_Wave=(e,t,r,n,_)=>(i._MagickImage_Wave=s.Ui)(e,t,r,n,_),i._MagickImage_WaveletDenoise=(e,t,r,n)=>(i._MagickImage_WaveletDenoise=s.Vi)(e,t,r,n),i._MagickImage_WhiteBalance=(e,t)=>(i._MagickImage_WhiteBalance=s.Wi)(e,t),i._MagickImage_WhiteThreshold=(e,t,r,n)=>(i._MagickImage_WhiteThreshold=s.Xi)(e,t,r,n),i._MagickImage_WriteBlob=(e,t,r,n)=>(i._MagickImage_WriteBlob=s.Yi)(e,t,r,n),i._MagickImage_WriteFile=(e,t,r)=>(i._MagickImage_WriteFile=s.Zi)(e,t,r),i._MagickImage_WriteStream=(e,t,r,n,_,c,h,d)=>(i._MagickImage_WriteStream=s._i)(e,t,r,n,_,c,h,d),i._MagickImageCollection_Append=(e,t,r)=>(i._MagickImageCollection_Append=s.$i)(e,t,r),i._MagickImageCollection_Coalesce=(e,t)=>(i._MagickImageCollection_Coalesce=s.aj)(e,t),i._MagickImageCollection_Combine=(e,t,r)=>(i._MagickImageCollection_Combine=s.bj)(e,t,r),i._MagickImageCollection_Complex=(e,t,r)=>(i._MagickImageCollection_Complex=s.cj)(e,t,r),i._MagickImageCollection_Deconstruct=(e,t)=>(i._MagickImageCollection_Deconstruct=s.dj)(e,t),i._MagickImageCollection_Dispose=e=>(i._MagickImageCollection_Dispose=s.ej)(e),i._MagickImageCollection_Evaluate=(e,t,r)=>(i._MagickImageCollection_Evaluate=s.fj)(e,t,r),i._MagickImageCollection_Fx=(e,t,r,n)=>(i._MagickImageCollection_Fx=s.gj)(e,t,r,n),i._MagickImageCollection_Merge=(e,t,r)=>(i._MagickImageCollection_Merge=s.hj)(e,t,r),i._MagickImageCollection_Montage=(e,t,r)=>(i._MagickImageCollection_Montage=s.ij)(e,t,r),i._MagickImageCollection_Morph=(e,t,r)=>(i._MagickImageCollection_Morph=s.jj)(e,t,r),i._MagickImageCollection_Optimize=(e,t)=>(i._MagickImageCollection_Optimize=s.kj)(e,t),i._MagickImageCollection_OptimizePlus=(e,t)=>(i._MagickImageCollection_OptimizePlus=s.lj)(e,t),i._MagickImageCollection_OptimizeTransparency=(e,t)=>(i._MagickImageCollection_OptimizeTransparency=s.mj)(e,t),i._MagickImageCollection_Polynomial=(e,t,r,n)=>(i._MagickImageCollection_Polynomial=s.nj)(e,t,r,n),i._MagickImageCollection_Quantize=(e,t,r)=>(i._MagickImageCollection_Quantize=s.oj)(e,t,r),i._MagickImageCollection_ReadBlob=(e,t,r,n,_)=>(i._MagickImageCollection_ReadBlob=s.pj)(e,t,r,n,_),i._MagickImageCollection_ReadFile=(e,t)=>(i._MagickImageCollection_ReadFile=s.qj)(e,t),i._MagickImageCollection_ReadStream=(e,t,r,n,_,c)=>(i._MagickImageCollection_ReadStream=s.rj)(e,t,r,n,_,c),i._MagickImageCollection_Remap=(e,t,r,n)=>(i._MagickImageCollection_Remap=s.sj)(e,t,r,n),i._MagickImageCollection_Smush=(e,t,r,n)=>(i._MagickImageCollection_Smush=s.tj)(e,t,r,n),i._MagickImageCollection_WriteFile=(e,t,r)=>(i._MagickImageCollection_WriteFile=s.uj)(e,t,r),i._MagickImageCollection_WriteStream=(e,t,r,n,_,c,h,d)=>(i._MagickImageCollection_WriteStream=s.vj)(e,t,r,n,_,c,h,d),i._DoubleMatrix_Create=(e,t)=>(i._DoubleMatrix_Create=s.wj)(e,t),i._DoubleMatrix_Dispose=e=>(i._DoubleMatrix_Dispose=s.xj)(e),i._OpenCL_GetDevices=e=>(i._OpenCL_GetDevices=s.yj)(e),i._OpenCL_GetDevice=(e,t)=>(i._OpenCL_GetDevice=s.zj)(e,t),i._OpenCL_GetEnabled=()=>(i._OpenCL_GetEnabled=s.Aj)(),i._OpenCL_SetEnabled=e=>(i._OpenCL_SetEnabled=s.Bj)(e),i._OpenCLDevice_DeviceType_Get=e=>(i._OpenCLDevice_DeviceType_Get=s.Cj)(e),i._OpenCLDevice_BenchmarkScore_Get=e=>(i._OpenCLDevice_BenchmarkScore_Get=s.Dj)(e),i._OpenCLDevice_IsEnabled_Get=e=>(i._OpenCLDevice_IsEnabled_Get=s.Ej)(e),i._OpenCLDevice_IsEnabled_Set=(e,t)=>(i._OpenCLDevice_IsEnabled_Set=s.Fj)(e,t),i._OpenCLDevice_Name_Get=e=>(i._OpenCLDevice_Name_Get=s.Gj)(e),i._OpenCLDevice_Version_Get=e=>(i._OpenCLDevice_Version_Get=s.Hj)(e),i._OpenCLDevice_GetKernelProfileRecords=(e,t)=>(i._OpenCLDevice_GetKernelProfileRecords=s.Ij)(e,t),i._OpenCLDevice_GetKernelProfileRecord=(e,t)=>(i._OpenCLDevice_GetKernelProfileRecord=s.Jj)(e,t),i._OpenCLDevice_SetProfileKernels=(e,t)=>(i._OpenCLDevice_SetProfileKernels=s.Kj)(e,t),i._OpenCLKernelProfileRecord_Count_Get=e=>(i._OpenCLKernelProfileRecord_Count_Get=s.Lj)(e),i._OpenCLKernelProfileRecord_Name_Get=e=>(i._OpenCLKernelProfileRecord_Name_Get=s.Mj)(e),i._OpenCLKernelProfileRecord_MaximumDuration_Get=e=>(i._OpenCLKernelProfileRecord_MaximumDuration_Get=s.Nj)(e),i._OpenCLKernelProfileRecord_MinimumDuration_Get=e=>(i._OpenCLKernelProfileRecord_MinimumDuration_Get=s.Oj)(e),i._OpenCLKernelProfileRecord_TotalDuration_Get=e=>(i._OpenCLKernelProfileRecord_TotalDuration_Get=s.Pj)(e),i._JpegOptimizer_CompressFile=(e,t,r,n,_,c)=>(i._JpegOptimizer_CompressFile=s.Qj)(e,t,r,n,_,c),i._JpegOptimizer_CompressStream=(e,t,r,n,_,c)=>(i._JpegOptimizer_CompressStream=s.Rj)(e,t,r,n,_,c);var Si=i._malloc=e=>(Si=i._malloc=s.Sj)(e),Ae=i._free=e=>(Ae=i._free=s.Tj)(e);i._PixelCollection_Create=(e,t)=>(i._PixelCollection_Create=s.Uj)(e,t),i._PixelCollection_Dispose=e=>(i._PixelCollection_Dispose=s.Vj)(e),i._PixelCollection_GetArea=(e,t,r,n,_,c)=>(i._PixelCollection_GetArea=s.Wj)(e,t,r,n,_,c),i._PixelCollection_GetReadOnlyArea=(e,t,r,n,_,c)=>(i._PixelCollection_GetReadOnlyArea=s.Xj)(e,t,r,n,_,c),i._PixelCollection_SetArea=(e,t,r,n,_,c,h,d)=>(i._PixelCollection_SetArea=s.Yj)(e,t,r,n,_,c,h,d),i._PixelCollection_ToByteArray=(e,t,r,n,_,c,h)=>(i._PixelCollection_ToByteArray=s.Zj)(e,t,r,n,_,c,h),i._PixelCollection_ToShortArray=(e,t,r,n,_,c,h)=>(i._PixelCollection_ToShortArray=s._j)(e,t,r,n,_,c,h),i._Quantum_Depth_Get=()=>(i._Quantum_Depth_Get=s.$j)(),i._Quantum_Max_Get=()=>(i._Quantum_Max_Get=s.ak)(),i._Quantum_ScaleToByte=e=>(i._Quantum_ScaleToByte=s.bk)(e),i._ResourceLimits_Area_Get=()=>(i._ResourceLimits_Area_Get=s.ck)(),i._ResourceLimits_Area_Set=e=>(i._ResourceLimits_Area_Set=s.dk)(e),i._ResourceLimits_Disk_Get=()=>(i._ResourceLimits_Disk_Get=s.ek)(),i._ResourceLimits_Disk_Set=e=>(i._ResourceLimits_Disk_Set=s.fk)(e),i._ResourceLimits_Height_Get=()=>(i._ResourceLimits_Height_Get=s.gk)(),i._ResourceLimits_Height_Set=e=>(i._ResourceLimits_Height_Set=s.hk)(e),i._ResourceLimits_ListLength_Get=()=>(i._ResourceLimits_ListLength_Get=s.ik)(),i._ResourceLimits_ListLength_Set=e=>(i._ResourceLimits_ListLength_Set=s.jk)(e),i._ResourceLimits_MaxMemoryRequest_Get=()=>(i._ResourceLimits_MaxMemoryRequest_Get=s.kk)(),i._ResourceLimits_MaxMemoryRequest_Set=(e,t)=>(i._ResourceLimits_MaxMemoryRequest_Set=s.lk)(e,t),i._ResourceLimits_MaxProfileSize_Get=()=>(i._ResourceLimits_MaxProfileSize_Get=s.mk)(),i._ResourceLimits_MaxProfileSize_Set=(e,t)=>(i._ResourceLimits_MaxProfileSize_Set=s.nk)(e,t),i._ResourceLimits_Memory_Get=()=>(i._ResourceLimits_Memory_Get=s.ok)(),i._ResourceLimits_Memory_Set=e=>(i._ResourceLimits_Memory_Set=s.pk)(e),i._ResourceLimits_Thread_Get=()=>(i._ResourceLimits_Thread_Get=s.qk)(),i._ResourceLimits_Thread_Set=e=>(i._ResourceLimits_Thread_Set=s.rk)(e),i._ResourceLimits_Throttle_Get=()=>(i._ResourceLimits_Throttle_Get=s.sk)(),i._ResourceLimits_Throttle_Set=e=>(i._ResourceLimits_Throttle_Set=s.tk)(e),i._ResourceLimits_Time_Get=()=>(i._ResourceLimits_Time_Get=s.uk)(),i._ResourceLimits_Time_Set=e=>(i._ResourceLimits_Time_Set=s.vk)(e),i._ResourceLimits_Width_Get=()=>(i._ResourceLimits_Width_Get=s.wk)(),i._ResourceLimits_Width_Set=e=>(i._ResourceLimits_Width_Set=s.xk)(e),i._ResourceLimits_LimitMemory=e=>(i._ResourceLimits_LimitMemory=s.yk)(e),i._DrawingSettings_Create=()=>(i._DrawingSettings_Create=s.zk)(),i._DrawingSettings_Dispose=e=>(i._DrawingSettings_Dispose=s.Ak)(e),i._DrawingSettings_BorderColor_Get=e=>(i._DrawingSettings_BorderColor_Get=s.Bk)(e),i._DrawingSettings_BorderColor_Set=(e,t)=>(i._DrawingSettings_BorderColor_Set=s.Ck)(e,t),i._DrawingSettings_FillColor_Get=e=>(i._DrawingSettings_FillColor_Get=s.Dk)(e),i._DrawingSettings_FillColor_Set=(e,t)=>(i._DrawingSettings_FillColor_Set=s.Ek)(e,t),i._DrawingSettings_FillRule_Get=e=>(i._DrawingSettings_FillRule_Get=s.Fk)(e),i._DrawingSettings_FillRule_Set=(e,t)=>(i._DrawingSettings_FillRule_Set=s.Gk)(e,t),i._DrawingSettings_Font_Get=e=>(i._DrawingSettings_Font_Get=s.Hk)(e),i._DrawingSettings_Font_Set=(e,t)=>(i._DrawingSettings_Font_Set=s.Ik)(e,t),i._DrawingSettings_FontFamily_Get=e=>(i._DrawingSettings_FontFamily_Get=s.Jk)(e),i._DrawingSettings_FontFamily_Set=(e,t)=>(i._DrawingSettings_FontFamily_Set=s.Kk)(e,t),i._DrawingSettings_FontPointsize_Get=e=>(i._DrawingSettings_FontPointsize_Get=s.Lk)(e),i._DrawingSettings_FontPointsize_Set=(e,t)=>(i._DrawingSettings_FontPointsize_Set=s.Mk)(e,t),i._DrawingSettings_FontStyle_Get=e=>(i._DrawingSettings_FontStyle_Get=s.Nk)(e),i._DrawingSettings_FontStyle_Set=(e,t)=>(i._DrawingSettings_FontStyle_Set=s.Ok)(e,t),i._DrawingSettings_FontWeight_Get=e=>(i._DrawingSettings_FontWeight_Get=s.Pk)(e),i._DrawingSettings_FontWeight_Set=(e,t)=>(i._DrawingSettings_FontWeight_Set=s.Qk)(e,t),i._DrawingSettings_StrokeAntiAlias_Get=e=>(i._DrawingSettings_StrokeAntiAlias_Get=s.Rk)(e),i._DrawingSettings_StrokeAntiAlias_Set=(e,t)=>(i._DrawingSettings_StrokeAntiAlias_Set=s.Sk)(e,t),i._DrawingSettings_StrokeColor_Get=e=>(i._DrawingSettings_StrokeColor_Get=s.Tk)(e),i._DrawingSettings_StrokeColor_Set=(e,t)=>(i._DrawingSettings_StrokeColor_Set=s.Uk)(e,t),i._DrawingSettings_StrokeDashOffset_Get=e=>(i._DrawingSettings_StrokeDashOffset_Get=s.Vk)(e),i._DrawingSettings_StrokeDashOffset_Set=(e,t)=>(i._DrawingSettings_StrokeDashOffset_Set=s.Wk)(e,t),i._DrawingSettings_StrokeLineCap_Get=e=>(i._DrawingSettings_StrokeLineCap_Get=s.Xk)(e),i._DrawingSettings_StrokeLineCap_Set=(e,t)=>(i._DrawingSettings_StrokeLineCap_Set=s.Yk)(e,t),i._DrawingSettings_StrokeLineJoin_Get=e=>(i._DrawingSettings_StrokeLineJoin_Get=s.Zk)(e),i._DrawingSettings_StrokeLineJoin_Set=(e,t)=>(i._DrawingSettings_StrokeLineJoin_Set=s._k)(e,t),i._DrawingSettings_StrokeMiterLimit_Get=e=>(i._DrawingSettings_StrokeMiterLimit_Get=s.$k)(e),i._DrawingSettings_StrokeMiterLimit_Set=(e,t)=>(i._DrawingSettings_StrokeMiterLimit_Set=s.al)(e,t),i._DrawingSettings_StrokeWidth_Get=e=>(i._DrawingSettings_StrokeWidth_Get=s.bl)(e),i._DrawingSettings_StrokeWidth_Set=(e,t)=>(i._DrawingSettings_StrokeWidth_Set=s.cl)(e,t),i._DrawingSettings_TextAntiAlias_Get=e=>(i._DrawingSettings_TextAntiAlias_Get=s.dl)(e),i._DrawingSettings_TextAntiAlias_Set=(e,t)=>(i._DrawingSettings_TextAntiAlias_Set=s.el)(e,t),i._DrawingSettings_TextDirection_Get=e=>(i._DrawingSettings_TextDirection_Get=s.fl)(e),i._DrawingSettings_TextDirection_Set=(e,t)=>(i._DrawingSettings_TextDirection_Set=s.gl)(e,t),i._DrawingSettings_TextEncoding_Get=e=>(i._DrawingSettings_TextEncoding_Get=s.hl)(e),i._DrawingSettings_TextEncoding_Set=(e,t)=>(i._DrawingSettings_TextEncoding_Set=s.il)(e,t),i._DrawingSettings_TextGravity_Get=e=>(i._DrawingSettings_TextGravity_Get=s.jl)(e),i._DrawingSettings_TextGravity_Set=(e,t)=>(i._DrawingSettings_TextGravity_Set=s.kl)(e,t),i._DrawingSettings_TextInterlineSpacing_Get=e=>(i._DrawingSettings_TextInterlineSpacing_Get=s.ll)(e),i._DrawingSettings_TextInterlineSpacing_Set=(e,t)=>(i._DrawingSettings_TextInterlineSpacing_Set=s.ml)(e,t),i._DrawingSettings_TextInterwordSpacing_Get=e=>(i._DrawingSettings_TextInterwordSpacing_Get=s.nl)(e),i._DrawingSettings_TextInterwordSpacing_Set=(e,t)=>(i._DrawingSettings_TextInterwordSpacing_Set=s.ol)(e,t),i._DrawingSettings_TextKerning_Get=e=>(i._DrawingSettings_TextKerning_Get=s.pl)(e),i._DrawingSettings_TextKerning_Set=(e,t)=>(i._DrawingSettings_TextKerning_Set=s.ql)(e,t),i._DrawingSettings_TextUnderColor_Get=e=>(i._DrawingSettings_TextUnderColor_Get=s.rl)(e),i._DrawingSettings_TextUnderColor_Set=(e,t)=>(i._DrawingSettings_TextUnderColor_Set=s.sl)(e,t),i._DrawingSettings_SetAffine=(e,t,r,n,_,c,h)=>(i._DrawingSettings_SetAffine=s.tl)(e,t,r,n,_,c,h),i._DrawingSettings_SetFillPattern=(e,t,r)=>(i._DrawingSettings_SetFillPattern=s.ul)(e,t,r),i._DrawingSettings_SetStrokeDashArray=(e,t,r)=>(i._DrawingSettings_SetStrokeDashArray=s.vl)(e,t,r),i._DrawingSettings_SetStrokePattern=(e,t,r)=>(i._DrawingSettings_SetStrokePattern=s.wl)(e,t,r),i._DrawingSettings_SetText=(e,t)=>(i._DrawingSettings_SetText=s.xl)(e,t),i._MagickSettings_Create=()=>(i._MagickSettings_Create=s.yl)(),i._MagickSettings_Dispose=e=>(i._MagickSettings_Dispose=s.zl)(e),i._MagickSettings_AntiAlias_Get=e=>(i._MagickSettings_AntiAlias_Get=s.Al)(e),i._MagickSettings_AntiAlias_Set=(e,t)=>(i._MagickSettings_AntiAlias_Set=s.Bl)(e,t),i._MagickSettings_BackgroundColor_Get=e=>(i._MagickSettings_BackgroundColor_Get=s.Cl)(e),i._MagickSettings_BackgroundColor_Set=(e,t)=>(i._MagickSettings_BackgroundColor_Set=s.Dl)(e,t),i._MagickSettings_ColorSpace_Get=e=>(i._MagickSettings_ColorSpace_Get=s.El)(e),i._MagickSettings_ColorSpace_Set=(e,t)=>(i._MagickSettings_ColorSpace_Set=s.Fl)(e,t),i._MagickSettings_ColorType_Get=e=>(i._MagickSettings_ColorType_Get=s.Gl)(e),i._MagickSettings_ColorType_Set=(e,t)=>(i._MagickSettings_ColorType_Set=s.Hl)(e,t),i._MagickSettings_Compression_Get=e=>(i._MagickSettings_Compression_Get=s.Il)(e),i._MagickSettings_Compression_Set=(e,t)=>(i._MagickSettings_Compression_Set=s.Jl)(e,t),i._MagickSettings_Debug_Get=e=>(i._MagickSettings_Debug_Get=s.Kl)(e),i._MagickSettings_Debug_Set=(e,t)=>(i._MagickSettings_Debug_Set=s.Ll)(e,t),i._MagickSettings_Density_Get=e=>(i._MagickSettings_Density_Get=s.Ml)(e),i._MagickSettings_Density_Set=(e,t)=>(i._MagickSettings_Density_Set=s.Nl)(e,t),i._MagickSettings_Depth_Get=e=>(i._MagickSettings_Depth_Get=s.Ol)(e),i._MagickSettings_Depth_Set=(e,t)=>(i._MagickSettings_Depth_Set=s.Pl)(e,t),i._MagickSettings_Endian_Get=e=>(i._MagickSettings_Endian_Get=s.Ql)(e),i._MagickSettings_Endian_Set=(e,t)=>(i._MagickSettings_Endian_Set=s.Rl)(e,t),i._MagickSettings_Extract_Get=e=>(i._MagickSettings_Extract_Get=s.Sl)(e),i._MagickSettings_Extract_Set=(e,t)=>(i._MagickSettings_Extract_Set=s.Tl)(e,t),i._MagickSettings_Format_Get=e=>(i._MagickSettings_Format_Get=s.Ul)(e),i._MagickSettings_Format_Set=(e,t)=>(i._MagickSettings_Format_Set=s.Vl)(e,t),i._MagickSettings_FontPointsize_Get=e=>(i._MagickSettings_FontPointsize_Get=s.Wl)(e),i._MagickSettings_FontPointsize_Set=(e,t)=>(i._MagickSettings_FontPointsize_Set=s.Xl)(e,t),i._MagickSettings_Interlace_Get=e=>(i._MagickSettings_Interlace_Get=s.Yl)(e),i._MagickSettings_Interlace_Set=(e,t)=>(i._MagickSettings_Interlace_Set=s.Zl)(e,t),i._MagickSettings_Monochrome_Get=e=>(i._MagickSettings_Monochrome_Get=s._l)(e),i._MagickSettings_Monochrome_Set=(e,t)=>(i._MagickSettings_Monochrome_Set=s.$l)(e,t),i._MagickSettings_Verbose_Get=e=>(i._MagickSettings_Verbose_Get=s.am)(e),i._MagickSettings_Verbose_Set=(e,t)=>(i._MagickSettings_Verbose_Set=s.bm)(e,t),i._MagickSettings_SetColorFuzz=(e,t)=>(i._MagickSettings_SetColorFuzz=s.cm)(e,t),i._MagickSettings_SetFileName=(e,t)=>(i._MagickSettings_SetFileName=s.dm)(e,t),i._MagickSettings_SetFont=(e,t)=>(i._MagickSettings_SetFont=s.em)(e,t),i._MagickSettings_SetNumberScenes=(e,t)=>(i._MagickSettings_SetNumberScenes=s.fm)(e,t),i._MagickSettings_SetOption=(e,t,r)=>(i._MagickSettings_SetOption=s.gm)(e,t,r),i._MagickSettings_SetPage=(e,t)=>(i._MagickSettings_SetPage=s.hm)(e,t),i._MagickSettings_SetPing=(e,t)=>(i._MagickSettings_SetPing=s.im)(e,t),i._MagickSettings_SetQuality=(e,t)=>(i._MagickSettings_SetQuality=s.jm)(e,t),i._MagickSettings_SetScenes=(e,t)=>(i._MagickSettings_SetScenes=s.km)(e,t),i._MagickSettings_SetScene=(e,t)=>(i._MagickSettings_SetScene=s.lm)(e,t),i._MagickSettings_SetSize=(e,t)=>(i._MagickSettings_SetSize=s.mm)(e,t),i._MontageSettings_Create=()=>(i._MontageSettings_Create=s.nm)(),i._MontageSettings_Dispose=e=>(i._MontageSettings_Dispose=s.om)(e),i._MontageSettings_SetBackgroundColor=(e,t)=>(i._MontageSettings_SetBackgroundColor=s.pm)(e,t),i._MontageSettings_SetBorderColor=(e,t)=>(i._MontageSettings_SetBorderColor=s.qm)(e,t),i._MontageSettings_SetBorderWidth=(e,t)=>(i._MontageSettings_SetBorderWidth=s.rm)(e,t),i._MontageSettings_SetFillColor=(e,t)=>(i._MontageSettings_SetFillColor=s.sm)(e,t),i._MontageSettings_SetFont=(e,t)=>(i._MontageSettings_SetFont=s.tm)(e,t),i._MontageSettings_SetFontPointsize=(e,t)=>(i._MontageSettings_SetFontPointsize=s.um)(e,t),i._MontageSettings_SetFrameGeometry=(e,t)=>(i._MontageSettings_SetFrameGeometry=s.vm)(e,t),i._MontageSettings_SetGeometry=(e,t)=>(i._MontageSettings_SetGeometry=s.wm)(e,t),i._MontageSettings_SetGravity=(e,t)=>(i._MontageSettings_SetGravity=s.xm)(e,t),i._MontageSettings_SetShadow=(e,t)=>(i._MontageSettings_SetShadow=s.ym)(e,t),i._MontageSettings_SetStrokeColor=(e,t)=>(i._MontageSettings_SetStrokeColor=s.zm)(e,t),i._MontageSettings_SetTextureFileName=(e,t)=>(i._MontageSettings_SetTextureFileName=s.Am)(e,t),i._MontageSettings_SetTileGeometry=(e,t)=>(i._MontageSettings_SetTileGeometry=s.Bm)(e,t),i._MontageSettings_SetTitle=(e,t)=>(i._MontageSettings_SetTitle=s.Cm)(e,t),i._QuantizeSettings_SetColors=(e,t)=>(i._QuantizeSettings_SetColors=s.Dm)(e,t),i._QuantizeSettings_SetColorSpace=(e,t)=>(i._QuantizeSettings_SetColorSpace=s.Em)(e,t),i._QuantizeSettings_SetDitherMethod=(e,t)=>(i._QuantizeSettings_SetDitherMethod=s.Fm)(e,t),i._QuantizeSettings_SetMeasureErrors=(e,t)=>(i._QuantizeSettings_SetMeasureErrors=s.Gm)(e,t),i._QuantizeSettings_SetTreeDepth=(e,t)=>(i._QuantizeSettings_SetTreeDepth=s.Hm)(e,t),i._ChannelMoments_Centroid_Get=e=>(i._ChannelMoments_Centroid_Get=s.Im)(e),i._ChannelMoments_EllipseAngle_Get=e=>(i._ChannelMoments_EllipseAngle_Get=s.Jm)(e),i._ChannelMoments_EllipseAxis_Get=e=>(i._ChannelMoments_EllipseAxis_Get=s.Km)(e),i._ChannelMoments_EllipseEccentricity_Get=e=>(i._ChannelMoments_EllipseEccentricity_Get=s.Lm)(e),i._ChannelMoments_EllipseIntensity_Get=e=>(i._ChannelMoments_EllipseIntensity_Get=s.Mm)(e),i._ChannelMoments_GetHuInvariants=(e,t)=>(i._ChannelMoments_GetHuInvariants=s.Nm)(e,t),i._ChannelPerceptualHash_GetHuPhash=(e,t,r)=>(i._ChannelPerceptualHash_GetHuPhash=s.Om)(e,t,r),i._ChannelStatistics_Depth_Get=e=>(i._ChannelStatistics_Depth_Get=s.Pm)(e),i._ChannelStatistics_Entropy_Get=e=>(i._ChannelStatistics_Entropy_Get=s.Qm)(e),i._ChannelStatistics_Kurtosis_Get=e=>(i._ChannelStatistics_Kurtosis_Get=s.Rm)(e),i._ChannelStatistics_Maximum_Get=e=>(i._ChannelStatistics_Maximum_Get=s.Sm)(e),i._ChannelStatistics_Mean_Get=e=>(i._ChannelStatistics_Mean_Get=s.Tm)(e),i._ChannelStatistics_Minimum_Get=e=>(i._ChannelStatistics_Minimum_Get=s.Um)(e),i._ChannelStatistics_Skewness_Get=e=>(i._ChannelStatistics_Skewness_Get=s.Vm)(e),i._ChannelStatistics_StandardDeviation_Get=e=>(i._ChannelStatistics_StandardDeviation_Get=s.Wm)(e),i._Moments_DisposeList=e=>(i._Moments_DisposeList=s.Xm)(e),i._Moments_GetInstance=(e,t)=>(i._Moments_GetInstance=s.Ym)(e,t),i._PerceptualHash_DisposeList=e=>(i._PerceptualHash_DisposeList=s.Zm)(e),i._PerceptualHash_GetInstance=(e,t,r)=>(i._PerceptualHash_GetInstance=s._m)(e,t,r),i._Statistics_DisposeList=e=>(i._Statistics_DisposeList=s.$m)(e),i._Statistics_GetInstance=(e,t)=>(i._Statistics_GetInstance=s.an)(e,t),i._ConnectedComponent_DisposeList=e=>(i._ConnectedComponent_DisposeList=s.bn)(e),i._ConnectedComponent_GetArea=e=>(i._ConnectedComponent_GetArea=s.cn)(e),i._ConnectedComponent_GetCentroid=e=>(i._ConnectedComponent_GetCentroid=s.dn)(e),i._ConnectedComponent_GetColor=e=>(i._ConnectedComponent_GetColor=s.en)(e),i._ConnectedComponent_GetHeight=e=>(i._ConnectedComponent_GetHeight=s.fn)(e),i._ConnectedComponent_GetId=e=>(i._ConnectedComponent_GetId=s.gn)(e),i._ConnectedComponent_GetWidth=e=>(i._ConnectedComponent_GetWidth=s.hn)(e),i._ConnectedComponent_GetX=e=>(i._ConnectedComponent_GetX=s.jn)(e),i._ConnectedComponent_GetY=e=>(i._ConnectedComponent_GetY=s.kn)(e),i._ConnectedComponent_GetInstance=(e,t)=>(i._ConnectedComponent_GetInstance=s.ln)(e,t),i._MagickGeometry_Create=()=>(i._MagickGeometry_Create=s.mn)(),i._MagickGeometry_Dispose=e=>(i._MagickGeometry_Dispose=s.nn)(e),i._MagickGeometry_X_Get=e=>(i._MagickGeometry_X_Get=s.on)(e),i._MagickGeometry_Y_Get=e=>(i._MagickGeometry_Y_Get=s.pn)(e),i._MagickGeometry_Width_Get=e=>(i._MagickGeometry_Width_Get=s.qn)(e),i._MagickGeometry_Height_Get=e=>(i._MagickGeometry_Height_Get=s.rn)(e),i._MagickGeometry_Initialize=(e,t)=>(i._MagickGeometry_Initialize=s.sn)(e,t),i._MagickRectangle_Dispose=e=>(i._MagickRectangle_Dispose=s.tn)(e),i._MagickRectangle_X_Get=e=>(i._MagickRectangle_X_Get=s.un)(e),i._MagickRectangle_X_Set=(e,t)=>(i._MagickRectangle_X_Set=s.vn)(e,t),i._MagickRectangle_Y_Get=e=>(i._MagickRectangle_Y_Get=s.wn)(e),i._MagickRectangle_Y_Set=(e,t)=>(i._MagickRectangle_Y_Set=s.xn)(e,t),i._MagickRectangle_Width_Get=e=>(i._MagickRectangle_Width_Get=s.yn)(e),i._MagickRectangle_Width_Set=(e,t)=>(i._MagickRectangle_Width_Set=s.zn)(e,t),i._MagickRectangle_Height_Get=e=>(i._MagickRectangle_Height_Get=s.An)(e),i._MagickRectangle_Height_Set=(e,t)=>(i._MagickRectangle_Height_Set=s.Bn)(e,t),i._MagickRectangle_FromPageSize=e=>(i._MagickRectangle_FromPageSize=s.Cn)(e),i._OffsetInfo_Create=()=>(i._OffsetInfo_Create=s.Dn)(),i._OffsetInfo_Dispose=e=>(i._OffsetInfo_Dispose=s.En)(e),i._OffsetInfo_SetX=(e,t)=>(i._OffsetInfo_SetX=s.Fn)(e,t),i._OffsetInfo_SetY=(e,t)=>(i._OffsetInfo_SetY=s.Gn)(e,t),i._PointInfo_X_Get=e=>(i._PointInfo_X_Get=s.Hn)(e),i._PointInfo_Y_Get=e=>(i._PointInfo_Y_Get=s.In)(e),i._PointInfoCollection_Create=e=>(i._PointInfoCollection_Create=s.Jn)(e),i._PointInfoCollection_Dispose=e=>(i._PointInfoCollection_Dispose=s.Kn)(e),i._PointInfoCollection_GetX=(e,t)=>(i._PointInfoCollection_GetX=s.Ln)(e,t),i._PointInfoCollection_GetY=(e,t)=>(i._PointInfoCollection_GetY=s.Mn)(e,t),i._PointInfoCollection_Set=(e,t,r,n)=>(i._PointInfoCollection_Set=s.Nn)(e,t,r,n),i._PrimaryInfo_Dispose=e=>(i._PrimaryInfo_Dispose=s.On)(e),i._PrimaryInfo_X_Get=e=>(i._PrimaryInfo_X_Get=s.Pn)(e),i._PrimaryInfo_X_Set=(e,t)=>(i._PrimaryInfo_X_Set=s.Qn)(e,t),i._PrimaryInfo_Y_Get=e=>(i._PrimaryInfo_Y_Get=s.Rn)(e),i._PrimaryInfo_Y_Set=(e,t)=>(i._PrimaryInfo_Y_Set=s.Sn)(e,t),i._PrimaryInfo_Z_Get=e=>(i._PrimaryInfo_Z_Get=s.Tn)(e),i._PrimaryInfo_Z_Set=(e,t)=>(i._PrimaryInfo_Z_Set=s.Un)(e,t),i._StringInfo_Length_Get=e=>(i._StringInfo_Length_Get=s.Vn)(e),i._StringInfo_Datum_Get=e=>(i._StringInfo_Datum_Get=s.Wn)(e),i._TypeMetric_Dispose=e=>(i._TypeMetric_Dispose=s.Xn)(e),i._TypeMetric_Ascent_Get=e=>(i._TypeMetric_Ascent_Get=s.Yn)(e),i._TypeMetric_Descent_Get=e=>(i._TypeMetric_Descent_Get=s.Zn)(e),i._TypeMetric_MaxHorizontalAdvance_Get=e=>(i._TypeMetric_MaxHorizontalAdvance_Get=s._n)(e),i._TypeMetric_TextHeight_Get=e=>(i._TypeMetric_TextHeight_Get=s.$n)(e),i._TypeMetric_TextWidth_Get=e=>(i._TypeMetric_TextWidth_Get=s.ao)(e),i._TypeMetric_UnderlinePosition_Get=e=>(i._TypeMetric_UnderlinePosition_Get=s.bo)(e),i._TypeMetric_UnderlineThickness_Get=e=>(i._TypeMetric_UnderlineThickness_Get=s.co)(e);var Kr=(e,t)=>(Kr=s.eo)(e,t),H=(e,t)=>(H=s.fo)(e,t),Jr=e=>(Jr=s.go)(e),Zr=e=>(Zr=s.ho)(e),ea=()=>(ea=s.io)(),ta=(e,t,r)=>(ta=s.jo)(e,t,r);function Ns(e,t,r,n){var _=U();try{B(e)(t,r,n)}catch(c){if($(_),c!==c+0)throw c;H(1,0)}}function Hs(e,t,r,n){var _=U();try{return B(e)(t,r,n)}catch(c){if($(_),c!==c+0)throw c;H(1,0)}}function $s(e,t,r){var n=U();try{return B(e)(t,r)}catch(_){if($(n),_!==_+0)throw _;H(1,0)}}function Us(e,t){var r=U();try{return B(e)(t)}catch(n){if($(r),n!==n+0)throw n;H(1,0)}}function js(e,t){var r=U();try{B(e)(t)}catch(n){if($(r),n!==n+0)throw n;H(1,0)}}function Ys(e,t,r){var n=U();try{B(e)(t,r)}catch(_){if($(n),_!==_+0)throw _;H(1,0)}}function Vs(e,t,r,n,_){var c=U();try{B(e)(t,r,n,_)}catch(h){if($(c),h!==h+0)throw h;H(1,0)}}function Xs(e,t,r,n,_){var c=U();try{return B(e)(t,r,n,_)}catch(h){if($(c),h!==h+0)throw h;H(1,0)}}function qs(e,t,r,n){var _=U();try{return B(e)(t,r,n)}catch(c){if($(_),c!==c+0)throw c;return H(1,0),0n}}function Os(e,t){var r=U();try{return B(e)(t)}catch(n){if($(r),n!==n+0)throw n;return H(1,0),0n}}function Qs(e,t,r,n,_,c,h,d,p){var v=U();try{return B(e)(t,r,n,_,c,h,d,p)}catch(w){if($(v),w!==w+0)throw w;H(1,0)}}function Ks(e,t,r,n,_,c,h){var d=U();try{return B(e)(t,r,n,_,c,h)}catch(p){if($(d),p!==p+0)throw p;H(1,0)}}function Js(e,t,r,n,_){var c=U();try{return B(e)(t,r,n,_)}catch(h){if($(c),h!==h+0)throw h;H(1,0)}}function Zs(e){var t=U();try{return B(e)()}catch(r){if($(t),r!==r+0)throw r;H(1,0)}}function e_(e,t,r){var n=U();try{return B(e)(t,r)}catch(_){if($(n),_!==_+0)throw _;H(1,0)}}function t_(e,t,r){var n=U();try{B(e)(t,r)}catch(_){if($(n),_!==_+0)throw _;H(1,0)}}function i_(e,t,r,n,_,c){var h=U();try{return B(e)(t,r,n,_,c)}catch(d){if($(h),d!==d+0)throw d;H(1,0)}}function r_(e,t,r){var n=U();try{return B(e)(t,r)}catch(_){if($(n),_!==_+0)throw _;H(1,0)}}function a_(e){var t=U();try{B(e)()}catch(r){if($(t),r!==r+0)throw r;H(1,0)}}function n_(e,t,r,n,_,c){var h=U();try{B(e)(t,r,n,_,c)}catch(d){if($(h),d!==d+0)throw d;H(1,0)}}function o_(e,t,r,n,_,c,h,d){var p=U();try{return B(e)(t,r,n,_,c,h,d)}catch(v){if($(p),v!==v+0)throw v;H(1,0)}}function s_(e,t,r,n,_,c,h,d,p,v){var w=U();try{return B(e)(t,r,n,_,c,h,d,p,v)}catch(C){if($(w),C!==C+0)throw C;H(1,0)}}function __(e,t,r,n){var _=U();try{B(e)(t,r,n)}catch(c){if($(_),c!==c+0)throw c;H(1,0)}}function c_(e,t,r,n,_,c,h,d,p,v,w){var C=U();try{B(e)(t,r,n,_,c,h,d,p,v,w)}catch(D){if($(C),D!==D+0)throw D;H(1,0)}}function l_(e,t,r,n,_,c,h,d,p,v,w){var C=U();try{return B(e)(t,r,n,_,c,h,d,p,v,w)}catch(D){if($(C),D!==D+0)throw D;H(1,0)}}function g_(e,t,r,n,_,c,h,d,p,v){var w=U();try{B(e)(t,r,n,_,c,h,d,p,v)}catch(C){if($(w),C!==C+0)throw C;H(1,0)}}function u_(e,t,r,n,_,c,h){var d=U();try{B(e)(t,r,n,_,c,h)}catch(p){if($(d),p!==p+0)throw p;H(1,0)}}function h_(e,t,r,n,_,c,h,d){var p=U();try{B(e)(t,r,n,_,c,h,d)}catch(v){if($(p),v!==v+0)throw v;H(1,0)}}function d_(e,t,r,n,_,c,h,d,p,v,w,C){var D=U();try{return B(e)(t,r,n,_,c,h,d,p,v,w,C)}catch(P){if($(D),P!==P+0)throw P;H(1,0)}}function m_(e,t,r,n,_,c){var h=U();try{return B(e)(t,r,n,_,c)}catch(d){if($(h),d!==d+0)throw d;H(1,0)}}function f_(e,t,r,n,_,c,h,d,p){var v=U();try{B(e)(t,r,n,_,c,h,d,p)}catch(w){if($(v),w!==w+0)throw w;H(1,0)}}function p_(e,t,r,n,_,c,h,d,p,v,w,C){var D=U();try{B(e)(t,r,n,_,c,h,d,p,v,w,C)}catch(P){if($(D),P!==P+0)throw P;H(1,0)}}function M_(e){e=Object.assign({},e);var t=_=>c=>_(c)>>>0,r=_=>(c,h)=>_(c,h)>>>0,n=_=>()=>_()>>>0;return e.cb=t(e.cb),e.Sj=t(e.Sj),e.eo=r(e.eo),e._emscripten_stack_alloc=t(e._emscripten_stack_alloc),e.io=n(e.io),e}i.addFunction=Bs,i.setValue=nn,i.getValue=an,i.UTF8ToString=_i,i.stringToUTF8=Te,i.lengthBytesUTF8=it,i.FS=u;var $t;gt=function e(){$t||ia(),$t||(gt=e)};function ia(){if(je>0||($a(),je>0))return;function e(){$t||($t=!0,i.calledRun=!0,!ei&&(Ua(),g(i),i.onRuntimeInitialized?.(),ja()))}i.setStatus?(i.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>i.setStatus(""),1),e()},1)):e()}if(i.preInit)for(typeof i.preInit=="function"&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return ia(),o=f,o}})();class ha{constructor(a){if(a instanceof URL){if(a.protocol!=="http:"&&a.protocol!=="https:")throw new z("Only http/https protocol is supported");this.locateFile=()=>a.href}else a instanceof WebAssembly.Module?this.instantiateWasm=(o,i)=>{const g=new WebAssembly.Instance(a,o);i(g)}:this.wasmBinary=a}wasmBinary;instantiateWasm;locateFile}class l{loader;api;constructor(){this.loader=(a,o)=>new Promise((i,g)=>{if(this.api!==void 0){i();return}const m=new ha(a);ua(m).then(f=>{try{this.writeConfigurationFiles(f,o),qt(f,"MAGICK_CONFIGURE_PATH",M=>{qt(f,"/xml",y=>{f._Environment_SetEnv(M,y),this.api=f,i()})})}catch(M){g(M)}})})}async _initialize(a,o){await this.loader(a,o)}static get _api(){if(!Et.api)throw new z("`await initializeImageMagick` should be called to initialize the library");return Et.api}static set _api(a){Et.api=a}static read(a,o,i,g){return te._create(m=>{let f=g;if(typeof a!="string"&&!ze(a))typeof o=="number"&&typeof i=="number"&&m.read(a,o,i);else if(typeof o!="number"&&typeof i!="number"){f=i;let M;o instanceof Se?M=o:typeof o=="string"?(M=new Se,M.format=o):f=o,m.read(a,M)}return f(m)})}static readCollection(a,o,i){return ve.create()._use(m=>{let f=i,M;return o instanceof Se?M=o:typeof o=="string"?(M=new Se,M.format=o):f=o,m.read(a,M),f(m)})}static readFromCanvas(a,o,i){return te._create(g=>(g.readFromCanvas(a,i),o(g)))}writeConfigurationFiles(a,o){a.FS.analyzePath("/xml").exists||a.FS.mkdir("/xml");for(const g of o.all()){const m=a.FS.open(`/xml/${g.fileName}`,"w"),f=new TextEncoder().encode(g.data);a.FS.write(m,f,0,f.length),a.FS.close(m)}}}const Et=new l;async function da(S,a){await Et._initialize(S,a??pt.default)}class $i{constructor(a,o,i){this.origin=a,this.progress=new Z((o+1)/(i*100))}origin;progress;cancel=!1}class oe{static _logDelegate=0;static _onLog;static _progressDelegate=0;static _images={};static setLogDelegate(a){oe._logDelegate===0&&a!==void 0&&(oe._logDelegate=l._api.addFunction(oe.logDelegate,"vii")),l._api._Magick_SetLogDelegate(a===void 0?0:oe._logDelegate),oe._onLog=a}static setProgressDelegate(a){oe._progressDelegate===0&&(this._progressDelegate=l._api.addFunction(oe.progressDelegate,"iijji")),this._images[a._instance]=a,l._api._MagickImage_SetClientData(a._instance,a._instance),l._api._MagickImage_SetProgressDelegate(a._instance,oe._progressDelegate)}static removeProgressDelegate(a){l._api._MagickImage_SetClientData(a._instance,0),l._api._MagickImage_SetProgressDelegate(a._instance,0),delete oe._images[a._instance]}static logDelegate(a,o){if(oe._onLog===void 0)return;const i=ge(o,"");oe._onLog(new Di(a,i))}static progressDelegate(a,o,i,g){const m=oe._images[g];if(m===void 0||m.onProgress===void 0)return 1;const f=Number(o),M=Number(i),y=ge(a),F=new $i(y,f,M);return m.onProgress(F),F.cancel?0:1}}class Pe{static _allFormats;constructor(a,o,i,g,m){this.format=a,this.description=o,this.supportsMultipleFrames=i,this.supportsReading=g,this.supportsWriting=m}description;format;supportsMultipleFrames;supportsReading;supportsWriting;static get all(){return Pe._allFormats===void 0&&(Pe._allFormats=Pe.loadFormats()),Pe._allFormats}static loadFormats(){return b.usePointer(a=>ye.use(o=>{const i=l._api._MagickFormatInfo_CreateList(o.ptr,a),g=o.value;try{const m=new Array(g),f=Object.values(Ce);for(let M=0;M<g;M++){const y=l._api._MagickFormatInfo_GetInfo(i,M,a),F=ge(l._api._MagickFormatInfo_Format_Get(y)),N=Pe.convertFormat(F,f),ee=ge(l._api._MagickFormatInfo_Description_Get(y),""),ie=l._api._MagickFormatInfo_SupportsMultipleFrames_Get(y)==1,ct=l._api._MagickFormatInfo_SupportsReading_Get(y)==1,Ue=l._api._MagickFormatInfo_SupportsWriting_Get(y)==1;m[M]=new Pe(N,ee,ie,ct,Ue)}return m}finally{l._api._MagickFormatInfo_DisposeList(i,g)}}))}static convertFormat(a,o){return a===null?Ce.Unknown:o.includes(a)?a:Ce.Unknown}}const Q={None:0,Accelerate:1,Annotate:2,Blob:4,Cache:8,Coder:16,Configure:32,Deprecate:64,Draw:128,Exception:256,Image:512,Locale:1024,Module:2048,Pixel:4096,Policy:8192,Resource:16384,Trace:32768,Transform:65536,User:131072,Wand:262144,Detailed:2147450879,get All(){return this.Detailed|this.Trace}};class we{static get delegates(){return ge(l._api._Magick_Delegates_Get(),"Unknown")}static get features(){return ge(l._api._Magick_Features_Get()," ").slice(0,-1)}static get imageMagickVersion(){return ge(l._api._Magick_ImageMagickVersion_Get(),"Unknown")}static get supportedFormats(){return Pe.all}static onLog;static addFont(a,o){const i=l._api.FS;i.analyzePath("/fonts").exists||i.mkdir("/fonts");const m=i.open(`/fonts/${a}`,"w");i.write(m,o,0,o.length),i.close(m)}static resetRandomSeed=()=>l._api._Magick_ResetRandomSeed();static setRandomSeed=a=>l._api._Magick_SetRandomSeed(a);static setLogEvents(a){const o=a==Q.None?void 0:we.logDelegate;oe.setLogDelegate(o);const i=we.getEventTypeString(a);A(i,g=>l._api._Magick_SetLogEvents(g))}static _getFontFileName(a){const o=`/fonts/${a}`;if(!l._api.FS.analyzePath(o).exists)throw`Unable to find a font with the name '${a}', register it with the addFont method of the Magick class.`;return o}static getEventTypeString(a){if(a==Q.All)return"All,Trace";if(a==Q.Detailed)return"All";switch(a){case Q.Accelerate:return"Accelerate";case Q.Annotate:return"Annotate";case Q.Blob:return"Blob";case Q.Cache:return"Cache";case Q.Coder:return"Coder";case Q.Configure:return"Configure";case Q.Deprecate:return"Deprecate";case Q.Draw:return"Draw";case Q.Exception:return"Exception";case Q.Image:return"Image";case Q.Locale:return"Locale";case Q.Module:return"Module";case Q.Pixel:return"Pixel";case Q.Policy:return"Policy";case Q.Resource:return"Resource";case Q.Trace:return"Trace";case Q.Transform:return"Transform";case Q.User:return"User";case Q.Wand:return"Wand";case Q.None:default:return"None"}}static logDelegate(a){we.onLog!==void 0&&we.onLog(a)}}class Ui{_font;constructor(a){this._font=a}draw(a){const o=we._getFontFileName(this._font);a.font(o)}}class ji{_gravity;constructor(a){this._gravity=a}draw(a){a.gravity(this._gravity)}}class Yi{_startX;_startY;_endX;_endY;constructor(a,o,i,g){this._startX=a,this._startY=o,this._endX=i,this._endY=g}draw(a){a.line(this._startX,this._startY,this._endX,this._endY)}}class Vi{_x;_y;constructor(a,o){this._x=a,this._y=o}draw(a){a.point(this._x,this._y)}}class Xi{_upperLeftX;_upperLeftY;_lowerRightX;_lowerRightY;constructor(a,o,i,g){this._upperLeftX=a,this._upperLeftY=o,this._lowerRightX=i,this._lowerRightY=g}draw(a){a.rectangle(this._upperLeftX,this._upperLeftY,this._lowerRightX,this._lowerRightY)}}class qi{_upperLeftX;_upperLeftY;_lowerRightX;_lowerRightY;_cornerWidth;_cornerHeight;constructor(a,o,i,g,m,f){this._upperLeftX=a,this._upperLeftY=o,this._lowerRightX=i,this._lowerRightY=g,this._cornerWidth=m,this._cornerHeight=f}draw(a){a.roundRectangle(this._upperLeftX,this._upperLeftY,this._lowerRightX,this._lowerRightY,this._cornerWidth,this._cornerHeight)}}class Oi{_color;constructor(a){this._color=a}draw(a){a.strokeColor(this._color)}}class Qi{_width;constructor(a){this._width=a}draw(a){a.strokeWidth(this._width)}}class Ki{_alignment;constructor(a){this._alignment=a}draw(a){a.textAlignment(this._alignment)}}class Qe{_isEnabled;constructor(a){this._isEnabled=a}static get disabled(){return new Qe(!1)}static get enabled(){return new Qe(!0)}draw(a){a.textAntialias(this._isEnabled)}}class Ji{_decoration;constructor(a){this._decoration=a}draw(a){a.textDecoration(this._decoration)}}class Zi{_spacing;constructor(a){this._spacing=a}draw(a){a.textInterlineSpacing(this._spacing)}}class er{_spacing;constructor(a){this._spacing=a}draw(a){a.textInterwordspacing(this._spacing)}}class tr{_kerning;constructor(a){this._kerning=a}draw(a){a.textKerning(this._kerning)}}class ir{_color;constructor(a){this._color=a}draw(a){a.textUnderColor(this._color)}}class rr{_x;_y;_value;constructor(a,o,i){this._x=a,this._y=o,this._value=i}draw(a){a.text(this._x,this._y,this._value)}}class ar{static get None(){return new k(0,0,0,0)}static get Transparent(){return new k(0,0,0,0)}static get AliceBlue(){return new k(240,248,255,255)}static get AntiqueWhite(){return new k(250,235,215,255)}static get Aqua(){return new k(0,255,255,255)}static get Aquamarine(){return new k(127,255,212,255)}static get Azure(){return new k(240,255,255,255)}static get Beige(){return new k(245,245,220,255)}static get Bisque(){return new k(255,228,196,255)}static get Black(){return new k(0,0,0,255)}static get BlanchedAlmond(){return new k(255,235,205,255)}static get Blue(){return new k(0,0,255,255)}static get BlueViolet(){return new k(138,43,226,255)}static get Brown(){return new k(165,42,42,255)}static get BurlyWood(){return new k(222,184,135,255)}static get CadetBlue(){return new k(95,158,160,255)}static get Chartreuse(){return new k(127,255,0,255)}static get Chocolate(){return new k(210,105,30,255)}static get Coral(){return new k(255,127,80,255)}static get CornflowerBlue(){return new k(100,149,237,255)}static get Cornsilk(){return new k(255,248,220,255)}static get Crimson(){return new k(220,20,60,255)}static get Cyan(){return new k(0,255,255,255)}static get DarkBlue(){return new k(0,0,139,255)}static get DarkCyan(){return new k(0,139,139,255)}static get DarkGoldenrod(){return new k(184,134,11,255)}static get DarkGray(){return new k(169,169,169,255)}static get DarkGreen(){return new k(0,100,0,255)}static get DarkKhaki(){return new k(189,183,107,255)}static get DarkMagenta(){return new k(139,0,139,255)}static get DarkOliveGreen(){return new k(85,107,47,255)}static get DarkOrange(){return new k(255,140,0,255)}static get DarkOrchid(){return new k(153,50,204,255)}static get DarkRed(){return new k(139,0,0,255)}static get DarkSalmon(){return new k(233,150,122,255)}static get DarkSeaGreen(){return new k(143,188,143,255)}static get DarkSlateBlue(){return new k(72,61,139,255)}static get DarkSlateGray(){return new k(47,79,79,255)}static get DarkTurquoise(){return new k(0,206,209,255)}static get DarkViolet(){return new k(148,0,211,255)}static get DeepPink(){return new k(255,20,147,255)}static get DeepSkyBlue(){return new k(0,191,255,255)}static get DimGray(){return new k(105,105,105,255)}static get DodgerBlue(){return new k(30,144,255,255)}static get Firebrick(){return new k(178,34,34,255)}static get FloralWhite(){return new k(255,250,240,255)}static get ForestGreen(){return new k(34,139,34,255)}static get Fuchsia(){return new k(255,0,255,255)}static get Gainsboro(){return new k(220,220,220,255)}static get GhostWhite(){return new k(248,248,255,255)}static get Gold(){return new k(255,215,0,255)}static get Goldenrod(){return new k(218,165,32,255)}static get Gray(){return new k(128,128,128,255)}static get Green(){return new k(0,128,0,255)}static get GreenYellow(){return new k(173,255,47,255)}static get Honeydew(){return new k(240,255,240,255)}static get HotPink(){return new k(255,105,180,255)}static get IndianRed(){return new k(205,92,92,255)}static get Indigo(){return new k(75,0,130,255)}static get Ivory(){return new k(255,255,240,255)}static get Khaki(){return new k(240,230,140,255)}static get Lavender(){return new k(230,230,250,255)}static get LavenderBlush(){return new k(255,240,245,255)}static get LawnGreen(){return new k(124,252,0,255)}static get LemonChiffon(){return new k(255,250,205,255)}static get LightBlue(){return new k(173,216,230,255)}static get LightCoral(){return new k(240,128,128,255)}static get LightCyan(){return new k(224,255,255,255)}static get LightGoldenrodYellow(){return new k(250,250,210,255)}static get LightGreen(){return new k(144,238,144,255)}static get LightGray(){return new k(211,211,211,255)}static get LightPink(){return new k(255,182,193,255)}static get LightSalmon(){return new k(255,160,122,255)}static get LightSeaGreen(){return new k(32,178,170,255)}static get LightSkyBlue(){return new k(135,206,250,255)}static get LightSlateGray(){return new k(119,136,153,255)}static get LightSteelBlue(){return new k(176,196,222,255)}static get LightYellow(){return new k(255,255,224,255)}static get Lime(){return new k(0,255,0,255)}static get LimeGreen(){return new k(50,205,50,255)}static get Linen(){return new k(250,240,230,255)}static get Magenta(){return new k(255,0,255,255)}static get Maroon(){return new k(128,0,0,255)}static get MediumAquamarine(){return new k(102,205,170,255)}static get MediumBlue(){return new k(0,0,205,255)}static get MediumOrchid(){return new k(186,85,211,255)}static get MediumPurple(){return new k(147,112,219,255)}static get MediumSeaGreen(){return new k(60,179,113,255)}static get MediumSlateBlue(){return new k(123,104,238,255)}static get MediumSpringGreen(){return new k(0,250,154,255)}static get MediumTurquoise(){return new k(72,209,204,255)}static get MediumVioletRed(){return new k(199,21,133,255)}static get MidnightBlue(){return new k(25,25,112,255)}static get MintCream(){return new k(245,255,250,255)}static get MistyRose(){return new k(255,228,225,255)}static get Moccasin(){return new k(255,228,181,255)}static get NavajoWhite(){return new k(255,222,173,255)}static get Navy(){return new k(0,0,128,255)}static get OldLace(){return new k(253,245,230,255)}static get Olive(){return new k(128,128,0,255)}static get OliveDrab(){return new k(107,142,35,255)}static get Orange(){return new k(255,165,0,255)}static get OrangeRed(){return new k(255,69,0,255)}static get Orchid(){return new k(218,112,214,255)}static get PaleGoldenrod(){return new k(238,232,170,255)}static get PaleGreen(){return new k(152,251,152,255)}static get PaleTurquoise(){return new k(175,238,238,255)}static get PaleVioletRed(){return new k(219,112,147,255)}static get PapayaWhip(){return new k(255,239,213,255)}static get PeachPuff(){return new k(255,218,185,255)}static get Peru(){return new k(205,133,63,255)}static get Pink(){return new k(255,192,203,255)}static get Plum(){return new k(221,160,221,255)}static get PowderBlue(){return new k(176,224,230,255)}static get Purple(){return new k(128,0,128,255)}static get RebeccaPurple(){return new k(102,51,153,255)}static get Red(){return new k(255,0,0,255)}static get RosyBrown(){return new k(188,143,143,255)}static get RoyalBlue(){return new k(65,105,225,255)}static get SaddleBrown(){return new k(139,69,19,255)}static get Salmon(){return new k(250,128,114,255)}static get SandyBrown(){return new k(244,164,96,255)}static get SeaGreen(){return new k(46,139,87,255)}static get SeaShell(){return new k(255,245,238,255)}static get Sienna(){return new k(160,82,45,255)}static get Silver(){return new k(192,192,192,255)}static get SkyBlue(){return new k(135,206,235,255)}static get SlateBlue(){return new k(106,90,205,255)}static get SlateGray(){return new k(112,128,144,255)}static get Snow(){return new k(255,250,250,255)}static get SpringGreen(){return new k(0,255,127,255)}static get SteelBlue(){return new k(70,130,180,255)}static get Tan(){return new k(210,180,140,255)}static get Teal(){return new k(0,128,128,255)}static get Thistle(){return new k(216,191,216,255)}static get Tomato(){return new k(255,99,71,255)}static get Turquoise(){return new k(64,224,208,255)}static get Violet(){return new k(238,130,238,255)}static get Wheat(){return new k(245,222,179,255)}static get White(){return new k(255,255,255,255)}static get WhiteSmoke(){return new k(245,245,245,255)}static get Yellow(){return new k(255,255,0,255)}static get YellowGreen(){return new k(154,205,50,255)}}class ma{_drawables=[];disableStrokeAntialias(){return this._drawables.push(Qe.disabled),this}enableStrokeAntialias(){return this._drawables.push(Qe.enabled),this}fillColor(a){return this._drawables.push(new Ii(a)),this}fillOpacity(a){return this._drawables.push(new yi(a)),this}font(a){return this._drawables.push(new Ui(a)),this}fontPointSize(a){return this._drawables.push(new Ci(a)),this}fontTypeMetrics(a,o=!1){return te._create(i=>(i.read(ar.Transparent,1,1),st._use(i,g=>(g.draw(this._drawables),g.fontTypeMetrics(a,o)))))}gravity(a){return this._drawables.push(new ji(a)),this}line(a,o,i,g){return this._drawables.push(new Yi(a,o,i,g)),this}point(a,o){return this._drawables.push(new Vi(a,o)),this}rectangle(a,o,i,g){return this._drawables.push(new Xi(a,o,i,g)),this}roundRectangle(a,o,i,g,m,f){return this._drawables.push(new qi(a,o,i,g,m,f)),this}strokeColor(a){return this._drawables.push(new Oi(a)),this}strokeWidth(a){return this._drawables.push(new Qi(a)),this}text(a,o,i){return this._drawables.push(new rr(a,o,i)),this}textAlignment(a){return this._drawables.push(new Ki(a)),this}textDecoration(a){return this._drawables.push(new Ji(a)),this}textInterlineSpacing(a){return this._drawables.push(new Zi(a)),this}textInterwordSpacing(a){return this._drawables.push(new er(a)),this}textKerning(a){return this._drawables.push(new tr(a)),this}textUnderColor(a){return this._drawables.push(new ir(a)),this}draw(a){return a.draw(this._drawables),this}}const fa={Undefined:0,Kapur:1,OTSU:2,Triangle:3},pa={Undefined:0,Direct:1,Pseudo:2},Ma={Undefined:0,Bilevel:1,Grayscale:2,GrayscaleAlpha:3,Palette:4,PaletteAlpha:5,TrueColor:6,TrueColorAlpha:7,ColorSeparation:8,ColorSeparationAlpha:9,Optimize:10,PaletteBilevelAlpha:11},ka={Undefined:0,Add:1,Conjugate:2,Divide:3,MagnitudePhase:4,Multiply:5,RealImaginary:6,Subtract:7},nr={Undefined:0,B44A:1,B44:2,BZip:3,DXT1:4,DXT3:5,DXT5:6,Fax:7,Group4:8,JBIG1:9,JBIG2:10,JPEG2000:11,JPEG:12,LosslessJPEG:13,LZMA:14,LZW:15,NoCompression:16,Piz:17,Pxr24:18,RLE:19,Zip:20,ZipS:21,Zstd:22,WebP:23,DWAA:24,DWAB:25,BC7:26,BC5:27},Sa={Undefined:0,Affine:1,AffineProjection:2,ScaleRotateTranslate:3,Perspective:4,PerspectiveProjection:5,BilinearForward:6,BilinearReverse:7,Polynomial:8,Arc:9,Polar:10,DePolar:11,Cylinder2Plane:12,Plane2Cylinder:13,Barrel:14,BarrelInverse:15,Shepards:16,Resize:17,Sentinel:18,RigidAffine:19},va={Undefined:0,LSB:1,MSB:2},wa={Undefined:0,Absolute:1,Fuzz:2,MeanAbsolute:3,MeanErrorPerPixel:4,MeanSquared:5,NormalizedCrossCorrelation:6,PeakAbsolute:7,PeakSignalToNoiseRatio:8,PerceptualHash:9,RootMeanSquared:10,StructuralSimilarity:11,StructuralDissimilarity:12},Ia={Undefined:0,Abs:1,Add:2,AddModulus:3,And:4,Cosine:5,Divide:6,Exponential:7,GaussianNoise:8,ImpulseNoise:9,LaplacianNoise:10,LeftShift:11,Log:12,Max:13,Mean:14,Median:15,Min:16,MultiplicativeNoise:17,Multiply:18,Or:19,PoissonNoise:20,Pow:21,RightShift:22,RootMeanSquare:23,Set:24,Sine:25,Subtract:26,Sum:27,ThresholdBlack:28,Threshold:29,ThresholdWhite:30,UniformNoise:31,Xor:32,InverseLog:33},ya={Undefined:0,Point:1,Box:2,Triangle:3,Hermite:4,Hann:5,Hamming:6,Blackman:7,Gaussian:8,Quadratic:9,Cubic:10,Catrom:11,Mitchell:12,Jinc:13,Sinc:14,SincFast:15,Kaiser:16,Welch:17,Parzen:18,Bohman:19,Bartlett:20,Lagrange:21,Lanczos:22,LanczosSharp:23,Lanczos2:24,Lanczos2Sharp:25,Robidoux:26,RobidouxSharp:27,Cosine:28,Spline:29,LanczosRadius:30,CubicSpline:31},Ca={Undefined:0,None:1,Background:2,Previous:3},or={Undefined:0,NoInterlace:1,Line:2,Plane:3,Partition:4,Gif:5,Jpeg:6,Png:7},Da={Undefined:"Undefined",Unity:"Unity",Gaussian:"Gaussian",DoG:"DoG",LoG:"LoG",Blur:"Blur",Comet:"Comet",Binomial:"Binomial",Laplacian:"Laplacian",Sobel:"Sobel",FreiChen:"FreiChen",Roberts:"Roberts",Prewitt:"Prewitt",Compass:"Compass",Kirsch:"Kirsch",Diamond:"Diamond",Square:"Square",Rectangle:"Rectangle",Octagon:"Octagon",Disk:"Disk",Plus:"Plus",Cross:"Cross",Ring:"Ring",Peaks:"Peaks",Edges:"Edges",Corners:"Corners",Diagonals:"Diagonals",LineEnds:"LineEnds",LineJunctions:"LineJunctions",Ridges:"Ridges",ConvexHull:"ConvexHull",ThinSE:"ThinSE",Skeleton:"Skeleton",Chebyshev:"Chebyshev",Manhattan:"Manhattan",Octagonal:"Octagonal",Euclidean:"Euclidean",UserDefined:"UserDefined"},Pa={Undefined:0,Convolve:1,Correlate:2,Erode:3,Dilate:4,ErodeIntensity:5,DilateIntensity:6,IterativeDistance:7,Open:8,Close:9,OpenIntensity:10,CloseIntensity:11,Smooth:12,EdgeIn:13,EdgeOut:14,Edge:15,TopHat:16,BottomHat:17,HitAndMiss:18,Thinning:19,Thicken:20,Distance:21,Voronoi:22},Ea={Undefined:0,Uniform:1,Gaussian:2,MultiplicativeGaussian:3,Impulse:4,Laplacian:5,Poisson:6,Random:7},sr={Undefined:0,TopLeft:1,TopRight:2,BottomRight:3,BottomLeft:4,LeftTop:5,RightTop:6,RightBottom:7,LeftBottom:8},Ta={Undefined:0,Point:1,Replace:2,Floodfill:3,FillToBorder:4,Reset:5},ba={Undefined:0,Average:1,Average9:2,Average16:3,Background:4,Bilinear:5,Blend:6,Catrom:7,Integer:8,Mesh:9,Nearest:10,Spline:11},Ga={Undefined:0,Saturation:1,Perceptual:2,Absolute:3,Relative:4},Aa={Undefined:0,Left:1,Center:2,Right:3},Ra={Undefined:0,None:1,Underline:2,Overline:3,LineThrough:4},Fa={Undefined:0,Background:1,Dither:2,Edge:3,Mirror:4,Random:5,Tile:6,Transparent:7,Mask:8,Black:9,Gray:10,White:11,HorizontalTile:12,VerticalTile:13,HorizontalTileEdge:14,VerticalTileEdge:15,CheckerTile:16};var _r=(S=>(S[S.Disabled=-1]="Disabled",S[S.Linear=0]="Linear",S[S.Vng=1]="Vng",S[S.Ppg=2]="Ppg",S[S.Ahd=3]="Ahd",S[S.DCB=4]="DCB",S[S.Dht=11]="Dht",S[S.ModifiedAhd=12]="ModifiedAhd",S))(_r||{}),cr=(S=>(S[S.Raw=0]="Raw",S[S.SRGB=1]="SRGB",S[S.AdobeRGB=2]="AdobeRGB",S[S.WideGamutRGB=3]="WideGamutRGB",S[S.KodakProPhotoRGB=4]="KodakProPhotoRGB",S[S.XYZ=5]="XYZ",S[S.ACES=6]="ACES",S))(cr||{});class xa extends wi{constructor(){super(Ce.Dng)}disableAutoBrightness;interpolationQuality;outputColor;useAutoWhitebalance;useCameraWhitebalance;getDefines(){const a=[];return this.hasValue(this.interpolationQuality)&&a.push(this.createDefine("interpolation-quality",this.interpolationQuality)),this.hasValue(this.disableAutoBrightness)&&a.push(this.createDefine("no-auto-bright",this.disableAutoBrightness)),this.hasValue(this.outputColor)&&a.push(this.createDefine("output-color",this.outputColor)),this.hasValue(this.useCameraWhitebalance)&&a.push(this.createDefine("use-camera-wb",this.useCameraWhitebalance)),this.hasValue(this.useAutoWhitebalance)&&a.push(this.createDefine("use-auto-wb",this.useAutoWhitebalance)),a}}class Jt{_colorSpace=T.Undefined;_compression=nr.Undefined;_density=new Ne(0,0);_format=Ce.Unknown;_height=0;_interlace=or.Undefined;_orientation=sr.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(a,o){te._create(i=>{i.ping(a,o),this._colorSpace=i.colorSpace,this._compression=i.compression,this._density=i.density,this._format=i.format,this._height=i.height,this._interlace=i.interlace,this._orientation=i.orientation,this._quality=i.quality,this._width=i.width})}static create(a,o){const i=new Jt;return i.read(a,o),i}}class La{constructor(a){this.complexOperator=a}complexOperator;signalToNoiseRatio;_setArtifacts(a){this.signalToNoiseRatio!==void 0&&a.setArtifact("complex:snr",this.signalToNoiseRatio)}}class Wa{constructor(a){this.method=a}method;bestFit=!1;scale;viewport;_setArtifacts(a){this.scale!==void 0&&a.setArtifact("distort:scale",this.scale.toString()),this.viewport!==void 0&&a.setArtifact("distort:viewport",this.viewport.toString())}}class Ba extends Le{constructor(a){const o=l._api._MontageSettings_Create(),i=l._api._MontageSettings_Dispose;if(super(o,i),a.backgroundColor!==void 0&&a.backgroundColor._use(g=>{l._api._MontageSettings_SetBackgroundColor(this._instance,g)}),a.borderColor!==void 0&&a.borderColor._use(g=>{l._api._MontageSettings_SetBorderColor(this._instance,g)}),a.borderWidth!==void 0&&l._api._MontageSettings_SetBorderWidth(this._instance,a.borderWidth),a.fillColor!==void 0&&a.fillColor._use(g=>{l._api._MontageSettings_SetFillColor(this._instance,g)}),a.font!==void 0){const g=we._getFontFileName(a.font);A(g,m=>{l._api._MontageSettings_SetFont(this._instance,m)})}a.fontPointsize!==void 0&&l._api._MontageSettings_SetFontPointsize(this._instance,a.fontPointsize),a.frameGeometry!==void 0&&A(a.frameGeometry.toString(),g=>{l._api._MontageSettings_SetFrameGeometry(this._instance,g)}),a.geometry!==void 0&&A(a.geometry.toString(),g=>{l._api._MontageSettings_SetGeometry(this._instance,g)}),a.gravity!==void 0&&l._api._MontageSettings_SetGravity(this._instance,a.gravity),a.shadow!==void 0&&l._api._MontageSettings_SetShadow(this._instance,a.shadow?1:0),a.strokeColor!==void 0&&a.strokeColor._use(g=>{l._api._MontageSettings_SetStrokeColor(this._instance,g)}),a.textureFileName!==void 0&&A(a.textureFileName,g=>{l._api._MontageSettings_SetTextureFileName(this._instance,g)}),a.tileGeometry!==void 0&&A(a.tileGeometry.toString(),g=>{l._api._MontageSettings_SetTileGeometry(this._instance,g)}),a.title!==void 0&&A(a.title,g=>{l._api._MontageSettings_SetTitle(this._instance,g)})}}class za{backgroundColor;borderColor;borderWidth;fillColor;font;fontPointsize;frameGeometry;geometry;gravity;label;shadow;strokeColor;textureFileName;tileGeometry;title;transparentColor;_use(a){const o=new Ba(this);return le._disposeAfterExecution(o,a)}}class Na{constructor(a,o,i){this.method=a,this.kernel=o,i!==void 0&&(this.kernel+=`:${i}`)}channels=X.Composite;convolveBias;convolveScale;iterations=1;kernel;method}class Ha{constructor(a,o=0){this.minimum=a,this.maximum=o}minimum;maximum;toString(){return this.maximum===0?this.minimum.toString():`${this.minimum}-${this.maximum}`}}I.AlphaAction=Pi,I.AutoThresholdMethod=fa,I.ChannelPerceptualHash=He,I.ChannelStatistics=Hi,I.Channels=X,I.ChromaticityInfo=Ei,I.ClassType=pa,I.ColorProfile=Ti,I.ColorSpace=T,I.ColorSpaceNames=jt,I.ColorTransformMode=Xt,I.ColorType=Ma,I.CompareResult=kt,I.CompareSettings=bi,I.ComplexOperator=ka,I.ComplexSettings=La,I.CompositeOperator=St,I.CompressionMethod=nr,I.ConfigurationFile=Ut,I.ConfigurationFiles=pt,I.ConnectedComponent=wt,I.ConnectedComponentsSettings=Gi,I.DefinesCreator=wi,I.Density=Ne,I.DensityUnit=xe,I.DistortMethod=Sa,I.DistortSettings=Wa,I.DitherMethod=Qt,I.DngInterpolation=_r,I.DngOutputColor=cr,I.DngReadDefines=xa,I.DrawableColor=aa,I.DrawableFillColor=Ii,I.DrawableFillOpacity=yi,I.DrawableFont=Ui,I.DrawableFontPointSize=Ci,I.DrawableGravity=ji,I.DrawableLine=Yi,I.DrawablePoint=Vi,I.DrawableRectangle=Xi,I.DrawableRoundRectangle=qi,I.DrawableStrokeColor=Oi,I.DrawableStrokeWidth=Qi,I.DrawableText=rr,I.DrawableTextAlignment=Ki,I.DrawableTextAntialias=Qe,I.DrawableTextDecoration=Ji,I.DrawableTextInterlineSpacing=Zi,I.DrawableTextInterwordSpacing=er,I.DrawableTextKerning=tr,I.DrawableTextUnderColor=ir,I.Drawables=ma,I.DrawingWand=st,I.Endian=va,I.ErrorMetric=wa,I.EvaluateOperator=Ia,I.FilterType=ya,I.GifDisposeMethod=Ca,I.Gravity=ue,I.ImageMagick=l,I.ImageProfile=Vt,I.Interlace=or,I.Kernel=Da,I.LogEvent=Di,I.LogEventTypes=Q,I.Magick=we,I.MagickColor=k,I.MagickColors=ar,I.MagickDefine=Mt,I.MagickError=z,I.MagickErrorInfo=_t,I.MagickErrorSeverity=vt,I.MagickFormat=Ce,I.MagickFormatInfo=Pe,I.MagickGeometry=_e,I.MagickImage=te,I.MagickImageCollection=ve,I.MagickImageInfo=Jt,I.MagickReadSettings=Se,I.MagickSettings=Oe,I.MontageSettings=za,I.MorphologyMethod=Pa,I.MorphologySettings=Na,I.NativeInstance=Le,I.NoiseType=Ea,I.Orientation=sr,I.PaintMethod=Ta,I.Percentage=Z,I.PerceptualHash=fe,I.PixelChannel=L,I.PixelCollection=$e,I.PixelIntensityMethod=Ni,I.PixelInterpolateMethod=ba,I.Point=ke,I.PrimaryInfo=We,I.ProgressEvent=$i,I.QuantizeSettings=Dt,I.Quantum=Fe,I.RenderingIntent=Ga,I.Statistics=Pt,I.TextAlignment=Aa,I.TextDecoration=Ra,I.Threshold=Ha,I.TypeMetric=yt,I.VirtualPixelMethod=Fa,I.WarningEvent=Kt,I._getEdges=Fi,I._isByteArray=ze,I.initializeImageMagick=da,Object.defineProperty(I,Symbol.toStringTag,{value:"Module"})});
|