@uurtech/jdf 0.1.14 → 0.1.17

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/jdfjs.js CHANGED
@@ -1,5 +1,5 @@
1
- var Bf=Object.create;var li=Object.defineProperty;var qf=Object.getOwnPropertyDescriptor;var Uf=Object.getOwnPropertyNames;var Hf=Object.getPrototypeOf,Zf=Object.prototype.hasOwnProperty;var ve=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var At=(e,t)=>()=>(e&&(t=e(e=0)),t);var v=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Wf=(e,t)=>{for(var r in t)li(e,r,{get:t[r],enumerable:true});},Jf=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Uf(t))!Zf.call(e,n)&&n!==r&&li(e,n,{get:()=>t[n],enumerable:!(i=qf(t,n))||i.enumerable});return e};var $f=(e,t,r)=>(r=e!=null?Bf(Hf(e)):{},Jf(li(r,"default",{value:e,enumerable:true}),e));var sa=At(()=>{});function B(e,t="mm"){switch(t){case "mm":return e*la;case "in":return e*Vf;case "pt":return e*Yf;case "px":return e;default:return e*la}}function ua(e,t="portrait"){let r=typeof e=="string"?Xf[e]:e;return t==="landscape"?{width:r.height,height:r.width}:{...r}}var Xf,fa,la,Vf,Yf,da=At(()=>{Xf={A3:{width:297,height:420},A4:{width:210,height:297},A5:{width:148,height:210},Letter:{width:215.9,height:279.4},Legal:{width:215.9,height:355.6},Tabloid:{width:279.4,height:431.8}},fa={top:25,right:20,bottom:25,left:20},la=3.7795275591,Vf=96,Yf=1.3333333333;});var fi,ha,ca=At(()=>{fi="document.json",ha="manifest.json";});var cr=At(()=>{sa();da();ca();});var Rt=v((cg,hi)=>{typeof process>"u"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0?hi.exports={nextTick:cu}:hi.exports=process;function cu(e,t,r,i){if(typeof e!="function")throw new TypeError('"callback" argument must be a function');var n=arguments.length,a,o;switch(n){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function(){e.call(null,t);});case 3:return process.nextTick(function(){e.call(null,t,r);});case 4:return process.nextTick(function(){e.call(null,t,r,i);});default:for(a=new Array(n-1),o=0;o<a.length;)a[o++]=arguments[o];return process.nextTick(function(){e.apply(null,a);})}}});var ba=v((pg,_a)=>{var pu={}.toString;_a.exports=Array.isArray||function(e){return pu.call(e)=="[object Array]"};});var ci=v((gg,ya)=>{ya.exports=ve("stream");});var Ot=v((pi,xa)=>{var gr=ve("buffer"),_e=gr.Buffer;function wa(e,t){for(var r in e)t[r]=e[r];}_e.from&&_e.alloc&&_e.allocUnsafe&&_e.allocUnsafeSlow?xa.exports=gr:(wa(gr,pi),pi.Buffer=tt);function tt(e,t,r){return _e(e,t,r)}wa(_e,tt);tt.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return _e(e,t,r)};tt.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=_e(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};tt.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return _e(e)};tt.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return gr.SlowBuffer(e)};});var rt=v(Z=>{function gu(e){return Array.isArray?Array.isArray(e):mr(e)==="[object Array]"}Z.isArray=gu;function mu(e){return typeof e=="boolean"}Z.isBoolean=mu;function vu(e){return e===null}Z.isNull=vu;function _u(e){return e==null}Z.isNullOrUndefined=_u;function bu(e){return typeof e=="number"}Z.isNumber=bu;function yu(e){return typeof e=="string"}Z.isString=yu;function wu(e){return typeof e=="symbol"}Z.isSymbol=wu;function xu(e){return e===void 0}Z.isUndefined=xu;function Eu(e){return mr(e)==="[object RegExp]"}Z.isRegExp=Eu;function Su(e){return typeof e=="object"&&e!==null}Z.isObject=Su;function ku(e){return mr(e)==="[object Date]"}Z.isDate=ku;function Tu(e){return mr(e)==="[object Error]"||e instanceof Error}Z.isError=Tu;function Cu(e){return typeof e=="function"}Z.isFunction=Cu;function Au(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}Z.isPrimitive=Au;Z.isBuffer=ve("buffer").Buffer.isBuffer;function mr(e){return Object.prototype.toString.call(e)}});var Ea=v((vg,gi)=>{typeof Object.create=="function"?gi.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:false,writable:true,configurable:true}}));}:gi.exports=function(t,r){if(r){t.super_=r;var i=function(){};i.prototype=r.prototype,t.prototype=new i,t.prototype.constructor=t;}};});var it=v((_g,vi)=>{try{if(mi=ve("util"),typeof mi.inherits!="function")throw "";vi.exports=mi.inherits;}catch{vi.exports=Ea();}var mi;});var ka=v((bg,_i)=>{function Ru(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Sa=Ot().Buffer,Dt=ve("util");function Ou(e,t,r){e.copy(t,r);}_i.exports=(function(){function e(){Ru(this,e),this.head=null,this.tail=null,this.length=0;}return e.prototype.push=function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length;},e.prototype.unshift=function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length;},e.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0;},e.prototype.join=function(r){if(this.length===0)return "";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n},e.prototype.concat=function(r){if(this.length===0)return Sa.alloc(0);for(var i=Sa.allocUnsafe(r>>>0),n=this.head,a=0;n;)Ou(n.data,i,a),a+=n.data.length,n=n.next;return i},e})();Dt&&Dt.inspect&&Dt.inspect.custom&&(_i.exports.prototype[Dt.inspect.custom]=function(){var e=Dt.inspect({length:this.length});return this.constructor.name+" "+e});});var bi=v((yg,Ta)=>{var vr=Rt();function Du(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=true,vr.nextTick(_r,this,e)):vr.nextTick(_r,this,e)),this):(this._readableState&&(this._readableState.destroyed=true),this._writableState&&(this._writableState.destroyed=true),this._destroy(e||null,function(a){!t&&a?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=true,vr.nextTick(_r,r,a)):vr.nextTick(_r,r,a):t&&t(a);}),this)}function Iu(){this._readableState&&(this._readableState.destroyed=false,this._readableState.reading=false,this._readableState.ended=false,this._readableState.endEmitted=false),this._writableState&&(this._writableState.destroyed=false,this._writableState.ended=false,this._writableState.ending=false,this._writableState.finalCalled=false,this._writableState.prefinished=false,this._writableState.finished=false,this._writableState.errorEmitted=false);}function _r(e,t){e.emit("error",t);}Ta.exports={destroy:Du,undestroy:Iu};});var Aa=v((wg,Ca)=>{Ca.exports=ve("util").deprecate;});var wi=v((xg,ja)=>{var Pe=Rt();ja.exports=F;function Oa(e){var t=this;this.next=null,this.entry=null,this.finish=function(){Yu(t,e);};}var Lu=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:Pe.nextTick,nt;F.WritableState=Lt;var Da=Object.create(rt());Da.inherits=it();var zu={deprecate:Aa()},Ia=ci(),yr=Ot().Buffer,Nu=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function ju(e){return yr.from(e)}function Fu(e){return yr.isBuffer(e)||e instanceof Nu}var La=bi();Da.inherits(F,Ia);function Mu(){}function Lt(e,t){nt=nt||Be(),e=e||{};var r=t instanceof nt;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,n=e.writableHighWaterMark,a=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=false,this.needDrain=false,this.ending=false,this.ended=false,this.finished=false,this.destroyed=false;var o=e.decodeStrings===false;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=false,this.corked=0,this.sync=true,this.bufferProcessing=false,this.onwrite=function(l){Wu(t,l);},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=false,this.errorEmitted=false,this.bufferedRequestCount=0,this.corkedRequestsFree=new Oa(this);}Lt.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(Lt.prototype,"buffer",{get:zu.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")});}catch{}})();var br;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(br=Function.prototype[Symbol.hasInstance],Object.defineProperty(F,Symbol.hasInstance,{value:function(e){return br.call(this,e)?true:this!==F?false:e&&e._writableState instanceof Lt}})):br=function(e){return e instanceof this};function F(e){if(nt=nt||Be(),!br.call(F,this)&&!(this instanceof nt))return new F(e);this._writableState=new Lt(e,this),this.writable=true,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),Ia.call(this);}F.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"));};function Pu(e,t){var r=new Error("write after end");e.emit("error",r),Pe.nextTick(t,r);}function Bu(e,t,r,i){var n=true,a=false;return r===null?a=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!t.objectMode&&(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),Pe.nextTick(i,a),n=false),n}F.prototype.write=function(e,t,r){var i=this._writableState,n=false,a=!i.objectMode&&Fu(e);return a&&!yr.isBuffer(e)&&(e=ju(e)),typeof t=="function"&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),typeof r!="function"&&(r=Mu),i.ended?Pu(this,r):(a||Bu(this,i,e,r))&&(i.pendingcb++,n=Uu(this,i,a,e,t,r)),n};F.prototype.cork=function(){var e=this._writableState;e.corked++;};F.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&za(this,e));};F.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this};function qu(e,t,r){return !e.objectMode&&e.decodeStrings!==false&&typeof t=="string"&&(t=yr.from(t,r)),t}Object.defineProperty(F.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}});function Uu(e,t,r,i,n,a){if(!r){var o=qu(t,i,n);i!==o&&(r=true,n="buffer",i=o);}var l=t.objectMode?1:i.length;t.length+=l;var u=t.length<t.highWaterMark;if(u||(t.needDrain=true),t.writing||t.corked){var s=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:a,next:null},s?s.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1;}else yi(e,t,false,l,i,n,a);return u}function yi(e,t,r,i,n,a,o){t.writelen=i,t.writecb=o,t.writing=true,t.sync=true,r?e._writev(n,t.onwrite):e._write(n,a,t.onwrite),t.sync=false;}function Hu(e,t,r,i,n){--t.pendingcb,r?(Pe.nextTick(n,i),Pe.nextTick(It,e,t),e._writableState.errorEmitted=true,e.emit("error",i)):(n(i),e._writableState.errorEmitted=true,e.emit("error",i),It(e,t));}function Zu(e){e.writing=false,e.writecb=null,e.length-=e.writelen,e.writelen=0;}function Wu(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(Zu(r),t)Hu(e,r,i,t,n);else {var a=Na(r);!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&za(e,r),i?Lu(Ra,e,r,a,n):Ra(e,r,a,n);}}function Ra(e,t,r,i){r||Ju(e,t),t.pendingcb--,i(),It(e,t);}function Ju(e,t){t.length===0&&t.needDrain&&(t.needDrain=false,e.emit("drain"));}function za(e,t){t.bufferProcessing=true;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),a=t.corkedRequestsFree;a.entry=r;for(var o=0,l=true;r;)n[o]=r,r.isBuf||(l=false),r=r.next,o+=1;n.allBuffers=l,yi(e,t,true,t.length,n,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new Oa(t),t.bufferedRequestCount=0;}else {for(;r;){var u=r.chunk,s=r.encoding,f=r.callback,c=t.objectMode?1:u.length;if(yi(e,t,false,c,u,s,f),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null);}t.bufferedRequest=r,t.bufferProcessing=false;}F.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"));};F.prototype._writev=null;F.prototype.end=function(e,t,r){var i=this._writableState;typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||Vu(this,i,r);};function Na(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function $u(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=true,e.emit("prefinish"),It(e,t);});}function Xu(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"?(t.pendingcb++,t.finalCalled=true,Pe.nextTick($u,e,t)):(t.prefinished=true,e.emit("prefinish")));}function It(e,t){var r=Na(t);return r&&(Xu(e,t),t.pendingcb===0&&(t.finished=true,e.emit("finish"))),r}function Vu(e,t,r){t.ending=true,It(e,t),r&&(t.finished?Pe.nextTick(r):e.once("finish",r)),t.ended=true,e.writable=false;}function Yu(e,t,r){var i=e.entry;for(e.entry=null;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next;}t.corkedRequestsFree.next=e;}Object.defineProperty(F.prototype,"destroyed",{get:function(){return this._writableState===void 0?false:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e);}});F.prototype.destroy=La.destroy;F.prototype._undestroy=La.undestroy;F.prototype._destroy=function(e,t){this.end(),t(e);};});var Be=v((Eg,Ba)=>{var Fa=Rt(),Ku=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};Ba.exports=be;var Ma=Object.create(rt());Ma.inherits=it();var Pa=Si(),Ei=wi();Ma.inherits(be,Pa);for(xi=Ku(Ei.prototype),wr=0;wr<xi.length;wr++)xr=xi[wr],be.prototype[xr]||(be.prototype[xr]=Ei.prototype[xr]);var xi,xr,wr;function be(e){if(!(this instanceof be))return new be(e);Pa.call(this,e),Ei.call(this,e),e&&e.readable===false&&(this.readable=false),e&&e.writable===false&&(this.writable=false),this.allowHalfOpen=true,e&&e.allowHalfOpen===false&&(this.allowHalfOpen=false),this.once("end",Gu);}Object.defineProperty(be.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}});function Gu(){this.allowHalfOpen||this._writableState.ended||Fa.nextTick(Qu,this);}function Qu(e){e.end();}Object.defineProperty(be.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?false:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e);}});be.prototype._destroy=function(e,t){this.push(null),this.end(),Fa.nextTick(t,e);};});var Ci=v(Ua=>{var Ti=Ot().Buffer,qa=Ti.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case "hex":case "utf8":case "utf-8":case "ascii":case "binary":case "base64":case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":case "raw":return true;default:return false}};function ed(e){if(!e)return "utf8";for(var t;;)switch(e){case "utf8":case "utf-8":return "utf8";case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return "utf16le";case "latin1":case "binary":return "latin1";case "base64":case "ascii":case "hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=true;}}function td(e){var t=ed(e);if(typeof t!="string"&&(Ti.isEncoding===qa||!qa(e)))throw new Error("Unknown encoding: "+e);return t||e}Ua.StringDecoder=zt;function zt(e){this.encoding=td(e);var t;switch(this.encoding){case "utf16le":this.text=sd,this.end=ld,t=4;break;case "utf8":this.fillLast=nd,t=4;break;case "base64":this.text=fd,this.end=ud,t=3;break;default:this.write=dd,this.end=hd;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Ti.allocUnsafe(t);}zt.prototype.write=function(e){if(e.length===0)return "";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return "";r=this.lastNeed,this.lastNeed=0;}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};zt.prototype.end=od;zt.prototype.text=ad;zt.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length;};function ki(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function rd(e,t,r){var i=t.length-1;if(i<r)return 0;var n=ki(t[i]);return n>=0?(n>0&&(e.lastNeed=n-1),n):--i<r||n===-2?0:(n=ki(t[i]),n>=0?(n>0&&(e.lastNeed=n-2),n):--i<r||n===-2?0:(n=ki(t[i]),n>=0?(n>0&&(n===2?n=0:e.lastNeed=n-3),n):0))}function id(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function nd(e){var t=this.lastTotal-this.lastNeed,r=id(this,e);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length;}function ad(e,t){var r=rd(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)}function od(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function sd(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function ld(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function fd(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function ud(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function dd(e){return e.toString(this.encoding)}function hd(e){return e&&e.length?this.write(e):""}});var Si=v((Tg,eo)=>{var ot=Rt();eo.exports=L;var cd=ba(),Nt;L.ReadableState=Va;ve("events").EventEmitter;var Ja=function(e,t){return e.listeners(t).length},Ii=ci(),jt=Ot().Buffer,pd=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function gd(e){return jt.from(e)}function md(e){return jt.isBuffer(e)||e instanceof pd}var $a=Object.create(rt());$a.inherits=it();var Ai=ve("util"),O=void 0;Ai&&Ai.debuglog?O=Ai.debuglog("stream"):O=function(){};var vd=ka(),Xa=bi(),at;$a.inherits(L,Ii);var Ri=["error","close","destroy","pause","resume"];function _d(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):cd(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]];}function Va(e,t){Nt=Nt||Be(),e=e||{};var r=t instanceof Nt;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,n=e.readableHighWaterMark,a=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new vd,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=false,this.endEmitted=false,this.reading=false,this.sync=true,this.needReadable=false,this.emittedReadable=false,this.readableListening=false,this.resumeScheduled=false,this.destroyed=false,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=false,this.decoder=null,this.encoding=null,e.encoding&&(at||(at=Ci().StringDecoder),this.decoder=new at(e.encoding),this.encoding=e.encoding);}function L(e){if(Nt=Nt||Be(),!(this instanceof L))return new L(e);this._readableState=new Va(e,this),this.readable=true,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),Ii.call(this);}Object.defineProperty(L.prototype,"destroyed",{get:function(){return this._readableState===void 0?false:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e);}});L.prototype.destroy=Xa.destroy;L.prototype._undestroy=Xa.undestroy;L.prototype._destroy=function(e,t){this.push(null),t(e);};L.prototype.push=function(e,t){var r=this._readableState,i;return r.objectMode?i=true:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=jt.from(e,t),t=""),i=true),Ya(this,e,t,false,i)};L.prototype.unshift=function(e){return Ya(this,e,null,true,false)};function Ya(e,t,r,i,n){var a=e._readableState;if(t===null)a.reading=false,xd(e,a);else {var o;n||(o=bd(a,t)),o?e.emit("error",o):a.objectMode||t&&t.length>0?(typeof t!="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==jt.prototype&&(t=gd(t)),i?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):Oi(e,a,t,true):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=false,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||t.length!==0?Oi(e,a,t,false):Ka(e,a)):Oi(e,a,t,false))):i||(a.reading=false);}return yd(a)}function Oi(e,t,r,i){t.flowing&&t.length===0&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&Er(e)),Ka(e,t);}function bd(e,t){var r;return !md(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function yd(e){return !e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}L.prototype.isPaused=function(){return this._readableState.flowing===false};L.prototype.setEncoding=function(e){return at||(at=Ci().StringDecoder),this._readableState.decoder=new at(e),this._readableState.encoding=e,this};var Ha=8388608;function wd(e){return e>=Ha?e=Ha:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function Za(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=wd(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=true,0))}L.prototype.read=function(e){O("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=false),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return O("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?Di(this):Er(this),null;if(e=Za(e,t),e===0&&t.ended)return t.length===0&&Di(this),null;var i=t.needReadable;O("need readable",i),(t.length===0||t.length-e<t.highWaterMark)&&(i=true,O("length less than watermark",i)),t.ended||t.reading?(i=false,O("reading or ended",i)):i&&(O("do read"),t.reading=true,t.sync=true,t.length===0&&(t.needReadable=true),this._read(t.highWaterMark),t.sync=false,t.reading||(e=Za(r,t)));var n;return e>0?n=Ga(e,t):n=null,n===null?(t.needReadable=true,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=true),r!==e&&t.ended&&Di(this)),n!==null&&this.emit("data",n),n};function xd(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length);}t.ended=true,Er(e);}}function Er(e){var t=e._readableState;t.needReadable=false,t.emittedReadable||(O("emitReadable",t.flowing),t.emittedReadable=true,t.sync?ot.nextTick(Wa,e):Wa(e));}function Wa(e){O("emit readable"),e.emit("readable"),Li(e);}function Ka(e,t){t.readingMore||(t.readingMore=true,ot.nextTick(Ed,e,t));}function Ed(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(O("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=false;}L.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"));};L.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,O("pipe count=%d opts=%j",i.pipesCount,t);var n=(!t||t.end!==false)&&e!==process.stdout&&e!==process.stderr,a=n?l:y;i.endEmitted?ot.nextTick(a):r.once("end",a),e.on("unpipe",o);function o(p,g){O("onunpipe"),p===r&&g&&g.hasUnpiped===false&&(g.hasUnpiped=true,f());}function l(){O("onend"),e.end();}var u=Sd(r);e.on("drain",u);var s=false;function f(){O("cleanup"),e.removeListener("close",w),e.removeListener("finish",_),e.removeListener("drain",u),e.removeListener("error",h),e.removeListener("unpipe",o),r.removeListener("end",l),r.removeListener("end",y),r.removeListener("data",d),s=true,i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u();}var c=false;r.on("data",d);function d(p){O("ondata"),c=false;var g=e.write(p);g===false&&!c&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&Qa(i.pipes,e)!==-1)&&!s&&(O("false write response, pause",i.awaitDrain),i.awaitDrain++,c=true),r.pause());}function h(p){O("onerror",p),y(),e.removeListener("error",h),Ja(e,"error")===0&&e.emit("error",p);}_d(e,"error",h);function w(){e.removeListener("finish",_),y();}e.once("close",w);function _(){O("onfinish"),e.removeListener("close",w),y();}e.once("finish",_);function y(){O("unpipe"),r.unpipe(e);}return e.emit("pipe",r),i.flowing||(O("pipe resume"),r.resume()),e};function Sd(e){return function(){var t=e._readableState;O("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&Ja(e,"data")&&(t.flowing=true,Li(e));}}L.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:false};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=false,e&&e.emit("unpipe",this,r),this);if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=false;for(var a=0;a<n;a++)i[a].emit("unpipe",this,{hasUnpiped:false});return this}var o=Qa(t.pipes,e);return o===-1?this:(t.pipes.splice(o,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};L.prototype.on=function(e,t){var r=Ii.prototype.on.call(this,e,t);if(e==="data")this._readableState.flowing!==false&&this.resume();else if(e==="readable"){var i=this._readableState;!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=true,i.emittedReadable=false,i.reading?i.length&&Er(this):ot.nextTick(kd,this));}return r};L.prototype.addListener=L.prototype.on;function kd(e){O("readable nexttick read 0"),e.read(0);}L.prototype.resume=function(){var e=this._readableState;return e.flowing||(O("resume"),e.flowing=true,Td(this,e)),this};function Td(e,t){t.resumeScheduled||(t.resumeScheduled=true,ot.nextTick(Cd,e,t));}function Cd(e,t){t.reading||(O("resume read 0"),e.read(0)),t.resumeScheduled=false,t.awaitDrain=0,e.emit("resume"),Li(e),t.flowing&&!t.reading&&e.read(0);}L.prototype.pause=function(){return O("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==false&&(O("pause"),this._readableState.flowing=false,this.emit("pause")),this};function Li(e){var t=e._readableState;for(O("flow",t.flowing);t.flowing&&e.read()!==null;);}L.prototype.wrap=function(e){var t=this,r=this._readableState,i=false;e.on("end",function(){if(O("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&t.push(o);}t.push(null);}),e.on("data",function(o){if(O("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var l=t.push(o);l||(i=true,e.pause());}});for(var n in e)this[n]===void 0&&typeof e[n]=="function"&&(this[n]=(function(o){return function(){return e[o].apply(e,arguments)}})(n));for(var a=0;a<Ri.length;a++)e.on(Ri[a],this.emit.bind(this,Ri[a]));return this._read=function(o){O("wrapped _read",o),i&&(i=false,e.resume());},this};Object.defineProperty(L.prototype,"readableHighWaterMark",{enumerable:false,get:function(){return this._readableState.highWaterMark}});L._fromList=Ga;function Ga(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.head.data:r=t.buffer.concat(t.length),t.buffer.clear()):r=Ad(e,t.buffer,t.decoder),r}function Ad(e,t,r){var i;return e<t.head.data.length?(i=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):e===t.head.data.length?i=t.shift():i=r?Rd(e,t):Od(e,t),i}function Rd(e,t){var r=t.head,i=1,n=r.data;for(e-=n.length;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(o===a.length?n+=a:n+=a.slice(0,e),e-=o,e===0){o===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++i;}return t.length-=i,n}function Od(e,t){var r=jt.allocUnsafe(e),i=t.head,n=1;for(i.data.copy(r),e-=i.data.length;i=i.next;){var a=i.data,o=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,o),e-=o,e===0){o===a.length?(++n,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=a.slice(o));break}++n;}return t.length-=n,r}function Di(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=true,ot.nextTick(Dd,t,e));}function Dd(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=true,t.readable=false,t.emit("end"));}function Qa(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return -1}});var zi=v((Cg,io)=>{io.exports=ye;var Sr=Be(),ro=Object.create(rt());ro.inherits=it();ro.inherits(ye,Sr);function Id(e,t){var r=this._transformState;r.transforming=false;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,t!=null&&this.push(t),i(e);var n=this._readableState;n.reading=false,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark);}function ye(e){if(!(this instanceof ye))return new ye(e);Sr.call(this,e),this._transformState={afterTransform:Id.bind(this),needTransform:false,transforming:false,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=true,this._readableState.sync=false,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",Ld);}function Ld(){var e=this;typeof this._flush=="function"?this._flush(function(t,r){to(e,t,r);}):to(this,null,null);}ye.prototype.push=function(e,t){return this._transformState.needTransform=false,Sr.prototype.push.call(this,e,t)};ye.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")};ye.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark);}};ye.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&t.writecb&&!t.transforming?(t.transforming=true,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=true;};ye.prototype._destroy=function(e,t){var r=this;Sr.prototype._destroy.call(this,e,function(i){t(i),r.emit("close");});};function to(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}});var so=v((Ag,oo)=>{oo.exports=Ft;var no=zi(),ao=Object.create(rt());ao.inherits=it();ao.inherits(Ft,no);function Ft(e){if(!(this instanceof Ft))return new Ft(e);no.call(this,e);}Ft.prototype._transform=function(e,t,r){r(null,e);};});var Ni=v((q,kr)=>{var ue=ve("stream");process.env.READABLE_STREAM==="disable"&&ue?(kr.exports=ue,q=kr.exports=ue.Readable,q.Readable=ue.Readable,q.Writable=ue.Writable,q.Duplex=ue.Duplex,q.Transform=ue.Transform,q.PassThrough=ue.PassThrough,q.Stream=ue):(q=kr.exports=Si(),q.Stream=ue||q,q.Readable=q,q.Writable=wi(),q.Duplex=Be(),q.Transform=zi(),q.PassThrough=so());});var we=v(Y=>{Y.base64=true;Y.array=true;Y.string=true;Y.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u";Y.nodebuffer=typeof Buffer<"u";Y.uint8array=typeof Uint8Array<"u";if(typeof ArrayBuffer>"u")Y.blob=false;else {ji=new ArrayBuffer(0);try{Y.blob=new Blob([ji],{type:"application/zip"}).size===0;}catch{try{lo=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,Fi=new lo,Fi.append(ji),Y.blob=Fi.getBlob("application/zip").size===0;}catch{Y.blob=false;}}}var ji,lo,Fi;try{Y.nodestream=!!Ni().Readable;}catch{Y.nodestream=false;}});var Pi=v(Mi=>{var zd=N(),Nd=we(),de="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";Mi.encode=function(e){for(var t=[],r,i,n,a,o,l,u,s=0,f=e.length,c=f,d=zd.getTypeOf(e)!=="string";s<e.length;)c=f-s,d?(r=e[s++],i=s<f?e[s++]:0,n=s<f?e[s++]:0):(r=e.charCodeAt(s++),i=s<f?e.charCodeAt(s++):0,n=s<f?e.charCodeAt(s++):0),a=r>>2,o=(r&3)<<4|i>>4,l=c>1?(i&15)<<2|n>>6:64,u=c>2?n&63:64,t.push(de.charAt(a)+de.charAt(o)+de.charAt(l)+de.charAt(u));return t.join("")};Mi.decode=function(e){var t,r,i,n,a,o,l,u=0,s=0,f="data:";if(e.substr(0,f.length)===f)throw new Error("Invalid base64 input, it looks like a data url.");e=e.replace(/[^A-Za-z0-9+/=]/g,"");var c=e.length*3/4;if(e.charAt(e.length-1)===de.charAt(64)&&c--,e.charAt(e.length-2)===de.charAt(64)&&c--,c%1!==0)throw new Error("Invalid base64 input, bad content length.");var d;for(Nd.uint8array?d=new Uint8Array(c|0):d=new Array(c|0);u<e.length;)n=de.indexOf(e.charAt(u++)),a=de.indexOf(e.charAt(u++)),o=de.indexOf(e.charAt(u++)),l=de.indexOf(e.charAt(u++)),t=n<<2|a>>4,r=(a&15)<<4|o>>2,i=(o&3)<<6|l,d[s++]=t,o!==64&&(d[s++]=r),l!==64&&(d[s++]=i);return d};});var Mt=v((Dg,fo)=>{fo.exports={isNode:typeof Buffer<"u",newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if(typeof e=="number")throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&typeof e.on=="function"&&typeof e.pause=="function"&&typeof e.resume=="function"}};});var po=v((Ig,co)=>{var uo=global.MutationObserver||global.WebKitMutationObserver,st;process.browser?uo?(Bi=0,ho=new uo(Pt),qi=global.document.createTextNode(""),ho.observe(qi,{characterData:true}),st=function(){qi.data=Bi=++Bi%2;}):!global.setImmediate&&typeof global.MessageChannel<"u"?(Ui=new global.MessageChannel,Ui.port1.onmessage=Pt,st=function(){Ui.port2.postMessage(0);}):"document"in global&&"onreadystatechange"in global.document.createElement("script")?st=function(){var e=global.document.createElement("script");e.onreadystatechange=function(){Pt(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null;},global.document.documentElement.appendChild(e);}:st=function(){setTimeout(Pt,0);}:st=function(){process.nextTick(Pt);};var Bi,ho,qi,Ui,Hi,Bt=[];function Pt(){Hi=true;for(var e,t,r=Bt.length;r;){for(t=Bt,Bt=[],e=-1;++e<r;)t[e]();r=Bt.length;}Hi=false;}co.exports=jd;function jd(e){Bt.push(e)===1&&!Hi&&st();}});var wo=v((Lg,yo)=>{var go=po();function lt(){}var W={},mo=["REJECTED"],Zi=["FULFILLED"],vo=["PENDING"];process.browser||(qt=["UNHANDLED"]);var qt;yo.exports=Ae;function Ae(e){if(typeof e!="function")throw new TypeError("resolver must be a function");this.state=vo,this.queue=[],this.outcome=void 0,process.browser||(this.handled=qt),e!==lt&&_o(this,e);}Ae.prototype.finally=function(e){if(typeof e!="function")return this;var t=this.constructor;return this.then(r,i);function r(n){function a(){return n}return t.resolve(e()).then(a)}function i(n){function a(){throw n}return t.resolve(e()).then(a)}};Ae.prototype.catch=function(e){return this.then(null,e)};Ae.prototype.then=function(e,t){if(typeof e!="function"&&this.state===Zi||typeof t!="function"&&this.state===mo)return this;var r=new this.constructor(lt);if(process.browser||this.handled===qt&&(this.handled=null),this.state!==vo){var i=this.state===Zi?e:t;Wi(r,i,this.outcome);}else this.queue.push(new Ut(r,e,t));return r};function Ut(e,t,r){this.promise=e,typeof t=="function"&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),typeof r=="function"&&(this.onRejected=r,this.callRejected=this.otherCallRejected);}Ut.prototype.callFulfilled=function(e){W.resolve(this.promise,e);};Ut.prototype.otherCallFulfilled=function(e){Wi(this.promise,this.onFulfilled,e);};Ut.prototype.callRejected=function(e){W.reject(this.promise,e);};Ut.prototype.otherCallRejected=function(e){Wi(this.promise,this.onRejected,e);};function Wi(e,t,r){go(function(){var i;try{i=t(r);}catch(n){return W.reject(e,n)}i===e?W.reject(e,new TypeError("Cannot resolve promise with itself")):W.resolve(e,i);});}W.resolve=function(e,t){var r=bo(Fd,t);if(r.status==="error")return W.reject(e,r.value);var i=r.value;if(i)_o(e,i);else {e.state=Zi,e.outcome=t;for(var n=-1,a=e.queue.length;++n<a;)e.queue[n].callFulfilled(t);}return e};W.reject=function(e,t){e.state=mo,e.outcome=t,process.browser||e.handled===qt&&go(function(){e.handled===qt&&process.emit("unhandledRejection",t,e);});for(var r=-1,i=e.queue.length;++r<i;)e.queue[r].callRejected(t);return e};function Fd(e){var t=e&&e.then;if(e&&(typeof e=="object"||typeof e=="function")&&typeof t=="function")return function(){t.apply(e,arguments);}}function _o(e,t){var r=false;function i(l){r||(r=true,W.reject(e,l));}function n(l){r||(r=true,W.resolve(e,l));}function a(){t(n,i);}var o=bo(a);o.status==="error"&&i(o.value);}function bo(e,t){var r={};try{r.value=e(t),r.status="success";}catch(i){r.status="error",r.value=i;}return r}Ae.resolve=Md;function Md(e){return e instanceof this?e:W.resolve(new this(lt),e)}Ae.reject=Pd;function Pd(e){var t=new this(lt);return W.reject(t,e)}Ae.all=Bd;function Bd(e){var t=this;if(Object.prototype.toString.call(e)!=="[object Array]")return this.reject(new TypeError("must be an array"));var r=e.length,i=false;if(!r)return this.resolve([]);for(var n=new Array(r),a=0,o=-1,l=new this(lt);++o<r;)u(e[o],o);return l;function u(s,f){t.resolve(s).then(c,function(d){i||(i=true,W.reject(l,d));});function c(d){n[f]=d,++a===r&&!i&&(i=true,W.resolve(l,n));}}}Ae.race=qd;function qd(e){var t=this;if(Object.prototype.toString.call(e)!=="[object Array]")return this.reject(new TypeError("must be an array"));var r=e.length,i=false;if(!r)return this.resolve([]);for(var n=-1,a=new this(lt);++n<r;)o(e[n]);return a;function o(l){t.resolve(l).then(function(u){i||(i=true,W.resolve(a,u));},function(u){i||(i=true,W.reject(a,u));});}}});var ft=v((zg,xo)=>{var Ji=null;typeof Promise<"u"?Ji=Promise:Ji=wo();xo.exports={Promise:Ji};});var So=v(Eo=>{(function(e,t){if(e.setImmediate)return;var r=1,i={},n=false,a=e.document,o;function l(g){typeof g!="function"&&(g=new Function(""+g));for(var x=new Array(arguments.length-1),m=0;m<x.length;m++)x[m]=arguments[m+1];var b={callback:g,args:x};return i[r]=b,o(r),r++}function u(g){delete i[g];}function s(g){var x=g.callback,m=g.args;switch(m.length){case 0:x();break;case 1:x(m[0]);break;case 2:x(m[0],m[1]);break;case 3:x(m[0],m[1],m[2]);break;default:x.apply(t,m);break}}function f(g){if(n)setTimeout(f,0,g);else {var x=i[g];if(x){n=true;try{s(x);}finally{u(g),n=false;}}}}function c(){o=function(g){process.nextTick(function(){f(g);});};}function d(){if(e.postMessage&&!e.importScripts){var g=true,x=e.onmessage;return e.onmessage=function(){g=false;},e.postMessage("","*"),e.onmessage=x,g}}function h(){var g="setImmediate$"+Math.random()+"$",x=function(m){m.source===e&&typeof m.data=="string"&&m.data.indexOf(g)===0&&f(+m.data.slice(g.length));};e.addEventListener?e.addEventListener("message",x,false):e.attachEvent("onmessage",x),o=function(m){e.postMessage(g+m,"*");};}function w(){var g=new MessageChannel;g.port1.onmessage=function(x){var m=x.data;f(m);},o=function(x){g.port2.postMessage(x);};}function _(){var g=a.documentElement;o=function(x){var m=a.createElement("script");m.onreadystatechange=function(){f(x),m.onreadystatechange=null,g.removeChild(m),m=null;},g.appendChild(m);};}function y(){o=function(g){setTimeout(f,0,g);};}var p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,{}.toString.call(e.process)==="[object process]"?c():d()?h():e.MessageChannel?w():a&&"onreadystatechange"in a.createElement("script")?_():y(),p.setImmediate=l,p.clearImmediate=u;})(typeof self>"u"?typeof global>"u"?Eo:global:self);});var N=v(M=>{var Re=we(),Ud=Pi(),ut=Mt(),$i=ft();So();function Hd(e){var t=null;return Re.uint8array?t=new Uint8Array(e.length):t=new Array(e.length),Cr(e,t)}M.newBlob=function(e,t){M.checkSupport("blob");try{return new Blob([e],{type:t})}catch{try{var r=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,i=new r;return i.append(e),i.getBlob(t)}catch{throw new Error("Bug : can't construct the Blob.")}}};function Ht(e){return e}function Cr(e,t){for(var r=0;r<e.length;++r)t[r]=e.charCodeAt(r)&255;return t}var Tr={stringifyByChunk:function(e,t,r){var i=[],n=0,a=e.length;if(a<=r)return String.fromCharCode.apply(null,e);for(;n<a;)t==="array"||t==="nodebuffer"?i.push(String.fromCharCode.apply(null,e.slice(n,Math.min(n+r,a)))):i.push(String.fromCharCode.apply(null,e.subarray(n,Math.min(n+r,a)))),n+=r;return i.join("")},stringifyByChar:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},applyCanBeUsed:{uint8array:(function(){try{return Re.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return false}})(),nodebuffer:(function(){try{return Re.nodebuffer&&String.fromCharCode.apply(null,ut.allocBuffer(1)).length===1}catch{return false}})()}};function Zt(e){var t=65536,r=M.getTypeOf(e),i=true;if(r==="uint8array"?i=Tr.applyCanBeUsed.uint8array:r==="nodebuffer"&&(i=Tr.applyCanBeUsed.nodebuffer),i)for(;t>1;)try{return Tr.stringifyByChunk(e,r,t)}catch{t=Math.floor(t/2);}return Tr.stringifyByChar(e)}M.applyFromCharCode=Zt;function Ar(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}var Oe={};Oe.string={string:Ht,array:function(e){return Cr(e,new Array(e.length))},arraybuffer:function(e){return Oe.string.uint8array(e).buffer},uint8array:function(e){return Cr(e,new Uint8Array(e.length))},nodebuffer:function(e){return Cr(e,ut.allocBuffer(e.length))}};Oe.array={string:Zt,array:Ht,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return ut.newBufferFrom(e)}};Oe.arraybuffer={string:function(e){return Zt(new Uint8Array(e))},array:function(e){return Ar(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:Ht,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return ut.newBufferFrom(new Uint8Array(e))}};Oe.uint8array={string:Zt,array:function(e){return Ar(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:Ht,nodebuffer:function(e){return ut.newBufferFrom(e)}};Oe.nodebuffer={string:Zt,array:function(e){return Ar(e,new Array(e.length))},arraybuffer:function(e){return Oe.nodebuffer.uint8array(e).buffer},uint8array:function(e){return Ar(e,new Uint8Array(e.length))},nodebuffer:Ht};M.transformTo=function(e,t){if(t||(t=""),!e)return t;M.checkSupport(e);var r=M.getTypeOf(t),i=Oe[r][e](t);return i};M.resolve=function(e){for(var t=e.split("/"),r=[],i=0;i<t.length;i++){var n=t[i];n==="."||n===""&&i!==0&&i!==t.length-1||(n===".."?r.pop():r.push(n));}return r.join("/")};M.getTypeOf=function(e){if(typeof e=="string")return "string";if(Object.prototype.toString.call(e)==="[object Array]")return "array";if(Re.nodebuffer&&ut.isBuffer(e))return "nodebuffer";if(Re.uint8array&&e instanceof Uint8Array)return "uint8array";if(Re.arraybuffer&&e instanceof ArrayBuffer)return "arraybuffer"};M.checkSupport=function(e){var t=Re[e.toLowerCase()];if(!t)throw new Error(e+" is not supported by this platform")};M.MAX_VALUE_16BITS=65535;M.MAX_VALUE_32BITS=-1;M.pretty=function(e){var t="",r,i;for(i=0;i<(e||"").length;i++)r=e.charCodeAt(i),t+="\\x"+(r<16?"0":"")+r.toString(16).toUpperCase();return t};M.delay=function(e,t,r){setImmediate(function(){e.apply(r||null,t||[]);});};M.inherits=function(e,t){var r=function(){};r.prototype=t.prototype,e.prototype=new r;};M.extend=function(){var e={},t,r;for(t=0;t<arguments.length;t++)for(r in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],r)&&typeof e[r]>"u"&&(e[r]=arguments[t][r]);return e};M.prepareContent=function(e,t,r,i,n){var a=$i.Promise.resolve(t).then(function(o){var l=Re.blob&&(o instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(o))!==-1);return l&&typeof FileReader<"u"?new $i.Promise(function(u,s){var f=new FileReader;f.onload=function(c){u(c.target.result);},f.onerror=function(c){s(c.target.error);},f.readAsArrayBuffer(o);}):o});return a.then(function(o){var l=M.getTypeOf(o);return l?(l==="arraybuffer"?o=M.transformTo("uint8array",o):l==="string"&&(n?o=Ud.decode(o):r&&i!==true&&(o=Hd(o))),o):$i.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})};});var K=v((Fg,To)=>{function ko(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=true,this.isFinished=false,this.isLocked=false,this._listeners={data:[],end:[],error:[]},this.previous=null;}ko.prototype={push:function(e){this.emit("data",e);},end:function(){if(this.isFinished)return false;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0;}catch(e){this.emit("error",e);}return true},error:function(e){return this.isFinished?false:(this.isPaused?this.generatedError=e:(this.isFinished=true,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),true)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[];},emit:function(e,t){if(this._listeners[e])for(var r=0;r<this._listeners[e].length;r++)this._listeners[e][r].call(this,t);},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",function(r){t.processChunk(r);}),e.on("end",function(){t.end();}),e.on("error",function(r){t.error(r);}),this},pause:function(){return this.isPaused||this.isFinished?false:(this.isPaused=true,this.previous&&this.previous.pause(),true)},resume:function(){if(!this.isPaused||this.isFinished)return false;this.isPaused=false;var e=false;return this.generatedError&&(this.error(this.generatedError),e=true),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e);},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e]);},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=true,this.previous&&this.previous.lock();},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}};To.exports=ko;});var ht=v(De=>{var dt=N(),qe=we(),Zd=Mt(),Rr=K(),Wt=new Array(256);for(xe=0;xe<256;xe++)Wt[xe]=xe>=252?6:xe>=248?5:xe>=240?4:xe>=224?3:xe>=192?2:1;var xe;Wt[254]=Wt[254]=1;var Wd=function(e){var t,r,i,n,a,o=e.length,l=0;for(n=0;n<o;n++)r=e.charCodeAt(n),(r&64512)===55296&&n+1<o&&(i=e.charCodeAt(n+1),(i&64512)===56320&&(r=65536+(r-55296<<10)+(i-56320),n++)),l+=r<128?1:r<2048?2:r<65536?3:4;for(qe.uint8array?t=new Uint8Array(l):t=new Array(l),a=0,n=0;a<l;n++)r=e.charCodeAt(n),(r&64512)===55296&&n+1<o&&(i=e.charCodeAt(n+1),(i&64512)===56320&&(r=65536+(r-55296<<10)+(i-56320),n++)),r<128?t[a++]=r:r<2048?(t[a++]=192|r>>>6,t[a++]=128|r&63):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|r&63):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|r&63);return t},Jd=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+Wt[e[r]]>t?r:t},$d=function(e){var t,r,i,n,a=e.length,o=new Array(a*2);for(r=0,t=0;t<a;){if(i=e[t++],i<128){o[r++]=i;continue}if(n=Wt[i],n>4){o[r++]=65533,t+=n-1;continue}for(i&=n===2?31:n===3?15:7;n>1&&t<a;)i=i<<6|e[t++]&63,n--;if(n>1){o[r++]=65533;continue}i<65536?o[r++]=i:(i-=65536,o[r++]=55296|i>>10&1023,o[r++]=56320|i&1023);}return o.length!==r&&(o.subarray?o=o.subarray(0,r):o.length=r),dt.applyFromCharCode(o)};De.utf8encode=function(t){return qe.nodebuffer?Zd.newBufferFrom(t,"utf-8"):Wd(t)};De.utf8decode=function(t){return qe.nodebuffer?dt.transformTo("nodebuffer",t).toString("utf-8"):(t=dt.transformTo(qe.uint8array?"uint8array":"array",t),$d(t))};function Or(){Rr.call(this,"utf-8 decode"),this.leftOver=null;}dt.inherits(Or,Rr);Or.prototype.processChunk=function(e){var t=dt.transformTo(qe.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(qe.uint8array){var r=t;t=new Uint8Array(r.length+this.leftOver.length),t.set(this.leftOver,0),t.set(r,this.leftOver.length);}else t=this.leftOver.concat(t);this.leftOver=null;}var i=Jd(t),n=t;i!==t.length&&(qe.uint8array?(n=t.subarray(0,i),this.leftOver=t.subarray(i,t.length)):(n=t.slice(0,i),this.leftOver=t.slice(i,t.length))),this.push({data:De.utf8decode(n),meta:e.meta});};Or.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:De.utf8decode(this.leftOver),meta:{}}),this.leftOver=null);};De.Utf8DecodeWorker=Or;function Xi(){Rr.call(this,"utf-8 encode");}dt.inherits(Xi,Rr);Xi.prototype.processChunk=function(e){this.push({data:De.utf8encode(e.data),meta:e.meta});};De.Utf8EncodeWorker=Xi;});var Oo=v((Pg,Ro)=>{var Co=K(),Ao=N();function Vi(e){Co.call(this,"ConvertWorker to "+e),this.destType=e;}Ao.inherits(Vi,Co);Vi.prototype.processChunk=function(e){this.push({data:Ao.transformTo(this.destType,e.data),meta:e.meta});};Ro.exports=Vi;});var Lo=v((Bg,Io)=>{var Do=Ni().Readable,Xd=N();Xd.inherits(Yi,Do);function Yi(e,t,r){Do.call(this,t),this._helper=e;var i=this;e.on("data",function(n,a){i.push(n)||i._helper.pause(),r&&r(a);}).on("error",function(n){i.emit("error",n);}).on("end",function(){i.push(null);});}Yi.prototype._read=function(){this._helper.resume();};Io.exports=Yi;});var Ki=v((qg,jo)=>{var Ue=N(),Vd=Oo(),Yd=K(),Kd=Pi(),Gd=we(),Qd=ft(),zo=null;if(Gd.nodestream)try{zo=Lo();}catch{}function eh(e,t,r){switch(e){case "blob":return Ue.newBlob(Ue.transformTo("arraybuffer",t),r);case "base64":return Kd.encode(t);default:return Ue.transformTo(e,t)}}function th(e,t){var r,i=0,n=null,a=0;for(r=0;r<t.length;r++)a+=t[r].length;switch(e){case "string":return t.join("");case "array":return Array.prototype.concat.apply([],t);case "uint8array":for(n=new Uint8Array(a),r=0;r<t.length;r++)n.set(t[r],i),i+=t[r].length;return n;case "nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}function rh(e,t){return new Qd.Promise(function(r,i){var n=[],a=e._internalType,o=e._outputType,l=e._mimeType;e.on("data",function(u,s){n.push(u),t&&t(s);}).on("error",function(u){n=[],i(u);}).on("end",function(){try{var u=eh(o,th(a,n),l);r(u);}catch(s){i(s);}n=[];}).resume();})}function No(e,t,r){var i=t;switch(t){case "blob":case "arraybuffer":i="uint8array";break;case "base64":i="string";break}try{this._internalType=i,this._outputType=t,this._mimeType=r,Ue.checkSupport(i),this._worker=e.pipe(new Vd(i)),e.lock();}catch(n){this._worker=new Yd("error"),this._worker.error(n);}}No.prototype={accumulate:function(e){return rh(this,e)},on:function(e,t){var r=this;return e==="data"?this._worker.on(e,function(i){t.call(r,i.data,i.meta);}):this._worker.on(e,function(){Ue.delay(t,arguments,r);}),this},resume:function(){return Ue.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(Ue.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new zo(this,{objectMode:this._outputType!=="nodebuffer"},e)}};jo.exports=No;});var Gi=v(ne=>{ne.base64=false;ne.binary=false;ne.dir=false;ne.createFolders=true;ne.date=null;ne.compression=null;ne.compressionOptions=null;ne.comment=null;ne.unixPermissions=null;ne.dosPermissions=null;});var Qi=v((Hg,Fo)=>{var Dr=N(),Ir=K(),ih=16*1024;function ct(e){Ir.call(this,"DataWorker");var t=this;this.dataIsReady=false,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=false,e.then(function(r){t.dataIsReady=true,t.data=r,t.max=r&&r.length||0,t.type=Dr.getTypeOf(r),t.isPaused||t._tickAndRepeat();},function(r){t.error(r);});}Dr.inherits(ct,Ir);ct.prototype.cleanUp=function(){Ir.prototype.cleanUp.call(this),this.data=null;};ct.prototype.resume=function(){return Ir.prototype.resume.call(this)?(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=true,Dr.delay(this._tickAndRepeat,[],this)),true):false};ct.prototype._tickAndRepeat=function(){this._tickScheduled=false,!(this.isPaused||this.isFinished)&&(this._tick(),this.isFinished||(Dr.delay(this._tickAndRepeat,[],this),this._tickScheduled=true));};ct.prototype._tick=function(){if(this.isPaused||this.isFinished)return false;var e=ih,t=null,r=Math.min(this.max,this.index+e);if(this.index>=this.max)return this.end();switch(this.type){case "string":t=this.data.substring(this.index,r);break;case "uint8array":t=this.data.subarray(this.index,r);break;case "array":case "nodebuffer":t=this.data.slice(this.index,r);break}return this.index=r,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})};Fo.exports=ct;});var Lr=v((Zg,Po)=>{var nh=N();function ah(){for(var e,t=[],r=0;r<256;r++){e=r;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e;}return t}var Mo=ah();function oh(e,t,r,i){var n=Mo,a=i+r;e=e^-1;for(var o=i;o<a;o++)e=e>>>8^n[(e^t[o])&255];return e^-1}function sh(e,t,r,i){var n=Mo,a=i+r;e=e^-1;for(var o=i;o<a;o++)e=e>>>8^n[(e^t.charCodeAt(o))&255];return e^-1}Po.exports=function(t,r){if(typeof t>"u"||!t.length)return 0;var i=nh.getTypeOf(t)!=="string";return i?oh(r|0,t,t.length,0):sh(r|0,t,t.length,0)};});var tn=v((Wg,qo)=>{var Bo=K(),lh=Lr(),fh=N();function en(){Bo.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0);}fh.inherits(en,Bo);en.prototype.processChunk=function(e){this.streamInfo.crc32=lh(e.data,this.streamInfo.crc32||0),this.push(e);};qo.exports=en;});var Ho=v((Jg,Uo)=>{var uh=N(),rn=K();function nn(e){rn.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0);}uh.inherits(nn,rn);nn.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length;}rn.prototype.processChunk.call(this,e);};Uo.exports=nn;});var zr=v(($g,Jo)=>{var Zo=ft(),Wo=Qi(),dh=tn(),an=Ho();function on(e,t,r,i,n){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=i,this.compressedContent=n;}on.prototype={getContentWorker:function(){var e=new Wo(Zo.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new an("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new Wo(Zo.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}};on.createWorkerFrom=function(e,t,r){return e.pipe(new dh).pipe(new an("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new an("compressedSize")).withStreamInfo("compression",t)};Jo.exports=on;});var Yo=v((Xg,Vo)=>{var hh=Ki(),ch=Qi(),sn=ht(),ln=zr(),$o=K(),fn=function(e,t,r){this.name=e,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=t,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions};};fn.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");r=e.toLowerCase();var i=r==="string"||r==="text";(r==="binarystring"||r==="text")&&(r="string"),t=this._decompressWorker();var n=!this._dataBinary;n&&!i&&(t=t.pipe(new sn.Utf8EncodeWorker)),!n&&i&&(t=t.pipe(new sn.Utf8DecodeWorker));}catch(a){t=new $o("error"),t.error(a);}return new hh(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof ln&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new sn.Utf8EncodeWorker)),ln.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof ln?this._data.getContentWorker():this._data instanceof $o?this._data:new ch(this._data)}};var Xo=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],ph=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")};for(Nr=0;Nr<Xo.length;Nr++)fn.prototype[Xo[Nr]]=ph;var Nr;Vo.exports=fn;});var Ee=v(J=>{var gh=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function mh(e,t){return Object.prototype.hasOwnProperty.call(e,t)}J.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var i in r)mh(r,i)&&(e[i]=r[i]);}}return e};J.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var vh={arraySet:function(e,t,r,i,n){if(t.subarray&&e.subarray){e.set(t.subarray(r,r+i),n);return}for(var a=0;a<i;a++)e[n+a]=t[r+a];},flattenChunks:function(e){var t,r,i,n,a,o;for(i=0,t=0,r=e.length;t<r;t++)i+=e[t].length;for(o=new Uint8Array(i),n=0,t=0,r=e.length;t<r;t++)a=e[t],o.set(a,n),n+=a.length;return o}},_h={arraySet:function(e,t,r,i,n){for(var a=0;a<i;a++)e[n+a]=t[r+a];},flattenChunks:function(e){return [].concat.apply([],e)}};J.setTyped=function(e){e?(J.Buf8=Uint8Array,J.Buf16=Uint16Array,J.Buf32=Int32Array,J.assign(J,vh)):(J.Buf8=Array,J.Buf16=Array,J.Buf32=Array,J.assign(J,_h));};J.setTyped(gh);});var bs=v(mt=>{var bh=Ee(),yh=4,Ko=0,Go=1,wh=2;function gt(e){for(var t=e.length;--t>=0;)e[t]=0;}var xh=0,ns=1,Eh=2,Sh=3,kh=258,mn=29,Kt=256,$t=Kt+1+mn,pt=30,vn=19,as=2*$t+1,He=15,un=16,Th=7,_n=256,os=16,ss=17,ls=18,pn=[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],jr=[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],Ch=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],fs=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Ah=512,Se=new Array(($t+2)*2);gt(Se);var Jt=new Array(pt*2);gt(Jt);var Xt=new Array(Ah);gt(Xt);var Vt=new Array(kh-Sh+1);gt(Vt);var bn=new Array(mn);gt(bn);var Fr=new Array(pt);gt(Fr);function dn(e,t,r,i,n){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=e&&e.length;}var us,ds,hs;function hn(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t;}function cs(e){return e<256?Xt[e]:Xt[256+(e>>>7)]}function Yt(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255;}function X(e,t,r){e.bi_valid>un-r?(e.bi_buf|=t<<e.bi_valid&65535,Yt(e,e.bi_buf),e.bi_buf=t>>un-e.bi_valid,e.bi_valid+=r-un):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r);}function he(e,t,r){X(e,r[t*2],r[t*2+1]);}function ps(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function Rh(e){e.bi_valid===16?(Yt(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8);}function Oh(e,t){var r=t.dyn_tree,i=t.max_code,n=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,l=t.stat_desc.extra_base,u=t.stat_desc.max_length,s,f,c,d,h,w,_=0;for(d=0;d<=He;d++)e.bl_count[d]=0;for(r[e.heap[e.heap_max]*2+1]=0,s=e.heap_max+1;s<as;s++)f=e.heap[s],d=r[r[f*2+1]*2+1]+1,d>u&&(d=u,_++),r[f*2+1]=d,!(f>i)&&(e.bl_count[d]++,h=0,f>=l&&(h=o[f-l]),w=r[f*2],e.opt_len+=w*(d+h),a&&(e.static_len+=w*(n[f*2+1]+h)));if(_!==0){do{for(d=u-1;e.bl_count[d]===0;)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[u]--,_-=2;}while(_>0);for(d=u;d!==0;d--)for(f=e.bl_count[d];f!==0;)c=e.heap[--s],!(c>i)&&(r[c*2+1]!==d&&(e.opt_len+=(d-r[c*2+1])*r[c*2],r[c*2+1]=d),f--);}}function gs(e,t,r){var i=new Array(He+1),n=0,a,o;for(a=1;a<=He;a++)i[a]=n=n+r[a-1]<<1;for(o=0;o<=t;o++){var l=e[o*2+1];l!==0&&(e[o*2]=ps(i[l]++,l));}}function Dh(){var e,t,r,i,n,a=new Array(He+1);for(r=0,i=0;i<mn-1;i++)for(bn[i]=r,e=0;e<1<<pn[i];e++)Vt[r++]=i;for(Vt[r-1]=i,n=0,i=0;i<16;i++)for(Fr[i]=n,e=0;e<1<<jr[i];e++)Xt[n++]=i;for(n>>=7;i<pt;i++)for(Fr[i]=n<<7,e=0;e<1<<jr[i]-7;e++)Xt[256+n++]=i;for(t=0;t<=He;t++)a[t]=0;for(e=0;e<=143;)Se[e*2+1]=8,e++,a[8]++;for(;e<=255;)Se[e*2+1]=9,e++,a[9]++;for(;e<=279;)Se[e*2+1]=7,e++,a[7]++;for(;e<=287;)Se[e*2+1]=8,e++,a[8]++;for(gs(Se,$t+1,a),e=0;e<pt;e++)Jt[e*2+1]=5,Jt[e*2]=ps(e,5);us=new dn(Se,pn,Kt+1,$t,He),ds=new dn(Jt,jr,0,pt,He),hs=new dn(new Array(0),Ch,0,vn,Th);}function ms(e){var t;for(t=0;t<$t;t++)e.dyn_ltree[t*2]=0;for(t=0;t<pt;t++)e.dyn_dtree[t*2]=0;for(t=0;t<vn;t++)e.bl_tree[t*2]=0;e.dyn_ltree[_n*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0;}function vs(e){e.bi_valid>8?Yt(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0;}function Ih(e,t,r,i){vs(e),(Yt(e,r),Yt(e,~r)),bh.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r;}function Qo(e,t,r,i){var n=t*2,a=r*2;return e[n]<e[a]||e[n]===e[a]&&i[t]<=i[r]}function cn(e,t,r){for(var i=e.heap[r],n=r<<1;n<=e.heap_len&&(n<e.heap_len&&Qo(t,e.heap[n+1],e.heap[n],e.depth)&&n++,!Qo(t,i,e.heap[n],e.depth));)e.heap[r]=e.heap[n],r=n,n<<=1;e.heap[r]=i;}function es(e,t,r){var i,n,a=0,o,l;if(e.last_lit!==0)do i=e.pending_buf[e.d_buf+a*2]<<8|e.pending_buf[e.d_buf+a*2+1],n=e.pending_buf[e.l_buf+a],a++,i===0?he(e,n,t):(o=Vt[n],he(e,o+Kt+1,t),l=pn[o],l!==0&&(n-=bn[o],X(e,n,l)),i--,o=cs(i),he(e,o,r),l=jr[o],l!==0&&(i-=Fr[o],X(e,i,l)));while(a<e.last_lit);he(e,_n,t);}function gn(e,t){var r=t.dyn_tree,i=t.stat_desc.static_tree,n=t.stat_desc.has_stree,a=t.stat_desc.elems,o,l,u=-1,s;for(e.heap_len=0,e.heap_max=as,o=0;o<a;o++)r[o*2]!==0?(e.heap[++e.heap_len]=u=o,e.depth[o]=0):r[o*2+1]=0;for(;e.heap_len<2;)s=e.heap[++e.heap_len]=u<2?++u:0,r[s*2]=1,e.depth[s]=0,e.opt_len--,n&&(e.static_len-=i[s*2+1]);for(t.max_code=u,o=e.heap_len>>1;o>=1;o--)cn(e,r,o);s=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],cn(e,r,1),l=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=l,r[s*2]=r[o*2]+r[l*2],e.depth[s]=(e.depth[o]>=e.depth[l]?e.depth[o]:e.depth[l])+1,r[o*2+1]=r[l*2+1]=s,e.heap[1]=s++,cn(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],Oh(e,t),gs(r,u,e.bl_count);}function ts(e,t,r){var i,n=-1,a,o=t[1],l=0,u=7,s=4;for(o===0&&(u=138,s=3),t[(r+1)*2+1]=65535,i=0;i<=r;i++)a=o,o=t[(i+1)*2+1],!(++l<u&&a===o)&&(l<s?e.bl_tree[a*2]+=l:a!==0?(a!==n&&e.bl_tree[a*2]++,e.bl_tree[os*2]++):l<=10?e.bl_tree[ss*2]++:e.bl_tree[ls*2]++,l=0,n=a,o===0?(u=138,s=3):a===o?(u=6,s=3):(u=7,s=4));}function rs(e,t,r){var i,n=-1,a,o=t[1],l=0,u=7,s=4;for(o===0&&(u=138,s=3),i=0;i<=r;i++)if(a=o,o=t[(i+1)*2+1],!(++l<u&&a===o)){if(l<s)do he(e,a,e.bl_tree);while(--l!==0);else a!==0?(a!==n&&(he(e,a,e.bl_tree),l--),he(e,os,e.bl_tree),X(e,l-3,2)):l<=10?(he(e,ss,e.bl_tree),X(e,l-3,3)):(he(e,ls,e.bl_tree),X(e,l-11,7));l=0,n=a,o===0?(u=138,s=3):a===o?(u=6,s=3):(u=7,s=4);}}function Lh(e){var t;for(ts(e,e.dyn_ltree,e.l_desc.max_code),ts(e,e.dyn_dtree,e.d_desc.max_code),gn(e,e.bl_desc),t=vn-1;t>=3&&e.bl_tree[fs[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function zh(e,t,r,i){var n;for(X(e,t-257,5),X(e,r-1,5),X(e,i-4,4),n=0;n<i;n++)X(e,e.bl_tree[fs[n]*2+1],3);rs(e,e.dyn_ltree,t-1),rs(e,e.dyn_dtree,r-1);}function Nh(e){var t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return Ko;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return Go;for(r=32;r<Kt;r++)if(e.dyn_ltree[r*2]!==0)return Go;return Ko}var is=false;function jh(e){is||(Dh(),is=true),e.l_desc=new hn(e.dyn_ltree,us),e.d_desc=new hn(e.dyn_dtree,ds),e.bl_desc=new hn(e.bl_tree,hs),e.bi_buf=0,e.bi_valid=0,ms(e);}function _s(e,t,r,i){X(e,(xh<<1)+(i?1:0),3),Ih(e,t,r);}function Fh(e){X(e,ns<<1,3),he(e,_n,Se),Rh(e);}function Mh(e,t,r,i){var n,a,o=0;e.level>0?(e.strm.data_type===wh&&(e.strm.data_type=Nh(e)),gn(e,e.l_desc),gn(e,e.d_desc),o=Lh(e),n=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=n&&(n=a)):n=a=r+5,r+4<=n&&t!==-1?_s(e,t,r,i):e.strategy===yh||a===n?(X(e,(ns<<1)+(i?1:0),3),es(e,Se,Jt)):(X(e,(Eh<<1)+(i?1:0),3),zh(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),es(e,e.dyn_ltree,e.dyn_dtree)),ms(e),i&&vs(e);}function Ph(e,t,r){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=r&255,e.last_lit++,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(Vt[r]+Kt+1)*2]++,e.dyn_dtree[cs(t)*2]++),e.last_lit===e.lit_bufsize-1}mt._tr_init=jh;mt._tr_stored_block=_s;mt._tr_flush_block=Mh;mt._tr_tally=Ph;mt._tr_align=Fh;});var yn=v((Kg,ys)=>{function Bh(e,t,r,i){for(var n=e&65535|0,a=e>>>16&65535|0,o=0;r!==0;){o=r>2e3?2e3:r,r-=o;do n=n+t[i++]|0,a=a+n|0;while(--o);n%=65521,a%=65521;}return n|a<<16|0}ys.exports=Bh;});var wn=v((Gg,ws)=>{function qh(){for(var e,t=[],r=0;r<256;r++){e=r;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e;}return t}var Uh=qh();function Hh(e,t,r,i){var n=Uh,a=i+r;e^=-1;for(var o=i;o<a;o++)e=e>>>8^n[(e^t[o])&255];return e^-1}ws.exports=Hh;});var Mr=v((Qg,xs)=>{xs.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"};});var Ds=v(ge=>{var $=Ee(),ee=bs(),Ts=yn(),Ie=wn(),Zh=Mr(),$e=0,Wh=1,Jh=3,Fe=4,Es=5,pe=0,Ss=1,te=-2,$h=-3,xn=-5,Xh=-1,Vh=1,Pr=2,Yh=3,Kh=4,Gh=0,Qh=2,Hr=8,ec=9,tc=15,rc=8,ic=29,nc=256,Sn=nc+1+ic,ac=30,oc=19,sc=2*Sn+1,lc=15,A=3,Ne=258,ae=Ne+A+1,fc=32,Zr=42,kn=69,Br=73,qr=91,Ur=103,Ze=113,Qt=666,P=1,er=2,We=3,bt=4,uc=3;function je(e,t){return e.msg=Zh[t],t}function ks(e){return (e<<1)-(e>4?9:0)}function ze(e){for(var t=e.length;--t>=0;)e[t]=0;}function Le(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&($.arraySet(e.output,t.pending_buf,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,t.pending===0&&(t.pending_out=0));}function U(e,t){ee._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Le(e.strm);}function R(e,t){e.pending_buf[e.pending++]=t;}function Gt(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255;}function dc(e,t,r,i){var n=e.avail_in;return n>i&&(n=i),n===0?0:(e.avail_in-=n,$.arraySet(t,e.input,e.next_in,n,r),e.state.wrap===1?e.adler=Ts(e.adler,t,n,r):e.state.wrap===2&&(e.adler=Ie(e.adler,t,n,r)),e.next_in+=n,e.total_in+=n,n)}function Cs(e,t){var r=e.max_chain_length,i=e.strstart,n,a,o=e.prev_length,l=e.nice_match,u=e.strstart>e.w_size-ae?e.strstart-(e.w_size-ae):0,s=e.window,f=e.w_mask,c=e.prev,d=e.strstart+Ne,h=s[i+o-1],w=s[i+o];e.prev_length>=e.good_match&&(r>>=2),l>e.lookahead&&(l=e.lookahead);do if(n=t,!(s[n+o]!==w||s[n+o-1]!==h||s[n]!==s[i]||s[++n]!==s[i+1])){i+=2,n++;do;while(s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&s[++i]===s[++n]&&i<d);if(a=Ne-(d-i),i=d-Ne,a>o){if(e.match_start=t,o=a,a>=l)break;h=s[i+o-1],w=s[i+o];}}while((t=c[t&f])>u&&--r!==0);return o<=e.lookahead?o:e.lookahead}function Je(e){var t=e.w_size,r,i,n,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-ae)){$.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,i=e.hash_size,r=i;do n=e.head[--r],e.head[r]=n>=t?n-t:0;while(--i);i=t,r=i;do n=e.prev[--r],e.prev[r]=n>=t?n-t:0;while(--i);a+=t;}if(e.strm.avail_in===0)break;if(i=dc(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=i,e.lookahead+e.insert>=A)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+A-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<A)););}while(e.lookahead<ae&&e.strm.avail_in!==0)}function hc(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Je(e),e.lookahead===0&&t===$e)return P;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+r;if((e.strstart===0||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,U(e,false),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-ae&&(U(e,false),e.strm.avail_out===0))return P}return e.insert=0,t===Fe?(U(e,true),e.strm.avail_out===0?We:bt):(e.strstart>e.block_start&&(U(e,false),e.strm.avail_out===0),P)}function En(e,t){for(var r,i;;){if(e.lookahead<ae){if(Je(e),e.lookahead<ae&&t===$e)return P;if(e.lookahead===0)break}if(r=0,e.lookahead>=A&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+A-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),r!==0&&e.strstart-r<=e.w_size-ae&&(e.match_length=Cs(e,r)),e.match_length>=A)if(i=ee._tr_tally(e,e.strstart-e.match_start,e.match_length-A),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=A){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+A-1])&e.hash_mask,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=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else i=ee._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(U(e,false),e.strm.avail_out===0))return P}return e.insert=e.strstart<A-1?e.strstart:A-1,t===Fe?(U(e,true),e.strm.avail_out===0?We:bt):e.last_lit&&(U(e,false),e.strm.avail_out===0)?P:er}function vt(e,t){for(var r,i,n;;){if(e.lookahead<ae){if(Je(e),e.lookahead<ae&&t===$e)return P;if(e.lookahead===0)break}if(r=0,e.lookahead>=A&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+A-1])&e.hash_mask,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=A-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-ae&&(e.match_length=Cs(e,r),e.match_length<=5&&(e.strategy===Vh||e.match_length===A&&e.strstart-e.match_start>4096)&&(e.match_length=A-1)),e.prev_length>=A&&e.match_length<=e.prev_length){n=e.strstart+e.lookahead-A,i=ee._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-A),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=n&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+A-1])&e.hash_mask,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);if(e.match_available=0,e.match_length=A-1,e.strstart++,i&&(U(e,false),e.strm.avail_out===0))return P}else if(e.match_available){if(i=ee._tr_tally(e,0,e.window[e.strstart-1]),i&&U(e,false),e.strstart++,e.lookahead--,e.strm.avail_out===0)return P}else e.match_available=1,e.strstart++,e.lookahead--;}return e.match_available&&(i=ee._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<A-1?e.strstart:A-1,t===Fe?(U(e,true),e.strm.avail_out===0?We:bt):e.last_lit&&(U(e,false),e.strm.avail_out===0)?P:er}function cc(e,t){for(var r,i,n,a,o=e.window;;){if(e.lookahead<=Ne){if(Je(e),e.lookahead<=Ne&&t===$e)return P;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=A&&e.strstart>0&&(n=e.strstart-1,i=o[n],i===o[++n]&&i===o[++n]&&i===o[++n])){a=e.strstart+Ne;do;while(i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&n<a);e.match_length=Ne-(a-n),e.match_length>e.lookahead&&(e.match_length=e.lookahead);}if(e.match_length>=A?(r=ee._tr_tally(e,1,e.match_length-A),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=ee._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(U(e,false),e.strm.avail_out===0))return P}return e.insert=0,t===Fe?(U(e,true),e.strm.avail_out===0?We:bt):e.last_lit&&(U(e,false),e.strm.avail_out===0)?P:er}function pc(e,t){for(var r;;){if(e.lookahead===0&&(Je(e),e.lookahead===0)){if(t===$e)return P;break}if(e.match_length=0,r=ee._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(U(e,false),e.strm.avail_out===0))return P}return e.insert=0,t===Fe?(U(e,true),e.strm.avail_out===0?We:bt):e.last_lit&&(U(e,false),e.strm.avail_out===0)?P:er}function ce(e,t,r,i,n){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=i,this.func=n;}var _t;_t=[new ce(0,0,0,0,hc),new ce(4,4,8,4,En),new ce(4,5,16,8,En),new ce(4,6,32,32,En),new ce(4,4,16,16,vt),new ce(8,16,32,32,vt),new ce(8,16,128,128,vt),new ce(8,32,128,256,vt),new ce(32,128,258,1024,vt),new ce(32,258,258,4096,vt)];function gc(e){e.window_size=2*e.w_size,ze(e.head),e.max_lazy_match=_t[e.level].max_lazy,e.good_match=_t[e.level].good_length,e.nice_match=_t[e.level].nice_length,e.max_chain_length=_t[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=A-1,e.match_available=0,e.ins_h=0;}function mc(){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=Hr,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 $.Buf16(sc*2),this.dyn_dtree=new $.Buf16((2*ac+1)*2),this.bl_tree=new $.Buf16((2*oc+1)*2),ze(this.dyn_ltree),ze(this.dyn_dtree),ze(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new $.Buf16(lc+1),this.heap=new $.Buf16(2*Sn+1),ze(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new $.Buf16(2*Sn+1),ze(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0;}function As(e){var t;return !e||!e.state?je(e,te):(e.total_in=e.total_out=0,e.data_type=Qh,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?Zr:Ze,e.adler=t.wrap===2?0:1,t.last_flush=$e,ee._tr_init(t),pe)}function Rs(e){var t=As(e);return t===pe&&gc(e.state),t}function vc(e,t){return !e||!e.state||e.state.wrap!==2?te:(e.state.gzhead=t,pe)}function Os(e,t,r,i,n,a){if(!e)return te;var o=1;if(t===Xh&&(t=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),n<1||n>ec||r!==Hr||i<8||i>15||t<0||t>9||a<0||a>Kh)return je(e,te);i===8&&(i=9);var l=new mc;return e.state=l,l.strm=e,l.wrap=o,l.gzhead=null,l.w_bits=i,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=n+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+A-1)/A),l.window=new $.Buf8(l.w_size*2),l.head=new $.Buf16(l.hash_size),l.prev=new $.Buf16(l.w_size),l.lit_bufsize=1<<n+6,l.pending_buf_size=l.lit_bufsize*4,l.pending_buf=new $.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=t,l.strategy=a,l.method=r,Rs(e)}function _c(e,t){return Os(e,t,Hr,tc,rc,Gh)}function bc(e,t){var r,i,n,a;if(!e||!e.state||t>Es||t<0)return e?je(e,te):te;if(i=e.state,!e.output||!e.input&&e.avail_in!==0||i.status===Qt&&t!==Fe)return je(e,e.avail_out===0?xn:te);if(i.strm=e,r=i.last_flush,i.last_flush=t,i.status===Zr)if(i.wrap===2)e.adler=0,R(i,31),R(i,139),R(i,8),i.gzhead?(R(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),R(i,i.gzhead.time&255),R(i,i.gzhead.time>>8&255),R(i,i.gzhead.time>>16&255),R(i,i.gzhead.time>>24&255),R(i,i.level===9?2:i.strategy>=Pr||i.level<2?4:0),R(i,i.gzhead.os&255),i.gzhead.extra&&i.gzhead.extra.length&&(R(i,i.gzhead.extra.length&255),R(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=Ie(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=kn):(R(i,0),R(i,0),R(i,0),R(i,0),R(i,0),R(i,i.level===9?2:i.strategy>=Pr||i.level<2?4:0),R(i,uc),i.status=Ze);else {var o=Hr+(i.w_bits-8<<4)<<8,l=-1;i.strategy>=Pr||i.level<2?l=0:i.level<6?l=1:i.level===6?l=2:l=3,o|=l<<6,i.strstart!==0&&(o|=fc),o+=31-o%31,i.status=Ze,Gt(i,o),i.strstart!==0&&(Gt(i,e.adler>>>16),Gt(i,e.adler&65535)),e.adler=1;}if(i.status===kn)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(i.gzhead.extra.length&65535)&&!(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=Ie(e.adler,i.pending_buf,i.pending-n,n)),Le(e),n=i.pending,i.pending===i.pending_buf_size));)R(i,i.gzhead.extra[i.gzindex]&255),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(e.adler=Ie(e.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=Br);}else i.status=Br;if(i.status===Br)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=Ie(e.adler,i.pending_buf,i.pending-n,n)),Le(e),n=i.pending,i.pending===i.pending_buf_size)){a=1;break}i.gzindex<i.gzhead.name.length?a=i.gzhead.name.charCodeAt(i.gzindex++)&255:a=0,R(i,a);}while(a!==0);i.gzhead.hcrc&&i.pending>n&&(e.adler=Ie(e.adler,i.pending_buf,i.pending-n,n)),a===0&&(i.gzindex=0,i.status=qr);}else i.status=qr;if(i.status===qr)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=Ie(e.adler,i.pending_buf,i.pending-n,n)),Le(e),n=i.pending,i.pending===i.pending_buf_size)){a=1;break}i.gzindex<i.gzhead.comment.length?a=i.gzhead.comment.charCodeAt(i.gzindex++)&255:a=0,R(i,a);}while(a!==0);i.gzhead.hcrc&&i.pending>n&&(e.adler=Ie(e.adler,i.pending_buf,i.pending-n,n)),a===0&&(i.status=Ur);}else i.status=Ur;if(i.status===Ur&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&Le(e),i.pending+2<=i.pending_buf_size&&(R(i,e.adler&255),R(i,e.adler>>8&255),e.adler=0,i.status=Ze)):i.status=Ze),i.pending!==0){if(Le(e),e.avail_out===0)return i.last_flush=-1,pe}else if(e.avail_in===0&&ks(t)<=ks(r)&&t!==Fe)return je(e,xn);if(i.status===Qt&&e.avail_in!==0)return je(e,xn);if(e.avail_in!==0||i.lookahead!==0||t!==$e&&i.status!==Qt){var u=i.strategy===Pr?pc(i,t):i.strategy===Yh?cc(i,t):_t[i.level].func(i,t);if((u===We||u===bt)&&(i.status=Qt),u===P||u===We)return e.avail_out===0&&(i.last_flush=-1),pe;if(u===er&&(t===Wh?ee._tr_align(i):t!==Es&&(ee._tr_stored_block(i,0,0,false),t===Jh&&(ze(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),Le(e),e.avail_out===0))return i.last_flush=-1,pe}return t!==Fe?pe:i.wrap<=0?Ss:(i.wrap===2?(R(i,e.adler&255),R(i,e.adler>>8&255),R(i,e.adler>>16&255),R(i,e.adler>>24&255),R(i,e.total_in&255),R(i,e.total_in>>8&255),R(i,e.total_in>>16&255),R(i,e.total_in>>24&255)):(Gt(i,e.adler>>>16),Gt(i,e.adler&65535)),Le(e),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?pe:Ss)}function yc(e){var t;return !e||!e.state?te:(t=e.state.status,t!==Zr&&t!==kn&&t!==Br&&t!==qr&&t!==Ur&&t!==Ze&&t!==Qt?je(e,te):(e.state=null,t===Ze?je(e,$h):pe))}function wc(e,t){var r=t.length,i,n,a,o,l,u,s,f;if(!e||!e.state||(i=e.state,o=i.wrap,o===2||o===1&&i.status!==Zr||i.lookahead))return te;for(o===1&&(e.adler=Ts(e.adler,t,r,0)),i.wrap=0,r>=i.w_size&&(o===0&&(ze(i.head),i.strstart=0,i.block_start=0,i.insert=0),f=new $.Buf8(i.w_size),$.arraySet(f,t,r-i.w_size,i.w_size,0),t=f,r=i.w_size),l=e.avail_in,u=e.next_in,s=e.input,e.avail_in=r,e.next_in=0,e.input=t,Je(i);i.lookahead>=A;){n=i.strstart,a=i.lookahead-(A-1);do i.ins_h=(i.ins_h<<i.hash_shift^i.window[n+A-1])&i.hash_mask,i.prev[n&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=n,n++;while(--a);i.strstart=n,i.lookahead=A-1,Je(i);}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=A-1,i.match_available=0,e.next_in=u,e.input=s,e.avail_in=l,i.wrap=o,pe}ge.deflateInit=_c;ge.deflateInit2=Os;ge.deflateReset=Rs;ge.deflateResetKeep=As;ge.deflateSetHeader=vc;ge.deflate=bc;ge.deflateEnd=yc;ge.deflateSetDictionary=wc;ge.deflateInfo="pako deflate (from Nodeca project)";});var Tn=v(yt=>{var Wr=Ee(),Is=true,Ls=true;try{String.fromCharCode.apply(null,[0]);}catch{Is=false;}try{String.fromCharCode.apply(null,new Uint8Array(1));}catch{Ls=false;}var tr=new Wr.Buf8(256);for(ke=0;ke<256;ke++)tr[ke]=ke>=252?6:ke>=248?5:ke>=240?4:ke>=224?3:ke>=192?2:1;var ke;tr[254]=tr[254]=1;yt.string2buf=function(e){var t,r,i,n,a,o=e.length,l=0;for(n=0;n<o;n++)r=e.charCodeAt(n),(r&64512)===55296&&n+1<o&&(i=e.charCodeAt(n+1),(i&64512)===56320&&(r=65536+(r-55296<<10)+(i-56320),n++)),l+=r<128?1:r<2048?2:r<65536?3:4;for(t=new Wr.Buf8(l),a=0,n=0;a<l;n++)r=e.charCodeAt(n),(r&64512)===55296&&n+1<o&&(i=e.charCodeAt(n+1),(i&64512)===56320&&(r=65536+(r-55296<<10)+(i-56320),n++)),r<128?t[a++]=r:r<2048?(t[a++]=192|r>>>6,t[a++]=128|r&63):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|r&63):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|r&63);return t};function zs(e,t){if(t<65534&&(e.subarray&&Ls||!e.subarray&&Is))return String.fromCharCode.apply(null,Wr.shrinkBuf(e,t));for(var r="",i=0;i<t;i++)r+=String.fromCharCode(e[i]);return r}yt.buf2binstring=function(e){return zs(e,e.length)};yt.binstring2buf=function(e){for(var t=new Wr.Buf8(e.length),r=0,i=t.length;r<i;r++)t[r]=e.charCodeAt(r);return t};yt.buf2string=function(e,t){var r,i,n,a,o=t||e.length,l=new Array(o*2);for(i=0,r=0;r<o;){if(n=e[r++],n<128){l[i++]=n;continue}if(a=tr[n],a>4){l[i++]=65533,r+=a-1;continue}for(n&=a===2?31:a===3?15:7;a>1&&r<o;)n=n<<6|e[r++]&63,a--;if(a>1){l[i++]=65533;continue}n<65536?l[i++]=n:(n-=65536,l[i++]=55296|n>>10&1023,l[i++]=56320|n&1023);}return zs(l,i)};yt.utf8border=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+tr[e[r]]>t?r:t};});var Cn=v((r0,Ns)=>{function xc(){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;}Ns.exports=xc;});var Ps=v(nr=>{var rr=Ds(),ir=Ee(),Rn=Tn(),On=Mr(),Ec=Cn(),Ms=Object.prototype.toString,Sc=0,An=4,wt=0,js=1,Fs=2,kc=-1,Tc=0,Cc=8;function Xe(e){if(!(this instanceof Xe))return new Xe(e);this.options=ir.assign({level:kc,method:Cc,chunkSize:16384,windowBits:15,memLevel:8,strategy:Tc,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=false,this.chunks=[],this.strm=new Ec,this.strm.avail_out=0;var r=rr.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==wt)throw new Error(On[r]);if(t.header&&rr.deflateSetHeader(this.strm,t.header),t.dictionary){var i;if(typeof t.dictionary=="string"?i=Rn.string2buf(t.dictionary):Ms.call(t.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(t.dictionary):i=t.dictionary,r=rr.deflateSetDictionary(this.strm,i),r!==wt)throw new Error(On[r]);this._dict_set=true;}}Xe.prototype.push=function(e,t){var r=this.strm,i=this.options.chunkSize,n,a;if(this.ended)return false;a=t===~~t?t:t===true?An:Sc,typeof e=="string"?r.input=Rn.string2buf(e):Ms.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new ir.Buf8(i),r.next_out=0,r.avail_out=i),n=rr.deflate(r,a),n!==js&&n!==wt)return this.onEnd(n),this.ended=true,false;(r.avail_out===0||r.avail_in===0&&(a===An||a===Fs))&&(this.options.to==="string"?this.onData(Rn.buf2binstring(ir.shrinkBuf(r.output,r.next_out))):this.onData(ir.shrinkBuf(r.output,r.next_out)));}while((r.avail_in>0||r.avail_out===0)&&n!==js);return a===An?(n=rr.deflateEnd(this.strm),this.onEnd(n),this.ended=true,n===wt):(a===Fs&&(this.onEnd(wt),r.avail_out=0),true)};Xe.prototype.onData=function(e){this.chunks.push(e);};Xe.prototype.onEnd=function(e){e===wt&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=ir.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg;};function Dn(e,t){var r=new Xe(t);if(r.push(e,true),r.err)throw r.msg||On[r.err];return r.result}function Ac(e,t){return t=t||{},t.raw=true,Dn(e,t)}function Rc(e,t){return t=t||{},t.gzip=true,Dn(e,t)}nr.Deflate=Xe;nr.deflate=Dn;nr.deflateRaw=Ac;nr.gzip=Rc;});var qs=v((n0,Bs)=>{var Jr=30,Oc=12;Bs.exports=function(t,r){var i,n,a,o,l,u,s,f,c,d,h,w,_,y,p,g,x,m,b,T,k,S,C,I,E;i=t.state,n=t.next_in,I=t.input,a=n+(t.avail_in-5),o=t.next_out,E=t.output,l=o-(r-t.avail_out),u=o+(t.avail_out-257),s=i.dmax,f=i.wsize,c=i.whave,d=i.wnext,h=i.window,w=i.hold,_=i.bits,y=i.lencode,p=i.distcode,g=(1<<i.lenbits)-1,x=(1<<i.distbits)-1;e:do{_<15&&(w+=I[n++]<<_,_+=8,w+=I[n++]<<_,_+=8),m=y[w&g];t:for(;;){if(b=m>>>24,w>>>=b,_-=b,b=m>>>16&255,b===0)E[o++]=m&65535;else if(b&16){T=m&65535,b&=15,b&&(_<b&&(w+=I[n++]<<_,_+=8),T+=w&(1<<b)-1,w>>>=b,_-=b),_<15&&(w+=I[n++]<<_,_+=8,w+=I[n++]<<_,_+=8),m=p[w&x];r:for(;;){if(b=m>>>24,w>>>=b,_-=b,b=m>>>16&255,b&16){if(k=m&65535,b&=15,_<b&&(w+=I[n++]<<_,_+=8,_<b&&(w+=I[n++]<<_,_+=8)),k+=w&(1<<b)-1,k>s){t.msg="invalid distance too far back",i.mode=Jr;break e}if(w>>>=b,_-=b,b=o-l,k>b){if(b=k-b,b>c&&i.sane){t.msg="invalid distance too far back",i.mode=Jr;break e}if(S=0,C=h,d===0){if(S+=f-b,b<T){T-=b;do E[o++]=h[S++];while(--b);S=o-k,C=E;}}else if(d<b){if(S+=f+d-b,b-=d,b<T){T-=b;do E[o++]=h[S++];while(--b);if(S=0,d<T){b=d,T-=b;do E[o++]=h[S++];while(--b);S=o-k,C=E;}}}else if(S+=d-b,b<T){T-=b;do E[o++]=h[S++];while(--b);S=o-k,C=E;}for(;T>2;)E[o++]=C[S++],E[o++]=C[S++],E[o++]=C[S++],T-=3;T&&(E[o++]=C[S++],T>1&&(E[o++]=C[S++]));}else {S=o-k;do E[o++]=E[S++],E[o++]=E[S++],E[o++]=E[S++],T-=3;while(T>2);T&&(E[o++]=E[S++],T>1&&(E[o++]=E[S++]));}}else if((b&64)===0){m=p[(m&65535)+(w&(1<<b)-1)];continue r}else {t.msg="invalid distance code",i.mode=Jr;break e}break}}else if((b&64)===0){m=y[(m&65535)+(w&(1<<b)-1)];continue t}else if(b&32){i.mode=Oc;break e}else {t.msg="invalid literal/length code",i.mode=Jr;break e}break}}while(n<a&&o<u);T=_>>3,n-=T,_-=T<<3,w&=(1<<_)-1,t.next_in=n,t.next_out=o,t.avail_in=n<a?5+(a-n):5-(n-a),t.avail_out=o<u?257+(u-o):257-(o-u),i.hold=w,i.bits=_;};});var Xs=v((a0,$s)=>{var Us=Ee(),xt=15,Hs=852,Zs=592,Ws=0,In=1,Js=2,Dc=[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],Ic=[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],Lc=[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],zc=[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];$s.exports=function(t,r,i,n,a,o,l,u){var s=u.bits,f=0,c=0,d=0,h=0,w=0,_=0,y=0,p=0,g=0,x=0,m,b,T,k,S,C=null,I=0,E,V=new Us.Buf16(xt+1),Qe=new Us.Buf16(xt+1),ur=null,aa=0,oa,dr,hr;for(f=0;f<=xt;f++)V[f]=0;for(c=0;c<n;c++)V[r[i+c]]++;for(w=s,h=xt;h>=1&&V[h]===0;h--);if(w>h&&(w=h),h===0)return a[o++]=1<<24|64<<16|0,a[o++]=1<<24|64<<16|0,u.bits=1,0;for(d=1;d<h&&V[d]===0;d++);for(w<d&&(w=d),p=1,f=1;f<=xt;f++)if(p<<=1,p-=V[f],p<0)return -1;if(p>0&&(t===Ws||h!==1))return -1;for(Qe[1]=0,f=1;f<xt;f++)Qe[f+1]=Qe[f]+V[f];for(c=0;c<n;c++)r[i+c]!==0&&(l[Qe[r[i+c]]++]=c);if(t===Ws?(C=ur=l,E=19):t===In?(C=Dc,I-=257,ur=Ic,aa-=257,E=256):(C=Lc,ur=zc,E=-1),x=0,c=0,f=d,S=o,_=w,y=0,T=-1,g=1<<w,k=g-1,t===In&&g>Hs||t===Js&&g>Zs)return 1;for(;;){oa=f-y,l[c]<E?(dr=0,hr=l[c]):l[c]>E?(dr=ur[aa+l[c]],hr=C[I+l[c]]):(dr=96,hr=0),m=1<<f-y,b=1<<_,d=b;do b-=m,a[S+(x>>y)+b]=oa<<24|dr<<16|hr|0;while(b!==0);for(m=1<<f-1;x&m;)m>>=1;if(m!==0?(x&=m-1,x+=m):x=0,c++,--V[f]===0){if(f===h)break;f=r[i+l[c]];}if(f>w&&(x&k)!==T){for(y===0&&(y=w),S+=d,_=f-y,p=1<<_;_+y<h&&(p-=V[_+y],!(p<=0));)_++,p<<=1;if(g+=1<<_,t===In&&g>Hs||t===Js&&g>Zs)return 1;T=x&k,a[T]=w<<24|_<<16|S-o|0;}}return x!==0&&(a[S+x]=f-y<<24|64<<16|0),u.bits=w,0};});var Rl=v(oe=>{var G=Ee(),Mn=yn(),me=wn(),Nc=qs(),ar=Xs(),jc=0,yl=1,wl=2,Vs=4,Fc=5,$r=6,Ve=0,Mc=1,Pc=2,re=-2,xl=-3,Pn=-4,Bc=-5,Ys=8,El=1,Ks=2,Gs=3,Qs=4,el=5,tl=6,rl=7,il=8,nl=9,al=10,Yr=11,Te=12,Ln=13,ol=14,zn=15,sl=16,ll=17,fl=18,ul=19,Xr=20,Vr=21,dl=22,hl=23,cl=24,pl=25,gl=26,Nn=27,ml=28,vl=29,z=30,Bn=31,qc=32,Uc=852,Hc=592,Zc=15,Wc=Zc;function _l(e){return (e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function Jc(){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 G.Buf16(320),this.work=new G.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0;}function Sl(e){var t;return !e||!e.state?re:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=El,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new G.Buf32(Uc),t.distcode=t.distdyn=new G.Buf32(Hc),t.sane=1,t.back=-1,Ve)}function kl(e){var t;return !e||!e.state?re:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,Sl(e))}function Tl(e,t){var r,i;return !e||!e.state||(i=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?re:(i.window!==null&&i.wbits!==t&&(i.window=null),i.wrap=r,i.wbits=t,kl(e))}function Cl(e,t){var r,i;return e?(i=new Jc,e.state=i,i.window=null,r=Tl(e,t),r!==Ve&&(e.state=null),r):re}function $c(e){return Cl(e,Wc)}var bl=true,jn,Fn;function Xc(e){if(bl){var t;for(jn=new G.Buf32(512),Fn=new G.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(ar(yl,e.lens,0,288,jn,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;ar(wl,e.lens,0,32,Fn,0,e.work,{bits:5}),bl=false;}e.lencode=jn,e.lenbits=9,e.distcode=Fn,e.distbits=5;}function Al(e,t,r,i){var n,a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new G.Buf8(a.wsize)),i>=a.wsize?(G.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(n=a.wsize-a.wnext,n>i&&(n=i),G.arraySet(a.window,t,r-i,n,a.wnext),i-=n,i?(G.arraySet(a.window,t,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=n,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=n))),0}function Vc(e,t){var r,i,n,a,o,l,u,s,f,c,d,h,w,_,y=0,p,g,x,m,b,T,k,S,C=new G.Buf8(4),I,E,V=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return re;r=e.state,r.mode===Te&&(r.mode=Ln),o=e.next_out,n=e.output,u=e.avail_out,a=e.next_in,i=e.input,l=e.avail_in,s=r.hold,f=r.bits,c=l,d=u,S=Ve;e:for(;;)switch(r.mode){case El:if(r.wrap===0){r.mode=Ln;break}for(;f<16;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8;}if(r.wrap&2&&s===35615){r.check=0,C[0]=s&255,C[1]=s>>>8&255,r.check=me(r.check,C,2,0),s=0,f=0,r.mode=Ks;break}if(r.flags=0,r.head&&(r.head.done=false),!(r.wrap&1)||(((s&255)<<8)+(s>>8))%31){e.msg="incorrect header check",r.mode=z;break}if((s&15)!==Ys){e.msg="unknown compression method",r.mode=z;break}if(s>>>=4,f-=4,k=(s&15)+8,r.wbits===0)r.wbits=k;else if(k>r.wbits){e.msg="invalid window size",r.mode=z;break}r.dmax=1<<k,e.adler=r.check=1,r.mode=s&512?al:Te,s=0,f=0;break;case Ks:for(;f<16;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8;}if(r.flags=s,(r.flags&255)!==Ys){e.msg="unknown compression method",r.mode=z;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=z;break}r.head&&(r.head.text=s>>8&1),r.flags&512&&(C[0]=s&255,C[1]=s>>>8&255,r.check=me(r.check,C,2,0)),s=0,f=0,r.mode=Gs;case Gs:for(;f<32;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8;}r.head&&(r.head.time=s),r.flags&512&&(C[0]=s&255,C[1]=s>>>8&255,C[2]=s>>>16&255,C[3]=s>>>24&255,r.check=me(r.check,C,4,0)),s=0,f=0,r.mode=Qs;case Qs:for(;f<16;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8;}r.head&&(r.head.xflags=s&255,r.head.os=s>>8),r.flags&512&&(C[0]=s&255,C[1]=s>>>8&255,r.check=me(r.check,C,2,0)),s=0,f=0,r.mode=el;case el:if(r.flags&1024){for(;f<16;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8;}r.length=s,r.head&&(r.head.extra_len=s),r.flags&512&&(C[0]=s&255,C[1]=s>>>8&255,r.check=me(r.check,C,2,0)),s=0,f=0;}else r.head&&(r.head.extra=null);r.mode=tl;case tl:if(r.flags&1024&&(h=r.length,h>l&&(h=l),h&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),G.arraySet(r.head.extra,i,a,h,k)),r.flags&512&&(r.check=me(r.check,i,h,a)),l-=h,a+=h,r.length-=h),r.length))break e;r.length=0,r.mode=rl;case rl:if(r.flags&2048){if(l===0)break e;h=0;do k=i[a+h++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k));while(k&&h<l);if(r.flags&512&&(r.check=me(r.check,i,h,a)),l-=h,a+=h,k)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=il;case il:if(r.flags&4096){if(l===0)break e;h=0;do k=i[a+h++],r.head&&k&&r.length<65536&&(r.head.comment+=String.fromCharCode(k));while(k&&h<l);if(r.flags&512&&(r.check=me(r.check,i,h,a)),l-=h,a+=h,k)break e}else r.head&&(r.head.comment=null);r.mode=nl;case nl:if(r.flags&512){for(;f<16;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8;}if(s!==(r.check&65535)){e.msg="header crc mismatch",r.mode=z;break}s=0,f=0;}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=true),e.adler=r.check=0,r.mode=Te;break;case al:for(;f<32;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8;}e.adler=r.check=_l(s),s=0,f=0,r.mode=Yr;case Yr:if(r.havedict===0)return e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=l,r.hold=s,r.bits=f,Pc;e.adler=r.check=1,r.mode=Te;case Te:if(t===Fc||t===$r)break e;case Ln:if(r.last){s>>>=f&7,f-=f&7,r.mode=Nn;break}for(;f<3;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8;}switch(r.last=s&1,s>>>=1,f-=1,s&3){case 0:r.mode=ol;break;case 1:if(Xc(r),r.mode=Xr,t===$r){s>>>=2,f-=2;break e}break;case 2:r.mode=ll;break;case 3:e.msg="invalid block type",r.mode=z;}s>>>=2,f-=2;break;case ol:for(s>>>=f&7,f-=f&7;f<32;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8;}if((s&65535)!==(s>>>16^65535)){e.msg="invalid stored block lengths",r.mode=z;break}if(r.length=s&65535,s=0,f=0,r.mode=zn,t===$r)break e;case zn:r.mode=sl;case sl:if(h=r.length,h){if(h>l&&(h=l),h>u&&(h=u),h===0)break e;G.arraySet(n,i,a,h,o),l-=h,a+=h,u-=h,o+=h,r.length-=h;break}r.mode=Te;break;case ll:for(;f<14;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8;}if(r.nlen=(s&31)+257,s>>>=5,f-=5,r.ndist=(s&31)+1,s>>>=5,f-=5,r.ncode=(s&15)+4,s>>>=4,f-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=z;break}r.have=0,r.mode=fl;case fl:for(;r.have<r.ncode;){for(;f<3;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8;}r.lens[V[r.have++]]=s&7,s>>>=3,f-=3;}for(;r.have<19;)r.lens[V[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,I={bits:r.lenbits},S=ar(jc,r.lens,0,19,r.lencode,0,r.work,I),r.lenbits=I.bits,S){e.msg="invalid code lengths set",r.mode=z;break}r.have=0,r.mode=ul;case ul:for(;r.have<r.nlen+r.ndist;){for(;y=r.lencode[s&(1<<r.lenbits)-1],p=y>>>24,g=y>>>16&255,x=y&65535,!(p<=f);){if(l===0)break e;l--,s+=i[a++]<<f,f+=8;}if(x<16)s>>>=p,f-=p,r.lens[r.have++]=x;else {if(x===16){for(E=p+2;f<E;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8;}if(s>>>=p,f-=p,r.have===0){e.msg="invalid bit length repeat",r.mode=z;break}k=r.lens[r.have-1],h=3+(s&3),s>>>=2,f-=2;}else if(x===17){for(E=p+3;f<E;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8;}s>>>=p,f-=p,k=0,h=3+(s&7),s>>>=3,f-=3;}else {for(E=p+7;f<E;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8;}s>>>=p,f-=p,k=0,h=11+(s&127),s>>>=7,f-=7;}if(r.have+h>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=z;break}for(;h--;)r.lens[r.have++]=k;}}if(r.mode===z)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=z;break}if(r.lenbits=9,I={bits:r.lenbits},S=ar(yl,r.lens,0,r.nlen,r.lencode,0,r.work,I),r.lenbits=I.bits,S){e.msg="invalid literal/lengths set",r.mode=z;break}if(r.distbits=6,r.distcode=r.distdyn,I={bits:r.distbits},S=ar(wl,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,I),r.distbits=I.bits,S){e.msg="invalid distances set",r.mode=z;break}if(r.mode=Xr,t===$r)break e;case Xr:r.mode=Vr;case Vr:if(l>=6&&u>=258){e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=l,r.hold=s,r.bits=f,Nc(e,d),o=e.next_out,n=e.output,u=e.avail_out,a=e.next_in,i=e.input,l=e.avail_in,s=r.hold,f=r.bits,r.mode===Te&&(r.back=-1);break}for(r.back=0;y=r.lencode[s&(1<<r.lenbits)-1],p=y>>>24,g=y>>>16&255,x=y&65535,!(p<=f);){if(l===0)break e;l--,s+=i[a++]<<f,f+=8;}if(g&&(g&240)===0){for(m=p,b=g,T=x;y=r.lencode[T+((s&(1<<m+b)-1)>>m)],p=y>>>24,g=y>>>16&255,x=y&65535,!(m+p<=f);){if(l===0)break e;l--,s+=i[a++]<<f,f+=8;}s>>>=m,f-=m,r.back+=m;}if(s>>>=p,f-=p,r.back+=p,r.length=x,g===0){r.mode=gl;break}if(g&32){r.back=-1,r.mode=Te;break}if(g&64){e.msg="invalid literal/length code",r.mode=z;break}r.extra=g&15,r.mode=dl;case dl:if(r.extra){for(E=r.extra;f<E;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8;}r.length+=s&(1<<r.extra)-1,s>>>=r.extra,f-=r.extra,r.back+=r.extra;}r.was=r.length,r.mode=hl;case hl:for(;y=r.distcode[s&(1<<r.distbits)-1],p=y>>>24,g=y>>>16&255,x=y&65535,!(p<=f);){if(l===0)break e;l--,s+=i[a++]<<f,f+=8;}if((g&240)===0){for(m=p,b=g,T=x;y=r.distcode[T+((s&(1<<m+b)-1)>>m)],p=y>>>24,g=y>>>16&255,x=y&65535,!(m+p<=f);){if(l===0)break e;l--,s+=i[a++]<<f,f+=8;}s>>>=m,f-=m,r.back+=m;}if(s>>>=p,f-=p,r.back+=p,g&64){e.msg="invalid distance code",r.mode=z;break}r.offset=x,r.extra=g&15,r.mode=cl;case cl:if(r.extra){for(E=r.extra;f<E;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8;}r.offset+=s&(1<<r.extra)-1,s>>>=r.extra,f-=r.extra,r.back+=r.extra;}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=z;break}r.mode=pl;case pl:if(u===0)break e;if(h=d-u,r.offset>h){if(h=r.offset-h,h>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=z;break}h>r.wnext?(h-=r.wnext,w=r.wsize-h):w=r.wnext-h,h>r.length&&(h=r.length),_=r.window;}else _=n,w=o-r.offset,h=r.length;h>u&&(h=u),u-=h,r.length-=h;do n[o++]=_[w++];while(--h);r.length===0&&(r.mode=Vr);break;case gl:if(u===0)break e;n[o++]=r.length,u--,r.mode=Vr;break;case Nn:if(r.wrap){for(;f<32;){if(l===0)break e;l--,s|=i[a++]<<f,f+=8;}if(d-=u,e.total_out+=d,r.total+=d,d&&(e.adler=r.check=r.flags?me(r.check,n,d,o-d):Mn(r.check,n,d,o-d)),d=u,(r.flags?s:_l(s))!==r.check){e.msg="incorrect data check",r.mode=z;break}s=0,f=0;}r.mode=ml;case ml:if(r.wrap&&r.flags){for(;f<32;){if(l===0)break e;l--,s+=i[a++]<<f,f+=8;}if(s!==(r.total&4294967295)){e.msg="incorrect length check",r.mode=z;break}s=0,f=0;}r.mode=vl;case vl:S=Mc;break e;case z:S=xl;break e;case Bn:return Pn;case qc:default:return re}return e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=l,r.hold=s,r.bits=f,(r.wsize||d!==e.avail_out&&r.mode<z&&(r.mode<Nn||t!==Vs))&&Al(e,e.output,e.next_out,d-e.avail_out)?(r.mode=Bn,Pn):(c-=e.avail_in,d-=e.avail_out,e.total_in+=c,e.total_out+=d,r.total+=d,r.wrap&&d&&(e.adler=r.check=r.flags?me(r.check,n,d,e.next_out-d):Mn(r.check,n,d,e.next_out-d)),e.data_type=r.bits+(r.last?64:0)+(r.mode===Te?128:0)+(r.mode===Xr||r.mode===zn?256:0),(c===0&&d===0||t===Vs)&&S===Ve&&(S=Bc),S)}function Yc(e){if(!e||!e.state)return re;var t=e.state;return t.window&&(t.window=null),e.state=null,Ve}function Kc(e,t){var r;return !e||!e.state||(r=e.state,(r.wrap&2)===0)?re:(r.head=t,t.done=false,Ve)}function Gc(e,t){var r=t.length,i,n,a;return !e||!e.state||(i=e.state,i.wrap!==0&&i.mode!==Yr)?re:i.mode===Yr&&(n=1,n=Mn(n,t,r,0),n!==i.check)?xl:(a=Al(e,t,r,r),a?(i.mode=Bn,Pn):(i.havedict=1,Ve))}oe.inflateReset=kl;oe.inflateReset2=Tl;oe.inflateResetKeep=Sl;oe.inflateInit=$c;oe.inflateInit2=Cl;oe.inflate=Vc;oe.inflateEnd=Yc;oe.inflateGetHeader=Kc;oe.inflateSetDictionary=Gc;oe.inflateInfo="pako inflate (from Nodeca project)";});var qn=v((s0,Ol)=>{Ol.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_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};});var Il=v((l0,Dl)=>{function Qc(){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;}Dl.exports=Qc;});var zl=v(sr=>{var Et=Rl(),or=Ee(),Kr=Tn(),j=qn(),Un=Mr(),ep=Cn(),tp=Il(),Ll=Object.prototype.toString;function Ye(e){if(!(this instanceof Ye))return new Ye(e);this.options=or.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15)===0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=false,this.chunks=[],this.strm=new ep,this.strm.avail_out=0;var r=Et.inflateInit2(this.strm,t.windowBits);if(r!==j.Z_OK)throw new Error(Un[r]);if(this.header=new tp,Et.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Kr.string2buf(t.dictionary):Ll.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=Et.inflateSetDictionary(this.strm,t.dictionary),r!==j.Z_OK)))throw new Error(Un[r])}Ye.prototype.push=function(e,t){var r=this.strm,i=this.options.chunkSize,n=this.options.dictionary,a,o,l,u,s,f=false;if(this.ended)return false;o=t===~~t?t:t===true?j.Z_FINISH:j.Z_NO_FLUSH,typeof e=="string"?r.input=Kr.binstring2buf(e):Ll.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new or.Buf8(i),r.next_out=0,r.avail_out=i),a=Et.inflate(r,j.Z_NO_FLUSH),a===j.Z_NEED_DICT&&n&&(a=Et.inflateSetDictionary(this.strm,n)),a===j.Z_BUF_ERROR&&f===true&&(a=j.Z_OK,f=false),a!==j.Z_STREAM_END&&a!==j.Z_OK)return this.onEnd(a),this.ended=true,false;r.next_out&&(r.avail_out===0||a===j.Z_STREAM_END||r.avail_in===0&&(o===j.Z_FINISH||o===j.Z_SYNC_FLUSH))&&(this.options.to==="string"?(l=Kr.utf8border(r.output,r.next_out),u=r.next_out-l,s=Kr.buf2string(r.output,l),r.next_out=u,r.avail_out=i-u,u&&or.arraySet(r.output,r.output,l,u,0),this.onData(s)):this.onData(or.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(f=true);}while((r.avail_in>0||r.avail_out===0)&&a!==j.Z_STREAM_END);return a===j.Z_STREAM_END&&(o=j.Z_FINISH),o===j.Z_FINISH?(a=Et.inflateEnd(this.strm),this.onEnd(a),this.ended=true,a===j.Z_OK):(o===j.Z_SYNC_FLUSH&&(this.onEnd(j.Z_OK),r.avail_out=0),true)};Ye.prototype.onData=function(e){this.chunks.push(e);};Ye.prototype.onEnd=function(e){e===j.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=or.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg;};function Hn(e,t){var r=new Ye(t);if(r.push(e,true),r.err)throw r.msg||Un[r.err];return r.result}function rp(e,t){return t=t||{},t.raw=true,Hn(e,t)}sr.Inflate=Ye;sr.inflate=Hn;sr.inflateRaw=rp;sr.ungzip=Hn;});var Fl=v((u0,jl)=>{var ip=Ee().assign,np=Ps(),ap=zl(),op=qn(),Nl={};ip(Nl,np,ap,op);jl.exports=Nl;});var Pl=v(Qr=>{var sp=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",lp=Fl(),Ml=N(),Gr=K(),fp=sp?"uint8array":"array";Qr.magic="\b\0";function Ke(e,t){Gr.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={};}Ml.inherits(Ke,Gr);Ke.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(Ml.transformTo(fp,e.data),false);};Ke.prototype.flush=function(){Gr.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],true);};Ke.prototype.cleanUp=function(){Gr.prototype.cleanUp.call(this),this._pako=null;};Ke.prototype._createPako=function(){this._pako=new lp[this._pakoAction]({raw:true,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta});};};Qr.compressWorker=function(e){return new Ke("Deflate",e)};Qr.uncompressWorker=function(){return new Ke("Inflate",{})};});var Wn=v(Zn=>{var Bl=K();Zn.STORE={magic:"\0\0",compressWorker:function(){return new Bl("STORE compression")},uncompressWorker:function(){return new Bl("STORE decompression")}};Zn.DEFLATE=Pl();});var Jn=v(Ge=>{Ge.LOCAL_FILE_HEADER="PK";Ge.CENTRAL_FILE_HEADER="PK";Ge.CENTRAL_DIRECTORY_END="PK";Ge.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07";Ge.ZIP64_CENTRAL_DIRECTORY_END="PK";Ge.DATA_DESCRIPTOR="PK\x07\b";});var Zl=v((p0,Hl)=>{var St=N(),kt=K(),$n=ht(),ql=Lr(),ei=Jn(),D=function(e,t){var r="",i;for(i=0;i<t;i++)r+=String.fromCharCode(e&255),e=e>>>8;return r},up=function(e,t){var r=e;return e||(r=t?16893:33204),(r&65535)<<16},dp=function(e){return (e||0)&63},Ul=function(e,t,r,i,n,a){var o=e.file,l=e.compression,u=a!==$n.utf8encode,s=St.transformTo("string",a(o.name)),f=St.transformTo("string",$n.utf8encode(o.name)),c=o.comment,d=St.transformTo("string",a(c)),h=St.transformTo("string",$n.utf8encode(c)),w=f.length!==o.name.length,_=h.length!==c.length,y,p,g="",x="",m="",b=o.dir,T=o.date,k={crc32:0,compressedSize:0,uncompressedSize:0};(!t||r)&&(k.crc32=e.crc32,k.compressedSize=e.compressedSize,k.uncompressedSize=e.uncompressedSize);var S=0;t&&(S|=8),!u&&(w||_)&&(S|=2048);var C=0,I=0;b&&(C|=16),n==="UNIX"?(I=798,C|=up(o.unixPermissions,b)):(I=20,C|=dp(o.dosPermissions)),y=T.getUTCHours(),y=y<<6,y=y|T.getUTCMinutes(),y=y<<5,y=y|T.getUTCSeconds()/2,p=T.getUTCFullYear()-1980,p=p<<4,p=p|T.getUTCMonth()+1,p=p<<5,p=p|T.getUTCDate(),w&&(x=D(1,1)+D(ql(s),4)+f,g+="up"+D(x.length,2)+x),_&&(m=D(1,1)+D(ql(d),4)+h,g+="uc"+D(m.length,2)+m);var E="";E+=`
2
- \0`,E+=D(S,2),E+=l.magic,E+=D(y,2),E+=D(p,2),E+=D(k.crc32,4),E+=D(k.compressedSize,4),E+=D(k.uncompressedSize,4),E+=D(s.length,2),E+=D(g.length,2);var V=ei.LOCAL_FILE_HEADER+E+s+g,Qe=ei.CENTRAL_FILE_HEADER+D(I,2)+E+D(d.length,2)+"\0\0\0\0"+D(C,4)+D(i,4)+s+g+d;return {fileRecord:V,dirRecord:Qe}},hp=function(e,t,r,i,n){var a="",o=St.transformTo("string",n(i));return a=ei.CENTRAL_DIRECTORY_END+"\0\0\0\0"+D(e,2)+D(e,2)+D(t,4)+D(r,4)+D(o.length,2)+o,a},cp=function(e){var t="";return t=ei.DATA_DESCRIPTOR+D(e.crc32,4)+D(e.compressedSize,4)+D(e.uncompressedSize,4),t};function se(e,t,r,i){kt.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=i,this.streamFiles=e,this.accumulate=false,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[];}St.inherits(se,kt);se.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,kt.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-i-1))/r:100}}));};se.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=Ul(e,t,false,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}});}else this.accumulate=true;};se.prototype.closedSource=function(e){this.accumulate=false;var t=this.streamFiles&&!e.file.dir,r=Ul(e,t,true,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:cp(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null;};se.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var r=this.bytesWritten-e,i=hp(this.dirRecords.length,r,e,this.zipComment,this.encodeFileName);this.push({data:i,meta:{percent:100}});};se.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume();};se.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",function(r){t.processChunk(r);}),e.on("end",function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end();}),e.on("error",function(r){t.error(r);}),this};se.prototype.resume=function(){if(!kt.prototype.resume.call(this))return false;if(!this.previous&&this._sources.length)return this.prepareNextSource(),true;if(!this.previous&&!this._sources.length&&!this.generatedError)return this.end(),true};se.prototype.error=function(e){var t=this._sources;if(!kt.prototype.error.call(this,e))return false;for(var r=0;r<t.length;r++)try{t[r].error(e);}catch{}return true};se.prototype.lock=function(){kt.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock();};Hl.exports=se;});var Jl=v(Wl=>{var pp=Wn(),gp=Zl(),mp=function(e,t){var r=e||t,i=pp[r];if(!i)throw new Error(r+" is not a valid compression method !");return i};Wl.generateWorker=function(e,t,r){var i=new gp(t.streamFiles,r,t.platform,t.encodeFileName),n=0;try{e.forEach(function(a,o){n++;var l=mp(o.options.compression,t.compression),u=o.options.compressionOptions||t.compressionOptions||{},s=o.dir,f=o.date;o._compressWorker(l,u).withStreamInfo("file",{name:a,dir:s,date:f,comment:o.comment||"",unixPermissions:o.unixPermissions,dosPermissions:o.dosPermissions}).pipe(i);}),i.entriesCount=n;}catch(a){i.error(a);}return i};});var Xl=v((m0,$l)=>{var vp=N(),ti=K();function lr(e,t){ti.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=false,this._bindStream(t);}vp.inherits(lr,ti);lr.prototype._bindStream=function(e){var t=this;this._stream=e,e.pause(),e.on("data",function(r){t.push({data:r,meta:{percent:0}});}).on("error",function(r){t.isPaused?this.generatedError=r:t.error(r);}).on("end",function(){t.isPaused?t._upstreamEnded=true:t.end();});};lr.prototype.pause=function(){return ti.prototype.pause.call(this)?(this._stream.pause(),true):false};lr.prototype.resume=function(){return ti.prototype.resume.call(this)?(this._upstreamEnded?this.end():this._stream.resume(),true):false};$l.exports=lr;});var af=v((v0,nf)=>{var _p=ht(),fr=N(),Gl=K(),bp=Ki(),Ql=Gi(),Vl=zr(),yp=Yo(),wp=Jl(),Yl=Mt(),xp=Xl(),ef=function(e,t,r){var i=fr.getTypeOf(t),n,a=fr.extend(r||{},Ql);a.date=a.date||new Date,a.compression!==null&&(a.compression=a.compression.toUpperCase()),typeof a.unixPermissions=="string"&&(a.unixPermissions=parseInt(a.unixPermissions,8)),a.unixPermissions&&a.unixPermissions&16384&&(a.dir=true),a.dosPermissions&&a.dosPermissions&16&&(a.dir=true),a.dir&&(e=tf(e)),a.createFolders&&(n=Ep(e))&&rf.call(this,n,true);var o=i==="string"&&a.binary===false&&a.base64===false;(!r||typeof r.binary>"u")&&(a.binary=!o);var l=t instanceof Vl&&t.uncompressedSize===0;(l||a.dir||!t||t.length===0)&&(a.base64=false,a.binary=true,t="",a.compression="STORE",i="string");var u=null;t instanceof Vl||t instanceof Gl?u=t:Yl.isNode&&Yl.isStream(t)?u=new xp(e,t):u=fr.prepareContent(e,t,a.binary,a.optimizedBinaryString,a.base64);var s=new yp(e,u,a);this.files[e]=s;},Ep=function(e){e.slice(-1)==="/"&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return t>0?e.substring(0,t):""},tf=function(e){return e.slice(-1)!=="/"&&(e+="/"),e},rf=function(e,t){return t=typeof t<"u"?t:Ql.createFolders,e=tf(e),this.files[e]||ef.call(this,e,null,{dir:true,createFolders:t}),this.files[e]};function Kl(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var Sp={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,i;for(t in this.files)i=this.files[t],r=t.slice(this.root.length,t.length),r&&t.slice(0,this.root.length)===this.root&&e(r,i);},filter:function(e){var t=[];return this.forEach(function(r,i){e(r,i)&&t.push(i);}),t},file:function(e,t,r){if(arguments.length===1)if(Kl(e)){var i=e;return this.filter(function(a,o){return !o.dir&&i.test(a)})}else {var n=this.files[this.root+e];return n&&!n.dir?n:null}else e=this.root+e,ef.call(this,e,t,r);return this},folder:function(e){if(!e)return this;if(Kl(e))return this.filter(function(n,a){return a.dir&&e.test(n)});var t=this.root+e,r=rf.call(this,t),i=this.clone();return i.root=r.name,i},remove:function(e){e=this.root+e;var t=this.files[e];if(t||(e.slice(-1)!=="/"&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var r=this.filter(function(n,a){return a.name.slice(0,e.length)===e}),i=0;i<r.length;i++)delete this.files[r[i].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,r={};try{if(r=fr.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:_p.utf8encode}),r.type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),r.type==="binarystring"&&(r.type="string"),!r.type)throw new Error("No output type specified.");fr.checkSupport(r.type),(r.platform==="darwin"||r.platform==="freebsd"||r.platform==="linux"||r.platform==="sunos")&&(r.platform="UNIX"),r.platform==="win32"&&(r.platform="DOS");var i=r.comment||this.comment||"";t=wp.generateWorker(this,r,i);}catch(n){t=new Gl("error"),t.error(n);}return new bp(t,r.type||"string",r.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return e=e||{},e.type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};nf.exports=Sp;});var Xn=v((_0,sf)=>{var kp=N();function of(e){this.data=e,this.length=e.length,this.index=0,this.zero=0;}of.prototype={checkOffset:function(e){this.checkIndex(this.index+e);},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e;},skip:function(e){this.setIndex(this.index+e);},byteAt:function(){},readInt:function(e){var t=0,r;for(this.checkOffset(e),r=this.index+e-1;r>=this.index;r--)t=(t<<8)+this.byteAt(r);return this.index+=e,t},readString:function(e){return kp.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC((e>>25&127)+1980,(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(e&31)<<1))}};sf.exports=of;});var Vn=v((b0,ff)=>{var lf=Xn(),Tp=N();function Tt(e){lf.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=e[t]&255;}Tp.inherits(Tt,lf);Tt.prototype.byteAt=function(e){return this.data[this.zero+e]};Tt.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2),n=e.charCodeAt(3),a=this.length-4;a>=0;--a)if(this.data[a]===t&&this.data[a+1]===r&&this.data[a+2]===i&&this.data[a+3]===n)return a-this.zero;return -1};Tt.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2),n=e.charCodeAt(3),a=this.readData(4);return t===a[0]&&r===a[1]&&i===a[2]&&n===a[3]};Tt.prototype.readData=function(e){if(this.checkOffset(e),e===0)return [];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};ff.exports=Tt;});var hf=v((y0,df)=>{var uf=Xn(),Cp=N();function Ct(e){uf.call(this,e);}Cp.inherits(Ct,uf);Ct.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)};Ct.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero};Ct.prototype.readAndCheckSignature=function(e){var t=this.readData(4);return e===t};Ct.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};df.exports=Ct;});var Kn=v((w0,pf)=>{var cf=Vn(),Ap=N();function Yn(e){cf.call(this,e);}Ap.inherits(Yn,cf);Yn.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};pf.exports=Yn;});var vf=v((x0,mf)=>{var gf=Kn(),Rp=N();function Gn(e){gf.call(this,e);}Rp.inherits(Gn,gf);Gn.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};mf.exports=Gn;});var Qn=v((E0,bf)=>{var ri=N(),_f=we(),Op=Vn(),Dp=hf(),Ip=vf(),Lp=Kn();bf.exports=function(e){var t=ri.getTypeOf(e);return ri.checkSupport(t),t==="string"&&!_f.uint8array?new Dp(e):t==="nodebuffer"?new Ip(e):_f.uint8array?new Lp(ri.transformTo("uint8array",e)):new Op(ri.transformTo("array",e))};});var Ef=v((S0,xf)=>{var ea=Qn(),Me=N(),zp=zr(),yf=Lr(),ii=ht(),ni=Wn(),Np=we(),jp=0,Fp=3,Mp=function(e){for(var t in ni)if(Object.prototype.hasOwnProperty.call(ni,t)&&ni[t].magic===e)return ni[t];return null};function wf(e,t){this.options=e,this.loadOptions=t;}wf.prototype={isEncrypted:function(){return (this.bitFlag&1)===1},useUTF8:function(){return (this.bitFlag&2048)===2048},readLocalPart:function(e){var t,r;if(e.skip(22),this.fileNameLength=e.readInt(2),r=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(r),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(t=Mp(this.compressionMethod),t===null)throw new Error("Corrupted zip : compression "+Me.pretty(this.compressionMethod)+" unknown (inner file : "+Me.transformTo("string",this.fileName)+")");this.decompressed=new zp(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize));},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength);},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(this.externalFileAttributes&16),e===jp&&(this.dosPermissions=this.externalFileAttributes&63),e===Fp&&(this.unixPermissions=this.externalFileAttributes>>16&65535),!this.dir&&this.fileNameStr.slice(-1)==="/"&&(this.dir=true);},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=ea(this.extraFields[1].value);this.uncompressedSize===Me.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===Me.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===Me.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===Me.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4));}},readExtraFields:function(e){var t=e.index+this.extraFieldsLength,r,i,n;for(this.extraFields||(this.extraFields={});e.index+4<t;)r=e.readInt(2),i=e.readInt(2),n=e.readData(i),this.extraFields[r]={id:r,length:i,value:n};e.setIndex(t);},handleUTF8:function(){var e=Np.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=ii.utf8decode(this.fileName),this.fileCommentStr=ii.utf8decode(this.fileComment);else {var t=this.findExtraFieldUnicodePath();if(t!==null)this.fileNameStr=t;else {var r=Me.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r);}var i=this.findExtraFieldUnicodeComment();if(i!==null)this.fileCommentStr=i;else {var n=Me.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(n);}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=ea(e.value);return t.readInt(1)!==1||yf(this.fileName)!==t.readInt(4)?null:ii.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=ea(e.value);return t.readInt(1)!==1||yf(this.fileComment)!==t.readInt(4)?null:ii.utf8decode(t.readData(e.length-5))}return null}};xf.exports=wf;});var Tf=v((k0,kf)=>{var Pp=Qn(),Ce=N(),le=Jn(),Bp=Ef(),qp=we();function Sf(e){this.files=[],this.loadOptions=e;}Sf.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+Ce.pretty(t)+", expected "+Ce.pretty(e)+")")}},isSignature:function(e,t){var r=this.reader.index;this.reader.setIndex(e);var i=this.reader.readString(4),n=i===t;return this.reader.setIndex(r),n},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=qp.uint8array?"uint8array":"array",r=Ce.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(r);},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e=this.zip64EndOfCentralSize-44,t=0,r,i,n;t<e;)r=this.reader.readInt(2),i=this.reader.readInt(4),n=this.reader.readData(i),this.zip64ExtensibleData[r]={id:r,length:i,value:n};},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(le.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes();},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(le.CENTRAL_FILE_HEADER);)e=new Bp({zip64:this.zip64},this.loadOptions),e.readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(le.CENTRAL_DIRECTORY_END);if(e<0){var t=!this.isSignature(0,le.LOCAL_FILE_HEADER);throw t?new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip: can't find end of central directory")}this.reader.setIndex(e);var r=e;if(this.checkSignature(le.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===Ce.MAX_VALUE_16BITS||this.diskWithCentralDirStart===Ce.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===Ce.MAX_VALUE_16BITS||this.centralDirRecords===Ce.MAX_VALUE_16BITS||this.centralDirSize===Ce.MAX_VALUE_32BITS||this.centralDirOffset===Ce.MAX_VALUE_32BITS){if(this.zip64=true,e=this.reader.lastIndexOfSignature(le.ZIP64_CENTRAL_DIRECTORY_LOCATOR),e<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(le.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,le.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(le.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(le.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral();}var i=this.centralDirOffset+this.centralDirSize;this.zip64&&(i+=20,i+=12+this.zip64EndOfCentralSize);var n=r-i;if(n>0)this.isSignature(r,le.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(e){this.reader=Pp(e);},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles();}};kf.exports=Sf;});var Rf=v((T0,Af)=>{var ta=N(),ai=ft(),Up=ht(),Hp=Tf(),Zp=tn(),Cf=Mt();function Wp(e){return new ai.Promise(function(t,r){var i=e.decompressed.getContentWorker().pipe(new Zp);i.on("error",function(n){r(n);}).on("end",function(){i.streamInfo.crc32!==e.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):t();}).resume();})}Af.exports=function(e,t){var r=this;return t=ta.extend(t||{},{base64:false,checkCRC32:false,optimizedBinaryString:false,createFolders:false,decodeFileName:Up.utf8decode}),Cf.isNode&&Cf.isStream(e)?ai.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):ta.prepareContent("the loaded zip file",e,true,t.optimizedBinaryString,t.base64).then(function(i){var n=new Hp(t);return n.load(i),n}).then(function(n){var a=[ai.Promise.resolve(n)],o=n.files;if(t.checkCRC32)for(var l=0;l<o.length;l++)a.push(Wp(o[l]));return ai.Promise.all(a)}).then(function(n){for(var a=n.shift(),o=a.files,l=0;l<o.length;l++){var u=o[l],s=u.fileNameStr,f=ta.resolve(u.fileNameStr);r.file(f,u.decompressed,{binary:true,optimizedBinaryString:true,date:u.date,dir:u.dir,comment:u.fileCommentStr.length?u.fileCommentStr:null,unixPermissions:u.unixPermissions,dosPermissions:u.dosPermissions,createFolders:t.createFolders}),u.dir||(r.file(f).unsafeOriginalName=s);}return a.zipComment.length&&(r.comment=a.zipComment),r})};});var Df=v((C0,Of)=>{function ie(){if(!(this instanceof ie))return new ie;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new ie;for(var t in this)typeof this[t]!="function"&&(e[t]=this[t]);return e};}ie.prototype=af();ie.prototype.loadAsync=Rf();ie.support=we();ie.defaults=Gi();ie.version="3.10.1";ie.loadAsync=function(e,t){return new ie().loadAsync(e,t)};ie.external=ft();Of.exports=ie;});var Lf={};Wf(Lf,{unpackJdfxToDocument:()=>Jp});async function Jp(e){let t=await If.default.loadAsync(e),r=t.file(fi);if(!r)throw new Error(`${fi} missing from .jdfx bundle`);let i=JSON.parse(await r.async("string")),n=t.file(ha),a=null;if(n)try{a=JSON.parse(await n.async("string"));}catch{a=null;}let o=new Map;if(a?.assets)for(let u of a.assets){let s=t.file(u.path);if(!s)continue;let f=await s.async("uint8array"),c=new Blob([f],{type:u.mimeType});o.set(u.id,URL.createObjectURL(c));}function l(u){if(u)for(let s of u){if(s?.type==="image"&&s.resource){let f=o.get(s.resource);f&&(s.src=f);}s?.elements&&l(s.elements),s?.children&&l(s.children);}}for(let u of i.pages||[])l(u.elements);return i}var If,zf=At(()=>{If=$f(Df());cr();});cr();cr();function pa(e){if(typeof e=="number")return `${e}px`;if(typeof e=="string")return e;let{top:t=0,right:r=0,bottom:i=0,left:n=0}=e;return `${t}px ${r}px ${i}px ${n}px`}function H(e){let t={};if(e.fontFamily&&(t["font-family"]=e.fontFamily),e.fontSize&&(t["font-size"]=`${e.fontSize*1.333}px`),e.fontWeight&&(t["font-weight"]=String(e.fontWeight)),e.fontStyle&&(t["font-style"]=e.fontStyle),e.color&&(t.color=e.color),e.backgroundColor&&(t["background-color"]=e.backgroundColor),e.textAlign&&(t["text-align"]=e.textAlign),e.textDecoration){let r=e.textDecoration==="strikethrough"?"line-through":e.textDecoration;t["text-decoration"]=r;}return e.lineHeight&&(t["line-height"]=String(e.lineHeight)),e.letterSpacing!=null&&(t["letter-spacing"]=typeof e.letterSpacing=="number"?`${e.letterSpacing}px`:e.letterSpacing),e.padding!=null&&(t.padding=pa(e.padding)),e.margin!=null&&(t.margin=pa(e.margin)),e.marginTop!=null&&(t["margin-top"]=`${e.marginTop}px`),e.marginBottom!=null&&(t["margin-bottom"]=`${e.marginBottom}px`),e.border&&(t.border=e.border),e.borderRadius!=null&&(t["border-radius"]=typeof e.borderRadius=="number"?`${e.borderRadius}px`:e.borderRadius),e.opacity!=null&&(t.opacity=String(e.opacity)),t}function fe(e,t){if(!e)return {};if(typeof e=="string")return H(t[e]||{});if(Array.isArray(e)){let r={};for(let i of e)r={...r,...t[i]||{}};return H(r)}return H(e)}function Q(e,t){for(let[r,i]of Object.entries(t))e.style.setProperty(r,i);}function ui(e){if(!e)return null;let t=typeof e=="string"?e:e.target;if(typeof e=="string"?e.startsWith("#"):e.type==="internal"){let i=t.replace(/^#/,"").match(/^page-(\d+)$/i);return i?{href:t,internal:true,pageIndex:Number(i[1])-1}:{href:t,internal:true}}return {href:t,internal:false}}function di(e,t,r){e.href=t.href,t.internal?e.addEventListener("click",i=>{t.pageIndex!=null&&r&&(i.preventDefault(),r(t.pageIndex));}):(e.target="_blank",e.rel="noopener noreferrer");}var et="http://www.w3.org/2000/svg";function pr(e,t){let r=document.createElement("div");Kf(r,e);let i=null;switch(e.type){case "text":i=Gf(e,t);break;case "richtext":i=eu(e,t);break;case "image":i=au(e,t);break;case "table":i=lu(e,t);break;case "list":i=fu(e,t);break;case "shape":i=uu(e);break;case "collapsible":i=du(e,t);break;case "toc":i=hu(e,t);break}return i?(r.appendChild(i),r):null}function Kf(e,t){let r=t;r.position&&(e.style.position="absolute",r.position.x!=null&&(e.style.left=`${B(r.position.x)}px`),r.position.y!=null&&(e.style.top=`${B(r.position.y)}px`)),r.width!=null&&(e.style.width=`${B(r.width)}px`),r.height!=null&&(e.style.height=`${B(r.height)}px`);}function Gf(e,t){let r=Qf(e.heading),i=document.createElement(r);i.className="jdfjs-text",i.style.margin="0",i.style.whiteSpace="pre-wrap",Q(i,fe(e.style,t.styles)),e.align&&(i.style.textAlign=e.align);let n=ui(e.link);if(n){let a=document.createElement("a");di(a,n,t.onNavigatePage),a.className="jdfjs-link",a.textContent=e.content||"",i.appendChild(a);}else i.textContent=e.content||"";return i}function Qf(e){return e===true?"h1":typeof e=="number"&&e>=1&&e<=6?"h"+e:"p"}function eu(e,t){let r=document.createElement("p");r.className="jdfjs-richtext",r.style.margin="0",Q(r,fe(e.style,t.styles));for(let i of e.runs||[])r.appendChild(ru(i,t));return r}function tu(e,t){let r={};if(e.style)if(typeof e.style=="string")Object.assign(r,H(t[e.style]||{}));else if(Array.isArray(e.style))for(let n of e.style)Object.assign(r,H(t[n]||{}));else Object.assign(r,H(e.style));e.bold&&(r["font-weight"]="bold"),e.italic&&(r["font-style"]="italic");let i=[];return e.underline&&i.push("underline"),e.strikethrough&&i.push("line-through"),i.length&&(r["text-decoration"]=i.join(" ")),e.color&&(r.color=e.color),e.fontSize&&(r["font-size"]=`${e.fontSize*1.333}px`),e.fontFamily&&(r["font-family"]=e.fontFamily),r}function ru(e,t){let r=ui(e.link),i=r?document.createElement("a"):document.createElement("span");return r&&(di(i,r,t.onNavigatePage),i.classList.add("jdfjs-link")),Q(i,tu(e,t.styles)),i.textContent=e.text,i}function iu(e,t){if(!e)return;let r=e[t];if(r&&typeof r=="object"&&"data"in r)return r;let i=e.images?.[t];if(i)return i}function nu(e,t){if(e.src?.startsWith("data:")||e.src?.startsWith("http"))return e.src;if(e.resource){let r=iu(t,e.resource);if(r?.data){let i=r.mimeType||"image/png";return r.data.startsWith("data:")?r.data:`data:${i};base64,${r.data}`}if(r?.path)return r.path}return e.src||""}function au(e,t){let r=document.createElement("div");r.className="jdfjs-image",r.style.width="100%",r.style.height="100%";let i=document.createElement("img");switch(i.src=nu(e,t.resources),i.alt=e.alt||"",i.style.display="block",i.style.width="100%",i.style.height="100%",e.fit){case "cover":i.style.objectFit="cover";break;case "fill":i.style.objectFit="fill";break;case "none":i.style.objectFit="none";break;default:i.style.objectFit="contain";}return Q(i,fe(e.style,t.styles)),r.appendChild(i),r}function ou(e){return typeof e=="string"?e:e.content}function su(e){return typeof e=="string"?{}:{colspan:e.colspan,rowspan:e.rowspan}}function lu(e,t){let r=document.createElement("div");r.className="jdfjs-table-wrap",Q(r,fe(e.style,t.styles)),r.style.overflowX="auto";let i=(()=>{let c=e.headerStyle;if(!c)return {};if(typeof c=="string")return H(t.styles[c]||{});if(Array.isArray(c)){let d={};for(let h of c)d={...d,...H(t.styles[h]||{})};return d}return H(c)})(),n=(()=>{let c=e.rowStyle;if(!c)return {};if(typeof c=="string")return H(t.styles[c]||{});if(Array.isArray(c)){let d={};for(let h of c)d={...d,...H(t.styles[h]||{})};return d}return H(c)})(),a=(()=>{let c=e.alternateRowStyle;if(!c){let d=e.alternatingRowColor;return d?{"background-color":d}:{}}if(typeof c=="string")return H(t.styles[c]||{});if(Array.isArray(c)){let d={};for(let h of c)d={...d,...H(t.styles[h]||{})};return d}return H(c)})(),o=(()=>{let c=e.borders;return c===false?{outer:false,inner:false}:c===true||c===void 0?{outer:true,inner:true,color:"#e2e8f0",width:1}:{outer:true,inner:true,color:"#e2e8f0",width:1,...c}})(),l=e.headers??e.columns?.map(c=>c.header||"").filter(c=>c!==""),u=c=>e.columns?.[c]?.align,s=document.createElement("table");if(s.style.width="100%",s.style.borderCollapse="collapse",s.style.fontSize="14px",o.outer&&(s.style.border=`${o.width||1}px solid ${o.color||"#e2e8f0"}`),l&&l.length>0){let c=document.createElement("thead"),d=document.createElement("tr");Q(d,i),l.forEach((h,w)=>{let _=document.createElement("th");_.textContent=h,_.style.padding="8px 12px",_.style.fontWeight="600",_.style.background="#f8fafc",_.style.textAlign=u(w)||"left",o.inner&&(_.style.border=`${o.width||1}px solid ${o.color||"#e2e8f0"}`),d.appendChild(_);}),c.appendChild(d),s.appendChild(c);}let f=document.createElement("tbody");return e.rows.forEach((c,d)=>{let h=document.createElement("tr");Q(h,n),d%2===1&&Q(h,a),c.forEach((w,_)=>{let y=document.createElement("td");y.textContent=ou(w);let p=su(w);p.colspan&&(y.colSpan=p.colspan),p.rowspan&&(y.rowSpan=p.rowspan),y.style.padding="8px 12px",y.style.verticalAlign="top",y.style.textAlign=u(_)||"left",o.inner&&(y.style.border=`${o.width||1}px solid ${o.color||"#e2e8f0"}`),h.appendChild(y);}),f.appendChild(h);}),s.appendChild(f),r.appendChild(s),r}function fu(e,t){let r=document.createElement("div");r.className="jdfjs-list-wrap",Q(r,fe(e.style,t.styles));let i=e.listType??(e.ordered?"ordered":"unordered"),n=ga(i);return ma(n,e.items||[],i),r.appendChild(n),r}function ga(e){let t=document.createElement(e==="ordered"?"ol":"ul");return t.style.margin="0",t.style.paddingLeft="20px",t.style.listStyle=e==="ordered"?"decimal":"disc",t}function ma(e,t,r,i){for(let n of t){let a=document.createElement("li");if(a.style.fontSize="14px",a.style.lineHeight="1.6",a.appendChild(document.createTextNode(n.content)),n.children?.length){let o=n.listType||r,l=ga(o);l.style.marginTop="4px",ma(l,n.children,o),a.appendChild(l);}e.appendChild(a);}}function uu(e){let t=document.createElement("div");t.className="jdfjs-shape",t.style.width="100%",t.style.height="100%";let r=e.width??100,i=e.height??100,n=e.fill??"none",a=(()=>{let s=e.stroke;return typeof s=="string"?s:s?.color?s.color:"none"})(),o=(()=>{let s=e.stroke;return typeof s=="object"&&s?.width!=null?s.width:e.strokeWidth??0})(),l=document.createElementNS(et,"svg");l.setAttribute("width","100%"),l.setAttribute("height","100%"),l.setAttribute("viewBox",`0 0 ${r} ${i}`),l.setAttribute("preserveAspectRatio","none"),l.style.display="block",l.style.overflow="visible";let u=null;switch(e.shape){case "rect":{let s=document.createElementNS(et,"rect");s.setAttribute("x","0"),s.setAttribute("y","0"),s.setAttribute("width",String(r)),s.setAttribute("height",String(i)),e.borderRadius&&s.setAttribute("rx",String(e.borderRadius)),u=s;break}case "circle":{let s=document.createElementNS(et,"circle");s.setAttribute("cx",String(r/2)),s.setAttribute("cy",String(i/2)),s.setAttribute("r",String(Math.min(r,i)/2)),u=s;break}case "ellipse":{let s=document.createElementNS(et,"ellipse");s.setAttribute("cx",String(r/2)),s.setAttribute("cy",String(i/2)),s.setAttribute("rx",String(r/2)),s.setAttribute("ry",String(i/2)),u=s;break}case "line":{let s=document.createElementNS(et,"line");return s.setAttribute("x1","0"),s.setAttribute("y1","0"),s.setAttribute("x2",String(r)),s.setAttribute("y2",String(i)),s.setAttribute("stroke",a==="none"?n!=="none"?n:"currentColor":a),s.setAttribute("stroke-width",String(o||.3)),l.appendChild(s),t.appendChild(l),t}case "path":{let s=document.createElementNS(et,"path");s.setAttribute("d",e.path||""),s.setAttribute("fill-rule","evenodd"),u=s;break}}return u&&(u.setAttribute("fill",n),u.setAttribute("stroke",a),o&&u.setAttribute("stroke-width",String(o)),l.appendChild(u)),t.appendChild(l),t}function du(e,t){let r=document.createElement("div");r.className="jdfjs-collapsible",Q(r,fe(e.style,t.styles)),r.style.border="1px solid #e2e8f0",r.style.borderRadius="8px",r.style.overflow="hidden",r.style.background="#ffffff";let i=document.createElement("button");i.type="button",i.className="jdfjs-collapsible-header",i.style.width="100%",i.style.display="flex",i.style.alignItems="center",i.style.gap="8px",i.style.padding="10px 16px",i.style.fontSize="14px",i.style.fontWeight="500",i.style.background="#f8fafc",i.style.border="0",i.style.cursor="pointer",i.style.textAlign="left";let n=document.createElement("span");n.textContent="\u25B6",n.style.fontSize="10px",n.style.transition="transform 0.15s ease";let a=document.createElement("span");a.textContent=e.title||"Section",a.style.flex="1",i.appendChild(n),i.appendChild(a),r.appendChild(i);let o=document.createElement("div");o.className="jdfjs-collapsible-body",o.style.padding="12px 16px",o.style.position="relative";let l=e.expanded??false,u=()=>{o.style.display=l?"block":"none",n.style.transform=l?"rotate(90deg)":"rotate(0deg)";};u(),i.addEventListener("click",()=>{l=!l,u();});for(let s of e.elements||[]){let f=pr(s,{...t,path:[...t.path,"elements"]});f&&o.appendChild(f);}return r.appendChild(o),r}function hu(e,t){let r=document.createElement("div");r.className="jdfjs-toc",Q(r,fe(e.style,t.styles));let i=e.depth??6,n=[];t.document.pages.forEach((a,o)=>{for(let l of a.elements){if(l.type!=="text")continue;let u=l,s=u.tocEntry||(u.heading?u.content:null);if(!s)continue;let f=typeof u.tocLevel=="number"?u.tocLevel:typeof u.heading=="number"?u.heading:1;f>i||n.push({title:s,pageIndex:o,level:f});}});for(let a of n){let o=document.createElement("button");o.type="button",o.className="jdfjs-toc-entry",o.style.display="flex",o.style.alignItems="baseline",o.style.gap="8px",o.style.width="100%",o.style.background="transparent",o.style.border="0",o.style.borderBottom="1px dotted #e2e8f0",o.style.padding=`6px 8px 6px ${(a.level-1)*16+8}px`,o.style.cursor="pointer",o.style.fontSize="14px",o.style.color="#334155",o.style.textAlign="left";let l=document.createElement("span");l.textContent=a.title,l.style.flex="1";let u=document.createElement("span");u.style.flex="1",u.style.borderBottom="1px dotted #cbd5e1",u.style.alignSelf="end",u.style.marginBottom="4px";let s=document.createElement("span");s.textContent=String(a.pageIndex+1),s.style.fontFamily="JetBrains Mono, monospace",s.style.fontSize="12px",s.style.color="#94a3b8",s.style.flexShrink="0",o.appendChild(l),o.appendChild(u),o.appendChild(s),o.addEventListener("click",()=>t.onNavigatePage?.(a.pageIndex)),r.appendChild(o);}return r}function va(e,t){return e.replace(/\{\{pageNumber\}\}/g,String(t.pageNumber)).replace(/\{\{totalPages\}\}/g,String(t.totalPages)).replace(/\{\{title\}\}/g,t.title).replace(/\{\{author\}\}/g,t.author)}async function ra(e,t,r={}){let i=jf(e);i.classList.add("jdfjs-loading");try{let n=/\.jdfx(\?|#|$)/i.test(t),a=await fetch(t,{headers:n?{Accept:"application/jdf+zip,application/zip"}:{Accept:"application/json,application/jdf+json"}});if(!a.ok)throw new Error(`Failed to fetch ${t} (${a.status})`);let o;if(n){let{unpackJdfxToDocument:l}=await Promise.resolve().then(()=>(zf(),Lf));o=await l(await a.arrayBuffer());}else o=await a.json();if(!o?.$jdf)throw new Error("Not a valid JDF document (missing $jdf field)");return i.classList.remove("jdfjs-loading"),Nf(i,o,r)}catch(n){throw i.classList.remove("jdfjs-loading"),i.classList.add("jdfjs-error"),i.innerHTML=`<div class="jdfjs-error-msg">${$p(n.message)}</div>`,r.onError?.(n),n}}function Nf(e,t,r={}){let i=jf(e);return new oi(i,t,r).getInstance()}var oi=class{constructor(t,r,i={}){this.resizeObs=null;this.toolbarEl=null;this.sidebarEl=null;this.observer=null;this.container=t,this.doc=r,this.options={zoom:i.zoom??1,sidebar:i.sidebar??false,toolbar:i.toolbar??true,darkMode:i.darkMode??"auto",initialPage:i.initialPage??0,fit:i.fit??"manual",...i},this.zoom=this.options.zoom,this.currentPage=this.options.initialPage,this.applyContainerSize(),this.mount(),queueMicrotask(()=>this.options.onLoad?.(this.doc));}applyContainerSize(){let t=this.options.width,r=this.options.height;t!=null&&(this.container.style.width=typeof t=="number"?`${t}px`:t),r!=null&&(this.container.style.height=typeof r=="number"?`${r}px`:r);}mount(){this.container.innerHTML="",this.container.classList.add("jdfjs"),this.options.darkMode==="dark"?this.container.classList.add("jdfjs-dark"):this.options.darkMode==="auto"&&window.matchMedia?.("(prefers-color-scheme: dark)").matches&&this.container.classList.add("jdfjs-dark"),this.root=document.createElement("div"),this.root.className="jdfjs-root",this.options.toolbar&&(this.toolbarEl=this.buildToolbar(),this.root.appendChild(this.toolbarEl));let t=document.createElement("div");t.className="jdfjs-body",this.options.sidebar&&(this.sidebarEl=this.buildSidebar(),t.appendChild(this.sidebarEl)),this.pagesEl=document.createElement("div"),this.pagesEl.className="jdfjs-pages",t.appendChild(this.pagesEl),this.root.appendChild(t),this.container.appendChild(this.root),this.renderAllPages(),this.setupScrollObserver(),this.setupResizeObserver(),this.applyFit(),this.currentPage>0&&this.scrollToPage(this.currentPage);}setupResizeObserver(){typeof ResizeObserver>"u"||(this.resizeObs?.disconnect(),this.resizeObs=new ResizeObserver(()=>this.applyFit()),this.resizeObs.observe(this.pagesEl));}applyFit(){if(this.options.fit==="manual")return;let t=this.pagesEl.querySelector(".jdfjs-page");if(!t)return;let r=parseFloat(t.style.width||"0"),i=parseFloat(t.style.minHeight||"0");if(!r||!i)return;let n=this.pagesEl.clientWidth-32,a=this.pagesEl.clientHeight-32;this.options.fit==="fit-width"?this.zoom=Math.max(.25,Math.min(3,n/r)):this.options.fit==="fit-page"&&(this.zoom=Math.max(.25,Math.min(3,Math.min(n/r,a/i)))),this.applyZoom(),this.updateIndicators();}buildToolbar(){let t=document.createElement("div");return t.className="jdfjs-toolbar",t.innerHTML=`
1
+ var $f=Object.create;var di=Object.defineProperty;var Vf=Object.getOwnPropertyDescriptor;var Xf=Object.getOwnPropertyNames;var Yf=Object.getPrototypeOf,Kf=Object.prototype.hasOwnProperty;var ve=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Rt=(e,t)=>()=>(e&&(t=e(e=0)),t);var v=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Gf=(e,t)=>{for(var r in t)di(e,r,{get:t[r],enumerable:true});},Qf=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Xf(t))!Kf.call(e,n)&&n!==r&&di(e,n,{get:()=>t[n],enumerable:!(i=Vf(t,n))||i.enumerable});return e};var eu=(e,t,r)=>(r=e!=null?$f(Yf(e)):{},Qf(di(r,"default",{value:e,enumerable:true}),e));var pa=Rt(()=>{});function N(e,t="mm"){switch(t){case "mm":return e*ga;case "in":return e*ru;case "pt":return e*iu;case "px":return e;default:return e*ga}}function va(e,t="portrait"){let r=typeof e=="string"?tu[e]:e;return t==="landscape"?{width:r.height,height:r.width}:{...r}}var tu,ma,ga,ru,iu,ba=Rt(()=>{tu={A3:{width:297,height:420},A4:{width:210,height:297},A5:{width:148,height:210},Letter:{width:215.9,height:279.4},Legal:{width:215.9,height:355.6},Tabloid:{width:279.4,height:431.8}},ma={top:25,right:20,bottom:25,left:20},ga=3.7795275591,ru=96,iu=1.3333333333;});var hi,_a,ya,wa=Rt(()=>{hi="document.json",_a="manifest.json",ya="assets";});var gr=Rt(()=>{pa();ba();wa();});var Lt=v((Cg,gi)=>{typeof process>"u"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0?gi.exports={nextTick:ku}:gi.exports=process;function ku(e,t,r,i){if(typeof e!="function")throw new TypeError('"callback" argument must be a function');var n=arguments.length,a,o;switch(n){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function(){e.call(null,t);});case 3:return process.nextTick(function(){e.call(null,t,r);});case 4:return process.nextTick(function(){e.call(null,t,r,i);});default:for(a=new Array(n-1),o=0;o<a.length;)a[o++]=arguments[o];return process.nextTick(function(){e.apply(null,a);})}}});var Ca=v((Ag,Ta)=>{var Tu={}.toString;Ta.exports=Array.isArray||function(e){return Tu.call(e)=="[object Array]"};});var mi=v((Rg,Aa)=>{Aa.exports=ve("stream");});var Ot=v((vi,La)=>{var br=ve("buffer"),_e=br.Buffer;function Ra(e,t){for(var r in e)t[r]=e[r];}_e.from&&_e.alloc&&_e.allocUnsafe&&_e.allocUnsafeSlow?La.exports=br:(Ra(br,vi),vi.Buffer=rt);function rt(e,t,r){return _e(e,t,r)}Ra(_e,rt);rt.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return _e(e,t,r)};rt.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=_e(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};rt.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return _e(e)};rt.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return br.SlowBuffer(e)};});var it=v(W=>{function Cu(e){return Array.isArray?Array.isArray(e):_r(e)==="[object Array]"}W.isArray=Cu;function Au(e){return typeof e=="boolean"}W.isBoolean=Au;function Ru(e){return e===null}W.isNull=Ru;function Lu(e){return e==null}W.isNullOrUndefined=Lu;function Ou(e){return typeof e=="number"}W.isNumber=Ou;function Du(e){return typeof e=="string"}W.isString=Du;function Iu(e){return typeof e=="symbol"}W.isSymbol=Iu;function Fu(e){return e===void 0}W.isUndefined=Fu;function ju(e){return _r(e)==="[object RegExp]"}W.isRegExp=ju;function Mu(e){return typeof e=="object"&&e!==null}W.isObject=Mu;function Nu(e){return _r(e)==="[object Date]"}W.isDate=Nu;function zu(e){return _r(e)==="[object Error]"||e instanceof Error}W.isError=zu;function Pu(e){return typeof e=="function"}W.isFunction=Pu;function Bu(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}W.isPrimitive=Bu;W.isBuffer=ve("buffer").Buffer.isBuffer;function _r(e){return Object.prototype.toString.call(e)}});var Oa=v((Og,bi)=>{typeof Object.create=="function"?bi.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:false,writable:true,configurable:true}}));}:bi.exports=function(t,r){if(r){t.super_=r;var i=function(){};i.prototype=r.prototype,t.prototype=new i,t.prototype.constructor=t;}};});var nt=v((Dg,yi)=>{try{if(_i=ve("util"),typeof _i.inherits!="function")throw "";yi.exports=_i.inherits;}catch{yi.exports=Oa();}var _i;});var Ia=v((Ig,wi)=>{function qu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Da=Ot().Buffer,Dt=ve("util");function Uu(e,t,r){e.copy(t,r);}wi.exports=(function(){function e(){qu(this,e),this.head=null,this.tail=null,this.length=0;}return e.prototype.push=function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length;},e.prototype.unshift=function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length;},e.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0;},e.prototype.join=function(r){if(this.length===0)return "";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n},e.prototype.concat=function(r){if(this.length===0)return Da.alloc(0);for(var i=Da.allocUnsafe(r>>>0),n=this.head,a=0;n;)Uu(n.data,i,a),a+=n.data.length,n=n.next;return i},e})();Dt&&Dt.inspect&&Dt.inspect.custom&&(wi.exports.prototype[Dt.inspect.custom]=function(){var e=Dt.inspect({length:this.length});return this.constructor.name+" "+e});});var xi=v((Fg,Fa)=>{var yr=Lt();function Hu(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=true,yr.nextTick(wr,this,e)):yr.nextTick(wr,this,e)),this):(this._readableState&&(this._readableState.destroyed=true),this._writableState&&(this._writableState.destroyed=true),this._destroy(e||null,function(a){!t&&a?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=true,yr.nextTick(wr,r,a)):yr.nextTick(wr,r,a):t&&t(a);}),this)}function Zu(){this._readableState&&(this._readableState.destroyed=false,this._readableState.reading=false,this._readableState.ended=false,this._readableState.endEmitted=false),this._writableState&&(this._writableState.destroyed=false,this._writableState.ended=false,this._writableState.ending=false,this._writableState.finalCalled=false,this._writableState.prefinished=false,this._writableState.finished=false,this._writableState.errorEmitted=false);}function wr(e,t){e.emit("error",t);}Fa.exports={destroy:Hu,undestroy:Zu};});var Ma=v((jg,ja)=>{ja.exports=ve("util").deprecate;});var Si=v((Mg,Za)=>{var Be=Lt();Za.exports=z;function za(e){var t=this;this.next=null,this.entry=null,this.finish=function(){ld(t,e);};}var Wu=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:Be.nextTick,at;z.WritableState=Ft;var Pa=Object.create(it());Pa.inherits=nt();var Ju={deprecate:Ma()},Ba=mi(),Er=Ot().Buffer,$u=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Vu(e){return Er.from(e)}function Xu(e){return Er.isBuffer(e)||e instanceof $u}var qa=xi();Pa.inherits(z,Ba);function Yu(){}function Ft(e,t){at=at||qe(),e=e||{};var r=t instanceof at;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,n=e.writableHighWaterMark,a=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=false,this.needDrain=false,this.ending=false,this.ended=false,this.finished=false,this.destroyed=false;var o=e.decodeStrings===false;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=false,this.corked=0,this.sync=true,this.bufferProcessing=false,this.onwrite=function(s){id(t,s);},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=false,this.errorEmitted=false,this.bufferedRequestCount=0,this.corkedRequestsFree=new za(this);}Ft.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(Ft.prototype,"buffer",{get:Ju.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")});}catch{}})();var xr;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(xr=Function.prototype[Symbol.hasInstance],Object.defineProperty(z,Symbol.hasInstance,{value:function(e){return xr.call(this,e)?true:this!==z?false:e&&e._writableState instanceof Ft}})):xr=function(e){return e instanceof this};function z(e){if(at=at||qe(),!xr.call(z,this)&&!(this instanceof at))return new z(e);this._writableState=new Ft(e,this),this.writable=true,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),Ba.call(this);}z.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"));};function Ku(e,t){var r=new Error("write after end");e.emit("error",r),Be.nextTick(t,r);}function Gu(e,t,r,i){var n=true,a=false;return r===null?a=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!t.objectMode&&(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),Be.nextTick(i,a),n=false),n}z.prototype.write=function(e,t,r){var i=this._writableState,n=false,a=!i.objectMode&&Xu(e);return a&&!Er.isBuffer(e)&&(e=Vu(e)),typeof t=="function"&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),typeof r!="function"&&(r=Yu),i.ended?Ku(this,r):(a||Gu(this,i,e,r))&&(i.pendingcb++,n=ed(this,i,a,e,t,r)),n};z.prototype.cork=function(){var e=this._writableState;e.corked++;};z.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&Ua(this,e));};z.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this};function Qu(e,t,r){return !e.objectMode&&e.decodeStrings!==false&&typeof t=="string"&&(t=Er.from(t,r)),t}Object.defineProperty(z.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}});function ed(e,t,r,i,n,a){if(!r){var o=Qu(t,i,n);i!==o&&(r=true,n="buffer",i=o);}var s=t.objectMode?1:i.length;t.length+=s;var u=t.length<t.highWaterMark;if(u||(t.needDrain=true),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:a,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1;}else Ei(e,t,false,s,i,n,a);return u}function Ei(e,t,r,i,n,a,o){t.writelen=i,t.writecb=o,t.writing=true,t.sync=true,r?e._writev(n,t.onwrite):e._write(n,a,t.onwrite),t.sync=false;}function td(e,t,r,i,n){--t.pendingcb,r?(Be.nextTick(n,i),Be.nextTick(It,e,t),e._writableState.errorEmitted=true,e.emit("error",i)):(n(i),e._writableState.errorEmitted=true,e.emit("error",i),It(e,t));}function rd(e){e.writing=false,e.writecb=null,e.length-=e.writelen,e.writelen=0;}function id(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(rd(r),t)td(e,r,i,t,n);else {var a=Ha(r);!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Ua(e,r),i?Wu(Na,e,r,a,n):Na(e,r,a,n);}}function Na(e,t,r,i){r||nd(e,t),t.pendingcb--,i(),It(e,t);}function nd(e,t){t.length===0&&t.needDrain&&(t.needDrain=false,e.emit("drain"));}function Ua(e,t){t.bufferProcessing=true;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,n=new Array(i),a=t.corkedRequestsFree;a.entry=r;for(var o=0,s=true;r;)n[o]=r,r.isBuf||(s=false),r=r.next,o+=1;n.allBuffers=s,Ei(e,t,true,t.length,n,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new za(t),t.bufferedRequestCount=0;}else {for(;r;){var u=r.chunk,l=r.encoding,f=r.callback,c=t.objectMode?1:u.length;if(Ei(e,t,false,c,u,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null);}t.bufferedRequest=r,t.bufferProcessing=false;}z.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"));};z.prototype._writev=null;z.prototype.end=function(e,t,r){var i=this._writableState;typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||sd(this,i,r);};function Ha(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function ad(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=true,e.emit("prefinish"),It(e,t);});}function od(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"?(t.pendingcb++,t.finalCalled=true,Be.nextTick(ad,e,t)):(t.prefinished=true,e.emit("prefinish")));}function It(e,t){var r=Ha(t);return r&&(od(e,t),t.pendingcb===0&&(t.finished=true,e.emit("finish"))),r}function sd(e,t,r){t.ending=true,It(e,t),r&&(t.finished?Be.nextTick(r):e.once("finish",r)),t.ended=true,e.writable=false;}function ld(e,t,r){var i=e.entry;for(e.entry=null;i;){var n=i.callback;t.pendingcb--,n(r),i=i.next;}t.corkedRequestsFree.next=e;}Object.defineProperty(z.prototype,"destroyed",{get:function(){return this._writableState===void 0?false:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e);}});z.prototype.destroy=qa.destroy;z.prototype._undestroy=qa.undestroy;z.prototype._destroy=function(e,t){this.end(),t(e);};});var qe=v((Ng,Va)=>{var Wa=Lt(),fd=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};Va.exports=ye;var Ja=Object.create(it());Ja.inherits=nt();var $a=Ci(),Ti=Si();Ja.inherits(ye,$a);for(ki=fd(Ti.prototype),Sr=0;Sr<ki.length;Sr++)kr=ki[Sr],ye.prototype[kr]||(ye.prototype[kr]=Ti.prototype[kr]);var ki,kr,Sr;function ye(e){if(!(this instanceof ye))return new ye(e);$a.call(this,e),Ti.call(this,e),e&&e.readable===false&&(this.readable=false),e&&e.writable===false&&(this.writable=false),this.allowHalfOpen=true,e&&e.allowHalfOpen===false&&(this.allowHalfOpen=false),this.once("end",ud);}Object.defineProperty(ye.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}});function ud(){this.allowHalfOpen||this._writableState.ended||Wa.nextTick(dd,this);}function dd(e){e.end();}Object.defineProperty(ye.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?false:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e);}});ye.prototype._destroy=function(e,t){this.push(null),this.end(),Wa.nextTick(t,e);};});var Li=v(Ya=>{var Ri=Ot().Buffer,Xa=Ri.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case "hex":case "utf8":case "utf-8":case "ascii":case "binary":case "base64":case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":case "raw":return true;default:return false}};function hd(e){if(!e)return "utf8";for(var t;;)switch(e){case "utf8":case "utf-8":return "utf8";case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return "utf16le";case "latin1":case "binary":return "latin1";case "base64":case "ascii":case "hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=true;}}function cd(e){var t=hd(e);if(typeof t!="string"&&(Ri.isEncoding===Xa||!Xa(e)))throw new Error("Unknown encoding: "+e);return t||e}Ya.StringDecoder=jt;function jt(e){this.encoding=cd(e);var t;switch(this.encoding){case "utf16le":this.text=_d,this.end=yd,t=4;break;case "utf8":this.fillLast=md,t=4;break;case "base64":this.text=wd,this.end=xd,t=3;break;default:this.write=Ed,this.end=Sd;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Ri.allocUnsafe(t);}jt.prototype.write=function(e){if(e.length===0)return "";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return "";r=this.lastNeed,this.lastNeed=0;}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};jt.prototype.end=bd;jt.prototype.text=vd;jt.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length;};function Ai(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function pd(e,t,r){var i=t.length-1;if(i<r)return 0;var n=Ai(t[i]);return n>=0?(n>0&&(e.lastNeed=n-1),n):--i<r||n===-2?0:(n=Ai(t[i]),n>=0?(n>0&&(e.lastNeed=n-2),n):--i<r||n===-2?0:(n=Ai(t[i]),n>=0?(n>0&&(n===2?n=0:e.lastNeed=n-3),n):0))}function gd(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function md(e){var t=this.lastTotal-this.lastNeed,r=gd(this,e);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length;}function vd(e,t){var r=pd(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)}function bd(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function _d(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function yd(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function wd(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function xd(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function Ed(e){return e.toString(this.encoding)}function Sd(e){return e&&e.length?this.write(e):""}});var Ci=v((Bg,lo)=>{var st=Lt();lo.exports=I;var kd=Ca(),Mt;I.ReadableState=io;ve("events").EventEmitter;var eo=function(e,t){return e.listeners(t).length},ji=mi(),Nt=Ot().Buffer,Td=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Cd(e){return Nt.from(e)}function Ad(e){return Nt.isBuffer(e)||e instanceof Td}var to=Object.create(it());to.inherits=nt();var Oi=ve("util"),L=void 0;Oi&&Oi.debuglog?L=Oi.debuglog("stream"):L=function(){};var Rd=Ia(),ro=xi(),ot;to.inherits(I,ji);var Di=["error","close","destroy","pause","resume"];function Ld(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):kd(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]];}function io(e,t){Mt=Mt||qe(),e=e||{};var r=t instanceof Mt;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,n=e.readableHighWaterMark,a=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new Rd,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=false,this.endEmitted=false,this.reading=false,this.sync=true,this.needReadable=false,this.emittedReadable=false,this.readableListening=false,this.resumeScheduled=false,this.destroyed=false,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=false,this.decoder=null,this.encoding=null,e.encoding&&(ot||(ot=Li().StringDecoder),this.decoder=new ot(e.encoding),this.encoding=e.encoding);}function I(e){if(Mt=Mt||qe(),!(this instanceof I))return new I(e);this._readableState=new io(e,this),this.readable=true,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),ji.call(this);}Object.defineProperty(I.prototype,"destroyed",{get:function(){return this._readableState===void 0?false:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e);}});I.prototype.destroy=ro.destroy;I.prototype._undestroy=ro.undestroy;I.prototype._destroy=function(e,t){this.push(null),t(e);};I.prototype.push=function(e,t){var r=this._readableState,i;return r.objectMode?i=true:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=Nt.from(e,t),t=""),i=true),no(this,e,t,false,i)};I.prototype.unshift=function(e){return no(this,e,null,true,false)};function no(e,t,r,i,n){var a=e._readableState;if(t===null)a.reading=false,Fd(e,a);else {var o;n||(o=Od(a,t)),o?e.emit("error",o):a.objectMode||t&&t.length>0?(typeof t!="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==Nt.prototype&&(t=Cd(t)),i?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):Ii(e,a,t,true):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=false,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||t.length!==0?Ii(e,a,t,false):ao(e,a)):Ii(e,a,t,false))):i||(a.reading=false);}return Dd(a)}function Ii(e,t,r,i){t.flowing&&t.length===0&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&Tr(e)),ao(e,t);}function Od(e,t){var r;return !Ad(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function Dd(e){return !e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}I.prototype.isPaused=function(){return this._readableState.flowing===false};I.prototype.setEncoding=function(e){return ot||(ot=Li().StringDecoder),this._readableState.decoder=new ot(e),this._readableState.encoding=e,this};var Ka=8388608;function Id(e){return e>=Ka?e=Ka:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function Ga(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=Id(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=true,0))}I.prototype.read=function(e){L("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=false),e===0&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return L("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?Fi(this):Tr(this),null;if(e=Ga(e,t),e===0&&t.ended)return t.length===0&&Fi(this),null;var i=t.needReadable;L("need readable",i),(t.length===0||t.length-e<t.highWaterMark)&&(i=true,L("length less than watermark",i)),t.ended||t.reading?(i=false,L("reading or ended",i)):i&&(L("do read"),t.reading=true,t.sync=true,t.length===0&&(t.needReadable=true),this._read(t.highWaterMark),t.sync=false,t.reading||(e=Ga(r,t)));var n;return e>0?n=oo(e,t):n=null,n===null?(t.needReadable=true,e=0):t.length-=e,t.length===0&&(t.ended||(t.needReadable=true),r!==e&&t.ended&&Fi(this)),n!==null&&this.emit("data",n),n};function Fd(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length);}t.ended=true,Tr(e);}}function Tr(e){var t=e._readableState;t.needReadable=false,t.emittedReadable||(L("emitReadable",t.flowing),t.emittedReadable=true,t.sync?st.nextTick(Qa,e):Qa(e));}function Qa(e){L("emit readable"),e.emit("readable"),Mi(e);}function ao(e,t){t.readingMore||(t.readingMore=true,st.nextTick(jd,e,t));}function jd(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(L("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=false;}I.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"));};I.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,L("pipe count=%d opts=%j",i.pipesCount,t);var n=(!t||t.end!==false)&&e!==process.stdout&&e!==process.stderr,a=n?s:_;i.endEmitted?st.nextTick(a):r.once("end",a),e.on("unpipe",o);function o(p,g){L("onunpipe"),p===r&&g&&g.hasUnpiped===false&&(g.hasUnpiped=true,f());}function s(){L("onend"),e.end();}var u=Md(r);e.on("drain",u);var l=false;function f(){L("cleanup"),e.removeListener("close",w),e.removeListener("finish",b),e.removeListener("drain",u),e.removeListener("error",h),e.removeListener("unpipe",o),r.removeListener("end",s),r.removeListener("end",_),r.removeListener("data",d),l=true,i.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&u();}var c=false;r.on("data",d);function d(p){L("ondata"),c=false;var g=e.write(p);g===false&&!c&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&so(i.pipes,e)!==-1)&&!l&&(L("false write response, pause",i.awaitDrain),i.awaitDrain++,c=true),r.pause());}function h(p){L("onerror",p),_(),e.removeListener("error",h),eo(e,"error")===0&&e.emit("error",p);}Ld(e,"error",h);function w(){e.removeListener("finish",b),_();}e.once("close",w);function b(){L("onfinish"),e.removeListener("close",w),_();}e.once("finish",b);function _(){L("unpipe"),r.unpipe(e);}return e.emit("pipe",r),i.flowing||(L("pipe resume"),r.resume()),e};function Md(e){return function(){var t=e._readableState;L("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&eo(e,"data")&&(t.flowing=true,Mi(e));}}I.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:false};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=false,e&&e.emit("unpipe",this,r),this);if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=false;for(var a=0;a<n;a++)i[a].emit("unpipe",this,{hasUnpiped:false});return this}var o=so(t.pipes,e);return o===-1?this:(t.pipes.splice(o,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};I.prototype.on=function(e,t){var r=ji.prototype.on.call(this,e,t);if(e==="data")this._readableState.flowing!==false&&this.resume();else if(e==="readable"){var i=this._readableState;!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=true,i.emittedReadable=false,i.reading?i.length&&Tr(this):st.nextTick(Nd,this));}return r};I.prototype.addListener=I.prototype.on;function Nd(e){L("readable nexttick read 0"),e.read(0);}I.prototype.resume=function(){var e=this._readableState;return e.flowing||(L("resume"),e.flowing=true,zd(this,e)),this};function zd(e,t){t.resumeScheduled||(t.resumeScheduled=true,st.nextTick(Pd,e,t));}function Pd(e,t){t.reading||(L("resume read 0"),e.read(0)),t.resumeScheduled=false,t.awaitDrain=0,e.emit("resume"),Mi(e),t.flowing&&!t.reading&&e.read(0);}I.prototype.pause=function(){return L("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==false&&(L("pause"),this._readableState.flowing=false,this.emit("pause")),this};function Mi(e){var t=e._readableState;for(L("flow",t.flowing);t.flowing&&e.read()!==null;);}I.prototype.wrap=function(e){var t=this,r=this._readableState,i=false;e.on("end",function(){if(L("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&t.push(o);}t.push(null);}),e.on("data",function(o){if(L("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var s=t.push(o);s||(i=true,e.pause());}});for(var n in e)this[n]===void 0&&typeof e[n]=="function"&&(this[n]=(function(o){return function(){return e[o].apply(e,arguments)}})(n));for(var a=0;a<Di.length;a++)e.on(Di[a],this.emit.bind(this,Di[a]));return this._read=function(o){L("wrapped _read",o),i&&(i=false,e.resume());},this};Object.defineProperty(I.prototype,"readableHighWaterMark",{enumerable:false,get:function(){return this._readableState.highWaterMark}});I._fromList=oo;function oo(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.head.data:r=t.buffer.concat(t.length),t.buffer.clear()):r=Bd(e,t.buffer,t.decoder),r}function Bd(e,t,r){var i;return e<t.head.data.length?(i=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):e===t.head.data.length?i=t.shift():i=r?qd(e,t):Ud(e,t),i}function qd(e,t){var r=t.head,i=1,n=r.data;for(e-=n.length;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(o===a.length?n+=a:n+=a.slice(0,e),e-=o,e===0){o===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++i;}return t.length-=i,n}function Ud(e,t){var r=Nt.allocUnsafe(e),i=t.head,n=1;for(i.data.copy(r),e-=i.data.length;i=i.next;){var a=i.data,o=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,o),e-=o,e===0){o===a.length?(++n,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=a.slice(o));break}++n;}return t.length-=n,r}function Fi(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=true,st.nextTick(Hd,t,e));}function Hd(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=true,t.readable=false,t.emit("end"));}function so(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return -1}});var Ni=v((qg,ho)=>{ho.exports=we;var Cr=qe(),uo=Object.create(it());uo.inherits=nt();uo.inherits(we,Cr);function Zd(e,t){var r=this._transformState;r.transforming=false;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,t!=null&&this.push(t),i(e);var n=this._readableState;n.reading=false,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark);}function we(e){if(!(this instanceof we))return new we(e);Cr.call(this,e),this._transformState={afterTransform:Zd.bind(this),needTransform:false,transforming:false,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=true,this._readableState.sync=false,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",Wd);}function Wd(){var e=this;typeof this._flush=="function"?this._flush(function(t,r){fo(e,t,r);}):fo(this,null,null);}we.prototype.push=function(e,t){return this._transformState.needTransform=false,Cr.prototype.push.call(this,e,t)};we.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")};we.prototype._write=function(e,t,r){var i=this._transformState;if(i.writecb=r,i.writechunk=e,i.writeencoding=t,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark);}};we.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&t.writecb&&!t.transforming?(t.transforming=true,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=true;};we.prototype._destroy=function(e,t){var r=this;Cr.prototype._destroy.call(this,e,function(i){t(i),r.emit("close");});};function fo(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}});var mo=v((Ug,go)=>{go.exports=zt;var co=Ni(),po=Object.create(it());po.inherits=nt();po.inherits(zt,co);function zt(e){if(!(this instanceof zt))return new zt(e);co.call(this,e);}zt.prototype._transform=function(e,t,r){r(null,e);};});var zi=v((U,Ar)=>{var ue=ve("stream");process.env.READABLE_STREAM==="disable"&&ue?(Ar.exports=ue,U=Ar.exports=ue.Readable,U.Readable=ue.Readable,U.Writable=ue.Writable,U.Duplex=ue.Duplex,U.Transform=ue.Transform,U.PassThrough=ue.PassThrough,U.Stream=ue):(U=Ar.exports=Ci(),U.Stream=ue||U,U.Readable=U,U.Writable=Si(),U.Duplex=qe(),U.Transform=Ni(),U.PassThrough=mo());});var xe=v(G=>{G.base64=true;G.array=true;G.string=true;G.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u";G.nodebuffer=typeof Buffer<"u";G.uint8array=typeof Uint8Array<"u";if(typeof ArrayBuffer>"u")G.blob=false;else {Pi=new ArrayBuffer(0);try{G.blob=new Blob([Pi],{type:"application/zip"}).size===0;}catch{try{vo=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,Bi=new vo,Bi.append(Pi),G.blob=Bi.getBlob("application/zip").size===0;}catch{G.blob=false;}}}var Pi,vo,Bi;try{G.nodestream=!!zi().Readable;}catch{G.nodestream=false;}});var Ui=v(qi=>{var Jd=j(),$d=xe(),de="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";qi.encode=function(e){for(var t=[],r,i,n,a,o,s,u,l=0,f=e.length,c=f,d=Jd.getTypeOf(e)!=="string";l<e.length;)c=f-l,d?(r=e[l++],i=l<f?e[l++]:0,n=l<f?e[l++]:0):(r=e.charCodeAt(l++),i=l<f?e.charCodeAt(l++):0,n=l<f?e.charCodeAt(l++):0),a=r>>2,o=(r&3)<<4|i>>4,s=c>1?(i&15)<<2|n>>6:64,u=c>2?n&63:64,t.push(de.charAt(a)+de.charAt(o)+de.charAt(s)+de.charAt(u));return t.join("")};qi.decode=function(e){var t,r,i,n,a,o,s,u=0,l=0,f="data:";if(e.substr(0,f.length)===f)throw new Error("Invalid base64 input, it looks like a data url.");e=e.replace(/[^A-Za-z0-9+/=]/g,"");var c=e.length*3/4;if(e.charAt(e.length-1)===de.charAt(64)&&c--,e.charAt(e.length-2)===de.charAt(64)&&c--,c%1!==0)throw new Error("Invalid base64 input, bad content length.");var d;for($d.uint8array?d=new Uint8Array(c|0):d=new Array(c|0);u<e.length;)n=de.indexOf(e.charAt(u++)),a=de.indexOf(e.charAt(u++)),o=de.indexOf(e.charAt(u++)),s=de.indexOf(e.charAt(u++)),t=n<<2|a>>4,r=(a&15)<<4|o>>2,i=(o&3)<<6|s,d[l++]=t,o!==64&&(d[l++]=r),s!==64&&(d[l++]=i);return d};});var Pt=v((Wg,bo)=>{bo.exports={isNode:typeof Buffer<"u",newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if(typeof e=="number")throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&typeof e.on=="function"&&typeof e.pause=="function"&&typeof e.resume=="function"}};});var xo=v((Jg,wo)=>{var _o=global.MutationObserver||global.WebKitMutationObserver,lt;process.browser?_o?(Hi=0,yo=new _o(Bt),Zi=global.document.createTextNode(""),yo.observe(Zi,{characterData:true}),lt=function(){Zi.data=Hi=++Hi%2;}):!global.setImmediate&&typeof global.MessageChannel<"u"?(Wi=new global.MessageChannel,Wi.port1.onmessage=Bt,lt=function(){Wi.port2.postMessage(0);}):"document"in global&&"onreadystatechange"in global.document.createElement("script")?lt=function(){var e=global.document.createElement("script");e.onreadystatechange=function(){Bt(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null;},global.document.documentElement.appendChild(e);}:lt=function(){setTimeout(Bt,0);}:lt=function(){process.nextTick(Bt);};var Hi,yo,Zi,Wi,Ji,qt=[];function Bt(){Ji=true;for(var e,t,r=qt.length;r;){for(t=qt,qt=[],e=-1;++e<r;)t[e]();r=qt.length;}Ji=false;}wo.exports=Vd;function Vd(e){qt.push(e)===1&&!Ji&&lt();}});var Ro=v(($g,Ao)=>{var Eo=xo();function ft(){}var J={},So=["REJECTED"],$i=["FULFILLED"],ko=["PENDING"];process.browser||(Ut=["UNHANDLED"]);var Ut;Ao.exports=Re;function Re(e){if(typeof e!="function")throw new TypeError("resolver must be a function");this.state=ko,this.queue=[],this.outcome=void 0,process.browser||(this.handled=Ut),e!==ft&&To(this,e);}Re.prototype.finally=function(e){if(typeof e!="function")return this;var t=this.constructor;return this.then(r,i);function r(n){function a(){return n}return t.resolve(e()).then(a)}function i(n){function a(){throw n}return t.resolve(e()).then(a)}};Re.prototype.catch=function(e){return this.then(null,e)};Re.prototype.then=function(e,t){if(typeof e!="function"&&this.state===$i||typeof t!="function"&&this.state===So)return this;var r=new this.constructor(ft);if(process.browser||this.handled===Ut&&(this.handled=null),this.state!==ko){var i=this.state===$i?e:t;Vi(r,i,this.outcome);}else this.queue.push(new Ht(r,e,t));return r};function Ht(e,t,r){this.promise=e,typeof t=="function"&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),typeof r=="function"&&(this.onRejected=r,this.callRejected=this.otherCallRejected);}Ht.prototype.callFulfilled=function(e){J.resolve(this.promise,e);};Ht.prototype.otherCallFulfilled=function(e){Vi(this.promise,this.onFulfilled,e);};Ht.prototype.callRejected=function(e){J.reject(this.promise,e);};Ht.prototype.otherCallRejected=function(e){Vi(this.promise,this.onRejected,e);};function Vi(e,t,r){Eo(function(){var i;try{i=t(r);}catch(n){return J.reject(e,n)}i===e?J.reject(e,new TypeError("Cannot resolve promise with itself")):J.resolve(e,i);});}J.resolve=function(e,t){var r=Co(Xd,t);if(r.status==="error")return J.reject(e,r.value);var i=r.value;if(i)To(e,i);else {e.state=$i,e.outcome=t;for(var n=-1,a=e.queue.length;++n<a;)e.queue[n].callFulfilled(t);}return e};J.reject=function(e,t){e.state=So,e.outcome=t,process.browser||e.handled===Ut&&Eo(function(){e.handled===Ut&&process.emit("unhandledRejection",t,e);});for(var r=-1,i=e.queue.length;++r<i;)e.queue[r].callRejected(t);return e};function Xd(e){var t=e&&e.then;if(e&&(typeof e=="object"||typeof e=="function")&&typeof t=="function")return function(){t.apply(e,arguments);}}function To(e,t){var r=false;function i(s){r||(r=true,J.reject(e,s));}function n(s){r||(r=true,J.resolve(e,s));}function a(){t(n,i);}var o=Co(a);o.status==="error"&&i(o.value);}function Co(e,t){var r={};try{r.value=e(t),r.status="success";}catch(i){r.status="error",r.value=i;}return r}Re.resolve=Yd;function Yd(e){return e instanceof this?e:J.resolve(new this(ft),e)}Re.reject=Kd;function Kd(e){var t=new this(ft);return J.reject(t,e)}Re.all=Gd;function Gd(e){var t=this;if(Object.prototype.toString.call(e)!=="[object Array]")return this.reject(new TypeError("must be an array"));var r=e.length,i=false;if(!r)return this.resolve([]);for(var n=new Array(r),a=0,o=-1,s=new this(ft);++o<r;)u(e[o],o);return s;function u(l,f){t.resolve(l).then(c,function(d){i||(i=true,J.reject(s,d));});function c(d){n[f]=d,++a===r&&!i&&(i=true,J.resolve(s,n));}}}Re.race=Qd;function Qd(e){var t=this;if(Object.prototype.toString.call(e)!=="[object Array]")return this.reject(new TypeError("must be an array"));var r=e.length,i=false;if(!r)return this.resolve([]);for(var n=-1,a=new this(ft);++n<r;)o(e[n]);return a;function o(s){t.resolve(s).then(function(u){i||(i=true,J.resolve(a,u));},function(u){i||(i=true,J.reject(a,u));});}}});var ut=v((Vg,Lo)=>{var Xi=null;typeof Promise<"u"?Xi=Promise:Xi=Ro();Lo.exports={Promise:Xi};});var Do=v(Oo=>{(function(e,t){if(e.setImmediate)return;var r=1,i={},n=false,a=e.document,o;function s(g){typeof g!="function"&&(g=new Function(""+g));for(var x=new Array(arguments.length-1),m=0;m<x.length;m++)x[m]=arguments[m+1];var y={callback:g,args:x};return i[r]=y,o(r),r++}function u(g){delete i[g];}function l(g){var x=g.callback,m=g.args;switch(m.length){case 0:x();break;case 1:x(m[0]);break;case 2:x(m[0],m[1]);break;case 3:x(m[0],m[1],m[2]);break;default:x.apply(t,m);break}}function f(g){if(n)setTimeout(f,0,g);else {var x=i[g];if(x){n=true;try{l(x);}finally{u(g),n=false;}}}}function c(){o=function(g){process.nextTick(function(){f(g);});};}function d(){if(e.postMessage&&!e.importScripts){var g=true,x=e.onmessage;return e.onmessage=function(){g=false;},e.postMessage("","*"),e.onmessage=x,g}}function h(){var g="setImmediate$"+Math.random()+"$",x=function(m){m.source===e&&typeof m.data=="string"&&m.data.indexOf(g)===0&&f(+m.data.slice(g.length));};e.addEventListener?e.addEventListener("message",x,false):e.attachEvent("onmessage",x),o=function(m){e.postMessage(g+m,"*");};}function w(){var g=new MessageChannel;g.port1.onmessage=function(x){var m=x.data;f(m);},o=function(x){g.port2.postMessage(x);};}function b(){var g=a.documentElement;o=function(x){var m=a.createElement("script");m.onreadystatechange=function(){f(x),m.onreadystatechange=null,g.removeChild(m),m=null;},g.appendChild(m);};}function _(){o=function(g){setTimeout(f,0,g);};}var p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,{}.toString.call(e.process)==="[object process]"?c():d()?h():e.MessageChannel?w():a&&"onreadystatechange"in a.createElement("script")?b():_(),p.setImmediate=s,p.clearImmediate=u;})(typeof self>"u"?typeof global>"u"?Oo:global:self);});var j=v(P=>{var Le=xe(),eh=Ui(),dt=Pt(),Yi=ut();Do();function th(e){var t=null;return Le.uint8array?t=new Uint8Array(e.length):t=new Array(e.length),Lr(e,t)}P.newBlob=function(e,t){P.checkSupport("blob");try{return new Blob([e],{type:t})}catch{try{var r=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,i=new r;return i.append(e),i.getBlob(t)}catch{throw new Error("Bug : can't construct the Blob.")}}};function Zt(e){return e}function Lr(e,t){for(var r=0;r<e.length;++r)t[r]=e.charCodeAt(r)&255;return t}var Rr={stringifyByChunk:function(e,t,r){var i=[],n=0,a=e.length;if(a<=r)return String.fromCharCode.apply(null,e);for(;n<a;)t==="array"||t==="nodebuffer"?i.push(String.fromCharCode.apply(null,e.slice(n,Math.min(n+r,a)))):i.push(String.fromCharCode.apply(null,e.subarray(n,Math.min(n+r,a)))),n+=r;return i.join("")},stringifyByChar:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},applyCanBeUsed:{uint8array:(function(){try{return Le.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return false}})(),nodebuffer:(function(){try{return Le.nodebuffer&&String.fromCharCode.apply(null,dt.allocBuffer(1)).length===1}catch{return false}})()}};function Wt(e){var t=65536,r=P.getTypeOf(e),i=true;if(r==="uint8array"?i=Rr.applyCanBeUsed.uint8array:r==="nodebuffer"&&(i=Rr.applyCanBeUsed.nodebuffer),i)for(;t>1;)try{return Rr.stringifyByChunk(e,r,t)}catch{t=Math.floor(t/2);}return Rr.stringifyByChar(e)}P.applyFromCharCode=Wt;function Or(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}var Oe={};Oe.string={string:Zt,array:function(e){return Lr(e,new Array(e.length))},arraybuffer:function(e){return Oe.string.uint8array(e).buffer},uint8array:function(e){return Lr(e,new Uint8Array(e.length))},nodebuffer:function(e){return Lr(e,dt.allocBuffer(e.length))}};Oe.array={string:Wt,array:Zt,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return dt.newBufferFrom(e)}};Oe.arraybuffer={string:function(e){return Wt(new Uint8Array(e))},array:function(e){return Or(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:Zt,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return dt.newBufferFrom(new Uint8Array(e))}};Oe.uint8array={string:Wt,array:function(e){return Or(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:Zt,nodebuffer:function(e){return dt.newBufferFrom(e)}};Oe.nodebuffer={string:Wt,array:function(e){return Or(e,new Array(e.length))},arraybuffer:function(e){return Oe.nodebuffer.uint8array(e).buffer},uint8array:function(e){return Or(e,new Uint8Array(e.length))},nodebuffer:Zt};P.transformTo=function(e,t){if(t||(t=""),!e)return t;P.checkSupport(e);var r=P.getTypeOf(t),i=Oe[r][e](t);return i};P.resolve=function(e){for(var t=e.split("/"),r=[],i=0;i<t.length;i++){var n=t[i];n==="."||n===""&&i!==0&&i!==t.length-1||(n===".."?r.pop():r.push(n));}return r.join("/")};P.getTypeOf=function(e){if(typeof e=="string")return "string";if(Object.prototype.toString.call(e)==="[object Array]")return "array";if(Le.nodebuffer&&dt.isBuffer(e))return "nodebuffer";if(Le.uint8array&&e instanceof Uint8Array)return "uint8array";if(Le.arraybuffer&&e instanceof ArrayBuffer)return "arraybuffer"};P.checkSupport=function(e){var t=Le[e.toLowerCase()];if(!t)throw new Error(e+" is not supported by this platform")};P.MAX_VALUE_16BITS=65535;P.MAX_VALUE_32BITS=-1;P.pretty=function(e){var t="",r,i;for(i=0;i<(e||"").length;i++)r=e.charCodeAt(i),t+="\\x"+(r<16?"0":"")+r.toString(16).toUpperCase();return t};P.delay=function(e,t,r){setImmediate(function(){e.apply(r||null,t||[]);});};P.inherits=function(e,t){var r=function(){};r.prototype=t.prototype,e.prototype=new r;};P.extend=function(){var e={},t,r;for(t=0;t<arguments.length;t++)for(r in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],r)&&typeof e[r]>"u"&&(e[r]=arguments[t][r]);return e};P.prepareContent=function(e,t,r,i,n){var a=Yi.Promise.resolve(t).then(function(o){var s=Le.blob&&(o instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(o))!==-1);return s&&typeof FileReader<"u"?new Yi.Promise(function(u,l){var f=new FileReader;f.onload=function(c){u(c.target.result);},f.onerror=function(c){l(c.target.error);},f.readAsArrayBuffer(o);}):o});return a.then(function(o){var s=P.getTypeOf(o);return s?(s==="arraybuffer"?o=P.transformTo("uint8array",o):s==="string"&&(n?o=eh.decode(o):r&&i!==true&&(o=th(o))),o):Yi.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})};});var Q=v((Kg,Fo)=>{function Io(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=true,this.isFinished=false,this.isLocked=false,this._listeners={data:[],end:[],error:[]},this.previous=null;}Io.prototype={push:function(e){this.emit("data",e);},end:function(){if(this.isFinished)return false;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0;}catch(e){this.emit("error",e);}return true},error:function(e){return this.isFinished?false:(this.isPaused?this.generatedError=e:(this.isFinished=true,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),true)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[];},emit:function(e,t){if(this._listeners[e])for(var r=0;r<this._listeners[e].length;r++)this._listeners[e][r].call(this,t);},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",function(r){t.processChunk(r);}),e.on("end",function(){t.end();}),e.on("error",function(r){t.error(r);}),this},pause:function(){return this.isPaused||this.isFinished?false:(this.isPaused=true,this.previous&&this.previous.pause(),true)},resume:function(){if(!this.isPaused||this.isFinished)return false;this.isPaused=false;var e=false;return this.generatedError&&(this.error(this.generatedError),e=true),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e);},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e]);},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=true,this.previous&&this.previous.lock();},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}};Fo.exports=Io;});var ct=v(De=>{var ht=j(),Ue=xe(),rh=Pt(),Dr=Q(),Jt=new Array(256);for(Ee=0;Ee<256;Ee++)Jt[Ee]=Ee>=252?6:Ee>=248?5:Ee>=240?4:Ee>=224?3:Ee>=192?2:1;var Ee;Jt[254]=Jt[254]=1;var ih=function(e){var t,r,i,n,a,o=e.length,s=0;for(n=0;n<o;n++)r=e.charCodeAt(n),(r&64512)===55296&&n+1<o&&(i=e.charCodeAt(n+1),(i&64512)===56320&&(r=65536+(r-55296<<10)+(i-56320),n++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(Ue.uint8array?t=new Uint8Array(s):t=new Array(s),a=0,n=0;a<s;n++)r=e.charCodeAt(n),(r&64512)===55296&&n+1<o&&(i=e.charCodeAt(n+1),(i&64512)===56320&&(r=65536+(r-55296<<10)+(i-56320),n++)),r<128?t[a++]=r:r<2048?(t[a++]=192|r>>>6,t[a++]=128|r&63):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|r&63):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|r&63);return t},nh=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+Jt[e[r]]>t?r:t},ah=function(e){var t,r,i,n,a=e.length,o=new Array(a*2);for(r=0,t=0;t<a;){if(i=e[t++],i<128){o[r++]=i;continue}if(n=Jt[i],n>4){o[r++]=65533,t+=n-1;continue}for(i&=n===2?31:n===3?15:7;n>1&&t<a;)i=i<<6|e[t++]&63,n--;if(n>1){o[r++]=65533;continue}i<65536?o[r++]=i:(i-=65536,o[r++]=55296|i>>10&1023,o[r++]=56320|i&1023);}return o.length!==r&&(o.subarray?o=o.subarray(0,r):o.length=r),ht.applyFromCharCode(o)};De.utf8encode=function(t){return Ue.nodebuffer?rh.newBufferFrom(t,"utf-8"):ih(t)};De.utf8decode=function(t){return Ue.nodebuffer?ht.transformTo("nodebuffer",t).toString("utf-8"):(t=ht.transformTo(Ue.uint8array?"uint8array":"array",t),ah(t))};function Ir(){Dr.call(this,"utf-8 decode"),this.leftOver=null;}ht.inherits(Ir,Dr);Ir.prototype.processChunk=function(e){var t=ht.transformTo(Ue.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(Ue.uint8array){var r=t;t=new Uint8Array(r.length+this.leftOver.length),t.set(this.leftOver,0),t.set(r,this.leftOver.length);}else t=this.leftOver.concat(t);this.leftOver=null;}var i=nh(t),n=t;i!==t.length&&(Ue.uint8array?(n=t.subarray(0,i),this.leftOver=t.subarray(i,t.length)):(n=t.slice(0,i),this.leftOver=t.slice(i,t.length))),this.push({data:De.utf8decode(n),meta:e.meta});};Ir.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:De.utf8decode(this.leftOver),meta:{}}),this.leftOver=null);};De.Utf8DecodeWorker=Ir;function Ki(){Dr.call(this,"utf-8 encode");}ht.inherits(Ki,Dr);Ki.prototype.processChunk=function(e){this.push({data:De.utf8encode(e.data),meta:e.meta});};De.Utf8EncodeWorker=Ki;});var zo=v((Qg,No)=>{var jo=Q(),Mo=j();function Gi(e){jo.call(this,"ConvertWorker to "+e),this.destType=e;}Mo.inherits(Gi,jo);Gi.prototype.processChunk=function(e){this.push({data:Mo.transformTo(this.destType,e.data),meta:e.meta});};No.exports=Gi;});var qo=v((em,Bo)=>{var Po=zi().Readable,oh=j();oh.inherits(Qi,Po);function Qi(e,t,r){Po.call(this,t),this._helper=e;var i=this;e.on("data",function(n,a){i.push(n)||i._helper.pause(),r&&r(a);}).on("error",function(n){i.emit("error",n);}).on("end",function(){i.push(null);});}Qi.prototype._read=function(){this._helper.resume();};Bo.exports=Qi;});var en=v((tm,Zo)=>{var He=j(),sh=zo(),lh=Q(),fh=Ui(),uh=xe(),dh=ut(),Uo=null;if(uh.nodestream)try{Uo=qo();}catch{}function hh(e,t,r){switch(e){case "blob":return He.newBlob(He.transformTo("arraybuffer",t),r);case "base64":return fh.encode(t);default:return He.transformTo(e,t)}}function ch(e,t){var r,i=0,n=null,a=0;for(r=0;r<t.length;r++)a+=t[r].length;switch(e){case "string":return t.join("");case "array":return Array.prototype.concat.apply([],t);case "uint8array":for(n=new Uint8Array(a),r=0;r<t.length;r++)n.set(t[r],i),i+=t[r].length;return n;case "nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}function ph(e,t){return new dh.Promise(function(r,i){var n=[],a=e._internalType,o=e._outputType,s=e._mimeType;e.on("data",function(u,l){n.push(u),t&&t(l);}).on("error",function(u){n=[],i(u);}).on("end",function(){try{var u=hh(o,ch(a,n),s);r(u);}catch(l){i(l);}n=[];}).resume();})}function Ho(e,t,r){var i=t;switch(t){case "blob":case "arraybuffer":i="uint8array";break;case "base64":i="string";break}try{this._internalType=i,this._outputType=t,this._mimeType=r,He.checkSupport(i),this._worker=e.pipe(new sh(i)),e.lock();}catch(n){this._worker=new lh("error"),this._worker.error(n);}}Ho.prototype={accumulate:function(e){return ph(this,e)},on:function(e,t){var r=this;return e==="data"?this._worker.on(e,function(i){t.call(r,i.data,i.meta);}):this._worker.on(e,function(){He.delay(t,arguments,r);}),this},resume:function(){return He.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(He.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new Uo(this,{objectMode:this._outputType!=="nodebuffer"},e)}};Zo.exports=Ho;});var tn=v(ae=>{ae.base64=false;ae.binary=false;ae.dir=false;ae.createFolders=true;ae.date=null;ae.compression=null;ae.compressionOptions=null;ae.comment=null;ae.unixPermissions=null;ae.dosPermissions=null;});var rn=v((im,Wo)=>{var Fr=j(),jr=Q(),gh=16*1024;function pt(e){jr.call(this,"DataWorker");var t=this;this.dataIsReady=false,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=false,e.then(function(r){t.dataIsReady=true,t.data=r,t.max=r&&r.length||0,t.type=Fr.getTypeOf(r),t.isPaused||t._tickAndRepeat();},function(r){t.error(r);});}Fr.inherits(pt,jr);pt.prototype.cleanUp=function(){jr.prototype.cleanUp.call(this),this.data=null;};pt.prototype.resume=function(){return jr.prototype.resume.call(this)?(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=true,Fr.delay(this._tickAndRepeat,[],this)),true):false};pt.prototype._tickAndRepeat=function(){this._tickScheduled=false,!(this.isPaused||this.isFinished)&&(this._tick(),this.isFinished||(Fr.delay(this._tickAndRepeat,[],this),this._tickScheduled=true));};pt.prototype._tick=function(){if(this.isPaused||this.isFinished)return false;var e=gh,t=null,r=Math.min(this.max,this.index+e);if(this.index>=this.max)return this.end();switch(this.type){case "string":t=this.data.substring(this.index,r);break;case "uint8array":t=this.data.subarray(this.index,r);break;case "array":case "nodebuffer":t=this.data.slice(this.index,r);break}return this.index=r,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})};Wo.exports=pt;});var Mr=v((nm,$o)=>{var mh=j();function vh(){for(var e,t=[],r=0;r<256;r++){e=r;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e;}return t}var Jo=vh();function bh(e,t,r,i){var n=Jo,a=i+r;e=e^-1;for(var o=i;o<a;o++)e=e>>>8^n[(e^t[o])&255];return e^-1}function _h(e,t,r,i){var n=Jo,a=i+r;e=e^-1;for(var o=i;o<a;o++)e=e>>>8^n[(e^t.charCodeAt(o))&255];return e^-1}$o.exports=function(t,r){if(typeof t>"u"||!t.length)return 0;var i=mh.getTypeOf(t)!=="string";return i?bh(r|0,t,t.length,0):_h(r|0,t,t.length,0)};});var an=v((am,Xo)=>{var Vo=Q(),yh=Mr(),wh=j();function nn(){Vo.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0);}wh.inherits(nn,Vo);nn.prototype.processChunk=function(e){this.streamInfo.crc32=yh(e.data,this.streamInfo.crc32||0),this.push(e);};Xo.exports=nn;});var Ko=v((om,Yo)=>{var xh=j(),on=Q();function sn(e){on.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0);}xh.inherits(sn,on);sn.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length;}on.prototype.processChunk.call(this,e);};Yo.exports=sn;});var Nr=v((sm,es)=>{var Go=ut(),Qo=rn(),Eh=an(),ln=Ko();function fn(e,t,r,i,n){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=i,this.compressedContent=n;}fn.prototype={getContentWorker:function(){var e=new Qo(Go.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new ln("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new Qo(Go.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}};fn.createWorkerFrom=function(e,t,r){return e.pipe(new Eh).pipe(new ln("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new ln("compressedSize")).withStreamInfo("compression",t)};es.exports=fn;});var ns=v((lm,is)=>{var Sh=en(),kh=rn(),un=ct(),dn=Nr(),ts=Q(),hn=function(e,t,r){this.name=e,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=t,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions};};hn.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");r=e.toLowerCase();var i=r==="string"||r==="text";(r==="binarystring"||r==="text")&&(r="string"),t=this._decompressWorker();var n=!this._dataBinary;n&&!i&&(t=t.pipe(new un.Utf8EncodeWorker)),!n&&i&&(t=t.pipe(new un.Utf8DecodeWorker));}catch(a){t=new ts("error"),t.error(a);}return new Sh(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof dn&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new un.Utf8EncodeWorker)),dn.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof dn?this._data.getContentWorker():this._data instanceof ts?this._data:new kh(this._data)}};var rs=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],Th=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")};for(zr=0;zr<rs.length;zr++)hn.prototype[rs[zr]]=Th;var zr;is.exports=hn;});var Se=v(V=>{var Ch=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function Ah(e,t){return Object.prototype.hasOwnProperty.call(e,t)}V.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if(typeof r!="object")throw new TypeError(r+"must be non-object");for(var i in r)Ah(r,i)&&(e[i]=r[i]);}}return e};V.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var Rh={arraySet:function(e,t,r,i,n){if(t.subarray&&e.subarray){e.set(t.subarray(r,r+i),n);return}for(var a=0;a<i;a++)e[n+a]=t[r+a];},flattenChunks:function(e){var t,r,i,n,a,o;for(i=0,t=0,r=e.length;t<r;t++)i+=e[t].length;for(o=new Uint8Array(i),n=0,t=0,r=e.length;t<r;t++)a=e[t],o.set(a,n),n+=a.length;return o}},Lh={arraySet:function(e,t,r,i,n){for(var a=0;a<i;a++)e[n+a]=t[r+a];},flattenChunks:function(e){return [].concat.apply([],e)}};V.setTyped=function(e){e?(V.Buf8=Uint8Array,V.Buf16=Uint16Array,V.Buf32=Int32Array,V.assign(V,Rh)):(V.Buf8=Array,V.Buf16=Array,V.Buf32=Array,V.assign(V,Lh));};V.setTyped(Ch);});var Cs=v(vt=>{var Oh=Se(),Dh=4,as=0,os=1,Ih=2;function mt(e){for(var t=e.length;--t>=0;)e[t]=0;}var Fh=0,hs=1,jh=2,Mh=3,Nh=258,_n=29,Gt=256,Vt=Gt+1+_n,gt=30,yn=19,cs=2*Vt+1,Ze=15,cn=16,zh=7,wn=256,ps=16,gs=17,ms=18,vn=[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],Pr=[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],Ph=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],vs=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Bh=512,ke=new Array((Vt+2)*2);mt(ke);var $t=new Array(gt*2);mt($t);var Xt=new Array(Bh);mt(Xt);var Yt=new Array(Nh-Mh+1);mt(Yt);var xn=new Array(_n);mt(xn);var Br=new Array(gt);mt(Br);function pn(e,t,r,i,n){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=i,this.max_length=n,this.has_stree=e&&e.length;}var bs,_s,ys;function gn(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t;}function ws(e){return e<256?Xt[e]:Xt[256+(e>>>7)]}function Kt(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255;}function Y(e,t,r){e.bi_valid>cn-r?(e.bi_buf|=t<<e.bi_valid&65535,Kt(e,e.bi_buf),e.bi_buf=t>>cn-e.bi_valid,e.bi_valid+=r-cn):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r);}function he(e,t,r){Y(e,r[t*2],r[t*2+1]);}function xs(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function qh(e){e.bi_valid===16?(Kt(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8);}function Uh(e,t){var r=t.dyn_tree,i=t.max_code,n=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,u=t.stat_desc.max_length,l,f,c,d,h,w,b=0;for(d=0;d<=Ze;d++)e.bl_count[d]=0;for(r[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<cs;l++)f=e.heap[l],d=r[r[f*2+1]*2+1]+1,d>u&&(d=u,b++),r[f*2+1]=d,!(f>i)&&(e.bl_count[d]++,h=0,f>=s&&(h=o[f-s]),w=r[f*2],e.opt_len+=w*(d+h),a&&(e.static_len+=w*(n[f*2+1]+h)));if(b!==0){do{for(d=u-1;e.bl_count[d]===0;)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[u]--,b-=2;}while(b>0);for(d=u;d!==0;d--)for(f=e.bl_count[d];f!==0;)c=e.heap[--l],!(c>i)&&(r[c*2+1]!==d&&(e.opt_len+=(d-r[c*2+1])*r[c*2],r[c*2+1]=d),f--);}}function Es(e,t,r){var i=new Array(Ze+1),n=0,a,o;for(a=1;a<=Ze;a++)i[a]=n=n+r[a-1]<<1;for(o=0;o<=t;o++){var s=e[o*2+1];s!==0&&(e[o*2]=xs(i[s]++,s));}}function Hh(){var e,t,r,i,n,a=new Array(Ze+1);for(r=0,i=0;i<_n-1;i++)for(xn[i]=r,e=0;e<1<<vn[i];e++)Yt[r++]=i;for(Yt[r-1]=i,n=0,i=0;i<16;i++)for(Br[i]=n,e=0;e<1<<Pr[i];e++)Xt[n++]=i;for(n>>=7;i<gt;i++)for(Br[i]=n<<7,e=0;e<1<<Pr[i]-7;e++)Xt[256+n++]=i;for(t=0;t<=Ze;t++)a[t]=0;for(e=0;e<=143;)ke[e*2+1]=8,e++,a[8]++;for(;e<=255;)ke[e*2+1]=9,e++,a[9]++;for(;e<=279;)ke[e*2+1]=7,e++,a[7]++;for(;e<=287;)ke[e*2+1]=8,e++,a[8]++;for(Es(ke,Vt+1,a),e=0;e<gt;e++)$t[e*2+1]=5,$t[e*2]=xs(e,5);bs=new pn(ke,vn,Gt+1,Vt,Ze),_s=new pn($t,Pr,0,gt,Ze),ys=new pn(new Array(0),Ph,0,yn,zh);}function Ss(e){var t;for(t=0;t<Vt;t++)e.dyn_ltree[t*2]=0;for(t=0;t<gt;t++)e.dyn_dtree[t*2]=0;for(t=0;t<yn;t++)e.bl_tree[t*2]=0;e.dyn_ltree[wn*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0;}function ks(e){e.bi_valid>8?Kt(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0;}function Zh(e,t,r,i){ks(e),(Kt(e,r),Kt(e,~r)),Oh.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r;}function ss(e,t,r,i){var n=t*2,a=r*2;return e[n]<e[a]||e[n]===e[a]&&i[t]<=i[r]}function mn(e,t,r){for(var i=e.heap[r],n=r<<1;n<=e.heap_len&&(n<e.heap_len&&ss(t,e.heap[n+1],e.heap[n],e.depth)&&n++,!ss(t,i,e.heap[n],e.depth));)e.heap[r]=e.heap[n],r=n,n<<=1;e.heap[r]=i;}function ls(e,t,r){var i,n,a=0,o,s;if(e.last_lit!==0)do i=e.pending_buf[e.d_buf+a*2]<<8|e.pending_buf[e.d_buf+a*2+1],n=e.pending_buf[e.l_buf+a],a++,i===0?he(e,n,t):(o=Yt[n],he(e,o+Gt+1,t),s=vn[o],s!==0&&(n-=xn[o],Y(e,n,s)),i--,o=ws(i),he(e,o,r),s=Pr[o],s!==0&&(i-=Br[o],Y(e,i,s)));while(a<e.last_lit);he(e,wn,t);}function bn(e,t){var r=t.dyn_tree,i=t.stat_desc.static_tree,n=t.stat_desc.has_stree,a=t.stat_desc.elems,o,s,u=-1,l;for(e.heap_len=0,e.heap_max=cs,o=0;o<a;o++)r[o*2]!==0?(e.heap[++e.heap_len]=u=o,e.depth[o]=0):r[o*2+1]=0;for(;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--,n&&(e.static_len-=i[l*2+1]);for(t.max_code=u,o=e.heap_len>>1;o>=1;o--)mn(e,r,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],mn(e,r,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,r[l*2]=r[o*2]+r[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,r[o*2+1]=r[s*2+1]=l,e.heap[1]=l++,mn(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],Uh(e,t),Es(r,u,e.bl_count);}function fs(e,t,r){var i,n=-1,a,o=t[1],s=0,u=7,l=4;for(o===0&&(u=138,l=3),t[(r+1)*2+1]=65535,i=0;i<=r;i++)a=o,o=t[(i+1)*2+1],!(++s<u&&a===o)&&(s<l?e.bl_tree[a*2]+=s:a!==0?(a!==n&&e.bl_tree[a*2]++,e.bl_tree[ps*2]++):s<=10?e.bl_tree[gs*2]++:e.bl_tree[ms*2]++,s=0,n=a,o===0?(u=138,l=3):a===o?(u=6,l=3):(u=7,l=4));}function us(e,t,r){var i,n=-1,a,o=t[1],s=0,u=7,l=4;for(o===0&&(u=138,l=3),i=0;i<=r;i++)if(a=o,o=t[(i+1)*2+1],!(++s<u&&a===o)){if(s<l)do he(e,a,e.bl_tree);while(--s!==0);else a!==0?(a!==n&&(he(e,a,e.bl_tree),s--),he(e,ps,e.bl_tree),Y(e,s-3,2)):s<=10?(he(e,gs,e.bl_tree),Y(e,s-3,3)):(he(e,ms,e.bl_tree),Y(e,s-11,7));s=0,n=a,o===0?(u=138,l=3):a===o?(u=6,l=3):(u=7,l=4);}}function Wh(e){var t;for(fs(e,e.dyn_ltree,e.l_desc.max_code),fs(e,e.dyn_dtree,e.d_desc.max_code),bn(e,e.bl_desc),t=yn-1;t>=3&&e.bl_tree[vs[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function Jh(e,t,r,i){var n;for(Y(e,t-257,5),Y(e,r-1,5),Y(e,i-4,4),n=0;n<i;n++)Y(e,e.bl_tree[vs[n]*2+1],3);us(e,e.dyn_ltree,t-1),us(e,e.dyn_dtree,r-1);}function $h(e){var t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return as;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return os;for(r=32;r<Gt;r++)if(e.dyn_ltree[r*2]!==0)return os;return as}var ds=false;function Vh(e){ds||(Hh(),ds=true),e.l_desc=new gn(e.dyn_ltree,bs),e.d_desc=new gn(e.dyn_dtree,_s),e.bl_desc=new gn(e.bl_tree,ys),e.bi_buf=0,e.bi_valid=0,Ss(e);}function Ts(e,t,r,i){Y(e,(Fh<<1)+(i?1:0),3),Zh(e,t,r);}function Xh(e){Y(e,hs<<1,3),he(e,wn,ke),qh(e);}function Yh(e,t,r,i){var n,a,o=0;e.level>0?(e.strm.data_type===Ih&&(e.strm.data_type=$h(e)),bn(e,e.l_desc),bn(e,e.d_desc),o=Wh(e),n=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=n&&(n=a)):n=a=r+5,r+4<=n&&t!==-1?Ts(e,t,r,i):e.strategy===Dh||a===n?(Y(e,(hs<<1)+(i?1:0),3),ls(e,ke,$t)):(Y(e,(jh<<1)+(i?1:0),3),Jh(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),ls(e,e.dyn_ltree,e.dyn_dtree)),Ss(e),i&&ks(e);}function Kh(e,t,r){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=r&255,e.last_lit++,t===0?e.dyn_ltree[r*2]++:(e.matches++,t--,e.dyn_ltree[(Yt[r]+Gt+1)*2]++,e.dyn_dtree[ws(t)*2]++),e.last_lit===e.lit_bufsize-1}vt._tr_init=Vh;vt._tr_stored_block=Ts;vt._tr_flush_block=Yh;vt._tr_tally=Kh;vt._tr_align=Xh;});var En=v((dm,As)=>{function Gh(e,t,r,i){for(var n=e&65535|0,a=e>>>16&65535|0,o=0;r!==0;){o=r>2e3?2e3:r,r-=o;do n=n+t[i++]|0,a=a+n|0;while(--o);n%=65521,a%=65521;}return n|a<<16|0}As.exports=Gh;});var Sn=v((hm,Rs)=>{function Qh(){for(var e,t=[],r=0;r<256;r++){e=r;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;t[r]=e;}return t}var ec=Qh();function tc(e,t,r,i){var n=ec,a=i+r;e^=-1;for(var o=i;o<a;o++)e=e>>>8^n[(e^t[o])&255];return e^-1}Rs.exports=tc;});var qr=v((cm,Ls)=>{Ls.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"};});var Ps=v(ge=>{var X=Se(),te=Cs(),Fs=En(),Ie=Sn(),rc=qr(),Ve=0,ic=1,nc=3,ze=4,Os=5,pe=0,Ds=1,re=-2,ac=-3,kn=-5,oc=-1,sc=1,Ur=2,lc=3,fc=4,uc=0,dc=2,Jr=8,hc=9,cc=15,pc=8,gc=29,mc=256,Cn=mc+1+gc,vc=30,bc=19,_c=2*Cn+1,yc=15,A=3,Me=258,oe=Me+A+1,wc=32,$r=42,An=69,Hr=73,Zr=91,Wr=103,We=113,er=666,B=1,tr=2,Je=3,yt=4,xc=3;function Ne(e,t){return e.msg=rc[t],t}function Is(e){return (e<<1)-(e>4?9:0)}function je(e){for(var t=e.length;--t>=0;)e[t]=0;}function Fe(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(X.arraySet(e.output,t.pending_buf,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,t.pending===0&&(t.pending_out=0));}function H(e,t){te._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Fe(e.strm);}function R(e,t){e.pending_buf[e.pending++]=t;}function Qt(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255;}function Ec(e,t,r,i){var n=e.avail_in;return n>i&&(n=i),n===0?0:(e.avail_in-=n,X.arraySet(t,e.input,e.next_in,n,r),e.state.wrap===1?e.adler=Fs(e.adler,t,n,r):e.state.wrap===2&&(e.adler=Ie(e.adler,t,n,r)),e.next_in+=n,e.total_in+=n,n)}function js(e,t){var r=e.max_chain_length,i=e.strstart,n,a,o=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-oe?e.strstart-(e.w_size-oe):0,l=e.window,f=e.w_mask,c=e.prev,d=e.strstart+Me,h=l[i+o-1],w=l[i+o];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do if(n=t,!(l[n+o]!==w||l[n+o-1]!==h||l[n]!==l[i]||l[++n]!==l[i+1])){i+=2,n++;do;while(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]===l[++n]&&i<d);if(a=Me-(d-i),i=d-Me,a>o){if(e.match_start=t,o=a,a>=s)break;h=l[i+o-1],w=l[i+o];}}while((t=c[t&f])>u&&--r!==0);return o<=e.lookahead?o:e.lookahead}function $e(e){var t=e.w_size,r,i,n,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-oe)){X.arraySet(e.window,e.window,t,t,0),e.match_start-=t,e.strstart-=t,e.block_start-=t,i=e.hash_size,r=i;do n=e.head[--r],e.head[r]=n>=t?n-t:0;while(--i);i=t,r=i;do n=e.prev[--r],e.prev[r]=n>=t?n-t:0;while(--i);a+=t;}if(e.strm.avail_in===0)break;if(i=Ec(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=i,e.lookahead+e.insert>=A)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+A-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<A)););}while(e.lookahead<oe&&e.strm.avail_in!==0)}function Sc(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if($e(e),e.lookahead===0&&t===Ve)return B;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+r;if((e.strstart===0||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,H(e,false),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-oe&&(H(e,false),e.strm.avail_out===0))return B}return e.insert=0,t===ze?(H(e,true),e.strm.avail_out===0?Je:yt):(e.strstart>e.block_start&&(H(e,false),e.strm.avail_out===0),B)}function Tn(e,t){for(var r,i;;){if(e.lookahead<oe){if($e(e),e.lookahead<oe&&t===Ve)return B;if(e.lookahead===0)break}if(r=0,e.lookahead>=A&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+A-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),r!==0&&e.strstart-r<=e.w_size-oe&&(e.match_length=js(e,r)),e.match_length>=A)if(i=te._tr_tally(e,e.strstart-e.match_start,e.match_length-A),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=A){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+A-1])&e.hash_mask,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=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else i=te._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(H(e,false),e.strm.avail_out===0))return B}return e.insert=e.strstart<A-1?e.strstart:A-1,t===ze?(H(e,true),e.strm.avail_out===0?Je:yt):e.last_lit&&(H(e,false),e.strm.avail_out===0)?B:tr}function bt(e,t){for(var r,i,n;;){if(e.lookahead<oe){if($e(e),e.lookahead<oe&&t===Ve)return B;if(e.lookahead===0)break}if(r=0,e.lookahead>=A&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+A-1])&e.hash_mask,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=A-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-oe&&(e.match_length=js(e,r),e.match_length<=5&&(e.strategy===sc||e.match_length===A&&e.strstart-e.match_start>4096)&&(e.match_length=A-1)),e.prev_length>=A&&e.match_length<=e.prev_length){n=e.strstart+e.lookahead-A,i=te._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-A),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=n&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+A-1])&e.hash_mask,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);if(e.match_available=0,e.match_length=A-1,e.strstart++,i&&(H(e,false),e.strm.avail_out===0))return B}else if(e.match_available){if(i=te._tr_tally(e,0,e.window[e.strstart-1]),i&&H(e,false),e.strstart++,e.lookahead--,e.strm.avail_out===0)return B}else e.match_available=1,e.strstart++,e.lookahead--;}return e.match_available&&(i=te._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<A-1?e.strstart:A-1,t===ze?(H(e,true),e.strm.avail_out===0?Je:yt):e.last_lit&&(H(e,false),e.strm.avail_out===0)?B:tr}function kc(e,t){for(var r,i,n,a,o=e.window;;){if(e.lookahead<=Me){if($e(e),e.lookahead<=Me&&t===Ve)return B;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=A&&e.strstart>0&&(n=e.strstart-1,i=o[n],i===o[++n]&&i===o[++n]&&i===o[++n])){a=e.strstart+Me;do;while(i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&n<a);e.match_length=Me-(a-n),e.match_length>e.lookahead&&(e.match_length=e.lookahead);}if(e.match_length>=A?(r=te._tr_tally(e,1,e.match_length-A),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=te._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(H(e,false),e.strm.avail_out===0))return B}return e.insert=0,t===ze?(H(e,true),e.strm.avail_out===0?Je:yt):e.last_lit&&(H(e,false),e.strm.avail_out===0)?B:tr}function Tc(e,t){for(var r;;){if(e.lookahead===0&&($e(e),e.lookahead===0)){if(t===Ve)return B;break}if(e.match_length=0,r=te._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(H(e,false),e.strm.avail_out===0))return B}return e.insert=0,t===ze?(H(e,true),e.strm.avail_out===0?Je:yt):e.last_lit&&(H(e,false),e.strm.avail_out===0)?B:tr}function ce(e,t,r,i,n){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=i,this.func=n;}var _t;_t=[new ce(0,0,0,0,Sc),new ce(4,4,8,4,Tn),new ce(4,5,16,8,Tn),new ce(4,6,32,32,Tn),new ce(4,4,16,16,bt),new ce(8,16,32,32,bt),new ce(8,16,128,128,bt),new ce(8,32,128,256,bt),new ce(32,128,258,1024,bt),new ce(32,258,258,4096,bt)];function Cc(e){e.window_size=2*e.w_size,je(e.head),e.max_lazy_match=_t[e.level].max_lazy,e.good_match=_t[e.level].good_length,e.nice_match=_t[e.level].nice_length,e.max_chain_length=_t[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=A-1,e.match_available=0,e.ins_h=0;}function Ac(){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=Jr,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 X.Buf16(_c*2),this.dyn_dtree=new X.Buf16((2*vc+1)*2),this.bl_tree=new X.Buf16((2*bc+1)*2),je(this.dyn_ltree),je(this.dyn_dtree),je(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new X.Buf16(yc+1),this.heap=new X.Buf16(2*Cn+1),je(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new X.Buf16(2*Cn+1),je(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0;}function Ms(e){var t;return !e||!e.state?Ne(e,re):(e.total_in=e.total_out=0,e.data_type=dc,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?$r:We,e.adler=t.wrap===2?0:1,t.last_flush=Ve,te._tr_init(t),pe)}function Ns(e){var t=Ms(e);return t===pe&&Cc(e.state),t}function Rc(e,t){return !e||!e.state||e.state.wrap!==2?re:(e.state.gzhead=t,pe)}function zs(e,t,r,i,n,a){if(!e)return re;var o=1;if(t===oc&&(t=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),n<1||n>hc||r!==Jr||i<8||i>15||t<0||t>9||a<0||a>fc)return Ne(e,re);i===8&&(i=9);var s=new Ac;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=i,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=n+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+A-1)/A),s.window=new X.Buf8(s.w_size*2),s.head=new X.Buf16(s.hash_size),s.prev=new X.Buf16(s.w_size),s.lit_bufsize=1<<n+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new X.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=a,s.method=r,Ns(e)}function Lc(e,t){return zs(e,t,Jr,cc,pc,uc)}function Oc(e,t){var r,i,n,a;if(!e||!e.state||t>Os||t<0)return e?Ne(e,re):re;if(i=e.state,!e.output||!e.input&&e.avail_in!==0||i.status===er&&t!==ze)return Ne(e,e.avail_out===0?kn:re);if(i.strm=e,r=i.last_flush,i.last_flush=t,i.status===$r)if(i.wrap===2)e.adler=0,R(i,31),R(i,139),R(i,8),i.gzhead?(R(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),R(i,i.gzhead.time&255),R(i,i.gzhead.time>>8&255),R(i,i.gzhead.time>>16&255),R(i,i.gzhead.time>>24&255),R(i,i.level===9?2:i.strategy>=Ur||i.level<2?4:0),R(i,i.gzhead.os&255),i.gzhead.extra&&i.gzhead.extra.length&&(R(i,i.gzhead.extra.length&255),R(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=Ie(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=An):(R(i,0),R(i,0),R(i,0),R(i,0),R(i,0),R(i,i.level===9?2:i.strategy>=Ur||i.level<2?4:0),R(i,xc),i.status=We);else {var o=Jr+(i.w_bits-8<<4)<<8,s=-1;i.strategy>=Ur||i.level<2?s=0:i.level<6?s=1:i.level===6?s=2:s=3,o|=s<<6,i.strstart!==0&&(o|=wc),o+=31-o%31,i.status=We,Qt(i,o),i.strstart!==0&&(Qt(i,e.adler>>>16),Qt(i,e.adler&65535)),e.adler=1;}if(i.status===An)if(i.gzhead.extra){for(n=i.pending;i.gzindex<(i.gzhead.extra.length&65535)&&!(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=Ie(e.adler,i.pending_buf,i.pending-n,n)),Fe(e),n=i.pending,i.pending===i.pending_buf_size));)R(i,i.gzhead.extra[i.gzindex]&255),i.gzindex++;i.gzhead.hcrc&&i.pending>n&&(e.adler=Ie(e.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=Hr);}else i.status=Hr;if(i.status===Hr)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=Ie(e.adler,i.pending_buf,i.pending-n,n)),Fe(e),n=i.pending,i.pending===i.pending_buf_size)){a=1;break}i.gzindex<i.gzhead.name.length?a=i.gzhead.name.charCodeAt(i.gzindex++)&255:a=0,R(i,a);}while(a!==0);i.gzhead.hcrc&&i.pending>n&&(e.adler=Ie(e.adler,i.pending_buf,i.pending-n,n)),a===0&&(i.gzindex=0,i.status=Zr);}else i.status=Zr;if(i.status===Zr)if(i.gzhead.comment){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=Ie(e.adler,i.pending_buf,i.pending-n,n)),Fe(e),n=i.pending,i.pending===i.pending_buf_size)){a=1;break}i.gzindex<i.gzhead.comment.length?a=i.gzhead.comment.charCodeAt(i.gzindex++)&255:a=0,R(i,a);}while(a!==0);i.gzhead.hcrc&&i.pending>n&&(e.adler=Ie(e.adler,i.pending_buf,i.pending-n,n)),a===0&&(i.status=Wr);}else i.status=Wr;if(i.status===Wr&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&Fe(e),i.pending+2<=i.pending_buf_size&&(R(i,e.adler&255),R(i,e.adler>>8&255),e.adler=0,i.status=We)):i.status=We),i.pending!==0){if(Fe(e),e.avail_out===0)return i.last_flush=-1,pe}else if(e.avail_in===0&&Is(t)<=Is(r)&&t!==ze)return Ne(e,kn);if(i.status===er&&e.avail_in!==0)return Ne(e,kn);if(e.avail_in!==0||i.lookahead!==0||t!==Ve&&i.status!==er){var u=i.strategy===Ur?Tc(i,t):i.strategy===lc?kc(i,t):_t[i.level].func(i,t);if((u===Je||u===yt)&&(i.status=er),u===B||u===Je)return e.avail_out===0&&(i.last_flush=-1),pe;if(u===tr&&(t===ic?te._tr_align(i):t!==Os&&(te._tr_stored_block(i,0,0,false),t===nc&&(je(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),Fe(e),e.avail_out===0))return i.last_flush=-1,pe}return t!==ze?pe:i.wrap<=0?Ds:(i.wrap===2?(R(i,e.adler&255),R(i,e.adler>>8&255),R(i,e.adler>>16&255),R(i,e.adler>>24&255),R(i,e.total_in&255),R(i,e.total_in>>8&255),R(i,e.total_in>>16&255),R(i,e.total_in>>24&255)):(Qt(i,e.adler>>>16),Qt(i,e.adler&65535)),Fe(e),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?pe:Ds)}function Dc(e){var t;return !e||!e.state?re:(t=e.state.status,t!==$r&&t!==An&&t!==Hr&&t!==Zr&&t!==Wr&&t!==We&&t!==er?Ne(e,re):(e.state=null,t===We?Ne(e,ac):pe))}function Ic(e,t){var r=t.length,i,n,a,o,s,u,l,f;if(!e||!e.state||(i=e.state,o=i.wrap,o===2||o===1&&i.status!==$r||i.lookahead))return re;for(o===1&&(e.adler=Fs(e.adler,t,r,0)),i.wrap=0,r>=i.w_size&&(o===0&&(je(i.head),i.strstart=0,i.block_start=0,i.insert=0),f=new X.Buf8(i.w_size),X.arraySet(f,t,r-i.w_size,i.w_size,0),t=f,r=i.w_size),s=e.avail_in,u=e.next_in,l=e.input,e.avail_in=r,e.next_in=0,e.input=t,$e(i);i.lookahead>=A;){n=i.strstart,a=i.lookahead-(A-1);do i.ins_h=(i.ins_h<<i.hash_shift^i.window[n+A-1])&i.hash_mask,i.prev[n&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=n,n++;while(--a);i.strstart=n,i.lookahead=A-1,$e(i);}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=A-1,i.match_available=0,e.next_in=u,e.input=l,e.avail_in=s,i.wrap=o,pe}ge.deflateInit=Lc;ge.deflateInit2=zs;ge.deflateReset=Ns;ge.deflateResetKeep=Ms;ge.deflateSetHeader=Rc;ge.deflate=Oc;ge.deflateEnd=Dc;ge.deflateSetDictionary=Ic;ge.deflateInfo="pako deflate (from Nodeca project)";});var Rn=v(wt=>{var Vr=Se(),Bs=true,qs=true;try{String.fromCharCode.apply(null,[0]);}catch{Bs=false;}try{String.fromCharCode.apply(null,new Uint8Array(1));}catch{qs=false;}var rr=new Vr.Buf8(256);for(Te=0;Te<256;Te++)rr[Te]=Te>=252?6:Te>=248?5:Te>=240?4:Te>=224?3:Te>=192?2:1;var Te;rr[254]=rr[254]=1;wt.string2buf=function(e){var t,r,i,n,a,o=e.length,s=0;for(n=0;n<o;n++)r=e.charCodeAt(n),(r&64512)===55296&&n+1<o&&(i=e.charCodeAt(n+1),(i&64512)===56320&&(r=65536+(r-55296<<10)+(i-56320),n++)),s+=r<128?1:r<2048?2:r<65536?3:4;for(t=new Vr.Buf8(s),a=0,n=0;a<s;n++)r=e.charCodeAt(n),(r&64512)===55296&&n+1<o&&(i=e.charCodeAt(n+1),(i&64512)===56320&&(r=65536+(r-55296<<10)+(i-56320),n++)),r<128?t[a++]=r:r<2048?(t[a++]=192|r>>>6,t[a++]=128|r&63):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|r&63):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|r&63);return t};function Us(e,t){if(t<65534&&(e.subarray&&qs||!e.subarray&&Bs))return String.fromCharCode.apply(null,Vr.shrinkBuf(e,t));for(var r="",i=0;i<t;i++)r+=String.fromCharCode(e[i]);return r}wt.buf2binstring=function(e){return Us(e,e.length)};wt.binstring2buf=function(e){for(var t=new Vr.Buf8(e.length),r=0,i=t.length;r<i;r++)t[r]=e.charCodeAt(r);return t};wt.buf2string=function(e,t){var r,i,n,a,o=t||e.length,s=new Array(o*2);for(i=0,r=0;r<o;){if(n=e[r++],n<128){s[i++]=n;continue}if(a=rr[n],a>4){s[i++]=65533,r+=a-1;continue}for(n&=a===2?31:a===3?15:7;a>1&&r<o;)n=n<<6|e[r++]&63,a--;if(a>1){s[i++]=65533;continue}n<65536?s[i++]=n:(n-=65536,s[i++]=55296|n>>10&1023,s[i++]=56320|n&1023);}return Us(s,i)};wt.utf8border=function(e,t){var r;for(t=t||e.length,t>e.length&&(t=e.length),r=t-1;r>=0&&(e[r]&192)===128;)r--;return r<0||r===0?t:r+rr[e[r]]>t?r:t};});var Ln=v((mm,Hs)=>{function Fc(){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;}Hs.exports=Fc;});var $s=v(ar=>{var ir=Ps(),nr=Se(),Dn=Rn(),In=qr(),jc=Ln(),Js=Object.prototype.toString,Mc=0,On=4,xt=0,Zs=1,Ws=2,Nc=-1,zc=0,Pc=8;function Xe(e){if(!(this instanceof Xe))return new Xe(e);this.options=nr.assign({level:Nc,method:Pc,chunkSize:16384,windowBits:15,memLevel:8,strategy:zc,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=false,this.chunks=[],this.strm=new jc,this.strm.avail_out=0;var r=ir.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==xt)throw new Error(In[r]);if(t.header&&ir.deflateSetHeader(this.strm,t.header),t.dictionary){var i;if(typeof t.dictionary=="string"?i=Dn.string2buf(t.dictionary):Js.call(t.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(t.dictionary):i=t.dictionary,r=ir.deflateSetDictionary(this.strm,i),r!==xt)throw new Error(In[r]);this._dict_set=true;}}Xe.prototype.push=function(e,t){var r=this.strm,i=this.options.chunkSize,n,a;if(this.ended)return false;a=t===~~t?t:t===true?On:Mc,typeof e=="string"?r.input=Dn.string2buf(e):Js.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new nr.Buf8(i),r.next_out=0,r.avail_out=i),n=ir.deflate(r,a),n!==Zs&&n!==xt)return this.onEnd(n),this.ended=true,false;(r.avail_out===0||r.avail_in===0&&(a===On||a===Ws))&&(this.options.to==="string"?this.onData(Dn.buf2binstring(nr.shrinkBuf(r.output,r.next_out))):this.onData(nr.shrinkBuf(r.output,r.next_out)));}while((r.avail_in>0||r.avail_out===0)&&n!==Zs);return a===On?(n=ir.deflateEnd(this.strm),this.onEnd(n),this.ended=true,n===xt):(a===Ws&&(this.onEnd(xt),r.avail_out=0),true)};Xe.prototype.onData=function(e){this.chunks.push(e);};Xe.prototype.onEnd=function(e){e===xt&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=nr.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg;};function Fn(e,t){var r=new Xe(t);if(r.push(e,true),r.err)throw r.msg||In[r.err];return r.result}function Bc(e,t){return t=t||{},t.raw=true,Fn(e,t)}function qc(e,t){return t=t||{},t.gzip=true,Fn(e,t)}ar.Deflate=Xe;ar.deflate=Fn;ar.deflateRaw=Bc;ar.gzip=qc;});var Xs=v((bm,Vs)=>{var Xr=30,Uc=12;Vs.exports=function(t,r){var i,n,a,o,s,u,l,f,c,d,h,w,b,_,p,g,x,m,y,T,k,S,C,D,E;i=t.state,n=t.next_in,D=t.input,a=n+(t.avail_in-5),o=t.next_out,E=t.output,s=o-(r-t.avail_out),u=o+(t.avail_out-257),l=i.dmax,f=i.wsize,c=i.whave,d=i.wnext,h=i.window,w=i.hold,b=i.bits,_=i.lencode,p=i.distcode,g=(1<<i.lenbits)-1,x=(1<<i.distbits)-1;e:do{b<15&&(w+=D[n++]<<b,b+=8,w+=D[n++]<<b,b+=8),m=_[w&g];t:for(;;){if(y=m>>>24,w>>>=y,b-=y,y=m>>>16&255,y===0)E[o++]=m&65535;else if(y&16){T=m&65535,y&=15,y&&(b<y&&(w+=D[n++]<<b,b+=8),T+=w&(1<<y)-1,w>>>=y,b-=y),b<15&&(w+=D[n++]<<b,b+=8,w+=D[n++]<<b,b+=8),m=p[w&x];r:for(;;){if(y=m>>>24,w>>>=y,b-=y,y=m>>>16&255,y&16){if(k=m&65535,y&=15,b<y&&(w+=D[n++]<<b,b+=8,b<y&&(w+=D[n++]<<b,b+=8)),k+=w&(1<<y)-1,k>l){t.msg="invalid distance too far back",i.mode=Xr;break e}if(w>>>=y,b-=y,y=o-s,k>y){if(y=k-y,y>c&&i.sane){t.msg="invalid distance too far back",i.mode=Xr;break e}if(S=0,C=h,d===0){if(S+=f-y,y<T){T-=y;do E[o++]=h[S++];while(--y);S=o-k,C=E;}}else if(d<y){if(S+=f+d-y,y-=d,y<T){T-=y;do E[o++]=h[S++];while(--y);if(S=0,d<T){y=d,T-=y;do E[o++]=h[S++];while(--y);S=o-k,C=E;}}}else if(S+=d-y,y<T){T-=y;do E[o++]=h[S++];while(--y);S=o-k,C=E;}for(;T>2;)E[o++]=C[S++],E[o++]=C[S++],E[o++]=C[S++],T-=3;T&&(E[o++]=C[S++],T>1&&(E[o++]=C[S++]));}else {S=o-k;do E[o++]=E[S++],E[o++]=E[S++],E[o++]=E[S++],T-=3;while(T>2);T&&(E[o++]=E[S++],T>1&&(E[o++]=E[S++]));}}else if((y&64)===0){m=p[(m&65535)+(w&(1<<y)-1)];continue r}else {t.msg="invalid distance code",i.mode=Xr;break e}break}}else if((y&64)===0){m=_[(m&65535)+(w&(1<<y)-1)];continue t}else if(y&32){i.mode=Uc;break e}else {t.msg="invalid literal/length code",i.mode=Xr;break e}break}}while(n<a&&o<u);T=b>>3,n-=T,b-=T<<3,w&=(1<<b)-1,t.next_in=n,t.next_out=o,t.avail_in=n<a?5+(a-n):5-(n-a),t.avail_out=o<u?257+(u-o):257-(o-u),i.hold=w,i.bits=b;};});var rl=v((_m,tl)=>{var Ys=Se(),Et=15,Ks=852,Gs=592,Qs=0,jn=1,el=2,Hc=[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],Zc=[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],Wc=[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],Jc=[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];tl.exports=function(t,r,i,n,a,o,s,u){var l=u.bits,f=0,c=0,d=0,h=0,w=0,b=0,_=0,p=0,g=0,x=0,m,y,T,k,S,C=null,D=0,E,K=new Ys.Buf16(Et+1),et=new Ys.Buf16(Et+1),hr=null,ha=0,ca,cr,pr;for(f=0;f<=Et;f++)K[f]=0;for(c=0;c<n;c++)K[r[i+c]]++;for(w=l,h=Et;h>=1&&K[h]===0;h--);if(w>h&&(w=h),h===0)return a[o++]=1<<24|64<<16|0,a[o++]=1<<24|64<<16|0,u.bits=1,0;for(d=1;d<h&&K[d]===0;d++);for(w<d&&(w=d),p=1,f=1;f<=Et;f++)if(p<<=1,p-=K[f],p<0)return -1;if(p>0&&(t===Qs||h!==1))return -1;for(et[1]=0,f=1;f<Et;f++)et[f+1]=et[f]+K[f];for(c=0;c<n;c++)r[i+c]!==0&&(s[et[r[i+c]]++]=c);if(t===Qs?(C=hr=s,E=19):t===jn?(C=Hc,D-=257,hr=Zc,ha-=257,E=256):(C=Wc,hr=Jc,E=-1),x=0,c=0,f=d,S=o,b=w,_=0,T=-1,g=1<<w,k=g-1,t===jn&&g>Ks||t===el&&g>Gs)return 1;for(;;){ca=f-_,s[c]<E?(cr=0,pr=s[c]):s[c]>E?(cr=hr[ha+s[c]],pr=C[D+s[c]]):(cr=96,pr=0),m=1<<f-_,y=1<<b,d=y;do y-=m,a[S+(x>>_)+y]=ca<<24|cr<<16|pr|0;while(y!==0);for(m=1<<f-1;x&m;)m>>=1;if(m!==0?(x&=m-1,x+=m):x=0,c++,--K[f]===0){if(f===h)break;f=r[i+s[c]];}if(f>w&&(x&k)!==T){for(_===0&&(_=w),S+=d,b=f-_,p=1<<b;b+_<h&&(p-=K[b+_],!(p<=0));)b++,p<<=1;if(g+=1<<b,t===jn&&g>Ks||t===el&&g>Gs)return 1;T=x&k,a[T]=w<<24|b<<16|S-o|0;}}return x!==0&&(a[S+x]=f-_<<24|64<<16|0),u.bits=w,0};});var Nl=v(se=>{var ee=Se(),qn=En(),me=Sn(),$c=Xs(),or=rl(),Vc=0,Al=1,Rl=2,il=4,Xc=5,Yr=6,Ye=0,Yc=1,Kc=2,ie=-2,Ll=-3,Un=-4,Gc=-5,nl=8,Ol=1,al=2,ol=3,sl=4,ll=5,fl=6,ul=7,dl=8,hl=9,cl=10,Qr=11,Ce=12,Mn=13,pl=14,Nn=15,gl=16,ml=17,vl=18,bl=19,Kr=20,Gr=21,_l=22,yl=23,wl=24,xl=25,El=26,zn=27,Sl=28,kl=29,F=30,Hn=31,Qc=32,ep=852,tp=592,rp=15,ip=rp;function Tl(e){return (e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function np(){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 ee.Buf16(320),this.work=new ee.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0;}function Dl(e){var t;return !e||!e.state?ie:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=Ol,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new ee.Buf32(ep),t.distcode=t.distdyn=new ee.Buf32(tp),t.sane=1,t.back=-1,Ye)}function Il(e){var t;return !e||!e.state?ie:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,Dl(e))}function Fl(e,t){var r,i;return !e||!e.state||(i=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?ie:(i.window!==null&&i.wbits!==t&&(i.window=null),i.wrap=r,i.wbits=t,Il(e))}function jl(e,t){var r,i;return e?(i=new np,e.state=i,i.window=null,r=Fl(e,t),r!==Ye&&(e.state=null),r):ie}function ap(e){return jl(e,ip)}var Cl=true,Pn,Bn;function op(e){if(Cl){var t;for(Pn=new ee.Buf32(512),Bn=new ee.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(or(Al,e.lens,0,288,Pn,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;or(Rl,e.lens,0,32,Bn,0,e.work,{bits:5}),Cl=false;}e.lencode=Pn,e.lenbits=9,e.distcode=Bn,e.distbits=5;}function Ml(e,t,r,i){var n,a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new ee.Buf8(a.wsize)),i>=a.wsize?(ee.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(n=a.wsize-a.wnext,n>i&&(n=i),ee.arraySet(a.window,t,r-i,n,a.wnext),i-=n,i?(ee.arraySet(a.window,t,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=n,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=n))),0}function sp(e,t){var r,i,n,a,o,s,u,l,f,c,d,h,w,b,_=0,p,g,x,m,y,T,k,S,C=new ee.Buf8(4),D,E,K=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return ie;r=e.state,r.mode===Ce&&(r.mode=Mn),o=e.next_out,n=e.output,u=e.avail_out,a=e.next_in,i=e.input,s=e.avail_in,l=r.hold,f=r.bits,c=s,d=u,S=Ye;e:for(;;)switch(r.mode){case Ol:if(r.wrap===0){r.mode=Mn;break}for(;f<16;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(r.wrap&2&&l===35615){r.check=0,C[0]=l&255,C[1]=l>>>8&255,r.check=me(r.check,C,2,0),l=0,f=0,r.mode=al;break}if(r.flags=0,r.head&&(r.head.done=false),!(r.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",r.mode=F;break}if((l&15)!==nl){e.msg="unknown compression method",r.mode=F;break}if(l>>>=4,f-=4,k=(l&15)+8,r.wbits===0)r.wbits=k;else if(k>r.wbits){e.msg="invalid window size",r.mode=F;break}r.dmax=1<<k,e.adler=r.check=1,r.mode=l&512?cl:Ce,l=0,f=0;break;case al:for(;f<16;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(r.flags=l,(r.flags&255)!==nl){e.msg="unknown compression method",r.mode=F;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=F;break}r.head&&(r.head.text=l>>8&1),r.flags&512&&(C[0]=l&255,C[1]=l>>>8&255,r.check=me(r.check,C,2,0)),l=0,f=0,r.mode=ol;case ol:for(;f<32;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}r.head&&(r.head.time=l),r.flags&512&&(C[0]=l&255,C[1]=l>>>8&255,C[2]=l>>>16&255,C[3]=l>>>24&255,r.check=me(r.check,C,4,0)),l=0,f=0,r.mode=sl;case sl:for(;f<16;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}r.head&&(r.head.xflags=l&255,r.head.os=l>>8),r.flags&512&&(C[0]=l&255,C[1]=l>>>8&255,r.check=me(r.check,C,2,0)),l=0,f=0,r.mode=ll;case ll:if(r.flags&1024){for(;f<16;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}r.length=l,r.head&&(r.head.extra_len=l),r.flags&512&&(C[0]=l&255,C[1]=l>>>8&255,r.check=me(r.check,C,2,0)),l=0,f=0;}else r.head&&(r.head.extra=null);r.mode=fl;case fl:if(r.flags&1024&&(h=r.length,h>s&&(h=s),h&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),ee.arraySet(r.head.extra,i,a,h,k)),r.flags&512&&(r.check=me(r.check,i,h,a)),s-=h,a+=h,r.length-=h),r.length))break e;r.length=0,r.mode=ul;case ul:if(r.flags&2048){if(s===0)break e;h=0;do k=i[a+h++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k));while(k&&h<s);if(r.flags&512&&(r.check=me(r.check,i,h,a)),s-=h,a+=h,k)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=dl;case dl:if(r.flags&4096){if(s===0)break e;h=0;do k=i[a+h++],r.head&&k&&r.length<65536&&(r.head.comment+=String.fromCharCode(k));while(k&&h<s);if(r.flags&512&&(r.check=me(r.check,i,h,a)),s-=h,a+=h,k)break e}else r.head&&(r.head.comment=null);r.mode=hl;case hl:if(r.flags&512){for(;f<16;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(l!==(r.check&65535)){e.msg="header crc mismatch",r.mode=F;break}l=0,f=0;}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=true),e.adler=r.check=0,r.mode=Ce;break;case cl:for(;f<32;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}e.adler=r.check=Tl(l),l=0,f=0,r.mode=Qr;case Qr:if(r.havedict===0)return e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,r.hold=l,r.bits=f,Kc;e.adler=r.check=1,r.mode=Ce;case Ce:if(t===Xc||t===Yr)break e;case Mn:if(r.last){l>>>=f&7,f-=f&7,r.mode=zn;break}for(;f<3;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}switch(r.last=l&1,l>>>=1,f-=1,l&3){case 0:r.mode=pl;break;case 1:if(op(r),r.mode=Kr,t===Yr){l>>>=2,f-=2;break e}break;case 2:r.mode=ml;break;case 3:e.msg="invalid block type",r.mode=F;}l>>>=2,f-=2;break;case pl:for(l>>>=f&7,f-=f&7;f<32;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",r.mode=F;break}if(r.length=l&65535,l=0,f=0,r.mode=Nn,t===Yr)break e;case Nn:r.mode=gl;case gl:if(h=r.length,h){if(h>s&&(h=s),h>u&&(h=u),h===0)break e;ee.arraySet(n,i,a,h,o),s-=h,a+=h,u-=h,o+=h,r.length-=h;break}r.mode=Ce;break;case ml:for(;f<14;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(r.nlen=(l&31)+257,l>>>=5,f-=5,r.ndist=(l&31)+1,l>>>=5,f-=5,r.ncode=(l&15)+4,l>>>=4,f-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=F;break}r.have=0,r.mode=vl;case vl:for(;r.have<r.ncode;){for(;f<3;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}r.lens[K[r.have++]]=l&7,l>>>=3,f-=3;}for(;r.have<19;)r.lens[K[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,D={bits:r.lenbits},S=or(Vc,r.lens,0,19,r.lencode,0,r.work,D),r.lenbits=D.bits,S){e.msg="invalid code lengths set",r.mode=F;break}r.have=0,r.mode=bl;case bl:for(;r.have<r.nlen+r.ndist;){for(;_=r.lencode[l&(1<<r.lenbits)-1],p=_>>>24,g=_>>>16&255,x=_&65535,!(p<=f);){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(x<16)l>>>=p,f-=p,r.lens[r.have++]=x;else {if(x===16){for(E=p+2;f<E;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(l>>>=p,f-=p,r.have===0){e.msg="invalid bit length repeat",r.mode=F;break}k=r.lens[r.have-1],h=3+(l&3),l>>>=2,f-=2;}else if(x===17){for(E=p+3;f<E;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}l>>>=p,f-=p,k=0,h=3+(l&7),l>>>=3,f-=3;}else {for(E=p+7;f<E;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}l>>>=p,f-=p,k=0,h=11+(l&127),l>>>=7,f-=7;}if(r.have+h>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=F;break}for(;h--;)r.lens[r.have++]=k;}}if(r.mode===F)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=F;break}if(r.lenbits=9,D={bits:r.lenbits},S=or(Al,r.lens,0,r.nlen,r.lencode,0,r.work,D),r.lenbits=D.bits,S){e.msg="invalid literal/lengths set",r.mode=F;break}if(r.distbits=6,r.distcode=r.distdyn,D={bits:r.distbits},S=or(Rl,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,D),r.distbits=D.bits,S){e.msg="invalid distances set",r.mode=F;break}if(r.mode=Kr,t===Yr)break e;case Kr:r.mode=Gr;case Gr:if(s>=6&&u>=258){e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,r.hold=l,r.bits=f,$c(e,d),o=e.next_out,n=e.output,u=e.avail_out,a=e.next_in,i=e.input,s=e.avail_in,l=r.hold,f=r.bits,r.mode===Ce&&(r.back=-1);break}for(r.back=0;_=r.lencode[l&(1<<r.lenbits)-1],p=_>>>24,g=_>>>16&255,x=_&65535,!(p<=f);){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(g&&(g&240)===0){for(m=p,y=g,T=x;_=r.lencode[T+((l&(1<<m+y)-1)>>m)],p=_>>>24,g=_>>>16&255,x=_&65535,!(m+p<=f);){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}l>>>=m,f-=m,r.back+=m;}if(l>>>=p,f-=p,r.back+=p,r.length=x,g===0){r.mode=El;break}if(g&32){r.back=-1,r.mode=Ce;break}if(g&64){e.msg="invalid literal/length code",r.mode=F;break}r.extra=g&15,r.mode=_l;case _l:if(r.extra){for(E=r.extra;f<E;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}r.length+=l&(1<<r.extra)-1,l>>>=r.extra,f-=r.extra,r.back+=r.extra;}r.was=r.length,r.mode=yl;case yl:for(;_=r.distcode[l&(1<<r.distbits)-1],p=_>>>24,g=_>>>16&255,x=_&65535,!(p<=f);){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if((g&240)===0){for(m=p,y=g,T=x;_=r.distcode[T+((l&(1<<m+y)-1)>>m)],p=_>>>24,g=_>>>16&255,x=_&65535,!(m+p<=f);){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}l>>>=m,f-=m,r.back+=m;}if(l>>>=p,f-=p,r.back+=p,g&64){e.msg="invalid distance code",r.mode=F;break}r.offset=x,r.extra=g&15,r.mode=wl;case wl:if(r.extra){for(E=r.extra;f<E;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}r.offset+=l&(1<<r.extra)-1,l>>>=r.extra,f-=r.extra,r.back+=r.extra;}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=F;break}r.mode=xl;case xl:if(u===0)break e;if(h=d-u,r.offset>h){if(h=r.offset-h,h>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=F;break}h>r.wnext?(h-=r.wnext,w=r.wsize-h):w=r.wnext-h,h>r.length&&(h=r.length),b=r.window;}else b=n,w=o-r.offset,h=r.length;h>u&&(h=u),u-=h,r.length-=h;do n[o++]=b[w++];while(--h);r.length===0&&(r.mode=Gr);break;case El:if(u===0)break e;n[o++]=r.length,u--,r.mode=Gr;break;case zn:if(r.wrap){for(;f<32;){if(s===0)break e;s--,l|=i[a++]<<f,f+=8;}if(d-=u,e.total_out+=d,r.total+=d,d&&(e.adler=r.check=r.flags?me(r.check,n,d,o-d):qn(r.check,n,d,o-d)),d=u,(r.flags?l:Tl(l))!==r.check){e.msg="incorrect data check",r.mode=F;break}l=0,f=0;}r.mode=Sl;case Sl:if(r.wrap&&r.flags){for(;f<32;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(l!==(r.total&4294967295)){e.msg="incorrect length check",r.mode=F;break}l=0,f=0;}r.mode=kl;case kl:S=Yc;break e;case F:S=Ll;break e;case Hn:return Un;case Qc:default:return ie}return e.next_out=o,e.avail_out=u,e.next_in=a,e.avail_in=s,r.hold=l,r.bits=f,(r.wsize||d!==e.avail_out&&r.mode<F&&(r.mode<zn||t!==il))&&Ml(e,e.output,e.next_out,d-e.avail_out)?(r.mode=Hn,Un):(c-=e.avail_in,d-=e.avail_out,e.total_in+=c,e.total_out+=d,r.total+=d,r.wrap&&d&&(e.adler=r.check=r.flags?me(r.check,n,d,e.next_out-d):qn(r.check,n,d,e.next_out-d)),e.data_type=r.bits+(r.last?64:0)+(r.mode===Ce?128:0)+(r.mode===Kr||r.mode===Nn?256:0),(c===0&&d===0||t===il)&&S===Ye&&(S=Gc),S)}function lp(e){if(!e||!e.state)return ie;var t=e.state;return t.window&&(t.window=null),e.state=null,Ye}function fp(e,t){var r;return !e||!e.state||(r=e.state,(r.wrap&2)===0)?ie:(r.head=t,t.done=false,Ye)}function up(e,t){var r=t.length,i,n,a;return !e||!e.state||(i=e.state,i.wrap!==0&&i.mode!==Qr)?ie:i.mode===Qr&&(n=1,n=qn(n,t,r,0),n!==i.check)?Ll:(a=Ml(e,t,r,r),a?(i.mode=Hn,Un):(i.havedict=1,Ye))}se.inflateReset=Il;se.inflateReset2=Fl;se.inflateResetKeep=Dl;se.inflateInit=ap;se.inflateInit2=jl;se.inflate=sp;se.inflateEnd=lp;se.inflateGetHeader=fp;se.inflateSetDictionary=up;se.inflateInfo="pako inflate (from Nodeca project)";});var Zn=v((wm,zl)=>{zl.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_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};});var Bl=v((xm,Pl)=>{function dp(){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;}Pl.exports=dp;});var Ul=v(lr=>{var St=Nl(),sr=Se(),ei=Rn(),M=Zn(),Wn=qr(),hp=Ln(),cp=Bl(),ql=Object.prototype.toString;function Ke(e){if(!(this instanceof Ke))return new Ke(e);this.options=sr.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15)===0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=false,this.chunks=[],this.strm=new hp,this.strm.avail_out=0;var r=St.inflateInit2(this.strm,t.windowBits);if(r!==M.Z_OK)throw new Error(Wn[r]);if(this.header=new cp,St.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=ei.string2buf(t.dictionary):ql.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=St.inflateSetDictionary(this.strm,t.dictionary),r!==M.Z_OK)))throw new Error(Wn[r])}Ke.prototype.push=function(e,t){var r=this.strm,i=this.options.chunkSize,n=this.options.dictionary,a,o,s,u,l,f=false;if(this.ended)return false;o=t===~~t?t:t===true?M.Z_FINISH:M.Z_NO_FLUSH,typeof e=="string"?r.input=ei.binstring2buf(e):ql.call(e)==="[object ArrayBuffer]"?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(r.avail_out===0&&(r.output=new sr.Buf8(i),r.next_out=0,r.avail_out=i),a=St.inflate(r,M.Z_NO_FLUSH),a===M.Z_NEED_DICT&&n&&(a=St.inflateSetDictionary(this.strm,n)),a===M.Z_BUF_ERROR&&f===true&&(a=M.Z_OK,f=false),a!==M.Z_STREAM_END&&a!==M.Z_OK)return this.onEnd(a),this.ended=true,false;r.next_out&&(r.avail_out===0||a===M.Z_STREAM_END||r.avail_in===0&&(o===M.Z_FINISH||o===M.Z_SYNC_FLUSH))&&(this.options.to==="string"?(s=ei.utf8border(r.output,r.next_out),u=r.next_out-s,l=ei.buf2string(r.output,s),r.next_out=u,r.avail_out=i-u,u&&sr.arraySet(r.output,r.output,s,u,0),this.onData(l)):this.onData(sr.shrinkBuf(r.output,r.next_out))),r.avail_in===0&&r.avail_out===0&&(f=true);}while((r.avail_in>0||r.avail_out===0)&&a!==M.Z_STREAM_END);return a===M.Z_STREAM_END&&(o=M.Z_FINISH),o===M.Z_FINISH?(a=St.inflateEnd(this.strm),this.onEnd(a),this.ended=true,a===M.Z_OK):(o===M.Z_SYNC_FLUSH&&(this.onEnd(M.Z_OK),r.avail_out=0),true)};Ke.prototype.onData=function(e){this.chunks.push(e);};Ke.prototype.onEnd=function(e){e===M.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=sr.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg;};function Jn(e,t){var r=new Ke(t);if(r.push(e,true),r.err)throw r.msg||Wn[r.err];return r.result}function pp(e,t){return t=t||{},t.raw=true,Jn(e,t)}lr.Inflate=Ke;lr.inflate=Jn;lr.inflateRaw=pp;lr.ungzip=Jn;});var Wl=v((Sm,Zl)=>{var gp=Se().assign,mp=$s(),vp=Ul(),bp=Zn(),Hl={};gp(Hl,mp,vp,bp);Zl.exports=Hl;});var $l=v(ri=>{var _p=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",yp=Wl(),Jl=j(),ti=Q(),wp=_p?"uint8array":"array";ri.magic="\b\0";function Ge(e,t){ti.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={};}Jl.inherits(Ge,ti);Ge.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(Jl.transformTo(wp,e.data),false);};Ge.prototype.flush=function(){ti.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],true);};Ge.prototype.cleanUp=function(){ti.prototype.cleanUp.call(this),this._pako=null;};Ge.prototype._createPako=function(){this._pako=new yp[this._pakoAction]({raw:true,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta});};};ri.compressWorker=function(e){return new Ge("Deflate",e)};ri.uncompressWorker=function(){return new Ge("Inflate",{})};});var Vn=v($n=>{var Vl=Q();$n.STORE={magic:"\0\0",compressWorker:function(){return new Vl("STORE compression")},uncompressWorker:function(){return new Vl("STORE decompression")}};$n.DEFLATE=$l();});var Xn=v(Qe=>{Qe.LOCAL_FILE_HEADER="PK";Qe.CENTRAL_FILE_HEADER="PK";Qe.CENTRAL_DIRECTORY_END="PK";Qe.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07";Qe.ZIP64_CENTRAL_DIRECTORY_END="PK";Qe.DATA_DESCRIPTOR="PK\x07\b";});var Gl=v((Am,Kl)=>{var kt=j(),Tt=Q(),Yn=ct(),Xl=Mr(),ii=Xn(),O=function(e,t){var r="",i;for(i=0;i<t;i++)r+=String.fromCharCode(e&255),e=e>>>8;return r},xp=function(e,t){var r=e;return e||(r=t?16893:33204),(r&65535)<<16},Ep=function(e){return (e||0)&63},Yl=function(e,t,r,i,n,a){var o=e.file,s=e.compression,u=a!==Yn.utf8encode,l=kt.transformTo("string",a(o.name)),f=kt.transformTo("string",Yn.utf8encode(o.name)),c=o.comment,d=kt.transformTo("string",a(c)),h=kt.transformTo("string",Yn.utf8encode(c)),w=f.length!==o.name.length,b=h.length!==c.length,_,p,g="",x="",m="",y=o.dir,T=o.date,k={crc32:0,compressedSize:0,uncompressedSize:0};(!t||r)&&(k.crc32=e.crc32,k.compressedSize=e.compressedSize,k.uncompressedSize=e.uncompressedSize);var S=0;t&&(S|=8),!u&&(w||b)&&(S|=2048);var C=0,D=0;y&&(C|=16),n==="UNIX"?(D=798,C|=xp(o.unixPermissions,y)):(D=20,C|=Ep(o.dosPermissions)),_=T.getUTCHours(),_=_<<6,_=_|T.getUTCMinutes(),_=_<<5,_=_|T.getUTCSeconds()/2,p=T.getUTCFullYear()-1980,p=p<<4,p=p|T.getUTCMonth()+1,p=p<<5,p=p|T.getUTCDate(),w&&(x=O(1,1)+O(Xl(l),4)+f,g+="up"+O(x.length,2)+x),b&&(m=O(1,1)+O(Xl(d),4)+h,g+="uc"+O(m.length,2)+m);var E="";E+=`
2
+ \0`,E+=O(S,2),E+=s.magic,E+=O(_,2),E+=O(p,2),E+=O(k.crc32,4),E+=O(k.compressedSize,4),E+=O(k.uncompressedSize,4),E+=O(l.length,2),E+=O(g.length,2);var K=ii.LOCAL_FILE_HEADER+E+l+g,et=ii.CENTRAL_FILE_HEADER+O(D,2)+E+O(d.length,2)+"\0\0\0\0"+O(C,4)+O(i,4)+l+g+d;return {fileRecord:K,dirRecord:et}},Sp=function(e,t,r,i,n){var a="",o=kt.transformTo("string",n(i));return a=ii.CENTRAL_DIRECTORY_END+"\0\0\0\0"+O(e,2)+O(e,2)+O(t,4)+O(r,4)+O(o.length,2)+o,a},kp=function(e){var t="";return t=ii.DATA_DESCRIPTOR+O(e.crc32,4)+O(e.compressedSize,4)+O(e.uncompressedSize,4),t};function le(e,t,r,i){Tt.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=i,this.streamFiles=e,this.accumulate=false,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[];}kt.inherits(le,Tt);le.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,Tt.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-i-1))/r:100}}));};le.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=Yl(e,t,false,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}});}else this.accumulate=true;};le.prototype.closedSource=function(e){this.accumulate=false;var t=this.streamFiles&&!e.file.dir,r=Yl(e,t,true,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:kp(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null;};le.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var r=this.bytesWritten-e,i=Sp(this.dirRecords.length,r,e,this.zipComment,this.encodeFileName);this.push({data:i,meta:{percent:100}});};le.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume();};le.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",function(r){t.processChunk(r);}),e.on("end",function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end();}),e.on("error",function(r){t.error(r);}),this};le.prototype.resume=function(){if(!Tt.prototype.resume.call(this))return false;if(!this.previous&&this._sources.length)return this.prepareNextSource(),true;if(!this.previous&&!this._sources.length&&!this.generatedError)return this.end(),true};le.prototype.error=function(e){var t=this._sources;if(!Tt.prototype.error.call(this,e))return false;for(var r=0;r<t.length;r++)try{t[r].error(e);}catch{}return true};le.prototype.lock=function(){Tt.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock();};Kl.exports=le;});var ef=v(Ql=>{var Tp=Vn(),Cp=Gl(),Ap=function(e,t){var r=e||t,i=Tp[r];if(!i)throw new Error(r+" is not a valid compression method !");return i};Ql.generateWorker=function(e,t,r){var i=new Cp(t.streamFiles,r,t.platform,t.encodeFileName),n=0;try{e.forEach(function(a,o){n++;var s=Ap(o.options.compression,t.compression),u=o.options.compressionOptions||t.compressionOptions||{},l=o.dir,f=o.date;o._compressWorker(s,u).withStreamInfo("file",{name:a,dir:l,date:f,comment:o.comment||"",unixPermissions:o.unixPermissions,dosPermissions:o.dosPermissions}).pipe(i);}),i.entriesCount=n;}catch(a){i.error(a);}return i};});var rf=v((Lm,tf)=>{var Rp=j(),ni=Q();function fr(e,t){ni.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=false,this._bindStream(t);}Rp.inherits(fr,ni);fr.prototype._bindStream=function(e){var t=this;this._stream=e,e.pause(),e.on("data",function(r){t.push({data:r,meta:{percent:0}});}).on("error",function(r){t.isPaused?this.generatedError=r:t.error(r);}).on("end",function(){t.isPaused?t._upstreamEnded=true:t.end();});};fr.prototype.pause=function(){return ni.prototype.pause.call(this)?(this._stream.pause(),true):false};fr.prototype.resume=function(){return ni.prototype.resume.call(this)?(this._upstreamEnded?this.end():this._stream.resume(),true):false};tf.exports=fr;});var cf=v((Om,hf)=>{var Lp=ct(),ur=j(),sf=Q(),Op=en(),lf=tn(),nf=Nr(),Dp=ns(),Ip=ef(),af=Pt(),Fp=rf(),ff=function(e,t,r){var i=ur.getTypeOf(t),n,a=ur.extend(r||{},lf);a.date=a.date||new Date,a.compression!==null&&(a.compression=a.compression.toUpperCase()),typeof a.unixPermissions=="string"&&(a.unixPermissions=parseInt(a.unixPermissions,8)),a.unixPermissions&&a.unixPermissions&16384&&(a.dir=true),a.dosPermissions&&a.dosPermissions&16&&(a.dir=true),a.dir&&(e=uf(e)),a.createFolders&&(n=jp(e))&&df.call(this,n,true);var o=i==="string"&&a.binary===false&&a.base64===false;(!r||typeof r.binary>"u")&&(a.binary=!o);var s=t instanceof nf&&t.uncompressedSize===0;(s||a.dir||!t||t.length===0)&&(a.base64=false,a.binary=true,t="",a.compression="STORE",i="string");var u=null;t instanceof nf||t instanceof sf?u=t:af.isNode&&af.isStream(t)?u=new Fp(e,t):u=ur.prepareContent(e,t,a.binary,a.optimizedBinaryString,a.base64);var l=new Dp(e,u,a);this.files[e]=l;},jp=function(e){e.slice(-1)==="/"&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return t>0?e.substring(0,t):""},uf=function(e){return e.slice(-1)!=="/"&&(e+="/"),e},df=function(e,t){return t=typeof t<"u"?t:lf.createFolders,e=uf(e),this.files[e]||ff.call(this,e,null,{dir:true,createFolders:t}),this.files[e]};function of(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var Mp={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,i;for(t in this.files)i=this.files[t],r=t.slice(this.root.length,t.length),r&&t.slice(0,this.root.length)===this.root&&e(r,i);},filter:function(e){var t=[];return this.forEach(function(r,i){e(r,i)&&t.push(i);}),t},file:function(e,t,r){if(arguments.length===1)if(of(e)){var i=e;return this.filter(function(a,o){return !o.dir&&i.test(a)})}else {var n=this.files[this.root+e];return n&&!n.dir?n:null}else e=this.root+e,ff.call(this,e,t,r);return this},folder:function(e){if(!e)return this;if(of(e))return this.filter(function(n,a){return a.dir&&e.test(n)});var t=this.root+e,r=df.call(this,t),i=this.clone();return i.root=r.name,i},remove:function(e){e=this.root+e;var t=this.files[e];if(t||(e.slice(-1)!=="/"&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var r=this.filter(function(n,a){return a.name.slice(0,e.length)===e}),i=0;i<r.length;i++)delete this.files[r[i].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,r={};try{if(r=ur.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:Lp.utf8encode}),r.type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),r.type==="binarystring"&&(r.type="string"),!r.type)throw new Error("No output type specified.");ur.checkSupport(r.type),(r.platform==="darwin"||r.platform==="freebsd"||r.platform==="linux"||r.platform==="sunos")&&(r.platform="UNIX"),r.platform==="win32"&&(r.platform="DOS");var i=r.comment||this.comment||"";t=Ip.generateWorker(this,r,i);}catch(n){t=new sf("error"),t.error(n);}return new Op(t,r.type||"string",r.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return e=e||{},e.type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};hf.exports=Mp;});var Kn=v((Dm,gf)=>{var Np=j();function pf(e){this.data=e,this.length=e.length,this.index=0,this.zero=0;}pf.prototype={checkOffset:function(e){this.checkIndex(this.index+e);},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e;},skip:function(e){this.setIndex(this.index+e);},byteAt:function(){},readInt:function(e){var t=0,r;for(this.checkOffset(e),r=this.index+e-1;r>=this.index;r--)t=(t<<8)+this.byteAt(r);return this.index+=e,t},readString:function(e){return Np.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC((e>>25&127)+1980,(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(e&31)<<1))}};gf.exports=pf;});var Gn=v((Im,vf)=>{var mf=Kn(),zp=j();function Ct(e){mf.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=e[t]&255;}zp.inherits(Ct,mf);Ct.prototype.byteAt=function(e){return this.data[this.zero+e]};Ct.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2),n=e.charCodeAt(3),a=this.length-4;a>=0;--a)if(this.data[a]===t&&this.data[a+1]===r&&this.data[a+2]===i&&this.data[a+3]===n)return a-this.zero;return -1};Ct.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2),n=e.charCodeAt(3),a=this.readData(4);return t===a[0]&&r===a[1]&&i===a[2]&&n===a[3]};Ct.prototype.readData=function(e){if(this.checkOffset(e),e===0)return [];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};vf.exports=Ct;});var yf=v((Fm,_f)=>{var bf=Kn(),Pp=j();function At(e){bf.call(this,e);}Pp.inherits(At,bf);At.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)};At.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero};At.prototype.readAndCheckSignature=function(e){var t=this.readData(4);return e===t};At.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};_f.exports=At;});var ea=v((jm,xf)=>{var wf=Gn(),Bp=j();function Qn(e){wf.call(this,e);}Bp.inherits(Qn,wf);Qn.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};xf.exports=Qn;});var kf=v((Mm,Sf)=>{var Ef=ea(),qp=j();function ta(e){Ef.call(this,e);}qp.inherits(ta,Ef);ta.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t};Sf.exports=ta;});var ra=v((Nm,Cf)=>{var ai=j(),Tf=xe(),Up=Gn(),Hp=yf(),Zp=kf(),Wp=ea();Cf.exports=function(e){var t=ai.getTypeOf(e);return ai.checkSupport(t),t==="string"&&!Tf.uint8array?new Hp(e):t==="nodebuffer"?new Zp(e):Tf.uint8array?new Wp(ai.transformTo("uint8array",e)):new Up(ai.transformTo("array",e))};});var Of=v((zm,Lf)=>{var ia=ra(),Pe=j(),Jp=Nr(),Af=Mr(),oi=ct(),si=Vn(),$p=xe(),Vp=0,Xp=3,Yp=function(e){for(var t in si)if(Object.prototype.hasOwnProperty.call(si,t)&&si[t].magic===e)return si[t];return null};function Rf(e,t){this.options=e,this.loadOptions=t;}Rf.prototype={isEncrypted:function(){return (this.bitFlag&1)===1},useUTF8:function(){return (this.bitFlag&2048)===2048},readLocalPart:function(e){var t,r;if(e.skip(22),this.fileNameLength=e.readInt(2),r=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(r),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(t=Yp(this.compressionMethod),t===null)throw new Error("Corrupted zip : compression "+Pe.pretty(this.compressionMethod)+" unknown (inner file : "+Pe.transformTo("string",this.fileName)+")");this.decompressed=new Jp(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize));},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength);},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(this.externalFileAttributes&16),e===Vp&&(this.dosPermissions=this.externalFileAttributes&63),e===Xp&&(this.unixPermissions=this.externalFileAttributes>>16&65535),!this.dir&&this.fileNameStr.slice(-1)==="/"&&(this.dir=true);},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=ia(this.extraFields[1].value);this.uncompressedSize===Pe.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===Pe.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===Pe.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===Pe.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4));}},readExtraFields:function(e){var t=e.index+this.extraFieldsLength,r,i,n;for(this.extraFields||(this.extraFields={});e.index+4<t;)r=e.readInt(2),i=e.readInt(2),n=e.readData(i),this.extraFields[r]={id:r,length:i,value:n};e.setIndex(t);},handleUTF8:function(){var e=$p.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=oi.utf8decode(this.fileName),this.fileCommentStr=oi.utf8decode(this.fileComment);else {var t=this.findExtraFieldUnicodePath();if(t!==null)this.fileNameStr=t;else {var r=Pe.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r);}var i=this.findExtraFieldUnicodeComment();if(i!==null)this.fileCommentStr=i;else {var n=Pe.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(n);}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=ia(e.value);return t.readInt(1)!==1||Af(this.fileName)!==t.readInt(4)?null:oi.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=ia(e.value);return t.readInt(1)!==1||Af(this.fileComment)!==t.readInt(4)?null:oi.utf8decode(t.readData(e.length-5))}return null}};Lf.exports=Rf;});var Ff=v((Pm,If)=>{var Kp=ra(),Ae=j(),fe=Xn(),Gp=Of(),Qp=xe();function Df(e){this.files=[],this.loadOptions=e;}Df.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+Ae.pretty(t)+", expected "+Ae.pretty(e)+")")}},isSignature:function(e,t){var r=this.reader.index;this.reader.setIndex(e);var i=this.reader.readString(4),n=i===t;return this.reader.setIndex(r),n},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=Qp.uint8array?"uint8array":"array",r=Ae.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(r);},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e=this.zip64EndOfCentralSize-44,t=0,r,i,n;t<e;)r=this.reader.readInt(2),i=this.reader.readInt(4),n=this.reader.readData(i),this.zip64ExtensibleData[r]={id:r,length:i,value:n};},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(fe.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes();},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(fe.CENTRAL_FILE_HEADER);)e=new Gp({zip64:this.zip64},this.loadOptions),e.readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(fe.CENTRAL_DIRECTORY_END);if(e<0){var t=!this.isSignature(0,fe.LOCAL_FILE_HEADER);throw t?new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip: can't find end of central directory")}this.reader.setIndex(e);var r=e;if(this.checkSignature(fe.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===Ae.MAX_VALUE_16BITS||this.diskWithCentralDirStart===Ae.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===Ae.MAX_VALUE_16BITS||this.centralDirRecords===Ae.MAX_VALUE_16BITS||this.centralDirSize===Ae.MAX_VALUE_32BITS||this.centralDirOffset===Ae.MAX_VALUE_32BITS){if(this.zip64=true,e=this.reader.lastIndexOfSignature(fe.ZIP64_CENTRAL_DIRECTORY_LOCATOR),e<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(fe.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,fe.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(fe.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(fe.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral();}var i=this.centralDirOffset+this.centralDirSize;this.zip64&&(i+=20,i+=12+this.zip64EndOfCentralSize);var n=r-i;if(n>0)this.isSignature(r,fe.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(e){this.reader=Kp(e);},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles();}};If.exports=Df;});var Nf=v((Bm,Mf)=>{var na=j(),li=ut(),eg=ct(),tg=Ff(),rg=an(),jf=Pt();function ig(e){return new li.Promise(function(t,r){var i=e.decompressed.getContentWorker().pipe(new rg);i.on("error",function(n){r(n);}).on("end",function(){i.streamInfo.crc32!==e.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):t();}).resume();})}Mf.exports=function(e,t){var r=this;return t=na.extend(t||{},{base64:false,checkCRC32:false,optimizedBinaryString:false,createFolders:false,decodeFileName:eg.utf8decode}),jf.isNode&&jf.isStream(e)?li.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):na.prepareContent("the loaded zip file",e,true,t.optimizedBinaryString,t.base64).then(function(i){var n=new tg(t);return n.load(i),n}).then(function(n){var a=[li.Promise.resolve(n)],o=n.files;if(t.checkCRC32)for(var s=0;s<o.length;s++)a.push(ig(o[s]));return li.Promise.all(a)}).then(function(n){for(var a=n.shift(),o=a.files,s=0;s<o.length;s++){var u=o[s],l=u.fileNameStr,f=na.resolve(u.fileNameStr);r.file(f,u.decompressed,{binary:true,optimizedBinaryString:true,date:u.date,dir:u.dir,comment:u.fileCommentStr.length?u.fileCommentStr:null,unixPermissions:u.unixPermissions,dosPermissions:u.dosPermissions,createFolders:t.createFolders}),u.dir||(r.file(f).unsafeOriginalName=l);}return a.zipComment.length&&(r.comment=a.zipComment),r})};});var Pf=v((qm,zf)=>{function ne(){if(!(this instanceof ne))return new ne;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new ne;for(var t in this)typeof this[t]!="function"&&(e[t]=this[t]);return e};}ne.prototype=cf();ne.prototype.loadAsync=Nf();ne.support=xe();ne.defaults=tn();ne.version="3.10.1";ne.loadAsync=function(e,t){return new ne().loadAsync(e,t)};ne.external=ut();zf.exports=ne;});var qf={};Gf(qf,{unpackJdfxToDocument:()=>ag});function ng(e){return !e||typeof e!="string"||e.startsWith("/")||e.includes("\\")||e.includes("..")?false:e.startsWith(`${ya}/`)}async function ag(e){let t=await Bf.default.loadAsync(e),r=t.file(hi);if(!r)throw new Error(`${hi} missing from .jdfx bundle`);let i=JSON.parse(await r.async("string")),n=t.file(_a),a=null;if(n)try{a=JSON.parse(await n.async("string"));}catch{a=null;}let o=new Map;if(a?.assets)for(let u of a.assets){if(!ng(u.path)){console.warn(`[jdfjs] dropping unsafe manifest asset path: ${u.path}`);continue}let l=t.file(u.path);if(!l)continue;let f=await l.async("uint8array"),c=new Blob([f],{type:u.mimeType});o.set(u.id,URL.createObjectURL(c));}function s(u){if(u)for(let l of u){if(l?.type==="image"&&l.resource){let f=o.get(l.resource);f&&(l.src=f);}l?.elements&&s(l.elements),l?.children&&s(l.children);}}for(let u of i.pages||[])s(u.elements);return i}var Bf,Uf=Rt(()=>{Bf=eu(Pf());gr();});gr();gr();function xa(e){if(typeof e=="number")return `${e}px`;if(typeof e=="string")return e;let{top:t=0,right:r=0,bottom:i=0,left:n=0}=e;return `${t}px ${r}px ${i}px ${n}px`}function Z(e){let t={};if(e.fontFamily&&(t["font-family"]=e.fontFamily),e.fontSize&&(t["font-size"]=`${e.fontSize*1.333}px`),e.fontWeight&&(t["font-weight"]=String(e.fontWeight)),e.fontStyle&&(t["font-style"]=e.fontStyle),e.color&&(t.color=e.color),e.backgroundColor&&(t["background-color"]=e.backgroundColor),e.textAlign&&(t["text-align"]=e.textAlign),e.textDecoration){let r=e.textDecoration==="strikethrough"?"line-through":e.textDecoration;t["text-decoration"]=r;}return e.lineHeight&&(t["line-height"]=String(e.lineHeight)),e.letterSpacing!=null&&(t["letter-spacing"]=typeof e.letterSpacing=="number"?`${e.letterSpacing}px`:e.letterSpacing),e.padding!=null&&(t.padding=xa(e.padding)),e.margin!=null&&(t.margin=xa(e.margin)),e.marginTop!=null&&(t["margin-top"]=`${e.marginTop}px`),e.marginBottom!=null&&(t["margin-bottom"]=`${e.marginBottom}px`),e.border&&(t.border=e.border),e.borderRadius!=null&&(t["border-radius"]=typeof e.borderRadius=="number"?`${e.borderRadius}px`:e.borderRadius),e.opacity!=null&&(t.opacity=String(e.opacity)),t}function $(e,t){if(!e)return {};if(typeof e=="string")return Z(t[e]||{});if(Array.isArray(e)){let r={};for(let i of e)r={...r,...t[i]||{}};return Z(r)}return Z(e)}function q(e,t){for(let[r,i]of Object.entries(t))e.style.setProperty(r,i);}function ci(e){if(!e)return null;let t=typeof e=="string"?e:e.target;if(typeof e=="string"?e.startsWith("#"):e.type==="internal"){let i=t.replace(/^#/,"").match(/^page-(\d+)$/i);return i?{href:t,internal:true,pageIndex:Number(i[1])-1}:{href:t,internal:true}}return {href:t,internal:false}}function pi(e,t,r){e.href=t.href,t.internal?e.addEventListener("click",i=>{i.preventDefault(),t.pageIndex!=null&&r&&r(t.pageIndex);}):(e.target="_blank",e.rel="noopener noreferrer");}var tt="http://www.w3.org/2000/svg";function mr(e,t){let r=document.createElement("div");nu(r,e);let i=null;switch(e.type){case "text":i=au(e,t);break;case "richtext":i=su(e,t);break;case "image":i=hu(e,t);break;case "table":i=gu(e,t);break;case "list":i=mu(e,t);break;case "shape":i=vu(e);break;case "collapsible":i=bu(e,t);break;case "toc":i=_u(e,t);break;case "input":i=yu(e,t);break;case "textarea":i=wu(e,t);break;case "checkbox":i=xu(e,t);break;case "select":i=Eu(e,t);break;case "signature":i=Su(e,t);break}return i?(r.appendChild(i),r):null}function nu(e,t){let r=t;r.position&&(e.style.position="absolute",r.position.x!=null&&(e.style.left=`${N(r.position.x)}px`),r.position.y!=null&&(e.style.top=`${N(r.position.y)}px`)),r.width!=null&&(e.style.width=`${N(r.width)}px`),r.height!=null&&(e.style.height=`${N(r.height)}px`);}function au(e,t){let r=ou(e.heading),i=document.createElement(r);i.className="jdfjs-text",i.style.margin="0",i.style.whiteSpace="pre-wrap",q(i,$(e.style,t.styles)),e.align&&(i.style.textAlign=e.align);let n=ci(e.link);if(n){let a=document.createElement("a");pi(a,n,t.onNavigatePage),a.className="jdfjs-link",a.textContent=e.content||"",i.appendChild(a);}else i.textContent=e.content||"";return i}function ou(e){return e===true?"h1":typeof e=="number"&&e>=1&&e<=6?"h"+e:"p"}function su(e,t){let r=document.createElement("p");r.className="jdfjs-richtext",r.style.margin="0",q(r,$(e.style,t.styles));for(let i of e.runs||[])r.appendChild(fu(i,t));return r}function lu(e,t){let r={};if(e.style)if(typeof e.style=="string")Object.assign(r,Z(t[e.style]||{}));else if(Array.isArray(e.style))for(let n of e.style)Object.assign(r,Z(t[n]||{}));else Object.assign(r,Z(e.style));e.bold&&(r["font-weight"]="bold"),e.italic&&(r["font-style"]="italic");let i=[];return e.underline&&i.push("underline"),e.strikethrough&&i.push("line-through"),i.length&&(r["text-decoration"]=i.join(" ")),e.color&&(r.color=e.color),e.fontSize&&(r["font-size"]=`${e.fontSize*1.333}px`),e.fontFamily&&(r["font-family"]=e.fontFamily),r}function fu(e,t){let r=ci(e.link),i=r?document.createElement("a"):document.createElement("span");return r&&(pi(i,r,t.onNavigatePage),i.classList.add("jdfjs-link")),q(i,lu(e,t.styles)),i.textContent=e.text,i}function uu(e,t){if(!e)return;let r=e[t];if(r&&typeof r=="object"&&"data"in r)return r;let i=e.images?.[t];if(i)return i}function du(e,t){if(e.src?.startsWith("data:")||e.src?.startsWith("http"))return e.src;if(e.resource){let r=uu(t,e.resource);if(r?.data){let i=r.mimeType||"image/png";return r.data.startsWith("data:")?r.data:`data:${i};base64,${r.data}`}if(r?.path)return r.path}return e.src||""}function hu(e,t){let r=document.createElement("div");r.className="jdfjs-image",r.style.width="100%",r.style.height="100%";let i=document.createElement("img");switch(i.src=du(e,t.resources),i.alt=e.alt||"",i.style.display="block",i.style.width="100%",i.style.height="100%",e.fit){case "cover":i.style.objectFit="cover";break;case "fill":i.style.objectFit="fill";break;case "none":i.style.objectFit="none";break;default:i.style.objectFit="contain";}return q(i,$(e.style,t.styles)),r.appendChild(i),r}function cu(e){return typeof e=="string"?e:e.content}function pu(e){return typeof e=="string"?{}:{colspan:e.colspan,rowspan:e.rowspan}}function gu(e,t){let r=document.createElement("div");r.className="jdfjs-table-wrap",q(r,$(e.style,t.styles)),r.style.overflowX="auto";let i=(()=>{let c=e.headerStyle;if(!c)return {};if(typeof c=="string")return Z(t.styles[c]||{});if(Array.isArray(c)){let d={};for(let h of c)d={...d,...Z(t.styles[h]||{})};return d}return Z(c)})(),n=(()=>{let c=e.rowStyle;if(!c)return {};if(typeof c=="string")return Z(t.styles[c]||{});if(Array.isArray(c)){let d={};for(let h of c)d={...d,...Z(t.styles[h]||{})};return d}return Z(c)})(),a=(()=>{let c=e.alternateRowStyle;if(!c){let d=e.alternatingRowColor;return d?{"background-color":d}:{}}if(typeof c=="string")return Z(t.styles[c]||{});if(Array.isArray(c)){let d={};for(let h of c)d={...d,...Z(t.styles[h]||{})};return d}return Z(c)})(),o=(()=>{let c=e.borders;return c===false?{outer:false,inner:false}:c===true||c===void 0?{outer:true,inner:true,color:"#e2e8f0",width:1}:{outer:true,inner:true,color:"#e2e8f0",width:1,...c}})(),s=e.headers??e.columns?.map(c=>c.header||"").filter(c=>c!==""),u=c=>e.columns?.[c]?.align,l=document.createElement("table");if(l.style.width="100%",l.style.borderCollapse="collapse",l.style.fontSize="14px",o.outer&&(l.style.border=`${o.width||1}px solid ${o.color||"#e2e8f0"}`),s&&s.length>0){let c=document.createElement("thead"),d=document.createElement("tr");q(d,i),s.forEach((h,w)=>{let b=document.createElement("th");b.textContent=h,b.style.padding="8px 12px",b.style.fontWeight="600",b.style.background="#f8fafc",b.style.textAlign=u(w)||"left",o.inner&&(b.style.border=`${o.width||1}px solid ${o.color||"#e2e8f0"}`),d.appendChild(b);}),c.appendChild(d),l.appendChild(c);}let f=document.createElement("tbody");return e.rows.forEach((c,d)=>{let h=document.createElement("tr");q(h,n),d%2===1&&q(h,a),c.forEach((w,b)=>{let _=document.createElement("td");_.textContent=cu(w);let p=pu(w);p.colspan&&(_.colSpan=p.colspan),p.rowspan&&(_.rowSpan=p.rowspan),_.style.padding="8px 12px",_.style.verticalAlign="top",_.style.textAlign=u(b)||"left",o.inner&&(_.style.border=`${o.width||1}px solid ${o.color||"#e2e8f0"}`),h.appendChild(_);}),f.appendChild(h);}),l.appendChild(f),r.appendChild(l),r}function mu(e,t){let r=document.createElement("div");r.className="jdfjs-list-wrap",q(r,$(e.style,t.styles));let i=e.listType??(e.ordered?"ordered":"unordered"),n=Ea(i);return Sa(n,e.items||[],i),r.appendChild(n),r}function Ea(e){let t=document.createElement(e==="ordered"?"ol":"ul");return t.style.margin="0",t.style.paddingLeft="20px",t.style.listStyle=e==="ordered"?"decimal":"disc",t}function Sa(e,t,r,i){for(let n of t){let a=document.createElement("li");if(a.style.fontSize="14px",a.style.lineHeight="1.6",a.appendChild(document.createTextNode(n.content)),n.children?.length){let o=n.listType||r,s=Ea(o);s.style.marginTop="4px",Sa(s,n.children,o),a.appendChild(s);}e.appendChild(a);}}function vu(e){let t=document.createElement("div");t.className="jdfjs-shape",t.style.width="100%",t.style.height="100%";let r=e.width??100,i=e.height??100,n=e.fill??"none",a=(()=>{let l=e.stroke;return typeof l=="string"?l:l?.color?l.color:"none"})(),o=(()=>{let l=e.stroke;return typeof l=="object"&&l?.width!=null?l.width:e.strokeWidth??0})(),s=document.createElementNS(tt,"svg");s.setAttribute("width","100%"),s.setAttribute("height","100%"),s.setAttribute("viewBox",`0 0 ${r} ${i}`),s.setAttribute("preserveAspectRatio","none"),s.style.display="block",s.style.overflow="visible";let u=null;switch(e.shape){case "rect":{let l=document.createElementNS(tt,"rect");l.setAttribute("x","0"),l.setAttribute("y","0"),l.setAttribute("width",String(r)),l.setAttribute("height",String(i)),e.borderRadius&&l.setAttribute("rx",String(e.borderRadius)),u=l;break}case "circle":{let l=document.createElementNS(tt,"circle");l.setAttribute("cx",String(r/2)),l.setAttribute("cy",String(i/2)),l.setAttribute("r",String(Math.min(r,i)/2)),u=l;break}case "ellipse":{let l=document.createElementNS(tt,"ellipse");l.setAttribute("cx",String(r/2)),l.setAttribute("cy",String(i/2)),l.setAttribute("rx",String(r/2)),l.setAttribute("ry",String(i/2)),u=l;break}case "line":{let l=document.createElementNS(tt,"line");return l.setAttribute("x1","0"),l.setAttribute("y1","0"),l.setAttribute("x2",String(r)),l.setAttribute("y2",String(i)),l.setAttribute("stroke",a==="none"?n!=="none"?n:"currentColor":a),l.setAttribute("stroke-width",String(o||.3)),s.appendChild(l),t.appendChild(s),t}case "path":{let l=document.createElementNS(tt,"path");l.setAttribute("d",e.path||""),l.setAttribute("fill-rule","evenodd"),u=l;break}}return u&&(u.setAttribute("fill",n),u.setAttribute("stroke",a),o&&u.setAttribute("stroke-width",String(o)),s.appendChild(u)),t.appendChild(s),t}function bu(e,t){let r=document.createElement("div");r.className="jdfjs-collapsible",q(r,$(e.style,t.styles)),r.style.border="1px solid #e2e8f0",r.style.borderRadius="8px",r.style.overflow="hidden",r.style.background="#ffffff";let i=document.createElement("button");i.type="button",i.className="jdfjs-collapsible-header",i.style.width="100%",i.style.display="flex",i.style.alignItems="center",i.style.gap="8px",i.style.padding="10px 16px",i.style.fontSize="14px",i.style.fontWeight="500",i.style.background="#f8fafc",i.style.border="0",i.style.cursor="pointer",i.style.textAlign="left";let n=document.createElement("span");n.textContent="\u25B6",n.style.fontSize="10px",n.style.transition="transform 0.15s ease";let a=document.createElement("span");a.textContent=e.title||"Section",a.style.flex="1",i.appendChild(n),i.appendChild(a),r.appendChild(i);let o=document.createElement("div");o.className="jdfjs-collapsible-body",o.style.padding="12px 16px",o.style.position="relative";let s=e.expanded??false,u=()=>{o.style.display=s?"block":"none",n.style.transform=s?"rotate(90deg)":"rotate(0deg)";};u(),i.addEventListener("click",()=>{s=!s,u();});for(let l of e.elements||[]){let f=mr(l,{...t,path:[...t.path,"elements"]});f&&o.appendChild(f);}return r.appendChild(o),r}function _u(e,t){let r=document.createElement("div");r.className="jdfjs-toc",q(r,$(e.style,t.styles));let i=e.depth??6,n=[];t.document.pages.forEach((a,o)=>{for(let s of a.elements){if(s.type!=="text")continue;let u=s,l=u.tocEntry||(u.heading?u.content:null);if(!l)continue;let f=typeof u.tocLevel=="number"?u.tocLevel:typeof u.heading=="number"?u.heading:1;f>i||n.push({title:l,pageIndex:o,level:f});}});for(let a of n){let o=document.createElement("button");o.type="button",o.className="jdfjs-toc-entry",o.style.display="flex",o.style.alignItems="baseline",o.style.gap="8px",o.style.width="100%",o.style.background="transparent",o.style.border="0",o.style.borderBottom="1px dotted #e2e8f0",o.style.padding=`6px 8px 6px ${(a.level-1)*16+8}px`,o.style.cursor="pointer",o.style.fontSize="14px",o.style.color="#334155",o.style.textAlign="left";let s=document.createElement("span");s.textContent=a.title,s.style.flex="1";let u=document.createElement("span");u.style.flex="1",u.style.borderBottom="1px dotted #cbd5e1",u.style.alignSelf="end",u.style.marginBottom="4px";let l=document.createElement("span");l.textContent=String(a.pageIndex+1),l.style.fontFamily="JetBrains Mono, monospace",l.style.fontSize="12px",l.style.color="#94a3b8",l.style.flexShrink="0",o.appendChild(s),o.appendChild(u),o.appendChild(l),o.addEventListener("click",()=>t.onNavigatePage?.(a.pageIndex)),r.appendChild(o);}return r}function vr(e){if(!e)return null;let t=document.createElement("label");return t.className="jdfjs-form-label",t.textContent=e,t}function be(e,t,r){e.onFormChange&&e.onFormChange(e.path,t,r);}function yu(e,t){let r=document.createElement("div");r.className="jdfjs-form-field jdfjs-form-input",q(r,$(e.style,t.styles));let i=vr(e.label);i&&r.appendChild(i);let n=document.createElement("input");return n.className="jdfjs-form-control",n.type=e.inputType||"text",n.name=e.name,e.value!=null&&(n.value=e.value),e.placeholder&&(n.placeholder=e.placeholder),e.readonly&&(n.readOnly=true),e.required&&(n.required=true),e.pattern&&(n.pattern=e.pattern),n.addEventListener("input",()=>be(t,"value",n.value)),n.addEventListener("change",()=>be(t,"value",n.value)),r.appendChild(n),r}function wu(e,t){let r=document.createElement("div");r.className="jdfjs-form-field jdfjs-form-textarea",q(r,$(e.style,t.styles));let i=vr(e.label);i&&r.appendChild(i);let n=document.createElement("textarea");return n.className="jdfjs-form-control",n.name=e.name,e.value!=null&&(n.value=e.value),e.placeholder&&(n.placeholder=e.placeholder),e.readonly&&(n.readOnly=true),e.required&&(n.required=true),e.rows&&(n.rows=e.rows),n.addEventListener("input",()=>be(t,"value",n.value)),n.addEventListener("change",()=>be(t,"value",n.value)),r.appendChild(n),r}function xu(e,t){let r=document.createElement("label");r.className="jdfjs-form-field jdfjs-form-checkbox",q(r,$(e.style,t.styles));let i=document.createElement("input");if(i.type="checkbox",i.name=e.name,i.checked=e.checked===true,e.readonly&&(i.disabled=true),e.required&&(i.required=true),i.addEventListener("change",()=>be(t,"checked",i.checked)),r.appendChild(i),e.label){let n=document.createElement("span");n.className="jdfjs-form-checkbox-label",n.textContent=e.label,r.appendChild(n);}return r}function Eu(e,t){let r=document.createElement("div");r.className="jdfjs-form-field jdfjs-form-select",q(r,$(e.style,t.styles));let i=vr(e.label);i&&r.appendChild(i);let n=document.createElement("select");n.className="jdfjs-form-control",n.name=e.name,e.multiple&&(n.multiple=true),e.readonly&&(n.disabled=true),e.required&&(n.required=true);let a=new Set(e.multiple?e.values||[]:e.value!=null?[e.value]:[]);for(let o of e.options){let s=document.createElement("option");s.value=o.value,s.textContent=o.label??o.value,a.has(o.value)&&(s.selected=true),n.appendChild(s);}return n.addEventListener("change",()=>{if(e.multiple){let o=Array.from(n.selectedOptions).map(s=>s.value);be(t,"values",o);}else be(t,"value",n.value);}),r.appendChild(n),r}function Su(e,t){let r=document.createElement("div");r.className="jdfjs-form-field jdfjs-form-signature",q(r,$(e.style,t.styles));let i=vr(e.label);i&&r.appendChild(i);let n=N(e.width??80),a=N(e.height??30),o=document.createElement("canvas");if(o.className="jdfjs-form-signature-canvas",o.width=Math.max(50,n),o.height=Math.max(20,a),e.value){let d=new Image;d.onload=()=>{o.getContext("2d")?.drawImage(d,0,0,o.width,o.height);},d.src=e.value;}let s=false,u=null;function l(d){e.readonly||(s=true,u={x:d.offsetX,y:d.offsetY});}function f(d){if(!s||!u)return;let h=o.getContext("2d");h&&(h.strokeStyle="#0f172a",h.lineWidth=1.6,h.lineCap="round",h.beginPath(),h.moveTo(u.x,u.y),h.lineTo(d.offsetX,d.offsetY),h.stroke(),u={x:d.offsetX,y:d.offsetY});}function c(){if(s){s=false,u=null;try{be(t,"value",o.toDataURL("image/png"));}catch{}}}if(o.addEventListener("pointerdown",l),o.addEventListener("pointermove",f),o.addEventListener("pointerup",c),o.addEventListener("pointerleave",c),r.appendChild(o),!e.readonly){let d=document.createElement("button");d.type="button",d.className="jdfjs-form-signature-clear",d.textContent="Clear",d.addEventListener("click",h=>{h.preventDefault(),o.getContext("2d")?.clearRect(0,0,o.width,o.height),be(t,"value","");}),r.appendChild(d);}return r}function ka(e,t){return e.replace(/\{\{pageNumber\}\}/g,String(t.pageNumber)).replace(/\{\{totalPages\}\}/g,String(t.totalPages)).replace(/\{\{title\}\}/g,t.title).replace(/\{\{author\}\}/g,t.author)}var dr=new WeakMap;async function aa(e,t,r={}){let i=Zf(e),n=dr.get(i);n&&n.abort();let a=new AbortController;dr.set(i,a),i.classList.add("jdfjs-loading");try{let o=/\.jdfx(\?|#|$)/i.test(t),s=await fetch(t,{signal:a.signal,headers:o?{Accept:"application/jdf+zip,application/zip"}:{Accept:"application/json,application/jdf+json,application/jdf+zip,application/zip"}});if(!s.ok)throw new Error(`Failed to fetch ${t} (${s.status})`);let u=(s.headers.get("content-type")||"").toLowerCase(),l=u.includes("zip")||u.includes("jdf+zip"),f;if(o||l){let{unpackJdfxToDocument:c}=await Promise.resolve().then(()=>(Uf(),qf));f=await c(await s.arrayBuffer());}else f=await s.json();if(!f?.$jdf)throw new Error("Not a valid JDF document (missing $jdf field)");if(dr.get(i)!==a)throw new DOMException("Superseded by a newer src change","AbortError");return i.classList.remove("jdfjs-loading"),Hf(i,f,r)}catch(o){throw i.classList.remove("jdfjs-loading"),o.name==="AbortError"||(i.classList.add("jdfjs-error"),i.innerHTML=`<div class="jdfjs-error-msg">${og(o.message)}</div>`,r.onError?.(o)),o}}function Hf(e,t,r={}){let i=Zf(e);return new fi(i,t,r).getInstance()}var fi=class{constructor(t,r,i={}){this.resizeObs=null;this.toolbarEl=null;this.sidebarEl=null;this.observer=null;this.darkModeMql=null;this.darkModeListener=null;this.windowResizeListener=null;this.container=t,this.doc=r,this.options={zoom:i.zoom??1,sidebar:i.sidebar??false,toolbar:i.toolbar??true,darkMode:i.darkMode??"auto",initialPage:i.initialPage??0,fit:i.fit??"manual",...i},this.zoom=this.options.zoom,this.currentPage=this.options.initialPage,this.applyContainerSize(),this.mount(),queueMicrotask(()=>this.options.onLoad?.(this.doc));}applyContainerSize(){let t=this.options.width,r=this.options.height;t!=null&&(this.container.style.width=typeof t=="number"?`${t}px`:t),r!=null&&(this.container.style.height=typeof r=="number"?`${r}px`:r);}mount(){this.container.innerHTML="",this.container.classList.add("jdfjs"),this.applyDarkMode(),this.root=document.createElement("div"),this.root.className="jdfjs-root",this.options.toolbar&&(this.toolbarEl=this.buildToolbar(),this.root.appendChild(this.toolbarEl));let t=document.createElement("div");t.className="jdfjs-body",this.options.sidebar&&(this.sidebarEl=this.buildSidebar(),t.appendChild(this.sidebarEl)),this.pagesEl=document.createElement("div"),this.pagesEl.className="jdfjs-pages",t.appendChild(this.pagesEl),this.root.appendChild(t),this.container.appendChild(this.root),this.renderAllPages(),this.setupScrollObserver(),this.setupResizeObserver(),this.applyFit(),this.currentPage>0&&this.scrollToPage(this.currentPage);}setupResizeObserver(){typeof ResizeObserver<"u"&&(this.resizeObs?.disconnect(),this.resizeObs=new ResizeObserver(()=>this.applyFit()),this.resizeObs.observe(this.pagesEl),this.resizeObs.observe(this.container)),this.windowResizeListener==null&&typeof window<"u"&&(this.windowResizeListener=()=>this.applyFit(),window.addEventListener("resize",this.windowResizeListener));}applyDarkMode(){this.darkModeMql&&this.darkModeListener&&(this.darkModeMql.removeEventListener("change",this.darkModeListener),this.darkModeMql=null,this.darkModeListener=null);let t=a=>{this.container.classList.toggle("jdfjs-dark",a);},r=this.options.darkMode;if(r==="dark"){t(true);return}if(r==="light"){t(false);return}if(typeof window>"u"||!window.matchMedia){t(false);return}let i=window.matchMedia("(prefers-color-scheme: dark)");t(i.matches);let n=a=>t(a.matches);i.addEventListener("change",n),this.darkModeMql=i,this.darkModeListener=n;}applyFit(){if(this.options.fit==="manual")return;let t=this.pagesEl.querySelector(".jdfjs-page");if(!t)return;let r=parseFloat(t.style.width||"0"),i=parseFloat(t.style.minHeight||"0");if(!r||!i)return;let n=this.pagesEl.clientWidth-32,a=this.pagesEl.clientHeight-32;this.options.fit==="fit-width"?this.zoom=Math.max(.25,Math.min(3,n/r)):this.options.fit==="fit-page"&&(this.zoom=Math.max(.25,Math.min(3,Math.min(n/r,a/i)))),this.applyZoom(),this.updateIndicators();}buildToolbar(){let t=document.createElement("div");return t.className="jdfjs-toolbar",t.innerHTML=`
3
3
  <span class="jdfjs-title"></span>
4
4
  <div class="jdfjs-spacer"></div>
5
5
  <button class="jdfjs-btn" data-act="prev" title="Previous page">\u2039</button>
@@ -9,5 +9,5 @@ var Bf=Object.create;var li=Object.defineProperty;var qf=Object.getOwnPropertyDe
9
9
  <button class="jdfjs-btn" data-act="zoom-out" title="Zoom out">\u2212</button>
10
10
  <span class="jdfjs-zoom-indicator"></span>
11
11
  <button class="jdfjs-btn" data-act="zoom-in" title="Zoom in">+</button>
12
- `,t.querySelector(".jdfjs-title").textContent=this.doc.meta?.title??"Document",this.updateIndicators(t),t.addEventListener("click",r=>{let i=r.target.closest("[data-act]");if(!i)return;let n=i.getAttribute("data-act");n==="prev"?this.goToPage(this.currentPage-1):n==="next"?this.goToPage(this.currentPage+1):n==="zoom-in"?this.setZoom(this.zoom+.1):n==="zoom-out"&&this.setZoom(this.zoom-.1);}),t}buildSidebar(){let t=document.createElement("div");return t.className="jdfjs-sidebar",this.doc.pages.forEach((r,i)=>{let n=document.createElement("button");n.className="jdfjs-sidebar-thumb",n.setAttribute("data-page",String(i)),n.innerHTML=`<span class="jdfjs-sidebar-num">${i+1}</span>`,n.addEventListener("click",()=>this.goToPage(i)),t.appendChild(n);}),t}updateIndicators(t=this.toolbarEl){if(!t)return;let r=t.querySelector(".jdfjs-page-indicator");r&&(r.textContent=`${this.currentPage+1} / ${this.doc.pages.length}`);let i=t.querySelector(".jdfjs-zoom-indicator");i&&(i.textContent=`${Math.round(this.zoom*100)}%`),this.sidebarEl&&this.sidebarEl.querySelectorAll(".jdfjs-sidebar-thumb").forEach(n=>{let a=Number(n.getAttribute("data-page"));n.classList.toggle("jdfjs-sidebar-thumb-active",a===this.currentPage);});}renderAllPages(){this.pagesEl.innerHTML="";let t=this.doc.styles??{};this.doc.pages.forEach((r,i)=>{let n=this.renderPage(r,i,t);this.pagesEl.appendChild(n);}),this.applyZoom();}renderPage(t,r,i){let n=ua(t.pageSize??this.doc.meta?.pageSize??"A4",t.pageOrientation??this.doc.meta?.pageOrientation??"portrait"),a={...fa,...this.doc.meta?.margins||{},...t.margins||{}},o=document.createElement("div");o.className="jdfjs-page-wrapper",o.setAttribute("data-page-index",String(r));let l=document.createElement("div");l.className="jdfjs-page",l.style.width=`${B(n.width)}px`,l.style.minHeight=`${B(n.height)}px`,t.background&&(l.style.backgroundColor=t.background);let u=t.header??this.doc.header,s=t.footer??this.doc.footer,f=u?.height??0,c=s?.height??0;if(u){let h=this.renderHeaderFooter(u,r,this.doc.pages.length,i);h.classList.add("jdfjs-header"),h.style.paddingTop=`${B(a.top/2)}px`,h.style.paddingLeft=`${B(a.left)}px`,h.style.paddingRight=`${B(a.right)}px`,l.appendChild(h);}let d=document.createElement("div");if(d.className="jdfjs-page-content",d.style.position="absolute",d.style.top=`${B((a.top||0)+f)}px`,d.style.right=`${B(a.right||0)}px`,d.style.bottom=`${B((a.bottom||0)+c)}px`,d.style.left=`${B(a.left||0)}px`,t.elements.forEach((h,w)=>{let _=pr(h,{styles:i,resources:this.doc.resources,document:this.doc,path:["pages",r,"elements",w],onNavigatePage:y=>this.goToPage(y)});_&&d.appendChild(_);}),l.appendChild(d),s){let h=this.renderHeaderFooter(s,r,this.doc.pages.length,i);h.classList.add("jdfjs-footer"),h.style.paddingBottom=`${B(a.bottom/2)}px`,h.style.paddingLeft=`${B(a.left)}px`,h.style.paddingRight=`${B(a.right)}px`,l.appendChild(h);}return o.appendChild(l),o}renderHeaderFooter(t,r,i,n){let a=document.createElement("div");if(t.elements?.length)t.elements.forEach((o,l)=>{let u=pr(o,{styles:n,resources:this.doc.resources,document:this.doc,path:["__hf__",r,l],onNavigatePage:s=>this.goToPage(s)});u&&a.appendChild(u);});else if(t.content){let o=va(t.content,{pageNumber:r+1,totalPages:i,title:this.doc.meta?.title??"",author:this.doc.meta?.author??""}),l=document.createElement("div");l.textContent=o,Object.assign(l.style,fe(t.style,n)),a.appendChild(l);}return a}setupScrollObserver(){typeof IntersectionObserver>"u"||(this.observer?.disconnect(),this.observer=new IntersectionObserver(t=>{let r=t.filter(i=>i.isIntersecting).sort((i,n)=>n.intersectionRatio-i.intersectionRatio);if(r[0]){let i=Number(r[0].target.getAttribute("data-page-index"));!isNaN(i)&&i!==this.currentPage&&(this.currentPage=i,this.updateIndicators(),this.options.onPageChange?.(i));}},{root:this.pagesEl,threshold:[.25,.5,.75]}),this.pagesEl.querySelectorAll("[data-page-index]").forEach(t=>this.observer.observe(t)));}scrollToPage(t){let r=this.pagesEl.querySelector(`[data-page-index="${t}"]`);r&&r.scrollIntoView({behavior:"smooth",block:"start"});}applyZoom(){this.pagesEl.style.setProperty("--jdfjs-zoom",String(this.zoom)),this.pagesEl.querySelectorAll(".jdfjs-page").forEach(t=>{t.style.transform=`scale(${this.zoom})`,t.style.transformOrigin="top center";});}setZoom(t){this.zoom=Math.max(.25,Math.min(3,t)),this.applyZoom(),this.updateIndicators();}getZoom(){return this.zoom}goToPage(t){let r=Math.max(0,Math.min(this.doc.pages.length-1,t));this.currentPage=r,this.scrollToPage(r),this.updateIndicators(),this.options.onPageChange?.(r);}getCurrentPage(){return this.currentPage}setDocument(t){if(this.doc=t,this.currentPage=0,this.toolbarEl){let r=this.toolbarEl.querySelector(".jdfjs-title");r&&(r.textContent=t.meta?.title??"Document");}this.sidebarEl&&(this.sidebarEl.innerHTML="",this.buildSidebar().querySelectorAll(".jdfjs-sidebar-thumb").forEach(i=>this.sidebarEl.appendChild(i))),this.renderAllPages(),this.setupScrollObserver(),this.options.onLoad?.(t);}destroy(){this.observer?.disconnect(),this.resizeObs?.disconnect(),this.container.innerHTML="",this.container.classList.remove("jdfjs","jdfjs-dark","jdfjs-loading","jdfjs-error"),this.container.style.removeProperty("width"),this.container.style.removeProperty("height");}getInstance(){return {container:this.container,document:this.doc,setZoom:t=>this.setZoom(t),getZoom:()=>this.getZoom(),goToPage:t=>this.goToPage(t),getCurrentPage:()=>this.getCurrentPage(),setDocument:t=>this.setDocument(t),destroy:()=>this.destroy()}}};function jf(e){if(typeof e=="string"){let t=document.querySelector(e);if(!t)throw new Error(`jdfjs: container "${e}" not found`);return t}return e}function $p(e){return e.replace(/[&<>"']/g,t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[t])}var ia=new WeakSet;function Xp(e){let t={},r=c=>e.getAttribute(c),i=r("zoom");if(i!=null){let c=Number(i);isNaN(c)||(t.zoom=c);}let n=r("sidebar");n!=null&&(t.sidebar=n!=="false"&&n!=="0");let a=r("toolbar");a!=null&&(t.toolbar=a!=="false"&&a!=="0");let o=r("dark-mode")||r("darkmode");(o==="auto"||o==="light"||o==="dark")&&(t.darkMode=o);let l=r("page");if(l!=null){let c=Number(l);isNaN(c)||(t.initialPage=c);}let u=r("width");if(u!=null){let c=Number(u);t.width=isNaN(c)?u:c;}let s=r("height");if(s!=null){let c=Number(s);t.height=isNaN(c)?s:c;}let f=r("fit");return (f==="manual"||f==="fit-width"||f==="fit-page")&&(t.fit=f),t}function na(e){if(ia.has(e)||e.hasAttribute("manual"))return;let t=e.getAttribute("src");if(!t)return;ia.add(e);let r=e;Pf(r);let i=Xp(e);ra(r,t,i).catch(n=>{console.error("[jdf.js] failed to embed",t,n),r.dispatchEvent(new CustomEvent("jdf-error",{detail:n,bubbles:true}));}),Vp(r);}function Pf(e){let t=e.getAttribute("width");if(t!=null){let i=Number(t);e.style.width=isNaN(i)?t:`${i}px`;}let r=e.getAttribute("height");if(r!=null){let i=Number(r);e.style.height=isNaN(i)?r:`${i}px`;}}var Ff=new WeakSet;function Vp(e){if(Ff.has(e)||typeof MutationObserver>"u")return;Ff.add(e),new MutationObserver(r=>{for(let i of r){if(i.type!=="attributes"||!i.attributeName)continue;let n=i.attributeName;n==="src"?(ia.delete(e),na(e)):(n==="width"||n==="height")&&Pf(e);}}).observe(e,{attributes:true,attributeFilter:["src","width","height"]});}function si(e=document){e.querySelectorAll("jdf").forEach(na);}function Mf(){if(typeof MutationObserver>"u")return;new MutationObserver(t=>{for(let r of t)r.addedNodes.forEach(i=>{i instanceof Element&&(i.tagName.toLowerCase()==="jdf"?na(i):si(i));});}).observe(document.body,{childList:true,subtree:true});}function Yp(e=document){si(e);}function Kp(){typeof window>"u"||typeof document>"u"||window.JDFjsAutoInit!==false&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{si(),Mf();},{once:true}):(si(),Mf()));}Kp();export{oi as JDFViewer,ra as embed,Yp as jdf,Nf as render};//# sourceMappingURL=jdfjs.js.map
12
+ `,t.querySelector(".jdfjs-title").textContent=this.doc.meta?.title??"Document",this.updateIndicators(t),t.addEventListener("click",r=>{let i=r.target.closest("[data-act]");if(!i)return;let n=i.getAttribute("data-act");n==="prev"?this.goToPage(this.currentPage-1):n==="next"?this.goToPage(this.currentPage+1):n==="zoom-in"?this.setZoom(this.zoom+.1):n==="zoom-out"&&this.setZoom(this.zoom-.1);}),t}buildSidebar(){let t=document.createElement("div");return t.className="jdfjs-sidebar",this.doc.pages.forEach((r,i)=>{let n=document.createElement("button");n.className="jdfjs-sidebar-thumb",n.setAttribute("data-page",String(i)),n.innerHTML=`<span class="jdfjs-sidebar-num">${i+1}</span>`,n.addEventListener("click",()=>this.goToPage(i)),t.appendChild(n);}),t}updateIndicators(t=this.toolbarEl){if(!t)return;let r=t.querySelector(".jdfjs-page-indicator");r&&(r.textContent=`${this.currentPage+1} / ${this.doc.pages.length}`);let i=t.querySelector(".jdfjs-zoom-indicator");i&&(i.textContent=`${Math.round(this.zoom*100)}%`),this.sidebarEl&&this.sidebarEl.querySelectorAll(".jdfjs-sidebar-thumb").forEach(n=>{let a=Number(n.getAttribute("data-page"));n.classList.toggle("jdfjs-sidebar-thumb-active",a===this.currentPage);});}renderAllPages(){this.pagesEl.innerHTML="";let t=this.doc.styles??{};this.doc.pages.forEach((r,i)=>{let n=this.renderPage(r,i,t);this.pagesEl.appendChild(n);}),this.applyZoom();}renderPage(t,r,i){let n=va(t.pageSize??this.doc.meta?.pageSize??"A4",t.pageOrientation??this.doc.meta?.pageOrientation??"portrait"),a={...ma,...this.doc.meta?.margins||{},...t.margins||{}},o=document.createElement("div");o.className="jdfjs-page-wrapper",o.setAttribute("data-page-index",String(r));let s=document.createElement("div");s.className="jdfjs-page",s.style.width=`${N(n.width)}px`,s.style.minHeight=`${N(n.height)}px`,t.background&&(s.style.backgroundColor=t.background);let u=t.header??this.doc.header,l=t.footer??this.doc.footer,f=u?.height??0,c=l?.height??0;if(u){let h=this.renderHeaderFooter(u,r,this.doc.pages.length,i);h.classList.add("jdfjs-header"),h.style.paddingTop=`${N(a.top/2)}px`,h.style.paddingLeft=`${N(a.left)}px`,h.style.paddingRight=`${N(a.right)}px`,s.appendChild(h);}let d=document.createElement("div");if(d.className="jdfjs-page-content",d.style.position="absolute",d.style.top=`${N((a.top||0)+f)}px`,d.style.right=`${N(a.right||0)}px`,d.style.bottom=`${N((a.bottom||0)+c)}px`,d.style.left=`${N(a.left||0)}px`,t.elements.forEach((h,w)=>{let b=mr(h,{styles:i,resources:this.doc.resources,document:this.doc,path:["pages",r,"elements",w],onNavigatePage:_=>this.goToPage(_),onFormChange:(_,p,g)=>this.handleFormChange(_,p,g)});b&&d.appendChild(b);}),s.appendChild(d),l){let h=this.renderHeaderFooter(l,r,this.doc.pages.length,i);h.classList.add("jdfjs-footer"),h.style.paddingBottom=`${N(a.bottom/2)}px`,h.style.paddingLeft=`${N(a.left)}px`,h.style.paddingRight=`${N(a.right)}px`,s.appendChild(h);}return o.appendChild(s),o}renderHeaderFooter(t,r,i,n){let a=document.createElement("div");if(t.elements?.length)t.elements.forEach((o,s)=>{let u=mr(o,{styles:n,resources:this.doc.resources,document:this.doc,path:["__hf__",r,s],onNavigatePage:l=>this.goToPage(l)});u&&a.appendChild(u);});else if(t.content){let o=ka(t.content,{pageNumber:r+1,totalPages:i,title:this.doc.meta?.title??"",author:this.doc.meta?.author??""}),s=document.createElement("div");s.textContent=o,Object.assign(s.style,$(t.style,n)),a.appendChild(s);}return a}setupScrollObserver(){typeof IntersectionObserver>"u"||(this.observer?.disconnect(),this.observer=new IntersectionObserver(t=>{let r=t.filter(i=>i.isIntersecting).sort((i,n)=>n.intersectionRatio-i.intersectionRatio);if(r[0]){let i=Number(r[0].target.getAttribute("data-page-index"));!isNaN(i)&&i!==this.currentPage&&(this.currentPage=i,this.updateIndicators(),this.options.onPageChange?.(i));}},{root:this.pagesEl,threshold:[.25,.5,.75]}),this.pagesEl.querySelectorAll("[data-page-index]").forEach(t=>this.observer.observe(t)));}scrollToPage(t){let r=this.pagesEl.querySelector(`[data-page-index="${t}"]`);r&&r.scrollIntoView({behavior:"smooth",block:"start"});}applyZoom(){this.pagesEl.style.setProperty("--jdfjs-zoom",String(this.zoom)),this.pagesEl.querySelectorAll(".jdfjs-page").forEach(t=>{t.style.transform=`scale(${this.zoom})`,t.style.transformOrigin="top center";});}setZoom(t){this.zoom=Math.max(.25,Math.min(3,t)),this.applyZoom(),this.updateIndicators();}getZoom(){return this.zoom}goToPage(t){let r=Math.max(0,Math.min(this.doc.pages.length-1,t));this.currentPage=r,this.scrollToPage(r),this.updateIndicators(),this.options.onPageChange?.(r);}getCurrentPage(){return this.currentPage}setDocument(t){if(this.doc=t,this.currentPage=0,this.toolbarEl){let r=this.toolbarEl.querySelector(".jdfjs-title");r&&(r.textContent=t.meta?.title??"Document");}this.sidebarEl&&(this.sidebarEl.innerHTML="",this.buildSidebar().querySelectorAll(".jdfjs-sidebar-thumb").forEach(i=>this.sidebarEl.appendChild(i))),this.renderAllPages(),this.setupScrollObserver(),this.options.onLoad?.(t);}handleFormChange(t,r,i){let n=t.reduce((a,o)=>a==null?a:a[o],this.doc);n!=null&&(n[r]=i,this.options.onFormChange?.(this.doc,{path:t,field:r,value:i}));}*iterFormFields(){for(let t of this.doc.pages||[])for(let r of t.elements||[])!r||typeof r!="object"||(r.type==="input"||r.type==="textarea"||r.type==="checkbox"||r.type==="select"||r.type==="signature")&&typeof r.name=="string"&&r.name.length>0&&(yield {name:r.name,field:r});}toJSON(t={}){return t.pretty===false?JSON.stringify(this.doc):JSON.stringify(this.doc,null,2)}exportJdf(t={}){return new Blob([this.toJSON(t)],{type:"application/jdf+json"})}downloadJdf(t){let r=t||(this.doc.meta?.title?`${this.doc.meta.title.replace(/[^\w\s.-]+/g,"_")}.jdf`:"document.jdf"),i=this.exportJdf(),n=URL.createObjectURL(i),a=window.document.createElement("a");a.href=n,a.download=r,window.document.body.appendChild(a),a.click(),window.document.body.removeChild(a),setTimeout(()=>URL.revokeObjectURL(n),1e3);}getFormValue(t){for(let r of this.iterFormFields())if(r.name===t)return r.field.type==="checkbox"?r.field.checked===true:r.field.type==="select"&&r.field.multiple?r.field.values||[]:r.field.value??""}getFormValues(){let t={};for(let r of this.iterFormFields())r.field.type==="checkbox"?t[r.name]=r.field.checked===true:r.field.type==="select"&&r.field.multiple?t[r.name]=r.field.values||[]:t[r.name]=r.field.value??"";return t}destroy(){this.observer?.disconnect(),this.resizeObs?.disconnect(),this.darkModeMql&&this.darkModeListener&&(this.darkModeMql.removeEventListener("change",this.darkModeListener),this.darkModeMql=null,this.darkModeListener=null),this.windowResizeListener&&typeof window<"u"&&(window.removeEventListener("resize",this.windowResizeListener),this.windowResizeListener=null);let t=dr.get(this.container);t&&(t.abort(),dr.delete(this.container)),this.container.innerHTML="",this.container.classList.remove("jdfjs","jdfjs-dark","jdfjs-loading","jdfjs-error"),this.container.style.removeProperty("width"),this.container.style.removeProperty("height");}getInstance(){let t=this;return {container:this.container,get document(){return t.doc},setZoom:i=>this.setZoom(i),getZoom:()=>this.getZoom(),goToPage:i=>this.goToPage(i),getCurrentPage:()=>this.getCurrentPage(),setDocument:i=>this.setDocument(i),destroy:()=>this.destroy(),exportJdf:i=>this.exportJdf(i),toJSON:i=>this.toJSON(i),downloadJdf:i=>this.downloadJdf(i),getFormValue:i=>this.getFormValue(i),getFormValues:()=>this.getFormValues()}}};function Zf(e){if(typeof e=="string"){let t=document.querySelector(e);if(!t)throw new Error(`jdfjs: container "${e}" not found`);return t}return e}function og(e){return e.replace(/[&<>"']/g,t=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[t])}var oa=new WeakSet,sa=new WeakMap,la=new WeakMap;function sg(e){let t={},r=c=>e.getAttribute(c),i=r("zoom");if(i!=null){let c=Number(i);isNaN(c)||(t.zoom=c);}let n=r("sidebar");n!=null&&(t.sidebar=n!=="false"&&n!=="0");let a=r("toolbar");a!=null&&(t.toolbar=a!=="false"&&a!=="0");let o=r("dark-mode")||r("darkmode");(o==="auto"||o==="light"||o==="dark")&&(t.darkMode=o);let s=r("page");if(s!=null){let c=Number(s);isNaN(c)||(t.initialPage=Math.max(0,Math.floor(c)-1));}let u=r("width");if(u!=null){let c=Number(u);t.width=isNaN(c)?u:c;}let l=r("height");if(l!=null){let c=Number(l);t.height=isNaN(c)?l:c;}let f=r("fit");return (f==="manual"||f==="fit-width"||f==="fit-page")&&(t.fit=f),t}function ui(e){if(oa.has(e)||e.hasAttribute("manual"))return;let t=e.getAttribute("src");if(!t)return;oa.add(e);let r=e;Jf(r);let i=sg(e);aa(r,t,i).then(n=>{sa.set(e,n),lg(r,n);}).catch(n=>{n?.name!=="AbortError"&&(console.error("[jdf.js] failed to embed",t,n),r.dispatchEvent(new CustomEvent("jdf-error",{detail:n,bubbles:true})));}),fg(r);}function lg(e,t){if(!e.hasAttribute("save-button"))return;let r=e.getAttribute("save-button"),i=r&&r.length>0&&r!=="true"?r:"Save",n=e.getAttribute("save-filename")||void 0,a=window.document.createElement("button");a.type="button",a.className="jdfjs-save-button",a.textContent=i,a.addEventListener("click",()=>t.downloadJdf(n)),getComputedStyle(e).position==="static"&&(e.style.position="relative"),e.appendChild(a);}function fa(e){let t=sa.get(e);if(t){try{t.destroy();}catch{}sa.delete(e);}let r=la.get(e);r&&(r.disconnect(),la.delete(e)),oa.delete(e),ua.delete(e);}function Jf(e){let t=e.getAttribute("width");if(t!=null){let i=Number(t);e.style.width=isNaN(i)?t:`${i}px`;}let r=e.getAttribute("height");if(r!=null){let i=Number(r);e.style.height=isNaN(i)?r:`${i}px`;}}var ua=new WeakSet;function fg(e){if(ua.has(e)||typeof MutationObserver>"u")return;ua.add(e);let t=new MutationObserver(r=>{for(let i of r){if(i.type!=="attributes"||!i.attributeName)continue;let n=i.attributeName;n==="src"?(fa(e),ui(e)):(n==="width"||n==="height")&&Jf(e);}});t.observe(e,{attributes:true,attributeFilter:["src","width","height"]}),la.set(e,t);}function da(e=document){e.querySelectorAll("jdf").forEach(ui);}function Wf(){if(typeof MutationObserver>"u")return;new MutationObserver(t=>{for(let r of t)r.addedNodes.forEach(i=>{i instanceof Element&&(i.tagName.toLowerCase()==="jdf"?ui(i):typeof i.querySelectorAll=="function"&&i.querySelectorAll("jdf").forEach(ui));}),r.removedNodes.forEach(i=>{i instanceof Element&&(i.tagName.toLowerCase()==="jdf"?fa(i):typeof i.querySelectorAll=="function"&&i.querySelectorAll("jdf").forEach(fa));});}).observe(document.body,{childList:true,subtree:true});}function ug(e=document){da(e);}function dg(){typeof window>"u"||typeof document>"u"||window.JDFjsAutoInit!==false&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{da(),Wf();},{once:true}):(da(),Wf()));}dg();export{fi as JDFViewer,aa as embed,ug as jdf,Hf as render};//# sourceMappingURL=jdfjs.js.map
13
13
  //# sourceMappingURL=jdfjs.js.map