genosdb
Version:
GenosDB (GDB): distributed graph database in real-time, peer-to-peer, scalable storage - efficient querying of complex relationships.
1 lines • 90.2 kB
JavaScript
function H8(J){const Q=J.length;let W=0,G=0;while(G<Q){let V=J.charCodeAt(G++);if((V&4294967168)===0){W++;continue}else if((V&4294965248)===0)W+=2;else{if(V>=55296&&V<=56319){if(G<Q){const q=J.charCodeAt(G);if((q&64512)===56320)++G,V=((V&1023)<<10)+(q&1023)+65536}}if((V&4294901760)===0)W+=3;else W+=4}}return W}function s6(J,Q,W){const G=J.length;let V=W,q=0;while(q<G){let Y=J.charCodeAt(q++);if((Y&4294967168)===0){Q[V++]=Y;continue}else if((Y&4294965248)===0)Q[V++]=Y>>6&31|192;else{if(Y>=55296&&Y<=56319){if(q<G){const X=J.charCodeAt(q);if((X&64512)===56320)++q,Y=((Y&1023)<<10)+(X&1023)+65536}}if((Y&4294901760)===0)Q[V++]=Y>>12&15|224,Q[V++]=Y>>6&63|128;else Q[V++]=Y>>18&7|240,Q[V++]=Y>>12&63|128,Q[V++]=Y>>6&63|128}Q[V++]=Y&63|128}}function J5(J,Q,W){e6.encodeInto(J,Q.subarray(W))}function k8(J,Q,W){if(J.length>t6)J5(J,Q,W);else s6(J,Q,W)}function S1(J,Q,W){let G=Q;const V=G+W,q=[];let Y="";while(G<V){const X=J[G++];if((X&128)===0)q.push(X);else if((X&224)===192){const z=J[G++]&63;q.push((X&31)<<6|z)}else if((X&240)===224){const z=J[G++]&63,U=J[G++]&63;q.push((X&31)<<12|z<<6|U)}else if((X&248)===240){const z=J[G++]&63,U=J[G++]&63,P=J[G++]&63;let $=(X&7)<<18|z<<12|U<<6|P;if($>65535)$-=65536,q.push($>>>10&1023|55296),$=56320|$&1023;q.push($)}else q.push(X);if(q.length>=W5)Y+=String.fromCharCode(...q),q.length=0}if(q.length>0)Y+=String.fromCharCode(...q);return Y}function V5(J,Q,W){const G=J.subarray(Q,Q+W);return Q5.decode(G)}function $8(J,Q,W){if(W>G5)return V5(J,Q,W);else return S1(J,Q,W)}var e6=new TextEncoder,t6=50,W5=4096,Q5=new TextDecoder,G5=200;class A0{constructor(J,Q){this.type=J,this.data=Q}}class i extends Error{constructor(J){super(J);const Q=Object.create(i.prototype);Object.setPrototypeOf(this,Q),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:i.name})}}function B8(J,Q,W){const G=W/4294967296,V=W;J.setUint32(Q,G),J.setUint32(Q+4,V)}function K1(J,Q,W){const G=Math.floor(W/4294967296),V=W;J.setUint32(Q,G),J.setUint32(Q+4,V)}function F1(J,Q){const W=J.getInt32(Q),G=J.getUint32(Q+4);return W*4294967296+G}function j8(J,Q){const W=J.getUint32(Q),G=J.getUint32(Q+4);return W*4294967296+G}var N0=4294967295;function Y5({sec:J,nsec:Q}){if(J>=0&&Q>=0&&J<=U5)if(Q===0&&J<=X5){const W=new Uint8Array(4);return new DataView(W.buffer).setUint32(0,J),W}else{const W=J/4294967296,G=J&4294967295,V=new Uint8Array(8),q=new DataView(V.buffer);return q.setUint32(0,Q<<2|W&3),q.setUint32(4,G),V}else{const W=new Uint8Array(12),G=new DataView(W.buffer);return G.setUint32(0,Q),K1(G,4,J),W}}function P5(J){const Q=J.getTime(),W=Math.floor(Q/1000),G=(Q-W*1000)*1e6,V=Math.floor(G/1e9);return{sec:W+V,nsec:G-V*1e9}}function K5(J){if(J instanceof Date){const Q=P5(J);return Y5(Q)}else return null}function F5(J){const Q=new DataView(J.buffer,J.byteOffset,J.byteLength);switch(J.byteLength){case 4:return{sec:Q.getUint32(0),nsec:0};case 8:{const W=Q.getUint32(0),G=Q.getUint32(4),V=(W&3)*4294967296+G,q=W>>>2;return{sec:V,nsec:q}}case 12:{const W=F1(Q,4),G=Q.getUint32(0);return{sec:W,nsec:G}}default:throw new i(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${J.length}`)}}function z5(J){const Q=F5(J);return new Date(Q.sec*1000+Q.nsec/1e6)}var q5=-1,X5=4294967295,U5=17179869183,R8={type:q5,encode:K5,decode:z5};class $0{constructor(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(R8)}register({type:J,encode:Q,decode:W}){if(J>=0)this.encoders[J]=Q,this.decoders[J]=W;else{const G=-1-J;this.builtInEncoders[G]=Q,this.builtInDecoders[G]=W}}tryToEncode(J,Q){for(let W=0;W<this.builtInEncoders.length;W++){const G=this.builtInEncoders[W];if(G!=null){const V=G(J,Q);if(V!=null){const q=-1-W;return new A0(q,V)}}}for(let W=0;W<this.encoders.length;W++){const G=this.encoders[W];if(G!=null){const V=G(J,Q);if(V!=null)return new A0(W,V)}}if(J instanceof A0)return J;return null}decode(J,Q,W){const G=Q<0?this.builtInDecoders[-1-Q]:this.decoders[Q];if(G)return G(J,Q,W);else return new A0(Q,J)}}$0.defaultCodec=new $0;var Z5=function(J){return J instanceof ArrayBuffer||typeof SharedArrayBuffer!=="undefined"&&J instanceof SharedArrayBuffer};function b0(J){if(J instanceof Uint8Array)return J;else if(ArrayBuffer.isView(J))return new Uint8Array(J.buffer,J.byteOffset,J.byteLength);else if(Z5(J))return new Uint8Array(J);else return Uint8Array.from(J)}var H5=100,k5=2048;class z1{constructor(J){this.entered=!1,this.extensionCodec=J?.extensionCodec??$0.defaultCodec,this.context=J?.context,this.useBigInt64=J?.useBigInt64??!1,this.maxDepth=J?.maxDepth??H5,this.initialBufferSize=J?.initialBufferSize??k5,this.sortKeys=J?.sortKeys??!1,this.forceFloat32=J?.forceFloat32??!1,this.ignoreUndefined=J?.ignoreUndefined??!1,this.forceIntegerToFloat=J?.forceIntegerToFloat??!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}clone(){return new z1({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,maxDepth:this.maxDepth,initialBufferSize:this.initialBufferSize,sortKeys:this.sortKeys,forceFloat32:this.forceFloat32,ignoreUndefined:this.ignoreUndefined,forceIntegerToFloat:this.forceIntegerToFloat})}reinitializeState(){this.pos=0}encodeSharedRef(J){if(this.entered)return this.clone().encodeSharedRef(J);try{return this.entered=!0,this.reinitializeState(),this.doEncode(J,1),this.bytes.subarray(0,this.pos)}finally{this.entered=!1}}encode(J){if(this.entered)return this.clone().encode(J);try{return this.entered=!0,this.reinitializeState(),this.doEncode(J,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(J,Q){if(Q>this.maxDepth)throw new Error(`Too deep objects in depth ${Q}`);if(J==null)this.encodeNil();else if(typeof J==="boolean")this.encodeBoolean(J);else if(typeof J==="number")if(!this.forceIntegerToFloat)this.encodeNumber(J);else this.encodeNumberAsFloat(J);else if(typeof J==="string")this.encodeString(J);else if(this.useBigInt64&&typeof J==="bigint")this.encodeBigInt64(J);else this.encodeObject(J,Q)}ensureBufferSizeToWrite(J){const Q=this.pos+J;if(this.view.byteLength<Q)this.resizeBuffer(Q*2)}resizeBuffer(J){const Q=new ArrayBuffer(J),W=new Uint8Array(Q),G=new DataView(Q);W.set(this.bytes),this.view=G,this.bytes=W}encodeNil(){this.writeU8(192)}encodeBoolean(J){if(J===!1)this.writeU8(194);else this.writeU8(195)}encodeNumber(J){if(!this.forceIntegerToFloat&&Number.isSafeInteger(J))if(J>=0)if(J<128)this.writeU8(J);else if(J<256)this.writeU8(204),this.writeU8(J);else if(J<65536)this.writeU8(205),this.writeU16(J);else if(J<4294967296)this.writeU8(206),this.writeU32(J);else if(!this.useBigInt64)this.writeU8(207),this.writeU64(J);else this.encodeNumberAsFloat(J);else if(J>=-32)this.writeU8(224|J+32);else if(J>=-128)this.writeU8(208),this.writeI8(J);else if(J>=-32768)this.writeU8(209),this.writeI16(J);else if(J>=-2147483648)this.writeU8(210),this.writeI32(J);else if(!this.useBigInt64)this.writeU8(211),this.writeI64(J);else this.encodeNumberAsFloat(J);else this.encodeNumberAsFloat(J)}encodeNumberAsFloat(J){if(this.forceFloat32)this.writeU8(202),this.writeF32(J);else this.writeU8(203),this.writeF64(J)}encodeBigInt64(J){if(J>=BigInt(0))this.writeU8(207),this.writeBigUint64(J);else this.writeU8(211),this.writeBigInt64(J)}writeStringHeader(J){if(J<32)this.writeU8(160+J);else if(J<256)this.writeU8(217),this.writeU8(J);else if(J<65536)this.writeU8(218),this.writeU16(J);else if(J<4294967296)this.writeU8(219),this.writeU32(J);else throw new Error(`Too long string: ${J} bytes in UTF-8`)}encodeString(J){const W=H8(J);this.ensureBufferSizeToWrite(5+W),this.writeStringHeader(W),k8(J,this.bytes,this.pos),this.pos+=W}encodeObject(J,Q){const W=this.extensionCodec.tryToEncode(J,this.context);if(W!=null)this.encodeExtension(W);else if(Array.isArray(J))this.encodeArray(J,Q);else if(ArrayBuffer.isView(J))this.encodeBinary(J);else if(typeof J==="object")this.encodeMap(J,Q);else throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(J)}`)}encodeBinary(J){const Q=J.byteLength;if(Q<256)this.writeU8(196),this.writeU8(Q);else if(Q<65536)this.writeU8(197),this.writeU16(Q);else if(Q<4294967296)this.writeU8(198),this.writeU32(Q);else throw new Error(`Too large binary: ${Q}`);const W=b0(J);this.writeU8a(W)}encodeArray(J,Q){const W=J.length;if(W<16)this.writeU8(144+W);else if(W<65536)this.writeU8(220),this.writeU16(W);else if(W<4294967296)this.writeU8(221),this.writeU32(W);else throw new Error(`Too large array: ${W}`);for(let G of J)this.doEncode(G,Q+1)}countWithoutUndefined(J,Q){let W=0;for(let G of Q)if(J[G]!==void 0)W++;return W}encodeMap(J,Q){const W=Object.keys(J);if(this.sortKeys)W.sort();const G=this.ignoreUndefined?this.countWithoutUndefined(J,W):W.length;if(G<16)this.writeU8(128+G);else if(G<65536)this.writeU8(222),this.writeU16(G);else if(G<4294967296)this.writeU8(223),this.writeU32(G);else throw new Error(`Too large map object: ${G}`);for(let V of W){const q=J[V];if(!(this.ignoreUndefined&&q===void 0))this.encodeString(V),this.doEncode(q,Q+1)}}encodeExtension(J){if(typeof J.data==="function"){const W=J.data(this.pos+6),G=W.length;if(G>=4294967296)throw new Error(`Too large extension object: ${G}`);this.writeU8(201),this.writeU32(G),this.writeI8(J.type),this.writeU8a(W);return}const Q=J.data.length;if(Q===1)this.writeU8(212);else if(Q===2)this.writeU8(213);else if(Q===4)this.writeU8(214);else if(Q===8)this.writeU8(215);else if(Q===16)this.writeU8(216);else if(Q<256)this.writeU8(199),this.writeU8(Q);else if(Q<65536)this.writeU8(200),this.writeU16(Q);else if(Q<4294967296)this.writeU8(201),this.writeU32(Q);else throw new Error(`Too large extension object: ${Q}`);this.writeI8(J.type),this.writeU8a(J.data)}writeU8(J){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,J),this.pos++}writeU8a(J){const Q=J.length;this.ensureBufferSizeToWrite(Q),this.bytes.set(J,this.pos),this.pos+=Q}writeI8(J){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,J),this.pos++}writeU16(J){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,J),this.pos+=2}writeI16(J){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,J),this.pos+=2}writeU32(J){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,J),this.pos+=4}writeI32(J){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,J),this.pos+=4}writeF32(J){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,J),this.pos+=4}writeF64(J){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,J),this.pos+=8}writeU64(J){this.ensureBufferSizeToWrite(8),B8(this.view,this.pos,J),this.pos+=8}writeI64(J){this.ensureBufferSizeToWrite(8),K1(this.view,this.pos,J),this.pos+=8}writeBigUint64(J){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,J),this.pos+=8}writeBigInt64(J){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,J),this.pos+=8}}function u0(J,Q){return new z1(Q).encodeSharedRef(J)}function Z1(J){return`${J<0?"-":""}0x${Math.abs(J).toString(16).padStart(2,"0")}`}var $5=16,B5=16;class g1{constructor(J=$5,Q=B5){this.hit=0,this.miss=0,this.maxKeyLength=J,this.maxLengthPerKey=Q,this.caches=[];for(let W=0;W<this.maxKeyLength;W++)this.caches.push([])}canBeCached(J){return J>0&&J<=this.maxKeyLength}find(J,Q,W){const G=this.caches[W-1];J:for(let V of G){const q=V.bytes;for(let Y=0;Y<W;Y++)if(q[Y]!==J[Q+Y])continue J;return V.str}return null}store(J,Q){const W=this.caches[J.length-1],G={bytes:J,str:Q};if(W.length>=this.maxLengthPerKey)W[Math.random()*W.length|0]=G;else W.push(G)}decode(J,Q,W){const G=this.find(J,Q,W);if(G!=null)return this.hit++,G;this.miss++;const V=S1(J,Q,W),q=Uint8Array.prototype.slice.call(J,Q,Q+W);return this.store(q,V),V}}var T1="array",c0="map_key",L8="map_value",j5=(J)=>{if(typeof J==="string"||typeof J==="number")return J;throw new i("The type of key must be string or number but "+typeof J)};class C8{constructor(){this.stack=[],this.stackHeadPosition=-1}get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(J){const Q=this.getUninitializedStateFromPool();Q.type=T1,Q.position=0,Q.size=J,Q.array=new Array(J)}pushMapState(J){const Q=this.getUninitializedStateFromPool();Q.type=c0,Q.readCount=0,Q.size=J,Q.map={}}getUninitializedStateFromPool(){if(this.stackHeadPosition++,this.stackHeadPosition===this.stack.length){const J={type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null};this.stack.push(J)}return this.stack[this.stackHeadPosition]}release(J){if(this.stack[this.stackHeadPosition]!==J)throw new Error("Invalid stack state. Released state is not on top of the stack.");if(J.type===T1){const W=J;W.size=0,W.array=void 0,W.position=0,W.type=void 0}if(J.type===c0||J.type===L8){const W=J;W.size=0,W.map=void 0,W.readCount=0,W.type=void 0}this.stackHeadPosition--}reset(){this.stack.length=0,this.stackHeadPosition=-1}}var m0=-1,v1=new DataView(new ArrayBuffer(0)),R5=new Uint8Array(v1.buffer);try{v1.getInt8(0)}catch(J){if(!(J instanceof RangeError))throw new Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access")}var M8=new RangeError("Insufficient data"),M5=new g1;class H1{constructor(J){this.totalPos=0,this.pos=0,this.view=v1,this.bytes=R5,this.headByte=m0,this.stack=new C8,this.entered=!1,this.extensionCodec=J?.extensionCodec??$0.defaultCodec,this.context=J?.context,this.useBigInt64=J?.useBigInt64??!1,this.rawStrings=J?.rawStrings??!1,this.maxStrLength=J?.maxStrLength??N0,this.maxBinLength=J?.maxBinLength??N0,this.maxArrayLength=J?.maxArrayLength??N0,this.maxMapLength=J?.maxMapLength??N0,this.maxExtLength=J?.maxExtLength??N0,this.keyDecoder=J?.keyDecoder!==void 0?J.keyDecoder:M5,this.mapKeyConverter=J?.mapKeyConverter??j5}clone(){return new H1({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,rawStrings:this.rawStrings,maxStrLength:this.maxStrLength,maxBinLength:this.maxBinLength,maxArrayLength:this.maxArrayLength,maxMapLength:this.maxMapLength,maxExtLength:this.maxExtLength,keyDecoder:this.keyDecoder})}reinitializeState(){this.totalPos=0,this.headByte=m0,this.stack.reset()}setBuffer(J){const Q=b0(J);this.bytes=Q,this.view=new DataView(Q.buffer,Q.byteOffset,Q.byteLength),this.pos=0}appendBuffer(J){if(this.headByte===m0&&!this.hasRemaining(1))this.setBuffer(J);else{const Q=this.bytes.subarray(this.pos),W=b0(J),G=new Uint8Array(Q.length+W.length);G.set(Q),G.set(W,Q.length),this.setBuffer(G)}}hasRemaining(J){return this.view.byteLength-this.pos>=J}createExtraByteError(J){const{view:Q,pos:W}=this;return new RangeError(`Extra ${Q.byteLength-W} of ${Q.byteLength} byte(s) found at buffer[${J}]`)}decode(J){if(this.entered)return this.clone().decode(J);try{this.entered=!0,this.reinitializeState(),this.setBuffer(J);const Q=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return Q}finally{this.entered=!1}}*decodeMulti(J){if(this.entered){yield*this.clone().decodeMulti(J);return}try{this.entered=!0,this.reinitializeState(),this.setBuffer(J);while(this.hasRemaining(1))yield this.doDecodeSync()}finally{this.entered=!1}}async decodeAsync(J){if(this.entered)return this.clone().decodeAsync(J);try{this.entered=!0;let Q=!1,W;for await(let Y of J){if(Q)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(Y);try{W=this.doDecodeSync(),Q=!0}catch(X){if(!(X instanceof RangeError))throw X}this.totalPos+=this.pos}if(Q){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return W}const{headByte:G,pos:V,totalPos:q}=this;throw new RangeError(`Insufficient data in parsing ${Z1(G)} at ${q} (${V} in the current buffer)`)}finally{this.entered=!1}}decodeArrayStream(J){return this.decodeMultiAsync(J,!0)}decodeStream(J){return this.decodeMultiAsync(J,!1)}async*decodeMultiAsync(J,Q){if(this.entered){yield*this.clone().decodeMultiAsync(J,Q);return}try{this.entered=!0;let W=Q,G=-1;for await(let V of J){if(Q&&G===0)throw this.createExtraByteError(this.totalPos);if(this.appendBuffer(V),W)G=this.readArraySize(),W=!1,this.complete();try{while(!0)if(yield this.doDecodeSync(),--G===0)break}catch(q){if(!(q instanceof RangeError))throw q}this.totalPos+=this.pos}}finally{this.entered=!1}}doDecodeSync(){J:while(!0){const J=this.readHeadByte();let Q;if(J>=224)Q=J-256;else if(J<192)if(J<128)Q=J;else if(J<144){const G=J-128;if(G!==0){this.pushMapState(G),this.complete();continue J}else Q={}}else if(J<160){const G=J-144;if(G!==0){this.pushArrayState(G),this.complete();continue J}else Q=[]}else{const G=J-160;Q=this.decodeString(G,0)}else if(J===192)Q=null;else if(J===194)Q=!1;else if(J===195)Q=!0;else if(J===202)Q=this.readF32();else if(J===203)Q=this.readF64();else if(J===204)Q=this.readU8();else if(J===205)Q=this.readU16();else if(J===206)Q=this.readU32();else if(J===207)if(this.useBigInt64)Q=this.readU64AsBigInt();else Q=this.readU64();else if(J===208)Q=this.readI8();else if(J===209)Q=this.readI16();else if(J===210)Q=this.readI32();else if(J===211)if(this.useBigInt64)Q=this.readI64AsBigInt();else Q=this.readI64();else if(J===217){const G=this.lookU8();Q=this.decodeString(G,1)}else if(J===218){const G=this.lookU16();Q=this.decodeString(G,2)}else if(J===219){const G=this.lookU32();Q=this.decodeString(G,4)}else if(J===220){const G=this.readU16();if(G!==0){this.pushArrayState(G),this.complete();continue J}else Q=[]}else if(J===221){const G=this.readU32();if(G!==0){this.pushArrayState(G),this.complete();continue J}else Q=[]}else if(J===222){const G=this.readU16();if(G!==0){this.pushMapState(G),this.complete();continue J}else Q={}}else if(J===223){const G=this.readU32();if(G!==0){this.pushMapState(G),this.complete();continue J}else Q={}}else if(J===196){const G=this.lookU8();Q=this.decodeBinary(G,1)}else if(J===197){const G=this.lookU16();Q=this.decodeBinary(G,2)}else if(J===198){const G=this.lookU32();Q=this.decodeBinary(G,4)}else if(J===212)Q=this.decodeExtension(1,0);else if(J===213)Q=this.decodeExtension(2,0);else if(J===214)Q=this.decodeExtension(4,0);else if(J===215)Q=this.decodeExtension(8,0);else if(J===216)Q=this.decodeExtension(16,0);else if(J===199){const G=this.lookU8();Q=this.decodeExtension(G,1)}else if(J===200){const G=this.lookU16();Q=this.decodeExtension(G,2)}else if(J===201){const G=this.lookU32();Q=this.decodeExtension(G,4)}else throw new i(`Unrecognized type byte: ${Z1(J)}`);this.complete();const W=this.stack;while(W.length>0){const G=W.top();if(G.type===T1)if(G.array[G.position]=Q,G.position++,G.position===G.size)Q=G.array,W.release(G);else continue J;else if(G.type===c0){if(Q==="__proto__")throw new i("The key __proto__ is not allowed");G.key=this.mapKeyConverter(Q),G.type=L8;continue J}else if(G.map[G.key]=Q,G.readCount++,G.readCount===G.size)Q=G.map,W.release(G);else{G.key=null,G.type=c0;continue J}}return Q}}readHeadByte(){if(this.headByte===m0)this.headByte=this.readU8();return this.headByte}complete(){this.headByte=m0}readArraySize(){const J=this.readHeadByte();switch(J){case 220:return this.readU16();case 221:return this.readU32();default:if(J<160)return J-144;else throw new i(`Unrecognized array type byte: ${Z1(J)}`)}}pushMapState(J){if(J>this.maxMapLength)throw new i(`Max length exceeded: map length (${J}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(J)}pushArrayState(J){if(J>this.maxArrayLength)throw new i(`Max length exceeded: array length (${J}) > maxArrayLength (${this.maxArrayLength})`);this.stack.pushArrayState(J)}decodeString(J,Q){if(!this.rawStrings||this.stateIsMapKey())return this.decodeUtf8String(J,Q);return this.decodeBinary(J,Q)}decodeUtf8String(J,Q){if(J>this.maxStrLength)throw new i(`Max length exceeded: UTF-8 byte length (${J}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+Q+J)throw M8;const W=this.pos+Q;let G;if(this.stateIsMapKey()&&this.keyDecoder?.canBeCached(J))G=this.keyDecoder.decode(this.bytes,W,J);else G=$8(this.bytes,W,J);return this.pos+=Q+J,G}stateIsMapKey(){if(this.stack.length>0)return this.stack.top().type===c0;return!1}decodeBinary(J,Q){if(J>this.maxBinLength)throw new i(`Max length exceeded: bin length (${J}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(J+Q))throw M8;const W=this.pos+Q,G=this.bytes.subarray(W,W+J);return this.pos+=Q+J,G}decodeExtension(J,Q){if(J>this.maxExtLength)throw new i(`Max length exceeded: ext length (${J}) > maxExtLength (${this.maxExtLength})`);const W=this.view.getInt8(this.pos+Q),G=this.decodeBinary(J,Q+1);return this.extensionCodec.decode(G,W,this.context)}lookU8(){return this.view.getUint8(this.pos)}lookU16(){return this.view.getUint16(this.pos)}lookU32(){return this.view.getUint32(this.pos)}readU8(){const J=this.view.getUint8(this.pos);return this.pos++,J}readI8(){const J=this.view.getInt8(this.pos);return this.pos++,J}readU16(){const J=this.view.getUint16(this.pos);return this.pos+=2,J}readI16(){const J=this.view.getInt16(this.pos);return this.pos+=2,J}readU32(){const J=this.view.getUint32(this.pos);return this.pos+=4,J}readI32(){const J=this.view.getInt32(this.pos);return this.pos+=4,J}readU64(){const J=j8(this.view,this.pos);return this.pos+=8,J}readI64(){const J=F1(this.view,this.pos);return this.pos+=8,J}readU64AsBigInt(){const J=this.view.getBigUint64(this.pos);return this.pos+=8,J}readI64AsBigInt(){const J=this.view.getBigInt64(this.pos);return this.pos+=8,J}readF32(){const J=this.view.getFloat32(this.pos);return this.pos+=4,J}readF64(){const J=this.view.getFloat64(this.pos);return this.pos+=8,J}}function B0(J,Q){return new H1(Q).decode(J)}var E0=function(J){let Q=J.length;while(--Q>=0)J[Q]=0},E1=function(J,Q,W,G,V){this.static_tree=J,this.extra_bits=Q,this.extra_base=W,this.elems=G,this.max_length=V,this.has_stree=J&&J.length},f1=function(J,Q){this.dyn_tree=J,this.max_code=0,this.stat_desc=Q},J0=function(J,Q,W,G,V){this.good_length=J,this.max_lazy=Q,this.nice_length=W,this.max_chain=G,this.func=V},CJ=function(){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=x1,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(ZJ*2),this.dyn_dtree=new Uint16Array((2*FJ+1)*2),this.bl_tree=new Uint16Array((2*zJ+1)*2),F0(this.dyn_ltree),F0(this.dyn_dtree),F0(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(HJ+1),this.heap=new Uint16Array(2*s1+1),F0(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*s1+1),F0(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},dJ=function(){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},q1=function(J){this.options=O1.assign({level:aJ,method:eJ,chunkSize:16384,windowBits:15,memLevel:8,strategy:sJ},J||{});let Q=this.options;if(Q.raw&&Q.windowBits>0)Q.windowBits=-Q.windowBits;else if(Q.gzip&&Q.windowBits>0&&Q.windowBits<16)Q.windowBits+=16;this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new A6,this.strm.avail_out=0;let W=n0.deflateInit2(this.strm,Q.level,Q.method,Q.windowBits,Q.memLevel,Q.strategy);if(W!==C1)throw new Error(L0[W]);if(Q.header)n0.deflateSetHeader(this.strm,Q.header);if(Q.dictionary){let G;if(typeof Q.dictionary==="string")G=W1.string2buf(Q.dictionary);else if(N6.call(Q.dictionary)==="[object ArrayBuffer]")G=new Uint8Array(Q.dictionary);else G=Q.dictionary;if(W=n0.deflateSetDictionary(this.strm,G),W!==C1)throw new Error(L0[W]);this._dict_set=!0}},Y8=function(J,Q){const W=new q1(Q);if(W.push(J,!0),W.err)throw W.msg||L0[W.err];return W.result},tJ=function(J,Q){return Q=Q||{},Q.raw=!0,Y8(J,Q)},JW=function(J,Q){return Q=Q||{},Q.gzip=!0,Y8(J,Q)},IW=function(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,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},uW=function(){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=!1},X1=function(J){this.options=O1.assign({chunkSize:65536,windowBits:15,to:""},J||{});const Q=this.options;if(Q.raw&&Q.windowBits>=0&&Q.windowBits<16){if(Q.windowBits=-Q.windowBits,Q.windowBits===0)Q.windowBits=-15}if(Q.windowBits>=0&&Q.windowBits<16&&!(J&&J.windowBits))Q.windowBits+=32;if(Q.windowBits>15&&Q.windowBits<48){if((Q.windowBits&15)===0)Q.windowBits|=15}this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new A6,this.strm.avail_out=0;let W=U0.inflateInit2(this.strm,Q.windowBits);if(W!==Q1)throw new Error(L0[W]);if(this.header=new mW,U0.inflateGetHeader(this.strm,this.header),Q.dictionary){if(typeof Q.dictionary==="string")Q.dictionary=W1.string2buf(Q.dictionary);else if(m6.call(Q.dictionary)==="[object ArrayBuffer]")Q.dictionary=new Uint8Array(Q.dictionary);if(Q.raw){if(W=U0.inflateSetDictionary(this.strm,Q.dictionary),W!==Q1)throw new Error(L0[W])}}},P8=function(J,Q){const W=new X1(Q);if(W.push(J),W.err)throw W.msg||L0[W.err];return W.result},lW=function(J,Q){return Q=Q||{},Q.raw=!0,P8(J,Q)};/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */var L5=0,U6=1,C5=2,I5=3,x5=258,G8=29,G1=256,o0=G1+1+G8,T0=30,V8=19,Y6=2*o0+1,j0=15,y1=16,O5=7,q8=256,P6=16,K6=17,F6=18,r1=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]),M1=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]),D5=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),z6=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),w5=512,X0=new Array((o0+2)*2);E0(X0);var l0=new Array(T0*2);E0(l0);var a0=new Array(w5);E0(a0);var s0=new Array(x5-I5+1);E0(s0);var X8=new Array(G8);E0(X8);var L1=new Array(T0);E0(L1);var Z6,H6,k6,$6=(J)=>{return J<256?a0[J]:a0[256+(J>>>7)]},e0=(J,Q)=>{J.pending_buf[J.pending++]=Q&255,J.pending_buf[J.pending++]=Q>>>8&255},n=(J,Q,W)=>{if(J.bi_valid>y1-W)J.bi_buf|=Q<<J.bi_valid&65535,e0(J,J.bi_buf),J.bi_buf=Q>>y1-J.bi_valid,J.bi_valid+=W-y1;else J.bi_buf|=Q<<J.bi_valid&65535,J.bi_valid+=W},W0=(J,Q,W)=>{n(J,W[Q*2],W[Q*2+1])},B6=(J,Q)=>{let W=0;do W|=J&1,J>>>=1,W<<=1;while(--Q>0);return W>>>1},A5=(J)=>{if(J.bi_valid===16)e0(J,J.bi_buf),J.bi_buf=0,J.bi_valid=0;else if(J.bi_valid>=8)J.pending_buf[J.pending++]=J.bi_buf&255,J.bi_buf>>=8,J.bi_valid-=8},N5=(J,Q)=>{const{dyn_tree:W,max_code:G}=Q,V=Q.stat_desc.static_tree,q=Q.stat_desc.has_stree,Y=Q.stat_desc.extra_bits,X=Q.stat_desc.extra_base,z=Q.stat_desc.max_length;let U,P,$,F,K,Z,I=0;for(F=0;F<=j0;F++)J.bl_count[F]=0;W[J.heap[J.heap_max]*2+1]=0;for(U=J.heap_max+1;U<Y6;U++){if(P=J.heap[U],F=W[W[P*2+1]*2+1]+1,F>z)F=z,I++;if(W[P*2+1]=F,P>G)continue;if(J.bl_count[F]++,K=0,P>=X)K=Y[P-X];if(Z=W[P*2],J.opt_len+=Z*(F+K),q)J.static_len+=Z*(V[P*2+1]+K)}if(I===0)return;do{F=z-1;while(J.bl_count[F]===0)F--;J.bl_count[F]--,J.bl_count[F+1]+=2,J.bl_count[z]--,I-=2}while(I>0);for(F=z;F!==0;F--){P=J.bl_count[F];while(P!==0){if($=J.heap[--U],$>G)continue;if(W[$*2+1]!==F)J.opt_len+=(F-W[$*2+1])*W[$*2],W[$*2+1]=F;P--}}},j6=(J,Q,W)=>{const G=new Array(j0+1);let V=0,q,Y;for(q=1;q<=j0;q++)V=V+W[q-1]<<1,G[q]=V;for(Y=0;Y<=Q;Y++){let X=J[Y*2+1];if(X===0)continue;J[Y*2]=B6(G[X]++,X)}},S5=()=>{let J,Q,W,G,V;const q=new Array(j0+1);W=0;for(G=0;G<G8-1;G++){X8[G]=W;for(J=0;J<1<<r1[G];J++)s0[W++]=G}s0[W-1]=G,V=0;for(G=0;G<16;G++){L1[G]=V;for(J=0;J<1<<M1[G];J++)a0[V++]=G}V>>=7;for(;G<T0;G++){L1[G]=V<<7;for(J=0;J<1<<M1[G]-7;J++)a0[256+V++]=G}for(Q=0;Q<=j0;Q++)q[Q]=0;J=0;while(J<=143)X0[J*2+1]=8,J++,q[8]++;while(J<=255)X0[J*2+1]=9,J++,q[9]++;while(J<=279)X0[J*2+1]=7,J++,q[7]++;while(J<=287)X0[J*2+1]=8,J++,q[8]++;j6(X0,o0+1,q);for(J=0;J<T0;J++)l0[J*2+1]=5,l0[J*2]=B6(J,5);Z6=new E1(X0,r1,G1+1,o0,j0),H6=new E1(l0,M1,0,T0,j0),k6=new E1(new Array(0),D5,0,V8,O5)},R6=(J)=>{let Q;for(Q=0;Q<o0;Q++)J.dyn_ltree[Q*2]=0;for(Q=0;Q<T0;Q++)J.dyn_dtree[Q*2]=0;for(Q=0;Q<V8;Q++)J.bl_tree[Q*2]=0;J.dyn_ltree[q8*2]=1,J.opt_len=J.static_len=0,J.sym_next=J.matches=0},M6=(J)=>{if(J.bi_valid>8)e0(J,J.bi_buf);else if(J.bi_valid>0)J.pending_buf[J.pending++]=J.bi_buf;J.bi_buf=0,J.bi_valid=0},I8=(J,Q,W,G)=>{const V=Q*2,q=W*2;return J[V]<J[q]||J[V]===J[q]&&G[Q]<=G[W]},h1=(J,Q,W)=>{const G=J.heap[W];let V=W<<1;while(V<=J.heap_len){if(V<J.heap_len&&I8(Q,J.heap[V+1],J.heap[V],J.depth))V++;if(I8(Q,G,J.heap[V],J.depth))break;J.heap[W]=J.heap[V],W=V,V<<=1}J.heap[W]=G},x8=(J,Q,W)=>{let G,V,q=0,Y,X;if(J.sym_next!==0)do if(G=J.pending_buf[J.sym_buf+q++]&255,G+=(J.pending_buf[J.sym_buf+q++]&255)<<8,V=J.pending_buf[J.sym_buf+q++],G===0)W0(J,V,Q);else{if(Y=s0[V],W0(J,Y+G1+1,Q),X=r1[Y],X!==0)V-=X8[Y],n(J,V,X);if(G--,Y=$6(G),W0(J,Y,W),X=M1[Y],X!==0)G-=L1[Y],n(J,G,X)}while(q<J.sym_next);W0(J,q8,Q)},o1=(J,Q)=>{const W=Q.dyn_tree,G=Q.stat_desc.static_tree,V=Q.stat_desc.has_stree,q=Q.stat_desc.elems;let Y,X,z=-1,U;J.heap_len=0,J.heap_max=Y6;for(Y=0;Y<q;Y++)if(W[Y*2]!==0)J.heap[++J.heap_len]=z=Y,J.depth[Y]=0;else W[Y*2+1]=0;while(J.heap_len<2)if(U=J.heap[++J.heap_len]=z<2?++z:0,W[U*2]=1,J.depth[U]=0,J.opt_len--,V)J.static_len-=G[U*2+1];Q.max_code=z;for(Y=J.heap_len>>1;Y>=1;Y--)h1(J,W,Y);U=q;do Y=J.heap[1],J.heap[1]=J.heap[J.heap_len--],h1(J,W,1),X=J.heap[1],J.heap[--J.heap_max]=Y,J.heap[--J.heap_max]=X,W[U*2]=W[Y*2]+W[X*2],J.depth[U]=(J.depth[Y]>=J.depth[X]?J.depth[Y]:J.depth[X])+1,W[Y*2+1]=W[X*2+1]=U,J.heap[1]=U++,h1(J,W,1);while(J.heap_len>=2);J.heap[--J.heap_max]=J.heap[1],N5(J,Q),j6(W,z,J.bl_count)},O8=(J,Q,W)=>{let G,V=-1,q,Y=Q[1],X=0,z=7,U=4;if(Y===0)z=138,U=3;Q[(W+1)*2+1]=65535;for(G=0;G<=W;G++){if(q=Y,Y=Q[(G+1)*2+1],++X<z&&q===Y)continue;else if(X<U)J.bl_tree[q*2]+=X;else if(q!==0){if(q!==V)J.bl_tree[q*2]++;J.bl_tree[P6*2]++}else if(X<=10)J.bl_tree[K6*2]++;else J.bl_tree[F6*2]++;if(X=0,V=q,Y===0)z=138,U=3;else if(q===Y)z=6,U=3;else z=7,U=4}},D8=(J,Q,W)=>{let G,V=-1,q,Y=Q[1],X=0,z=7,U=4;if(Y===0)z=138,U=3;for(G=0;G<=W;G++){if(q=Y,Y=Q[(G+1)*2+1],++X<z&&q===Y)continue;else if(X<U)do W0(J,q,J.bl_tree);while(--X!==0);else if(q!==0){if(q!==V)W0(J,q,J.bl_tree),X--;W0(J,P6,J.bl_tree),n(J,X-3,2)}else if(X<=10)W0(J,K6,J.bl_tree),n(J,X-3,3);else W0(J,F6,J.bl_tree),n(J,X-11,7);if(X=0,V=q,Y===0)z=138,U=3;else if(q===Y)z=6,U=3;else z=7,U=4}},g5=(J)=>{let Q;O8(J,J.dyn_ltree,J.l_desc.max_code),O8(J,J.dyn_dtree,J.d_desc.max_code),o1(J,J.bl_desc);for(Q=V8-1;Q>=3;Q--)if(J.bl_tree[z6[Q]*2+1]!==0)break;return J.opt_len+=3*(Q+1)+5+5+4,Q},T5=(J,Q,W,G)=>{let V;n(J,Q-257,5),n(J,W-1,5),n(J,G-4,4);for(V=0;V<G;V++)n(J,J.bl_tree[z6[V]*2+1],3);D8(J,J.dyn_ltree,Q-1),D8(J,J.dyn_dtree,W-1)},v5=(J)=>{let Q=4093624447,W;for(W=0;W<=31;W++,Q>>>=1)if(Q&1&&J.dyn_ltree[W*2]!==0)return 0;if(J.dyn_ltree[18]!==0||J.dyn_ltree[20]!==0||J.dyn_ltree[26]!==0)return 1;for(W=32;W<G1;W++)if(J.dyn_ltree[W*2]!==0)return 1;return 0},w8=!1,y5=(J)=>{if(!w8)S5(),w8=!0;J.l_desc=new f1(J.dyn_ltree,Z6),J.d_desc=new f1(J.dyn_dtree,H6),J.bl_desc=new f1(J.bl_tree,k6),J.bi_buf=0,J.bi_valid=0,R6(J)},L6=(J,Q,W,G)=>{if(n(J,(L5<<1)+(G?1:0),3),M6(J),e0(J,W),e0(J,~W),W)J.pending_buf.set(J.window.subarray(Q,Q+W),J.pending);J.pending+=W},E5=(J)=>{n(J,U6<<1,3),W0(J,q8,X0),A5(J)},f5=(J,Q,W,G)=>{let V,q,Y=0;if(J.level>0){if(J.strm.data_type===2)J.strm.data_type=v5(J);if(o1(J,J.l_desc),o1(J,J.d_desc),Y=g5(J),V=J.opt_len+3+7>>>3,q=J.static_len+3+7>>>3,q<=V)V=q}else V=q=W+5;if(W+4<=V&&Q!==-1)L6(J,Q,W,G);else if(J.strategy===4||q===V)n(J,(U6<<1)+(G?1:0),3),x8(J,X0,l0);else n(J,(C5<<1)+(G?1:0),3),T5(J,J.l_desc.max_code+1,J.d_desc.max_code+1,Y+1),x8(J,J.dyn_ltree,J.dyn_dtree);if(R6(J),G)M6(J)},h5=(J,Q,W)=>{if(J.pending_buf[J.sym_buf+J.sym_next++]=Q,J.pending_buf[J.sym_buf+J.sym_next++]=Q>>8,J.pending_buf[J.sym_buf+J.sym_next++]=W,Q===0)J.dyn_ltree[W*2]++;else J.matches++,Q--,J.dyn_ltree[(s0[W]+G1+1)*2]++,J.dyn_dtree[$6(Q)*2]++;return J.sym_next===J.sym_end},p5=y5,b5=L6,u5=f5,m5=h5,c5=E5,_5={_tr_init:p5,_tr_stored_block:b5,_tr_flush_block:u5,_tr_tally:m5,_tr_align:c5},d5=(J,Q,W,G)=>{let V=J&65535|0,q=J>>>16&65535|0,Y=0;while(W!==0){Y=W>2000?2000:W,W-=Y;do V=V+Q[G++]|0,q=q+V|0;while(--Y);V%=65521,q%=65521}return V|q<<16|0},t0=d5,i5=()=>{let J,Q=[];for(var W=0;W<256;W++){J=W;for(var G=0;G<8;G++)J=J&1?3988292384^J>>>1:J>>>1;Q[W]=J}return Q},l5=new Uint32Array(i5()),n5=(J,Q,W,G)=>{const V=l5,q=G+W;J^=-1;for(let Y=G;Y<q;Y++)J=J>>>8^V[(J^Q[Y])&255];return J^-1},_=n5,L0={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"},x0={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},{_tr_init:r5,_tr_stored_block:a1,_tr_flush_block:o5,_tr_tally:Z0,_tr_align:a5}=_5,{Z_NO_FLUSH:H0,Z_PARTIAL_FLUSH:s5,Z_FULL_FLUSH:e5,Z_FINISH:a,Z_BLOCK:A8,Z_OK:d,Z_STREAM_END:N8,Z_STREAM_ERROR:Q0,Z_DATA_ERROR:t5,Z_BUF_ERROR:p1,Z_DEFAULT_COMPRESSION:JJ,Z_FILTERED:WJ,Z_HUFFMAN_ONLY:k1,Z_RLE:QJ,Z_FIXED:GJ,Z_DEFAULT_STRATEGY:VJ,Z_UNKNOWN:qJ,Z_DEFLATED:x1}=x0,XJ=9,UJ=15,YJ=8,PJ=29,KJ=256,s1=KJ+1+PJ,FJ=30,zJ=19,ZJ=2*s1+1,HJ=15,v=3,z0=258,G0=z0+v+1,kJ=32,v0=42,U8=57,e1=69,t1=73,J8=91,W8=103,R0=113,d0=666,l=1,f0=2,C0=3,h0=4,$J=3,M0=(J,Q)=>{return J.msg=L0[Q],Q},S8=(J)=>{return J*2-(J>4?9:0)},F0=(J)=>{let Q=J.length;while(--Q>=0)J[Q]=0},BJ=(J)=>{let Q,W,G,V=J.w_size;Q=J.hash_size,G=Q;do W=J.head[--G],J.head[G]=W>=V?W-V:0;while(--Q);Q=V,G=Q;do W=J.prev[--G],J.prev[G]=W>=V?W-V:0;while(--Q)},jJ=(J,Q,W)=>(Q<<J.hash_shift^W)&J.hash_mask,k0=jJ,r=(J)=>{const Q=J.state;let W=Q.pending;if(W>J.avail_out)W=J.avail_out;if(W===0)return;if(J.output.set(Q.pending_buf.subarray(Q.pending_out,Q.pending_out+W),J.next_out),J.next_out+=W,Q.pending_out+=W,J.total_out+=W,J.avail_out-=W,Q.pending-=W,Q.pending===0)Q.pending_out=0},o=(J,Q)=>{o5(J,J.block_start>=0?J.block_start:-1,J.strstart-J.block_start,Q),J.block_start=J.strstart,r(J.strm)},y=(J,Q)=>{J.pending_buf[J.pending++]=Q},_0=(J,Q)=>{J.pending_buf[J.pending++]=Q>>>8&255,J.pending_buf[J.pending++]=Q&255},Q8=(J,Q,W,G)=>{let V=J.avail_in;if(V>G)V=G;if(V===0)return 0;if(J.avail_in-=V,Q.set(J.input.subarray(J.next_in,J.next_in+V),W),J.state.wrap===1)J.adler=t0(J.adler,Q,V,W);else if(J.state.wrap===2)J.adler=_(J.adler,Q,V,W);return J.next_in+=V,J.total_in+=V,V},C6=(J,Q)=>{let{max_chain_length:W,strstart:G}=J,V,q,Y=J.prev_length,X=J.nice_match;const z=J.strstart>J.w_size-G0?J.strstart-(J.w_size-G0):0,U=J.window,P=J.w_mask,$=J.prev,F=J.strstart+z0;let K=U[G+Y-1],Z=U[G+Y];if(J.prev_length>=J.good_match)W>>=2;if(X>J.lookahead)X=J.lookahead;do{if(V=Q,U[V+Y]!==Z||U[V+Y-1]!==K||U[V]!==U[G]||U[++V]!==U[G+1])continue;G+=2,V++;do;while(U[++G]===U[++V]&&U[++G]===U[++V]&&U[++G]===U[++V]&&U[++G]===U[++V]&&U[++G]===U[++V]&&U[++G]===U[++V]&&U[++G]===U[++V]&&U[++G]===U[++V]&&G<F);if(q=z0-(F-G),G=F-z0,q>Y){if(J.match_start=Q,Y=q,q>=X)break;K=U[G+Y-1],Z=U[G+Y]}}while((Q=$[Q&P])>z&&--W!==0);if(Y<=J.lookahead)return Y;return J.lookahead},y0=(J)=>{const Q=J.w_size;let W,G,V;do{if(G=J.window_size-J.lookahead-J.strstart,J.strstart>=Q+(Q-G0)){if(J.window.set(J.window.subarray(Q,Q+Q-G),0),J.match_start-=Q,J.strstart-=Q,J.block_start-=Q,J.insert>J.strstart)J.insert=J.strstart;BJ(J),G+=Q}if(J.strm.avail_in===0)break;if(W=Q8(J.strm,J.window,J.strstart+J.lookahead,G),J.lookahead+=W,J.lookahead+J.insert>=v){V=J.strstart-J.insert,J.ins_h=J.window[V],J.ins_h=k0(J,J.ins_h,J.window[V+1]);while(J.insert)if(J.ins_h=k0(J,J.ins_h,J.window[V+v-1]),J.prev[V&J.w_mask]=J.head[J.ins_h],J.head[J.ins_h]=V,V++,J.insert--,J.lookahead+J.insert<v)break}}while(J.lookahead<G0&&J.strm.avail_in!==0)},I6=(J,Q)=>{let W=J.pending_buf_size-5>J.w_size?J.w_size:J.pending_buf_size-5,G,V,q,Y=0,X=J.strm.avail_in;do{if(G=65535,q=J.bi_valid+42>>3,J.strm.avail_out<q)break;if(q=J.strm.avail_out-q,V=J.strstart-J.block_start,G>V+J.strm.avail_in)G=V+J.strm.avail_in;if(G>q)G=q;if(G<W&&(G===0&&Q!==a||Q===H0||G!==V+J.strm.avail_in))break;if(Y=Q===a&&G===V+J.strm.avail_in?1:0,a1(J,0,0,Y),J.pending_buf[J.pending-4]=G,J.pending_buf[J.pending-3]=G>>8,J.pending_buf[J.pending-2]=~G,J.pending_buf[J.pending-1]=~G>>8,r(J.strm),V){if(V>G)V=G;J.strm.output.set(J.window.subarray(J.block_start,J.block_start+V),J.strm.next_out),J.strm.next_out+=V,J.strm.avail_out-=V,J.strm.total_out+=V,J.block_start+=V,G-=V}if(G)Q8(J.strm,J.strm.output,J.strm.next_out,G),J.strm.next_out+=G,J.strm.avail_out-=G,J.strm.total_out+=G}while(Y===0);if(X-=J.strm.avail_in,X){if(X>=J.w_size)J.matches=2,J.window.set(J.strm.input.subarray(J.strm.next_in-J.w_size,J.strm.next_in),0),J.strstart=J.w_size,J.insert=J.strstart;else{if(J.window_size-J.strstart<=X){if(J.strstart-=J.w_size,J.window.set(J.window.subarray(J.w_size,J.w_size+J.strstart),0),J.matches<2)J.matches++;if(J.insert>J.strstart)J.insert=J.strstart}J.window.set(J.strm.input.subarray(J.strm.next_in-X,J.strm.next_in),J.strstart),J.strstart+=X,J.insert+=X>J.w_size-J.insert?J.w_size-J.insert:X}J.block_start=J.strstart}if(J.high_water<J.strstart)J.high_water=J.strstart;if(Y)return h0;if(Q!==H0&&Q!==a&&J.strm.avail_in===0&&J.strstart===J.block_start)return f0;if(q=J.window_size-J.strstart,J.strm.avail_in>q&&J.block_start>=J.w_size){if(J.block_start-=J.w_size,J.strstart-=J.w_size,J.window.set(J.window.subarray(J.w_size,J.w_size+J.strstart),0),J.matches<2)J.matches++;if(q+=J.w_size,J.insert>J.strstart)J.insert=J.strstart}if(q>J.strm.avail_in)q=J.strm.avail_in;if(q)Q8(J.strm,J.window,J.strstart,q),J.strstart+=q,J.insert+=q>J.w_size-J.insert?J.w_size-J.insert:q;if(J.high_water<J.strstart)J.high_water=J.strstart;if(q=J.bi_valid+42>>3,q=J.pending_buf_size-q>65535?65535:J.pending_buf_size-q,W=q>J.w_size?J.w_size:q,V=J.strstart-J.block_start,V>=W||(V||Q===a)&&Q!==H0&&J.strm.avail_in===0&&V<=q)G=V>q?q:V,Y=Q===a&&J.strm.avail_in===0&&G===V?1:0,a1(J,J.block_start,G,Y),J.block_start+=G,r(J.strm);return Y?C0:l},b1=(J,Q)=>{let W,G;for(;;){if(J.lookahead<G0){if(y0(J),J.lookahead<G0&&Q===H0)return l;if(J.lookahead===0)break}if(W=0,J.lookahead>=v)J.ins_h=k0(J,J.ins_h,J.window[J.strstart+v-1]),W=J.prev[J.strstart&J.w_mask]=J.head[J.ins_h],J.head[J.ins_h]=J.strstart;if(W!==0&&J.strstart-W<=J.w_size-G0)J.match_length=C6(J,W);if(J.match_length>=v)if(G=Z0(J,J.strstart-J.match_start,J.match_length-v),J.lookahead-=J.match_length,J.match_length<=J.max_lazy_match&&J.lookahead>=v){J.match_length--;do J.strstart++,J.ins_h=k0(J,J.ins_h,J.window[J.strstart+v-1]),W=J.prev[J.strstart&J.w_mask]=J.head[J.ins_h],J.head[J.ins_h]=J.strstart;while(--J.match_length!==0);J.strstart++}else J.strstart+=J.match_length,J.match_length=0,J.ins_h=J.window[J.strstart],J.ins_h=k0(J,J.ins_h,J.window[J.strstart+1]);else G=Z0(J,0,J.window[J.strstart]),J.lookahead--,J.strstart++;if(G){if(o(J,!1),J.strm.avail_out===0)return l}}if(J.insert=J.strstart<v-1?J.strstart:v-1,Q===a){if(o(J,!0),J.strm.avail_out===0)return C0;return h0}if(J.sym_next){if(o(J,!1),J.strm.avail_out===0)return l}return f0},S0=(J,Q)=>{let W,G,V;for(;;){if(J.lookahead<G0){if(y0(J),J.lookahead<G0&&Q===H0)return l;if(J.lookahead===0)break}if(W=0,J.lookahead>=v)J.ins_h=k0(J,J.ins_h,J.window[J.strstart+v-1]),W=J.prev[J.strstart&J.w_mask]=J.head[J.ins_h],J.head[J.ins_h]=J.strstart;if(J.prev_length=J.match_length,J.prev_match=J.match_start,J.match_length=v-1,W!==0&&J.prev_length<J.max_lazy_match&&J.strstart-W<=J.w_size-G0){if(J.match_length=C6(J,W),J.match_length<=5&&(J.strategy===WJ||J.match_length===v&&J.strstart-J.match_start>4096))J.match_length=v-1}if(J.prev_length>=v&&J.match_length<=J.prev_length){V=J.strstart+J.lookahead-v,G=Z0(J,J.strstart-1-J.prev_match,J.prev_length-v),J.lookahead-=J.prev_length-1,J.prev_length-=2;do if(++J.strstart<=V)J.ins_h=k0(J,J.ins_h,J.window[J.strstart+v-1]),W=J.prev[J.strstart&J.w_mask]=J.head[J.ins_h],J.head[J.ins_h]=J.strstart;while(--J.prev_length!==0);if(J.match_available=0,J.match_length=v-1,J.strstart++,G){if(o(J,!1),J.strm.avail_out===0)return l}}else if(J.match_available){if(G=Z0(J,0,J.window[J.strstart-1]),G)o(J,!1);if(J.strstart++,J.lookahead--,J.strm.avail_out===0)return l}else J.match_available=1,J.strstart++,J.lookahead--}if(J.match_available)G=Z0(J,0,J.window[J.strstart-1]),J.match_available=0;if(J.insert=J.strstart<v-1?J.strstart:v-1,Q===a){if(o(J,!0),J.strm.avail_out===0)return C0;return h0}if(J.sym_next){if(o(J,!1),J.strm.avail_out===0)return l}return f0},RJ=(J,Q)=>{let W,G,V,q;const Y=J.window;for(;;){if(J.lookahead<=z0){if(y0(J),J.lookahead<=z0&&Q===H0)return l;if(J.lookahead===0)break}if(J.match_length=0,J.lookahead>=v&&J.strstart>0){if(V=J.strstart-1,G=Y[V],G===Y[++V]&&G===Y[++V]&&G===Y[++V]){q=J.strstart+z0;do;while(G===Y[++V]&&G===Y[++V]&&G===Y[++V]&&G===Y[++V]&&G===Y[++V]&&G===Y[++V]&&G===Y[++V]&&G===Y[++V]&&V<q);if(J.match_length=z0-(q-V),J.match_length>J.lookahead)J.match_length=J.lookahead}}if(J.match_length>=v)W=Z0(J,1,J.match_length-v),J.lookahead-=J.match_length,J.strstart+=J.match_length,J.match_length=0;else W=Z0(J,0,J.window[J.strstart]),J.lookahead--,J.strstart++;if(W){if(o(J,!1),J.strm.avail_out===0)return l}}if(J.insert=0,Q===a){if(o(J,!0),J.strm.avail_out===0)return C0;return h0}if(J.sym_next){if(o(J,!1),J.strm.avail_out===0)return l}return f0},MJ=(J,Q)=>{let W;for(;;){if(J.lookahead===0){if(y0(J),J.lookahead===0){if(Q===H0)return l;break}}if(J.match_length=0,W=Z0(J,0,J.window[J.strstart]),J.lookahead--,J.strstart++,W){if(o(J,!1),J.strm.avail_out===0)return l}}if(J.insert=0,Q===a){if(o(J,!0),J.strm.avail_out===0)return C0;return h0}if(J.sym_next){if(o(J,!1),J.strm.avail_out===0)return l}return f0},i0=[new J0(0,0,0,0,I6),new J0(4,4,8,4,b1),new J0(4,5,16,8,b1),new J0(4,6,32,32,b1),new J0(4,4,16,16,S0),new J0(8,16,32,32,S0),new J0(8,16,128,128,S0),new J0(8,32,128,256,S0),new J0(32,128,258,1024,S0),new J0(32,258,258,4096,S0)],LJ=(J)=>{J.window_size=2*J.w_size,F0(J.head),J.max_lazy_match=i0[J.level].max_lazy,J.good_match=i0[J.level].good_length,J.nice_match=i0[J.level].nice_length,J.max_chain_length=i0[J.level].max_chain,J.strstart=0,J.block_start=0,J.lookahead=0,J.insert=0,J.match_length=J.prev_length=v-1,J.match_available=0,J.ins_h=0},V1=(J)=>{if(!J)return 1;const Q=J.state;if(!Q||Q.strm!==J||Q.status!==v0&&Q.status!==U8&&Q.status!==e1&&Q.status!==t1&&Q.status!==J8&&Q.status!==W8&&Q.status!==R0&&Q.status!==d0)return 1;return 0},x6=(J)=>{if(V1(J))return M0(J,Q0);J.total_in=J.total_out=0,J.data_type=qJ;const Q=J.state;if(Q.pending=0,Q.pending_out=0,Q.wrap<0)Q.wrap=-Q.wrap;return Q.status=Q.wrap===2?U8:Q.wrap?v0:R0,J.adler=Q.wrap===2?0:1,Q.last_flush=-2,r5(Q),d},O6=(J)=>{const Q=x6(J);if(Q===d)LJ(J.state);return Q},IJ=(J,Q)=>{if(V1(J)||J.state.wrap!==2)return Q0;return J.state.gzhead=Q,d},D6=(J,Q,W,G,V,q)=>{if(!J)return Q0;let Y=1;if(Q===JJ)Q=6;if(G<0)Y=0,G=-G;else if(G>15)Y=2,G-=16;if(V<1||V>XJ||W!==x1||G<8||G>15||Q<0||Q>9||q<0||q>GJ||G===8&&Y!==1)return M0(J,Q0);if(G===8)G=9;const X=new CJ;return J.state=X,X.strm=J,X.status=v0,X.wrap=Y,X.gzhead=null,X.w_bits=G,X.w_size=1<<X.w_bits,X.w_mask=X.w_size-1,X.hash_bits=V+7,X.hash_size=1<<X.hash_bits,X.hash_mask=X.hash_size-1,X.hash_shift=~~((X.hash_bits+v-1)/v),X.window=new Uint8Array(X.w_size*2),X.head=new Uint16Array(X.hash_size),X.prev=new Uint16Array(X.w_size),X.lit_bufsize=1<<V+6,X.pending_buf_size=X.lit_bufsize*4,X.pending_buf=new Uint8Array(X.pending_buf_size),X.sym_buf=X.lit_bufsize,X.sym_end=(X.lit_bufsize-1)*3,X.level=Q,X.strategy=q,X.method=W,O6(J)},xJ=(J,Q)=>{return D6(J,Q,x1,UJ,YJ,VJ)},OJ=(J,Q)=>{if(V1(J)||Q>A8||Q<0)return J?M0(J,Q0):Q0;const W=J.state;if(!J.output||J.avail_in!==0&&!J.input||W.status===d0&&Q!==a)return M0(J,J.avail_out===0?p1:Q0);const G=W.last_flush;if(W.last_flush=Q,W.pending!==0){if(r(J),J.avail_out===0)return W.last_flush=-1,d}else if(J.avail_in===0&&S8(Q)<=S8(G)&&Q!==a)return M0(J,p1);if(W.status===d0&&J.avail_in!==0)return M0(J,p1);if(W.status===v0&&W.wrap===0)W.status=R0;if(W.status===v0){let V=x1+(W.w_bits-8<<4)<<8,q=-1;if(W.strategy>=k1||W.level<2)q=0;else if(W.level<6)q=1;else if(W.level===6)q=2;else q=3;if(V|=q<<6,W.strstart!==0)V|=kJ;if(V+=31-V%31,_0(W,V),W.strstart!==0)_0(W,J.adler>>>16),_0(W,J.adler&65535);if(J.adler=1,W.status=R0,r(J),W.pending!==0)return W.last_flush=-1,d}if(W.status===U8)if(J.adler=0,y(W,31),y(W,139),y(W,8),!W.gzhead){if(y(W,0),y(W,0),y(W,0),y(W,0),y(W,0),y(W,W.level===9?2:W.strategy>=k1||W.level<2?4:0),y(W,$J),W.status=R0,r(J),W.pending!==0)return W.last_flush=-1,d}else{if(y(W,(W.gzhead.text?1:0)+(W.gzhead.hcrc?2:0)+(!W.gzhead.extra?0:4)+(!W.gzhead.name?0:8)+(!W.gzhead.comment?0:16)),y(W,W.gzhead.time&255),y(W,W.gzhead.time>>8&255),y(W,W.gzhead.time>>16&255),y(W,W.gzhead.time>>24&255),y(W,W.level===9?2:W.strategy>=k1||W.level<2?4:0),y(W,W.gzhead.os&255),W.gzhead.extra&&W.gzhead.extra.length)y(W,W.gzhead.extra.length&255),y(W,W.gzhead.extra.length>>8&255);if(W.gzhead.hcrc)J.adler=_(J.adler,W.pending_buf,W.pending,0);W.gzindex=0,W.status=e1}if(W.status===e1){if(W.gzhead.extra){let V=W.pending,q=(W.gzhead.extra.length&65535)-W.gzindex;while(W.pending+q>W.pending_buf_size){let X=W.pending_buf_size-W.pending;if(W.pending_buf.set(W.gzhead.extra.subarray(W.gzindex,W.gzindex+X),W.pending),W.pending=W.pending_buf_size,W.gzhead.hcrc&&W.pending>V)J.adler=_(J.adler,W.pending_buf,W.pending-V,V);if(W.gzindex+=X,r(J),W.pending!==0)return W.last_flush=-1,d;V=0,q-=X}let Y=new Uint8Array(W.gzhead.extra);if(W.pending_buf.set(Y.subarray(W.gzindex,W.gzindex+q),W.pending),W.pending+=q,W.gzhead.hcrc&&W.pending>V)J.adler=_(J.adler,W.pending_buf,W.pending-V,V);W.gzindex=0}W.status=t1}if(W.status===t1){if(W.gzhead.name){let V=W.pending,q;do{if(W.pending===W.pending_buf_size){if(W.gzhead.hcrc&&W.pending>V)J.adler=_(J.adler,W.pending_buf,W.pending-V,V);if(r(J),W.pending!==0)return W.last_flush=-1,d;V=0}if(W.gzindex<W.gzhead.name.length)q=W.gzhead.name.charCodeAt(W.gzindex++)&255;else q=0;y(W,q)}while(q!==0);if(W.gzhead.hcrc&&W.pending>V)J.adler=_(J.adler,W.pending_buf,W.pending-V,V);W.gzindex=0}W.status=J8}if(W.status===J8){if(W.gzhead.comment){let V=W.pending,q;do{if(W.pending===W.pending_buf_size){if(W.gzhead.hcrc&&W.pending>V)J.adler=_(J.adler,W.pending_buf,W.pending-V,V);if(r(J),W.pending!==0)return W.last_flush=-1,d;V=0}if(W.gzindex<W.gzhead.comment.length)q=W.gzhead.comment.charCodeAt(W.gzindex++)&255;else q=0;y(W,q)}while(q!==0);if(W.gzhead.hcrc&&W.pending>V)J.adler=_(J.adler,W.pending_buf,W.pending-V,V)}W.status=W8}if(W.status===W8){if(W.gzhead.hcrc){if(W.pending+2>W.pending_buf_size){if(r(J),W.pending!==0)return W.last_flush=-1,d}y(W,J.adler&255),y(W,J.adler>>8&255),J.adler=0}if(W.status=R0,r(J),W.pending!==0)return W.last_flush=-1,d}if(J.avail_in!==0||W.lookahead!==0||Q!==H0&&W.status!==d0){let V=W.level===0?I6(W,Q):W.strategy===k1?MJ(W,Q):W.strategy===QJ?RJ(W,Q):i0[W.level].func(W,Q);if(V===C0||V===h0)W.status=d0;if(V===l||V===C0){if(J.avail_out===0)W.last_flush=-1;return d}if(V===f0){if(Q===s5)a5(W);else if(Q!==A8){if(a1(W,0,0,!1),Q===e5){if(F0(W.head),W.lookahead===0)W.strstart=0,W.block_start=0,W.insert=0}}if(r(J),J.avail_out===0)return W.last_flush=-1,d}}if(Q!==a)return d;if(W.wrap<=0)return N8;if(W.wrap===2)y(W,J.adler&255),y(W,J.adler>>8&255),y(W,J.adler>>16&255),y(W,J.adler>>24&255),y(W,J.total_in&255),y(W,J.total_in>>8&255),y(W,J.total_in>>16&255),y(W,J.total_in>>24&255);else _0(W,J.adler>>>16),_0(W,J.adler&65535);if(r(J),W.wrap>0)W.wrap=-W.wrap;return W.pending!==0?d:N8},DJ=(J)=>{if(V1(J))return Q0;const Q=J.state.status;return J.state=null,Q===R0?M0(J,t5):d},wJ=(J,Q)=>{let W=Q.length;if(V1(J))return Q0;const G=J.state,V=G.wrap;if(V===2||V===1&&G.status!==v0||G.lookahead)return Q0;if(V===1)J.adler=t0(J.adler,Q,W,0);if(G.wrap=0,W>=G.w_size){if(V===0)F0(G.head),G.strstart=0,G.block_start=0,G.insert=0;let z=new Uint8Array(G.w_size);z.set(Q.subarray(W-G.w_size,W),0),Q=z,W=G.w_size}const{avail_in:q,next_in:Y,input:X}=J;J.avail_in=W,J.next_in=0,J.input=Q,y0(G);while(G.lookahead>=v){let z=G.strstart,U=G.lookahead-(v-1);do G.ins_h=k0(G,G.ins_h,G.window[z+v-1]),G.prev[z&G.w_mask]=G.head[G.ins_h],G.head[G.ins_h]=z,z++;while(--U);G.strstart=z,G.lookahead=v-1,y0(G)}return G.strstart+=G.lookahead,G.block_start=G.strstart,G.insert=G.lookahead,G.lookahead=0,G.match_length=G.prev_length=v-1,G.match_available=0,J.next_in=Y,J.input=X,J.avail_in=q,G.wrap=V,d},AJ=xJ,NJ=D6,SJ=O6,gJ=x6,TJ=IJ,vJ=OJ,yJ=DJ,EJ=wJ,fJ="pako deflate (from Nodeca project)",n0={deflateInit:AJ,deflateInit2:NJ,deflateReset:SJ,deflateResetKeep:gJ,deflateSetHeader:TJ,deflate:vJ,deflateEnd:yJ,deflateSetDictionary:EJ,deflateInfo:fJ},hJ=(J,Q)=>{return Object.prototype.hasOwnProperty.call(J,Q)},pJ=function(J){const Q=Array.prototype.slice.call(arguments,1);while(Q.length){const W=Q.shift();if(!W)continue;if(typeof W!=="object")throw new TypeError(W+"must be non-object");for(let G in W)if(hJ(W,G))J[G]=W[G]}return J},bJ=(J)=>{let Q=0;for(let G=0,V=J.length;G<V;G++)Q+=J[G].length;const W=new Uint8Array(Q);for(let G=0,V=0,q=J.length;G<q;G++){let Y=J[G];W.set(Y,V),V+=Y.length}return W},O1={assign:pJ,flattenChunks:bJ},w6=!0