!function(self){"use strict";functionnormalizeName(name){if("string"!=typeofname&&(name=String(name)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name))thrownewTypeError("Invalid character in header field name");returnname.toLowerCase()}functionnormalizeValue(value){return"string"!=typeofvalue&&(value=String(value)),value}functioniteratorFor(items){variterator={next:function(){varvalue=items.shift();return{done:void0===value,value:value}}};returnsupport.iterable&&(iterator[Symbol.iterator]=function(){returniterator}),iterator}functionHeaders(headers){this.map={},headersinstanceofHeaders?headers.forEach(function(value,name){this.append(name,value)},this):headers&&Object.getOwnPropertyNames(headers).forEach(function(name){this.append(name,headers[name])},this)}functionconsumed(body){returnbody.bodyUsed?Promise.reject(newTypeError("Already read")):void(body.bodyUsed=!0)}functionfileReaderReady(reader){returnnewPromise(function(resolve,reject){reader.onload=function(){resolve(reader.result)},reader.onerror=function(){reject(reader.error)}})}functionreadBlobAsArrayBuffer(blob){varreader=newFileReader,promise=fileReaderReady(reader);returnreader.readAsArrayBuffer(blob),promise}functionreadBlobAsText(blob){varreader=newFileReader,promise=fileReaderReady(reader);returnreader.readAsText(blob),promise}functionreadArrayBufferAsText(buf){for(varview=newUint8Array(buf),chars=newArray(view.length),i=0;i<view.length;i++)chars[i]=String.fromCharCode(view[i]);returnchars.join("")}functionbufferClone(buf){if(buf.slice)returnbuf.slice(0);varview=newUint8Array(buf.byteLength);returnview.set(newUint8Array(buf)),view.buffer}functionBody(){returnthis.bodyUsed=!1,this._initBody=function(body){if(this._bodyInit=body,body)if("string"==typeofbody)this._bodyText=body;elseif(support.blob&&Blob.prototype.isPrototypeOf(body))this._bodyBlob=body;elseif(support.formData&&FormData.prototype.isPrototypeOf(body))this._bodyFormData=body;elseif(support.searchParams&&URLSearchParams.prototype.isPrototypeOf(body))this._bodyText=body.toString();elseif(support.arrayBuffer&&support.blob&&isDataView(body))this._bodyArrayBuffer=bufferClone(body.buffer),this._bodyInit=newBlob([this._bodyArrayBuffer]);else{if(!support.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(body)&&!isArrayBufferView(body))thrownewError("unsupported BodyInit type");this._bodyArrayBuffer=bufferClone(body)}elsethis._bodyText="";this.headers.get("content-type")||("string"==typeofbody?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):support.searchParams&&URLSearchParams.prototype.isPrototypeOf(body)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},support.blob&&(this.blob=function(){varrejected=consumed(this);if(rejected)returnrejected;if(this._bodyBlob)returnPromise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)returnPromise.resolve(newBlob([this._bodyArrayBuffer]));if(this._bodyFormData)thrownewError("could not read FormData body as blob");returnPromise.resolve(newBlob([this._bodyText]))},this.arrayBuffer=function(){returnthis._bodyArrayBuffer?consumed(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(readBlobAsArrayBuffer)}),this.text=function(){varrejected=consumed(this);if(rejected)returnrejected;if(this._bodyBlob)returnreadBlobAsText(this._bodyBlob);if(this._bodyArrayBuffer)returnPromise.resolve(readArrayBufferAsText(this._bodyArrayBuffer));if(this._bodyFormData)thrownewError("could not read FormData body as text");returnPromise.resolve(this._bodyText)},support.formData&&(this.formData=function(){returnthis.text().then(decode)}),this.json=function(){returnthis.text().then(JSON.parse)},this}functionnormalizeMethod(method){varupcased=method.toUpperCase();returnmethods.indexOf(upcased)>-1?upcased:method}functionRequest(input,options){options=options||{};varbody=options.body;if("string"==typeofinput)this.url=input;else{if(input.bodyUsed)thrownewTypeError("Already read");thi