UNPKG

universalviewer

Version:

The Universal Viewer is a community-developed open source project on a mission to help you share your 📚📜📰📽️📻🗿 with the 🌎

3 lines 506 kB
import{a as Ua,c as pt,e as Sr,f as Ma}from"./chunk-7SGMGVTY.js";import{a as Lt,c as Ri}from"./chunk-L67DAW3A.js";var nf=Ri(rf=>{var ja=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Xo=new RegExp("[\\-\\.0-9"+ja.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),Go=new RegExp("^"+ja.source+Xo.source+"*(?::"+ja.source+Xo.source+"*)?$"),Ii=0,sr=1,Hr=2,Ni=3,Yr=4,qr=5,Oi=6,xn=7;function Qo(){}Qo.prototype={parse:function(t,e,r){var i=this.domBuilder;i.startDocument(),ef(e,e={}),cd(t,e,r,i,this.errorHandler),i.endDocument()}};function cd(t,e,r,i,n){function a(re){if(re>65535){re-=65536;var H=55296+(re>>10),ue=56320+(re&1023);return String.fromCharCode(H,ue)}else return String.fromCharCode(re)}function s(re){var H=re.slice(1,-1);return H in r?r[H]:H.charAt(0)==="#"?a(parseInt(H.substr(1).replace("x","0x"))):(n.error("entity not found:"+re),re)}function o(re){if(re>v){var H=t.substring(v,re).replace(/&#?\w+;/g,s);d&&h(v),i.characters(H,0,re-v),v=re}}function h(re,H){for(;re>=u&&(H=l.exec(t));)f=H.index,u=f+H[0].length,d.lineNumber++;d.columnNumber=re-f+1}for(var f=0,u=0,l=/.*(?:\r\n?|\n)|.*$/g,d=i.locator,c=[{currentNSMap:e}],p={},v=0;;){try{var g=t.indexOf("<",v);if(g<0){if(!t.substr(v).match(/^\s*$/)){var _=i.doc,w=_.createTextNode(t.substr(v));_.appendChild(w),i.currentElement=w}return}switch(g>v&&o(g),t.charAt(g+1)){case"/":var N=t.indexOf(">",g+3),b=t.substring(g+2,N),C=c.pop();N<0?(b=t.substring(g+2).replace(/[\s<].*/,""),n.error("end tag name: "+b+" is not complete:"+C.tagName),N=g+1+b.length):b.match(/\s</)&&(b=b.replace(/[\s<].*/,""),n.error("end tag name: "+b+" maybe not complete"),N=g+1+b.length);var A=C.localNSMap,T=C.tagName==b,I=T||C.tagName&&C.tagName.toLowerCase()==b.toLowerCase();if(I){if(i.endElement(C.uri,C.localName,b),A)for(var L in A)i.endPrefixMapping(L);T||n.fatalError("end tag name: "+b+" is not match the current start tagName:"+C.tagName)}else c.push(C);N++;break;case"?":d&&h(g),N=gd(t,g,i);break;case"!":d&&h(g),N=md(t,g,i,n);break;default:d&&h(g);var U=new tf,k=c[c.length-1].currentNSMap,N=dd(t,g,U,k,s,n),y=U.length;if(!U.closed&&vd(t,N,U.tagName,p)&&(U.closed=!0,r.nbsp||n.warning("unclosed xml attribute")),d&&y){for(var Z=Ko(d,{}),fe=0;fe<y;fe++){var V=U[fe];h(V.offset),V.locator=Ko(d,{})}i.locator=Z,Jo(U,i,k)&&c.push(U),i.locator=d}else Jo(U,i,k)&&c.push(U);U.uri==="http://www.w3.org/1999/xhtml"&&!U.closed?N=pd(t,N,U.tagName,s,i):N++}}catch(re){n.error("element parse error: "+re),N=-1}N>v?v=N:o(Math.max(g,v)+1)}}function Ko(t,e){return e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber,e}function dd(t,e,r,i,n,a){for(var s,o,h=++e,f=Ii;;){var u=t.charAt(h);switch(u){case"=":if(f===sr)s=t.slice(e,h),f=Ni;else if(f===Hr)f=Ni;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(f===Ni||f===sr)if(f===sr&&(a.warning('attribute value must after "="'),s=t.slice(e,h)),e=h+1,h=t.indexOf(u,e),h>0)o=t.slice(e,h).replace(/&#?\w+;/g,n),r.add(s,o,e-1),f=qr;else throw new Error("attribute value no end '"+u+"' match");else if(f==Yr)o=t.slice(e,h).replace(/&#?\w+;/g,n),r.add(s,o,e),a.warning('attribute "'+s+'" missed start quot('+u+")!!"),e=h+1,f=qr;else throw new Error('attribute value must after "="');break;case"/":switch(f){case Ii:r.setTagName(t.slice(e,h));case qr:case Oi:case xn:f=xn,r.closed=!0;case Yr:case sr:case Hr:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),f==Ii&&r.setTagName(t.slice(e,h)),h;case">":switch(f){case Ii:r.setTagName(t.slice(e,h));case qr:case Oi:case xn:break;case Yr:case sr:o=t.slice(e,h),o.slice(-1)==="/"&&(r.closed=!0,o=o.slice(0,-1));case Hr:f===Hr&&(o=s),f==Yr?(a.warning('attribute "'+o+'" missed quot(")!!'),r.add(s,o.replace(/&#?\w+;/g,n),e)):((i[""]!=="http://www.w3.org/1999/xhtml"||!o.match(/^(?:disabled|checked|selected)$/i))&&a.warning('attribute "'+o+'" missed value!! "'+o+'" instead!!'),r.add(o,o,e));break;case Ni:throw new Error("attribute value missed!!")}return h;case"\x80":u=" ";default:if(u<=" ")switch(f){case Ii:r.setTagName(t.slice(e,h)),f=Oi;break;case sr:s=t.slice(e,h),f=Hr;break;case Yr:var o=t.slice(e,h).replace(/&#?\w+;/g,n);a.warning('attribute "'+o+'" missed quot(")!!'),r.add(s,o,e);case qr:f=Oi;break}else switch(f){case Hr:var l=r.tagName;(i[""]!=="http://www.w3.org/1999/xhtml"||!s.match(/^(?:disabled|checked|selected)$/i))&&a.warning('attribute "'+s+'" missed value!! "'+s+'" instead2!!'),r.add(s,s,e),e=h,f=sr;break;case qr:a.warning('attribute space is required"'+s+'"!!');case Oi:f=sr,e=h;break;case Ni:f=Yr,e=h;break;case xn:throw new Error("elements closed character '/' and '>' must be connected to")}}h++}}function Jo(t,e,r){for(var i=t.tagName,n=null,l=t.length;l--;){var a=t[l],s=a.qName,o=a.value,d=s.indexOf(":");if(d>0)var h=a.prefix=s.slice(0,d),f=s.slice(d+1),u=h==="xmlns"&&f;else f=s,h=null,u=s==="xmlns"&&"";a.localName=f,u!==!1&&(n==null&&(n={},ef(r,r={})),r[u]=n[u]=o,a.uri="http://www.w3.org/2000/xmlns/",e.startPrefixMapping(u,o))}for(var l=t.length;l--;){a=t[l];var h=a.prefix;h&&(h==="xml"&&(a.uri="http://www.w3.org/XML/1998/namespace"),h!=="xmlns"&&(a.uri=r[h||""]))}var d=i.indexOf(":");d>0?(h=t.prefix=i.slice(0,d),f=t.localName=i.slice(d+1)):(h=null,f=t.localName=i);var c=t.uri=r[h||""];if(e.startElement(c,f,i,t),t.closed){if(e.endElement(c,f,i),n)for(h in n)e.endPrefixMapping(h)}else return t.currentNSMap=r,t.localNSMap=n,!0}function pd(t,e,r,i,n){if(/^(?:script|textarea)$/i.test(r)){var a=t.indexOf("</"+r+">",e),s=t.substring(e+1,a);if(/[&<]/.test(s))return/^script$/i.test(r)?(n.characters(s,0,s.length),a):(s=s.replace(/&#?\w+;/g,i),n.characters(s,0,s.length),a)}return e+1}function vd(t,e,r,i){var n=i[r];return n==null&&(n=t.lastIndexOf("</"+r+">"),n<e&&(n=t.lastIndexOf("</"+r)),i[r]=n),n<e}function ef(t,e){for(var r in t)e[r]=t[r]}function md(t,e,r,i){var n=t.charAt(e+2);switch(n){case"-":if(t.charAt(e+3)==="-"){var a=t.indexOf("-->",e+4);return a>e?(r.comment(t,e+4,a-e-4),a+3):(i.error("Unclosed comment"),-1)}else return-1;default:if(t.substr(e+3,6)=="CDATA["){var a=t.indexOf("]]>",e+9);return r.startCDATA(),r.characters(t,e+9,a-e-9),r.endCDATA(),a+3}var s=yd(t,e),o=s.length;if(o>1&&/!doctype/i.test(s[0][0])){var h=s[1][0],f=o>3&&/^public$/i.test(s[2][0])&&s[3][0],u=o>4&&s[4][0],l=s[o-1];return r.startDTD(h,f&&f.replace(/^(['"])(.*?)\1$/,"$2"),u&&u.replace(/^(['"])(.*?)\1$/,"$2")),r.endDTD(),l.index+l[0].length}}return-1}function gd(t,e,r){var i=t.indexOf("?>",e);if(i){var n=t.substring(e,i).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(n){var a=n[0].length;return r.processingInstruction(n[1],n[2]),i+2}else return-1}return-1}function tf(t){}tf.prototype={setTagName:function(t){if(!Go.test(t))throw new Error("invalid tagName:"+t);this.tagName=t},add:function(t,e,r){if(!Go.test(t))throw new Error("invalid attribute:"+t);this[this.length++]={qName:t,value:e,offset:r}},length:0,getLocalName:function(t){return this[t].localName},getLocator:function(t){return this[t].locator},getQName:function(t){return this[t].qName},getURI:function(t){return this[t].uri},getValue:function(t){return this[t].value}};function En(t,e){return t.__proto__=e,t}En({},En.prototype)instanceof En||(En=function(t,e){function r(){}r.prototype=e,r=new r;for(e in t)r[e]=t[e];return r});function yd(t,e){var r,i=[],n=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(n.lastIndex=e,n.exec(t);r=n.exec(t);)if(i.push(r),r[1])return i}rf.XMLReader=Qo});var Ja=Ri(Ka=>{function Li(t,e){for(var r in t)e[r]=t[r]}function at(t,e){var r=t.prototype;if(Object.create){var i=Object.create(e.prototype);r.__proto__=i}if(!(r instanceof e)){let a=function(){};var n=a;a.prototype=e.prototype,a=new a,Li(r,a),t.prototype=r=a}r.constructor!=t&&(typeof t!="function"&&console.error("unknow Class:"+t),r.constructor=t)}var _d="http://www.w3.org/1999/xhtml",st={},zt=st.ELEMENT_NODE=1,Vr=st.ATTRIBUTE_NODE=2,Sn=st.TEXT_NODE=3,uf=st.CDATA_SECTION_NODE=4,lf=st.ENTITY_REFERENCE_NODE=5,wd=st.ENTITY_NODE=6,cf=st.PROCESSING_INSTRUCTION_NODE=7,df=st.COMMENT_NODE=8,pf=st.DOCUMENT_NODE=9,vf=st.DOCUMENT_TYPE_NODE=10,Gt=st.DOCUMENT_FRAGMENT_NODE=11,bd=st.NOTATION_NODE=12,Ge={},Ye={},Q_=Ge.INDEX_SIZE_ERR=(Ye[1]="Index size error",1),ew=Ge.DOMSTRING_SIZE_ERR=(Ye[2]="DOMString size error",2),xd=Ge.HIERARCHY_REQUEST_ERR=(Ye[3]="Hierarchy request error",3),tw=Ge.WRONG_DOCUMENT_ERR=(Ye[4]="Wrong document",4),rw=Ge.INVALID_CHARACTER_ERR=(Ye[5]="Invalid character",5),iw=Ge.NO_DATA_ALLOWED_ERR=(Ye[6]="No data allowed",6),nw=Ge.NO_MODIFICATION_ALLOWED_ERR=(Ye[7]="No modification allowed",7),Ed=Ge.NOT_FOUND_ERR=(Ye[8]="Not found",8),aw=Ge.NOT_SUPPORTED_ERR=(Ye[9]="Not supported",9),af=Ge.INUSE_ATTRIBUTE_ERR=(Ye[10]="Attribute in use",10),sw=Ge.INVALID_STATE_ERR=(Ye[11]="Invalid state",11),ow=Ge.SYNTAX_ERR=(Ye[12]="Syntax error",12),fw=Ge.INVALID_MODIFICATION_ERR=(Ye[13]="Invalid modification",13),hw=Ge.NAMESPACE_ERR=(Ye[14]="Invalid namespace",14),uw=Ge.INVALID_ACCESS_ERR=(Ye[15]="Invalid access",15);function Xr(t,e){if(e instanceof Error)var r=e;else r=this,Error.call(this,Ye[t]),this.message=Ye[t],Error.captureStackTrace&&Error.captureStackTrace(this,Xr);return r.code=t,e&&(this.message=this.message+": "+e),r}Xr.prototype=Error.prototype;Li(Ge,Xr);function or(){}or.prototype={length:0,item:function(t){return this[t]||null},toString:function(t,e){for(var r=[],i=0;i<this.length;i++)$r(this[i],r,t,e);return r.join("")}};function Di(t,e){this._node=t,this._refresh=e,Za(this)}function Za(t){var e=t._node._inc||t._node.ownerDocument._inc;if(t._inc!=e){var r=t._refresh(t._node);Tf(t,"length",r.length),Li(r,t),t._inc=e}}Di.prototype.item=function(t){return Za(this),this[t]};at(Di,or);function kn(){}function mf(t,e){for(var r=t.length;r--;)if(t[r]===e)return r}function sf(t,e,r,i){if(i?e[mf(e,i)]=r:e[e.length++]=r,t){r.ownerElement=t;var n=t.ownerDocument;n&&(i&&yf(n,t,i),Sd(n,t,r))}}function of(t,e,r){var i=mf(e,r);if(i>=0){for(var n=e.length-1;i<n;)e[i]=e[++i];if(e.length=n,t){var a=t.ownerDocument;a&&(yf(a,t,r),r.ownerElement=null)}}else throw Xr(Ed,new Error(t.tagName+"@"+r))}kn.prototype={length:0,item:or.prototype.item,getNamedItem:function(t){for(var e=this.length;e--;){var r=this[e];if(r.nodeName==t)return r}},setNamedItem:function(t){var e=t.ownerElement;if(e&&e!=this._ownerElement)throw new Xr(af);var r=this.getNamedItem(t.nodeName);return sf(this._ownerElement,this,t,r),r},setNamedItemNS:function(t){var e=t.ownerElement,r;if(e&&e!=this._ownerElement)throw new Xr(af);return r=this.getNamedItemNS(t.namespaceURI,t.localName),sf(this._ownerElement,this,t,r),r},removeNamedItem:function(t){var e=this.getNamedItem(t);return of(this._ownerElement,this,e),e},removeNamedItemNS:function(t,e){var r=this.getNamedItemNS(t,e);return of(this._ownerElement,this,r),r},getNamedItemNS:function(t,e){for(var r=this.length;r--;){var i=this[r];if(i.localName==e&&i.namespaceURI==t)return i}return null}};function gf(t){if(this._features={},t)for(var e in t)this._features=t[e]}gf.prototype={hasFeature:function(t,e){var r=this._features[t.toLowerCase()];return!!(r&&(!e||e in r))},createDocument:function(t,e,r){var i=new zi;if(i.implementation=this,i.childNodes=new or,i.doctype=r,r&&i.appendChild(r),e){var n=i.createElementNS(t,e);i.appendChild(n)}return i},createDocumentType:function(t,e,r){var i=new Va;return i.name=t,i.nodeName=t,i.publicId=e,i.systemId=r,i}};function rt(){}rt.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(t,e){return wf(this,t,e)},replaceChild:function(t,e){this.insertBefore(t,e),e&&this.removeChild(e)},removeChild:function(t){return _f(this,t)},appendChild:function(t){return this.insertBefore(t,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(t){return Wa(this.ownerDocument||this,this,t)},normalize:function(){for(var t=this.firstChild;t;){var e=t.nextSibling;e&&e.nodeType==Sn&&t.nodeType==Sn?(this.removeChild(e),t.appendData(e.data)):(t.normalize(),t=e)}},isSupported:function(t,e){return this.ownerDocument.implementation.hasFeature(t,e)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(t){for(var e=this;e;){var r=e._nsMap;if(r){for(var i in r)if(r[i]==t)return i}e=e.nodeType==Vr?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(t){for(var e=this;e;){var r=e._nsMap;if(r&&t in r)return r[t];e=e.nodeType==Vr?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(t){var e=this.lookupPrefix(t);return e==null}};function ff(t){return t=="<"&&"&lt;"||t==">"&&"&gt;"||t=="&"&&"&amp;"||t=='"'&&"&quot;"||"&#"+t.charCodeAt()+";"}Li(st,rt);Li(st,rt.prototype);function Tn(t,e){if(e(t))return!0;if(t=t.firstChild)do if(Tn(t,e))return!0;while(t=t.nextSibling)}function zi(){}function Sd(t,e,r){t&&t._inc++;var i=r.namespaceURI;i=="http://www.w3.org/2000/xmlns/"&&(e._nsMap[r.prefix?r.localName:""]=r.value)}function yf(t,e,r,i){t&&t._inc++;var n=r.namespaceURI;n=="http://www.w3.org/2000/xmlns/"&&delete e._nsMap[r.prefix?r.localName:""]}function Ha(t,e,r){if(t&&t._inc){t._inc++;var i=e.childNodes;if(r)i[i.length++]=r;else{for(var n=e.firstChild,a=0;n;)i[a++]=n,n=n.nextSibling;i.length=a}}}function _f(t,e){var r=e.previousSibling,i=e.nextSibling;return r?r.nextSibling=i:t.firstChild=i,i?i.previousSibling=r:t.lastChild=r,Ha(t.ownerDocument,t),e}function wf(t,e,r){var i=e.parentNode;if(i&&i.removeChild(e),e.nodeType===Gt){var n=e.firstChild;if(n==null)return e;var a=e.lastChild}else n=a=e;var s=r?r.previousSibling:t.lastChild;n.previousSibling=s,a.nextSibling=r,s?s.nextSibling=n:t.firstChild=n,r==null?t.lastChild=a:r.previousSibling=a;do n.parentNode=t;while(n!==a&&(n=n.nextSibling));return Ha(t.ownerDocument||t,t),e.nodeType==Gt&&(e.firstChild=e.lastChild=null),e}function kd(t,e){var r=e.parentNode;if(r){var i=t.lastChild;r.removeChild(e);var i=t.lastChild}var i=t.lastChild;return e.parentNode=t,e.previousSibling=i,e.nextSibling=null,i?i.nextSibling=e:t.firstChild=e,t.lastChild=e,Ha(t.ownerDocument,t,e),e}zi.prototype={nodeName:"#document",nodeType:pf,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,e){if(t.nodeType==Gt){for(var r=t.firstChild;r;){var i=r.nextSibling;this.insertBefore(r,e),r=i}return t}return this.documentElement==null&&t.nodeType==zt&&(this.documentElement=t),wf(this,t,e),t.ownerDocument=this,t},removeChild:function(t){return this.documentElement==t&&(this.documentElement=null),_f(this,t)},importNode:function(t,e){return kf(this,t,e)},getElementById:function(t){var e=null;return Tn(this.documentElement,function(r){if(r.nodeType==zt&&r.getAttribute("id")==t)return e=r,!0}),e},createElement:function(t){var e=new Gr;e.ownerDocument=this,e.nodeName=t,e.tagName=t,e.childNodes=new or;var r=e.attributes=new kn;return r._ownerElement=e,e},createDocumentFragment:function(){var t=new An;return t.ownerDocument=this,t.childNodes=new or,t},createTextNode:function(t){var e=new Ya;return e.ownerDocument=this,e.appendData(t),e},createComment:function(t){var e=new qa;return e.ownerDocument=this,e.appendData(t),e},createCDATASection:function(t){var e=new $a;return e.ownerDocument=this,e.appendData(t),e},createProcessingInstruction:function(t,e){var r=new Ga;return r.ownerDocument=this,r.tagName=r.target=t,r.nodeValue=r.data=e,r},createAttribute:function(t){var e=new Cn;return e.ownerDocument=this,e.name=t,e.nodeName=t,e.localName=t,e.specified=!0,e},createEntityReference:function(t){var e=new Xa;return e.ownerDocument=this,e.nodeName=t,e},createElementNS:function(t,e){var r=new Gr,i=e.split(":"),n=r.attributes=new kn;return r.childNodes=new or,r.ownerDocument=this,r.nodeName=e,r.tagName=e,r.namespaceURI=t,i.length==2?(r.prefix=i[0],r.localName=i[1]):r.localName=e,n._ownerElement=r,r},createAttributeNS:function(t,e){var r=new Cn,i=e.split(":");return r.ownerDocument=this,r.nodeName=e,r.name=e,r.namespaceURI=t,r.specified=!0,i.length==2?(r.prefix=i[0],r.localName=i[1]):r.localName=e,r}};at(zi,rt);function Gr(){this._nsMap={}}Gr.prototype={nodeType:zt,hasAttribute:function(t){return this.getAttributeNode(t)!=null},getAttribute:function(t){var e=this.getAttributeNode(t);return e&&e.value||""},getAttributeNode:function(t){return this.attributes.getNamedItem(t)},setAttribute:function(t,e){var r=this.ownerDocument.createAttribute(t);r.value=r.nodeValue=""+e,this.setAttributeNode(r)},removeAttribute:function(t){var e=this.getAttributeNode(t);e&&this.removeAttributeNode(e)},appendChild:function(t){return t.nodeType===Gt?this.insertBefore(t,null):kd(this,t)},setAttributeNode:function(t){return this.attributes.setNamedItem(t)},setAttributeNodeNS:function(t){return this.attributes.setNamedItemNS(t)},removeAttributeNode:function(t){return this.attributes.removeNamedItem(t.nodeName)},removeAttributeNS:function(t,e){var r=this.getAttributeNodeNS(t,e);r&&this.removeAttributeNode(r)},hasAttributeNS:function(t,e){return this.getAttributeNodeNS(t,e)!=null},getAttributeNS:function(t,e){var r=this.getAttributeNodeNS(t,e);return r&&r.value||""},setAttributeNS:function(t,e,r){var i=this.ownerDocument.createAttributeNS(t,e);i.value=i.nodeValue=""+r,this.setAttributeNode(i)},getAttributeNodeNS:function(t,e){return this.attributes.getNamedItemNS(t,e)},getElementsByTagName:function(t){return new Di(this,function(e){var r=[];return Tn(e,function(i){i!==e&&i.nodeType==zt&&(t==="*"||i.tagName==t)&&r.push(i)}),r})},getElementsByTagNameNS:function(t,e){return new Di(this,function(r){var i=[];return Tn(r,function(n){n!==r&&n.nodeType===zt&&(t==="*"||n.namespaceURI===t)&&(e==="*"||n.localName==e)&&i.push(n)}),i})}};zi.prototype.getElementsByTagName=Gr.prototype.getElementsByTagName;zi.prototype.getElementsByTagNameNS=Gr.prototype.getElementsByTagNameNS;at(Gr,rt);function Cn(){}Cn.prototype.nodeType=Vr;at(Cn,rt);function Pi(){}Pi.prototype={data:"",substringData:function(t,e){return this.data.substring(t,t+e)},appendData:function(t){t=this.data+t,this.nodeValue=this.data=t,this.length=t.length},insertData:function(t,e){this.replaceData(t,0,e)},appendChild:function(t){throw new Error(Ye[xd])},deleteData:function(t,e){this.replaceData(t,e,"")},replaceData:function(t,e,r){var i=this.data.substring(0,t),n=this.data.substring(t+e);r=i+r+n,this.nodeValue=this.data=r,this.length=r.length}};at(Pi,rt);function Ya(){}Ya.prototype={nodeName:"#text",nodeType:Sn,splitText:function(t){var e=this.data,r=e.substring(t);e=e.substring(0,t),this.data=this.nodeValue=e,this.length=e.length;var i=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(i,this.nextSibling),i}};at(Ya,Pi);function qa(){}qa.prototype={nodeName:"#comment",nodeType:df};at(qa,Pi);function $a(){}$a.prototype={nodeName:"#cdata-section",nodeType:uf};at($a,Pi);function Va(){}Va.prototype.nodeType=vf;at(Va,rt);function bf(){}bf.prototype.nodeType=bd;at(bf,rt);function xf(){}xf.prototype.nodeType=wd;at(xf,rt);function Xa(){}Xa.prototype.nodeType=lf;at(Xa,rt);function An(){}An.prototype.nodeName="#document-fragment";An.prototype.nodeType=Gt;at(An,rt);function Ga(){}Ga.prototype.nodeType=cf;at(Ga,rt);function Ef(){}Ef.prototype.serializeToString=function(t,e,r){return Sf.call(t,e,r)};rt.prototype.toString=Sf;function Sf(t,e){var r=[],i=this.nodeType==9?this.documentElement:this,n=i.prefix,a=i.namespaceURI;if(a&&n==null){var n=i.lookupPrefix(a);if(n==null)var s=[{namespace:a,prefix:null}]}return $r(this,r,t,e,s),r.join("")}function hf(t,e,r){var i=t.prefix||"",n=t.namespaceURI;if(!i&&!n||i==="xml"&&n==="http://www.w3.org/XML/1998/namespace"||n=="http://www.w3.org/2000/xmlns/")return!1;for(var a=r.length;a--;){var s=r[a];if(s.prefix==i)return s.namespace!=n}return!0}function $r(t,e,r,i,n){if(i)if(t=i(t),t){if(typeof t=="string"){e.push(t);return}}else return;switch(t.nodeType){case zt:n||(n=[]);var a=n.length,s=t.attributes,o=s.length,p=t.firstChild,h=t.tagName;r=_d===t.namespaceURI||r,e.push("<",h);for(var f=0;f<o;f++){var u=s.item(f);u.prefix=="xmlns"?n.push({prefix:u.localName,namespace:u.value}):u.nodeName=="xmlns"&&n.push({prefix:"",namespace:u.value})}for(var f=0;f<o;f++){var u=s.item(f);if(hf(u,r,n)){var l=u.prefix||"",d=u.namespaceURI,c=l?" xmlns:"+l:" xmlns";e.push(c,'="',d,'"'),n.push({prefix:l,namespace:d})}$r(u,e,r,i,n)}if(hf(t,r,n)){var l=t.prefix||"",d=t.namespaceURI,c=l?" xmlns:"+l:" xmlns";e.push(c,'="',d,'"'),n.push({prefix:l,namespace:d})}if(p||r&&!/^(?:meta|link|img|br|hr|input)$/i.test(h)){if(e.push(">"),r&&/^script$/i.test(h))for(;p;)p.data?e.push(p.data):$r(p,e,r,i,n),p=p.nextSibling;else for(;p;)$r(p,e,r,i,n),p=p.nextSibling;e.push("</",h,">")}else e.push("/>");return;case pf:case Gt:for(var p=t.firstChild;p;)$r(p,e,r,i,n),p=p.nextSibling;return;case Vr:return e.push(" ",t.name,'="',t.value.replace(/[<&"]/g,ff),'"');case Sn:return e.push(t.data.replace(/[<&]/g,ff));case uf:return e.push("<![CDATA[",t.data,"]]>");case df:return e.push("<!--",t.data,"-->");case vf:var v=t.publicId,g=t.systemId;if(e.push("<!DOCTYPE ",t.name),v)e.push(' PUBLIC "',v),g&&g!="."&&e.push('" "',g),e.push('">');else if(g&&g!=".")e.push(' SYSTEM "',g,'">');else{var _=t.internalSubset;_&&e.push(" [",_,"]"),e.push(">")}return;case cf:return e.push("<?",t.target," ",t.data,"?>");case lf:return e.push("&",t.nodeName,";");default:e.push("??",t.nodeName)}}function kf(t,e,r){var i;switch(e.nodeType){case zt:i=e.cloneNode(!1),i.ownerDocument=t;case Gt:break;case Vr:r=!0;break}if(i||(i=e.cloneNode(!1)),i.ownerDocument=t,i.parentNode=null,r)for(var n=e.firstChild;n;)i.appendChild(kf(t,n,r)),n=n.nextSibling;return i}function Wa(t,e,r){var i=new e.constructor;for(var n in e){var a=e[n];typeof a!="object"&&a!=i[n]&&(i[n]=a)}switch(e.childNodes&&(i.childNodes=new or),i.ownerDocument=t,i.nodeType){case zt:var s=e.attributes,o=i.attributes=new kn,h=s.length;o._ownerElement=i;for(var f=0;f<h;f++)i.setAttributeNode(Wa(t,s.item(f),!0));break;case Vr:r=!0}if(r)for(var u=e.firstChild;u;)i.appendChild(Wa(t,u,r)),u=u.nextSibling;return i}function Tf(t,e,r){t[e]=r}try{if(Object.defineProperty){let t=function(e){switch(e.nodeType){case zt:case Gt:var r=[];for(e=e.firstChild;e;)e.nodeType!==7&&e.nodeType!==8&&r.push(t(e)),e=e.nextSibling;return r.join("");default:return e.nodeValue}};Td=t,Object.defineProperty(Di.prototype,"length",{get:function(){return Za(this),this.$$length}}),Object.defineProperty(rt.prototype,"textContent",{get:function(){return t(this)},set:function(e){switch(this.nodeType){case zt:case Gt:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Tf=function(e,r,i){e["$$"+r]=i}}}catch{}var Td;Ka.DOMImplementation=gf;Ka.XMLSerializer=Ef});var Rf=Ri(On=>{function Af(t){this.options=t||{locator:{}}}Af.prototype.parseFromString=function(t,e){var r=this.options,i=new Ad,n=r.domBuilder||new Nn,a=r.errorHandler,s=r.locator,o=r.xmlns||{},h={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return s&&n.setDocumentLocator(s),i.errorHandler=Cd(a,n,s),i.domBuilder=r.domBuilder||n,/\/x?html?$/.test(e)&&(h.nbsp="\xA0",h.copy="\xA9",o[""]="http://www.w3.org/1999/xhtml"),o.xml=o.xml||"http://www.w3.org/XML/1998/namespace",t?i.parse(t,o,h):i.errorHandler.error("invalid doc source"),n.doc};function Cd(t,e,r){if(!t){if(e instanceof Nn)return e;t=e}var i={},n=t instanceof Function;r=r||{};function a(s){var o=t[s];!o&&n&&(o=t.length==2?function(h){t(s,h)}:t),i[s]=o&&function(h){o("[xmldom "+s+"] "+h+In(r))}||function(){}}return a("warning"),a("error"),a("fatalError"),i}function Nn(){this.cdata=!1}function Kr(t,e){e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber}Nn.prototype={startDocument:function(){this.doc=new Rd().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(t,e,r,i){var n=this.doc,a=n.createElementNS(t,r||e),s=i.length;Rn(this,a),this.currentElement=a,this.locator&&Kr(this.locator,a);for(var o=0;o<s;o++){var t=i.getURI(o),h=i.getValue(o),r=i.getQName(o),f=n.createAttributeNS(t,r);this.locator&&Kr(i.getLocator(o),f),f.value=f.nodeValue=h,a.setAttributeNode(f)}},endElement:function(t,e,r){var i=this.currentElement,n=i.tagName;this.currentElement=i.parentNode},startPrefixMapping:function(t,e){},endPrefixMapping:function(t){},processingInstruction:function(t,e){var r=this.doc.createProcessingInstruction(t,e);this.locator&&Kr(this.locator,r),Rn(this,r)},ignorableWhitespace:function(t,e,r){},characters:function(t,e,r){if(t=Cf.apply(this,arguments),t){if(this.cdata)var i=this.doc.createCDATASection(t);else var i=this.doc.createTextNode(t);this.currentElement?this.currentElement.appendChild(i):/^\s*$/.test(t)&&this.doc.appendChild(i),this.locator&&Kr(this.locator,i)}},skippedEntity:function(t){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(t){(this.locator=t)&&(t.lineNumber=0)},comment:function(t,e,r){t=Cf.apply(this,arguments);var i=this.doc.createComment(t);this.locator&&Kr(this.locator,i),Rn(this,i)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(t,e,r){var i=this.doc.implementation;if(i&&i.createDocumentType){var n=i.createDocumentType(t,e,r);this.locator&&Kr(this.locator,n),Rn(this,n)}},warning:function(t){console.warn("[xmldom warning] "+t,In(this.locator))},error:function(t){console.error("[xmldom error] "+t,In(this.locator))},fatalError:function(t){throw console.error("[xmldom fatalError] "+t,In(this.locator)),t}};function In(t){if(t)return` @`+(t.systemId||"")+"#[line:"+t.lineNumber+",col:"+t.columnNumber+"]"}function Cf(t,e,r){return typeof t=="string"?t.substr(e,r):t.length>=e+r||e?new java.lang.String(t,e,r)+"":t}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(t){Nn.prototype[t]=function(){return null}});function Rn(t,e){t.currentElement?t.currentElement.appendChild(e):t.doc.appendChild(e)}var Ad=nf().XMLReader,Rd=On.DOMImplementation=Ja().DOMImplementation;On.XMLSerializer=Ja().XMLSerializer;On.DOMParser=Af});var Nf=Ri((If,Qa)=>{(function(t){typeof If=="object"&&typeof Qa<"u"?Qa.exports=t():typeof define=="function"&&define.amd?define([],t):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).JSZip=t()})(function(){return function t(e,r,i){function n(o,h){if(!r[o]){if(!e[o]){var f=typeof Lt=="function"&&Lt;if(!h&&f)return f(o,!0);if(a)return a(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var l=r[o]={exports:{}};e[o][0].call(l.exports,function(d){var c=e[o][1][d];return n(c||d)},l,l.exports,t,e,r,i)}return r[o].exports}for(var a=typeof Lt=="function"&&Lt,s=0;s<i.length;s++)n(i[s]);return n}({1:[function(t,e,r){"use strict";var i=t("./utils"),n=t("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(s){for(var o,h,f,u,l,d,c,p=[],v=0,g=s.length,_=g,w=i.getTypeOf(s)!=="string";v<s.length;)_=g-v,f=w?(o=s[v++],h=v<g?s[v++]:0,v<g?s[v++]:0):(o=s.charCodeAt(v++),h=v<g?s.charCodeAt(v++):0,v<g?s.charCodeAt(v++):0),u=o>>2,l=(3&o)<<4|h>>4,d=1<_?(15&h)<<2|f>>6:64,c=2<_?63&f:64,p.push(a.charAt(u)+a.charAt(l)+a.charAt(d)+a.charAt(c));return p.join("")},r.decode=function(s){var o,h,f,u,l,d,c=0,p=0,v="data:";if(s.substr(0,v.length)===v)throw new Error("Invalid base64 input, it looks like a data url.");var g,_=3*(s=s.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(s.charAt(s.length-1)===a.charAt(64)&&_--,s.charAt(s.length-2)===a.charAt(64)&&_--,_%1!=0)throw new Error("Invalid base64 input, bad content length.");for(g=n.uint8array?new Uint8Array(0|_):new Array(0|_);c<s.length;)o=a.indexOf(s.charAt(c++))<<2|(u=a.indexOf(s.charAt(c++)))>>4,h=(15&u)<<4|(l=a.indexOf(s.charAt(c++)))>>2,f=(3&l)<<6|(d=a.indexOf(s.charAt(c++))),g[p++]=o,l!==64&&(g[p++]=h),d!==64&&(g[p++]=f);return g}},{"./support":30,"./utils":32}],2:[function(t,e,r){"use strict";var i=t("./external"),n=t("./stream/DataWorker"),a=t("./stream/Crc32Probe"),s=t("./stream/DataLengthProbe");function o(h,f,u,l,d){this.compressedSize=h,this.uncompressedSize=f,this.crc32=u,this.compression=l,this.compressedContent=d}o.prototype={getContentWorker:function(){var h=new n(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),f=this;return h.on("end",function(){if(this.streamInfo.data_length!==f.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),h},getCompressedWorker:function(){return new n(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},o.createWorkerFrom=function(h,f,u){return h.pipe(new a).pipe(new s("uncompressedSize")).pipe(f.compressWorker(u)).pipe(new s("compressedSize")).withStreamInfo("compression",f)},e.exports=o},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,r){"use strict";var i=t("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},r.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,r){"use strict";var i=t("./utils"),n=function(){for(var a,s=[],o=0;o<256;o++){a=o;for(var h=0;h<8;h++)a=1&a?3988292384^a>>>1:a>>>1;s[o]=a}return s}();e.exports=function(a,s){return a!==void 0&&a.length?i.getTypeOf(a)!=="string"?function(o,h,f,u){var l=n,d=u+f;o^=-1;for(var c=u;c<d;c++)o=o>>>8^l[255&(o^h[c])];return-1^o}(0|s,a,a.length,0):function(o,h,f,u){var l=n,d=u+f;o^=-1;for(var c=u;c<d;c++)o=o>>>8^l[255&(o^h.charCodeAt(c))];return-1^o}(0|s,a,a.length,0):0}},{"./utils":32}],5:[function(t,e,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(t,e,r){"use strict";var i=null;i=typeof Promise<"u"?Promise:t("lie"),e.exports={Promise:i}},{lie:37}],7:[function(t,e,r){"use strict";var i=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",n=t("pako"),a=t("./utils"),s=t("./stream/GenericWorker"),o=i?"uint8array":"array";function h(f,u){s.call(this,"FlateWorker/"+f),this._pako=null,this._pakoAction=f,this._pakoOptions=u,this.meta={}}r.magic="\b\0",a.inherits(h,s),h.prototype.processChunk=function(f){this.meta=f.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(o,f.data),!1)},h.prototype.flush=function(){s.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},h.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},h.prototype._createPako=function(){this._pako=new n[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var f=this;this._pako.onData=function(u){f.push({data:u,meta:f.meta})}},r.compressWorker=function(f){return new h("Deflate",f)},r.uncompressWorker=function(){return new h("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,r){"use strict";function i(l,d){var c,p="";for(c=0;c<d;c++)p+=String.fromCharCode(255&l),l>>>=8;return p}function n(l,d,c,p,v,g){var _,w,b=l.file,C=l.compression,A=g!==o.utf8encode,T=a.transformTo("string",g(b.name)),I=a.transformTo("string",o.utf8encode(b.name)),L=b.comment,U=a.transformTo("string",g(L)),k=a.transformTo("string",o.utf8encode(L)),N=I.length!==b.name.length,y=k.length!==L.length,Z="",fe="",V="",re=b.dir,H=b.date,ue={crc32:0,compressedSize:0,uncompressedSize:0};d&&!c||(ue.crc32=l.crc32,ue.compressedSize=l.compressedSize,ue.uncompressedSize=l.uncompressedSize);var j=0;d&&(j|=8),A||!N&&!y||(j|=2048);var M=0,de=0;re&&(M|=16),v==="UNIX"?(de=798,M|=function(ne,De){var He=ne;return ne||(He=De?16893:33204),(65535&He)<<16}(b.unixPermissions,re)):(de=20,M|=function(ne){return 63&(ne||0)}(b.dosPermissions)),_=H.getUTCHours(),_<<=6,_|=H.getUTCMinutes(),_<<=5,_|=H.getUTCSeconds()/2,w=H.getUTCFullYear()-1980,w<<=4,w|=H.getUTCMonth()+1,w<<=5,w|=H.getUTCDate(),N&&(fe=i(1,1)+i(h(T),4)+I,Z+="up"+i(fe.length,2)+fe),y&&(V=i(1,1)+i(h(U),4)+k,Z+="uc"+i(V.length,2)+V);var ae="";return ae+=` \0`,ae+=i(j,2),ae+=C.magic,ae+=i(_,2),ae+=i(w,2),ae+=i(ue.crc32,4),ae+=i(ue.compressedSize,4),ae+=i(ue.uncompressedSize,4),ae+=i(T.length,2),ae+=i(Z.length,2),{fileRecord:f.LOCAL_FILE_HEADER+ae+T+Z,dirRecord:f.CENTRAL_FILE_HEADER+i(de,2)+ae+i(U.length,2)+"\0\0\0\0"+i(M,4)+i(p,4)+T+Z+U}}var a=t("../utils"),s=t("../stream/GenericWorker"),o=t("../utf8"),h=t("../crc32"),f=t("../signature");function u(l,d,c,p){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=d,this.zipPlatform=c,this.encodeFileName=p,this.streamFiles=l,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(u,s),u.prototype.push=function(l){var d=l.meta.percent||0,c=this.entriesCount,p=this._sources.length;this.accumulate?this.contentBuffer.push(l):(this.bytesWritten+=l.data.length,s.prototype.push.call(this,{data:l.data,meta:{currentFile:this.currentFile,percent:c?(d+100*(c-p-1))/c:100}}))},u.prototype.openedSource=function(l){this.currentSourceOffset=this.bytesWritten,this.currentFile=l.file.name;var d=this.streamFiles&&!l.file.dir;if(d){var c=n(l,d,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:c.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(l){this.accumulate=!1;var d=this.streamFiles&&!l.file.dir,c=n(l,d,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(c.dirRecord),d)this.push({data:function(p){return f.DATA_DESCRIPTOR+i(p.crc32,4)+i(p.compressedSize,4)+i(p.uncompressedSize,4)}(l),meta:{percent:100}});else for(this.push({data:c.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var l=this.bytesWritten,d=0;d<this.dirRecords.length;d++)this.push({data:this.dirRecords[d],meta:{percent:100}});var c=this.bytesWritten-l,p=function(v,g,_,w,b){var C=a.transformTo("string",b(w));return f.CENTRAL_DIRECTORY_END+"\0\0\0\0"+i(v,2)+i(v,2)+i(g,4)+i(_,4)+i(C.length,2)+C}(this.dirRecords.length,c,l,this.zipComment,this.encodeFileName);this.push({data:p,meta:{percent:100}})},u.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},u.prototype.registerPrevious=function(l){this._sources.push(l);var d=this;return l.on("data",function(c){d.processChunk(c)}),l.on("end",function(){d.closedSource(d.previous.streamInfo),d._sources.length?d.prepareNextSource():d.end()}),l.on("error",function(c){d.error(c)}),this},u.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},u.prototype.error=function(l){var d=this._sources;if(!s.prototype.error.call(this,l))return!1;for(var c=0;c<d.length;c++)try{d[c].error(l)}catch{}return!0},u.prototype.lock=function(){s.prototype.lock.call(this);for(var l=this._sources,d=0;d<l.length;d++)l[d].lock()},e.exports=u},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,e,r){"use strict";var i=t("../compressions"),n=t("./ZipFileWorker");r.generateWorker=function(a,s,o){var h=new n(s.streamFiles,o,s.platform,s.encodeFileName),f=0;try{a.forEach(function(u,l){f++;var d=function(g,_){var w=g||_,b=i[w];if(!b)throw new Error(w+" is not a valid compression method !");return b}(l.options.compression,s.compression),c=l.options.compressionOptions||s.compressionOptions||{},p=l.dir,v=l.date;l._compressWorker(d,c).withStreamInfo("file",{name:u,dir:p,date:v,comment:l.comment||"",unixPermissions:l.unixPermissions,dosPermissions:l.dosPermissions}).pipe(h)}),h.entriesCount=f}catch(u){h.error(u)}return h}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,e,r){"use strict";function i(){if(!(this instanceof i))return new i;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 n=new i;for(var a in this)typeof this[a]!="function"&&(n[a]=this[a]);return n}}(i.prototype=t("./object")).loadAsync=t("./load"),i.support=t("./support"),i.defaults=t("./defaults"),i.version="3.10.1",i.loadAsync=function(n,a){return new i().loadAsync(n,a)},i.external=t("./external"),e.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(t,e,r){"use strict";var i=t("./utils"),n=t("./external"),a=t("./utf8"),s=t("./zipEntries"),o=t("./stream/Crc32Probe"),h=t("./nodejsUtils");function f(u){return new n.Promise(function(l,d){var c=u.decompressed.getContentWorker().pipe(new o);c.on("error",function(p){d(p)}).on("end",function(){c.streamInfo.crc32!==u.decompressed.crc32?d(new Error("Corrupted zip : CRC32 mismatch")):l()}).resume()})}e.exports=function(u,l){var d=this;return l=i.extend(l||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),h.isNode&&h.isStream(u)?n.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",u,!0,l.optimizedBinaryString,l.base64).then(function(c){var p=new s(l);return p.load(c),p}).then(function(c){var p=[n.Promise.resolve(c)],v=c.files;if(l.checkCRC32)for(var g=0;g<v.length;g++)p.push(f(v[g]));return n.Promise.all(p)}).then(function(c){for(var p=c.shift(),v=p.files,g=0;g<v.length;g++){var _=v[g],w=_.fileNameStr,b=i.resolve(_.fileNameStr);d.file(b,_.decompressed,{binary:!0,optimizedBinaryString:!0,date:_.date,dir:_.dir,comment:_.fileCommentStr.length?_.fileCommentStr:null,unixPermissions:_.unixPermissions,dosPermissions:_.dosPermissions,createFolders:l.createFolders}),_.dir||(d.file(b).unsafeOriginalName=w)}return p.zipComment.length&&(d.comment=p.zipComment),d})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,e,r){"use strict";var i=t("../utils"),n=t("../stream/GenericWorker");function a(s,o){n.call(this,"Nodejs stream input adapter for "+s),this._upstreamEnded=!1,this._bindStream(o)}i.inherits(a,n),a.prototype._bindStream=function(s){var o=this;(this._stream=s).pause(),s.on("data",function(h){o.push({data:h,meta:{percent:0}})}).on("error",function(h){o.isPaused?this.generatedError=h:o.error(h)}).on("end",function(){o.isPaused?o._upstreamEnded=!0:o.end()})},a.prototype.pause=function(){return!!n.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},e.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,e,r){"use strict";var i=t("readable-stream").Readable;function n(a,s,o){i.call(this,s),this._helper=a;var h=this;a.on("data",function(f,u){h.push(f)||h._helper.pause(),o&&o(u)}).on("error",function(f){h.emit("error",f)}).on("end",function(){h.push(null)})}t("../utils").inherits(n,i),n.prototype._read=function(){this._helper.resume()},e.exports=n},{"../utils":32,"readable-stream":16}],14:[function(t,e,r){"use strict";e.exports={isNode:typeof Buffer<"u",newBufferFrom:function(i,n){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(i,n);if(typeof i=="number")throw new Error('The "data" argument must not be a number');return new Buffer(i,n)},allocBuffer:function(i){if(Buffer.alloc)return Buffer.alloc(i);var n=new Buffer(i);return n.fill(0),n},isBuffer:function(i){return Buffer.isBuffer(i)},isStream:function(i){return i&&typeof i.on=="function"&&typeof i.pause=="function"&&typeof i.resume=="function"}}},{}],15:[function(t,e,r){"use strict";function i(b,C,A){var T,I=a.getTypeOf(C),L=a.extend(A||{},h);L.date=L.date||new Date,L.compression!==null&&(L.compression=L.compression.toUpperCase()),typeof L.unixPermissions=="string"&&(L.unixPermissions=parseInt(L.unixPermissions,8)),L.unixPermissions&&16384&L.unixPermissions&&(L.dir=!0),L.dosPermissions&&16&L.dosPermissions&&(L.dir=!0),L.dir&&(b=v(b)),L.createFolders&&(T=p(b))&&g.call(this,T,!0);var U=I==="string"&&L.binary===!1&&L.base64===!1;A&&A.binary!==void 0||(L.binary=!U),(C instanceof f&&C.uncompressedSize===0||L.dir||!C||C.length===0)&&(L.base64=!1,L.binary=!0,C="",L.compression="STORE",I="string");var k=null;k=C instanceof f||C instanceof s?C:d.isNode&&d.isStream(C)?new c(b,C):a.prepareContent(b,C,L.binary,L.optimizedBinaryString,L.base64);var N=new u(b,k,L);this.files[b]=N}var n=t("./utf8"),a=t("./utils"),s=t("./stream/GenericWorker"),o=t("./stream/StreamHelper"),h=t("./defaults"),f=t("./compressedObject"),u=t("./zipObject"),l=t("./generate"),d=t("./nodejsUtils"),c=t("./nodejs/NodejsStreamInputAdapter"),p=function(b){b.slice(-1)==="/"&&(b=b.substring(0,b.length-1));var C=b.lastIndexOf("/");return 0<C?b.substring(0,C):""},v=function(b){return b.slice(-1)!=="/"&&(b+="/"),b},g=function(b,C){return C=C!==void 0?C:h.createFolders,b=v(b),this.files[b]||i.call(this,b,null,{dir:!0,createFolders:C}),this.files[b]};function _(b){return Object.prototype.toString.call(b)==="[object RegExp]"}var w={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(b){var C,A,T;for(C in this.files)T=this.files[C],(A=C.slice(this.root.length,C.length))&&C.slice(0,this.root.length)===this.root&&b(A,T)},filter:function(b){var C=[];return this.forEach(function(A,T){b(A,T)&&C.push(T)}),C},file:function(b,C,A){if(arguments.length!==1)return b=this.root+b,i.call(this,b,C,A),this;if(_(b)){var T=b;return this.filter(function(L,U){return!U.dir&&T.test(L)})}var I=this.files[this.root+b];return I&&!I.dir?I:null},folder:function(b){if(!b)return this;if(_(b))return this.filter(function(I,L){return L.dir&&b.test(I)});var C=this.root+b,A=g.call(this,C),T=this.clone();return T.root=A.name,T},remove:function(b){b=this.root+b;var C=this.files[b];if(C||(b.slice(-1)!=="/"&&(b+="/"),C=this.files[b]),C&&!C.dir)delete this.files[b];else for(var A=this.filter(function(I,L){return L.name.slice(0,b.length)===b}),T=0;T<A.length;T++)delete this.files[A[T].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(b){var C,A={};try{if((A=a.extend(b||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:n.utf8encode})).type=A.type.toLowerCase(),A.compression=A.compression.toUpperCase(),A.type==="binarystring"&&(A.type="string"),!A.type)throw new Error("No output type specified.");a.checkSupport(A.type),A.platform!=="darwin"&&A.platform!=="freebsd"&&A.platform!=="linux"&&A.platform!=="sunos"||(A.platform="UNIX"),A.platform==="win32"&&(A.platform="DOS");var T=A.comment||this.comment||"";C=l.generateWorker(this,A,T)}catch(I){(C=new s("error")).error(I)}return new o(C,A.type||"string",A.mimeType)},generateAsync:function(b,C){return this.generateInternalStream(b).accumulate(C)},generateNodeStream:function(b,C){return(b=b||{}).type||(b.type="nodebuffer"),this.generateInternalStream(b).toNodejsStream(C)}};e.exports=w},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(t,e,r){"use strict";e.exports=t("stream")},{stream:void 0}],17:[function(t,e,r){"use strict";var i=t("./DataReader");function n(a){i.call(this,a);for(var s=0;s<this.data.length;s++)a[s]=255&a[s]}t("../utils").inherits(n,i),n.prototype.byteAt=function(a){return this.data[this.zero+a]},n.prototype.lastIndexOfSignature=function(a){for(var s=a.charCodeAt(0),o=a.charCodeAt(1),h=a.charCodeAt(2),f=a.charCodeAt(3),u=this.length-4;0<=u;--u)if(this.data[u]===s&&this.data[u+1]===o&&this.data[u+2]===h&&this.data[u+3]===f)return u-this.zero;return-1},n.prototype.readAndCheckSignature=function(a){var s=a.charCodeAt(0),o=a.charCodeAt(1),h=a.charCodeAt(2),f=a.charCodeAt(3),u=this.readData(4);return s===u[0]&&o===u[1]&&h===u[2]&&f===u[3]},n.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var s=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,s},e.exports=n},{"../utils":32,"./DataReader":18}],18:[function(t,e,r){"use strict";var i=t("../utils");function n(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}n.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var s,o=0;for(this.checkOffset(a),s=this.index+a-1;s>=this.index;s--)o=(o<<8)+this.byteAt(s);return this.index+=a,o},readString:function(a){return i.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},e.exports=n},{"../utils":32}],19:[function(t,e,r){"use strict";var i=t("./Uint8ArrayReader");function n(a){i.call(this,a)}t("../utils").inherits(n,i),n.prototype.readData=function(a){this.checkOffset(a);var s=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,s},e.exports=n},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,r){"use strict";var i=t("./DataReader");function n(a){i.call(this,a)}t("../utils").inherits(n,i),n.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},n.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},n.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},n.prototype.readData=function(a){this.checkOffset(a);var s=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,s},e.exports=n},{"../utils":32,"./DataReader":18}],21:[function(t,e,r){"use strict";var i=t("./ArrayReader");function n(a){i.call(this,a)}t("../utils").inherits(n,i),n.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var s=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,s},e.exports=n},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,r){"use strict";var i=t("../utils"),n=t("../support"),a=t("./ArrayReader"),s=t("./StringReader"),o=t("./NodeBufferReader"),h=t("./Uint8ArrayReader");e.exports=function(f){var u=i.getTypeOf(f);return i.checkSupport(u),u!=="string"||n.uint8array?u==="nodebuffer"?new o(f):n.uint8array?new h(i.transformTo("uint8array",f)):new a(i.transformTo("array",f)):new s(f)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,r){"use strict";r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,e,r){"use strict";var i=t("./GenericWorker"),n=t("../utils");function a(s){i.call(this,"ConvertWorker to "+s),this.destType=s}n.inherits(a,i),a.prototype.processChunk=function(s){this.push({data:n.transformTo(this.destType,s.data),meta:s.meta})},e.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,r){"use strict";var i=t("./GenericWorker"),n=t("../crc32");function a(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(a,i),a.prototype.processChunk=function(s){this.streamInfo.crc32=n(s.data,this.streamInfo.crc32||0),this.push(s)},e.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,r){"use strict";var i=t("../utils"),n=t("./GenericWorker");function a(s){n.call(this,"DataLengthProbe for "+s),this.propName=s,this.withStreamInfo(s,0)}i.inherits(a,n),a.prototype.processChunk=function(s){if(s){var o=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=o+s.data.length}n.prototype.processChunk.call(this,s)},e.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,r){"use strict";var i=t("../utils"),n=t("./GenericWorker");function a(s){n.call(this,"DataWorker");var o=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,s.then(function(h){o.dataIsReady=!0,o.data=h,o.max=h&&h.length||0,o.type=i.getTypeOf(h),o.isPaused||o._tickAndRepeat()},function(h){o.error(h)})}i.inherits(a,n),a.prototype.cleanUp=function(){n.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var s=null,o=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":s=this.data.subst