@uurtech/jdf 0.2.1 → 0.2.3
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.cjs +4 -4
- package/dist/jdfjs.cjs.map +1 -1
- package/dist/jdfjs.css +3 -0
- package/dist/jdfjs.js +4 -4
- package/dist/jdfjs.js.map +1 -1
- package/package.json +1 -1
- package/src/jdfjs.css +3 -0
- package/src/renderers/element.ts +11 -1
- package/src/utils/style.ts +3 -0
package/dist/jdfjs.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var Yf=Object.create;var di=Object.defineProperty;var Kf=Object.getOwnPropertyDescriptor;var Gf=Object.getOwnPropertyNames;var Qf=Object.getPrototypeOf,eu=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 b=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),tu=(e,t)=>{for(var r in t)di(e,r,{get:t[r],enumerable:true});},ru=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Gf(t))!eu.call(e,n)&&n!==r&&di(e,n,{get:()=>t[n],enumerable:!(i=Kf(t,n))||i.enumerable});return e};var iu=(e,t,r)=>(r=e!=null?Yf(Qf(e)):{},ru(di(r,"default",{value:e,enumerable:true}),e));var ma=Rt(()=>{});function M(e,t="mm"){switch(t){case "mm":return e*ga;case "in":return e*au;case "pt":return e*ou;case "px":return e;default:return e*ga}}function ba(e,t="portrait"){let r=typeof e=="string"?nu[e]:e;return t==="landscape"?{width:r.height,height:r.width}:{...r}}var nu,va,ga,au,ou,ya=Rt(()=>{nu={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}},va={top:25,right:20,bottom:25,left:20},ga=3.7795275591,au=96,ou=1.3333333333;});function lu(e){let t=e.lastIndexOf(".");return t<0?"":e.slice(t+1).toLowerCase()}function xa(e){return su[lu(e)]||"application/octet-stream"}function Ea(e){return typeof e=="string"&&/^video\//i.test(e)}var ci,_a,wa,su,Sa=Rt(()=>{ci="document.json",_a="manifest.json",wa="assets",su=Object.freeze({png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",svg:"image/svg+xml",bmp:"image/bmp",mp4:"video/mp4",m4v:"video/mp4",webm:"video/webm",mov:"video/quicktime",woff:"font/woff",woff2:"font/woff2",ttf:"font/ttf",otf:"font/otf"});});var mr=Rt(()=>{ma();ya();Sa();});var Lt=b((Mm,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:Du}:gi.exports=process;function Du(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 La=b((Nm,Ra)=>{var ju={}.toString;Ra.exports=Array.isArray||function(e){return ju.call(e)=="[object Array]"};});var vi=b((zm,Oa)=>{Oa.exports=ve("stream");});var Ot=b((bi,Ia)=>{var br=ve("buffer"),ye=br.Buffer;function Fa(e,t){for(var r in e)t[r]=e[r];}ye.from&&ye.alloc&&ye.allocUnsafe&&ye.allocUnsafeSlow?Ia.exports=br:(Fa(br,bi),bi.Buffer=rt);function rt(e,t,r){return ye(e,t,r)}Fa(ye,rt);rt.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return ye(e,t,r)};rt.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=ye(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 ye(e)};rt.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return br.SlowBuffer(e)};});var it=b(J=>{function Mu(e){return Array.isArray?Array.isArray(e):yr(e)==="[object Array]"}J.isArray=Mu;function Nu(e){return typeof e=="boolean"}J.isBoolean=Nu;function zu(e){return e===null}J.isNull=zu;function Pu(e){return e==null}J.isNullOrUndefined=Pu;function Bu(e){return typeof e=="number"}J.isNumber=Bu;function qu(e){return typeof e=="string"}J.isString=qu;function Uu(e){return typeof e=="symbol"}J.isSymbol=Uu;function Hu(e){return e===void 0}J.isUndefined=Hu;function Zu(e){return yr(e)==="[object RegExp]"}J.isRegExp=Zu;function Wu(e){return typeof e=="object"&&e!==null}J.isObject=Wu;function Ju(e){return yr(e)==="[object Date]"}J.isDate=Ju;function $u(e){return yr(e)==="[object Error]"||e instanceof Error}J.isError=$u;function Vu(e){return typeof e=="function"}J.isFunction=Vu;function Xu(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}J.isPrimitive=Xu;J.isBuffer=ve("buffer").Buffer.isBuffer;function yr(e){return Object.prototype.toString.call(e)}});var Da=b((Bm,yi)=>{typeof Object.create=="function"?yi.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:false,writable:true,configurable:true}}));}:yi.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=b((qm,wi)=>{try{if(_i=ve("util"),typeof _i.inherits!="function")throw "";wi.exports=_i.inherits;}catch{wi.exports=Da();}var _i;});var Ma=b((Um,xi)=>{function Yu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var ja=Ot().Buffer,Ft=ve("util");function Ku(e,t,r){e.copy(t,r);}xi.exports=(function(){function e(){Yu(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 ja.alloc(0);for(var i=ja.allocUnsafe(r>>>0),n=this.head,a=0;n;)Ku(n.data,i,a),a+=n.data.length,n=n.next;return i},e})();Ft&&Ft.inspect&&Ft.inspect.custom&&(xi.exports.prototype[Ft.inspect.custom]=function(){var e=Ft.inspect({length:this.length});return this.constructor.name+" "+e});});var Ei=b((Hm,Na)=>{var _r=Lt();function Gu(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,_r.nextTick(wr,this,e)):_r.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,_r.nextTick(wr,r,a)):_r.nextTick(wr,r,a):t&&t(a);}),this)}function Qu(){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);}Na.exports={destroy:Gu,undestroy:Qu};});var Pa=b((Zm,za)=>{za.exports=ve("util").deprecate;});var ki=b((Wm,$a)=>{var Be=Lt();$a.exports=z;function qa(e){var t=this;this.next=null,this.entry=null,this.finish=function(){vd(t,e);};}var ed=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:Be.nextTick,at;z.WritableState=Dt;var Ua=Object.create(it());Ua.inherits=nt();var td={deprecate:Pa()},Ha=vi(),Er=Ot().Buffer,rd=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function id(e){return Er.from(e)}function nd(e){return Er.isBuffer(e)||e instanceof rd}var Za=Ei();Ua.inherits(z,Ha);function ad(){}function Dt(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){cd(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 qa(this);}Dt.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(Dt.prototype,"buffer",{get:td.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 Dt}})):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 Dt(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)),Ha.call(this);}z.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"));};function od(e,t){var r=new Error("write after end");e.emit("error",r),Be.nextTick(t,r);}function sd(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&&nd(e);return a&&!Er.isBuffer(e)&&(e=id(e)),typeof t=="function"&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),typeof r!="function"&&(r=ad),i.ended?od(this,r):(a||sd(this,i,e,r))&&(i.pendingcb++,n=fd(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&&Wa(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 ld(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 fd(e,t,r,i,n,a){if(!r){var o=ld(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 Si(e,t,false,s,i,n,a);return u}function Si(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 ud(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 dd(e){e.writing=false,e.writecb=null,e.length-=e.writelen,e.writelen=0;}function cd(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(dd(r),t)ud(e,r,i,t,n);else {var a=Ja(r);!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Wa(e,r),i?ed(Ba,e,r,a,n):Ba(e,r,a,n);}}function Ba(e,t,r,i){r||hd(e,t),t.pendingcb--,i(),It(e,t);}function hd(e,t){t.length===0&&t.needDrain&&(t.needDrain=false,e.emit("drain"));}function Wa(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,Si(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 qa(t),t.bufferedRequestCount=0;}else {for(;r;){var u=r.chunk,l=r.encoding,f=r.callback,h=t.objectMode?1:u.length;if(Si(e,t,false,h,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||gd(this,i,r);};function Ja(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function pd(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=true,e.emit("prefinish"),It(e,t);});}function md(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"?(t.pendingcb++,t.finalCalled=true,Be.nextTick(pd,e,t)):(t.prefinished=true,e.emit("prefinish")));}function It(e,t){var r=Ja(t);return r&&(md(e,t),t.pendingcb===0&&(t.finished=true,e.emit("finish"))),r}function gd(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 vd(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=Za.destroy;z.prototype._undestroy=Za.undestroy;z.prototype._destroy=function(e,t){this.end(),t(e);};});var qe=b((Jm,Ka)=>{var Va=Lt(),bd=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};Ka.exports=_e;var Xa=Object.create(it());Xa.inherits=nt();var Ya=Ai(),Ci=ki();Xa.inherits(_e,Ya);for(Ti=bd(Ci.prototype),Sr=0;Sr<Ti.length;Sr++)kr=Ti[Sr],_e.prototype[kr]||(_e.prototype[kr]=Ci.prototype[kr]);var Ti,kr,Sr;function _e(e){if(!(this instanceof _e))return new _e(e);Ya.call(this,e),Ci.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",yd);}Object.defineProperty(_e.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}});function yd(){this.allowHalfOpen||this._writableState.ended||Va.nextTick(_d,this);}function _d(e){e.end();}Object.defineProperty(_e.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);}});_e.prototype._destroy=function(e,t){this.push(null),this.end(),Va.nextTick(t,e);};});var Oi=b(Qa=>{var Li=Ot().Buffer,Ga=Li.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 wd(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 xd(e){var t=wd(e);if(typeof t!="string"&&(Li.isEncoding===Ga||!Ga(e)))throw new Error("Unknown encoding: "+e);return t||e}Qa.StringDecoder=jt;function jt(e){this.encoding=xd(e);var t;switch(this.encoding){case "utf16le":this.text=Ad,this.end=Rd,t=4;break;case "utf8":this.fillLast=kd,t=4;break;case "base64":this.text=Ld,this.end=Od,t=3;break;default:this.write=Fd,this.end=Id;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Li.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=Cd;jt.prototype.text=Td;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 Ri(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function Ed(e,t,r){var i=t.length-1;if(i<r)return 0;var n=Ri(t[i]);return n>=0?(n>0&&(e.lastNeed=n-1),n):--i<r||n===-2?0:(n=Ri(t[i]),n>=0?(n>0&&(e.lastNeed=n-2),n):--i<r||n===-2?0:(n=Ri(t[i]),n>=0?(n>0&&(n===2?n=0:e.lastNeed=n-3),n):0))}function Sd(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 kd(e){var t=this.lastTotal-this.lastNeed,r=Sd(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 Td(e,t){var r=Ed(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 Cd(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function Ad(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 Rd(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 Ld(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 Od(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function Fd(e){return e.toString(this.encoding)}function Id(e){return e&&e.length?this.write(e):""}});var Ai=b((Xm,co)=>{var st=Lt();co.exports=I;var Dd=La(),Mt;I.ReadableState=oo;ve("events").EventEmitter;var io=function(e,t){return e.listeners(t).length},Mi=vi(),Nt=Ot().Buffer,jd=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Md(e){return Nt.from(e)}function Nd(e){return Nt.isBuffer(e)||e instanceof jd}var no=Object.create(it());no.inherits=nt();var Fi=ve("util"),L=void 0;Fi&&Fi.debuglog?L=Fi.debuglog("stream"):L=function(){};var zd=Ma(),ao=Ei(),ot;no.inherits(I,Mi);var Ii=["error","close","destroy","pause","resume"];function Pd(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Dd(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]];}function oo(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 zd,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=Oi().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 oo(e,this),this.readable=true,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),Mi.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=ao.destroy;I.prototype._undestroy=ao.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),so(this,e,t,false,i)};I.prototype.unshift=function(e){return so(this,e,null,true,false)};function so(e,t,r,i,n){var a=e._readableState;if(t===null)a.reading=false,Hd(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)!==Nt.prototype&&(t=Md(t)),i?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):Di(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?Di(e,a,t,false):lo(e,a)):Di(e,a,t,false))):i||(a.reading=false);}return qd(a)}function Di(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)),lo(e,t);}function Bd(e,t){var r;return !Nd(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function qd(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=Oi().StringDecoder),this._readableState.decoder=new ot(e),this._readableState.encoding=e,this};var eo=8388608;function Ud(e){return e>=eo?e=eo:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function to(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=Ud(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?ji(this):Tr(this),null;if(e=to(e,t),e===0&&t.ended)return t.length===0&&ji(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=to(r,t)));var n;return e>0?n=fo(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&&ji(this)),n!==null&&this.emit("data",n),n};function Hd(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(ro,e):ro(e));}function ro(e){L("emit readable"),e.emit("readable"),Ni(e);}function lo(e,t){t.readingMore||(t.readingMore=true,st.nextTick(Zd,e,t));}function Zd(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(m,g){L("onunpipe"),m===r&&g&&g.hasUnpiped===false&&(g.hasUnpiped=true,f());}function s(){L("onend"),e.end();}var u=Wd(r);e.on("drain",u);var l=false;function f(){L("cleanup"),e.removeListener("close",p),e.removeListener("finish",y),e.removeListener("drain",u),e.removeListener("error",c),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 h=false;r.on("data",d);function d(m){L("ondata"),h=false;var g=e.write(m);g===false&&!h&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&uo(i.pipes,e)!==-1)&&!l&&(L("false write response, pause",i.awaitDrain),i.awaitDrain++,h=true),r.pause());}function c(m){L("onerror",m),_(),e.removeListener("error",c),io(e,"error")===0&&e.emit("error",m);}Pd(e,"error",c);function p(){e.removeListener("finish",y),_();}e.once("close",p);function y(){L("onfinish"),e.removeListener("close",p),_();}e.once("finish",y);function _(){L("unpipe"),r.unpipe(e);}return e.emit("pipe",r),i.flowing||(L("pipe resume"),r.resume()),e};function Wd(e){return function(){var t=e._readableState;L("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&io(e,"data")&&(t.flowing=true,Ni(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=uo(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=Mi.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(Jd,this));}return r};I.prototype.addListener=I.prototype.on;function Jd(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,$d(this,e)),this};function $d(e,t){t.resumeScheduled||(t.resumeScheduled=true,st.nextTick(Vd,e,t));}function Vd(e,t){t.reading||(L("resume read 0"),e.read(0)),t.resumeScheduled=false,t.awaitDrain=0,e.emit("resume"),Ni(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 Ni(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<Ii.length;a++)e.on(Ii[a],this.emit.bind(this,Ii[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=fo;function fo(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=Xd(e,t.buffer,t.decoder),r}function Xd(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?Yd(e,t):Kd(e,t),i}function Yd(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 Kd(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 ji(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(Gd,t,e));}function Gd(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=true,t.readable=false,t.emit("end"));}function uo(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return -1}});var zi=b((Ym,mo)=>{mo.exports=we;var Cr=qe(),po=Object.create(it());po.inherits=nt();po.inherits(we,Cr);function Qd(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:Qd.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",ec);}function ec(){var e=this;typeof this._flush=="function"?this._flush(function(t,r){ho(e,t,r);}):ho(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 ho(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 yo=b((Km,bo)=>{bo.exports=zt;var go=zi(),vo=Object.create(it());vo.inherits=nt();vo.inherits(zt,go);function zt(e){if(!(this instanceof zt))return new zt(e);go.call(this,e);}zt.prototype._transform=function(e,t,r){r(null,e);};});var Pi=b((H,Ar)=>{var ue=ve("stream");process.env.READABLE_STREAM==="disable"&&ue?(Ar.exports=ue,H=Ar.exports=ue.Readable,H.Readable=ue.Readable,H.Writable=ue.Writable,H.Duplex=ue.Duplex,H.Transform=ue.Transform,H.PassThrough=ue.PassThrough,H.Stream=ue):(H=Ar.exports=Ai(),H.Stream=ue||H,H.Readable=H,H.Writable=ki(),H.Duplex=qe(),H.Transform=zi(),H.PassThrough=yo());});var xe=b(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 {Bi=new ArrayBuffer(0);try{G.blob=new Blob([Bi],{type:"application/zip"}).size===0;}catch{try{_o=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,qi=new _o,qi.append(Bi),G.blob=qi.getBlob("application/zip").size===0;}catch{G.blob=false;}}}var Bi,_o,qi;try{G.nodestream=!!Pi().Readable;}catch{G.nodestream=false;}});var Hi=b(Ui=>{var tc=j(),rc=xe(),de="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";Ui.encode=function(e){for(var t=[],r,i,n,a,o,s,u,l=0,f=e.length,h=f,d=tc.getTypeOf(e)!=="string";l<e.length;)h=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=h>1?(i&15)<<2|n>>6:64,u=h>2?n&63:64,t.push(de.charAt(a)+de.charAt(o)+de.charAt(s)+de.charAt(u));return t.join("")};Ui.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 h=e.length*3/4;if(e.charAt(e.length-1)===de.charAt(64)&&h--,e.charAt(e.length-2)===de.charAt(64)&&h--,h%1!==0)throw new Error("Invalid base64 input, bad content length.");var d;for(rc.uint8array?d=new Uint8Array(h|0):d=new Array(h|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=b((eg,wo)=>{wo.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 ko=b((tg,So)=>{var xo=global.MutationObserver||global.WebKitMutationObserver,lt;process.browser?xo?(Zi=0,Eo=new xo(Bt),Wi=global.document.createTextNode(""),Eo.observe(Wi,{characterData:true}),lt=function(){Wi.data=Zi=++Zi%2;}):!global.setImmediate&&typeof global.MessageChannel<"u"?(Ji=new global.MessageChannel,Ji.port1.onmessage=Bt,lt=function(){Ji.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 Zi,Eo,Wi,Ji,$i,qt=[];function Bt(){$i=true;for(var e,t,r=qt.length;r;){for(t=qt,qt=[],e=-1;++e<r;)t[e]();r=qt.length;}$i=false;}So.exports=ic;function ic(e){qt.push(e)===1&&!$i&<();}});var Fo=b((rg,Oo)=>{var To=ko();function ft(){}var $={},Co=["REJECTED"],Vi=["FULFILLED"],Ao=["PENDING"];process.browser||(Ut=["UNHANDLED"]);var Ut;Oo.exports=Re;function Re(e){if(typeof e!="function")throw new TypeError("resolver must be a function");this.state=Ao,this.queue=[],this.outcome=void 0,process.browser||(this.handled=Ut),e!==ft&&Ro(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===Vi||typeof t!="function"&&this.state===Co)return this;var r=new this.constructor(ft);if(process.browser||this.handled===Ut&&(this.handled=null),this.state!==Ao){var i=this.state===Vi?e:t;Xi(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){$.resolve(this.promise,e);};Ht.prototype.otherCallFulfilled=function(e){Xi(this.promise,this.onFulfilled,e);};Ht.prototype.callRejected=function(e){$.reject(this.promise,e);};Ht.prototype.otherCallRejected=function(e){Xi(this.promise,this.onRejected,e);};function Xi(e,t,r){To(function(){var i;try{i=t(r);}catch(n){return $.reject(e,n)}i===e?$.reject(e,new TypeError("Cannot resolve promise with itself")):$.resolve(e,i);});}$.resolve=function(e,t){var r=Lo(nc,t);if(r.status==="error")return $.reject(e,r.value);var i=r.value;if(i)Ro(e,i);else {e.state=Vi,e.outcome=t;for(var n=-1,a=e.queue.length;++n<a;)e.queue[n].callFulfilled(t);}return e};$.reject=function(e,t){e.state=Co,e.outcome=t,process.browser||e.handled===Ut&&To(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 nc(e){var t=e&&e.then;if(e&&(typeof e=="object"||typeof e=="function")&&typeof t=="function")return function(){t.apply(e,arguments);}}function Ro(e,t){var r=false;function i(s){r||(r=true,$.reject(e,s));}function n(s){r||(r=true,$.resolve(e,s));}function a(){t(n,i);}var o=Lo(a);o.status==="error"&&i(o.value);}function Lo(e,t){var r={};try{r.value=e(t),r.status="success";}catch(i){r.status="error",r.value=i;}return r}Re.resolve=ac;function ac(e){return e instanceof this?e:$.resolve(new this(ft),e)}Re.reject=oc;function oc(e){var t=new this(ft);return $.reject(t,e)}Re.all=sc;function sc(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(h,function(d){i||(i=true,$.reject(s,d));});function h(d){n[f]=d,++a===r&&!i&&(i=true,$.resolve(s,n));}}}Re.race=lc;function lc(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,$.resolve(a,u));},function(u){i||(i=true,$.reject(a,u));});}}});var ut=b((ig,Io)=>{var Yi=null;typeof Promise<"u"?Yi=Promise:Yi=Fo();Io.exports={Promise:Yi};});var jo=b(Do=>{(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),v=0;v<x.length;v++)x[v]=arguments[v+1];var w={callback:g,args:x};return i[r]=w,o(r),r++}function u(g){delete i[g];}function l(g){var x=g.callback,v=g.args;switch(v.length){case 0:x();break;case 1:x(v[0]);break;case 2:x(v[0],v[1]);break;case 3:x(v[0],v[1],v[2]);break;default:x.apply(t,v);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 h(){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 c(){var g="setImmediate$"+Math.random()+"$",x=function(v){v.source===e&&typeof v.data=="string"&&v.data.indexOf(g)===0&&f(+v.data.slice(g.length));};e.addEventListener?e.addEventListener("message",x,false):e.attachEvent("onmessage",x),o=function(v){e.postMessage(g+v,"*");};}function p(){var g=new MessageChannel;g.port1.onmessage=function(x){var v=x.data;f(v);},o=function(x){g.port2.postMessage(x);};}function y(){var g=a.documentElement;o=function(x){var v=a.createElement("script");v.onreadystatechange=function(){f(x),v.onreadystatechange=null,g.removeChild(v),v=null;},g.appendChild(v);};}function _(){o=function(g){setTimeout(f,0,g);};}var m=Object.getPrototypeOf&&Object.getPrototypeOf(e);m=m&&m.setTimeout?m:e,{}.toString.call(e.process)==="[object process]"?h():d()?c():e.MessageChannel?p():a&&"onreadystatechange"in a.createElement("script")?y():_(),m.setImmediate=s,m.clearImmediate=u;})(typeof self>"u"?typeof global>"u"?Do:global:self);});var j=b(P=>{var Le=xe(),fc=Hi(),dt=Pt(),Ki=ut();jo();function uc(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=Ki.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 Ki.Promise(function(u,l){var f=new FileReader;f.onload=function(h){u(h.target.result);},f.onerror=function(h){l(h.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=fc.decode(o):r&&i!==true&&(o=uc(o))),o):Ki.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})};});var Q=b((og,No)=>{function Mo(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;}Mo.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}};No.exports=Mo;});var ht=b(Fe=>{var ct=j(),Ue=xe(),dc=Pt(),Fr=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 cc=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},hc=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},pc=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),ct.applyFromCharCode(o)};Fe.utf8encode=function(t){return Ue.nodebuffer?dc.newBufferFrom(t,"utf-8"):cc(t)};Fe.utf8decode=function(t){return Ue.nodebuffer?ct.transformTo("nodebuffer",t).toString("utf-8"):(t=ct.transformTo(Ue.uint8array?"uint8array":"array",t),pc(t))};function Ir(){Fr.call(this,"utf-8 decode"),this.leftOver=null;}ct.inherits(Ir,Fr);Ir.prototype.processChunk=function(e){var t=ct.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=hc(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:Fe.utf8decode(n),meta:e.meta});};Ir.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:Fe.utf8decode(this.leftOver),meta:{}}),this.leftOver=null);};Fe.Utf8DecodeWorker=Ir;function Gi(){Fr.call(this,"utf-8 encode");}ct.inherits(Gi,Fr);Gi.prototype.processChunk=function(e){this.push({data:Fe.utf8encode(e.data),meta:e.meta});};Fe.Utf8EncodeWorker=Gi;});var qo=b((lg,Bo)=>{var zo=Q(),Po=j();function Qi(e){zo.call(this,"ConvertWorker to "+e),this.destType=e;}Po.inherits(Qi,zo);Qi.prototype.processChunk=function(e){this.push({data:Po.transformTo(this.destType,e.data),meta:e.meta});};Bo.exports=Qi;});var Zo=b((fg,Ho)=>{var Uo=Pi().Readable,mc=j();mc.inherits(en,Uo);function en(e,t,r){Uo.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);});}en.prototype._read=function(){this._helper.resume();};Ho.exports=en;});var tn=b((ug,$o)=>{var He=j(),gc=qo(),vc=Q(),bc=Hi(),yc=xe(),_c=ut(),Wo=null;if(yc.nodestream)try{Wo=Zo();}catch{}function wc(e,t,r){switch(e){case "blob":return He.newBlob(He.transformTo("arraybuffer",t),r);case "base64":return bc.encode(t);default:return He.transformTo(e,t)}}function xc(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 Ec(e,t){return new _c.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=wc(o,xc(a,n),s);r(u);}catch(l){i(l);}n=[];}).resume();})}function Jo(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 gc(i)),e.lock();}catch(n){this._worker=new vc("error"),this._worker.error(n);}}Jo.prototype={accumulate:function(e){return Ec(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 Wo(this,{objectMode:this._outputType!=="nodebuffer"},e)}};$o.exports=Jo;});var rn=b(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 nn=b((cg,Vo)=>{var Dr=j(),jr=Q(),Sc=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=Dr.getTypeOf(r),t.isPaused||t._tickAndRepeat();},function(r){t.error(r);});}Dr.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,Dr.delay(this._tickAndRepeat,[],this)),true):false};pt.prototype._tickAndRepeat=function(){this._tickScheduled=false,!(this.isPaused||this.isFinished)&&(this._tick(),this.isFinished||(Dr.delay(this._tickAndRepeat,[],this),this._tickScheduled=true));};pt.prototype._tick=function(){if(this.isPaused||this.isFinished)return false;var e=Sc,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}})};Vo.exports=pt;});var Mr=b((hg,Yo)=>{var kc=j();function Tc(){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 Xo=Tc();function Cc(e,t,r,i){var n=Xo,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 Ac(e,t,r,i){var n=Xo,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}Yo.exports=function(t,r){if(typeof t>"u"||!t.length)return 0;var i=kc.getTypeOf(t)!=="string";return i?Cc(r|0,t,t.length,0):Ac(r|0,t,t.length,0)};});var on=b((pg,Go)=>{var Ko=Q(),Rc=Mr(),Lc=j();function an(){Ko.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0);}Lc.inherits(an,Ko);an.prototype.processChunk=function(e){this.streamInfo.crc32=Rc(e.data,this.streamInfo.crc32||0),this.push(e);};Go.exports=an;});var es=b((mg,Qo)=>{var Oc=j(),sn=Q();function ln(e){sn.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0);}Oc.inherits(ln,sn);ln.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length;}sn.prototype.processChunk.call(this,e);};Qo.exports=ln;});var Nr=b((gg,is)=>{var ts=ut(),rs=nn(),Fc=on(),fn=es();function un(e,t,r,i,n){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=i,this.compressedContent=n;}un.prototype={getContentWorker:function(){var e=new rs(ts.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new fn("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 rs(ts.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}};un.createWorkerFrom=function(e,t,r){return e.pipe(new Fc).pipe(new fn("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new fn("compressedSize")).withStreamInfo("compression",t)};is.exports=un;});var ss=b((vg,os)=>{var Ic=tn(),Dc=nn(),dn=ht(),cn=Nr(),ns=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 dn.Utf8EncodeWorker)),!n&&i&&(t=t.pipe(new dn.Utf8DecodeWorker));}catch(a){t=new ns("error"),t.error(a);}return new Ic(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 cn&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new dn.Utf8EncodeWorker)),cn.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof cn?this._data.getContentWorker():this._data instanceof ns?this._data:new Dc(this._data)}};var as=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],jc=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")};for(zr=0;zr<as.length;zr++)hn.prototype[as[zr]]=jc;var zr;os.exports=hn;});var Se=b(V=>{var Mc=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function Nc(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)Nc(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 zc={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}},Pc={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,zc)):(V.Buf8=Array,V.Buf16=Array,V.Buf32=Array,V.assign(V,Pc));};V.setTyped(Mc);});var Ls=b(vt=>{var Bc=Se(),qc=4,ls=0,fs=1,Uc=2;function gt(e){for(var t=e.length;--t>=0;)e[t]=0;}var Hc=0,ms=1,Zc=2,Wc=3,Jc=258,_n=29,Gt=256,Vt=Gt+1+_n,mt=30,wn=19,gs=2*Vt+1,Ze=15,pn=16,$c=7,xn=256,vs=16,bs=17,ys=18,bn=[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],Vc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],_s=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Xc=512,ke=new Array((Vt+2)*2);gt(ke);var $t=new Array(mt*2);gt($t);var Xt=new Array(Xc);gt(Xt);var Yt=new Array(Jc-Wc+1);gt(Yt);var En=new Array(_n);gt(En);var Br=new Array(mt);gt(Br);function mn(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 ws,xs,Es;function gn(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t;}function Ss(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>pn-r?(e.bi_buf|=t<<e.bi_valid&65535,Kt(e,e.bi_buf),e.bi_buf=t>>pn-e.bi_valid,e.bi_valid+=r-pn):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r);}function ce(e,t,r){Y(e,r[t*2],r[t*2+1]);}function ks(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function Yc(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 Kc(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,h,d,c,p,y=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<gs;l++)f=e.heap[l],d=r[r[f*2+1]*2+1]+1,d>u&&(d=u,y++),r[f*2+1]=d,!(f>i)&&(e.bl_count[d]++,c=0,f>=s&&(c=o[f-s]),p=r[f*2],e.opt_len+=p*(d+c),a&&(e.static_len+=p*(n[f*2+1]+c)));if(y!==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]--,y-=2;}while(y>0);for(d=u;d!==0;d--)for(f=e.bl_count[d];f!==0;)h=e.heap[--l],!(h>i)&&(r[h*2+1]!==d&&(e.opt_len+=(d-r[h*2+1])*r[h*2],r[h*2+1]=d),f--);}}function Ts(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]=ks(i[s]++,s));}}function Gc(){var e,t,r,i,n,a=new Array(Ze+1);for(r=0,i=0;i<_n-1;i++)for(En[i]=r,e=0;e<1<<bn[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<mt;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(Ts(ke,Vt+1,a),e=0;e<mt;e++)$t[e*2+1]=5,$t[e*2]=ks(e,5);ws=new mn(ke,bn,Gt+1,Vt,Ze),xs=new mn($t,Pr,0,mt,Ze),Es=new mn(new Array(0),Vc,0,wn,$c);}function Cs(e){var t;for(t=0;t<Vt;t++)e.dyn_ltree[t*2]=0;for(t=0;t<mt;t++)e.dyn_dtree[t*2]=0;for(t=0;t<wn;t++)e.bl_tree[t*2]=0;e.dyn_ltree[xn*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0;}function As(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 Qc(e,t,r,i){As(e),(Kt(e,r),Kt(e,~r)),Bc.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r;}function us(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 vn(e,t,r){for(var i=e.heap[r],n=r<<1;n<=e.heap_len&&(n<e.heap_len&&us(t,e.heap[n+1],e.heap[n],e.depth)&&n++,!us(t,i,e.heap[n],e.depth));)e.heap[r]=e.heap[n],r=n,n<<=1;e.heap[r]=i;}function ds(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?ce(e,n,t):(o=Yt[n],ce(e,o+Gt+1,t),s=bn[o],s!==0&&(n-=En[o],Y(e,n,s)),i--,o=Ss(i),ce(e,o,r),s=Pr[o],s!==0&&(i-=Br[o],Y(e,i,s)));while(a<e.last_lit);ce(e,xn,t);}function yn(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=gs,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--)vn(e,r,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],vn(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++,vn(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],Kc(e,t),Ts(r,u,e.bl_count);}function cs(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[vs*2]++):s<=10?e.bl_tree[bs*2]++:e.bl_tree[ys*2]++,s=0,n=a,o===0?(u=138,l=3):a===o?(u=6,l=3):(u=7,l=4));}function hs(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 ce(e,a,e.bl_tree);while(--s!==0);else a!==0?(a!==n&&(ce(e,a,e.bl_tree),s--),ce(e,vs,e.bl_tree),Y(e,s-3,2)):s<=10?(ce(e,bs,e.bl_tree),Y(e,s-3,3)):(ce(e,ys,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 eh(e){var t;for(cs(e,e.dyn_ltree,e.l_desc.max_code),cs(e,e.dyn_dtree,e.d_desc.max_code),yn(e,e.bl_desc),t=wn-1;t>=3&&e.bl_tree[_s[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function th(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[_s[n]*2+1],3);hs(e,e.dyn_ltree,t-1),hs(e,e.dyn_dtree,r-1);}function rh(e){var t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return ls;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return fs;for(r=32;r<Gt;r++)if(e.dyn_ltree[r*2]!==0)return fs;return ls}var ps=false;function ih(e){ps||(Gc(),ps=true),e.l_desc=new gn(e.dyn_ltree,ws),e.d_desc=new gn(e.dyn_dtree,xs),e.bl_desc=new gn(e.bl_tree,Es),e.bi_buf=0,e.bi_valid=0,Cs(e);}function Rs(e,t,r,i){Y(e,(Hc<<1)+(i?1:0),3),Qc(e,t,r);}function nh(e){Y(e,ms<<1,3),ce(e,xn,ke),Yc(e);}function ah(e,t,r,i){var n,a,o=0;e.level>0?(e.strm.data_type===Uc&&(e.strm.data_type=rh(e)),yn(e,e.l_desc),yn(e,e.d_desc),o=eh(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?Rs(e,t,r,i):e.strategy===qc||a===n?(Y(e,(ms<<1)+(i?1:0),3),ds(e,ke,$t)):(Y(e,(Zc<<1)+(i?1:0),3),th(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),ds(e,e.dyn_ltree,e.dyn_dtree)),Cs(e),i&&As(e);}function oh(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[Ss(t)*2]++),e.last_lit===e.lit_bufsize-1}vt._tr_init=ih;vt._tr_stored_block=Rs;vt._tr_flush_block=ah;vt._tr_tally=oh;vt._tr_align=nh;});var Sn=b((_g,Os)=>{function sh(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}Os.exports=sh;});var kn=b((wg,Fs)=>{function lh(){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 fh=lh();function uh(e,t,r,i){var n=fh,a=i+r;e^=-1;for(var o=i;o<a;o++)e=e>>>8^n[(e^t[o])&255];return e^-1}Fs.exports=uh;});var qr=b((xg,Is)=>{Is.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 Us=b(me=>{var X=Se(),te=Ls(),Ns=Sn(),Ie=kn(),dh=qr(),Ve=0,ch=1,hh=3,ze=4,Ds=5,pe=0,js=1,re=-2,ph=-3,Tn=-5,mh=-1,gh=1,Ur=2,vh=3,bh=4,yh=0,_h=2,Jr=8,wh=9,xh=15,Eh=8,Sh=29,kh=256,An=kh+1+Sh,Th=30,Ch=19,Ah=2*An+1,Rh=15,A=3,Me=258,oe=Me+A+1,Lh=32,$r=42,Rn=69,Hr=73,Zr=91,Wr=103,We=113,er=666,U=1,tr=2,Je=3,_t=4,Oh=3;function Ne(e,t){return e.msg=dh[t],t}function Ms(e){return (e<<1)-(e>4?9:0)}function je(e){for(var t=e.length;--t>=0;)e[t]=0;}function De(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 Z(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,De(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 Fh(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=Ns(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 zs(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,h=e.prev,d=e.strstart+Me,c=l[i+o-1],p=l[i+o];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do if(n=t,!(l[n+o]!==p||l[n+o-1]!==c||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;c=l[i+o-1],p=l[i+o];}}while((t=h[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=Fh(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 Ih(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 U;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,Z(e,false),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-oe&&(Z(e,false),e.strm.avail_out===0))return U}return e.insert=0,t===ze?(Z(e,true),e.strm.avail_out===0?Je:_t):(e.strstart>e.block_start&&(Z(e,false),e.strm.avail_out===0),U)}function Cn(e,t){for(var r,i;;){if(e.lookahead<oe){if($e(e),e.lookahead<oe&&t===Ve)return U;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=zs(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&&(Z(e,false),e.strm.avail_out===0))return U}return e.insert=e.strstart<A-1?e.strstart:A-1,t===ze?(Z(e,true),e.strm.avail_out===0?Je:_t):e.last_lit&&(Z(e,false),e.strm.avail_out===0)?U:tr}function bt(e,t){for(var r,i,n;;){if(e.lookahead<oe){if($e(e),e.lookahead<oe&&t===Ve)return U;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=zs(e,r),e.match_length<=5&&(e.strategy===gh||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&&(Z(e,false),e.strm.avail_out===0))return U}else if(e.match_available){if(i=te._tr_tally(e,0,e.window[e.strstart-1]),i&&Z(e,false),e.strstart++,e.lookahead--,e.strm.avail_out===0)return U}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?(Z(e,true),e.strm.avail_out===0?Je:_t):e.last_lit&&(Z(e,false),e.strm.avail_out===0)?U:tr}function Dh(e,t){for(var r,i,n,a,o=e.window;;){if(e.lookahead<=Me){if($e(e),e.lookahead<=Me&&t===Ve)return U;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&&(Z(e,false),e.strm.avail_out===0))return U}return e.insert=0,t===ze?(Z(e,true),e.strm.avail_out===0?Je:_t):e.last_lit&&(Z(e,false),e.strm.avail_out===0)?U:tr}function jh(e,t){for(var r;;){if(e.lookahead===0&&($e(e),e.lookahead===0)){if(t===Ve)return U;break}if(e.match_length=0,r=te._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(Z(e,false),e.strm.avail_out===0))return U}return e.insert=0,t===ze?(Z(e,true),e.strm.avail_out===0?Je:_t):e.last_lit&&(Z(e,false),e.strm.avail_out===0)?U:tr}function he(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 yt;yt=[new he(0,0,0,0,Ih),new he(4,4,8,4,Cn),new he(4,5,16,8,Cn),new he(4,6,32,32,Cn),new he(4,4,16,16,bt),new he(8,16,32,32,bt),new he(8,16,128,128,bt),new he(8,32,128,256,bt),new he(32,128,258,1024,bt),new he(32,258,258,4096,bt)];function Mh(e){e.window_size=2*e.w_size,je(e.head),e.max_lazy_match=yt[e.level].max_lazy,e.good_match=yt[e.level].good_length,e.nice_match=yt[e.level].nice_length,e.max_chain_length=yt[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 Nh(){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(Ah*2),this.dyn_dtree=new X.Buf16((2*Th+1)*2),this.bl_tree=new X.Buf16((2*Ch+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(Rh+1),this.heap=new X.Buf16(2*An+1),je(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new X.Buf16(2*An+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 Ps(e){var t;return !e||!e.state?Ne(e,re):(e.total_in=e.total_out=0,e.data_type=_h,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 Bs(e){var t=Ps(e);return t===pe&&Mh(e.state),t}function zh(e,t){return !e||!e.state||e.state.wrap!==2?re:(e.state.gzhead=t,pe)}function qs(e,t,r,i,n,a){if(!e)return re;var o=1;if(t===mh&&(t=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),n<1||n>wh||r!==Jr||i<8||i>15||t<0||t>9||a<0||a>bh)return Ne(e,re);i===8&&(i=9);var s=new Nh;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,Bs(e)}function Ph(e,t){return qs(e,t,Jr,xh,Eh,yh)}function Bh(e,t){var r,i,n,a;if(!e||!e.state||t>Ds||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?Tn: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=Rn):(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,Oh),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|=Lh),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===Rn)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)),De(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)),De(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)),De(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&&De(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(De(e),e.avail_out===0)return i.last_flush=-1,pe}else if(e.avail_in===0&&Ms(t)<=Ms(r)&&t!==ze)return Ne(e,Tn);if(i.status===er&&e.avail_in!==0)return Ne(e,Tn);if(e.avail_in!==0||i.lookahead!==0||t!==Ve&&i.status!==er){var u=i.strategy===Ur?jh(i,t):i.strategy===vh?Dh(i,t):yt[i.level].func(i,t);if((u===Je||u===_t)&&(i.status=er),u===U||u===Je)return e.avail_out===0&&(i.last_flush=-1),pe;if(u===tr&&(t===ch?te._tr_align(i):t!==Ds&&(te._tr_stored_block(i,0,0,false),t===hh&&(je(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),De(e),e.avail_out===0))return i.last_flush=-1,pe}return t!==ze?pe:i.wrap<=0?js:(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)),De(e),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?pe:js)}function qh(e){var t;return !e||!e.state?re:(t=e.state.status,t!==$r&&t!==Rn&&t!==Hr&&t!==Zr&&t!==Wr&&t!==We&&t!==er?Ne(e,re):(e.state=null,t===We?Ne(e,ph):pe))}function Uh(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=Ns(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}me.deflateInit=Ph;me.deflateInit2=qs;me.deflateReset=Bs;me.deflateResetKeep=Ps;me.deflateSetHeader=zh;me.deflate=Bh;me.deflateEnd=qh;me.deflateSetDictionary=Uh;me.deflateInfo="pako deflate (from Nodeca project)";});var Ln=b(wt=>{var Vr=Se(),Hs=true,Zs=true;try{String.fromCharCode.apply(null,[0]);}catch{Hs=false;}try{String.fromCharCode.apply(null,new Uint8Array(1));}catch{Zs=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 Ws(e,t){if(t<65534&&(e.subarray&&Zs||!e.subarray&&Hs))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 Ws(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 Ws(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 On=b((kg,Js)=>{function Hh(){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;}Js.exports=Hh;});var Ys=b(ar=>{var ir=Us(),nr=Se(),In=Ln(),Dn=qr(),Zh=On(),Xs=Object.prototype.toString,Wh=0,Fn=4,xt=0,$s=1,Vs=2,Jh=-1,$h=0,Vh=8;function Xe(e){if(!(this instanceof Xe))return new Xe(e);this.options=nr.assign({level:Jh,method:Vh,chunkSize:16384,windowBits:15,memLevel:8,strategy:$h,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 Zh,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(Dn[r]);if(t.header&&ir.deflateSetHeader(this.strm,t.header),t.dictionary){var i;if(typeof t.dictionary=="string"?i=In.string2buf(t.dictionary):Xs.call(t.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(t.dictionary):i=t.dictionary,r=ir.deflateSetDictionary(this.strm,i),r!==xt)throw new Error(Dn[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?Fn:Wh,typeof e=="string"?r.input=In.string2buf(e):Xs.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!==$s&&n!==xt)return this.onEnd(n),this.ended=true,false;(r.avail_out===0||r.avail_in===0&&(a===Fn||a===Vs))&&(this.options.to==="string"?this.onData(In.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!==$s);return a===Fn?(n=ir.deflateEnd(this.strm),this.onEnd(n),this.ended=true,n===xt):(a===Vs&&(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 jn(e,t){var r=new Xe(t);if(r.push(e,true),r.err)throw r.msg||Dn[r.err];return r.result}function Xh(e,t){return t=t||{},t.raw=true,jn(e,t)}function Yh(e,t){return t=t||{},t.gzip=true,jn(e,t)}ar.Deflate=Xe;ar.deflate=jn;ar.deflateRaw=Xh;ar.gzip=Yh;});var Gs=b((Cg,Ks)=>{var Xr=30,Kh=12;Ks.exports=function(t,r){var i,n,a,o,s,u,l,f,h,d,c,p,y,_,m,g,x,v,w,T,k,S,C,F,E;i=t.state,n=t.next_in,F=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,h=i.whave,d=i.wnext,c=i.window,p=i.hold,y=i.bits,_=i.lencode,m=i.distcode,g=(1<<i.lenbits)-1,x=(1<<i.distbits)-1;e:do{y<15&&(p+=F[n++]<<y,y+=8,p+=F[n++]<<y,y+=8),v=_[p&g];t:for(;;){if(w=v>>>24,p>>>=w,y-=w,w=v>>>16&255,w===0)E[o++]=v&65535;else if(w&16){T=v&65535,w&=15,w&&(y<w&&(p+=F[n++]<<y,y+=8),T+=p&(1<<w)-1,p>>>=w,y-=w),y<15&&(p+=F[n++]<<y,y+=8,p+=F[n++]<<y,y+=8),v=m[p&x];r:for(;;){if(w=v>>>24,p>>>=w,y-=w,w=v>>>16&255,w&16){if(k=v&65535,w&=15,y<w&&(p+=F[n++]<<y,y+=8,y<w&&(p+=F[n++]<<y,y+=8)),k+=p&(1<<w)-1,k>l){t.msg="invalid distance too far back",i.mode=Xr;break e}if(p>>>=w,y-=w,w=o-s,k>w){if(w=k-w,w>h&&i.sane){t.msg="invalid distance too far back",i.mode=Xr;break e}if(S=0,C=c,d===0){if(S+=f-w,w<T){T-=w;do E[o++]=c[S++];while(--w);S=o-k,C=E;}}else if(d<w){if(S+=f+d-w,w-=d,w<T){T-=w;do E[o++]=c[S++];while(--w);if(S=0,d<T){w=d,T-=w;do E[o++]=c[S++];while(--w);S=o-k,C=E;}}}else if(S+=d-w,w<T){T-=w;do E[o++]=c[S++];while(--w);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((w&64)===0){v=m[(v&65535)+(p&(1<<w)-1)];continue r}else {t.msg="invalid distance code",i.mode=Xr;break e}break}}else if((w&64)===0){v=_[(v&65535)+(p&(1<<w)-1)];continue t}else if(w&32){i.mode=Kh;break e}else {t.msg="invalid literal/length code",i.mode=Xr;break e}break}}while(n<a&&o<u);T=y>>3,n-=T,y-=T<<3,p&=(1<<y)-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=p,i.bits=y;};});var al=b((Ag,nl)=>{var Qs=Se(),Et=15,el=852,tl=592,rl=0,Mn=1,il=2,Gh=[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],Qh=[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],ep=[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],tp=[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];nl.exports=function(t,r,i,n,a,o,s,u){var l=u.bits,f=0,h=0,d=0,c=0,p=0,y=0,_=0,m=0,g=0,x=0,v,w,T,k,S,C=null,F=0,E,K=new Qs.Buf16(Et+1),et=new Qs.Buf16(Et+1),cr=null,ha=0,pa,hr,pr;for(f=0;f<=Et;f++)K[f]=0;for(h=0;h<n;h++)K[r[i+h]]++;for(p=l,c=Et;c>=1&&K[c]===0;c--);if(p>c&&(p=c),c===0)return a[o++]=1<<24|64<<16|0,a[o++]=1<<24|64<<16|0,u.bits=1,0;for(d=1;d<c&&K[d]===0;d++);for(p<d&&(p=d),m=1,f=1;f<=Et;f++)if(m<<=1,m-=K[f],m<0)return -1;if(m>0&&(t===rl||c!==1))return -1;for(et[1]=0,f=1;f<Et;f++)et[f+1]=et[f]+K[f];for(h=0;h<n;h++)r[i+h]!==0&&(s[et[r[i+h]]++]=h);if(t===rl?(C=cr=s,E=19):t===Mn?(C=Gh,F-=257,cr=Qh,ha-=257,E=256):(C=ep,cr=tp,E=-1),x=0,h=0,f=d,S=o,y=p,_=0,T=-1,g=1<<p,k=g-1,t===Mn&&g>el||t===il&&g>tl)return 1;for(;;){pa=f-_,s[h]<E?(hr=0,pr=s[h]):s[h]>E?(hr=cr[ha+s[h]],pr=C[F+s[h]]):(hr=96,pr=0),v=1<<f-_,w=1<<y,d=w;do w-=v,a[S+(x>>_)+w]=pa<<24|hr<<16|pr|0;while(w!==0);for(v=1<<f-1;x&v;)v>>=1;if(v!==0?(x&=v-1,x+=v):x=0,h++,--K[f]===0){if(f===c)break;f=r[i+s[h]];}if(f>p&&(x&k)!==T){for(_===0&&(_=p),S+=d,y=f-_,m=1<<y;y+_<c&&(m-=K[y+_],!(m<=0));)y++,m<<=1;if(g+=1<<y,t===Mn&&g>el||t===il&&g>tl)return 1;T=x&k,a[T]=p<<24|y<<16|S-o|0;}}return x!==0&&(a[S+x]=f-_<<24|64<<16|0),u.bits=p,0};});var Bl=b(se=>{var ee=Se(),Un=Sn(),ge=kn(),rp=Gs(),or=al(),ip=0,Ol=1,Fl=2,ol=4,np=5,Yr=6,Ye=0,ap=1,op=2,ie=-2,Il=-3,Hn=-4,sp=-5,sl=8,Dl=1,ll=2,fl=3,ul=4,dl=5,cl=6,hl=7,pl=8,ml=9,gl=10,Qr=11,Ce=12,Nn=13,vl=14,zn=15,bl=16,yl=17,_l=18,wl=19,Kr=20,Gr=21,xl=22,El=23,Sl=24,kl=25,Tl=26,Pn=27,Cl=28,Al=29,D=30,Zn=31,lp=32,fp=852,up=592,dp=15,cp=dp;function Rl(e){return (e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function hp(){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 jl(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=Dl,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(fp),t.distcode=t.distdyn=new ee.Buf32(up),t.sane=1,t.back=-1,Ye)}function Ml(e){var t;return !e||!e.state?ie:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,jl(e))}function Nl(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,Ml(e))}function zl(e,t){var r,i;return e?(i=new hp,e.state=i,i.window=null,r=Nl(e,t),r!==Ye&&(e.state=null),r):ie}function pp(e){return zl(e,cp)}var Ll=true,Bn,qn;function mp(e){if(Ll){var t;for(Bn=new ee.Buf32(512),qn=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(Ol,e.lens,0,288,Bn,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;or(Fl,e.lens,0,32,qn,0,e.work,{bits:5}),Ll=false;}e.lencode=Bn,e.lenbits=9,e.distcode=qn,e.distbits=5;}function Pl(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 gp(e,t){var r,i,n,a,o,s,u,l,f,h,d,c,p,y,_=0,m,g,x,v,w,T,k,S,C=new ee.Buf8(4),F,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=Nn),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,h=s,d=u,S=Ye;e:for(;;)switch(r.mode){case Dl:if(r.wrap===0){r.mode=Nn;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=ge(r.check,C,2,0),l=0,f=0,r.mode=ll;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=D;break}if((l&15)!==sl){e.msg="unknown compression method",r.mode=D;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=D;break}r.dmax=1<<k,e.adler=r.check=1,r.mode=l&512?gl:Ce,l=0,f=0;break;case ll:for(;f<16;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(r.flags=l,(r.flags&255)!==sl){e.msg="unknown compression method",r.mode=D;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=D;break}r.head&&(r.head.text=l>>8&1),r.flags&512&&(C[0]=l&255,C[1]=l>>>8&255,r.check=ge(r.check,C,2,0)),l=0,f=0,r.mode=fl;case fl: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=ge(r.check,C,4,0)),l=0,f=0,r.mode=ul;case ul: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=ge(r.check,C,2,0)),l=0,f=0,r.mode=dl;case dl: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=ge(r.check,C,2,0)),l=0,f=0;}else r.head&&(r.head.extra=null);r.mode=cl;case cl:if(r.flags&1024&&(c=r.length,c>s&&(c=s),c&&(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,c,k)),r.flags&512&&(r.check=ge(r.check,i,c,a)),s-=c,a+=c,r.length-=c),r.length))break e;r.length=0,r.mode=hl;case hl:if(r.flags&2048){if(s===0)break e;c=0;do k=i[a+c++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k));while(k&&c<s);if(r.flags&512&&(r.check=ge(r.check,i,c,a)),s-=c,a+=c,k)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=pl;case pl:if(r.flags&4096){if(s===0)break e;c=0;do k=i[a+c++],r.head&&k&&r.length<65536&&(r.head.comment+=String.fromCharCode(k));while(k&&c<s);if(r.flags&512&&(r.check=ge(r.check,i,c,a)),s-=c,a+=c,k)break e}else r.head&&(r.head.comment=null);r.mode=ml;case ml: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=D;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 gl:for(;f<32;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}e.adler=r.check=Rl(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,op;e.adler=r.check=1,r.mode=Ce;case Ce:if(t===np||t===Yr)break e;case Nn:if(r.last){l>>>=f&7,f-=f&7,r.mode=Pn;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=vl;break;case 1:if(mp(r),r.mode=Kr,t===Yr){l>>>=2,f-=2;break e}break;case 2:r.mode=yl;break;case 3:e.msg="invalid block type",r.mode=D;}l>>>=2,f-=2;break;case vl: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=D;break}if(r.length=l&65535,l=0,f=0,r.mode=zn,t===Yr)break e;case zn:r.mode=bl;case bl:if(c=r.length,c){if(c>s&&(c=s),c>u&&(c=u),c===0)break e;ee.arraySet(n,i,a,c,o),s-=c,a+=c,u-=c,o+=c,r.length-=c;break}r.mode=Ce;break;case yl: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=D;break}r.have=0,r.mode=_l;case _l: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,F={bits:r.lenbits},S=or(ip,r.lens,0,19,r.lencode,0,r.work,F),r.lenbits=F.bits,S){e.msg="invalid code lengths set",r.mode=D;break}r.have=0,r.mode=wl;case wl:for(;r.have<r.nlen+r.ndist;){for(;_=r.lencode[l&(1<<r.lenbits)-1],m=_>>>24,g=_>>>16&255,x=_&65535,!(m<=f);){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(x<16)l>>>=m,f-=m,r.lens[r.have++]=x;else {if(x===16){for(E=m+2;f<E;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(l>>>=m,f-=m,r.have===0){e.msg="invalid bit length repeat",r.mode=D;break}k=r.lens[r.have-1],c=3+(l&3),l>>>=2,f-=2;}else if(x===17){for(E=m+3;f<E;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}l>>>=m,f-=m,k=0,c=3+(l&7),l>>>=3,f-=3;}else {for(E=m+7;f<E;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}l>>>=m,f-=m,k=0,c=11+(l&127),l>>>=7,f-=7;}if(r.have+c>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=D;break}for(;c--;)r.lens[r.have++]=k;}}if(r.mode===D)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=D;break}if(r.lenbits=9,F={bits:r.lenbits},S=or(Ol,r.lens,0,r.nlen,r.lencode,0,r.work,F),r.lenbits=F.bits,S){e.msg="invalid literal/lengths set",r.mode=D;break}if(r.distbits=6,r.distcode=r.distdyn,F={bits:r.distbits},S=or(Fl,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,F),r.distbits=F.bits,S){e.msg="invalid distances set",r.mode=D;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,rp(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],m=_>>>24,g=_>>>16&255,x=_&65535,!(m<=f);){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(g&&(g&240)===0){for(v=m,w=g,T=x;_=r.lencode[T+((l&(1<<v+w)-1)>>v)],m=_>>>24,g=_>>>16&255,x=_&65535,!(v+m<=f);){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}l>>>=v,f-=v,r.back+=v;}if(l>>>=m,f-=m,r.back+=m,r.length=x,g===0){r.mode=Tl;break}if(g&32){r.back=-1,r.mode=Ce;break}if(g&64){e.msg="invalid literal/length code",r.mode=D;break}r.extra=g&15,r.mode=xl;case xl: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=El;case El:for(;_=r.distcode[l&(1<<r.distbits)-1],m=_>>>24,g=_>>>16&255,x=_&65535,!(m<=f);){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if((g&240)===0){for(v=m,w=g,T=x;_=r.distcode[T+((l&(1<<v+w)-1)>>v)],m=_>>>24,g=_>>>16&255,x=_&65535,!(v+m<=f);){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}l>>>=v,f-=v,r.back+=v;}if(l>>>=m,f-=m,r.back+=m,g&64){e.msg="invalid distance code",r.mode=D;break}r.offset=x,r.extra=g&15,r.mode=Sl;case Sl: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=D;break}r.mode=kl;case kl:if(u===0)break e;if(c=d-u,r.offset>c){if(c=r.offset-c,c>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=D;break}c>r.wnext?(c-=r.wnext,p=r.wsize-c):p=r.wnext-c,c>r.length&&(c=r.length),y=r.window;}else y=n,p=o-r.offset,c=r.length;c>u&&(c=u),u-=c,r.length-=c;do n[o++]=y[p++];while(--c);r.length===0&&(r.mode=Gr);break;case Tl:if(u===0)break e;n[o++]=r.length,u--,r.mode=Gr;break;case Pn: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?ge(r.check,n,d,o-d):Un(r.check,n,d,o-d)),d=u,(r.flags?l:Rl(l))!==r.check){e.msg="incorrect data check",r.mode=D;break}l=0,f=0;}r.mode=Cl;case Cl: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=D;break}l=0,f=0;}r.mode=Al;case Al:S=ap;break e;case D:S=Il;break e;case Zn:return Hn;case lp: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<D&&(r.mode<Pn||t!==ol))&&Pl(e,e.output,e.next_out,d-e.avail_out)?(r.mode=Zn,Hn):(h-=e.avail_in,d-=e.avail_out,e.total_in+=h,e.total_out+=d,r.total+=d,r.wrap&&d&&(e.adler=r.check=r.flags?ge(r.check,n,d,e.next_out-d):Un(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===zn?256:0),(h===0&&d===0||t===ol)&&S===Ye&&(S=sp),S)}function vp(e){if(!e||!e.state)return ie;var t=e.state;return t.window&&(t.window=null),e.state=null,Ye}function bp(e,t){var r;return !e||!e.state||(r=e.state,(r.wrap&2)===0)?ie:(r.head=t,t.done=false,Ye)}function yp(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=Un(n,t,r,0),n!==i.check)?Il:(a=Pl(e,t,r,r),a?(i.mode=Zn,Hn):(i.havedict=1,Ye))}se.inflateReset=Ml;se.inflateReset2=Nl;se.inflateResetKeep=jl;se.inflateInit=pp;se.inflateInit2=zl;se.inflate=gp;se.inflateEnd=vp;se.inflateGetHeader=bp;se.inflateSetDictionary=yp;se.inflateInfo="pako inflate (from Nodeca project)";});var Wn=b((Lg,ql)=>{ql.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 Hl=b((Og,Ul)=>{function _p(){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;}Ul.exports=_p;});var Wl=b(lr=>{var St=Bl(),sr=Se(),ei=Ln(),N=Wn(),Jn=qr(),wp=On(),xp=Hl(),Zl=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 wp,this.strm.avail_out=0;var r=St.inflateInit2(this.strm,t.windowBits);if(r!==N.Z_OK)throw new Error(Jn[r]);if(this.header=new xp,St.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=ei.string2buf(t.dictionary):Zl.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=St.inflateSetDictionary(this.strm,t.dictionary),r!==N.Z_OK)))throw new Error(Jn[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?N.Z_FINISH:N.Z_NO_FLUSH,typeof e=="string"?r.input=ei.binstring2buf(e):Zl.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,N.Z_NO_FLUSH),a===N.Z_NEED_DICT&&n&&(a=St.inflateSetDictionary(this.strm,n)),a===N.Z_BUF_ERROR&&f===true&&(a=N.Z_OK,f=false),a!==N.Z_STREAM_END&&a!==N.Z_OK)return this.onEnd(a),this.ended=true,false;r.next_out&&(r.avail_out===0||a===N.Z_STREAM_END||r.avail_in===0&&(o===N.Z_FINISH||o===N.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!==N.Z_STREAM_END);return a===N.Z_STREAM_END&&(o=N.Z_FINISH),o===N.Z_FINISH?(a=St.inflateEnd(this.strm),this.onEnd(a),this.ended=true,a===N.Z_OK):(o===N.Z_SYNC_FLUSH&&(this.onEnd(N.Z_OK),r.avail_out=0),true)};Ke.prototype.onData=function(e){this.chunks.push(e);};Ke.prototype.onEnd=function(e){e===N.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 $n(e,t){var r=new Ke(t);if(r.push(e,true),r.err)throw r.msg||Jn[r.err];return r.result}function Ep(e,t){return t=t||{},t.raw=true,$n(e,t)}lr.Inflate=Ke;lr.inflate=$n;lr.inflateRaw=Ep;lr.ungzip=$n;});var Vl=b((Ig,$l)=>{var Sp=Se().assign,kp=Ys(),Tp=Wl(),Cp=Wn(),Jl={};Sp(Jl,kp,Tp,Cp);$l.exports=Jl;});var Yl=b(ri=>{var Ap=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",Rp=Vl(),Xl=j(),ti=Q(),Lp=Ap?"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={};}Xl.inherits(Ge,ti);Ge.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(Xl.transformTo(Lp,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 Rp[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 Xn=b(Vn=>{var Kl=Q();Vn.STORE={magic:"\0\0",compressWorker:function(){return new Kl("STORE compression")},uncompressWorker:function(){return new Kl("STORE decompression")}};Vn.DEFLATE=Yl();});var Yn=b(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 tf=b((Ng,ef)=>{var kt=j(),Tt=Q(),Kn=ht(),Gl=Mr(),ii=Yn(),O=function(e,t){var r="",i;for(i=0;i<t;i++)r+=String.fromCharCode(e&255),e=e>>>8;return r},Op=function(e,t){var r=e;return e||(r=t?16893:33204),(r&65535)<<16},Fp=function(e){return (e||0)&63},Ql=function(e,t,r,i,n,a){var o=e.file,s=e.compression,u=a!==Kn.utf8encode,l=kt.transformTo("string",a(o.name)),f=kt.transformTo("string",Kn.utf8encode(o.name)),h=o.comment,d=kt.transformTo("string",a(h)),c=kt.transformTo("string",Kn.utf8encode(h)),p=f.length!==o.name.length,y=c.length!==h.length,_,m,g="",x="",v="",w=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&&(p||y)&&(S|=2048);var C=0,F=0;w&&(C|=16),n==="UNIX"?(F=798,C|=Op(o.unixPermissions,w)):(F=20,C|=Fp(o.dosPermissions)),_=T.getUTCHours(),_=_<<6,_=_|T.getUTCMinutes(),_=_<<5,_=_|T.getUTCSeconds()/2,m=T.getUTCFullYear()-1980,m=m<<4,m=m|T.getUTCMonth()+1,m=m<<5,m=m|T.getUTCDate(),p&&(x=O(1,1)+O(Gl(l),4)+f,g+="up"+O(x.length,2)+x),y&&(v=O(1,1)+O(Gl(d),4)+c,g+="uc"+O(v.length,2)+v);var E="";E+=`
|
|
2
|
-
\0`,E+=O(S,2),E+=s.magic,E+=O(_,2),E+=O(m,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(F,2)+E+O(d.length,2)+"\0\0\0\0"+O(C,4)+O(i,4)+l+g+d;return {fileRecord:K,dirRecord:et}},Ip=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},Dp=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=Ql(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=Ql(e,t,true,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:Dp(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=Ip(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();};ef.exports=le;});var nf=b(rf=>{var jp=Xn(),Mp=tf(),Np=function(e,t){var r=e||t,i=jp[r];if(!i)throw new Error(r+" is not a valid compression method !");return i};rf.generateWorker=function(e,t,r){var i=new Mp(t.streamFiles,r,t.platform,t.encodeFileName),n=0;try{e.forEach(function(a,o){n++;var s=Np(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 of=b((Pg,af)=>{var zp=j(),ni=Q();function fr(e,t){ni.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=false,this._bindStream(t);}zp.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};af.exports=fr;});var gf=b((Bg,mf)=>{var Pp=ht(),ur=j(),uf=Q(),Bp=tn(),df=rn(),sf=Nr(),qp=ss(),Up=nf(),lf=Pt(),Hp=of(),cf=function(e,t,r){var i=ur.getTypeOf(t),n,a=ur.extend(r||{},df);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=hf(e)),a.createFolders&&(n=Zp(e))&&pf.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 sf&&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 sf||t instanceof uf?u=t:lf.isNode&&lf.isStream(t)?u=new Hp(e,t):u=ur.prepareContent(e,t,a.binary,a.optimizedBinaryString,a.base64);var l=new qp(e,u,a);this.files[e]=l;},Zp=function(e){e.slice(-1)==="/"&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return t>0?e.substring(0,t):""},hf=function(e){return e.slice(-1)!=="/"&&(e+="/"),e},pf=function(e,t){return t=typeof t<"u"?t:df.createFolders,e=hf(e),this.files[e]||cf.call(this,e,null,{dir:true,createFolders:t}),this.files[e]};function ff(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var Wp={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(ff(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,cf.call(this,e,t,r);return this},folder:function(e){if(!e)return this;if(ff(e))return this.filter(function(n,a){return a.dir&&e.test(n)});var t=this.root+e,r=pf.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:Pp.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=Up.generateWorker(this,r,i);}catch(n){t=new uf("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)}};mf.exports=Wp;});var Gn=b((qg,bf)=>{var Jp=j();function vf(e){this.data=e,this.length=e.length,this.index=0,this.zero=0;}vf.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 Jp.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))}};bf.exports=vf;});var Qn=b((Ug,_f)=>{var yf=Gn(),$p=j();function Ct(e){yf.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=e[t]&255;}$p.inherits(Ct,yf);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};_f.exports=Ct;});var Ef=b((Hg,xf)=>{var wf=Gn(),Vp=j();function At(e){wf.call(this,e);}Vp.inherits(At,wf);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};xf.exports=At;});var ta=b((Zg,kf)=>{var Sf=Qn(),Xp=j();function ea(e){Sf.call(this,e);}Xp.inherits(ea,Sf);ea.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};kf.exports=ea;});var Af=b((Wg,Cf)=>{var Tf=ta(),Yp=j();function ra(e){Tf.call(this,e);}Yp.inherits(ra,Tf);ra.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};Cf.exports=ra;});var ia=b((Jg,Lf)=>{var ai=j(),Rf=xe(),Kp=Qn(),Gp=Ef(),Qp=Af(),em=ta();Lf.exports=function(e){var t=ai.getTypeOf(e);return ai.checkSupport(t),t==="string"&&!Rf.uint8array?new Gp(e):t==="nodebuffer"?new Qp(e):Rf.uint8array?new em(ai.transformTo("uint8array",e)):new Kp(ai.transformTo("array",e))};});var Df=b(($g,If)=>{var na=ia(),Pe=j(),tm=Nr(),Of=Mr(),oi=ht(),si=Xn(),rm=xe(),im=0,nm=3,am=function(e){for(var t in si)if(Object.prototype.hasOwnProperty.call(si,t)&&si[t].magic===e)return si[t];return null};function Ff(e,t){this.options=e,this.loadOptions=t;}Ff.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=am(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 tm(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===im&&(this.dosPermissions=this.externalFileAttributes&63),e===nm&&(this.unixPermissions=this.externalFileAttributes>>16&65535),!this.dir&&this.fileNameStr.slice(-1)==="/"&&(this.dir=true);},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=na(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=rm.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=na(e.value);return t.readInt(1)!==1||Of(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=na(e.value);return t.readInt(1)!==1||Of(this.fileComment)!==t.readInt(4)?null:oi.utf8decode(t.readData(e.length-5))}return null}};If.exports=Ff;});var Nf=b((Vg,Mf)=>{var om=ia(),Ae=j(),fe=Yn(),sm=Df(),lm=xe();function jf(e){this.files=[],this.loadOptions=e;}jf.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=lm.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 sm({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=om(e);},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles();}};Mf.exports=jf;});var Bf=b((Xg,Pf)=>{var aa=j(),li=ut(),fm=ht(),um=Nf(),dm=on(),zf=Pt();function cm(e){return new li.Promise(function(t,r){var i=e.decompressed.getContentWorker().pipe(new dm);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();})}Pf.exports=function(e,t){var r=this;return t=aa.extend(t||{},{base64:false,checkCRC32:false,optimizedBinaryString:false,createFolders:false,decodeFileName:fm.utf8decode}),zf.isNode&&zf.isStream(e)?li.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):aa.prepareContent("the loaded zip file",e,true,t.optimizedBinaryString,t.base64).then(function(i){var n=new um(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(cm(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=aa.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 Uf=b((Yg,qf)=>{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=gf();ne.prototype.loadAsync=Bf();ne.support=xe();ne.defaults=rn();ne.version="3.10.1";ne.loadAsync=function(e,t){return new ne().loadAsync(e,t)};ne.external=ut();qf.exports=ne;});var Zf={};tu(Zf,{unpackJdfxToDocument:()=>mm});function hm(e){return !e||typeof e!="string"||e.startsWith("/")||e.includes("\\")||e.includes("..")?false:e.startsWith(`${wa}/`)}function pm(e){let t="";for(let i=0;i<e.length;i+=32768)t+=String.fromCharCode(...e.subarray(i,i+32768));return btoa(t)}async function mm(e){let t=await Hf.default.loadAsync(e),r=t.file(ci);if(!r)throw new Error(`${ci} 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;}if(a?.assets){i.resources||(i.resources={images:{}}),i.resources.images||(i.resources.images={});for(let o of a.assets){if(!hm(o.path)){console.warn(`[jdfjs] dropping unsafe manifest asset path: ${o.path}`);continue}let s=t.file(o.path);if(!s)continue;let u=await s.async("uint8array"),l=o.mimeType||xa(o.path),f={src:"embedded",mimeType:l,data:pm(u)};Ea(l)?(i.resources.videos||(i.resources.videos={}),i.resources.videos[o.id]=f):i.resources.images[o.id]=f;}}return i}var Hf,Wf=Rt(()=>{Hf=iu(Uf());mr();});mr();mr();function ka(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 B(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=ka(e.padding)),e.margin!=null&&(t.margin=ka(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 W(e,t){if(!e)return {};if(typeof e=="string")return B(t[e]||{});if(Array.isArray(e)){let r={};for(let i of e)r={...r,...t[i]||{}};return B(r)}return B(e)}function q(e,t){for(let[r,i]of Object.entries(t))e.style.setProperty(r,i);}function hi(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 gr(e,t){let r=document.createElement("div");fu(r,e);let i=null;switch(e.type){case "text":i=uu(e,t);break;case "richtext":i=cu(e,t);break;case "image":i=bu(e,t);break;case "video":i=gu(e,t);break;case "table":i=Su(e,t);break;case "list":i=ku(e,t);break;case "shape":i=Tu(e);break;case "collapsible":i=Cu(e,t);break;case "toc":i=Au(e,t);break;case "input":i=Ru(e,t);break;case "textarea":i=Lu(e,t);break;case "checkbox":i=Ou(e,t);break;case "select":i=Fu(e,t);break;case "signature":i=Iu(e,t);break}return i?(r.appendChild(i),r):null}function fu(e,t){let r=t;r.position&&(e.style.position="absolute",r.position.x!=null&&(e.style.left=`${M(r.position.x)}px`),r.position.y!=null&&(e.style.top=`${M(r.position.y)}px`)),r.width!=null&&(e.style.width=`${M(r.width)}px`),r.height!=null&&(e.style.height=`${M(r.height)}px`);}function uu(e,t){let r=du(e.heading),i=document.createElement(r);i.className="jdfjs-text",i.style.margin="0",i.style.whiteSpace="pre-wrap",q(i,W(e.style,t.styles)),e.align&&(i.style.textAlign=e.align);let n=hi(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 du(e){return e===true?"h1":typeof e=="number"&&e>=1&&e<=6?"h"+e:"p"}function cu(e,t){let r=document.createElement("p");r.className="jdfjs-richtext",r.style.margin="0",q(r,W(e.style,t.styles));for(let i of e.runs||[])r.appendChild(pu(i,t));return r}function hu(e,t){let r={};if(e.style)if(typeof e.style=="string")Object.assign(r,B(t[e.style]||{}));else if(Array.isArray(e.style))for(let n of e.style)Object.assign(r,B(t[n]||{}));else Object.assign(r,B(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 pu(e,t){let r=hi(e.link),i=r?document.createElement("a"):document.createElement("span");return r&&(pi(i,r,t.onNavigatePage),i.classList.add("jdfjs-link")),q(i,hu(e,t.styles)),i.textContent=e.text,i}function mi(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;let n=e.videos?.[t];if(n)return n}function mu(e,t,r){if(e.src?.startsWith("data:")||e.src?.startsWith("http"))return e.src;if(e.resource){let i=mi(t,e.resource);if(i?.data){let n=i.mimeType||r;return i.data.startsWith("data:")?i.data:`data:${n};base64,${i.data}`}if(i?.path)return i.path}return e.src||""}function gu(e,t){let r=document.createElement("div");r.className="jdfjs-video",r.style.width="100%",r.style.height="100%";let i=document.createElement("video");if(i.src=mu(e,t.resources,"video/mp4"),e.poster){let a=mi(t.resources,e.poster);i.poster=a?.data?a.data.startsWith("data:")?a.data:`data:${a.mimeType||"image/png"};base64,${a.data}`:e.poster;}switch(e.title&&(i.title=e.title,i.setAttribute("aria-label",e.title)),i.controls=e.controls!==false,i.autoplay=!!e.autoplay,i.loop=!!e.loop,i.muted=!!e.muted||!!e.autoplay,i.playsInline=true,i.preload="metadata",i.style.display="block",i.style.width="100%",i.style.height="100%",i.style.background="#000",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";}q(i,W(e.style,t.styles)),e.id&&i.setAttribute("data-jdf-video",e.id);let n=e.transcript?.segments;if(n&&n.length){let a=u=>{let l=Math.floor(u/3600),f=Math.floor(u%3600/60),h=u%60;return `${String(l).padStart(2,"0")}:${String(f).padStart(2,"0")}:${h.toFixed(3).padStart(6,"0")}`},o=n.map((u,l)=>`${l+1}
|
|
1
|
+
var Yf=Object.create;var di=Object.defineProperty;var Kf=Object.getOwnPropertyDescriptor;var Gf=Object.getOwnPropertyNames;var Qf=Object.getPrototypeOf,eu=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 b=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),tu=(e,t)=>{for(var r in t)di(e,r,{get:t[r],enumerable:true});},ru=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Gf(t))!eu.call(e,n)&&n!==r&&di(e,n,{get:()=>t[n],enumerable:!(i=Kf(t,n))||i.enumerable});return e};var iu=(e,t,r)=>(r=e!=null?Yf(Qf(e)):{},ru(di(r,"default",{value:e,enumerable:true}),e));var ma=Rt(()=>{});function D(e,t="mm"){switch(t){case "mm":return e*ga;case "in":return e*au;case "pt":return e*ou;case "px":return e;default:return e*ga}}function ba(e,t="portrait"){let r=typeof e=="string"?nu[e]:e;return t==="landscape"?{width:r.height,height:r.width}:{...r}}var nu,va,ga,au,ou,ya=Rt(()=>{nu={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}},va={top:25,right:20,bottom:25,left:20},ga=3.7795275591,au=96,ou=1.3333333333;});function lu(e){let t=e.lastIndexOf(".");return t<0?"":e.slice(t+1).toLowerCase()}function xa(e){return su[lu(e)]||"application/octet-stream"}function Ea(e){return typeof e=="string"&&/^video\//i.test(e)}var ci,_a,wa,su,Sa=Rt(()=>{ci="document.json",_a="manifest.json",wa="assets",su=Object.freeze({png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",webp:"image/webp",svg:"image/svg+xml",bmp:"image/bmp",mp4:"video/mp4",m4v:"video/mp4",webm:"video/webm",mov:"video/quicktime",woff:"font/woff",woff2:"font/woff2",ttf:"font/ttf",otf:"font/otf"});});var Lt=Rt(()=>{ma();ya();Sa();});var Ot=b((Nm,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:ju}:gi.exports=process;function ju(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 La=b((zm,Ra)=>{var Du={}.toString;Ra.exports=Array.isArray||function(e){return Du.call(e)=="[object Array]"};});var vi=b((Pm,Oa)=>{Oa.exports=ve("stream");});var It=b((bi,Fa)=>{var br=ve("buffer"),ye=br.Buffer;function Ia(e,t){for(var r in e)t[r]=e[r];}ye.from&&ye.alloc&&ye.allocUnsafe&&ye.allocUnsafeSlow?Fa.exports=br:(Ia(br,bi),bi.Buffer=rt);function rt(e,t,r){return ye(e,t,r)}Ia(ye,rt);rt.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return ye(e,t,r)};rt.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=ye(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 ye(e)};rt.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return br.SlowBuffer(e)};});var it=b(J=>{function Mu(e){return Array.isArray?Array.isArray(e):yr(e)==="[object Array]"}J.isArray=Mu;function Nu(e){return typeof e=="boolean"}J.isBoolean=Nu;function zu(e){return e===null}J.isNull=zu;function Pu(e){return e==null}J.isNullOrUndefined=Pu;function Bu(e){return typeof e=="number"}J.isNumber=Bu;function qu(e){return typeof e=="string"}J.isString=qu;function Hu(e){return typeof e=="symbol"}J.isSymbol=Hu;function Uu(e){return e===void 0}J.isUndefined=Uu;function Zu(e){return yr(e)==="[object RegExp]"}J.isRegExp=Zu;function Wu(e){return typeof e=="object"&&e!==null}J.isObject=Wu;function Ju(e){return yr(e)==="[object Date]"}J.isDate=Ju;function $u(e){return yr(e)==="[object Error]"||e instanceof Error}J.isError=$u;function Vu(e){return typeof e=="function"}J.isFunction=Vu;function Xu(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}J.isPrimitive=Xu;J.isBuffer=ve("buffer").Buffer.isBuffer;function yr(e){return Object.prototype.toString.call(e)}});var ja=b((qm,yi)=>{typeof Object.create=="function"?yi.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:false,writable:true,configurable:true}}));}:yi.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=b((Hm,wi)=>{try{if(_i=ve("util"),typeof _i.inherits!="function")throw "";wi.exports=_i.inherits;}catch{wi.exports=ja();}var _i;});var Ma=b((Um,xi)=>{function Yu(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Da=It().Buffer,Ft=ve("util");function Ku(e,t,r){e.copy(t,r);}xi.exports=(function(){function e(){Yu(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;)Ku(n.data,i,a),a+=n.data.length,n=n.next;return i},e})();Ft&&Ft.inspect&&Ft.inspect.custom&&(xi.exports.prototype[Ft.inspect.custom]=function(){var e=Ft.inspect({length:this.length});return this.constructor.name+" "+e});});var Ei=b((Zm,Na)=>{var _r=Ot();function Gu(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,_r.nextTick(wr,this,e)):_r.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,_r.nextTick(wr,r,a)):_r.nextTick(wr,r,a):t&&t(a);}),this)}function Qu(){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);}Na.exports={destroy:Gu,undestroy:Qu};});var Pa=b((Wm,za)=>{za.exports=ve("util").deprecate;});var ki=b((Jm,$a)=>{var Be=Ot();$a.exports=z;function qa(e){var t=this;this.next=null,this.entry=null,this.finish=function(){vd(t,e);};}var ed=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:Be.nextTick,at;z.WritableState=Dt;var Ha=Object.create(it());Ha.inherits=nt();var td={deprecate:Pa()},Ua=vi(),Er=It().Buffer,rd=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function id(e){return Er.from(e)}function nd(e){return Er.isBuffer(e)||e instanceof rd}var Za=Ei();Ha.inherits(z,Ua);function ad(){}function Dt(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){cd(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 qa(this);}Dt.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(Dt.prototype,"buffer",{get:td.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 Dt}})):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 Dt(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)),Ua.call(this);}z.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"));};function od(e,t){var r=new Error("write after end");e.emit("error",r),Be.nextTick(t,r);}function sd(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&&nd(e);return a&&!Er.isBuffer(e)&&(e=id(e)),typeof t=="function"&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),typeof r!="function"&&(r=ad),i.ended?od(this,r):(a||sd(this,i,e,r))&&(i.pendingcb++,n=fd(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&&Wa(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 ld(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 fd(e,t,r,i,n,a){if(!r){var o=ld(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 Si(e,t,false,s,i,n,a);return u}function Si(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 ud(e,t,r,i,n){--t.pendingcb,r?(Be.nextTick(n,i),Be.nextTick(jt,e,t),e._writableState.errorEmitted=true,e.emit("error",i)):(n(i),e._writableState.errorEmitted=true,e.emit("error",i),jt(e,t));}function dd(e){e.writing=false,e.writecb=null,e.length-=e.writelen,e.writelen=0;}function cd(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if(dd(r),t)ud(e,r,i,t,n);else {var a=Ja(r);!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Wa(e,r),i?ed(Ba,e,r,a,n):Ba(e,r,a,n);}}function Ba(e,t,r,i){r||hd(e,t),t.pendingcb--,i(),jt(e,t);}function hd(e,t){t.length===0&&t.needDrain&&(t.needDrain=false,e.emit("drain"));}function Wa(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,Si(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 qa(t),t.bufferedRequestCount=0;}else {for(;r;){var u=r.chunk,l=r.encoding,f=r.callback,h=t.objectMode?1:u.length;if(Si(e,t,false,h,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||gd(this,i,r);};function Ja(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}function pd(e,t){e._final(function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=true,e.emit("prefinish"),jt(e,t);});}function md(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"?(t.pendingcb++,t.finalCalled=true,Be.nextTick(pd,e,t)):(t.prefinished=true,e.emit("prefinish")));}function jt(e,t){var r=Ja(t);return r&&(md(e,t),t.pendingcb===0&&(t.finished=true,e.emit("finish"))),r}function gd(e,t,r){t.ending=true,jt(e,t),r&&(t.finished?Be.nextTick(r):e.once("finish",r)),t.ended=true,e.writable=false;}function vd(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=Za.destroy;z.prototype._undestroy=Za.undestroy;z.prototype._destroy=function(e,t){this.end(),t(e);};});var qe=b(($m,Ka)=>{var Va=Ot(),bd=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};Ka.exports=_e;var Xa=Object.create(it());Xa.inherits=nt();var Ya=Ai(),Ci=ki();Xa.inherits(_e,Ya);for(Ti=bd(Ci.prototype),Sr=0;Sr<Ti.length;Sr++)kr=Ti[Sr],_e.prototype[kr]||(_e.prototype[kr]=Ci.prototype[kr]);var Ti,kr,Sr;function _e(e){if(!(this instanceof _e))return new _e(e);Ya.call(this,e),Ci.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",yd);}Object.defineProperty(_e.prototype,"writableHighWaterMark",{enumerable:false,get:function(){return this._writableState.highWaterMark}});function yd(){this.allowHalfOpen||this._writableState.ended||Va.nextTick(_d,this);}function _d(e){e.end();}Object.defineProperty(_e.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);}});_e.prototype._destroy=function(e,t){this.push(null),this.end(),Va.nextTick(t,e);};});var Oi=b(Qa=>{var Li=It().Buffer,Ga=Li.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 wd(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 xd(e){var t=wd(e);if(typeof t!="string"&&(Li.isEncoding===Ga||!Ga(e)))throw new Error("Unknown encoding: "+e);return t||e}Qa.StringDecoder=Mt;function Mt(e){this.encoding=xd(e);var t;switch(this.encoding){case "utf16le":this.text=Ad,this.end=Rd,t=4;break;case "utf8":this.fillLast=kd,t=4;break;case "base64":this.text=Ld,this.end=Od,t=3;break;default:this.write=Id,this.end=Fd;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Li.allocUnsafe(t);}Mt.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||""};Mt.prototype.end=Cd;Mt.prototype.text=Td;Mt.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 Ri(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function Ed(e,t,r){var i=t.length-1;if(i<r)return 0;var n=Ri(t[i]);return n>=0?(n>0&&(e.lastNeed=n-1),n):--i<r||n===-2?0:(n=Ri(t[i]),n>=0?(n>0&&(e.lastNeed=n-2),n):--i<r||n===-2?0:(n=Ri(t[i]),n>=0?(n>0&&(n===2?n=0:e.lastNeed=n-3),n):0))}function Sd(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 kd(e){var t=this.lastTotal-this.lastNeed,r=Sd(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 Td(e,t){var r=Ed(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 Cd(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function Ad(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 Rd(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 Ld(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 Od(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function Id(e){return e.toString(this.encoding)}function Fd(e){return e&&e.length?this.write(e):""}});var Ai=b((Ym,co)=>{var st=Ot();co.exports=F;var jd=La(),Nt;F.ReadableState=oo;ve("events").EventEmitter;var io=function(e,t){return e.listeners(t).length},Mi=vi(),zt=It().Buffer,Dd=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Md(e){return zt.from(e)}function Nd(e){return zt.isBuffer(e)||e instanceof Dd}var no=Object.create(it());no.inherits=nt();var Ii=ve("util"),L=void 0;Ii&&Ii.debuglog?L=Ii.debuglog("stream"):L=function(){};var zd=Ma(),ao=Ei(),ot;no.inherits(F,Mi);var Fi=["error","close","destroy","pause","resume"];function Pd(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):jd(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]];}function oo(e,t){Nt=Nt||qe(),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 zd,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=Oi().StringDecoder),this.decoder=new ot(e.encoding),this.encoding=e.encoding);}function F(e){if(Nt=Nt||qe(),!(this instanceof F))return new F(e);this._readableState=new oo(e,this),this.readable=true,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),Mi.call(this);}Object.defineProperty(F.prototype,"destroyed",{get:function(){return this._readableState===void 0?false:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e);}});F.prototype.destroy=ao.destroy;F.prototype._undestroy=ao.undestroy;F.prototype._destroy=function(e,t){this.push(null),t(e);};F.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=zt.from(e,t),t=""),i=true),so(this,e,t,false,i)};F.prototype.unshift=function(e){return so(this,e,null,true,false)};function so(e,t,r,i,n){var a=e._readableState;if(t===null)a.reading=false,Ud(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)!==zt.prototype&&(t=Md(t)),i?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):ji(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?ji(e,a,t,false):lo(e,a)):ji(e,a,t,false))):i||(a.reading=false);}return qd(a)}function ji(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)),lo(e,t);}function Bd(e,t){var r;return !Nd(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function qd(e){return !e.ended&&(e.needReadable||e.length<e.highWaterMark||e.length===0)}F.prototype.isPaused=function(){return this._readableState.flowing===false};F.prototype.setEncoding=function(e){return ot||(ot=Oi().StringDecoder),this._readableState.decoder=new ot(e),this._readableState.encoding=e,this};var eo=8388608;function Hd(e){return e>=eo?e=eo:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function to(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=Hd(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=true,0))}F.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?Di(this):Tr(this),null;if(e=to(e,t),e===0&&t.ended)return t.length===0&&Di(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=to(r,t)));var n;return e>0?n=fo(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 Ud(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(ro,e):ro(e));}function ro(e){L("emit readable"),e.emit("readable"),Ni(e);}function lo(e,t){t.readingMore||(t.readingMore=true,st.nextTick(Zd,e,t));}function Zd(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;}F.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"));};F.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(m,g){L("onunpipe"),m===r&&g&&g.hasUnpiped===false&&(g.hasUnpiped=true,f());}function s(){L("onend"),e.end();}var u=Wd(r);e.on("drain",u);var l=false;function f(){L("cleanup"),e.removeListener("close",p),e.removeListener("finish",y),e.removeListener("drain",u),e.removeListener("error",c),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 h=false;r.on("data",d);function d(m){L("ondata"),h=false;var g=e.write(m);g===false&&!h&&((i.pipesCount===1&&i.pipes===e||i.pipesCount>1&&uo(i.pipes,e)!==-1)&&!l&&(L("false write response, pause",i.awaitDrain),i.awaitDrain++,h=true),r.pause());}function c(m){L("onerror",m),_(),e.removeListener("error",c),io(e,"error")===0&&e.emit("error",m);}Pd(e,"error",c);function p(){e.removeListener("finish",y),_();}e.once("close",p);function y(){L("onfinish"),e.removeListener("close",p),_();}e.once("finish",y);function _(){L("unpipe"),r.unpipe(e);}return e.emit("pipe",r),i.flowing||(L("pipe resume"),r.resume()),e};function Wd(e){return function(){var t=e._readableState;L("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,t.awaitDrain===0&&io(e,"data")&&(t.flowing=true,Ni(e));}}F.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=uo(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)};F.prototype.on=function(e,t){var r=Mi.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(Jd,this));}return r};F.prototype.addListener=F.prototype.on;function Jd(e){L("readable nexttick read 0"),e.read(0);}F.prototype.resume=function(){var e=this._readableState;return e.flowing||(L("resume"),e.flowing=true,$d(this,e)),this};function $d(e,t){t.resumeScheduled||(t.resumeScheduled=true,st.nextTick(Vd,e,t));}function Vd(e,t){t.reading||(L("resume read 0"),e.read(0)),t.resumeScheduled=false,t.awaitDrain=0,e.emit("resume"),Ni(e),t.flowing&&!t.reading&&e.read(0);}F.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 Ni(e){var t=e._readableState;for(L("flow",t.flowing);t.flowing&&e.read()!==null;);}F.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<Fi.length;a++)e.on(Fi[a],this.emit.bind(this,Fi[a]));return this._read=function(o){L("wrapped _read",o),i&&(i=false,e.resume());},this};Object.defineProperty(F.prototype,"readableHighWaterMark",{enumerable:false,get:function(){return this._readableState.highWaterMark}});F._fromList=fo;function fo(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=Xd(e,t.buffer,t.decoder),r}function Xd(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?Yd(e,t):Kd(e,t),i}function Yd(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 Kd(e,t){var r=zt.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,st.nextTick(Gd,t,e));}function Gd(e,t){!e.endEmitted&&e.length===0&&(e.endEmitted=true,t.readable=false,t.emit("end"));}function uo(e,t){for(var r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return -1}});var zi=b((Km,mo)=>{mo.exports=we;var Cr=qe(),po=Object.create(it());po.inherits=nt();po.inherits(we,Cr);function Qd(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:Qd.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",ec);}function ec(){var e=this;typeof this._flush=="function"?this._flush(function(t,r){ho(e,t,r);}):ho(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 ho(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 yo=b((Gm,bo)=>{bo.exports=Pt;var go=zi(),vo=Object.create(it());vo.inherits=nt();vo.inherits(Pt,go);function Pt(e){if(!(this instanceof Pt))return new Pt(e);go.call(this,e);}Pt.prototype._transform=function(e,t,r){r(null,e);};});var Pi=b((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=Ai(),U.Stream=ue||U,U.Readable=U,U.Writable=ki(),U.Duplex=qe(),U.Transform=zi(),U.PassThrough=yo());});var xe=b(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 {Bi=new ArrayBuffer(0);try{G.blob=new Blob([Bi],{type:"application/zip"}).size===0;}catch{try{_o=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,qi=new _o,qi.append(Bi),G.blob=qi.getBlob("application/zip").size===0;}catch{G.blob=false;}}}var Bi,_o,qi;try{G.nodestream=!!Pi().Readable;}catch{G.nodestream=false;}});var Ui=b(Hi=>{var tc=M(),rc=xe(),de="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";Hi.encode=function(e){for(var t=[],r,i,n,a,o,s,u,l=0,f=e.length,h=f,d=tc.getTypeOf(e)!=="string";l<e.length;)h=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=h>1?(i&15)<<2|n>>6:64,u=h>2?n&63:64,t.push(de.charAt(a)+de.charAt(o)+de.charAt(s)+de.charAt(u));return t.join("")};Hi.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 h=e.length*3/4;if(e.charAt(e.length-1)===de.charAt(64)&&h--,e.charAt(e.length-2)===de.charAt(64)&&h--,h%1!==0)throw new Error("Invalid base64 input, bad content length.");var d;for(rc.uint8array?d=new Uint8Array(h|0):d=new Array(h|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 Bt=b((tg,wo)=>{wo.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 ko=b((rg,So)=>{var xo=global.MutationObserver||global.WebKitMutationObserver,lt;process.browser?xo?(Zi=0,Eo=new xo(qt),Wi=global.document.createTextNode(""),Eo.observe(Wi,{characterData:true}),lt=function(){Wi.data=Zi=++Zi%2;}):!global.setImmediate&&typeof global.MessageChannel<"u"?(Ji=new global.MessageChannel,Ji.port1.onmessage=qt,lt=function(){Ji.port2.postMessage(0);}):"document"in global&&"onreadystatechange"in global.document.createElement("script")?lt=function(){var e=global.document.createElement("script");e.onreadystatechange=function(){qt(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null;},global.document.documentElement.appendChild(e);}:lt=function(){setTimeout(qt,0);}:lt=function(){process.nextTick(qt);};var Zi,Eo,Wi,Ji,$i,Ht=[];function qt(){$i=true;for(var e,t,r=Ht.length;r;){for(t=Ht,Ht=[],e=-1;++e<r;)t[e]();r=Ht.length;}$i=false;}So.exports=ic;function ic(e){Ht.push(e)===1&&!$i&<();}});var Io=b((ig,Oo)=>{var To=ko();function ft(){}var $={},Co=["REJECTED"],Vi=["FULFILLED"],Ao=["PENDING"];process.browser||(Ut=["UNHANDLED"]);var Ut;Oo.exports=Re;function Re(e){if(typeof e!="function")throw new TypeError("resolver must be a function");this.state=Ao,this.queue=[],this.outcome=void 0,process.browser||(this.handled=Ut),e!==ft&&Ro(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===Vi||typeof t!="function"&&this.state===Co)return this;var r=new this.constructor(ft);if(process.browser||this.handled===Ut&&(this.handled=null),this.state!==Ao){var i=this.state===Vi?e:t;Xi(r,i,this.outcome);}else this.queue.push(new Zt(r,e,t));return r};function Zt(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);}Zt.prototype.callFulfilled=function(e){$.resolve(this.promise,e);};Zt.prototype.otherCallFulfilled=function(e){Xi(this.promise,this.onFulfilled,e);};Zt.prototype.callRejected=function(e){$.reject(this.promise,e);};Zt.prototype.otherCallRejected=function(e){Xi(this.promise,this.onRejected,e);};function Xi(e,t,r){To(function(){var i;try{i=t(r);}catch(n){return $.reject(e,n)}i===e?$.reject(e,new TypeError("Cannot resolve promise with itself")):$.resolve(e,i);});}$.resolve=function(e,t){var r=Lo(nc,t);if(r.status==="error")return $.reject(e,r.value);var i=r.value;if(i)Ro(e,i);else {e.state=Vi,e.outcome=t;for(var n=-1,a=e.queue.length;++n<a;)e.queue[n].callFulfilled(t);}return e};$.reject=function(e,t){e.state=Co,e.outcome=t,process.browser||e.handled===Ut&&To(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 nc(e){var t=e&&e.then;if(e&&(typeof e=="object"||typeof e=="function")&&typeof t=="function")return function(){t.apply(e,arguments);}}function Ro(e,t){var r=false;function i(s){r||(r=true,$.reject(e,s));}function n(s){r||(r=true,$.resolve(e,s));}function a(){t(n,i);}var o=Lo(a);o.status==="error"&&i(o.value);}function Lo(e,t){var r={};try{r.value=e(t),r.status="success";}catch(i){r.status="error",r.value=i;}return r}Re.resolve=ac;function ac(e){return e instanceof this?e:$.resolve(new this(ft),e)}Re.reject=oc;function oc(e){var t=new this(ft);return $.reject(t,e)}Re.all=sc;function sc(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(h,function(d){i||(i=true,$.reject(s,d));});function h(d){n[f]=d,++a===r&&!i&&(i=true,$.resolve(s,n));}}}Re.race=lc;function lc(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,$.resolve(a,u));},function(u){i||(i=true,$.reject(a,u));});}}});var ut=b((ng,Fo)=>{var Yi=null;typeof Promise<"u"?Yi=Promise:Yi=Io();Fo.exports={Promise:Yi};});var Do=b(jo=>{(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),v=0;v<x.length;v++)x[v]=arguments[v+1];var w={callback:g,args:x};return i[r]=w,o(r),r++}function u(g){delete i[g];}function l(g){var x=g.callback,v=g.args;switch(v.length){case 0:x();break;case 1:x(v[0]);break;case 2:x(v[0],v[1]);break;case 3:x(v[0],v[1],v[2]);break;default:x.apply(t,v);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 h(){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 c(){var g="setImmediate$"+Math.random()+"$",x=function(v){v.source===e&&typeof v.data=="string"&&v.data.indexOf(g)===0&&f(+v.data.slice(g.length));};e.addEventListener?e.addEventListener("message",x,false):e.attachEvent("onmessage",x),o=function(v){e.postMessage(g+v,"*");};}function p(){var g=new MessageChannel;g.port1.onmessage=function(x){var v=x.data;f(v);},o=function(x){g.port2.postMessage(x);};}function y(){var g=a.documentElement;o=function(x){var v=a.createElement("script");v.onreadystatechange=function(){f(x),v.onreadystatechange=null,g.removeChild(v),v=null;},g.appendChild(v);};}function _(){o=function(g){setTimeout(f,0,g);};}var m=Object.getPrototypeOf&&Object.getPrototypeOf(e);m=m&&m.setTimeout?m:e,{}.toString.call(e.process)==="[object process]"?h():d()?c():e.MessageChannel?p():a&&"onreadystatechange"in a.createElement("script")?y():_(),m.setImmediate=s,m.clearImmediate=u;})(typeof self>"u"?typeof global>"u"?jo:global:self);});var M=b(P=>{var Le=xe(),fc=Ui(),dt=Bt(),Ki=ut();Do();function uc(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 Wt(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 Jt(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=Jt;function Or(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}var Oe={};Oe.string={string:Wt,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:Jt,array:Wt,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 Jt(new Uint8Array(e))},array:function(e){return Or(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:Wt,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return dt.newBufferFrom(new Uint8Array(e))}};Oe.uint8array={string:Jt,array:function(e){return Or(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:Wt,nodebuffer:function(e){return dt.newBufferFrom(e)}};Oe.nodebuffer={string:Jt,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:Wt};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=Ki.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 Ki.Promise(function(u,l){var f=new FileReader;f.onload=function(h){u(h.target.result);},f.onerror=function(h){l(h.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=fc.decode(o):r&&i!==true&&(o=uc(o))),o):Ki.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})};});var Q=b((sg,No)=>{function Mo(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;}Mo.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}};No.exports=Mo;});var ht=b(Ie=>{var ct=M(),He=xe(),dc=Bt(),Ir=Q(),$t=new Array(256);for(Ee=0;Ee<256;Ee++)$t[Ee]=Ee>=252?6:Ee>=248?5:Ee>=240?4:Ee>=224?3:Ee>=192?2:1;var Ee;$t[254]=$t[254]=1;var cc=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(He.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},hc=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+$t[e[r]]>t?r:t},pc=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=$t[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),ct.applyFromCharCode(o)};Ie.utf8encode=function(t){return He.nodebuffer?dc.newBufferFrom(t,"utf-8"):cc(t)};Ie.utf8decode=function(t){return He.nodebuffer?ct.transformTo("nodebuffer",t).toString("utf-8"):(t=ct.transformTo(He.uint8array?"uint8array":"array",t),pc(t))};function Fr(){Ir.call(this,"utf-8 decode"),this.leftOver=null;}ct.inherits(Fr,Ir);Fr.prototype.processChunk=function(e){var t=ct.transformTo(He.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(He.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=hc(t),n=t;i!==t.length&&(He.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:Ie.utf8decode(n),meta:e.meta});};Fr.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:Ie.utf8decode(this.leftOver),meta:{}}),this.leftOver=null);};Ie.Utf8DecodeWorker=Fr;function Gi(){Ir.call(this,"utf-8 encode");}ct.inherits(Gi,Ir);Gi.prototype.processChunk=function(e){this.push({data:Ie.utf8encode(e.data),meta:e.meta});};Ie.Utf8EncodeWorker=Gi;});var qo=b((fg,Bo)=>{var zo=Q(),Po=M();function Qi(e){zo.call(this,"ConvertWorker to "+e),this.destType=e;}Po.inherits(Qi,zo);Qi.prototype.processChunk=function(e){this.push({data:Po.transformTo(this.destType,e.data),meta:e.meta});};Bo.exports=Qi;});var Zo=b((ug,Uo)=>{var Ho=Pi().Readable,mc=M();mc.inherits(en,Ho);function en(e,t,r){Ho.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);});}en.prototype._read=function(){this._helper.resume();};Uo.exports=en;});var tn=b((dg,$o)=>{var Ue=M(),gc=qo(),vc=Q(),bc=Ui(),yc=xe(),_c=ut(),Wo=null;if(yc.nodestream)try{Wo=Zo();}catch{}function wc(e,t,r){switch(e){case "blob":return Ue.newBlob(Ue.transformTo("arraybuffer",t),r);case "base64":return bc.encode(t);default:return Ue.transformTo(e,t)}}function xc(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 Ec(e,t){return new _c.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=wc(o,xc(a,n),s);r(u);}catch(l){i(l);}n=[];}).resume();})}function Jo(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 gc(i)),e.lock();}catch(n){this._worker=new vc("error"),this._worker.error(n);}}Jo.prototype={accumulate:function(e){return Ec(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 Wo(this,{objectMode:this._outputType!=="nodebuffer"},e)}};$o.exports=Jo;});var rn=b(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 nn=b((hg,Vo)=>{var jr=M(),Dr=Q(),Sc=16*1024;function pt(e){Dr.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=jr.getTypeOf(r),t.isPaused||t._tickAndRepeat();},function(r){t.error(r);});}jr.inherits(pt,Dr);pt.prototype.cleanUp=function(){Dr.prototype.cleanUp.call(this),this.data=null;};pt.prototype.resume=function(){return Dr.prototype.resume.call(this)?(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=true,jr.delay(this._tickAndRepeat,[],this)),true):false};pt.prototype._tickAndRepeat=function(){this._tickScheduled=false,!(this.isPaused||this.isFinished)&&(this._tick(),this.isFinished||(jr.delay(this._tickAndRepeat,[],this),this._tickScheduled=true));};pt.prototype._tick=function(){if(this.isPaused||this.isFinished)return false;var e=Sc,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}})};Vo.exports=pt;});var Mr=b((pg,Yo)=>{var kc=M();function Tc(){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 Xo=Tc();function Cc(e,t,r,i){var n=Xo,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 Ac(e,t,r,i){var n=Xo,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}Yo.exports=function(t,r){if(typeof t>"u"||!t.length)return 0;var i=kc.getTypeOf(t)!=="string";return i?Cc(r|0,t,t.length,0):Ac(r|0,t,t.length,0)};});var on=b((mg,Go)=>{var Ko=Q(),Rc=Mr(),Lc=M();function an(){Ko.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0);}Lc.inherits(an,Ko);an.prototype.processChunk=function(e){this.streamInfo.crc32=Rc(e.data,this.streamInfo.crc32||0),this.push(e);};Go.exports=an;});var es=b((gg,Qo)=>{var Oc=M(),sn=Q();function ln(e){sn.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0);}Oc.inherits(ln,sn);ln.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length;}sn.prototype.processChunk.call(this,e);};Qo.exports=ln;});var Nr=b((vg,is)=>{var ts=ut(),rs=nn(),Ic=on(),fn=es();function un(e,t,r,i,n){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=i,this.compressedContent=n;}un.prototype={getContentWorker:function(){var e=new rs(ts.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new fn("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 rs(ts.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}};un.createWorkerFrom=function(e,t,r){return e.pipe(new Ic).pipe(new fn("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new fn("compressedSize")).withStreamInfo("compression",t)};is.exports=un;});var ss=b((bg,os)=>{var Fc=tn(),jc=nn(),dn=ht(),cn=Nr(),ns=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 dn.Utf8EncodeWorker)),!n&&i&&(t=t.pipe(new dn.Utf8DecodeWorker));}catch(a){t=new ns("error"),t.error(a);}return new Fc(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 cn&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new dn.Utf8EncodeWorker)),cn.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof cn?this._data.getContentWorker():this._data instanceof ns?this._data:new jc(this._data)}};var as=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],Dc=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")};for(zr=0;zr<as.length;zr++)hn.prototype[as[zr]]=Dc;var zr;os.exports=hn;});var Se=b(V=>{var Mc=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function Nc(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)Nc(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 zc={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}},Pc={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,zc)):(V.Buf8=Array,V.Buf16=Array,V.Buf32=Array,V.assign(V,Pc));};V.setTyped(Mc);});var Ls=b(vt=>{var Bc=Se(),qc=4,ls=0,fs=1,Hc=2;function gt(e){for(var t=e.length;--t>=0;)e[t]=0;}var Uc=0,ms=1,Zc=2,Wc=3,Jc=258,_n=29,Qt=256,Xt=Qt+1+_n,mt=30,wn=19,gs=2*Xt+1,Ze=15,pn=16,$c=7,xn=256,vs=16,bs=17,ys=18,bn=[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],Vc=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],_s=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Xc=512,ke=new Array((Xt+2)*2);gt(ke);var Vt=new Array(mt*2);gt(Vt);var Yt=new Array(Xc);gt(Yt);var Kt=new Array(Jc-Wc+1);gt(Kt);var En=new Array(_n);gt(En);var Br=new Array(mt);gt(Br);function mn(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 ws,xs,Es;function gn(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t;}function Ss(e){return e<256?Yt[e]:Yt[256+(e>>>7)]}function Gt(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>pn-r?(e.bi_buf|=t<<e.bi_valid&65535,Gt(e,e.bi_buf),e.bi_buf=t>>pn-e.bi_valid,e.bi_valid+=r-pn):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r);}function ce(e,t,r){Y(e,r[t*2],r[t*2+1]);}function ks(e,t){var r=0;do r|=e&1,e>>>=1,r<<=1;while(--t>0);return r>>>1}function Yc(e){e.bi_valid===16?(Gt(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 Kc(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,h,d,c,p,y=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<gs;l++)f=e.heap[l],d=r[r[f*2+1]*2+1]+1,d>u&&(d=u,y++),r[f*2+1]=d,!(f>i)&&(e.bl_count[d]++,c=0,f>=s&&(c=o[f-s]),p=r[f*2],e.opt_len+=p*(d+c),a&&(e.static_len+=p*(n[f*2+1]+c)));if(y!==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]--,y-=2;}while(y>0);for(d=u;d!==0;d--)for(f=e.bl_count[d];f!==0;)h=e.heap[--l],!(h>i)&&(r[h*2+1]!==d&&(e.opt_len+=(d-r[h*2+1])*r[h*2],r[h*2+1]=d),f--);}}function Ts(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]=ks(i[s]++,s));}}function Gc(){var e,t,r,i,n,a=new Array(Ze+1);for(r=0,i=0;i<_n-1;i++)for(En[i]=r,e=0;e<1<<bn[i];e++)Kt[r++]=i;for(Kt[r-1]=i,n=0,i=0;i<16;i++)for(Br[i]=n,e=0;e<1<<Pr[i];e++)Yt[n++]=i;for(n>>=7;i<mt;i++)for(Br[i]=n<<7,e=0;e<1<<Pr[i]-7;e++)Yt[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(Ts(ke,Xt+1,a),e=0;e<mt;e++)Vt[e*2+1]=5,Vt[e*2]=ks(e,5);ws=new mn(ke,bn,Qt+1,Xt,Ze),xs=new mn(Vt,Pr,0,mt,Ze),Es=new mn(new Array(0),Vc,0,wn,$c);}function Cs(e){var t;for(t=0;t<Xt;t++)e.dyn_ltree[t*2]=0;for(t=0;t<mt;t++)e.dyn_dtree[t*2]=0;for(t=0;t<wn;t++)e.bl_tree[t*2]=0;e.dyn_ltree[xn*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0;}function As(e){e.bi_valid>8?Gt(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 Qc(e,t,r,i){As(e),(Gt(e,r),Gt(e,~r)),Bc.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r;}function us(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 vn(e,t,r){for(var i=e.heap[r],n=r<<1;n<=e.heap_len&&(n<e.heap_len&&us(t,e.heap[n+1],e.heap[n],e.depth)&&n++,!us(t,i,e.heap[n],e.depth));)e.heap[r]=e.heap[n],r=n,n<<=1;e.heap[r]=i;}function ds(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?ce(e,n,t):(o=Kt[n],ce(e,o+Qt+1,t),s=bn[o],s!==0&&(n-=En[o],Y(e,n,s)),i--,o=Ss(i),ce(e,o,r),s=Pr[o],s!==0&&(i-=Br[o],Y(e,i,s)));while(a<e.last_lit);ce(e,xn,t);}function yn(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=gs,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--)vn(e,r,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],vn(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++,vn(e,r,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],Kc(e,t),Ts(r,u,e.bl_count);}function cs(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[vs*2]++):s<=10?e.bl_tree[bs*2]++:e.bl_tree[ys*2]++,s=0,n=a,o===0?(u=138,l=3):a===o?(u=6,l=3):(u=7,l=4));}function hs(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 ce(e,a,e.bl_tree);while(--s!==0);else a!==0?(a!==n&&(ce(e,a,e.bl_tree),s--),ce(e,vs,e.bl_tree),Y(e,s-3,2)):s<=10?(ce(e,bs,e.bl_tree),Y(e,s-3,3)):(ce(e,ys,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 eh(e){var t;for(cs(e,e.dyn_ltree,e.l_desc.max_code),cs(e,e.dyn_dtree,e.d_desc.max_code),yn(e,e.bl_desc),t=wn-1;t>=3&&e.bl_tree[_s[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function th(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[_s[n]*2+1],3);hs(e,e.dyn_ltree,t-1),hs(e,e.dyn_dtree,r-1);}function rh(e){var t=4093624447,r;for(r=0;r<=31;r++,t>>>=1)if(t&1&&e.dyn_ltree[r*2]!==0)return ls;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return fs;for(r=32;r<Qt;r++)if(e.dyn_ltree[r*2]!==0)return fs;return ls}var ps=false;function ih(e){ps||(Gc(),ps=true),e.l_desc=new gn(e.dyn_ltree,ws),e.d_desc=new gn(e.dyn_dtree,xs),e.bl_desc=new gn(e.bl_tree,Es),e.bi_buf=0,e.bi_valid=0,Cs(e);}function Rs(e,t,r,i){Y(e,(Uc<<1)+(i?1:0),3),Qc(e,t,r);}function nh(e){Y(e,ms<<1,3),ce(e,xn,ke),Yc(e);}function ah(e,t,r,i){var n,a,o=0;e.level>0?(e.strm.data_type===Hc&&(e.strm.data_type=rh(e)),yn(e,e.l_desc),yn(e,e.d_desc),o=eh(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?Rs(e,t,r,i):e.strategy===qc||a===n?(Y(e,(ms<<1)+(i?1:0),3),ds(e,ke,Vt)):(Y(e,(Zc<<1)+(i?1:0),3),th(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),ds(e,e.dyn_ltree,e.dyn_dtree)),Cs(e),i&&As(e);}function oh(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[(Kt[r]+Qt+1)*2]++,e.dyn_dtree[Ss(t)*2]++),e.last_lit===e.lit_bufsize-1}vt._tr_init=ih;vt._tr_stored_block=Rs;vt._tr_flush_block=ah;vt._tr_tally=oh;vt._tr_align=nh;});var Sn=b((wg,Os)=>{function sh(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}Os.exports=sh;});var kn=b((xg,Is)=>{function lh(){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 fh=lh();function uh(e,t,r,i){var n=fh,a=i+r;e^=-1;for(var o=i;o<a;o++)e=e>>>8^n[(e^t[o])&255];return e^-1}Is.exports=uh;});var qr=b((Eg,Fs)=>{Fs.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 Hs=b(me=>{var X=Se(),te=Ls(),Ns=Sn(),Fe=kn(),dh=qr(),Ve=0,ch=1,hh=3,ze=4,js=5,pe=0,Ds=1,re=-2,ph=-3,Tn=-5,mh=-1,gh=1,Hr=2,vh=3,bh=4,yh=0,_h=2,Jr=8,wh=9,xh=15,Eh=8,Sh=29,kh=256,An=kh+1+Sh,Th=30,Ch=19,Ah=2*An+1,Rh=15,A=3,Me=258,oe=Me+A+1,Lh=32,$r=42,Rn=69,Ur=73,Zr=91,Wr=103,We=113,tr=666,H=1,rr=2,Je=3,_t=4,Oh=3;function Ne(e,t){return e.msg=dh[t],t}function Ms(e){return (e<<1)-(e>4?9:0)}function De(e){for(var t=e.length;--t>=0;)e[t]=0;}function je(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 Z(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,je(e.strm);}function R(e,t){e.pending_buf[e.pending++]=t;}function er(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255;}function Ih(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=Ns(e.adler,t,n,r):e.state.wrap===2&&(e.adler=Fe(e.adler,t,n,r)),e.next_in+=n,e.total_in+=n,n)}function zs(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,h=e.prev,d=e.strstart+Me,c=l[i+o-1],p=l[i+o];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do if(n=t,!(l[n+o]!==p||l[n+o-1]!==c||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;c=l[i+o-1],p=l[i+o];}}while((t=h[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=Ih(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 Fh(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 H;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,Z(e,false),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-oe&&(Z(e,false),e.strm.avail_out===0))return H}return e.insert=0,t===ze?(Z(e,true),e.strm.avail_out===0?Je:_t):(e.strstart>e.block_start&&(Z(e,false),e.strm.avail_out===0),H)}function Cn(e,t){for(var r,i;;){if(e.lookahead<oe){if($e(e),e.lookahead<oe&&t===Ve)return H;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=zs(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&&(Z(e,false),e.strm.avail_out===0))return H}return e.insert=e.strstart<A-1?e.strstart:A-1,t===ze?(Z(e,true),e.strm.avail_out===0?Je:_t):e.last_lit&&(Z(e,false),e.strm.avail_out===0)?H:rr}function bt(e,t){for(var r,i,n;;){if(e.lookahead<oe){if($e(e),e.lookahead<oe&&t===Ve)return H;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=zs(e,r),e.match_length<=5&&(e.strategy===gh||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&&(Z(e,false),e.strm.avail_out===0))return H}else if(e.match_available){if(i=te._tr_tally(e,0,e.window[e.strstart-1]),i&&Z(e,false),e.strstart++,e.lookahead--,e.strm.avail_out===0)return H}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?(Z(e,true),e.strm.avail_out===0?Je:_t):e.last_lit&&(Z(e,false),e.strm.avail_out===0)?H:rr}function jh(e,t){for(var r,i,n,a,o=e.window;;){if(e.lookahead<=Me){if($e(e),e.lookahead<=Me&&t===Ve)return H;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&&(Z(e,false),e.strm.avail_out===0))return H}return e.insert=0,t===ze?(Z(e,true),e.strm.avail_out===0?Je:_t):e.last_lit&&(Z(e,false),e.strm.avail_out===0)?H:rr}function Dh(e,t){for(var r;;){if(e.lookahead===0&&($e(e),e.lookahead===0)){if(t===Ve)return H;break}if(e.match_length=0,r=te._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(Z(e,false),e.strm.avail_out===0))return H}return e.insert=0,t===ze?(Z(e,true),e.strm.avail_out===0?Je:_t):e.last_lit&&(Z(e,false),e.strm.avail_out===0)?H:rr}function he(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 yt;yt=[new he(0,0,0,0,Fh),new he(4,4,8,4,Cn),new he(4,5,16,8,Cn),new he(4,6,32,32,Cn),new he(4,4,16,16,bt),new he(8,16,32,32,bt),new he(8,16,128,128,bt),new he(8,32,128,256,bt),new he(32,128,258,1024,bt),new he(32,258,258,4096,bt)];function Mh(e){e.window_size=2*e.w_size,De(e.head),e.max_lazy_match=yt[e.level].max_lazy,e.good_match=yt[e.level].good_length,e.nice_match=yt[e.level].nice_length,e.max_chain_length=yt[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 Nh(){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(Ah*2),this.dyn_dtree=new X.Buf16((2*Th+1)*2),this.bl_tree=new X.Buf16((2*Ch+1)*2),De(this.dyn_ltree),De(this.dyn_dtree),De(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new X.Buf16(Rh+1),this.heap=new X.Buf16(2*An+1),De(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new X.Buf16(2*An+1),De(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 Ps(e){var t;return !e||!e.state?Ne(e,re):(e.total_in=e.total_out=0,e.data_type=_h,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 Bs(e){var t=Ps(e);return t===pe&&Mh(e.state),t}function zh(e,t){return !e||!e.state||e.state.wrap!==2?re:(e.state.gzhead=t,pe)}function qs(e,t,r,i,n,a){if(!e)return re;var o=1;if(t===mh&&(t=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),n<1||n>wh||r!==Jr||i<8||i>15||t<0||t>9||a<0||a>bh)return Ne(e,re);i===8&&(i=9);var s=new Nh;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,Bs(e)}function Ph(e,t){return qs(e,t,Jr,xh,Eh,yh)}function Bh(e,t){var r,i,n,a;if(!e||!e.state||t>js||t<0)return e?Ne(e,re):re;if(i=e.state,!e.output||!e.input&&e.avail_in!==0||i.status===tr&&t!==ze)return Ne(e,e.avail_out===0?Tn: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>=Hr||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=Fe(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=Rn):(R(i,0),R(i,0),R(i,0),R(i,0),R(i,0),R(i,i.level===9?2:i.strategy>=Hr||i.level<2?4:0),R(i,Oh),i.status=We);else {var o=Jr+(i.w_bits-8<<4)<<8,s=-1;i.strategy>=Hr||i.level<2?s=0:i.level<6?s=1:i.level===6?s=2:s=3,o|=s<<6,i.strstart!==0&&(o|=Lh),o+=31-o%31,i.status=We,er(i,o),i.strstart!==0&&(er(i,e.adler>>>16),er(i,e.adler&65535)),e.adler=1;}if(i.status===Rn)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=Fe(e.adler,i.pending_buf,i.pending-n,n)),je(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=Fe(e.adler,i.pending_buf,i.pending-n,n)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=Ur);}else i.status=Ur;if(i.status===Ur)if(i.gzhead.name){n=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>n&&(e.adler=Fe(e.adler,i.pending_buf,i.pending-n,n)),je(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=Fe(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=Fe(e.adler,i.pending_buf,i.pending-n,n)),je(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=Fe(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&&je(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(je(e),e.avail_out===0)return i.last_flush=-1,pe}else if(e.avail_in===0&&Ms(t)<=Ms(r)&&t!==ze)return Ne(e,Tn);if(i.status===tr&&e.avail_in!==0)return Ne(e,Tn);if(e.avail_in!==0||i.lookahead!==0||t!==Ve&&i.status!==tr){var u=i.strategy===Hr?Dh(i,t):i.strategy===vh?jh(i,t):yt[i.level].func(i,t);if((u===Je||u===_t)&&(i.status=tr),u===H||u===Je)return e.avail_out===0&&(i.last_flush=-1),pe;if(u===rr&&(t===ch?te._tr_align(i):t!==js&&(te._tr_stored_block(i,0,0,false),t===hh&&(De(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),je(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)):(er(i,e.adler>>>16),er(i,e.adler&65535)),je(e),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?pe:Ds)}function qh(e){var t;return !e||!e.state?re:(t=e.state.status,t!==$r&&t!==Rn&&t!==Ur&&t!==Zr&&t!==Wr&&t!==We&&t!==tr?Ne(e,re):(e.state=null,t===We?Ne(e,ph):pe))}function Hh(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=Ns(e.adler,t,r,0)),i.wrap=0,r>=i.w_size&&(o===0&&(De(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}me.deflateInit=Ph;me.deflateInit2=qs;me.deflateReset=Bs;me.deflateResetKeep=Ps;me.deflateSetHeader=zh;me.deflate=Bh;me.deflateEnd=qh;me.deflateSetDictionary=Hh;me.deflateInfo="pako deflate (from Nodeca project)";});var Ln=b(wt=>{var Vr=Se(),Us=true,Zs=true;try{String.fromCharCode.apply(null,[0]);}catch{Us=false;}try{String.fromCharCode.apply(null,new Uint8Array(1));}catch{Zs=false;}var ir=new Vr.Buf8(256);for(Te=0;Te<256;Te++)ir[Te]=Te>=252?6:Te>=248?5:Te>=240?4:Te>=224?3:Te>=192?2:1;var Te;ir[254]=ir[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 Ws(e,t){if(t<65534&&(e.subarray&&Zs||!e.subarray&&Us))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 Ws(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=ir[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 Ws(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+ir[e[r]]>t?r:t};});var On=b((Tg,Js)=>{function Uh(){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;}Js.exports=Uh;});var Ys=b(or=>{var nr=Hs(),ar=Se(),Fn=Ln(),jn=qr(),Zh=On(),Xs=Object.prototype.toString,Wh=0,In=4,xt=0,$s=1,Vs=2,Jh=-1,$h=0,Vh=8;function Xe(e){if(!(this instanceof Xe))return new Xe(e);this.options=ar.assign({level:Jh,method:Vh,chunkSize:16384,windowBits:15,memLevel:8,strategy:$h,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 Zh,this.strm.avail_out=0;var r=nr.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==xt)throw new Error(jn[r]);if(t.header&&nr.deflateSetHeader(this.strm,t.header),t.dictionary){var i;if(typeof t.dictionary=="string"?i=Fn.string2buf(t.dictionary):Xs.call(t.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(t.dictionary):i=t.dictionary,r=nr.deflateSetDictionary(this.strm,i),r!==xt)throw new Error(jn[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?In:Wh,typeof e=="string"?r.input=Fn.string2buf(e):Xs.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 ar.Buf8(i),r.next_out=0,r.avail_out=i),n=nr.deflate(r,a),n!==$s&&n!==xt)return this.onEnd(n),this.ended=true,false;(r.avail_out===0||r.avail_in===0&&(a===In||a===Vs))&&(this.options.to==="string"?this.onData(Fn.buf2binstring(ar.shrinkBuf(r.output,r.next_out))):this.onData(ar.shrinkBuf(r.output,r.next_out)));}while((r.avail_in>0||r.avail_out===0)&&n!==$s);return a===In?(n=nr.deflateEnd(this.strm),this.onEnd(n),this.ended=true,n===xt):(a===Vs&&(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=ar.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||jn[r.err];return r.result}function Xh(e,t){return t=t||{},t.raw=true,Dn(e,t)}function Yh(e,t){return t=t||{},t.gzip=true,Dn(e,t)}or.Deflate=Xe;or.deflate=Dn;or.deflateRaw=Xh;or.gzip=Yh;});var Gs=b((Ag,Ks)=>{var Xr=30,Kh=12;Ks.exports=function(t,r){var i,n,a,o,s,u,l,f,h,d,c,p,y,_,m,g,x,v,w,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,s=o-(r-t.avail_out),u=o+(t.avail_out-257),l=i.dmax,f=i.wsize,h=i.whave,d=i.wnext,c=i.window,p=i.hold,y=i.bits,_=i.lencode,m=i.distcode,g=(1<<i.lenbits)-1,x=(1<<i.distbits)-1;e:do{y<15&&(p+=I[n++]<<y,y+=8,p+=I[n++]<<y,y+=8),v=_[p&g];t:for(;;){if(w=v>>>24,p>>>=w,y-=w,w=v>>>16&255,w===0)E[o++]=v&65535;else if(w&16){T=v&65535,w&=15,w&&(y<w&&(p+=I[n++]<<y,y+=8),T+=p&(1<<w)-1,p>>>=w,y-=w),y<15&&(p+=I[n++]<<y,y+=8,p+=I[n++]<<y,y+=8),v=m[p&x];r:for(;;){if(w=v>>>24,p>>>=w,y-=w,w=v>>>16&255,w&16){if(k=v&65535,w&=15,y<w&&(p+=I[n++]<<y,y+=8,y<w&&(p+=I[n++]<<y,y+=8)),k+=p&(1<<w)-1,k>l){t.msg="invalid distance too far back",i.mode=Xr;break e}if(p>>>=w,y-=w,w=o-s,k>w){if(w=k-w,w>h&&i.sane){t.msg="invalid distance too far back",i.mode=Xr;break e}if(S=0,C=c,d===0){if(S+=f-w,w<T){T-=w;do E[o++]=c[S++];while(--w);S=o-k,C=E;}}else if(d<w){if(S+=f+d-w,w-=d,w<T){T-=w;do E[o++]=c[S++];while(--w);if(S=0,d<T){w=d,T-=w;do E[o++]=c[S++];while(--w);S=o-k,C=E;}}}else if(S+=d-w,w<T){T-=w;do E[o++]=c[S++];while(--w);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((w&64)===0){v=m[(v&65535)+(p&(1<<w)-1)];continue r}else {t.msg="invalid distance code",i.mode=Xr;break e}break}}else if((w&64)===0){v=_[(v&65535)+(p&(1<<w)-1)];continue t}else if(w&32){i.mode=Kh;break e}else {t.msg="invalid literal/length code",i.mode=Xr;break e}break}}while(n<a&&o<u);T=y>>3,n-=T,y-=T<<3,p&=(1<<y)-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=p,i.bits=y;};});var al=b((Rg,nl)=>{var Qs=Se(),Et=15,el=852,tl=592,rl=0,Mn=1,il=2,Gh=[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],Qh=[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],ep=[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],tp=[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];nl.exports=function(t,r,i,n,a,o,s,u){var l=u.bits,f=0,h=0,d=0,c=0,p=0,y=0,_=0,m=0,g=0,x=0,v,w,T,k,S,C=null,I=0,E,K=new Qs.Buf16(Et+1),et=new Qs.Buf16(Et+1),hr=null,ha=0,pa,pr,mr;for(f=0;f<=Et;f++)K[f]=0;for(h=0;h<n;h++)K[r[i+h]]++;for(p=l,c=Et;c>=1&&K[c]===0;c--);if(p>c&&(p=c),c===0)return a[o++]=1<<24|64<<16|0,a[o++]=1<<24|64<<16|0,u.bits=1,0;for(d=1;d<c&&K[d]===0;d++);for(p<d&&(p=d),m=1,f=1;f<=Et;f++)if(m<<=1,m-=K[f],m<0)return -1;if(m>0&&(t===rl||c!==1))return -1;for(et[1]=0,f=1;f<Et;f++)et[f+1]=et[f]+K[f];for(h=0;h<n;h++)r[i+h]!==0&&(s[et[r[i+h]]++]=h);if(t===rl?(C=hr=s,E=19):t===Mn?(C=Gh,I-=257,hr=Qh,ha-=257,E=256):(C=ep,hr=tp,E=-1),x=0,h=0,f=d,S=o,y=p,_=0,T=-1,g=1<<p,k=g-1,t===Mn&&g>el||t===il&&g>tl)return 1;for(;;){pa=f-_,s[h]<E?(pr=0,mr=s[h]):s[h]>E?(pr=hr[ha+s[h]],mr=C[I+s[h]]):(pr=96,mr=0),v=1<<f-_,w=1<<y,d=w;do w-=v,a[S+(x>>_)+w]=pa<<24|pr<<16|mr|0;while(w!==0);for(v=1<<f-1;x&v;)v>>=1;if(v!==0?(x&=v-1,x+=v):x=0,h++,--K[f]===0){if(f===c)break;f=r[i+s[h]];}if(f>p&&(x&k)!==T){for(_===0&&(_=p),S+=d,y=f-_,m=1<<y;y+_<c&&(m-=K[y+_],!(m<=0));)y++,m<<=1;if(g+=1<<y,t===Mn&&g>el||t===il&&g>tl)return 1;T=x&k,a[T]=p<<24|y<<16|S-o|0;}}return x!==0&&(a[S+x]=f-_<<24|64<<16|0),u.bits=p,0};});var Bl=b(se=>{var ee=Se(),Hn=Sn(),ge=kn(),rp=Gs(),sr=al(),ip=0,Ol=1,Il=2,ol=4,np=5,Yr=6,Ye=0,ap=1,op=2,ie=-2,Fl=-3,Un=-4,sp=-5,sl=8,jl=1,ll=2,fl=3,ul=4,dl=5,cl=6,hl=7,pl=8,ml=9,gl=10,Qr=11,Ce=12,Nn=13,vl=14,zn=15,bl=16,yl=17,_l=18,wl=19,Kr=20,Gr=21,xl=22,El=23,Sl=24,kl=25,Tl=26,Pn=27,Cl=28,Al=29,j=30,Zn=31,lp=32,fp=852,up=592,dp=15,cp=dp;function Rl(e){return (e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function hp(){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=jl,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(fp),t.distcode=t.distdyn=new ee.Buf32(up),t.sane=1,t.back=-1,Ye)}function Ml(e){var t;return !e||!e.state?ie:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,Dl(e))}function Nl(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,Ml(e))}function zl(e,t){var r,i;return e?(i=new hp,e.state=i,i.window=null,r=Nl(e,t),r!==Ye&&(e.state=null),r):ie}function pp(e){return zl(e,cp)}var Ll=true,Bn,qn;function mp(e){if(Ll){var t;for(Bn=new ee.Buf32(512),qn=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(sr(Ol,e.lens,0,288,Bn,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;sr(Il,e.lens,0,32,qn,0,e.work,{bits:5}),Ll=false;}e.lencode=Bn,e.lenbits=9,e.distcode=qn,e.distbits=5;}function Pl(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 gp(e,t){var r,i,n,a,o,s,u,l,f,h,d,c,p,y,_=0,m,g,x,v,w,T,k,S,C=new ee.Buf8(4),I,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=Nn),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,h=s,d=u,S=Ye;e:for(;;)switch(r.mode){case jl:if(r.wrap===0){r.mode=Nn;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=ge(r.check,C,2,0),l=0,f=0,r.mode=ll;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=j;break}if((l&15)!==sl){e.msg="unknown compression method",r.mode=j;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=j;break}r.dmax=1<<k,e.adler=r.check=1,r.mode=l&512?gl:Ce,l=0,f=0;break;case ll:for(;f<16;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(r.flags=l,(r.flags&255)!==sl){e.msg="unknown compression method",r.mode=j;break}if(r.flags&57344){e.msg="unknown header flags set",r.mode=j;break}r.head&&(r.head.text=l>>8&1),r.flags&512&&(C[0]=l&255,C[1]=l>>>8&255,r.check=ge(r.check,C,2,0)),l=0,f=0,r.mode=fl;case fl: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=ge(r.check,C,4,0)),l=0,f=0,r.mode=ul;case ul: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=ge(r.check,C,2,0)),l=0,f=0,r.mode=dl;case dl: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=ge(r.check,C,2,0)),l=0,f=0;}else r.head&&(r.head.extra=null);r.mode=cl;case cl:if(r.flags&1024&&(c=r.length,c>s&&(c=s),c&&(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,c,k)),r.flags&512&&(r.check=ge(r.check,i,c,a)),s-=c,a+=c,r.length-=c),r.length))break e;r.length=0,r.mode=hl;case hl:if(r.flags&2048){if(s===0)break e;c=0;do k=i[a+c++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k));while(k&&c<s);if(r.flags&512&&(r.check=ge(r.check,i,c,a)),s-=c,a+=c,k)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=pl;case pl:if(r.flags&4096){if(s===0)break e;c=0;do k=i[a+c++],r.head&&k&&r.length<65536&&(r.head.comment+=String.fromCharCode(k));while(k&&c<s);if(r.flags&512&&(r.check=ge(r.check,i,c,a)),s-=c,a+=c,k)break e}else r.head&&(r.head.comment=null);r.mode=ml;case ml: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=j;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 gl:for(;f<32;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}e.adler=r.check=Rl(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,op;e.adler=r.check=1,r.mode=Ce;case Ce:if(t===np||t===Yr)break e;case Nn:if(r.last){l>>>=f&7,f-=f&7,r.mode=Pn;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=vl;break;case 1:if(mp(r),r.mode=Kr,t===Yr){l>>>=2,f-=2;break e}break;case 2:r.mode=yl;break;case 3:e.msg="invalid block type",r.mode=j;}l>>>=2,f-=2;break;case vl: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=j;break}if(r.length=l&65535,l=0,f=0,r.mode=zn,t===Yr)break e;case zn:r.mode=bl;case bl:if(c=r.length,c){if(c>s&&(c=s),c>u&&(c=u),c===0)break e;ee.arraySet(n,i,a,c,o),s-=c,a+=c,u-=c,o+=c,r.length-=c;break}r.mode=Ce;break;case yl: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=j;break}r.have=0,r.mode=_l;case _l: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,I={bits:r.lenbits},S=sr(ip,r.lens,0,19,r.lencode,0,r.work,I),r.lenbits=I.bits,S){e.msg="invalid code lengths set",r.mode=j;break}r.have=0,r.mode=wl;case wl:for(;r.have<r.nlen+r.ndist;){for(;_=r.lencode[l&(1<<r.lenbits)-1],m=_>>>24,g=_>>>16&255,x=_&65535,!(m<=f);){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(x<16)l>>>=m,f-=m,r.lens[r.have++]=x;else {if(x===16){for(E=m+2;f<E;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(l>>>=m,f-=m,r.have===0){e.msg="invalid bit length repeat",r.mode=j;break}k=r.lens[r.have-1],c=3+(l&3),l>>>=2,f-=2;}else if(x===17){for(E=m+3;f<E;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}l>>>=m,f-=m,k=0,c=3+(l&7),l>>>=3,f-=3;}else {for(E=m+7;f<E;){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}l>>>=m,f-=m,k=0,c=11+(l&127),l>>>=7,f-=7;}if(r.have+c>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=j;break}for(;c--;)r.lens[r.have++]=k;}}if(r.mode===j)break;if(r.lens[256]===0){e.msg="invalid code -- missing end-of-block",r.mode=j;break}if(r.lenbits=9,I={bits:r.lenbits},S=sr(Ol,r.lens,0,r.nlen,r.lencode,0,r.work,I),r.lenbits=I.bits,S){e.msg="invalid literal/lengths set",r.mode=j;break}if(r.distbits=6,r.distcode=r.distdyn,I={bits:r.distbits},S=sr(Il,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,I),r.distbits=I.bits,S){e.msg="invalid distances set",r.mode=j;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,rp(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],m=_>>>24,g=_>>>16&255,x=_&65535,!(m<=f);){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if(g&&(g&240)===0){for(v=m,w=g,T=x;_=r.lencode[T+((l&(1<<v+w)-1)>>v)],m=_>>>24,g=_>>>16&255,x=_&65535,!(v+m<=f);){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}l>>>=v,f-=v,r.back+=v;}if(l>>>=m,f-=m,r.back+=m,r.length=x,g===0){r.mode=Tl;break}if(g&32){r.back=-1,r.mode=Ce;break}if(g&64){e.msg="invalid literal/length code",r.mode=j;break}r.extra=g&15,r.mode=xl;case xl: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=El;case El:for(;_=r.distcode[l&(1<<r.distbits)-1],m=_>>>24,g=_>>>16&255,x=_&65535,!(m<=f);){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}if((g&240)===0){for(v=m,w=g,T=x;_=r.distcode[T+((l&(1<<v+w)-1)>>v)],m=_>>>24,g=_>>>16&255,x=_&65535,!(v+m<=f);){if(s===0)break e;s--,l+=i[a++]<<f,f+=8;}l>>>=v,f-=v,r.back+=v;}if(l>>>=m,f-=m,r.back+=m,g&64){e.msg="invalid distance code",r.mode=j;break}r.offset=x,r.extra=g&15,r.mode=Sl;case Sl: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=j;break}r.mode=kl;case kl:if(u===0)break e;if(c=d-u,r.offset>c){if(c=r.offset-c,c>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=j;break}c>r.wnext?(c-=r.wnext,p=r.wsize-c):p=r.wnext-c,c>r.length&&(c=r.length),y=r.window;}else y=n,p=o-r.offset,c=r.length;c>u&&(c=u),u-=c,r.length-=c;do n[o++]=y[p++];while(--c);r.length===0&&(r.mode=Gr);break;case Tl:if(u===0)break e;n[o++]=r.length,u--,r.mode=Gr;break;case Pn: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?ge(r.check,n,d,o-d):Hn(r.check,n,d,o-d)),d=u,(r.flags?l:Rl(l))!==r.check){e.msg="incorrect data check",r.mode=j;break}l=0,f=0;}r.mode=Cl;case Cl: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=j;break}l=0,f=0;}r.mode=Al;case Al:S=ap;break e;case j:S=Fl;break e;case Zn:return Un;case lp: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<j&&(r.mode<Pn||t!==ol))&&Pl(e,e.output,e.next_out,d-e.avail_out)?(r.mode=Zn,Un):(h-=e.avail_in,d-=e.avail_out,e.total_in+=h,e.total_out+=d,r.total+=d,r.wrap&&d&&(e.adler=r.check=r.flags?ge(r.check,n,d,e.next_out-d):Hn(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===zn?256:0),(h===0&&d===0||t===ol)&&S===Ye&&(S=sp),S)}function vp(e){if(!e||!e.state)return ie;var t=e.state;return t.window&&(t.window=null),e.state=null,Ye}function bp(e,t){var r;return !e||!e.state||(r=e.state,(r.wrap&2)===0)?ie:(r.head=t,t.done=false,Ye)}function yp(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=Hn(n,t,r,0),n!==i.check)?Fl:(a=Pl(e,t,r,r),a?(i.mode=Zn,Un):(i.havedict=1,Ye))}se.inflateReset=Ml;se.inflateReset2=Nl;se.inflateResetKeep=Dl;se.inflateInit=pp;se.inflateInit2=zl;se.inflate=gp;se.inflateEnd=vp;se.inflateGetHeader=bp;se.inflateSetDictionary=yp;se.inflateInfo="pako inflate (from Nodeca project)";});var Wn=b((Og,ql)=>{ql.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 Ul=b((Ig,Hl)=>{function _p(){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;}Hl.exports=_p;});var Wl=b(fr=>{var St=Bl(),lr=Se(),ei=Ln(),N=Wn(),Jn=qr(),wp=On(),xp=Ul(),Zl=Object.prototype.toString;function Ke(e){if(!(this instanceof Ke))return new Ke(e);this.options=lr.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 wp,this.strm.avail_out=0;var r=St.inflateInit2(this.strm,t.windowBits);if(r!==N.Z_OK)throw new Error(Jn[r]);if(this.header=new xp,St.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=ei.string2buf(t.dictionary):Zl.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=St.inflateSetDictionary(this.strm,t.dictionary),r!==N.Z_OK)))throw new Error(Jn[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?N.Z_FINISH:N.Z_NO_FLUSH,typeof e=="string"?r.input=ei.binstring2buf(e):Zl.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 lr.Buf8(i),r.next_out=0,r.avail_out=i),a=St.inflate(r,N.Z_NO_FLUSH),a===N.Z_NEED_DICT&&n&&(a=St.inflateSetDictionary(this.strm,n)),a===N.Z_BUF_ERROR&&f===true&&(a=N.Z_OK,f=false),a!==N.Z_STREAM_END&&a!==N.Z_OK)return this.onEnd(a),this.ended=true,false;r.next_out&&(r.avail_out===0||a===N.Z_STREAM_END||r.avail_in===0&&(o===N.Z_FINISH||o===N.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&&lr.arraySet(r.output,r.output,s,u,0),this.onData(l)):this.onData(lr.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!==N.Z_STREAM_END);return a===N.Z_STREAM_END&&(o=N.Z_FINISH),o===N.Z_FINISH?(a=St.inflateEnd(this.strm),this.onEnd(a),this.ended=true,a===N.Z_OK):(o===N.Z_SYNC_FLUSH&&(this.onEnd(N.Z_OK),r.avail_out=0),true)};Ke.prototype.onData=function(e){this.chunks.push(e);};Ke.prototype.onEnd=function(e){e===N.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=lr.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg;};function $n(e,t){var r=new Ke(t);if(r.push(e,true),r.err)throw r.msg||Jn[r.err];return r.result}function Ep(e,t){return t=t||{},t.raw=true,$n(e,t)}fr.Inflate=Ke;fr.inflate=$n;fr.inflateRaw=Ep;fr.ungzip=$n;});var Vl=b((jg,$l)=>{var Sp=Se().assign,kp=Ys(),Tp=Wl(),Cp=Wn(),Jl={};Sp(Jl,kp,Tp,Cp);$l.exports=Jl;});var Yl=b(ri=>{var Ap=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",Rp=Vl(),Xl=M(),ti=Q(),Lp=Ap?"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={};}Xl.inherits(Ge,ti);Ge.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(Xl.transformTo(Lp,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 Rp[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 Xn=b(Vn=>{var Kl=Q();Vn.STORE={magic:"\0\0",compressWorker:function(){return new Kl("STORE compression")},uncompressWorker:function(){return new Kl("STORE decompression")}};Vn.DEFLATE=Yl();});var Yn=b(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 tf=b((zg,ef)=>{var kt=M(),Tt=Q(),Kn=ht(),Gl=Mr(),ii=Yn(),O=function(e,t){var r="",i;for(i=0;i<t;i++)r+=String.fromCharCode(e&255),e=e>>>8;return r},Op=function(e,t){var r=e;return e||(r=t?16893:33204),(r&65535)<<16},Ip=function(e){return (e||0)&63},Ql=function(e,t,r,i,n,a){var o=e.file,s=e.compression,u=a!==Kn.utf8encode,l=kt.transformTo("string",a(o.name)),f=kt.transformTo("string",Kn.utf8encode(o.name)),h=o.comment,d=kt.transformTo("string",a(h)),c=kt.transformTo("string",Kn.utf8encode(h)),p=f.length!==o.name.length,y=c.length!==h.length,_,m,g="",x="",v="",w=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&&(p||y)&&(S|=2048);var C=0,I=0;w&&(C|=16),n==="UNIX"?(I=798,C|=Op(o.unixPermissions,w)):(I=20,C|=Ip(o.dosPermissions)),_=T.getUTCHours(),_=_<<6,_=_|T.getUTCMinutes(),_=_<<5,_=_|T.getUTCSeconds()/2,m=T.getUTCFullYear()-1980,m=m<<4,m=m|T.getUTCMonth()+1,m=m<<5,m=m|T.getUTCDate(),p&&(x=O(1,1)+O(Gl(l),4)+f,g+="up"+O(x.length,2)+x),y&&(v=O(1,1)+O(Gl(d),4)+c,g+="uc"+O(v.length,2)+v);var E="";E+=`
|
|
2
|
+
\0`,E+=O(S,2),E+=s.magic,E+=O(_,2),E+=O(m,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(I,2)+E+O(d.length,2)+"\0\0\0\0"+O(C,4)+O(i,4)+l+g+d;return {fileRecord:K,dirRecord:et}},Fp=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},jp=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=Ql(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=Ql(e,t,true,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:jp(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=Fp(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();};ef.exports=le;});var nf=b(rf=>{var Dp=Xn(),Mp=tf(),Np=function(e,t){var r=e||t,i=Dp[r];if(!i)throw new Error(r+" is not a valid compression method !");return i};rf.generateWorker=function(e,t,r){var i=new Mp(t.streamFiles,r,t.platform,t.encodeFileName),n=0;try{e.forEach(function(a,o){n++;var s=Np(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 of=b((Bg,af)=>{var zp=M(),ni=Q();function ur(e,t){ni.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=false,this._bindStream(t);}zp.inherits(ur,ni);ur.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();});};ur.prototype.pause=function(){return ni.prototype.pause.call(this)?(this._stream.pause(),true):false};ur.prototype.resume=function(){return ni.prototype.resume.call(this)?(this._upstreamEnded?this.end():this._stream.resume(),true):false};af.exports=ur;});var gf=b((qg,mf)=>{var Pp=ht(),dr=M(),uf=Q(),Bp=tn(),df=rn(),sf=Nr(),qp=ss(),Hp=nf(),lf=Bt(),Up=of(),cf=function(e,t,r){var i=dr.getTypeOf(t),n,a=dr.extend(r||{},df);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=hf(e)),a.createFolders&&(n=Zp(e))&&pf.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 sf&&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 sf||t instanceof uf?u=t:lf.isNode&&lf.isStream(t)?u=new Up(e,t):u=dr.prepareContent(e,t,a.binary,a.optimizedBinaryString,a.base64);var l=new qp(e,u,a);this.files[e]=l;},Zp=function(e){e.slice(-1)==="/"&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return t>0?e.substring(0,t):""},hf=function(e){return e.slice(-1)!=="/"&&(e+="/"),e},pf=function(e,t){return t=typeof t<"u"?t:df.createFolders,e=hf(e),this.files[e]||cf.call(this,e,null,{dir:true,createFolders:t}),this.files[e]};function ff(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var Wp={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(ff(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,cf.call(this,e,t,r);return this},folder:function(e){if(!e)return this;if(ff(e))return this.filter(function(n,a){return a.dir&&e.test(n)});var t=this.root+e,r=pf.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=dr.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:Pp.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.");dr.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=Hp.generateWorker(this,r,i);}catch(n){t=new uf("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)}};mf.exports=Wp;});var Gn=b((Hg,bf)=>{var Jp=M();function vf(e){this.data=e,this.length=e.length,this.index=0,this.zero=0;}vf.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 Jp.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))}};bf.exports=vf;});var Qn=b((Ug,_f)=>{var yf=Gn(),$p=M();function Ct(e){yf.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=e[t]&255;}$p.inherits(Ct,yf);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};_f.exports=Ct;});var Ef=b((Zg,xf)=>{var wf=Gn(),Vp=M();function At(e){wf.call(this,e);}Vp.inherits(At,wf);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};xf.exports=At;});var ta=b((Wg,kf)=>{var Sf=Qn(),Xp=M();function ea(e){Sf.call(this,e);}Xp.inherits(ea,Sf);ea.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};kf.exports=ea;});var Af=b((Jg,Cf)=>{var Tf=ta(),Yp=M();function ra(e){Tf.call(this,e);}Yp.inherits(ra,Tf);ra.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};Cf.exports=ra;});var ia=b(($g,Lf)=>{var ai=M(),Rf=xe(),Kp=Qn(),Gp=Ef(),Qp=Af(),em=ta();Lf.exports=function(e){var t=ai.getTypeOf(e);return ai.checkSupport(t),t==="string"&&!Rf.uint8array?new Gp(e):t==="nodebuffer"?new Qp(e):Rf.uint8array?new em(ai.transformTo("uint8array",e)):new Kp(ai.transformTo("array",e))};});var jf=b((Vg,Ff)=>{var na=ia(),Pe=M(),tm=Nr(),Of=Mr(),oi=ht(),si=Xn(),rm=xe(),im=0,nm=3,am=function(e){for(var t in si)if(Object.prototype.hasOwnProperty.call(si,t)&&si[t].magic===e)return si[t];return null};function If(e,t){this.options=e,this.loadOptions=t;}If.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=am(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 tm(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===im&&(this.dosPermissions=this.externalFileAttributes&63),e===nm&&(this.unixPermissions=this.externalFileAttributes>>16&65535),!this.dir&&this.fileNameStr.slice(-1)==="/"&&(this.dir=true);},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=na(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=rm.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=na(e.value);return t.readInt(1)!==1||Of(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=na(e.value);return t.readInt(1)!==1||Of(this.fileComment)!==t.readInt(4)?null:oi.utf8decode(t.readData(e.length-5))}return null}};Ff.exports=If;});var Nf=b((Xg,Mf)=>{var om=ia(),Ae=M(),fe=Yn(),sm=jf(),lm=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=lm.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 sm({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=om(e);},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles();}};Mf.exports=Df;});var Bf=b((Yg,Pf)=>{var aa=M(),li=ut(),fm=ht(),um=Nf(),dm=on(),zf=Bt();function cm(e){return new li.Promise(function(t,r){var i=e.decompressed.getContentWorker().pipe(new dm);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();})}Pf.exports=function(e,t){var r=this;return t=aa.extend(t||{},{base64:false,checkCRC32:false,optimizedBinaryString:false,createFolders:false,decodeFileName:fm.utf8decode}),zf.isNode&&zf.isStream(e)?li.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):aa.prepareContent("the loaded zip file",e,true,t.optimizedBinaryString,t.base64).then(function(i){var n=new um(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(cm(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=aa.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 Hf=b((Kg,qf)=>{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=gf();ne.prototype.loadAsync=Bf();ne.support=xe();ne.defaults=rn();ne.version="3.10.1";ne.loadAsync=function(e,t){return new ne().loadAsync(e,t)};ne.external=ut();qf.exports=ne;});var Zf={};tu(Zf,{unpackJdfxToDocument:()=>mm});function hm(e){return !e||typeof e!="string"||e.startsWith("/")||e.includes("\\")||e.includes("..")?false:e.startsWith(`${wa}/`)}function pm(e){let t="";for(let i=0;i<e.length;i+=32768)t+=String.fromCharCode(...e.subarray(i,i+32768));return btoa(t)}async function mm(e){let t=await Uf.default.loadAsync(e),r=t.file(ci);if(!r)throw new Error(`${ci} 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;}if(a?.assets){i.resources||(i.resources={images:{}}),i.resources.images||(i.resources.images={});for(let o of a.assets){if(!hm(o.path)){console.warn(`[jdfjs] dropping unsafe manifest asset path: ${o.path}`);continue}let s=t.file(o.path);if(!s)continue;let u=await s.async("uint8array"),l=o.mimeType||xa(o.path),f={src:"embedded",mimeType:l,data:pm(u)};Ea(l)?(i.resources.videos||(i.resources.videos={}),i.resources.videos[o.id]=f):i.resources.images[o.id]=f;}}return i}var Uf,Wf=Rt(()=>{Uf=iu(Hf());Lt();});Lt();Lt();Lt();function ka(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 B(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.lineHeight&&(t["line-height"]=String(e.lineHeight)),e.textIndent&&(t["text-indent"]=`${D(e.textIndent)}px`),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=ka(e.padding)),e.margin!=null&&(t.margin=ka(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 W(e,t){if(!e)return {};if(typeof e=="string")return B(t[e]||{});if(Array.isArray(e)){let r={};for(let i of e)r={...r,...t[i]||{}};return B(r)}return B(e)}function q(e,t){for(let[r,i]of Object.entries(t))e.style.setProperty(r,i);}function hi(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 gr(e,t){let r=document.createElement("div");fu(r,e);let i=null;switch(e.type){case "text":i=uu(e,t);break;case "richtext":i=cu(e,t);break;case "image":i=bu(e,t);break;case "video":i=gu(e,t);break;case "table":i=Su(e,t);break;case "list":i=ku(e,t);break;case "shape":i=Tu(e);break;case "collapsible":i=Cu(e,t);break;case "toc":i=Au(e,t);break;case "input":i=Ru(e,t);break;case "textarea":i=Lu(e,t);break;case "checkbox":i=Ou(e,t);break;case "select":i=Iu(e,t);break;case "signature":i=Fu(e,t);break;default:i=document.createElement("div"),i.className="jdfjs-unknown",i.textContent=`[unknown: ${e.type}]`;}return i?(r.dataset.jdfType=String(e.type),r.appendChild(i),r):null}function fu(e,t){let r=t;r.position&&(e.style.position="absolute",r.position.x!=null&&(e.style.left=`${D(r.position.x)}px`),r.position.y!=null&&(e.style.top=`${D(r.position.y)}px`)),r.width!=null&&(e.style.width=`${D(r.width)}px`),r.height!=null&&(e.style.height=`${D(r.height)}px`);}function uu(e,t){let r=du(e.heading),i=document.createElement(r);i.className="jdfjs-text",i.style.margin="0",i.style.whiteSpace="pre-wrap",q(i,W(e.style,t.styles)),e.align&&(i.style.textAlign=e.align);let n=hi(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 du(e){return e===true?"h1":typeof e=="number"&&e>=1&&e<=6?"h"+e:"p"}function cu(e,t){let r=document.createElement("p");r.style.whiteSpace="pre-wrap",r.className="jdfjs-richtext",r.style.margin="0",q(r,W(e.style,t.styles));for(let i of e.runs||[])r.appendChild(pu(i,t));return r}function hu(e,t){let r={};if(e.style)if(typeof e.style=="string")Object.assign(r,B(t[e.style]||{}));else if(Array.isArray(e.style))for(let n of e.style)Object.assign(r,B(t[n]||{}));else Object.assign(r,B(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 pu(e,t){let r=hi(e.link),i=r?document.createElement("a"):document.createElement("span");return r&&(pi(i,r,t.onNavigatePage),i.classList.add("jdfjs-link")),q(i,hu(e,t.styles)),i.textContent=e.text,i}function mi(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;let n=e.videos?.[t];if(n)return n}function mu(e,t,r){if(e.src?.startsWith("data:")||e.src?.startsWith("http"))return e.src;if(e.resource){let i=mi(t,e.resource);if(i?.data){let n=i.mimeType||r;return i.data.startsWith("data:")?i.data:`data:${n};base64,${i.data}`}if(i?.path)return i.path}return e.src||""}function gu(e,t){let r=document.createElement("div");r.className="jdfjs-video",r.style.width="100%",r.style.height="100%";let i=document.createElement("video");if(i.src=mu(e,t.resources,"video/mp4"),e.poster){let a=mi(t.resources,e.poster);i.poster=a?.data?a.data.startsWith("data:")?a.data:`data:${a.mimeType||"image/png"};base64,${a.data}`:e.poster;}switch(e.title&&(i.title=e.title,i.setAttribute("aria-label",e.title)),i.controls=e.controls!==false,i.autoplay=!!e.autoplay,i.loop=!!e.loop,i.muted=!!e.muted||!!e.autoplay,i.playsInline=true,i.preload="metadata",i.style.display="block",i.style.width="100%",i.style.height="100%",i.style.background="#000",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";}q(i,W(e.style,t.styles)),e.id&&i.setAttribute("data-jdf-video",e.id);let n=e.transcript?.segments;if(n&&n.length){let a=u=>{let l=Math.floor(u/3600),f=Math.floor(u%3600/60),h=u%60;return `${String(l).padStart(2,"0")}:${String(f).padStart(2,"0")}:${h.toFixed(3).padStart(6,"0")}`},o=n.map((u,l)=>`${l+1}
|
|
3
3
|
${a(u.t0)} --> ${a(Math.max(u.t1,u.t0+.2))}
|
|
4
4
|
${u.speaker?u.speaker+": ":""}${u.text}`).join(`
|
|
5
5
|
|
|
6
6
|
`),s=document.createElement("track");s.kind="captions",s.label="Transcript",s.srclang=e.transcript?.language||"en",s.src=`data:text/vtt;charset=utf-8,${encodeURIComponent(`WEBVTT
|
|
7
7
|
|
|
8
8
|
${o}
|
|
9
|
-
`)}`,s.default=true,i.appendChild(s);}return r.appendChild(i),r}function vu(e,t){if(e.src?.startsWith("data:")||e.src?.startsWith("http"))return e.src;if(e.resource){let r=mi(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 bu(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=vu(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,W(e.style,t.styles)),r.appendChild(i),r}function yu(e){return e==null?"":typeof e=="string"?e:typeof e=="object"?e.content==null?"":String(e.content):String(e)}function _u(e){return e==null||typeof e!="object"?{}:{colspan:e.colspan,rowspan:e.rowspan}}function wu(e,t){if(e==null||typeof e!="object"||!e.style)return {};let r=e.style;if(typeof r=="string")return B(t[r]||{});if(Array.isArray(r)){let i={};for(let n of r)i={...i,...B(t[n]||{})};return i}return B(r)}function xu(e){return e==null||typeof e!="object"?void 0:e.align}function Eu(e){if(e!=null)return typeof e=="number"?`${M(e)}px`:e}function Su(e,t){let r=document.createElement("div");r.className="jdfjs-table-wrap",q(r,W(e.style,t.styles)),r.style.overflowX="auto";let i=(()=>{let d=e.headerStyle;if(!d)return {};if(typeof d=="string")return B(t.styles[d]||{});if(Array.isArray(d)){let c={};for(let p of d)c={...c,...B(t.styles[p]||{})};return c}return B(d)})(),n=(()=>{let d=e.rowStyle;if(!d)return {};if(typeof d=="string")return B(t.styles[d]||{});if(Array.isArray(d)){let c={};for(let p of d)c={...c,...B(t.styles[p]||{})};return c}return B(d)})(),a=(()=>{let d=e.alternateRowStyle;if(!d){let c=e.alternatingRowColor;return c?{"background-color":c}:{}}if(typeof d=="string")return B(t.styles[d]||{});if(Array.isArray(d)){let c={};for(let p of d)c={...c,...B(t.styles[p]||{})};return c}return B(d)})(),o=(()=>{let d=e.borders;return d===false?{outer:false,inner:false}:d===true||d===void 0?{outer:true,inner:true,color:"#e2e8f0",width:1}:{outer:true,inner:true,color:"#e2e8f0",width:1,...d}})(),s=e.headers??e.columns?.map(d=>d.header||"").filter(d=>d!==""),u=d=>e.columns?.[d]?.align,l=document.createElement("table");if(l.style.width="100%",l.style.borderCollapse="collapse",l.style.tableLayout=e.columns?.some(d=>d.width!=null)?"fixed":"auto",l.style.fontSize="14px",o.outer&&(l.style.border=`${o.width||1}px solid ${o.color||"#e2e8f0"}`),e.columns?.some(d=>d.width!=null)){let d=document.createElement("colgroup");e.columns.forEach(c=>{let p=document.createElement("col"),y=Eu(c.width);y&&(p.style.width=y),d.appendChild(p);}),l.appendChild(d);}if(s&&s.length>0){let d=document.createElement("thead"),c=document.createElement("tr");q(c,i),s.forEach((p,y)=>{let _=document.createElement("th");_.textContent=p,_.style.padding="8px 12px",_.style.fontWeight="600",_.style.background="#f8fafc",_.style.textAlign=u(y)||"left",o.inner&&(_.style.border=`${o.width||1}px solid ${o.color||"#e2e8f0"}`),c.appendChild(_);}),d.appendChild(c),l.appendChild(d);}let f=document.createElement("tbody");return (Array.isArray(e.rows)?e.rows:[]).forEach((d,c)=>{if(!Array.isArray(d))return;let p=document.createElement("tr");q(p,n),c%2===1&&q(p,a),d.forEach((y,_)=>{let m=document.createElement("td");m.textContent=yu(y);let g=_u(y);g.colspan&&(m.colSpan=g.colspan),g.rowspan&&(m.rowSpan=g.rowspan),m.style.padding="8px 12px",m.style.verticalAlign="top",m.style.textAlign=xu(y)||u(_)||"left",o.inner&&(m.style.border=`${o.width||1}px solid ${o.color||"#e2e8f0"}`),q(m,wu(y,t.styles)),p.appendChild(m);}),f.appendChild(p);}),l.appendChild(f),r.appendChild(l),r}function ku(e,t){let r=document.createElement("div");r.className="jdfjs-list-wrap",q(r,W(e.style,t.styles));let i=e.listType??(e.ordered?"ordered":"unordered"),n=Ta(i);return Ca(n,e.items||[],i),r.appendChild(n),r}function Ta(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 Ca(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=Ta(o);s.style.marginTop="4px",Ca(s,n.children,o),a.appendChild(s);}e.appendChild(a);}}function Tu(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 Cu(e,t){let r=document.createElement("div");r.className="jdfjs-collapsible",q(r,W(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=gr(l,{...t,path:[...t.path,"elements"]});f&&o.appendChild(f);}return r.appendChild(o),r}function Au(e,t){let r=document.createElement("div");r.className="jdfjs-toc",q(r,W(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 Ru(e,t){let r=document.createElement("div");r.className="jdfjs-form-field jdfjs-form-input",q(r,W(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 Lu(e,t){let r=document.createElement("div");r.className="jdfjs-form-field jdfjs-form-textarea",q(r,W(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 Ou(e,t){let r=document.createElement("label");r.className="jdfjs-form-field jdfjs-form-checkbox",q(r,W(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 Fu(e,t){let r=document.createElement("div");r.className="jdfjs-form-field jdfjs-form-select",q(r,W(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 Iu(e,t){let r=document.createElement("div");r.className="jdfjs-form-field jdfjs-form-signature",q(r,W(e.style,t.styles));let i=vr(e.label);i&&r.appendChild(i);let n=M(e.width??80),a=M(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 c=o.getContext("2d");c&&(c.strokeStyle="#0f172a",c.lineWidth=1.6,c.lineCap="round",c.beginPath(),c.moveTo(u.x,u.y),c.lineTo(d.offsetX,d.offsetY),c.stroke(),u={x:d.offsetX,y:d.offsetY});}function h(){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",h),o.addEventListener("pointerleave",h),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",c=>{c.preventDefault(),o.getContext("2d")?.clearRect(0,0,o.width,o.height),be(t,"value","");}),r.appendChild(d);}return r}function Aa(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 oa(e,t,r={}){let i=$f(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:h}=await Promise.resolve().then(()=>(Wf(),Zf));f=await h(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"),Jf(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">${gm(o.message)}</div>`,r.onError?.(o)),o}}function Jf(e,t,r={}){let i=$f(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.requestedZoom=1;this.userZoomed=false;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.requestedZoom=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(){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;if(this.options.fit==="manual"){if(n<=0)return;let o=n/r,s=this.userZoomed?this.zoom:Math.min(this.requestedZoom,o);(Math.abs(s-this.zoom)>.001||t.style.transformOrigin!=="top left")&&(this.zoom=Math.max(.25,Math.min(3,s)),this.applyZoom(),this.updateIndicators());return}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=`
|
|
9
|
+
`)}`,s.default=true,i.appendChild(s);}return r.appendChild(i),r}function vu(e,t){if(e.src?.startsWith("data:")||e.src?.startsWith("http"))return e.src;if(e.resource){let r=mi(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 bu(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=vu(e,t.resources),i.alt=e.alt||e.caption||"",e.caption&&(i.title=e.caption),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,W(e.style,t.styles)),r.appendChild(i),r}function yu(e){return e==null?"":typeof e=="string"?e:typeof e=="object"?e.content==null?"":String(e.content):String(e)}function _u(e){return e==null||typeof e!="object"?{}:{colspan:e.colspan,rowspan:e.rowspan}}function wu(e,t){if(e==null||typeof e!="object"||!e.style)return {};let r=e.style;if(typeof r=="string")return B(t[r]||{});if(Array.isArray(r)){let i={};for(let n of r)i={...i,...B(t[n]||{})};return i}return B(r)}function xu(e){return e==null||typeof e!="object"?void 0:e.align}function Eu(e){if(e!=null)return typeof e=="number"?`${D(e)}px`:e}function Su(e,t){let r=document.createElement("div");r.className="jdfjs-table-wrap",q(r,W(e.style,t.styles)),r.style.overflowX="auto";let i=(()=>{let d=e.headerStyle;if(!d)return {};if(typeof d=="string")return B(t.styles[d]||{});if(Array.isArray(d)){let c={};for(let p of d)c={...c,...B(t.styles[p]||{})};return c}return B(d)})(),n=(()=>{let d=e.rowStyle;if(!d)return {};if(typeof d=="string")return B(t.styles[d]||{});if(Array.isArray(d)){let c={};for(let p of d)c={...c,...B(t.styles[p]||{})};return c}return B(d)})(),a=(()=>{let d=e.alternateRowStyle;if(!d){let c=e.alternatingRowColor;return c?{"background-color":c}:{}}if(typeof d=="string")return B(t.styles[d]||{});if(Array.isArray(d)){let c={};for(let p of d)c={...c,...B(t.styles[p]||{})};return c}return B(d)})(),o=(()=>{let d=e.borders;return d===false?{outer:false,inner:false}:d===true||d===void 0?{outer:true,inner:true,color:"#e2e8f0",width:1}:{outer:true,inner:true,color:"#e2e8f0",width:1,...d}})(),s=e.headers??e.columns?.map(d=>d.header||"").filter(d=>d!==""),u=d=>e.columns?.[d]?.align,l=document.createElement("table");if(l.style.width="100%",l.style.borderCollapse="collapse",l.style.tableLayout=e.columns?.some(d=>d.width!=null)?"fixed":"auto",l.style.fontSize="14px",o.outer&&(l.style.border=`${o.width||1}px solid ${o.color||"#e2e8f0"}`),e.columns?.some(d=>d.width!=null)){let d=document.createElement("colgroup");e.columns.forEach(c=>{let p=document.createElement("col"),y=Eu(c.width);y&&(p.style.width=y),d.appendChild(p);}),l.appendChild(d);}if(s&&s.length>0){let d=document.createElement("thead"),c=document.createElement("tr");q(c,i),s.forEach((p,y)=>{let _=document.createElement("th");_.textContent=p,_.style.padding="8px 12px",_.style.fontWeight="600",_.style.background="#f8fafc",_.style.textAlign=u(y)||"left",o.inner&&(_.style.border=`${o.width||1}px solid ${o.color||"#e2e8f0"}`),c.appendChild(_);}),d.appendChild(c),l.appendChild(d);}let f=document.createElement("tbody");return (Array.isArray(e.rows)?e.rows:[]).forEach((d,c)=>{if(!Array.isArray(d))return;let p=document.createElement("tr");q(p,n),c%2===1&&q(p,a),d.forEach((y,_)=>{let m=document.createElement("td");m.textContent=yu(y);let g=_u(y);g.colspan&&(m.colSpan=g.colspan),g.rowspan&&(m.rowSpan=g.rowspan),m.style.padding="8px 12px",m.style.verticalAlign="top",m.style.textAlign=xu(y)||u(_)||"left",o.inner&&(m.style.border=`${o.width||1}px solid ${o.color||"#e2e8f0"}`),q(m,wu(y,t.styles)),p.appendChild(m);}),f.appendChild(p);}),l.appendChild(f),r.appendChild(l),r}function ku(e,t){let r=document.createElement("div");r.className="jdfjs-list-wrap",q(r,W(e.style,t.styles));let i=e.listType??(e.ordered?"ordered":"unordered"),n=Ta(i);return Ca(n,e.items||[],i),r.appendChild(n),r}function Ta(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 Ca(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=Ta(o);s.style.marginTop="4px",Ca(s,n.children,o),a.appendChild(s);}e.appendChild(a);}}function Tu(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 Cu(e,t){let r=document.createElement("div");r.className="jdfjs-collapsible",q(r,W(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=gr(l,{...t,path:[...t.path,"elements"]});f&&o.appendChild(f);}return r.appendChild(o),r}function Au(e,t){let r=document.createElement("div");r.className="jdfjs-toc",q(r,W(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 Ru(e,t){let r=document.createElement("div");r.className="jdfjs-form-field jdfjs-form-input",q(r,W(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 Lu(e,t){let r=document.createElement("div");r.className="jdfjs-form-field jdfjs-form-textarea",q(r,W(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 Ou(e,t){let r=document.createElement("label");r.className="jdfjs-form-field jdfjs-form-checkbox",q(r,W(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 Iu(e,t){let r=document.createElement("div");r.className="jdfjs-form-field jdfjs-form-select",q(r,W(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 Fu(e,t){let r=document.createElement("div");r.className="jdfjs-form-field jdfjs-form-signature",q(r,W(e.style,t.styles));let i=vr(e.label);i&&r.appendChild(i);let n=D(e.width??80),a=D(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 c=o.getContext("2d");c&&(c.strokeStyle="#0f172a",c.lineWidth=1.6,c.lineCap="round",c.beginPath(),c.moveTo(u.x,u.y),c.lineTo(d.offsetX,d.offsetY),c.stroke(),u={x:d.offsetX,y:d.offsetY});}function h(){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",h),o.addEventListener("pointerleave",h),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",c=>{c.preventDefault(),o.getContext("2d")?.clearRect(0,0,o.width,o.height),be(t,"value","");}),r.appendChild(d);}return r}function Aa(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 cr=new WeakMap;async function oa(e,t,r={}){let i=$f(e),n=cr.get(i);n&&n.abort();let a=new AbortController;cr.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:h}=await Promise.resolve().then(()=>(Wf(),Zf));f=await h(await s.arrayBuffer());}else f=await s.json();if(!f?.$jdf)throw new Error("Not a valid JDF document (missing $jdf field)");if(cr.get(i)!==a)throw new DOMException("Superseded by a newer src change","AbortError");return i.classList.remove("jdfjs-loading"),Jf(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">${gm(o.message)}</div>`,r.onError?.(o)),o}}function Jf(e,t,r={}){let i=$f(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.requestedZoom=1;this.userZoomed=false;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.requestedZoom=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(){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;if(this.options.fit==="manual"){if(n<=0)return;let o=n/r,s=this.userZoomed?this.zoom:Math.min(this.requestedZoom,o);(Math.abs(s-this.zoom)>.001||t.style.transformOrigin!=="top left")&&(this.zoom=Math.max(.25,Math.min(3,s)),this.applyZoom(),this.updateIndicators());return}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=`
|
|
10
10
|
<span class="jdfjs-title"></span>
|
|
11
11
|
<div class="jdfjs-spacer"></div>
|
|
12
12
|
<button class="jdfjs-btn" data-act="prev" title="Previous page">\u2039</button>
|
|
@@ -16,5 +16,5 @@ ${o}
|
|
|
16
16
|
<button class="jdfjs-btn" data-act="zoom-out" title="Zoom out">\u2212</button>
|
|
17
17
|
<span class="jdfjs-zoom-indicator"></span>
|
|
18
18
|
<button class="jdfjs-btn" data-act="zoom-in" title="Zoom in">+</button>
|
|
19
|
-
`,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();}seek(t,r){let i=this.pagesEl.querySelector(`video[data-jdf-video="${t.replace(/"/g,'\\"')}"]`);if(!i)return false;let n=i.closest(".jdfjs-page-wrapper"),a=n?Number(n.getAttribute("data-page-index")):NaN;Number.isNaN(a)||this.goToPage(a),i.scrollIntoView({block:"center"});let o=()=>{i.currentTime=Math.max(0,r),i.play().catch(()=>{});};return i.readyState>=1?o():i.addEventListener("loadedmetadata",o,{once:true}),true}renderPage(t,r,i){let n=ba(t.pageSize??this.doc.meta?.pageSize??"A4",t.pageOrientation??this.doc.meta?.pageOrientation??"portrait"),a={...va,...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=`${M(n.width)}px`,s.style.minHeight=`${M(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,h=l?.height??0;if(u){let c=t.header?["pages",r,"header"]:["header"],p=this.renderHeaderFooter(u,r,this.doc.pages.length,i,c);p.classList.add("jdfjs-header"),p.style.paddingTop=`${M(a.top/2)}px`,p.style.paddingLeft=`${M(a.left)}px`,p.style.paddingRight=`${M(a.right)}px`,s.appendChild(p);}let d=document.createElement("div");if(d.className="jdfjs-page-content",d.style.position="absolute",d.style.top=`${M((a.top||0)+f)}px`,d.style.right=`${M(a.right||0)}px`,d.style.bottom=`${M((a.bottom||0)+h)}px`,d.style.left=`${M(a.left||0)}px`,t.elements.forEach((c,p)=>{let y=gr(c,{styles:i,resources:this.doc.resources,document:this.doc,path:["pages",r,"elements",p],onNavigatePage:_=>this.goToPage(_),onFormChange:(_,m,g)=>this.handleFormChange(_,m,g)});y&&d.appendChild(y);}),s.appendChild(d),l){let c=t.footer?["pages",r,"footer"]:["footer"],p=this.renderHeaderFooter(l,r,this.doc.pages.length,i,c);p.classList.add("jdfjs-footer"),p.style.paddingBottom=`${M(a.bottom/2)}px`,p.style.paddingLeft=`${M(a.left)}px`,p.style.paddingRight=`${M(a.right)}px`,s.appendChild(p);}return o.appendChild(s),o}renderHeaderFooter(t,r,i,n,a){let o=document.createElement("div");if(t.elements?.length)t.elements.forEach((s,u)=>{let l=gr(s,{styles:n,resources:this.doc.resources,document:this.doc,path:[...a,"elements",u],onNavigatePage:f=>this.goToPage(f),onFormChange:(f,h,d)=>this.handleFormChange(f,h,d)});l&&o.appendChild(l);});else if(t.content){let s=Aa(t.content,{pageNumber:r+1,totalPages:i,title:this.doc.meta?.title??"",author:this.doc.meta?.author??""}),u=document.createElement("div");u.textContent=s,Object.assign(u.style,W(t.style,n)),o.appendChild(u);}return o}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-wrapper").forEach(t=>{let r=t.querySelector(".jdfjs-page");if(!r)return;let i=parseFloat(r.style.width||"0")||r.offsetWidth,n=r.offsetHeight;r.style.transform=`scale(${this.zoom})`,r.style.transformOrigin="top left",t.style.width=`${Math.round(i*this.zoom)}px`,t.style.height=`${Math.round(n*this.zoom)}px`;});}setZoom(t){this.zoom=Math.max(.25,Math.min(3,t)),this.requestedZoom=this.zoom,this.userZoomed=true,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(){let t=new Set,r=function*(i){if(!i||typeof i!="object"||t.has(i))return;if(t.add(i),Array.isArray(i)){for(let a of i)yield*r(a);return}let n=i.type;if((n==="input"||n==="textarea"||n==="checkbox"||n==="select"||n==="signature")&&typeof i.name=="string"&&i.name.length>0&&(yield {name:i.name,field:i}),Array.isArray(i.elements)&&(yield*r(i.elements)),Array.isArray(i.items)&&(yield*r(i.items)),Array.isArray(i.rows))for(let a of i.rows)Array.isArray(a)&&(yield*r(a));};for(let i of this.doc.pages||[])yield*r(i.elements),yield*r(i.header?.elements),yield*r(i.footer?.elements);yield*r(this.doc.header?.elements),yield*r(this.doc.footer?.elements);}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),seek:(i,n)=>this.seek(i,n),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 $f(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 gm(e){return e.replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t])}var sa=new WeakSet,la=new WeakMap,fa=new WeakMap;function vm(e){let t={},r=h=>e.getAttribute(h),i=r("zoom");if(i!=null){let h=Number(i);isNaN(h)||(t.zoom=h);}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 h=Number(s);isNaN(h)||(t.initialPage=Math.max(0,Math.floor(h)-1));}let u=r("width");if(u!=null){let h=Number(u);t.width=isNaN(h)?u:h;}let l=r("height");if(l!=null){let h=Number(l);t.height=isNaN(h)?l:h;}let f=r("fit");return (f==="manual"||f==="fit-width"||f==="fit-page")&&(t.fit=f),t}function ui(e){if(sa.has(e)||e.hasAttribute("manual"))return;let t=e.getAttribute("src");if(!t)return;sa.add(e);let r=e;Xf(r);let i=vm(e);oa(r,t,i).then(n=>{la.set(e,n),bm(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})));}),ym(r);}function bm(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 ua(e){let t=la.get(e);if(t){try{t.destroy();}catch{}la.delete(e);}let r=fa.get(e);r&&(r.disconnect(),fa.delete(e)),sa.delete(e),da.delete(e);}function Xf(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 da=new WeakSet;function ym(e){if(da.has(e)||typeof MutationObserver>"u")return;da.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"?(ua(e),ui(e)):(n==="width"||n==="height")&&Xf(e);}});t.observe(e,{attributes:true,attributeFilter:["src","width","height"]}),fa.set(e,t);}function ca(e=document){e.querySelectorAll("jdf").forEach(ui);}function Vf(){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"?ua(i):typeof i.querySelectorAll=="function"&&i.querySelectorAll("jdf").forEach(ua));});}).observe(document.body,{childList:true,subtree:true});}function _m(e=document){ca(e);}function wm(){typeof window>"u"||typeof document>"u"||window.JDFjsAutoInit!==false&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{ca(),Vf();},{once:true}):(ca(),Vf()));}wm();export{fi as JDFViewer,oa as embed,_m as jdf,Jf as render};//# sourceMappingURL=jdfjs.js.map
|
|
19
|
+
`,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();}seek(t,r){let i=this.pagesEl.querySelector(`video[data-jdf-video="${t.replace(/"/g,'\\"')}"]`);if(!i)return false;let n=i.closest(".jdfjs-page-wrapper"),a=n?Number(n.getAttribute("data-page-index")):NaN;Number.isNaN(a)||this.goToPage(a),i.scrollIntoView({block:"center"});let o=()=>{i.currentTime=Math.max(0,r),i.play().catch(()=>{});};return i.readyState>=1?o():i.addEventListener("loadedmetadata",o,{once:true}),true}renderPage(t,r,i){let n=ba(t.pageSize??this.doc.meta?.pageSize??"A4",t.pageOrientation??this.doc.meta?.pageOrientation??"portrait"),a={...va,...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=`${D(n.width)}px`,s.style.minHeight=`${D(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,h=l?.height??0;if(u){let c=t.header?["pages",r,"header"]:["header"],p=this.renderHeaderFooter(u,r,this.doc.pages.length,i,c);p.classList.add("jdfjs-header"),p.style.paddingTop=`${D(a.top/2)}px`,p.style.paddingLeft=`${D(a.left)}px`,p.style.paddingRight=`${D(a.right)}px`,s.appendChild(p);}let d=document.createElement("div");if(d.className="jdfjs-page-content",d.style.position="absolute",d.style.top=`${D((a.top||0)+f)}px`,d.style.right=`${D(a.right||0)}px`,d.style.bottom=`${D((a.bottom||0)+h)}px`,d.style.left=`${D(a.left||0)}px`,t.elements.forEach((c,p)=>{let y=gr(c,{styles:i,resources:this.doc.resources,document:this.doc,path:["pages",r,"elements",p],onNavigatePage:_=>this.goToPage(_),onFormChange:(_,m,g)=>this.handleFormChange(_,m,g)});y&&d.appendChild(y);}),s.appendChild(d),l){let c=t.footer?["pages",r,"footer"]:["footer"],p=this.renderHeaderFooter(l,r,this.doc.pages.length,i,c);p.classList.add("jdfjs-footer"),p.style.paddingBottom=`${D(a.bottom/2)}px`,p.style.paddingLeft=`${D(a.left)}px`,p.style.paddingRight=`${D(a.right)}px`,s.appendChild(p);}return o.appendChild(s),o}renderHeaderFooter(t,r,i,n,a){let o=document.createElement("div");if(t.elements?.length)t.elements.forEach((s,u)=>{let l=gr(s,{styles:n,resources:this.doc.resources,document:this.doc,path:[...a,"elements",u],onNavigatePage:f=>this.goToPage(f),onFormChange:(f,h,d)=>this.handleFormChange(f,h,d)});l&&o.appendChild(l);});else if(t.content){let s=Aa(t.content,{pageNumber:r+1,totalPages:i,title:this.doc.meta?.title??"",author:this.doc.meta?.author??""}),u=document.createElement("div");u.textContent=s,Object.assign(u.style,W(t.style,n)),o.appendChild(u);}return o}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-wrapper").forEach(t=>{let r=t.querySelector(".jdfjs-page");if(!r)return;let i=parseFloat(r.style.width||"0")||r.offsetWidth,n=r.offsetHeight;r.style.transform=`scale(${this.zoom})`,r.style.transformOrigin="top left",t.style.width=`${Math.round(i*this.zoom)}px`,t.style.height=`${Math.round(n*this.zoom)}px`;});}setZoom(t){this.zoom=Math.max(.25,Math.min(3,t)),this.requestedZoom=this.zoom,this.userZoomed=true,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(){let t=new Set,r=function*(i){if(!i||typeof i!="object"||t.has(i))return;if(t.add(i),Array.isArray(i)){for(let a of i)yield*r(a);return}let n=i.type;if((n==="input"||n==="textarea"||n==="checkbox"||n==="select"||n==="signature")&&typeof i.name=="string"&&i.name.length>0&&(yield {name:i.name,field:i}),Array.isArray(i.elements)&&(yield*r(i.elements)),Array.isArray(i.items)&&(yield*r(i.items)),Array.isArray(i.rows))for(let a of i.rows)Array.isArray(a)&&(yield*r(a));};for(let i of this.doc.pages||[])yield*r(i.elements),yield*r(i.header?.elements),yield*r(i.footer?.elements);yield*r(this.doc.header?.elements),yield*r(this.doc.footer?.elements);}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=cr.get(this.container);t&&(t.abort(),cr.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),seek:(i,n)=>this.seek(i,n),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 $f(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 gm(e){return e.replace(/[&<>"']/g,t=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[t])}var sa=new WeakSet,la=new WeakMap,fa=new WeakMap;function vm(e){let t={},r=h=>e.getAttribute(h),i=r("zoom");if(i!=null){let h=Number(i);isNaN(h)||(t.zoom=h);}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 h=Number(s);isNaN(h)||(t.initialPage=Math.max(0,Math.floor(h)-1));}let u=r("width");if(u!=null){let h=Number(u);t.width=isNaN(h)?u:h;}let l=r("height");if(l!=null){let h=Number(l);t.height=isNaN(h)?l:h;}let f=r("fit");return (f==="manual"||f==="fit-width"||f==="fit-page")&&(t.fit=f),t}function ui(e){if(sa.has(e)||e.hasAttribute("manual"))return;let t=e.getAttribute("src");if(!t)return;sa.add(e);let r=e;Xf(r);let i=vm(e);oa(r,t,i).then(n=>{la.set(e,n),bm(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})));}),ym(r);}function bm(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 ua(e){let t=la.get(e);if(t){try{t.destroy();}catch{}la.delete(e);}let r=fa.get(e);r&&(r.disconnect(),fa.delete(e)),sa.delete(e),da.delete(e);}function Xf(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 da=new WeakSet;function ym(e){if(da.has(e)||typeof MutationObserver>"u")return;da.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"?(ua(e),ui(e)):(n==="width"||n==="height")&&Xf(e);}});t.observe(e,{attributes:true,attributeFilter:["src","width","height"]}),fa.set(e,t);}function ca(e=document){e.querySelectorAll("jdf").forEach(ui);}function Vf(){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"?ua(i):typeof i.querySelectorAll=="function"&&i.querySelectorAll("jdf").forEach(ua));});}).observe(document.body,{childList:true,subtree:true});}function _m(e=document){ca(e);}function wm(){typeof window>"u"||typeof document>"u"||window.JDFjsAutoInit!==false&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>{ca(),Vf();},{once:true}):(ca(),Vf()));}wm();export{fi as JDFViewer,oa as embed,_m as jdf,Jf as render};//# sourceMappingURL=jdfjs.js.map
|
|
20
20
|
//# sourceMappingURL=jdfjs.js.map
|