Files
squoosh/cli/tmp.txt
2020-12-08 16:33:33 +00:00

13 lines
418 KiB
Plaintext

/Users/surma/src/github.com/GoogleChromeLabs/squoosh/cli/build/index.js:7
- if the default executable name is not suitable, use the executableFile option to supply a custom name`;throw new Error(executableMissing)}else if(err.code==="EACCES"){throw new Error(`'${bin}' not executable`)}if(!exitCallback){process.exit(1)}else{const wrappedError=new CommanderError(1,"commander.executeSubCommandAsync","(error)");wrappedError.nestedError=err;exitCallback(wrappedError)}});this.runningCommand=proc}_dispatchSubcommand(commandName,operands,unknown){const subCommand=this._findCommand(commandName);if(!subCommand)this._helpAndError();if(subCommand._executableHandler){this._executeSubCommand(subCommand,operands.concat(unknown))}else{subCommand._parseCommand(operands,unknown)}}_parseCommand(operands,unknown){const parsed=this.parseOptions(unknown);operands=operands.concat(parsed.operands);unknown=parsed.unknown;this.args=operands.concat(unknown);if(operands&&this._findCommand(operands[0])){this._dispatchSubcommand(operands[0],operands.slice(1),unknown)}else if(this._lazyHasImplicitHelpCommand()&&operands[0]===this._helpCommandName){if(operands.length===1){this.help()}else{this._dispatchSubcommand(operands[1],[],[this._helpLongFlag])}}else if(this._defaultCommandName){outputHelpIfRequested(this,unknown);this._dispatchSubcommand(this._defaultCommandName,operands,unknown)}else{if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName){this._helpAndError()}outputHelpIfRequested(this,parsed.unknown);this._checkForMissingMandatoryOptions();if(parsed.unknown.length>0){this.unknownOption(parsed.unknown[0])}if(this._actionHandler){const args=this.args.slice();this._args.forEach((arg,i)=>{if(arg.required&&args[i]==null){this.missingArgument(arg.name)}else if(arg.variadic){args[i]=args.splice(i)}});this._actionHandler(args);this.emit("command:"+this.name(),operands,unknown)}else if(operands.length){if(this._findCommand("*")){this._dispatchSubcommand("*",operands,unknown)}else if(this.listenerCount("command:*")){this.emit("command:*",operands,unknown)}else if(this.commands.length){this.unknownCommand()}}else if(this.commands.length){this._helpAndError()}else;}}_findCommand(name){if(!name)return undefined;return this.commands.find(cmd=>cmd._name===name||cmd._aliases.includes(name))}_findOption(arg){return this.options.find(option=>option.is(arg))}_checkForMissingMandatoryOptions(){for(let cmd=this;cmd;cmd=cmd.parent){cmd.options.forEach(anOption=>{if(anOption.mandatory&&cmd._getOptionValue(anOption.attributeName())===undefined){cmd.missingMandatoryOptionValue(anOption)}})}}parseOptions(argv){const operands=[];const unknown=[];let dest=operands;const args=argv.slice();function maybeOption(arg){return arg.length>1&&arg[0]==="-"}let activeVariadicOption=null;while(args.length){const arg=args.shift();if(arg==="--"){if(dest===unknown)dest.push(arg);dest.push(...args);break}if(activeVariadicOption&&!maybeOption(arg)){this.emit(`option:${activeVariadicOption.name()}`,arg);continue}activeVariadicOption=null;if(maybeOption(arg)){const option=this._findOption(arg);if(option){if(option.required){const value=args.shift();if(value===undefined)this.optionMissingArgument(option);this.emit(`option:${option.name()}`,value)}else if(option.optional){let value=null;if(args.length>0&&!maybeOption(args[0])){value=args.shift()}this.emit(`option:${option.name()}`,value)}else{this.emit(`option:${option.name()}`)}activeVariadicOption=option.variadic?option:null;continue}}if(arg.length>2&&arg[0]==="-"&&arg[1]!=="-"){const option=this._findOption(`-${arg[1]}`);if(option){if(option.required||option.optional){this.emit(`option:${option.name()}`,arg.slice(2))}else{this.emit(`option:${option.name()}`);args.unshift(`-${arg.slice(2)}`)}continue}}if(/^--[^=]+=/.test(arg)){const index=arg.indexOf("=");const option=this._findOption(arg.slice(0,index));if(option&&(option.required||option.optional)){this.emit(`option:${option.name()}`,arg.slice(index+1));continue}}if(arg.length>1&&arg[0]==="-"){dest=unknown}dest.push(arg)}return{operands,unknown}}opts(){if(this._storeOptionsAsProperties){const result={};const len=this.options.length;for(let i=0;i<len;i++){const key=this.options[i].attributeName();result[key]=key===this._versionOptionName?this._version:this[key]}return result}return this._optionValues}missingArgument(name){const message=`error: missing required argument '${name}'`;console.error(message);this._exit(1,"commander.missingArgument",message)}optionMissingArgument(option,flag){let message;if(flag){message=`error: option '${option.flags}' argument missing, got '${flag}'`}else{message=`error: option '${option.flags}' argument missing`}console.error(message);this._exit(1,"commander.optionMissingArgument",message)}missingMandatoryOptionValue(option){const message=`error: required option '${option.flags}' not specified`;console.error(message);this._exit(1,"commander.missingMandatoryOptionValue",message)}unknownOption(flag){if(this._allowUnknownOption)return;const message=`error: unknown option '${flag}'`;console.error(message);this._exit(1,"commander.unknownOption",message)}unknownCommand(){const partCommands=[this.name()];for(let parentCmd=this.parent;parentCmd;parentCmd=parentCmd.parent){partCommands.unshift(parentCmd.name())}const fullCommand=partCommands.join(" ");const message=`error: unknown command '${this.args[0]}'. See '${fullCommand} ${this._helpLongFlag}'.`;console.error(message);this._exit(1,"commander.unknownCommand",message)}version(str,flags,description){if(str===undefined)return this._version;this._version=str;flags=flags||"-V, --version";description=description||"output the version number";const versionOption=new Option(flags,description);this._versionOptionName=versionOption.attributeName();this.options.push(versionOption);this.on("option:"+versionOption.name(),()=>{process.stdout.write(str+"\n");this._exit(0,"commander.version",str)});return this}description(str,argsDescription){if(str===undefined&&argsDescription===undefined)return this._description;this._description=str;this._argsDescription=argsDescription;return this}alias(alias){if(alias===undefined)return this._aliases[0];let command=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler){command=this.commands[this.commands.length-1]}if(alias===command._name)throw new Error("Command alias can't be the same as its name");command._aliases.push(alias);return this}aliases(aliases){if(aliases===undefined)return this._aliases;aliases.forEach(alias=>this.alias(alias));return this}usage(str){if(str===undefined){if(this._usage)return this._usage;const args=this._args.map(arg=>{return humanReadableArgName(arg)});return"[options]"+(this.commands.length?" [command]":"")+(this._args.length?" "+args.join(" "):"")}this._usage=str;return this}name(str){if(str===undefined)return this._name;this._name=str;return this}prepareCommands(){const commandDetails=this.commands.filter(cmd=>{return!cmd._hidden}).map(cmd=>{const args=cmd._args.map(arg=>{return humanReadableArgName(arg)}).join(" ");return[cmd._name+(cmd._aliases[0]?"|"+cmd._aliases[0]:"")+(cmd.options.length?" [options]":"")+(args?" "+args:""),cmd._description]});if(this._lazyHasImplicitHelpCommand()){commandDetails.push([this._helpCommandnameAndArgs,this._helpCommandDescription])}return commandDetails}largestCommandLength(){const commands=this.prepareCommands();return commands.reduce((max,command)=>{return Math.max(max,command[0].length)},0)}largestOptionLength(){const options=[].slice.call(this.options);options.push({flags:this._helpFlags});return options.reduce((max,option)=>{return Math.max(max,option.flags.length)},0)}largestArgLength(){return this._args.reduce((max,arg)=>{return Math.max(max,arg.name.length)},0)}padWidth(){let width=this.largestOptionLength();if(this._argsDescription&&this._args.length){if(this.largestArgLength()>width){width=this.largestArgLength()}}if(this.commands&&this.commands.length){if(this.largestCommandLength()>width){width=this.largestCommandLength()}}return width}optionHelp(){const width=this.padWidth();const columns=process.stdout.columns||80;const descriptionWidth=columns-width-4;function padOptionDetails(flags,description){return pad(flags,width)+" "+optionalWrap(description,descriptionWidth,width+2)}const help=this.options.map(option=>{const fullDesc=option.description+(!option.negate&&option.defaultValue!==undefined?" (default: "+JSON.stringify(option.defaultValue)+")":"");return padOptionDetails(option.flags,fullDesc)});const showShortHelpFlag=this._helpShortFlag&&!this._findOption(this._helpShortFlag);const showLongHelpFlag=!this._findOption(this._helpLongFlag);if(showShortHelpFlag||showLongHelpFlag){let helpFlags=this._helpFlags;if(!showShortHelpFlag){helpFlags=this._helpLongFlag}else if(!showLongHelpFlag){helpFlags=this._helpShortFlag}help.push(padOptionDetails(helpFlags,this._helpDescription))}return help.join("\n")}commandHelp(){if(!this.commands.length&&!this._lazyHasImplicitHelpCommand())return"";const commands=this.prepareCommands();const width=this.padWidth();const columns=process.stdout.columns||80;const descriptionWidth=columns-width-4;return["Commands:",commands.map(cmd=>{const desc=cmd[1]?" "+cmd[1]:"";return(desc?pad(cmd[0],width):cmd[0])+optionalWrap(desc,descriptionWidth,width+2)}).join("\n").replace(/^/gm," "),""].join("\n")}helpInformation(){let desc=[];if(this._description){desc=[this._description,""];const argsDescription=this._argsDescription;if(argsDescription&&this._args.length){const width=this.padWidth();const columns=process.stdout.columns||80;const descriptionWidth=columns-width-5;desc.push("Arguments:");desc.push("");this._args.forEach(arg=>{desc.push(" "+pad(arg.name,width)+" "+wrap(argsDescription[arg.name],descriptionWidth,width+4))});desc.push("")}}let cmdName=this._name;if(this._aliases[0]){cmdName=cmdName+"|"+this._aliases[0]}let parentCmdNames="";for(let parentCmd=this.parent;parentCmd;parentCmd=parentCmd.parent){parentCmdNames=parentCmd.name()+" "+parentCmdNames}const usage=["Usage: "+parentCmdNames+cmdName+" "+this.usage(),""];let cmds=[];const commandHelp=this.commandHelp();if(commandHelp)cmds=[commandHelp];const options=["Options:",""+this.optionHelp().replace(/^/gm," "),""];return usage.concat(desc).concat(options).concat(cmds).join("\n")}outputHelp(cb){if(!cb){cb=passthru=>{return passthru}}const cbOutput=cb(this.helpInformation());if(typeof cbOutput!=="string"&&!Buffer.isBuffer(cbOutput)){throw new Error("outputHelp callback must return a string or a Buffer")}process.stdout.write(cbOutput);this.emit(this._helpLongFlag)}helpOption(flags,description){this._helpFlags=flags||this._helpFlags;this._helpDescription=description||this._helpDescription;const helpFlags=_parseOptionFlags(this._helpFlags);this._helpShortFlag=helpFlags.shortFlag;this._helpLongFlag=helpFlags.longFlag;return this}help(cb){this.outputHelp(cb);this._exit(process.exitCode||0,"commander.help","(outputHelp)")}_helpAndError(){this.outputHelp();this._exit(1,"commander.help","(outputHelp)")}}exports=module.exports=new Command;exports.program=exports;exports.Command=Command;exports.Option=Option;exports.CommanderError=CommanderError;function camelcase(flag){return flag.split("-").reduce((str,word)=>{return str+word[0].toUpperCase()+word.slice(1)})}function pad(str,width){const len=Math.max(0,width-str.length);return str+Array(len+1).join(" ")}function wrap(str,width,indent){const regex=new RegExp(".{1,"+(width-1)+"}([\\s\u200B]|$)|[^\\s\u200B]+?([\\s\u200B]|$)","g");const lines=str.match(regex)||[];return lines.map((line,i)=>{if(line.slice(-1)==="\n"){line=line.slice(0,line.length-1)}return(i>0&&indent?Array(indent+1).join(" "):"")+line.trimRight()}).join("\n")}function optionalWrap(str,width,indent){if(str.match(/[\n]\s+/))return str;const minWidth=40;if(width<minWidth)return str;return wrap(str,width,indent)}function outputHelpIfRequested(cmd,args){const helpOption=args.find(arg=>arg===cmd._helpLongFlag||arg===cmd._helpShortFlag);if(helpOption){cmd.outputHelp();cmd._exit(0,"commander.helpDisplayed","(outputHelp)")}}function humanReadableArgName(arg){const nameOutput=arg.name+(arg.variadic===true?"...":"");return arg.required?"<"+nameOutput+">":"["+nameOutput+"]"}function _parseOptionFlags(flags){let shortFlag;let longFlag;const flagParts=flags.split(/[ |,]+/);if(flagParts.length>1&&!/^[[<]/.test(flagParts[1]))shortFlag=flagParts.shift();longFlag=flagParts.shift();if(!shortFlag&&/^-[^-]$/.test(longFlag)){shortFlag=longFlag;longFlag=undefined}return{shortFlag,longFlag}}function incrementNodeInspectorPort(args){return args.map(arg=>{if(!arg.startsWith("--inspect")){return arg}let debugOption;let debugHost="127.0.0.1";let debugPort="9229";let match;if((match=arg.match(/^(--inspect(-brk)?)$/))!==null){debugOption=match[1]}else if((match=arg.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null){debugOption=match[1];if(/^\d+$/.test(match[3])){debugPort=match[3]}else{debugHost=match[3]}}else if((match=arg.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null){debugOption=match[1];debugHost=match[3];debugPort=match[4]}if(debugOption&&debugPort!=="0"){return`${debugOption}=${debugHost}:${parseInt(debugPort)+1}`}return arg})}});var Space_Separator=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/;var ID_Start=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/;var ID_Continue=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/;var unicode={Space_Separator:Space_Separator,ID_Start:ID_Start,ID_Continue:ID_Continue};var util={isSpaceSeparator(c){return typeof c==="string"&&unicode.Space_Separator.test(c)},isIdStartChar(c){return typeof c==="string"&&(c>="a"&&c<="z"||c>="A"&&c<="Z"||c==="$"||c==="_"||unicode.ID_Start.test(c))},isIdContinueChar(c){return typeof c==="string"&&(c>="a"&&c<="z"||c>="A"&&c<="Z"||c>="0"&&c<="9"||c==="$"||c==="_"||c==="\u200C"||c==="\u200D"||unicode.ID_Continue.test(c))},isDigit(c){return typeof c==="string"&&/[0-9]/.test(c)},isHexDigit(c){return typeof c==="string"&&/[0-9A-Fa-f]/.test(c)}};let source;let parseState;let stack;let pos;let line;let column;let token;let key;let root;var parse=function parse(text,reviver){source=String(text);parseState="start";stack=[];pos=0;line=1;column=0;token=undefined;key=undefined;root=undefined;do{token=lex();parseStates[parseState]()}while(token.type!=="eof");if(typeof reviver==="function"){return internalize({"":root},"",reviver)}return root};function internalize(holder,name,reviver){const value=holder[name];if(value!=null&&typeof value==="object"){for(const key in value){const replacement=internalize(value,key,reviver);if(replacement===undefined){delete value[key]}else{value[key]=replacement}}}return reviver.call(holder,name,value)}let lexState;let buffer;let doubleQuote;let sign;let c;function lex(){lexState="default";buffer="";doubleQuote=false;sign=1;for(;;){c=peek();const token=lexStates[lexState]();if(token){return token}}}function peek(){if(source[pos]){return String.fromCodePoint(source.codePointAt(pos))}}function read$1(){const c=peek();if(c==="\n"){line++;column=0}else if(c){column+=c.length}else{column++}if(c){pos+=c.length}return c}const lexStates={default(){switch(c){case"\t":case"\x0B":case"\f":case" ":case"\xA0":case"\uFEFF":case"\n":case"\r":case"\u2028":case"\u2029":read$1();return;case"/":read$1();lexState="comment";return;case undefined:read$1();return newToken("eof");}if(util.isSpaceSeparator(c)){read$1();return}return lexStates[parseState]()},comment(){switch(c){case"*":read$1();lexState="multiLineComment";return;case"/":read$1();lexState="singleLineComment";return;}throw invalidChar(read$1())},multiLineComment(){switch(c){case"*":read$1();lexState="multiLineCommentAsterisk";return;case undefined:throw invalidChar(read$1());}read$1()},multiLineCommentAsterisk(){switch(c){case"*":read$1();return;case"/":read$1();lexState="default";return;case undefined:throw invalidChar(read$1());}read$1();lexState="multiLineComment"},singleLineComment(){switch(c){case"\n":case"\r":case"\u2028":case"\u2029":read$1();lexState="default";return;case undefined:read$1();return newToken("eof");}read$1()},value(){switch(c){case"{":case"[":return newToken("punctuator",read$1());case"n":read$1();literal("ull");return newToken("null",null);case"t":read$1();literal("rue");return newToken("boolean",true);case"f":read$1();literal("alse");return newToken("boolean",false);case"-":case"+":if(read$1()==="-"){sign=-1}lexState="sign";return;case".":buffer=read$1();lexState="decimalPointLeading";return;case"0":buffer=read$1();lexState="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":buffer=read$1();lexState="decimalInteger";return;case"I":read$1();literal("nfinity");return newToken("numeric",Infinity);case"N":read$1();literal("aN");return newToken("numeric",NaN);case"\"":case"'":doubleQuote=read$1()==="\"";buffer="";lexState="string";return;}throw invalidChar(read$1())},identifierNameStartEscape(){if(c!=="u"){throw invalidChar(read$1())}read$1();const u=unicodeEscape();switch(u){case"$":case"_":break;default:if(!util.isIdStartChar(u)){throw invalidIdentifier()}break;}buffer+=u;lexState="identifierName"},identifierName(){switch(c){case"$":case"_":case"\u200C":case"\u200D":buffer+=read$1();return;case"\\":read$1();lexState="identifierNameEscape";return;}if(util.isIdContinueChar(c)){buffer+=read$1();return}return newToken("identifier",buffer)},identifierNameEscape(){if(c!=="u"){throw invalidChar(read$1())}read$1();const u=unicodeEscape();switch(u){case"$":case"_":case"\u200C":case"\u200D":break;default:if(!util.isIdContinueChar(u)){throw invalidIdentifier()}break;}buffer+=u;lexState="identifierName"},sign(){switch(c){case".":buffer=read$1();lexState="decimalPointLeading";return;case"0":buffer=read$1();lexState="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":buffer=read$1();lexState="decimalInteger";return;case"I":read$1();literal("nfinity");return newToken("numeric",sign*Infinity);case"N":read$1();literal("aN");return newToken("numeric",NaN);}throw invalidChar(read$1())},zero(){switch(c){case".":buffer+=read$1();lexState="decimalPoint";return;case"e":case"E":buffer+=read$1();lexState="decimalExponent";return;case"x":case"X":buffer+=read$1();lexState="hexadecimal";return;}return newToken("numeric",sign*0)},decimalInteger(){switch(c){case".":buffer+=read$1();lexState="decimalPoint";return;case"e":case"E":buffer+=read$1();lexState="decimalExponent";return;}if(util.isDigit(c)){buffer+=read$1();return}return newToken("numeric",sign*Number(buffer))},decimalPointLeading(){if(util.isDigit(c)){buffer+=read$1();lexState="decimalFraction";return}throw invalidChar(read$1())},decimalPoint(){switch(c){case"e":case"E":buffer+=read$1();lexState="decimalExponent";return;}if(util.isDigit(c)){buffer+=read$1();lexState="decimalFraction";return}return newToken("numeric",sign*Number(buffer))},decimalFraction(){switch(c){case"e":case"E":buffer+=read$1();lexState="decimalExponent";return;}if(util.isDigit(c)){buffer+=read$1();return}return newToken("numeric",sign*Number(buffer))},decimalExponent(){switch(c){case"+":case"-":buffer+=read$1();lexState="decimalExponentSign";return;}if(util.isDigit(c)){buffer+=read$1();lexState="decimalExponentInteger";return}throw invalidChar(read$1())},decimalExponentSign(){if(util.isDigit(c)){buffer+=read$1();lexState="decimalExponentInteger";return}throw invalidChar(read$1())},decimalExponentInteger(){if(util.isDigit(c)){buffer+=read$1();return}return newToken("numeric",sign*Number(buffer))},hexadecimal(){if(util.isHexDigit(c)){buffer+=read$1();lexState="hexadecimalInteger";return}throw invalidChar(read$1())},hexadecimalInteger(){if(util.isHexDigit(c)){buffer+=read$1();return}return newToken("numeric",sign*Number(buffer))},string(){switch(c){case"\\":read$1();buffer+=escape();return;case"\"":if(doubleQuote){read$1();return newToken("string",buffer)}buffer+=read$1();return;case"'":if(!doubleQuote){read$1();return newToken("string",buffer)}buffer+=read$1();return;case"\n":case"\r":throw invalidChar(read$1());case"\u2028":case"\u2029":separatorChar(c);break;case undefined:throw invalidChar(read$1());}buffer+=read$1()},start(){switch(c){case"{":case"[":return newToken("punctuator",read$1());}lexState="value"},beforePropertyName(){switch(c){case"$":case"_":buffer=read$1();lexState="identifierName";return;case"\\":read$1();lexState="identifierNameStartEscape";return;case"}":return newToken("punctuator",read$1());case"\"":case"'":doubleQuote=read$1()==="\"";lexState="string";return;}if(util.isIdStartChar(c)){buffer+=read$1();lexState="identifierName";return}throw invalidChar(read$1())},afterPropertyName(){if(c===":"){return newToken("punctuator",read$1())}throw invalidChar(read$1())},beforePropertyValue(){lexState="value"},afterPropertyValue(){switch(c){case",":case"}":return newToken("punctuator",read$1());}throw invalidChar(read$1())},beforeArrayValue(){if(c==="]"){return newToken("punctuator",read$1())}lexState="value"},afterArrayValue(){switch(c){case",":case"]":return newToken("punctuator",read$1());}throw invalidChar(read$1())},end(){throw invalidChar(read$1())}};function newToken(type,value){return{type,value,line,column}}function literal(s){for(const c of s){const p=peek();if(p!==c){throw invalidChar(read$1())}read$1()}}function escape(){const c=peek();switch(c){case"b":read$1();return"\b";case"f":read$1();return"\f";case"n":read$1();return"\n";case"r":read$1();return"\r";case"t":read$1();return"\t";case"v":read$1();return"\x0B";case"0":read$1();if(util.isDigit(peek())){throw invalidChar(read$1())}return"\0";case"x":read$1();return hexEscape();case"u":read$1();return unicodeEscape();case"\n":case"\u2028":case"\u2029":read$1();return"";case"\r":read$1();if(peek()==="\n"){read$1()}return"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw invalidChar(read$1());case undefined:throw invalidChar(read$1());}return read$1()}function hexEscape(){let buffer="";let c=peek();if(!util.isHexDigit(c)){throw invalidChar(read$1())}buffer+=read$1();c=peek();if(!util.isHexDigit(c)){throw invalidChar(read$1())}buffer+=read$1();return String.fromCodePoint(parseInt(buffer,16))}function unicodeEscape(){let buffer="";let count=4;while(count-->0){const c=peek();if(!util.isHexDigit(c)){throw invalidChar(read$1())}buffer+=read$1()}return String.fromCodePoint(parseInt(buffer,16))}const parseStates={start(){if(token.type==="eof"){throw invalidEOF()}push()},beforePropertyName(){switch(token.type){case"identifier":case"string":key=token.value;parseState="afterPropertyName";return;case"punctuator":pop();return;case"eof":throw invalidEOF();}},afterPropertyName(){if(token.type==="eof"){throw invalidEOF()}parseState="beforePropertyValue"},beforePropertyValue(){if(token.type==="eof"){throw invalidEOF()}push()},beforeArrayValue(){if(token.type==="eof"){throw invalidEOF()}if(token.type==="punctuator"&&token.value==="]"){pop();return}push()},afterPropertyValue(){if(token.type==="eof"){throw invalidEOF()}switch(token.value){case",":parseState="beforePropertyName";return;case"}":pop();}},afterArrayValue(){if(token.type==="eof"){throw invalidEOF()}switch(token.value){case",":parseState="beforeArrayValue";return;case"]":pop();}},end(){}};function push(){let value;switch(token.type){case"punctuator":switch(token.value){case"{":value={};break;case"[":value=[];break;}break;case"null":case"boolean":case"numeric":case"string":value=token.value;break;}if(root===undefined){root=value}else{const parent=stack[stack.length-1];if(Array.isArray(parent)){parent.push(value)}else{parent[key]=value}}if(value!==null&&typeof value==="object"){stack.push(value);if(Array.isArray(value)){parseState="beforeArrayValue"}else{parseState="beforePropertyName"}}else{const current=stack[stack.length-1];if(current==null){parseState="end"}else if(Array.isArray(current)){parseState="afterArrayValue"}else{parseState="afterPropertyValue"}}}function pop(){stack.pop();const current=stack[stack.length-1];if(current==null){parseState="end"}else if(Array.isArray(current)){parseState="afterArrayValue"}else{parseState="afterPropertyValue"}}function invalidChar(c){if(c===undefined){return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)}return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`)}function invalidEOF(){return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)}function invalidIdentifier(){column-=5;return syntaxError(`JSON5: invalid identifier character at ${line}:${column}`)}function separatorChar(c){console.warn(`JSON5: '${formatChar(c)}' in strings is not valid ECMAScript; consider escaping`)}function formatChar(c){const replacements={"'":"\\'","\"":"\\\"","\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(replacements[c]){return replacements[c]}if(c<" "){const hexString=c.charCodeAt(0).toString(16);return"\\x"+("00"+hexString).substring(hexString.length)}return c}function syntaxError(message){const err=new SyntaxError(message);err.lineNumber=line;err.columnNumber=column;return err}var stringify=function stringify(value,replacer,space){const stack=[];let indent="";let propertyList;let replacerFunc;let gap="";let quote;if(replacer!=null&&typeof replacer==="object"&&!Array.isArray(replacer)){space=replacer.space;quote=replacer.quote;replacer=replacer.replacer}if(typeof replacer==="function"){replacerFunc=replacer}else if(Array.isArray(replacer)){propertyList=[];for(const v of replacer){let item;if(typeof v==="string"){item=v}else if(typeof v==="number"||v instanceof String||v instanceof Number){item=String(v)}if(item!==undefined&&propertyList.indexOf(item)<0){propertyList.push(item)}}}if(space instanceof Number){space=Number(space)}else if(space instanceof String){space=String(space)}if(typeof space==="number"){if(space>0){space=Math.min(10,Math.floor(space));gap=" ".substr(0,space)}}else if(typeof space==="string"){gap=space.substr(0,10)}return serializeProperty("",{"":value});function serializeProperty(key,holder){let value=holder[key];if(value!=null){if(typeof value.toJSON5==="function"){value=value.toJSON5(key)}else if(typeof value.toJSON==="function"){value=value.toJSON(key)}}if(replacerFunc){value=replacerFunc.call(holder,key,value)}if(value instanceof Number){value=Number(value)}else if(value instanceof String){value=String(value)}else if(value instanceof Boolean){value=value.valueOf()}switch(value){case null:return"null";case true:return"true";case false:return"false";}if(typeof value==="string"){return quoteString(value)}if(typeof value==="number"){return String(value)}if(typeof value==="object"){return Array.isArray(value)?serializeArray(value):serializeObject(value)}return undefined}function quoteString(value){const quotes={"'":0.1,"\"":0.2};const replacements={"'":"\\'","\"":"\\\"","\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let product="";for(let i=0;i<value.length;i++){const c=value[i];switch(c){case"'":case"\"":quotes[c]++;product+=c;continue;case"\0":if(util.isDigit(value[i+1])){product+="\\x00";continue}}if(replacements[c]){product+=replacements[c];continue}if(c<" "){let hexString=c.charCodeAt(0).toString(16);product+="\\x"+("00"+hexString).substring(hexString.length);continue}product+=c}const quoteChar=quote||Object.keys(quotes).reduce((a,b)=>quotes[a]<quotes[b]?a:b);product=product.replace(new RegExp(quoteChar,"g"),replacements[quoteChar]);return quoteChar+product+quoteChar}function serializeObject(value){if(stack.indexOf(value)>=0){throw TypeError("Converting circular structure to JSON5")}stack.push(value);let stepback=indent;indent=indent+gap;let keys=propertyList||Object.keys(value);let partial=[];for(const key of keys){const propertyString=serializeProperty(key,value);if(propertyString!==undefined){let member=serializeKey(key)+":";if(gap!==""){member+=" "}member+=propertyString;partial.push(member)}}let final;if(partial.length===0){final="{}"}else{let properties;if(gap===""){properties=partial.join(",");final="{"+properties+"}"}else{let separator=",\n"+indent;properties=partial.join(separator);final="{\n"+indent+properties+",\n"+stepback+"}"}}stack.pop();indent=stepback;return final}function serializeKey(key){if(key.length===0){return quoteString(key)}const firstChar=String.fromCodePoint(key.codePointAt(0));if(!util.isIdStartChar(firstChar)){return quoteString(key)}for(let i=firstChar.length;i<key.length;i++){if(!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))){return quoteString(key)}}return key}function serializeArray(value){if(stack.indexOf(value)>=0){throw TypeError("Converting circular structure to JSON5")}stack.push(value);let stepback=indent;indent=indent+gap;let partial=[];for(let i=0;i<value.length;i++){const propertyString=serializeProperty(String(i),value);partial.push(propertyString!==undefined?propertyString:"null")}let final;if(partial.length===0){final="[]"}else{if(gap===""){let properties=partial.join(",");final="["+properties+"]"}else{let separator=",\n"+indent;let properties=partial.join(separator);final="[\n"+indent+properties+",\n"+stepback+"]"}}stack.pop();indent=stepback;return final}};const JSON5={parse,stringify};var lib=JSON5;const version="0.4.0";var colorName={"aliceblue":[240,248,255],"antiquewhite":[250,235,215],"aqua":[0,255,255],"aquamarine":[127,255,212],"azure":[240,255,255],"beige":[245,245,220],"bisque":[255,228,196],"black":[0,0,0],"blanchedalmond":[255,235,205],"blue":[0,0,255],"blueviolet":[138,43,226],"brown":[165,42,42],"burlywood":[222,184,135],"cadetblue":[95,158,160],"chartreuse":[127,255,0],"chocolate":[210,105,30],"coral":[255,127,80],"cornflowerblue":[100,149,237],"cornsilk":[255,248,220],"crimson":[220,20,60],"cyan":[0,255,255],"darkblue":[0,0,139],"darkcyan":[0,139,139],"darkgoldenrod":[184,134,11],"darkgray":[169,169,169],"darkgreen":[0,100,0],"darkgrey":[169,169,169],"darkkhaki":[189,183,107],"darkmagenta":[139,0,139],"darkolivegreen":[85,107,47],"darkorange":[255,140,0],"darkorchid":[153,50,204],"darkred":[139,0,0],"darksalmon":[233,150,122],"darkseagreen":[143,188,143],"darkslateblue":[72,61,139],"darkslategray":[47,79,79],"darkslategrey":[47,79,79],"darkturquoise":[0,206,209],"darkviolet":[148,0,211],"deeppink":[255,20,147],"deepskyblue":[0,191,255],"dimgray":[105,105,105],"dimgrey":[105,105,105],"dodgerblue":[30,144,255],"firebrick":[178,34,34],"floralwhite":[255,250,240],"forestgreen":[34,139,34],"fuchsia":[255,0,255],"gainsboro":[220,220,220],"ghostwhite":[248,248,255],"gold":[255,215,0],"goldenrod":[218,165,32],"gray":[128,128,128],"green":[0,128,0],"greenyellow":[173,255,47],"grey":[128,128,128],"honeydew":[240,255,240],"hotpink":[255,105,180],"indianred":[205,92,92],"indigo":[75,0,130],"ivory":[255,255,240],"khaki":[240,230,140],"lavender":[230,230,250],"lavenderblush":[255,240,245],"lawngreen":[124,252,0],"lemonchiffon":[255,250,205],"lightblue":[173,216,230],"lightcoral":[240,128,128],"lightcyan":[224,255,255],"lightgoldenrodyellow":[250,250,210],"lightgray":[211,211,211],"lightgreen":[144,238,144],"lightgrey":[211,211,211],"lightpink":[255,182,193],"lightsalmon":[255,160,122],"lightseagreen":[32,178,170],"lightskyblue":[135,206,250],"lightslategray":[119,136,153],"lightslategrey":[119,136,153],"lightsteelblue":[176,196,222],"lightyellow":[255,255,224],"lime":[0,255,0],"limegreen":[50,205,50],"linen":[250,240,230],"magenta":[255,0,255],"maroon":[128,0,0],"mediumaquamarine":[102,205,170],"mediumblue":[0,0,205],"mediumorchid":[186,85,211],"mediumpurple":[147,112,219],"mediumseagreen":[60,179,113],"mediumslateblue":[123,104,238],"mediumspringgreen":[0,250,154],"mediumturquoise":[72,209,204],"mediumvioletred":[199,21,133],"midnightblue":[25,25,112],"mintcream":[245,255,250],"mistyrose":[255,228,225],"moccasin":[255,228,181],"navajowhite":[255,222,173],"navy":[0,0,128],"oldlace":[253,245,230],"olive":[128,128,0],"olivedrab":[107,142,35],"orange":[255,165,0],"orangered":[255,69,0],"orchid":[218,112,214],"palegoldenrod":[238,232,170],"palegreen":[152,251,152],"paleturquoise":[175,238,238],"palevioletred":[219,112,147],"papayawhip":[255,239,213],"peachpuff":[255,218,185],"peru":[205,133,63],"pink":[255,192,203],"plum":[221,160,221],"powderblue":[176,224,230],"purple":[128,0,128],"rebeccapurple":[102,51,153],"red":[255,0,0],"rosybrown":[188,143,143],"royalblue":[65,105,225],"saddlebrown":[139,69,19],"salmon":[250,128,114],"sandybrown":[244,164,96],"seagreen":[46,139,87],"seashell":[255,245,238],"sienna":[160,82,45],"silver":[192,192,192],"skyblue":[135,206,235],"slateblue":[106,90,205],"slategray":[112,128,144],"slategrey":[112,128,144],"snow":[255,250,250],"springgreen":[0,255,127],"steelblue":[70,130,180],"tan":[210,180,140],"teal":[0,128,128],"thistle":[216,191,216],"tomato":[255,99,71],"turquoise":[64,224,208],"violet":[238,130,238],"wheat":[245,222,179],"white":[255,255,255],"whitesmoke":[245,245,245],"yellow":[255,255,0],"yellowgreen":[154,205,50]};const reverseKeywords={};for(const key of Object.keys(colorName)){reverseKeywords[colorName[key]]=key}const convert={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var conversions=convert;for(const model of Object.keys(convert)){if(!("channels"in convert[model])){throw new Error("missing channels property: "+model)}if(!("labels"in convert[model])){throw new Error("missing channel labels property: "+model)}if(convert[model].labels.length!==convert[model].channels){throw new Error("channel and label counts mismatch: "+model)}const{channels,labels}=convert[model];delete convert[model].channels;delete convert[model].labels;Object.defineProperty(convert[model],"channels",{value:channels});Object.defineProperty(convert[model],"labels",{value:labels})}convert.rgb.hsl=function(rgb){const r=rgb[0]/255;const g=rgb[1]/255;const b=rgb[2]/255;const min=Math.min(r,g,b);const max=Math.max(r,g,b);const delta=max-min;let h;let s;if(max===min){h=0}else if(r===max){h=(g-b)/delta}else if(g===max){h=2+(b-r)/delta}else if(b===max){h=4+(r-g)/delta}h=Math.min(h*60,360);if(h<0){h+=360}const l=(min+max)/2;if(max===min){s=0}else if(l<=0.5){s=delta/(max+min)}else{s=delta/(2-max-min)}return[h,s*100,l*100]};convert.rgb.hsv=function(rgb){let rdif;let gdif;let bdif;let h;let s;const r=rgb[0]/255;const g=rgb[1]/255;const b=rgb[2]/255;const v=Math.max(r,g,b);const diff=v-Math.min(r,g,b);const diffc=function(c){return(v-c)/6/diff+1/2};if(diff===0){h=0;s=0}else{s=diff/v;rdif=diffc(r);gdif=diffc(g);bdif=diffc(b);if(r===v){h=bdif-gdif}else if(g===v){h=1/3+rdif-bdif}else if(b===v){h=2/3+gdif-rdif}if(h<0){h+=1}else if(h>1){h-=1}}return[h*360,s*100,v*100]};convert.rgb.hwb=function(rgb){const r=rgb[0];const g=rgb[1];let b=rgb[2];const h=convert.rgb.hsl(rgb)[0];const w=1/255*Math.min(r,Math.min(g,b));b=1-1/255*Math.max(r,Math.max(g,b));return[h,w*100,b*100]};convert.rgb.cmyk=function(rgb){const r=rgb[0]/255;const g=rgb[1]/255;const b=rgb[2]/255;const k=Math.min(1-r,1-g,1-b);const c=(1-r-k)/(1-k)||0;const m=(1-g-k)/(1-k)||0;const y=(1-b-k)/(1-k)||0;return[c*100,m*100,y*100,k*100]};function comparativeDistance(x,y){return(x[0]-y[0])**2+(x[1]-y[1])**2+(x[2]-y[2])**2}convert.rgb.keyword=function(rgb){const reversed=reverseKeywords[rgb];if(reversed){return reversed}let currentClosestDistance=Infinity;let currentClosestKeyword;for(const keyword of Object.keys(colorName)){const value=colorName[keyword];const distance=comparativeDistance(rgb,value);if(distance<currentClosestDistance){currentClosestDistance=distance;currentClosestKeyword=keyword}}return currentClosestKeyword};convert.keyword.rgb=function(keyword){return colorName[keyword]};convert.rgb.xyz=function(rgb){let r=rgb[0]/255;let g=rgb[1]/255;let b=rgb[2]/255;r=r>0.04045?((r+0.055)/1.055)**2.4:r/12.92;g=g>0.04045?((g+0.055)/1.055)**2.4:g/12.92;b=b>0.04045?((b+0.055)/1.055)**2.4:b/12.92;const x=r*0.4124+g*0.3576+b*0.1805;const y=r*0.2126+g*0.7152+b*0.0722;const z=r*0.0193+g*0.1192+b*0.9505;return[x*100,y*100,z*100]};convert.rgb.lab=function(rgb){const xyz=convert.rgb.xyz(rgb);let x=xyz[0];let y=xyz[1];let z=xyz[2];x/=95.047;y/=100;z/=108.883;x=x>0.008856?x**(1/3):7.787*x+16/116;y=y>0.008856?y**(1/3):7.787*y+16/116;z=z>0.008856?z**(1/3):7.787*z+16/116;const l=116*y-16;const a=500*(x-y);const b=200*(y-z);return[l,a,b]};convert.hsl.rgb=function(hsl){const h=hsl[0]/360;const s=hsl[1]/100;const l=hsl[2]/100;let t2;let t3;let val;if(s===0){val=l*255;return[val,val,val]}if(l<0.5){t2=l*(1+s)}else{t2=l+s-l*s}const t1=2*l-t2;const rgb=[0,0,0];for(let i=0;i<3;i++){t3=h+1/3*-(i-1);if(t3<0){t3++}if(t3>1){t3--}if(6*t3<1){val=t1+(t2-t1)*6*t3}else if(2*t3<1){val=t2}else if(3*t3<2){val=t1+(t2-t1)*(2/3-t3)*6}else{val=t1}rgb[i]=val*255}return rgb};convert.hsl.hsv=function(hsl){const h=hsl[0];let s=hsl[1]/100;let l=hsl[2]/100;let smin=s;const lmin=Math.max(l,0.01);l*=2;s*=l<=1?l:2-l;smin*=lmin<=1?lmin:2-lmin;const v=(l+s)/2;const sv=l===0?2*smin/(lmin+smin):2*s/(l+s);return[h,sv*100,v*100]};convert.hsv.rgb=function(hsv){const h=hsv[0]/60;const s=hsv[1]/100;let v=hsv[2]/100;const hi=Math.floor(h)%6;const f=h-Math.floor(h);const p=255*v*(1-s);const q=255*v*(1-s*f);const t=255*v*(1-s*(1-f));v*=255;switch(hi){case 0:return[v,t,p];case 1:return[q,v,p];case 2:return[p,v,t];case 3:return[p,q,v];case 4:return[t,p,v];case 5:return[v,p,q];}};convert.hsv.hsl=function(hsv){const h=hsv[0];const s=hsv[1]/100;const v=hsv[2]/100;const vmin=Math.max(v,0.01);let sl;let l;l=(2-s)*v;const lmin=(2-s)*vmin;sl=s*vmin;sl/=lmin<=1?lmin:2-lmin;sl=sl||0;l/=2;return[h,sl*100,l*100]};convert.hwb.rgb=function(hwb){const h=hwb[0]/360;let wh=hwb[1]/100;let bl=hwb[2]/100;const ratio=wh+bl;let f;if(ratio>1){wh/=ratio;bl/=ratio}const i=Math.floor(6*h);const v=1-bl;f=6*h-i;if((i&1)!==0){f=1-f}const n=wh+f*(v-wh);let r;let g;let b;switch(i){default:case 6:case 0:r=v;g=n;b=wh;break;case 1:r=n;g=v;b=wh;break;case 2:r=wh;g=v;b=n;break;case 3:r=wh;g=n;b=v;break;case 4:r=n;g=wh;b=v;break;case 5:r=v;g=wh;b=n;break;}return[r*255,g*255,b*255]};convert.cmyk.rgb=function(cmyk){const c=cmyk[0]/100;const m=cmyk[1]/100;const y=cmyk[2]/100;const k=cmyk[3]/100;const r=1-Math.min(1,c*(1-k)+k);const g=1-Math.min(1,m*(1-k)+k);const b=1-Math.min(1,y*(1-k)+k);return[r*255,g*255,b*255]};convert.xyz.rgb=function(xyz){const x=xyz[0]/100;const y=xyz[1]/100;const z=xyz[2]/100;let r;let g;let b;r=x*3.2406+y*-1.5372+z*-0.4986;g=x*-0.9689+y*1.8758+z*0.0415;b=x*0.0557+y*-0.204+z*1.057;r=r>0.0031308?1.055*r**(1/2.4)-0.055:r*12.92;g=g>0.0031308?1.055*g**(1/2.4)-0.055:g*12.92;b=b>0.0031308?1.055*b**(1/2.4)-0.055:b*12.92;r=Math.min(Math.max(0,r),1);g=Math.min(Math.max(0,g),1);b=Math.min(Math.max(0,b),1);return[r*255,g*255,b*255]};convert.xyz.lab=function(xyz){let x=xyz[0];let y=xyz[1];let z=xyz[2];x/=95.047;y/=100;z/=108.883;x=x>0.008856?x**(1/3):7.787*x+16/116;y=y>0.008856?y**(1/3):7.787*y+16/116;z=z>0.008856?z**(1/3):7.787*z+16/116;const l=116*y-16;const a=500*(x-y);const b=200*(y-z);return[l,a,b]};convert.lab.xyz=function(lab){const l=lab[0];const a=lab[1];const b=lab[2];let x;let y;let z;y=(l+16)/116;x=a/500+y;z=y-b/200;const y2=y**3;const x2=x**3;const z2=z**3;y=y2>0.008856?y2:(y-16/116)/7.787;x=x2>0.008856?x2:(x-16/116)/7.787;z=z2>0.008856?z2:(z-16/116)/7.787;x*=95.047;y*=100;z*=108.883;return[x,y,z]};convert.lab.lch=function(lab){const l=lab[0];const a=lab[1];const b=lab[2];let h;const hr=Math.atan2(b,a);h=hr*360/2/Math.PI;if(h<0){h+=360}const c=Math.sqrt(a*a+b*b);return[l,c,h]};convert.lch.lab=function(lch){const l=lch[0];const c=lch[1];const h=lch[2];const hr=h/360*2*Math.PI;const a=c*Math.cos(hr);const b=c*Math.sin(hr);return[l,a,b]};convert.rgb.ansi16=function(args,saturation=null){const[r,g,b]=args;let value=saturation===null?convert.rgb.hsv(args)[2]:saturation;value=Math.round(value/50);if(value===0){return 30}let ansi=30+(Math.round(b/255)<<2|Math.round(g/255)<<1|Math.round(r/255));if(value===2){ansi+=60}return ansi};convert.hsv.ansi16=function(args){return convert.rgb.ansi16(convert.hsv.rgb(args),args[2])};convert.rgb.ansi256=function(args){const r=args[0];const g=args[1];const b=args[2];if(r===g&&g===b){if(r<8){return 16}if(r>248){return 231}return Math.round((r-8)/247*24)+232}const ansi=16+36*Math.round(r/255*5)+6*Math.round(g/255*5)+Math.round(b/255*5);return ansi};convert.ansi16.rgb=function(args){let color=args%10;if(color===0||color===7){if(args>50){color+=3.5}color=color/10.5*255;return[color,color,color]}const mult=(~~(args>50)+1)*0.5;const r=(color&1)*mult*255;const g=(color>>1&1)*mult*255;const b=(color>>2&1)*mult*255;return[r,g,b]};convert.ansi256.rgb=function(args){if(args>=232){const c=(args-232)*10+8;return[c,c,c]}args-=16;let rem;const r=Math.floor(args/36)/5*255;const g=Math.floor((rem=args%36)/6)/5*255;const b=rem%6/5*255;return[r,g,b]};convert.rgb.hex=function(args){const integer=((Math.round(args[0])&255)<<16)+((Math.round(args[1])&255)<<8)+(Math.round(args[2])&255);const string=integer.toString(16).toUpperCase();return"000000".substring(string.length)+string};convert.hex.rgb=function(args){const match=args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!match){return[0,0,0]}let colorString=match[0];if(match[0].length===3){colorString=colorString.split("").map(char=>{return char+char}).join("")}const integer=parseInt(colorString,16);const r=integer>>16&255;const g=integer>>8&255;const b=integer&255;return[r,g,b]};convert.rgb.hcg=function(rgb){const r=rgb[0]/255;const g=rgb[1]/255;const b=rgb[2]/255;const max=Math.max(Math.max(r,g),b);const min=Math.min(Math.min(r,g),b);const chroma=max-min;let grayscale;let hue;if(chroma<1){grayscale=min/(1-chroma)}else{grayscale=0}if(chroma<=0){hue=0}else if(max===r){hue=(g-b)/chroma%6}else if(max===g){hue=2+(b-r)/chroma}else{hue=4+(r-g)/chroma}hue/=6;hue%=1;return[hue*360,chroma*100,grayscale*100]};convert.hsl.hcg=function(hsl){const s=hsl[1]/100;const l=hsl[2]/100;const c=l<0.5?2*s*l:2*s*(1-l);let f=0;if(c<1){f=(l-0.5*c)/(1-c)}return[hsl[0],c*100,f*100]};convert.hsv.hcg=function(hsv){const s=hsv[1]/100;const v=hsv[2]/100;const c=s*v;let f=0;if(c<1){f=(v-c)/(1-c)}return[hsv[0],c*100,f*100]};convert.hcg.rgb=function(hcg){const h=hcg[0]/360;const c=hcg[1]/100;const g=hcg[2]/100;if(c===0){return[g*255,g*255,g*255]}const pure=[0,0,0];const hi=h%1*6;const v=hi%1;const w=1-v;let mg=0;switch(Math.floor(hi)){case 0:pure[0]=1;pure[1]=v;pure[2]=0;break;case 1:pure[0]=w;pure[1]=1;pure[2]=0;break;case 2:pure[0]=0;pure[1]=1;pure[2]=v;break;case 3:pure[0]=0;pure[1]=w;pure[2]=1;break;case 4:pure[0]=v;pure[1]=0;pure[2]=1;break;default:pure[0]=1;pure[1]=0;pure[2]=w;}mg=(1-c)*g;return[(c*pure[0]+mg)*255,(c*pure[1]+mg)*255,(c*pure[2]+mg)*255]};convert.hcg.hsv=function(hcg){const c=hcg[1]/100;const g=hcg[2]/100;const v=c+g*(1-c);let f=0;if(v>0){f=c/v}return[hcg[0],f*100,v*100]};convert.hcg.hsl=function(hcg){const c=hcg[1]/100;const g=hcg[2]/100;const l=g*(1-c)+0.5*c;let s=0;if(l>0&&l<0.5){s=c/(2*l)}else if(l>=0.5&&l<1){s=c/(2*(1-l))}return[hcg[0],s*100,l*100]};convert.hcg.hwb=function(hcg){const c=hcg[1]/100;const g=hcg[2]/100;const v=c+g*(1-c);return[hcg[0],(v-c)*100,(1-v)*100]};convert.hwb.hcg=function(hwb){const w=hwb[1]/100;const b=hwb[2]/100;const v=1-b;const c=v-w;let g=0;if(c<1){g=(v-c)/(1-c)}return[hwb[0],c*100,g*100]};convert.apple.rgb=function(apple){return[apple[0]/65535*255,apple[1]/65535*255,apple[2]/65535*255]};convert.rgb.apple=function(rgb){return[rgb[0]/255*65535,rgb[1]/255*65535,rgb[2]/255*65535]};convert.gray.rgb=function(args){return[args[0]/100*255,args[0]/100*255,args[0]/100*255]};convert.gray.hsl=function(args){return[0,0,args[0]]};convert.gray.hsv=convert.gray.hsl;convert.gray.hwb=function(gray){return[0,100,gray[0]]};convert.gray.cmyk=function(gray){return[0,0,0,gray[0]]};convert.gray.lab=function(gray){return[gray[0],0,0]};convert.gray.hex=function(gray){const val=Math.round(gray[0]/100*255)&255;const integer=(val<<16)+(val<<8)+val;const string=integer.toString(16).toUpperCase();return"000000".substring(string.length)+string};convert.rgb.gray=function(rgb){const val=(rgb[0]+rgb[1]+rgb[2])/3;return[val/255*100]};function buildGraph(){const graph={};const models=Object.keys(conversions);for(let len=models.length,i=0;i<len;i++){graph[models[i]]={distance:-1,parent:null}}return graph}function deriveBFS(fromModel){const graph=buildGraph();const queue=[fromModel];graph[fromModel].distance=0;while(queue.length){const current=queue.pop();const adjacents=Object.keys(conversions[current]);for(let len=adjacents.length,i=0;i<len;i++){const adjacent=adjacents[i];const node=graph[adjacent];if(node.distance===-1){node.distance=graph[current].distance+1;node.parent=current;queue.unshift(adjacent)}}}return graph}function link(from,to){return function(args){return to(from(args))}}function wrapConversion(toModel,graph){const path=[graph[toModel].parent,toModel];let fn=conversions[graph[toModel].parent][toModel];let cur=graph[toModel].parent;while(graph[cur].parent){path.unshift(graph[cur].parent);fn=link(conversions[graph[cur].parent][cur],fn);cur=graph[cur].parent}fn.conversion=path;return fn}var route=function(fromModel){const graph=deriveBFS(fromModel);const conversion={};const models=Object.keys(graph);for(let len=models.length,i=0;i<len;i++){const toModel=models[i];const node=graph[toModel];if(node.parent===null){continue}conversion[toModel]=wrapConversion(toModel,graph)}return conversion};const convert$1={};const models=Object.keys(conversions);function wrapRaw(fn){const wrappedFn=function(...args){const arg0=args[0];if(arg0===undefined||arg0===null){return arg0}if(arg0.length>1){args=arg0}return fn(args)};if("conversion"in fn){wrappedFn.conversion=fn.conversion}return wrappedFn}function wrapRounded(fn){const wrappedFn=function(...args){const arg0=args[0];if(arg0===undefined||arg0===null){return arg0}if(arg0.length>1){args=arg0}const result=fn(args);if(typeof result==="object"){for(let len=result.length,i=0;i<len;i++){result[i]=Math.round(result[i])}}return result};if("conversion"in fn){wrappedFn.conversion=fn.conversion}return wrappedFn}models.forEach(fromModel=>{convert$1[fromModel]={};Object.defineProperty(convert$1[fromModel],"channels",{value:conversions[fromModel].channels});Object.defineProperty(convert$1[fromModel],"labels",{value:conversions[fromModel].labels});const routes=route(fromModel);const routeModels=Object.keys(routes);routeModels.forEach(toModel=>{const fn=routes[toModel];convert$1[fromModel][toModel]=wrapRounded(fn);convert$1[fromModel][toModel].raw=wrapRaw(fn)})});var colorConvert=convert$1;var ansiStyles=createCommonjsModule(function(module){const wrapAnsi16=(fn,offset)=>(...args)=>{const code=fn(...args);return`\u001B[${code+offset}m`};const wrapAnsi256=(fn,offset)=>(...args)=>{const code=fn(...args);return`\u001B[${38+offset};5;${code}m`};const wrapAnsi16m=(fn,offset)=>(...args)=>{const rgb=fn(...args);return`\u001B[${38+offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`};const ansi2ansi=n=>n;const rgb2rgb=(r,g,b)=>[r,g,b];const setLazyProperty=(object,property,get)=>{Object.defineProperty(object,property,{get:()=>{const value=get();Object.defineProperty(object,property,{value,enumerable:true,configurable:true});return value},enumerable:true,configurable:true})};let colorConvert$1;const makeDynamicStyles=(wrap,targetSpace,identity,isBackground)=>{if(colorConvert$1===undefined){colorConvert$1=colorConvert}const offset=isBackground?10:0;const styles={};for(const[sourceSpace,suite]of Object.entries(colorConvert$1)){const name=sourceSpace==="ansi16"?"ansi":sourceSpace;if(sourceSpace===targetSpace){styles[name]=wrap(identity,offset)}else if(typeof suite==="object"){styles[name]=wrap(suite[targetSpace],offset)}}return styles};function assembleStyles(){const codes=new Map;const styles={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};styles.color.gray=styles.color.blackBright;styles.bgColor.bgGray=styles.bgColor.bgBlackBright;styles.color.grey=styles.color.blackBright;styles.bgColor.bgGrey=styles.bgColor.bgBlackBright;for(const[groupName,group]of Object.entries(styles)){for(const[styleName,style]of Object.entries(group)){styles[styleName]={open:`\u001B[${style[0]}m`,close:`\u001B[${style[1]}m`};group[styleName]=styles[styleName];codes.set(style[0],style[1])}Object.defineProperty(styles,groupName,{value:group,enumerable:false})}Object.defineProperty(styles,"codes",{value:codes,enumerable:false});styles.color.close="\x1B[39m";styles.bgColor.close="\x1B[49m";setLazyProperty(styles.color,"ansi",()=>makeDynamicStyles(wrapAnsi16,"ansi16",ansi2ansi,false));setLazyProperty(styles.color,"ansi256",()=>makeDynamicStyles(wrapAnsi256,"ansi256",ansi2ansi,false));setLazyProperty(styles.color,"ansi16m",()=>makeDynamicStyles(wrapAnsi16m,"rgb",rgb2rgb,false));setLazyProperty(styles.bgColor,"ansi",()=>makeDynamicStyles(wrapAnsi16,"ansi16",ansi2ansi,true));setLazyProperty(styles.bgColor,"ansi256",()=>makeDynamicStyles(wrapAnsi256,"ansi256",ansi2ansi,true));setLazyProperty(styles.bgColor,"ansi16m",()=>makeDynamicStyles(wrapAnsi16m,"rgb",rgb2rgb,true));return styles}Object.defineProperty(module,"exports",{enumerable:true,get:assembleStyles})});var hasFlag=(flag,argv=process.argv)=>{const prefix=flag.startsWith("-")?"":flag.length===1?"-":"--";const position=argv.indexOf(prefix+flag);const terminatorPosition=argv.indexOf("--");return position!==-1&&(terminatorPosition===-1||position<terminatorPosition)};const{env}=process;let forceColor;if(hasFlag("no-color")||hasFlag("no-colors")||hasFlag("color=false")||hasFlag("color=never")){forceColor=0}else if(hasFlag("color")||hasFlag("colors")||hasFlag("color=true")||hasFlag("color=always")){forceColor=1}if("FORCE_COLOR"in env){if(env.FORCE_COLOR==="true"){forceColor=1}else if(env.FORCE_COLOR==="false"){forceColor=0}else{forceColor=env.FORCE_COLOR.length===0?1:Math.min(parseInt(env.FORCE_COLOR,10),3)}}function translateLevel(level){if(level===0){return false}return{level,hasBasic:true,has256:level>=2,has16m:level>=3}}function supportsColor(haveStream,streamIsTTY){if(forceColor===0){return 0}if(hasFlag("color=16m")||hasFlag("color=full")||hasFlag("color=truecolor")){return 3}if(hasFlag("color=256")){return 2}if(haveStream&&!streamIsTTY&&forceColor===undefined){return 0}const min=forceColor||0;if(env.TERM==="dumb"){return min}if(process.platform==="win32"){const osRelease=os__default["default"].release().split(".");if(Number(osRelease[0])>=10&&Number(osRelease[2])>=10586){return Number(osRelease[2])>=14931?3:2}return 1}if("CI"in env){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(sign=>sign in env)||env.CI_NAME==="codeship"){return 1}return min}if("TEAMCITY_VERSION"in env){return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION)?1:0}if(env.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in env){const version=parseInt((env.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(env.TERM_PROGRAM){case"iTerm.app":return version>=3?3:2;case"Apple_Terminal":return 2;}}if(/-256(color)?$/i.test(env.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)){return 1}if("COLORTERM"in env){return 1}return min}function getSupportLevel(stream){const level=supportsColor(stream,stream&&stream.isTTY);return translateLevel(level)}var supportsColor_1={supportsColor:getSupportLevel,stdout:translateLevel(supportsColor(true,tty__default["default"].isatty(1))),stderr:translateLevel(supportsColor(true,tty__default["default"].isatty(2)))};const stringReplaceAll=(string,substring,replacer)=>{let index=string.indexOf(substring);if(index===-1){return string}const substringLength=substring.length;let endIndex=0;let returnValue="";do{returnValue+=string.substr(endIndex,index-endIndex)+substring+replacer;endIndex=index+substringLength;index=string.indexOf(substring,endIndex)}while(index!==-1);returnValue+=string.substr(endIndex);return returnValue};const stringEncaseCRLFWithFirstIndex=(string,prefix,postfix,index)=>{let endIndex=0;let returnValue="";do{const gotCR=string[index-1]==="\r";returnValue+=string.substr(endIndex,(gotCR?index-1:index)-endIndex)+prefix+(gotCR?"\r\n":"\n")+postfix;endIndex=index+1;index=string.indexOf("\n",endIndex)}while(index!==-1);returnValue+=string.substr(endIndex);return returnValue};var util$1={stringReplaceAll,stringEncaseCRLFWithFirstIndex};const TEMPLATE_REGEX=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;const STYLE_REGEX=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;const STRING_REGEX=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;const ESCAPE_REGEX=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;const ESCAPES=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\x0B"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function unescape(c){const u=c[0]==="u";const bracket=c[1]==="{";if(u&&!bracket&&c.length===5||c[0]==="x"&&c.length===3){return String.fromCharCode(parseInt(c.slice(1),16))}if(u&&bracket){return String.fromCodePoint(parseInt(c.slice(2,-1),16))}return ESCAPES.get(c)||c}function parseArguments(name,arguments_){const results=[];const chunks=arguments_.trim().split(/\s*,\s*/g);let matches;for(const chunk of chunks){const number=Number(chunk);if(!Number.isNaN(number)){results.push(number)}else if(matches=chunk.match(STRING_REGEX)){results.push(matches[2].replace(ESCAPE_REGEX,(m,escape,character)=>escape?unescape(escape):character))}else{throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`)}}return results}function parseStyle(style){STYLE_REGEX.lastIndex=0;const results=[];let matches;while((matches=STYLE_REGEX.exec(style))!==null){const name=matches[1];if(matches[2]){const args=parseArguments(name,matches[2]);results.push([name].concat(args))}else{results.push([name])}}return results}function buildStyle(chalk,styles){const enabled={};for(const layer of styles){for(const style of layer.styles){enabled[style[0]]=layer.inverse?null:style.slice(1)}}let current=chalk;for(const[styleName,styles]of Object.entries(enabled)){if(!Array.isArray(styles)){continue}if(!(styleName in current)){throw new Error(`Unknown Chalk style: ${styleName}`)}current=styles.length>0?current[styleName](...styles):current[styleName]}return current}var templates=(chalk,temporary)=>{const styles=[];const chunks=[];let chunk=[];temporary.replace(TEMPLATE_REGEX,(m,escapeCharacter,inverse,style,close,character)=>{if(escapeCharacter){chunk.push(unescape(escapeCharacter))}else if(style){const string=chunk.join("");chunk=[];chunks.push(styles.length===0?string:buildStyle(chalk,styles)(string));styles.push({inverse,styles:parseStyle(style)})}else if(close){if(styles.length===0){throw new Error("Found extraneous } in Chalk template literal")}chunks.push(buildStyle(chalk,styles)(chunk.join("")));chunk=[];styles.pop()}else{chunk.push(character)}});chunks.push(chunk.join(""));if(styles.length>0){const errMessage=`Chalk template literal is missing ${styles.length} closing bracket${styles.length===1?"":"s"} (\`}\`)`;throw new Error(errMessage)}return chunks.join("")};const{stdout:stdoutColor,stderr:stderrColor}=supportsColor_1;const{stringReplaceAll:stringReplaceAll$1,stringEncaseCRLFWithFirstIndex:stringEncaseCRLFWithFirstIndex$1}=util$1;const{isArray}=Array;const levelMapping=["ansi","ansi","ansi256","ansi16m"];const styles=Object.create(null);const applyOptions=(object,options={})=>{if(options.level&&!(Number.isInteger(options.level)&&options.level>=0&&options.level<=3)){throw new Error("The `level` option should be an integer from 0 to 3")}const colorLevel=stdoutColor?stdoutColor.level:0;object.level=options.level===undefined?colorLevel:options.level};class ChalkClass{constructor(options){return chalkFactory(options)}}const chalkFactory=options=>{const chalk={};applyOptions(chalk,options);chalk.template=(...arguments_)=>chalkTag(chalk.template,...arguments_);Object.setPrototypeOf(chalk,Chalk.prototype);Object.setPrototypeOf(chalk.template,chalk);chalk.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")};chalk.template.Instance=ChalkClass;return chalk.template};function Chalk(options){return chalkFactory(options)}for(const[styleName,style]of Object.entries(ansiStyles)){styles[styleName]={get(){const builder=createBuilder(this,createStyler(style.open,style.close,this._styler),this._isEmpty);Object.defineProperty(this,styleName,{value:builder});return builder}}}styles.visible={get(){const builder=createBuilder(this,this._styler,true);Object.defineProperty(this,"visible",{value:builder});return builder}};const usedModels=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const model of usedModels){styles[model]={get(){const{level}=this;return function(...arguments_){const styler=createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_),ansiStyles.color.close,this._styler);return createBuilder(this,styler,this._isEmpty)}}}}for(const model of usedModels){const bgModel="bg"+model[0].toUpperCase()+model.slice(1);styles[bgModel]={get(){const{level}=this;return function(...arguments_){const styler=createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_),ansiStyles.bgColor.close,this._styler);return createBuilder(this,styler,this._isEmpty)}}}}const proto=Object.defineProperties(()=>{},{...styles,level:{enumerable:true,get(){return this._generator.level},set(level){this._generator.level=level}}});const createStyler=(open,close,parent)=>{let openAll;let closeAll;if(parent===undefined){openAll=open;closeAll=close}else{openAll=parent.openAll+open;closeAll=close+parent.closeAll}return{open,close,openAll,closeAll,parent}};const createBuilder=(self,_styler,_isEmpty)=>{const builder=(...arguments_)=>{if(isArray(arguments_[0])&&isArray(arguments_[0].raw)){return applyStyle(builder,chalkTag(builder,...arguments_))}return applyStyle(builder,arguments_.length===1?""+arguments_[0]:arguments_.join(" "))};Object.setPrototypeOf(builder,proto);builder._generator=self;builder._styler=_styler;builder._isEmpty=_isEmpty;return builder};const applyStyle=(self,string)=>{if(self.level<=0||!string){return self._isEmpty?"":string}let styler=self._styler;if(styler===undefined){return string}const{openAll,closeAll}=styler;if(string.indexOf("\x1B")!==-1){while(styler!==undefined){string=stringReplaceAll$1(string,styler.close,styler.open);styler=styler.parent}}const lfIndex=string.indexOf("\n");if(lfIndex!==-1){string=stringEncaseCRLFWithFirstIndex$1(string,closeAll,openAll,lfIndex)}return openAll+string+closeAll};let template;const chalkTag=(chalk,...strings)=>{const[firstString]=strings;if(!isArray(firstString)||!isArray(firstString.raw)){return strings.join(" ")}const arguments_=strings.slice(1);const parts=[firstString.raw[0]];for(let i=1;i<firstString.length;i++){parts.push(String(arguments_[i-1]).replace(/[{}\\]/g,"\\$&"),String(firstString.raw[i]))}if(template===undefined){template=templates}return template(chalk,parts.join(""))};Object.defineProperties(Chalk.prototype,styles);const chalk=Chalk();chalk.supportsColor=stdoutColor;chalk.stderr=Chalk({level:stderrColor?stderrColor.level:0});chalk.stderr.supportsColor=stderrColor;var source$1=chalk;const mimicFn=(to,from)=>{for(const prop of Reflect.ownKeys(from)){Object.defineProperty(to,prop,Object.getOwnPropertyDescriptor(from,prop))}return to};var mimicFn_1=mimicFn;var _default=mimicFn;mimicFn_1.default=_default;const calledFunctions=new WeakMap;const onetime=(function_,options={})=>{if(typeof function_!=="function"){throw new TypeError("Expected a function")}let returnValue;let callCount=0;const functionName=function_.displayName||function_.name||"<anonymous>";const onetime=function(...arguments_){calledFunctions.set(onetime,++callCount);if(callCount===1){returnValue=function_.apply(this,arguments_);function_=null}else if(options.throw===true){throw new Error(`Function \`${functionName}\` can only be called once`)}return returnValue};mimicFn_1(onetime,function_);calledFunctions.set(onetime,callCount);return onetime};var onetime_1=onetime;var _default$1=onetime;var callCount=function_=>{if(!calledFunctions.has(function_)){throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`)}return calledFunctions.get(function_)};onetime_1.default=_default$1;onetime_1.callCount=callCount;var signals=createCommonjsModule(function(module){module.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32"){module.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT")}if(process.platform==="linux"){module.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}});var signals$1=signals;var isWin=/^win/i.test(process.platform);var EE=require$$0__default["default"];if(typeof EE!=="function"){EE=EE.EventEmitter}var emitter;if(process.__signal_exit_emitter__){emitter=process.__signal_exit_emitter__}else{emitter=process.__signal_exit_emitter__=new EE;emitter.count=0;emitter.emitted={}}if(!emitter.infinite){emitter.setMaxListeners(Infinity);emitter.infinite=true}var signalExit=function(cb,opts){assert__default["default"].equal(typeof cb,"function","a callback must be provided for exit handler");if(loaded===false){load()}var ev="exit";if(opts&&opts.alwaysLast){ev="afterexit"}var remove=function(){emitter.removeListener(ev,cb);if(emitter.listeners("exit").length===0&&emitter.listeners("afterexit").length===0){unload()}};emitter.on(ev,cb);return remove};var unload_1=unload;function unload(){if(!loaded){return}loaded=false;signals$1.forEach(function(sig){try{process.removeListener(sig,sigListeners[sig])}catch(er){}});process.emit=originalProcessEmit;process.reallyExit=originalProcessReallyExit;emitter.count-=1}function emit(event,code,signal){if(emitter.emitted[event]){return}emitter.emitted[event]=true;emitter.emit(event,code,signal)}var sigListeners={};signals$1.forEach(function(sig){sigListeners[sig]=function listener(){var listeners=process.listeners(sig);if(listeners.length===emitter.count){unload();emit("exit",null,sig);emit("afterexit",null,sig);if(isWin&&sig==="SIGHUP"){sig="SIGINT"}process.kill(process.pid,sig)}}});var signals_1=function(){return signals$1};var load_1=load;var loaded=false;function load(){if(loaded){return}loaded=true;emitter.count+=1;signals$1=signals$1.filter(function(sig){try{process.on(sig,sigListeners[sig]);return true}catch(er){return false}});process.emit=processEmit;process.reallyExit=processReallyExit}var originalProcessReallyExit=process.reallyExit;function processReallyExit(code){process.exitCode=code||0;emit("exit",process.exitCode,null);emit("afterexit",process.exitCode,null);originalProcessReallyExit.call(process,process.exitCode)}var originalProcessEmit=process.emit;function processEmit(ev,arg){if(ev==="exit"){if(arg!==undefined){process.exitCode=arg}var ret=originalProcessEmit.apply(this,arguments);emit("exit",process.exitCode,null);emit("afterexit",process.exitCode,null);return ret}else{return originalProcessEmit.apply(this,arguments)}}signalExit.unload=unload_1;signalExit.signals=signals_1;signalExit.load=load_1;var restoreCursor=onetime_1(()=>{signalExit(()=>{process.stderr.write("\x1B[?25h")},{alwaysLast:true})});var cliCursor=createCommonjsModule(function(module,exports){let isHidden=false;exports.show=(writableStream=process.stderr)=>{if(!writableStream.isTTY){return}isHidden=false;writableStream.write("\x1B[?25h")};exports.hide=(writableStream=process.stderr)=>{if(!writableStream.isTTY){return}restoreCursor();isHidden=true;writableStream.write("\x1B[?25l")};exports.toggle=(force,writableStream)=>{if(force!==undefined){isHidden=force}if(isHidden){exports.show(writableStream)}else{exports.hide(writableStream)}}});var require$$0={"dots":{"interval":80,"frames":["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},"dots2":{"interval":80,"frames":["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"]},"dots3":{"interval":80,"frames":["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"]},"dots4":{"interval":80,"frames":["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"]},"dots5":{"interval":80,"frames":["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"]},"dots6":{"interval":80,"frames":["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"]},"dots7":{"interval":80,"frames":["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"]},"dots8":{"interval":80,"frames":["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"]},"dots9":{"interval":80,"frames":["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"]},"dots10":{"interval":80,"frames":["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"]},"dots11":{"interval":100,"frames":["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"]},"dots12":{"interval":80,"frames":["\u2880\u2800","\u2840\u2800","\u2804\u2800","\u2882\u2800","\u2842\u2800","\u2805\u2800","\u2883\u2800","\u2843\u2800","\u280D\u2800","\u288B\u2800","\u284B\u2800","\u280D\u2801","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2888\u2829","\u2840\u2899","\u2804\u2859","\u2882\u2829","\u2842\u2898","\u2805\u2858","\u2883\u2828","\u2843\u2890","\u280D\u2850","\u288B\u2820","\u284B\u2880","\u280D\u2841","\u288B\u2801","\u284B\u2801","\u280D\u2809","\u280B\u2809","\u280B\u2809","\u2809\u2819","\u2809\u2819","\u2809\u2829","\u2808\u2899","\u2808\u2859","\u2808\u2829","\u2800\u2899","\u2800\u2859","\u2800\u2829","\u2800\u2898","\u2800\u2858","\u2800\u2828","\u2800\u2890","\u2800\u2850","\u2800\u2820","\u2800\u2880","\u2800\u2840"]},"dots8Bit":{"interval":80,"frames":["\u2800","\u2801","\u2802","\u2803","\u2804","\u2805","\u2806","\u2807","\u2840","\u2841","\u2842","\u2843","\u2844","\u2845","\u2846","\u2847","\u2808","\u2809","\u280A","\u280B","\u280C","\u280D","\u280E","\u280F","\u2848","\u2849","\u284A","\u284B","\u284C","\u284D","\u284E","\u284F","\u2810","\u2811","\u2812","\u2813","\u2814","\u2815","\u2816","\u2817","\u2850","\u2851","\u2852","\u2853","\u2854","\u2855","\u2856","\u2857","\u2818","\u2819","\u281A","\u281B","\u281C","\u281D","\u281E","\u281F","\u2858","\u2859","\u285A","\u285B","\u285C","\u285D","\u285E","\u285F","\u2820","\u2821","\u2822","\u2823","\u2824","\u2825","\u2826","\u2827","\u2860","\u2861","\u2862","\u2863","\u2864","\u2865","\u2866","\u2867","\u2828","\u2829","\u282A","\u282B","\u282C","\u282D","\u282E","\u282F","\u2868","\u2869","\u286A","\u286B","\u286C","\u286D","\u286E","\u286F","\u2830","\u2831","\u2832","\u2833","\u2834","\u2835","\u2836","\u2837","\u2870","\u2871","\u2872","\u2873","\u2874","\u2875","\u2876","\u2877","\u2838","\u2839","\u283A","\u283B","\u283C","\u283D","\u283E","\u283F","\u2878","\u2879","\u287A","\u287B","\u287C","\u287D","\u287E","\u287F","\u2880","\u2881","\u2882","\u2883","\u2884","\u2885","\u2886","\u2887","\u28C0","\u28C1","\u28C2","\u28C3","\u28C4","\u28C5","\u28C6","\u28C7","\u2888","\u2889","\u288A","\u288B","\u288C","\u288D","\u288E","\u288F","\u28C8","\u28C9","\u28CA","\u28CB","\u28CC","\u28CD","\u28CE","\u28CF","\u2890","\u2891","\u2892","\u2893","\u2894","\u2895","\u2896","\u2897","\u28D0","\u28D1","\u28D2","\u28D3","\u28D4","\u28D5","\u28D6","\u28D7","\u2898","\u2899","\u289A","\u289B","\u289C","\u289D","\u289E","\u289F","\u28D8","\u28D9","\u28DA","\u28DB","\u28DC","\u28DD","\u28DE","\u28DF","\u28A0","\u28A1","\u28A2","\u28A3","\u28A4","\u28A5","\u28A6","\u28A7","\u28E0","\u28E1","\u28E2","\u28E3","\u28E4","\u28E5","\u28E6","\u28E7","\u28A8","\u28A9","\u28AA","\u28AB","\u28AC","\u28AD","\u28AE","\u28AF","\u28E8","\u28E9","\u28EA","\u28EB","\u28EC","\u28ED","\u28EE","\u28EF","\u28B0","\u28B1","\u28B2","\u28B3","\u28B4","\u28B5","\u28B6","\u28B7","\u28F0","\u28F1","\u28F2","\u28F3","\u28F4","\u28F5","\u28F6","\u28F7","\u28B8","\u28B9","\u28BA","\u28BB","\u28BC","\u28BD","\u28BE","\u28BF","\u28F8","\u28F9","\u28FA","\u28FB","\u28FC","\u28FD","\u28FE","\u28FF"]},"line":{"interval":130,"frames":["-","\\","|","/"]},"line2":{"interval":100,"frames":["\u2802","-","\u2013","\u2014","\u2013","-"]},"pipe":{"interval":100,"frames":["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"]},"simpleDots":{"interval":400,"frames":[". ",".. ","..."," "]},"simpleDotsScrolling":{"interval":200,"frames":[". ",".. ","..."," .."," ."," "]},"star":{"interval":70,"frames":["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"]},"star2":{"interval":80,"frames":["+","x","*"]},"flip":{"interval":70,"frames":["_","_","_","-","`","`","'","\xB4","-","_","_","_"]},"hamburger":{"interval":100,"frames":["\u2631","\u2632","\u2634"]},"growVertical":{"interval":120,"frames":["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"]},"growHorizontal":{"interval":120,"frames":["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"]},"balloon":{"interval":140,"frames":[" ",".","o","O","@","*"," "]},"balloon2":{"interval":120,"frames":[".","o","O","\xB0","O","o","."]},"noise":{"interval":100,"frames":["\u2593","\u2592","\u2591"]},"bounce":{"interval":120,"frames":["\u2801","\u2802","\u2804","\u2802"]},"boxBounce":{"interval":120,"frames":["\u2596","\u2598","\u259D","\u2597"]},"boxBounce2":{"interval":100,"frames":["\u258C","\u2580","\u2590","\u2584"]},"triangle":{"interval":50,"frames":["\u25E2","\u25E3","\u25E4","\u25E5"]},"arc":{"interval":100,"frames":["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"]},"circle":{"interval":120,"frames":["\u25E1","\u2299","\u25E0"]},"squareCorners":{"interval":180,"frames":["\u25F0","\u25F3","\u25F2","\u25F1"]},"circleQuarters":{"interval":120,"frames":["\u25F4","\u25F7","\u25F6","\u25F5"]},"circleHalves":{"interval":50,"frames":["\u25D0","\u25D3","\u25D1","\u25D2"]},"squish":{"interval":100,"frames":["\u256B","\u256A"]},"toggle":{"interval":250,"frames":["\u22B6","\u22B7"]},"toggle2":{"interval":80,"frames":["\u25AB","\u25AA"]},"toggle3":{"interval":120,"frames":["\u25A1","\u25A0"]},"toggle4":{"interval":100,"frames":["\u25A0","\u25A1","\u25AA","\u25AB"]},"toggle5":{"interval":100,"frames":["\u25AE","\u25AF"]},"toggle6":{"interval":300,"frames":["\u101D","\u1040"]},"toggle7":{"interval":80,"frames":["\u29BE","\u29BF"]},"toggle8":{"interval":100,"frames":["\u25CD","\u25CC"]},"toggle9":{"interval":100,"frames":["\u25C9","\u25CE"]},"toggle10":{"interval":100,"frames":["\u3282","\u3280","\u3281"]},"toggle11":{"interval":50,"frames":["\u29C7","\u29C6"]},"toggle12":{"interval":120,"frames":["\u2617","\u2616"]},"toggle13":{"interval":80,"frames":["=","*","-"]},"arrow":{"interval":100,"frames":["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"]},"arrow2":{"interval":80,"frames":["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "]},"arrow3":{"interval":120,"frames":["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"]},"bouncingBar":{"interval":80,"frames":["[ ]","[= ]","[== ]","[=== ]","[ ===]","[ ==]","[ =]","[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"]},"bouncingBall":{"interval":80,"frames":["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"]},"smiley":{"interval":200,"frames":["\uD83D\uDE04 ","\uD83D\uDE1D "]},"monkey":{"interval":300,"frames":["\uD83D\uDE48 ","\uD83D\uDE48 ","\uD83D\uDE49 ","\uD83D\uDE4A "]},"hearts":{"interval":100,"frames":["\uD83D\uDC9B ","\uD83D\uDC99 ","\uD83D\uDC9C ","\uD83D\uDC9A ","\u2764\uFE0F "]},"clock":{"interval":100,"frames":["\uD83D\uDD5B ","\uD83D\uDD50 ","\uD83D\uDD51 ","\uD83D\uDD52 ","\uD83D\uDD53 ","\uD83D\uDD54 ","\uD83D\uDD55 ","\uD83D\uDD56 ","\uD83D\uDD57 ","\uD83D\uDD58 ","\uD83D\uDD59 ","\uD83D\uDD5A "]},"earth":{"interval":180,"frames":["\uD83C\uDF0D ","\uD83C\uDF0E ","\uD83C\uDF0F "]},"material":{"interval":17,"frames":["\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2588","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581","\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581"]},"moon":{"interval":80,"frames":["\uD83C\uDF11 ","\uD83C\uDF12 ","\uD83C\uDF13 ","\uD83C\uDF14 ","\uD83C\uDF15 ","\uD83C\uDF16 ","\uD83C\uDF17 ","\uD83C\uDF18 "]},"runner":{"interval":140,"frames":["\uD83D\uDEB6 ","\uD83C\uDFC3 "]},"pong":{"interval":80,"frames":["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"]},"shark":{"interval":120,"frames":["\u2590|\\____________\u258C","\u2590_|\\___________\u258C","\u2590__|\\__________\u258C","\u2590___|\\_________\u258C","\u2590____|\\________\u258C","\u2590_____|\\_______\u258C","\u2590______|\\______\u258C","\u2590_______|\\_____\u258C","\u2590________|\\____\u258C","\u2590_________|\\___\u258C","\u2590__________|\\__\u258C","\u2590___________|\\_\u258C","\u2590____________|\\\u258C","\u2590____________/|\u258C","\u2590___________/|_\u258C","\u2590__________/|__\u258C","\u2590_________/|___\u258C","\u2590________/|____\u258C","\u2590_______/|_____\u258C","\u2590______/|______\u258C","\u2590_____/|_______\u258C","\u2590____/|________\u258C","\u2590___/|_________\u258C","\u2590__/|__________\u258C","\u2590_/|___________\u258C","\u2590/|____________\u258C"]},"dqpb":{"interval":100,"frames":["d","q","p","b"]},"weather":{"interval":100,"frames":["\u2600\uFE0F ","\u2600\uFE0F ","\u2600\uFE0F ","\uD83C\uDF24 ","\u26C5\uFE0F ","\uD83C\uDF25 ","\u2601\uFE0F ","\uD83C\uDF27 ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","\u26C8 ","\uD83C\uDF28 ","\uD83C\uDF27 ","\uD83C\uDF28 ","\u2601\uFE0F ","\uD83C\uDF25 ","\u26C5\uFE0F ","\uD83C\uDF24 ","\u2600\uFE0F ","\u2600\uFE0F "]},"christmas":{"interval":400,"frames":["\uD83C\uDF32","\uD83C\uDF84"]},"grenade":{"interval":80,"frames":["\u060C ","\u2032 "," \xB4 "," \u203E "," \u2E0C"," \u2E0A"," |"," \u204E"," \u2055"," \u0DF4 "," \u2053"," "," "," "]},"point":{"interval":125,"frames":["\u2219\u2219\u2219","\u25CF\u2219\u2219","\u2219\u25CF\u2219","\u2219\u2219\u25CF","\u2219\u2219\u2219"]},"layer":{"interval":150,"frames":["-","=","\u2261"]},"betaWave":{"interval":80,"frames":["\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1\u03B2","\u03B2\u03B2\u03B2\u03B2\u03B2\u03B2\u03C1"]}};const spinners=Object.assign({},require$$0);const spinnersList=Object.keys(spinners);Object.defineProperty(spinners,"random",{get(){const randomIndex=Math.floor(Math.random()*spinnersList.length);const spinnerName=spinnersList[randomIndex];return spinners[spinnerName]}});var cliSpinners=spinners;var _default$2=spinners;cliSpinners.default=_default$2;var colorName$1={"aliceblue":[240,248,255],"antiquewhite":[250,235,215],"aqua":[0,255,255],"aquamarine":[127,255,212],"azure":[240,255,255],"beige":[245,245,220],"bisque":[255,228,196],"black":[0,0,0],"blanchedalmond":[255,235,205],"blue":[0,0,255],"blueviolet":[138,43,226],"brown":[165,42,42],"burlywood":[222,184,135],"cadetblue":[95,158,160],"chartreuse":[127,255,0],"chocolate":[210,105,30],"coral":[255,127,80],"cornflowerblue":[100,149,237],"cornsilk":[255,248,220],"crimson":[220,20,60],"cyan":[0,255,255],"darkblue":[0,0,139],"darkcyan":[0,139,139],"darkgoldenrod":[184,134,11],"darkgray":[169,169,169],"darkgreen":[0,100,0],"darkgrey":[169,169,169],"darkkhaki":[189,183,107],"darkmagenta":[139,0,139],"darkolivegreen":[85,107,47],"darkorange":[255,140,0],"darkorchid":[153,50,204],"darkred":[139,0,0],"darksalmon":[233,150,122],"darkseagreen":[143,188,143],"darkslateblue":[72,61,139],"darkslategray":[47,79,79],"darkslategrey":[47,79,79],"darkturquoise":[0,206,209],"darkviolet":[148,0,211],"deeppink":[255,20,147],"deepskyblue":[0,191,255],"dimgray":[105,105,105],"dimgrey":[105,105,105],"dodgerblue":[30,144,255],"firebrick":[178,34,34],"floralwhite":[255,250,240],"forestgreen":[34,139,34],"fuchsia":[255,0,255],"gainsboro":[220,220,220],"ghostwhite":[248,248,255],"gold":[255,215,0],"goldenrod":[218,165,32],"gray":[128,128,128],"green":[0,128,0],"greenyellow":[173,255,47],"grey":[128,128,128],"honeydew":[240,255,240],"hotpink":[255,105,180],"indianred":[205,92,92],"indigo":[75,0,130],"ivory":[255,255,240],"khaki":[240,230,140],"lavender":[230,230,250],"lavenderblush":[255,240,245],"lawngreen":[124,252,0],"lemonchiffon":[255,250,205],"lightblue":[173,216,230],"lightcoral":[240,128,128],"lightcyan":[224,255,255],"lightgoldenrodyellow":[250,250,210],"lightgray":[211,211,211],"lightgreen":[144,238,144],"lightgrey":[211,211,211],"lightpink":[255,182,193],"lightsalmon":[255,160,122],"lightseagreen":[32,178,170],"lightskyblue":[135,206,250],"lightslategray":[119,136,153],"lightslategrey":[119,136,153],"lightsteelblue":[176,196,222],"lightyellow":[255,255,224],"lime":[0,255,0],"limegreen":[50,205,50],"linen":[250,240,230],"magenta":[255,0,255],"maroon":[128,0,0],"mediumaquamarine":[102,205,170],"mediumblue":[0,0,205],"mediumorchid":[186,85,211],"mediumpurple":[147,112,219],"mediumseagreen":[60,179,113],"mediumslateblue":[123,104,238],"mediumspringgreen":[0,250,154],"mediumturquoise":[72,209,204],"mediumvioletred":[199,21,133],"midnightblue":[25,25,112],"mintcream":[245,255,250],"mistyrose":[255,228,225],"moccasin":[255,228,181],"navajowhite":[255,222,173],"navy":[0,0,128],"oldlace":[253,245,230],"olive":[128,128,0],"olivedrab":[107,142,35],"orange":[255,165,0],"orangered":[255,69,0],"orchid":[218,112,214],"palegoldenrod":[238,232,170],"palegreen":[152,251,152],"paleturquoise":[175,238,238],"palevioletred":[219,112,147],"papayawhip":[255,239,213],"peachpuff":[255,218,185],"peru":[205,133,63],"pink":[255,192,203],"plum":[221,160,221],"powderblue":[176,224,230],"purple":[128,0,128],"rebeccapurple":[102,51,153],"red":[255,0,0],"rosybrown":[188,143,143],"royalblue":[65,105,225],"saddlebrown":[139,69,19],"salmon":[250,128,114],"sandybrown":[244,164,96],"seagreen":[46,139,87],"seashell":[255,245,238],"sienna":[160,82,45],"silver":[192,192,192],"skyblue":[135,206,235],"slateblue":[106,90,205],"slategray":[112,128,144],"slategrey":[112,128,144],"snow":[255,250,250],"springgreen":[0,255,127],"steelblue":[70,130,180],"tan":[210,180,140],"teal":[0,128,128],"thistle":[216,191,216],"tomato":[255,99,71],"turquoise":[64,224,208],"violet":[238,130,238],"wheat":[245,222,179],"white":[255,255,255],"whitesmoke":[245,245,245],"yellow":[255,255,0],"yellowgreen":[154,205,50]};const reverseKeywords$1={};for(const key of Object.keys(colorName$1)){reverseKeywords$1[colorName$1[key]]=key}const convert$2={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var conversions$1=convert$2;for(const model of Object.keys(convert$2)){if(!("channels"in convert$2[model])){throw new Error("missing channels property: "+model)}if(!("labels"in convert$2[model])){throw new Error("missing channel labels property: "+model)}if(convert$2[model].labels.length!==convert$2[model].channels){throw new Error("channel and label counts mismatch: "+model)}const{channels,labels}=convert$2[model];delete convert$2[model].channels;delete convert$2[model].labels;Object.defineProperty(convert$2[model],"channels",{value:channels});Object.defineProperty(convert$2[model],"labels",{value:labels})}convert$2.rgb.hsl=function(rgb){const r=rgb[0]/255;const g=rgb[1]/255;const b=rgb[2]/255;const min=Math.min(r,g,b);const max=Math.max(r,g,b);const delta=max-min;let h;let s;if(max===min){h=0}else if(r===max){h=(g-b)/delta}else if(g===max){h=2+(b-r)/delta}else if(b===max){h=4+(r-g)/delta}h=Math.min(h*60,360);if(h<0){h+=360}const l=(min+max)/2;if(max===min){s=0}else if(l<=0.5){s=delta/(max+min)}else{s=delta/(2-max-min)}return[h,s*100,l*100]};convert$2.rgb.hsv=function(rgb){let rdif;let gdif;let bdif;let h;let s;const r=rgb[0]/255;const g=rgb[1]/255;const b=rgb[2]/255;const v=Math.max(r,g,b);const diff=v-Math.min(r,g,b);const diffc=function(c){return(v-c)/6/diff+1/2};if(diff===0){h=0;s=0}else{s=diff/v;rdif=diffc(r);gdif=diffc(g);bdif=diffc(b);if(r===v){h=bdif-gdif}else if(g===v){h=1/3+rdif-bdif}else if(b===v){h=2/3+gdif-rdif}if(h<0){h+=1}else if(h>1){h-=1}}return[h*360,s*100,v*100]};convert$2.rgb.hwb=function(rgb){const r=rgb[0];const g=rgb[1];let b=rgb[2];const h=convert$2.rgb.hsl(rgb)[0];const w=1/255*Math.min(r,Math.min(g,b));b=1-1/255*Math.max(r,Math.max(g,b));return[h,w*100,b*100]};convert$2.rgb.cmyk=function(rgb){const r=rgb[0]/255;const g=rgb[1]/255;const b=rgb[2]/255;const k=Math.min(1-r,1-g,1-b);const c=(1-r-k)/(1-k)||0;const m=(1-g-k)/(1-k)||0;const y=(1-b-k)/(1-k)||0;return[c*100,m*100,y*100,k*100]};function comparativeDistance$1(x,y){return(x[0]-y[0])**2+(x[1]-y[1])**2+(x[2]-y[2])**2}convert$2.rgb.keyword=function(rgb){const reversed=reverseKeywords$1[rgb];if(reversed){return reversed}let currentClosestDistance=Infinity;let currentClosestKeyword;for(const keyword of Object.keys(colorName$1)){const value=colorName$1[keyword];const distance=comparativeDistance$1(rgb,value);if(distance<currentClosestDistance){currentClosestDistance=distance;currentClosestKeyword=keyword}}return currentClosestKeyword};convert$2.keyword.rgb=function(keyword){return colorName$1[keyword]};convert$2.rgb.xyz=function(rgb){let r=rgb[0]/255;let g=rgb[1]/255;let b=rgb[2]/255;r=r>0.04045?((r+0.055)/1.055)**2.4:r/12.92;g=g>0.04045?((g+0.055)/1.055)**2.4:g/12.92;b=b>0.04045?((b+0.055)/1.055)**2.4:b/12.92;const x=r*0.4124+g*0.3576+b*0.1805;const y=r*0.2126+g*0.7152+b*0.0722;const z=r*0.0193+g*0.1192+b*0.9505;return[x*100,y*100,z*100]};convert$2.rgb.lab=function(rgb){const xyz=convert$2.rgb.xyz(rgb);let x=xyz[0];let y=xyz[1];let z=xyz[2];x/=95.047;y/=100;z/=108.883;x=x>0.008856?x**(1/3):7.787*x+16/116;y=y>0.008856?y**(1/3):7.787*y+16/116;z=z>0.008856?z**(1/3):7.787*z+16/116;const l=116*y-16;const a=500*(x-y);const b=200*(y-z);return[l,a,b]};convert$2.hsl.rgb=function(hsl){const h=hsl[0]/360;const s=hsl[1]/100;const l=hsl[2]/100;let t2;let t3;let val;if(s===0){val=l*255;return[val,val,val]}if(l<0.5){t2=l*(1+s)}else{t2=l+s-l*s}const t1=2*l-t2;const rgb=[0,0,0];for(let i=0;i<3;i++){t3=h+1/3*-(i-1);if(t3<0){t3++}if(t3>1){t3--}if(6*t3<1){val=t1+(t2-t1)*6*t3}else if(2*t3<1){val=t2}else if(3*t3<2){val=t1+(t2-t1)*(2/3-t3)*6}else{val=t1}rgb[i]=val*255}return rgb};convert$2.hsl.hsv=function(hsl){const h=hsl[0];let s=hsl[1]/100;let l=hsl[2]/100;let smin=s;const lmin=Math.max(l,0.01);l*=2;s*=l<=1?l:2-l;smin*=lmin<=1?lmin:2-lmin;const v=(l+s)/2;const sv=l===0?2*smin/(lmin+smin):2*s/(l+s);return[h,sv*100,v*100]};convert$2.hsv.rgb=function(hsv){const h=hsv[0]/60;const s=hsv[1]/100;let v=hsv[2]/100;const hi=Math.floor(h)%6;const f=h-Math.floor(h);const p=255*v*(1-s);const q=255*v*(1-s*f);const t=255*v*(1-s*(1-f));v*=255;switch(hi){case 0:return[v,t,p];case 1:return[q,v,p];case 2:return[p,v,t];case 3:return[p,q,v];case 4:return[t,p,v];case 5:return[v,p,q];}};convert$2.hsv.hsl=function(hsv){const h=hsv[0];const s=hsv[1]/100;const v=hsv[2]/100;const vmin=Math.max(v,0.01);let sl;let l;l=(2-s)*v;const lmin=(2-s)*vmin;sl=s*vmin;sl/=lmin<=1?lmin:2-lmin;sl=sl||0;l/=2;return[h,sl*100,l*100]};convert$2.hwb.rgb=function(hwb){const h=hwb[0]/360;let wh=hwb[1]/100;let bl=hwb[2]/100;const ratio=wh+bl;let f;if(ratio>1){wh/=ratio;bl/=ratio}const i=Math.floor(6*h);const v=1-bl;f=6*h-i;if((i&1)!==0){f=1-f}const n=wh+f*(v-wh);let r;let g;let b;switch(i){default:case 6:case 0:r=v;g=n;b=wh;break;case 1:r=n;g=v;b=wh;break;case 2:r=wh;g=v;b=n;break;case 3:r=wh;g=n;b=v;break;case 4:r=n;g=wh;b=v;break;case 5:r=v;g=wh;b=n;break;}return[r*255,g*255,b*255]};convert$2.cmyk.rgb=function(cmyk){const c=cmyk[0]/100;const m=cmyk[1]/100;const y=cmyk[2]/100;const k=cmyk[3]/100;const r=1-Math.min(1,c*(1-k)+k);const g=1-Math.min(1,m*(1-k)+k);const b=1-Math.min(1,y*(1-k)+k);return[r*255,g*255,b*255]};convert$2.xyz.rgb=function(xyz){const x=xyz[0]/100;const y=xyz[1]/100;const z=xyz[2]/100;let r;let g;let b;r=x*3.2406+y*-1.5372+z*-0.4986;g=x*-0.9689+y*1.8758+z*0.0415;b=x*0.0557+y*-0.204+z*1.057;r=r>0.0031308?1.055*r**(1/2.4)-0.055:r*12.92;g=g>0.0031308?1.055*g**(1/2.4)-0.055:g*12.92;b=b>0.0031308?1.055*b**(1/2.4)-0.055:b*12.92;r=Math.min(Math.max(0,r),1);g=Math.min(Math.max(0,g),1);b=Math.min(Math.max(0,b),1);return[r*255,g*255,b*255]};convert$2.xyz.lab=function(xyz){let x=xyz[0];let y=xyz[1];let z=xyz[2];x/=95.047;y/=100;z/=108.883;x=x>0.008856?x**(1/3):7.787*x+16/116;y=y>0.008856?y**(1/3):7.787*y+16/116;z=z>0.008856?z**(1/3):7.787*z+16/116;const l=116*y-16;const a=500*(x-y);const b=200*(y-z);return[l,a,b]};convert$2.lab.xyz=function(lab){const l=lab[0];const a=lab[1];const b=lab[2];let x;let y;let z;y=(l+16)/116;x=a/500+y;z=y-b/200;const y2=y**3;const x2=x**3;const z2=z**3;y=y2>0.008856?y2:(y-16/116)/7.787;x=x2>0.008856?x2:(x-16/116)/7.787;z=z2>0.008856?z2:(z-16/116)/7.787;x*=95.047;y*=100;z*=108.883;return[x,y,z]};convert$2.lab.lch=function(lab){const l=lab[0];const a=lab[1];const b=lab[2];let h;const hr=Math.atan2(b,a);h=hr*360/2/Math.PI;if(h<0){h+=360}const c=Math.sqrt(a*a+b*b);return[l,c,h]};convert$2.lch.lab=function(lch){const l=lch[0];const c=lch[1];const h=lch[2];const hr=h/360*2*Math.PI;const a=c*Math.cos(hr);const b=c*Math.sin(hr);return[l,a,b]};convert$2.rgb.ansi16=function(args,saturation=null){const[r,g,b]=args;let value=saturation===null?convert$2.rgb.hsv(args)[2]:saturation;value=Math.round(value/50);if(value===0){return 30}let ansi=30+(Math.round(b/255)<<2|Math.round(g/255)<<1|Math.round(r/255));if(value===2){ansi+=60}return ansi};convert$2.hsv.ansi16=function(args){return convert$2.rgb.ansi16(convert$2.hsv.rgb(args),args[2])};convert$2.rgb.ansi256=function(args){const r=args[0];const g=args[1];const b=args[2];if(r===g&&g===b){if(r<8){return 16}if(r>248){return 231}return Math.round((r-8)/247*24)+232}const ansi=16+36*Math.round(r/255*5)+6*Math.round(g/255*5)+Math.round(b/255*5);return ansi};convert$2.ansi16.rgb=function(args){let color=args%10;if(color===0||color===7){if(args>50){color+=3.5}color=color/10.5*255;return[color,color,color]}const mult=(~~(args>50)+1)*0.5;const r=(color&1)*mult*255;const g=(color>>1&1)*mult*255;const b=(color>>2&1)*mult*255;return[r,g,b]};convert$2.ansi256.rgb=function(args){if(args>=232){const c=(args-232)*10+8;return[c,c,c]}args-=16;let rem;const r=Math.floor(args/36)/5*255;const g=Math.floor((rem=args%36)/6)/5*255;const b=rem%6/5*255;return[r,g,b]};convert$2.rgb.hex=function(args){const integer=((Math.round(args[0])&255)<<16)+((Math.round(args[1])&255)<<8)+(Math.round(args[2])&255);const string=integer.toString(16).toUpperCase();return"000000".substring(string.length)+string};convert$2.hex.rgb=function(args){const match=args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!match){return[0,0,0]}let colorString=match[0];if(match[0].length===3){colorString=colorString.split("").map(char=>{return char+char}).join("")}const integer=parseInt(colorString,16);const r=integer>>16&255;const g=integer>>8&255;const b=integer&255;return[r,g,b]};convert$2.rgb.hcg=function(rgb){const r=rgb[0]/255;const g=rgb[1]/255;const b=rgb[2]/255;const max=Math.max(Math.max(r,g),b);const min=Math.min(Math.min(r,g),b);const chroma=max-min;let grayscale;let hue;if(chroma<1){grayscale=min/(1-chroma)}else{grayscale=0}if(chroma<=0){hue=0}else if(max===r){hue=(g-b)/chroma%6}else if(max===g){hue=2+(b-r)/chroma}else{hue=4+(r-g)/chroma}hue/=6;hue%=1;return[hue*360,chroma*100,grayscale*100]};convert$2.hsl.hcg=function(hsl){const s=hsl[1]/100;const l=hsl[2]/100;const c=l<0.5?2*s*l:2*s*(1-l);let f=0;if(c<1){f=(l-0.5*c)/(1-c)}return[hsl[0],c*100,f*100]};convert$2.hsv.hcg=function(hsv){const s=hsv[1]/100;const v=hsv[2]/100;const c=s*v;let f=0;if(c<1){f=(v-c)/(1-c)}return[hsv[0],c*100,f*100]};convert$2.hcg.rgb=function(hcg){const h=hcg[0]/360;const c=hcg[1]/100;const g=hcg[2]/100;if(c===0){return[g*255,g*255,g*255]}const pure=[0,0,0];const hi=h%1*6;const v=hi%1;const w=1-v;let mg=0;switch(Math.floor(hi)){case 0:pure[0]=1;pure[1]=v;pure[2]=0;break;case 1:pure[0]=w;pure[1]=1;pure[2]=0;break;case 2:pure[0]=0;pure[1]=1;pure[2]=v;break;case 3:pure[0]=0;pure[1]=w;pure[2]=1;break;case 4:pure[0]=v;pure[1]=0;pure[2]=1;break;default:pure[0]=1;pure[1]=0;pure[2]=w;}mg=(1-c)*g;return[(c*pure[0]+mg)*255,(c*pure[1]+mg)*255,(c*pure[2]+mg)*255]};convert$2.hcg.hsv=function(hcg){const c=hcg[1]/100;const g=hcg[2]/100;const v=c+g*(1-c);let f=0;if(v>0){f=c/v}return[hcg[0],f*100,v*100]};convert$2.hcg.hsl=function(hcg){const c=hcg[1]/100;const g=hcg[2]/100;const l=g*(1-c)+0.5*c;let s=0;if(l>0&&l<0.5){s=c/(2*l)}else if(l>=0.5&&l<1){s=c/(2*(1-l))}return[hcg[0],s*100,l*100]};convert$2.hcg.hwb=function(hcg){const c=hcg[1]/100;const g=hcg[2]/100;const v=c+g*(1-c);return[hcg[0],(v-c)*100,(1-v)*100]};convert$2.hwb.hcg=function(hwb){const w=hwb[1]/100;const b=hwb[2]/100;const v=1-b;const c=v-w;let g=0;if(c<1){g=(v-c)/(1-c)}return[hwb[0],c*100,g*100]};convert$2.apple.rgb=function(apple){return[apple[0]/65535*255,apple[1]/65535*255,apple[2]/65535*255]};convert$2.rgb.apple=function(rgb){return[rgb[0]/255*65535,rgb[1]/255*65535,rgb[2]/255*65535]};convert$2.gray.rgb=function(args){return[args[0]/100*255,args[0]/100*255,args[0]/100*255]};convert$2.gray.hsl=function(args){return[0,0,args[0]]};convert$2.gray.hsv=convert$2.gray.hsl;convert$2.gray.hwb=function(gray){return[0,100,gray[0]]};convert$2.gray.cmyk=function(gray){return[0,0,0,gray[0]]};convert$2.gray.lab=function(gray){return[gray[0],0,0]};convert$2.gray.hex=function(gray){const val=Math.round(gray[0]/100*255)&255;const integer=(val<<16)+(val<<8)+val;const string=integer.toString(16).toUpperCase();return"000000".substring(string.length)+string};convert$2.rgb.gray=function(rgb){const val=(rgb[0]+rgb[1]+rgb[2])/3;return[val/255*100]};function buildGraph$1(){const graph={};const models=Object.keys(conversions$1);for(let len=models.length,i=0;i<len;i++){graph[models[i]]={distance:-1,parent:null}}return graph}function deriveBFS$1(fromModel){const graph=buildGraph$1();const queue=[fromModel];graph[fromModel].distance=0;while(queue.length){const current=queue.pop();const adjacents=Object.keys(conversions$1[current]);for(let len=adjacents.length,i=0;i<len;i++){const adjacent=adjacents[i];const node=graph[adjacent];if(node.distance===-1){node.distance=graph[current].distance+1;node.parent=current;queue.unshift(adjacent)}}}return graph}function link$1(from,to){return function(args){return to(from(args))}}function wrapConversion$1(toModel,graph){const path=[graph[toModel].parent,toModel];let fn=conversions$1[graph[toModel].parent][toModel];let cur=graph[toModel].parent;while(graph[cur].parent){path.unshift(graph[cur].parent);fn=link$1(conversions$1[graph[cur].parent][cur],fn);cur=graph[cur].parent}fn.conversion=path;return fn}var route$1=function(fromModel){const graph=deriveBFS$1(fromModel);const conversion={};const models=Object.keys(graph);for(let len=models.length,i=0;i<len;i++){const toModel=models[i];const node=graph[toModel];if(node.parent===null){continue}conversion[toModel]=wrapConversion$1(toModel,graph)}return conversion};const convert$3={};const models$1=Object.keys(conversions$1);function wrapRaw$1(fn){const wrappedFn=function(...args){const arg0=args[0];if(arg0===undefined||arg0===null){return arg0}if(arg0.length>1){args=arg0}return fn(args)};if("conversion"in fn){wrappedFn.conversion=fn.conversion}return wrappedFn}function wrapRounded$1(fn){const wrappedFn=function(...args){const arg0=args[0];if(arg0===undefined||arg0===null){return arg0}if(arg0.length>1){args=arg0}const result=fn(args);if(typeof result==="object"){for(let len=result.length,i=0;i<len;i++){result[i]=Math.round(result[i])}}return result};if("conversion"in fn){wrappedFn.conversion=fn.conversion}return wrappedFn}models$1.forEach(fromModel=>{convert$3[fromModel]={};Object.defineProperty(convert$3[fromModel],"channels",{value:conversions$1[fromModel].channels});Object.defineProperty(convert$3[fromModel],"labels",{value:conversions$1[fromModel].labels});const routes=route$1(fromModel);const routeModels=Object.keys(routes);routeModels.forEach(toModel=>{const fn=routes[toModel];convert$3[fromModel][toModel]=wrapRounded$1(fn);convert$3[fromModel][toModel].raw=wrapRaw$1(fn)})});var colorConvert$1=convert$3;var ansiStyles$1=createCommonjsModule(function(module){const wrapAnsi16=(fn,offset)=>(...args)=>{const code=fn(...args);return`\u001B[${code+offset}m`};const wrapAnsi256=(fn,offset)=>(...args)=>{const code=fn(...args);return`\u001B[${38+offset};5;${code}m`};const wrapAnsi16m=(fn,offset)=>(...args)=>{const rgb=fn(...args);return`\u001B[${38+offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`};const ansi2ansi=n=>n;const rgb2rgb=(r,g,b)=>[r,g,b];const setLazyProperty=(object,property,get)=>{Object.defineProperty(object,property,{get:()=>{const value=get();Object.defineProperty(object,property,{value,enumerable:true,configurable:true});return value},enumerable:true,configurable:true})};let colorConvert;const makeDynamicStyles=(wrap,targetSpace,identity,isBackground)=>{if(colorConvert===undefined){colorConvert=colorConvert$1}const offset=isBackground?10:0;const styles={};for(const[sourceSpace,suite]of Object.entries(colorConvert)){const name=sourceSpace==="ansi16"?"ansi":sourceSpace;if(sourceSpace===targetSpace){styles[name]=wrap(identity,offset)}else if(typeof suite==="object"){styles[name]=wrap(suite[targetSpace],offset)}}return styles};function assembleStyles(){const codes=new Map;const styles={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};styles.color.gray=styles.color.blackBright;styles.bgColor.bgGray=styles.bgColor.bgBlackBright;styles.color.grey=styles.color.blackBright;styles.bgColor.bgGrey=styles.bgColor.bgBlackBright;for(const[groupName,group]of Object.entries(styles)){for(const[styleName,style]of Object.entries(group)){styles[styleName]={open:`\u001B[${style[0]}m`,close:`\u001B[${style[1]}m`};group[styleName]=styles[styleName];codes.set(style[0],style[1])}Object.defineProperty(styles,groupName,{value:group,enumerable:false})}Object.defineProperty(styles,"codes",{value:codes,enumerable:false});styles.color.close="\x1B[39m";styles.bgColor.close="\x1B[49m";setLazyProperty(styles.color,"ansi",()=>makeDynamicStyles(wrapAnsi16,"ansi16",ansi2ansi,false));setLazyProperty(styles.color,"ansi256",()=>makeDynamicStyles(wrapAnsi256,"ansi256",ansi2ansi,false));setLazyProperty(styles.color,"ansi16m",()=>makeDynamicStyles(wrapAnsi16m,"rgb",rgb2rgb,false));setLazyProperty(styles.bgColor,"ansi",()=>makeDynamicStyles(wrapAnsi16,"ansi16",ansi2ansi,true));setLazyProperty(styles.bgColor,"ansi256",()=>makeDynamicStyles(wrapAnsi256,"ansi256",ansi2ansi,true));setLazyProperty(styles.bgColor,"ansi16m",()=>makeDynamicStyles(wrapAnsi16m,"rgb",rgb2rgb,true));return styles}Object.defineProperty(module,"exports",{enumerable:true,get:assembleStyles})});var hasFlag$1=(flag,argv=process.argv)=>{const prefix=flag.startsWith("-")?"":flag.length===1?"-":"--";const position=argv.indexOf(prefix+flag);const terminatorPosition=argv.indexOf("--");return position!==-1&&(terminatorPosition===-1||position<terminatorPosition)};const{env:env$1}=process;let forceColor$1;if(hasFlag$1("no-color")||hasFlag$1("no-colors")||hasFlag$1("color=false")||hasFlag$1("color=never")){forceColor$1=0}else if(hasFlag$1("color")||hasFlag$1("colors")||hasFlag$1("color=true")||hasFlag$1("color=always")){forceColor$1=1}if("FORCE_COLOR"in env$1){if(env$1.FORCE_COLOR==="true"){forceColor$1=1}else if(env$1.FORCE_COLOR==="false"){forceColor$1=0}else{forceColor$1=env$1.FORCE_COLOR.length===0?1:Math.min(parseInt(env$1.FORCE_COLOR,10),3)}}function translateLevel$1(level){if(level===0){return false}return{level,hasBasic:true,has256:level>=2,has16m:level>=3}}function supportsColor$1(haveStream,streamIsTTY){if(forceColor$1===0){return 0}if(hasFlag$1("color=16m")||hasFlag$1("color=full")||hasFlag$1("color=truecolor")){return 3}if(hasFlag$1("color=256")){return 2}if(haveStream&&!streamIsTTY&&forceColor$1===undefined){return 0}const min=forceColor$1||0;if(env$1.TERM==="dumb"){return min}if(process.platform==="win32"){const osRelease=os__default["default"].release().split(".");if(Number(osRelease[0])>=10&&Number(osRelease[2])>=10586){return Number(osRelease[2])>=14931?3:2}return 1}if("CI"in env$1){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(sign=>sign in env$1)||env$1.CI_NAME==="codeship"){return 1}return min}if("TEAMCITY_VERSION"in env$1){return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env$1.TEAMCITY_VERSION)?1:0}if(env$1.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in env$1){const version=parseInt((env$1.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(env$1.TERM_PROGRAM){case"iTerm.app":return version>=3?3:2;case"Apple_Terminal":return 2;}}if(/-256(color)?$/i.test(env$1.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env$1.TERM)){return 1}if("COLORTERM"in env$1){return 1}return min}function getSupportLevel$1(stream){const level=supportsColor$1(stream,stream&&stream.isTTY);return translateLevel$1(level)}var supportsColor_1$1={supportsColor:getSupportLevel$1,stdout:translateLevel$1(supportsColor$1(true,tty__default["default"].isatty(1))),stderr:translateLevel$1(supportsColor$1(true,tty__default["default"].isatty(2)))};const stringReplaceAll$2=(string,substring,replacer)=>{let index=string.indexOf(substring);if(index===-1){return string}const substringLength=substring.length;let endIndex=0;let returnValue="";do{returnValue+=string.substr(endIndex,index-endIndex)+substring+replacer;endIndex=index+substringLength;index=string.indexOf(substring,endIndex)}while(index!==-1);returnValue+=string.substr(endIndex);return returnValue};const stringEncaseCRLFWithFirstIndex$2=(string,prefix,postfix,index)=>{let endIndex=0;let returnValue="";do{const gotCR=string[index-1]==="\r";returnValue+=string.substr(endIndex,(gotCR?index-1:index)-endIndex)+prefix+(gotCR?"\r\n":"\n")+postfix;endIndex=index+1;index=string.indexOf("\n",endIndex)}while(index!==-1);returnValue+=string.substr(endIndex);return returnValue};var util$2={stringReplaceAll:stringReplaceAll$2,stringEncaseCRLFWithFirstIndex:stringEncaseCRLFWithFirstIndex$2};const TEMPLATE_REGEX$1=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;const STYLE_REGEX$1=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;const STRING_REGEX$1=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;const ESCAPE_REGEX$1=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;const ESCAPES$1=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\x0B"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function unescape$1(c){const u=c[0]==="u";const bracket=c[1]==="{";if(u&&!bracket&&c.length===5||c[0]==="x"&&c.length===3){return String.fromCharCode(parseInt(c.slice(1),16))}if(u&&bracket){return String.fromCodePoint(parseInt(c.slice(2,-1),16))}return ESCAPES$1.get(c)||c}function parseArguments$1(name,arguments_){const results=[];const chunks=arguments_.trim().split(/\s*,\s*/g);let matches;for(const chunk of chunks){const number=Number(chunk);if(!Number.isNaN(number)){results.push(number)}else if(matches=chunk.match(STRING_REGEX$1)){results.push(matches[2].replace(ESCAPE_REGEX$1,(m,escape,character)=>escape?unescape$1(escape):character))}else{throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`)}}return results}function parseStyle$1(style){STYLE_REGEX$1.lastIndex=0;const results=[];let matches;while((matches=STYLE_REGEX$1.exec(style))!==null){const name=matches[1];if(matches[2]){const args=parseArguments$1(name,matches[2]);results.push([name].concat(args))}else{results.push([name])}}return results}function buildStyle$1(chalk,styles){const enabled={};for(const layer of styles){for(const style of layer.styles){enabled[style[0]]=layer.inverse?null:style.slice(1)}}let current=chalk;for(const[styleName,styles]of Object.entries(enabled)){if(!Array.isArray(styles)){continue}if(!(styleName in current)){throw new Error(`Unknown Chalk style: ${styleName}`)}current=styles.length>0?current[styleName](...styles):current[styleName]}return current}var templates$1=(chalk,temporary)=>{const styles=[];const chunks=[];let chunk=[];temporary.replace(TEMPLATE_REGEX$1,(m,escapeCharacter,inverse,style,close,character)=>{if(escapeCharacter){chunk.push(unescape$1(escapeCharacter))}else if(style){const string=chunk.join("");chunk=[];chunks.push(styles.length===0?string:buildStyle$1(chalk,styles)(string));styles.push({inverse,styles:parseStyle$1(style)})}else if(close){if(styles.length===0){throw new Error("Found extraneous } in Chalk template literal")}chunks.push(buildStyle$1(chalk,styles)(chunk.join("")));chunk=[];styles.pop()}else{chunk.push(character)}});chunks.push(chunk.join(""));if(styles.length>0){const errMessage=`Chalk template literal is missing ${styles.length} closing bracket${styles.length===1?"":"s"} (\`}\`)`;throw new Error(errMessage)}return chunks.join("")};const{stdout:stdoutColor$1,stderr:stderrColor$1}=supportsColor_1$1;const{stringReplaceAll:stringReplaceAll$3,stringEncaseCRLFWithFirstIndex:stringEncaseCRLFWithFirstIndex$3}=util$2;const{isArray:isArray$1}=Array;const levelMapping$1=["ansi","ansi","ansi256","ansi16m"];const styles$1=Object.create(null);const applyOptions$1=(object,options={})=>{if(options.level&&!(Number.isInteger(options.level)&&options.level>=0&&options.level<=3)){throw new Error("The `level` option should be an integer from 0 to 3")}const colorLevel=stdoutColor$1?stdoutColor$1.level:0;object.level=options.level===undefined?colorLevel:options.level};class ChalkClass$1{constructor(options){return chalkFactory$1(options)}}const chalkFactory$1=options=>{const chalk={};applyOptions$1(chalk,options);chalk.template=(...arguments_)=>chalkTag$1(chalk.template,...arguments_);Object.setPrototypeOf(chalk,Chalk$1.prototype);Object.setPrototypeOf(chalk.template,chalk);chalk.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")};chalk.template.Instance=ChalkClass$1;return chalk.template};function Chalk$1(options){return chalkFactory$1(options)}for(const[styleName,style]of Object.entries(ansiStyles$1)){styles$1[styleName]={get(){const builder=createBuilder$1(this,createStyler$1(style.open,style.close,this._styler),this._isEmpty);Object.defineProperty(this,styleName,{value:builder});return builder}}}styles$1.visible={get(){const builder=createBuilder$1(this,this._styler,true);Object.defineProperty(this,"visible",{value:builder});return builder}};const usedModels$1=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const model of usedModels$1){styles$1[model]={get(){const{level}=this;return function(...arguments_){const styler=createStyler$1(ansiStyles$1.color[levelMapping$1[level]][model](...arguments_),ansiStyles$1.color.close,this._styler);return createBuilder$1(this,styler,this._isEmpty)}}}}for(const model of usedModels$1){const bgModel="bg"+model[0].toUpperCase()+model.slice(1);styles$1[bgModel]={get(){const{level}=this;return function(...arguments_){const styler=createStyler$1(ansiStyles$1.bgColor[levelMapping$1[level]][model](...arguments_),ansiStyles$1.bgColor.close,this._styler);return createBuilder$1(this,styler,this._isEmpty)}}}}const proto$1=Object.defineProperties(()=>{},{...styles$1,level:{enumerable:true,get(){return this._generator.level},set(level){this._generator.level=level}}});const createStyler$1=(open,close,parent)=>{let openAll;let closeAll;if(parent===undefined){openAll=open;closeAll=close}else{openAll=parent.openAll+open;closeAll=close+parent.closeAll}return{open,close,openAll,closeAll,parent}};const createBuilder$1=(self,_styler,_isEmpty)=>{const builder=(...arguments_)=>{if(isArray$1(arguments_[0])&&isArray$1(arguments_[0].raw)){return applyStyle$1(builder,chalkTag$1(builder,...arguments_))}return applyStyle$1(builder,arguments_.length===1?""+arguments_[0]:arguments_.join(" "))};Object.setPrototypeOf(builder,proto$1);builder._generator=self;builder._styler=_styler;builder._isEmpty=_isEmpty;return builder};const applyStyle$1=(self,string)=>{if(self.level<=0||!string){return self._isEmpty?"":string}let styler=self._styler;if(styler===undefined){return string}const{openAll,closeAll}=styler;if(string.indexOf("\x1B")!==-1){while(styler!==undefined){string=stringReplaceAll$3(string,styler.close,styler.open);styler=styler.parent}}const lfIndex=string.indexOf("\n");if(lfIndex!==-1){string=stringEncaseCRLFWithFirstIndex$3(string,closeAll,openAll,lfIndex)}return openAll+string+closeAll};let template$1;const chalkTag$1=(chalk,...strings)=>{const[firstString]=strings;if(!isArray$1(firstString)||!isArray$1(firstString.raw)){return strings.join(" ")}const arguments_=strings.slice(1);const parts=[firstString.raw[0]];for(let i=1;i<firstString.length;i++){parts.push(String(arguments_[i-1]).replace(/[{}\\]/g,"\\$&"),String(firstString.raw[i]))}if(template$1===undefined){template$1=templates$1}return template$1(chalk,parts.join(""))};Object.defineProperties(Chalk$1.prototype,styles$1);const chalk$1=Chalk$1();chalk$1.supportsColor=stdoutColor$1;chalk$1.stderr=Chalk$1({level:stderrColor$1?stderrColor$1.level:0});chalk$1.stderr.supportsColor=stderrColor$1;var source$2=chalk$1;const isSupported=process.platform!=="win32"||process.env.CI||process.env.TERM==="xterm-256color";const main={info:source$2.blue("\u2139"),success:source$2.green("\u2714"),warning:source$2.yellow("\u26A0"),error:source$2.red("\u2716")};const fallbacks={info:source$2.blue("i"),success:source$2.green("\u221A"),warning:source$2.yellow("\u203C"),error:source$2.red("\xD7")};var logSymbols=isSupported?main:fallbacks;var ansiRegex=({onlyFirst=false}={})=>{const pattern=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(pattern,onlyFirst?undefined:"g")};var stripAnsi=string=>typeof string==="string"?string.replace(ansiRegex(),""):string;var clone_1=createCommonjsModule(function(module){var clone=function(){function clone(parent,circular,depth,prototype){var filter;if(typeof circular==="object"){depth=circular.depth;prototype=circular.prototype;filter=circular.filter;circular=circular.circular}var allParents=[];var allChildren=[];var useBuffer=typeof Buffer!="undefined";if(typeof circular=="undefined")circular=true;if(typeof depth=="undefined")depth=Infinity;function _clone(parent,depth){if(parent===null)return null;if(depth==0)return parent;var child;var proto;if(typeof parent!="object"){return parent}if(clone.__isArray(parent)){child=[]}else if(clone.__isRegExp(parent)){child=new RegExp(parent.source,__getRegExpFlags(parent));if(parent.lastIndex)child.lastIndex=parent.lastIndex}else if(clone.__isDate(parent)){child=new Date(parent.getTime())}else if(useBuffer&&Buffer.isBuffer(parent)){if(Buffer.allocUnsafe){child=Buffer.allocUnsafe(parent.length)}else{child=new Buffer(parent.length)}parent.copy(child);return child}else{if(typeof prototype=="undefined"){proto=Object.getPrototypeOf(parent);child=Object.create(proto)}else{child=Object.create(prototype);proto=prototype}}if(circular){var index=allParents.indexOf(parent);if(index!=-1){return allChildren[index]}allParents.push(parent);allChildren.push(child)}for(var i in parent){var attrs;if(proto){attrs=Object.getOwnPropertyDescriptor(proto,i)}if(attrs&&attrs.set==null){continue}child[i]=_clone(parent[i],depth-1)}return child}return _clone(parent,depth)}clone.clonePrototype=function clonePrototype(parent){if(parent===null)return null;var c=function(){};c.prototype=parent;return new c};function __objToStr(o){return Object.prototype.toString.call(o)}clone.__objToStr=__objToStr;function __isDate(o){return typeof o==="object"&&__objToStr(o)==="[object Date]"}clone.__isDate=__isDate;function __isArray(o){return typeof o==="object"&&__objToStr(o)==="[object Array]"}clone.__isArray=__isArray;function __isRegExp(o){return typeof o==="object"&&__objToStr(o)==="[object RegExp]"}clone.__isRegExp=__isRegExp;function __getRegExpFlags(re){var flags="";if(re.global)flags+="g";if(re.ignoreCase)flags+="i";if(re.multiline)flags+="m";return flags}clone.__getRegExpFlags=__getRegExpFlags;return clone}();if(module.exports){module.exports=clone}});var defaults=function(options,defaults){options=options||{};Object.keys(defaults).forEach(function(key){if(typeof options[key]==="undefined"){options[key]=clone_1(defaults[key])}});return options};var combining=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];var DEFAULTS={nul:0,control:0};var wcwidth_1=function wcwidth(str){return wcswidth(str,DEFAULTS)};var config=function(opts){opts=defaults(opts||{},DEFAULTS);return function wcwidth(str){return wcswidth(str,opts)}};function wcswidth(str,opts){if(typeof str!=="string")return wcwidth(str,opts);var s=0;for(var i=0;i<str.length;i++){var n=wcwidth(str.charCodeAt(i),opts);if(n<0)return-1;s+=n}return s}function wcwidth(ucs,opts){if(ucs===0)return opts.nul;if(ucs<32||ucs>=127&&ucs<160)return opts.control;if(bisearch(ucs))return 0;return 1+(ucs>=4352&&(ucs<=4447||ucs==9001||ucs==9002||ucs>=11904&&ucs<=42191&&ucs!=12351||ucs>=44032&&ucs<=55203||ucs>=63744&&ucs<=64255||ucs>=65040&&ucs<=65049||ucs>=65072&&ucs<=65135||ucs>=65280&&ucs<=65376||ucs>=65504&&ucs<=65510||ucs>=131072&&ucs<=196605||ucs>=196608&&ucs<=262141))}function bisearch(ucs){var min=0;var max=combining.length-1;var mid;if(ucs<combining[0][0]||ucs>combining[max][1])return false;while(max>=min){mid=Math.floor((min+max)/2);if(ucs>combining[mid][1])min=mid+1;else if(ucs<combining[mid][0])max=mid-1;else return true}return false}wcwidth_1.config=config;var isInteractive=({stream=process.stdout}={})=>{return Boolean(stream&&stream.isTTY&&process.env.TERM!=="dumb"&&!("CI"in process.env))};var mute=MuteStream;function MuteStream(opts){Stream__default["default"].apply(this);opts=opts||{};this.writable=this.readable=true;this.muted=false;this.on("pipe",this._onpipe);this.replace=opts.replace;this._prompt=opts.prompt||null;this._hadControl=false}MuteStream.prototype=Object.create(Stream__default["default"].prototype);Object.defineProperty(MuteStream.prototype,"constructor",{value:MuteStream,enumerable:false});MuteStream.prototype.mute=function(){this.muted=true};MuteStream.prototype.unmute=function(){this.muted=false};Object.defineProperty(MuteStream.prototype,"_onpipe",{value:onPipe,enumerable:false,writable:true,configurable:true});function onPipe(src){this._src=src}Object.defineProperty(MuteStream.prototype,"isTTY",{get:getIsTTY,set:setIsTTY,enumerable:true,configurable:true});function getIsTTY(){return this._dest?this._dest.isTTY:this._src?this._src.isTTY:false}function setIsTTY(isTTY){Object.defineProperty(this,"isTTY",{value:isTTY,enumerable:true,writable:true,configurable:true})}Object.defineProperty(MuteStream.prototype,"rows",{get:function(){return this._dest?this._dest.rows:this._src?this._src.rows:undefined},enumerable:true,configurable:true});Object.defineProperty(MuteStream.prototype,"columns",{get:function(){return this._dest?this._dest.columns:this._src?this._src.columns:undefined},enumerable:true,configurable:true});MuteStream.prototype.pipe=function(dest,options){this._dest=dest;return Stream__default["default"].prototype.pipe.call(this,dest,options)};MuteStream.prototype.pause=function(){if(this._src)return this._src.pause()};MuteStream.prototype.resume=function(){if(this._src)return this._src.resume()};MuteStream.prototype.write=function(c){if(this.muted){if(!this.replace)return true;if(c.match(/^\u001b/)){if(c.indexOf(this._prompt)===0){c=c.substr(this._prompt.length);c=c.replace(/./g,this.replace);c=this._prompt+c}this._hadControl=true;return this.emit("data",c)}else{if(this._prompt&&this._hadControl&&c.indexOf(this._prompt)===0){this._hadControl=false;this.emit("data",this._prompt);c=c.substr(this._prompt.length)}c=c.toString().replace(/./g,this.replace)}}this.emit("data",c)};MuteStream.prototype.end=function(c){if(this.muted){if(c&&this.replace){c=c.toString().replace(/./g,this.replace)}else{c=null}}if(c)this.emit("data",c);this.emit("end")};function proxy(fn){return function(){var d=this._dest;var s=this._src;if(d&&d[fn])d[fn].apply(d,arguments);if(s&&s[fn])s[fn].apply(s,arguments)}}MuteStream.prototype.destroy=proxy("destroy");MuteStream.prototype.destroySoon=proxy("destroySoon");MuteStream.prototype.close=proxy("close");const TEXT=Symbol("text");const PREFIX_TEXT=Symbol("prefixText");const ASCII_ETX_CODE=3;class StdinDiscarder{constructor(){this.requests=0;this.mutedStream=new mute;this.mutedStream.pipe(process.stdout);this.mutedStream.mute();const self=this;this.ourEmit=function(event,data,...args){const{stdin}=process;if(self.requests>0||stdin.emit===self.ourEmit){if(event==="keypress"){return}if(event==="data"&&data.includes(ASCII_ETX_CODE)){process.emit("SIGINT")}Reflect.apply(self.oldEmit,this,[event,data,...args])}else{Reflect.apply(process.stdin.emit,this,[event,data,...args])}}}start(){this.requests++;if(this.requests===1){this.realStart()}}stop(){if(this.requests<=0){throw new Error("`stop` called more times than `start`")}this.requests--;if(this.requests===0){this.realStop()}}realStart(){if(process.platform==="win32"){return}this.rl=readline__default["default"].createInterface({input:process.stdin,output:this.mutedStream});this.rl.on("SIGINT",()=>{if(process.listenerCount("SIGINT")===0){process.emit("SIGINT")}else{this.rl.close();process.kill(process.pid,"SIGINT")}})}realStop(){if(process.platform==="win32"){return}this.rl.close();this.rl=undefined}}let stdinDiscarder;class Ora{constructor(options){if(!stdinDiscarder){stdinDiscarder=new StdinDiscarder}if(typeof options==="string"){options={text:options}}this.options={text:"",color:"cyan",stream:process.stderr,discardStdin:true,...options};this.spinner=this.options.spinner;this.color=this.options.color;this.hideCursor=this.options.hideCursor!==false;this.interval=this.options.interval||this.spinner.interval||100;this.stream=this.options.stream;this.id=undefined;this.isEnabled=typeof this.options.isEnabled==="boolean"?this.options.isEnabled:isInteractive({stream:this.stream});this.isSilent=typeof this.options.isSilent==="boolean"?this.options.isSilent:false;this.text=this.options.text;this.prefixText=this.options.prefixText;this.linesToClear=0;this.indent=this.options.indent;this.discardStdin=this.options.discardStdin;this.isDiscardingStdin=false}get indent(){return this._indent}set indent(indent=0){if(!(indent>=0&&Number.isInteger(indent))){throw new Error("The `indent` option must be an integer from 0 and up")}this._indent=indent}_updateInterval(interval){if(interval!==undefined){this.interval=interval}}get spinner(){return this._spinner}set spinner(spinner){this.frameIndex=0;if(typeof spinner==="object"){if(spinner.frames===undefined){throw new Error("The given spinner must have a `frames` property")}this._spinner=spinner}else if(process.platform==="win32"){this._spinner=cliSpinners.line}else if(spinner===undefined){this._spinner=cliSpinners.dots}else if(cliSpinners[spinner]){this._spinner=cliSpinners[spinner]}else{throw new Error(`There is no built-in spinner named '${spinner}'. See https://github.com/sindresorhus/cli-spinners/blob/master/spinners.json for a full list.`)}this._updateInterval(this._spinner.interval)}get text(){return this[TEXT]}get prefixText(){return this[PREFIX_TEXT]}get isSpinning(){return this.id!==undefined}getFullPrefixText(prefixText=this[PREFIX_TEXT],postfix=" "){if(typeof prefixText==="string"){return prefixText+postfix}if(typeof prefixText==="function"){return prefixText()+postfix}return""}updateLineCount(){const columns=this.stream.columns||80;const fullPrefixText=this.getFullPrefixText(this.prefixText,"-");this.lineCount=stripAnsi(fullPrefixText+"--"+this[TEXT]).split("\n").reduce((count,line)=>{return count+Math.max(1,Math.ceil(wcwidth_1(line)/columns))},0)}set text(value){this[TEXT]=value;this.updateLineCount()}set prefixText(value){this[PREFIX_TEXT]=value;this.updateLineCount()}get isEnabled(){return this._isEnabled&&!this.isSilent}set isEnabled(value){if(typeof value!=="boolean"){throw new TypeError("The `isEnabled` option must be a boolean")}this._isEnabled=value}get isSilent(){return this._isSilent}set isSilent(value){if(typeof value!=="boolean"){throw new TypeError("The `isSilent` option must be a boolean")}this._isSilent=value}frame(){const{frames}=this.spinner;let frame=frames[this.frameIndex];if(this.color){frame=source$1[this.color](frame)}this.frameIndex=++this.frameIndex%frames.length;const fullPrefixText=typeof this.prefixText==="string"&&this.prefixText!==""?this.prefixText+" ":"";const fullText=typeof this.text==="string"?" "+this.text:"";return fullPrefixText+frame+fullText}clear(){if(!this.isEnabled||!this.stream.isTTY){return this}for(let i=0;i<this.linesToClear;i++){if(i>0){this.stream.moveCursor(0,-1)}this.stream.clearLine();this.stream.cursorTo(this.indent)}this.linesToClear=0;return this}render(){if(this.isSilent){return this}this.clear();this.stream.write(this.frame());this.linesToClear=this.lineCount;return this}start(text){if(text){this.text=text}if(this.isSilent){return this}if(!this.isEnabled){if(this.text){this.stream.write(`- ${this.text}\n`)}return this}if(this.isSpinning){return this}if(this.hideCursor){cliCursor.hide(this.stream)}if(this.discardStdin&&process.stdin.isTTY){this.isDiscardingStdin=true;stdinDiscarder.start()}this.render();this.id=setInterval(this.render.bind(this),this.interval);return this}stop(){if(!this.isEnabled){return this}clearInterval(this.id);this.id=undefined;this.frameIndex=0;this.clear();if(this.hideCursor){cliCursor.show(this.stream)}if(this.discardStdin&&process.stdin.isTTY&&this.isDiscardingStdin){stdinDiscarder.stop();this.isDiscardingStdin=false}return this}succeed(text){return this.stopAndPersist({symbol:logSymbols.success,text})}fail(text){return this.stopAndPersist({symbol:logSymbols.error,text})}warn(text){return this.stopAndPersist({symbol:logSymbols.warning,text})}info(text){return this.stopAndPersist({symbol:logSymbols.info,text})}stopAndPersist(options={}){if(this.isSilent){return this}const prefixText=options.prefixText||this.prefixText;const text=options.text||this.text;const fullText=typeof text==="string"?" "+text:"";this.stop();this.stream.write(`${this.getFullPrefixText(prefixText," ")}${options.symbol||" "}${fullText}\n`);return this}}const oraFactory=function(options){return new Ora(options)};var ora=oraFactory;var promise=(action,options)=>{if(typeof action.then!=="function"){throw new TypeError("Parameter `action` must be a Promise")}const spinner=new Ora(options);spinner.start();(async()=>{try{await action;spinner.succeed()}catch(_){spinner.fail()}})();return spinner};ora.promise=promise;let FORCE_COLOR,NODE_DISABLE_COLORS,NO_COLOR,TERM,isTTY=true;if(typeof process!=="undefined"){({FORCE_COLOR,NODE_DISABLE_COLORS,NO_COLOR,TERM}=process.env);isTTY=process.stdout&&process.stdout.isTTY}const $={enabled:!NODE_DISABLE_COLORS&&NO_COLOR==null&&TERM!=="dumb"&&(FORCE_COLOR!=null&&FORCE_COLOR!=="0"||isTTY),reset:init(0,0),bold:init(1,22),dim:init(2,22),italic:init(3,23),underline:init(4,24),inverse:init(7,27),hidden:init(8,28),strikethrough:init(9,29),black:init(30,39),red:init(31,39),green:init(32,39),yellow:init(33,39),blue:init(34,39),magenta:init(35,39),cyan:init(36,39),white:init(37,39),gray:init(90,39),grey:init(90,39),bgBlack:init(40,49),bgRed:init(41,49),bgGreen:init(42,49),bgYellow:init(43,49),bgBlue:init(44,49),bgMagenta:init(45,49),bgCyan:init(46,49),bgWhite:init(47,49)};function run(arr,str){let i=0,tmp,beg="",end="";for(;i<arr.length;i++){tmp=arr[i];beg+=tmp.open;end+=tmp.close;if(str.includes(tmp.close)){str=str.replace(tmp.rgx,tmp.close+tmp.open)}}return beg+str+end}function chain(has,keys){let ctx={has,keys};ctx.reset=$.reset.bind(ctx);ctx.bold=$.bold.bind(ctx);ctx.dim=$.dim.bind(ctx);ctx.italic=$.italic.bind(ctx);ctx.underline=$.underline.bind(ctx);ctx.inverse=$.inverse.bind(ctx);ctx.hidden=$.hidden.bind(ctx);ctx.strikethrough=$.strikethrough.bind(ctx);ctx.black=$.black.bind(ctx);ctx.red=$.red.bind(ctx);ctx.green=$.green.bind(ctx);ctx.yellow=$.yellow.bind(ctx);ctx.blue=$.blue.bind(ctx);ctx.magenta=$.magenta.bind(ctx);ctx.cyan=$.cyan.bind(ctx);ctx.white=$.white.bind(ctx);ctx.gray=$.gray.bind(ctx);ctx.grey=$.grey.bind(ctx);ctx.bgBlack=$.bgBlack.bind(ctx);ctx.bgRed=$.bgRed.bind(ctx);ctx.bgGreen=$.bgGreen.bind(ctx);ctx.bgYellow=$.bgYellow.bind(ctx);ctx.bgBlue=$.bgBlue.bind(ctx);ctx.bgMagenta=$.bgMagenta.bind(ctx);ctx.bgCyan=$.bgCyan.bind(ctx);ctx.bgWhite=$.bgWhite.bind(ctx);return ctx}function init(open,close){let blk={open:`\x1b[${open}m`,close:`\x1b[${close}m`,rgx:new RegExp(`\\x1b\\[${close}m`,"g")};return function(txt){if(this!==void 0&&this.has!==void 0){this.has.includes(open)||(this.has.push(open),this.keys.push(blk));return txt===void 0?this:$.enabled?run(this.keys,txt+""):txt+""}return txt===void 0?chain([open],[blk]):$.enabled?run([blk],txt+""):txt+""}}function pathify(path){if(path.startsWith("file://")){path=path.slice("file://".length)}return path}function instantiateEmscriptenWasm(factory,path){return factory({locateFile(){return pathify(path)}})}var avif_node_enc=function(){return function(avif_node_enc){avif_node_enc=avif_node_enc||{};var g;g||(g=typeof avif_node_enc!=="undefined"?avif_node_enc:{});var aa,ba;g.ready=new Promise(function(a,b){aa=a;ba=b});var ca={},m;for(m in g)g.hasOwnProperty(m)&&(ca[m]=g[m]);var da="",ea,fa,ha,ia;da=__dirname+"/";ea=function(a){ha||(ha=require("fs"));ia||(ia=require("path"));a=ia.normalize(a);return ha.readFileSync(a,null)};fa=function(a){a=ea(a);a.buffer||(a=new Uint8Array(a));assert(a.buffer);return a};1<process.argv.length&&process.argv[1].replace(/\\/g,"/");process.argv.slice(2);process.on("uncaughtException",function(a){throw a});process.on("unhandledRejection",r);g.inspect=function(){return"[Emscripten Module object]"};var ja=g.print||console.log.bind(console),v=g.printErr||console.warn.bind(console);for(m in ca)ca.hasOwnProperty(m)&&(g[m]=ca[m]);ca=null;var ka=0,ma;g.wasmBinary&&(ma=g.wasmBinary);var noExitRuntime;g.noExitRuntime&&(noExitRuntime=g.noExitRuntime);"object"!==typeof WebAssembly&&r("no native wasm support detected");var x,na=!1;function assert(a,b){a||r("Assertion failed: "+b)}var oa=new TextDecoder("utf8");function pa(a){for(var b=0;a[b]&&!(NaN<=b);)++b;return oa.decode(a.subarray?a.subarray(0,b):new Uint8Array(a.slice(0,b)))}function qa(a,b){if(!a)return"";b=a+b;for(var c=a;!(c>=b)&&z[c];)++c;return oa.decode(z.subarray(a,c))}function ra(a,b,c,d){if(!(0<d))return 0;var e=c;d=c+d-1;for(var f=0;f<a.length;++f){var h=a.charCodeAt(f);if(55296<=h&&57343>=h){var k=a.charCodeAt(++f);h=65536+((h&1023)<<10)|k&1023}if(127>=h){if(c>=d)break;b[c++]=h}else{if(2047>=h){if(c+1>=d)break;b[c++]=192|h>>6}else{if(65535>=h){if(c+2>=d)break;b[c++]=224|h>>12}else{if(c+3>=d)break;b[c++]=240|h>>18;b[c++]=128|h>>12&63}b[c++]=128|h>>6&63}b[c++]=128|h&63}}b[c]=0;return c-e}function sa(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);55296<=d&&57343>=d&&(d=65536+((d&1023)<<10)|a.charCodeAt(++c)&1023);127>=d?++b:b=2047>=d?b+2:65535>=d?b+3:b+4}return b}var ta=new TextDecoder("utf-16le");function ua(a,b){var c=a>>1;for(b=c+b/2;!(c>=b)&&va[c];)++c;return ta.decode(z.subarray(a,c<<1))}function wa(a,b,c){void 0===c&&(c=2147483647);if(2>c)return 0;c-=2;var d=b;c=c<2*a.length?c/2:a.length;for(var e=0;e<c;++e)A[b>>1]=a.charCodeAt(e),b+=2;A[b>>1]=0;return b-d}function xa(a){return 2*a.length}function ya(a,b){for(var c=0,d="";!(c>=b/4);){var e=B[a+4*c>>2];if(0==e)break;++c;65536<=e?(e-=65536,d+=String.fromCharCode(55296|e>>10,56320|e&1023)):d+=String.fromCharCode(e)}return d}function za(a,b,c){void 0===c&&(c=2147483647);if(4>c)return 0;var d=b;c=d+c-4;for(var e=0;e<a.length;++e){var f=a.charCodeAt(e);if(55296<=f&&57343>=f){var h=a.charCodeAt(++e);f=65536+((f&1023)<<10)|h&1023}B[b>>2]=f;b+=4;if(b+4>c)break}B[b>>2]=0;return b-d}function Aa(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);55296<=d&&57343>=d&&++c;b+=4}return b}var C,D,z,A,va,B,F,Ba,Ca;function Da(a){C=a;g.HEAP8=D=new Int8Array(a);g.HEAP16=A=new Int16Array(a);g.HEAP32=B=new Int32Array(a);g.HEAPU8=z=new Uint8Array(a);g.HEAPU16=va=new Uint16Array(a);g.HEAPU32=F=new Uint32Array(a);g.HEAPF32=Ba=new Float32Array(a);g.HEAPF64=Ca=new Float64Array(a)}var Ea=g.INITIAL_MEMORY||16777216;g.wasmMemory?x=g.wasmMemory:x=new WebAssembly.Memory({initial:Ea/65536,maximum:32768});x&&(C=x.buffer);Ea=C.byteLength;Da(C);var G,Fa=[],Ga=[],Ha=[],Ia=[];function Ja(){var a=g.preRun.shift();Fa.unshift(a)}var H=0,La=null;g.preloadedImages={};g.preloadedAudios={};function r(a){if(g.onAbort)g.onAbort(a);v(a);na=!0;a=new WebAssembly.RuntimeError("abort("+a+"). Build with -s ASSERTIONS=1 for more info.");ba(a);throw a}function Ma(){var a=Na;return String.prototype.startsWith?a.startsWith("data:application/octet-stream;base64,"):0===a.indexOf("data:application/octet-stream;base64,")}var Na="avif_node_enc.wasm";if(!Ma()){var Oa=Na;Na=g.locateFile?g.locateFile(Oa,da):da+Oa}function Pa(){try{if(ma)return new Uint8Array(ma);if(fa)return fa(Na);throw"both async and sync fetching of the wasm failed"}catch(a){r(a)}}var I,Qa;function Ra(a){for(;0<a.length;){var b=a.shift();if("function"==typeof b)b(g);else{var c=b.Ma;"number"===typeof c?void 0===b.sa?G.get(c)():G.get(c)(b.sa):c(void 0===b.sa?null:b.sa)}}}function Sa(a,b){for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a}function Ta(a){var b="/"===a.charAt(0),c="/"===a.substr(-1);(a=Sa(a.split("/").filter(function(d){return!!d}),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a}function Ua(a){var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b}function Va(a){if("/"===a)return"/";a=Ta(a);a=a.replace(/\/$/,"");var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)}function Wa(){if("object"===typeof crypto&&"function"===typeof crypto.getRandomValues){var a=new Uint8Array(1);return function(){crypto.getRandomValues(a);return a[0]}}try{var b=require("crypto");return function(){return b.randomBytes(1)[0]}}catch(c){}return function(){r("randomDevice")}}function Xa(){for(var a="",b=!1,c=arguments.length-1;-1<=c&&!b;c--){b=0<=c?arguments[c]:"/";if("string"!==typeof b)throw new TypeError("Arguments to path.resolve must be strings");if(!b)return"";a=b+"/"+a;b="/"===b.charAt(0)}a=Sa(a.split("/").filter(function(d){return!!d}),!b).join("/");return(b?"/":"")+a||"."}var Ya=[];function Za(a,b){Ya[a]={input:[],output:[],pa:b};$a(a,ab)}var ab={open:function(a){var b=Ya[a.node.rdev];if(!b)throw new J(43);a.tty=b;a.seekable=!1},close:function(a){a.tty.pa.flush(a.tty)},flush:function(a){a.tty.pa.flush(a.tty)},read:function(a,b,c,d){if(!a.tty||!a.tty.pa.Ea)throw new J(60);for(var e=0,f=0;f<d;f++){try{var h=a.tty.pa.Ea(a.tty)}catch(k){throw new J(29)}if(void 0===h&&0===e)throw new J(6);if(null===h||void 0===h)break;e++;b[c+f]=h}e&&(a.node.timestamp=Date.now());return e},write:function(a,b,c,d){if(!a.tty||!a.tty.pa.ua)throw new J(60);try{for(var e=0;e<d;e++)a.tty.pa.ua(a.tty,b[c+e])}catch(f){throw new J(29)}d&&(a.node.timestamp=Date.now());return e}},bb={Ea:function(a){if(!a.input.length){var b=null,c=Buffer.Ka?Buffer.Ka(256):new Buffer(256),d=0;try{d=ha.readSync(process.stdin.fd,c,0,256,null)}catch(e){if(-1!=e.toString().indexOf("EOF"))d=0;else throw e}0<d?b=c.slice(0,d).toString("utf-8"):b=null;if(!b)return null;c=Array(sa(b)+1);b=ra(b,c,0,c.length);c.length=b;a.input=c}return a.input.shift()},ua:function(a,b){null===b||10===b?(ja(pa(a.output)),a.output=[]):0!=b&&a.output.push(b)},flush:function(a){a.output&&0<a.output.length&&(ja(pa(a.output)),a.output=[])}},cb={ua:function(a,b){null===b||10===b?(v(pa(a.output)),a.output=[]):0!=b&&a.output.push(b)},flush:function(a){a.output&&0<a.output.length&&(v(pa(a.output)),a.output=[])}},K={ha:null,la:function(){return K.createNode(null,"/",16895,0)},createNode:function(a,b,c,d){if(24576===(c&61440)||4096===(c&61440))throw new J(63);K.ha||(K.ha={dir:{node:{ma:K.ea.ma,ja:K.ea.ja,lookup:K.ea.lookup,qa:K.ea.qa,rename:K.ea.rename,unlink:K.ea.unlink,rmdir:K.ea.rmdir,readdir:K.ea.readdir,symlink:K.ea.symlink},stream:{oa:K.fa.oa}},file:{node:{ma:K.ea.ma,ja:K.ea.ja},stream:{oa:K.fa.oa,read:K.fa.read,write:K.fa.write,ya:K.fa.ya,Fa:K.fa.Fa,Ha:K.fa.Ha}},link:{node:{ma:K.ea.ma,ja:K.ea.ja,readlink:K.ea.readlink},stream:{}},za:{node:{ma:K.ea.ma,ja:K.ea.ja},stream:db}});c=eb(a,b,c,d);16384===(c.mode&61440)?(c.ea=K.ha.dir.node,c.fa=K.ha.dir.stream,c.da={}):32768===(c.mode&61440)?(c.ea=K.ha.file.node,c.fa=K.ha.file.stream,c.ga=0,c.da=null):40960===(c.mode&61440)?(c.ea=K.ha.link.node,c.fa=K.ha.link.stream):8192===(c.mode&61440)&&(c.ea=K.ha.za.node,c.fa=K.ha.za.stream);c.timestamp=Date.now();a&&(a.da[b]=c);return c},cb:function(a){if(a.da&&a.da.subarray){for(var b=[],c=0;c<a.ga;++c)b.push(a.da[c]);return b}return a.da},eb:function(a){return a.da?a.da.subarray?a.da.subarray(0,a.ga):new Uint8Array(a.da):new Uint8Array(0)},Aa:function(a,b){var c=a.da?a.da.length:0;c>=b||(b=Math.max(b,c*(1048576>c?2:1.125)>>>0),0!=c&&(b=Math.max(b,256)),c=a.da,a.da=new Uint8Array(b),0<a.ga&&a.da.set(c.subarray(0,a.ga),0))},Wa:function(a,b){if(a.ga!=b)if(0==b)a.da=null,a.ga=0;else{if(!a.da||a.da.subarray){var c=a.da;a.da=new Uint8Array(b);c&&a.da.set(c.subarray(0,Math.min(b,a.ga)))}else if(a.da||(a.da=[]),a.da.length>b)a.da.length=b;else for(;a.da.length<b;)a.da.push(0);a.ga=b}},ea:{ma:function(a){var b={};b.dev=8192===(a.mode&61440)?a.id:1;b.ino=a.id;b.mode=a.mode;b.nlink=1;b.uid=0;b.gid=0;b.rdev=a.rdev;16384===(a.mode&61440)?b.size=4096:32768===(a.mode&61440)?b.size=a.ga:40960===(a.mode&61440)?b.size=a.link.length:b.size=0;b.atime=new Date(a.timestamp);b.mtime=new Date(a.timestamp);b.ctime=new Date(a.timestamp);b.Ja=4096;b.blocks=Math.ceil(b.size/b.Ja);return b},ja:function(a,b){void 0!==b.mode&&(a.mode=b.mode);void 0!==b.timestamp&&(a.timestamp=b.timestamp);void 0!==b.size&&K.Wa(a,b.size)},lookup:function(){throw fb[44]},qa:function(a,b,c,d){return K.createNode(a,b,c,d)},rename:function(a,b,c){if(16384===(a.mode&61440)){try{var d=gb(b,c)}catch(f){}if(d)for(var e in d.da)throw new J(55)}delete a.parent.da[a.name];a.name=c;b.da[c]=a;a.parent=b},unlink:function(a,b){delete a.da[b]},rmdir:function(a,b){var c=gb(a,b),d;for(d in c.da)throw new J(55);delete a.da[b]},readdir:function(a){var b=[".",".."],c;for(c in a.da)a.da.hasOwnProperty(c)&&b.push(c);return b},symlink:function(a,b,c){a=K.createNode(a,b,41471,0);a.link=c;return a},readlink:function(a){if(40960!==(a.mode&61440))throw new J(28);return a.link}},fa:{read:function(a,b,c,d,e){var f=a.node.da;if(e>=a.node.ga)return 0;a=Math.min(a.node.ga-e,d);if(8<a&&f.subarray)b.set(f.subarray(e,e+a),c);else for(d=0;d<a;d++)b[c+d]=f[e+d];return a},write:function(a,b,c,d,e,f){b.buffer===D.buffer&&(f=!1);if(!d)return 0;a=a.node;a.timestamp=Date.now();if(b.subarray&&(!a.da||a.da.subarray)){if(f)return a.da=b.subarray(c,c+d),a.ga=d;if(0===a.ga&&0===e)return a.da=b.slice(c,c+d),a.ga=d;if(e+d<=a.ga)return a.da.set(b.subarray(c,c+d),e),d}K.Aa(a,e+d);if(a.da.subarray&&b.subarray)a.da.set(b.subarray(c,c+d),e);else for(f=0;f<d;f++)a.da[e+f]=b[c+f];a.ga=Math.max(a.ga,e+d);return d},oa:function(a,b,c){1===c?b+=a.position:2===c&&32768===(a.node.mode&61440)&&(b+=a.node.ga);if(0>b)throw new J(28);return b},ya:function(a,b,c){K.Aa(a.node,b+c);a.node.ga=Math.max(a.node.ga,b+c)},Fa:function(a,b,c,d,e,f){assert(0===b);if(32768!==(a.node.mode&61440))throw new J(43);a=a.node.da;if(f&2||a.buffer!==C){if(0<d||d+c<a.length)a.subarray?a=a.subarray(d,d+c):a=Array.prototype.slice.call(a,d,d+c);d=!0;f=16384*Math.ceil(c/16384);for(b=hb(f);c<f;)D[b+c++]=0;c=b;if(!c)throw new J(48);D.set(a,c)}else d=!1,c=a.byteOffset;return{ib:c,bb:d}},Ha:function(a,b,c,d,e){if(32768!==(a.node.mode&61440))throw new J(43);if(e&2)return 0;K.fa.write(a,b,0,d,c,!1);return 0}}},ib=null,jb={},kb=[],lb=1,mb=null,nb=!0,ob={},J=null,fb={};function L(a,b){a=Xa("/",a);b=b||{};if(!a)return{path:"",node:null};var c={Da:!0,va:0},d;for(d in c)void 0===b[d]&&(b[d]=c[d]);if(8<b.va)throw new J(32);a=Sa(a.split("/").filter(function(h){return!!h}),!1);var e=ib;c="/";for(d=0;d<a.length;d++){var f=d===a.length-1;if(f&&b.parent)break;e=gb(e,a[d]);c=Ta(c+"/"+a[d]);e.ra&&(!f||f&&b.Da)&&(e=e.ra.root);if(!f||b.Ca)for(f=0;40960===(e.mode&61440);)if(e=pb(c),c=Xa(Ua(c),e),e=L(c,{va:b.va}).node,40<f++)throw new J(32)}return{path:c,node:e}}function qb(a){for(var b;;){if(a===a.parent)return a=a.la.Ga,b?"/"!==a[a.length-1]?a+"/"+b:a+b:a;b=b?a.name+"/"+b:a.name;a=a.parent}}function rb(a,b){for(var c=0,d=0;d<b.length;d++)c=(c<<5)-c+b.charCodeAt(d)|0;return(a+c>>>0)%mb.length}function gb(a,b){var c;if(c=(c=sb(a,"x"))?c:a.ea.lookup?0:2)throw new J(c,a);for(c=mb[rb(a.id,b)];c;c=c.Ta){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return a.ea.lookup(a,b)}function eb(a,b,c,d){a=new tb(a,b,c,d);b=rb(a.parent.id,a.name);a.Ta=mb[b];return mb[b]=a}var ub={r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218};function vb(a){var b=["r","w","rw"][a&3];a&512&&(b+="w");return b}function sb(a,b){if(nb)return 0;if(-1===b.indexOf("r")||a.mode&292){if(-1!==b.indexOf("w")&&!(a.mode&146)||-1!==b.indexOf("x")&&!(a.mode&73))return 2}else return 2;return 0}function wb(a,b){try{return gb(a,b),20}catch(c){}return sb(a,"wx")}function xb(a){var b=4096;for(a=a||0;a<=b;a++)if(!kb[a])return a;throw new J(33)}function yb(a,b){zb||(zb=function(){},zb.prototype={});var c=new zb,d;for(d in a)c[d]=a[d];a=c;b=xb(b);a.fd=b;return kb[b]=a}var db={open:function(a){a.fa=jb[a.node.rdev].fa;a.fa.open&&a.fa.open(a)},oa:function(){throw new J(70)}};function $a(a,b){jb[a]={fa:b}}function Ab(a,b){var c="/"===b,d=!b;if(c&&ib)throw new J(10);if(!c&&!d){var e=L(b,{Da:!1});b=e.path;e=e.node;if(e.ra)throw new J(10);if(16384!==(e.mode&61440))throw new J(54)}b={type:a,hb:{},Ga:b,Sa:[]};a=a.la(b);a.la=b;b.root=a;c?ib=a:e&&(e.ra=b,e.la&&e.la.Sa.push(b))}function Bb(a,b,c){var d=L(a,{parent:!0}).node;a=Va(a);if(!a||"."===a||".."===a)throw new J(28);var e=wb(d,a);if(e)throw new J(e);if(!d.ea.qa)throw new J(63);return d.ea.qa(d,a,b,c)}function M(a){Bb(a,16895,0)}function Cb(a,b,c){"undefined"===typeof c&&(c=b,b=438);Bb(a,b|8192,c)}function Db(a,b){if(!Xa(a))throw new J(44);var c=L(b,{parent:!0}).node;if(!c)throw new J(44);b=Va(b);var d=wb(c,b);if(d)throw new J(d);if(!c.ea.symlink)throw new J(63);c.ea.symlink(c,b,a)}function pb(a){a=L(a).node;if(!a)throw new J(44);if(!a.ea.readlink)throw new J(28);return Xa(qb(a.parent),a.ea.readlink(a))}function Eb(a,b,c,d){if(""===a)throw new J(44);if("string"===typeof b){var e=ub[b];if("undefined"===typeof e)throw Error("Unknown file open mode: "+b);b=e}c=b&64?("undefined"===typeof c?438:c)&4095|32768:0;if("object"===typeof a)var f=a;else{a=Ta(a);try{f=L(a,{Ca:!(b&131072)}).node}catch(k){}}e=!1;if(b&64)if(f){if(b&128)throw new J(20)}else f=Bb(a,c,0),e=!0;if(!f)throw new J(44);8192===(f.mode&61440)&&(b&=-513);if(b&65536&&16384!==(f.mode&61440))throw new J(54);if(!e&&(c=f?40960===(f.mode&61440)?32:16384===(f.mode&61440)&&("r"!==vb(b)||b&512)?31:sb(f,vb(b)):44))throw new J(c);if(b&512){c=f;var h;"string"===typeof c?h=L(c,{Ca:!0}).node:h=c;if(!h.ea.ja)throw new J(63);if(16384===(h.mode&61440))throw new J(31);if(32768!==(h.mode&61440))throw new J(28);if(c=sb(h,"w"))throw new J(c);h.ea.ja(h,{size:0,timestamp:Date.now()})}b&=-131713;d=yb({node:f,path:qb(f),flags:b,seekable:!0,position:0,fa:f.fa,ab:[],error:!1},d);d.fa.open&&d.fa.open(d);!g.logReadFiles||b&1||(Fb||(Fb={}),a in Fb||(Fb[a]=1,v("FS.trackingDelegate error on read file: "+a)));try{ob.onOpenFile&&(f=0,1!==(b&2097155)&&(f|=1),0!==(b&2097155)&&(f|=2),ob.onOpenFile(a,f))}catch(k){v("FS.trackingDelegate['onOpenFile']('"+a+"', flags) threw an exception: "+k.message)}return d}function Gb(a,b,c){if(null===a.fd)throw new J(8);if(!a.seekable||!a.fa.oa)throw new J(70);if(0!=c&&1!=c&&2!=c)throw new J(28);a.position=a.fa.oa(a,b,c);a.ab=[]}function Hb(){J||(J=function(a,b){this.node=b;this.Xa=function(c){this.na=c};this.Xa(a);this.message="FS error"},J.prototype=Error(),J.prototype.constructor=J,[44].forEach(function(a){fb[a]=new J(a);fb[a].stack="<generic error, no stack>"}))}var Ib;function Jb(a,b){var c=0;a&&(c|=365);b&&(c|=146);return c}function Kb(a,b,c){a=Ta("/dev/"+a);var d=Jb(!!b,!!c);Lb||(Lb=64);var e=Lb++<<8|0;$a(e,{open:function(f){f.seekable=!1},close:function(){c&&c.buffer&&c.buffer.length&&c(10)},read:function(f,h,k,l){for(var n=0,p=0;p<l;p++){try{var t=b()}catch(u){throw new J(29)}if(void 0===t&&0===n)throw new J(6);if(null===t||void 0===t)break;n++;h[k+p]=t}n&&(f.node.timestamp=Date.now());return n},write:function(f,h,k,l){for(var n=0;n<l;n++)try{c(h[k+n])}catch(p){throw new J(29)}l&&(f.node.timestamp=Date.now());return n}});Cb(a,d,e)}var Lb,N={},zb,Fb,Mb=void 0;function O(){Mb+=4;return B[Mb-4>>2]}function Q(a){a=kb[a];if(!a)throw new J(8);return a}var Nb={};function Ob(a){for(;a.length;){var b=a.pop();a.pop()(b)}}function Pb(a){return this.fromWireType(F[a>>2])}var Qb={},R={},Rb={};function Sb(a){if(void 0===a)return"_unknown";a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?"_"+a:a}function Tb(a,b){a=Sb(a);return new Function("body","return function "+a+"() {\n \"use strict\"; return body.apply(this, arguments);\n};\n")(b)}function Ub(a){var b=Error,c=Tb(a,function(d){this.name=a;this.message=d;d=Error(d).stack;void 0!==d&&(this.stack=this.toString()+"\n"+d.replace(/^Error(:[^\n]*)?\n/,""))});c.prototype=Object.create(b.prototype);c.prototype.constructor=c;c.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message};return c}var Vb=void 0;function Wb(a,b,c){function d(k){k=c(k);if(k.length!==a.length)throw new Vb("Mismatched type converter count");for(var l=0;l<a.length;++l)S(a[l],k[l])}a.forEach(function(k){Rb[k]=b});var e=Array(b.length),f=[],h=0;b.forEach(function(k,l){R.hasOwnProperty(k)?e[l]=R[k]:(f.push(k),Qb.hasOwnProperty(k)||(Qb[k]=[]),Qb[k].push(function(){e[l]=R[k];++h;h===f.length&&d(e)}))});0===f.length&&d(e)}function Xb(a){switch(a){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+a);}}var Yb=void 0;function T(a){for(var b="";z[a];)b+=Yb[z[a++]];return b}var Zb=void 0;function U(a){throw new Zb(a)}function S(a,b,c){c=c||{};if(!("argPackAdvance"in b))throw new TypeError("registerType registeredInstance requires argPackAdvance");var d=b.name;a||U("type \""+d+"\" must have a positive integer typeid pointer");if(R.hasOwnProperty(a)){if(c.Qa)return;U("Cannot register type '"+d+"' twice")}R[a]=b;delete Rb[a];Qb.hasOwnProperty(a)&&(b=Qb[a],delete Qb[a],b.forEach(function(e){e()}))}var $b=[],V=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function ac(a){4<a&&0===--V[a].wa&&(V[a]=void 0,$b.push(a))}function bc(a){switch(a){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var b=$b.length?$b.pop():V.length;V[b]={wa:1,value:a};return b;}}function cc(a){if(null===a)return"null";var b=typeof a;return"object"===b||"array"===b||"function"===b?a.toString():""+a}function dc(a,b){switch(b){case 2:return function(c){return this.fromWireType(Ba[c>>2])};case 3:return function(c){return this.fromWireType(Ca[c>>3])};default:throw new TypeError("Unknown float type: "+a);}}function ec(a){var b=Function;if(!(b instanceof Function))throw new TypeError("new_ called with constructor type "+typeof b+" which is not a function");var c=Tb(b.name||"unknownFunctionName",function(){});c.prototype=b.prototype;c=new c;a=b.apply(c,a);return a instanceof Object?a:c}function fc(a,b){var c=g;if(void 0===c[a].ia){var d=c[a];c[a]=function(){c[a].ia.hasOwnProperty(arguments.length)||U("Function '"+b+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+c[a].ia+")!");return c[a].ia[arguments.length].apply(this,arguments)};c[a].ia=[];c[a].ia[d.Ia]=d}}function gc(a,b,c){g.hasOwnProperty(a)?((void 0===c||void 0!==g[a].ia&&void 0!==g[a].ia[c])&&U("Cannot register public name '"+a+"' twice"),fc(a,a),g.hasOwnProperty(c)&&U("Cannot register multiple overloads of a function with the same number of arguments ("+c+")!"),g[a].ia[c]=b):(g[a]=b,void 0!==c&&(g[a].gb=c))}function hc(a,b){for(var c=[],d=0;d<a;d++)c.push(B[(b>>2)+d]);return c}function ic(a,b){assert(0<=a.indexOf("j"),"getDynCaller should only be called with i64 sigs");var c=[];return function(){c.length=arguments.length;for(var d=0;d<arguments.length;d++)c[d]=arguments[d];var e;-1!=a.indexOf("j")?e=c&&c.length?g["dynCall_"+a].apply(null,[b].concat(c)):g["dynCall_"+a].call(null,b):e=G.get(b).apply(null,c);return e}}function jc(a,b){a=T(a);var c=-1!=a.indexOf("j")?ic(a,b):G.get(b);"function"!==typeof c&&U("unknown function pointer with signature "+a+": "+b);return c}var kc=void 0;function lc(a){a=mc(a);var b=T(a);W(a);return b}function nc(a,b){function c(f){e[f]||R[f]||(Rb[f]?Rb[f].forEach(c):(d.push(f),e[f]=!0))}var d=[],e={};b.forEach(c);throw new kc(a+": "+d.map(lc).join([", "]))}function oc(a,b,c){switch(b){case 0:return c?function(d){return D[d]}:function(d){return z[d]};case 1:return c?function(d){return A[d>>1]}:function(d){return va[d>>1]};case 2:return c?function(d){return B[d>>2]}:function(d){return F[d>>2]};default:throw new TypeError("Unknown integer type: "+a);}}var pc={};function qc(){return"object"===typeof globalThis?globalThis:Function("return this")()}function rc(a,b){var c=R[a];void 0===c&&U(b+" has unknown type "+lc(a));return c}var sc={};function tb(a,b,c,d){a||(a=this);this.parent=a;this.la=a.la;this.ra=null;this.id=lb++;this.name=b;this.mode=c;this.ea={};this.fa={};this.rdev=d}Object.defineProperties(tb.prototype,{read:{get:function(){return 365===(this.mode&365)},set:function(a){a?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146===(this.mode&146)},set:function(a){a?this.mode|=146:this.mode&=-147}}});Hb();mb=Array(4096);Ab(K,"/");M("/tmp");M("/home");M("/home/web_user");(function(){M("/dev");$a(259,{read:function(){return 0},write:function(b,c,d,e){return e}});Cb("/dev/null",259);Za(1280,bb);Za(1536,cb);Cb("/dev/tty",1280);Cb("/dev/tty1",1536);var a=Wa();Kb("random",a);Kb("urandom",a);M("/dev/shm");M("/dev/shm/tmp")})();M("/proc");M("/proc/self");M("/proc/self/fd");Ab({la:function(){var a=eb("/proc/self","fd",16895,73);a.ea={lookup:function(b,c){var d=kb[+c];if(!d)throw new J(8);b={parent:null,la:{Ga:"fake"},ea:{readlink:function(){return d.path}}};return b.parent=b}};return a}},"/proc/self/fd");Vb=g.InternalError=Ub("InternalError");for(var tc=Array(256),uc=0;256>uc;++uc)tc[uc]=String.fromCharCode(uc);Yb=tc;Zb=g.BindingError=Ub("BindingError");g.count_emval_handles=function(){for(var a=0,b=5;b<V.length;++b)void 0!==V[b]&&++a;return a};g.get_first_emval=function(){for(var a=5;a<V.length;++a)if(void 0!==V[a])return V[a];return null};kc=g.UnboundTypeError=Ub("UnboundTypeError");Ga.push({Ma:function(){vc()}});var Fc={N:function(){},s:function(a,b,c){Mb=c;try{var d=Q(a);switch(b){case 0:var e=O();return 0>e?-28:Eb(d.path,d.flags,0,e).fd;case 1:case 2:return 0;case 3:return d.flags;case 4:return e=O(),d.flags|=e,0;case 12:return e=O(),A[e+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return B[wc()>>2]=28,-1;default:return-28;}}catch(f){return"undefined"!==typeof N&&f instanceof J||r(f),-f.na}},G:function(a,b,c){Mb=c;try{var d=Q(a);switch(b){case 21509:case 21505:return d.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return d.tty?0:-59;case 21519:if(!d.tty)return-59;var e=O();return B[e>>2]=0;case 21520:return d.tty?-28:-59;case 21531:a=e=O();if(!d.fa.Ra)throw new J(59);return d.fa.Ra(d,b,a);case 21523:return d.tty?0:-59;case 21524:return d.tty?0:-59;default:r("bad ioctl syscall "+b);}}catch(f){return"undefined"!==typeof N&&f instanceof J||r(f),-f.na}},H:function(a,b,c){Mb=c;try{var d=qa(a),e=O();return Eb(d,b,e).fd}catch(f){return"undefined"!==typeof N&&f instanceof J||r(f),-f.na}},z:function(a){var b=Nb[a];delete Nb[a];var c=b.Ua,d=b.Va,e=b.Ba,f=e.map(function(h){return h.Pa}).concat(e.map(function(h){return h.Za}));Wb([a],f,function(h){var k={};e.forEach(function(l,n){var p=h[n],t=l.Na,u=l.Oa,w=h[n+e.length],q=l.Ya,E=l.$a;k[l.La]={read:function(y){return p.fromWireType(t(u,y))},write:function(y,P){var la=[];q(E,y,w.toWireType(la,P));Ob(la)}}});return[{name:b.name,fromWireType:function(l){var n={},p;for(p in k)n[p]=k[p].read(l);d(l);return n},toWireType:function(l,n){for(var p in k)if(!(p in n))throw new TypeError("Missing field: \""+p+"\"");var t=c();for(p in k)k[p].write(t,n[p]);null!==l&&l.push(d,t);return t},argPackAdvance:8,readValueFromPointer:Pb,ka:d}]})},J:function(a,b,c,d,e){var f=Xb(c);b=T(b);S(a,{name:b,fromWireType:function(h){return!!h},toWireType:function(h,k){return k?d:e},argPackAdvance:8,readValueFromPointer:function(h){if(1===c)var k=D;else if(2===c)k=A;else if(4===c)k=B;else throw new TypeError("Unknown boolean type size: "+b);return this.fromWireType(k[h>>f])},ka:null})},I:function(a,b){b=T(b);S(a,{name:b,fromWireType:function(c){var d=V[c].value;ac(c);return d},toWireType:function(c,d){return bc(d)},argPackAdvance:8,readValueFromPointer:Pb,ka:null})},v:function(a,b,c){c=Xb(c);b=T(b);S(a,{name:b,fromWireType:function(d){return d},toWireType:function(d,e){if("number"!==typeof e&&"boolean"!==typeof e)throw new TypeError("Cannot convert \""+cc(e)+"\" to "+this.name);return e},argPackAdvance:8,readValueFromPointer:dc(b,c),ka:null})},y:function(a,b,c,d,e,f){var h=hc(b,c);a=T(a);e=jc(d,e);gc(a,function(){nc("Cannot call "+a+" due to unbound types",h)},b-1);Wb([],h,function(k){var l=[k[0],null].concat(k.slice(1)),n=k=a,p=e,t=l.length;2>t&&U("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var u=null!==l[1]&&!1,w=!1,q=1;q<l.length;++q)if(null!==l[q]&&void 0===l[q].ka){w=!0;break}var E="void"!==l[0].name,y="",P="";for(q=0;q<t-2;++q)y+=(0!==q?", ":"")+"arg"+q,P+=(0!==q?", ":"")+"arg"+q+"Wired";n="return function "+Sb(n)+"("+y+") {\nif (arguments.length !== "+(t-2)+") {\nthrowBindingError('function "+n+" called with ' + arguments.length + ' arguments, expected "+(t-2)+" args!');\n}\n";w&&(n+="var destructors = [];\n");var la=w?"destructors":"null";y="throwBindingError invoker fn runDestructors retType classParam".split(" ");p=[U,p,f,Ob,l[0],l[1]];u&&(n+="var thisWired = classParam.toWireType("+la+", this);\n");for(q=0;q<t-2;++q)n+="var arg"+q+"Wired = argType"+q+".toWireType("+la+", arg"+q+"); // "+l[q+2].name+"\n",y.push("argType"+q),p.push(l[q+2]);u&&(P="thisWired"+(0<P.length?", ":"")+P);n+=(E?"var rv = ":"")+"invoker(fn"+(0<P.length?", ":"")+P+");\n";if(w)n+="runDestructors(destructors);\n";else for(q=u?1:2;q<l.length;++q)t=1===q?"thisWired":"arg"+(q-2)+"Wired",null!==l[q].ka&&(n+=t+"_dtor("+t+"); // "+l[q].name+"\n",y.push(t+"_dtor"),p.push(l[q].ka));E&&(n+="var ret = retType.fromWireType(rv);\nreturn ret;\n");y.push(n+"}\n");l=ec(y).apply(null,p);q=b-1;if(!g.hasOwnProperty(k))throw new Vb("Replacing nonexistant public symbol");void 0!==g[k].ia&&void 0!==q?g[k].ia[q]=l:(g[k]=l,g[k].Ia=q);return[]})},i:function(a,b,c,d,e){function f(n){return n}b=T(b);-1===e&&(e=4294967295);var h=Xb(c);if(0===d){var k=32-8*c;f=function(n){return n<<k>>>k}}var l=-1!=b.indexOf("unsigned");S(a,{name:b,fromWireType:f,toWireType:function(n,p){if("number"!==typeof p&&"boolean"!==typeof p)throw new TypeError("Cannot convert \""+cc(p)+"\" to "+this.name);if(p<d||p>e)throw new TypeError("Passing a number \""+cc(p)+"\" from JS side to C/C++ side to an argument of type \""+b+"\", which is outside the valid range ["+d+", "+e+"]!");return l?p>>>0:p|0},argPackAdvance:8,readValueFromPointer:oc(b,h,0!==d),ka:null})},f:function(a,b,c){function d(f){f>>=2;var h=F;return new e(C,h[f+1],h[f])}var e=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][b];c=T(c);S(a,{name:c,fromWireType:d,argPackAdvance:8,readValueFromPointer:d},{Qa:!0})},w:function(a,b){b=T(b);var c="std::string"===b;S(a,{name:b,fromWireType:function(d){var e=F[d>>2];if(c)for(var f=d+4,h=0;h<=e;++h){var k=d+4+h;if(h==e||0==z[k]){f=qa(f,k-f);if(void 0===l)var l=f;else l+=String.fromCharCode(0),l+=f;f=k+1}}else{l=Array(e);for(h=0;h<e;++h)l[h]=String.fromCharCode(z[d+4+h]);l=l.join("")}W(d);return l},toWireType:function(d,e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var f="string"===typeof e;f||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||U("Cannot pass non-string to std::string");var h=(c&&f?function(){return sa(e)}:function(){return e.length})(),k=hb(4+h+1);F[k>>2]=h;if(c&&f)ra(e,z,k+4,h+1);else if(f)for(f=0;f<h;++f){var l=e.charCodeAt(f);255<l&&(W(k),U("String has UTF-16 code units that do not fit in 8 bits"));z[k+4+f]=l}else for(f=0;f<h;++f)z[k+4+f]=e[f];null!==d&&d.push(W,k);return k},argPackAdvance:8,readValueFromPointer:Pb,ka:function(d){W(d)}})},p:function(a,b,c){c=T(c);if(2===b){var d=ua;var e=wa;var f=xa;var h=function(){return va};var k=1}else 4===b&&(d=ya,e=za,f=Aa,h=function(){return F},k=2);S(a,{name:c,fromWireType:function(l){for(var n=F[l>>2],p=h(),t,u=l+4,w=0;w<=n;++w){var q=l+4+w*b;if(w==n||0==p[q>>k])u=d(u,q-u),void 0===t?t=u:(t+=String.fromCharCode(0),t+=u),u=q+b}W(l);return t},toWireType:function(l,n){"string"!==typeof n&&U("Cannot pass non-string to C++ string type "+c);var p=f(n),t=hb(4+p+b);F[t>>2]=p>>k;e(n,t+4,p+b);null!==l&&l.push(W,t);return t},argPackAdvance:8,readValueFromPointer:Pb,ka:function(l){W(l)}})},A:function(a,b,c,d,e,f){Nb[a]={name:T(b),Ua:jc(c,d),Va:jc(e,f),Ba:[]}},j:function(a,b,c,d,e,f,h,k,l,n){Nb[a].Ba.push({La:T(b),Pa:c,Na:jc(d,e),Oa:f,Za:h,Ya:jc(k,l),$a:n})},K:function(a,b){b=T(b);S(a,{fb:!0,name:b,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},m:ac,M:function(a){if(0===a)return bc(qc());var b=pc[a];a=void 0===b?T(a):b;return bc(qc()[a])},x:function(a){4<a&&(V[a].wa+=1)},D:function(a,b,c,d){a||U("Cannot use deleted val. handle = "+a);a=V[a].value;var e=sc[b];if(!e){e="";for(var f=0;f<b;++f)e+=(0!==f?", ":"")+"arg"+f;var h="return function emval_allocator_"+b+"(constructor, argTypes, args) {\n";for(f=0;f<b;++f)h+="var argType"+f+" = requireRegisteredType(Module['HEAP32'][(argTypes >>> 2) + "+f+"], \"parameter "+f+"\");\nvar arg"+f+" = argType"+f+".readValueFromPointer(args);\nargs += argType"+f+"['argPackAdvance'];\n";e=new Function("requireRegisteredType","Module","__emval_register",h+("var obj = new constructor("+e+");\nreturn __emval_register(obj);\n}\n"))(rc,g,bc);sc[b]=e}return e(a,c,d)},h:function(){r()},e:function(a,b){X(a,b||1);throw"longjmp"},E:function(a,b,c){z.copyWithin(a,b,b+c)},k:function(a){a>>>=0;var b=z.length;if(2147483648<a)return!1;for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);d=Math.max(16777216,a,d);0<d%65536&&(d+=65536-d%65536);a:{try{x.grow(Math.min(2147483648,d)-C.byteLength+65535>>>16);Da(x.buffer);var e=1;break a}catch(f){}e=void 0}if(e)return!0}return!1},u:function(a){try{var b=Q(a);if(null===b.fd)throw new J(8);b.ta&&(b.ta=null);try{b.fa.close&&b.fa.close(b)}catch(c){throw c}finally{kb[b.fd]=null}b.fd=null;return 0}catch(c){return"undefined"!==typeof N&&c instanceof J||r(c),c.na}},F:function(a,b,c,d){try{a:{for(var e=Q(a),f=a=0;f<c;f++){var h=B[b+(8*f+4)>>2],k=e,l=B[b+8*f>>2],n=h,p=void 0,t=D;if(0>n||0>p)throw new J(28);if(null===k.fd)throw new J(8);if(1===(k.flags&2097155))throw new J(8);if(16384===(k.node.mode&61440))throw new J(31);if(!k.fa.read)throw new J(28);var u="undefined"!==typeof p;if(!u)p=k.position;else if(!k.seekable)throw new J(70);var w=k.fa.read(k,t,l,n,p);u||(k.position+=w);var q=w;if(0>q){var E=-1;break a}a+=q;if(q<h)break}E=a}B[d>>2]=E;return 0}catch(y){return"undefined"!==typeof N&&y instanceof J||r(y),y.na}},B:function(a,b,c,d,e){try{var f=Q(a);a=4294967296*c+(b>>>0);if(-9007199254740992>=a||9007199254740992<=a)return-61;Gb(f,a,d);Qa=[f.position>>>0,(I=f.position,1<=+Math.abs(I)?0<I?(Math.min(+Math.floor(I/4294967296),4294967295)|0)>>>0:~~+Math.ceil((I-+(~~I>>>0))/4294967296)>>>0:0)];B[e>>2]=Qa[0];B[e+4>>2]=Qa[1];f.ta&&0===a&&0===d&&(f.ta=null);return 0}catch(h){return"undefined"!==typeof N&&h instanceof J||r(h),h.na}},t:function(a,b,c,d){try{a:{for(var e=Q(a),f=a=0;f<c;f++){var h=e,k=B[b+8*f>>2],l=B[b+(8*f+4)>>2],n=void 0,p=D;if(0>l||0>n)throw new J(28);if(null===h.fd)throw new J(8);if(0===(h.flags&2097155))throw new J(8);if(16384===(h.node.mode&61440))throw new J(31);if(!h.fa.write)throw new J(28);h.seekable&&h.flags&1024&&Gb(h,0,2);var t="undefined"!==typeof n;if(!t)n=h.position;else if(!h.seekable)throw new J(70);var u=h.fa.write(h,p,k,l,n,void 0);t||(h.position+=u);try{if(h.path&&ob.onWriteToFile)ob.onWriteToFile(h.path)}catch(E){v("FS.trackingDelegate['onWriteToFile']('"+h.path+"') threw an exception: "+E.message)}var w=u;if(0>w){var q=-1;break a}a+=w}q=a}B[d>>2]=q;return 0}catch(E){return"undefined"!==typeof N&&E instanceof J||r(E),E.na}},c:function(){return ka|0},r:xc,C:yc,q:zc,l:Ac,o:Bc,g:Cc,d:Dc,n:Ec,a:x,b:function(a){ka=a|0},L:function(a){var b=Date.now()/1E3|0;a&&(B[a>>2]=b);return b}};(function(){function a(e){g.asm=e.exports;G=g.asm.O;H--;g.monitorRunDependencies&&g.monitorRunDependencies(H);0==H&&La&&(e=La,La=null,e())}function b(e){a(e.instance)}function c(e){return Promise.resolve().then(Pa).then(function(f){return WebAssembly.instantiate(f,d)}).then(e,function(f){v("failed to asynchronously prepare wasm: "+f);r(f)})}var d={a:Fc};H++;g.monitorRunDependencies&&g.monitorRunDependencies(H);if(g.instantiateWasm)try{return g.instantiateWasm(d,a)}catch(e){return v("Module.instantiateWasm callback failed with error: "+e),!1}(function(){return ma||"function"!==typeof WebAssembly.instantiateStreaming||Ma()||"function"!==typeof fetch?c(b):fetch(Na,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,d).then(b,function(f){v("wasm streaming compile failed: "+f);v("falling back to ArrayBuffer instantiation");return c(b)})})})().catch(ba);return{}})();var vc=g.___wasm_call_ctors=function(){return(vc=g.___wasm_call_ctors=g.asm.P).apply(null,arguments)},hb=g._malloc=function(){return(hb=g._malloc=g.asm.Q).apply(null,arguments)},W=g._free=function(){return(W=g._free=g.asm.R).apply(null,arguments)},mc=g.___getTypeName=function(){return(mc=g.___getTypeName=g.asm.S).apply(null,arguments)};g.___embind_register_native_and_builtin_types=function(){return(g.___embind_register_native_and_builtin_types=g.asm.T).apply(null,arguments)};var wc=g.___errno_location=function(){return(wc=g.___errno_location=g.asm.U).apply(null,arguments)},Y=g.stackSave=function(){return(Y=g.stackSave=g.asm.V).apply(null,arguments)},Z=g.stackRestore=function(){return(Z=g.stackRestore=g.asm.W).apply(null,arguments)},X=g._setThrew=function(){return(X=g._setThrew=g.asm.X).apply(null,arguments)};g.dynCall_jiiiiiiiii=function(){return(g.dynCall_jiiiiiiiii=g.asm.Y).apply(null,arguments)};g.dynCall_jiji=function(){return(g.dynCall_jiji=g.asm.Z).apply(null,arguments)};g.dynCall_jiiiiiiii=function(){return(g.dynCall_jiiiiiiii=g.asm._).apply(null,arguments)};g.dynCall_jiiiiii=function(){return(g.dynCall_jiiiiii=g.asm.$).apply(null,arguments)};g.dynCall_jiiiii=function(){return(g.dynCall_jiiiii=g.asm.aa).apply(null,arguments)};g.dynCall_iiijii=function(){return(g.dynCall_iiijii=g.asm.ba).apply(null,arguments)};function Bc(a,b){var c=Y();try{G.get(a)(b)}catch(d){Z(c);if(d!==d+0&&"longjmp"!==d)throw d;X(1,0)}}function Dc(a,b,c,d,e){var f=Y();try{G.get(a)(b,c,d,e)}catch(h){Z(f);if(h!==h+0&&"longjmp"!==h)throw h;X(1,0)}}function Cc(a,b,c){var d=Y();try{G.get(a)(b,c)}catch(e){Z(d);if(e!==e+0&&"longjmp"!==e)throw e;X(1,0)}}function Ac(a,b,c,d,e,f,h,k,l){var n=Y();try{return G.get(a)(b,c,d,e,f,h,k,l)}catch(p){Z(n);if(p!==p+0&&"longjmp"!==p)throw p;X(1,0)}}function xc(a,b,c){var d=Y();try{return G.get(a)(b,c)}catch(e){Z(d);if(e!==e+0&&"longjmp"!==e)throw e;X(1,0)}}function zc(a,b,c,d,e){var f=Y();try{return G.get(a)(b,c,d,e)}catch(h){Z(f);if(h!==h+0&&"longjmp"!==h)throw h;X(1,0)}}function yc(a,b,c,d){var e=Y();try{return G.get(a)(b,c,d)}catch(f){Z(e);if(f!==f+0&&"longjmp"!==f)throw f;X(1,0)}}function Ec(a,b,c,d,e,f,h,k,l,n,p){var t=Y();try{G.get(a)(b,c,d,e,f,h,k,l,n,p)}catch(u){Z(t);if(u!==u+0&&"longjmp"!==u)throw u;X(1,0)}}var Gc;La=function Hc(){Gc||Ic();Gc||(La=Hc)};function Ic(){function a(){if(!Gc&&(Gc=!0,g.calledRun=!0,!na)){g.noFSInit||Ib||(Ib=!0,Hb(),g.stdin=g.stdin,g.stdout=g.stdout,g.stderr=g.stderr,g.stdin?Kb("stdin",g.stdin):Db("/dev/tty","/dev/stdin"),g.stdout?Kb("stdout",null,g.stdout):Db("/dev/tty","/dev/stdout"),g.stderr?Kb("stderr",null,g.stderr):Db("/dev/tty1","/dev/stderr"),Eb("/dev/stdin","r"),Eb("/dev/stdout","w"),Eb("/dev/stderr","w"));Ra(Ga);nb=!1;Ra(Ha);aa(g);if(g.onRuntimeInitialized)g.onRuntimeInitialized();if(g.postRun)for("function"==typeof g.postRun&&(g.postRun=[g.postRun]);g.postRun.length;){var b=g.postRun.shift();Ia.unshift(b)}Ra(Ia)}}if(!(0<H)){if(g.preRun)for("function"==typeof g.preRun&&(g.preRun=[g.preRun]);g.preRun.length;)Ja();Ra(Fa);0<H||(g.setStatus?(g.setStatus("Running..."),setTimeout(function(){setTimeout(function(){g.setStatus("")},1);a()},1)):a())}}g.run=Ic;if(g.preInit)for("function"==typeof g.preInit&&(g.preInit=[g.preInit]);0<g.preInit.length;)g.preInit.pop()();noExitRuntime=!0;Ic();return avif_node_enc.ready}}();var avifEncWasm=typeof document==="undefined"?new(require("u"+"rl").URL)("file:"+__dirname+"/avif_node_enc-70c72c70.wasm").href:new URL("avif_node_enc-70c72c70.wasm",document.currentScript&&document.currentScript.src||document.baseURI).href;var avif_node_dec=function(){return function(avif_node_dec){avif_node_dec=avif_node_dec||{};var d;d||(d=typeof avif_node_dec!=="undefined"?avif_node_dec:{});var aa,q;d.ready=new Promise(function(a,b){aa=a;q=b});var r={},t;for(t in d)d.hasOwnProperty(t)&&(r[t]=d[t]);var u="",ba,v,w,x;u=__dirname+"/";ba=function(a){w||(w=require("fs"));x||(x=require("path"));a=x.normalize(a);return w.readFileSync(a,null)};v=function(a){a=ba(a);a.buffer||(a=new Uint8Array(a));a.buffer||y("Assertion failed: undefined");return a};1<process.argv.length&&process.argv[1].replace(/\\/g,"/");process.argv.slice(2);process.on("uncaughtException",function(a){throw a});process.on("unhandledRejection",y);d.inspect=function(){return"[Emscripten Module object]"};d.print||console.log.bind(console);var z=d.printErr||console.warn.bind(console);for(t in r)r.hasOwnProperty(t)&&(d[t]=r[t]);r=null;var A;d.wasmBinary&&(A=d.wasmBinary);var noExitRuntime;d.noExitRuntime&&(noExitRuntime=d.noExitRuntime);"object"!==typeof WebAssembly&&y("no native wasm support detected");var B,ca=!1,da=new TextDecoder("utf8");function fa(a,b,c){var e=D;if(0<c){c=b+c-1;for(var f=0;f<a.length;++f){var g=a.charCodeAt(f);if(55296<=g&&57343>=g){var h=a.charCodeAt(++f);g=65536+((g&1023)<<10)|h&1023}if(127>=g){if(b>=c)break;e[b++]=g}else{if(2047>=g){if(b+1>=c)break;e[b++]=192|g>>6}else{if(65535>=g){if(b+2>=c)break;e[b++]=224|g>>12}else{if(b+3>=c)break;e[b++]=240|g>>18;e[b++]=128|g>>12&63}e[b++]=128|g>>6&63}e[b++]=128|g&63}}e[b]=0}}var ha=new TextDecoder("utf-16le");function ia(a,b){var c=a>>1;for(b=c+b/2;!(c>=b)&&E[c];)++c;return ha.decode(D.subarray(a,c<<1))}function ja(a,b,c){void 0===c&&(c=2147483647);if(2>c)return 0;c-=2;var e=b;c=c<2*a.length?c/2:a.length;for(var f=0;f<c;++f)F[b>>1]=a.charCodeAt(f),b+=2;F[b>>1]=0;return b-e}function ka(a){return 2*a.length}function la(a,b){for(var c=0,e="";!(c>=b/4);){var f=G[a+4*c>>2];if(0==f)break;++c;65536<=f?(f-=65536,e+=String.fromCharCode(55296|f>>10,56320|f&1023)):e+=String.fromCharCode(f)}return e}function ma(a,b,c){void 0===c&&(c=2147483647);if(4>c)return 0;var e=b;c=e+c-4;for(var f=0;f<a.length;++f){var g=a.charCodeAt(f);if(55296<=g&&57343>=g){var h=a.charCodeAt(++f);g=65536+((g&1023)<<10)|h&1023}G[b>>2]=g;b+=4;if(b+4>c)break}G[b>>2]=0;return b-e}function na(a){for(var b=0,c=0;c<a.length;++c){var e=a.charCodeAt(c);55296<=e&&57343>=e&&++c;b+=4}return b}var H,I,D,F,E,G,J,oa,pa;function qa(a){H=a;d.HEAP8=I=new Int8Array(a);d.HEAP16=F=new Int16Array(a);d.HEAP32=G=new Int32Array(a);d.HEAPU8=D=new Uint8Array(a);d.HEAPU16=E=new Uint16Array(a);d.HEAPU32=J=new Uint32Array(a);d.HEAPF32=oa=new Float32Array(a);d.HEAPF64=pa=new Float64Array(a)}var ra=d.INITIAL_MEMORY||16777216;d.wasmMemory?B=d.wasmMemory:B=new WebAssembly.Memory({initial:ra/65536,maximum:32768});B&&(H=B.buffer);ra=H.byteLength;qa(H);var K,sa=[],ta=[],ua=[],va=[];function wa(){var a=d.preRun.shift();sa.unshift(a)}var L=0,N=null;d.preloadedImages={};d.preloadedAudios={};function y(a){if(d.onAbort)d.onAbort(a);z(a);ca=!0;a=new WebAssembly.RuntimeError("abort("+a+"). Build with -s ASSERTIONS=1 for more info.");q(a);throw a}function xa(){var a=P;return String.prototype.startsWith?a.startsWith("data:application/octet-stream;base64,"):0===a.indexOf("data:application/octet-stream;base64,")}var P="avif_node_dec.wasm";if(!xa()){var ya=P;P=d.locateFile?d.locateFile(ya,u):u+ya}function za(){try{if(A)return new Uint8Array(A);if(v)return v(P);throw"both async and sync fetching of the wasm failed"}catch(a){y(a)}}function Q(a){for(;0<a.length;){var b=a.shift();if("function"==typeof b)b(d);else{var c=b.v;"number"===typeof c?void 0===b.u?K.get(c)():K.get(c)(b.u):c(void 0===b.u?null:b.u)}}}function R(a){switch(a){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+a);}}var Aa=void 0;function S(a){for(var b="";D[a];)b+=Aa[D[a++]];return b}var T={},Ba={};function Da(a,b){if(void 0===a)a="_unknown";else{a=a.replace(/[^a-zA-Z0-9_]/g,"$");var c=a.charCodeAt(0);a=48<=c&&57>=c?"_"+a:a}return new Function("body","return function "+a+"() {\n \"use strict\"; return body.apply(this, arguments);\n};\n")(b)}function Ea(a){var b=Error,c=Da(a,function(e){this.name=a;this.message=e;e=Error(e).stack;void 0!==e&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))});c.prototype=Object.create(b.prototype);c.prototype.constructor=c;c.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message};return c}var Fa=void 0;function U(a){throw new Fa(a)}function V(a,b,c){c=c||{};if(!("argPackAdvance"in b))throw new TypeError("registerType registeredInstance requires argPackAdvance");var e=b.name;a||U("type \""+e+"\" must have a positive integer typeid pointer");if(Ba.hasOwnProperty(a)){if(c.A)return;U("Cannot register type '"+e+"' twice")}Ba[a]=b;T.hasOwnProperty(a)&&(b=T[a],delete T[a],b.forEach(function(f){f()}))}var Ga=[],W=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Ha(a){switch(a){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var b=Ga.length?Ga.pop():W.length;W[b]={B:1,value:a};return b;}}function Ia(a){return this.fromWireType(J[a>>2])}function Ja(a){if(null===a)return"null";var b=typeof a;return"object"===b||"array"===b||"function"===b?a.toString():""+a}function Ka(a,b){switch(b){case 2:return function(c){return this.fromWireType(oa[c>>2])};case 3:return function(c){return this.fromWireType(pa[c>>3])};default:throw new TypeError("Unknown float type: "+a);}}function La(a,b,c){switch(b){case 0:return c?function(e){return I[e]}:function(e){return D[e]};case 1:return c?function(e){return F[e>>1]}:function(e){return E[e>>1]};case 2:return c?function(e){return G[e>>2]}:function(e){return J[e>>2]};default:throw new TypeError("Unknown integer type: "+a);}}for(var Ma=Array(256),X=0;256>X;++X)Ma[X]=String.fromCharCode(X);Aa=Ma;Fa=d.BindingError=Ea("BindingError");d.InternalError=Ea("InternalError");d.count_emval_handles=function(){for(var a=0,b=5;b<W.length;++b)void 0!==W[b]&&++a;return a};d.get_first_emval=function(){for(var a=5;a<W.length;++a)if(void 0!==W[a])return W[a];return null};ta.push({v:function(){Na()}});var Pa={j:function(a,b,c,e,f){var g=R(c);b=S(b);V(a,{name:b,fromWireType:function(h){return!!h},toWireType:function(h,l){return l?e:f},argPackAdvance:8,readValueFromPointer:function(h){if(1===c)var l=I;else if(2===c)l=F;else if(4===c)l=G;else throw new TypeError("Unknown boolean type size: "+b);return this.fromWireType(l[h>>g])},s:null})},i:function(a,b){b=S(b);V(a,{name:b,fromWireType:function(c){var e=W[c].value;4<c&&0===--W[c].B&&(W[c]=void 0,Ga.push(c));return e},toWireType:function(c,e){return Ha(e)},argPackAdvance:8,readValueFromPointer:Ia,s:null})},f:function(a,b,c){c=R(c);b=S(b);V(a,{name:b,fromWireType:function(e){return e},toWireType:function(e,f){if("number"!==typeof f&&"boolean"!==typeof f)throw new TypeError("Cannot convert \""+Ja(f)+"\" to "+this.name);return f},argPackAdvance:8,readValueFromPointer:Ka(b,c),s:null})},c:function(a,b,c,e,f){function g(m){return m}b=S(b);-1===f&&(f=4294967295);var h=R(c);if(0===e){var l=32-8*c;g=function(m){return m<<l>>>l}}var p=-1!=b.indexOf("unsigned");V(a,{name:b,fromWireType:g,toWireType:function(m,k){if("number"!==typeof k&&"boolean"!==typeof k)throw new TypeError("Cannot convert \""+Ja(k)+"\" to "+this.name);if(k<e||k>f)throw new TypeError("Passing a number \""+Ja(k)+"\" from JS side to C/C++ side to an argument of type \""+b+"\", which is outside the valid range ["+e+", "+f+"]!");return p?k>>>0:k|0},argPackAdvance:8,readValueFromPointer:La(b,h,0!==e),s:null})},b:function(a,b,c){function e(g){g>>=2;var h=J;return new f(H,h[g+1],h[g])}var f=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][b];c=S(c);V(a,{name:c,fromWireType:e,argPackAdvance:8,readValueFromPointer:e},{A:!0})},g:function(a,b){b=S(b);var c="std::string"===b;V(a,{name:b,fromWireType:function(e){var f=J[e>>2];if(c)for(var g=e+4,h=0;h<=f;++h){var l=e+4+h;if(h==f||0==D[l]){if(g){for(var p=g+(l-g),m=g;!(m>=p)&&D[m];)++m;g=da.decode(D.subarray(g,m))}else g="";if(void 0===k)var k=g;else k+=String.fromCharCode(0),k+=g;g=l+1}}else{k=Array(f);for(h=0;h<f;++h)k[h]=String.fromCharCode(D[e+4+h]);k=k.join("")}Y(e);return k},toWireType:function(e,f){f instanceof ArrayBuffer&&(f=new Uint8Array(f));var g="string"===typeof f;g||f instanceof Uint8Array||f instanceof Uint8ClampedArray||f instanceof Int8Array||U("Cannot pass non-string to std::string");var h=(c&&g?function(){for(var m=0,k=0;k<f.length;++k){var n=f.charCodeAt(k);55296<=n&&57343>=n&&(n=65536+((n&1023)<<10)|f.charCodeAt(++k)&1023);127>=n?++m:m=2047>=n?m+2:65535>=n?m+3:m+4}return m}:function(){return f.length})(),l=Oa(4+h+1);J[l>>2]=h;if(c&&g)fa(f,l+4,h+1);else if(g)for(g=0;g<h;++g){var p=f.charCodeAt(g);255<p&&(Y(l),U("String has UTF-16 code units that do not fit in 8 bits"));D[l+4+g]=p}else for(g=0;g<h;++g)D[l+4+g]=f[g];null!==e&&e.push(Y,l);return l},argPackAdvance:8,readValueFromPointer:Ia,s:function(e){Y(e)}})},e:function(a,b,c){c=S(c);if(2===b){var e=ia;var f=ja;var g=ka;var h=function(){return E};var l=1}else 4===b&&(e=la,f=ma,g=na,h=function(){return J},l=2);V(a,{name:c,fromWireType:function(p){for(var m=J[p>>2],k=h(),n,C=p+4,O=0;O<=m;++O){var ea=p+4+O*b;if(O==m||0==k[ea>>l])C=e(C,ea-C),void 0===n?n=C:(n+=String.fromCharCode(0),n+=C),C=ea+b}Y(p);return n},toWireType:function(p,m){"string"!==typeof m&&U("Cannot pass non-string to C++ string type "+c);var k=g(m),n=Oa(4+k+b);J[n>>2]=k>>l;f(m,n+4,k+b);null!==p&&p.push(Y,n);return n},argPackAdvance:8,readValueFromPointer:Ia,s:function(p){Y(p)}})},k:function(a,b){b=S(b);V(a,{C:!0,name:b,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},h:function(a,b,c){D.copyWithin(a,b,b+c)},d:function(a){a>>>=0;var b=D.length;if(2147483648<a)return!1;for(var c=1;4>=c;c*=2){var e=b*(1+.2/c);e=Math.min(e,a+100663296);e=Math.max(16777216,a,e);0<e%65536&&(e+=65536-e%65536);a:{try{B.grow(Math.min(2147483648,e)-H.byteLength+65535>>>16);qa(B.buffer);var f=1;break a}catch(g){}f=void 0}if(f)return!0}return!1},a:B};(function(){function a(f){d.asm=f.exports;K=d.asm.l;L--;d.monitorRunDependencies&&d.monitorRunDependencies(L);0==L&&N&&(f=N,N=null,f())}function b(f){a(f.instance)}function c(f){return Promise.resolve().then(za).then(function(g){return WebAssembly.instantiate(g,e)}).then(f,function(g){z("failed to asynchronously prepare wasm: "+g);y(g)})}var e={a:Pa};L++;d.monitorRunDependencies&&d.monitorRunDependencies(L);if(d.instantiateWasm)try{return d.instantiateWasm(e,a)}catch(f){return z("Module.instantiateWasm callback failed with error: "+f),!1}(function(){return A||"function"!==typeof WebAssembly.instantiateStreaming||xa()||"function"!==typeof fetch?c(b):fetch(P,{credentials:"same-origin"}).then(function(f){return WebAssembly.instantiateStreaming(f,e).then(b,function(g){z("wasm streaming compile failed: "+g);z("falling back to ArrayBuffer instantiation");return c(b)})})})().catch(q);return{}})();var Na=d.___wasm_call_ctors=function(){return(Na=d.___wasm_call_ctors=d.asm.m).apply(null,arguments)};d.___getTypeName=function(){return(d.___getTypeName=d.asm.n).apply(null,arguments)};d.___embind_register_native_and_builtin_types=function(){return(d.___embind_register_native_and_builtin_types=d.asm.o).apply(null,arguments)};var Oa=d._malloc=function(){return(Oa=d._malloc=d.asm.p).apply(null,arguments)},Y=d._free=function(){return(Y=d._free=d.asm.q).apply(null,arguments)},Z;N=function Qa(){Z||Ra();Z||(N=Qa)};function Ra(){function a(){if(!Z&&(Z=!0,d.calledRun=!0,!ca)){Q(ta);Q(ua);aa(d);if(d.onRuntimeInitialized)d.onRuntimeInitialized();if(d.postRun)for("function"==typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;){var b=d.postRun.shift();va.unshift(b)}Q(va)}}if(!(0<L)){if(d.preRun)for("function"==typeof d.preRun&&(d.preRun=[d.preRun]);d.preRun.length;)wa();Q(sa);0<L||(d.setStatus?(d.setStatus("Running..."),setTimeout(function(){setTimeout(function(){d.setStatus("")},1);a()},1)):a())}}d.run=Ra;if(d.preInit)for("function"==typeof d.preInit&&(d.preInit=[d.preInit]);0<d.preInit.length;)d.preInit.pop()();noExitRuntime=!0;Ra();return avif_node_dec.ready}}();var avifDecWasm=typeof document==="undefined"?new(require("u"+"rl").URL)("file:"+__dirname+"/avif_node_dec-1a336568.wasm").href:new URL("avif_node_dec-1a336568.wasm",document.currentScript&&document.currentScript.src||document.baseURI).href;var jxl_node_enc=function(){return function(jxl_node_enc){jxl_node_enc=jxl_node_enc||{};var f;f||(f=typeof jxl_node_enc!=="undefined"?jxl_node_enc:{});var aa,ba;f.ready=new Promise(function(a,b){aa=a;ba=b});var t={},w;for(w in f)f.hasOwnProperty(w)&&(t[w]=f[w]);var ca="./this.program",da="",ea,fa,ha,ia;da=__dirname+"/";ea=function(a){ha||(ha=require("fs"));ia||(ia=require("path"));a=ia.normalize(a);return ha.readFileSync(a,null)};fa=function(a){a=ea(a);a.buffer||(a=new Uint8Array(a));a.buffer||y("Assertion failed: undefined");return a};1<process.argv.length&&(ca=process.argv[1].replace(/\\/g,"/"));process.argv.slice(2);process.on("uncaughtException",function(a){throw a});process.on("unhandledRejection",y);f.inspect=function(){return"[Emscripten Module object]"};var ja=f.print||console.log.bind(console),z=f.printErr||console.warn.bind(console);for(w in t)t.hasOwnProperty(w)&&(f[w]=t[w]);t=null;f.thisProgram&&(ca=f.thisProgram);var A;f.wasmBinary&&(A=f.wasmBinary);var noExitRuntime;f.noExitRuntime&&(noExitRuntime=f.noExitRuntime);"object"!==typeof WebAssembly&&y("no native wasm support detected");var C,ka=!1,la=new TextDecoder("utf8");function ma(a,b){if(!a)return"";b=a+b;for(var c=a;!(c>=b)&&D[c];)++c;return la.decode(D.subarray(a,c))}function na(a,b,c,d){if(0<d){d=c+d-1;for(var g=0;g<a.length;++g){var h=a.charCodeAt(g);if(55296<=h&&57343>=h){var n=a.charCodeAt(++g);h=65536+((h&1023)<<10)|n&1023}if(127>=h){if(c>=d)break;b[c++]=h}else{if(2047>=h){if(c+1>=d)break;b[c++]=192|h>>6}else{if(65535>=h){if(c+2>=d)break;b[c++]=224|h>>12}else{if(c+3>=d)break;b[c++]=240|h>>18;b[c++]=128|h>>12&63}b[c++]=128|h>>6&63}b[c++]=128|h&63}}b[c]=0}}function oa(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);55296<=d&&57343>=d&&(d=65536+((d&1023)<<10)|a.charCodeAt(++c)&1023);127>=d?++b:b=2047>=d?b+2:65535>=d?b+3:b+4}return b}var pa=new TextDecoder("utf-16le");function qa(a,b){var c=a>>1;for(b=c+b/2;!(c>=b)&&E[c];)++c;return pa.decode(D.subarray(a,c<<1))}function ra(a,b,c){void 0===c&&(c=2147483647);if(2>c)return 0;c-=2;var d=b;c=c<2*a.length?c/2:a.length;for(var g=0;g<c;++g)F[b>>1]=a.charCodeAt(g),b+=2;F[b>>1]=0;return b-d}function sa(a){return 2*a.length}function ta(a,b){for(var c=0,d="";!(c>=b/4);){var g=G[a+4*c>>2];if(0==g)break;++c;65536<=g?(g-=65536,d+=String.fromCharCode(55296|g>>10,56320|g&1023)):d+=String.fromCharCode(g)}return d}function ua(a,b,c){void 0===c&&(c=2147483647);if(4>c)return 0;var d=b;c=d+c-4;for(var g=0;g<a.length;++g){var h=a.charCodeAt(g);if(55296<=h&&57343>=h){var n=a.charCodeAt(++g);h=65536+((h&1023)<<10)|n&1023}G[b>>2]=h;b+=4;if(b+4>c)break}G[b>>2]=0;return b-d}function va(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);55296<=d&&57343>=d&&++c;b+=4}return b}var H,I,D,F,E,G,J,wa,xa;function ya(a){H=a;f.HEAP8=I=new Int8Array(a);f.HEAP16=F=new Int16Array(a);f.HEAP32=G=new Int32Array(a);f.HEAPU8=D=new Uint8Array(a);f.HEAPU16=E=new Uint16Array(a);f.HEAPU32=J=new Uint32Array(a);f.HEAPF32=wa=new Float32Array(a);f.HEAPF64=xa=new Float64Array(a)}var za=f.INITIAL_MEMORY||16777216;f.wasmMemory?C=f.wasmMemory:C=new WebAssembly.Memory({initial:za/65536,maximum:32768});C&&(H=C.buffer);za=H.byteLength;ya(H);var K,Aa=[],Ba=[],Ca=[],Da=[];function Ea(){var a=f.preRun.shift();Aa.unshift(a)}var L=0,M=null;f.preloadedImages={};f.preloadedAudios={};function y(a){if(f.onAbort)f.onAbort(a);z(a);ka=!0;a=new WebAssembly.RuntimeError("abort("+a+"). Build with -s ASSERTIONS=1 for more info.");ba(a);throw a}function Ga(){var a=N;return String.prototype.startsWith?a.startsWith("data:application/octet-stream;base64,"):0===a.indexOf("data:application/octet-stream;base64,")}var N="jxl_node_enc.wasm";if(!Ga()){var Ha=N;N=f.locateFile?f.locateFile(Ha,da):da+Ha}function Ia(){try{if(A)return new Uint8Array(A);if(fa)return fa(N);throw"both async and sync fetching of the wasm failed"}catch(a){y(a)}}function O(a){for(;0<a.length;){var b=a.shift();if("function"==typeof b)b(f);else{var c=b.ga;"number"===typeof c?void 0===b.$?K.get(c)():K.get(c)(b.$):c(void 0===b.$?null:b.$)}}}function Ja(a){this.V=a-16;this.sa=function(b){G[this.V+8>>2]=b};this.pa=function(b){G[this.V+0>>2]=b};this.qa=function(){G[this.V+4>>2]=0};this.oa=function(){I[this.V+12>>0]=0};this.ra=function(){I[this.V+13>>0]=0};this.la=function(b,c){this.sa(b);this.pa(c);this.qa();this.oa();this.ra()}}var Q={};function Ka(a){for(;a.length;){var b=a.pop();a.pop()(b)}}function La(a){return this.fromWireType(J[a>>2])}var R={},S={},Ma={};function Na(a){if(void 0===a)return"_unknown";a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?"_"+a:a}function Oa(a,b){a=Na(a);return new Function("body","return function "+a+"() {\n \"use strict\"; return body.apply(this, arguments);\n};\n")(b)}function Pa(a){var b=Error,c=Oa(a,function(d){this.name=a;this.message=d;d=Error(d).stack;void 0!==d&&(this.stack=this.toString()+"\n"+d.replace(/^Error(:[^\n]*)?\n/,""))});c.prototype=Object.create(b.prototype);c.prototype.constructor=c;c.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message};return c}var Qa=void 0;function Ra(a,b,c){function d(m){m=c(m);if(m.length!==a.length)throw new Qa("Mismatched type converter count");for(var k=0;k<a.length;++k)T(a[k],m[k])}a.forEach(function(m){Ma[m]=b});var g=Array(b.length),h=[],n=0;b.forEach(function(m,k){S.hasOwnProperty(m)?g[k]=S[m]:(h.push(m),R.hasOwnProperty(m)||(R[m]=[]),R[m].push(function(){g[k]=S[m];++n;n===h.length&&d(g)}))});0===h.length&&d(g)}function Sa(a){switch(a){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+a);}}var Ta=void 0;function V(a){for(var b="";D[a];)b+=Ta[D[a++]];return b}var Ua=void 0;function W(a){throw new Ua(a)}function T(a,b,c){c=c||{};if(!("argPackAdvance"in b))throw new TypeError("registerType registeredInstance requires argPackAdvance");var d=b.name;a||W("type \""+d+"\" must have a positive integer typeid pointer");if(S.hasOwnProperty(a)){if(c.ka)return;W("Cannot register type '"+d+"' twice")}S[a]=b;delete Ma[a];R.hasOwnProperty(a)&&(b=R[a],delete R[a],b.forEach(function(g){g()}))}var Va=[],X=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Wa(a){4<a&&0===--X[a].aa&&(X[a]=void 0,Va.push(a))}function Xa(a){switch(a){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var b=Va.length?Va.pop():X.length;X[b]={aa:1,value:a};return b;}}function Ya(a){if(null===a)return"null";var b=typeof a;return"object"===b||"array"===b||"function"===b?a.toString():""+a}function Za(a,b){switch(b){case 2:return function(c){return this.fromWireType(wa[c>>2])};case 3:return function(c){return this.fromWireType(xa[c>>3])};default:throw new TypeError("Unknown float type: "+a);}}function $a(a){var b=Function;if(!(b instanceof Function))throw new TypeError("new_ called with constructor type "+typeof b+" which is not a function");var c=Oa(b.name||"unknownFunctionName",function(){});c.prototype=b.prototype;c=new c;a=b.apply(c,a);return a instanceof Object?a:c}function ab(a,b){var c=f;if(void 0===c[a].S){var d=c[a];c[a]=function(){c[a].S.hasOwnProperty(arguments.length)||W("Function '"+b+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+c[a].S+")!");return c[a].S[arguments.length].apply(this,arguments)};c[a].S=[];c[a].S[d.ea]=d}}function bb(a,b,c){f.hasOwnProperty(a)?((void 0===c||void 0!==f[a].S&&void 0!==f[a].S[c])&&W("Cannot register public name '"+a+"' twice"),ab(a,a),f.hasOwnProperty(c)&&W("Cannot register multiple overloads of a function with the same number of arguments ("+c+")!"),f[a].S[c]=b):(f[a]=b,void 0!==c&&(f[a].Ba=c))}function cb(a,b){for(var c=[],d=0;d<a;d++)c.push(G[(b>>2)+d]);return c}function db(a,b){0<=a.indexOf("j")||y("Assertion failed: getDynCaller should only be called with i64 sigs");var c=[];return function(){c.length=arguments.length;for(var d=0;d<arguments.length;d++)c[d]=arguments[d];var g;-1!=a.indexOf("j")?g=c&&c.length?f["dynCall_"+a].apply(null,[b].concat(c)):f["dynCall_"+a].call(null,b):g=K.get(b).apply(null,c);return g}}function Y(a,b){a=V(a);var c=-1!=a.indexOf("j")?db(a,b):K.get(b);"function"!==typeof c&&W("unknown function pointer with signature "+a+": "+b);return c}var eb=void 0;function fb(a){a=gb(a);var b=V(a);Z(a);return b}function hb(a,b){function c(h){g[h]||S[h]||(Ma[h]?Ma[h].forEach(c):(d.push(h),g[h]=!0))}var d=[],g={};b.forEach(c);throw new eb(a+": "+d.map(fb).join([", "]))}function ib(a,b,c){switch(b){case 0:return c?function(d){return I[d]}:function(d){return D[d]};case 1:return c?function(d){return F[d>>1]}:function(d){return E[d>>1]};case 2:return c?function(d){return G[d>>2]}:function(d){return J[d>>2]};default:throw new TypeError("Unknown integer type: "+a);}}var jb={};function kb(){return"object"===typeof globalThis?globalThis:Function("return this")()}function lb(a,b){var c=S[a];void 0===c&&W(b+" has unknown type "+fb(a));return c}var mb={},nb={};function ob(){if(!pb){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"===typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:ca||"./this.program"},b;for(b in nb)a[b]=nb[b];var c=[];for(b in a)c.push(b+"="+a[b]);pb=c}return pb}var pb,qb=[null,[],[]];function rb(a){return 0===a%4&&(0!==a%100||0===a%400)}function sb(a,b){for(var c=0,d=0;d<=b;c+=a[d++]);return c}var tb=[31,29,31,30,31,30,31,31,30,31,30,31],ub=[31,28,31,30,31,30,31,31,30,31,30,31];function vb(a,b){for(a=new Date(a.getTime());0<b;){var c=a.getMonth(),d=(rb(a.getFullYear())?tb:ub)[c];if(b>d-a.getDate())b-=d-a.getDate()+1,a.setDate(1),11>c?a.setMonth(c+1):(a.setMonth(0),a.setFullYear(a.getFullYear()+1));else{a.setDate(a.getDate()+b);break}}return a}function wb(a,b,c,d){function g(e,l,u){for(e="number"===typeof e?e.toString():e||"";e.length<l;)e=u[0]+e;return e}function h(e,l){return g(e,l,"0")}function n(e,l){function u(B){return 0>B?-1:0<B?1:0}var v;0===(v=u(e.getFullYear()-l.getFullYear()))&&0===(v=u(e.getMonth()-l.getMonth()))&&(v=u(e.getDate()-l.getDate()));return v}function m(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30);}}function k(e){e=vb(new Date(e.R+1900,0,1),e.Z);var l=new Date(e.getFullYear()+1,0,4),u=m(new Date(e.getFullYear(),0,4));l=m(l);return 0>=n(u,e)?0>=n(l,e)?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var q=G[d+40>>2];d={ya:G[d>>2],xa:G[d+4>>2],X:G[d+8>>2],W:G[d+12>>2],U:G[d+16>>2],R:G[d+20>>2],Y:G[d+24>>2],Z:G[d+28>>2],Ca:G[d+32>>2],wa:G[d+36>>2],za:q?ma(q):""};c=ma(c);q={"%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 p in q)c=c.replace(new RegExp(p,"g"),q[p]);var r="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),x="January February March April May June July August September October November December".split(" ");q={"%a":function(e){return r[e.Y].substring(0,3)},"%A":function(e){return r[e.Y]},"%b":function(e){return x[e.U].substring(0,3)},"%B":function(e){return x[e.U]},"%C":function(e){return h((e.R+1900)/100|0,2)},"%d":function(e){return h(e.W,2)},"%e":function(e){return g(e.W,2," ")},"%g":function(e){return k(e).toString().substring(2)},"%G":function(e){return k(e)},"%H":function(e){return h(e.X,2)},"%I":function(e){e=e.X;0==e?e=12:12<e&&(e-=12);return h(e,2)},"%j":function(e){return h(e.W+sb(rb(e.R+1900)?tb:ub,e.U-1),3)},"%m":function(e){return h(e.U+1,2)},"%M":function(e){return h(e.xa,2)},"%n":function(){return"\n"},"%p":function(e){return 0<=e.X&&12>e.X?"AM":"PM"},"%S":function(e){return h(e.ya,2)},"%t":function(){return"\t"},"%u":function(e){return e.Y||7},"%U":function(e){var l=new Date(e.R+1900,0,1),u=0===l.getDay()?l:vb(l,7-l.getDay());e=new Date(e.R+1900,e.U,e.W);return 0>n(u,e)?h(Math.ceil((31-u.getDate()+(sb(rb(e.getFullYear())?tb:ub,e.getMonth()-1)-31)+e.getDate())/7),2):0===n(u,l)?"01":"00"},"%V":function(e){var l=new Date(e.R+1901,0,4),u=m(new Date(e.R+1900,0,4));l=m(l);var v=vb(new Date(e.R+1900,0,1),e.Z);return 0>n(v,u)?"53":0>=n(l,v)?"01":h(Math.ceil((u.getFullYear()<e.R+1900?e.Z+32-u.getDate():e.Z+1-u.getDate())/7),2)},"%w":function(e){return e.Y},"%W":function(e){var l=new Date(e.R,0,1),u=1===l.getDay()?l:vb(l,0===l.getDay()?1:7-l.getDay()+1);e=new Date(e.R+1900,e.U,e.W);return 0>n(u,e)?h(Math.ceil((31-u.getDate()+(sb(rb(e.getFullYear())?tb:ub,e.getMonth()-1)-31)+e.getDate())/7),2):0===n(u,l)?"01":"00"},"%y":function(e){return(e.R+1900).toString().substring(2)},"%Y":function(e){return e.R+1900},"%z":function(e){e=e.wa;var l=0<=e;e=Math.abs(e)/60;return(l?"+":"-")+String("0000"+(e/60*100+e%60)).slice(-4)},"%Z":function(e){return e.za},"%%":function(){return"%"}};for(p in q)0<=c.indexOf(p)&&(c=c.replace(new RegExp(p,"g"),q[p](d)));p=xb(c);if(p.length>b)return 0;I.set(p,a);return p.length-1}Qa=f.InternalError=Pa("InternalError");for(var yb=Array(256),zb=0;256>zb;++zb)yb[zb]=String.fromCharCode(zb);Ta=yb;Ua=f.BindingError=Pa("BindingError");f.count_emval_handles=function(){for(var a=0,b=5;b<X.length;++b)void 0!==X[b]&&++a;return a};f.get_first_emval=function(){for(var a=5;a<X.length;++a)if(void 0!==X[a])return X[a];return null};eb=f.UnboundTypeError=Pa("UnboundTypeError");function xb(a){var b=Array(oa(a)+1);na(a,b,0,b.length);return b}Ba.push({ga:function(){Ab()}});var Cb={q:function(a){return Bb(a+16)+16},D:function(){},p:function(a,b,c){new Ja(a).la(b,c);throw a},m:function(a){var b=Q[a];delete Q[a];var c=b.ma,d=b.na,g=b.ba,h=g.map(function(n){return n.ja}).concat(g.map(function(n){return n.ua}));Ra([a],h,function(n){var m={};g.forEach(function(k,q){var p=n[q],r=k.ha,x=k.ia,e=n[q+g.length],l=k.ta,u=k.va;m[k.fa]={read:function(v){return p.fromWireType(r(x,v))},write:function(v,B){var U=[];l(u,v,e.toWireType(U,B));Ka(U)}}});return[{name:b.name,fromWireType:function(k){var q={},p;for(p in m)q[p]=m[p].read(k);d(k);return q},toWireType:function(k,q){for(var p in m)if(!(p in q))throw new TypeError("Missing field: \""+p+"\"");var r=c();for(p in m)m[p].write(r,q[p]);null!==k&&k.push(d,r);return r},argPackAdvance:8,readValueFromPointer:La,T:d}]})},z:function(a,b,c,d,g){var h=Sa(c);b=V(b);T(a,{name:b,fromWireType:function(n){return!!n},toWireType:function(n,m){return m?d:g},argPackAdvance:8,readValueFromPointer:function(n){if(1===c)var m=I;else if(2===c)m=F;else if(4===c)m=G;else throw new TypeError("Unknown boolean type size: "+b);return this.fromWireType(m[n>>h])},T:null})},y:function(a,b){b=V(b);T(a,{name:b,fromWireType:function(c){var d=X[c].value;Wa(c);return d},toWireType:function(c,d){return Xa(d)},argPackAdvance:8,readValueFromPointer:La,T:null})},j:function(a,b,c){c=Sa(c);b=V(b);T(a,{name:b,fromWireType:function(d){return d},toWireType:function(d,g){if("number"!==typeof g&&"boolean"!==typeof g)throw new TypeError("Cannot convert \""+Ya(g)+"\" to "+this.name);return g},argPackAdvance:8,readValueFromPointer:Za(b,c),T:null})},l:function(a,b,c,d,g,h){var n=cb(b,c);a=V(a);g=Y(d,g);bb(a,function(){hb("Cannot call "+a+" due to unbound types",n)},b-1);Ra([],n,function(m){var k=[m[0],null].concat(m.slice(1)),q=m=a,p=g,r=k.length;2>r&&W("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var x=null!==k[1]&&!1,e=!1,l=1;l<k.length;++l)if(null!==k[l]&&void 0===k[l].T){e=!0;break}var u="void"!==k[0].name,v="",B="";for(l=0;l<r-2;++l)v+=(0!==l?", ":"")+"arg"+l,B+=(0!==l?", ":"")+"arg"+l+"Wired";q="return function "+Na(q)+"("+v+") {\nif (arguments.length !== "+(r-2)+") {\nthrowBindingError('function "+q+" called with ' + arguments.length + ' arguments, expected "+(r-2)+" args!');\n}\n";e&&(q+="var destructors = [];\n");var U=e?"destructors":"null";v="throwBindingError invoker fn runDestructors retType classParam".split(" ");p=[W,p,h,Ka,k[0],k[1]];x&&(q+="var thisWired = classParam.toWireType("+U+", this);\n");for(l=0;l<r-2;++l)q+="var arg"+l+"Wired = argType"+l+".toWireType("+U+", arg"+l+"); // "+k[l+2].name+"\n",v.push("argType"+l),p.push(k[l+2]);x&&(B="thisWired"+(0<B.length?", ":"")+B);q+=(u?"var rv = ":"")+"invoker(fn"+(0<B.length?", ":"")+B+");\n";if(e)q+="runDestructors(destructors);\n";else for(l=x?1:2;l<k.length;++l)r=1===l?"thisWired":"arg"+(l-2)+"Wired",null!==k[l].T&&(q+=r+"_dtor("+r+"); // "+k[l].name+"\n",v.push(r+"_dtor"),p.push(k[l].T));u&&(q+="var ret = retType.fromWireType(rv);\nreturn ret;\n");v.push(q+"}\n");k=$a(v).apply(null,p);l=b-1;if(!f.hasOwnProperty(m))throw new Qa("Replacing nonexistant public symbol");void 0!==f[m].S&&void 0!==l?f[m].S[l]=k:(f[m]=k,f[m].ea=l);return[]})},d:function(a,b,c,d,g){function h(q){return q}b=V(b);-1===g&&(g=4294967295);var n=Sa(c);if(0===d){var m=32-8*c;h=function(q){return q<<m>>>m}}var k=-1!=b.indexOf("unsigned");T(a,{name:b,fromWireType:h,toWireType:function(q,p){if("number"!==typeof p&&"boolean"!==typeof p)throw new TypeError("Cannot convert \""+Ya(p)+"\" to "+this.name);if(p<d||p>g)throw new TypeError("Passing a number \""+Ya(p)+"\" from JS side to C/C++ side to an argument of type \""+b+"\", which is outside the valid range ["+d+", "+g+"]!");return k?p>>>0:p|0},argPackAdvance:8,readValueFromPointer:ib(b,n,0!==d),T:null})},c:function(a,b,c){function d(h){h>>=2;var n=J;return new g(H,n[h+1],n[h])}var g=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][b];c=V(c);T(a,{name:c,fromWireType:d,argPackAdvance:8,readValueFromPointer:d},{ka:!0})},k:function(a,b){b=V(b);var c="std::string"===b;T(a,{name:b,fromWireType:function(d){var g=J[d>>2];if(c)for(var h=d+4,n=0;n<=g;++n){var m=d+4+n;if(n==g||0==D[m]){h=ma(h,m-h);if(void 0===k)var k=h;else k+=String.fromCharCode(0),k+=h;h=m+1}}else{k=Array(g);for(n=0;n<g;++n)k[n]=String.fromCharCode(D[d+4+n]);k=k.join("")}Z(d);return k},toWireType:function(d,g){g instanceof ArrayBuffer&&(g=new Uint8Array(g));var h="string"===typeof g;h||g instanceof Uint8Array||g instanceof Uint8ClampedArray||g instanceof Int8Array||W("Cannot pass non-string to std::string");var n=(c&&h?function(){return oa(g)}:function(){return g.length})(),m=Bb(4+n+1);J[m>>2]=n;if(c&&h)na(g,D,m+4,n+1);else if(h)for(h=0;h<n;++h){var k=g.charCodeAt(h);255<k&&(Z(m),W("String has UTF-16 code units that do not fit in 8 bits"));D[m+4+h]=k}else for(h=0;h<n;++h)D[m+4+h]=g[h];null!==d&&d.push(Z,m);return m},argPackAdvance:8,readValueFromPointer:La,T:function(d){Z(d)}})},h:function(a,b,c){c=V(c);if(2===b){var d=qa;var g=ra;var h=sa;var n=function(){return E};var m=1}else 4===b&&(d=ta,g=ua,h=va,n=function(){return J},m=2);T(a,{name:c,fromWireType:function(k){for(var q=J[k>>2],p=n(),r,x=k+4,e=0;e<=q;++e){var l=k+4+e*b;if(e==q||0==p[l>>m])x=d(x,l-x),void 0===r?r=x:(r+=String.fromCharCode(0),r+=x),x=l+b}Z(k);return r},toWireType:function(k,q){"string"!==typeof q&&W("Cannot pass non-string to C++ string type "+c);var p=h(q),r=Bb(4+p+b);J[r>>2]=p>>m;g(q,r+4,p+b);null!==k&&k.push(Z,r);return r},argPackAdvance:8,readValueFromPointer:La,T:function(k){Z(k)}})},n:function(a,b,c,d,g,h){Q[a]={name:V(b),ma:Y(c,d),na:Y(g,h),ba:[]}},f:function(a,b,c,d,g,h,n,m,k,q){Q[a].ba.push({fa:V(b),ja:c,ha:Y(d,g),ia:h,ua:n,ta:Y(m,k),va:q})},A:function(a,b){b=V(b);T(a,{Aa:!0,name:b,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},g:Wa,C:function(a){if(0===a)return Xa(kb());var b=jb[a];a=void 0===b?V(a):b;return Xa(kb()[a])},B:function(a){4<a&&(X[a].aa+=1)},o:function(a,b,c,d){a||W("Cannot use deleted val. handle = "+a);a=X[a].value;var g=mb[b];if(!g){g="";for(var h=0;h<b;++h)g+=(0!==h?", ":"")+"arg"+h;var n="return function emval_allocator_"+b+"(constructor, argTypes, args) {\n";for(h=0;h<b;++h)n+="var argType"+h+" = requireRegisteredType(Module['HEAP32'][(argTypes >>> 2) + "+h+"], \"parameter "+h+"\");\nvar arg"+h+" = argType"+h+".readValueFromPointer(args);\nargs += argType"+h+"['argPackAdvance'];\n";g=new Function("requireRegisteredType","Module","__emval_register",n+("var obj = new constructor("+g+");\nreturn __emval_register(obj);\n}\n"))(lb,f,Xa);mb[b]=g}return g(a,c,d)},b:function(){y()},t:function(a,b,c){D.copyWithin(a,b,b+c)},e:function(a){a>>>=0;var b=D.length;if(2147483648<a)return!1;for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);d=Math.max(16777216,a,d);0<d%65536&&(d+=65536-d%65536);a:{try{C.grow(Math.min(2147483648,d)-H.byteLength+65535>>>16);ya(C.buffer);var g=1;break a}catch(h){}g=void 0}if(g)return!0}return!1},v:function(a,b){var c=0;ob().forEach(function(d,g){var h=b+c;g=G[a+4*g>>2]=h;for(h=0;h<d.length;++h)I[g++>>0]=d.charCodeAt(h);I[g>>0]=0;c+=d.length+1});return 0},w:function(a,b){var c=ob();G[a>>2]=c.length;var d=0;c.forEach(function(g){d+=g.length+1});G[b>>2]=d;return 0},x:function(){return 0},r:function(){},i:function(a,b,c,d){for(var g=0,h=0;h<c;h++){for(var n=G[b+8*h>>2],m=G[b+(8*h+4)>>2],k=0;k<m;k++){var q=D[n+k],p=qb[a];if(0===q||10===q){q=1===a?ja:z;var r;for(r=0;p[r]&&!(NaN<=r);)++r;r=la.decode(p.subarray?p.subarray(0,r):new Uint8Array(p.slice(0,r)));q(r);p.length=0}else p.push(q)}g+=m}G[d>>2]=g;return 0},a:C,s:function(){},u:function(a,b,c,d){return wb(a,b,c,d)}};(function(){function a(g){f.asm=g.exports;K=f.asm.E;L--;f.monitorRunDependencies&&f.monitorRunDependencies(L);0==L&&M&&(g=M,M=null,g())}function b(g){a(g.instance)}function c(g){return Promise.resolve().then(Ia).then(function(h){return WebAssembly.instantiate(h,d)}).then(g,function(h){z("failed to asynchronously prepare wasm: "+h);y(h)})}var d={a:Cb};L++;f.monitorRunDependencies&&f.monitorRunDependencies(L);if(f.instantiateWasm)try{return f.instantiateWasm(d,a)}catch(g){return z("Module.instantiateWasm callback failed with error: "+g),!1}(function(){return A||"function"!==typeof WebAssembly.instantiateStreaming||Ga()||"function"!==typeof fetch?c(b):fetch(N,{credentials:"same-origin"}).then(function(g){return WebAssembly.instantiateStreaming(g,d).then(b,function(h){z("wasm streaming compile failed: "+h);z("falling back to ArrayBuffer instantiation");return c(b)})})})().catch(ba);return{}})();var Ab=f.___wasm_call_ctors=function(){return(Ab=f.___wasm_call_ctors=f.asm.F).apply(null,arguments)},Bb=f._malloc=function(){return(Bb=f._malloc=f.asm.G).apply(null,arguments)},Z=f._free=function(){return(Z=f._free=f.asm.H).apply(null,arguments)},gb=f.___getTypeName=function(){return(gb=f.___getTypeName=f.asm.I).apply(null,arguments)};f.___embind_register_native_and_builtin_types=function(){return(f.___embind_register_native_and_builtin_types=f.asm.J).apply(null,arguments)};f.dynCall_viijii=function(){return(f.dynCall_viijii=f.asm.K).apply(null,arguments)};f.dynCall_iiji=function(){return(f.dynCall_iiji=f.asm.L).apply(null,arguments)};f.dynCall_jiji=function(){return(f.dynCall_jiji=f.asm.M).apply(null,arguments)};f.dynCall_iiiiiijj=function(){return(f.dynCall_iiiiiijj=f.asm.N).apply(null,arguments)};f.dynCall_iiiiij=function(){return(f.dynCall_iiiiij=f.asm.O).apply(null,arguments)};f.dynCall_iiiiijj=function(){return(f.dynCall_iiiiijj=f.asm.P).apply(null,arguments)};var Db;M=function Eb(){Db||Fb();Db||(M=Eb)};function Fb(){function a(){if(!Db&&(Db=!0,f.calledRun=!0,!ka)){O(Ba);O(Ca);aa(f);if(f.onRuntimeInitialized)f.onRuntimeInitialized();if(f.postRun)for("function"==typeof f.postRun&&(f.postRun=[f.postRun]);f.postRun.length;){var b=f.postRun.shift();Da.unshift(b)}O(Da)}}if(!(0<L)){if(f.preRun)for("function"==typeof f.preRun&&(f.preRun=[f.preRun]);f.preRun.length;)Ea();O(Aa);0<L||(f.setStatus?(f.setStatus("Running..."),setTimeout(function(){setTimeout(function(){f.setStatus("")},1);a()},1)):a())}}f.run=Fb;if(f.preInit)for("function"==typeof f.preInit&&(f.preInit=[f.preInit]);0<f.preInit.length;)f.preInit.pop()();noExitRuntime=!0;Fb();return jxl_node_enc.ready}}();var jxlEncWasm=typeof document==="undefined"?new(require("u"+"rl").URL)("file:"+__dirname+"/jxl_node_enc-1a166bc5.wasm").href:new URL("jxl_node_enc-1a166bc5.wasm",document.currentScript&&document.currentScript.src||document.baseURI).href;var jxl_node_dec=function(){return function(jxl_node_dec){jxl_node_dec=jxl_node_dec||{};var e;e||(e=typeof jxl_node_dec!=="undefined"?jxl_node_dec:{});var aa,r;e.ready=new Promise(function(a,b){aa=a;r=b});var t={},u;for(u in e)e.hasOwnProperty(u)&&(t[u]=e[u]);var ba="./this.program",ca="",da,ea,fa,ha;ca=__dirname+"/";da=function(a){fa||(fa=require("fs"));ha||(ha=require("path"));a=ha.normalize(a);return fa.readFileSync(a,null)};ea=function(a){a=da(a);a.buffer||(a=new Uint8Array(a));a.buffer||v("Assertion failed: undefined");return a};1<process.argv.length&&(ba=process.argv[1].replace(/\\/g,"/"));process.argv.slice(2);process.on("uncaughtException",function(a){throw a});process.on("unhandledRejection",v);e.inspect=function(){return"[Emscripten Module object]"};var ia=e.print||console.log.bind(console),w=e.printErr||console.warn.bind(console);for(u in t)t.hasOwnProperty(u)&&(e[u]=t[u]);t=null;e.thisProgram&&(ba=e.thisProgram);var y;e.wasmBinary&&(y=e.wasmBinary);var noExitRuntime;e.noExitRuntime&&(noExitRuntime=e.noExitRuntime);"object"!==typeof WebAssembly&&v("no native wasm support detected");var z,ja=!1,ka=new TextDecoder("utf8");function la(a,b,c){var d=A;if(0<c){c=b+c-1;for(var f=0;f<a.length;++f){var g=a.charCodeAt(f);if(55296<=g&&57343>=g){var l=a.charCodeAt(++f);g=65536+((g&1023)<<10)|l&1023}if(127>=g){if(b>=c)break;d[b++]=g}else{if(2047>=g){if(b+1>=c)break;d[b++]=192|g>>6}else{if(65535>=g){if(b+2>=c)break;d[b++]=224|g>>12}else{if(b+3>=c)break;d[b++]=240|g>>18;d[b++]=128|g>>12&63}d[b++]=128|g>>6&63}d[b++]=128|g&63}}d[b]=0}}var ma=new TextDecoder("utf-16le");function na(a,b){var c=a>>1;for(b=c+b/2;!(c>=b)&&C[c];)++c;return ma.decode(A.subarray(a,c<<1))}function oa(a,b,c){void 0===c&&(c=2147483647);if(2>c)return 0;c-=2;var d=b;c=c<2*a.length?c/2:a.length;for(var f=0;f<c;++f)D[b>>1]=a.charCodeAt(f),b+=2;D[b>>1]=0;return b-d}function pa(a){return 2*a.length}function qa(a,b){for(var c=0,d="";!(c>=b/4);){var f=E[a+4*c>>2];if(0==f)break;++c;65536<=f?(f-=65536,d+=String.fromCharCode(55296|f>>10,56320|f&1023)):d+=String.fromCharCode(f)}return d}function ra(a,b,c){void 0===c&&(c=2147483647);if(4>c)return 0;var d=b;c=d+c-4;for(var f=0;f<a.length;++f){var g=a.charCodeAt(f);if(55296<=g&&57343>=g){var l=a.charCodeAt(++f);g=65536+((g&1023)<<10)|l&1023}E[b>>2]=g;b+=4;if(b+4>c)break}E[b>>2]=0;return b-d}function sa(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);55296<=d&&57343>=d&&++c;b+=4}return b}var F,G,A,D,C,E,I,ta,ua;function va(a){F=a;e.HEAP8=G=new Int8Array(a);e.HEAP16=D=new Int16Array(a);e.HEAP32=E=new Int32Array(a);e.HEAPU8=A=new Uint8Array(a);e.HEAPU16=C=new Uint16Array(a);e.HEAPU32=I=new Uint32Array(a);e.HEAPF32=ta=new Float32Array(a);e.HEAPF64=ua=new Float64Array(a)}var wa=e.INITIAL_MEMORY||16777216;e.wasmMemory?z=e.wasmMemory:z=new WebAssembly.Memory({initial:wa/65536,maximum:32768});z&&(F=z.buffer);wa=F.byteLength;va(F);var J,xa=[],ya=[],za=[],Aa=[];function Ba(){var a=e.preRun.shift();xa.unshift(a)}var K=0,M=null;e.preloadedImages={};e.preloadedAudios={};function v(a){if(e.onAbort)e.onAbort(a);w(a);ja=!0;a=new WebAssembly.RuntimeError("abort("+a+"). Build with -s ASSERTIONS=1 for more info.");r(a);throw a}function Da(){var a=N;return String.prototype.startsWith?a.startsWith("data:application/octet-stream;base64,"):0===a.indexOf("data:application/octet-stream;base64,")}var N="jxl_node_dec.wasm";if(!Da()){var Ea=N;N=e.locateFile?e.locateFile(Ea,ca):ca+Ea}function Fa(){try{if(y)return new Uint8Array(y);if(ea)return ea(N);throw"both async and sync fetching of the wasm failed"}catch(a){v(a)}}function O(a){for(;0<a.length;){var b=a.shift();if("function"==typeof b)b(e);else{var c=b.L;"number"===typeof c?void 0===b.I?J.get(c)():J.get(c)(b.I):c(void 0===b.I?null:b.I)}}}function Ga(a){switch(a){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+a);}}var Ha=void 0;function P(a){for(var b="";A[a];)b+=Ha[A[a++]];return b}var Q={},R={},S={};function Ia(a){if(void 0===a)return"_unknown";a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?"_"+a:a}function Ja(a,b){a=Ia(a);return new Function("body","return function "+a+"() {\n \"use strict\"; return body.apply(this, arguments);\n};\n")(b)}function Ka(a){var b=Error,c=Ja(a,function(d){this.name=a;this.message=d;d=Error(d).stack;void 0!==d&&(this.stack=this.toString()+"\n"+d.replace(/^Error(:[^\n]*)?\n/,""))});c.prototype=Object.create(b.prototype);c.prototype.constructor=c;c.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message};return c}var La=void 0;function T(a){throw new La(a)}var Ma=void 0;function Na(a,b){function c(h){h=b(h);if(h.length!==d.length)throw new Ma("Mismatched type converter count");for(var k=0;k<d.length;++k)U(d[k],h[k])}var d=[];d.forEach(function(h){S[h]=a});var f=Array(a.length),g=[],l=0;a.forEach(function(h,k){R.hasOwnProperty(h)?f[k]=R[h]:(g.push(h),Q.hasOwnProperty(h)||(Q[h]=[]),Q[h].push(function(){f[k]=R[h];++l;l===g.length&&c(f)}))});0===g.length&&c(f)}function U(a,b,c){c=c||{};if(!("argPackAdvance"in b))throw new TypeError("registerType registeredInstance requires argPackAdvance");var d=b.name;a||T("type \""+d+"\" must have a positive integer typeid pointer");if(R.hasOwnProperty(a)){if(c.M)return;T("Cannot register type '"+d+"' twice")}R[a]=b;delete S[a];Q.hasOwnProperty(a)&&(b=Q[a],delete Q[a],b.forEach(function(f){f()}))}var Oa=[],V=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Pa(a){4<a&&0===--V[a].J&&(V[a]=void 0,Oa.push(a))}function W(a){switch(a){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var b=Oa.length?Oa.pop():V.length;V[b]={J:1,value:a};return b;}}function Qa(a){return this.fromWireType(I[a>>2])}function Ta(a){if(null===a)return"null";var b=typeof a;return"object"===b||"array"===b||"function"===b?a.toString():""+a}function Ua(a,b){switch(b){case 2:return function(c){return this.fromWireType(ta[c>>2])};case 3:return function(c){return this.fromWireType(ua[c>>3])};default:throw new TypeError("Unknown float type: "+a);}}function Va(a){var b=Function;if(!(b instanceof Function))throw new TypeError("new_ called with constructor type "+typeof b+" which is not a function");var c=Ja(b.name||"unknownFunctionName",function(){});c.prototype=b.prototype;c=new c;a=b.apply(c,a);return a instanceof Object?a:c}function Wa(a){for(;a.length;){var b=a.pop();a.pop()(b)}}function Xa(a,b){var c=e;if(void 0===c[a].G){var d=c[a];c[a]=function(){c[a].G.hasOwnProperty(arguments.length)||T("Function '"+b+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+c[a].G+")!");return c[a].G[arguments.length].apply(this,arguments)};c[a].G=[];c[a].G[d.K]=d}}function Ya(a,b,c){e.hasOwnProperty(a)?((void 0===c||void 0!==e[a].G&&void 0!==e[a].G[c])&&T("Cannot register public name '"+a+"' twice"),Xa(a,a),e.hasOwnProperty(c)&&T("Cannot register multiple overloads of a function with the same number of arguments ("+c+")!"),e[a].G[c]=b):(e[a]=b,void 0!==c&&(e[a].O=c))}function Za(a,b){for(var c=[],d=0;d<a;d++)c.push(E[(b>>2)+d]);return c}function $a(a,b){0<=a.indexOf("j")||v("Assertion failed: getDynCaller should only be called with i64 sigs");var c=[];return function(){c.length=arguments.length;for(var d=0;d<arguments.length;d++)c[d]=arguments[d];var f;-1!=a.indexOf("j")?f=c&&c.length?e["dynCall_"+a].apply(null,[b].concat(c)):e["dynCall_"+a].call(null,b):f=J.get(b).apply(null,c);return f}}function ab(a,b){a=P(a);var c=-1!=a.indexOf("j")?$a(a,b):J.get(b);"function"!==typeof c&&T("unknown function pointer with signature "+a+": "+b);return c}var bb=void 0;function cb(a){a=db(a);var b=P(a);X(a);return b}function eb(a,b){function c(g){f[g]||R[g]||(S[g]?S[g].forEach(c):(d.push(g),f[g]=!0))}var d=[],f={};b.forEach(c);throw new bb(a+": "+d.map(cb).join([", "]))}function fb(a,b,c){switch(b){case 0:return c?function(d){return G[d]}:function(d){return A[d]};case 1:return c?function(d){return D[d>>1]}:function(d){return C[d>>1]};case 2:return c?function(d){return E[d>>2]}:function(d){return I[d>>2]};default:throw new TypeError("Unknown integer type: "+a);}}var gb={};function hb(){return"object"===typeof globalThis?globalThis:Function("return this")()}function ib(a,b){var c=R[a];void 0===c&&T(b+" has unknown type "+cb(a));return c}var jb={},kb={};function lb(){if(!mb){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"===typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:ba||"./this.program"},b;for(b in kb)a[b]=kb[b];var c=[];for(b in a)c.push(b+"="+a[b]);mb=c}return mb}for(var mb,nb=[null,[],[]],ob=Array(256),Y=0;256>Y;++Y)ob[Y]=String.fromCharCode(Y);Ha=ob;La=e.BindingError=Ka("BindingError");Ma=e.InternalError=Ka("InternalError");e.count_emval_handles=function(){for(var a=0,b=5;b<V.length;++b)void 0!==V[b]&&++a;return a};e.get_first_emval=function(){for(var a=5;a<V.length;++a)if(void 0!==V[a])return V[a];return null};bb=e.UnboundTypeError=Ka("UnboundTypeError");ya.push({L:function(){pb()}});var rb={h:function(){},o:function(a,b,c,d,f){var g=Ga(c);b=P(b);U(a,{name:b,fromWireType:function(l){return!!l},toWireType:function(l,h){return h?d:f},argPackAdvance:8,readValueFromPointer:function(l){if(1===c)var h=G;else if(2===c)h=D;else if(4===c)h=E;else throw new TypeError("Unknown boolean type size: "+b);return this.fromWireType(h[l>>g])},H:null})},x:function(a,b){b=P(b);U(a,{name:b,fromWireType:function(c){var d=V[c].value;Pa(c);return d},toWireType:function(c,d){return W(d)},argPackAdvance:8,readValueFromPointer:Qa,H:null})},n:function(a,b,c){c=Ga(c);b=P(b);U(a,{name:b,fromWireType:function(d){return d},toWireType:function(d,f){if("number"!==typeof f&&"boolean"!==typeof f)throw new TypeError("Cannot convert \""+Ta(f)+"\" to "+this.name);return f},argPackAdvance:8,readValueFromPointer:Ua(b,c),H:null})},q:function(a,b,c,d,f,g){var l=Za(b,c);a=P(a);f=ab(d,f);Ya(a,function(){eb("Cannot call "+a+" due to unbound types",l)},b-1);Na(l,function(h){var k=[h[0],null].concat(h.slice(1)),m=h=a,n=f,p=k.length;2>p&&T("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var x=null!==k[1]&&!1,B=!1,q=1;q<k.length;++q)if(null!==k[q]&&void 0===k[q].H){B=!0;break}var Ra="void"!==k[0].name,H="",L="";for(q=0;q<p-2;++q)H+=(0!==q?", ":"")+"arg"+q,L+=(0!==q?", ":"")+"arg"+q+"Wired";m="return function "+Ia(m)+"("+H+") {\nif (arguments.length !== "+(p-2)+") {\nthrowBindingError('function "+m+" called with ' + arguments.length + ' arguments, expected "+(p-2)+" args!');\n}\n";B&&(m+="var destructors = [];\n");var Sa=B?"destructors":"null";H="throwBindingError invoker fn runDestructors retType classParam".split(" ");n=[T,n,g,Wa,k[0],k[1]];x&&(m+="var thisWired = classParam.toWireType("+Sa+", this);\n");for(q=0;q<p-2;++q)m+="var arg"+q+"Wired = argType"+q+".toWireType("+Sa+", arg"+q+"); // "+k[q+2].name+"\n",H.push("argType"+q),n.push(k[q+2]);x&&(L="thisWired"+(0<L.length?", ":"")+L);m+=(Ra?"var rv = ":"")+"invoker(fn"+(0<L.length?", ":"")+L+");\n";if(B)m+="runDestructors(destructors);\n";else for(q=x?1:2;q<k.length;++q)p=1===q?"thisWired":"arg"+(q-2)+"Wired",null!==k[q].H&&(m+=p+"_dtor("+p+"); // "+k[q].name+"\n",H.push(p+"_dtor"),n.push(k[q].H));Ra&&(m+="var ret = retType.fromWireType(rv);\nreturn ret;\n");H.push(m+"}\n");k=Va(H).apply(null,n);q=b-1;if(!e.hasOwnProperty(h))throw new Ma("Replacing nonexistant public symbol");void 0!==e[h].G&&void 0!==q?e[h].G[q]=k:(e[h]=k,e[h].K=q);return[]})},d:function(a,b,c,d,f){function g(m){return m}b=P(b);-1===f&&(f=4294967295);var l=Ga(c);if(0===d){var h=32-8*c;g=function(m){return m<<h>>>h}}var k=-1!=b.indexOf("unsigned");U(a,{name:b,fromWireType:g,toWireType:function(m,n){if("number"!==typeof n&&"boolean"!==typeof n)throw new TypeError("Cannot convert \""+Ta(n)+"\" to "+this.name);if(n<d||n>f)throw new TypeError("Passing a number \""+Ta(n)+"\" from JS side to C/C++ side to an argument of type \""+b+"\", which is outside the valid range ["+d+", "+f+"]!");return k?n>>>0:n|0},argPackAdvance:8,readValueFromPointer:fb(b,l,0!==d),H:null})},c:function(a,b,c){function d(g){g>>=2;var l=I;return new f(F,l[g+1],l[g])}var f=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][b];c=P(c);U(a,{name:c,fromWireType:d,argPackAdvance:8,readValueFromPointer:d},{M:!0})},j:function(a,b){b=P(b);var c="std::string"===b;U(a,{name:b,fromWireType:function(d){var f=I[d>>2];if(c)for(var g=d+4,l=0;l<=f;++l){var h=d+4+l;if(l==f||0==A[h]){if(g){for(var k=g+(h-g),m=g;!(m>=k)&&A[m];)++m;g=ka.decode(A.subarray(g,m))}else g="";if(void 0===n)var n=g;else n+=String.fromCharCode(0),n+=g;g=h+1}}else{n=Array(f);for(l=0;l<f;++l)n[l]=String.fromCharCode(A[d+4+l]);n=n.join("")}X(d);return n},toWireType:function(d,f){f instanceof ArrayBuffer&&(f=new Uint8Array(f));var g="string"===typeof f;g||f instanceof Uint8Array||f instanceof Uint8ClampedArray||f instanceof Int8Array||T("Cannot pass non-string to std::string");var l=(c&&g?function(){for(var m=0,n=0;n<f.length;++n){var p=f.charCodeAt(n);55296<=p&&57343>=p&&(p=65536+((p&1023)<<10)|f.charCodeAt(++n)&1023);127>=p?++m:m=2047>=p?m+2:65535>=p?m+3:m+4}return m}:function(){return f.length})(),h=qb(4+l+1);I[h>>2]=l;if(c&&g)la(f,h+4,l+1);else if(g)for(g=0;g<l;++g){var k=f.charCodeAt(g);255<k&&(X(h),T("String has UTF-16 code units that do not fit in 8 bits"));A[h+4+g]=k}else for(g=0;g<l;++g)A[h+4+g]=f[g];null!==d&&d.push(X,h);return h},argPackAdvance:8,readValueFromPointer:Qa,H:function(d){X(d)}})},i:function(a,b,c){c=P(c);if(2===b){var d=na;var f=oa;var g=pa;var l=function(){return C};var h=1}else 4===b&&(d=qa,f=ra,g=sa,l=function(){return I},h=2);U(a,{name:c,fromWireType:function(k){for(var m=I[k>>2],n=l(),p,x=k+4,B=0;B<=m;++B){var q=k+4+B*b;if(B==m||0==n[q>>h])x=d(x,q-x),void 0===p?p=x:(p+=String.fromCharCode(0),p+=x),x=q+b}X(k);return p},toWireType:function(k,m){"string"!==typeof m&&T("Cannot pass non-string to C++ string type "+c);var n=g(m),p=qb(4+n+b);I[p>>2]=n>>h;f(m,p+4,n+b);null!==k&&k.push(X,p);return p},argPackAdvance:8,readValueFromPointer:Qa,H:function(k){X(k)}})},p:function(a,b){b=P(b);U(a,{N:!0,name:b,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},f:Pa,g:function(a){if(0===a)return W(hb());var b=gb[a];a=void 0===b?P(a):b;return W(hb()[a])},k:function(a){4<a&&(V[a].J+=1)},l:function(a,b,c,d){a||T("Cannot use deleted val. handle = "+a);a=V[a].value;var f=jb[b];if(!f){f="";for(var g=0;g<b;++g)f+=(0!==g?", ":"")+"arg"+g;var l="return function emval_allocator_"+b+"(constructor, argTypes, args) {\n";for(g=0;g<b;++g)l+="var argType"+g+" = requireRegisteredType(Module['HEAP32'][(argTypes >>> 2) + "+g+"], \"parameter "+g+"\");\nvar arg"+g+" = argType"+g+".readValueFromPointer(args);\nargs += argType"+g+"['argPackAdvance'];\n";f=new Function("requireRegisteredType","Module","__emval_register",l+("var obj = new constructor("+f+");\nreturn __emval_register(obj);\n}\n"))(ib,e,W);jb[b]=f}return f(a,c,d)},b:function(){v()},t:function(a,b,c){A.copyWithin(a,b,b+c)},e:function(a){a>>>=0;var b=A.length;if(2147483648<a)return!1;for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);d=Math.max(16777216,a,d);0<d%65536&&(d+=65536-d%65536);a:{try{z.grow(Math.min(2147483648,d)-F.byteLength+65535>>>16);va(z.buffer);var f=1;break a}catch(g){}f=void 0}if(f)return!0}return!1},u:function(a,b){var c=0;lb().forEach(function(d,f){var g=b+c;f=E[a+4*f>>2]=g;for(g=0;g<d.length;++g)G[f++>>0]=d.charCodeAt(g);G[f>>0]=0;c+=d.length+1});return 0},v:function(a,b){var c=lb();E[a>>2]=c.length;var d=0;c.forEach(function(f){d+=f.length+1});E[b>>2]=d;return 0},w:function(){return 0},r:function(){},m:function(a,b,c,d){for(var f=0,g=0;g<c;g++){for(var l=E[b+8*g>>2],h=E[b+(8*g+4)>>2],k=0;k<h;k++){var m=A[l+k],n=nb[a];if(0===m||10===m){m=1===a?ia:w;var p;for(p=0;n[p]&&!(NaN<=p);)++p;p=ka.decode(n.subarray?n.subarray(0,p):new Uint8Array(n.slice(0,p)));m(p);n.length=0}else n.push(m)}f+=h}E[d>>2]=f;return 0},a:z,s:function(){}};(function(){function a(f){e.asm=f.exports;J=e.asm.y;K--;e.monitorRunDependencies&&e.monitorRunDependencies(K);0==K&&M&&(f=M,M=null,f())}function b(f){a(f.instance)}function c(f){return Promise.resolve().then(Fa).then(function(g){return WebAssembly.instantiate(g,d)}).then(f,function(g){w("failed to asynchronously prepare wasm: "+g);v(g)})}var d={a:rb};K++;e.monitorRunDependencies&&e.monitorRunDependencies(K);if(e.instantiateWasm)try{return e.instantiateWasm(d,a)}catch(f){return w("Module.instantiateWasm callback failed with error: "+f),!1}(function(){return y||"function"!==typeof WebAssembly.instantiateStreaming||Da()||"function"!==typeof fetch?c(b):fetch(N,{credentials:"same-origin"}).then(function(f){return WebAssembly.instantiateStreaming(f,d).then(b,function(g){w("wasm streaming compile failed: "+g);w("falling back to ArrayBuffer instantiation");return c(b)})})})().catch(r);return{}})();var pb=e.___wasm_call_ctors=function(){return(pb=e.___wasm_call_ctors=e.asm.z).apply(null,arguments)},qb=e._malloc=function(){return(qb=e._malloc=e.asm.A).apply(null,arguments)},X=e._free=function(){return(X=e._free=e.asm.B).apply(null,arguments)},db=e.___getTypeName=function(){return(db=e.___getTypeName=e.asm.C).apply(null,arguments)};e.___embind_register_native_and_builtin_types=function(){return(e.___embind_register_native_and_builtin_types=e.asm.D).apply(null,arguments)};e.dynCall_iiji=function(){return(e.dynCall_iiji=e.asm.E).apply(null,arguments)};e.dynCall_jiji=function(){return(e.dynCall_jiji=e.asm.F).apply(null,arguments)};var Z;M=function sb(){Z||tb();Z||(M=sb)};function tb(){function a(){if(!Z&&(Z=!0,e.calledRun=!0,!ja)){O(ya);O(za);aa(e);if(e.onRuntimeInitialized)e.onRuntimeInitialized();if(e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;){var b=e.postRun.shift();Aa.unshift(b)}O(Aa)}}if(!(0<K)){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;)Ba();O(xa);0<K||(e.setStatus?(e.setStatus("Running..."),setTimeout(function(){setTimeout(function(){e.setStatus("")},1);a()},1)):a())}}e.run=tb;if(e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);0<e.preInit.length;)e.preInit.pop()();noExitRuntime=!0;tb();return jxl_node_dec.ready}}();var jxlDecWasm=typeof document==="undefined"?new(require("u"+"rl").URL)("file:"+__dirname+"/jxl_node_dec-54b06182.wasm").href:new URL("jxl_node_dec-54b06182.wasm",document.currentScript&&document.currentScript.src||document.baseURI).href;let wasm;const heap=new Array(32).fill(undefined);heap.push(undefined,null,true,false);function getObject(idx){return heap[idx]}let heap_next=heap.length;function dropObject(idx){if(idx<36)return;heap[idx]=heap_next;heap_next=idx}function takeObject(idx){const ret=getObject(idx);dropObject(idx);return ret}function debugString(val){const type=typeof val;if(type=="number"||type=="boolean"||val==null){return`${val}`}if(type=="string"){return`"${val}"`}if(type=="symbol"){const description=val.description;if(description==null){return"Symbol"}else{return`Symbol(${description})`}}if(type=="function"){const name=val.name;if(typeof name=="string"&&name.length>0){return`Function(${name})`}else{return"Function"}}if(Array.isArray(val)){const length=val.length;let debug="[";if(length>0){debug+=debugString(val[0])}for(let i=1;i<length;i++){debug+=", "+debugString(val[i])}debug+="]";return debug}const builtInMatches=/\[object ([^\]]+)\]/.exec(toString.call(val));let className;if(builtInMatches.length>1){className=builtInMatches[1]}else{return toString.call(val)}if(className=="Object"){try{return"Object("+JSON.stringify(val)+")"}catch(_){return"Object"}}if(val instanceof Error){return`${val.name}: ${val.message}\n${val.stack}`}return className}let WASM_VECTOR_LEN=0;let cachegetUint8Memory0=null;function getUint8Memory0(){if(cachegetUint8Memory0===null||cachegetUint8Memory0.buffer!==wasm.memory.buffer){cachegetUint8Memory0=new Uint8Array(wasm.memory.buffer)}return cachegetUint8Memory0}let cachedTextEncoder=new TextEncoder("utf-8");const encodeString=typeof cachedTextEncoder.encodeInto==="function"?function(arg,view){return cachedTextEncoder.encodeInto(arg,view)}:function(arg,view){const buf=cachedTextEncoder.encode(arg);view.set(buf);return{read:arg.length,written:buf.length}};function passStringToWasm0(arg,malloc,realloc){if(typeof arg!=="string")throw new Error("expected a string argument");if(realloc===undefined){const buf=cachedTextEncoder.encode(arg);const ptr=malloc(buf.length);getUint8Memory0().subarray(ptr,ptr+buf.length).set(buf);WASM_VECTOR_LEN=buf.length;return ptr}let len=arg.length;let ptr=malloc(len);const mem=getUint8Memory0();let offset=0;for(;offset<len;offset++){const code=arg.charCodeAt(offset);if(code>127)break;mem[ptr+offset]=code}if(offset!==len){if(offset!==0){arg=arg.slice(offset)}ptr=realloc(ptr,len,len=offset+arg.length*3);const view=getUint8Memory0().subarray(ptr+offset,ptr+len);const ret=encodeString(arg,view);if(ret.read!==arg.length)throw new Error("failed to pass whole string");offset+=ret.written}WASM_VECTOR_LEN=offset;return ptr}let cachegetInt32Memory0=null;function getInt32Memory0(){if(cachegetInt32Memory0===null||cachegetInt32Memory0.buffer!==wasm.memory.buffer){cachegetInt32Memory0=new Int32Array(wasm.memory.buffer)}return cachegetInt32Memory0}let cachedTextDecoder=new TextDecoder("utf-8",{ignoreBOM:true,fatal:true});cachedTextDecoder.decode();function getStringFromWasm0(ptr,len){return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr,ptr+len))}function passArray8ToWasm0(arg,malloc){const ptr=malloc(arg.length*1);getUint8Memory0().set(arg,ptr/1);WASM_VECTOR_LEN=arg.length;return ptr}function _assertNum(n){if(typeof n!=="number")throw new Error("expected a number argument")}function getArrayU8FromWasm0(ptr,len){return getUint8Memory0().subarray(ptr/1,ptr/1+len)}function encode(data,width,height){try{const retptr=wasm.__wbindgen_export_2.value-16;wasm.__wbindgen_export_2.value=retptr;var ptr0=passArray8ToWasm0(data,wasm.__wbindgen_malloc);var len0=WASM_VECTOR_LEN;_assertNum(width);_assertNum(height);wasm.encode(retptr,ptr0,len0,width,height);var r0=getInt32Memory0()[retptr/4+0];var r1=getInt32Memory0()[retptr/4+1];var v1=getArrayU8FromWasm0(r0,r1).slice();wasm.__wbindgen_free(r0,r1*1);return v1}finally{wasm.__wbindgen_export_2.value+=16}}function decode(data){var ptr0=passArray8ToWasm0(data,wasm.__wbindgen_malloc);var len0=WASM_VECTOR_LEN;var ret=wasm.decode(ptr0,len0);return takeObject(ret)}let cachegetUint8ClampedMemory0=null;function getUint8ClampedMemory0(){if(cachegetUint8ClampedMemory0===null||cachegetUint8ClampedMemory0.buffer!==wasm.memory.buffer){cachegetUint8ClampedMemory0=new Uint8ClampedArray(wasm.memory.buffer)}return cachegetUint8ClampedMemory0}function getClampedArrayU8FromWasm0(ptr,len){return getUint8ClampedMemory0().subarray(ptr/1,ptr/1+len)}function addHeapObject(obj){if(heap_next===heap.length)heap.push(heap.length+1);const idx=heap_next;heap_next=heap[idx];if(typeof heap_next!=="number")throw new Error("corrupt heap");heap[idx]=obj;return idx}function handleError(f){return function(){try{return f.apply(this,arguments)}catch(e){wasm.__wbindgen_exn_store(addHeapObject(e))}}}async function load$1(module,imports){if(typeof Response==="function"&&module instanceof Response){if(typeof WebAssembly.instantiateStreaming==="function"){try{return await WebAssembly.instantiateStreaming(module,imports)}catch(e){if(module.headers.get("Content-Type")!="application/wasm"){console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",e)}else{throw e}}}const bytes=await module.arrayBuffer();return await WebAssembly.instantiate(bytes,imports)}else{const instance=await WebAssembly.instantiate(module,imports);if(instance instanceof WebAssembly.Instance){return{instance,module}}else{return instance}}}async function init$1(input){if(typeof input==="undefined"){input=(typeof document==="undefined"?new(require("u"+"rl").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("index.js",document.baseURI).href).replace(/\.js$/,"_bg.wasm")}const imports={};imports.wbg={};imports.wbg.__wbg_newwithu8clampedarrayandsh_104cc36644cfc313=handleError(function(arg0,arg1,arg2,arg3){var ret=new ImageData(getClampedArrayU8FromWasm0(arg0,arg1),arg2>>>0,arg3>>>0);return addHeapObject(ret)});imports.wbg.__wbindgen_object_drop_ref=function(arg0){takeObject(arg0)};imports.wbg.__wbindgen_debug_string=function(arg0,arg1){var ret=debugString(getObject(arg1));var ptr0=passStringToWasm0(ret,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);var len0=WASM_VECTOR_LEN;getInt32Memory0()[arg0/4+1]=len0;getInt32Memory0()[arg0/4+0]=ptr0};imports.wbg.__wbindgen_throw=function(arg0,arg1){throw new Error(getStringFromWasm0(arg0,arg1))};if(typeof input==="string"||typeof Request==="function"&&input instanceof Request||typeof URL==="function"&&input instanceof URL){input=fetch(input)}const{instance,module}=await load$1(await input,imports);wasm=instance.exports;init$1.__wbindgen_wasm_module=module;return wasm}var pngEncDecWasm=typeof document==="undefined"?new(require("u"+"rl").URL)("file:"+__dirname+"/squoosh_png_bg-3da0553d.wasm").href:new URL("squoosh_png_bg-3da0553d.wasm",document.currentScript&&document.currentScript.src||document.baseURI).href;let wasm$1;let cachedTextDecoder$1=new TextDecoder("utf-8",{ignoreBOM:true,fatal:true});cachedTextDecoder$1.decode();let cachegetUint8Memory0$1=null;function getUint8Memory0$1(){if(cachegetUint8Memory0$1===null||cachegetUint8Memory0$1.buffer!==wasm$1.memory.buffer){cachegetUint8Memory0$1=new Uint8Array(wasm$1.memory.buffer)}return cachegetUint8Memory0$1}function getStringFromWasm0$1(ptr,len){return cachedTextDecoder$1.decode(getUint8Memory0$1().subarray(ptr,ptr+len))}let WASM_VECTOR_LEN$1=0;function passArray8ToWasm0$1(arg,malloc){const ptr=malloc(arg.length*1);getUint8Memory0$1().set(arg,ptr/1);WASM_VECTOR_LEN$1=arg.length;return ptr}let cachegetInt32Memory0$1=null;function getInt32Memory0$1(){if(cachegetInt32Memory0$1===null||cachegetInt32Memory0$1.buffer!==wasm$1.memory.buffer){cachegetInt32Memory0$1=new Int32Array(wasm$1.memory.buffer)}return cachegetInt32Memory0$1}function getArrayU8FromWasm0$1(ptr,len){return getUint8Memory0$1().subarray(ptr/1,ptr/1+len)}function optimise(data,level){try{const retptr=wasm$1.__wbindgen_export_0.value-16;wasm$1.__wbindgen_export_0.value=retptr;var ptr0=passArray8ToWasm0$1(data,wasm$1.__wbindgen_malloc);var len0=WASM_VECTOR_LEN$1;wasm$1.optimise(retptr,ptr0,len0,level);var r0=getInt32Memory0$1()[retptr/4+0];var r1=getInt32Memory0$1()[retptr/4+1];var v1=getArrayU8FromWasm0$1(r0,r1).slice();wasm$1.__wbindgen_free(r0,r1*1);return v1}finally{wasm$1.__wbindgen_export_0.value+=16}}async function load$2(module,imports){if(typeof Response==="function"&&module instanceof Response){if(typeof WebAssembly.instantiateStreaming==="function"){try{return await WebAssembly.instantiateStreaming(module,imports)}catch(e){if(module.headers.get("Content-Type")!="application/wasm"){console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",e)}else{throw e}}}const bytes=await module.arrayBuffer();return await WebAssembly.instantiate(bytes,imports)}else{const instance=await WebAssembly.instantiate(module,imports);if(instance instanceof WebAssembly.Instance){return{instance,module}}else{return instance}}}async function init$2(input){if(typeof input==="undefined"){input=(typeof document==="undefined"?new(require("u"+"rl").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("index.js",document.baseURI).href).replace(/\.js$/,"_bg.wasm")}const imports={};imports.wbg={};imports.wbg.__wbindgen_throw=function(arg0,arg1){throw new Error(getStringFromWasm0$1(arg0,arg1))};if(typeof input==="string"||typeof Request==="function"&&input instanceof Request||typeof URL==="function"&&input instanceof URL){input=fetch(input)}const{instance,module}=await load$2(await input,imports);wasm$1=instance.exports;init$2.__wbindgen_wasm_module=module;return wasm$1}var oxipngWasm=typeof document==="undefined"?new(require("u"+"rl").URL)("file:"+__dirname+"/squoosh_oxipng_bg-7586a8aa.wasm").href:new URL("squoosh_oxipng_bg-7586a8aa.wasm",document.currentScript&&document.currentScript.src||document.baseURI).href;let wasm$2;let cachegetUint8Memory0$2=null;function getUint8Memory0$2(){if(cachegetUint8Memory0$2===null||cachegetUint8Memory0$2.buffer!==wasm$2.memory.buffer){cachegetUint8Memory0$2=new Uint8Array(wasm$2.memory.buffer)}return cachegetUint8Memory0$2}let WASM_VECTOR_LEN$2=0;function passArray8ToWasm0$2(arg,malloc){const ptr=malloc(arg.length*1);getUint8Memory0$2().set(arg,ptr/1);WASM_VECTOR_LEN$2=arg.length;return ptr}let cachegetInt32Memory0$2=null;function getInt32Memory0$2(){if(cachegetInt32Memory0$2===null||cachegetInt32Memory0$2.buffer!==wasm$2.memory.buffer){cachegetInt32Memory0$2=new Int32Array(wasm$2.memory.buffer)}return cachegetInt32Memory0$2}function getArrayU8FromWasm0$2(ptr,len){return getUint8Memory0$2().subarray(ptr/1,ptr/1+len)}function resize(input_image,input_width,input_height,output_width,output_height,typ_idx,premultiply,color_space_conversion){var ptr0=passArray8ToWasm0$2(input_image,wasm$2.__wbindgen_malloc);var len0=WASM_VECTOR_LEN$2;wasm$2.resize(8,ptr0,len0,input_width,input_height,output_width,output_height,typ_idx,premultiply,color_space_conversion);var r0=getInt32Memory0$2()[8/4+0];var r1=getInt32Memory0$2()[8/4+1];var v1=getArrayU8FromWasm0$2(r0,r1).slice();wasm$2.__wbindgen_free(r0,r1*1);return v1}async function load$3(module,imports){if(typeof Response==="function"&&module instanceof Response){if(typeof WebAssembly.instantiateStreaming==="function"){try{return await WebAssembly.instantiateStreaming(module,imports)}catch(e){if(module.headers.get("Content-Type")!="application/wasm"){console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",e)}else{throw e}}}const bytes=await module.arrayBuffer();return await WebAssembly.instantiate(bytes,imports)}else{const instance=await WebAssembly.instantiate(module,imports);if(instance instanceof WebAssembly.Instance){return{instance,module}}else{return instance}}}async function init$3(input){if(typeof input==="undefined"){input=(typeof document==="undefined"?new(require("u"+"rl").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("index.js",document.baseURI).href).replace(/\.js$/,"_bg.wasm")}const imports={};if(typeof input==="string"||typeof Request==="function"&&input instanceof Request||typeof URL==="function"&&input instanceof URL){input=fetch(input)}const{instance,module}=await load$3(await input,imports);wasm$2=instance.exports;init$3.__wbindgen_wasm_module=module;return wasm$2}var resizeWasm=typeof document==="undefined"?new(require("u"+"rl").URL)("file:"+__dirname+"/squoosh_resize_bg-1742fde7.wasm").href:new URL("squoosh_resize_bg-1742fde7.wasm",document.currentScript&&document.currentScript.src||document.baseURI).href;var rotateWasm=typeof document==="undefined"?new(require("u"+"rl").URL)("file:"+__dirname+"/rotate-e8fb6784.wasm").href:new URL("rotate-e8fb6784.wasm",document.currentScript&&document.currentScript.src||document.baseURI).href;var Module=function(){return function(Module){Module=Module||{};var e;e||(e=typeof Module!=="undefined"?Module:{});var aa,r;e.ready=new Promise(function(a,b){aa=a;r=b});var t={},u;for(u in e)e.hasOwnProperty(u)&&(t[u]=e[u]);var v="",ba,ca,da,ea;v=__dirname+"/";ba=function(a){da||(da=require("fs"));ea||(ea=require("path"));a=ea.normalize(a);return da.readFileSync(a,null)};ca=function(a){a=ba(a);a.buffer||(a=new Uint8Array(a));a.buffer||w("Assertion failed: undefined");return a};1<process.argv.length&&process.argv[1].replace(/\\/g,"/");process.argv.slice(2);process.on("uncaughtException",function(a){throw a});process.on("unhandledRejection",w);e.inspect=function(){return"[Emscripten Module object]"};var fa=e.print||console.log.bind(console),y=e.printErr||console.warn.bind(console);for(u in t)t.hasOwnProperty(u)&&(e[u]=t[u]);t=null;var z;e.wasmBinary&&(z=e.wasmBinary);var noExitRuntime;e.noExitRuntime&&(noExitRuntime=e.noExitRuntime);"object"!==typeof WebAssembly&&w("no native wasm support detected");var A,ha=!1,ia=new TextDecoder("utf8");function ja(a,b,c){var d=C;if(0<c){c=b+c-1;for(var f=0;f<a.length;++f){var g=a.charCodeAt(f);if(55296<=g&&57343>=g){var l=a.charCodeAt(++f);g=65536+((g&1023)<<10)|l&1023}if(127>=g){if(b>=c)break;d[b++]=g}else{if(2047>=g){if(b+1>=c)break;d[b++]=192|g>>6}else{if(65535>=g){if(b+2>=c)break;d[b++]=224|g>>12}else{if(b+3>=c)break;d[b++]=240|g>>18;d[b++]=128|g>>12&63}d[b++]=128|g>>6&63}d[b++]=128|g&63}}d[b]=0}}var ka=new TextDecoder("utf-16le");function la(a,b){var c=a>>1;for(b=c+b/2;!(c>=b)&&D[c];)++c;return ka.decode(C.subarray(a,c<<1))}function ma(a,b,c){void 0===c&&(c=2147483647);if(2>c)return 0;c-=2;var d=b;c=c<2*a.length?c/2:a.length;for(var f=0;f<c;++f)E[b>>1]=a.charCodeAt(f),b+=2;E[b>>1]=0;return b-d}function na(a){return 2*a.length}function oa(a,b){for(var c=0,d="";!(c>=b/4);){var f=F[a+4*c>>2];if(0==f)break;++c;65536<=f?(f-=65536,d+=String.fromCharCode(55296|f>>10,56320|f&1023)):d+=String.fromCharCode(f)}return d}function pa(a,b,c){void 0===c&&(c=2147483647);if(4>c)return 0;var d=b;c=d+c-4;for(var f=0;f<a.length;++f){var g=a.charCodeAt(f);if(55296<=g&&57343>=g){var l=a.charCodeAt(++f);g=65536+((g&1023)<<10)|l&1023}F[b>>2]=g;b+=4;if(b+4>c)break}F[b>>2]=0;return b-d}function qa(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);55296<=d&&57343>=d&&++c;b+=4}return b}var G,ra,C,E,D,F,I,sa,ta;function ua(a){G=a;e.HEAP8=ra=new Int8Array(a);e.HEAP16=E=new Int16Array(a);e.HEAP32=F=new Int32Array(a);e.HEAPU8=C=new Uint8Array(a);e.HEAPU16=D=new Uint16Array(a);e.HEAPU32=I=new Uint32Array(a);e.HEAPF32=sa=new Float32Array(a);e.HEAPF64=ta=new Float64Array(a)}var va=e.INITIAL_MEMORY||16777216;e.wasmMemory?A=e.wasmMemory:A=new WebAssembly.Memory({initial:va/65536,maximum:32768});A&&(G=A.buffer);va=G.byteLength;ua(G);var J,wa=[],xa=[],ya=[],za=[];function Aa(){var a=e.preRun.shift();wa.unshift(a)}var K=0,M=null;e.preloadedImages={};e.preloadedAudios={};function w(a){if(e.onAbort)e.onAbort(a);y(a);ha=!0;a=new WebAssembly.RuntimeError("abort("+a+"). Build with -s ASSERTIONS=1 for more info.");r(a);throw a}function Ca(){var a=N;return String.prototype.startsWith?a.startsWith("data:application/octet-stream;base64,"):0===a.indexOf("data:application/octet-stream;base64,")}var N="imagequant_node.wasm";if(!Ca()){var Da=N;N=e.locateFile?e.locateFile(Da,v):v+Da}function Ea(){try{if(z)return new Uint8Array(z);if(ca)return ca(N);throw"both async and sync fetching of the wasm failed"}catch(a){w(a)}}function O(a){for(;0<a.length;){var b=a.shift();if("function"==typeof b)b(e);else{var c=b.J;"number"===typeof c?void 0===b.G?J.get(c)():J.get(c)(b.G):c(void 0===b.G?null:b.G)}}}function Fa(a){switch(a){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+a);}}var Ga=void 0;function P(a){for(var b="";C[a];)b+=Ga[C[a++]];return b}var Q={},R={},S={};function Ha(a){if(void 0===a)return"_unknown";a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?"_"+a:a}function Ia(a,b){a=Ha(a);return new Function("body","return function "+a+"() {\n \"use strict\"; return body.apply(this, arguments);\n};\n")(b)}function Ja(a){var b=Error,c=Ia(a,function(d){this.name=a;this.message=d;d=Error(d).stack;void 0!==d&&(this.stack=this.toString()+"\n"+d.replace(/^Error(:[^\n]*)?\n/,""))});c.prototype=Object.create(b.prototype);c.prototype.constructor=c;c.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message};return c}var Ka=void 0;function T(a){throw new Ka(a)}var La=void 0;function Ma(a,b){function c(h){h=b(h);if(h.length!==d.length)throw new La("Mismatched type converter count");for(var k=0;k<d.length;++k)U(d[k],h[k])}var d=[];d.forEach(function(h){S[h]=a});var f=Array(a.length),g=[],l=0;a.forEach(function(h,k){R.hasOwnProperty(h)?f[k]=R[h]:(g.push(h),Q.hasOwnProperty(h)||(Q[h]=[]),Q[h].push(function(){f[k]=R[h];++l;l===g.length&&c(f)}))});0===g.length&&c(f)}function U(a,b,c){c=c||{};if(!("argPackAdvance"in b))throw new TypeError("registerType registeredInstance requires argPackAdvance");var d=b.name;a||T("type \""+d+"\" must have a positive integer typeid pointer");if(R.hasOwnProperty(a)){if(c.K)return;T("Cannot register type '"+d+"' twice")}R[a]=b;delete S[a];Q.hasOwnProperty(a)&&(b=Q[a],delete Q[a],b.forEach(function(f){f()}))}var Pa=[],V=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Qa(a){4<a&&0===--V[a].H&&(V[a]=void 0,Pa.push(a))}function W(a){switch(a){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var b=Pa.length?Pa.pop():V.length;V[b]={H:1,value:a};return b;}}function Ra(a){return this.fromWireType(I[a>>2])}function Sa(a){if(null===a)return"null";var b=typeof a;return"object"===b||"array"===b||"function"===b?a.toString():""+a}function Ta(a,b){switch(b){case 2:return function(c){return this.fromWireType(sa[c>>2])};case 3:return function(c){return this.fromWireType(ta[c>>3])};default:throw new TypeError("Unknown float type: "+a);}}function Ua(a){var b=Function;if(!(b instanceof Function))throw new TypeError("new_ called with constructor type "+typeof b+" which is not a function");var c=Ia(b.name||"unknownFunctionName",function(){});c.prototype=b.prototype;c=new c;a=b.apply(c,a);return a instanceof Object?a:c}function Va(a){for(;a.length;){var b=a.pop();a.pop()(b)}}function Wa(a,b){var c=e;if(void 0===c[a].D){var d=c[a];c[a]=function(){c[a].D.hasOwnProperty(arguments.length)||T("Function '"+b+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+c[a].D+")!");return c[a].D[arguments.length].apply(this,arguments)};c[a].D=[];c[a].D[d.I]=d}}function Xa(a,b,c){e.hasOwnProperty(a)?((void 0===c||void 0!==e[a].D&&void 0!==e[a].D[c])&&T("Cannot register public name '"+a+"' twice"),Wa(a,a),e.hasOwnProperty(c)&&T("Cannot register multiple overloads of a function with the same number of arguments ("+c+")!"),e[a].D[c]=b):(e[a]=b,void 0!==c&&(e[a].M=c))}function Ya(a,b){for(var c=[],d=0;d<a;d++)c.push(F[(b>>2)+d]);return c}function Za(a,b){0<=a.indexOf("j")||w("Assertion failed: getDynCaller should only be called with i64 sigs");var c=[];return function(){c.length=arguments.length;for(var d=0;d<arguments.length;d++)c[d]=arguments[d];var f;-1!=a.indexOf("j")?f=c&&c.length?e["dynCall_"+a].apply(null,[b].concat(c)):e["dynCall_"+a].call(null,b):f=J.get(b).apply(null,c);return f}}function $a(a,b){a=P(a);var c=-1!=a.indexOf("j")?Za(a,b):J.get(b);"function"!==typeof c&&T("unknown function pointer with signature "+a+": "+b);return c}var ab=void 0;function bb(a){a=cb(a);var b=P(a);X(a);return b}function db(a,b){function c(g){f[g]||R[g]||(S[g]?S[g].forEach(c):(d.push(g),f[g]=!0))}var d=[],f={};b.forEach(c);throw new ab(a+": "+d.map(bb).join([", "]))}function eb(a,b,c){switch(b){case 0:return c?function(d){return ra[d]}:function(d){return C[d]};case 1:return c?function(d){return E[d>>1]}:function(d){return D[d>>1]};case 2:return c?function(d){return F[d>>2]}:function(d){return I[d>>2]};default:throw new TypeError("Unknown integer type: "+a);}}var fb={};function gb(){return"object"===typeof globalThis?globalThis:Function("return this")()}function hb(a,b){var c=R[a];void 0===c&&T(b+" has unknown type "+bb(a));return c}for(var ib={},jb=[null,[],[]],kb=Array(256),Y=0;256>Y;++Y)kb[Y]=String.fromCharCode(Y);Ga=kb;Ka=e.BindingError=Ja("BindingError");La=e.InternalError=Ja("InternalError");e.count_emval_handles=function(){for(var a=0,b=5;b<V.length;++b)void 0!==V[b]&&++a;return a};e.get_first_emval=function(){for(var a=5;a<V.length;++a)if(void 0!==V[a])return V[a];return null};ab=e.UnboundTypeError=Ja("UnboundTypeError");xa.push({J:function(){lb()}});var nb={o:function(){},p:function(a,b,c,d,f){var g=Fa(c);b=P(b);U(a,{name:b,fromWireType:function(l){return!!l},toWireType:function(l,h){return h?d:f},argPackAdvance:8,readValueFromPointer:function(l){if(1===c)var h=ra;else if(2===c)h=E;else if(4===c)h=F;else throw new TypeError("Unknown boolean type size: "+b);return this.fromWireType(h[l>>g])},F:null})},v:function(a,b){b=P(b);U(a,{name:b,fromWireType:function(c){var d=V[c].value;Qa(c);return d},toWireType:function(c,d){return W(d)},argPackAdvance:8,readValueFromPointer:Ra,F:null})},n:function(a,b,c){c=Fa(c);b=P(b);U(a,{name:b,fromWireType:function(d){return d},toWireType:function(d,f){if("number"!==typeof f&&"boolean"!==typeof f)throw new TypeError("Cannot convert \""+Sa(f)+"\" to "+this.name);return f},argPackAdvance:8,readValueFromPointer:Ta(b,c),F:null})},e:function(a,b,c,d,f,g){var l=Ya(b,c);a=P(a);f=$a(d,f);Xa(a,function(){db("Cannot call "+a+" due to unbound types",l)},b-1);Ma(l,function(h){var k=[h[0],null].concat(h.slice(1)),m=h=a,n=f,p=k.length;2>p&&T("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var x=null!==k[1]&&!1,B=!1,q=1;q<k.length;++q)if(null!==k[q]&&void 0===k[q].F){B=!0;break}var Na="void"!==k[0].name,H="",L="";for(q=0;q<p-2;++q)H+=(0!==q?", ":"")+"arg"+q,L+=(0!==q?", ":"")+"arg"+q+"Wired";m="return function "+Ha(m)+"("+H+") {\nif (arguments.length !== "+(p-2)+") {\nthrowBindingError('function "+m+" called with ' + arguments.length + ' arguments, expected "+(p-2)+" args!');\n}\n";B&&(m+="var destructors = [];\n");var Oa=B?"destructors":"null";H="throwBindingError invoker fn runDestructors retType classParam".split(" ");n=[T,n,g,Va,k[0],k[1]];x&&(m+="var thisWired = classParam.toWireType("+Oa+", this);\n");for(q=0;q<p-2;++q)m+="var arg"+q+"Wired = argType"+q+".toWireType("+Oa+", arg"+q+"); // "+k[q+2].name+"\n",H.push("argType"+q),n.push(k[q+2]);x&&(L="thisWired"+(0<L.length?", ":"")+L);m+=(Na?"var rv = ":"")+"invoker(fn"+(0<L.length?", ":"")+L+");\n";if(B)m+="runDestructors(destructors);\n";else for(q=x?1:2;q<k.length;++q)p=1===q?"thisWired":"arg"+(q-2)+"Wired",null!==k[q].F&&(m+=p+"_dtor("+p+"); // "+k[q].name+"\n",H.push(p+"_dtor"),n.push(k[q].F));Na&&(m+="var ret = retType.fromWireType(rv);\nreturn ret;\n");H.push(m+"}\n");k=Ua(H).apply(null,n);q=b-1;if(!e.hasOwnProperty(h))throw new La("Replacing nonexistant public symbol");void 0!==e[h].D&&void 0!==q?e[h].D[q]=k:(e[h]=k,e[h].I=q);return[]})},c:function(a,b,c,d,f){function g(m){return m}b=P(b);-1===f&&(f=4294967295);var l=Fa(c);if(0===d){var h=32-8*c;g=function(m){return m<<h>>>h}}var k=-1!=b.indexOf("unsigned");U(a,{name:b,fromWireType:g,toWireType:function(m,n){if("number"!==typeof n&&"boolean"!==typeof n)throw new TypeError("Cannot convert \""+Sa(n)+"\" to "+this.name);if(n<d||n>f)throw new TypeError("Passing a number \""+Sa(n)+"\" from JS side to C/C++ side to an argument of type \""+b+"\", which is outside the valid range ["+d+", "+f+"]!");return k?n>>>0:n|0},argPackAdvance:8,readValueFromPointer:eb(b,l,0!==d),F:null})},b:function(a,b,c){function d(g){g>>=2;var l=I;return new f(G,l[g+1],l[g])}var f=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][b];c=P(c);U(a,{name:c,fromWireType:d,argPackAdvance:8,readValueFromPointer:d},{K:!0})},i:function(a,b){b=P(b);var c="std::string"===b;U(a,{name:b,fromWireType:function(d){var f=I[d>>2];if(c)for(var g=d+4,l=0;l<=f;++l){var h=d+4+l;if(l==f||0==C[h]){if(g){for(var k=g+(h-g),m=g;!(m>=k)&&C[m];)++m;g=ia.decode(C.subarray(g,m))}else g="";if(void 0===n)var n=g;else n+=String.fromCharCode(0),n+=g;g=h+1}}else{n=Array(f);for(l=0;l<f;++l)n[l]=String.fromCharCode(C[d+4+l]);n=n.join("")}X(d);return n},toWireType:function(d,f){f instanceof ArrayBuffer&&(f=new Uint8Array(f));var g="string"===typeof f;g||f instanceof Uint8Array||f instanceof Uint8ClampedArray||f instanceof Int8Array||T("Cannot pass non-string to std::string");var l=(c&&g?function(){for(var m=0,n=0;n<f.length;++n){var p=f.charCodeAt(n);55296<=p&&57343>=p&&(p=65536+((p&1023)<<10)|f.charCodeAt(++n)&1023);127>=p?++m:m=2047>=p?m+2:65535>=p?m+3:m+4}return m}:function(){return f.length})(),h=mb(4+l+1);I[h>>2]=l;if(c&&g)ja(f,h+4,l+1);else if(g)for(g=0;g<l;++g){var k=f.charCodeAt(g);255<k&&(X(h),T("String has UTF-16 code units that do not fit in 8 bits"));C[h+4+g]=k}else for(g=0;g<l;++g)C[h+4+g]=f[g];null!==d&&d.push(X,h);return h},argPackAdvance:8,readValueFromPointer:Ra,F:function(d){X(d)}})},g:function(a,b,c){c=P(c);if(2===b){var d=la;var f=ma;var g=na;var l=function(){return D};var h=1}else 4===b&&(d=oa,f=pa,g=qa,l=function(){return I},h=2);U(a,{name:c,fromWireType:function(k){for(var m=I[k>>2],n=l(),p,x=k+4,B=0;B<=m;++B){var q=k+4+B*b;if(B==m||0==n[q>>h])x=d(x,q-x),void 0===p?p=x:(p+=String.fromCharCode(0),p+=x),x=q+b}X(k);return p},toWireType:function(k,m){"string"!==typeof m&&T("Cannot pass non-string to C++ string type "+c);var n=g(m),p=mb(4+n+b);I[p>>2]=n>>h;f(m,p+4,n+b);null!==k&&k.push(X,p);return p},argPackAdvance:8,readValueFromPointer:Ra,F:function(k){X(k)}})},q:function(a,b){b=P(b);U(a,{L:!0,name:b,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},f:Qa,l:function(a){if(0===a)return W(gb());var b=fb[a];a=void 0===b?P(a):b;return W(gb()[a])},j:function(a){4<a&&(V[a].H+=1)},k:function(a,b,c,d){a||T("Cannot use deleted val. handle = "+a);a=V[a].value;var f=ib[b];if(!f){f="";for(var g=0;g<b;++g)f+=(0!==g?", ":"")+"arg"+g;var l="return function emval_allocator_"+b+"(constructor, argTypes, args) {\n";for(g=0;g<b;++g)l+="var argType"+g+" = requireRegisteredType(Module['HEAP32'][(argTypes >>> 2) + "+g+"], \"parameter "+g+"\");\nvar arg"+g+" = argType"+g+".readValueFromPointer(args);\nargs += argType"+g+"['argPackAdvance'];\n";f=new Function("requireRegisteredType","Module","__emval_register",l+("var obj = new constructor("+f+");\nreturn __emval_register(obj);\n}\n"))(hb,e,W);ib[b]=f}return f(a,c,d)},h:function(){w()},t:function(a,b,c){C.copyWithin(a,b,b+c)},d:function(a){a>>>=0;var b=C.length;if(2147483648<a)return!1;for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);d=Math.max(16777216,a,d);0<d%65536&&(d+=65536-d%65536);a:{try{A.grow(Math.min(2147483648,d)-G.byteLength+65535>>>16);ua(A.buffer);var f=1;break a}catch(g){}f=void 0}if(f)return!0}return!1},u:function(){return 0},r:function(){},m:function(a,b,c,d){for(var f=0,g=0;g<c;g++){for(var l=F[b+8*g>>2],h=F[b+(8*g+4)>>2],k=0;k<h;k++){var m=C[l+k],n=jb[a];if(0===m||10===m){m=1===a?fa:y;var p;for(p=0;n[p]&&!(NaN<=p);)++p;p=ia.decode(n.subarray?n.subarray(0,p):new Uint8Array(n.slice(0,p)));m(p);n.length=0}else n.push(m)}f+=h}F[d>>2]=f;return 0},a:A,s:function(){}};(function(){function a(f){e.asm=f.exports;J=e.asm.w;K--;e.monitorRunDependencies&&e.monitorRunDependencies(K);0==K&&M&&(f=M,M=null,f())}function b(f){a(f.instance)}function c(f){return Promise.resolve().then(Ea).then(function(g){return WebAssembly.instantiate(g,d)}).then(f,function(g){y("failed to asynchronously prepare wasm: "+g);w(g)})}var d={a:nb};K++;e.monitorRunDependencies&&e.monitorRunDependencies(K);if(e.instantiateWasm)try{return e.instantiateWasm(d,a)}catch(f){return y("Module.instantiateWasm callback failed with error: "+f),!1}(function(){return z||"function"!==typeof WebAssembly.instantiateStreaming||Ca()||"function"!==typeof fetch?c(b):fetch(N,{credentials:"same-origin"}).then(function(f){return WebAssembly.instantiateStreaming(f,d).then(b,function(g){y("wasm streaming compile failed: "+g);y("falling back to ArrayBuffer instantiation");return c(b)})})})().catch(r);return{}})();var lb=e.___wasm_call_ctors=function(){return(lb=e.___wasm_call_ctors=e.asm.x).apply(null,arguments)},mb=e._malloc=function(){return(mb=e._malloc=e.asm.y).apply(null,arguments)},X=e._free=function(){return(X=e._free=e.asm.z).apply(null,arguments)},cb=e.___getTypeName=function(){return(cb=e.___getTypeName=e.asm.A).apply(null,arguments)};e.___embind_register_native_and_builtin_types=function(){return(e.___embind_register_native_and_builtin_types=e.asm.B).apply(null,arguments)};e.dynCall_jiji=function(){return(e.dynCall_jiji=e.asm.C).apply(null,arguments)};var Z;M=function ob(){Z||pb();Z||(M=ob)};function pb(){function a(){if(!Z&&(Z=!0,e.calledRun=!0,!ha)){O(xa);O(ya);aa(e);if(e.onRuntimeInitialized)e.onRuntimeInitialized();if(e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;){var b=e.postRun.shift();za.unshift(b)}O(za)}}if(!(0<K)){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;)Aa();O(wa);0<K||(e.setStatus?(e.setStatus("Running..."),setTimeout(function(){setTimeout(function(){e.setStatus("")},1);a()},1)):a())}}e.run=pb;if(e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);0<e.preInit.length;)e.preInit.pop()();noExitRuntime=!0;pb();return Module.ready}}();var imageQuantWasm=typeof document==="undefined"?new(require("u"+"rl").URL)("file:"+__dirname+"/imagequant_node-009a0715.wasm").href:new URL("imagequant_node-009a0715.wasm",document.currentScript&&document.currentScript.src||document.baseURI).href;class ImageData$1{constructor(data,width,height){this.data=new Uint8ClampedArray(data);this.width=width;this.height=height}}const pngEncDecPromise=init$1(fs.promises.readFile(pathify(pngEncDecWasm)));const oxipngPromise=init$2(fs.promises.readFile(pathify(oxipngWasm)));const resizePromise=init$3(fs.promises.readFile(pathify(resizeWasm)));const imageQuantPromise=instantiateEmscriptenWasm(Module,imageQuantWasm);globalThis.ImageData=ImageData$1;function resizeNameToIndex(name){switch(name){case"triangle":return 0;case"catrom":return 1;case"mitchell":return 2;case"lanczos3":return 3;default:throw Error(`Unknown resize algorithm "${name}"`);}}function resizeWithAspect({input_width,input_height,target_width,target_height}){if(!target_width&&!target_height){throw Error("Need to specify at least width or height when resizing")}if(target_width&&target_height){return{width:target_width,height:target_height}}if(!target_width){return{width:Math.round(input_width/input_height*target_height),height:target_height}}if(!target_height){return{width:target_width,height:Math.round(input_height/input_width*target_width)}}}const preprocessors={resize:{name:"Resize",description:"Resize the image before compressing",instantiate:async()=>{await resizePromise;return(buffer,input_width,input_height,{width,height,method,premultiply,linearRGB})=>{({width,height}=resizeWithAspect({input_width,input_height,target_width:width,target_height:height}));return new ImageData$1(resize(buffer,input_width,input_height,width,height,resizeNameToIndex(method),premultiply,linearRGB),width,height)}},defaultOptions:{method:"lanczos3",fitMethod:"stretch",premultiply:true,linearRGB:true}},quant:{name:"ImageQuant",description:"Reduce the number of colors used (aka. paletting)",instantiate:async()=>{const imageQuant=await imageQuantPromise;return(buffer,width,height,{numColors,dither})=>new ImageData$1(imageQuant.quantize(buffer,width,height,numColors,dither),width,height)},defaultOptions:{numColors:255,dither:1}},rotate:{name:"Rotate",description:"Rotate image",instantiate:async()=>{return async(buffer,width,height,{numRotations})=>{const degrees=numRotations*90%360;const sameDimensions=degrees==0||degrees==180;const size=width*height*4;const{instance}=await WebAssembly.instantiate(await fs.promises.readFile(pathify(rotateWasm)));const{memory}=instance.exports;const pagesAvailable=x.buffer.byteLength/(64*1024);const pagesNeeded=Math.ceil((size*2-memory.buffer.byteLength)/(64*1024));if(pagesNeeded>pagesAvailable){memory.grow(pagesNeeded-pagesAvailable)}const view=new Uint8ClampedArray(memory.buffer);view.set(buffer,8);instance.exports.rotate(width,height,degrees);return new ImageData$1(new Uint8ClampedArray(view.slice(size+8,size*2+8)),sameDimensions?width:height,sameDimensions?height:width)}},defaultOptions:{numRotations:0}}};const codecs={avif:{name:"AVIF",extension:"avif",detectors:[/^\x00\x00\x00 ftypavif\x00\x00\x00\x00/],dec:()=>instantiateEmscriptenWasm(avif_node_dec,avifDecWasm),enc:()=>instantiateEmscriptenWasm(avif_node_enc,avifEncWasm),defaultEncoderOptions:{minQuantizer:33,maxQuantizer:63,minQuantizerAlpha:33,maxQuantizerAlpha:63,tileColsLog2:0,tileRowsLog2:0,speed:8,subsample:1},autoOptimize:{option:"maxQuantizer",min:0,max:62}},jxl:{name:"JPEG-XL",extension:"jxl",detectors:[/^\xff\x0a/],dec:()=>instantiateEmscriptenWasm(jxl_node_dec,jxlDecWasm),enc:()=>instantiateEmscriptenWasm(jxl_node_enc,jxlEncWasm),defaultEncoderOptions:{speed:4,quality:75,progressive:false,epf:-1,nearLossless:0,lossyPalette:false},autoOptimize:{option:"quality",min:0,max:100}},oxipng:{name:"OxiPNG",extension:"png",detectors:[/^\x89PNG\x0D\x0A\x1A\x0A/],dec:async()=>{await pngEncDecPromise;return{decode:decode}},enc:async()=>{await pngEncDecPromise;await oxipngPromise;return{encode:(buffer,width,height,opts)=>{const simplePng=new Uint8Array(encode(new Uint8Array(buffer),width,height));return new Uint8Array(optimise(simplePng,opts.level))}}},defaultEncoderOptions:{level:2},autoOptimize:{option:"level",min:6,max:1}}};var SymbolPolyfill=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?Symbol:function(description){return"Symbol("+description+")"};function noop(){}function getGlobals(){if(typeof self!=="undefined"){return self}else if(typeof window!=="undefined"){return window}else if(typeof global!=="undefined"){return global}return undefined}var globals=getGlobals();function typeIsObject(x){return typeof x==="object"&&x!==null||typeof x==="function"}var rethrowAssertionErrorRejection=noop;var originalPromise=Promise;var originalPromiseThen=Promise.prototype.then;var originalPromiseResolve=Promise.resolve.bind(originalPromise);var originalPromiseReject=Promise.reject.bind(originalPromise);function newPromise(executor){return new originalPromise(executor)}function promiseResolvedWith(value){return originalPromiseResolve(value)}function promiseRejectedWith(reason){return originalPromiseReject(reason)}function PerformPromiseThen(promise,onFulfilled,onRejected){return originalPromiseThen.call(promise,onFulfilled,onRejected)}function uponPromise(promise,onFulfilled,onRejected){PerformPromiseThen(PerformPromiseThen(promise,onFulfilled,onRejected),undefined,rethrowAssertionErrorRejection)}function uponFulfillment(promise,onFulfilled){uponPromise(promise,onFulfilled)}function uponRejection(promise,onRejected){uponPromise(promise,undefined,onRejected)}function transformPromiseWith(promise,fulfillmentHandler,rejectionHandler){return PerformPromiseThen(promise,fulfillmentHandler,rejectionHandler)}function setPromiseIsHandledToTrue(promise){PerformPromiseThen(promise,undefined,rethrowAssertionErrorRejection)}var queueMicrotask=function(){var globalQueueMicrotask=globals&&globals.queueMicrotask;if(typeof globalQueueMicrotask==="function"){return globalQueueMicrotask}var resolvedPromise=promiseResolvedWith(undefined);return function(fn){return PerformPromiseThen(resolvedPromise,fn)}}();function reflectCall(F,V,args){if(typeof F!=="function"){throw new TypeError("Argument is not a function")}return Function.prototype.apply.call(F,V,args)}function promiseCall(F,V,args){try{return promiseResolvedWith(reflectCall(F,V,args))}catch(value){return promiseRejectedWith(value)}}var QUEUE_MAX_ARRAY_SIZE=16384;var SimpleQueue=function(){function SimpleQueue(){this._cursor=0;this._size=0;this._front={_elements:[],_next:undefined};this._back=this._front;this._cursor=0;this._size=0}Object.defineProperty(SimpleQueue.prototype,"length",{get:function(){return this._size},enumerable:false,configurable:true});SimpleQueue.prototype.push=function(element){var oldBack=this._back;var newBack=oldBack;if(oldBack._elements.length===QUEUE_MAX_ARRAY_SIZE-1){newBack={_elements:[],_next:undefined}}oldBack._elements.push(element);if(newBack!==oldBack){this._back=newBack;oldBack._next=newBack}++this._size};SimpleQueue.prototype.shift=function(){var oldFront=this._front;var newFront=oldFront;var oldCursor=this._cursor;var newCursor=oldCursor+1;var elements=oldFront._elements;var element=elements[oldCursor];if(newCursor===QUEUE_MAX_ARRAY_SIZE){newFront=oldFront._next;newCursor=0}--this._size;this._cursor=newCursor;if(oldFront!==newFront){this._front=newFront}elements[oldCursor]=undefined;return element};SimpleQueue.prototype.forEach=function(callback){var i=this._cursor;var node=this._front;var elements=node._elements;while(i!==elements.length||node._next!==undefined){if(i===elements.length){node=node._next;elements=node._elements;i=0;if(elements.length===0){break}}callback(elements[i]);++i}};SimpleQueue.prototype.peek=function(){var front=this._front;var cursor=this._cursor;return front._elements[cursor]};return SimpleQueue}();function ReadableStreamReaderGenericInitialize(reader,stream){reader._ownerReadableStream=stream;stream._reader=reader;if(stream._state==="readable"){defaultReaderClosedPromiseInitialize(reader)}else if(stream._state==="closed"){defaultReaderClosedPromiseInitializeAsResolved(reader)}else{defaultReaderClosedPromiseInitializeAsRejected(reader,stream._storedError)}}function ReadableStreamReaderGenericCancel(reader,reason){var stream=reader._ownerReadableStream;return ReadableStreamCancel(stream,reason)}function ReadableStreamReaderGenericRelease(reader){if(reader._ownerReadableStream._state==="readable"){defaultReaderClosedPromiseReject(reader,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness"))}else{defaultReaderClosedPromiseResetToRejected(reader,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness"))}reader._ownerReadableStream._reader=undefined;reader._ownerReadableStream=undefined}function readerLockException(name){return new TypeError("Cannot "+name+" a stream using a released reader")}function defaultReaderClosedPromiseInitialize(reader){reader._closedPromise=newPromise(function(resolve,reject){reader._closedPromise_resolve=resolve;reader._closedPromise_reject=reject})}function defaultReaderClosedPromiseInitializeAsRejected(reader,reason){defaultReaderClosedPromiseInitialize(reader);defaultReaderClosedPromiseReject(reader,reason)}function defaultReaderClosedPromiseInitializeAsResolved(reader){defaultReaderClosedPromiseInitialize(reader);defaultReaderClosedPromiseResolve(reader)}function defaultReaderClosedPromiseReject(reader,reason){setPromiseIsHandledToTrue(reader._closedPromise);reader._closedPromise_reject(reason);reader._closedPromise_resolve=undefined;reader._closedPromise_reject=undefined}function defaultReaderClosedPromiseResetToRejected(reader,reason){defaultReaderClosedPromiseInitializeAsRejected(reader,reason)}function defaultReaderClosedPromiseResolve(reader){reader._closedPromise_resolve(undefined);reader._closedPromise_resolve=undefined;reader._closedPromise_reject=undefined}var AbortSteps=SymbolPolyfill("[[AbortSteps]]");var ErrorSteps=SymbolPolyfill("[[ErrorSteps]]");var CancelSteps=SymbolPolyfill("[[CancelSteps]]");var PullSteps=SymbolPolyfill("[[PullSteps]]");var NumberIsFinite=Number.isFinite||function(x){return typeof x==="number"&&isFinite(x)};var MathTrunc=Math.trunc||function(v){return v<0?Math.ceil(v):Math.floor(v)};function isDictionary(x){return typeof x==="object"||typeof x==="function"}function assertDictionary(obj,context){if(obj!==undefined&&!isDictionary(obj)){throw new TypeError(context+" is not an object.")}}function assertFunction(x,context){if(typeof x!=="function"){throw new TypeError(context+" is not a function.")}}function isObject(x){return typeof x==="object"&&x!==null||typeof x==="function"}function assertObject(x,context){if(!isObject(x)){throw new TypeError(context+" is not an object.")}}function assertRequiredArgument(x,position,context){if(x===undefined){throw new TypeError("Parameter "+position+" is required in '"+context+"'.")}}function assertRequiredField(x,field,context){if(x===undefined){throw new TypeError(field+" is required in '"+context+"'.")}}function convertUnrestrictedDouble(value){return Number(value)}function censorNegativeZero(x){return x===0?0:x}function integerPart(x){return censorNegativeZero(MathTrunc(x))}function convertUnsignedLongLongWithEnforceRange(value,context){var lowerBound=0;var upperBound=Number.MAX_SAFE_INTEGER;var x=Number(value);x=censorNegativeZero(x);if(!NumberIsFinite(x)){throw new TypeError(context+" is not a finite number")}x=integerPart(x);if(x<lowerBound||x>upperBound){throw new TypeError(context+" is outside the accepted range of "+lowerBound+" to "+upperBound+", inclusive")}if(!NumberIsFinite(x)||x===0){return 0}return x}function assertReadableStream(x,context){if(!IsReadableStream(x)){throw new TypeError(context+" is not a ReadableStream.")}}function AcquireReadableStreamDefaultReader(stream){return new ReadableStreamDefaultReader(stream)}function ReadableStreamAddReadRequest(stream,readRequest){stream._reader._readRequests.push(readRequest)}function ReadableStreamFulfillReadRequest(stream,chunk,done){var reader=stream._reader;var readRequest=reader._readRequests.shift();if(done){readRequest._closeSteps()}else{readRequest._chunkSteps(chunk)}}function ReadableStreamGetNumReadRequests(stream){return stream._reader._readRequests.length}function ReadableStreamHasDefaultReader(stream){var reader=stream._reader;if(reader===undefined){return false}if(!IsReadableStreamDefaultReader(reader)){return false}return true}var ReadableStreamDefaultReader=function(){function ReadableStreamDefaultReader(stream){assertRequiredArgument(stream,1,"ReadableStreamDefaultReader");assertReadableStream(stream,"First parameter");if(IsReadableStreamLocked(stream)){throw new TypeError("This stream has already been locked for exclusive reading by another reader")}ReadableStreamReaderGenericInitialize(this,stream);this._readRequests=new SimpleQueue}Object.defineProperty(ReadableStreamDefaultReader.prototype,"closed",{get:function(){if(!IsReadableStreamDefaultReader(this)){return promiseRejectedWith(defaultReaderBrandCheckException("closed"))}return this._closedPromise},enumerable:false,configurable:true});ReadableStreamDefaultReader.prototype.cancel=function(reason){if(reason===void 0){reason=undefined}if(!IsReadableStreamDefaultReader(this)){return promiseRejectedWith(defaultReaderBrandCheckException("cancel"))}if(this._ownerReadableStream===undefined){return promiseRejectedWith(readerLockException("cancel"))}return ReadableStreamReaderGenericCancel(this,reason)};ReadableStreamDefaultReader.prototype.read=function(){if(!IsReadableStreamDefaultReader(this)){return promiseRejectedWith(defaultReaderBrandCheckException("read"))}if(this._ownerReadableStream===undefined){return promiseRejectedWith(readerLockException("read from"))}var resolvePromise;var rejectPromise;var promise=newPromise(function(resolve,reject){resolvePromise=resolve;rejectPromise=reject});var readRequest={_chunkSteps:function(chunk){return resolvePromise({value:chunk,done:false})},_closeSteps:function(){return resolvePromise({value:undefined,done:true})},_errorSteps:function(e){return rejectPromise(e)}};ReadableStreamDefaultReaderRead(this,readRequest);return promise};ReadableStreamDefaultReader.prototype.releaseLock=function(){if(!IsReadableStreamDefaultReader(this)){throw defaultReaderBrandCheckException("releaseLock")}if(this._ownerReadableStream===undefined){return}if(this._readRequests.length>0){throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled")}ReadableStreamReaderGenericRelease(this)};return ReadableStreamDefaultReader}();Object.defineProperties(ReadableStreamDefaultReader.prototype,{cancel:{enumerable:true},read:{enumerable:true},releaseLock:{enumerable:true},closed:{enumerable:true}});if(typeof SymbolPolyfill.toStringTag==="symbol"){Object.defineProperty(ReadableStreamDefaultReader.prototype,SymbolPolyfill.toStringTag,{value:"ReadableStreamDefaultReader",configurable:true})}function IsReadableStreamDefaultReader(x){if(!typeIsObject(x)){return false}if(!Object.prototype.hasOwnProperty.call(x,"_readRequests")){return false}return true}function ReadableStreamDefaultReaderRead(reader,readRequest){var stream=reader._ownerReadableStream;stream._disturbed=true;if(stream._state==="closed"){readRequest._closeSteps()}else if(stream._state==="errored"){readRequest._errorSteps(stream._storedError)}else{stream._readableStreamController[PullSteps](readRequest)}}function defaultReaderBrandCheckException(name){return new TypeError("ReadableStreamDefaultReader.prototype."+name+" can only be used on a ReadableStreamDefaultReader")}var _a;var AsyncIteratorPrototype;if(typeof SymbolPolyfill.asyncIterator==="symbol"){AsyncIteratorPrototype=(_a={},_a[SymbolPolyfill.asyncIterator]=function(){return this},_a);Object.defineProperty(AsyncIteratorPrototype,SymbolPolyfill.asyncIterator,{enumerable:false})}var ReadableStreamAsyncIteratorImpl=function(){function ReadableStreamAsyncIteratorImpl(reader,preventCancel){this._ongoingPromise=undefined;this._isFinished=false;this._reader=reader;this._preventCancel=preventCancel}ReadableStreamAsyncIteratorImpl.prototype.next=function(){var _this=this;var nextSteps=function(){return _this._nextSteps()};this._ongoingPromise=this._ongoingPromise?transformPromiseWith(this._ongoingPromise,nextSteps,nextSteps):nextSteps();return this._ongoingPromise};ReadableStreamAsyncIteratorImpl.prototype.return=function(value){var _this=this;var returnSteps=function(){return _this._returnSteps(value)};return this._ongoingPromise?transformPromiseWith(this._ongoingPromise,returnSteps,returnSteps):returnSteps()};ReadableStreamAsyncIteratorImpl.prototype._nextSteps=function(){var _this=this;if(this._isFinished){return Promise.resolve({value:undefined,done:true})}var reader=this._reader;if(reader._ownerReadableStream===undefined){return promiseRejectedWith(readerLockException("iterate"))}var resolvePromise;var rejectPromise;var promise=newPromise(function(resolve,reject){resolvePromise=resolve;rejectPromise=reject});var readRequest={_chunkSteps:function(chunk){_this._ongoingPromise=undefined;queueMicrotask(function(){return resolvePromise({value:chunk,done:false})})},_closeSteps:function(){_this._ongoingPromise=undefined;_this._isFinished=true;ReadableStreamReaderGenericRelease(reader);resolvePromise({value:undefined,done:true})},_errorSteps:function(reason){_this._ongoingPromise=undefined;_this._isFinished=true;ReadableStreamReaderGenericRelease(reader);rejectPromise(reason)}};ReadableStreamDefaultReaderRead(reader,readRequest);return promise};ReadableStreamAsyncIteratorImpl.prototype._returnSteps=function(value){if(this._isFinished){return Promise.resolve({value:value,done:true})}this._isFinished=true;var reader=this._reader;if(reader._ownerReadableStream===undefined){return promiseRejectedWith(readerLockException("finish iterating"))}if(!this._preventCancel){var result=ReadableStreamReaderGenericCancel(reader,value);ReadableStreamReaderGenericRelease(reader);return transformPromiseWith(result,function(){return{value:value,done:true}})}ReadableStreamReaderGenericRelease(reader);return promiseResolvedWith({value:value,done:true})};return ReadableStreamAsyncIteratorImpl}();var ReadableStreamAsyncIteratorPrototype={next:function(){if(!IsReadableStreamAsyncIterator(this)){return promiseRejectedWith(streamAsyncIteratorBrandCheckException("next"))}return this._asyncIteratorImpl.next()},return:function(value){if(!IsReadableStreamAsyncIterator(this)){return promiseRejectedWith(streamAsyncIteratorBrandCheckException("return"))}return this._asyncIteratorImpl.return(value)}};if(AsyncIteratorPrototype!==undefined){Object.setPrototypeOf(ReadableStreamAsyncIteratorPrototype,AsyncIteratorPrototype)}function AcquireReadableStreamAsyncIterator(stream,preventCancel){var reader=AcquireReadableStreamDefaultReader(stream);var impl=new ReadableStreamAsyncIteratorImpl(reader,preventCancel);var iterator=Object.create(ReadableStreamAsyncIteratorPrototype);iterator._asyncIteratorImpl=impl;return iterator}function IsReadableStreamAsyncIterator(x){if(!typeIsObject(x)){return false}if(!Object.prototype.hasOwnProperty.call(x,"_asyncIteratorImpl")){return false}return true}function streamAsyncIteratorBrandCheckException(name){return new TypeError("ReadableStreamAsyncIterator."+name+" can only be used on a ReadableSteamAsyncIterator")}var NumberIsNaN=Number.isNaN||function(x){return x!==x};function IsFiniteNonNegativeNumber(v){if(!IsNonNegativeNumber(v)){return false}if(v===Infinity){return false}return true}function IsNonNegativeNumber(v){if(typeof v!=="number"){return false}if(NumberIsNaN(v)){return false}if(v<0){return false}return true}function DequeueValue(container){var pair=container._queue.shift();container._queueTotalSize-=pair.size;if(container._queueTotalSize<0){container._queueTotalSize=0}return pair.value}function EnqueueValueWithSize(container,value,size){size=Number(size);if(!IsFiniteNonNegativeNumber(size)){throw new RangeError("Size must be a finite, non-NaN, non-negative number.")}container._queue.push({value:value,size:size});container._queueTotalSize+=size}function PeekQueueValue(container){var pair=container._queue.peek();return pair.value}function ResetQueue(container){container._queue=new SimpleQueue;container._queueTotalSize=0}function CreateArrayFromList(elements){return elements.slice()}function CopyDataBlockBytes(dest,destOffset,src,srcOffset,n){new Uint8Array(dest).set(new Uint8Array(src,srcOffset,n),destOffset)}function TransferArrayBuffer(O){return O}function IsDetachedBuffer(O){return false}var ReadableStreamBYOBRequest=function(){function ReadableStreamBYOBRequest(){throw new TypeError("Illegal constructor")}Object.defineProperty(ReadableStreamBYOBRequest.prototype,"view",{get:function(){if(!IsReadableStreamBYOBRequest(this)){throw byobRequestBrandCheckException("view")}return this._view},enumerable:false,configurable:true});ReadableStreamBYOBRequest.prototype.respond=function(bytesWritten){if(!IsReadableStreamBYOBRequest(this)){throw byobRequestBrandCheckException("respond")}assertRequiredArgument(bytesWritten,1,"respond");bytesWritten=convertUnsignedLongLongWithEnforceRange(bytesWritten,"First parameter");if(this._associatedReadableByteStreamController===undefined){throw new TypeError("This BYOB request has been invalidated")}if(IsDetachedBuffer(this._view.buffer));ReadableByteStreamControllerRespond(this._associatedReadableByteStreamController,bytesWritten)};ReadableStreamBYOBRequest.prototype.respondWithNewView=function(view){if(!IsReadableStreamBYOBRequest(this)){throw byobRequestBrandCheckException("respondWithNewView")}assertRequiredArgument(view,1,"respondWithNewView");if(!ArrayBuffer.isView(view)){throw new TypeError("You can only respond with array buffer views")}if(view.byteLength===0){throw new TypeError("chunk must have non-zero byteLength")}if(view.buffer.byteLength===0){throw new TypeError("chunk's buffer must have non-zero byteLength")}if(this._associatedReadableByteStreamController===undefined){throw new TypeError("This BYOB request has been invalidated")}ReadableByteStreamControllerRespondWithNewView(this._associatedReadableByteStreamController,view)};return ReadableStreamBYOBRequest}();Object.defineProperties(ReadableStreamBYOBRequest.prototype,{respond:{enumerable:true},respondWithNewView:{enumerable:true},view:{enumerable:true}});if(typeof SymbolPolyfill.toStringTag==="symbol"){Object.defineProperty(ReadableStreamBYOBRequest.prototype,SymbolPolyfill.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:true})}var ReadableByteStreamController=function(){function ReadableByteStreamController(){throw new TypeError("Illegal constructor")}Object.defineProperty(ReadableByteStreamController.prototype,"byobRequest",{get:function(){if(!IsReadableByteStreamController(this)){throw byteStreamControllerBrandCheckException("byobRequest")}if(this._byobRequest===null&&this._pendingPullIntos.length>0){var firstDescriptor=this._pendingPullIntos.peek();var view=new Uint8Array(firstDescriptor.buffer,firstDescriptor.byteOffset+firstDescriptor.bytesFilled,firstDescriptor.byteLength-firstDescriptor.bytesFilled);var byobRequest=Object.create(ReadableStreamBYOBRequest.prototype);SetUpReadableStreamBYOBRequest(byobRequest,this,view);this._byobRequest=byobRequest}return this._byobRequest},enumerable:false,configurable:true});Object.defineProperty(ReadableByteStreamController.prototype,"desiredSize",{get:function(){if(!IsReadableByteStreamController(this)){throw byteStreamControllerBrandCheckException("desiredSize")}return ReadableByteStreamControllerGetDesiredSize(this)},enumerable:false,configurable:true});ReadableByteStreamController.prototype.close=function(){if(!IsReadableByteStreamController(this)){throw byteStreamControllerBrandCheckException("close")}if(this._closeRequested){throw new TypeError("The stream has already been closed; do not close it again!")}var state=this._controlledReadableByteStream._state;if(state!=="readable"){throw new TypeError("The stream (in "+state+" state) is not in the readable state and cannot be closed")}ReadableByteStreamControllerClose(this)};ReadableByteStreamController.prototype.enqueue=function(chunk){if(!IsReadableByteStreamController(this)){throw byteStreamControllerBrandCheckException("enqueue")}assertRequiredArgument(chunk,1,"enqueue");if(!ArrayBuffer.isView(chunk)){throw new TypeError("chunk must be an array buffer view")}if(chunk.byteLength===0){throw new TypeError("chunk must have non-zero byteLength")}if(chunk.buffer.byteLength===0){throw new TypeError("chunk's buffer must have non-zero byteLength")}if(this._closeRequested){throw new TypeError("stream is closed or draining")}var state=this._controlledReadableByteStream._state;if(state!=="readable"){throw new TypeError("The stream (in "+state+" state) is not in the readable state and cannot be enqueued to")}ReadableByteStreamControllerEnqueue(this,chunk)};ReadableByteStreamController.prototype.error=function(e){if(e===void 0){e=undefined}if(!IsReadableByteStreamController(this)){throw byteStreamControllerBrandCheckException("error")}ReadableByteStreamControllerError(this,e)};ReadableByteStreamController.prototype[CancelSteps]=function(reason){if(this._pendingPullIntos.length>0){var firstDescriptor=this._pendingPullIntos.peek();firstDescriptor.bytesFilled=0}ResetQueue(this);var result=this._cancelAlgorithm(reason);ReadableByteStreamControllerClearAlgorithms(this);return result};ReadableByteStreamController.prototype[PullSteps]=function(readRequest){var stream=this._controlledReadableByteStream;if(this._queueTotalSize>0){var entry=this._queue.shift();this._queueTotalSize-=entry.byteLength;ReadableByteStreamControllerHandleQueueDrain(this);var view=new Uint8Array(entry.buffer,entry.byteOffset,entry.byteLength);readRequest._chunkSteps(view);return}var autoAllocateChunkSize=this._autoAllocateChunkSize;if(autoAllocateChunkSize!==undefined){var buffer=void 0;try{buffer=new ArrayBuffer(autoAllocateChunkSize)}catch(bufferE){readRequest._errorSteps(bufferE);return}var pullIntoDescriptor={buffer:buffer,byteOffset:0,byteLength:autoAllocateChunkSize,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(pullIntoDescriptor)}ReadableStreamAddReadRequest(stream,readRequest);ReadableByteStreamControllerCallPullIfNeeded(this)};return ReadableByteStreamController}();Object.defineProperties(ReadableByteStreamController.prototype,{close:{enumerable:true},enqueue:{enumerable:true},error:{enumerable:true},byobRequest:{enumerable:true},desiredSize:{enumerable:true}});if(typeof SymbolPolyfill.toStringTag==="symbol"){Object.defineProperty(ReadableByteStreamController.prototype,SymbolPolyfill.toStringTag,{value:"ReadableByteStreamController",configurable:true})}function IsReadableByteStreamController(x){if(!typeIsObject(x)){return false}if(!Object.prototype.hasOwnProperty.call(x,"_controlledReadableByteStream")){return false}return true}function IsReadableStreamBYOBRequest(x){if(!typeIsObject(x)){return false}if(!Object.prototype.hasOwnProperty.call(x,"_associatedReadableByteStreamController")){return false}return true}function ReadableByteStreamControllerCallPullIfNeeded(controller){var shouldPull=ReadableByteStreamControllerShouldCallPull(controller);if(!shouldPull){return}if(controller._pulling){controller._pullAgain=true;return}controller._pulling=true;var pullPromise=controller._pullAlgorithm();uponPromise(pullPromise,function(){controller._pulling=false;if(controller._pullAgain){controller._pullAgain=false;ReadableByteStreamControllerCallPullIfNeeded(controller)}},function(e){ReadableByteStreamControllerError(controller,e)})}function ReadableByteStreamControllerClearPendingPullIntos(controller){ReadableByteStreamControllerInvalidateBYOBRequest(controller);controller._pendingPullIntos=new SimpleQueue}function ReadableByteStreamControllerCommitPullIntoDescriptor(stream,pullIntoDescriptor){var done=false;if(stream._state==="closed"){done=true}var filledView=ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor);if(pullIntoDescriptor.readerType==="default"){ReadableStreamFulfillReadRequest(stream,filledView,done)}else{ReadableStreamFulfillReadIntoRequest(stream,filledView,done)}}function ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor){var bytesFilled=pullIntoDescriptor.bytesFilled;var elementSize=pullIntoDescriptor.elementSize;return new pullIntoDescriptor.viewConstructor(pullIntoDescriptor.buffer,pullIntoDescriptor.byteOffset,bytesFilled/elementSize)}function ReadableByteStreamControllerEnqueueChunkToQueue(controller,buffer,byteOffset,byteLength){controller._queue.push({buffer:buffer,byteOffset:byteOffset,byteLength:byteLength});controller._queueTotalSize+=byteLength}function ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller,pullIntoDescriptor){var elementSize=pullIntoDescriptor.elementSize;var currentAlignedBytes=pullIntoDescriptor.bytesFilled-pullIntoDescriptor.bytesFilled%elementSize;var maxBytesToCopy=Math.min(controller._queueTotalSize,pullIntoDescriptor.byteLength-pullIntoDescriptor.bytesFilled);var maxBytesFilled=pullIntoDescriptor.bytesFilled+maxBytesToCopy;var maxAlignedBytes=maxBytesFilled-maxBytesFilled%elementSize;var totalBytesToCopyRemaining=maxBytesToCopy;var ready=false;if(maxAlignedBytes>currentAlignedBytes){totalBytesToCopyRemaining=maxAlignedBytes-pullIntoDescriptor.bytesFilled;ready=true}var queue=controller._queue;while(totalBytesToCopyRemaining>0){var headOfQueue=queue.peek();var bytesToCopy=Math.min(totalBytesToCopyRemaining,headOfQueue.byteLength);var destStart=pullIntoDescriptor.byteOffset+pullIntoDescriptor.bytesFilled;CopyDataBlockBytes(pullIntoDescriptor.buffer,destStart,headOfQueue.buffer,headOfQueue.byteOffset,bytesToCopy);if(headOfQueue.byteLength===bytesToCopy){queue.shift()}else{headOfQueue.byteOffset+=bytesToCopy;headOfQueue.byteLength-=bytesToCopy}controller._queueTotalSize-=bytesToCopy;ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller,bytesToCopy,pullIntoDescriptor);totalBytesToCopyRemaining-=bytesToCopy}return ready}function ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller,size,pullIntoDescriptor){ReadableByteStreamControllerInvalidateBYOBRequest(controller);pullIntoDescriptor.bytesFilled+=size}function ReadableByteStreamControllerHandleQueueDrain(controller){if(controller._queueTotalSize===0&&controller._closeRequested){ReadableByteStreamControllerClearAlgorithms(controller);ReadableStreamClose(controller._controlledReadableByteStream)}else{ReadableByteStreamControllerCallPullIfNeeded(controller)}}function ReadableByteStreamControllerInvalidateBYOBRequest(controller){if(controller._byobRequest===null){return}controller._byobRequest._associatedReadableByteStreamController=undefined;controller._byobRequest._view=null;controller._byobRequest=null}function ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller){while(controller._pendingPullIntos.length>0){if(controller._queueTotalSize===0){return}var pullIntoDescriptor=controller._pendingPullIntos.peek();if(ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller,pullIntoDescriptor)){ReadableByteStreamControllerShiftPendingPullInto(controller);ReadableByteStreamControllerCommitPullIntoDescriptor(controller._controlledReadableByteStream,pullIntoDescriptor)}}}function ReadableByteStreamControllerPullInto(controller,view,readIntoRequest){var stream=controller._controlledReadableByteStream;var elementSize=1;if(view.constructor!==DataView){elementSize=view.constructor.BYTES_PER_ELEMENT}var ctor=view.constructor;var buffer=TransferArrayBuffer(view.buffer);var pullIntoDescriptor={buffer:buffer,byteOffset:view.byteOffset,byteLength:view.byteLength,bytesFilled:0,elementSize:elementSize,viewConstructor:ctor,readerType:"byob"};if(controller._pendingPullIntos.length>0){controller._pendingPullIntos.push(pullIntoDescriptor);ReadableStreamAddReadIntoRequest(stream,readIntoRequest);return}if(stream._state==="closed"){var emptyView=new ctor(pullIntoDescriptor.buffer,pullIntoDescriptor.byteOffset,0);readIntoRequest._closeSteps(emptyView);return}if(controller._queueTotalSize>0){if(ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller,pullIntoDescriptor)){var filledView=ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor);ReadableByteStreamControllerHandleQueueDrain(controller);readIntoRequest._chunkSteps(filledView);return}if(controller._closeRequested){var e=new TypeError("Insufficient bytes to fill elements in the given buffer");ReadableByteStreamControllerError(controller,e);readIntoRequest._errorSteps(e);return}}controller._pendingPullIntos.push(pullIntoDescriptor);ReadableStreamAddReadIntoRequest(stream,readIntoRequest);ReadableByteStreamControllerCallPullIfNeeded(controller)}function ReadableByteStreamControllerRespondInClosedState(controller,firstDescriptor){firstDescriptor.buffer=TransferArrayBuffer(firstDescriptor.buffer);var stream=controller._controlledReadableByteStream;if(ReadableStreamHasBYOBReader(stream)){while(ReadableStreamGetNumReadIntoRequests(stream)>0){var pullIntoDescriptor=ReadableByteStreamControllerShiftPendingPullInto(controller);ReadableByteStreamControllerCommitPullIntoDescriptor(stream,pullIntoDescriptor)}}}function ReadableByteStreamControllerRespondInReadableState(controller,bytesWritten,pullIntoDescriptor){if(pullIntoDescriptor.bytesFilled+bytesWritten>pullIntoDescriptor.byteLength){throw new RangeError("bytesWritten out of range")}ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller,bytesWritten,pullIntoDescriptor);if(pullIntoDescriptor.bytesFilled<pullIntoDescriptor.elementSize){return}ReadableByteStreamControllerShiftPendingPullInto(controller);var remainderSize=pullIntoDescriptor.bytesFilled%pullIntoDescriptor.elementSize;if(remainderSize>0){var end=pullIntoDescriptor.byteOffset+pullIntoDescriptor.bytesFilled;var remainder=pullIntoDescriptor.buffer.slice(end-remainderSize,end);ReadableByteStreamControllerEnqueueChunkToQueue(controller,remainder,0,remainder.byteLength)}pullIntoDescriptor.buffer=TransferArrayBuffer(pullIntoDescriptor.buffer);pullIntoDescriptor.bytesFilled-=remainderSize;ReadableByteStreamControllerCommitPullIntoDescriptor(controller._controlledReadableByteStream,pullIntoDescriptor);ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller)}function ReadableByteStreamControllerRespondInternal(controller,bytesWritten){var firstDescriptor=controller._pendingPullIntos.peek();var stream=controller._controlledReadableByteStream;if(stream._state==="closed"){if(bytesWritten!==0){throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}ReadableByteStreamControllerRespondInClosedState(controller,firstDescriptor)}else{ReadableByteStreamControllerRespondInReadableState(controller,bytesWritten,firstDescriptor)}ReadableByteStreamControllerCallPullIfNeeded(controller)}function ReadableByteStreamControllerShiftPendingPullInto(controller){var descriptor=controller._pendingPullIntos.shift();ReadableByteStreamControllerInvalidateBYOBRequest(controller);return descriptor}function ReadableByteStreamControllerShouldCallPull(controller){var stream=controller._controlledReadableByteStream;if(stream._state!=="readable"){return false}if(controller._closeRequested){return false}if(!controller._started){return false}if(ReadableStreamHasDefaultReader(stream)&&ReadableStreamGetNumReadRequests(stream)>0){return true}if(ReadableStreamHasBYOBReader(stream)&&ReadableStreamGetNumReadIntoRequests(stream)>0){return true}var desiredSize=ReadableByteStreamControllerGetDesiredSize(controller);if(desiredSize>0){return true}return false}function ReadableByteStreamControllerClearAlgorithms(controller){controller._pullAlgorithm=undefined;controller._cancelAlgorithm=undefined}function ReadableByteStreamControllerClose(controller){var stream=controller._controlledReadableByteStream;if(controller._closeRequested||stream._state!=="readable"){return}if(controller._queueTotalSize>0){controller._closeRequested=true;return}if(controller._pendingPullIntos.length>0){var firstPendingPullInto=controller._pendingPullIntos.peek();if(firstPendingPullInto.bytesFilled>0){var e=new TypeError("Insufficient bytes to fill elements in the given buffer");ReadableByteStreamControllerError(controller,e);throw e}}ReadableByteStreamControllerClearAlgorithms(controller);ReadableStreamClose(stream)}function ReadableByteStreamControllerEnqueue(controller,chunk){var stream=controller._controlledReadableByteStream;if(controller._closeRequested||stream._state!=="readable"){return}var buffer=chunk.buffer;var byteOffset=chunk.byteOffset;var byteLength=chunk.byteLength;var transferredBuffer=TransferArrayBuffer(buffer);if(ReadableStreamHasDefaultReader(stream)){if(ReadableStreamGetNumReadRequests(stream)===0){ReadableByteStreamControllerEnqueueChunkToQueue(controller,transferredBuffer,byteOffset,byteLength)}else{var transferredView=new Uint8Array(transferredBuffer,byteOffset,byteLength);ReadableStreamFulfillReadRequest(stream,transferredView,false)}}else if(ReadableStreamHasBYOBReader(stream)){ReadableByteStreamControllerEnqueueChunkToQueue(controller,transferredBuffer,byteOffset,byteLength);ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller)}else{ReadableByteStreamControllerEnqueueChunkToQueue(controller,transferredBuffer,byteOffset,byteLength)}ReadableByteStreamControllerCallPullIfNeeded(controller)}function ReadableByteStreamControllerError(controller,e){var stream=controller._controlledReadableByteStream;if(stream._state!=="readable"){return}ReadableByteStreamControllerClearPendingPullIntos(controller);ResetQueue(controller);ReadableByteStreamControllerClearAlgorithms(controller);ReadableStreamError(stream,e)}function ReadableByteStreamControllerGetDesiredSize(controller){var stream=controller._controlledReadableByteStream;var state=stream._state;if(state==="errored"){return null}if(state==="closed"){return 0}return controller._strategyHWM-controller._queueTotalSize}function ReadableByteStreamControllerRespond(controller,bytesWritten){bytesWritten=Number(bytesWritten);if(!IsFiniteNonNegativeNumber(bytesWritten)){throw new RangeError("bytesWritten must be a finite")}ReadableByteStreamControllerRespondInternal(controller,bytesWritten)}function ReadableByteStreamControllerRespondWithNewView(controller,view){var firstDescriptor=controller._pendingPullIntos.peek();if(firstDescriptor.byteOffset+firstDescriptor.bytesFilled!==view.byteOffset){throw new RangeError("The region specified by view does not match byobRequest")}if(firstDescriptor.byteLength!==view.byteLength){throw new RangeError("The buffer of view has different capacity than byobRequest")}firstDescriptor.buffer=view.buffer;ReadableByteStreamControllerRespondInternal(controller,view.byteLength)}function SetUpReadableByteStreamController(stream,controller,startAlgorithm,pullAlgorithm,cancelAlgorithm,highWaterMark,autoAllocateChunkSize){controller._controlledReadableByteStream=stream;controller._pullAgain=false;controller._pulling=false;controller._byobRequest=null;controller._queue=controller._queueTotalSize=undefined;ResetQueue(controller);controller._closeRequested=false;controller._started=false;controller._strategyHWM=highWaterMark;controller._pullAlgorithm=pullAlgorithm;controller._cancelAlgorithm=cancelAlgorithm;controller._autoAllocateChunkSize=autoAllocateChunkSize;controller._pendingPullIntos=new SimpleQueue;stream._readableStreamController=controller;var startResult=startAlgorithm();uponPromise(promiseResolvedWith(startResult),function(){controller._started=true;ReadableByteStreamControllerCallPullIfNeeded(controller)},function(r){ReadableByteStreamControllerError(controller,r)})}function SetUpReadableByteStreamControllerFromUnderlyingSource(stream,underlyingByteSource,highWaterMark){var controller=Object.create(ReadableByteStreamController.prototype);var startAlgorithm=function(){return undefined};var pullAlgorithm=function(){return promiseResolvedWith(undefined)};var cancelAlgorithm=function(){return promiseResolvedWith(undefined)};if(underlyingByteSource.start!==undefined){startAlgorithm=function(){return underlyingByteSource.start(controller)}}if(underlyingByteSource.pull!==undefined){pullAlgorithm=function(){return underlyingByteSource.pull(controller)}}if(underlyingByteSource.cancel!==undefined){cancelAlgorithm=function(reason){return underlyingByteSource.cancel(reason)}}var autoAllocateChunkSize=underlyingByteSource.autoAllocateChunkSize;SetUpReadableByteStreamController(stream,controller,startAlgorithm,pullAlgorithm,cancelAlgorithm,highWaterMark,autoAllocateChunkSize)}function SetUpReadableStreamBYOBRequest(request,controller,view){request._associatedReadableByteStreamController=controller;request._view=view}function byobRequestBrandCheckException(name){return new TypeError("ReadableStreamBYOBRequest.prototype."+name+" can only be used on a ReadableStreamBYOBRequest")}function byteStreamControllerBrandCheckException(name){return new TypeError("ReadableByteStreamController.prototype."+name+" can only be used on a ReadableByteStreamController")}function AcquireReadableStreamBYOBReader(stream){return new ReadableStreamBYOBReader(stream)}function ReadableStreamAddReadIntoRequest(stream,readIntoRequest){stream._reader._readIntoRequests.push(readIntoRequest)}function ReadableStreamFulfillReadIntoRequest(stream,chunk,done){var reader=stream._reader;var readIntoRequest=reader._readIntoRequests.shift();if(done){readIntoRequest._closeSteps(chunk)}else{readIntoRequest._chunkSteps(chunk)}}function ReadableStreamGetNumReadIntoRequests(stream){return stream._reader._readIntoRequests.length}function ReadableStreamHasBYOBReader(stream){var reader=stream._reader;if(reader===undefined){return false}if(!IsReadableStreamBYOBReader(reader)){return false}return true}var ReadableStreamBYOBReader=function(){function ReadableStreamBYOBReader(stream){assertRequiredArgument(stream,1,"ReadableStreamBYOBReader");assertReadableStream(stream,"First parameter");if(IsReadableStreamLocked(stream)){throw new TypeError("This stream has already been locked for exclusive reading by another reader")}if(!IsReadableByteStreamController(stream._readableStreamController)){throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte "+"source")}ReadableStreamReaderGenericInitialize(this,stream);this._readIntoRequests=new SimpleQueue}Object.defineProperty(ReadableStreamBYOBReader.prototype,"closed",{get:function(){if(!IsReadableStreamBYOBReader(this)){return promiseRejectedWith(byobReaderBrandCheckException("closed"))}return this._closedPromise},enumerable:false,configurable:true});ReadableStreamBYOBReader.prototype.cancel=function(reason){if(reason===void 0){reason=undefined}if(!IsReadableStreamBYOBReader(this)){return promiseRejectedWith(byobReaderBrandCheckException("cancel"))}if(this._ownerReadableStream===undefined){return promiseRejectedWith(readerLockException("cancel"))}return ReadableStreamReaderGenericCancel(this,reason)};ReadableStreamBYOBReader.prototype.read=function(view){if(!IsReadableStreamBYOBReader(this)){return promiseRejectedWith(byobReaderBrandCheckException("read"))}if(!ArrayBuffer.isView(view)){return promiseRejectedWith(new TypeError("view must be an array buffer view"))}if(view.byteLength===0){return promiseRejectedWith(new TypeError("view must have non-zero byteLength"))}if(view.buffer.byteLength===0){return promiseRejectedWith(new TypeError("view's buffer must have non-zero byteLength"))}if(this._ownerReadableStream===undefined){return promiseRejectedWith(readerLockException("read from"))}var resolvePromise;var rejectPromise;var promise=newPromise(function(resolve,reject){resolvePromise=resolve;rejectPromise=reject});var readIntoRequest={_chunkSteps:function(chunk){return resolvePromise({value:chunk,done:false})},_closeSteps:function(chunk){return resolvePromise({value:chunk,done:true})},_errorSteps:function(e){return rejectPromise(e)}};ReadableStreamBYOBReaderRead(this,view,readIntoRequest);return promise};ReadableStreamBYOBReader.prototype.releaseLock=function(){if(!IsReadableStreamBYOBReader(this)){throw byobReaderBrandCheckException("releaseLock")}if(this._ownerReadableStream===undefined){return}if(this._readIntoRequests.length>0){throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled")}ReadableStreamReaderGenericRelease(this)};return ReadableStreamBYOBReader}();Object.defineProperties(ReadableStreamBYOBReader.prototype,{cancel:{enumerable:true},read:{enumerable:true},releaseLock:{enumerable:true},closed:{enumerable:true}});if(typeof SymbolPolyfill.toStringTag==="symbol"){Object.defineProperty(ReadableStreamBYOBReader.prototype,SymbolPolyfill.toStringTag,{value:"ReadableStreamBYOBReader",configurable:true})}function IsReadableStreamBYOBReader(x){if(!typeIsObject(x)){return false}if(!Object.prototype.hasOwnProperty.call(x,"_readIntoRequests")){return false}return true}function ReadableStreamBYOBReaderRead(reader,view,readIntoRequest){var stream=reader._ownerReadableStream;stream._disturbed=true;if(stream._state==="errored"){readIntoRequest._errorSteps(stream._storedError)}else{ReadableByteStreamControllerPullInto(stream._readableStreamController,view,readIntoRequest)}}function byobReaderBrandCheckException(name){return new TypeError("ReadableStreamBYOBReader.prototype."+name+" can only be used on a ReadableStreamBYOBReader")}function ExtractHighWaterMark(strategy,defaultHWM){var highWaterMark=strategy.highWaterMark;if(highWaterMark===undefined){return defaultHWM}if(NumberIsNaN(highWaterMark)||highWaterMark<0){throw new RangeError("Invalid highWaterMark")}return highWaterMark}function ExtractSizeAlgorithm(strategy){var size=strategy.size;if(!size){return function(){return 1}}return size}function convertQueuingStrategy(init,context){assertDictionary(init,context);var highWaterMark=init===null||init===void 0?void 0:init.highWaterMark;var size=init===null||init===void 0?void 0:init.size;return{highWaterMark:highWaterMark===undefined?undefined:convertUnrestrictedDouble(highWaterMark),size:size===undefined?undefined:convertQueuingStrategySize(size,context+" has member 'size' that")}}function convertQueuingStrategySize(fn,context){assertFunction(fn,context);return function(chunk){return convertUnrestrictedDouble(fn(chunk))}}function convertUnderlyingSink(original,context){assertDictionary(original,context);var abort=original===null||original===void 0?void 0:original.abort;var close=original===null||original===void 0?void 0:original.close;var start=original===null||original===void 0?void 0:original.start;var type=original===null||original===void 0?void 0:original.type;var write=original===null||original===void 0?void 0:original.write;return{abort:abort===undefined?undefined:convertUnderlyingSinkAbortCallback(abort,original,context+" has member 'abort' that"),close:close===undefined?undefined:convertUnderlyingSinkCloseCallback(close,original,context+" has member 'close' that"),start:start===undefined?undefined:convertUnderlyingSinkStartCallback(start,original,context+" has member 'start' that"),write:write===undefined?undefined:convertUnderlyingSinkWriteCallback(write,original,context+" has member 'write' that"),type:type}}function convertUnderlyingSinkAbortCallback(fn,original,context){assertFunction(fn,context);return function(reason){return promiseCall(fn,original,[reason])}}function convertUnderlyingSinkCloseCallback(fn,original,context){assertFunction(fn,context);return function(){return promiseCall(fn,original,[])}}function convertUnderlyingSinkStartCallback(fn,original,context){assertFunction(fn,context);return function(controller){return reflectCall(fn,original,[controller])}}function convertUnderlyingSinkWriteCallback(fn,original,context){assertFunction(fn,context);return function(chunk,controller){return promiseCall(fn,original,[chunk,controller])}}function assertWritableStream(x,context){if(!IsWritableStream(x)){throw new TypeError(context+" is not a WritableStream.")}}var WritableStream=function(){function WritableStream(rawUnderlyingSink,rawStrategy){if(rawUnderlyingSink===void 0){rawUnderlyingSink={}}if(rawStrategy===void 0){rawStrategy={}}if(rawUnderlyingSink===undefined){rawUnderlyingSink=null}else{assertObject(rawUnderlyingSink,"First parameter")}var strategy=convertQueuingStrategy(rawStrategy,"Second parameter");var underlyingSink=convertUnderlyingSink(rawUnderlyingSink,"First parameter");InitializeWritableStream(this);var type=underlyingSink.type;if(type!==undefined){throw new RangeError("Invalid type is specified")}var sizeAlgorithm=ExtractSizeAlgorithm(strategy);var highWaterMark=ExtractHighWaterMark(strategy,1);SetUpWritableStreamDefaultControllerFromUnderlyingSink(this,underlyingSink,highWaterMark,sizeAlgorithm)}Object.defineProperty(WritableStream.prototype,"locked",{get:function(){if(!IsWritableStream(this)){throw streamBrandCheckException("locked")}return IsWritableStreamLocked(this)},enumerable:false,configurable:true});WritableStream.prototype.abort=function(reason){if(reason===void 0){reason=undefined}if(!IsWritableStream(this)){return promiseRejectedWith(streamBrandCheckException("abort"))}if(IsWritableStreamLocked(this)){return promiseRejectedWith(new TypeError("Cannot abort a stream that already has a writer"))}return WritableStreamAbort(this,reason)};WritableStream.prototype.close=function(){if(!IsWritableStream(this)){return promiseRejectedWith(streamBrandCheckException("close"))}if(IsWritableStreamLocked(this)){return promiseRejectedWith(new TypeError("Cannot close a stream that already has a writer"))}if(WritableStreamCloseQueuedOrInFlight(this)){return promiseRejectedWith(new TypeError("Cannot close an already-closing stream"))}return WritableStreamClose(this)};WritableStream.prototype.getWriter=function(){if(!IsWritableStream(this)){throw streamBrandCheckException("getWriter")}return AcquireWritableStreamDefaultWriter(this)};return WritableStream}();Object.defineProperties(WritableStream.prototype,{abort:{enumerable:true},close:{enumerable:true},getWriter:{enumerable:true},locked:{enumerable:true}});if(typeof SymbolPolyfill.toStringTag==="symbol"){Object.defineProperty(WritableStream.prototype,SymbolPolyfill.toStringTag,{value:"WritableStream",configurable:true})}function AcquireWritableStreamDefaultWriter(stream){return new WritableStreamDefaultWriter(stream)}function CreateWritableStream(startAlgorithm,writeAlgorithm,closeAlgorithm,abortAlgorithm,highWaterMark,sizeAlgorithm){if(highWaterMark===void 0){highWaterMark=1}if(sizeAlgorithm===void 0){sizeAlgorithm=function(){return 1}}var stream=Object.create(WritableStream.prototype);InitializeWritableStream(stream);var controller=Object.create(WritableStreamDefaultController.prototype);SetUpWritableStreamDefaultController(stream,controller,startAlgorithm,writeAlgorithm,closeAlgorithm,abortAlgorithm,highWaterMark,sizeAlgorithm);return stream}function InitializeWritableStream(stream){stream._state="writable";stream._storedError=undefined;stream._writer=undefined;stream._writableStreamController=undefined;stream._writeRequests=new SimpleQueue;stream._inFlightWriteRequest=undefined;stream._closeRequest=undefined;stream._inFlightCloseRequest=undefined;stream._pendingAbortRequest=undefined;stream._backpressure=false}function IsWritableStream(x){if(!typeIsObject(x)){return false}if(!Object.prototype.hasOwnProperty.call(x,"_writableStreamController")){return false}return true}function IsWritableStreamLocked(stream){if(stream._writer===undefined){return false}return true}function WritableStreamAbort(stream,reason){var state=stream._state;if(state==="closed"||state==="errored"){return promiseResolvedWith(undefined)}if(stream._pendingAbortRequest!==undefined){return stream._pendingAbortRequest._promise}var wasAlreadyErroring=false;if(state==="erroring"){wasAlreadyErroring=true;reason=undefined}var promise=newPromise(function(resolve,reject){stream._pendingAbortRequest={_promise:undefined,_resolve:resolve,_reject:reject,_reason:reason,_wasAlreadyErroring:wasAlreadyErroring}});stream._pendingAbortRequest._promise=promise;if(!wasAlreadyErroring){WritableStreamStartErroring(stream,reason)}return promise}function WritableStreamClose(stream){var state=stream._state;if(state==="closed"||state==="errored"){return promiseRejectedWith(new TypeError("The stream (in "+state+" state) is not in the writable state and cannot be closed"))}var promise=newPromise(function(resolve,reject){var closeRequest={_resolve:resolve,_reject:reject};stream._closeRequest=closeRequest});var writer=stream._writer;if(writer!==undefined&&stream._backpressure&&state==="writable"){defaultWriterReadyPromiseResolve(writer)}WritableStreamDefaultControllerClose(stream._writableStreamController);return promise}function WritableStreamAddWriteRequest(stream){var promise=newPromise(function(resolve,reject){var writeRequest={_resolve:resolve,_reject:reject};stream._writeRequests.push(writeRequest)});return promise}function WritableStreamDealWithRejection(stream,error){var state=stream._state;if(state==="writable"){WritableStreamStartErroring(stream,error);return}WritableStreamFinishErroring(stream)}function WritableStreamStartErroring(stream,reason){var controller=stream._writableStreamController;stream._state="erroring";stream._storedError=reason;var writer=stream._writer;if(writer!==undefined){WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer,reason)}if(!WritableStreamHasOperationMarkedInFlight(stream)&&controller._started){WritableStreamFinishErroring(stream)}}function WritableStreamFinishErroring(stream){stream._state="errored";stream._writableStreamController[ErrorSteps]();var storedError=stream._storedError;stream._writeRequests.forEach(function(writeRequest){writeRequest._reject(storedError)});stream._writeRequests=new SimpleQueue;if(stream._pendingAbortRequest===undefined){WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream);return}var abortRequest=stream._pendingAbortRequest;stream._pendingAbortRequest=undefined;if(abortRequest._wasAlreadyErroring){abortRequest._reject(storedError);WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream);return}var promise=stream._writableStreamController[AbortSteps](abortRequest._reason);uponPromise(promise,function(){abortRequest._resolve();WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream)},function(reason){abortRequest._reject(reason);WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream)})}function WritableStreamFinishInFlightWrite(stream){stream._inFlightWriteRequest._resolve(undefined);stream._inFlightWriteRequest=undefined}function WritableStreamFinishInFlightWriteWithError(stream,error){stream._inFlightWriteRequest._reject(error);stream._inFlightWriteRequest=undefined;WritableStreamDealWithRejection(stream,error)}function WritableStreamFinishInFlightClose(stream){stream._inFlightCloseRequest._resolve(undefined);stream._inFlightCloseRequest=undefined;var state=stream._state;if(state==="erroring"){stream._storedError=undefined;if(stream._pendingAbortRequest!==undefined){stream._pendingAbortRequest._resolve();stream._pendingAbortRequest=undefined}}stream._state="closed";var writer=stream._writer;if(writer!==undefined){defaultWriterClosedPromiseResolve(writer)}}function WritableStreamFinishInFlightCloseWithError(stream,error){stream._inFlightCloseRequest._reject(error);stream._inFlightCloseRequest=undefined;if(stream._pendingAbortRequest!==undefined){stream._pendingAbortRequest._reject(error);stream._pendingAbortRequest=undefined}WritableStreamDealWithRejection(stream,error)}function WritableStreamCloseQueuedOrInFlight(stream){if(stream._closeRequest===undefined&&stream._inFlightCloseRequest===undefined){return false}return true}function WritableStreamHasOperationMarkedInFlight(stream){if(stream._inFlightWriteRequest===undefined&&stream._inFlightCloseRequest===undefined){return false}return true}function WritableStreamMarkCloseRequestInFlight(stream){stream._inFlightCloseRequest=stream._closeRequest;stream._closeRequest=undefined}function WritableStreamMarkFirstWriteRequestInFlight(stream){stream._inFlightWriteRequest=stream._writeRequests.shift()}function WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream){if(stream._closeRequest!==undefined){stream._closeRequest._reject(stream._storedError);stream._closeRequest=undefined}var writer=stream._writer;if(writer!==undefined){defaultWriterClosedPromiseReject(writer,stream._storedError)}}function WritableStreamUpdateBackpressure(stream,backpressure){var writer=stream._writer;if(writer!==undefined&&backpressure!==stream._backpressure){if(backpressure){defaultWriterReadyPromiseReset(writer)}else{defaultWriterReadyPromiseResolve(writer)}}stream._backpressure=backpressure}var WritableStreamDefaultWriter=function(){function WritableStreamDefaultWriter(stream){assertRequiredArgument(stream,1,"WritableStreamDefaultWriter");assertWritableStream(stream,"First parameter");if(IsWritableStreamLocked(stream)){throw new TypeError("This stream has already been locked for exclusive writing by another writer")}this._ownerWritableStream=stream;stream._writer=this;var state=stream._state;if(state==="writable"){if(!WritableStreamCloseQueuedOrInFlight(stream)&&stream._backpressure){defaultWriterReadyPromiseInitialize(this)}else{defaultWriterReadyPromiseInitializeAsResolved(this)}defaultWriterClosedPromiseInitialize(this)}else if(state==="erroring"){defaultWriterReadyPromiseInitializeAsRejected(this,stream._storedError);defaultWriterClosedPromiseInitialize(this)}else if(state==="closed"){defaultWriterReadyPromiseInitializeAsResolved(this);defaultWriterClosedPromiseInitializeAsResolved(this)}else{var storedError=stream._storedError;defaultWriterReadyPromiseInitializeAsRejected(this,storedError);defaultWriterClosedPromiseInitializeAsRejected(this,storedError)}}Object.defineProperty(WritableStreamDefaultWriter.prototype,"closed",{get:function(){if(!IsWritableStreamDefaultWriter(this)){return promiseRejectedWith(defaultWriterBrandCheckException("closed"))}return this._closedPromise},enumerable:false,configurable:true});Object.defineProperty(WritableStreamDefaultWriter.prototype,"desiredSize",{get:function(){if(!IsWritableStreamDefaultWriter(this)){throw defaultWriterBrandCheckException("desiredSize")}if(this._ownerWritableStream===undefined){throw defaultWriterLockException("desiredSize")}return WritableStreamDefaultWriterGetDesiredSize(this)},enumerable:false,configurable:true});Object.defineProperty(WritableStreamDefaultWriter.prototype,"ready",{get:function(){if(!IsWritableStreamDefaultWriter(this)){return promiseRejectedWith(defaultWriterBrandCheckException("ready"))}return this._readyPromise},enumerable:false,configurable:true});WritableStreamDefaultWriter.prototype.abort=function(reason){if(reason===void 0){reason=undefined}if(!IsWritableStreamDefaultWriter(this)){return promiseRejectedWith(defaultWriterBrandCheckException("abort"))}if(this._ownerWritableStream===undefined){return promiseRejectedWith(defaultWriterLockException("abort"))}return WritableStreamDefaultWriterAbort(this,reason)};WritableStreamDefaultWriter.prototype.close=function(){if(!IsWritableStreamDefaultWriter(this)){return promiseRejectedWith(defaultWriterBrandCheckException("close"))}var stream=this._ownerWritableStream;if(stream===undefined){return promiseRejectedWith(defaultWriterLockException("close"))}if(WritableStreamCloseQueuedOrInFlight(stream)){return promiseRejectedWith(new TypeError("Cannot close an already-closing stream"))}return WritableStreamDefaultWriterClose(this)};WritableStreamDefaultWriter.prototype.releaseLock=function(){if(!IsWritableStreamDefaultWriter(this)){throw defaultWriterBrandCheckException("releaseLock")}var stream=this._ownerWritableStream;if(stream===undefined){return}WritableStreamDefaultWriterRelease(this)};WritableStreamDefaultWriter.prototype.write=function(chunk){if(chunk===void 0){chunk=undefined}if(!IsWritableStreamDefaultWriter(this)){return promiseRejectedWith(defaultWriterBrandCheckException("write"))}if(this._ownerWritableStream===undefined){return promiseRejectedWith(defaultWriterLockException("write to"))}return WritableStreamDefaultWriterWrite(this,chunk)};return WritableStreamDefaultWriter}();Object.defineProperties(WritableStreamDefaultWriter.prototype,{abort:{enumerable:true},close:{enumerable:true},releaseLock:{enumerable:true},write:{enumerable:true},closed:{enumerable:true},desiredSize:{enumerable:true},ready:{enumerable:true}});if(typeof SymbolPolyfill.toStringTag==="symbol"){Object.defineProperty(WritableStreamDefaultWriter.prototype,SymbolPolyfill.toStringTag,{value:"WritableStreamDefaultWriter",configurable:true})}function IsWritableStreamDefaultWriter(x){if(!typeIsObject(x)){return false}if(!Object.prototype.hasOwnProperty.call(x,"_ownerWritableStream")){return false}return true}function WritableStreamDefaultWriterAbort(writer,reason){var stream=writer._ownerWritableStream;return WritableStreamAbort(stream,reason)}function WritableStreamDefaultWriterClose(writer){var stream=writer._ownerWritableStream;return WritableStreamClose(stream)}function WritableStreamDefaultWriterCloseWithErrorPropagation(writer){var stream=writer._ownerWritableStream;var state=stream._state;if(WritableStreamCloseQueuedOrInFlight(stream)||state==="closed"){return promiseResolvedWith(undefined)}if(state==="errored"){return promiseRejectedWith(stream._storedError)}return WritableStreamDefaultWriterClose(writer)}function WritableStreamDefaultWriterEnsureClosedPromiseRejected(writer,error){if(writer._closedPromiseState==="pending"){defaultWriterClosedPromiseReject(writer,error)}else{defaultWriterClosedPromiseResetToRejected(writer,error)}}function WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer,error){if(writer._readyPromiseState==="pending"){defaultWriterReadyPromiseReject(writer,error)}else{defaultWriterReadyPromiseResetToRejected(writer,error)}}function WritableStreamDefaultWriterGetDesiredSize(writer){var stream=writer._ownerWritableStream;var state=stream._state;if(state==="errored"||state==="erroring"){return null}if(state==="closed"){return 0}return WritableStreamDefaultControllerGetDesiredSize(stream._writableStreamController)}function WritableStreamDefaultWriterRelease(writer){var stream=writer._ownerWritableStream;var releasedError=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer,releasedError);WritableStreamDefaultWriterEnsureClosedPromiseRejected(writer,releasedError);stream._writer=undefined;writer._ownerWritableStream=undefined}function WritableStreamDefaultWriterWrite(writer,chunk){var stream=writer._ownerWritableStream;var controller=stream._writableStreamController;var chunkSize=WritableStreamDefaultControllerGetChunkSize(controller,chunk);if(stream!==writer._ownerWritableStream){return promiseRejectedWith(defaultWriterLockException("write to"))}var state=stream._state;if(state==="errored"){return promiseRejectedWith(stream._storedError)}if(WritableStreamCloseQueuedOrInFlight(stream)||state==="closed"){return promiseRejectedWith(new TypeError("The stream is closing or closed and cannot be written to"))}if(state==="erroring"){return promiseRejectedWith(stream._storedError)}var promise=WritableStreamAddWriteRequest(stream);WritableStreamDefaultControllerWrite(controller,chunk,chunkSize);return promise}var closeSentinel={};var WritableStreamDefaultController=function(){function WritableStreamDefaultController(){throw new TypeError("Illegal constructor")}WritableStreamDefaultController.prototype.error=function(e){if(e===void 0){e=undefined}if(!IsWritableStreamDefaultController(this)){throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController")}var state=this._controlledWritableStream._state;if(state!=="writable"){return}WritableStreamDefaultControllerError(this,e)};WritableStreamDefaultController.prototype[AbortSteps]=function(reason){var result=this._abortAlgorithm(reason);WritableStreamDefaultControllerClearAlgorithms(this);return result};WritableStreamDefaultController.prototype[ErrorSteps]=function(){ResetQueue(this)};return WritableStreamDefaultController}();Object.defineProperties(WritableStreamDefaultController.prototype,{error:{enumerable:true}});if(typeof SymbolPolyfill.toStringTag==="symbol"){Object.defineProperty(WritableStreamDefaultController.prototype,SymbolPolyfill.toStringTag,{value:"WritableStreamDefaultController",configurable:true})}function IsWritableStreamDefaultController(x){if(!typeIsObject(x)){return false}if(!Object.prototype.hasOwnProperty.call(x,"_controlledWritableStream")){return false}return true}function SetUpWritableStreamDefaultController(stream,controller,startAlgorithm,writeAlgorithm,closeAlgorithm,abortAlgorithm,highWaterMark,sizeAlgorithm){controller._controlledWritableStream=stream;stream._writableStreamController=controller;controller._queue=undefined;controller._queueTotalSize=undefined;ResetQueue(controller);controller._started=false;controller._strategySizeAlgorithm=sizeAlgorithm;controller._strategyHWM=highWaterMark;controller._writeAlgorithm=writeAlgorithm;controller._closeAlgorithm=closeAlgorithm;controller._abortAlgorithm=abortAlgorithm;var backpressure=WritableStreamDefaultControllerGetBackpressure(controller);WritableStreamUpdateBackpressure(stream,backpressure);var startResult=startAlgorithm();var startPromise=promiseResolvedWith(startResult);uponPromise(startPromise,function(){controller._started=true;WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller)},function(r){controller._started=true;WritableStreamDealWithRejection(stream,r)})}function SetUpWritableStreamDefaultControllerFromUnderlyingSink(stream,underlyingSink,highWaterMark,sizeAlgorithm){var controller=Object.create(WritableStreamDefaultController.prototype);var startAlgorithm=function(){return undefined};var writeAlgorithm=function(){return promiseResolvedWith(undefined)};var closeAlgorithm=function(){return promiseResolvedWith(undefined)};var abortAlgorithm=function(){return promiseResolvedWith(undefined)};if(underlyingSink.start!==undefined){startAlgorithm=function(){return underlyingSink.start(controller)}}if(underlyingSink.write!==undefined){writeAlgorithm=function(chunk){return underlyingSink.write(chunk,controller)}}if(underlyingSink.close!==undefined){closeAlgorithm=function(){return underlyingSink.close()}}if(underlyingSink.abort!==undefined){abortAlgorithm=function(reason){return underlyingSink.abort(reason)}}SetUpWritableStreamDefaultController(stream,controller,startAlgorithm,writeAlgorithm,closeAlgorithm,abortAlgorithm,highWaterMark,sizeAlgorithm)}function WritableStreamDefaultControllerClearAlgorithms(controller){controller._writeAlgorithm=undefined;controller._closeAlgorithm=undefined;controller._abortAlgorithm=undefined;controller._strategySizeAlgorithm=undefined}function WritableStreamDefaultControllerClose(controller){EnqueueValueWithSize(controller,closeSentinel,0);WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller)}function WritableStreamDefaultControllerGetChunkSize(controller,chunk){try{return controller._strategySizeAlgorithm(chunk)}catch(chunkSizeE){WritableStreamDefaultControllerErrorIfNeeded(controller,chunkSizeE);return 1}}function WritableStreamDefaultControllerGetDesiredSize(controller){return controller._strategyHWM-controller._queueTotalSize}function WritableStreamDefaultControllerWrite(controller,chunk,chunkSize){try{EnqueueValueWithSize(controller,chunk,chunkSize)}catch(enqueueE){WritableStreamDefaultControllerErrorIfNeeded(controller,enqueueE);return}var stream=controller._controlledWritableStream;if(!WritableStreamCloseQueuedOrInFlight(stream)&&stream._state==="writable"){var backpressure=WritableStreamDefaultControllerGetBackpressure(controller);WritableStreamUpdateBackpressure(stream,backpressure)}WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller)}function WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller){var stream=controller._controlledWritableStream;if(!controller._started){return}if(stream._inFlightWriteRequest!==undefined){return}var state=stream._state;if(state==="erroring"){WritableStreamFinishErroring(stream);return}if(controller._queue.length===0){return}var value=PeekQueueValue(controller);if(value===closeSentinel){WritableStreamDefaultControllerProcessClose(controller)}else{WritableStreamDefaultControllerProcessWrite(controller,value)}}function WritableStreamDefaultControllerErrorIfNeeded(controller,error){if(controller._controlledWritableStream._state==="writable"){WritableStreamDefaultControllerError(controller,error)}}function WritableStreamDefaultControllerProcessClose(controller){var stream=controller._controlledWritableStream;WritableStreamMarkCloseRequestInFlight(stream);DequeueValue(controller);var sinkClosePromise=controller._closeAlgorithm();WritableStreamDefaultControllerClearAlgorithms(controller);uponPromise(sinkClosePromise,function(){WritableStreamFinishInFlightClose(stream)},function(reason){WritableStreamFinishInFlightCloseWithError(stream,reason)})}function WritableStreamDefaultControllerProcessWrite(controller,chunk){var stream=controller._controlledWritableStream;WritableStreamMarkFirstWriteRequestInFlight(stream);var sinkWritePromise=controller._writeAlgorithm(chunk);uponPromise(sinkWritePromise,function(){WritableStreamFinishInFlightWrite(stream);var state=stream._state;DequeueValue(controller);if(!WritableStreamCloseQueuedOrInFlight(stream)&&state==="writable"){var backpressure=WritableStreamDefaultControllerGetBackpressure(controller);WritableStreamUpdateBackpressure(stream,backpressure)}WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller)},function(reason){if(stream._state==="writable"){WritableStreamDefaultControllerClearAlgorithms(controller)}WritableStreamFinishInFlightWriteWithError(stream,reason)})}function WritableStreamDefaultControllerGetBackpressure(controller){var desiredSize=WritableStreamDefaultControllerGetDesiredSize(controller);return desiredSize<=0}function WritableStreamDefaultControllerError(controller,error){var stream=controller._controlledWritableStream;WritableStreamDefaultControllerClearAlgorithms(controller);WritableStreamStartErroring(stream,error)}function streamBrandCheckException(name){return new TypeError("WritableStream.prototype."+name+" can only be used on a WritableStream")}function defaultWriterBrandCheckException(name){return new TypeError("WritableStreamDefaultWriter.prototype."+name+" can only be used on a WritableStreamDefaultWriter")}function defaultWriterLockException(name){return new TypeError("Cannot "+name+" a stream using a released writer")}function defaultWriterClosedPromiseInitialize(writer){writer._closedPromise=newPromise(function(resolve,reject){writer._closedPromise_resolve=resolve;writer._closedPromise_reject=reject;writer._closedPromiseState="pending"})}function defaultWriterClosedPromiseInitializeAsRejected(writer,reason){defaultWriterClosedPromiseInitialize(writer);defaultWriterClosedPromiseReject(writer,reason)}function defaultWriterClosedPromiseInitializeAsResolved(writer){defaultWriterClosedPromiseInitialize(writer);defaultWriterClosedPromiseResolve(writer)}function defaultWriterClosedPromiseReject(writer,reason){setPromiseIsHandledToTrue(writer._closedPromise);writer._closedPromise_reject(reason);writer._closedPromise_resolve=undefined;writer._closedPromise_reject=undefined;writer._closedPromiseState="rejected"}function defaultWriterClosedPromiseResetToRejected(writer,reason){defaultWriterClosedPromiseInitializeAsRejected(writer,reason)}function defaultWriterClosedPromiseResolve(writer){writer._closedPromise_resolve(undefined);writer._closedPromise_resolve=undefined;writer._closedPromise_reject=undefined;writer._closedPromiseState="resolved"}function defaultWriterReadyPromiseInitialize(writer){writer._readyPromise=newPromise(function(resolve,reject){writer._readyPromise_resolve=resolve;writer._readyPromise_reject=reject});writer._readyPromiseState="pending"}function defaultWriterReadyPromiseInitializeAsRejected(writer,reason){defaultWriterReadyPromiseInitialize(writer);defaultWriterReadyPromiseReject(writer,reason)}function defaultWriterReadyPromiseInitializeAsResolved(writer){defaultWriterReadyPromiseInitialize(writer);defaultWriterReadyPromiseResolve(writer)}function defaultWriterReadyPromiseReject(writer,reason){setPromiseIsHandledToTrue(writer._readyPromise);writer._readyPromise_reject(reason);writer._readyPromise_resolve=undefined;writer._readyPromise_reject=undefined;writer._readyPromiseState="rejected"}function defaultWriterReadyPromiseReset(writer){defaultWriterReadyPromiseInitialize(writer)}function defaultWriterReadyPromiseResetToRejected(writer,reason){defaultWriterReadyPromiseInitializeAsRejected(writer,reason)}function defaultWriterReadyPromiseResolve(writer){writer._readyPromise_resolve(undefined);writer._readyPromise_resolve=undefined;writer._readyPromise_reject=undefined;writer._readyPromiseState="fulfilled"}function isAbortSignal(value){if(typeof value!=="object"||value===null){return false}try{return typeof value.aborted==="boolean"}catch(_a){return false}}var NativeDOMException=typeof DOMException!=="undefined"?DOMException:undefined;function isDOMExceptionConstructor(ctor){if(!(typeof ctor==="function"||typeof ctor==="object")){return false}try{new ctor;return true}catch(_a){return false}}function createDOMExceptionPolyfill(){var ctor=function DOMException(message,name){this.message=message||"";this.name=name||"Error";if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}};ctor.prototype=Object.create(Error.prototype);Object.defineProperty(ctor.prototype,"constructor",{value:ctor,writable:true,configurable:true});return ctor}var DOMException$1=isDOMExceptionConstructor(NativeDOMException)?NativeDOMException:createDOMExceptionPolyfill();function ReadableStreamPipeTo(source,dest,preventClose,preventAbort,preventCancel,signal){var reader=AcquireReadableStreamDefaultReader(source);var writer=AcquireWritableStreamDefaultWriter(dest);source._disturbed=true;var shuttingDown=false;var currentWrite=promiseResolvedWith(undefined);return newPromise(function(resolve,reject){var abortAlgorithm;if(signal!==undefined){abortAlgorithm=function(){var error=new DOMException$1("Aborted","AbortError");var actions=[];if(!preventAbort){actions.push(function(){if(dest._state==="writable"){return WritableStreamAbort(dest,error)}return promiseResolvedWith(undefined)})}if(!preventCancel){actions.push(function(){if(source._state==="readable"){return ReadableStreamCancel(source,error)}return promiseResolvedWith(undefined)})}shutdownWithAction(function(){return Promise.all(actions.map(function(action){return action()}))},true,error)};if(signal.aborted){abortAlgorithm();return}signal.addEventListener("abort",abortAlgorithm)}function pipeLoop(){return newPromise(function(resolveLoop,rejectLoop){function next(done){if(done){resolveLoop()}else{PerformPromiseThen(pipeStep(),next,rejectLoop)}}next(false)})}function pipeStep(){if(shuttingDown){return promiseResolvedWith(true)}return PerformPromiseThen(writer._readyPromise,function(){return newPromise(function(resolveRead,rejectRead){ReadableStreamDefaultReaderRead(reader,{_chunkSteps:function(chunk){currentWrite=PerformPromiseThen(WritableStreamDefaultWriterWrite(writer,chunk),undefined,noop);resolveRead(false)},_closeSteps:function(){return resolveRead(true)},_errorSteps:rejectRead})})})}isOrBecomesErrored(source,reader._closedPromise,function(storedError){if(!preventAbort){shutdownWithAction(function(){return WritableStreamAbort(dest,storedError)},true,storedError)}else{shutdown(true,storedError)}});isOrBecomesErrored(dest,writer._closedPromise,function(storedError){if(!preventCancel){shutdownWithAction(function(){return ReadableStreamCancel(source,storedError)},true,storedError)}else{shutdown(true,storedError)}});isOrBecomesClosed(source,reader._closedPromise,function(){if(!preventClose){shutdownWithAction(function(){return WritableStreamDefaultWriterCloseWithErrorPropagation(writer)})}else{shutdown()}});if(WritableStreamCloseQueuedOrInFlight(dest)||dest._state==="closed"){var destClosed_1=new TypeError("the destination writable stream closed before all data could be piped to it");if(!preventCancel){shutdownWithAction(function(){return ReadableStreamCancel(source,destClosed_1)},true,destClosed_1)}else{shutdown(true,destClosed_1)}}setPromiseIsHandledToTrue(pipeLoop());function waitForWritesToFinish(){var oldCurrentWrite=currentWrite;return PerformPromiseThen(currentWrite,function(){return oldCurrentWrite!==currentWrite?waitForWritesToFinish():undefined})}function isOrBecomesErrored(stream,promise,action){if(stream._state==="errored"){action(stream._storedError)}else{uponRejection(promise,action)}}function isOrBecomesClosed(stream,promise,action){if(stream._state==="closed"){action()}else{uponFulfillment(promise,action)}}function shutdownWithAction(action,originalIsError,originalError){if(shuttingDown){return}shuttingDown=true;if(dest._state==="writable"&&!WritableStreamCloseQueuedOrInFlight(dest)){uponFulfillment(waitForWritesToFinish(),doTheRest)}else{doTheRest()}function doTheRest(){uponPromise(action(),function(){return finalize(originalIsError,originalError)},function(newError){return finalize(true,newError)})}}function shutdown(isError,error){if(shuttingDown){return}shuttingDown=true;if(dest._state==="writable"&&!WritableStreamCloseQueuedOrInFlight(dest)){uponFulfillment(waitForWritesToFinish(),function(){return finalize(isError,error)})}else{finalize(isError,error)}}function finalize(isError,error){WritableStreamDefaultWriterRelease(writer);ReadableStreamReaderGenericRelease(reader);if(signal!==undefined){signal.removeEventListener("abort",abortAlgorithm)}if(isError){reject(error)}else{resolve(undefined)}}})}var ReadableStreamDefaultController=function(){function ReadableStreamDefaultController(){throw new TypeError("Illegal constructor")}Object.defineProperty(ReadableStreamDefaultController.prototype,"desiredSize",{get:function(){if(!IsReadableStreamDefaultController(this)){throw defaultControllerBrandCheckException("desiredSize")}return ReadableStreamDefaultControllerGetDesiredSize(this)},enumerable:false,configurable:true});ReadableStreamDefaultController.prototype.close=function(){if(!IsReadableStreamDefaultController(this)){throw defaultControllerBrandCheckException("close")}if(!ReadableStreamDefaultControllerCanCloseOrEnqueue(this)){throw new TypeError("The stream is not in a state that permits close")}ReadableStreamDefaultControllerClose(this)};ReadableStreamDefaultController.prototype.enqueue=function(chunk){if(chunk===void 0){chunk=undefined}if(!IsReadableStreamDefaultController(this)){throw defaultControllerBrandCheckException("enqueue")}if(!ReadableStreamDefaultControllerCanCloseOrEnqueue(this)){throw new TypeError("The stream is not in a state that permits enqueue")}return ReadableStreamDefaultControllerEnqueue(this,chunk)};ReadableStreamDefaultController.prototype.error=function(e){if(e===void 0){e=undefined}if(!IsReadableStreamDefaultController(this)){throw defaultControllerBrandCheckException("error")}ReadableStreamDefaultControllerError(this,e)};ReadableStreamDefaultController.prototype[CancelSteps]=function(reason){ResetQueue(this);var result=this._cancelAlgorithm(reason);ReadableStreamDefaultControllerClearAlgorithms(this);return result};ReadableStreamDefaultController.prototype[PullSteps]=function(readRequest){var stream=this._controlledReadableStream;if(this._queue.length>0){var chunk=DequeueValue(this);if(this._closeRequested&&this._queue.length===0){ReadableStreamDefaultControllerClearAlgorithms(this);ReadableStreamClose(stream)}else{ReadableStreamDefaultControllerCallPullIfNeeded(this)}readRequest._chunkSteps(chunk)}else{ReadableStreamAddReadRequest(stream,readRequest);ReadableStreamDefaultControllerCallPullIfNeeded(this)}};return ReadableStreamDefaultController}();Object.defineProperties(ReadableStreamDefaultController.prototype,{close:{enumerable:true},enqueue:{enumerable:true},error:{enumerable:true},desiredSize:{enumerable:true}});if(typeof SymbolPolyfill.toStringTag==="symbol"){Object.defineProperty(ReadableStreamDefaultController.prototype,SymbolPolyfill.toStringTag,{value:"ReadableStreamDefaultController",configurable:true})}function IsReadableStreamDefaultController(x){if(!typeIsObject(x)){return false}if(!Object.prototype.hasOwnProperty.call(x,"_controlledReadableStream")){return false}return true}function ReadableStreamDefaultControllerCallPullIfNeeded(controller){var shouldPull=ReadableStreamDefaultControllerShouldCallPull(controller);if(!shouldPull){return}if(controller._pulling){controller._pullAgain=true;return}controller._pulling=true;var pullPromise=controller._pullAlgorithm();uponPromise(pullPromise,function(){controller._pulling=false;if(controller._pullAgain){controller._pullAgain=false;ReadableStreamDefaultControllerCallPullIfNeeded(controller)}},function(e){ReadableStreamDefaultControllerError(controller,e)})}function ReadableStreamDefaultControllerShouldCallPull(controller){var stream=controller._controlledReadableStream;if(!ReadableStreamDefaultControllerCanCloseOrEnqueue(controller)){return false}if(!controller._started){return false}if(IsReadableStreamLocked(stream)&&ReadableStreamGetNumReadRequests(stream)>0){return true}var desiredSize=ReadableStreamDefaultControllerGetDesiredSize(controller);if(desiredSize>0){return true}return false}function ReadableStreamDefaultControllerClearAlgorithms(controller){controller._pullAlgorithm=undefined;controller._cancelAlgorithm=undefined;controller._strategySizeAlgorithm=undefined}function ReadableStreamDefaultControllerClose(controller){if(!ReadableStreamDefaultControllerCanCloseOrEnqueue(controller)){return}var stream=controller._controlledReadableStream;controller._closeRequested=true;if(controller._queue.length===0){ReadableStreamDefaultControllerClearAlgorithms(controller);ReadableStreamClose(stream)}}function ReadableStreamDefaultControllerEnqueue(controller,chunk){if(!ReadableStreamDefaultControllerCanCloseOrEnqueue(controller)){return}var stream=controller._controlledReadableStream;if(IsReadableStreamLocked(stream)&&ReadableStreamGetNumReadRequests(stream)>0){ReadableStreamFulfillReadRequest(stream,chunk,false)}else{var chunkSize=void 0;try{chunkSize=controller._strategySizeAlgorithm(chunk)}catch(chunkSizeE){ReadableStreamDefaultControllerError(controller,chunkSizeE);throw chunkSizeE}try{EnqueueValueWithSize(controller,chunk,chunkSize)}catch(enqueueE){ReadableStreamDefaultControllerError(controller,enqueueE);throw enqueueE}}ReadableStreamDefaultControllerCallPullIfNeeded(controller)}function ReadableStreamDefaultControllerError(controller,e){var stream=controller._controlledReadableStream;if(stream._state!=="readable"){return}ResetQueue(controller);ReadableStreamDefaultControllerClearAlgorithms(controller);ReadableStreamError(stream,e)}function ReadableStreamDefaultControllerGetDesiredSize(controller){var stream=controller._controlledReadableStream;var state=stream._state;if(state==="errored"){return null}if(state==="closed"){return 0}return controller._strategyHWM-controller._queueTotalSize}function ReadableStreamDefaultControllerHasBackpressure(controller){if(ReadableStreamDefaultControllerShouldCallPull(controller)){return false}return true}function ReadableStreamDefaultControllerCanCloseOrEnqueue(controller){var state=controller._controlledReadableStream._state;if(!controller._closeRequested&&state==="readable"){return true}return false}function SetUpReadableStreamDefaultController(stream,controller,startAlgorithm,pullAlgorithm,cancelAlgorithm,highWaterMark,sizeAlgorithm){controller._controlledReadableStream=stream;controller._queue=undefined;controller._queueTotalSize=undefined;ResetQueue(controller);controller._started=false;controller._closeRequested=false;controller._pullAgain=false;controller._pulling=false;controller._strategySizeAlgorithm=sizeAlgorithm;controller._strategyHWM=highWaterMark;controller._pullAlgorithm=pullAlgorithm;controller._cancelAlgorithm=cancelAlgorithm;stream._readableStreamController=controller;var startResult=startAlgorithm();uponPromise(promiseResolvedWith(startResult),function(){controller._started=true;ReadableStreamDefaultControllerCallPullIfNeeded(controller)},function(r){ReadableStreamDefaultControllerError(controller,r)})}function SetUpReadableStreamDefaultControllerFromUnderlyingSource(stream,underlyingSource,highWaterMark,sizeAlgorithm){var controller=Object.create(ReadableStreamDefaultController.prototype);var startAlgorithm=function(){return undefined};var pullAlgorithm=function(){return promiseResolvedWith(undefined)};var cancelAlgorithm=function(){return promiseResolvedWith(undefined)};if(underlyingSource.start!==undefined){startAlgorithm=function(){return underlyingSource.start(controller)}}if(underlyingSource.pull!==undefined){pullAlgorithm=function(){return underlyingSource.pull(controller)}}if(underlyingSource.cancel!==undefined){cancelAlgorithm=function(reason){return underlyingSource.cancel(reason)}}SetUpReadableStreamDefaultController(stream,controller,startAlgorithm,pullAlgorithm,cancelAlgorithm,highWaterMark,sizeAlgorithm)}function defaultControllerBrandCheckException(name){return new TypeError("ReadableStreamDefaultController.prototype."+name+" can only be used on a ReadableStreamDefaultController")}function ReadableStreamTee(stream,cloneForBranch2){var reader=AcquireReadableStreamDefaultReader(stream);var reading=false;var canceled1=false;var canceled2=false;var reason1;var reason2;var branch1;var branch2;var resolveCancelPromise;var cancelPromise=newPromise(function(resolve){resolveCancelPromise=resolve});function pullAlgorithm(){if(reading){return promiseResolvedWith(undefined)}reading=true;var readRequest={_chunkSteps:function(value){queueMicrotask(function(){reading=false;var value1=value;var value2=value;if(!canceled1){ReadableStreamDefaultControllerEnqueue(branch1._readableStreamController,value1)}if(!canceled2){ReadableStreamDefaultControllerEnqueue(branch2._readableStreamController,value2)}})},_closeSteps:function(){reading=false;if(!canceled1){ReadableStreamDefaultControllerClose(branch1._readableStreamController)}if(!canceled2){ReadableStreamDefaultControllerClose(branch2._readableStreamController)}},_errorSteps:function(){reading=false}};ReadableStreamDefaultReaderRead(reader,readRequest);return promiseResolvedWith(undefined)}function cancel1Algorithm(reason){canceled1=true;reason1=reason;if(canceled2){var compositeReason=CreateArrayFromList([reason1,reason2]);var cancelResult=ReadableStreamCancel(stream,compositeReason);resolveCancelPromise(cancelResult)}return cancelPromise}function cancel2Algorithm(reason){canceled2=true;reason2=reason;if(canceled1){var compositeReason=CreateArrayFromList([reason1,reason2]);var cancelResult=ReadableStreamCancel(stream,compositeReason);resolveCancelPromise(cancelResult)}return cancelPromise}function startAlgorithm(){}branch1=CreateReadableStream(startAlgorithm,pullAlgorithm,cancel1Algorithm);branch2=CreateReadableStream(startAlgorithm,pullAlgorithm,cancel2Algorithm);uponRejection(reader._closedPromise,function(r){ReadableStreamDefaultControllerError(branch1._readableStreamController,r);ReadableStreamDefaultControllerError(branch2._readableStreamController,r)});return[branch1,branch2]}function convertUnderlyingDefaultOrByteSource(source,context){assertDictionary(source,context);var original=source;var autoAllocateChunkSize=original===null||original===void 0?void 0:original.autoAllocateChunkSize;var cancel=original===null||original===void 0?void 0:original.cancel;var pull=original===null||original===void 0?void 0:original.pull;var start=original===null||original===void 0?void 0:original.start;var type=original===null||original===void 0?void 0:original.type;return{autoAllocateChunkSize:autoAllocateChunkSize===undefined?undefined:convertUnsignedLongLongWithEnforceRange(autoAllocateChunkSize,context+" has member 'autoAllocateChunkSize' that"),cancel:cancel===undefined?undefined:convertUnderlyingSourceCancelCallback(cancel,original,context+" has member 'cancel' that"),pull:pull===undefined?undefined:convertUnderlyingSourcePullCallback(pull,original,context+" has member 'pull' that"),start:start===undefined?undefined:convertUnderlyingSourceStartCallback(start,original,context+" has member 'start' that"),type:type===undefined?undefined:convertReadableStreamType(type,context+" has member 'type' that")}}function convertUnderlyingSourceCancelCallback(fn,original,context){assertFunction(fn,context);return function(reason){return promiseCall(fn,original,[reason])}}function convertUnderlyingSourcePullCallback(fn,original,context){assertFunction(fn,context);return function(controller){return promiseCall(fn,original,[controller])}}function convertUnderlyingSourceStartCallback(fn,original,context){assertFunction(fn,context);return function(controller){return reflectCall(fn,original,[controller])}}function convertReadableStreamType(type,context){type=""+type;if(type!=="bytes"){throw new TypeError(context+" '"+type+"' is not a valid enumeration value for ReadableStreamType")}return type}function convertReaderOptions(options,context){assertDictionary(options,context);var mode=options===null||options===void 0?void 0:options.mode;return{mode:mode===undefined?undefined:convertReadableStreamReaderMode(mode,context+" has member 'mode' that")}}function convertReadableStreamReaderMode(mode,context){mode=""+mode;if(mode!=="byob"){throw new TypeError(context+" '"+mode+"' is not a valid enumeration value for ReadableStreamReaderMode")}return mode}function convertIteratorOptions(options,context){assertDictionary(options,context);var preventCancel=options===null||options===void 0?void 0:options.preventCancel;return{preventCancel:Boolean(preventCancel)}}function convertPipeOptions(options,context){assertDictionary(options,context);var preventAbort=options===null||options===void 0?void 0:options.preventAbort;var preventCancel=options===null||options===void 0?void 0:options.preventCancel;var preventClose=options===null||options===void 0?void 0:options.preventClose;var signal=options===null||options===void 0?void 0:options.signal;if(signal!==undefined){assertAbortSignal(signal,context+" has member 'signal' that")}return{preventAbort:Boolean(preventAbort),preventCancel:Boolean(preventCancel),preventClose:Boolean(preventClose),signal:signal}}function assertAbortSignal(signal,context){if(!isAbortSignal(signal)){throw new TypeError(context+" is not an AbortSignal.")}}function convertReadableWritablePair(pair,context){assertDictionary(pair,context);var readable=pair===null||pair===void 0?void 0:pair.readable;assertRequiredField(readable,"readable","ReadableWritablePair");assertReadableStream(readable,context+" has member 'readable' that");var writable=pair===null||pair===void 0?void 0:pair.writable;assertRequiredField(writable,"writable","ReadableWritablePair");assertWritableStream(writable,context+" has member 'writable' that");return{readable:readable,writable:writable}}var ReadableStream=function(){function ReadableStream(rawUnderlyingSource,rawStrategy){if(rawUnderlyingSource===void 0){rawUnderlyingSource={}}if(rawStrategy===void 0){rawStrategy={}}if(rawUnderlyingSource===undefined){rawUnderlyingSource=null}else{assertObject(rawUnderlyingSource,"First parameter")}var strategy=convertQueuingStrategy(rawStrategy,"Second parameter");var underlyingSource=convertUnderlyingDefaultOrByteSource(rawUnderlyingSource,"First parameter");InitializeReadableStream(this);if(underlyingSource.type==="bytes"){if(strategy.size!==undefined){throw new RangeError("The strategy for a byte stream cannot have a size function")}var highWaterMark=ExtractHighWaterMark(strategy,0);SetUpReadableByteStreamControllerFromUnderlyingSource(this,underlyingSource,highWaterMark)}else{var sizeAlgorithm=ExtractSizeAlgorithm(strategy);var highWaterMark=ExtractHighWaterMark(strategy,1);SetUpReadableStreamDefaultControllerFromUnderlyingSource(this,underlyingSource,highWaterMark,sizeAlgorithm)}}Object.defineProperty(ReadableStream.prototype,"locked",{get:function(){if(!IsReadableStream(this)){throw streamBrandCheckException$1("locked")}return IsReadableStreamLocked(this)},enumerable:false,configurable:true});ReadableStream.prototype.cancel=function(reason){if(reason===void 0){reason=undefined}if(!IsReadableStream(this)){return promiseRejectedWith(streamBrandCheckException$1("cancel"))}if(IsReadableStreamLocked(this)){return promiseRejectedWith(new TypeError("Cannot cancel a stream that already has a reader"))}return ReadableStreamCancel(this,reason)};ReadableStream.prototype.getReader=function(rawOptions){if(rawOptions===void 0){rawOptions=undefined}if(!IsReadableStream(this)){throw streamBrandCheckException$1("getReader")}var options=convertReaderOptions(rawOptions,"First parameter");if(options.mode===undefined){return AcquireReadableStreamDefaultReader(this)}return AcquireReadableStreamBYOBReader(this)};ReadableStream.prototype.pipeThrough=function(rawTransform,rawOptions){if(rawOptions===void 0){rawOptions={}}if(!IsReadableStream(this)){throw streamBrandCheckException$1("pipeThrough")}assertRequiredArgument(rawTransform,1,"pipeThrough");var transform=convertReadableWritablePair(rawTransform,"First parameter");var options=convertPipeOptions(rawOptions,"Second parameter");if(IsReadableStreamLocked(this)){throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream")}if(IsWritableStreamLocked(transform.writable)){throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream")}var promise=ReadableStreamPipeTo(this,transform.writable,options.preventClose,options.preventAbort,options.preventCancel,options.signal);setPromiseIsHandledToTrue(promise);return transform.readable};ReadableStream.prototype.pipeTo=function(destination,rawOptions){if(rawOptions===void 0){rawOptions={}}if(!IsReadableStream(this)){return promiseRejectedWith(streamBrandCheckException$1("pipeTo"))}if(destination===undefined){return promiseRejectedWith("Parameter 1 is required in 'pipeTo'.")}if(!IsWritableStream(destination)){return promiseRejectedWith(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"))}var options;try{options=convertPipeOptions(rawOptions,"Second parameter")}catch(e){return promiseRejectedWith(e)}if(IsReadableStreamLocked(this)){return promiseRejectedWith(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream"))}if(IsWritableStreamLocked(destination)){return promiseRejectedWith(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream"))}return ReadableStreamPipeTo(this,destination,options.preventClose,options.preventAbort,options.preventCancel,options.signal)};ReadableStream.prototype.tee=function(){if(!IsReadableStream(this)){throw streamBrandCheckException$1("tee")}var branches=ReadableStreamTee(this);return CreateArrayFromList(branches)};ReadableStream.prototype.values=function(rawOptions){if(rawOptions===void 0){rawOptions=undefined}if(!IsReadableStream(this)){throw streamBrandCheckException$1("values")}var options=convertIteratorOptions(rawOptions,"First parameter");return AcquireReadableStreamAsyncIterator(this,options.preventCancel)};return ReadableStream}();Object.defineProperties(ReadableStream.prototype,{cancel:{enumerable:true},getReader:{enumerable:true},pipeThrough:{enumerable:true},pipeTo:{enumerable:true},tee:{enumerable:true},values:{enumerable:true},locked:{enumerable:true}});if(typeof SymbolPolyfill.toStringTag==="symbol"){Object.defineProperty(ReadableStream.prototype,SymbolPolyfill.toStringTag,{value:"ReadableStream",configurable:true})}if(typeof SymbolPolyfill.asyncIterator==="symbol"){Object.defineProperty(ReadableStream.prototype,SymbolPolyfill.asyncIterator,{value:ReadableStream.prototype.values,writable:true,configurable:true})}function CreateReadableStream(startAlgorithm,pullAlgorithm,cancelAlgorithm,highWaterMark,sizeAlgorithm){if(highWaterMark===void 0){highWaterMark=1}if(sizeAlgorithm===void 0){sizeAlgorithm=function(){return 1}}var stream=Object.create(ReadableStream.prototype);InitializeReadableStream(stream);var controller=Object.create(ReadableStreamDefaultController.prototype);SetUpReadableStreamDefaultController(stream,controller,startAlgorithm,pullAlgorithm,cancelAlgorithm,highWaterMark,sizeAlgorithm);return stream}function InitializeReadableStream(stream){stream._state="readable";stream._reader=undefined;stream._storedError=undefined;stream._disturbed=false}function IsReadableStream(x){if(!typeIsObject(x)){return false}if(!Object.prototype.hasOwnProperty.call(x,"_readableStreamController")){return false}return true}function IsReadableStreamLocked(stream){if(stream._reader===undefined){return false}return true}function ReadableStreamCancel(stream,reason){stream._disturbed=true;if(stream._state==="closed"){return promiseResolvedWith(undefined)}if(stream._state==="errored"){return promiseRejectedWith(stream._storedError)}ReadableStreamClose(stream);var sourceCancelPromise=stream._readableStreamController[CancelSteps](reason);return transformPromiseWith(sourceCancelPromise,noop)}function ReadableStreamClose(stream){stream._state="closed";var reader=stream._reader;if(reader===undefined){return}if(IsReadableStreamDefaultReader(reader)){reader._readRequests.forEach(function(readRequest){readRequest._closeSteps()});reader._readRequests=new SimpleQueue}defaultReaderClosedPromiseResolve(reader)}function ReadableStreamError(stream,e){stream._state="errored";stream._storedError=e;var reader=stream._reader;if(reader===undefined){return}if(IsReadableStreamDefaultReader(reader)){reader._readRequests.forEach(function(readRequest){readRequest._errorSteps(e)});reader._readRequests=new SimpleQueue}else{reader._readIntoRequests.forEach(function(readIntoRequest){readIntoRequest._errorSteps(e)});reader._readIntoRequests=new SimpleQueue}defaultReaderClosedPromiseReject(reader,e)}function streamBrandCheckException$1(name){return new TypeError("ReadableStream.prototype."+name+" can only be used on a ReadableStream")}function convertQueuingStrategyInit(init,context){assertDictionary(init,context);var highWaterMark=init===null||init===void 0?void 0:init.highWaterMark;assertRequiredField(highWaterMark,"highWaterMark","QueuingStrategyInit");return{highWaterMark:convertUnrestrictedDouble(highWaterMark)}}var byteLengthSizeFunction=function size(chunk){return chunk.byteLength};var ByteLengthQueuingStrategy=function(){function ByteLengthQueuingStrategy(options){assertRequiredArgument(options,1,"ByteLengthQueuingStrategy");options=convertQueuingStrategyInit(options,"First parameter");this._byteLengthQueuingStrategyHighWaterMark=options.highWaterMark}Object.defineProperty(ByteLengthQueuingStrategy.prototype,"highWaterMark",{get:function(){if(!IsByteLengthQueuingStrategy(this)){throw byteLengthBrandCheckException("highWaterMark")}return this._byteLengthQueuingStrategyHighWaterMark},enumerable:false,configurable:true});Object.defineProperty(ByteLengthQueuingStrategy.prototype,"size",{get:function(){if(!IsByteLengthQueuingStrategy(this)){throw byteLengthBrandCheckException("size")}return byteLengthSizeFunction},enumerable:false,configurable:true});return ByteLengthQueuingStrategy}();Object.defineProperties(ByteLengthQueuingStrategy.prototype,{highWaterMark:{enumerable:true},size:{enumerable:true}});if(typeof SymbolPolyfill.toStringTag==="symbol"){Object.defineProperty(ByteLengthQueuingStrategy.prototype,SymbolPolyfill.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:true})}function byteLengthBrandCheckException(name){return new TypeError("ByteLengthQueuingStrategy.prototype."+name+" can only be used on a ByteLengthQueuingStrategy")}function IsByteLengthQueuingStrategy(x){if(!typeIsObject(x)){return false}if(!Object.prototype.hasOwnProperty.call(x,"_byteLengthQueuingStrategyHighWaterMark")){return false}return true}var countSizeFunction=function size(){return 1};var CountQueuingStrategy=function(){function CountQueuingStrategy(options){assertRequiredArgument(options,1,"CountQueuingStrategy");options=convertQueuingStrategyInit(options,"First parameter");this._countQueuingStrategyHighWaterMark=options.highWaterMark}Object.defineProperty(CountQueuingStrategy.prototype,"highWaterMark",{get:function(){if(!IsCountQueuingStrategy(this)){throw countBrandCheckException("highWaterMark")}return this._countQueuingStrategyHighWaterMark},enumerable:false,configurable:true});Object.defineProperty(CountQueuingStrategy.prototype,"size",{get:function(){if(!IsCountQueuingStrategy(this)){throw countBrandCheckException("size")}return countSizeFunction},enumerable:false,configurable:true});return CountQueuingStrategy}();Object.defineProperties(CountQueuingStrategy.prototype,{highWaterMark:{enumerable:true},size:{enumerable:true}});if(typeof SymbolPolyfill.toStringTag==="symbol"){Object.defineProperty(CountQueuingStrategy.prototype,SymbolPolyfill.toStringTag,{value:"CountQueuingStrategy",configurable:true})}function countBrandCheckException(name){return new TypeError("CountQueuingStrategy.prototype."+name+" can only be used on a CountQueuingStrategy")}function IsCountQueuingStrategy(x){if(!typeIsObject(x)){return false}if(!Object.prototype.hasOwnProperty.call(x,"_countQueuingStrategyHighWaterMark")){return false}return true}function convertTransformer(original,context){assertDictionary(original,context);var flush=original===null||original===void 0?void 0:original.flush;var readableType=original===null||original===void 0?void 0:original.readableType;var start=original===null||original===void 0?void 0:original.start;var transform=original===null||original===void 0?void 0:original.transform;var writableType=original===null||original===void 0?void 0:original.writableType;return{flush:flush===undefined?undefined:convertTransformerFlushCallback(flush,original,context+" has member 'flush' that"),readableType:readableType,start:start===undefined?undefined:convertTransformerStartCallback(start,original,context+" has member 'start' that"),transform:transform===undefined?undefined:convertTransformerTransformCallback(transform,original,context+" has member 'transform' that"),writableType:writableType}}function convertTransformerFlushCallback(fn,original,context){assertFunction(fn,context);return function(controller){return promiseCall(fn,original,[controller])}}function convertTransformerStartCallback(fn,original,context){assertFunction(fn,context);return function(controller){return reflectCall(fn,original,[controller])}}function convertTransformerTransformCallback(fn,original,context){assertFunction(fn,context);return function(chunk,controller){return promiseCall(fn,original,[chunk,controller])}}var TransformStream=function(){function TransformStream(rawTransformer,rawWritableStrategy,rawReadableStrategy){if(rawTransformer===void 0){rawTransformer={}}if(rawWritableStrategy===void 0){rawWritableStrategy={}}if(rawReadableStrategy===void 0){rawReadableStrategy={}}if(rawTransformer===undefined){rawTransformer=null}var writableStrategy=convertQueuingStrategy(rawWritableStrategy,"Second parameter");var readableStrategy=convertQueuingStrategy(rawReadableStrategy,"Third parameter");var transformer=convertTransformer(rawTransformer,"First parameter");if(transformer.readableType!==undefined){throw new RangeError("Invalid readableType specified")}if(transformer.writableType!==undefined){throw new RangeError("Invalid writableType specified")}var readableHighWaterMark=ExtractHighWaterMark(readableStrategy,0);var readableSizeAlgorithm=ExtractSizeAlgorithm(readableStrategy);var writableHighWaterMark=ExtractHighWaterMark(writableStrategy,1);var writableSizeAlgorithm=ExtractSizeAlgorithm(writableStrategy);var startPromise_resolve;var startPromise=newPromise(function(resolve){startPromise_resolve=resolve});InitializeTransformStream(this,startPromise,writableHighWaterMark,writableSizeAlgorithm,readableHighWaterMark,readableSizeAlgorithm);SetUpTransformStreamDefaultControllerFromTransformer(this,transformer);if(transformer.start!==undefined){startPromise_resolve(transformer.start(this._transformStreamController))}else{startPromise_resolve(undefined)}}Object.defineProperty(TransformStream.prototype,"readable",{get:function(){if(!IsTransformStream(this)){throw streamBrandCheckException$2("readable")}return this._readable},enumerable:false,configurable:true});Object.defineProperty(TransformStream.prototype,"writable",{get:function(){if(!IsTransformStream(this)){throw streamBrandCheckException$2("writable")}return this._writable},enumerable:false,configurable:true});return TransformStream}();Object.defineProperties(TransformStream.prototype,{readable:{enumerable:true},writable:{enumerable:true}});if(typeof SymbolPolyfill.toStringTag==="symbol"){Object.defineProperty(TransformStream.prototype,SymbolPolyfill.toStringTag,{value:"TransformStream",configurable:true})}function InitializeTransformStream(stream,startPromise,writableHighWaterMark,writableSizeAlgorithm,readableHighWaterMark,readableSizeAlgorithm){function startAlgorithm(){return startPromise}function writeAlgorithm(chunk){return TransformStreamDefaultSinkWriteAlgorithm(stream,chunk)}function abortAlgorithm(reason){return TransformStreamDefaultSinkAbortAlgorithm(stream,reason)}function closeAlgorithm(){return TransformStreamDefaultSinkCloseAlgorithm(stream)}stream._writable=CreateWritableStream(startAlgorithm,writeAlgorithm,closeAlgorithm,abortAlgorithm,writableHighWaterMark,writableSizeAlgorithm);function pullAlgorithm(){return TransformStreamDefaultSourcePullAlgorithm(stream)}function cancelAlgorithm(reason){TransformStreamErrorWritableAndUnblockWrite(stream,reason);return promiseResolvedWith(undefined)}stream._readable=CreateReadableStream(startAlgorithm,pullAlgorithm,cancelAlgorithm,readableHighWaterMark,readableSizeAlgorithm);stream._backpressure=undefined;stream._backpressureChangePromise=undefined;stream._backpressureChangePromise_resolve=undefined;TransformStreamSetBackpressure(stream,true);stream._transformStreamController=undefined}function IsTransformStream(x){if(!typeIsObject(x)){return false}if(!Object.prototype.hasOwnProperty.call(x,"_transformStreamController")){return false}return true}function TransformStreamError(stream,e){ReadableStreamDefaultControllerError(stream._readable._readableStreamController,e);TransformStreamErrorWritableAndUnblockWrite(stream,e)}function TransformStreamErrorWritableAndUnblockWrite(stream,e){TransformStreamDefaultControllerClearAlgorithms(stream._transformStreamController);WritableStreamDefaultControllerErrorIfNeeded(stream._writable._writableStreamController,e);if(stream._backpressure){TransformStreamSetBackpressure(stream,false)}}function TransformStreamSetBackpressure(stream,backpressure){if(stream._backpressureChangePromise!==undefined){stream._backpressureChangePromise_resolve()}stream._backpressureChangePromise=newPromise(function(resolve){stream._backpressureChangePromise_resolve=resolve});stream._backpressure=backpressure}var TransformStreamDefaultController=function(){function TransformStreamDefaultController(){throw new TypeError("Illegal constructor")}Object.defineProperty(TransformStreamDefaultController.prototype,"desiredSize",{get:function(){if(!IsTransformStreamDefaultController(this)){throw defaultControllerBrandCheckException$1("desiredSize")}var readableController=this._controlledTransformStream._readable._readableStreamController;return ReadableStreamDefaultControllerGetDesiredSize(readableController)},enumerable:false,configurable:true});TransformStreamDefaultController.prototype.enqueue=function(chunk){if(chunk===void 0){chunk=undefined}if(!IsTransformStreamDefaultController(this)){throw defaultControllerBrandCheckException$1("enqueue")}TransformStreamDefaultControllerEnqueue(this,chunk)};TransformStreamDefaultController.prototype.error=function(reason){if(reason===void 0){reason=undefined}if(!IsTransformStreamDefaultController(this)){throw defaultControllerBrandCheckException$1("error")}TransformStreamDefaultControllerError(this,reason)};TransformStreamDefaultController.prototype.terminate=function(){if(!IsTransformStreamDefaultController(this)){throw defaultControllerBrandCheckException$1("terminate")}TransformStreamDefaultControllerTerminate(this)};return TransformStreamDefaultController}();Object.defineProperties(TransformStreamDefaultController.prototype,{enqueue:{enumerable:true},error:{enumerable:true},terminate:{enumerable:true},desiredSize:{enumerable:true}});if(typeof SymbolPolyfill.toStringTag==="symbol"){Object.defineProperty(TransformStreamDefaultController.prototype,SymbolPolyfill.toStringTag,{value:"TransformStreamDefaultController",configurable:true})}function IsTransformStreamDefaultController(x){if(!typeIsObject(x)){return false}if(!Object.prototype.hasOwnProperty.call(x,"_controlledTransformStream")){return false}return true}function SetUpTransformStreamDefaultController(stream,controller,transformAlgorithm,flushAlgorithm){controller._controlledTransformStream=stream;stream._transformStreamController=controller;controller._transformAlgorithm=transformAlgorithm;controller._flushAlgorithm=flushAlgorithm}function SetUpTransformStreamDefaultControllerFromTransformer(stream,transformer){var controller=Object.create(TransformStreamDefaultController.prototype);var transformAlgorithm=function(chunk){try{TransformStreamDefaultControllerEnqueue(controller,chunk);return promiseResolvedWith(undefined)}catch(transformResultE){return promiseRejectedWith(transformResultE)}};var flushAlgorithm=function(){return promiseResolvedWith(undefined)};if(transformer.transform!==undefined){transformAlgorithm=function(chunk){return transformer.transform(chunk,controller)}}if(transformer.flush!==undefined){flushAlgorithm=function(){return transformer.flush(controller)}}SetUpTransformStreamDefaultController(stream,controller,transformAlgorithm,flushAlgorithm)}function TransformStreamDefaultControllerClearAlgorithms(controller){controller._transformAlgorithm=undefined;controller._flushAlgorithm=undefined}function TransformStreamDefaultControllerEnqueue(controller,chunk){var stream=controller._controlledTransformStream;var readableController=stream._readable._readableStreamController;if(!ReadableStreamDefaultControllerCanCloseOrEnqueue(readableController)){throw new TypeError("Readable side is not in a state that permits enqueue")}try{ReadableStreamDefaultControllerEnqueue(readableController,chunk)}catch(e){TransformStreamErrorWritableAndUnblockWrite(stream,e);throw stream._readable._storedError}var backpressure=ReadableStreamDefaultControllerHasBackpressure(readableController);if(backpressure!==stream._backpressure){TransformStreamSetBackpressure(stream,true)}}function TransformStreamDefaultControllerError(controller,e){TransformStreamError(controller._controlledTransformStream,e)}function TransformStreamDefaultControllerPerformTransform(controller,chunk){var transformPromise=controller._transformAlgorithm(chunk);return transformPromiseWith(transformPromise,undefined,function(r){TransformStreamError(controller._controlledTransformStream,r);throw r})}function TransformStreamDefaultControllerTerminate(controller){var stream=controller._controlledTransformStream;var readableController=stream._readable._readableStreamController;ReadableStreamDefaultControllerClose(readableController);var error=new TypeError("TransformStream terminated");TransformStreamErrorWritableAndUnblockWrite(stream,error)}function TransformStreamDefaultSinkWriteAlgorithm(stream,chunk){var controller=stream._transformStreamController;if(stream._backpressure){var backpressureChangePromise=stream._backpressureChangePromise;return transformPromiseWith(backpressureChangePromise,function(){var writable=stream._writable;var state=writable._state;if(state==="erroring"){throw writable._storedError}return TransformStreamDefaultControllerPerformTransform(controller,chunk)})}return TransformStreamDefaultControllerPerformTransform(controller,chunk)}function TransformStreamDefaultSinkAbortAlgorithm(stream,reason){TransformStreamError(stream,reason);return promiseResolvedWith(undefined)}function TransformStreamDefaultSinkCloseAlgorithm(stream){var readable=stream._readable;var controller=stream._transformStreamController;var flushPromise=controller._flushAlgorithm();TransformStreamDefaultControllerClearAlgorithms(controller);return transformPromiseWith(flushPromise,function(){if(readable._state==="errored"){throw readable._storedError}ReadableStreamDefaultControllerClose(readable._readableStreamController)},function(r){TransformStreamError(stream,r);throw readable._storedError})}function TransformStreamDefaultSourcePullAlgorithm(stream){TransformStreamSetBackpressure(stream,false);return stream._backpressureChangePromise}function defaultControllerBrandCheckException$1(name){return new TypeError("TransformStreamDefaultController.prototype."+name+" can only be used on a TransformStreamDefaultController")}function streamBrandCheckException$2(name){return new TypeError("TransformStream.prototype."+name+" can only be used on a TransformStream")}var exports$1={ReadableStream:ReadableStream,ReadableStreamDefaultController:ReadableStreamDefaultController,ReadableByteStreamController:ReadableByteStreamController,ReadableStreamBYOBRequest:ReadableStreamBYOBRequest,ReadableStreamDefaultReader:ReadableStreamDefaultReader,ReadableStreamBYOBReader:ReadableStreamBYOBReader,WritableStream:WritableStream,WritableStreamDefaultController:WritableStreamDefaultController,WritableStreamDefaultWriter:WritableStreamDefaultWriter,ByteLengthQueuingStrategy:ByteLengthQueuingStrategy,CountQueuingStrategy:CountQueuingStrategy,TransformStream:TransformStream,TransformStreamDefaultController:TransformStreamDefaultController};if(typeof globals!=="undefined"){for(var prop in exports$1){if(Object.prototype.hasOwnProperty.call(exports$1,prop)){Object.defineProperty(globals,prop,{value:exports$1[prop],writable:true,configurable:true})}}}function uuid(){return Array.from({length:16},()=>Math.floor(Math.random()*256).toString(16)).join("")}function jobPromise(worker,msg){return new Promise(resolve=>{const id=uuid();worker.postMessage({msg,id});worker.on("message",function f({result,id:rid}){if(rid!==id){return}worker.off("message",f);resolve(result)})})}class WorkerPool{constructor(numWorkers,workerFile){this.closing=false;this.jobQueue=new TransformStream;this.workerQueue=new TransformStream;const writer=this.workerQueue.writable.getWriter();for(let i=0;i<numWorkers;i++){writer.write(new worker_threads.Worker(workerFile))}writer.releaseLock();this.done=this._readLoop()}async _readLoop(){const reader=this.jobQueue.readable.getReader();while(true){const{value,done}=await reader.read();if(done){this.workerQueue.writable.close();await this._terminateAll();return}const{msg,resolve}=value;const worker=await this._nextWorker();jobPromise(worker,msg).then(result=>{resolve(result);if(this.closing){worker.terminate();return}const writer=this.workerQueue.writable.getWriter();writer.write(worker);writer.releaseLock()})}}async _nextWorker(){const reader=this.workerQueue.readable.getReader();const{value,done}=await reader.read();reader.releaseLock();return value}async _terminateAll(){while(true){const worker=await this._nextWorker();if(!worker){return}worker.terminate()}}async join(){this.closing=true;this.jobQueue.writable.close();await this.done}dispatchJob(msg){return new Promise(resolve=>{const writer=this.jobQueue.writable.getWriter();writer.write({msg,resolve});writer.releaseLock()})}static useThisThreadAsWorker(cb){worker_threads.parentPort.on("message",async data=>{const{msg,id}=data;const result=await cb(msg);worker_threads.parentPort.postMessage({result,id})})}}var visdif_1=createCommonjsModule(function(module,exports){var visdif=function(){var _scriptDir=typeof document!=="undefined"&&document.currentScript?document.currentScript.src:undefined;if(typeof __filename!=="undefined")_scriptDir=_scriptDir||__filename;return function(visdif){visdif=visdif||{};var e;e||(e=typeof visdif!=="undefined"?visdif:{});var ba,ca;e.ready=new Promise(function(a,b){ba=a;ca=b});var da={},q;for(q in e)e.hasOwnProperty(q)&&(da[q]=e[q]);var ea=!1,v=!1,fa=!1,ha=!1;ea="object"===typeof window;v="function"===typeof importScripts;fa="object"===typeof process&&"object"===typeof process.versions&&"string"===typeof process.versions.node;ha=!ea&&!fa&&!v;var z="",ia,ja,ka,la;if(fa)z=v?path__default["default"].dirname(z)+"/":__dirname+"/",ia=function(a,b){ka||(ka=fs__default["default"]);la||(la=path__default["default"]);a=la.normalize(a);return ka.readFileSync(a,b?null:"utf8")},ja=function(a){a=ia(a,!0);a.buffer||(a=new Uint8Array(a));assert(a.buffer);return a},1<process.argv.length&&process.argv[1].replace(/\\/g,"/"),process.argv.slice(2),process.on("uncaughtException",function(a){throw a}),process.on("unhandledRejection",A),e.inspect=function(){return"[Emscripten Module object]"};else if(ha)"undefined"!=typeof read&&(ia=function(a){return read(a)}),ja=function(a){if("function"===typeof readbuffer)return new Uint8Array(readbuffer(a));a=read(a,"binary");assert("object"===typeof a);return a},"undefined"!==typeof print&&("undefined"===typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!==typeof printErr?printErr:print);else if(ea||v)v?z=self.location.href:document.currentScript&&(z=document.currentScript.src),_scriptDir&&(z=_scriptDir),0!==z.indexOf("blob:")?z=z.substr(0,z.lastIndexOf("/")+1):z="",ia=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);return b.responseText},v&&(ja=function(a){var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)});var ma=e.print||console.log.bind(console),B=e.printErr||console.warn.bind(console);for(q in da)da.hasOwnProperty(q)&&(e[q]=da[q]);da=null;var na;e.wasmBinary&&(na=e.wasmBinary);var noExitRuntime;e.noExitRuntime&&(noExitRuntime=e.noExitRuntime);"object"!==typeof WebAssembly&&A("no native wasm support detected");var C,oa=new WebAssembly.Table({initial:39,maximum:39,element:"anyfunc"}),pa=!1;function assert(a,b){a||A("Assertion failed: "+b)}var qa="undefined"!==typeof TextDecoder?new TextDecoder("utf8"):void 0;function ra(a,b,c){var d=b+c;for(c=b;a[c]&&!(c>=d);)++c;if(16<c-b&&a.subarray&&qa)return qa.decode(a.subarray(b,c));for(d="";b<c;){var f=a[b++];if(f&128){var g=a[b++]&63;if(192==(f&224))d+=String.fromCharCode((f&31)<<6|g);else{var k=a[b++]&63;f=224==(f&240)?(f&15)<<12|g<<6|k:(f&7)<<18|g<<12|k<<6|a[b++]&63;65536>f?d+=String.fromCharCode(f):(f-=65536,d+=String.fromCharCode(55296|f>>10,56320|f&1023))}}else d+=String.fromCharCode(f)}return d}function sa(a,b,c){var d=D;if(0<c){c=b+c-1;for(var f=0;f<a.length;++f){var g=a.charCodeAt(f);if(55296<=g&&57343>=g){var k=a.charCodeAt(++f);g=65536+((g&1023)<<10)|k&1023}if(127>=g){if(b>=c)break;d[b++]=g}else{if(2047>=g){if(b+1>=c)break;d[b++]=192|g>>6}else{if(65535>=g){if(b+2>=c)break;d[b++]=224|g>>12}else{if(b+3>=c)break;d[b++]=240|g>>18;d[b++]=128|g>>12&63}d[b++]=128|g>>6&63}d[b++]=128|g&63}}d[b]=0}}var ta="undefined"!==typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function ua(a,b){var c=a>>1;for(var d=c+b/2;!(c>=d)&&va[c];)++c;c<<=1;if(32<c-a&&ta)return ta.decode(D.subarray(a,c));c=0;for(d="";;){var f=E[a+2*c>>1];if(0==f||c==b/2)return d;++c;d+=String.fromCharCode(f)}}function wa(a,b,c){void 0===c&&(c=2147483647);if(2>c)return 0;c-=2;var d=b;c=c<2*a.length?c/2:a.length;for(var f=0;f<c;++f)E[b>>1]=a.charCodeAt(f),b+=2;E[b>>1]=0;return b-d}function xa(a){return 2*a.length}function ya(a,b){for(var c=0,d="";!(c>=b/4);){var f=F[a+4*c>>2];if(0==f)break;++c;65536<=f?(f-=65536,d+=String.fromCharCode(55296|f>>10,56320|f&1023)):d+=String.fromCharCode(f)}return d}function za(a,b,c){void 0===c&&(c=2147483647);if(4>c)return 0;var d=b;c=d+c-4;for(var f=0;f<a.length;++f){var g=a.charCodeAt(f);if(55296<=g&&57343>=g){var k=a.charCodeAt(++f);g=65536+((g&1023)<<10)|k&1023}F[b>>2]=g;b+=4;if(b+4>c)break}F[b>>2]=0;return b-d}function Aa(a){for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);55296<=d&&57343>=d&&++c;b+=4}return b}var G,Ba,D,E,va,F,I,Ca,Da;function Ea(a){G=a;e.HEAP8=Ba=new Int8Array(a);e.HEAP16=E=new Int16Array(a);e.HEAP32=F=new Int32Array(a);e.HEAPU8=D=new Uint8Array(a);e.HEAPU16=va=new Uint16Array(a);e.HEAPU32=I=new Uint32Array(a);e.HEAPF32=Ca=new Float32Array(a);e.HEAPF64=Da=new Float64Array(a)}var Fa=e.INITIAL_MEMORY||16777216;e.wasmMemory?C=e.wasmMemory:C=new WebAssembly.Memory({initial:Fa/65536,maximum:32768});C&&(G=C.buffer);Fa=G.byteLength;Ea(G);F[5836]=5266384;function Ga(a){for(;0<a.length;){var b=a.shift();if("function"==typeof b)b(e);else{var c=b.ia;"number"===typeof c?void 0===b.aa?e.dynCall_v(c):e.dynCall_vi(c,b.aa):c(void 0===b.aa?null:b.aa)}}}var Ha=[],Ia=[],Ja=[],Ka=[];function La(){var a=e.preRun.shift();Ha.unshift(a)}var J=0,Na=null;e.preloadedImages={};e.preloadedAudios={};function A(a){if(e.onAbort)e.onAbort(a);B(a);pa=!0;a=new WebAssembly.RuntimeError("abort("+a+"). Build with -s ASSERTIONS=1 for more info.");ca(a);throw a}function Oa(a){var b=K;return String.prototype.startsWith?b.startsWith(a):0===b.indexOf(a)}function Pa(){return Oa("data:application/octet-stream;base64,")}var K="visdif.wasm";if(!Pa()){var Qa=K;K=e.locateFile?e.locateFile(Qa,z):z+Qa}function Ra(){try{if(na)return new Uint8Array(na);if(ja)return ja(K);throw"both async and sync fetching of the wasm failed"}catch(a){A(a)}}function Sa(){return na||!ea&&!v||"function"!==typeof fetch||Oa("file://")?new Promise(function(a){a(Ra())}):fetch(K,{credentials:"same-origin"}).then(function(a){if(!a.ok)throw"failed to load wasm binary file at '"+K+"'";return a.arrayBuffer()}).catch(function(){return Ra()})}Ia.push({ia:function(){Ta()}});function Va(a){switch(a){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+a);}}var Wa=void 0;function L(a){for(var b="";D[a];)b+=Wa[D[a++]];return b}var M={},N={},Xa={};function Ya(a){if(void 0===a)return"_unknown";a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?"_"+a:a}function Za(a,b){a=Ya(a);return new Function("body","return function "+a+"() {\n \"use strict\"; return body.apply(this, arguments);\n};\n")(b)}function $a(a){var b=Error,c=Za(a,function(d){this.name=a;this.message=d;d=Error(d).stack;void 0!==d&&(this.stack=this.toString()+"\n"+d.replace(/^Error(:[^\n]*)?\n/,""))});c.prototype=Object.create(b.prototype);c.prototype.constructor=c;c.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message};return c}var O=void 0;function R(a){throw new O(a)}var ab=void 0;function bb(a){throw new ab(a)}function cb(a,b,c){function d(h){h=c(h);h.length!==a.length&&bb("Mismatched type converter count");for(var m=0;m<a.length;++m)S(a[m],h[m])}a.forEach(function(h){Xa[h]=b});var f=Array(b.length),g=[],k=0;b.forEach(function(h,m){N.hasOwnProperty(h)?f[m]=N[h]:(g.push(h),M.hasOwnProperty(h)||(M[h]=[]),M[h].push(function(){f[m]=N[h];++k;k===g.length&&d(f)}))});0===g.length&&d(f)}function S(a,b,c){c=c||{};if(!("argPackAdvance"in b))throw new TypeError("registerType registeredInstance requires argPackAdvance");var d=b.name;a||R("type \""+d+"\" must have a positive integer typeid pointer");if(N.hasOwnProperty(a)){if(c.la)return;R("Cannot register type '"+d+"' twice")}N[a]=b;delete Xa[a];M.hasOwnProperty(a)&&(b=M[a],delete M[a],b.forEach(function(f){f()}))}function db(a){return{count:a.count,U:a.U,W:a.W,K:a.K,L:a.L,M:a.M,N:a.N}}function eb(a){R(a.I.L.J.name+" instance already deleted")}var fb=!1;function gb(){}function hb(a){--a.count.value;0===a.count.value&&(a.M?a.N.T(a.M):a.L.J.T(a.K))}function ib(a){if("undefined"===typeof FinalizationGroup)return ib=function(b){return b},a;fb=new FinalizationGroup(function(b){for(var c=b.next();!c.done;c=b.next())c=c.value,c.K?hb(c):console.warn("object already deleted: "+c.K)});ib=function(b){fb.register(b,b.I,b.I);return b};gb=function(b){fb.unregister(b.I)};return ib(a)}var jb=void 0,kb=[];function lb(){for(;kb.length;){var a=kb.pop();a.I.U=!1;a["delete"]()}}function T(){}var mb={};function nb(a,b,c){if(void 0===a[b].P){var d=a[b];a[b]=function(){a[b].P.hasOwnProperty(arguments.length)||R("Function '"+c+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+a[b].P+")!");return a[b].P[arguments.length].apply(this,arguments)};a[b].P=[];a[b].P[d.Y]=d}}function ob(a,b){e.hasOwnProperty(a)?(R("Cannot register public name '"+a+"' twice"),nb(e,a,a),e.hasOwnProperty(void 0)&&R("Cannot register multiple overloads of a function with the same number of arguments (undefined)!"),e[a].P[void 0]=b):e[a]=b}function pb(a,b,c,d,f,g,k,h){this.name=a;this.constructor=b;this.V=c;this.T=d;this.O=f;this.ja=g;this.X=k;this.ha=h;this.na=[]}function qb(a,b,c){for(;b!==c;)b.X||R("Expected null or instance of "+c.name+", got an instance of "+b.name),a=b.X(a),b=b.O;return a}function rb(a,b){if(null===b)return this.ba&&R("null is not a valid "+this.name),0;b.I||R("Cannot pass \""+U(b)+"\" as a "+this.name);b.I.K||R("Cannot pass deleted object as a pointer of type "+this.name);return qb(b.I.K,b.I.L.J,this.J)}function ub(a,b){if(null===b){this.ba&&R("null is not a valid "+this.name);if(this.$){var c=this.oa();null!==a&&a.push(this.T,c);return c}return 0}b.I||R("Cannot pass \""+U(b)+"\" as a "+this.name);b.I.K||R("Cannot pass deleted object as a pointer of type "+this.name);!this.Z&&b.I.L.Z&&R("Cannot convert argument of type "+(b.I.N?b.I.N.name:b.I.L.name)+" to parameter type "+this.name);c=qb(b.I.K,b.I.L.J,this.J);if(this.$)switch(void 0===b.I.M&&R("Passing raw pointer to smart pointer is illegal"),this.ra){case 0:b.I.N===this?c=b.I.M:R("Cannot convert argument of type "+(b.I.N?b.I.N.name:b.I.L.name)+" to parameter type "+this.name);break;case 1:c=b.I.M;break;case 2:if(b.I.N===this)c=b.I.M;else{var d=b.clone();c=this.pa(c,vb(function(){d["delete"]()}));null!==a&&a.push(this.T,c)}break;default:R("Unsupporting sharing policy");}return c}function wb(a,b){if(null===b)return this.ba&&R("null is not a valid "+this.name),0;b.I||R("Cannot pass \""+U(b)+"\" as a "+this.name);b.I.K||R("Cannot pass deleted object as a pointer of type "+this.name);b.I.L.Z&&R("Cannot convert argument of type "+b.I.L.name+" to parameter type "+this.name);return qb(b.I.K,b.I.L.J,this.J)}function xb(a){return this.fromWireType(I[a>>2])}function yb(a,b,c){if(b===c)return a;if(void 0===c.O)return null;a=yb(a,b,c.O);return null===a?null:c.ha(a)}var zb={};function Ab(a,b){for(void 0===b&&R("ptr should not be undefined");a.O;)b=a.X(b),a=a.O;return zb[b]}function Bb(a,b){b.L&&b.K||bb("makeClassHandle requires ptr and ptrType");!!b.N!==!!b.M&&bb("Both smartPtrType and smartPtr must be specified");b.count={value:1};return ib(Object.create(a,{I:{value:b}}))}function V(a,b,c,d){this.name=a;this.J=b;this.ba=c;this.Z=d;this.$=!1;this.T=this.pa=this.oa=this.fa=this.ra=this.ma=void 0;void 0!==b.O?this.toWireType=ub:(this.toWireType=d?rb:wb,this.R=null)}function Cb(a,b){e.hasOwnProperty(a)||bb("Replacing nonexistant public symbol");e[a]=b;e[a].Y=void 0}function W(a,b){a=L(a);var c=e["dynCall_"+a];for(var d=[],f=1;f<a.length;++f)d.push("a"+f);f="return function dynCall_"+(a+"_"+b)+"("+d.join(", ")+") {\n";f+=" return dynCall(rawFunction"+(d.length?", ":"")+d.join(", ")+");\n";c=new Function("dynCall","rawFunction",f+"};\n")(c,b);"function"!==typeof c&&R("unknown function pointer with signature "+a+": "+b);return c}var Db=void 0;function Eb(a){a=Fb(a);var b=L(a);X(a);return b}function Gb(a,b){function c(g){f[g]||N[g]||(Xa[g]?Xa[g].forEach(c):(d.push(g),f[g]=!0))}var d=[],f={};b.forEach(c);throw new Db(a+": "+d.map(Eb).join([", "]))}function Hb(a,b){for(var c=[],d=0;d<a;d++)c.push(F[(b>>2)+d]);return c}function Ib(a){for(;a.length;){var b=a.pop();a.pop()(b)}}function Jb(a){var b=Function;if(!(b instanceof Function))throw new TypeError("new_ called with constructor type "+typeof b+" which is not a function");var c=Za(b.name||"unknownFunctionName",function(){});c.prototype=b.prototype;c=new c;a=b.apply(c,a);return a instanceof Object?a:c}var Kb=[],Y=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function vb(a){switch(a){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var b=Kb.length?Kb.pop():Y.length;Y[b]={qa:1,value:a};return b;}}function U(a){if(null===a)return"null";var b=typeof a;return"object"===b||"array"===b||"function"===b?a.toString():""+a}function Lb(a,b){switch(b){case 2:return function(c){return this.fromWireType(Ca[c>>2])};case 3:return function(c){return this.fromWireType(Da[c>>3])};default:throw new TypeError("Unknown float type: "+a);}}function Mb(a,b,c){switch(b){case 0:return c?function(d){return Ba[d]}:function(d){return D[d]};case 1:return c?function(d){return E[d>>1]}:function(d){return va[d>>1]};case 2:return c?function(d){return F[d>>2]}:function(d){return I[d>>2]};default:throw new TypeError("Unknown integer type: "+a);}}for(var Nb=[null,[],[]],Ob=Array(256),Pb=0;256>Pb;++Pb)Ob[Pb]=String.fromCharCode(Pb);Wa=Ob;O=e.BindingError=$a("BindingError");ab=e.InternalError=$a("InternalError");T.prototype.isAliasOf=function(a){if(!(this instanceof T&&a instanceof T))return!1;var b=this.I.L.J,c=this.I.K,d=a.I.L.J;for(a=a.I.K;b.O;)c=b.X(c),b=b.O;for(;d.O;)a=d.X(a),d=d.O;return b===d&&c===a};T.prototype.clone=function(){this.I.K||eb(this);if(this.I.W)return this.I.count.value+=1,this;var a=ib(Object.create(Object.getPrototypeOf(this),{I:{value:db(this.I)}}));a.I.count.value+=1;a.I.U=!1;return a};T.prototype["delete"]=function(){this.I.K||eb(this);this.I.U&&!this.I.W&&R("Object already scheduled for deletion");gb(this);hb(this.I);this.I.W||(this.I.M=void 0,this.I.K=void 0)};T.prototype.isDeleted=function(){return!this.I.K};T.prototype.deleteLater=function(){this.I.K||eb(this);this.I.U&&!this.I.W&&R("Object already scheduled for deletion");kb.push(this);1===kb.length&&jb&&jb(lb);this.I.U=!0;return this};V.prototype.ka=function(a){this.fa&&(a=this.fa(a));return a};V.prototype.ea=function(a){this.T&&this.T(a)};V.prototype.argPackAdvance=8;V.prototype.readValueFromPointer=xb;V.prototype.deleteObject=function(a){if(null!==a)a["delete"]()};V.prototype.fromWireType=function(a){function b(){return this.$?Bb(this.J.V,{L:this.ma,K:c,N:this,M:a}):Bb(this.J.V,{L:this,K:a})}var c=this.ka(a);if(!c)return this.ea(a),null;var d=Ab(this.J,c);if(void 0!==d){if(0===d.I.count.value)return d.I.K=c,d.I.M=a,d.clone();d=d.clone();this.ea(a);return d}d=this.J.ja(c);d=mb[d];if(!d)return b.call(this);d=this.Z?d.ga:d.pointerType;var f=yb(c,this.J,d.J);return null===f?b.call(this):this.$?Bb(d.J.V,{L:d,K:f,N:this,M:a}):Bb(d.J.V,{L:d,K:f})};e.getInheritedInstanceCount=function(){return Object.keys(zb).length};e.getLiveInheritedInstances=function(){var a=[],b;for(b in zb)zb.hasOwnProperty(b)&&a.push(zb[b]);return a};e.flushPendingDeletes=lb;e.setDelayFunction=function(a){jb=a;kb.length&&jb&&jb(lb)};Db=e.UnboundTypeError=$a("UnboundTypeError");e.count_emval_handles=function(){for(var a=0,b=5;b<Y.length;++b)void 0!==Y[b]&&++a;return a};e.get_first_emval=function(){for(var a=5;a<Y.length;++a)if(void 0!==Y[a])return Y[a];return null};var Rb={d:function(a,b,c,d){A("Assertion failed: "+(a?ra(D,a,void 0):"")+", at: "+[b?b?ra(D,b,void 0):"":"unknown filename",c,d?d?ra(D,d,void 0):"":"unknown function"])},s:function(a){return Qb(a)},o:function(a){throw a},j:function(a,b,c,d,f){var g=Va(c);b=L(b);S(a,{name:b,fromWireType:function(k){return!!k},toWireType:function(k,h){return h?d:f},argPackAdvance:8,readValueFromPointer:function(k){if(1===c)var h=Ba;else if(2===c)h=E;else if(4===c)h=F;else throw new TypeError("Unknown boolean type size: "+b);return this.fromWireType(h[k>>g])},R:null})},n:function(a,b,c,d,f,g,k,h,m,l,n,t,u){n=L(n);g=W(f,g);h&&(h=W(k,h));l&&(l=W(m,l));u=W(t,u);var y=Ya(n);ob(y,function(){Gb("Cannot construct "+n+" due to unbound types",[d])});cb([a,b,c],d?[d]:[],function(r){r=r[0];if(d){var w=r.J;var p=w.V}else p=T.prototype;r=Za(y,function(){if(Object.getPrototypeOf(this)!==H)throw new O("Use 'new' to construct "+n);if(void 0===x.S)throw new O(n+" has no accessible constructor");var P=x.S[arguments.length];if(void 0===P)throw new O("Tried to invoke ctor of "+n+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(x.S).toString()+") parameters instead!");return P.apply(this,arguments)});var H=Object.create(p,{constructor:{value:r}});r.prototype=H;var x=new pb(n,r,H,u,w,g,h,l);w=new V(n,x,!0,!1);p=new V(n+"*",x,!1,!1);var Z=new V(n+" const*",x,!1,!0);mb[a]={pointerType:p,ga:Z};Cb(y,r);return[w,p,Z]})},m:function(a,b,c,d,f,g){assert(0<b);var k=Hb(b,c);f=W(d,f);var h=[g],m=[];cb([],[a],function(l){l=l[0];var n="constructor "+l.name;void 0===l.J.S&&(l.J.S=[]);if(void 0!==l.J.S[b-1])throw new O("Cannot register multiple constructors with identical number of parameters ("+(b-1)+") for class '"+l.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");l.J.S[b-1]=function(){Gb("Cannot construct "+l.name+" due to unbound types",k)};cb([],k,function(t){l.J.S[b-1]=function(){arguments.length!==b-1&&R(n+" called with "+arguments.length+" arguments, expected "+(b-1));m.length=0;h.length=b;for(var u=1;u<b;++u)h[u]=t[u].toWireType(m,arguments[u-1]);u=f.apply(null,h);Ib(m);return t[0].fromWireType(u)};return[]});return[]})},l:function(a,b,c,d,f,g,k,h){var m=Hb(c,d);b=L(b);g=W(f,g);cb([],[a],function(l){function n(){Gb("Cannot call "+t+" due to unbound types",m)}l=l[0];var t=l.name+"."+b;h&&l.J.na.push(b);var u=l.J.V,y=u[b];void 0===y||void 0===y.P&&y.className!==l.name&&y.Y===c-2?(n.Y=c-2,n.className=l.name,u[b]=n):(nb(u,b,t),u[b].P[c-2]=n);cb([],m,function(r){var w=t,p=l,H=g,x=r.length;2>x&&R("argTypes array size mismatch! Must at least get return value and 'this' types!");var Z=null!==r[1]&&null!==p,P=!1;for(p=1;p<r.length;++p)if(null!==r[p]&&void 0===r[p].R){P=!0;break}var sb="void"!==r[0].name,Q="",aa="";for(p=0;p<x-2;++p)Q+=(0!==p?", ":"")+"arg"+p,aa+=(0!==p?", ":"")+"arg"+p+"Wired";w="return function "+Ya(w)+"("+Q+") {\nif (arguments.length !== "+(x-2)+") {\nthrowBindingError('function "+w+" called with ' + arguments.length + ' arguments, expected "+(x-2)+" args!');\n}\n";P&&(w+="var destructors = [];\n");var tb=P?"destructors":"null";Q="throwBindingError invoker fn runDestructors retType classParam".split(" ");H=[R,H,k,Ib,r[0],r[1]];Z&&(w+="var thisWired = classParam.toWireType("+tb+", this);\n");for(p=0;p<x-2;++p)w+="var arg"+p+"Wired = argType"+p+".toWireType("+tb+", arg"+p+"); // "+r[p+2].name+"\n",Q.push("argType"+p),H.push(r[p+2]);Z&&(aa="thisWired"+(0<aa.length?", ":"")+aa);w+=(sb?"var rv = ":"")+"invoker(fn"+(0<aa.length?", ":"")+aa+");\n";if(P)w+="runDestructors(destructors);\n";else for(p=Z?1:2;p<r.length;++p)x=1===p?"thisWired":"arg"+(p-2)+"Wired",null!==r[p].R&&(w+=x+"_dtor("+x+"); // "+r[p].name+"\n",Q.push(x+"_dtor"),H.push(r[p].R));sb&&(w+="var ret = retType.fromWireType(rv);\nreturn ret;\n");Q.push(w+"}\n");r=Jb(Q).apply(null,H);void 0===u[b].P?(r.Y=c-2,u[b]=r):u[b].P[c-2]=r;return[]});return[]})},r:function(a,b){b=L(b);S(a,{name:b,fromWireType:function(c){var d=Y[c].value;4<c&&0===--Y[c].qa&&(Y[c]=void 0,Kb.push(c));return d},toWireType:function(c,d){return vb(d)},argPackAdvance:8,readValueFromPointer:xb,R:null})},i:function(a,b,c){c=Va(c);b=L(b);S(a,{name:b,fromWireType:function(d){return d},toWireType:function(d,f){if("number"!==typeof f&&"boolean"!==typeof f)throw new TypeError("Cannot convert \""+U(f)+"\" to "+this.name);return f},argPackAdvance:8,readValueFromPointer:Lb(b,c),R:null})},b:function(a,b,c,d,f){function g(l){return l}b=L(b);-1===f&&(f=4294967295);var k=Va(c);if(0===d){var h=32-8*c;g=function(l){return l<<h>>>h}}var m=-1!=b.indexOf("unsigned");S(a,{name:b,fromWireType:g,toWireType:function(l,n){if("number"!==typeof n&&"boolean"!==typeof n)throw new TypeError("Cannot convert \""+U(n)+"\" to "+this.name);if(n<d||n>f)throw new TypeError("Passing a number \""+U(n)+"\" from JS side to C/C++ side to an argument of type \""+b+"\", which is outside the valid range ["+d+", "+f+"]!");return m?n>>>0:n|0},argPackAdvance:8,readValueFromPointer:Mb(b,k,0!==d),R:null})},a:function(a,b,c){function d(g){g>>=2;var k=I;return new f(G,k[g+1],k[g])}var f=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][b];c=L(c);S(a,{name:c,fromWireType:d,argPackAdvance:8,readValueFromPointer:d},{la:!0})},g:function(a,b){b=L(b);var c="std::string"===b;S(a,{name:b,fromWireType:function(d){var f=I[d>>2];if(c)for(var g=d+4,k=0;k<=f;++k){var h=d+4+k;if(k==f||0==D[h]){g=g?ra(D,g,h-g):"";if(void 0===m)var m=g;else m+=String.fromCharCode(0),m+=g;g=h+1}}else{m=Array(f);for(k=0;k<f;++k)m[k]=String.fromCharCode(D[d+4+k]);m=m.join("")}X(d);return m},toWireType:function(d,f){f instanceof ArrayBuffer&&(f=new Uint8Array(f));var g="string"===typeof f;g||f instanceof Uint8Array||f instanceof Uint8ClampedArray||f instanceof Int8Array||R("Cannot pass non-string to std::string");var k=(c&&g?function(){for(var l=0,n=0;n<f.length;++n){var t=f.charCodeAt(n);55296<=t&&57343>=t&&(t=65536+((t&1023)<<10)|f.charCodeAt(++n)&1023);127>=t?++l:l=2047>=t?l+2:65535>=t?l+3:l+4}return l}:function(){return f.length})(),h=Qb(4+k+1);I[h>>2]=k;if(c&&g)sa(f,h+4,k+1);else if(g)for(g=0;g<k;++g){var m=f.charCodeAt(g);255<m&&(X(h),R("String has UTF-16 code units that do not fit in 8 bits"));D[h+4+g]=m}else for(g=0;g<k;++g)D[h+4+g]=f[g];null!==d&&d.push(X,h);return h},argPackAdvance:8,readValueFromPointer:xb,R:function(d){X(d)}})},f:function(a,b,c){c=L(c);if(2===b){var d=ua;var f=wa;var g=xa;var k=function(){return va};var h=1}else 4===b&&(d=ya,f=za,g=Aa,k=function(){return I},h=2);S(a,{name:c,fromWireType:function(m){for(var l=I[m>>2],n=k(),t,u=m+4,y=0;y<=l;++y){var r=m+4+y*b;if(y==l||0==n[r>>h])u=d(u,r-u),void 0===t?t=u:(t+=String.fromCharCode(0),t+=u),u=r+b}X(m);return t},toWireType:function(m,l){"string"!==typeof l&&R("Cannot pass non-string to C++ string type "+c);var n=g(l),t=Qb(4+n+b);I[t>>2]=n>>h;f(l,t+4,n+b);null!==m&&m.push(X,t);return t},argPackAdvance:8,readValueFromPointer:xb,R:function(m){X(m)}})},k:function(a,b){b=L(b);S(a,{sa:!0,name:b,argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},e:function(){A()},q:function(a,b,c){D.copyWithin(a,b,b+c)},c:function(a){a>>>=0;var b=D.length;if(2147483648<a)return!1;for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,a+100663296);d=Math.max(16777216,a,d);0<d%65536&&(d+=65536-d%65536);a:{try{C.grow(Math.min(2147483648,d)-G.byteLength+65535>>>16);Ea(C.buffer);var f=1;break a}catch(g){}f=void 0}if(f)return!0}return!1},h:function(a,b,c,d){for(var f=0,g=0;g<c;g++){for(var k=F[b+8*g>>2],h=F[b+(8*g+4)>>2],m=0;m<h;m++){var l=D[k+m],n=Nb[a];0===l||10===l?((1===a?ma:B)(ra(n,0)),n.length=0):n.push(l)}f+=h}F[d>>2]=f;return 0},memory:C,p:function(){},table:oa};(function(){function a(f){e.asm=f.exports;J--;e.monitorRunDependencies&&e.monitorRunDependencies(J);0==J&&Na&&(f=Na,Na=null,f())}function b(f){a(f.instance)}function c(f){return Sa().then(function(g){return WebAssembly.instantiate(g,d)}).then(f,function(g){B("failed to asynchronously prepare wasm: "+g);A(g)})}var d={a:Rb};J++;e.monitorRunDependencies&&e.monitorRunDependencies(J);if(e.instantiateWasm)try{return e.instantiateWasm(d,a)}catch(f){return B("Module.instantiateWasm callback failed with error: "+f),!1}(function(){if(na||"function"!==typeof WebAssembly.instantiateStreaming||Pa()||Oa("file://")||"function"!==typeof fetch)return c(b);fetch(K,{credentials:"same-origin"}).then(function(f){return WebAssembly.instantiateStreaming(f,d).then(b,function(g){B("wasm streaming compile failed: "+g);B("falling back to ArrayBuffer instantiation");return c(b)})})})();return{}})();var Ta=e.___wasm_call_ctors=function(){return(Ta=e.___wasm_call_ctors=e.asm.t).apply(null,arguments)},Qb=e._malloc=function(){return(Qb=e._malloc=e.asm.u).apply(null,arguments)},X=e._free=function(){return(X=e._free=e.asm.v).apply(null,arguments)},Fb=e.___getTypeName=function(){return(Fb=e.___getTypeName=e.asm.w).apply(null,arguments)};e.___embind_register_native_and_builtin_types=function(){return(e.___embind_register_native_and_builtin_types=e.asm.x).apply(null,arguments)};e.dynCall_ii=function(){return(e.dynCall_ii=e.asm.y).apply(null,arguments)};e.dynCall_vi=function(){return(e.dynCall_vi=e.asm.z).apply(null,arguments)};e.dynCall_dii=function(){return(e.dynCall_dii=e.asm.A).apply(null,arguments)};e.dynCall_iiiii=function(){return(e.dynCall_iiiii=e.asm.B).apply(null,arguments)};e.dynCall_iiii=function(){return(e.dynCall_iiii=e.asm.C).apply(null,arguments)};e.dynCall_diii=function(){return(e.dynCall_diii=e.asm.D).apply(null,arguments)};e.dynCall_viiiiii=function(){return(e.dynCall_viiiiii=e.asm.E).apply(null,arguments)};e.dynCall_viiiii=function(){return(e.dynCall_viiiii=e.asm.F).apply(null,arguments)};e.dynCall_viiii=function(){return(e.dynCall_viiii=e.asm.G).apply(null,arguments)};e.dynCall_jiji=function(){return(e.dynCall_jiji=e.asm.H).apply(null,arguments)};var Sb;Na=function Tb(){Sb||Ub();Sb||(Na=Tb)};function Ub(){function a(){if(!Sb&&(Sb=!0,e.calledRun=!0,!pa)){Ga(Ia);Ga(Ja);ba(e);if(e.onRuntimeInitialized)e.onRuntimeInitialized();if(e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;){var b=e.postRun.shift();Ka.unshift(b)}Ga(Ka)}}if(!(0<J)){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;)La();Ga(Ha);0<J||(e.setStatus?(e.setStatus("Running..."),setTimeout(function(){setTimeout(function(){e.setStatus("")},1);a()},1)):a())}}e.run=Ub;if(e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);0<e.preInit.length;)e.preInit.pop()();noExitRuntime=!0;Ub();return visdif.ready}}();module.exports=visdif});var visdifWasm=typeof document==="undefined"?new(require("u"+"rl").URL)("file:"+__dirname+"/visdif-353daee5.wasm").href:new URL("visdif-353daee5.wasm",document.currentScript&&document.currentScript.src||document.baseURI).href;async function binarySearch(measureGoal,measure,{min=0,max=100,epsilon=0.1,maxRounds=8}={}){let parameter=(max-min)/2+min;let delta=(max-min)/4;let value;let round=1;while(true){value=await measure(parameter);if(Math.abs(value-measureGoal)<epsilon||round>=maxRounds){return{parameter,round,value}}if(value>measureGoal){parameter-=delta}else if(value<measureGoal){parameter+=delta}delta/=2;round++}}async function autoOptimize(bitmapIn,encode,decode,{butteraugliDistanceGoal=1.4,...otherOpts}={}){const{VisDiff}=await instantiateEmscriptenWasm(visdif_1,visdifWasm);const comparator=new VisDiff(bitmapIn.data,bitmapIn.width,bitmapIn.height);let bitmapOut;let binaryOut;const{parameter}=await binarySearch(-1*butteraugliDistanceGoal,async quality=>{binaryOut=await encode(bitmapIn,quality);bitmapOut=await decode(binaryOut);return-1*comparator.distance(bitmapOut.data)},otherOpts);comparator.delete();return{bitmap:bitmapOut,binary:binaryOut,quality:parameter}}function clamp(v,min,max){if(v<min)return min;if(v>max)return max;return v}const suffix=["B","KB","MB"];function prettyPrintSize(size){const base=Math.floor(Math.log2(size)/10);const index=clamp(base,0,2);return(size/2**(10*index)).toFixed(2)+suffix[index]}async function decodeFile(file){var _Object$entries$find;const buffer=await fs.promises.readFile(file);const firstChunk=buffer.slice(0,16);const firstChunkString=Array.from(firstChunk).map(v=>String.fromCodePoint(v)).join("");const key=(_Object$entries$find=Object.entries(codecs).find(([name,{detectors}])=>detectors.some(detector=>detector.exec(firstChunkString))))==null?void 0:_Object$entries$find[0];if(!key){throw Error(`${file} has an unsupported format`)}const rgba=(await codecs[key].dec()).decode(new Uint8Array(buffer));return{file,bitmap:rgba,size:buffer.length}}async function preprocessImage({preprocessorName,options,file}){const preprocessor=await preprocessors[preprocessorName].instantiate();file.bitmap=await preprocessor(file.bitmap.data,file.bitmap.width,file.bitmap.height,options);return file}async function encodeFile({file,size,bitmap:bitmapIn,outputFile,encName,encConfig,optimizerButteraugliTarget,maxOptimizerRounds}){let out,infoText;const encoder=await codecs[encName].enc();if(encConfig==="auto"){const optionToOptimize=codecs[encName].autoOptimize.option;const decoder=await codecs[encName].dec();const encode=(bitmapIn,quality)=>encoder.encode(bitmapIn.data,bitmapIn.width,bitmapIn.height,Object.assign({},codecs[encName].defaultEncoderOptions,{[optionToOptimize]:quality}));const decode=binary=>decoder.decode(binary);const{bitmap,binary,quality}=await autoOptimize(bitmapIn,encode,decode,{min:codecs[encName].autoOptimize.min,max:codecs[encName].autoOptimize.max,butteraugliDistanceGoal:optimizerButteraugliTarget,maxRounds:maxOptimizerRounds});out=binary;const opts={[optionToOptimize]:Math.round(quality*10000)/10000};infoText=` using --${encName} '${lib.stringify(opts)}'`}else{out=encoder.encode(bitmapIn.data.buffer,bitmapIn.width,bitmapIn.height,encConfig)}await fs.promises.writeFile(outputFile,out);return{infoText,inputSize:size,inputFile:file,outputFile,outputSize:out.length}}function handleJob(params){const{operation}=params;switch(operation){case"encode":return encodeFile(params);case"decode":return decodeFile(params.file);case"preprocess":return preprocessImage(params);default:throw Error(`Invalid job "${operation}"`);}}function progressTracker(results){const spinner=ora();const tracker={};tracker.spinner=spinner;tracker.progressOffset=0;tracker.totalOffset=0;let status="";tracker.setStatus=text=>{status=text||"";update()};let progress="";tracker.setProgress=(done,total)=>{spinner.prefixText=$.dim(`${done}/${total}`);const completeness=(tracker.progressOffset+done)/(tracker.totalOffset+total);progress=$.cyan(`▐${"\u25A8".repeat(completeness*10|0).padEnd(10,"\u254C")}▌ `);update()};function update(){spinner.text=progress+$.bold(status)+getResultsText()}tracker.finish=text=>{spinner.succeed($.bold(text)+getResultsText())};function getResultsText(){let out="";for(const[filename,result]of results.entries()){out+=`\n ${$.cyan(filename)}: ${prettyPrintSize(result.size)}`;for(const{outputFile,outputSize,infoText}of result.outputs){const name=(commander.program.suffix+path.extname(outputFile)).padEnd(5);out+=`\n ${$.dim("\u2514")} ${$.cyan(name)} → ${prettyPrintSize(outputSize)}`;const percent=(outputSize/result.size*100).toPrecision(3);out+=` (${$[outputSize>result.size?"red":"green"](percent+"%")})`;if(infoText)out+=$.yellow(infoText)}}return out||"\n"}spinner.start();return tracker}async function processFiles(files){const parallelism=os.cpus().length;const results=new Map;const progress=progressTracker(results);progress.setStatus("Decoding...");progress.totalOffset=files.length;progress.setProgress(0,files.length);const workerPool=new WorkerPool(parallelism,__filename);await fs.promises.mkdir(commander.program.outputDir,{recursive:true});let decoded=0;let decodedFiles=await Promise.all(files.map(async file=>{const result=await workerPool.dispatchJob({operation:"decode",file});results.set(file,{file:result.file,size:result.size,outputs:[]});progress.setProgress(++decoded,files.length);return result}));for(const[preprocessorName,value]of Object.entries(preprocessors)){if(!commander.program[preprocessorName]){continue}const preprocessorParam=commander.program[preprocessorName];const preprocessorOptions=Object.assign({},value.defaultOptions,lib.parse(preprocessorParam));decodedFiles=await Promise.all(decodedFiles.map(async file=>{return workerPool.dispatchJob({file,operation:"preprocess",preprocessorName,options:preprocessorOptions})}));for(const{file,bitmap,size}of decodedFiles){}}progress.progressOffset=decoded;progress.setStatus("Encoding "+$.dim(`(${parallelism} threads)`));progress.setProgress(0,files.length);const jobs=[];let jobsStarted=0;let jobsFinished=0;for(const{file,bitmap,size}of decodedFiles){const ext=path.extname(file);const base=path.basename(file,ext)+commander.program.suffix;for(const[encName,value]of Object.entries(codecs)){if(!commander.program[encName]){continue}const encParam=typeof commander.program[encName]==="string"?commander.program[encName]:"{}";const encConfig=encParam.toLowerCase()==="auto"?"auto":Object.assign({},value.defaultEncoderOptions,lib.parse(encParam));const outputFile=path.join(commander.program.outputDir,`${base}.${value.extension}`);jobsStarted++;const p=workerPool.dispatchJob({operation:"encode",file,size,bitmap,outputFile,encName,encConfig,optimizerButteraugliTarget:Number(commander.program.optimizerButteraugliTarget),maxOptimizerRounds:Number(commander.program.maxOptimizerRounds)}).then(output=>{jobsFinished++;results.get(file).outputs.push(output);progress.setProgress(jobsFinished,jobsStarted)});jobs.push(p)}}progress.setProgress(jobsFinished,jobsStarted);await workerPool.join();await Promise.all(jobs);progress.finish("Squoosh results:")}if(worker_threads.isMainThread){commander.program.name("squoosh-cli").version(version).arguments("<files...>").option("-d, --output-dir <dir>","Output directory",".").option("-s, --suffix <suffix>","Append suffix to output files","").option("--max-optimizer-rounds <rounds>","Maximum number of compressions to use for auto optimizations","6").option("--optimizer-butteraugli-target <butteraugli distance>","Target Butteraugli distance for auto optimizer","1.4").action(processFiles);for(const[key,value]of Object.entries(preprocessors)){commander.program.option(`--${key} [config]`,value.description)}for(const[key,value]of Object.entries(codecs)){commander.program.option(`--${key} [config]`,`Use ${value.name} to generate a .${value.extension} file with the given configuration`)}commander.program.parse(process.argv)}else{WorkerPool.useThisThreadAsWorker(handleJob)}
ReferenceError [Error]: x is not defined
at /Users/surma/src/github.com/GoogleChromeLabs/squoosh/cli/build/index.js:7:278724
at async preprocessImage (/Users/surma/src/github.com/GoogleChromeLabs/squoosh/cli/build/index.js:7:420614)
at async MessagePort.<anonymous> (/Users/surma/src/github.com/GoogleChromeLabs/squoosh/cli/build/index.js:7:392288)
Emitted 'error' event on process instance at:
at emitUnhandledRejectionOrErr (internal/event_target.js:542:11)
at MessagePort.[nodejs.internal.kHybridDispatch] (internal/event_target.js:357:9)
at MessagePort.exports.emitMessage (internal/per_context/messageport.js:18:26)