!function(e,t){"object"==typeofexports&&"object"==typeofmodule?module.exports=t():"function"==typeofdefine&&define.amd?define("pdfjs-dist/build/pdf",[],t):"object"==typeofexports?exports["pdfjs-dist/build/pdf"]=t():e["pdfjs-dist/build/pdf"]=e.pdfjsDistBuildPdf=t()}(this,function(){returnfunction(e){functiont(n){if(r[n])returnr[n].exports;vari=r[n]={i:n,l:!1,exports:{}};returne[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}varr={};returnt.m=e,t.c=r,t.i=function(e){returne},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){varr=e&&e.__esModule?function(){returne.default}:function(){returne};returnt.d(r,"a",r),r},t.o=function(e,t){returnObject.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=13)}([function(e,t,r){"use strict";functionn(e){se=e}functioni(){returnse}functiona(e){se>=ie.infos&&console.log("Info: "+e)}functiono(e){se>=ie.warnings&&console.log("Warning: "+e)}functions(e){console.log("Deprecated API usage: "+e)}functionl(e){thrownewError(e)}functionc(e,t){e||l(t)}functionu(e,t){try{varr=newURL(e);if(!r.origin||"null"===r.origin)return!1}catch(e){return!1}varn=newURL(t,r);returnr.origin===n.origin}functiond(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}functionh(e,t){if(!e)returnnull;try{varr=t?newURL(e,t):newURL(e);if(d(r))returnr}catch(e){}returnnull}functionf(e,t,r){returnObject.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r}functionp(e){vart;returnfunction(){returne&&(t=Object.create(null),e(t),e=null),t}}functionm(e){return"string"!=typeofe?(o("The argument for removeNullCharacters must be a string."),e):e.replace(ye,"")}functiong(e){c(null!==e&&"object"===(void0===e?"undefined":X(e))&&void0!==e.length,"Invalid argument for bytesToString");vart=e.length;if(t<8192)returnString.fromCharCode.apply(null,e);for(varr=[],n=0;n<t;n+=8192){vari=Math.min(n+8192,t),a=e.subarray(n,i);r.push(String.fromCharCode.apply(null,a))}returnr.join("")}functionv(e){c("string"==typeofe,"Invalid argument for stringToBytes");for(vart=e.length,r=newUint8Array(t),n=0;n<t;++n)r[n]=255&e.charCodeAt(n);returnr}functionb(e){returnvoid0!==e.length?e.length:(c(void0!==e.byteLength),e.byteLength)}functiony(e){if(1===e.length&&e[0]instanceofUint8Array)returne[0];vart,r,n,i=0,a=e.length;for(t=0;t<a;t++)r=e[t],n=b(r),i+=n;varo=0,s=newUint8Array(i);for(t=0;t<a;t++)r=e[t],rinstanceofUint8Array||(r="string"==typeofr?v(r):newUint8Array(r)),n=r.byteLength,s.set(r,o),o+=n;returns}function_(e){returnString.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}functionA(e){for(vart=1,r=0;e>t;)t<<=1,r++;returnr}functionS(e,t){returne[t]<<24>>24}functionw(e,t){returne[t]<<8|e[t+1]}functionP(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}functionC(){vare=newUint8Array(4);returne[0]=1,1===newUint32Array(e.buffer,0,1)[0]}functionx(){try{returnnewFunction(""),!0}catch(e){return!1}}functionk(e){vart,r=e.length,n=[];if("þ"===e[0]&&"ÿ"===e[1])for(t=2;t<r;t+=2)n.push(String.fromCharCode(e.charCodeAt(t)<<8|e.charCodeAt(t+1)));elsefor(t=0;t<r;++t){vari=we[e.charCodeAt(t)];n.push(i?String.fromCharCode(i):e.charAt(t))}returnn.join("")}functionT(e){returndecodeURIComponent(escape(e))}functionR(e){returnunescape(encodeURIComponent(e))}functionE(e){for(vartine)return!1;return!0}functionI(e){return"boolean"==typeofe}functionL(e){return"number"==typeofe&&(0|e)===e}functionO(e){return"number"==typeofe}functionj(e){return"string"==typeofe}functionD(e){returneinstanceofArray}functionF(e){return"object"===(void0===e?"undefined":X(e))&&null!==e&&void0!==e.byteLength}functionN(e){return32===e||9===e||13===e||10===e}functionM(){return"object"===("undefined"==typeofprocess?"undefined":X(process))&&process+""=="[object process]"}functionW(){vare={};returne.promise=newPromise(function(t,r){e.resolve=t,e.reject=r}),e}functionU(e,t){varr=arguments.length>2&&void0!==arguments[2]?a
;i.onload=function(){vart=i.width,n=i.height,a=t*n,o=4*a,s=newUint8Array(a*r),l=document.createElement("canvas");l.width=t,l.height=n;varc=l.getContext("2d");c.drawImage(i,0,0);varu,d,h=c.getImageData(0,0,t,n).data;if(3===r)for(u=0,d=0;u<o;u+=4,d+=3)s[d]=h[u],s[d+1]=h[u+1],s[d+2]=h[u+2];elseif(1===r)for(u=0,d=0;u<o;u+=4,d++)s[d]=h[u];e({data:s,width:t,height:n})},i.onerror=function(){n(newError("JpegDecode failed to load image"))},i.src=t})},this),e.on("FetchBuiltInCMap",function(e){returnthis.destroyed?Promise.reject(newError("Worker was destroyed")):this.CMapReaderFactory.fetch({name:e.name})},this)},getData:function(){returnthis.messageHandler.sendWithPromise("GetData",null)},getPage:function(e,t){varr=this;if(!(0,c.isInt)(e)||e<=0||e>this.numPages)returnPromise.reject(newError("Invalid page request"));varn=e-1;if(ninthis.pagePromises)returnthis.pagePromises[n];vari=this.messageHandler.sendWithPromise("GetPage",{pageIndex:n}).then(function(e){if(r.destroyed)thrownewError("Transport destroyed");vart=newx(n,e,r);returnr.pageCache[n]=t,t});returnthis.pagePromises[n]=i,i},getPageIndex:function(e){returnthis.messageHandler.sendWithPromise("GetPageIndex",{ref:e}).catch(function(e){returnPromise.reject(newError(e))})},getAnnotations:function(e,t){returnthis.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})},getDestinations:function(){returnthis.messageHandler.sendWithPromise("GetDestinations",null)},getDestination:function(e){returnthis.messageHandler.sendWithPromise("GetDestination",{id:e})},getPageLabels:function(){returnthis.messageHandler.sendWithPromise("GetPageLabels",null)},getAttachments:function(){returnthis.messageHandler.sendWithPromise("GetAttachments",null)},getJavaScript:function(){returnthis.messageHandler.sendWithPromise("GetJavaScript",null)},getOutline:function(){returnthis.messageHandler.sendWithPromise("GetOutline",null)},getMetadata:function(){returnthis.messageHandler.sendWithPromise("GetMetadata",null).then(function(e){return{info:e[0],metadata:e[1]?newf.Metadata(e[1]):null}})},getStats:function(){returnthis.messageHandler.sendWithPromise("GetStats",null)},startCleanup:function(){vare=this;this.messageHandler.sendWithPromise("Cleanup",null).then(function(){for(vart=0,r=e.pageCache.length;t<r;t++){varn=e.pageCache[t];n&&n.cleanup()}e.commonObjs.clear(),e.fontLoader.clear()})}},e}(),E=function(){functione(){this.objs=Object.create(null)}returne.prototype={ensureObj:function(e){if(this.objs[e])returnthis.objs[e];vart={capability:(0,c.createPromiseCapability)(),data:null,resolved:!1};returnthis.objs[e]=t,t},get:function(e,t){if(t)returnthis.ensureObj(e).capability.promise.then(t),null;varr=this.objs[e];if(!r||!r.resolved)thrownewError("Requesting object that isn't resolved yet "+e);returnr.data},resolve:function(e,t){varr=this.ensureObj(e);r.resolved=!0,r.data=t,r.capability.resolve(t)},isResolved:function(e){vart=this.objs;return!!t[e]&&t[e].resolved},hasData:function(e){returnthis.isResolved(e)},getData:function(e){vart=this.objs;returnt[e]&&t[e].resolved?t[e].data:null},clear:function(){this.objs=Object.create(null)}},e}(),I=function(){functione(e){this._internalRenderTask=e,this.onContinue=null}returne.prototype={getpromise(){returnthis._internalRenderTask.capability.promise},cancel:function(){this._internalRenderTask.cancel()},then:function(e,t){returnthis.promise.then.apply(this.promise,arguments)}},e}(),L=function(){functione(e,t,r,n,i,a,o){this.callback=e,this.params=t,this.objs=r,this.commonObjs=n,this.operatorListIdx=null,this.operatorList=i,this.pageNumber=a,this.canvasFactory=o,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this.useRequestAnimationFrame=!1,this.cancelled=!1,this.capability=(0,c.createPromiseCapability)(),this.task=newI(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=t.canvasContext.canvas}vart=newWeakMap;returne.prototype={initializeGraphics:function(e){if(this._
0!==r.angle&&(s="rotate("+r.angle+"deg) "+s),""!==s&&(r.originalTransform=s,i.CustomStyle.setProp("transform",e,s)),this._textDivProperties.set(e,r),t.appendChild(e)}},_render:function(e){vart=this,i=(0,n.createPromiseCapability)(),a=Object.create(null),o=document.createElement("canvas");if(o.mozOpaque=!0,this._layoutTextCtx=o.getContext("2d",{alpha:!1}),this._textContent){vars=this._textContent.items,l=this._textContent.styles;this._processItems(s,l),i.resolve()}else{if(!this._textContentStream)thrownewError('Neither "textContent" nor "textContentStream" parameters specified.');this._reader=this._textContentStream.getReader(),functione(){t._reader.read().then(function(r){varo=r.value;if(r.done)returnvoidi.resolve();n.Util.extendObj(a,o.styles),t._processItems(o.items,a),e()},i.reject)}()}i.promise.then(function(){a=null,e?t._renderTimer=setTimeout(function(){r(t),t._renderTimer=null},e):r(t)},this._capability.reject)},expandTextDivs:function(e){if(this._enhanceTextSelection&&this._renderingDone){null!==this._bounds&&(a(this),this._bounds=null);for(vart=0,r=this._textDivs.length;t<r;t++){varn=this._textDivs[t],o=this._textDivProperties.get(n);if(!o.isWhitespace)if(e){vars="",l="";1!==o.scale&&(s="scaleX("+o.scale+")"),0!==o.angle&&(s="rotate("+o.angle+"deg) "+s),0!==o.paddingLeft&&(l+=" padding-left: "+o.paddingLeft/o.scale+"px;",s+=" translateX("+-o.paddingLeft/o.scale+"px)"),0!==o.paddingTop&&(l+=" padding-top: "+o.paddingTop+"px;",s+=" translateY("+-o.paddingTop+"px)"),0!==o.paddingRight&&(l+=" padding-right: "+o.paddingRight/o.scale+"px;"),0!==o.paddingBottom&&(l+=" padding-bottom: "+o.paddingBottom+"px;"),""!==l&&n.setAttribute("style",o.style+l),""!==s&&i.CustomStyle.setProp("transform",n,s)}elsen.style.padding=0,i.CustomStyle.setProp("transform",n,o.originalTransform||"")}}}},c}();t.renderTextLayer=a},function(e,t,r){"use strict";functionn(e){returne.replace(/>\\376\\377([^<]+)/g,function(e,t){for(varr=t.replace(/\\([0-3])([0-7])([0-7])/g,function(e,t,r,n){returnString.fromCharCode(64*t+8*r+1*n)}),n="",i=0;i<r.length;i+=2){vara=256*r.charCodeAt(i)+r.charCodeAt(i+1);n+=a>=32&&a<127&&60!==a&&62!==a&&38!==a?String.fromCharCode(a):"&#x"+(65536+a).toString(16).substring(1)+";"}return">"+n})}functioni(e){if("string"==typeofe){e=n(e);e=(newDOMParser).parseFromString(e,"application/xml")}elseif(!(einstanceofDocument))thrownewError("Metadata: Invalid metadata object");this.metaDocument=e,this.metadata=Object.create(null),this.parse()}Object.defineProperty(t,"__esModule",{value:!0}),i.prototype={parse:function(){vare=this.metaDocument,t=e.documentElement;if("rdf:rdf"!==t.nodeName.toLowerCase())for(t=t.firstChild;t&&"rdf:rdf"!==t.nodeName.toLowerCase();)t=t.nextSibling;varr=t?t.nodeName.toLowerCase():null;if(t&&"rdf:rdf"===r&&t.hasChildNodes()){varn,i,a,o,s,l,c,u=t.childNodes;for(o=0,l=u.length;o<l;o++)if(n=u[o],"rdf:description"===n.nodeName.toLowerCase())for(s=0,c=n.childNodes.length;s<c;s++)"#text"!==n.childNodes[s].nodeName.toLowerCase()&&(i=n.childNodes[s],a=i.nodeName.toLowerCase(),this.metadata[a]=i.textContent.trim())}},get:function(e){returnthis.metadata[e]||null},has:function(e){returnvoid0!==this.metadata[e]}},t.Metadata=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebGLUtils=void0;varn=r(1),i=r(0),a=function(){functione(e,t,r){varn=e.createShader(r);if(e.shaderSource(n,t),e.compileShader(n),!e.getShaderParameter(n,e.COMPILE_STATUS)){vari=e.getShaderInfoLog(n);thrownewError("Error during shader compilation: "+i)}returnn}functiont(t,r){returne(t,r,t.VERTEX_SHADER)}functionr(t,r){returne(t,r,t.FRAGMENT_SHADER)}functiona(e,t){for(varr=e.createProgram(),n=0,i=t.length;n<i;++n)e.attachShader(r,t[n]);if(e.linkProgram(r),!e.getProgramParameter(r,e.LINK_STATUS)){vara=e.getProgramInfoLog(r);thrownewError("Error during program linking: "+a)}returnr}functiono(e,t,r){e.activeTexture(r);varn=e.createTexture();returne.bindTexture(e.TEXTURE_2D,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.
if(!1===a(this))throwB("getWriter");returni(this)}},{key:"locked",get:function(){if(!1===a(this))throwB("locked");returno(this)}}]),e}();e.exports={AcquireWritableStreamDefaultWriter:i,IsWritableStream:a,IsWritableStreamLocked:o,WritableStream:be,WritableStreamAbort:s,WritableStreamDefaultControllerError:q,WritableStreamDefaultWriterCloseWithErrorPropagation:C,WritableStreamDefaultWriterRelease:R,WritableStreamDefaultWriterWrite:E,WritableStreamCloseQueuedOrInFlight:g};varye=function(){functione(t){if(n(this,e),!1===a(t))thrownewTypeError("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===o(t))thrownewTypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=t,t._writer=this;varr=t._state;if("writable"===r)!1===g(t)&&!0===t._backpressure?K(this):$(this),X(this);elseif("erroring"===r)Z(this,t._storedError),this._readyPromise.catch(function(){}),X(this);elseif("closed"===r)$(this),Y(this);else{de("errored"===r,"state must be errored");vari=t._storedError;Z(this,i),this._readyPromise.catch(function(){}),H(this,i),this._closedPromise.catch(function(){})}}returnie(e,[{key:"abort",value:function(e){return!1===S(this)?Promise.reject(z("abort")):void0===this._ownerWritableStream?Promise.reject(G("abort")):w(this,e)}},{key:"close",value:function(){if(!1===S(this))returnPromise.reject(z("close"));vare=this._ownerWritableStream;returnvoid0===e?Promise.reject(G("close")):!0===g(e)?Promise.reject(newTypeError("cannot close an already-closing stream")):P(this)}},{key:"releaseLock",value:function(){if(!1===S(this))throwz("releaseLock");vare=this._ownerWritableStream;void0!==e&&(de(void0!==e._writer),R(this))}},{key:"write",value:function(e){return!1===S(this)?Promise.reject(z("write")):void0===this._ownerWritableStream?Promise.reject(G("write to")):E(this,e)}},{key:"closed",get:function(){return!1===S(this)?Promise.reject(z("closed")):this._closedPromise}},{key:"desiredSize",get:function(){if(!1===S(this))throwz("desiredSize");if(void0===this._ownerWritableStream)throwG("desiredSize");returnT(this)}},{key:"ready",get:function(){return!1===S(this)?Promise.reject(z("ready")):this._readyPromise}}]),e}(),_e=function(){functione(t,r,i,o){if(n(this,e),!1===a(t))thrownewTypeError("WritableStreamDefaultController can only be constructed with a WritableStream instance");if(void0!==t._writableStreamController)thrownewTypeError("WritableStreamDefaultController instances can only be created by the WritableStream constructor");this._controlledWritableStream=t,this._underlyingSink=r,this._queue=void0,this._queueTotalSize=void0,ve(this),this._started=!1;vars=le(i,o);this._strategySize=s.size,this._strategyHWM=s.highWaterMark,A(t,U(this))}returnie(e,[{key:"error",value:function(e){if(!1===D(this))thrownewTypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this._controlledWritableStream._state&&q(this,e)}},{key:"__abortSteps",value:function(e){returnse(this._underlyingSink,"abort",[e])}},{key:"__errorSteps",value:function(){ve(this)}},{key:"__startSteps",value:function(){vare=this,t=oe(this._underlyingSink,"start",[this]),r=this._controlledWritableStream;Promise.resolve(t).then(function(){de("writable"===r._state||"erroring"===r._state),e._started=!0,F(e)},function(t){de("writable"===r._state||"erroring"===r._state),e._started=!0,c(r,t)}).catch(he)}}]),e}()},function(e,t,r){varn=r(0),i=n.IsFiniteNonNegativeNumber,a=r(1),o=a.assert;t.DequeueValue=function(e){o("_queue"ine&&"_queueTotalSize"ine,"Spec-level failure: DequeueValue should only be used on containers with [[queue]] and [[queueTotalSize]]."),o(e._queue.length>0,"Spec-level failure: should never dequeue from an empty queue.");vart=e._queue.shift();returne._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value},t.EnqueueValueWithSize=function(e,t,r){if(o("_queue"ine&&"_queueTotalSize"ine,"Spec-levelfailure:EnqueueValueWithSizeshouldonlybeusedonc
},function(e,t,r){functionn(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}functioni(e){if(!0===e._errored)thrownewTypeError("TransformStream is already errored");if(!0===e._readableClosed)thrownewTypeError("Readable side is already closed");s(e)}functiona(e,t){if(!0===e._errored)thrownewTypeError("TransformStream is already errored");if(!0===e._readableClosed)thrownewTypeError("Readable side is already closed");varr=e._readableController;try{R(r,t)}catch(t){throwe._readableClosed=!0,l(e,t),e._storedError}!0==I(r)<=0&&!1===e._backpressure&&d(e,!0)}functiono(e,t){if(!0===e._errored)thrownewTypeError("TransformStream is already errored");c(e,t)}functions(e){_(!1===e._errored),_(!1===e._readableClosed);try{T(e._readableController)}catch(e){_(!1)}e._readableClosed=!0}functionl(e,t){!1===e._errored&&c(e,t)}functionc(e,t){_(!1===e._errored),e._errored=!0,e._storedError=t,!1===e._writableDone&&j(e._writableController,t),!1===e._readableClosed&&E(e._readableController,t)}functionu(e){return_(void0!==e._backpressureChangePromise,"_backpressureChangePromise should have been initialized"),!1===e._backpressure?Promise.resolve():(_(!0===e._backpressure,"_backpressure should have been initialized"),e._backpressureChangePromise)}functiond(e,t){_(e._backpressure!==t,"TransformStreamSetBackpressure() should be called only when backpressure is changed"),void0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(t),e._backpressureChangePromise=newPromise(function(t){e._backpressureChangePromise_resolve=t}),e._backpressureChangePromise.then(function(e){_(e!==t,"_backpressureChangePromise should be fulfilled only when backpressure is changed")}),e._backpressure=t}functionh(e,t){returna(t._controlledTransformStream,e),Promise.resolve()}functionf(e,t){_(!1===e._errored),_(!1===e._transforming),_(!1===e._backpressure),e._transforming=!0;varr=e._transformer,n=e._transformStreamController;returnw(r,"transform",[t,n],h,[t,n]).then(function(){returne._transforming=!1,u(e)},function(t){returnl(e,t),Promise.reject(t)})}functionp(e){return!!C(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")}functionm(e){return!!C(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")}functiong(e){returnnewTypeError("TransformStreamDefaultController.prototype."+e+" can only be used on a TransformStreamDefaultController")}functionv(e){returnnewTypeError("TransformStream.prototype."+e+" can only be used on a TransformStream")}varb=function(){functione(e,t){for(varr=0;r<t.length;r++){varn=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}returnfunction(t,r,n){returnr&&e(t.prototype,r),n&&e(t,n),t}}(),y=r(1),_=y.assert,A=r(0),S=A.InvokeOrNoop,w=A.PromiseInvokeOrPerformFallback,P=A.PromiseInvokeOrNoop,C=A.typeIsObject,x=r(4),k=x.ReadableStream,T=x.ReadableStreamDefaultControllerClose,R=x.ReadableStreamDefaultControllerEnqueue,E=x.ReadableStreamDefaultControllerError,I=x.ReadableStreamDefaultControllerGetDesiredSize,L=r(2),O=L.WritableStream,j=L.WritableStreamDefaultControllerError,D=function(){functione(t,r){n(this,e),this._transformStream=t,this._startPromise=r}returnb(e,[{key:"start",value:function(e){vart=this._transformStream;returnt._writableController=e,this._startPromise.then(function(){returnu(t)})}},{key:"write",value:function(e){returnf(this._transformStream,e)}},{key:"abort",value:function(){vare=this._transformStream;e._writableDone=!0,c(e,newTypeError("Writable side aborted"))}},{key:"close",value:function(){vare=this._transformStream;return_(!1===e._transforming),e._writableDone=!0,P(e._transformer,"flush",[e._transformStreamController]).then(function(){return!0===e._errored?Promise.reject(e._storedError):(!1===e._readableClosed&&s(e),Promise.resolve())}).catch(function(t){returnl(e,t),Promise.reject(e._storedError)})}}]),e}(),F=function(){functione(t,r){n(this,e),this._transformStream=t,this._startPromise=r}returnb(e,[{key:"start",value:fu
"file"!==this._scheme&&(this._scheme=s._scheme),_===p){this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query,this._username=s._username,this._password=s._password;breake}if("/"===_||"\\"===_)"\\"===_&&l("\\ is an invalid code point."),c="relative slash";elseif("?"===_)this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query="?",this._username=s._username,this._password=s._password,c="query";else{if("#"!==_){varA=n[u+1],S=n[u+2];("file"!==this._scheme||!m.test(_)||":"!==A&&"|"!==A||S!==p&&"/"!==S&&"\\"!==S&&"?"!==S&&"#"!==S)&&(this._host=s._host,this._port=s._port,this._username=s._username,this._password=s._password,this._path=s._path.slice(),this._path.pop()),c="relative path";continue}this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query,this._fragment="#",this._username=s._username,this._password=s._password,c="fragment"}break;case"relative slash":if("/"!==_&&"\\"!==_){"file"!==this._scheme&&(this._host=s._host,this._port=s._port,this._username=s._username,this._password=s._password),c="relative path";continue}"\\"===_&&l("\\ is an invalid code point."),c="file"===this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!==_){l("Expected '/', got: "+_),c="authority ignore slashes";continue}c="authority second slash";break;case"authority second slash":if(c="authority ignore slashes","/"!==_){l("Expected '/', got: "+_);continue}break;case"authority ignore slashes":if("/"!==_&&"\\"!==_){c="authority";continue}l("Expected authority, got: "+_);break;case"authority":if("@"===_){v&&(l("@ already seen."),d+="%40"),v=!0;for(varw=0;w<d.length;w++){varP=d[w];if("\t"!==P&&"\n"!==P&&"\r"!==P)if(":"!==P||null!==this._password){varC=a(P);null!==this._password?this._password+=C:this._username+=C}elsethis._password="";elsel("Invalid whitespace in authority.")}d=""}else{if(_===p||"/"===_||"\\"===_||"?"===_||"#"===_){u-=d.length,d="",c="host";continue}d+=_}break;case"file host":if(_===p||"/"===_||"\\"===_||"?"===_||"#"===_){2!==d.length||!m.test(d[0])||":"!==d[1]&&"|"!==d[1]?0===d.length?c="relative path start":(this._host=r.call(this,d),d="",c="relative path start"):c="relative path";continue}"\t"===_||"\n"===_||"\r"===_?l("Invalid whitespace in file host."):d+=_;break;case"host":case"hostname":if(":"!==_||b){if(_===p||"/"===_||"\\"===_||"?"===_||"#"===_){if(this._host=r.call(this,d),d="",c="relative path start",i)breake;continue}"\t"!==_&&"\n"!==_&&"\r"!==_?("["===_?b=!0:"]"===_&&(b=!1),d+=_):l("Invalid code point in host/hostname: "+_)}elseif(this._host=r.call(this,d),d="",c="port","hostname"===i)breake;break;case"port":if(/[0-9]/.test(_))d+=_;else{if(_===p||"/"===_||"\\"===_||"?"===_||"#"===_||i){if(""!==d){varx=parseInt(d,10);x!==h[this._scheme]&&(this._port=x+""),d=""}if(i)breake;c="relative path start";continue}"\t"===_||"\n"===_||"\r"===_?l("Invalid code point in port: "+_):t.call(this)}break;case"relative path start":if("\\"===_&&l("'\\' not allowed in path."),c="relative path","/"!==_&&"\\"!==_)continue;break;case"relative path":if(_!==p&&"/"!==_&&"\\"!==_&&(i||"?"!==_&&"#"!==_))"\t"!==_&&"\n"!==_&&"\r"!==_&&(d+=a(_));else{"\\"===_&&l("\\ not allowed in relative path.");vark;(k=f[d.toLowerCase()])&&(d=k),".."===d?(this._path.pop(),"/"!==_&&"\\"!==_&&this._path.push("")):"."===d&&"/"!==_&&"\\"!==_?this._path.push(""):"."!==d&&("file"===this._scheme&&0===this._path.length&&2===d.length&&m.test(d[0])&&"|"===d[1]&&(d=d[0]+":"),this._path.push(d)),d="","?"===_?(this._query="?",c="query"):"#"===_&&(this._fragment="#",c="fragment")}break;case"query":i||"#"!==_?_!==p&&"\t"!==_&&"\n"!==_&&"\r"!==_&&(this._query+=o(_)):(this._fragment="#",c="fragment");break;case"fragment":_!==p&&"\t"!==_&&"\n"!==_&&"\r"!==_&&(this._fragment+=_)}u++}}functionl(){this._scheme="",this._schemeData="",this._username="",this._password=null,this._host="",this._port="",this._path=[],this._query="",this._fragment="",this._isInvalid=!1,this._isRelative=!1}functionc(e,t){void0===t||tinstanceofc||(t=newc(String(t))),this._url=