@psdk/esc 0.5.5 → 0.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- require('./sourcemap-register.js');(()=>{"use strict";var e={4245:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.FakeConnectedDevice=void 0;const n=r(7569);const s=r(932);class FakeConnectedDevice{origin(){return"FAKE-DEVICE"}connectionState(){return n.ConnectionState.CONNECTED}deviceName(){return"FAKE-DEVICE"}async disconnect(){}canRead(){return true}async read(e){return s.PsdkConst.EMPTY_BYTES}async write(e){console.log("WRITE: ",e)}flush(){}}t.FakeConnectedDevice=FakeConnectedDevice},5324:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(4245),t);s(r(7569),t)},7569:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ReadOptions=t.WroteReporter=t.ConnectionState=void 0;var r;(function(e){e["CONNECTED"]="CONNECTED";e["DISCONNECTED"]="DISCONNECTED"})(r||(t.ConnectionState=r={}));class WroteReporter{ok;binary;controlExit;exception;constructor(e,t,r,n){this.ok=e;this.binary=t;this.controlExit=r;this.exception=n}}t.WroteReporter=WroteReporter;class ReadOptions{timeout;constructor(e){this.timeout=e?.timeout}}t.ReadOptions=ReadOptions},7555:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.PSDK=void 0;const n=r(1482);const s=r(3783);class PSDK{sversion(){return"0.2.67"}authors(){return n.PsdkConst.DEF_AUTHORS}raw(e){this.commander().pushArg(e);return this}variable(e,t){this.commander().variable(e,t);return this}command(){return this.commander().command()}clear(){this.commander().clear();return this}async write(e){const t=this.connectedDevice();if(!t)throw Error("It's seems you missing to set connectedDevice");e=e??n.WriteOptions.def();const r=this.command();const i=r.binary();const a=new s.DataWriteOperation(e,i,t);const o=await a.write();this.clear();return o}newline(){this.commander().newline();return this}push(e){this.commander().pushArg(e);return this}}t.PSDK=PSDK},3101:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.BasicArg=void 0;const n=r(1482);class BasicArg{newline(){return n.PsdkConst.DEF_ENABLED_NEWLINE}}t.BasicArg=BasicArg},6012:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.OnlyTextHeaderArg=t.OnlyBinaryHeaderArg=t.EasyArg=void 0;const n=r(3101);const s=r(3623);class EasyArg extends n.BasicArg{prependClauses;appendClauses;constructor(){super();this.prependClauses=[];this.appendClauses=[]}append(e){this.appendClauses.push(...e.clauses());return this}prepend(e){this.prependClauses.push(...e.clauses());return this}clauses(){const e=this.clause();const t=[];if(e.type!==s.ClauseType.NONE){t.push(e);if(this.newline()){t.push(s.CommandClause.newline())}}return[...this.prependClauses,...t,...this.appendClauses]}clear(){this.prependClauses.splice(0,this.prependClauses.length);this.appendClauses.splice(0,this.appendClauses.length)}}t.EasyArg=EasyArg;class OnlyBinaryHeaderArg extends EasyArg{append(e){super.append(e);return this}prepend(e){super.prepend(e);return this}clause(){return s.CommandClause.binary(this.header())}newline(){return false}}t.OnlyBinaryHeaderArg=OnlyBinaryHeaderArg;class OnlyTextHeaderArg extends EasyArg{append(e){super.append(e);return this}prepend(e){super.prepend(e);return this}clause(){return s.CommandClause.text(this.header())}}t.OnlyTextHeaderArg=OnlyTextHeaderArg},1666:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.RawMode=t.Raw=void 0;const n=r(6012);const s=r(3623);const i=r(1482);class Raw extends n.EasyArg{_mode;_text;_charset;_binary;_newline=i.PsdkConst.DEF_ENABLED_NEWLINE;constructor(){super()}static text(e,t){const r=new Raw;r._mode=a.TEXT;r._text=e;r._charset=t?.charset??i.PsdkConst.DEF_CHARSET;r._newline=t?.newline??i.PsdkConst.DEF_ENABLED_NEWLINE;return r}static binary(e,t){const r=new Raw;r._mode=a.BINARY;r._binary=e;r._charset=t?.charset??i.PsdkConst.DEF_CHARSET;r._newline=t?.newline??i.PsdkConst.DEF_ENABLED_NEWLINE;return r}append(e){super.append(e);return this}prepend(e){super.prepend(e);return this}clause(){let e;switch(this._mode){case a.TEXT:e=s.CommandClause.text(this._text,this._charset);break;case a.BINARY:e=s.CommandClause.binary(this._binary);break;default:e=s.CommandClause.none();break}return e}header(){return i.PsdkConst.EMPTY_BYTES}newline(){return this._newline}}t.Raw=Raw;var a;(function(e){e["BINARY"]="BINARY";e["TEXT"]="TEXT"})(a||(t.RawMode=a={}))},5146:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(3101),t);s(r(6012),t);s(r(1666),t)},3623:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(8247),t);s(r(1392),t);s(r(2211),t);s(r(8718),t);s(r(3839),t);s(r(1410),t)},8247:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.DefaultCommand=t.BasicCommand=void 0;const n=r(1482);const s=r(1614);const i=r(2211);const a=r(4006);class BasicCommand{base64(){return s.Base64.fromUint8Array(this.binary())}}t.BasicCommand=BasicCommand;class DefaultCommand extends BasicCommand{bytes;constructor(e,t){super();let r=[];for(const s of e){switch(s.type){case i.ClauseType.TEXT:const e=a.PVariableKit.replace(s.text,t);const o=a.FastGBK.encode(e);const l=Array.prototype.slice.call(o,0);r=r.concat(l);break;case i.ClauseType.NEWLINE:case i.ClauseType.BINARY:const c=Array.from(s.binary??n.PsdkConst.EMPTY_BYTES);r=r.concat(c);break}}this.bytes=new Uint8Array(r)}binary(){return this.bytes}hex(e){return(e??n.HexOutput.def()).format(this.binary())}string(e){return a.FastGBK.decode(this.binary())}}t.DefaultCommand=DefaultCommand},2211:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.CommandClause=t.ClauseType=void 0;const n=r(1482);var s;(function(e){e["TEXT"]="TEXT";e["BINARY"]="BINARY";e["NEWLINE"]="NEWLINE";e["NONE"]="NONE"})(s||(t.ClauseType=s={}));class CommandClause{_type;_text;_charset;_binary;constructor(e,t,r,n){this._type=e;this._text=t;this._charset=r;this._binary=n}static text(e,t=n.PsdkConst.DEF_CHARSET){return new CommandClause(s.TEXT,e,t,undefined)}static binary(e){return new CommandClause(s.BINARY,undefined,undefined,e)}static newline(){return new CommandClause(s.NEWLINE,undefined,undefined,n.PsdkConst.DEF_NEWLINE_BINARY)}static none(){return new CommandClause(s.NONE,undefined,undefined,undefined)}get type(){return this._type}get text(){return this._text}get charset(){return this._charset}get binary(){return this._binary}}t.CommandClause=CommandClause},1392:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.Commander=void 0;const n=r(2211);const s=r(1482);const i=r(8247);class Commander{clauses;_variable;constructor(){this.clauses=[];this._variable=new Map}static make(){return new Commander}pushText(e,t){if(e.startsWith(s.PsdkConst.CRLF)){e=e.substring(2)}const r=n.CommandClause.text(e,t?.charset??s.PsdkConst.DEF_CHARSET);return this.pushClause(r,t?.newline??s.PsdkConst.DEF_ENABLED_NEWLINE)}pushBinary(e,t){const r=n.CommandClause.binary(e);return this.pushClause(r,t??s.PsdkConst.DEF_ENABLED_NEWLINE)}pushClause(e,t){this.clauses.push(e);if(t??s.PsdkConst.DEF_ENABLED_NEWLINE){this.clauses.push(n.CommandClause.newline())}return this}pushClauses(e){e.forEach((e=>this.pushClause(e,false)));return this}pushArg(e){this.pushClauses(e.clauses());return this}newline(){const e=n.CommandClause.newline();return this.pushClause(e,false)}variable(e,t){this._variable.set(e,t);return this}clear(){this.clauses.splice(0,this.clauses.length);this._variable.clear();return this}command(){return new i.DefaultCommand(this.clauses,this._variable)}}t.Commander=Commander},8718:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.TextAppendat=t.Appendat=void 0;const n=r(4006);class Appendat{_argument;_condition;_callback;constructor(e,t,r){this._argument=e;this._condition=t;this._callback=r}get condition(){return this._condition}callback(e){this._callback=e;return this}quote(){return this}argument(){if(!n.Checker.truthy(this._callback))return this._argument;if(!n.Checker.truthy(this._argument))return undefined;return this._callback.callback(this._argument)}}t.Appendat=Appendat;class TextAppendat extends Appendat{_quote;constructor(e,t,r){super(e,t??true,r);this._quote=false}static create(e,t){return new TextAppendat(e,t?.condition??true,new class{callback(e){const r=t?.callback;if(r){return r(e)}return e}})}callback(e){super.callback(e);return this}quote(){this._quote=true;return this}argument(){const e=super.argument();if(!n.Checker.truthy(e))return this._quote?'""':"";if(this._quote){return`"${e}"`}return e}}t.TextAppendat=TextAppendat},3839:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.BinaryCommand=void 0;const n=r(2211);const s=r(4006);class BinaryCommand{binary;constructor(e){this.binary=e??[]}static make(){return new BinaryCommand}static with(e){const t=Array.from(e);return new BinaryCommand(t)}appendNumber(e){this.binary.push(e);return this}appendText(e,t){const r=s.FastGBK.encode(e);this.binary.push(...r);return this}appendU8A(e){const t=Array.from(e);this.binary=this.binary.concat(t);return this}output(){return new Uint8Array(this.binary)}clause(){const e=this.output();return n.CommandClause.binary(e)}}t.BinaryCommand=BinaryCommand},1410:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.TSPLCommand=t.CPCLCommand=t.SingleCommand=void 0;const n=r(8718);const s=r(2211);const i=r(4006);class SingleCommand{_arguments;_symbolAfterHeader;_symbolBetweenArguments;_header;_charset;constructor(e,t,r){this._arguments=[];this._symbolAfterHeader=e;this._symbolBetweenArguments=t;this._charset=r}get getHeader(){return this._header}get symbolAfterHeader(){return this._symbolAfterHeader}get symbolBetweenArguments(){return this._symbolBetweenArguments}header(e){this._header=e;return this}get charset(){return this._charset}append(e){if(!e.condition)return this;const t=e.argument();if(!i.Checker.truthy(t))return this;this._arguments.push(t);return this}arguments(){return this._arguments}}t.SingleCommand=SingleCommand;class BasicStringSingleCommand extends SingleCommand{constructor(e,t,r){super(e,t,r)}append(e){const t=e.argument();if(!i.Checker.truthy(t))return this;super.append(e);return this}appendText(e){return this.append(n.TextAppendat.create(e??"",{}))}appendNumber(e){if(isNaN(e))return this;return this.append(n.TextAppendat.create((e??"").toString(),{}))}output(){let e="";if(i.Checker.truthy(super.getHeader)){e+=super.getHeader;e+=super.symbolAfterHeader}const t=super.arguments();const r=t.length;let n=0;for(const s of t){n+=1;if(!i.Checker.truthy(s))continue;e+=s;if(n<r){e+=super.symbolBetweenArguments}}return e}clause(){const e=this.output();if(!i.Checker.truthy(e)){return s.CommandClause.none()}return s.CommandClause.text(e,super.charset)}}class CPCLCommand extends BasicStringSingleCommand{constructor(e,t){super(" "," ",t);super.header(e)}static with(e,t){return new CPCLCommand(e,t)}append(e){super.append(e);return this}appendText(e){super.appendText(e);return this}appendNumber(e){super.appendNumber(e);return this}}t.CPCLCommand=CPCLCommand;class TSPLCommand extends BasicStringSingleCommand{constructor(e,t){super(" ",",",t);super.header(e)}static with(e,t){return new TSPLCommand(e,t)}append(e){super.append(e);return this}appendText(e){super.appendText(e);return this}appendNumber(e){super.appendNumber(e);return this}}t.TSPLCommand=TSPLCommand},3783:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.DataWriteOperation=void 0;const n=r(1482);const s=r(5324);const i=r(4006);class DataWriteOperation{options;binary;connectedDevice;constructor(e,t,r){this.options=e;this.binary=t;this.connectedDevice=r}async write(){if(!this.options.enableChunkWrite){const e=await this.writData(this.binary);this.doCallback(e,this.binary,1,1);return e}const e=Array.from(this.binary);const t=i.CollectionKit.split(e,this.options.chunkSize);const r=t.length;let a=0;for(const e of t){a+=1;const t=new Uint8Array(e);const s=await this.writData(t);const i=this.doCallback(s,t,a,r);if(i==n.WriteControl.STOP){s.controlExit=true;return s}if(!s.ok){return s}}return new s.WroteReporter(true,this.binary,false)}doCallback(e,t,r,s){const i=this.options.callback;if(!i)return n.WriteControl.CONTINUE;const a=new n.DataWrote(t,r,s);if(e.ok){return i.success(a)}if(i.failed){i.failed(a,e.exception)}else{console.log("no custom failed callback, full exception: ",e.exception)}return n.WriteControl.STOP}async writData(e){try{await this.connectedDevice.write(e);return new s.WroteReporter(true,e,false)}catch(t){return new s.WroteReporter(false,e,false,t)}}}t.DataWriteOperation=DataWriteOperation},932:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(5146),t);s(r(1482),t);s(r(3623),t);s(r(7555),t)},8831:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.HexOutput=void 0;const r=32;class HexOutput{enableFormat;spacing;maxLengthOfLine;constructor(e,t,n=r){this.enableFormat=e;this.spacing=t;this.maxLengthOfLine=n}static def(){return new HexOutput(false,false,r)}static simple(e=true){return new HexOutput(e,true,r)}static formatWithMaxLength(e){return new HexOutput(true,true,e)}format(e){const t=Array.from(e,(function(e){return("0"+(e&255).toString(16)).slice(-2)})).join("");if(!this.enableFormat){return t}let r="";const n=t.length;let s=0;for(let e=0;e<n;e++){const i=e+1;const a=t[e];r+=a;if(i%2==0&&this.spacing){if(i<n){if(s+1<this.maxLengthOfLine){r+=" "}s+=1}}if(s>=this.maxLengthOfLine){r+="\n";s=0}}return r}}t.HexOutput=HexOutput},1482:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(4164),t);s(r(8831),t);s(r(7331),t);s(r(9614),t)},9614:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.Lifecycle=void 0;class Lifecycle{connectedDevice;constructor(e){this.connectedDevice=e}}t.Lifecycle=Lifecycle},4164:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.PsdkConst=void 0;const n=r(4006);const s="\r";const i="\n";const a=`${s}${i}`;t.PsdkConst={DEF_CHARSET:"gbk",CR:s,LF:i,CRLF:a,QUOTE:'"',DEF_NEWLINE_BINARY:n.ByteKit.textToU8A(a),DEF_AUTHORS:["fewensa <osuni@protonmail.com>"],DEF_ENABLED_NEWLINE:true,DEF_WRITE_CHUNK_SIZE:512,EMPTY_BYTES:new Uint8Array([])}},7331:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.WriteControl=t.DataWrote=t.DataWrite=t.IDataWriteCallback=t.WriteOptions=void 0;const n=r(4164);class WriteOptions{enableChunkWrite;chunkSize;callback;constructor(e=true,t=n.PsdkConst.DEF_WRITE_CHUNK_SIZE,r){this.enableChunkWrite=e;this.chunkSize=t;this.callback=r}static def(){return new WriteOptions(true,n.PsdkConst.DEF_WRITE_CHUNK_SIZE,undefined)}}t.WriteOptions=WriteOptions;class IDataWriteCallback{failed(e,t){console.error(`Write data failed: ${t.message}`)}}t.IDataWriteCallback=IDataWriteCallback;class DataWrite{binary;currentTimes;totalTimes;constructor(e,t,r){this.binary=e;this.currentTimes=t;this.totalTimes=r}}t.DataWrite=DataWrite;class DataWrote extends DataWrite{}t.DataWrote=DataWrote;var s;(function(e){e["CONTINUE"]="CONTINUE";e["STOP"]="STOP"})(s||(t.WriteControl=s={}))},6833:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(5324),t);s(r(932),t);s(r(4006),t)},1614:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.Base64=t.extendBuiltins=t.extendUint8Array=t.extendString=t.toUint8Array=t.fromUint8Array=t.isValid=t.decode=t.btou=t.encodeURL=t.encodeURI=t.encode=t.utob=t.toBase64=t.fromBase64=t.btoaPolyfill=t.btoa=t.atobPolyfill=t.atob=t.VERSION=t.version=void 0;const r="3.7.7";t.version=r;const n=r;t.VERSION=n;const s=typeof Buffer==="function";const i=typeof TextDecoder==="function"?new TextDecoder:undefined;const a=typeof TextEncoder==="function"?new TextEncoder:undefined;const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";const l=Array.prototype.slice.call(o);const c=(e=>{let t={};e.forEach(((e,r)=>t[e]=r));return t})(l);const u=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;const d=String.fromCharCode.bind(String);const h=typeof Uint8Array.from==="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0));const _mkUriSafe=e=>e.replace(/=/g,"").replace(/[+\/]/g,(e=>e=="+"?"-":"_"));const _tidyB64=e=>e.replace(/[^A-Za-z0-9\+\/]/g,"");const btoaPolyfill=e=>{let t,r,n,s,i="";const a=e.length%3;for(let a=0;a<e.length;){if((r=e.charCodeAt(a++))>255||(n=e.charCodeAt(a++))>255||(s=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=r<<16|n<<8|s;i+=l[t>>18&63]+l[t>>12&63]+l[t>>6&63]+l[t&63]}return a?i.slice(0,a-3)+"===".substring(a):i};t.btoaPolyfill=btoaPolyfill;const f=typeof btoa==="function"?e=>btoa(e):s?e=>Buffer.from(e,"binary").toString("base64"):btoaPolyfill;t.btoa=f;const _=s?e=>Buffer.from(e).toString("base64"):e=>{const t=4096;let r=[];for(let n=0,s=e.length;n<s;n+=t){r.push(d.apply(null,e.subarray(n,n+t)))}return f(r.join(""))};const fromUint8Array=(e,t=false)=>t?_mkUriSafe(_(e)):_(e);t.fromUint8Array=fromUint8Array;const cb_utob=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?d(192|t>>>6)+d(128|t&63):d(224|t>>>12&15)+d(128|t>>>6&63)+d(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return d(240|t>>>18&7)+d(128|t>>>12&63)+d(128|t>>>6&63)+d(128|t&63)}};const p=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;const utob=e=>e.replace(p,cb_utob);t.utob=utob;const m=s?e=>Buffer.from(e,"utf8").toString("base64"):a?e=>_(a.encode(e)):e=>f(utob(e));const encode=(e,t=false)=>t?_mkUriSafe(m(e)):m(e);t.toBase64=encode;t.encode=encode;const encodeURI=e=>encode(e,true);t.encodeURI=encodeURI;t.encodeURL=encodeURI;const b=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;const cb_btou=e=>{switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),r=t-65536;return d((r>>>10)+55296)+d((r&1023)+56320);case 3:return d((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return d((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}};const btou=e=>e.replace(b,cb_btou);t.btou=btou;const atobPolyfill=e=>{e=e.replace(/\s+/g,"");if(!u.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let t,r="",n,s;for(let i=0;i<e.length;){t=c[e.charAt(i++)]<<18|c[e.charAt(i++)]<<12|(n=c[e.charAt(i++)])<<6|(s=c[e.charAt(i++)]);r+=n===64?d(t>>16&255):s===64?d(t>>16&255,t>>8&255):d(t>>16&255,t>>8&255,t&255)}return r};t.atobPolyfill=atobPolyfill;const g=typeof atob==="function"?e=>atob(_tidyB64(e)):s?e=>Buffer.from(e,"base64").toString("binary"):atobPolyfill;t.atob=g;const w=s?e=>h(Buffer.from(e,"base64")):e=>h(g(e).split("").map((e=>e.charCodeAt(0))));const toUint8Array=e=>w(_unURI(e));t.toUint8Array=toUint8Array;const y=s?e=>Buffer.from(e,"base64").toString("utf8"):i?e=>i.decode(w(e)):e=>btou(g(e));const _unURI=e=>_tidyB64(e.replace(/[-_]/g,(e=>e=="-"?"+":"/")));const decode=e=>y(_unURI(e));t.fromBase64=decode;t.decode=decode;const isValid=e=>{if(typeof e!=="string")return false;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)};t.isValid=isValid;const _noEnum=e=>({value:e,enumerable:false,writable:true,configurable:true});const extendString=function(){const _add=(e,t)=>Object.defineProperty(String.prototype,e,_noEnum(t));_add("fromBase64",(function(){return decode(this)}));_add("toBase64",(function(e){return encode(this,e)}));_add("toBase64URI",(function(){return encode(this,true)}));_add("toBase64URL",(function(){return encode(this,true)}));_add("toUint8Array",(function(){return toUint8Array(this)}))};t.extendString=extendString;const extendUint8Array=function(){const _add=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,_noEnum(t));_add("toBase64",(function(e){return fromUint8Array(this,e)}));_add("toBase64URI",(function(){return fromUint8Array(this,true)}));_add("toBase64URL",(function(){return fromUint8Array(this,true)}))};t.extendUint8Array=extendUint8Array;const extendBuiltins=()=>{extendString();extendUint8Array()};t.extendBuiltins=extendBuiltins;const v={version:r,VERSION:n,atob:g,atobPolyfill:atobPolyfill,btoa:f,btoaPolyfill:btoaPolyfill,fromBase64:decode,toBase64:encode,encode:encode,encodeURI:encodeURI,encodeURL:encodeURI,utob:utob,btou:btou,decode:decode,isValid:isValid,fromUint8Array:fromUint8Array,toUint8Array:toUint8Array,extendString:extendString,extendUint8Array:extendUint8Array,extendBuiltins:extendBuiltins};t.Base64=v},5659:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ByteKit=void 0;const n=r(3192);class ByteKit{static textToU8A(e){if(!n.Checker.truthy(e))return new Uint8Array([]);let t=[];let r,s;r=e.length;for(let n=0;n<r;n++){s=e.charCodeAt(n);if(s>=65536&&s<=1114111){t.push(s>>18&7|240);t.push(s>>12&63|128);t.push(s>>6&63|128);t.push(s&63|128)}else if(s>=2048&&s<=65535){t.push(s>>12&15|224);t.push(s>>6&63|128);t.push(s&63|128)}else if(s>=128&&s<=2047){t.push(s>>6&31|192);t.push(s&63|128)}else{t.push(s&255)}}return new Uint8Array(t)}}t.ByteKit=ByteKit},3192:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.Checker=void 0;class Checker{static truthy(e){if(e===undefined)return false;if(e===null)return false;if(e==="")return false;const t=typeof e;switch(t){case"number":if(isNaN(e))return false;break;case"bigint":default:return true}}static empty(e){if(!Checker.truthy(e))return true;return e.length===0}}t.Checker=Checker},8961:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.FastGBK=void 0;let r;function initGbkTable(){const e=[[161,169,161,254],[176,247,161,254],[129,160,64,254],[170,254,64,160],[168,169,64,160],[170,175,161,254],[248,254,161,254],[161,167,64,160]];const t=new Uint16Array(23940);let n=0;for(const[r,s,i,a]of e){for(let e=i;e<=a;e++){if(e!==127){for(let i=r;i<=s;i++){t[n++]=e<<8|i}}}}r=new Uint16Array(65536);r.fill(65535);const s=new TextDecoder("gbk").decode(t);for(let e=0;e<s.length;e++){r[s.charCodeAt(e)]=t[e]}}const defaultOnAlloc=e=>new Uint8Array(e);const defaultOnError=()=>63;const n=new TextDecoder("gbk");class FastGBK{static decode(e){return n.decode(e)}static encode(e,t){if(!r){initGbkTable()}const n=t?.onAlloc??defaultOnAlloc;const s=t?.onError??defaultOnError;const i=n(e.length*2);let a=0;for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<128){i[a++]=n;continue}const o=r[n];if(o!==65535){i[a++]=o;i[a++]=o>>8}else if(n===8364){i[a++]=128}else{const r=s(t,e);if(r===-1){break}if(r>255){i[a++]=r;i[a++]=r>>8}else{i[a++]=r}}}return i.subarray(0,a)}}t.FastGBK=FastGBK},4006:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(5659),t);s(r(5925),t);s(r(2329),t);s(r(2973),t);s(r(3192),t);s(r(8961),t)},2329:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.CollectionKit=void 0;const n=r(3192);class CollectionKit{static split(e,t){if(n.Checker.empty(e))return[];if(t<=0)throw new Error("The size must > 0");const r=[];let s=[];for(const n of e){s.push(n);if(t==s.length){r.push(s);s=[]}}if(0!=s.length)r.push(s);return r}static parts(e,t){if(n.Checker.empty(e)){return[]}if(t<=0)throw new Error("The parts length must > 0");if(e.length<=t){return[e]}const r=[];let s=[];const i=Math.floor(e.length/t);for(const n of e){s.push(n);if(s.length==i){r.push(s);if(r.length<t)s=[]}}return r}}t.CollectionKit=CollectionKit},2973:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ImageKit=void 0;class ImageKit{static processImage(e,t,r){const n=e.getContext("2d");let s=Math.floor(t%8===0?t/8:t/8+1);let i=0;let a=0;const o=r*s;const l=[];for(let e=0;e<o;e++){l[e]=0}const c=n.getImageData(0,0,e.width,e.height);while(i<r){let e=0;for(let r=0;r<t;r++){e++;if(e>8){e=1;a++}const t=1<<8-e;const n=ImageKit.fastExtractPixel(c,r,i,1,1);const s=n[0];const o=s[0];const u=s[1];const d=s[2];if((o+u+d)/3<128){l[a]=l[a]|t}}a=s*(i+1);i+=1}return new Uint8Array(l)}static fastExtractPixel(e,t,r,n,s){let i,a;let o=[];let l,c,u,d;const h=e.data;for(a=0;a<s;a++){let s=(t+(r+a)*e.width)*4;for(i=0;i<n;i++){l=h[s++];c=h[s++];u=h[s++];d=h[s++];o.push([l,c,u,d])}}return o}}t.ImageKit=ImageKit},5925:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.PVariableKit=void 0;const n=r(3192);class PVariableKit{static replace(e,t){if(!n.Checker.truthy(e))return e;if(!n.Checker.truthy(t))return e;if(e.indexOf("{{")<0&&e.indexOf("}}")<0)return e;const r=/[\\]?\{\{(?<varx>.*?)}}/gm;const s="__THIS_IS_MAGIC_MARK_FOR_HACK_REGEX_MATCH__";while(true){const n=r.exec(e);if(n==null)break;const i=n[0];const a=i.replace("{{","").replace("}}","");const o=a.trim();const l=t.get(o)??"";if(i.startsWith("\\")){const t=i.replace("\\{{",s);e=e.replace(i,t);continue}e=e.replace(i,l)}e=e.replace(new RegExp(s,"g"),"{{");return e}}t.PVariableKit=PVariableKit},2468:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(118),t)},1566:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.PinedThresholdValue=t.ThresholdValue=t.AbstractThreshold=void 0;const n=r(1361);const s=r(801);const i=r(6736);class AbstractThreshold extends n.ImagebProcesser{threshold;mode;constructor(e){super();this.mode=s.ThresholdValueMode.avg;this.threshold=e??new PinedThresholdValue}process(e){let t=i.ImagebTool.zeroAndOne(e);return new s.ProcessedResult({origin:e,result:new s.ProcessedImage({data:t,width:t.width,height:t.height})})}}t.AbstractThreshold=AbstractThreshold;class ThresholdValue{}t.ThresholdValue=ThresholdValue;class PinedThresholdValue extends ThresholdValue{_value;constructor(e){super();this._value=e??190}threshold(){return this._value}}t.PinedThresholdValue=PinedThresholdValue},2749:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.GrayscaleImage=void 0;const n=r(1361);const s=r(801);const i=r(6736);class GrayscaleImage extends n.ImagebProcesser{_processer;constructor(e){super();this._processer=e?._processer}process(e){let t=i.ImagebTool.convertGreyImg(e);if(this._processer==null){return new s.ProcessedResult({origin:e,result:new s.ProcessedImage({data:t,width:t.width,height:t.height})})}return this._processer.process(t)}}t.GrayscaleImage=GrayscaleImage},6872:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ReverseColorImage=void 0;const n=r(1361);const s=r(801);const i=r(6736);class ReverseColorImage extends n.ImagebProcesser{_processer;constructor(e){super();this._processer=e?._processer}process(e){let t=i.ImagebTool.invertBitmap(e);if(this._processer==null){return new s.ProcessedResult({origin:e,result:new s.ProcessedImage({data:t,width:t.width,height:t.height})})}return this._processer.process(t)}}t.ReverseColorImage=ReverseColorImage},8574:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ThresholdImage=void 0;const n=r(1566);class ThresholdImage extends n.AbstractThreshold{constructor(e){super(new n.PinedThresholdValue(e?.threshold))}}t.ThresholdImage=ThresholdImage},118:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(1361),t);s(r(2749),t);s(r(6872),t);s(r(8574),t);s(r(115),t);s(r(1566),t)},115:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);s(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.Pbita=void 0;const a=r(1361);const o=r(801);const l=i(r(1154));const c=r(2749);const u=r(6872);class Pbita extends a.ImagebProcesser{command;threshold;compress;reverse;constructor(e){super();this.threshold=e.threshold;this.command=e.command;this.compress=e.compress;this.reverse=e.reverse}process(e){const t=e.width;const r=e.height;const n=new c.GrayscaleImage;const s=n.process(e);if(s.result==null){return new o.ProcessedResult({origin:e,message:"Failed to process gray scale: "+s.message})}let i;if(this.reverse){const t=new u.ReverseColorImage;const r=t.process(s.result.data);if(r.result==null){return new o.ProcessedResult({origin:e,message:"Failed to process reverse: "+r.message})}i=r.result.data}else{i=s.result.data}let a=this._topbitimg(i,t,r);if(a==null){return new o.ProcessedResult({origin:e,message:"Failed to process bitimg"})}if(this.compress){a=l.deflate(a,{windowBits:10})}return new o.ProcessedResult({origin:e,result:new o.ProcessedImage({data:i,width:t,height:r,bytes:a})})}_topbitimg(e,t,r){if(this.command=="tspl"&&!this.compress){return this._topbitimgReverse(this._topbitimgRaw(e,t,r))}else{return this._topbitimgRaw(e,t,r)}}_topbitimgRaw(e,t,r){const n=e.getContext("2d");let s=Math.floor(t%8===0?t/8:t/8+1);let i=0;let a=0;const o=r*s;const l=[];for(let e=0;e<o;e++){l[e]=0}const c=n.getImageData(0,0,e.width,e.height);while(i<r){let e=0;for(let r=0;r<t;r++){e++;if(e>8){e=1;a++}const t=1<<8-e;const n=this.fastExtractPixel(c,r,i,1,1);const s=n[0];const o=s[0];const u=s[1];const d=s[2];if((o+u+d)/3<(this.threshold??190)){l[a]=l[a]|t}}a=s*(i+1);i+=1}return new Uint8Array(l)}_topbitimgReverse(e){if(e==null){return null}const t=[];for(let r=0;r<e.length;r++){t[r]=~e[r]}return new Uint8Array(t)}fastExtractPixel(e,t,r,n,s){let i,a;let o=[];let l,c,u,d;const h=e.data;for(a=0;a<s;a++){let s=(t+(r+a)*e.width)*4;for(i=0;i<n;i++){l=h[s++];c=h[s++];u=h[s++];d=h[s++];o.push([l,c,u,d])}}return o}}t.Pbita=Pbita},1361:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ImagebProcesser=void 0;class ImagebProcesser{}t.ImagebProcesser=ImagebProcesser},6736:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ImagebTool=void 0;class ImagebTool{static invertBitmap(e){const t=e.getContext("2d");const r=t.getImageData(0,0,e.width,e.height);const n=r.data;for(let e=0,t=n.length;e<t;e+=4){r.data[e]=255-r.data[e];r.data[e+1]=255-r.data[e+1];r.data[e+2]=255-r.data[e+2]}t.putImageData(r,0,0);return e}static convertGreyImg(e){const t=e.getContext("2d");const r=t.getImageData(0,0,e.width,e.height);const n=r.data;for(let e=0,t=n.length;e<t;e+=4){const t=r.data[e]*.3+r.data[e+1]*.59+r.data[e+2]*.11;r.data[e]=t;r.data[e+1]=t;r.data[e+2]=t}t.putImageData(r,0,0);return e}static zeroAndOne(e){const t=e.getContext("2d");const r=t.getImageData(0,0,e.width,e.height);const n=255/2;for(let e=0;e<r.data.length;e+=4){const t=r.data[e];const s=r.data[e+1];const i=r.data[e+2];const a=r.data[e+3];const o=(t+s+i)/3;if(o>n){r.data[e]=255;r.data[e+1]=255;r.data[e+2]=255;r.data[e+3]=a}else{r.data[e]=0;r.data[e+1]=0;r.data[e+2]=0;r.data[e+3]=a}}t.putImageData(r,0,0);return e}}t.ImagebTool=ImagebTool},801:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ThresholdValueMode=t.ProcessedImage=t.ProcessedResult=void 0;class ProcessedResult{origin;result;message;constructor(e){this.origin=e.origin;this.result=e.result;this.message=e.message}}t.ProcessedResult=ProcessedResult;class ProcessedImage{data;width;height;bytes;constructor(e){this.data=e.data;this.width=e.width;this.height=e.height;this.bytes=e.bytes}}t.ProcessedImage=ProcessedImage;var r;(function(e){e[e["sum"]=0]="sum";e[e["avg"]=1]="avg";e[e["red"]=2]="red";e[e["green"]=3]="green";e[e["blue"]=4]="blue";e[e["max"]=5]="max";e[e["min"]=6]="min"})(r||(t.ThresholdValueMode=r={}))},3179:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EBackLineDot=void 0;const n=r(6376);const s=r(6833);class EBackLineDot extends n.BasicESCArg{dot;constructor(e){super();this.dot=e.dot??0}clause(){return s.BinaryCommand.with(this.header()).appendNumber(this.dot).clause()}header(){return new Uint8Array([16,255,129])}}t.EBackLineDot=EBackLineDot},6376:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.BasicESCArg=void 0;const n=r(6833);class BasicESCArg extends n.EasyArg{append(e){super.append(e);return this}prepend(e){super.prepend(e);return this}newline(){return false}}t.BasicESCArg=BasicESCArg},1598:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EBatteryVolume=void 0;const n=r(6833);class EBatteryVolume extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,80,241])}}t.EBatteryVolume=EBatteryVolume},9761:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EBTType=void 0;const n=r(6833);class EBTType extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([31,178,16])}}t.EBTType=EBTType},8310:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EEnable=void 0;const n=r(6833);class EEnable extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,254,1])}}t.EEnable=EEnable},7880:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EGetPaperTypeQ3=void 0;const n=r(6833);class EGetPaperTypeQ3 extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,133])}}t.EGetPaperTypeQ3=EGetPaperTypeQ3},1729:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EGetShutdownTime=void 0;const n=r(6833);class EGetShutdownTime extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,19])}}t.EGetShutdownTime=EGetShutdownTime},7921:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EImage=void 0;const n=r(6376);const s=r(6833);const i=r(8686);const a=r(2468);class EImage extends n.BasicESCArg{compress;mode;image;reverse;threshold;constructor(e){super();this.compress=e.compress??false;this.reverse=e.reverse??false;this.threshold=e.threshold??190;this.mode=e.mode??i.EImageMode.NORMAL;this.image=e.image}clause(){const e=new a.Pbita({command:"esc",threshold:this.threshold,compress:this.compress,reverse:this.reverse});const t=e.process(this.image);const r=t.result.data;const n=t.result.bytes;if(r==null){throw new Error("Wrong image data")}let i=r.width;let o=r.height;const l=Math.floor(i%8===0?i/8:i/8+1);if(this.compress){return s.BinaryCommand.with(this.header()).appendNumber(l/256).appendNumber(l%256).appendNumber(o/256).appendNumber(o%256).appendNumber(n.length-2>>24&255).appendNumber(n.length-2>>16&255).appendNumber(n.length-2>>8&255).appendNumber(n.length-2&255).appendU8A(n.subarray(2,n.length)).clause()}return s.BinaryCommand.with(this.header()).appendNumber(this.mode).appendNumber(l%256).appendNumber(l/256).appendNumber(o%256).appendNumber(o/256).appendU8A(n).clause()}header(){return new Uint8Array(this.compress?[31,0]:[29,118,48])}}t.EImage=EImage},9366:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(3179),t);s(r(6376),t);s(r(1598),t);s(r(8310),t);s(r(1729),t);s(r(7921),t);s(r(7138),t);s(r(4905),t);s(r(4653),t);s(r(6070),t);s(r(3245),t);s(r(319),t);s(r(4632),t);s(r(3651),t);s(r(3792),t);s(r(2997),t);s(r(5417),t);s(r(7520),t);s(r(9339),t);s(r(4249),t);s(r(7105),t);s(r(3916),t);s(r(6199),t);s(r(7028),t);s(r(9761),t)},7028:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EInfo=void 0;const n=r(6833);class EInfo extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,112])}}t.EInfo=EInfo},7138:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ELearnLabelGap=void 0;const n=r(6833);class ELearnLabelGap extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,3])}}t.ELearnLabelGap=ELearnLabelGap},4905:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ELine=void 0;const n=r(6376);const s=r(6833);class ELine extends n.BasicESCArg{x;y;constructor(e){super();this.x=e.x??0;this.y=e.y??0}clause(){return s.BinaryCommand.with(this.header()).appendNumber(this.x).appendNumber(this.y).clause()}header(){return new Uint8Array([0,1])}}t.ELine=ELine},4653:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ELineDot=void 0;const n=r(6376);const s=r(6833);class ELineDot extends n.BasicESCArg{dot;constructor(e){super();this.dot=e.dot??0}clause(){return s.BinaryCommand.with(this.header()).appendNumber(this.dot).clause()}header(){return new Uint8Array([27,74])}}t.ELineDot=ELineDot},6070:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ELocation=void 0;const n=r(6376);const s=r(6833);class ELocation extends n.BasicESCArg{location;constructor(e){super();this.location=e.location??0}clause(){return s.BinaryCommand.with(this.header()).appendNumber(this.location).clause()}header(){return new Uint8Array([27,97])}}t.ELocation=ELocation},3245:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EMac=void 0;const n=r(6833);class EMac extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,48,18])}}t.EMac=EMac},319:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EModel=void 0;const n=r(6833);class EModel extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,32,240])}}t.EModel=EModel},4632:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EName=void 0;const n=r(6833);class EName extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,48,17])}}t.EName=EName},3651:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EPaperType=void 0;const n=r(6376);const s=r(6833);const i=r(8686);class EPaperType extends n.BasicESCArg{paperType;constructor(e){super();this.paperType=e.paperType??i.PaperType.FOLDED_BLACK_LABEL_PAPER}clause(){return s.BinaryCommand.with(this.header()).appendNumber(this.paperType).clause()}header(){return new Uint8Array([16,255,16,3])}}t.EPaperType=EPaperType},3792:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EPosition=void 0;const n=r(6833);class EPosition extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([29,12])}}t.EPosition=EPosition},2997:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EPrinterVersion=void 0;const n=r(6833);class EPrinterVersion extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,32,241])}}t.EPrinterVersion=EPrinterVersion},5417:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ESetShutdownTime=void 0;const n=r(6376);const s=r(6833);class ESetShutdownTime extends n.BasicESCArg{time;constructor(e){super();this.time=e.time??0}clause(){return s.BinaryCommand.with(this.header()).appendNumber(this.time/256).appendNumber(this.time%256).clause()}header(){return new Uint8Array([16,255,18])}}t.ESetShutdownTime=ESetShutdownTime},7520:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ESN=void 0;const n=r(6833);class ESN extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,32,242])}}t.ESN=ESN},9339:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EState=void 0;const n=r(6833);class EState extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,64])}}t.EState=EState},4249:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EStopJob=void 0;const n=r(6833);class EStopJob extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,254,69])}}t.EStopJob=EStopJob},7105:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EThickness=void 0;const n=r(6376);const s=r(6833);class EThickness extends n.BasicESCArg{thickness;constructor(e){super();this.thickness=e.thickness??0}clause(){return s.BinaryCommand.with(this.header()).appendNumber(this.thickness).clause()}header(){return new Uint8Array([16,255,16,0])}}t.EThickness=EThickness},3916:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EVersion=void 0;const n=r(6833);class EVersion extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,48,16])}}t.EVersion=EVersion},6199:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.EWakeup=void 0;const n=r(6833);class EWakeup extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0])}}t.EWakeup=EWakeup},8947:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.BasicESC=void 0;const n=r(6833);const s=r(9366);const i=r(7880);class BasicESC extends n.PSDK{_lifecycle;_commander;constructor(e){super();this._lifecycle=e;this._commander=n.Commander.make()}connectedDevice(){return this._lifecycle.connectedDevice}commander(){return this._commander}lineDot(e){return super.push(new s.ELineDot({dot:e}))}backLineDot(e){return super.push(new s.EBackLineDot({dot:e}))}batteryVolume(){return super.push(new s.EBatteryVolume)}enable(){return super.push(new s.EEnable)}getShutdownTime(){return super.push(new s.EGetShutdownTime)}image(e){return super.push(e)}learnLabelGap(){return super.push(new s.ELearnLabelGap)}line(e){return super.push(e)}location(e){return super.push(new s.ELocation({location:e}))}mac(){return super.push(new s.EMac)}info(){return super.push(new s.EInfo)}model(){return super.push(new s.EModel)}name(){return super.push(new s.EName)}paperType(e){return super.push(e)}paperTypeQ3(e){return super.push(e)}getPaperTypeQ3(){return super.push(new i.EGetPaperTypeQ3)}position(){return super.push(new s.EPosition)}printerVersion(){return super.push(new s.EPrinterVersion)}setShutdownTime(e){return super.push(new s.ESetShutdownTime({time:e}))}sn(){return super.push(new s.ESN)}state(){return super.push(new s.EState)}stopJob(){return super.push(new s.EStopJob)}thickness(e){return super.push(new s.EThickness({thickness:e}))}version(){return super.push(new s.EVersion)}wakeup(){return super.push(new s.EWakeup)}setBTType(){return super.push(new s.EBTType)}}t.BasicESC=BasicESC},8295:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ESC=void 0;const n=r(9671);class ESC{static generic(e){return new n.GenericESC(e)}}t.ESC=ESC},9671:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.GenericESC=void 0;const n=r(8947);class GenericESC extends n.BasicESC{constructor(e){super(e)}}t.GenericESC=GenericESC},6344:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(9671),t);s(r(8295),t)},5926:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(6344),t);s(r(9366),t)},4809:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.EImageMode=void 0;var r;(function(e){e[e["NORMAL"]=0]="NORMAL";e[e["DOUBLE_WIDTH"]=1]="DOUBLE_WIDTH";e[e["DOUBLE_HEIGHT"]=2]="DOUBLE_HEIGHT";e[e["DOUBLE_WIDTH_HEIGHT"]=3]="DOUBLE_WIDTH_HEIGHT"})(r||(t.EImageMode=r={}))},8686:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});s(r(4809),t);s(r(5488),t);s(r(1032),t)},5488:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.PaperType=void 0;var r;(function(e){e[e["FOLDED_BLACK_LABEL_PAPER"]=0]="FOLDED_BLACK_LABEL_PAPER";e[e["CONTINUOUS_REEL_PAPER"]=1]="CONTINUOUS_REEL_PAPER";e[e["NO_DRY_ADHESIVE_PAPER"]=2]="NO_DRY_ADHESIVE_PAPER";e[e["HOLE_PAPER"]=3]="HOLE_PAPER";e[e["TATTOO_PAPER"]=4]="TATTOO_PAPER"})(r||(t.PaperType=r={}))},1032:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.PaperTypeQ3=void 0;var r;(function(e){e[e["NO_DRY_ADHESIVE_PAPER"]=0]="NO_DRY_ADHESIVE_PAPER";e[e["FOLDED_BLACK_LABEL_PAPER"]=1]="FOLDED_BLACK_LABEL_PAPER";e[e["CONTINUOUS_REEL_PAPER"]=2]="CONTINUOUS_REEL_PAPER"})(r||(t.PaperTypeQ3=r={}))},1154:(e,t,r)=>{const{Deflate:n,deflate:s,deflateRaw:i,gzip:a}=r(9914);const{Inflate:o,inflate:l,inflateRaw:c,ungzip:u}=r(8955);const d=r(1234);e.exports.Deflate=n;e.exports.deflate=s;e.exports.deflateRaw=i;e.exports.gzip=a;e.exports.Inflate=o;e.exports.inflate=l;e.exports.inflateRaw=c;e.exports.ungzip=u;e.exports.constants=d},9914:(e,t,r)=>{const n=r(8492);const s=r(5533);const i=r(5992);const a=r(7678);const o=r(3944);const l=Object.prototype.toString;const{Z_NO_FLUSH:c,Z_SYNC_FLUSH:u,Z_FULL_FLUSH:d,Z_FINISH:h,Z_OK:f,Z_STREAM_END:_,Z_DEFAULT_COMPRESSION:p,Z_DEFAULT_STRATEGY:m,Z_DEFLATED:b}=r(1234);function Deflate(e){this.options=s.assign({level:p,method:b,chunkSize:16384,windowBits:15,memLevel:8,strategy:m},e||{});let t=this.options;if(t.raw&&t.windowBits>0){t.windowBits=-t.windowBits}else if(t.gzip&&t.windowBits>0&&t.windowBits<16){t.windowBits+=16}this.err=0;this.msg="";this.ended=false;this.chunks=[];this.strm=new o;this.strm.avail_out=0;let r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==f){throw new Error(a[r])}if(t.header){n.deflateSetHeader(this.strm,t.header)}if(t.dictionary){let e;if(typeof t.dictionary==="string"){e=i.string2buf(t.dictionary)}else if(l.call(t.dictionary)==="[object ArrayBuffer]"){e=new Uint8Array(t.dictionary)}else{e=t.dictionary}r=n.deflateSetDictionary(this.strm,e);if(r!==f){throw new Error(a[r])}this._dict_set=true}}Deflate.prototype.push=function(e,t){const r=this.strm;const s=this.options.chunkSize;let a,o;if(this.ended){return false}if(t===~~t)o=t;else o=t===true?h:c;if(typeof e==="string"){r.input=i.string2buf(e)}else if(l.call(e)==="[object ArrayBuffer]"){r.input=new Uint8Array(e)}else{r.input=e}r.next_in=0;r.avail_in=r.input.length;for(;;){if(r.avail_out===0){r.output=new Uint8Array(s);r.next_out=0;r.avail_out=s}if((o===u||o===d)&&r.avail_out<=6){this.onData(r.output.subarray(0,r.next_out));r.avail_out=0;continue}a=n.deflate(r,o);if(a===_){if(r.next_out>0){this.onData(r.output.subarray(0,r.next_out))}a=n.deflateEnd(this.strm);this.onEnd(a);this.ended=true;return a===f}if(r.avail_out===0){this.onData(r.output);continue}if(o>0&&r.next_out>0){this.onData(r.output.subarray(0,r.next_out));r.avail_out=0;continue}if(r.avail_in===0)break}return true};Deflate.prototype.onData=function(e){this.chunks.push(e)};Deflate.prototype.onEnd=function(e){if(e===f){this.result=s.flattenChunks(this.chunks)}this.chunks=[];this.err=e;this.msg=this.strm.msg};function deflate(e,t){const r=new Deflate(t);r.push(e,true);if(r.err){throw r.msg||a[r.err]}return r.result}function deflateRaw(e,t){t=t||{};t.raw=true;return deflate(e,t)}function gzip(e,t){t=t||{};t.gzip=true;return deflate(e,t)}e.exports.Deflate=Deflate;e.exports.deflate=deflate;e.exports.deflateRaw=deflateRaw;e.exports.gzip=gzip;e.exports.constants=r(1234)},8955:(e,t,r)=>{const n=r(422);const s=r(5533);const i=r(5992);const a=r(7678);const o=r(3944);const l=r(7657);const c=Object.prototype.toString;const{Z_NO_FLUSH:u,Z_FINISH:d,Z_OK:h,Z_STREAM_END:f,Z_NEED_DICT:_,Z_STREAM_ERROR:p,Z_DATA_ERROR:m,Z_MEM_ERROR:b}=r(1234);function Inflate(e){this.options=s.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const t=this.options;if(t.raw&&t.windowBits>=0&&t.windowBits<16){t.windowBits=-t.windowBits;if(t.windowBits===0){t.windowBits=-15}}if(t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)){t.windowBits+=32}if(t.windowBits>15&&t.windowBits<48){if((t.windowBits&15)===0){t.windowBits|=15}}this.err=0;this.msg="";this.ended=false;this.chunks=[];this.strm=new o;this.strm.avail_out=0;let r=n.inflateInit2(this.strm,t.windowBits);if(r!==h){throw new Error(a[r])}this.header=new l;n.inflateGetHeader(this.strm,this.header);if(t.dictionary){if(typeof t.dictionary==="string"){t.dictionary=i.string2buf(t.dictionary)}else if(c.call(t.dictionary)==="[object ArrayBuffer]"){t.dictionary=new Uint8Array(t.dictionary)}if(t.raw){r=n.inflateSetDictionary(this.strm,t.dictionary);if(r!==h){throw new Error(a[r])}}}}Inflate.prototype.push=function(e,t){const r=this.strm;const s=this.options.chunkSize;const a=this.options.dictionary;let o,l,g;if(this.ended)return false;if(t===~~t)l=t;else l=t===true?d:u;if(c.call(e)==="[object ArrayBuffer]"){r.input=new Uint8Array(e)}else{r.input=e}r.next_in=0;r.avail_in=r.input.length;for(;;){if(r.avail_out===0){r.output=new Uint8Array(s);r.next_out=0;r.avail_out=s}o=n.inflate(r,l);if(o===_&&a){o=n.inflateSetDictionary(r,a);if(o===h){o=n.inflate(r,l)}else if(o===m){o=_}}while(r.avail_in>0&&o===f&&r.state.wrap>0&&e[r.next_in]!==0){n.inflateReset(r);o=n.inflate(r,l)}switch(o){case p:case m:case _:case b:this.onEnd(o);this.ended=true;return false}g=r.avail_out;if(r.next_out){if(r.avail_out===0||o===f){if(this.options.to==="string"){let e=i.utf8border(r.output,r.next_out);let t=r.next_out-e;let n=i.buf2string(r.output,e);r.next_out=t;r.avail_out=s-t;if(t)r.output.set(r.output.subarray(e,e+t),0);this.onData(n)}else{this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out))}}}if(o===h&&g===0)continue;if(o===f){o=n.inflateEnd(this.strm);this.onEnd(o);this.ended=true;return true}if(r.avail_in===0)break}return true};Inflate.prototype.onData=function(e){this.chunks.push(e)};Inflate.prototype.onEnd=function(e){if(e===h){if(this.options.to==="string"){this.result=this.chunks.join("")}else{this.result=s.flattenChunks(this.chunks)}}this.chunks=[];this.err=e;this.msg=this.strm.msg};function inflate(e,t){const r=new Inflate(t);r.push(e);if(r.err)throw r.msg||a[r.err];return r.result}function inflateRaw(e,t){t=t||{};t.raw=true;return inflate(e,t)}e.exports.Inflate=Inflate;e.exports.inflate=inflate;e.exports.inflateRaw=inflateRaw;e.exports.ungzip=inflate;e.exports.constants=r(1234)},5533:e=>{const _has=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);e.exports.assign=function(e){const t=Array.prototype.slice.call(arguments,1);while(t.length){const r=t.shift();if(!r){continue}if(typeof r!=="object"){throw new TypeError(r+"must be non-object")}for(const t in r){if(_has(r,t)){e[t]=r[t]}}}return e};e.exports.flattenChunks=e=>{let t=0;for(let r=0,n=e.length;r<n;r++){t+=e[r].length}const r=new Uint8Array(t);for(let t=0,n=0,s=e.length;t<s;t++){let s=e[t];r.set(s,n);n+=s.length}return r}},5992:e=>{let t=true;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){t=false}const r=new Uint8Array(256);for(let e=0;e<256;e++){r[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1}r[254]=r[254]=1;e.exports.string2buf=e=>{if(typeof TextEncoder==="function"&&TextEncoder.prototype.encode){return(new TextEncoder).encode(e)}let t,r,n,s,i,a=e.length,o=0;for(s=0;s<a;s++){r=e.charCodeAt(s);if((r&64512)===55296&&s+1<a){n=e.charCodeAt(s+1);if((n&64512)===56320){r=65536+(r-55296<<10)+(n-56320);s++}}o+=r<128?1:r<2048?2:r<65536?3:4}t=new Uint8Array(o);for(i=0,s=0;i<o;s++){r=e.charCodeAt(s);if((r&64512)===55296&&s+1<a){n=e.charCodeAt(s+1);if((n&64512)===56320){r=65536+(r-55296<<10)+(n-56320);s++}}if(r<128){t[i++]=r}else if(r<2048){t[i++]=192|r>>>6;t[i++]=128|r&63}else if(r<65536){t[i++]=224|r>>>12;t[i++]=128|r>>>6&63;t[i++]=128|r&63}else{t[i++]=240|r>>>18;t[i++]=128|r>>>12&63;t[i++]=128|r>>>6&63;t[i++]=128|r&63}}return t};const buf2binstring=(e,r)=>{if(r<65534){if(e.subarray&&t){return String.fromCharCode.apply(null,e.length===r?e:e.subarray(0,r))}}let n="";for(let t=0;t<r;t++){n+=String.fromCharCode(e[t])}return n};e.exports.buf2string=(e,t)=>{const n=t||e.length;if(typeof TextDecoder==="function"&&TextDecoder.prototype.decode){return(new TextDecoder).decode(e.subarray(0,t))}let s,i;const a=new Array(n*2);for(i=0,s=0;s<n;){let t=e[s++];if(t<128){a[i++]=t;continue}let o=r[t];if(o>4){a[i++]=65533;s+=o-1;continue}t&=o===2?31:o===3?15:7;while(o>1&&s<n){t=t<<6|e[s++]&63;o--}if(o>1){a[i++]=65533;continue}if(t<65536){a[i++]=t}else{t-=65536;a[i++]=55296|t>>10&1023;a[i++]=56320|t&1023}}return buf2binstring(a,i)};e.exports.utf8border=(e,t)=>{t=t||e.length;if(t>e.length){t=e.length}let n=t-1;while(n>=0&&(e[n]&192)===128){n--}if(n<0){return t}if(n===0){return t}return n+r[e[n]]>t?n:t}},3796:e=>{const adler32=(e,t,r,n)=>{let s=e&65535|0,i=e>>>16&65535|0,a=0;while(r!==0){a=r>2e3?2e3:r;r-=a;do{s=s+t[n++]|0;i=i+s|0}while(--a);s%=65521;i%=65521}return s|i<<16|0};e.exports=adler32},1234:e=>{e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},7597:e=>{const makeTable=()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var n=0;n<8;n++){e=e&1?3988292384^e>>>1:e>>>1}t[r]=e}return t};const t=new Uint32Array(makeTable());const crc32=(e,r,n,s)=>{const i=t;const a=s+n;e^=-1;for(let t=s;t<a;t++){e=e>>>8^i[(e^r[t])&255]}return e^-1};e.exports=crc32},8492:(e,t,r)=>{const{_tr_init:n,_tr_stored_block:s,_tr_flush_block:i,_tr_tally:a,_tr_align:o}=r(6427);const l=r(3796);const c=r(7597);const u=r(7678);const{Z_NO_FLUSH:d,Z_PARTIAL_FLUSH:h,Z_FULL_FLUSH:f,Z_FINISH:_,Z_BLOCK:p,Z_OK:m,Z_STREAM_END:b,Z_STREAM_ERROR:g,Z_DATA_ERROR:w,Z_BUF_ERROR:y,Z_DEFAULT_COMPRESSION:v,Z_FILTERED:E,Z_HUFFMAN_ONLY:x,Z_RLE:k,Z_FIXED:A,Z_DEFAULT_STRATEGY:C,Z_UNKNOWN:O,Z_DEFLATED:P}=r(1234);const T=9;const D=15;const B=8;const S=29;const R=256;const I=R+1+S;const N=30;const z=19;const L=2*I+1;const U=15;const j=3;const M=258;const F=M+j+1;const H=32;const Z=42;const W=57;const K=69;const G=73;const V=91;const Y=103;const q=113;const X=666;const Q=1;const J=2;const $=3;const ee=4;const te=3;const err=(e,t)=>{e.msg=u[t];return t};const rank=e=>e*2-(e>4?9:0);const zero=e=>{let t=e.length;while(--t>=0){e[t]=0}};const slide_hash=e=>{let t,r;let n;let s=e.w_size;t=e.hash_size;n=t;do{r=e.head[--n];e.head[n]=r>=s?r-s:0}while(--t);t=s;n=t;do{r=e.prev[--n];e.prev[n]=r>=s?r-s:0}while(--t)};let HASH_ZLIB=(e,t,r)=>(t<<e.hash_shift^r)&e.hash_mask;let re=HASH_ZLIB;const flush_pending=e=>{const t=e.state;let r=t.pending;if(r>e.avail_out){r=e.avail_out}if(r===0){return}e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+r),e.next_out);e.next_out+=r;t.pending_out+=r;e.total_out+=r;e.avail_out-=r;t.pending-=r;if(t.pending===0){t.pending_out=0}};const flush_block_only=(e,t)=>{i(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t);e.block_start=e.strstart;flush_pending(e.strm)};const put_byte=(e,t)=>{e.pending_buf[e.pending++]=t};const putShortMSB=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255;e.pending_buf[e.pending++]=t&255};const read_buf=(e,t,r,n)=>{let s=e.avail_in;if(s>n){s=n}if(s===0){return 0}e.avail_in-=s;t.set(e.input.subarray(e.next_in,e.next_in+s),r);if(e.state.wrap===1){e.adler=l(e.adler,t,s,r)}else if(e.state.wrap===2){e.adler=c(e.adler,t,s,r)}e.next_in+=s;e.total_in+=s;return s};const longest_match=(e,t)=>{let r=e.max_chain_length;let n=e.strstart;let s;let i;let a=e.prev_length;let o=e.nice_match;const l=e.strstart>e.w_size-F?e.strstart-(e.w_size-F):0;const c=e.window;const u=e.w_mask;const d=e.prev;const h=e.strstart+M;let f=c[n+a-1];let _=c[n+a];if(e.prev_length>=e.good_match){r>>=2}if(o>e.lookahead){o=e.lookahead}do{s=t;if(c[s+a]!==_||c[s+a-1]!==f||c[s]!==c[n]||c[++s]!==c[n+1]){continue}n+=2;s++;do{}while(c[++n]===c[++s]&&c[++n]===c[++s]&&c[++n]===c[++s]&&c[++n]===c[++s]&&c[++n]===c[++s]&&c[++n]===c[++s]&&c[++n]===c[++s]&&c[++n]===c[++s]&&n<h);i=M-(h-n);n=h-M;if(i>a){e.match_start=t;a=i;if(i>=o){break}f=c[n+a-1];_=c[n+a]}}while((t=d[t&u])>l&&--r!==0);if(a<=e.lookahead){return a}return e.lookahead};const fill_window=e=>{const t=e.w_size;let r,n,s;do{n=e.window_size-e.lookahead-e.strstart;if(e.strstart>=t+(t-F)){e.window.set(e.window.subarray(t,t+t-n),0);e.match_start-=t;e.strstart-=t;e.block_start-=t;if(e.insert>e.strstart){e.insert=e.strstart}slide_hash(e);n+=t}if(e.strm.avail_in===0){break}r=read_buf(e.strm,e.window,e.strstart+e.lookahead,n);e.lookahead+=r;if(e.lookahead+e.insert>=j){s=e.strstart-e.insert;e.ins_h=e.window[s];e.ins_h=re(e,e.ins_h,e.window[s+1]);while(e.insert){e.ins_h=re(e,e.ins_h,e.window[s+j-1]);e.prev[s&e.w_mask]=e.head[e.ins_h];e.head[e.ins_h]=s;s++;e.insert--;if(e.lookahead+e.insert<j){break}}}}while(e.lookahead<F&&e.strm.avail_in!==0)};const deflate_stored=(e,t)=>{let r=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5;let n,i,a,o=0;let l=e.strm.avail_in;do{n=65535;a=e.bi_valid+42>>3;if(e.strm.avail_out<a){break}a=e.strm.avail_out-a;i=e.strstart-e.block_start;if(n>i+e.strm.avail_in){n=i+e.strm.avail_in}if(n>a){n=a}if(n<r&&(n===0&&t!==_||t===d||n!==i+e.strm.avail_in)){break}o=t===_&&n===i+e.strm.avail_in?1:0;s(e,0,0,o);e.pending_buf[e.pending-4]=n;e.pending_buf[e.pending-3]=n>>8;e.pending_buf[e.pending-2]=~n;e.pending_buf[e.pending-1]=~n>>8;flush_pending(e.strm);if(i){if(i>n){i=n}e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out);e.strm.next_out+=i;e.strm.avail_out-=i;e.strm.total_out+=i;e.block_start+=i;n-=i}if(n){read_buf(e.strm,e.strm.output,e.strm.next_out,n);e.strm.next_out+=n;e.strm.avail_out-=n;e.strm.total_out+=n}}while(o===0);l-=e.strm.avail_in;if(l){if(l>=e.w_size){e.matches=2;e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0);e.strstart=e.w_size;e.insert=e.strstart}else{if(e.window_size-e.strstart<=l){e.strstart-=e.w_size;e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0);if(e.matches<2){e.matches++}if(e.insert>e.strstart){e.insert=e.strstart}}e.window.set(e.strm.input.subarray(e.strm.next_in-l,e.strm.next_in),e.strstart);e.strstart+=l;e.insert+=l>e.w_size-e.insert?e.w_size-e.insert:l}e.block_start=e.strstart}if(e.high_water<e.strstart){e.high_water=e.strstart}if(o){return ee}if(t!==d&&t!==_&&e.strm.avail_in===0&&e.strstart===e.block_start){return J}a=e.window_size-e.strstart;if(e.strm.avail_in>a&&e.block_start>=e.w_size){e.block_start-=e.w_size;e.strstart-=e.w_size;e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0);if(e.matches<2){e.matches++}a+=e.w_size;if(e.insert>e.strstart){e.insert=e.strstart}}if(a>e.strm.avail_in){a=e.strm.avail_in}if(a){read_buf(e.strm,e.window,e.strstart,a);e.strstart+=a;e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a}if(e.high_water<e.strstart){e.high_water=e.strstart}a=e.bi_valid+42>>3;a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a;r=a>e.w_size?e.w_size:a;i=e.strstart-e.block_start;if(i>=r||(i||t===_)&&t!==d&&e.strm.avail_in===0&&i<=a){n=i>a?a:i;o=t===_&&e.strm.avail_in===0&&n===i?1:0;s(e,e.block_start,n,o);e.block_start+=n;flush_pending(e.strm)}return o?$:Q};const deflate_fast=(e,t)=>{let r;let n;for(;;){if(e.lookahead<F){fill_window(e);if(e.lookahead<F&&t===d){return Q}if(e.lookahead===0){break}}r=0;if(e.lookahead>=j){e.ins_h=re(e,e.ins_h,e.window[e.strstart+j-1]);r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h];e.head[e.ins_h]=e.strstart}if(r!==0&&e.strstart-r<=e.w_size-F){e.match_length=longest_match(e,r)}if(e.match_length>=j){n=a(e,e.strstart-e.match_start,e.match_length-j);e.lookahead-=e.match_length;if(e.match_length<=e.max_lazy_match&&e.lookahead>=j){e.match_length--;do{e.strstart++;e.ins_h=re(e,e.ins_h,e.window[e.strstart+j-1]);r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h];e.head[e.ins_h]=e.strstart}while(--e.match_length!==0);e.strstart++}else{e.strstart+=e.match_length;e.match_length=0;e.ins_h=e.window[e.strstart];e.ins_h=re(e,e.ins_h,e.window[e.strstart+1])}}else{n=a(e,0,e.window[e.strstart]);e.lookahead--;e.strstart++}if(n){flush_block_only(e,false);if(e.strm.avail_out===0){return Q}}}e.insert=e.strstart<j-1?e.strstart:j-1;if(t===_){flush_block_only(e,true);if(e.strm.avail_out===0){return $}return ee}if(e.sym_next){flush_block_only(e,false);if(e.strm.avail_out===0){return Q}}return J};const deflate_slow=(e,t)=>{let r;let n;let s;for(;;){if(e.lookahead<F){fill_window(e);if(e.lookahead<F&&t===d){return Q}if(e.lookahead===0){break}}r=0;if(e.lookahead>=j){e.ins_h=re(e,e.ins_h,e.window[e.strstart+j-1]);r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h];e.head[e.ins_h]=e.strstart}e.prev_length=e.match_length;e.prev_match=e.match_start;e.match_length=j-1;if(r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-F){e.match_length=longest_match(e,r);if(e.match_length<=5&&(e.strategy===E||e.match_length===j&&e.strstart-e.match_start>4096)){e.match_length=j-1}}if(e.prev_length>=j&&e.match_length<=e.prev_length){s=e.strstart+e.lookahead-j;n=a(e,e.strstart-1-e.prev_match,e.prev_length-j);e.lookahead-=e.prev_length-1;e.prev_length-=2;do{if(++e.strstart<=s){e.ins_h=re(e,e.ins_h,e.window[e.strstart+j-1]);r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h];e.head[e.ins_h]=e.strstart}}while(--e.prev_length!==0);e.match_available=0;e.match_length=j-1;e.strstart++;if(n){flush_block_only(e,false);if(e.strm.avail_out===0){return Q}}}else if(e.match_available){n=a(e,0,e.window[e.strstart-1]);if(n){flush_block_only(e,false)}e.strstart++;e.lookahead--;if(e.strm.avail_out===0){return Q}}else{e.match_available=1;e.strstart++;e.lookahead--}}if(e.match_available){n=a(e,0,e.window[e.strstart-1]);e.match_available=0}e.insert=e.strstart<j-1?e.strstart:j-1;if(t===_){flush_block_only(e,true);if(e.strm.avail_out===0){return $}return ee}if(e.sym_next){flush_block_only(e,false);if(e.strm.avail_out===0){return Q}}return J};const deflate_rle=(e,t)=>{let r;let n;let s,i;const o=e.window;for(;;){if(e.lookahead<=M){fill_window(e);if(e.lookahead<=M&&t===d){return Q}if(e.lookahead===0){break}}e.match_length=0;if(e.lookahead>=j&&e.strstart>0){s=e.strstart-1;n=o[s];if(n===o[++s]&&n===o[++s]&&n===o[++s]){i=e.strstart+M;do{}while(n===o[++s]&&n===o[++s]&&n===o[++s]&&n===o[++s]&&n===o[++s]&&n===o[++s]&&n===o[++s]&&n===o[++s]&&s<i);e.match_length=M-(i-s);if(e.match_length>e.lookahead){e.match_length=e.lookahead}}}if(e.match_length>=j){r=a(e,1,e.match_length-j);e.lookahead-=e.match_length;e.strstart+=e.match_length;e.match_length=0}else{r=a(e,0,e.window[e.strstart]);e.lookahead--;e.strstart++}if(r){flush_block_only(e,false);if(e.strm.avail_out===0){return Q}}}e.insert=0;if(t===_){flush_block_only(e,true);if(e.strm.avail_out===0){return $}return ee}if(e.sym_next){flush_block_only(e,false);if(e.strm.avail_out===0){return Q}}return J};const deflate_huff=(e,t)=>{let r;for(;;){if(e.lookahead===0){fill_window(e);if(e.lookahead===0){if(t===d){return Q}break}}e.match_length=0;r=a(e,0,e.window[e.strstart]);e.lookahead--;e.strstart++;if(r){flush_block_only(e,false);if(e.strm.avail_out===0){return Q}}}e.insert=0;if(t===_){flush_block_only(e,true);if(e.strm.avail_out===0){return $}return ee}if(e.sym_next){flush_block_only(e,false);if(e.strm.avail_out===0){return Q}}return J};function Config(e,t,r,n,s){this.good_length=e;this.max_lazy=t;this.nice_length=r;this.max_chain=n;this.func=s}const ne=[new Config(0,0,0,0,deflate_stored),new Config(4,4,8,4,deflate_fast),new Config(4,5,16,8,deflate_fast),new Config(4,6,32,32,deflate_fast),new Config(4,4,16,16,deflate_slow),new Config(8,16,32,32,deflate_slow),new Config(8,16,128,128,deflate_slow),new Config(8,32,128,256,deflate_slow),new Config(32,128,258,1024,deflate_slow),new Config(32,258,258,4096,deflate_slow)];const lm_init=e=>{e.window_size=2*e.w_size;zero(e.head);e.max_lazy_match=ne[e.level].max_lazy;e.good_match=ne[e.level].good_length;e.nice_match=ne[e.level].nice_length;e.max_chain_length=ne[e.level].max_chain;e.strstart=0;e.block_start=0;e.lookahead=0;e.insert=0;e.match_length=e.prev_length=j-1;e.match_available=0;e.ins_h=0};function DeflateState(){this.strm=null;this.status=0;this.pending_buf=null;this.pending_buf_size=0;this.pending_out=0;this.pending=0;this.wrap=0;this.gzhead=null;this.gzindex=0;this.method=P;this.last_flush=-1;this.w_size=0;this.w_bits=0;this.w_mask=0;this.window=null;this.window_size=0;this.prev=null;this.head=null;this.ins_h=0;this.hash_size=0;this.hash_bits=0;this.hash_mask=0;this.hash_shift=0;this.block_start=0;this.match_length=0;this.prev_match=0;this.match_available=0;this.strstart=0;this.match_start=0;this.lookahead=0;this.prev_length=0;this.max_chain_length=0;this.max_lazy_match=0;this.level=0;this.strategy=0;this.good_match=0;this.nice_match=0;this.dyn_ltree=new Uint16Array(L*2);this.dyn_dtree=new Uint16Array((2*N+1)*2);this.bl_tree=new Uint16Array((2*z+1)*2);zero(this.dyn_ltree);zero(this.dyn_dtree);zero(this.bl_tree);this.l_desc=null;this.d_desc=null;this.bl_desc=null;this.bl_count=new Uint16Array(U+1);this.heap=new Uint16Array(2*I+1);zero(this.heap);this.heap_len=0;this.heap_max=0;this.depth=new Uint16Array(2*I+1);zero(this.depth);this.sym_buf=0;this.lit_bufsize=0;this.sym_next=0;this.sym_end=0;this.opt_len=0;this.static_len=0;this.matches=0;this.insert=0;this.bi_buf=0;this.bi_valid=0}const deflateStateCheck=e=>{if(!e){return 1}const t=e.state;if(!t||t.strm!==e||t.status!==Z&&t.status!==W&&t.status!==K&&t.status!==G&&t.status!==V&&t.status!==Y&&t.status!==q&&t.status!==X){return 1}return 0};const deflateResetKeep=e=>{if(deflateStateCheck(e)){return err(e,g)}e.total_in=e.total_out=0;e.data_type=O;const t=e.state;t.pending=0;t.pending_out=0;if(t.wrap<0){t.wrap=-t.wrap}t.status=t.wrap===2?W:t.wrap?Z:q;e.adler=t.wrap===2?0:1;t.last_flush=-2;n(t);return m};const deflateReset=e=>{const t=deflateResetKeep(e);if(t===m){lm_init(e.state)}return t};const deflateSetHeader=(e,t)=>{if(deflateStateCheck(e)||e.state.wrap!==2){return g}e.state.gzhead=t;return m};const deflateInit2=(e,t,r,n,s,i)=>{if(!e){return g}let a=1;if(t===v){t=6}if(n<0){a=0;n=-n}else if(n>15){a=2;n-=16}if(s<1||s>T||r!==P||n<8||n>15||t<0||t>9||i<0||i>A||n===8&&a!==1){return err(e,g)}if(n===8){n=9}const o=new DeflateState;e.state=o;o.strm=e;o.status=Z;o.wrap=a;o.gzhead=null;o.w_bits=n;o.w_size=1<<o.w_bits;o.w_mask=o.w_size-1;o.hash_bits=s+7;o.hash_size=1<<o.hash_bits;o.hash_mask=o.hash_size-1;o.hash_shift=~~((o.hash_bits+j-1)/j);o.window=new Uint8Array(o.w_size*2);o.head=new Uint16Array(o.hash_size);o.prev=new Uint16Array(o.w_size);o.lit_bufsize=1<<s+6;o.pending_buf_size=o.lit_bufsize*4;o.pending_buf=new Uint8Array(o.pending_buf_size);o.sym_buf=o.lit_bufsize;o.sym_end=(o.lit_bufsize-1)*3;o.level=t;o.strategy=i;o.method=r;return deflateReset(e)};const deflateInit=(e,t)=>deflateInit2(e,t,P,D,B,C);const deflate=(e,t)=>{if(deflateStateCheck(e)||t>p||t<0){return e?err(e,g):g}const r=e.state;if(!e.output||e.avail_in!==0&&!e.input||r.status===X&&t!==_){return err(e,e.avail_out===0?y:g)}const n=r.last_flush;r.last_flush=t;if(r.pending!==0){flush_pending(e);if(e.avail_out===0){r.last_flush=-1;return m}}else if(e.avail_in===0&&rank(t)<=rank(n)&&t!==_){return err(e,y)}if(r.status===X&&e.avail_in!==0){return err(e,y)}if(r.status===Z&&r.wrap===0){r.status=q}if(r.status===Z){let t=P+(r.w_bits-8<<4)<<8;let n=-1;if(r.strategy>=x||r.level<2){n=0}else if(r.level<6){n=1}else if(r.level===6){n=2}else{n=3}t|=n<<6;if(r.strstart!==0){t|=H}t+=31-t%31;putShortMSB(r,t);if(r.strstart!==0){putShortMSB(r,e.adler>>>16);putShortMSB(r,e.adler&65535)}e.adler=1;r.status=q;flush_pending(e);if(r.pending!==0){r.last_flush=-1;return m}}if(r.status===W){e.adler=0;put_byte(r,31);put_byte(r,139);put_byte(r,8);if(!r.gzhead){put_byte(r,0);put_byte(r,0);put_byte(r,0);put_byte(r,0);put_byte(r,0);put_byte(r,r.level===9?2:r.strategy>=x||r.level<2?4:0);put_byte(r,te);r.status=q;flush_pending(e);if(r.pending!==0){r.last_flush=-1;return m}}else{put_byte(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(!r.gzhead.extra?0:4)+(!r.gzhead.name?0:8)+(!r.gzhead.comment?0:16));put_byte(r,r.gzhead.time&255);put_byte(r,r.gzhead.time>>8&255);put_byte(r,r.gzhead.time>>16&255);put_byte(r,r.gzhead.time>>24&255);put_byte(r,r.level===9?2:r.strategy>=x||r.level<2?4:0);put_byte(r,r.gzhead.os&255);if(r.gzhead.extra&&r.gzhead.extra.length){put_byte(r,r.gzhead.extra.length&255);put_byte(r,r.gzhead.extra.length>>8&255)}if(r.gzhead.hcrc){e.adler=c(e.adler,r.pending_buf,r.pending,0)}r.gzindex=0;r.status=K}}if(r.status===K){if(r.gzhead.extra){let t=r.pending;let n=(r.gzhead.extra.length&65535)-r.gzindex;while(r.pending+n>r.pending_buf_size){let s=r.pending_buf_size-r.pending;r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+s),r.pending);r.pending=r.pending_buf_size;if(r.gzhead.hcrc&&r.pending>t){e.adler=c(e.adler,r.pending_buf,r.pending-t,t)}r.gzindex+=s;flush_pending(e);if(r.pending!==0){r.last_flush=-1;return m}t=0;n-=s}let s=new Uint8Array(r.gzhead.extra);r.pending_buf.set(s.subarray(r.gzindex,r.gzindex+n),r.pending);r.pending+=n;if(r.gzhead.hcrc&&r.pending>t){e.adler=c(e.adler,r.pending_buf,r.pending-t,t)}r.gzindex=0}r.status=G}if(r.status===G){if(r.gzhead.name){let t=r.pending;let n;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>t){e.adler=c(e.adler,r.pending_buf,r.pending-t,t)}flush_pending(e);if(r.pending!==0){r.last_flush=-1;return m}t=0}if(r.gzindex<r.gzhead.name.length){n=r.gzhead.name.charCodeAt(r.gzindex++)&255}else{n=0}put_byte(r,n)}while(n!==0);if(r.gzhead.hcrc&&r.pending>t){e.adler=c(e.adler,r.pending_buf,r.pending-t,t)}r.gzindex=0}r.status=V}if(r.status===V){if(r.gzhead.comment){let t=r.pending;let n;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>t){e.adler=c(e.adler,r.pending_buf,r.pending-t,t)}flush_pending(e);if(r.pending!==0){r.last_flush=-1;return m}t=0}if(r.gzindex<r.gzhead.comment.length){n=r.gzhead.comment.charCodeAt(r.gzindex++)&255}else{n=0}put_byte(r,n)}while(n!==0);if(r.gzhead.hcrc&&r.pending>t){e.adler=c(e.adler,r.pending_buf,r.pending-t,t)}}r.status=Y}if(r.status===Y){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size){flush_pending(e);if(r.pending!==0){r.last_flush=-1;return m}}put_byte(r,e.adler&255);put_byte(r,e.adler>>8&255);e.adler=0}r.status=q;flush_pending(e);if(r.pending!==0){r.last_flush=-1;return m}}if(e.avail_in!==0||r.lookahead!==0||t!==d&&r.status!==X){let n=r.level===0?deflate_stored(r,t):r.strategy===x?deflate_huff(r,t):r.strategy===k?deflate_rle(r,t):ne[r.level].func(r,t);if(n===$||n===ee){r.status=X}if(n===Q||n===$){if(e.avail_out===0){r.last_flush=-1}return m}if(n===J){if(t===h){o(r)}else if(t!==p){s(r,0,0,false);if(t===f){zero(r.head);if(r.lookahead===0){r.strstart=0;r.block_start=0;r.insert=0}}}flush_pending(e);if(e.avail_out===0){r.last_flush=-1;return m}}}if(t!==_){return m}if(r.wrap<=0){return b}if(r.wrap===2){put_byte(r,e.adler&255);put_byte(r,e.adler>>8&255);put_byte(r,e.adler>>16&255);put_byte(r,e.adler>>24&255);put_byte(r,e.total_in&255);put_byte(r,e.total_in>>8&255);put_byte(r,e.total_in>>16&255);put_byte(r,e.total_in>>24&255)}else{putShortMSB(r,e.adler>>>16);putShortMSB(r,e.adler&65535)}flush_pending(e);if(r.wrap>0){r.wrap=-r.wrap}return r.pending!==0?m:b};const deflateEnd=e=>{if(deflateStateCheck(e)){return g}const t=e.state.status;e.state=null;return t===q?err(e,w):m};const deflateSetDictionary=(e,t)=>{let r=t.length;if(deflateStateCheck(e)){return g}const n=e.state;const s=n.wrap;if(s===2||s===1&&n.status!==Z||n.lookahead){return g}if(s===1){e.adler=l(e.adler,t,r,0)}n.wrap=0;if(r>=n.w_size){if(s===0){zero(n.head);n.strstart=0;n.block_start=0;n.insert=0}let e=new Uint8Array(n.w_size);e.set(t.subarray(r-n.w_size,r),0);t=e;r=n.w_size}const i=e.avail_in;const a=e.next_in;const o=e.input;e.avail_in=r;e.next_in=0;e.input=t;fill_window(n);while(n.lookahead>=j){let e=n.strstart;let t=n.lookahead-(j-1);do{n.ins_h=re(n,n.ins_h,n.window[e+j-1]);n.prev[e&n.w_mask]=n.head[n.ins_h];n.head[n.ins_h]=e;e++}while(--t);n.strstart=e;n.lookahead=j-1;fill_window(n)}n.strstart+=n.lookahead;n.block_start=n.strstart;n.insert=n.lookahead;n.lookahead=0;n.match_length=n.prev_length=j-1;n.match_available=0;e.next_in=a;e.input=o;e.avail_in=i;n.wrap=s;return m};e.exports.deflateInit=deflateInit;e.exports.deflateInit2=deflateInit2;e.exports.deflateReset=deflateReset;e.exports.deflateResetKeep=deflateResetKeep;e.exports.deflateSetHeader=deflateSetHeader;e.exports.deflate=deflate;e.exports.deflateEnd=deflateEnd;e.exports.deflateSetDictionary=deflateSetDictionary;e.exports.deflateInfo="pako deflate (from Nodeca project)"},7657:e=>{function GZheader(){this.text=0;this.time=0;this.xflags=0;this.os=0;this.extra=null;this.extra_len=0;this.name="";this.comment="";this.hcrc=0;this.done=false}e.exports=GZheader},7163:e=>{const t=16209;const r=16191;e.exports=function inflate_fast(e,n){let s;let i;let a;let o;let l;let c;let u;let d;let h;let f;let _;let p;let m;let b;let g;let w;let y;let v;let E;let x;let k;let A;let C,O;const P=e.state;s=e.next_in;C=e.input;i=s+(e.avail_in-5);a=e.next_out;O=e.output;o=a-(n-e.avail_out);l=a+(e.avail_out-257);c=P.dmax;u=P.wsize;d=P.whave;h=P.wnext;f=P.window;_=P.hold;p=P.bits;m=P.lencode;b=P.distcode;g=(1<<P.lenbits)-1;w=(1<<P.distbits)-1;e:do{if(p<15){_+=C[s++]<<p;p+=8;_+=C[s++]<<p;p+=8}y=m[_&g];t:for(;;){v=y>>>24;_>>>=v;p-=v;v=y>>>16&255;if(v===0){O[a++]=y&65535}else if(v&16){E=y&65535;v&=15;if(v){if(p<v){_+=C[s++]<<p;p+=8}E+=_&(1<<v)-1;_>>>=v;p-=v}if(p<15){_+=C[s++]<<p;p+=8;_+=C[s++]<<p;p+=8}y=b[_&w];r:for(;;){v=y>>>24;_>>>=v;p-=v;v=y>>>16&255;if(v&16){x=y&65535;v&=15;if(p<v){_+=C[s++]<<p;p+=8;if(p<v){_+=C[s++]<<p;p+=8}}x+=_&(1<<v)-1;if(x>c){e.msg="invalid distance too far back";P.mode=t;break e}_>>>=v;p-=v;v=a-o;if(x>v){v=x-v;if(v>d){if(P.sane){e.msg="invalid distance too far back";P.mode=t;break e}}k=0;A=f;if(h===0){k+=u-v;if(v<E){E-=v;do{O[a++]=f[k++]}while(--v);k=a-x;A=O}}else if(h<v){k+=u+h-v;v-=h;if(v<E){E-=v;do{O[a++]=f[k++]}while(--v);k=0;if(h<E){v=h;E-=v;do{O[a++]=f[k++]}while(--v);k=a-x;A=O}}}else{k+=h-v;if(v<E){E-=v;do{O[a++]=f[k++]}while(--v);k=a-x;A=O}}while(E>2){O[a++]=A[k++];O[a++]=A[k++];O[a++]=A[k++];E-=3}if(E){O[a++]=A[k++];if(E>1){O[a++]=A[k++]}}}else{k=a-x;do{O[a++]=O[k++];O[a++]=O[k++];O[a++]=O[k++];E-=3}while(E>2);if(E){O[a++]=O[k++];if(E>1){O[a++]=O[k++]}}}}else if((v&64)===0){y=b[(y&65535)+(_&(1<<v)-1)];continue r}else{e.msg="invalid distance code";P.mode=t;break e}break}}else if((v&64)===0){y=m[(y&65535)+(_&(1<<v)-1)];continue t}else if(v&32){P.mode=r;break e}else{e.msg="invalid literal/length code";P.mode=t;break e}break}}while(s<i&&a<l);E=p>>3;s-=E;p-=E<<3;_&=(1<<p)-1;e.next_in=s;e.next_out=a;e.avail_in=s<i?5+(i-s):5-(s-i);e.avail_out=a<l?257+(l-a):257-(a-l);P.hold=_;P.bits=p;return}},422:(e,t,r)=>{const n=r(3796);const s=r(7597);const i=r(7163);const a=r(2492);const o=0;const l=1;const c=2;const{Z_FINISH:u,Z_BLOCK:d,Z_TREES:h,Z_OK:f,Z_STREAM_END:_,Z_NEED_DICT:p,Z_STREAM_ERROR:m,Z_DATA_ERROR:b,Z_MEM_ERROR:g,Z_BUF_ERROR:w,Z_DEFLATED:y}=r(1234);const v=16180;const E=16181;const x=16182;const k=16183;const A=16184;const C=16185;const O=16186;const P=16187;const T=16188;const D=16189;const B=16190;const S=16191;const R=16192;const I=16193;const N=16194;const z=16195;const L=16196;const U=16197;const j=16198;const M=16199;const F=16200;const H=16201;const Z=16202;const W=16203;const K=16204;const G=16205;const V=16206;const Y=16207;const q=16208;const X=16209;const Q=16210;const J=16211;const $=852;const ee=592;const te=15;const re=te;const zswap32=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function InflateState(){this.strm=null;this.mode=0;this.last=false;this.wrap=0;this.havedict=false;this.flags=0;this.dmax=0;this.check=0;this.total=0;this.head=null;this.wbits=0;this.wsize=0;this.whave=0;this.wnext=0;this.window=null;this.hold=0;this.bits=0;this.length=0;this.offset=0;this.extra=0;this.lencode=null;this.distcode=null;this.lenbits=0;this.distbits=0;this.ncode=0;this.nlen=0;this.ndist=0;this.have=0;this.next=null;this.lens=new Uint16Array(320);this.work=new Uint16Array(288);this.lendyn=null;this.distdyn=null;this.sane=0;this.back=0;this.was=0}const inflateStateCheck=e=>{if(!e){return 1}const t=e.state;if(!t||t.strm!==e||t.mode<v||t.mode>J){return 1}return 0};const inflateResetKeep=e=>{if(inflateStateCheck(e)){return m}const t=e.state;e.total_in=e.total_out=t.total=0;e.msg="";if(t.wrap){e.adler=t.wrap&1}t.mode=v;t.last=0;t.havedict=0;t.flags=-1;t.dmax=32768;t.head=null;t.hold=0;t.bits=0;t.lencode=t.lendyn=new Int32Array($);t.distcode=t.distdyn=new Int32Array(ee);t.sane=1;t.back=-1;return f};const inflateReset=e=>{if(inflateStateCheck(e)){return m}const t=e.state;t.wsize=0;t.whave=0;t.wnext=0;return inflateResetKeep(e)};const inflateReset2=(e,t)=>{let r;if(inflateStateCheck(e)){return m}const n=e.state;if(t<0){r=0;t=-t}else{r=(t>>4)+5;if(t<48){t&=15}}if(t&&(t<8||t>15)){return m}if(n.window!==null&&n.wbits!==t){n.window=null}n.wrap=r;n.wbits=t;return inflateReset(e)};const inflateInit2=(e,t)=>{if(!e){return m}const r=new InflateState;e.state=r;r.strm=e;r.window=null;r.mode=v;const n=inflateReset2(e,t);if(n!==f){e.state=null}return n};const inflateInit=e=>inflateInit2(e,re);let ne=true;let se,ie;const fixedtables=e=>{if(ne){se=new Int32Array(512);ie=new Int32Array(32);let t=0;while(t<144){e.lens[t++]=8}while(t<256){e.lens[t++]=9}while(t<280){e.lens[t++]=7}while(t<288){e.lens[t++]=8}a(l,e.lens,0,288,se,0,e.work,{bits:9});t=0;while(t<32){e.lens[t++]=5}a(c,e.lens,0,32,ie,0,e.work,{bits:5});ne=false}e.lencode=se;e.lenbits=9;e.distcode=ie;e.distbits=5};const updatewindow=(e,t,r,n)=>{let s;const i=e.state;if(i.window===null){i.wsize=1<<i.wbits;i.wnext=0;i.whave=0;i.window=new Uint8Array(i.wsize)}if(n>=i.wsize){i.window.set(t.subarray(r-i.wsize,r),0);i.wnext=0;i.whave=i.wsize}else{s=i.wsize-i.wnext;if(s>n){s=n}i.window.set(t.subarray(r-n,r-n+s),i.wnext);n-=s;if(n){i.window.set(t.subarray(r-n,r),0);i.wnext=n;i.whave=i.wsize}else{i.wnext+=s;if(i.wnext===i.wsize){i.wnext=0}if(i.whave<i.wsize){i.whave+=s}}}return 0};const inflate=(e,t)=>{let r;let $,ee;let te;let re;let ne,se;let ie;let ae;let oe,le;let ce;let ue;let de;let he=0;let fe,_e,pe;let me,be,ge;let we;let ye;const ve=new Uint8Array(4);let Ee;let xe;const ke=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(inflateStateCheck(e)||!e.output||!e.input&&e.avail_in!==0){return m}r=e.state;if(r.mode===S){r.mode=R}re=e.next_out;ee=e.output;se=e.avail_out;te=e.next_in;$=e.input;ne=e.avail_in;ie=r.hold;ae=r.bits;oe=ne;le=se;ye=f;e:for(;;){switch(r.mode){case v:if(r.wrap===0){r.mode=R;break}while(ae<16){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}if(r.wrap&2&&ie===35615){if(r.wbits===0){r.wbits=15}r.check=0;ve[0]=ie&255;ve[1]=ie>>>8&255;r.check=s(r.check,ve,2,0);ie=0;ae=0;r.mode=E;break}if(r.head){r.head.done=false}if(!(r.wrap&1)||(((ie&255)<<8)+(ie>>8))%31){e.msg="incorrect header check";r.mode=X;break}if((ie&15)!==y){e.msg="unknown compression method";r.mode=X;break}ie>>>=4;ae-=4;we=(ie&15)+8;if(r.wbits===0){r.wbits=we}if(we>15||we>r.wbits){e.msg="invalid window size";r.mode=X;break}r.dmax=1<<r.wbits;r.flags=0;e.adler=r.check=1;r.mode=ie&512?D:S;ie=0;ae=0;break;case E:while(ae<16){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}r.flags=ie;if((r.flags&255)!==y){e.msg="unknown compression method";r.mode=X;break}if(r.flags&57344){e.msg="unknown header flags set";r.mode=X;break}if(r.head){r.head.text=ie>>8&1}if(r.flags&512&&r.wrap&4){ve[0]=ie&255;ve[1]=ie>>>8&255;r.check=s(r.check,ve,2,0)}ie=0;ae=0;r.mode=x;case x:while(ae<32){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}if(r.head){r.head.time=ie}if(r.flags&512&&r.wrap&4){ve[0]=ie&255;ve[1]=ie>>>8&255;ve[2]=ie>>>16&255;ve[3]=ie>>>24&255;r.check=s(r.check,ve,4,0)}ie=0;ae=0;r.mode=k;case k:while(ae<16){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}if(r.head){r.head.xflags=ie&255;r.head.os=ie>>8}if(r.flags&512&&r.wrap&4){ve[0]=ie&255;ve[1]=ie>>>8&255;r.check=s(r.check,ve,2,0)}ie=0;ae=0;r.mode=A;case A:if(r.flags&1024){while(ae<16){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}r.length=ie;if(r.head){r.head.extra_len=ie}if(r.flags&512&&r.wrap&4){ve[0]=ie&255;ve[1]=ie>>>8&255;r.check=s(r.check,ve,2,0)}ie=0;ae=0}else if(r.head){r.head.extra=null}r.mode=C;case C:if(r.flags&1024){ce=r.length;if(ce>ne){ce=ne}if(ce){if(r.head){we=r.head.extra_len-r.length;if(!r.head.extra){r.head.extra=new Uint8Array(r.head.extra_len)}r.head.extra.set($.subarray(te,te+ce),we)}if(r.flags&512&&r.wrap&4){r.check=s(r.check,$,ce,te)}ne-=ce;te+=ce;r.length-=ce}if(r.length){break e}}r.length=0;r.mode=O;case O:if(r.flags&2048){if(ne===0){break e}ce=0;do{we=$[te+ce++];if(r.head&&we&&r.length<65536){r.head.name+=String.fromCharCode(we)}}while(we&&ce<ne);if(r.flags&512&&r.wrap&4){r.check=s(r.check,$,ce,te)}ne-=ce;te+=ce;if(we){break e}}else if(r.head){r.head.name=null}r.length=0;r.mode=P;case P:if(r.flags&4096){if(ne===0){break e}ce=0;do{we=$[te+ce++];if(r.head&&we&&r.length<65536){r.head.comment+=String.fromCharCode(we)}}while(we&&ce<ne);if(r.flags&512&&r.wrap&4){r.check=s(r.check,$,ce,te)}ne-=ce;te+=ce;if(we){break e}}else if(r.head){r.head.comment=null}r.mode=T;case T:if(r.flags&512){while(ae<16){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}if(r.wrap&4&&ie!==(r.check&65535)){e.msg="header crc mismatch";r.mode=X;break}ie=0;ae=0}if(r.head){r.head.hcrc=r.flags>>9&1;r.head.done=true}e.adler=r.check=0;r.mode=S;break;case D:while(ae<32){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}e.adler=r.check=zswap32(ie);ie=0;ae=0;r.mode=B;case B:if(r.havedict===0){e.next_out=re;e.avail_out=se;e.next_in=te;e.avail_in=ne;r.hold=ie;r.bits=ae;return p}e.adler=r.check=1;r.mode=S;case S:if(t===d||t===h){break e}case R:if(r.last){ie>>>=ae&7;ae-=ae&7;r.mode=V;break}while(ae<3){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}r.last=ie&1;ie>>>=1;ae-=1;switch(ie&3){case 0:r.mode=I;break;case 1:fixedtables(r);r.mode=M;if(t===h){ie>>>=2;ae-=2;break e}break;case 2:r.mode=L;break;case 3:e.msg="invalid block type";r.mode=X}ie>>>=2;ae-=2;break;case I:ie>>>=ae&7;ae-=ae&7;while(ae<32){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}if((ie&65535)!==(ie>>>16^65535)){e.msg="invalid stored block lengths";r.mode=X;break}r.length=ie&65535;ie=0;ae=0;r.mode=N;if(t===h){break e}case N:r.mode=z;case z:ce=r.length;if(ce){if(ce>ne){ce=ne}if(ce>se){ce=se}if(ce===0){break e}ee.set($.subarray(te,te+ce),re);ne-=ce;te+=ce;se-=ce;re+=ce;r.length-=ce;break}r.mode=S;break;case L:while(ae<14){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}r.nlen=(ie&31)+257;ie>>>=5;ae-=5;r.ndist=(ie&31)+1;ie>>>=5;ae-=5;r.ncode=(ie&15)+4;ie>>>=4;ae-=4;if(r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols";r.mode=X;break}r.have=0;r.mode=U;case U:while(r.have<r.ncode){while(ae<3){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}r.lens[ke[r.have++]]=ie&7;ie>>>=3;ae-=3}while(r.have<19){r.lens[ke[r.have++]]=0}r.lencode=r.lendyn;r.lenbits=7;Ee={bits:r.lenbits};ye=a(o,r.lens,0,19,r.lencode,0,r.work,Ee);r.lenbits=Ee.bits;if(ye){e.msg="invalid code lengths set";r.mode=X;break}r.have=0;r.mode=j;case j:while(r.have<r.nlen+r.ndist){for(;;){he=r.lencode[ie&(1<<r.lenbits)-1];fe=he>>>24;_e=he>>>16&255;pe=he&65535;if(fe<=ae){break}if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}if(pe<16){ie>>>=fe;ae-=fe;r.lens[r.have++]=pe}else{if(pe===16){xe=fe+2;while(ae<xe){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}ie>>>=fe;ae-=fe;if(r.have===0){e.msg="invalid bit length repeat";r.mode=X;break}we=r.lens[r.have-1];ce=3+(ie&3);ie>>>=2;ae-=2}else if(pe===17){xe=fe+3;while(ae<xe){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}ie>>>=fe;ae-=fe;we=0;ce=3+(ie&7);ie>>>=3;ae-=3}else{xe=fe+7;while(ae<xe){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}ie>>>=fe;ae-=fe;we=0;ce=11+(ie&127);ie>>>=7;ae-=7}if(r.have+ce>r.nlen+r.ndist){e.msg="invalid bit length repeat";r.mode=X;break}while(ce--){r.lens[r.have++]=we}}}if(r.mode===X){break}if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block";r.mode=X;break}r.lenbits=9;Ee={bits:r.lenbits};ye=a(l,r.lens,0,r.nlen,r.lencode,0,r.work,Ee);r.lenbits=Ee.bits;if(ye){e.msg="invalid literal/lengths set";r.mode=X;break}r.distbits=6;r.distcode=r.distdyn;Ee={bits:r.distbits};ye=a(c,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,Ee);r.distbits=Ee.bits;if(ye){e.msg="invalid distances set";r.mode=X;break}r.mode=M;if(t===h){break e}case M:r.mode=F;case F:if(ne>=6&&se>=258){e.next_out=re;e.avail_out=se;e.next_in=te;e.avail_in=ne;r.hold=ie;r.bits=ae;i(e,le);re=e.next_out;ee=e.output;se=e.avail_out;te=e.next_in;$=e.input;ne=e.avail_in;ie=r.hold;ae=r.bits;if(r.mode===S){r.back=-1}break}r.back=0;for(;;){he=r.lencode[ie&(1<<r.lenbits)-1];fe=he>>>24;_e=he>>>16&255;pe=he&65535;if(fe<=ae){break}if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}if(_e&&(_e&240)===0){me=fe;be=_e;ge=pe;for(;;){he=r.lencode[ge+((ie&(1<<me+be)-1)>>me)];fe=he>>>24;_e=he>>>16&255;pe=he&65535;if(me+fe<=ae){break}if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}ie>>>=me;ae-=me;r.back+=me}ie>>>=fe;ae-=fe;r.back+=fe;r.length=pe;if(_e===0){r.mode=G;break}if(_e&32){r.back=-1;r.mode=S;break}if(_e&64){e.msg="invalid literal/length code";r.mode=X;break}r.extra=_e&15;r.mode=H;case H:if(r.extra){xe=r.extra;while(ae<xe){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}r.length+=ie&(1<<r.extra)-1;ie>>>=r.extra;ae-=r.extra;r.back+=r.extra}r.was=r.length;r.mode=Z;case Z:for(;;){he=r.distcode[ie&(1<<r.distbits)-1];fe=he>>>24;_e=he>>>16&255;pe=he&65535;if(fe<=ae){break}if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}if((_e&240)===0){me=fe;be=_e;ge=pe;for(;;){he=r.distcode[ge+((ie&(1<<me+be)-1)>>me)];fe=he>>>24;_e=he>>>16&255;pe=he&65535;if(me+fe<=ae){break}if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}ie>>>=me;ae-=me;r.back+=me}ie>>>=fe;ae-=fe;r.back+=fe;if(_e&64){e.msg="invalid distance code";r.mode=X;break}r.offset=pe;r.extra=_e&15;r.mode=W;case W:if(r.extra){xe=r.extra;while(ae<xe){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}r.offset+=ie&(1<<r.extra)-1;ie>>>=r.extra;ae-=r.extra;r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back";r.mode=X;break}r.mode=K;case K:if(se===0){break e}ce=le-se;if(r.offset>ce){ce=r.offset-ce;if(ce>r.whave){if(r.sane){e.msg="invalid distance too far back";r.mode=X;break}}if(ce>r.wnext){ce-=r.wnext;ue=r.wsize-ce}else{ue=r.wnext-ce}if(ce>r.length){ce=r.length}de=r.window}else{de=ee;ue=re-r.offset;ce=r.length}if(ce>se){ce=se}se-=ce;r.length-=ce;do{ee[re++]=de[ue++]}while(--ce);if(r.length===0){r.mode=F}break;case G:if(se===0){break e}ee[re++]=r.length;se--;r.mode=F;break;case V:if(r.wrap){while(ae<32){if(ne===0){break e}ne--;ie|=$[te++]<<ae;ae+=8}le-=se;e.total_out+=le;r.total+=le;if(r.wrap&4&&le){e.adler=r.check=r.flags?s(r.check,ee,le,re-le):n(r.check,ee,le,re-le)}le=se;if(r.wrap&4&&(r.flags?ie:zswap32(ie))!==r.check){e.msg="incorrect data check";r.mode=X;break}ie=0;ae=0}r.mode=Y;case Y:if(r.wrap&&r.flags){while(ae<32){if(ne===0){break e}ne--;ie+=$[te++]<<ae;ae+=8}if(r.wrap&4&&ie!==(r.total&4294967295)){e.msg="incorrect length check";r.mode=X;break}ie=0;ae=0}r.mode=q;case q:ye=_;break e;case X:ye=b;break e;case Q:return g;case J:default:return m}}e.next_out=re;e.avail_out=se;e.next_in=te;e.avail_in=ne;r.hold=ie;r.bits=ae;if(r.wsize||le!==e.avail_out&&r.mode<X&&(r.mode<V||t!==u)){if(updatewindow(e,e.output,e.next_out,le-e.avail_out)){r.mode=Q;return g}}oe-=e.avail_in;le-=e.avail_out;e.total_in+=oe;e.total_out+=le;r.total+=le;if(r.wrap&4&&le){e.adler=r.check=r.flags?s(r.check,ee,le,e.next_out-le):n(r.check,ee,le,e.next_out-le)}e.data_type=r.bits+(r.last?64:0)+(r.mode===S?128:0)+(r.mode===M||r.mode===N?256:0);if((oe===0&&le===0||t===u)&&ye===f){ye=w}return ye};const inflateEnd=e=>{if(inflateStateCheck(e)){return m}let t=e.state;if(t.window){t.window=null}e.state=null;return f};const inflateGetHeader=(e,t)=>{if(inflateStateCheck(e)){return m}const r=e.state;if((r.wrap&2)===0){return m}r.head=t;t.done=false;return f};const inflateSetDictionary=(e,t)=>{const r=t.length;let s;let i;let a;if(inflateStateCheck(e)){return m}s=e.state;if(s.wrap!==0&&s.mode!==B){return m}if(s.mode===B){i=1;i=n(i,t,r,0);if(i!==s.check){return b}}a=updatewindow(e,t,r,r);if(a){s.mode=Q;return g}s.havedict=1;return f};e.exports.inflateReset=inflateReset;e.exports.inflateReset2=inflateReset2;e.exports.inflateResetKeep=inflateResetKeep;e.exports.inflateInit=inflateInit;e.exports.inflateInit2=inflateInit2;e.exports.inflate=inflate;e.exports.inflateEnd=inflateEnd;e.exports.inflateGetHeader=inflateGetHeader;e.exports.inflateSetDictionary=inflateSetDictionary;e.exports.inflateInfo="pako inflate (from Nodeca project)"},2492:e=>{const t=15;const r=852;const n=592;const s=0;const i=1;const a=2;const o=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]);const l=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]);const c=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]);const u=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);const inflate_table=(e,d,h,f,_,p,m,b)=>{const g=b.bits;let w=0;let y=0;let v=0,E=0;let x=0;let k=0;let A=0;let C=0;let O=0;let P=0;let T;let D;let B;let S;let R;let I=null;let N;const z=new Uint16Array(t+1);const L=new Uint16Array(t+1);let U=null;let j,M,F;for(w=0;w<=t;w++){z[w]=0}for(y=0;y<f;y++){z[d[h+y]]++}x=g;for(E=t;E>=1;E--){if(z[E]!==0){break}}if(x>E){x=E}if(E===0){_[p++]=1<<24|64<<16|0;_[p++]=1<<24|64<<16|0;b.bits=1;return 0}for(v=1;v<E;v++){if(z[v]!==0){break}}if(x<v){x=v}C=1;for(w=1;w<=t;w++){C<<=1;C-=z[w];if(C<0){return-1}}if(C>0&&(e===s||E!==1)){return-1}L[1]=0;for(w=1;w<t;w++){L[w+1]=L[w]+z[w]}for(y=0;y<f;y++){if(d[h+y]!==0){m[L[d[h+y]]++]=y}}if(e===s){I=U=m;N=20}else if(e===i){I=o;U=l;N=257}else{I=c;U=u;N=0}P=0;y=0;w=v;R=p;k=x;A=0;B=-1;O=1<<x;S=O-1;if(e===i&&O>r||e===a&&O>n){return 1}for(;;){j=w-A;if(m[y]+1<N){M=0;F=m[y]}else if(m[y]>=N){M=U[m[y]-N];F=I[m[y]-N]}else{M=32+64;F=0}T=1<<w-A;D=1<<k;v=D;do{D-=T;_[R+(P>>A)+D]=j<<24|M<<16|F|0}while(D!==0);T=1<<w-1;while(P&T){T>>=1}if(T!==0){P&=T-1;P+=T}else{P=0}y++;if(--z[w]===0){if(w===E){break}w=d[h+m[y]]}if(w>x&&(P&S)!==B){if(A===0){A=x}R+=v;k=w-A;C=1<<k;while(k+A<E){C-=z[k+A];if(C<=0){break}k++;C<<=1}O+=1<<k;if(e===i&&O>r||e===a&&O>n){return 1}B=P&S;_[B]=x<<24|k<<16|R-p|0}}if(P!==0){_[R+P]=w-A<<24|64<<16|0}b.bits=x;return 0};e.exports=inflate_table},7678:e=>{e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},6427:e=>{const t=4;const r=0;const n=1;const s=2;function zero(e){let t=e.length;while(--t>=0){e[t]=0}}const i=0;const a=1;const o=2;const l=3;const c=258;const u=29;const d=256;const h=d+1+u;const f=30;const _=19;const p=2*h+1;const m=15;const b=16;const g=7;const w=256;const y=16;const v=17;const E=18;const x=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]);const k=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]);const A=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]);const C=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);const O=512;const P=new Array((h+2)*2);zero(P);const T=new Array(f*2);zero(T);const D=new Array(O);zero(D);const B=new Array(c-l+1);zero(B);const S=new Array(u);zero(S);const R=new Array(f);zero(R);function StaticTreeDesc(e,t,r,n,s){this.static_tree=e;this.extra_bits=t;this.extra_base=r;this.elems=n;this.max_length=s;this.has_stree=e&&e.length}let I;let N;let z;function TreeDesc(e,t){this.dyn_tree=e;this.max_code=0;this.stat_desc=t}const d_code=e=>e<256?D[e]:D[256+(e>>>7)];const put_short=(e,t)=>{e.pending_buf[e.pending++]=t&255;e.pending_buf[e.pending++]=t>>>8&255};const send_bits=(e,t,r)=>{if(e.bi_valid>b-r){e.bi_buf|=t<<e.bi_valid&65535;put_short(e,e.bi_buf);e.bi_buf=t>>b-e.bi_valid;e.bi_valid+=r-b}else{e.bi_buf|=t<<e.bi_valid&65535;e.bi_valid+=r}};const send_code=(e,t,r)=>{send_bits(e,r[t*2],r[t*2+1])};const bi_reverse=(e,t)=>{let r=0;do{r|=e&1;e>>>=1;r<<=1}while(--t>0);return r>>>1};const bi_flush=e=>{if(e.bi_valid===16){put_short(e,e.bi_buf);e.bi_buf=0;e.bi_valid=0}else if(e.bi_valid>=8){e.pending_buf[e.pending++]=e.bi_buf&255;e.bi_buf>>=8;e.bi_valid-=8}};const gen_bitlen=(e,t)=>{const r=t.dyn_tree;const n=t.max_code;const s=t.stat_desc.static_tree;const i=t.stat_desc.has_stree;const a=t.stat_desc.extra_bits;const o=t.stat_desc.extra_base;const l=t.stat_desc.max_length;let c;let u,d;let h;let f;let _;let b=0;for(h=0;h<=m;h++){e.bl_count[h]=0}r[e.heap[e.heap_max]*2+1]=0;for(c=e.heap_max+1;c<p;c++){u=e.heap[c];h=r[r[u*2+1]*2+1]+1;if(h>l){h=l;b++}r[u*2+1]=h;if(u>n){continue}e.bl_count[h]++;f=0;if(u>=o){f=a[u-o]}_=r[u*2];e.opt_len+=_*(h+f);if(i){e.static_len+=_*(s[u*2+1]+f)}}if(b===0){return}do{h=l-1;while(e.bl_count[h]===0){h--}e.bl_count[h]--;e.bl_count[h+1]+=2;e.bl_count[l]--;b-=2}while(b>0);for(h=l;h!==0;h--){u=e.bl_count[h];while(u!==0){d=e.heap[--c];if(d>n){continue}if(r[d*2+1]!==h){e.opt_len+=(h-r[d*2+1])*r[d*2];r[d*2+1]=h}u--}}};const gen_codes=(e,t,r)=>{const n=new Array(m+1);let s=0;let i;let a;for(i=1;i<=m;i++){s=s+r[i-1]<<1;n[i]=s}for(a=0;a<=t;a++){let t=e[a*2+1];if(t===0){continue}e[a*2]=bi_reverse(n[t]++,t)}};const tr_static_init=()=>{let e;let t;let r;let n;let s;const i=new Array(m+1);r=0;for(n=0;n<u-1;n++){S[n]=r;for(e=0;e<1<<x[n];e++){B[r++]=n}}B[r-1]=n;s=0;for(n=0;n<16;n++){R[n]=s;for(e=0;e<1<<k[n];e++){D[s++]=n}}s>>=7;for(;n<f;n++){R[n]=s<<7;for(e=0;e<1<<k[n]-7;e++){D[256+s++]=n}}for(t=0;t<=m;t++){i[t]=0}e=0;while(e<=143){P[e*2+1]=8;e++;i[8]++}while(e<=255){P[e*2+1]=9;e++;i[9]++}while(e<=279){P[e*2+1]=7;e++;i[7]++}while(e<=287){P[e*2+1]=8;e++;i[8]++}gen_codes(P,h+1,i);for(e=0;e<f;e++){T[e*2+1]=5;T[e*2]=bi_reverse(e,5)}I=new StaticTreeDesc(P,x,d+1,h,m);N=new StaticTreeDesc(T,k,0,f,m);z=new StaticTreeDesc(new Array(0),A,0,_,g)};const init_block=e=>{let t;for(t=0;t<h;t++){e.dyn_ltree[t*2]=0}for(t=0;t<f;t++){e.dyn_dtree[t*2]=0}for(t=0;t<_;t++){e.bl_tree[t*2]=0}e.dyn_ltree[w*2]=1;e.opt_len=e.static_len=0;e.sym_next=e.matches=0};const bi_windup=e=>{if(e.bi_valid>8){put_short(e,e.bi_buf)}else if(e.bi_valid>0){e.pending_buf[e.pending++]=e.bi_buf}e.bi_buf=0;e.bi_valid=0};const smaller=(e,t,r,n)=>{const s=t*2;const i=r*2;return e[s]<e[i]||e[s]===e[i]&&n[t]<=n[r]};const pqdownheap=(e,t,r)=>{const n=e.heap[r];let s=r<<1;while(s<=e.heap_len){if(s<e.heap_len&&smaller(t,e.heap[s+1],e.heap[s],e.depth)){s++}if(smaller(t,n,e.heap[s],e.depth)){break}e.heap[r]=e.heap[s];r=s;s<<=1}e.heap[r]=n};const compress_block=(e,t,r)=>{let n;let s;let i=0;let a;let o;if(e.sym_next!==0){do{n=e.pending_buf[e.sym_buf+i++]&255;n+=(e.pending_buf[e.sym_buf+i++]&255)<<8;s=e.pending_buf[e.sym_buf+i++];if(n===0){send_code(e,s,t)}else{a=B[s];send_code(e,a+d+1,t);o=x[a];if(o!==0){s-=S[a];send_bits(e,s,o)}n--;a=d_code(n);send_code(e,a,r);o=k[a];if(o!==0){n-=R[a];send_bits(e,n,o)}}}while(i<e.sym_next)}send_code(e,w,t)};const build_tree=(e,t)=>{const r=t.dyn_tree;const n=t.stat_desc.static_tree;const s=t.stat_desc.has_stree;const i=t.stat_desc.elems;let a,o;let l=-1;let c;e.heap_len=0;e.heap_max=p;for(a=0;a<i;a++){if(r[a*2]!==0){e.heap[++e.heap_len]=l=a;e.depth[a]=0}else{r[a*2+1]=0}}while(e.heap_len<2){c=e.heap[++e.heap_len]=l<2?++l:0;r[c*2]=1;e.depth[c]=0;e.opt_len--;if(s){e.static_len-=n[c*2+1]}}t.max_code=l;for(a=e.heap_len>>1;a>=1;a--){pqdownheap(e,r,a)}c=i;do{a=e.heap[1];e.heap[1]=e.heap[e.heap_len--];pqdownheap(e,r,1);o=e.heap[1];e.heap[--e.heap_max]=a;e.heap[--e.heap_max]=o;r[c*2]=r[a*2]+r[o*2];e.depth[c]=(e.depth[a]>=e.depth[o]?e.depth[a]:e.depth[o])+1;r[a*2+1]=r[o*2+1]=c;e.heap[1]=c++;pqdownheap(e,r,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1];gen_bitlen(e,t);gen_codes(r,l,e.bl_count)};const scan_tree=(e,t,r)=>{let n;let s=-1;let i;let a=t[0*2+1];let o=0;let l=7;let c=4;if(a===0){l=138;c=3}t[(r+1)*2+1]=65535;for(n=0;n<=r;n++){i=a;a=t[(n+1)*2+1];if(++o<l&&i===a){continue}else if(o<c){e.bl_tree[i*2]+=o}else if(i!==0){if(i!==s){e.bl_tree[i*2]++}e.bl_tree[y*2]++}else if(o<=10){e.bl_tree[v*2]++}else{e.bl_tree[E*2]++}o=0;s=i;if(a===0){l=138;c=3}else if(i===a){l=6;c=3}else{l=7;c=4}}};const send_tree=(e,t,r)=>{let n;let s=-1;let i;let a=t[0*2+1];let o=0;let l=7;let c=4;if(a===0){l=138;c=3}for(n=0;n<=r;n++){i=a;a=t[(n+1)*2+1];if(++o<l&&i===a){continue}else if(o<c){do{send_code(e,i,e.bl_tree)}while(--o!==0)}else if(i!==0){if(i!==s){send_code(e,i,e.bl_tree);o--}send_code(e,y,e.bl_tree);send_bits(e,o-3,2)}else if(o<=10){send_code(e,v,e.bl_tree);send_bits(e,o-3,3)}else{send_code(e,E,e.bl_tree);send_bits(e,o-11,7)}o=0;s=i;if(a===0){l=138;c=3}else if(i===a){l=6;c=3}else{l=7;c=4}}};const build_bl_tree=e=>{let t;scan_tree(e,e.dyn_ltree,e.l_desc.max_code);scan_tree(e,e.dyn_dtree,e.d_desc.max_code);build_tree(e,e.bl_desc);for(t=_-1;t>=3;t--){if(e.bl_tree[C[t]*2+1]!==0){break}}e.opt_len+=3*(t+1)+5+5+4;return t};const send_all_trees=(e,t,r,n)=>{let s;send_bits(e,t-257,5);send_bits(e,r-1,5);send_bits(e,n-4,4);for(s=0;s<n;s++){send_bits(e,e.bl_tree[C[s]*2+1],3)}send_tree(e,e.dyn_ltree,t-1);send_tree(e,e.dyn_dtree,r-1)};const detect_data_type=e=>{let t=4093624447;let s;for(s=0;s<=31;s++,t>>>=1){if(t&1&&e.dyn_ltree[s*2]!==0){return r}}if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0){return n}for(s=32;s<d;s++){if(e.dyn_ltree[s*2]!==0){return n}}return r};let L=false;const _tr_init=e=>{if(!L){tr_static_init();L=true}e.l_desc=new TreeDesc(e.dyn_ltree,I);e.d_desc=new TreeDesc(e.dyn_dtree,N);e.bl_desc=new TreeDesc(e.bl_tree,z);e.bi_buf=0;e.bi_valid=0;init_block(e)};const _tr_stored_block=(e,t,r,n)=>{send_bits(e,(i<<1)+(n?1:0),3);bi_windup(e);put_short(e,r);put_short(e,~r);if(r){e.pending_buf.set(e.window.subarray(t,t+r),e.pending)}e.pending+=r};const _tr_align=e=>{send_bits(e,a<<1,3);send_code(e,w,P);bi_flush(e)};const _tr_flush_block=(e,r,n,i)=>{let l,c;let u=0;if(e.level>0){if(e.strm.data_type===s){e.strm.data_type=detect_data_type(e)}build_tree(e,e.l_desc);build_tree(e,e.d_desc);u=build_bl_tree(e);l=e.opt_len+3+7>>>3;c=e.static_len+3+7>>>3;if(c<=l){l=c}}else{l=c=n+5}if(n+4<=l&&r!==-1){_tr_stored_block(e,r,n,i)}else if(e.strategy===t||c===l){send_bits(e,(a<<1)+(i?1:0),3);compress_block(e,P,T)}else{send_bits(e,(o<<1)+(i?1:0),3);send_all_trees(e,e.l_desc.max_code+1,e.d_desc.max_code+1,u+1);compress_block(e,e.dyn_ltree,e.dyn_dtree)}init_block(e);if(i){bi_windup(e)}};const _tr_tally=(e,t,r)=>{e.pending_buf[e.sym_buf+e.sym_next++]=t;e.pending_buf[e.sym_buf+e.sym_next++]=t>>8;e.pending_buf[e.sym_buf+e.sym_next++]=r;if(t===0){e.dyn_ltree[r*2]++}else{e.matches++;t--;e.dyn_ltree[(B[r]+d+1)*2]++;e.dyn_dtree[d_code(t)*2]++}return e.sym_next===e.sym_end};e.exports._tr_init=_tr_init;e.exports._tr_stored_block=_tr_stored_block;e.exports._tr_flush_block=_tr_flush_block;e.exports._tr_tally=_tr_tally;e.exports._tr_align=_tr_align},3944:e=>{function ZStream(){this.input=null;this.next_in=0;this.avail_in=0;this.total_in=0;this.output=null;this.next_out=0;this.avail_out=0;this.total_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}e.exports=ZStream}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var s=t[r]={exports:{}};var i=true;try{e[r].call(s.exports,s,s.exports,__nccwpck_require__);i=false}finally{if(i)delete t[r]}return s.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(5926);module.exports=r})();
1
+ require('./sourcemap-register.js');(()=>{var e={4245:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.FakeConnectedDevice=void 0;const n=r(7569);const i=r(932);class FakeConnectedDevice{origin(){return"FAKE-DEVICE"}connectionState(){return n.ConnectionState.CONNECTED}deviceName(){return"FAKE-DEVICE"}async disconnect(){}canRead(){return true}async read(e){return i.PsdkConst.EMPTY_BYTES}async write(e){console.log("WRITE: ",e)}flush(){}}t.FakeConnectedDevice=FakeConnectedDevice},5324:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});i(r(4245),t);i(r(7569),t)},7569:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ReadOptions=t.WroteReporter=t.ConnectionState=void 0;var r;(function(e){e["CONNECTED"]="CONNECTED";e["DISCONNECTED"]="DISCONNECTED"})(r||(t.ConnectionState=r={}));class WroteReporter{ok;binary;controlExit;exception;constructor(e,t,r,n){this.ok=e;this.binary=t;this.controlExit=r;this.exception=n}}t.WroteReporter=WroteReporter;class ReadOptions{timeout;constructor(e){this.timeout=e?.timeout}}t.ReadOptions=ReadOptions},7555:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.PSDK=void 0;const n=r(1482);const i=r(3783);class PSDK{sversion(){return"0.2.67"}authors(){return n.PsdkConst.DEF_AUTHORS}raw(e){this.commander().pushArg(e);return this}variable(e,t){this.commander().variable(e,t);return this}command(){return this.commander().command()}clear(){this.commander().clear();return this}async write(e){const t=this.connectedDevice();if(!t)throw Error("It's seems you missing to set connectedDevice");e=e??n.WriteOptions.def();const r=this.command();const s=r.binary();const a=new i.DataWriteOperation(e,s,t);const o=await a.write();this.clear();return o}newline(){this.commander().newline();return this}push(e){this.commander().pushArg(e);return this}}t.PSDK=PSDK},3101:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.BasicArg=void 0;const n=r(1482);class BasicArg{newline(){return n.PsdkConst.DEF_ENABLED_NEWLINE}}t.BasicArg=BasicArg},6012:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.OnlyTextHeaderArg=t.OnlyBinaryHeaderArg=t.EasyArg=void 0;const n=r(3101);const i=r(3623);class EasyArg extends n.BasicArg{prependClauses;appendClauses;constructor(){super();this.prependClauses=[];this.appendClauses=[]}append(e){this.appendClauses.push(...e.clauses());return this}prepend(e){this.prependClauses.push(...e.clauses());return this}clauses(){const e=this.clause();const t=[];if(e.type!==i.ClauseType.NONE){t.push(e);if(this.newline()){t.push(i.CommandClause.newline())}}return[...this.prependClauses,...t,...this.appendClauses]}clear(){this.prependClauses.splice(0,this.prependClauses.length);this.appendClauses.splice(0,this.appendClauses.length)}}t.EasyArg=EasyArg;class OnlyBinaryHeaderArg extends EasyArg{append(e){super.append(e);return this}prepend(e){super.prepend(e);return this}clause(){return i.CommandClause.binary(this.header())}newline(){return false}}t.OnlyBinaryHeaderArg=OnlyBinaryHeaderArg;class OnlyTextHeaderArg extends EasyArg{append(e){super.append(e);return this}prepend(e){super.prepend(e);return this}clause(){return i.CommandClause.text(this.header())}}t.OnlyTextHeaderArg=OnlyTextHeaderArg},1666:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.RawMode=t.Raw=void 0;const n=r(6012);const i=r(3623);const s=r(1482);class Raw extends n.EasyArg{_mode;_text;_charset;_binary;_newline=s.PsdkConst.DEF_ENABLED_NEWLINE;constructor(){super()}static text(e,t){const r=new Raw;r._mode=a.TEXT;r._text=e;r._charset=t?.charset??s.PsdkConst.DEF_CHARSET;r._newline=t?.newline??s.PsdkConst.DEF_ENABLED_NEWLINE;return r}static binary(e,t){const r=new Raw;r._mode=a.BINARY;r._binary=e;r._charset=t?.charset??s.PsdkConst.DEF_CHARSET;r._newline=t?.newline??s.PsdkConst.DEF_ENABLED_NEWLINE;return r}append(e){super.append(e);return this}prepend(e){super.prepend(e);return this}clause(){let e;switch(this._mode){case a.TEXT:e=i.CommandClause.text(this._text,this._charset);break;case a.BINARY:e=i.CommandClause.binary(this._binary);break;default:e=i.CommandClause.none();break}return e}header(){return s.PsdkConst.EMPTY_BYTES}newline(){return this._newline}}t.Raw=Raw;var a;(function(e){e["BINARY"]="BINARY";e["TEXT"]="TEXT"})(a||(t.RawMode=a={}))},5146:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});i(r(3101),t);i(r(6012),t);i(r(1666),t)},3623:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});i(r(8247),t);i(r(1392),t);i(r(2211),t);i(r(8718),t);i(r(3839),t);i(r(1410),t)},8247:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.DefaultCommand=t.BasicCommand=void 0;const n=r(1482);const i=r(1614);const s=r(2211);const a=r(4006);class BasicCommand{base64(){return i.Base64.fromUint8Array(this.binary())}}t.BasicCommand=BasicCommand;class DefaultCommand extends BasicCommand{bytes;constructor(e,t){super();let r=[];for(const i of e){switch(i.type){case s.ClauseType.TEXT:const e=a.PVariableKit.replace(i.text,t);const o=a.FastGBK.encode(e);const u=Array.prototype.slice.call(o,0);r=r.concat(u);break;case s.ClauseType.NEWLINE:case s.ClauseType.BINARY:const l=Array.from(i.binary??n.PsdkConst.EMPTY_BYTES);r=r.concat(l);break}}this.bytes=new Uint8Array(r)}binary(){return this.bytes}hex(e){return(e??n.HexOutput.def()).format(this.binary())}string(e){return a.FastGBK.decode(this.binary())}}t.DefaultCommand=DefaultCommand},2211:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CommandClause=t.ClauseType=void 0;const n=r(1482);var i;(function(e){e["TEXT"]="TEXT";e["BINARY"]="BINARY";e["NEWLINE"]="NEWLINE";e["NONE"]="NONE"})(i||(t.ClauseType=i={}));class CommandClause{_type;_text;_charset;_binary;constructor(e,t,r,n){this._type=e;this._text=t;this._charset=r;this._binary=n}static text(e,t=n.PsdkConst.DEF_CHARSET){return new CommandClause(i.TEXT,e,t,undefined)}static binary(e){return new CommandClause(i.BINARY,undefined,undefined,e)}static newline(){return new CommandClause(i.NEWLINE,undefined,undefined,n.PsdkConst.DEF_NEWLINE_BINARY)}static none(){return new CommandClause(i.NONE,undefined,undefined,undefined)}get type(){return this._type}get text(){return this._text}get charset(){return this._charset}get binary(){return this._binary}}t.CommandClause=CommandClause},1392:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Commander=void 0;const n=r(2211);const i=r(1482);const s=r(8247);class Commander{clauses;_variable;constructor(){this.clauses=[];this._variable=new Map}static make(){return new Commander}pushText(e,t){if(e.startsWith(i.PsdkConst.CRLF)){e=e.substring(2)}const r=n.CommandClause.text(e,t?.charset??i.PsdkConst.DEF_CHARSET);return this.pushClause(r,t?.newline??i.PsdkConst.DEF_ENABLED_NEWLINE)}pushBinary(e,t){const r=n.CommandClause.binary(e);return this.pushClause(r,t??i.PsdkConst.DEF_ENABLED_NEWLINE)}pushClause(e,t){this.clauses.push(e);if(t??i.PsdkConst.DEF_ENABLED_NEWLINE){this.clauses.push(n.CommandClause.newline())}return this}pushClauses(e){e.forEach((e=>this.pushClause(e,false)));return this}pushArg(e){this.pushClauses(e.clauses());return this}newline(){const e=n.CommandClause.newline();return this.pushClause(e,false)}variable(e,t){this._variable.set(e,t);return this}clear(){this.clauses.splice(0,this.clauses.length);this._variable.clear();return this}command(){return new s.DefaultCommand(this.clauses,this._variable)}}t.Commander=Commander},8718:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TextAppendat=t.Appendat=void 0;const n=r(4006);class Appendat{_argument;_condition;_callback;constructor(e,t,r){this._argument=e;this._condition=t;this._callback=r}get condition(){return this._condition}callback(e){this._callback=e;return this}quote(){return this}argument(){if(!n.Checker.truthy(this._callback))return this._argument;if(!n.Checker.truthy(this._argument))return undefined;return this._callback.callback(this._argument)}}t.Appendat=Appendat;class TextAppendat extends Appendat{_quote;constructor(e,t,r){super(e,t??true,r);this._quote=false}static create(e,t){return new TextAppendat(e,t?.condition??true,new class{callback(e){const r=t?.callback;if(r){return r(e)}return e}})}callback(e){super.callback(e);return this}quote(){this._quote=true;return this}argument(){const e=super.argument();if(!n.Checker.truthy(e))return this._quote?'""':"";if(this._quote){return`"${e}"`}return e}}t.TextAppendat=TextAppendat},3839:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.BinaryCommand=void 0;const n=r(2211);const i=r(4006);class BinaryCommand{binary;constructor(e){this.binary=e??[]}static make(){return new BinaryCommand}static with(e){const t=Array.from(e);return new BinaryCommand(t)}appendNumber(e){this.binary.push(e);return this}appendText(e,t){const r=i.FastGBK.encode(e);this.binary.push(...r);return this}appendU8A(e){const t=Array.from(e);this.binary=this.binary.concat(t);return this}output(){return new Uint8Array(this.binary)}clause(){const e=this.output();return n.CommandClause.binary(e)}}t.BinaryCommand=BinaryCommand},1410:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.TSPLCommand=t.CPCLCommand=t.SingleCommand=void 0;const n=r(8718);const i=r(2211);const s=r(4006);class SingleCommand{_arguments;_symbolAfterHeader;_symbolBetweenArguments;_header;_charset;constructor(e,t,r){this._arguments=[];this._symbolAfterHeader=e;this._symbolBetweenArguments=t;this._charset=r}get getHeader(){return this._header}get symbolAfterHeader(){return this._symbolAfterHeader}get symbolBetweenArguments(){return this._symbolBetweenArguments}header(e){this._header=e;return this}get charset(){return this._charset}append(e){if(!e.condition)return this;const t=e.argument();if(!s.Checker.truthy(t))return this;this._arguments.push(t);return this}arguments(){return this._arguments}}t.SingleCommand=SingleCommand;class BasicStringSingleCommand extends SingleCommand{constructor(e,t,r){super(e,t,r)}append(e){const t=e.argument();if(!s.Checker.truthy(t))return this;super.append(e);return this}appendText(e){return this.append(n.TextAppendat.create(e??"",{}))}appendNumber(e){if(isNaN(e))return this;return this.append(n.TextAppendat.create((e??"").toString(),{}))}output(){let e="";if(s.Checker.truthy(super.getHeader)){e+=super.getHeader;e+=super.symbolAfterHeader}const t=super.arguments();const r=t.length;let n=0;for(const i of t){n+=1;if(!s.Checker.truthy(i))continue;e+=i;if(n<r){e+=super.symbolBetweenArguments}}return e}clause(){const e=this.output();if(!s.Checker.truthy(e)){return i.CommandClause.none()}return i.CommandClause.text(e,super.charset)}}class CPCLCommand extends BasicStringSingleCommand{constructor(e,t){super(" "," ",t);super.header(e)}static with(e,t){return new CPCLCommand(e,t)}append(e){super.append(e);return this}appendText(e){super.appendText(e);return this}appendNumber(e){super.appendNumber(e);return this}}t.CPCLCommand=CPCLCommand;class TSPLCommand extends BasicStringSingleCommand{constructor(e,t){super(" ",",",t);super.header(e)}static with(e,t){return new TSPLCommand(e,t)}append(e){super.append(e);return this}appendText(e){super.appendText(e);return this}appendNumber(e){super.appendNumber(e);return this}}t.TSPLCommand=TSPLCommand},3783:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.DataWriteOperation=void 0;const n=r(1482);const i=r(5324);const s=r(4006);class DataWriteOperation{options;binary;connectedDevice;constructor(e,t,r){this.options=e;this.binary=t;this.connectedDevice=r}async write(){if(!this.options.enableChunkWrite){const e=await this.writData(this.binary);this.doCallback(e,this.binary,1,1);return e}const e=Array.from(this.binary);const t=s.CollectionKit.split(e,this.options.chunkSize);const r=t.length;let a=0;for(const e of t){a+=1;const t=new Uint8Array(e);const i=await this.writData(t);const s=this.doCallback(i,t,a,r);if(s==n.WriteControl.STOP){i.controlExit=true;return i}if(!i.ok){return i}}return new i.WroteReporter(true,this.binary,false)}doCallback(e,t,r,i){const s=this.options.callback;if(!s)return n.WriteControl.CONTINUE;const a=new n.DataWrote(t,r,i);if(e.ok){return s.success(a)}if(s.failed){s.failed(a,e.exception)}else{console.log("no custom failed callback, full exception: ",e.exception)}return n.WriteControl.STOP}async writData(e){try{await this.connectedDevice.write(e);return new i.WroteReporter(true,e,false)}catch(t){return new i.WroteReporter(false,e,false,t)}}}t.DataWriteOperation=DataWriteOperation},932:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});i(r(5146),t);i(r(1482),t);i(r(3623),t);i(r(7555),t)},8831:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.HexOutput=void 0;const r=32;class HexOutput{enableFormat;spacing;maxLengthOfLine;constructor(e,t,n=r){this.enableFormat=e;this.spacing=t;this.maxLengthOfLine=n}static def(){return new HexOutput(false,false,r)}static simple(e=true){return new HexOutput(e,true,r)}static formatWithMaxLength(e){return new HexOutput(true,true,e)}format(e){const t=Array.from(e,(function(e){return("0"+(e&255).toString(16)).slice(-2)})).join("");if(!this.enableFormat){return t}let r="";const n=t.length;let i=0;for(let e=0;e<n;e++){const s=e+1;const a=t[e];r+=a;if(s%2==0&&this.spacing){if(s<n){if(i+1<this.maxLengthOfLine){r+=" "}i+=1}}if(i>=this.maxLengthOfLine){r+="\n";i=0}}return r}}t.HexOutput=HexOutput},1482:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});i(r(4164),t);i(r(8831),t);i(r(7331),t);i(r(9614),t)},9614:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Lifecycle=void 0;class Lifecycle{connectedDevice;constructor(e){this.connectedDevice=e}}t.Lifecycle=Lifecycle},4164:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.PsdkConst=void 0;const n=r(4006);const i="\r";const s="\n";const a=`${i}${s}`;t.PsdkConst={DEF_CHARSET:"gbk",CR:i,LF:s,CRLF:a,QUOTE:'"',DEF_NEWLINE_BINARY:n.ByteKit.textToU8A(a),DEF_AUTHORS:["fewensa <osuni@protonmail.com>"],DEF_ENABLED_NEWLINE:true,DEF_WRITE_CHUNK_SIZE:512,EMPTY_BYTES:new Uint8Array([])}},7331:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.WriteControl=t.DataWrote=t.DataWrite=t.IDataWriteCallback=t.WriteOptions=void 0;const n=r(4164);class WriteOptions{enableChunkWrite;chunkSize;callback;constructor(e=true,t=n.PsdkConst.DEF_WRITE_CHUNK_SIZE,r){this.enableChunkWrite=e;this.chunkSize=t;this.callback=r}static def(){return new WriteOptions(true,n.PsdkConst.DEF_WRITE_CHUNK_SIZE,undefined)}}t.WriteOptions=WriteOptions;class IDataWriteCallback{failed(e,t){console.error(`Write data failed: ${t.message}`)}}t.IDataWriteCallback=IDataWriteCallback;class DataWrite{binary;currentTimes;totalTimes;constructor(e,t,r){this.binary=e;this.currentTimes=t;this.totalTimes=r}}t.DataWrite=DataWrite;class DataWrote extends DataWrite{}t.DataWrote=DataWrote;var i;(function(e){e["CONTINUE"]="CONTINUE";e["STOP"]="STOP"})(i||(t.WriteControl=i={}))},6833:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});i(r(5324),t);i(r(932),t);i(r(4006),t)},1614:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Base64=t.extendBuiltins=t.extendUint8Array=t.extendString=t.toUint8Array=t.fromUint8Array=t.isValid=t.decode=t.btou=t.encodeURL=t.encodeURI=t.encode=t.utob=t.toBase64=t.fromBase64=t.btoaPolyfill=t.btoa=t.atobPolyfill=t.atob=t.VERSION=t.version=void 0;const r="3.7.7";t.version=r;const n=r;t.VERSION=n;const i=typeof Buffer==="function";const s=typeof TextDecoder==="function"?new TextDecoder:undefined;const a=typeof TextEncoder==="function"?new TextEncoder:undefined;const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";const u=Array.prototype.slice.call(o);const l=(e=>{let t={};e.forEach(((e,r)=>t[e]=r));return t})(u);const c=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;const d=String.fromCharCode.bind(String);const f=typeof Uint8Array.from==="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0));const _mkUriSafe=e=>e.replace(/=/g,"").replace(/[+\/]/g,(e=>e=="+"?"-":"_"));const _tidyB64=e=>e.replace(/[^A-Za-z0-9\+\/]/g,"");const btoaPolyfill=e=>{let t,r,n,i,s="";const a=e.length%3;for(let a=0;a<e.length;){if((r=e.charCodeAt(a++))>255||(n=e.charCodeAt(a++))>255||(i=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=r<<16|n<<8|i;s+=u[t>>18&63]+u[t>>12&63]+u[t>>6&63]+u[t&63]}return a?s.slice(0,a-3)+"===".substring(a):s};t.btoaPolyfill=btoaPolyfill;const h=typeof btoa==="function"?e=>btoa(e):i?e=>Buffer.from(e,"binary").toString("base64"):btoaPolyfill;t.btoa=h;const p=i?e=>Buffer.from(e).toString("base64"):e=>{const t=4096;let r=[];for(let n=0,i=e.length;n<i;n+=t){r.push(d.apply(null,e.subarray(n,n+t)))}return h(r.join(""))};const fromUint8Array=(e,t=false)=>t?_mkUriSafe(p(e)):p(e);t.fromUint8Array=fromUint8Array;const cb_utob=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?d(192|t>>>6)+d(128|t&63):d(224|t>>>12&15)+d(128|t>>>6&63)+d(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return d(240|t>>>18&7)+d(128|t>>>12&63)+d(128|t>>>6&63)+d(128|t&63)}};const _=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g;const utob=e=>e.replace(_,cb_utob);t.utob=utob;const g=i?e=>Buffer.from(e,"utf8").toString("base64"):a?e=>p(a.encode(e)):e=>h(utob(e));const encode=(e,t=false)=>t?_mkUriSafe(g(e)):g(e);t.toBase64=encode;t.encode=encode;const encodeURI=e=>encode(e,true);t.encodeURI=encodeURI;t.encodeURL=encodeURI;const m=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;const cb_btou=e=>{switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),r=t-65536;return d((r>>>10)+55296)+d((r&1023)+56320);case 3:return d((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return d((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}};const btou=e=>e.replace(m,cb_btou);t.btou=btou;const atobPolyfill=e=>{e=e.replace(/\s+/g,"");if(!c.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let t,r="",n,i;for(let s=0;s<e.length;){t=l[e.charAt(s++)]<<18|l[e.charAt(s++)]<<12|(n=l[e.charAt(s++)])<<6|(i=l[e.charAt(s++)]);r+=n===64?d(t>>16&255):i===64?d(t>>16&255,t>>8&255):d(t>>16&255,t>>8&255,t&255)}return r};t.atobPolyfill=atobPolyfill;const b=typeof atob==="function"?e=>atob(_tidyB64(e)):i?e=>Buffer.from(e,"base64").toString("binary"):atobPolyfill;t.atob=b;const w=i?e=>f(Buffer.from(e,"base64")):e=>f(b(e).split("").map((e=>e.charCodeAt(0))));const toUint8Array=e=>w(_unURI(e));t.toUint8Array=toUint8Array;const v=i?e=>Buffer.from(e,"base64").toString("utf8"):s?e=>s.decode(w(e)):e=>btou(b(e));const _unURI=e=>_tidyB64(e.replace(/[-_]/g,(e=>e=="-"?"+":"/")));const decode=e=>v(_unURI(e));t.fromBase64=decode;t.decode=decode;const isValid=e=>{if(typeof e!=="string")return false;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)};t.isValid=isValid;const _noEnum=e=>({value:e,enumerable:false,writable:true,configurable:true});const extendString=function(){const _add=(e,t)=>Object.defineProperty(String.prototype,e,_noEnum(t));_add("fromBase64",(function(){return decode(this)}));_add("toBase64",(function(e){return encode(this,e)}));_add("toBase64URI",(function(){return encode(this,true)}));_add("toBase64URL",(function(){return encode(this,true)}));_add("toUint8Array",(function(){return toUint8Array(this)}))};t.extendString=extendString;const extendUint8Array=function(){const _add=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,_noEnum(t));_add("toBase64",(function(e){return fromUint8Array(this,e)}));_add("toBase64URI",(function(){return fromUint8Array(this,true)}));_add("toBase64URL",(function(){return fromUint8Array(this,true)}))};t.extendUint8Array=extendUint8Array;const extendBuiltins=()=>{extendString();extendUint8Array()};t.extendBuiltins=extendBuiltins;const y={version:r,VERSION:n,atob:b,atobPolyfill:atobPolyfill,btoa:h,btoaPolyfill:btoaPolyfill,fromBase64:decode,toBase64:encode,encode:encode,encodeURI:encodeURI,encodeURL:encodeURI,utob:utob,btou:btou,decode:decode,isValid:isValid,fromUint8Array:fromUint8Array,toUint8Array:toUint8Array,extendString:extendString,extendUint8Array:extendUint8Array,extendBuiltins:extendBuiltins};t.Base64=y},5659:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ByteKit=void 0;const n=r(3192);class ByteKit{static textToU8A(e){if(!n.Checker.truthy(e))return new Uint8Array([]);let t=[];let r,i;r=e.length;for(let n=0;n<r;n++){i=e.charCodeAt(n);if(i>=65536&&i<=1114111){t.push(i>>18&7|240);t.push(i>>12&63|128);t.push(i>>6&63|128);t.push(i&63|128)}else if(i>=2048&&i<=65535){t.push(i>>12&15|224);t.push(i>>6&63|128);t.push(i&63|128)}else if(i>=128&&i<=2047){t.push(i>>6&31|192);t.push(i&63|128)}else{t.push(i&255)}}return new Uint8Array(t)}}t.ByteKit=ByteKit},3192:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Checker=void 0;class Checker{static truthy(e){if(e===undefined)return false;if(e===null)return false;if(e==="")return false;const t=typeof e;switch(t){case"number":if(isNaN(e))return false;break;case"bigint":default:return true}}static empty(e){if(!Checker.truthy(e))return true;return e.length===0}}t.Checker=Checker},8961:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.FastGBK=void 0;let r;function initGbkTable(){const e=[[161,169,161,254],[176,247,161,254],[129,160,64,254],[170,254,64,160],[168,169,64,160],[170,175,161,254],[248,254,161,254],[161,167,64,160]];const t=new Uint16Array(23940);let n=0;for(const[r,i,s,a]of e){for(let e=s;e<=a;e++){if(e!==127){for(let s=r;s<=i;s++){t[n++]=e<<8|s}}}}r=new Uint16Array(65536);r.fill(65535);const i=new TextDecoder("gbk").decode(t);for(let e=0;e<i.length;e++){r[i.charCodeAt(e)]=t[e]}}const defaultOnAlloc=e=>new Uint8Array(e);const defaultOnError=()=>63;const n=new TextDecoder("gbk");class FastGBK{static decode(e){return n.decode(e)}static encode(e,t){if(!r){initGbkTable()}const n=t?.onAlloc??defaultOnAlloc;const i=t?.onError??defaultOnError;const s=n(e.length*2);let a=0;for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<128){s[a++]=n;continue}const o=r[n];if(o!==65535){s[a++]=o;s[a++]=o>>8}else if(n===8364){s[a++]=128}else{const r=i(t,e);if(r===-1){break}if(r>255){s[a++]=r;s[a++]=r>>8}else{s[a++]=r}}}return s.subarray(0,a)}}t.FastGBK=FastGBK},4006:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});i(r(5659),t);i(r(5925),t);i(r(2329),t);i(r(2973),t);i(r(3192),t);i(r(8961),t)},2329:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.CollectionKit=void 0;const n=r(3192);class CollectionKit{static split(e,t){if(n.Checker.empty(e))return[];if(t<=0)throw new Error("The size must > 0");const r=[];let i=[];for(const n of e){i.push(n);if(t==i.length){r.push(i);i=[]}}if(0!=i.length)r.push(i);return r}static parts(e,t){if(n.Checker.empty(e)){return[]}if(t<=0)throw new Error("The parts length must > 0");if(e.length<=t){return[e]}const r=[];let i=[];const s=Math.floor(e.length/t);for(const n of e){i.push(n);if(i.length==s){r.push(i);if(r.length<t)i=[]}}return r}}t.CollectionKit=CollectionKit},2973:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ImageKit=void 0;class ImageKit{static processImage(e,t,r){const n=e.getContext("2d");let i=Math.floor(t%8===0?t/8:t/8+1);let s=0;let a=0;const o=r*i;const u=[];for(let e=0;e<o;e++){u[e]=0}const l=n.getImageData(0,0,e.width,e.height);while(s<r){let e=0;for(let r=0;r<t;r++){e++;if(e>8){e=1;a++}const t=1<<8-e;const n=ImageKit.fastExtractPixel(l,r,s,1,1);const i=n[0];const o=i[0];const c=i[1];const d=i[2];if((o+c+d)/3<128){u[a]=u[a]|t}}a=i*(s+1);s+=1}return new Uint8Array(u)}static fastExtractPixel(e,t,r,n,i){let s,a;let o=[];let u,l,c,d;const f=e.data;for(a=0;a<i;a++){let i=(t+(r+a)*e.width)*4;for(s=0;s<n;s++){u=f[i++];l=f[i++];c=f[i++];d=f[i++];o.push([u,l,c,d])}}return o}}t.ImageKit=ImageKit},5925:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.PVariableKit=void 0;const n=r(3192);class PVariableKit{static replace(e,t){if(!n.Checker.truthy(e))return e;if(!n.Checker.truthy(t))return e;if(e.indexOf("{{")<0&&e.indexOf("}}")<0)return e;const r=/[\\]?\{\{(?<varx>.*?)}}/gm;const i="__THIS_IS_MAGIC_MARK_FOR_HACK_REGEX_MATCH__";while(true){const n=r.exec(e);if(n==null)break;const s=n[0];const a=s.replace("{{","").replace("}}","");const o=a.trim();const u=t.get(o)??"";if(s.startsWith("\\")){const t=s.replace("\\{{",i);e=e.replace(s,t);continue}e=e.replace(s,u)}e=e.replace(new RegExp(i,"g"),"{{");return e}}t.PVariableKit=PVariableKit},7438:(e,t,r)=>{r(1184);(()=>{"use strict";var t={926:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});i(r(379),t)},208:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.PinedThresholdValue=t.ThresholdValue=t.AbstractThreshold=void 0;const n=r(651);const i=r(761);const s=r(597);class AbstractThreshold extends n.ImagebProcesser{threshold;mode;constructor(e){super();this.mode=i.ThresholdValueMode.avg;this.threshold=e??new PinedThresholdValue}process(e){let t=s.ImagebTool.zeroAndOne(e);return new i.ProcessedResult({origin:e,result:new i.ProcessedImage({data:t,width:t.width,height:t.height})})}}t.AbstractThreshold=AbstractThreshold;class ThresholdValue{}t.ThresholdValue=ThresholdValue;class PinedThresholdValue extends ThresholdValue{_value;constructor(e){super();this._value=e??190}threshold(){return this._value}}t.PinedThresholdValue=PinedThresholdValue},19:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.GrayscaleImage=void 0;const n=r(651);const i=r(761);const s=r(597);class GrayscaleImage extends n.ImagebProcesser{_processer;constructor(e){super();this._processer=e?._processer}process(e){let t=s.ImagebTool.convertGreyImg(e);if(this._processer==null){return new i.ProcessedResult({origin:e,result:new i.ProcessedImage({data:t,width:t.width,height:t.height})})}return this._processer.process(t)}}t.GrayscaleImage=GrayscaleImage},461:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ReverseColorImage=void 0;const n=r(651);const i=r(761);const s=r(597);class ReverseColorImage extends n.ImagebProcesser{_processer;constructor(e){super();this._processer=e?._processer}process(e){let t=s.ImagebTool.invertBitmap(e);if(this._processer==null){return new i.ProcessedResult({origin:e,result:new i.ProcessedImage({data:t,width:t.width,height:t.height})})}return this._processer.process(t)}}t.ReverseColorImage=ReverseColorImage},826:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.ThresholdImage=void 0;const n=r(208);class ThresholdImage extends n.AbstractThreshold{constructor(e){super(new n.PinedThresholdValue(e?.threshold))}}t.ThresholdImage=ThresholdImage},379:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});i(r(651),t);i(r(19),t);i(r(461),t);i(r(826),t);i(r(645),t);i(r(208),t)},645:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.Pbita=void 0;const a=r(651);const o=r(761);const u=s(r(154));const l=r(19);const c=r(461);class Pbita extends a.ImagebProcesser{command;threshold;compress;reverse;constructor(e){super();this.threshold=e.threshold;this.command=e.command;this.compress=e.compress;this.reverse=e.reverse}process(e){const t=e.width;const r=e.height;const n=new l.GrayscaleImage;const i=n.process(e);if(i.result==null){return new o.ProcessedResult({origin:e,message:"Failed to process gray scale: "+i.message})}let s;if(this.reverse){const t=new c.ReverseColorImage;const r=t.process(i.result.data);if(r.result==null){return new o.ProcessedResult({origin:e,message:"Failed to process reverse: "+r.message})}s=r.result.data}else{s=i.result.data}let a=this._topbitimg(s,t,r);if(a==null){return new o.ProcessedResult({origin:e,message:"Failed to process bitimg"})}if(this.compress){a=u.deflate(a,{windowBits:10})}return new o.ProcessedResult({origin:e,result:new o.ProcessedImage({data:s,width:t,height:r,bytes:a})})}_topbitimg(e,t,r){if(this.command=="tspl"&&!this.compress){return this._topbitimgReverse(this._topbitimgRaw(e,t,r))}else{return this._topbitimgRaw(e,t,r)}}_topbitimgRaw(e,t,r){const n=e.getContext("2d");let i=Math.floor(t%8===0?t/8:t/8+1);let s=0;let a=0;const o=r*i;const u=[];for(let e=0;e<o;e++){u[e]=0}const l=n.getImageData(0,0,e.width,e.height);while(s<r){let e=0;for(let r=0;r<t;r++){e++;if(e>8){e=1;a++}const t=1<<8-e;const n=this.fastExtractPixel(l,r,s,1,1);const i=n[0];const o=i[0];const c=i[1];const d=i[2];if((o+c+d)/3<(this.threshold??190)){u[a]=u[a]|t}}a=i*(s+1);s+=1}return new Uint8Array(u)}_topbitimgReverse(e){if(e==null){return null}const t=[];for(let r=0;r<e.length;r++){t[r]=~e[r]}return new Uint8Array(t)}fastExtractPixel(e,t,r,n,i){let s,a;let o=[];let u,l,c,d;const f=e.data;for(a=0;a<i;a++){let i=(t+(r+a)*e.width)*4;for(s=0;s<n;s++){u=f[i++];l=f[i++];c=f[i++];d=f[i++];o.push([u,l,c,d])}}return o}}t.Pbita=Pbita},651:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ImagebProcesser=void 0;class ImagebProcesser{}t.ImagebProcesser=ImagebProcesser},597:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ImagebTool=void 0;class ImagebTool{static invertBitmap(e){const t=e.getContext("2d");const r=t.getImageData(0,0,e.width,e.height);const n=r.data;for(let e=0,t=n.length;e<t;e+=4){r.data[e]=255-r.data[e];r.data[e+1]=255-r.data[e+1];r.data[e+2]=255-r.data[e+2]}t.putImageData(r,0,0);return e}static convertGreyImg(e){const t=e.getContext("2d");const r=t.getImageData(0,0,e.width,e.height);const n=r.data;for(let e=0,t=n.length;e<t;e+=4){const t=r.data[e]*.3+r.data[e+1]*.59+r.data[e+2]*.11;r.data[e]=t;r.data[e+1]=t;r.data[e+2]=t}t.putImageData(r,0,0);return e}static zeroAndOne(e){const t=e.getContext("2d");const r=t.getImageData(0,0,e.width,e.height);const n=255/2;for(let e=0;e<r.data.length;e+=4){const t=r.data[e];const i=r.data[e+1];const s=r.data[e+2];const a=r.data[e+3];const o=(t+i+s)/3;if(o>n){r.data[e]=255;r.data[e+1]=255;r.data[e+2]=255;r.data[e+3]=a}else{r.data[e]=0;r.data[e+1]=0;r.data[e+2]=0;r.data[e+3]=a}}t.putImageData(r,0,0);return e}}t.ImagebTool=ImagebTool},761:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t.ThresholdValueMode=t.ProcessedImage=t.ProcessedResult=void 0;class ProcessedResult{origin;result;message;constructor(e){this.origin=e.origin;this.result=e.result;this.message=e.message}}t.ProcessedResult=ProcessedResult;class ProcessedImage{data;width;height;bytes;constructor(e){this.data=e.data;this.width=e.width;this.height=e.height;this.bytes=e.bytes}}t.ProcessedImage=ProcessedImage;var r;(function(e){e[e["sum"]=0]="sum";e[e["avg"]=1]="avg";e[e["red"]=2]="red";e[e["green"]=3]="green";e[e["blue"]=4]="blue";e[e["max"]=5]="max";e[e["min"]=6]="min"})(r||(t.ThresholdValueMode=r={}))},154:(e,t,r)=>{const{Deflate:n,deflate:i,deflateRaw:s,gzip:a}=r(914);const{Inflate:o,inflate:u,inflateRaw:l,ungzip:c}=r(955);const d=r(234);e.exports.Deflate=n;e.exports.deflate=i;e.exports.deflateRaw=s;e.exports.gzip=a;e.exports.Inflate=o;e.exports.inflate=u;e.exports.inflateRaw=l;e.exports.ungzip=c;e.exports.constants=d},914:(e,t,r)=>{const n=r(492);const i=r(533);const s=r(992);const a=r(678);const o=r(944);const u=Object.prototype.toString;const{Z_NO_FLUSH:l,Z_SYNC_FLUSH:c,Z_FULL_FLUSH:d,Z_FINISH:f,Z_OK:h,Z_STREAM_END:p,Z_DEFAULT_COMPRESSION:_,Z_DEFAULT_STRATEGY:g,Z_DEFLATED:m}=r(234);function Deflate(e){this.options=i.assign({level:_,method:m,chunkSize:16384,windowBits:15,memLevel:8,strategy:g},e||{});let t=this.options;if(t.raw&&t.windowBits>0){t.windowBits=-t.windowBits}else if(t.gzip&&t.windowBits>0&&t.windowBits<16){t.windowBits+=16}this.err=0;this.msg="";this.ended=false;this.chunks=[];this.strm=new o;this.strm.avail_out=0;let r=n.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==h){throw new Error(a[r])}if(t.header){n.deflateSetHeader(this.strm,t.header)}if(t.dictionary){let e;if(typeof t.dictionary==="string"){e=s.string2buf(t.dictionary)}else if(u.call(t.dictionary)==="[object ArrayBuffer]"){e=new Uint8Array(t.dictionary)}else{e=t.dictionary}r=n.deflateSetDictionary(this.strm,e);if(r!==h){throw new Error(a[r])}this._dict_set=true}}Deflate.prototype.push=function(e,t){const r=this.strm;const i=this.options.chunkSize;let a,o;if(this.ended){return false}if(t===~~t)o=t;else o=t===true?f:l;if(typeof e==="string"){r.input=s.string2buf(e)}else if(u.call(e)==="[object ArrayBuffer]"){r.input=new Uint8Array(e)}else{r.input=e}r.next_in=0;r.avail_in=r.input.length;for(;;){if(r.avail_out===0){r.output=new Uint8Array(i);r.next_out=0;r.avail_out=i}if((o===c||o===d)&&r.avail_out<=6){this.onData(r.output.subarray(0,r.next_out));r.avail_out=0;continue}a=n.deflate(r,o);if(a===p){if(r.next_out>0){this.onData(r.output.subarray(0,r.next_out))}a=n.deflateEnd(this.strm);this.onEnd(a);this.ended=true;return a===h}if(r.avail_out===0){this.onData(r.output);continue}if(o>0&&r.next_out>0){this.onData(r.output.subarray(0,r.next_out));r.avail_out=0;continue}if(r.avail_in===0)break}return true};Deflate.prototype.onData=function(e){this.chunks.push(e)};Deflate.prototype.onEnd=function(e){if(e===h){this.result=i.flattenChunks(this.chunks)}this.chunks=[];this.err=e;this.msg=this.strm.msg};function deflate(e,t){const r=new Deflate(t);r.push(e,true);if(r.err){throw r.msg||a[r.err]}return r.result}function deflateRaw(e,t){t=t||{};t.raw=true;return deflate(e,t)}function gzip(e,t){t=t||{};t.gzip=true;return deflate(e,t)}e.exports.Deflate=Deflate;e.exports.deflate=deflate;e.exports.deflateRaw=deflateRaw;e.exports.gzip=gzip;e.exports.constants=r(234)},955:(e,t,r)=>{const n=r(422);const i=r(533);const s=r(992);const a=r(678);const o=r(944);const u=r(657);const l=Object.prototype.toString;const{Z_NO_FLUSH:c,Z_FINISH:d,Z_OK:f,Z_STREAM_END:h,Z_NEED_DICT:p,Z_STREAM_ERROR:_,Z_DATA_ERROR:g,Z_MEM_ERROR:m}=r(234);function Inflate(e){this.options=i.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const t=this.options;if(t.raw&&t.windowBits>=0&&t.windowBits<16){t.windowBits=-t.windowBits;if(t.windowBits===0){t.windowBits=-15}}if(t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)){t.windowBits+=32}if(t.windowBits>15&&t.windowBits<48){if((t.windowBits&15)===0){t.windowBits|=15}}this.err=0;this.msg="";this.ended=false;this.chunks=[];this.strm=new o;this.strm.avail_out=0;let r=n.inflateInit2(this.strm,t.windowBits);if(r!==f){throw new Error(a[r])}this.header=new u;n.inflateGetHeader(this.strm,this.header);if(t.dictionary){if(typeof t.dictionary==="string"){t.dictionary=s.string2buf(t.dictionary)}else if(l.call(t.dictionary)==="[object ArrayBuffer]"){t.dictionary=new Uint8Array(t.dictionary)}if(t.raw){r=n.inflateSetDictionary(this.strm,t.dictionary);if(r!==f){throw new Error(a[r])}}}}Inflate.prototype.push=function(e,t){const r=this.strm;const i=this.options.chunkSize;const a=this.options.dictionary;let o,u,b;if(this.ended)return false;if(t===~~t)u=t;else u=t===true?d:c;if(l.call(e)==="[object ArrayBuffer]"){r.input=new Uint8Array(e)}else{r.input=e}r.next_in=0;r.avail_in=r.input.length;for(;;){if(r.avail_out===0){r.output=new Uint8Array(i);r.next_out=0;r.avail_out=i}o=n.inflate(r,u);if(o===p&&a){o=n.inflateSetDictionary(r,a);if(o===f){o=n.inflate(r,u)}else if(o===g){o=p}}while(r.avail_in>0&&o===h&&r.state.wrap>0&&e[r.next_in]!==0){n.inflateReset(r);o=n.inflate(r,u)}switch(o){case _:case g:case p:case m:this.onEnd(o);this.ended=true;return false}b=r.avail_out;if(r.next_out){if(r.avail_out===0||o===h){if(this.options.to==="string"){let e=s.utf8border(r.output,r.next_out);let t=r.next_out-e;let n=s.buf2string(r.output,e);r.next_out=t;r.avail_out=i-t;if(t)r.output.set(r.output.subarray(e,e+t),0);this.onData(n)}else{this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out))}}}if(o===f&&b===0)continue;if(o===h){o=n.inflateEnd(this.strm);this.onEnd(o);this.ended=true;return true}if(r.avail_in===0)break}return true};Inflate.prototype.onData=function(e){this.chunks.push(e)};Inflate.prototype.onEnd=function(e){if(e===f){if(this.options.to==="string"){this.result=this.chunks.join("")}else{this.result=i.flattenChunks(this.chunks)}}this.chunks=[];this.err=e;this.msg=this.strm.msg};function inflate(e,t){const r=new Inflate(t);r.push(e);if(r.err)throw r.msg||a[r.err];return r.result}function inflateRaw(e,t){t=t||{};t.raw=true;return inflate(e,t)}e.exports.Inflate=Inflate;e.exports.inflate=inflate;e.exports.inflateRaw=inflateRaw;e.exports.ungzip=inflate;e.exports.constants=r(234)},533:e=>{const _has=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);e.exports.assign=function(e){const t=Array.prototype.slice.call(arguments,1);while(t.length){const r=t.shift();if(!r){continue}if(typeof r!=="object"){throw new TypeError(r+"must be non-object")}for(const t in r){if(_has(r,t)){e[t]=r[t]}}}return e};e.exports.flattenChunks=e=>{let t=0;for(let r=0,n=e.length;r<n;r++){t+=e[r].length}const r=new Uint8Array(t);for(let t=0,n=0,i=e.length;t<i;t++){let i=e[t];r.set(i,n);n+=i.length}return r}},992:e=>{let t=true;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){t=false}const r=new Uint8Array(256);for(let e=0;e<256;e++){r[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1}r[254]=r[254]=1;e.exports.string2buf=e=>{if(typeof TextEncoder==="function"&&TextEncoder.prototype.encode){return(new TextEncoder).encode(e)}let t,r,n,i,s,a=e.length,o=0;for(i=0;i<a;i++){r=e.charCodeAt(i);if((r&64512)===55296&&i+1<a){n=e.charCodeAt(i+1);if((n&64512)===56320){r=65536+(r-55296<<10)+(n-56320);i++}}o+=r<128?1:r<2048?2:r<65536?3:4}t=new Uint8Array(o);for(s=0,i=0;s<o;i++){r=e.charCodeAt(i);if((r&64512)===55296&&i+1<a){n=e.charCodeAt(i+1);if((n&64512)===56320){r=65536+(r-55296<<10)+(n-56320);i++}}if(r<128){t[s++]=r}else if(r<2048){t[s++]=192|r>>>6;t[s++]=128|r&63}else if(r<65536){t[s++]=224|r>>>12;t[s++]=128|r>>>6&63;t[s++]=128|r&63}else{t[s++]=240|r>>>18;t[s++]=128|r>>>12&63;t[s++]=128|r>>>6&63;t[s++]=128|r&63}}return t};const buf2binstring=(e,r)=>{if(r<65534){if(e.subarray&&t){return String.fromCharCode.apply(null,e.length===r?e:e.subarray(0,r))}}let n="";for(let t=0;t<r;t++){n+=String.fromCharCode(e[t])}return n};e.exports.buf2string=(e,t)=>{const n=t||e.length;if(typeof TextDecoder==="function"&&TextDecoder.prototype.decode){return(new TextDecoder).decode(e.subarray(0,t))}let i,s;const a=new Array(n*2);for(s=0,i=0;i<n;){let t=e[i++];if(t<128){a[s++]=t;continue}let o=r[t];if(o>4){a[s++]=65533;i+=o-1;continue}t&=o===2?31:o===3?15:7;while(o>1&&i<n){t=t<<6|e[i++]&63;o--}if(o>1){a[s++]=65533;continue}if(t<65536){a[s++]=t}else{t-=65536;a[s++]=55296|t>>10&1023;a[s++]=56320|t&1023}}return buf2binstring(a,s)};e.exports.utf8border=(e,t)=>{t=t||e.length;if(t>e.length){t=e.length}let n=t-1;while(n>=0&&(e[n]&192)===128){n--}if(n<0){return t}if(n===0){return t}return n+r[e[n]]>t?n:t}},796:e=>{const adler32=(e,t,r,n)=>{let i=e&65535|0,s=e>>>16&65535|0,a=0;while(r!==0){a=r>2e3?2e3:r;r-=a;do{i=i+t[n++]|0;s=s+i|0}while(--a);i%=65521;s%=65521}return i|s<<16|0};e.exports=adler32},234:e=>{e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},613:e=>{const makeTable=()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var n=0;n<8;n++){e=e&1?3988292384^e>>>1:e>>>1}t[r]=e}return t};const t=new Uint32Array(makeTable());const crc32=(e,r,n,i)=>{const s=t;const a=i+n;e^=-1;for(let t=i;t<a;t++){e=e>>>8^s[(e^r[t])&255]}return e^-1};e.exports=crc32},492:(e,t,r)=>{const{_tr_init:n,_tr_stored_block:i,_tr_flush_block:s,_tr_tally:a,_tr_align:o}=r(427);const u=r(796);const l=r(613);const c=r(678);const{Z_NO_FLUSH:d,Z_PARTIAL_FLUSH:f,Z_FULL_FLUSH:h,Z_FINISH:p,Z_BLOCK:_,Z_OK:g,Z_STREAM_END:m,Z_STREAM_ERROR:b,Z_DATA_ERROR:w,Z_BUF_ERROR:v,Z_DEFAULT_COMPRESSION:y,Z_FILTERED:C,Z_HUFFMAN_ONLY:E,Z_RLE:S,Z_FIXED:x,Z_DEFAULT_STRATEGY:A,Z_UNKNOWN:k,Z_DEFLATED:O}=r(234);const M=9;const P=15;const R=8;const L=29;const B=256;const T=B+1+L;const D=30;const N=19;const I=2*T+1;const U=15;const j=3;const z=258;const F=z+j+1;const G=32;const H=42;const W=57;const Z=69;const V=73;const K=91;const q=103;const Y=113;const Q=666;const $=1;const X=2;const J=3;const ee=4;const te=3;const err=(e,t)=>{e.msg=c[t];return t};const rank=e=>e*2-(e>4?9:0);const zero=e=>{let t=e.length;while(--t>=0){e[t]=0}};const slide_hash=e=>{let t,r;let n;let i=e.w_size;t=e.hash_size;n=t;do{r=e.head[--n];e.head[n]=r>=i?r-i:0}while(--t);t=i;n=t;do{r=e.prev[--n];e.prev[n]=r>=i?r-i:0}while(--t)};let HASH_ZLIB=(e,t,r)=>(t<<e.hash_shift^r)&e.hash_mask;let re=HASH_ZLIB;const flush_pending=e=>{const t=e.state;let r=t.pending;if(r>e.avail_out){r=e.avail_out}if(r===0){return}e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+r),e.next_out);e.next_out+=r;t.pending_out+=r;e.total_out+=r;e.avail_out-=r;t.pending-=r;if(t.pending===0){t.pending_out=0}};const flush_block_only=(e,t)=>{s(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t);e.block_start=e.strstart;flush_pending(e.strm)};const put_byte=(e,t)=>{e.pending_buf[e.pending++]=t};const putShortMSB=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255;e.pending_buf[e.pending++]=t&255};const read_buf=(e,t,r,n)=>{let i=e.avail_in;if(i>n){i=n}if(i===0){return 0}e.avail_in-=i;t.set(e.input.subarray(e.next_in,e.next_in+i),r);if(e.state.wrap===1){e.adler=u(e.adler,t,i,r)}else if(e.state.wrap===2){e.adler=l(e.adler,t,i,r)}e.next_in+=i;e.total_in+=i;return i};const longest_match=(e,t)=>{let r=e.max_chain_length;let n=e.strstart;let i;let s;let a=e.prev_length;let o=e.nice_match;const u=e.strstart>e.w_size-F?e.strstart-(e.w_size-F):0;const l=e.window;const c=e.w_mask;const d=e.prev;const f=e.strstart+z;let h=l[n+a-1];let p=l[n+a];if(e.prev_length>=e.good_match){r>>=2}if(o>e.lookahead){o=e.lookahead}do{i=t;if(l[i+a]!==p||l[i+a-1]!==h||l[i]!==l[n]||l[++i]!==l[n+1]){continue}n+=2;i++;do{}while(l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&l[++n]===l[++i]&&n<f);s=z-(f-n);n=f-z;if(s>a){e.match_start=t;a=s;if(s>=o){break}h=l[n+a-1];p=l[n+a]}}while((t=d[t&c])>u&&--r!==0);if(a<=e.lookahead){return a}return e.lookahead};const fill_window=e=>{const t=e.w_size;let r,n,i;do{n=e.window_size-e.lookahead-e.strstart;if(e.strstart>=t+(t-F)){e.window.set(e.window.subarray(t,t+t-n),0);e.match_start-=t;e.strstart-=t;e.block_start-=t;if(e.insert>e.strstart){e.insert=e.strstart}slide_hash(e);n+=t}if(e.strm.avail_in===0){break}r=read_buf(e.strm,e.window,e.strstart+e.lookahead,n);e.lookahead+=r;if(e.lookahead+e.insert>=j){i=e.strstart-e.insert;e.ins_h=e.window[i];e.ins_h=re(e,e.ins_h,e.window[i+1]);while(e.insert){e.ins_h=re(e,e.ins_h,e.window[i+j-1]);e.prev[i&e.w_mask]=e.head[e.ins_h];e.head[e.ins_h]=i;i++;e.insert--;if(e.lookahead+e.insert<j){break}}}}while(e.lookahead<F&&e.strm.avail_in!==0)};const deflate_stored=(e,t)=>{let r=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5;let n,s,a,o=0;let u=e.strm.avail_in;do{n=65535;a=e.bi_valid+42>>3;if(e.strm.avail_out<a){break}a=e.strm.avail_out-a;s=e.strstart-e.block_start;if(n>s+e.strm.avail_in){n=s+e.strm.avail_in}if(n>a){n=a}if(n<r&&(n===0&&t!==p||t===d||n!==s+e.strm.avail_in)){break}o=t===p&&n===s+e.strm.avail_in?1:0;i(e,0,0,o);e.pending_buf[e.pending-4]=n;e.pending_buf[e.pending-3]=n>>8;e.pending_buf[e.pending-2]=~n;e.pending_buf[e.pending-1]=~n>>8;flush_pending(e.strm);if(s){if(s>n){s=n}e.strm.output.set(e.window.subarray(e.block_start,e.block_start+s),e.strm.next_out);e.strm.next_out+=s;e.strm.avail_out-=s;e.strm.total_out+=s;e.block_start+=s;n-=s}if(n){read_buf(e.strm,e.strm.output,e.strm.next_out,n);e.strm.next_out+=n;e.strm.avail_out-=n;e.strm.total_out+=n}}while(o===0);u-=e.strm.avail_in;if(u){if(u>=e.w_size){e.matches=2;e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0);e.strstart=e.w_size;e.insert=e.strstart}else{if(e.window_size-e.strstart<=u){e.strstart-=e.w_size;e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0);if(e.matches<2){e.matches++}if(e.insert>e.strstart){e.insert=e.strstart}}e.window.set(e.strm.input.subarray(e.strm.next_in-u,e.strm.next_in),e.strstart);e.strstart+=u;e.insert+=u>e.w_size-e.insert?e.w_size-e.insert:u}e.block_start=e.strstart}if(e.high_water<e.strstart){e.high_water=e.strstart}if(o){return ee}if(t!==d&&t!==p&&e.strm.avail_in===0&&e.strstart===e.block_start){return X}a=e.window_size-e.strstart;if(e.strm.avail_in>a&&e.block_start>=e.w_size){e.block_start-=e.w_size;e.strstart-=e.w_size;e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0);if(e.matches<2){e.matches++}a+=e.w_size;if(e.insert>e.strstart){e.insert=e.strstart}}if(a>e.strm.avail_in){a=e.strm.avail_in}if(a){read_buf(e.strm,e.window,e.strstart,a);e.strstart+=a;e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a}if(e.high_water<e.strstart){e.high_water=e.strstart}a=e.bi_valid+42>>3;a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a;r=a>e.w_size?e.w_size:a;s=e.strstart-e.block_start;if(s>=r||(s||t===p)&&t!==d&&e.strm.avail_in===0&&s<=a){n=s>a?a:s;o=t===p&&e.strm.avail_in===0&&n===s?1:0;i(e,e.block_start,n,o);e.block_start+=n;flush_pending(e.strm)}return o?J:$};const deflate_fast=(e,t)=>{let r;let n;for(;;){if(e.lookahead<F){fill_window(e);if(e.lookahead<F&&t===d){return $}if(e.lookahead===0){break}}r=0;if(e.lookahead>=j){e.ins_h=re(e,e.ins_h,e.window[e.strstart+j-1]);r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h];e.head[e.ins_h]=e.strstart}if(r!==0&&e.strstart-r<=e.w_size-F){e.match_length=longest_match(e,r)}if(e.match_length>=j){n=a(e,e.strstart-e.match_start,e.match_length-j);e.lookahead-=e.match_length;if(e.match_length<=e.max_lazy_match&&e.lookahead>=j){e.match_length--;do{e.strstart++;e.ins_h=re(e,e.ins_h,e.window[e.strstart+j-1]);r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h];e.head[e.ins_h]=e.strstart}while(--e.match_length!==0);e.strstart++}else{e.strstart+=e.match_length;e.match_length=0;e.ins_h=e.window[e.strstart];e.ins_h=re(e,e.ins_h,e.window[e.strstart+1])}}else{n=a(e,0,e.window[e.strstart]);e.lookahead--;e.strstart++}if(n){flush_block_only(e,false);if(e.strm.avail_out===0){return $}}}e.insert=e.strstart<j-1?e.strstart:j-1;if(t===p){flush_block_only(e,true);if(e.strm.avail_out===0){return J}return ee}if(e.sym_next){flush_block_only(e,false);if(e.strm.avail_out===0){return $}}return X};const deflate_slow=(e,t)=>{let r;let n;let i;for(;;){if(e.lookahead<F){fill_window(e);if(e.lookahead<F&&t===d){return $}if(e.lookahead===0){break}}r=0;if(e.lookahead>=j){e.ins_h=re(e,e.ins_h,e.window[e.strstart+j-1]);r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h];e.head[e.ins_h]=e.strstart}e.prev_length=e.match_length;e.prev_match=e.match_start;e.match_length=j-1;if(r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-F){e.match_length=longest_match(e,r);if(e.match_length<=5&&(e.strategy===C||e.match_length===j&&e.strstart-e.match_start>4096)){e.match_length=j-1}}if(e.prev_length>=j&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-j;n=a(e,e.strstart-1-e.prev_match,e.prev_length-j);e.lookahead-=e.prev_length-1;e.prev_length-=2;do{if(++e.strstart<=i){e.ins_h=re(e,e.ins_h,e.window[e.strstart+j-1]);r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h];e.head[e.ins_h]=e.strstart}}while(--e.prev_length!==0);e.match_available=0;e.match_length=j-1;e.strstart++;if(n){flush_block_only(e,false);if(e.strm.avail_out===0){return $}}}else if(e.match_available){n=a(e,0,e.window[e.strstart-1]);if(n){flush_block_only(e,false)}e.strstart++;e.lookahead--;if(e.strm.avail_out===0){return $}}else{e.match_available=1;e.strstart++;e.lookahead--}}if(e.match_available){n=a(e,0,e.window[e.strstart-1]);e.match_available=0}e.insert=e.strstart<j-1?e.strstart:j-1;if(t===p){flush_block_only(e,true);if(e.strm.avail_out===0){return J}return ee}if(e.sym_next){flush_block_only(e,false);if(e.strm.avail_out===0){return $}}return X};const deflate_rle=(e,t)=>{let r;let n;let i,s;const o=e.window;for(;;){if(e.lookahead<=z){fill_window(e);if(e.lookahead<=z&&t===d){return $}if(e.lookahead===0){break}}e.match_length=0;if(e.lookahead>=j&&e.strstart>0){i=e.strstart-1;n=o[i];if(n===o[++i]&&n===o[++i]&&n===o[++i]){s=e.strstart+z;do{}while(n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&i<s);e.match_length=z-(s-i);if(e.match_length>e.lookahead){e.match_length=e.lookahead}}}if(e.match_length>=j){r=a(e,1,e.match_length-j);e.lookahead-=e.match_length;e.strstart+=e.match_length;e.match_length=0}else{r=a(e,0,e.window[e.strstart]);e.lookahead--;e.strstart++}if(r){flush_block_only(e,false);if(e.strm.avail_out===0){return $}}}e.insert=0;if(t===p){flush_block_only(e,true);if(e.strm.avail_out===0){return J}return ee}if(e.sym_next){flush_block_only(e,false);if(e.strm.avail_out===0){return $}}return X};const deflate_huff=(e,t)=>{let r;for(;;){if(e.lookahead===0){fill_window(e);if(e.lookahead===0){if(t===d){return $}break}}e.match_length=0;r=a(e,0,e.window[e.strstart]);e.lookahead--;e.strstart++;if(r){flush_block_only(e,false);if(e.strm.avail_out===0){return $}}}e.insert=0;if(t===p){flush_block_only(e,true);if(e.strm.avail_out===0){return J}return ee}if(e.sym_next){flush_block_only(e,false);if(e.strm.avail_out===0){return $}}return X};function Config(e,t,r,n,i){this.good_length=e;this.max_lazy=t;this.nice_length=r;this.max_chain=n;this.func=i}const ne=[new Config(0,0,0,0,deflate_stored),new Config(4,4,8,4,deflate_fast),new Config(4,5,16,8,deflate_fast),new Config(4,6,32,32,deflate_fast),new Config(4,4,16,16,deflate_slow),new Config(8,16,32,32,deflate_slow),new Config(8,16,128,128,deflate_slow),new Config(8,32,128,256,deflate_slow),new Config(32,128,258,1024,deflate_slow),new Config(32,258,258,4096,deflate_slow)];const lm_init=e=>{e.window_size=2*e.w_size;zero(e.head);e.max_lazy_match=ne[e.level].max_lazy;e.good_match=ne[e.level].good_length;e.nice_match=ne[e.level].nice_length;e.max_chain_length=ne[e.level].max_chain;e.strstart=0;e.block_start=0;e.lookahead=0;e.insert=0;e.match_length=e.prev_length=j-1;e.match_available=0;e.ins_h=0};function DeflateState(){this.strm=null;this.status=0;this.pending_buf=null;this.pending_buf_size=0;this.pending_out=0;this.pending=0;this.wrap=0;this.gzhead=null;this.gzindex=0;this.method=O;this.last_flush=-1;this.w_size=0;this.w_bits=0;this.w_mask=0;this.window=null;this.window_size=0;this.prev=null;this.head=null;this.ins_h=0;this.hash_size=0;this.hash_bits=0;this.hash_mask=0;this.hash_shift=0;this.block_start=0;this.match_length=0;this.prev_match=0;this.match_available=0;this.strstart=0;this.match_start=0;this.lookahead=0;this.prev_length=0;this.max_chain_length=0;this.max_lazy_match=0;this.level=0;this.strategy=0;this.good_match=0;this.nice_match=0;this.dyn_ltree=new Uint16Array(I*2);this.dyn_dtree=new Uint16Array((2*D+1)*2);this.bl_tree=new Uint16Array((2*N+1)*2);zero(this.dyn_ltree);zero(this.dyn_dtree);zero(this.bl_tree);this.l_desc=null;this.d_desc=null;this.bl_desc=null;this.bl_count=new Uint16Array(U+1);this.heap=new Uint16Array(2*T+1);zero(this.heap);this.heap_len=0;this.heap_max=0;this.depth=new Uint16Array(2*T+1);zero(this.depth);this.sym_buf=0;this.lit_bufsize=0;this.sym_next=0;this.sym_end=0;this.opt_len=0;this.static_len=0;this.matches=0;this.insert=0;this.bi_buf=0;this.bi_valid=0}const deflateStateCheck=e=>{if(!e){return 1}const t=e.state;if(!t||t.strm!==e||t.status!==H&&t.status!==W&&t.status!==Z&&t.status!==V&&t.status!==K&&t.status!==q&&t.status!==Y&&t.status!==Q){return 1}return 0};const deflateResetKeep=e=>{if(deflateStateCheck(e)){return err(e,b)}e.total_in=e.total_out=0;e.data_type=k;const t=e.state;t.pending=0;t.pending_out=0;if(t.wrap<0){t.wrap=-t.wrap}t.status=t.wrap===2?W:t.wrap?H:Y;e.adler=t.wrap===2?0:1;t.last_flush=-2;n(t);return g};const deflateReset=e=>{const t=deflateResetKeep(e);if(t===g){lm_init(e.state)}return t};const deflateSetHeader=(e,t)=>{if(deflateStateCheck(e)||e.state.wrap!==2){return b}e.state.gzhead=t;return g};const deflateInit2=(e,t,r,n,i,s)=>{if(!e){return b}let a=1;if(t===y){t=6}if(n<0){a=0;n=-n}else if(n>15){a=2;n-=16}if(i<1||i>M||r!==O||n<8||n>15||t<0||t>9||s<0||s>x||n===8&&a!==1){return err(e,b)}if(n===8){n=9}const o=new DeflateState;e.state=o;o.strm=e;o.status=H;o.wrap=a;o.gzhead=null;o.w_bits=n;o.w_size=1<<o.w_bits;o.w_mask=o.w_size-1;o.hash_bits=i+7;o.hash_size=1<<o.hash_bits;o.hash_mask=o.hash_size-1;o.hash_shift=~~((o.hash_bits+j-1)/j);o.window=new Uint8Array(o.w_size*2);o.head=new Uint16Array(o.hash_size);o.prev=new Uint16Array(o.w_size);o.lit_bufsize=1<<i+6;o.pending_buf_size=o.lit_bufsize*4;o.pending_buf=new Uint8Array(o.pending_buf_size);o.sym_buf=o.lit_bufsize;o.sym_end=(o.lit_bufsize-1)*3;o.level=t;o.strategy=s;o.method=r;return deflateReset(e)};const deflateInit=(e,t)=>deflateInit2(e,t,O,P,R,A);const deflate=(e,t)=>{if(deflateStateCheck(e)||t>_||t<0){return e?err(e,b):b}const r=e.state;if(!e.output||e.avail_in!==0&&!e.input||r.status===Q&&t!==p){return err(e,e.avail_out===0?v:b)}const n=r.last_flush;r.last_flush=t;if(r.pending!==0){flush_pending(e);if(e.avail_out===0){r.last_flush=-1;return g}}else if(e.avail_in===0&&rank(t)<=rank(n)&&t!==p){return err(e,v)}if(r.status===Q&&e.avail_in!==0){return err(e,v)}if(r.status===H&&r.wrap===0){r.status=Y}if(r.status===H){let t=O+(r.w_bits-8<<4)<<8;let n=-1;if(r.strategy>=E||r.level<2){n=0}else if(r.level<6){n=1}else if(r.level===6){n=2}else{n=3}t|=n<<6;if(r.strstart!==0){t|=G}t+=31-t%31;putShortMSB(r,t);if(r.strstart!==0){putShortMSB(r,e.adler>>>16);putShortMSB(r,e.adler&65535)}e.adler=1;r.status=Y;flush_pending(e);if(r.pending!==0){r.last_flush=-1;return g}}if(r.status===W){e.adler=0;put_byte(r,31);put_byte(r,139);put_byte(r,8);if(!r.gzhead){put_byte(r,0);put_byte(r,0);put_byte(r,0);put_byte(r,0);put_byte(r,0);put_byte(r,r.level===9?2:r.strategy>=E||r.level<2?4:0);put_byte(r,te);r.status=Y;flush_pending(e);if(r.pending!==0){r.last_flush=-1;return g}}else{put_byte(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(!r.gzhead.extra?0:4)+(!r.gzhead.name?0:8)+(!r.gzhead.comment?0:16));put_byte(r,r.gzhead.time&255);put_byte(r,r.gzhead.time>>8&255);put_byte(r,r.gzhead.time>>16&255);put_byte(r,r.gzhead.time>>24&255);put_byte(r,r.level===9?2:r.strategy>=E||r.level<2?4:0);put_byte(r,r.gzhead.os&255);if(r.gzhead.extra&&r.gzhead.extra.length){put_byte(r,r.gzhead.extra.length&255);put_byte(r,r.gzhead.extra.length>>8&255)}if(r.gzhead.hcrc){e.adler=l(e.adler,r.pending_buf,r.pending,0)}r.gzindex=0;r.status=Z}}if(r.status===Z){if(r.gzhead.extra){let t=r.pending;let n=(r.gzhead.extra.length&65535)-r.gzindex;while(r.pending+n>r.pending_buf_size){let i=r.pending_buf_size-r.pending;r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+i),r.pending);r.pending=r.pending_buf_size;if(r.gzhead.hcrc&&r.pending>t){e.adler=l(e.adler,r.pending_buf,r.pending-t,t)}r.gzindex+=i;flush_pending(e);if(r.pending!==0){r.last_flush=-1;return g}t=0;n-=i}let i=new Uint8Array(r.gzhead.extra);r.pending_buf.set(i.subarray(r.gzindex,r.gzindex+n),r.pending);r.pending+=n;if(r.gzhead.hcrc&&r.pending>t){e.adler=l(e.adler,r.pending_buf,r.pending-t,t)}r.gzindex=0}r.status=V}if(r.status===V){if(r.gzhead.name){let t=r.pending;let n;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>t){e.adler=l(e.adler,r.pending_buf,r.pending-t,t)}flush_pending(e);if(r.pending!==0){r.last_flush=-1;return g}t=0}if(r.gzindex<r.gzhead.name.length){n=r.gzhead.name.charCodeAt(r.gzindex++)&255}else{n=0}put_byte(r,n)}while(n!==0);if(r.gzhead.hcrc&&r.pending>t){e.adler=l(e.adler,r.pending_buf,r.pending-t,t)}r.gzindex=0}r.status=K}if(r.status===K){if(r.gzhead.comment){let t=r.pending;let n;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>t){e.adler=l(e.adler,r.pending_buf,r.pending-t,t)}flush_pending(e);if(r.pending!==0){r.last_flush=-1;return g}t=0}if(r.gzindex<r.gzhead.comment.length){n=r.gzhead.comment.charCodeAt(r.gzindex++)&255}else{n=0}put_byte(r,n)}while(n!==0);if(r.gzhead.hcrc&&r.pending>t){e.adler=l(e.adler,r.pending_buf,r.pending-t,t)}}r.status=q}if(r.status===q){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size){flush_pending(e);if(r.pending!==0){r.last_flush=-1;return g}}put_byte(r,e.adler&255);put_byte(r,e.adler>>8&255);e.adler=0}r.status=Y;flush_pending(e);if(r.pending!==0){r.last_flush=-1;return g}}if(e.avail_in!==0||r.lookahead!==0||t!==d&&r.status!==Q){let n=r.level===0?deflate_stored(r,t):r.strategy===E?deflate_huff(r,t):r.strategy===S?deflate_rle(r,t):ne[r.level].func(r,t);if(n===J||n===ee){r.status=Q}if(n===$||n===J){if(e.avail_out===0){r.last_flush=-1}return g}if(n===X){if(t===f){o(r)}else if(t!==_){i(r,0,0,false);if(t===h){zero(r.head);if(r.lookahead===0){r.strstart=0;r.block_start=0;r.insert=0}}}flush_pending(e);if(e.avail_out===0){r.last_flush=-1;return g}}}if(t!==p){return g}if(r.wrap<=0){return m}if(r.wrap===2){put_byte(r,e.adler&255);put_byte(r,e.adler>>8&255);put_byte(r,e.adler>>16&255);put_byte(r,e.adler>>24&255);put_byte(r,e.total_in&255);put_byte(r,e.total_in>>8&255);put_byte(r,e.total_in>>16&255);put_byte(r,e.total_in>>24&255)}else{putShortMSB(r,e.adler>>>16);putShortMSB(r,e.adler&65535)}flush_pending(e);if(r.wrap>0){r.wrap=-r.wrap}return r.pending!==0?g:m};const deflateEnd=e=>{if(deflateStateCheck(e)){return b}const t=e.state.status;e.state=null;return t===Y?err(e,w):g};const deflateSetDictionary=(e,t)=>{let r=t.length;if(deflateStateCheck(e)){return b}const n=e.state;const i=n.wrap;if(i===2||i===1&&n.status!==H||n.lookahead){return b}if(i===1){e.adler=u(e.adler,t,r,0)}n.wrap=0;if(r>=n.w_size){if(i===0){zero(n.head);n.strstart=0;n.block_start=0;n.insert=0}let e=new Uint8Array(n.w_size);e.set(t.subarray(r-n.w_size,r),0);t=e;r=n.w_size}const s=e.avail_in;const a=e.next_in;const o=e.input;e.avail_in=r;e.next_in=0;e.input=t;fill_window(n);while(n.lookahead>=j){let e=n.strstart;let t=n.lookahead-(j-1);do{n.ins_h=re(n,n.ins_h,n.window[e+j-1]);n.prev[e&n.w_mask]=n.head[n.ins_h];n.head[n.ins_h]=e;e++}while(--t);n.strstart=e;n.lookahead=j-1;fill_window(n)}n.strstart+=n.lookahead;n.block_start=n.strstart;n.insert=n.lookahead;n.lookahead=0;n.match_length=n.prev_length=j-1;n.match_available=0;e.next_in=a;e.input=o;e.avail_in=s;n.wrap=i;return g};e.exports.deflateInit=deflateInit;e.exports.deflateInit2=deflateInit2;e.exports.deflateReset=deflateReset;e.exports.deflateResetKeep=deflateResetKeep;e.exports.deflateSetHeader=deflateSetHeader;e.exports.deflate=deflate;e.exports.deflateEnd=deflateEnd;e.exports.deflateSetDictionary=deflateSetDictionary;e.exports.deflateInfo="pako deflate (from Nodeca project)"},657:e=>{function GZheader(){this.text=0;this.time=0;this.xflags=0;this.os=0;this.extra=null;this.extra_len=0;this.name="";this.comment="";this.hcrc=0;this.done=false}e.exports=GZheader},163:e=>{const t=16209;const r=16191;e.exports=function inflate_fast(e,n){let i;let s;let a;let o;let u;let l;let c;let d;let f;let h;let p;let _;let g;let m;let b;let w;let v;let y;let C;let E;let S;let x;let A,k;const O=e.state;i=e.next_in;A=e.input;s=i+(e.avail_in-5);a=e.next_out;k=e.output;o=a-(n-e.avail_out);u=a+(e.avail_out-257);l=O.dmax;c=O.wsize;d=O.whave;f=O.wnext;h=O.window;p=O.hold;_=O.bits;g=O.lencode;m=O.distcode;b=(1<<O.lenbits)-1;w=(1<<O.distbits)-1;e:do{if(_<15){p+=A[i++]<<_;_+=8;p+=A[i++]<<_;_+=8}v=g[p&b];t:for(;;){y=v>>>24;p>>>=y;_-=y;y=v>>>16&255;if(y===0){k[a++]=v&65535}else if(y&16){C=v&65535;y&=15;if(y){if(_<y){p+=A[i++]<<_;_+=8}C+=p&(1<<y)-1;p>>>=y;_-=y}if(_<15){p+=A[i++]<<_;_+=8;p+=A[i++]<<_;_+=8}v=m[p&w];r:for(;;){y=v>>>24;p>>>=y;_-=y;y=v>>>16&255;if(y&16){E=v&65535;y&=15;if(_<y){p+=A[i++]<<_;_+=8;if(_<y){p+=A[i++]<<_;_+=8}}E+=p&(1<<y)-1;if(E>l){e.msg="invalid distance too far back";O.mode=t;break e}p>>>=y;_-=y;y=a-o;if(E>y){y=E-y;if(y>d){if(O.sane){e.msg="invalid distance too far back";O.mode=t;break e}}S=0;x=h;if(f===0){S+=c-y;if(y<C){C-=y;do{k[a++]=h[S++]}while(--y);S=a-E;x=k}}else if(f<y){S+=c+f-y;y-=f;if(y<C){C-=y;do{k[a++]=h[S++]}while(--y);S=0;if(f<C){y=f;C-=y;do{k[a++]=h[S++]}while(--y);S=a-E;x=k}}}else{S+=f-y;if(y<C){C-=y;do{k[a++]=h[S++]}while(--y);S=a-E;x=k}}while(C>2){k[a++]=x[S++];k[a++]=x[S++];k[a++]=x[S++];C-=3}if(C){k[a++]=x[S++];if(C>1){k[a++]=x[S++]}}}else{S=a-E;do{k[a++]=k[S++];k[a++]=k[S++];k[a++]=k[S++];C-=3}while(C>2);if(C){k[a++]=k[S++];if(C>1){k[a++]=k[S++]}}}}else if((y&64)===0){v=m[(v&65535)+(p&(1<<y)-1)];continue r}else{e.msg="invalid distance code";O.mode=t;break e}break}}else if((y&64)===0){v=g[(v&65535)+(p&(1<<y)-1)];continue t}else if(y&32){O.mode=r;break e}else{e.msg="invalid literal/length code";O.mode=t;break e}break}}while(i<s&&a<u);C=_>>3;i-=C;_-=C<<3;p&=(1<<_)-1;e.next_in=i;e.next_out=a;e.avail_in=i<s?5+(s-i):5-(i-s);e.avail_out=a<u?257+(u-a):257-(a-u);O.hold=p;O.bits=_;return}},422:(e,t,r)=>{const n=r(796);const i=r(613);const s=r(163);const a=r(473);const o=0;const u=1;const l=2;const{Z_FINISH:c,Z_BLOCK:d,Z_TREES:f,Z_OK:h,Z_STREAM_END:p,Z_NEED_DICT:_,Z_STREAM_ERROR:g,Z_DATA_ERROR:m,Z_MEM_ERROR:b,Z_BUF_ERROR:w,Z_DEFLATED:v}=r(234);const y=16180;const C=16181;const E=16182;const S=16183;const x=16184;const A=16185;const k=16186;const O=16187;const M=16188;const P=16189;const R=16190;const L=16191;const B=16192;const T=16193;const D=16194;const N=16195;const I=16196;const U=16197;const j=16198;const z=16199;const F=16200;const G=16201;const H=16202;const W=16203;const Z=16204;const V=16205;const K=16206;const q=16207;const Y=16208;const Q=16209;const $=16210;const X=16211;const J=852;const ee=592;const te=15;const re=te;const zswap32=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function InflateState(){this.strm=null;this.mode=0;this.last=false;this.wrap=0;this.havedict=false;this.flags=0;this.dmax=0;this.check=0;this.total=0;this.head=null;this.wbits=0;this.wsize=0;this.whave=0;this.wnext=0;this.window=null;this.hold=0;this.bits=0;this.length=0;this.offset=0;this.extra=0;this.lencode=null;this.distcode=null;this.lenbits=0;this.distbits=0;this.ncode=0;this.nlen=0;this.ndist=0;this.have=0;this.next=null;this.lens=new Uint16Array(320);this.work=new Uint16Array(288);this.lendyn=null;this.distdyn=null;this.sane=0;this.back=0;this.was=0}const inflateStateCheck=e=>{if(!e){return 1}const t=e.state;if(!t||t.strm!==e||t.mode<y||t.mode>X){return 1}return 0};const inflateResetKeep=e=>{if(inflateStateCheck(e)){return g}const t=e.state;e.total_in=e.total_out=t.total=0;e.msg="";if(t.wrap){e.adler=t.wrap&1}t.mode=y;t.last=0;t.havedict=0;t.flags=-1;t.dmax=32768;t.head=null;t.hold=0;t.bits=0;t.lencode=t.lendyn=new Int32Array(J);t.distcode=t.distdyn=new Int32Array(ee);t.sane=1;t.back=-1;return h};const inflateReset=e=>{if(inflateStateCheck(e)){return g}const t=e.state;t.wsize=0;t.whave=0;t.wnext=0;return inflateResetKeep(e)};const inflateReset2=(e,t)=>{let r;if(inflateStateCheck(e)){return g}const n=e.state;if(t<0){r=0;t=-t}else{r=(t>>4)+5;if(t<48){t&=15}}if(t&&(t<8||t>15)){return g}if(n.window!==null&&n.wbits!==t){n.window=null}n.wrap=r;n.wbits=t;return inflateReset(e)};const inflateInit2=(e,t)=>{if(!e){return g}const r=new InflateState;e.state=r;r.strm=e;r.window=null;r.mode=y;const n=inflateReset2(e,t);if(n!==h){e.state=null}return n};const inflateInit=e=>inflateInit2(e,re);let ne=true;let ie,se;const fixedtables=e=>{if(ne){ie=new Int32Array(512);se=new Int32Array(32);let t=0;while(t<144){e.lens[t++]=8}while(t<256){e.lens[t++]=9}while(t<280){e.lens[t++]=7}while(t<288){e.lens[t++]=8}a(u,e.lens,0,288,ie,0,e.work,{bits:9});t=0;while(t<32){e.lens[t++]=5}a(l,e.lens,0,32,se,0,e.work,{bits:5});ne=false}e.lencode=ie;e.lenbits=9;e.distcode=se;e.distbits=5};const updatewindow=(e,t,r,n)=>{let i;const s=e.state;if(s.window===null){s.wsize=1<<s.wbits;s.wnext=0;s.whave=0;s.window=new Uint8Array(s.wsize)}if(n>=s.wsize){s.window.set(t.subarray(r-s.wsize,r),0);s.wnext=0;s.whave=s.wsize}else{i=s.wsize-s.wnext;if(i>n){i=n}s.window.set(t.subarray(r-n,r-n+i),s.wnext);n-=i;if(n){s.window.set(t.subarray(r-n,r),0);s.wnext=n;s.whave=s.wsize}else{s.wnext+=i;if(s.wnext===s.wsize){s.wnext=0}if(s.whave<s.wsize){s.whave+=i}}}return 0};const inflate=(e,t)=>{let r;let J,ee;let te;let re;let ne,ie;let se;let ae;let oe,ue;let le;let ce;let de;let fe=0;let he,pe,_e;let ge,me,be;let we;let ve;const ye=new Uint8Array(4);let Ce;let Ee;const Se=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(inflateStateCheck(e)||!e.output||!e.input&&e.avail_in!==0){return g}r=e.state;if(r.mode===L){r.mode=B}re=e.next_out;ee=e.output;ie=e.avail_out;te=e.next_in;J=e.input;ne=e.avail_in;se=r.hold;ae=r.bits;oe=ne;ue=ie;ve=h;e:for(;;){switch(r.mode){case y:if(r.wrap===0){r.mode=B;break}while(ae<16){if(ne===0){break e}ne--;se+=J[te++]<<ae;ae+=8}if(r.wrap&2&&se===35615){if(r.wbits===0){r.wbits=15}r.check=0;ye[0]=se&255;ye[1]=se>>>8&255;r.check=i(r.check,ye,2,0);se=0;ae=0;r.mode=C;break}if(r.head){r.head.done=false}if(!(r.wrap&1)||(((se&255)<<8)+(se>>8))%31){e.msg="incorrect header check";r.mode=Q;break}if((se&15)!==v){e.msg="unknown compression method";r.mode=Q;break}se>>>=4;ae-=4;we=(se&15)+8;if(r.wbits===0){r.wbits=we}if(we>15||we>r.wbits){e.msg="invalid window size";r.mode=Q;break}r.dmax=1<<r.wbits;r.flags=0;e.adler=r.check=1;r.mode=se&512?P:L;se=0;ae=0;break;case C:while(ae<16){if(ne===0){break e}ne--;se+=J[te++]<<ae;ae+=8}r.flags=se;if((r.flags&255)!==v){e.msg="unknown compression method";r.mode=Q;break}if(r.flags&57344){e.msg="unknown header flags set";r.mode=Q;break}if(r.head){r.head.text=se>>8&1}if(r.flags&512&&r.wrap&4){ye[0]=se&255;ye[1]=se>>>8&255;r.check=i(r.check,ye,2,0)}se=0;ae=0;r.mode=E;case E:while(ae<32){if(ne===0){break e}ne--;se+=J[te++]<<ae;ae+=8}if(r.head){r.head.time=se}if(r.flags&512&&r.wrap&4){ye[0]=se&255;ye[1]=se>>>8&255;ye[2]=se>>>16&255;ye[3]=se>>>24&255;r.check=i(r.check,ye,4,0)}se=0;ae=0;r.mode=S;case S:while(ae<16){if(ne===0){break e}ne--;se+=J[te++]<<ae;ae+=8}if(r.head){r.head.xflags=se&255;r.head.os=se>>8}if(r.flags&512&&r.wrap&4){ye[0]=se&255;ye[1]=se>>>8&255;r.check=i(r.check,ye,2,0)}se=0;ae=0;r.mode=x;case x:if(r.flags&1024){while(ae<16){if(ne===0){break e}ne--;se+=J[te++]<<ae;ae+=8}r.length=se;if(r.head){r.head.extra_len=se}if(r.flags&512&&r.wrap&4){ye[0]=se&255;ye[1]=se>>>8&255;r.check=i(r.check,ye,2,0)}se=0;ae=0}else if(r.head){r.head.extra=null}r.mode=A;case A:if(r.flags&1024){le=r.length;if(le>ne){le=ne}if(le){if(r.head){we=r.head.extra_len-r.length;if(!r.head.extra){r.head.extra=new Uint8Array(r.head.extra_len)}r.head.extra.set(J.subarray(te,te+le),we)}if(r.flags&512&&r.wrap&4){r.check=i(r.check,J,le,te)}ne-=le;te+=le;r.length-=le}if(r.length){break e}}r.length=0;r.mode=k;case k:if(r.flags&2048){if(ne===0){break e}le=0;do{we=J[te+le++];if(r.head&&we&&r.length<65536){r.head.name+=String.fromCharCode(we)}}while(we&&le<ne);if(r.flags&512&&r.wrap&4){r.check=i(r.check,J,le,te)}ne-=le;te+=le;if(we){break e}}else if(r.head){r.head.name=null}r.length=0;r.mode=O;case O:if(r.flags&4096){if(ne===0){break e}le=0;do{we=J[te+le++];if(r.head&&we&&r.length<65536){r.head.comment+=String.fromCharCode(we)}}while(we&&le<ne);if(r.flags&512&&r.wrap&4){r.check=i(r.check,J,le,te)}ne-=le;te+=le;if(we){break e}}else if(r.head){r.head.comment=null}r.mode=M;case M:if(r.flags&512){while(ae<16){if(ne===0){break e}ne--;se+=J[te++]<<ae;ae+=8}if(r.wrap&4&&se!==(r.check&65535)){e.msg="header crc mismatch";r.mode=Q;break}se=0;ae=0}if(r.head){r.head.hcrc=r.flags>>9&1;r.head.done=true}e.adler=r.check=0;r.mode=L;break;case P:while(ae<32){if(ne===0){break e}ne--;se+=J[te++]<<ae;ae+=8}e.adler=r.check=zswap32(se);se=0;ae=0;r.mode=R;case R:if(r.havedict===0){e.next_out=re;e.avail_out=ie;e.next_in=te;e.avail_in=ne;r.hold=se;r.bits=ae;return _}e.adler=r.check=1;r.mode=L;case L:if(t===d||t===f){break e}case B:if(r.last){se>>>=ae&7;ae-=ae&7;r.mode=K;break}while(ae<3){if(ne===0){break e}ne--;se+=J[te++]<<ae;ae+=8}r.last=se&1;se>>>=1;ae-=1;switch(se&3){case 0:r.mode=T;break;case 1:fixedtables(r);r.mode=z;if(t===f){se>>>=2;ae-=2;break e}break;case 2:r.mode=I;break;case 3:e.msg="invalid block type";r.mode=Q}se>>>=2;ae-=2;break;case T:se>>>=ae&7;ae-=ae&7;while(ae<32){if(ne===0){break e}ne--;se+=J[te++]<<ae;ae+=8}if((se&65535)!==(se>>>16^65535)){e.msg="invalid stored block lengths";r.mode=Q;break}r.length=se&65535;se=0;ae=0;r.mode=D;if(t===f){break e}case D:r.mode=N;case N:le=r.length;if(le){if(le>ne){le=ne}if(le>ie){le=ie}if(le===0){break e}ee.set(J.subarray(te,te+le),re);ne-=le;te+=le;ie-=le;re+=le;r.length-=le;break}r.mode=L;break;case I:while(ae<14){if(ne===0){break e}ne--;se+=J[te++]<<ae;ae+=8}r.nlen=(se&31)+257;se>>>=5;ae-=5;r.ndist=(se&31)+1;se>>>=5;ae-=5;r.ncode=(se&15)+4;se>>>=4;ae-=4;if(r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols";r.mode=Q;break}r.have=0;r.mode=U;case U:while(r.have<r.ncode){while(ae<3){if(ne===0){break e}ne--;se+=J[te++]<<ae;ae+=8}r.lens[Se[r.have++]]=se&7;se>>>=3;ae-=3}while(r.have<19){r.lens[Se[r.have++]]=0}r.lencode=r.lendyn;r.lenbits=7;Ce={bits:r.lenbits};ve=a(o,r.lens,0,19,r.lencode,0,r.work,Ce);r.lenbits=Ce.bits;if(ve){e.msg="invalid code lengths set";r.mode=Q;break}r.have=0;r.mode=j;case j:while(r.have<r.nlen+r.ndist){for(;;){fe=r.lencode[se&(1<<r.lenbits)-1];he=fe>>>24;pe=fe>>>16&255;_e=fe&65535;if(he<=ae){break}if(ne===0){break e}ne--;se+=J[te++]<<ae;ae+=8}if(_e<16){se>>>=he;ae-=he;r.lens[r.have++]=_e}else{if(_e===16){Ee=he+2;while(ae<Ee){if(ne===0){break e}ne--;se+=J[te++]<<ae;ae+=8}se>>>=he;ae-=he;if(r.have===0){e.msg="invalid bit length repeat";r.mode=Q;break}we=r.lens[r.have-1];le=3+(se&3);se>>>=2;ae-=2}else if(_e===17){Ee=he+3;while(ae<Ee){if(ne===0){break e}ne--;se+=J[te++]<<ae;ae+=8}se>>>=he;ae-=he;we=0;le=3+(se&7);se>>>=3;ae-=3}else{Ee=he+7;while(ae<Ee){if(ne===0){break e}ne--;se+=J[te++]<<ae;ae+=8}se>>>=he;ae-=he;we=0;le=11+(se&127);se>>>=7;ae-=7}if(r.have+le>r.nlen+r.ndist){e.msg="invalid bit length repeat";r.mode=Q;break}while(le--){r.lens[r.have++]=we}}}if(r.mode===Q){break}if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block";r.mode=Q;break}r.lenbits=9;Ce={bits:r.lenbits};ve=a(u,r.lens,0,r.nlen,r.lencode,0,r.work,Ce);r.lenbits=Ce.bits;if(ve){e.msg="invalid literal/lengths set";r.mode=Q;break}r.distbits=6;r.distcode=r.distdyn;Ce={bits:r.distbits};ve=a(l,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,Ce);r.distbits=Ce.bits;if(ve){e.msg="invalid distances set";r.mode=Q;break}r.mode=z;if(t===f){break e}case z:r.mode=F;case F:if(ne>=6&&ie>=258){e.next_out=re;e.avail_out=ie;e.next_in=te;e.avail_in=ne;r.hold=se;r.bits=ae;s(e,ue);re=e.next_out;ee=e.output;ie=e.avail_out;te=e.next_in;J=e.input;ne=e.avail_in;se=r.hold;ae=r.bits;if(r.mode===L){r.back=-1}break}r.back=0;for(;;){fe=r.lencode[se&(1<<r.lenbits)-1];he=fe>>>24;pe=fe>>>16&255;_e=fe&65535;if(he<=ae){break}if(ne===0){break e}ne--;se+=J[te++]<<ae;ae+=8}if(pe&&(pe&240)===0){ge=he;me=pe;be=_e;for(;;){fe=r.lencode[be+((se&(1<<ge+me)-1)>>ge)];he=fe>>>24;pe=fe>>>16&255;_e=fe&65535;if(ge+he<=ae){break}if(ne===0){break e}ne--;se+=J[te++]<<ae;ae+=8}se>>>=ge;ae-=ge;r.back+=ge}se>>>=he;ae-=he;r.back+=he;r.length=_e;if(pe===0){r.mode=V;break}if(pe&32){r.back=-1;r.mode=L;break}if(pe&64){e.msg="invalid literal/length code";r.mode=Q;break}r.extra=pe&15;r.mode=G;case G:if(r.extra){Ee=r.extra;while(ae<Ee){if(ne===0){break e}ne--;se+=J[te++]<<ae;ae+=8}r.length+=se&(1<<r.extra)-1;se>>>=r.extra;ae-=r.extra;r.back+=r.extra}r.was=r.length;r.mode=H;case H:for(;;){fe=r.distcode[se&(1<<r.distbits)-1];he=fe>>>24;pe=fe>>>16&255;_e=fe&65535;if(he<=ae){break}if(ne===0){break e}ne--;se+=J[te++]<<ae;ae+=8}if((pe&240)===0){ge=he;me=pe;be=_e;for(;;){fe=r.distcode[be+((se&(1<<ge+me)-1)>>ge)];he=fe>>>24;pe=fe>>>16&255;_e=fe&65535;if(ge+he<=ae){break}if(ne===0){break e}ne--;se+=J[te++]<<ae;ae+=8}se>>>=ge;ae-=ge;r.back+=ge}se>>>=he;ae-=he;r.back+=he;if(pe&64){e.msg="invalid distance code";r.mode=Q;break}r.offset=_e;r.extra=pe&15;r.mode=W;case W:if(r.extra){Ee=r.extra;while(ae<Ee){if(ne===0){break e}ne--;se+=J[te++]<<ae;ae+=8}r.offset+=se&(1<<r.extra)-1;se>>>=r.extra;ae-=r.extra;r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back";r.mode=Q;break}r.mode=Z;case Z:if(ie===0){break e}le=ue-ie;if(r.offset>le){le=r.offset-le;if(le>r.whave){if(r.sane){e.msg="invalid distance too far back";r.mode=Q;break}}if(le>r.wnext){le-=r.wnext;ce=r.wsize-le}else{ce=r.wnext-le}if(le>r.length){le=r.length}de=r.window}else{de=ee;ce=re-r.offset;le=r.length}if(le>ie){le=ie}ie-=le;r.length-=le;do{ee[re++]=de[ce++]}while(--le);if(r.length===0){r.mode=F}break;case V:if(ie===0){break e}ee[re++]=r.length;ie--;r.mode=F;break;case K:if(r.wrap){while(ae<32){if(ne===0){break e}ne--;se|=J[te++]<<ae;ae+=8}ue-=ie;e.total_out+=ue;r.total+=ue;if(r.wrap&4&&ue){e.adler=r.check=r.flags?i(r.check,ee,ue,re-ue):n(r.check,ee,ue,re-ue)}ue=ie;if(r.wrap&4&&(r.flags?se:zswap32(se))!==r.check){e.msg="incorrect data check";r.mode=Q;break}se=0;ae=0}r.mode=q;case q:if(r.wrap&&r.flags){while(ae<32){if(ne===0){break e}ne--;se+=J[te++]<<ae;ae+=8}if(r.wrap&4&&se!==(r.total&4294967295)){e.msg="incorrect length check";r.mode=Q;break}se=0;ae=0}r.mode=Y;case Y:ve=p;break e;case Q:ve=m;break e;case $:return b;case X:default:return g}}e.next_out=re;e.avail_out=ie;e.next_in=te;e.avail_in=ne;r.hold=se;r.bits=ae;if(r.wsize||ue!==e.avail_out&&r.mode<Q&&(r.mode<K||t!==c)){if(updatewindow(e,e.output,e.next_out,ue-e.avail_out)){r.mode=$;return b}}oe-=e.avail_in;ue-=e.avail_out;e.total_in+=oe;e.total_out+=ue;r.total+=ue;if(r.wrap&4&&ue){e.adler=r.check=r.flags?i(r.check,ee,ue,e.next_out-ue):n(r.check,ee,ue,e.next_out-ue)}e.data_type=r.bits+(r.last?64:0)+(r.mode===L?128:0)+(r.mode===z||r.mode===D?256:0);if((oe===0&&ue===0||t===c)&&ve===h){ve=w}return ve};const inflateEnd=e=>{if(inflateStateCheck(e)){return g}let t=e.state;if(t.window){t.window=null}e.state=null;return h};const inflateGetHeader=(e,t)=>{if(inflateStateCheck(e)){return g}const r=e.state;if((r.wrap&2)===0){return g}r.head=t;t.done=false;return h};const inflateSetDictionary=(e,t)=>{const r=t.length;let i;let s;let a;if(inflateStateCheck(e)){return g}i=e.state;if(i.wrap!==0&&i.mode!==R){return g}if(i.mode===R){s=1;s=n(s,t,r,0);if(s!==i.check){return m}}a=updatewindow(e,t,r,r);if(a){i.mode=$;return b}i.havedict=1;return h};e.exports.inflateReset=inflateReset;e.exports.inflateReset2=inflateReset2;e.exports.inflateResetKeep=inflateResetKeep;e.exports.inflateInit=inflateInit;e.exports.inflateInit2=inflateInit2;e.exports.inflate=inflate;e.exports.inflateEnd=inflateEnd;e.exports.inflateGetHeader=inflateGetHeader;e.exports.inflateSetDictionary=inflateSetDictionary;e.exports.inflateInfo="pako inflate (from Nodeca project)"},473:e=>{const t=15;const r=852;const n=592;const i=0;const s=1;const a=2;const o=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]);const u=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]);const l=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]);const c=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);const inflate_table=(e,d,f,h,p,_,g,m)=>{const b=m.bits;let w=0;let v=0;let y=0,C=0;let E=0;let S=0;let x=0;let A=0;let k=0;let O=0;let M;let P;let R;let L;let B;let T=null;let D;const N=new Uint16Array(t+1);const I=new Uint16Array(t+1);let U=null;let j,z,F;for(w=0;w<=t;w++){N[w]=0}for(v=0;v<h;v++){N[d[f+v]]++}E=b;for(C=t;C>=1;C--){if(N[C]!==0){break}}if(E>C){E=C}if(C===0){p[_++]=1<<24|64<<16|0;p[_++]=1<<24|64<<16|0;m.bits=1;return 0}for(y=1;y<C;y++){if(N[y]!==0){break}}if(E<y){E=y}A=1;for(w=1;w<=t;w++){A<<=1;A-=N[w];if(A<0){return-1}}if(A>0&&(e===i||C!==1)){return-1}I[1]=0;for(w=1;w<t;w++){I[w+1]=I[w]+N[w]}for(v=0;v<h;v++){if(d[f+v]!==0){g[I[d[f+v]]++]=v}}if(e===i){T=U=g;D=20}else if(e===s){T=o;U=u;D=257}else{T=l;U=c;D=0}O=0;v=0;w=y;B=_;S=E;x=0;R=-1;k=1<<E;L=k-1;if(e===s&&k>r||e===a&&k>n){return 1}for(;;){j=w-x;if(g[v]+1<D){z=0;F=g[v]}else if(g[v]>=D){z=U[g[v]-D];F=T[g[v]-D]}else{z=32+64;F=0}M=1<<w-x;P=1<<S;y=P;do{P-=M;p[B+(O>>x)+P]=j<<24|z<<16|F|0}while(P!==0);M=1<<w-1;while(O&M){M>>=1}if(M!==0){O&=M-1;O+=M}else{O=0}v++;if(--N[w]===0){if(w===C){break}w=d[f+g[v]]}if(w>E&&(O&L)!==R){if(x===0){x=E}B+=y;S=w-x;A=1<<S;while(S+x<C){A-=N[S+x];if(A<=0){break}S++;A<<=1}k+=1<<S;if(e===s&&k>r||e===a&&k>n){return 1}R=O&L;p[R]=E<<24|S<<16|B-_|0}}if(O!==0){p[B+O]=w-x<<24|64<<16|0}m.bits=E;return 0};e.exports=inflate_table},678:e=>{e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},427:e=>{const t=4;const r=0;const n=1;const i=2;function zero(e){let t=e.length;while(--t>=0){e[t]=0}}const s=0;const a=1;const o=2;const u=3;const l=258;const c=29;const d=256;const f=d+1+c;const h=30;const p=19;const _=2*f+1;const g=15;const m=16;const b=7;const w=256;const v=16;const y=17;const C=18;const E=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]);const S=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]);const x=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]);const A=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);const k=512;const O=new Array((f+2)*2);zero(O);const M=new Array(h*2);zero(M);const P=new Array(k);zero(P);const R=new Array(l-u+1);zero(R);const L=new Array(c);zero(L);const B=new Array(h);zero(B);function StaticTreeDesc(e,t,r,n,i){this.static_tree=e;this.extra_bits=t;this.extra_base=r;this.elems=n;this.max_length=i;this.has_stree=e&&e.length}let T;let D;let N;function TreeDesc(e,t){this.dyn_tree=e;this.max_code=0;this.stat_desc=t}const d_code=e=>e<256?P[e]:P[256+(e>>>7)];const put_short=(e,t)=>{e.pending_buf[e.pending++]=t&255;e.pending_buf[e.pending++]=t>>>8&255};const send_bits=(e,t,r)=>{if(e.bi_valid>m-r){e.bi_buf|=t<<e.bi_valid&65535;put_short(e,e.bi_buf);e.bi_buf=t>>m-e.bi_valid;e.bi_valid+=r-m}else{e.bi_buf|=t<<e.bi_valid&65535;e.bi_valid+=r}};const send_code=(e,t,r)=>{send_bits(e,r[t*2],r[t*2+1])};const bi_reverse=(e,t)=>{let r=0;do{r|=e&1;e>>>=1;r<<=1}while(--t>0);return r>>>1};const bi_flush=e=>{if(e.bi_valid===16){put_short(e,e.bi_buf);e.bi_buf=0;e.bi_valid=0}else if(e.bi_valid>=8){e.pending_buf[e.pending++]=e.bi_buf&255;e.bi_buf>>=8;e.bi_valid-=8}};const gen_bitlen=(e,t)=>{const r=t.dyn_tree;const n=t.max_code;const i=t.stat_desc.static_tree;const s=t.stat_desc.has_stree;const a=t.stat_desc.extra_bits;const o=t.stat_desc.extra_base;const u=t.stat_desc.max_length;let l;let c,d;let f;let h;let p;let m=0;for(f=0;f<=g;f++){e.bl_count[f]=0}r[e.heap[e.heap_max]*2+1]=0;for(l=e.heap_max+1;l<_;l++){c=e.heap[l];f=r[r[c*2+1]*2+1]+1;if(f>u){f=u;m++}r[c*2+1]=f;if(c>n){continue}e.bl_count[f]++;h=0;if(c>=o){h=a[c-o]}p=r[c*2];e.opt_len+=p*(f+h);if(s){e.static_len+=p*(i[c*2+1]+h)}}if(m===0){return}do{f=u-1;while(e.bl_count[f]===0){f--}e.bl_count[f]--;e.bl_count[f+1]+=2;e.bl_count[u]--;m-=2}while(m>0);for(f=u;f!==0;f--){c=e.bl_count[f];while(c!==0){d=e.heap[--l];if(d>n){continue}if(r[d*2+1]!==f){e.opt_len+=(f-r[d*2+1])*r[d*2];r[d*2+1]=f}c--}}};const gen_codes=(e,t,r)=>{const n=new Array(g+1);let i=0;let s;let a;for(s=1;s<=g;s++){i=i+r[s-1]<<1;n[s]=i}for(a=0;a<=t;a++){let t=e[a*2+1];if(t===0){continue}e[a*2]=bi_reverse(n[t]++,t)}};const tr_static_init=()=>{let e;let t;let r;let n;let i;const s=new Array(g+1);r=0;for(n=0;n<c-1;n++){L[n]=r;for(e=0;e<1<<E[n];e++){R[r++]=n}}R[r-1]=n;i=0;for(n=0;n<16;n++){B[n]=i;for(e=0;e<1<<S[n];e++){P[i++]=n}}i>>=7;for(;n<h;n++){B[n]=i<<7;for(e=0;e<1<<S[n]-7;e++){P[256+i++]=n}}for(t=0;t<=g;t++){s[t]=0}e=0;while(e<=143){O[e*2+1]=8;e++;s[8]++}while(e<=255){O[e*2+1]=9;e++;s[9]++}while(e<=279){O[e*2+1]=7;e++;s[7]++}while(e<=287){O[e*2+1]=8;e++;s[8]++}gen_codes(O,f+1,s);for(e=0;e<h;e++){M[e*2+1]=5;M[e*2]=bi_reverse(e,5)}T=new StaticTreeDesc(O,E,d+1,f,g);D=new StaticTreeDesc(M,S,0,h,g);N=new StaticTreeDesc(new Array(0),x,0,p,b)};const init_block=e=>{let t;for(t=0;t<f;t++){e.dyn_ltree[t*2]=0}for(t=0;t<h;t++){e.dyn_dtree[t*2]=0}for(t=0;t<p;t++){e.bl_tree[t*2]=0}e.dyn_ltree[w*2]=1;e.opt_len=e.static_len=0;e.sym_next=e.matches=0};const bi_windup=e=>{if(e.bi_valid>8){put_short(e,e.bi_buf)}else if(e.bi_valid>0){e.pending_buf[e.pending++]=e.bi_buf}e.bi_buf=0;e.bi_valid=0};const smaller=(e,t,r,n)=>{const i=t*2;const s=r*2;return e[i]<e[s]||e[i]===e[s]&&n[t]<=n[r]};const pqdownheap=(e,t,r)=>{const n=e.heap[r];let i=r<<1;while(i<=e.heap_len){if(i<e.heap_len&&smaller(t,e.heap[i+1],e.heap[i],e.depth)){i++}if(smaller(t,n,e.heap[i],e.depth)){break}e.heap[r]=e.heap[i];r=i;i<<=1}e.heap[r]=n};const compress_block=(e,t,r)=>{let n;let i;let s=0;let a;let o;if(e.sym_next!==0){do{n=e.pending_buf[e.sym_buf+s++]&255;n+=(e.pending_buf[e.sym_buf+s++]&255)<<8;i=e.pending_buf[e.sym_buf+s++];if(n===0){send_code(e,i,t)}else{a=R[i];send_code(e,a+d+1,t);o=E[a];if(o!==0){i-=L[a];send_bits(e,i,o)}n--;a=d_code(n);send_code(e,a,r);o=S[a];if(o!==0){n-=B[a];send_bits(e,n,o)}}}while(s<e.sym_next)}send_code(e,w,t)};const build_tree=(e,t)=>{const r=t.dyn_tree;const n=t.stat_desc.static_tree;const i=t.stat_desc.has_stree;const s=t.stat_desc.elems;let a,o;let u=-1;let l;e.heap_len=0;e.heap_max=_;for(a=0;a<s;a++){if(r[a*2]!==0){e.heap[++e.heap_len]=u=a;e.depth[a]=0}else{r[a*2+1]=0}}while(e.heap_len<2){l=e.heap[++e.heap_len]=u<2?++u:0;r[l*2]=1;e.depth[l]=0;e.opt_len--;if(i){e.static_len-=n[l*2+1]}}t.max_code=u;for(a=e.heap_len>>1;a>=1;a--){pqdownheap(e,r,a)}l=s;do{a=e.heap[1];e.heap[1]=e.heap[e.heap_len--];pqdownheap(e,r,1);o=e.heap[1];e.heap[--e.heap_max]=a;e.heap[--e.heap_max]=o;r[l*2]=r[a*2]+r[o*2];e.depth[l]=(e.depth[a]>=e.depth[o]?e.depth[a]:e.depth[o])+1;r[a*2+1]=r[o*2+1]=l;e.heap[1]=l++;pqdownheap(e,r,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1];gen_bitlen(e,t);gen_codes(r,u,e.bl_count)};const scan_tree=(e,t,r)=>{let n;let i=-1;let s;let a=t[0*2+1];let o=0;let u=7;let l=4;if(a===0){u=138;l=3}t[(r+1)*2+1]=65535;for(n=0;n<=r;n++){s=a;a=t[(n+1)*2+1];if(++o<u&&s===a){continue}else if(o<l){e.bl_tree[s*2]+=o}else if(s!==0){if(s!==i){e.bl_tree[s*2]++}e.bl_tree[v*2]++}else if(o<=10){e.bl_tree[y*2]++}else{e.bl_tree[C*2]++}o=0;i=s;if(a===0){u=138;l=3}else if(s===a){u=6;l=3}else{u=7;l=4}}};const send_tree=(e,t,r)=>{let n;let i=-1;let s;let a=t[0*2+1];let o=0;let u=7;let l=4;if(a===0){u=138;l=3}for(n=0;n<=r;n++){s=a;a=t[(n+1)*2+1];if(++o<u&&s===a){continue}else if(o<l){do{send_code(e,s,e.bl_tree)}while(--o!==0)}else if(s!==0){if(s!==i){send_code(e,s,e.bl_tree);o--}send_code(e,v,e.bl_tree);send_bits(e,o-3,2)}else if(o<=10){send_code(e,y,e.bl_tree);send_bits(e,o-3,3)}else{send_code(e,C,e.bl_tree);send_bits(e,o-11,7)}o=0;i=s;if(a===0){u=138;l=3}else if(s===a){u=6;l=3}else{u=7;l=4}}};const build_bl_tree=e=>{let t;scan_tree(e,e.dyn_ltree,e.l_desc.max_code);scan_tree(e,e.dyn_dtree,e.d_desc.max_code);build_tree(e,e.bl_desc);for(t=p-1;t>=3;t--){if(e.bl_tree[A[t]*2+1]!==0){break}}e.opt_len+=3*(t+1)+5+5+4;return t};const send_all_trees=(e,t,r,n)=>{let i;send_bits(e,t-257,5);send_bits(e,r-1,5);send_bits(e,n-4,4);for(i=0;i<n;i++){send_bits(e,e.bl_tree[A[i]*2+1],3)}send_tree(e,e.dyn_ltree,t-1);send_tree(e,e.dyn_dtree,r-1)};const detect_data_type=e=>{let t=4093624447;let i;for(i=0;i<=31;i++,t>>>=1){if(t&1&&e.dyn_ltree[i*2]!==0){return r}}if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0){return n}for(i=32;i<d;i++){if(e.dyn_ltree[i*2]!==0){return n}}return r};let I=false;const _tr_init=e=>{if(!I){tr_static_init();I=true}e.l_desc=new TreeDesc(e.dyn_ltree,T);e.d_desc=new TreeDesc(e.dyn_dtree,D);e.bl_desc=new TreeDesc(e.bl_tree,N);e.bi_buf=0;e.bi_valid=0;init_block(e)};const _tr_stored_block=(e,t,r,n)=>{send_bits(e,(s<<1)+(n?1:0),3);bi_windup(e);put_short(e,r);put_short(e,~r);if(r){e.pending_buf.set(e.window.subarray(t,t+r),e.pending)}e.pending+=r};const _tr_align=e=>{send_bits(e,a<<1,3);send_code(e,w,O);bi_flush(e)};const _tr_flush_block=(e,r,n,s)=>{let u,l;let c=0;if(e.level>0){if(e.strm.data_type===i){e.strm.data_type=detect_data_type(e)}build_tree(e,e.l_desc);build_tree(e,e.d_desc);c=build_bl_tree(e);u=e.opt_len+3+7>>>3;l=e.static_len+3+7>>>3;if(l<=u){u=l}}else{u=l=n+5}if(n+4<=u&&r!==-1){_tr_stored_block(e,r,n,s)}else if(e.strategy===t||l===u){send_bits(e,(a<<1)+(s?1:0),3);compress_block(e,O,M)}else{send_bits(e,(o<<1)+(s?1:0),3);send_all_trees(e,e.l_desc.max_code+1,e.d_desc.max_code+1,c+1);compress_block(e,e.dyn_ltree,e.dyn_dtree)}init_block(e);if(s){bi_windup(e)}};const _tr_tally=(e,t,r)=>{e.pending_buf[e.sym_buf+e.sym_next++]=t;e.pending_buf[e.sym_buf+e.sym_next++]=t>>8;e.pending_buf[e.sym_buf+e.sym_next++]=r;if(t===0){e.dyn_ltree[r*2]++}else{e.matches++;t--;e.dyn_ltree[(R[r]+d+1)*2]++;e.dyn_dtree[d_code(t)*2]++}return e.sym_next===e.sym_end};e.exports._tr_init=_tr_init;e.exports._tr_stored_block=_tr_stored_block;e.exports._tr_flush_block=_tr_flush_block;e.exports._tr_tally=_tr_tally;e.exports._tr_align=_tr_align},944:e=>{function ZStream(){this.input=null;this.next_in=0;this.avail_in=0;this.total_in=0;this.output=null;this.next_out=0;this.avail_out=0;this.total_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}e.exports=ZStream}};var r={};function __nccwpck_require2_(e){var n=r[e];if(n!==undefined){return n.exports}var i=r[e]={exports:{}};var s=true;try{t[e].call(i.exports,i,i.exports,__nccwpck_require2_);s=false}finally{if(s)delete r[e]}return i.exports}if(typeof __nccwpck_require2_!=="undefined")__nccwpck_require2_.ab=__dirname+"/";var n=__nccwpck_require2_(926);e.exports=n})()},1184:(e,t,r)=>{(()=>{var t={650:e=>{var t=Object.prototype.toString;var r=typeof Buffer.alloc==="function"&&typeof Buffer.allocUnsafe==="function"&&typeof Buffer.from==="function";function isArrayBuffer(e){return t.call(e).slice(8,-1)==="ArrayBuffer"}function fromArrayBuffer(e,t,n){t>>>=0;var i=e.byteLength-t;if(i<0){throw new RangeError("'offset' is out of bounds")}if(n===undefined){n=i}else{n>>>=0;if(n>i){throw new RangeError("'length' is out of bounds")}}return r?Buffer.from(e.slice(t,t+n)):new Buffer(new Uint8Array(e.slice(t,t+n)))}function fromString(e,t){if(typeof t!=="string"||t===""){t="utf8"}if(!Buffer.isEncoding(t)){throw new TypeError('"encoding" must be a valid string encoding')}return r?Buffer.from(e,t):new Buffer(e,t)}function bufferFrom(e,t,n){if(typeof e==="number"){throw new TypeError('"value" argument must not be a number')}if(isArrayBuffer(e)){return fromArrayBuffer(e,t,n)}if(typeof e==="string"){return fromString(e,t)}return r?Buffer.from(e):new Buffer(e)}e.exports=bufferFrom},274:(e,t,r)=>{var n=r(339);var i=Object.prototype.hasOwnProperty;var s=typeof Map!=="undefined";function ArraySet(){this._array=[];this._set=s?new Map:Object.create(null)}ArraySet.fromArray=function ArraySet_fromArray(e,t){var r=new ArraySet;for(var n=0,i=e.length;n<i;n++){r.add(e[n],t)}return r};ArraySet.prototype.size=function ArraySet_size(){return s?this._set.size:Object.getOwnPropertyNames(this._set).length};ArraySet.prototype.add=function ArraySet_add(e,t){var r=s?e:n.toSetString(e);var a=s?this.has(e):i.call(this._set,r);var o=this._array.length;if(!a||t){this._array.push(e)}if(!a){if(s){this._set.set(e,o)}else{this._set[r]=o}}};ArraySet.prototype.has=function ArraySet_has(e){if(s){return this._set.has(e)}else{var t=n.toSetString(e);return i.call(this._set,t)}};ArraySet.prototype.indexOf=function ArraySet_indexOf(e){if(s){var t=this._set.get(e);if(t>=0){return t}}else{var r=n.toSetString(e);if(i.call(this._set,r)){return this._set[r]}}throw new Error('"'+e+'" is not in the set.')};ArraySet.prototype.at=function ArraySet_at(e){if(e>=0&&e<this._array.length){return this._array[e]}throw new Error("No element indexed by "+e)};ArraySet.prototype.toArray=function ArraySet_toArray(){return this._array.slice()};t.I=ArraySet},449:(e,t,r)=>{var n=r(190);var i=5;var s=1<<i;var a=s-1;var o=s;function toVLQSigned(e){return e<0?(-e<<1)+1:(e<<1)+0}function fromVLQSigned(e){var t=(e&1)===1;var r=e>>1;return t?-r:r}t.encode=function base64VLQ_encode(e){var t="";var r;var s=toVLQSigned(e);do{r=s&a;s>>>=i;if(s>0){r|=o}t+=n.encode(r)}while(s>0);return t};t.decode=function base64VLQ_decode(e,t,r){var s=e.length;var u=0;var l=0;var c,d;do{if(t>=s){throw new Error("Expected more digits in base 64 VLQ value.")}d=n.decode(e.charCodeAt(t++));if(d===-1){throw new Error("Invalid base64 digit: "+e.charAt(t-1))}c=!!(d&o);d&=a;u=u+(d<<l);l+=i}while(c);r.value=fromVLQSigned(u);r.rest=t}},190:(e,t)=>{var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");t.encode=function(e){if(0<=e&&e<r.length){return r[e]}throw new TypeError("Must be between 0 and 63: "+e)};t.decode=function(e){var t=65;var r=90;var n=97;var i=122;var s=48;var a=57;var o=43;var u=47;var l=26;var c=52;if(t<=e&&e<=r){return e-t}if(n<=e&&e<=i){return e-n+l}if(s<=e&&e<=a){return e-s+c}if(e==o){return 62}if(e==u){return 63}return-1}},345:(e,t)=>{t.GREATEST_LOWER_BOUND=1;t.LEAST_UPPER_BOUND=2;function recursiveSearch(e,r,n,i,s,a){var o=Math.floor((r-e)/2)+e;var u=s(n,i[o],true);if(u===0){return o}else if(u>0){if(r-o>1){return recursiveSearch(o,r,n,i,s,a)}if(a==t.LEAST_UPPER_BOUND){return r<i.length?r:-1}else{return o}}else{if(o-e>1){return recursiveSearch(e,o,n,i,s,a)}if(a==t.LEAST_UPPER_BOUND){return o}else{return e<0?-1:e}}}t.search=function search(e,r,n,i){if(r.length===0){return-1}var s=recursiveSearch(-1,r.length,e,r,n,i||t.GREATEST_LOWER_BOUND);if(s<0){return-1}while(s-1>=0){if(n(r[s],r[s-1],true)!==0){break}--s}return s}},680:(e,t,r)=>{var n=r(339);function generatedPositionAfter(e,t){var r=e.generatedLine;var i=t.generatedLine;var s=e.generatedColumn;var a=t.generatedColumn;return i>r||i==r&&a>=s||n.compareByGeneratedPositionsInflated(e,t)<=0}function MappingList(){this._array=[];this._sorted=true;this._last={generatedLine:-1,generatedColumn:0}}MappingList.prototype.unsortedForEach=function MappingList_forEach(e,t){this._array.forEach(e,t)};MappingList.prototype.add=function MappingList_add(e){if(generatedPositionAfter(this._last,e)){this._last=e;this._array.push(e)}else{this._sorted=false;this._array.push(e)}};MappingList.prototype.toArray=function MappingList_toArray(){if(!this._sorted){this._array.sort(n.compareByGeneratedPositionsInflated);this._sorted=true}return this._array};t.H=MappingList},758:(e,t)=>{function swap(e,t,r){var n=e[t];e[t]=e[r];e[r]=n}function randomIntInRange(e,t){return Math.round(e+Math.random()*(t-e))}function doQuickSort(e,t,r,n){if(r<n){var i=randomIntInRange(r,n);var s=r-1;swap(e,i,n);var a=e[n];for(var o=r;o<n;o++){if(t(e[o],a)<=0){s+=1;swap(e,s,o)}}swap(e,s+1,o);var u=s+1;doQuickSort(e,t,r,u-1);doQuickSort(e,t,u+1,n)}}t.U=function(e,t){doQuickSort(e,t,0,e.length-1)}},952:(e,t,r)=>{var n;var i=r(339);var s=r(345);var a=r(274).I;var o=r(449);var u=r(758).U;function SourceMapConsumer(e,t){var r=e;if(typeof e==="string"){r=i.parseSourceMapInput(e)}return r.sections!=null?new IndexedSourceMapConsumer(r,t):new BasicSourceMapConsumer(r,t)}SourceMapConsumer.fromSourceMap=function(e,t){return BasicSourceMapConsumer.fromSourceMap(e,t)};SourceMapConsumer.prototype._version=3;SourceMapConsumer.prototype.__generatedMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_generatedMappings",{configurable:true,enumerable:true,get:function(){if(!this.__generatedMappings){this._parseMappings(this._mappings,this.sourceRoot)}return this.__generatedMappings}});SourceMapConsumer.prototype.__originalMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_originalMappings",{configurable:true,enumerable:true,get:function(){if(!this.__originalMappings){this._parseMappings(this._mappings,this.sourceRoot)}return this.__originalMappings}});SourceMapConsumer.prototype._charIsMappingSeparator=function SourceMapConsumer_charIsMappingSeparator(e,t){var r=e.charAt(t);return r===";"||r===","};SourceMapConsumer.prototype._parseMappings=function SourceMapConsumer_parseMappings(e,t){throw new Error("Subclasses must implement _parseMappings")};SourceMapConsumer.GENERATED_ORDER=1;SourceMapConsumer.ORIGINAL_ORDER=2;SourceMapConsumer.GREATEST_LOWER_BOUND=1;SourceMapConsumer.LEAST_UPPER_BOUND=2;SourceMapConsumer.prototype.eachMapping=function SourceMapConsumer_eachMapping(e,t,r){var n=t||null;var s=r||SourceMapConsumer.GENERATED_ORDER;var a;switch(s){case SourceMapConsumer.GENERATED_ORDER:a=this._generatedMappings;break;case SourceMapConsumer.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var o=this.sourceRoot;a.map((function(e){var t=e.source===null?null:this._sources.at(e.source);t=i.computeSourceURL(o,t,this._sourceMapURL);return{source:t,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name===null?null:this._names.at(e.name)}}),this).forEach(e,n)};SourceMapConsumer.prototype.allGeneratedPositionsFor=function SourceMapConsumer_allGeneratedPositionsFor(e){var t=i.getArg(e,"line");var r={source:i.getArg(e,"source"),originalLine:t,originalColumn:i.getArg(e,"column",0)};r.source=this._findSourceIndex(r.source);if(r.source<0){return[]}var n=[];var a=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",i.compareByOriginalPositions,s.LEAST_UPPER_BOUND);if(a>=0){var o=this._originalMappings[a];if(e.column===undefined){var u=o.originalLine;while(o&&o.originalLine===u){n.push({line:i.getArg(o,"generatedLine",null),column:i.getArg(o,"generatedColumn",null),lastColumn:i.getArg(o,"lastGeneratedColumn",null)});o=this._originalMappings[++a]}}else{var l=o.originalColumn;while(o&&o.originalLine===t&&o.originalColumn==l){n.push({line:i.getArg(o,"generatedLine",null),column:i.getArg(o,"generatedColumn",null),lastColumn:i.getArg(o,"lastGeneratedColumn",null)});o=this._originalMappings[++a]}}}return n};t.SourceMapConsumer=SourceMapConsumer;function BasicSourceMapConsumer(e,t){var r=e;if(typeof e==="string"){r=i.parseSourceMapInput(e)}var n=i.getArg(r,"version");var s=i.getArg(r,"sources");var o=i.getArg(r,"names",[]);var u=i.getArg(r,"sourceRoot",null);var l=i.getArg(r,"sourcesContent",null);var c=i.getArg(r,"mappings");var d=i.getArg(r,"file",null);if(n!=this._version){throw new Error("Unsupported version: "+n)}if(u){u=i.normalize(u)}s=s.map(String).map(i.normalize).map((function(e){return u&&i.isAbsolute(u)&&i.isAbsolute(e)?i.relative(u,e):e}));this._names=a.fromArray(o.map(String),true);this._sources=a.fromArray(s,true);this._absoluteSources=this._sources.toArray().map((function(e){return i.computeSourceURL(u,e,t)}));this.sourceRoot=u;this.sourcesContent=l;this._mappings=c;this._sourceMapURL=t;this.file=d}BasicSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype);BasicSourceMapConsumer.prototype.consumer=SourceMapConsumer;BasicSourceMapConsumer.prototype._findSourceIndex=function(e){var t=e;if(this.sourceRoot!=null){t=i.relative(this.sourceRoot,t)}if(this._sources.has(t)){return this._sources.indexOf(t)}var r;for(r=0;r<this._absoluteSources.length;++r){if(this._absoluteSources[r]==e){return r}}return-1};BasicSourceMapConsumer.fromSourceMap=function SourceMapConsumer_fromSourceMap(e,t){var r=Object.create(BasicSourceMapConsumer.prototype);var n=r._names=a.fromArray(e._names.toArray(),true);var s=r._sources=a.fromArray(e._sources.toArray(),true);r.sourceRoot=e._sourceRoot;r.sourcesContent=e._generateSourcesContent(r._sources.toArray(),r.sourceRoot);r.file=e._file;r._sourceMapURL=t;r._absoluteSources=r._sources.toArray().map((function(e){return i.computeSourceURL(r.sourceRoot,e,t)}));var o=e._mappings.toArray().slice();var l=r.__generatedMappings=[];var c=r.__originalMappings=[];for(var d=0,f=o.length;d<f;d++){var h=o[d];var p=new Mapping;p.generatedLine=h.generatedLine;p.generatedColumn=h.generatedColumn;if(h.source){p.source=s.indexOf(h.source);p.originalLine=h.originalLine;p.originalColumn=h.originalColumn;if(h.name){p.name=n.indexOf(h.name)}c.push(p)}l.push(p)}u(r.__originalMappings,i.compareByOriginalPositions);return r};BasicSourceMapConsumer.prototype._version=3;Object.defineProperty(BasicSourceMapConsumer.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function Mapping(){this.generatedLine=0;this.generatedColumn=0;this.source=null;this.originalLine=null;this.originalColumn=null;this.name=null}BasicSourceMapConsumer.prototype._parseMappings=function SourceMapConsumer_parseMappings(e,t){var r=1;var n=0;var s=0;var a=0;var l=0;var c=0;var d=e.length;var f=0;var h={};var p={};var _=[];var g=[];var m,b,w,v,y;while(f<d){if(e.charAt(f)===";"){r++;f++;n=0}else if(e.charAt(f)===","){f++}else{m=new Mapping;m.generatedLine=r;for(v=f;v<d;v++){if(this._charIsMappingSeparator(e,v)){break}}b=e.slice(f,v);w=h[b];if(w){f+=b.length}else{w=[];while(f<v){o.decode(e,f,p);y=p.value;f=p.rest;w.push(y)}if(w.length===2){throw new Error("Found a source, but no line and column")}if(w.length===3){throw new Error("Found a source and line, but no column")}h[b]=w}m.generatedColumn=n+w[0];n=m.generatedColumn;if(w.length>1){m.source=l+w[1];l+=w[1];m.originalLine=s+w[2];s=m.originalLine;m.originalLine+=1;m.originalColumn=a+w[3];a=m.originalColumn;if(w.length>4){m.name=c+w[4];c+=w[4]}}g.push(m);if(typeof m.originalLine==="number"){_.push(m)}}}u(g,i.compareByGeneratedPositionsDeflated);this.__generatedMappings=g;u(_,i.compareByOriginalPositions);this.__originalMappings=_};BasicSourceMapConsumer.prototype._findMapping=function SourceMapConsumer_findMapping(e,t,r,n,i,a){if(e[r]<=0){throw new TypeError("Line must be greater than or equal to 1, got "+e[r])}if(e[n]<0){throw new TypeError("Column must be greater than or equal to 0, got "+e[n])}return s.search(e,t,i,a)};BasicSourceMapConsumer.prototype.computeColumnSpans=function SourceMapConsumer_computeColumnSpans(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(t.generatedLine===r.generatedLine){t.lastGeneratedColumn=r.generatedColumn-1;continue}}t.lastGeneratedColumn=Infinity}};BasicSourceMapConsumer.prototype.originalPositionFor=function SourceMapConsumer_originalPositionFor(e){var t={generatedLine:i.getArg(e,"line"),generatedColumn:i.getArg(e,"column")};var r=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",i.compareByGeneratedPositionsDeflated,i.getArg(e,"bias",SourceMapConsumer.GREATEST_LOWER_BOUND));if(r>=0){var n=this._generatedMappings[r];if(n.generatedLine===t.generatedLine){var s=i.getArg(n,"source",null);if(s!==null){s=this._sources.at(s);s=i.computeSourceURL(this.sourceRoot,s,this._sourceMapURL)}var a=i.getArg(n,"name",null);if(a!==null){a=this._names.at(a)}return{source:s,line:i.getArg(n,"originalLine",null),column:i.getArg(n,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}};BasicSourceMapConsumer.prototype.hasContentsOfAllSources=function BasicSourceMapConsumer_hasContentsOfAllSources(){if(!this.sourcesContent){return false}return this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return e==null}))};BasicSourceMapConsumer.prototype.sourceContentFor=function SourceMapConsumer_sourceContentFor(e,t){if(!this.sourcesContent){return null}var r=this._findSourceIndex(e);if(r>=0){return this.sourcesContent[r]}var n=e;if(this.sourceRoot!=null){n=i.relative(this.sourceRoot,n)}var s;if(this.sourceRoot!=null&&(s=i.urlParse(this.sourceRoot))){var a=n.replace(/^file:\/\//,"");if(s.scheme=="file"&&this._sources.has(a)){return this.sourcesContent[this._sources.indexOf(a)]}if((!s.path||s.path=="/")&&this._sources.has("/"+n)){return this.sourcesContent[this._sources.indexOf("/"+n)]}}if(t){return null}else{throw new Error('"'+n+'" is not in the SourceMap.')}};BasicSourceMapConsumer.prototype.generatedPositionFor=function SourceMapConsumer_generatedPositionFor(e){var t=i.getArg(e,"source");t=this._findSourceIndex(t);if(t<0){return{line:null,column:null,lastColumn:null}}var r={source:t,originalLine:i.getArg(e,"line"),originalColumn:i.getArg(e,"column")};var n=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",i.compareByOriginalPositions,i.getArg(e,"bias",SourceMapConsumer.GREATEST_LOWER_BOUND));if(n>=0){var s=this._originalMappings[n];if(s.source===r.source){return{line:i.getArg(s,"generatedLine",null),column:i.getArg(s,"generatedColumn",null),lastColumn:i.getArg(s,"lastGeneratedColumn",null)}}}return{line:null,column:null,lastColumn:null}};n=BasicSourceMapConsumer;function IndexedSourceMapConsumer(e,t){var r=e;if(typeof e==="string"){r=i.parseSourceMapInput(e)}var n=i.getArg(r,"version");var s=i.getArg(r,"sections");if(n!=this._version){throw new Error("Unsupported version: "+n)}this._sources=new a;this._names=new a;var o={line:-1,column:0};this._sections=s.map((function(e){if(e.url){throw new Error("Support for url field in sections not implemented.")}var r=i.getArg(e,"offset");var n=i.getArg(r,"line");var s=i.getArg(r,"column");if(n<o.line||n===o.line&&s<o.column){throw new Error("Section offsets must be ordered and non-overlapping.")}o=r;return{generatedOffset:{generatedLine:n+1,generatedColumn:s+1},consumer:new SourceMapConsumer(i.getArg(e,"map"),t)}}))}IndexedSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype);IndexedSourceMapConsumer.prototype.constructor=SourceMapConsumer;IndexedSourceMapConsumer.prototype._version=3;Object.defineProperty(IndexedSourceMapConsumer.prototype,"sources",{get:function(){var e=[];for(var t=0;t<this._sections.length;t++){for(var r=0;r<this._sections[t].consumer.sources.length;r++){e.push(this._sections[t].consumer.sources[r])}}return e}});IndexedSourceMapConsumer.prototype.originalPositionFor=function IndexedSourceMapConsumer_originalPositionFor(e){var t={generatedLine:i.getArg(e,"line"),generatedColumn:i.getArg(e,"column")};var r=s.search(t,this._sections,(function(e,t){var r=e.generatedLine-t.generatedOffset.generatedLine;if(r){return r}return e.generatedColumn-t.generatedOffset.generatedColumn}));var n=this._sections[r];if(!n){return{source:null,line:null,column:null,name:null}}return n.consumer.originalPositionFor({line:t.generatedLine-(n.generatedOffset.generatedLine-1),column:t.generatedColumn-(n.generatedOffset.generatedLine===t.generatedLine?n.generatedOffset.generatedColumn-1:0),bias:e.bias})};IndexedSourceMapConsumer.prototype.hasContentsOfAllSources=function IndexedSourceMapConsumer_hasContentsOfAllSources(){return this._sections.every((function(e){return e.consumer.hasContentsOfAllSources()}))};IndexedSourceMapConsumer.prototype.sourceContentFor=function IndexedSourceMapConsumer_sourceContentFor(e,t){for(var r=0;r<this._sections.length;r++){var n=this._sections[r];var i=n.consumer.sourceContentFor(e,true);if(i){return i}}if(t){return null}else{throw new Error('"'+e+'" is not in the SourceMap.')}};IndexedSourceMapConsumer.prototype.generatedPositionFor=function IndexedSourceMapConsumer_generatedPositionFor(e){for(var t=0;t<this._sections.length;t++){var r=this._sections[t];if(r.consumer._findSourceIndex(i.getArg(e,"source"))===-1){continue}var n=r.consumer.generatedPositionFor(e);if(n){var s={line:n.line+(r.generatedOffset.generatedLine-1),column:n.column+(r.generatedOffset.generatedLine===n.line?r.generatedOffset.generatedColumn-1:0)};return s}}return{line:null,column:null}};IndexedSourceMapConsumer.prototype._parseMappings=function IndexedSourceMapConsumer_parseMappings(e,t){this.__generatedMappings=[];this.__originalMappings=[];for(var r=0;r<this._sections.length;r++){var n=this._sections[r];var s=n.consumer._generatedMappings;for(var a=0;a<s.length;a++){var o=s[a];var l=n.consumer._sources.at(o.source);l=i.computeSourceURL(n.consumer.sourceRoot,l,this._sourceMapURL);this._sources.add(l);l=this._sources.indexOf(l);var c=null;if(o.name){c=n.consumer._names.at(o.name);this._names.add(c);c=this._names.indexOf(c)}var d={source:l,generatedLine:o.generatedLine+(n.generatedOffset.generatedLine-1),generatedColumn:o.generatedColumn+(n.generatedOffset.generatedLine===o.generatedLine?n.generatedOffset.generatedColumn-1:0),originalLine:o.originalLine,originalColumn:o.originalColumn,name:c};this.__generatedMappings.push(d);if(typeof d.originalLine==="number"){this.__originalMappings.push(d)}}}u(this.__generatedMappings,i.compareByGeneratedPositionsDeflated);u(this.__originalMappings,i.compareByOriginalPositions)};n=IndexedSourceMapConsumer},591:(e,t,r)=>{var n=r(449);var i=r(339);var s=r(274).I;var a=r(680).H;function SourceMapGenerator(e){if(!e){e={}}this._file=i.getArg(e,"file",null);this._sourceRoot=i.getArg(e,"sourceRoot",null);this._skipValidation=i.getArg(e,"skipValidation",false);this._sources=new s;this._names=new s;this._mappings=new a;this._sourcesContents=null}SourceMapGenerator.prototype._version=3;SourceMapGenerator.fromSourceMap=function SourceMapGenerator_fromSourceMap(e){var t=e.sourceRoot;var r=new SourceMapGenerator({file:e.file,sourceRoot:t});e.eachMapping((function(e){var n={generated:{line:e.generatedLine,column:e.generatedColumn}};if(e.source!=null){n.source=e.source;if(t!=null){n.source=i.relative(t,n.source)}n.original={line:e.originalLine,column:e.originalColumn};if(e.name!=null){n.name=e.name}}r.addMapping(n)}));e.sources.forEach((function(n){var s=n;if(t!==null){s=i.relative(t,n)}if(!r._sources.has(s)){r._sources.add(s)}var a=e.sourceContentFor(n);if(a!=null){r.setSourceContent(n,a)}}));return r};SourceMapGenerator.prototype.addMapping=function SourceMapGenerator_addMapping(e){var t=i.getArg(e,"generated");var r=i.getArg(e,"original",null);var n=i.getArg(e,"source",null);var s=i.getArg(e,"name",null);if(!this._skipValidation){this._validateMapping(t,r,n,s)}if(n!=null){n=String(n);if(!this._sources.has(n)){this._sources.add(n)}}if(s!=null){s=String(s);if(!this._names.has(s)){this._names.add(s)}}this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:r!=null&&r.line,originalColumn:r!=null&&r.column,source:n,name:s})};SourceMapGenerator.prototype.setSourceContent=function SourceMapGenerator_setSourceContent(e,t){var r=e;if(this._sourceRoot!=null){r=i.relative(this._sourceRoot,r)}if(t!=null){if(!this._sourcesContents){this._sourcesContents=Object.create(null)}this._sourcesContents[i.toSetString(r)]=t}else if(this._sourcesContents){delete this._sourcesContents[i.toSetString(r)];if(Object.keys(this._sourcesContents).length===0){this._sourcesContents=null}}};SourceMapGenerator.prototype.applySourceMap=function SourceMapGenerator_applySourceMap(e,t,r){var n=t;if(t==null){if(e.file==null){throw new Error("SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, "+'or the source map\'s "file" property. Both were omitted.')}n=e.file}var a=this._sourceRoot;if(a!=null){n=i.relative(a,n)}var o=new s;var u=new s;this._mappings.unsortedForEach((function(t){if(t.source===n&&t.originalLine!=null){var s=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});if(s.source!=null){t.source=s.source;if(r!=null){t.source=i.join(r,t.source)}if(a!=null){t.source=i.relative(a,t.source)}t.originalLine=s.line;t.originalColumn=s.column;if(s.name!=null){t.name=s.name}}}var l=t.source;if(l!=null&&!o.has(l)){o.add(l)}var c=t.name;if(c!=null&&!u.has(c)){u.add(c)}}),this);this._sources=o;this._names=u;e.sources.forEach((function(t){var n=e.sourceContentFor(t);if(n!=null){if(r!=null){t=i.join(r,t)}if(a!=null){t=i.relative(a,t)}this.setSourceContent(t,n)}}),this)};SourceMapGenerator.prototype._validateMapping=function SourceMapGenerator_validateMapping(e,t,r,n){if(t&&typeof t.line!=="number"&&typeof t.column!=="number"){throw new Error("original.line and original.column are not numbers -- you probably meant to omit "+"the original mapping entirely and only map the generated position. If so, pass "+"null for the original mapping instead of an object with empty or null values.")}if(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!t&&!r&&!n){return}else if(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r){return}else{throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n}))}};SourceMapGenerator.prototype._serializeMappings=function SourceMapGenerator_serializeMappings(){var e=0;var t=1;var r=0;var s=0;var a=0;var o=0;var u="";var l;var c;var d;var f;var h=this._mappings.toArray();for(var p=0,_=h.length;p<_;p++){c=h[p];l="";if(c.generatedLine!==t){e=0;while(c.generatedLine!==t){l+=";";t++}}else{if(p>0){if(!i.compareByGeneratedPositionsInflated(c,h[p-1])){continue}l+=","}}l+=n.encode(c.generatedColumn-e);e=c.generatedColumn;if(c.source!=null){f=this._sources.indexOf(c.source);l+=n.encode(f-o);o=f;l+=n.encode(c.originalLine-1-s);s=c.originalLine-1;l+=n.encode(c.originalColumn-r);r=c.originalColumn;if(c.name!=null){d=this._names.indexOf(c.name);l+=n.encode(d-a);a=d}}u+=l}return u};SourceMapGenerator.prototype._generateSourcesContent=function SourceMapGenerator_generateSourcesContent(e,t){return e.map((function(e){if(!this._sourcesContents){return null}if(t!=null){e=i.relative(t,e)}var r=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null}),this)};SourceMapGenerator.prototype.toJSON=function SourceMapGenerator_toJSON(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null){e.file=this._file}if(this._sourceRoot!=null){e.sourceRoot=this._sourceRoot}if(this._sourcesContents){e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)}return e};SourceMapGenerator.prototype.toString=function SourceMapGenerator_toString(){return JSON.stringify(this.toJSON())};t.h=SourceMapGenerator},351:(e,t,r)=>{var n;var i=r(591).h;var s=r(339);var a=/(\r?\n)/;var o=10;var u="$$$isSourceNode$$$";function SourceNode(e,t,r,n,i){this.children=[];this.sourceContents={};this.line=e==null?null:e;this.column=t==null?null:t;this.source=r==null?null:r;this.name=i==null?null:i;this[u]=true;if(n!=null)this.add(n)}SourceNode.fromStringWithSourceMap=function SourceNode_fromStringWithSourceMap(e,t,r){var n=new SourceNode;var i=e.split(a);var o=0;var shiftNextLine=function(){var e=getNextLine();var t=getNextLine()||"";return e+t;function getNextLine(){return o<i.length?i[o++]:undefined}};var u=1,l=0;var c=null;t.eachMapping((function(e){if(c!==null){if(u<e.generatedLine){addMappingWithCode(c,shiftNextLine());u++;l=0}else{var t=i[o]||"";var r=t.substr(0,e.generatedColumn-l);i[o]=t.substr(e.generatedColumn-l);l=e.generatedColumn;addMappingWithCode(c,r);c=e;return}}while(u<e.generatedLine){n.add(shiftNextLine());u++}if(l<e.generatedColumn){var t=i[o]||"";n.add(t.substr(0,e.generatedColumn));i[o]=t.substr(e.generatedColumn);l=e.generatedColumn}c=e}),this);if(o<i.length){if(c){addMappingWithCode(c,shiftNextLine())}n.add(i.splice(o).join(""))}t.sources.forEach((function(e){var i=t.sourceContentFor(e);if(i!=null){if(r!=null){e=s.join(r,e)}n.setSourceContent(e,i)}}));return n;function addMappingWithCode(e,t){if(e===null||e.source===undefined){n.add(t)}else{var i=r?s.join(r,e.source):e.source;n.add(new SourceNode(e.originalLine,e.originalColumn,i,t,e.name))}}};SourceNode.prototype.add=function SourceNode_add(e){if(Array.isArray(e)){e.forEach((function(e){this.add(e)}),this)}else if(e[u]||typeof e==="string"){if(e){this.children.push(e)}}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e)}return this};SourceNode.prototype.prepend=function SourceNode_prepend(e){if(Array.isArray(e)){for(var t=e.length-1;t>=0;t--){this.prepend(e[t])}}else if(e[u]||typeof e==="string"){this.children.unshift(e)}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e)}return this};SourceNode.prototype.walk=function SourceNode_walk(e){var t;for(var r=0,n=this.children.length;r<n;r++){t=this.children[r];if(t[u]){t.walk(e)}else{if(t!==""){e(t,{source:this.source,line:this.line,column:this.column,name:this.name})}}}};SourceNode.prototype.join=function SourceNode_join(e){var t;var r;var n=this.children.length;if(n>0){t=[];for(r=0;r<n-1;r++){t.push(this.children[r]);t.push(e)}t.push(this.children[r]);this.children=t}return this};SourceNode.prototype.replaceRight=function SourceNode_replaceRight(e,t){var r=this.children[this.children.length-1];if(r[u]){r.replaceRight(e,t)}else if(typeof r==="string"){this.children[this.children.length-1]=r.replace(e,t)}else{this.children.push("".replace(e,t))}return this};SourceNode.prototype.setSourceContent=function SourceNode_setSourceContent(e,t){this.sourceContents[s.toSetString(e)]=t};SourceNode.prototype.walkSourceContents=function SourceNode_walkSourceContents(e){for(var t=0,r=this.children.length;t<r;t++){if(this.children[t][u]){this.children[t].walkSourceContents(e)}}var n=Object.keys(this.sourceContents);for(var t=0,r=n.length;t<r;t++){e(s.fromSetString(n[t]),this.sourceContents[n[t]])}};SourceNode.prototype.toString=function SourceNode_toString(){var e="";this.walk((function(t){e+=t}));return e};SourceNode.prototype.toStringWithSourceMap=function SourceNode_toStringWithSourceMap(e){var t={code:"",line:1,column:0};var r=new i(e);var n=false;var s=null;var a=null;var u=null;var l=null;this.walk((function(e,i){t.code+=e;if(i.source!==null&&i.line!==null&&i.column!==null){if(s!==i.source||a!==i.line||u!==i.column||l!==i.name){r.addMapping({source:i.source,original:{line:i.line,column:i.column},generated:{line:t.line,column:t.column},name:i.name})}s=i.source;a=i.line;u=i.column;l=i.name;n=true}else if(n){r.addMapping({generated:{line:t.line,column:t.column}});s=null;n=false}for(var c=0,d=e.length;c<d;c++){if(e.charCodeAt(c)===o){t.line++;t.column=0;if(c+1===d){s=null;n=false}else if(n){r.addMapping({source:i.source,original:{line:i.line,column:i.column},generated:{line:t.line,column:t.column},name:i.name})}}else{t.column++}}}));this.walkSourceContents((function(e,t){r.setSourceContent(e,t)}));return{code:t.code,map:r}};n=SourceNode},339:(e,t)=>{function getArg(e,t,r){if(t in e){return e[t]}else if(arguments.length===3){return r}else{throw new Error('"'+t+'" is a required argument.')}}t.getArg=getArg;var r=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;var n=/^data:.+\,.+$/;function urlParse(e){var t=e.match(r);if(!t){return null}return{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}}t.urlParse=urlParse;function urlGenerate(e){var t="";if(e.scheme){t+=e.scheme+":"}t+="//";if(e.auth){t+=e.auth+"@"}if(e.host){t+=e.host}if(e.port){t+=":"+e.port}if(e.path){t+=e.path}return t}t.urlGenerate=urlGenerate;function normalize(e){var r=e;var n=urlParse(e);if(n){if(!n.path){return e}r=n.path}var i=t.isAbsolute(r);var s=r.split(/\/+/);for(var a,o=0,u=s.length-1;u>=0;u--){a=s[u];if(a==="."){s.splice(u,1)}else if(a===".."){o++}else if(o>0){if(a===""){s.splice(u+1,o);o=0}else{s.splice(u,2);o--}}}r=s.join("/");if(r===""){r=i?"/":"."}if(n){n.path=r;return urlGenerate(n)}return r}t.normalize=normalize;function join(e,t){if(e===""){e="."}if(t===""){t="."}var r=urlParse(t);var i=urlParse(e);if(i){e=i.path||"/"}if(r&&!r.scheme){if(i){r.scheme=i.scheme}return urlGenerate(r)}if(r||t.match(n)){return t}if(i&&!i.host&&!i.path){i.host=t;return urlGenerate(i)}var s=t.charAt(0)==="/"?t:normalize(e.replace(/\/+$/,"")+"/"+t);if(i){i.path=s;return urlGenerate(i)}return s}t.join=join;t.isAbsolute=function(e){return e.charAt(0)==="/"||r.test(e)};function relative(e,t){if(e===""){e="."}e=e.replace(/\/$/,"");var r=0;while(t.indexOf(e+"/")!==0){var n=e.lastIndexOf("/");if(n<0){return t}e=e.slice(0,n);if(e.match(/^([^\/]+:\/)?\/*$/)){return t}++r}return Array(r+1).join("../")+t.substr(e.length+1)}t.relative=relative;var i=function(){var e=Object.create(null);return!("__proto__"in e)}();function identity(e){return e}function toSetString(e){if(isProtoString(e)){return"$"+e}return e}t.toSetString=i?identity:toSetString;function fromSetString(e){if(isProtoString(e)){return e.slice(1)}return e}t.fromSetString=i?identity:fromSetString;function isProtoString(e){if(!e){return false}var t=e.length;if(t<9){return false}if(e.charCodeAt(t-1)!==95||e.charCodeAt(t-2)!==95||e.charCodeAt(t-3)!==111||e.charCodeAt(t-4)!==116||e.charCodeAt(t-5)!==111||e.charCodeAt(t-6)!==114||e.charCodeAt(t-7)!==112||e.charCodeAt(t-8)!==95||e.charCodeAt(t-9)!==95){return false}for(var r=t-10;r>=0;r--){if(e.charCodeAt(r)!==36){return false}}return true}function compareByOriginalPositions(e,t,r){var n=strcmp(e.source,t.source);if(n!==0){return n}n=e.originalLine-t.originalLine;if(n!==0){return n}n=e.originalColumn-t.originalColumn;if(n!==0||r){return n}n=e.generatedColumn-t.generatedColumn;if(n!==0){return n}n=e.generatedLine-t.generatedLine;if(n!==0){return n}return strcmp(e.name,t.name)}t.compareByOriginalPositions=compareByOriginalPositions;function compareByGeneratedPositionsDeflated(e,t,r){var n=e.generatedLine-t.generatedLine;if(n!==0){return n}n=e.generatedColumn-t.generatedColumn;if(n!==0||r){return n}n=strcmp(e.source,t.source);if(n!==0){return n}n=e.originalLine-t.originalLine;if(n!==0){return n}n=e.originalColumn-t.originalColumn;if(n!==0){return n}return strcmp(e.name,t.name)}t.compareByGeneratedPositionsDeflated=compareByGeneratedPositionsDeflated;function strcmp(e,t){if(e===t){return 0}if(e===null){return 1}if(t===null){return-1}if(e>t){return 1}return-1}function compareByGeneratedPositionsInflated(e,t){var r=e.generatedLine-t.generatedLine;if(r!==0){return r}r=e.generatedColumn-t.generatedColumn;if(r!==0){return r}r=strcmp(e.source,t.source);if(r!==0){return r}r=e.originalLine-t.originalLine;if(r!==0){return r}r=e.originalColumn-t.originalColumn;if(r!==0){return r}return strcmp(e.name,t.name)}t.compareByGeneratedPositionsInflated=compareByGeneratedPositionsInflated;function parseSourceMapInput(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}t.parseSourceMapInput=parseSourceMapInput;function computeSourceURL(e,t,r){t=t||"";if(e){if(e[e.length-1]!=="/"&&t[0]!=="/"){e+="/"}t=e+t}if(r){var n=urlParse(r);if(!n){throw new Error("sourceMapURL could not be parsed")}if(n.path){var i=n.path.lastIndexOf("/");if(i>=0){n.path=n.path.substring(0,i+1)}}t=join(urlGenerate(n),t)}return normalize(t)}t.computeSourceURL=computeSourceURL},997:(e,t,r)=>{r(591).h;t.SourceMapConsumer=r(952).SourceMapConsumer;r(351)},284:(e,t,r)=>{e=r.nmd(e);var n=r(997).SourceMapConsumer;var i=r(17);var s;try{s=r(147);if(!s.existsSync||!s.readFileSync){s=null}}catch(e){}var a=r(650);function dynamicRequire(e,t){return e.require(t)}var o=false;var u=false;var l=false;var c="auto";var d={};var f={};var h=/^data:application\/json[^,]+base64,/;var p=[];var _=[];function isInBrowser(){if(c==="browser")return true;if(c==="node")return false;return typeof window!=="undefined"&&typeof XMLHttpRequest==="function"&&!(window.require&&window.module&&window.process&&window.process.type==="renderer")}function hasGlobalProcessEventEmitter(){return typeof process==="object"&&process!==null&&typeof process.on==="function"}function globalProcessVersion(){if(typeof process==="object"&&process!==null){return process.version}else{return""}}function globalProcessStderr(){if(typeof process==="object"&&process!==null){return process.stderr}}function globalProcessExit(e){if(typeof process==="object"&&process!==null&&typeof process.exit==="function"){return process.exit(e)}}function handlerExec(e){return function(t){for(var r=0;r<e.length;r++){var n=e[r](t);if(n){return n}}return null}}var g=handlerExec(p);p.push((function(e){e=e.trim();if(/^file:/.test(e)){e=e.replace(/file:\/\/\/(\w:)?/,(function(e,t){return t?"":"/"}))}if(e in d){return d[e]}var t="";try{if(!s){var r=new XMLHttpRequest;r.open("GET",e,false);r.send(null);if(r.readyState===4&&r.status===200){t=r.responseText}}else if(s.existsSync(e)){t=s.readFileSync(e,"utf8")}}catch(e){}return d[e]=t}));function supportRelativeURL(e,t){if(!e)return t;var r=i.dirname(e);var n=/^\w+:\/\/[^\/]*/.exec(r);var s=n?n[0]:"";var a=r.slice(s.length);if(s&&/^\/\w\:/.test(a)){s+="/";return s+i.resolve(r.slice(s.length),t).replace(/\\/g,"/")}return s+i.resolve(r.slice(s.length),t)}function retrieveSourceMapURL(e){var t;if(isInBrowser()){try{var r=new XMLHttpRequest;r.open("GET",e,false);r.send(null);t=r.readyState===4?r.responseText:null;var n=r.getResponseHeader("SourceMap")||r.getResponseHeader("X-SourceMap");if(n){return n}}catch(e){}}t=g(e);var i=/(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/gm;var s,a;while(a=i.exec(t))s=a;if(!s)return null;return s[1]}var m=handlerExec(_);_.push((function(e){var t=retrieveSourceMapURL(e);if(!t)return null;var r;if(h.test(t)){var n=t.slice(t.indexOf(",")+1);r=a(n,"base64").toString();t=e}else{t=supportRelativeURL(e,t);r=g(t)}if(!r){return null}return{url:t,map:r}}));function mapSourcePosition(e){var t=f[e.source];if(!t){var r=m(e.source);if(r){t=f[e.source]={url:r.url,map:new n(r.map)};if(t.map.sourcesContent){t.map.sources.forEach((function(e,r){var n=t.map.sourcesContent[r];if(n){var i=supportRelativeURL(t.url,e);d[i]=n}}))}}else{t=f[e.source]={url:null,map:null}}}if(t&&t.map&&typeof t.map.originalPositionFor==="function"){var i=t.map.originalPositionFor(e);if(i.source!==null){i.source=supportRelativeURL(t.url,i.source);return i}}return e}function mapEvalOrigin(e){var t=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(e);if(t){var r=mapSourcePosition({source:t[2],line:+t[3],column:t[4]-1});return"eval at "+t[1]+" ("+r.source+":"+r.line+":"+(r.column+1)+")"}t=/^eval at ([^(]+) \((.+)\)$/.exec(e);if(t){return"eval at "+t[1]+" ("+mapEvalOrigin(t[2])+")"}return e}function CallSiteToString(){var e;var t="";if(this.isNative()){t="native"}else{e=this.getScriptNameOrSourceURL();if(!e&&this.isEval()){t=this.getEvalOrigin();t+=", "}if(e){t+=e}else{t+="<anonymous>"}var r=this.getLineNumber();if(r!=null){t+=":"+r;var n=this.getColumnNumber();if(n){t+=":"+n}}}var i="";var s=this.getFunctionName();var a=true;var o=this.isConstructor();var u=!(this.isToplevel()||o);if(u){var l=this.getTypeName();if(l==="[object Object]"){l="null"}var c=this.getMethodName();if(s){if(l&&s.indexOf(l)!=0){i+=l+"."}i+=s;if(c&&s.indexOf("."+c)!=s.length-c.length-1){i+=" [as "+c+"]"}}else{i+=l+"."+(c||"<anonymous>")}}else if(o){i+="new "+(s||"<anonymous>")}else if(s){i+=s}else{i+=t;a=false}if(a){i+=" ("+t+")"}return i}function cloneCallSite(e){var t={};Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(r){t[r]=/^(?:is|get)/.test(r)?function(){return e[r].call(e)}:e[r]}));t.toString=CallSiteToString;return t}function wrapCallSite(e,t){if(t===undefined){t={nextPosition:null,curPosition:null}}if(e.isNative()){t.curPosition=null;return e}var r=e.getFileName()||e.getScriptNameOrSourceURL();if(r){var n=e.getLineNumber();var i=e.getColumnNumber()-1;var s=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/;var a=s.test(globalProcessVersion())?0:62;if(n===1&&i>a&&!isInBrowser()&&!e.isEval()){i-=a}var o=mapSourcePosition({source:r,line:n,column:i});t.curPosition=o;e=cloneCallSite(e);var u=e.getFunctionName;e.getFunctionName=function(){if(t.nextPosition==null){return u()}return t.nextPosition.name||u()};e.getFileName=function(){return o.source};e.getLineNumber=function(){return o.line};e.getColumnNumber=function(){return o.column+1};e.getScriptNameOrSourceURL=function(){return o.source};return e}var l=e.isEval()&&e.getEvalOrigin();if(l){l=mapEvalOrigin(l);e=cloneCallSite(e);e.getEvalOrigin=function(){return l};return e}return e}function prepareStackTrace(e,t){if(l){d={};f={}}var r=e.name||"Error";var n=e.message||"";var i=r+": "+n;var s={nextPosition:null,curPosition:null};var a=[];for(var o=t.length-1;o>=0;o--){a.push("\n at "+wrapCallSite(t[o],s));s.nextPosition=s.curPosition}s.curPosition=s.nextPosition=null;return i+a.reverse().join("")}function getErrorSource(e){var t=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(e.stack);if(t){var r=t[1];var n=+t[2];var i=+t[3];var a=d[r];if(!a&&s&&s.existsSync(r)){try{a=s.readFileSync(r,"utf8")}catch(e){a=""}}if(a){var o=a.split(/(?:\r\n|\r|\n)/)[n-1];if(o){return r+":"+n+"\n"+o+"\n"+new Array(i).join(" ")+"^"}}}return null}function printErrorAndExit(e){var t=getErrorSource(e);var r=globalProcessStderr();if(r&&r._handle&&r._handle.setBlocking){r._handle.setBlocking(true)}if(t){console.error();console.error(t)}console.error(e.stack);globalProcessExit(1)}function shimEmitUncaughtException(){var e=process.emit;process.emit=function(t){if(t==="uncaughtException"){var r=arguments[1]&&arguments[1].stack;var n=this.listeners(t).length>0;if(r&&!n){return printErrorAndExit(arguments[1])}}return e.apply(this,arguments)}}var b=p.slice(0);var w=_.slice(0);t.wrapCallSite=wrapCallSite;t.getErrorSource=getErrorSource;t.mapSourcePosition=mapSourcePosition;t.retrieveSourceMap=m;t.install=function(t){t=t||{};if(t.environment){c=t.environment;if(["node","browser","auto"].indexOf(c)===-1){throw new Error("environment "+c+" was unknown. Available options are {auto, browser, node}")}}if(t.retrieveFile){if(t.overrideRetrieveFile){p.length=0}p.unshift(t.retrieveFile)}if(t.retrieveSourceMap){if(t.overrideRetrieveSourceMap){_.length=0}_.unshift(t.retrieveSourceMap)}if(t.hookRequire&&!isInBrowser()){var r=dynamicRequire(e,"module");var n=r.prototype._compile;if(!n.__sourceMapSupport){r.prototype._compile=function(e,t){d[t]=e;f[t]=undefined;return n.call(this,e,t)};r.prototype._compile.__sourceMapSupport=true}}if(!l){l="emptyCacheBetweenOperations"in t?t.emptyCacheBetweenOperations:false}if(!o){o=true;Error.prepareStackTrace=prepareStackTrace}if(!u){var i="handleUncaughtExceptions"in t?t.handleUncaughtExceptions:true;try{var s=dynamicRequire(e,"worker_threads");if(s.isMainThread===false){i=false}}catch(e){}if(i&&hasGlobalProcessEventEmitter()){u=true;shimEmitUncaughtException()}}};t.resetRetrieveHandlers=function(){p.length=0;_.length=0;p=b.slice(0);_=w.slice(0);m=handlerExec(_);g=handlerExec(p)}},147:e=>{"use strict";e.exports=r(7147)},17:e=>{"use strict";e.exports=r(1017)}};var n={};function __nested_webpack_require_40553__(e){var r=n[e];if(r!==undefined){return r.exports}var i=n[e]={id:e,loaded:false,exports:{}};var s=true;try{t[e](i,i.exports,__nested_webpack_require_40553__);s=false}finally{if(s)delete n[e]}i.loaded=true;return i.exports}(()=>{__nested_webpack_require_40553__.nmd=e=>{e.paths=[];if(!e.children)e.children=[];return e}})();if(true)__nested_webpack_require_40553__.ab=__dirname+"/";var i={};(()=>{__nested_webpack_require_40553__(284).install()})();e.exports=i})()},3179:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EBackLineDot=void 0;const n=r(6376);const i=r(6833);class EBackLineDot extends n.BasicESCArg{dot;constructor(e){super();this.dot=e.dot??0}clause(){return i.BinaryCommand.with(this.header()).appendNumber(this.dot).clause()}header(){return new Uint8Array([16,255,129])}}t.EBackLineDot=EBackLineDot},6376:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.BasicESCArg=void 0;const n=r(6833);class BasicESCArg extends n.EasyArg{append(e){super.append(e);return this}prepend(e){super.prepend(e);return this}newline(){return false}}t.BasicESCArg=BasicESCArg},1598:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EBatteryVolume=void 0;const n=r(6833);class EBatteryVolume extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,80,241])}}t.EBatteryVolume=EBatteryVolume},9761:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EBTType=void 0;const n=r(6833);class EBTType extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([31,178,16])}}t.EBTType=EBTType},8310:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EEnable=void 0;const n=r(6833);class EEnable extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,254,1])}}t.EEnable=EEnable},7880:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EGetPaperTypeQ3=void 0;const n=r(6833);class EGetPaperTypeQ3 extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,133])}}t.EGetPaperTypeQ3=EGetPaperTypeQ3},1729:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EGetShutdownTime=void 0;const n=r(6833);class EGetShutdownTime extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,19])}}t.EGetShutdownTime=EGetShutdownTime},7921:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EImage=void 0;const n=r(6376);const i=r(6833);const s=r(8686);const a=r(7438);class EImage extends n.BasicESCArg{compress;mode;image;reverse;threshold;constructor(e){super();this.compress=e.compress??false;this.reverse=e.reverse??false;this.threshold=e.threshold??190;this.mode=e.mode??s.EImageMode.NORMAL;this.image=e.image}clause(){const e=new a.Pbita({command:"esc",threshold:this.threshold,compress:this.compress,reverse:this.reverse});const t=e.process(this.image);const r=t.result.data;const n=t.result.bytes;if(r==null){throw new Error("Wrong image data")}let s=r.width;let o=r.height;const u=Math.floor(s%8===0?s/8:s/8+1);if(this.compress){return i.BinaryCommand.with(this.header()).appendNumber(u/256).appendNumber(u%256).appendNumber(o/256).appendNumber(o%256).appendNumber(n.length-2>>24&255).appendNumber(n.length-2>>16&255).appendNumber(n.length-2>>8&255).appendNumber(n.length-2&255).appendU8A(n.subarray(2,n.length)).clause()}return i.BinaryCommand.with(this.header()).appendNumber(this.mode).appendNumber(u%256).appendNumber(u/256).appendNumber(o%256).appendNumber(o/256).appendU8A(n).clause()}header(){return new Uint8Array(this.compress?[31,0]:[29,118,48])}}t.EImage=EImage},9366:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});i(r(3179),t);i(r(6376),t);i(r(1598),t);i(r(8310),t);i(r(1729),t);i(r(7921),t);i(r(7138),t);i(r(4905),t);i(r(4653),t);i(r(6070),t);i(r(3245),t);i(r(319),t);i(r(4632),t);i(r(3651),t);i(r(3792),t);i(r(2997),t);i(r(5417),t);i(r(7520),t);i(r(9339),t);i(r(4249),t);i(r(7105),t);i(r(3916),t);i(r(6199),t);i(r(7028),t);i(r(9761),t)},7028:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EInfo=void 0;const n=r(6833);class EInfo extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,112])}}t.EInfo=EInfo},7138:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ELearnLabelGap=void 0;const n=r(6833);class ELearnLabelGap extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,3])}}t.ELearnLabelGap=ELearnLabelGap},4905:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ELine=void 0;const n=r(6376);const i=r(6833);class ELine extends n.BasicESCArg{x;y;constructor(e){super();this.x=e.x??0;this.y=e.y??0}clause(){return i.BinaryCommand.with(this.header()).appendNumber(this.x).appendNumber(this.y).clause()}header(){return new Uint8Array([0,1])}}t.ELine=ELine},4653:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ELineDot=void 0;const n=r(6376);const i=r(6833);class ELineDot extends n.BasicESCArg{dot;constructor(e){super();this.dot=e.dot??0}clause(){return i.BinaryCommand.with(this.header()).appendNumber(this.dot).clause()}header(){return new Uint8Array([27,74])}}t.ELineDot=ELineDot},6070:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ELocation=void 0;const n=r(6376);const i=r(6833);class ELocation extends n.BasicESCArg{location;constructor(e){super();this.location=e.location??0}clause(){return i.BinaryCommand.with(this.header()).appendNumber(this.location).clause()}header(){return new Uint8Array([27,97])}}t.ELocation=ELocation},3245:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EMac=void 0;const n=r(6833);class EMac extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,48,18])}}t.EMac=EMac},319:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EModel=void 0;const n=r(6833);class EModel extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,32,240])}}t.EModel=EModel},4632:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EName=void 0;const n=r(6833);class EName extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,48,17])}}t.EName=EName},3651:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EPaperType=void 0;const n=r(6376);const i=r(6833);const s=r(8686);class EPaperType extends n.BasicESCArg{paperType;constructor(e){super();this.paperType=e.paperType??s.PaperType.FOLDED_BLACK_LABEL_PAPER}clause(){return i.BinaryCommand.with(this.header()).appendNumber(this.paperType).clause()}header(){return new Uint8Array([16,255,16,3])}}t.EPaperType=EPaperType},3792:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EPosition=void 0;const n=r(6833);class EPosition extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([29,12])}}t.EPosition=EPosition},2997:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EPrinterVersion=void 0;const n=r(6833);class EPrinterVersion extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,32,241])}}t.EPrinterVersion=EPrinterVersion},5417:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ESetShutdownTime=void 0;const n=r(6376);const i=r(6833);class ESetShutdownTime extends n.BasicESCArg{time;constructor(e){super();this.time=e.time??0}clause(){return i.BinaryCommand.with(this.header()).appendNumber(this.time/256).appendNumber(this.time%256).clause()}header(){return new Uint8Array([16,255,18])}}t.ESetShutdownTime=ESetShutdownTime},7520:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ESN=void 0;const n=r(6833);class ESN extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,32,242])}}t.ESN=ESN},9339:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EState=void 0;const n=r(6833);class EState extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,64])}}t.EState=EState},4249:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EStopJob=void 0;const n=r(6833);class EStopJob extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,254,69])}}t.EStopJob=EStopJob},7105:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EThickness=void 0;const n=r(6376);const i=r(6833);class EThickness extends n.BasicESCArg{thickness;constructor(e){super();this.thickness=e.thickness??0}clause(){return i.BinaryCommand.with(this.header()).appendNumber(this.thickness).clause()}header(){return new Uint8Array([16,255,16,0])}}t.EThickness=EThickness},3916:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EVersion=void 0;const n=r(6833);class EVersion extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([16,255,48,16])}}t.EVersion=EVersion},6199:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EWakeup=void 0;const n=r(6833);class EWakeup extends n.OnlyBinaryHeaderArg{header(){return new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0])}}t.EWakeup=EWakeup},8947:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.BasicESC=void 0;const n=r(6833);const i=r(9366);const s=r(7880);class BasicESC extends n.PSDK{_lifecycle;_commander;constructor(e){super();this._lifecycle=e;this._commander=n.Commander.make()}connectedDevice(){return this._lifecycle.connectedDevice}commander(){return this._commander}lineDot(e){return super.push(new i.ELineDot({dot:e}))}backLineDot(e){return super.push(new i.EBackLineDot({dot:e}))}batteryVolume(){return super.push(new i.EBatteryVolume)}enable(){return super.push(new i.EEnable)}getShutdownTime(){return super.push(new i.EGetShutdownTime)}image(e){return super.push(e)}learnLabelGap(){return super.push(new i.ELearnLabelGap)}line(e){return super.push(e)}location(e){return super.push(new i.ELocation({location:e}))}mac(){return super.push(new i.EMac)}info(){return super.push(new i.EInfo)}model(){return super.push(new i.EModel)}name(){return super.push(new i.EName)}paperType(e){return super.push(e)}paperTypeQ3(e){return super.push(e)}getPaperTypeQ3(){return super.push(new s.EGetPaperTypeQ3)}position(){return super.push(new i.EPosition)}printerVersion(){return super.push(new i.EPrinterVersion)}setShutdownTime(e){return super.push(new i.ESetShutdownTime({time:e}))}sn(){return super.push(new i.ESN)}state(){return super.push(new i.EState)}stopJob(){return super.push(new i.EStopJob)}thickness(e){return super.push(new i.EThickness({thickness:e}))}version(){return super.push(new i.EVersion)}wakeup(){return super.push(new i.EWakeup)}setBTType(){return super.push(new i.EBTType)}}t.BasicESC=BasicESC},8295:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.ESC=void 0;const n=r(9671);class ESC{static generic(e){return new n.GenericESC(e)}}t.ESC=ESC},9671:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.GenericESC=void 0;const n=r(8947);class GenericESC extends n.BasicESC{constructor(e){super(e)}}t.GenericESC=GenericESC},6344:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});i(r(9671),t);i(r(8295),t)},5926:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});i(r(6344),t);i(r(9366),t)},4809:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EImageMode=void 0;var r;(function(e){e[e["NORMAL"]=0]="NORMAL";e[e["DOUBLE_WIDTH"]=1]="DOUBLE_WIDTH";e[e["DOUBLE_HEIGHT"]=2]="DOUBLE_HEIGHT";e[e["DOUBLE_WIDTH_HEIGHT"]=3]="DOUBLE_WIDTH_HEIGHT"})(r||(t.EImageMode=r={}))},8686:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var i=Object.getOwnPropertyDescriptor(t,r);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,i)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=this&&this.__exportStar||function(e,t){for(var r in e)if(r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r))n(t,e,r)};Object.defineProperty(t,"__esModule",{value:true});i(r(4809),t);i(r(5488),t);i(r(1032),t)},5488:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.PaperType=void 0;var r;(function(e){e[e["FOLDED_BLACK_LABEL_PAPER"]=0]="FOLDED_BLACK_LABEL_PAPER";e[e["CONTINUOUS_REEL_PAPER"]=1]="CONTINUOUS_REEL_PAPER";e[e["NO_DRY_ADHESIVE_PAPER"]=2]="NO_DRY_ADHESIVE_PAPER";e[e["HOLE_PAPER"]=3]="HOLE_PAPER";e[e["TATTOO_PAPER"]=4]="TATTOO_PAPER"})(r||(t.PaperType=r={}))},1032:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.PaperTypeQ3=void 0;var r;(function(e){e[e["NO_DRY_ADHESIVE_PAPER"]=0]="NO_DRY_ADHESIVE_PAPER";e[e["FOLDED_BLACK_LABEL_PAPER"]=1]="FOLDED_BLACK_LABEL_PAPER";e[e["CONTINUOUS_REEL_PAPER"]=2]="CONTINUOUS_REEL_PAPER"})(r||(t.PaperTypeQ3=r={}))},7147:e=>{"use strict";e.exports=require("fs")},1017:e=>{"use strict";e.exports=require("path")}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var i=t[r]={exports:{}};var s=true;try{e[r].call(i.exports,i,i.exports,__nccwpck_require__);s=false}finally{if(s)delete t[r]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(5926);module.exports=r})();
2
2
  //# sourceMappingURL=index.js.map