(window.__LOADABLE_LOADED_CHUNKS__=window.__LOADABLE_LOADED_CHUNKS__||[]).push([[2],{
/***/iDU1:
/***/function(e,t,r){"use strict";r.r(t),
/* harmony export (binding) */r.d(t,"Headers",(function(){return z})),
/* harmony export (binding) */r.d(t,"Request",(function(){return Y})),
/* harmony export (binding) */r.d(t,"Response",(function(){return M})),
/* harmony export (binding) */r.d(t,"FetchError",(function(){return v}));
/* harmony import */var n=r("92t5"),o=r("o1V0"),i=r("EfWO"),a=r("L2Ey"),s=r("6P3j");
/* harmony import */function u(e,t){var r="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"===typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return c(e,t)}(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),e}
// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js
// fix for "Readable" isn't a named export issue
var d,y=n.Readable,p=Symbol("buffer"),b=Symbol("type"),m=function(){function e(){l(this,e),this[b]="";var t=arguments[0],r=arguments[1],n=[];if(t)for(var o=t,i=Number(o.length),a=0;a<i;a++){var s=o[a],u=void 0;(u=s instanceof Buffer?s:ArrayBuffer.isView(s)?Buffer.from(s.buffer,s.byteOffset,s.byteLength):s instanceof ArrayBuffer?Buffer.from(s):s instanceof e?s[p]:Buffer.from("string"===typeof s?s:String(s))).length,n.push(u)}this[p]=Buffer.concat(n);var c=r&&void 0!==r.type&&String(r.type).toLowerCase();c&&!/[^\u0020-\u007E]/.test(c)&&(this[b]=c)}return h(e,[{key:"size",get:function(){return this[p].length}},{key:"type",get:function(){return this[b]}},{key:"text",value:function(){return Promise.resolve(this[p].toString())}},{key:"arrayBuffer",value:function(){var e=this[p],t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return Promise.resolve(t)}},{key:"stream",value:function(){var e=new y;return e._read=function(){},e.push(this[p]),e.push(null),e}},{key:"toString",value:function(){return"[object Blob]"}},{key:"slice",value:function(){var t,r,n=this.size,o=arguments[0],i=arguments[1];t=void 0===o?0:o<0?Math.max(n+o,0):Math.min(o,n),r=void 0===i?n:i<0?Math.max(n+i,0):Math.min(i,n);var a=Math.max(r-t,0),s=this[p],u=s.slice(t,t+a),c=new e([],{type:arguments[2]});return c[p]=u,c}}]),e}();
/**
 * fetch-error.js
 *
 * FetchError interface for operational errors
 */
/**
 * Create FetchError instance
 *
 * @param   String      message      Error message for human
 * @param   String      type         Error type for machine
 * @param   String      systemError  For Node.js system error
 * @return  FetchError
 */
function v(e,t,r){Error.call(this,e),this.message=e,this.type=t,// when err.type is `system`, err.code contains system error code
r&&(this.code=this.errno=r.code),// hide custom error implementation details from end-users
Error.captureStackTrace(this,this.constructor)}Object.defineProperties(m.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}}),Object.defineProperty(m.prototype,Symbol.toStringTag,{value:"Blob",writable:!1,enumerable:!1,configurable:!0}),v.prototype=Object.create(Error.prototype),v.prototype.constructor=v,v.prototype.name="FetchError";try{d=require("encoding").convert}catch(ee){}var g=Symbol("Body internals"),w=n.PassThrough;// fix an issue where "PassThrough" isn't a named export for node <10
/**
 * Body mixin
 *
 * Ref: https://fetch.spec.whatwg.org/#body
 *
 * @param   Stream  body  Readable stream
 * @param   Object  opts  Response options
 * @return  Void
 */
function S(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.size,i=void 0===o?0:o,a=r.timeout,s=void 0===a?0:a;null==e?
// body is undefined or null
e=null:j(e)?
// body is a URLSearchParams
e=Buffer.from(e.toString()):O(e)||Buffer.isBuffer(e)||("[object ArrayBuffer]"===Object.prototype.toString.call(e)?
// body is ArrayBuffer
e=Buffer.from(e):ArrayBuffer.isView(e)?
// body is ArrayBufferView
e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):e instanceof n||(
// none of the above
// coerce to string then buffer
e=Buffer.from(String(e)))),this[g]={body:e,disturbed:!1,error:null},this.size=i,this.timeout=s,e instanceof n&&e.on("error",(function(e){var r="AbortError"===e.name?e:new v("Invalid response body while trying to fetch ".concat(t.url,": ").concat(e.message),"system",e);t[g].error=r}))}
/**
 * Consume and convert an entire Body to a Buffer.
 *
 * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body
 *
 * @return  Promise
 */
function T(){var e=this;if(this[g].disturbed)return S.Promise.reject(new TypeError("body used already for: ".concat(this.url)));if(this[g].disturbed=!0,this[g].error)return S.Promise.reject(this[g].error);var t=this.body;// body is null
if(null===t)return S.Promise.resolve(Buffer.alloc(0));// body is blob
// body is buffer
if(O(t)&&(t=t.stream()),Buffer.isBuffer(t))return S.Promise.resolve(t);// istanbul ignore if: should never happen
if(!(t instanceof n))return S.Promise.resolve(Buffer.alloc(0));// body is stream
// get ready to actually consume the body
var r=[],o=0,i=!1;return new S.Promise((function(n,a){var s;// allow timeout on slow response body
e.timeout&&(s=setTimeout((function(){i=!0,a(new v("Response timeout while trying to fetch ".concat(e.url," (over ").concat(e.timeout,"ms)"),"body-timeout"))}),e.timeout)),// handle stream errors
t.on("error",(function(t){"AbortError"===t.name?(
// if the request was aborted, reject with this Error
i=!0,a(t)):
// other errors, such as incorrect content-encoding
a(new v("Invalid response body while trying to fetch ".concat(e.url,": ").concat(t.message),"system",t))})),t.on("data",(function(t){if(!i&&null!==t){if(e.size&&o+t.length>e.size)return i=!0,void a(new v("content size at ".concat(e.url," over limit: ").concat(e.size),"max-size"));o+=t.length,r.push(t)}})),t.on("end",(function(){if(!i){clearTimeout(s);try{n(Buffer.concat(r,o))}catch(t){
// handle streams that have accumulated too much data (issue #414)
a(new v("Could not create Buffer from response body for ".concat(e.url,": ").concat(t.message),"system",t))}}}))}))}
/**
 * Detect buffer encoding and convert to target encoding
 * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding
 *
 * @param   Buffer  buffer    Incoming buffer
 * @param   String  encoding  Target encoding
 * @return  String
 */
/**
 * Detect a URLSearchParams object
 * ref: https://github.com/bitinn/node-fetch/issues/296#issuecomment-307598143
 *
 * @param   Object  obj     Object to detect by type or brand
 * @return  String
 */
function j(e){
// Duck-typing as a necessary condition.
return"object"===typeof e&&"function"===typeof e.append&&"function"===typeof e.delete&&"function"===typeof e.get&&"function"===typeof e.getAll&&"function"===typeof e.has&&"function"===typeof e.set&&("URLSearchParams"===e.constructor.name||"[object URLSearchParams]"===Object.prototype.toString.call(e)||"function"===typeof e.sort);// Brand-checking and more duck-typing as optional condition.
}
/**
 * Check if `obj` is a W3C `Blob` object (which `File` inherits from)
 * @param  {*} obj
 * @return {boolean}
 */function O(e){return"object"===typeof e&&"function"===typeof e.arrayBuffer&&"string"===typeof e.type&&"function"===typeof e.stream&&"function"===typeof e.constructor&&"string"===typeof e.constructor.name&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}
/**
 * Clone body given Res/Req instance
 *
 * @param   Mixed  instance  Response or Request instance
 * @return  Mixed
 */function k(e){var t,r,o=e.body;// don't allow cloning a used body
if(e.bodyUsed)throw new Error("cannot clone body after it is used");// check that body is a stream and not form-data object
// note: we can't clone the form-data object without having it as a dependency
return o instanceof n&&"function"!==typeof o.getBoundary&&(
// tee instance body
t=new w,r=new w,o.pipe(t),o.pipe(r),// set instance body to teed body and return the other teed body
e[g].body=t,o=r),o}
/**
 * Performs the operation "extract a `Content-Type` value from |object|" as
 * specified in the specification:
 * https://fetch.spec.whatwg.org/#concept-bodyinit-extract
 *
 * This function assumes that instance.body is present.
 *
 * @param   Mixed  instance  Any options.body input
 */function E(e){return null===e?null:"string"===typeof e?"text/plain;charset=UTF-8":j(e)?"application/x-www-form-urlencoded;charset=UTF-8":O(e)?e.type||null:Buffer.isBuffer(e)||"[object ArrayBuffer]"===Object.prototype.toString.call(e)||ArrayBuffer.isView(e)?null:"function"===typeof e.getBoundary?"multipart/form-data;boundary=".concat(e.getBoundary()):e instanceof n?null:"text/plain;charset=UTF-8"}
/**
 * The Fetch Standard treats this as if "total bytes" is a property on the body.
 * For us, we have to explicitly get it with a function.
 *
 * ref: https://fetch.spec.whatwg.org/#concept-body-total-bytes
 *
 * @param   Body    instance   Instance of Body
 * @return  Number?            Number of bytes, or null if not possible
 */function P(e){var t=e.body;return null===t?0:O(t)?t.size:Buffer.isBuffer(t)?t.length:t&&"function"===typeof t.getLengthSync&&(t._lengthRetrievers&&0==t._lengthRetrievers.length||// 1.x
t.hasKnownLength&&t.hasKnownLength())?t.getLengthSync():null}
/**
 * Write a Body to a Node.js WritableStream (e.g. http.Request) object.
 *
 * @param   Body    instance   Instance of Body
 * @return  Void
 */S.prototype={get body(){return this[g].body},get bodyUsed(){return this[g].disturbed},
/**
   * Decode response as ArrayBuffer
   *
   * @return  Promise
   */
arrayBuffer:function(){return T.call(this).then((function(e){return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}))},
/**
   * Return raw response as Blob
   *
   * @return Promise
   */
blob:function(){var e=this.headers&&this.headers.get("content-type")||"";return T.call(this).then((function(t){return Object.assign(// Prevent copying
new m([],{type:e.toLowerCase()}),(o=t,(n=p)in(r={})?Object.defineProperty(r,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[n]=o,r));var r,n,o}))},
/**
   * Decode response as json
   *
   * @return  Promise
   */
json:function(){var e=this;return T.call(this).then((function(t){try{return JSON.parse(t.toString())}catch(r){return S.Promise.reject(new v("invalid json response body at ".concat(e.url," reason: ").concat(r.message),"invalid-json"))}}))},
/**
   * Decode response as text
   *
   * @return  Promise
   */
text:function(){return T.call(this).then((function(e){return e.toString()}))},
/**
   * Decode response as buffer (non-spec api)
   *
   * @return  Promise
   */
buffer:function(){return T.call(this)},
/**
   * Decode response as text, while automatically detecting the encoding and
   * trying to decode to UTF-8 (non-spec api)
   *
   * @return  Promise
   */
textConverted:function(){var e=this;return T.call(this).then((function(t){return function(e,t){if("function"!==typeof d)throw new Error("The package `encoding` must be installed to use the textConverted() function");var r,n,o=t.get("content-type"),i="utf-8";// header
o&&(r=/charset=([^;]*)/i.exec(o));// no charset in content type, peek at response body for at most 1024 bytes
// html5
n=e.slice(0,1024).toString(),!r&&n&&(r=/<meta.+?charset=(['"])(.+?)\1/i.exec(n));// html4
!r&&n&&((r=/<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(n))||(r=/<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(n))&&r.pop(),r&&(r=/charset=(.*)/i.exec(r.pop())));// xml
!r&&n&&(r=/<\?xml.+?encoding=(['"])(.+?)\1/i.exec(n));// found charset
r&&(// prevent decode issues when sites use incorrect encoding
// ref: https://hsivonen.fi/encoding-menu/
"gb2312"!==(i=r.pop())&&"gbk"!==i||(i="gb18030"));// turn raw buffers into a single utf-8 buffer
return d(e,"UTF-8",i).toString()}(t,e.headers)}))}},// In browsers, all properties are enumerable.
Object.defineProperties(S.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}}),S.mixIn=function(e){var t,r=u(Object.getOwnPropertyNames(S.prototype));try{for(r.s();!(t=r.n()).done;){var n=t.value;
// istanbul ignore else: future proof
if(!(n in e)){var o=Object.getOwnPropertyDescriptor(S.prototype,n);Object.defineProperty(e,n,o)}}}catch(i){r.e(i)}finally{r.f()}},// expose Promise
S.Promise=global.Promise;
/**
 * headers.js
 *
 * Headers class offers convenient helpers
 */
var B=/[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/,x=/[^\t\x20-\x7e\x80-\xff]/;function A(e){if(e="".concat(e),B.test(e)||""===e)throw new TypeError("".concat(e," is not a legal HTTP header name"))}function C(e){if(e="".concat(e),x.test(e))throw new TypeError("".concat(e," is not a legal HTTP header value"))}
/**
 * Find the key in the map object given a header name.
 *
 * Returns undefined if not found.
 *
 * @param   String  name  Header name
 * @return  String|Undefined
 */function L(e,t){for(var r in t=t.toLowerCase(),e)if(r.toLowerCase()===t)return r}var _=Symbol("map"),z=function(){
/**
   * Headers class
   *
   * @param   Object  headers  Response headers
   * @return  Void
   */
function e(){l(this,e);var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[_]=Object.create(null),t instanceof e)for(var r=t.raw(),n=Object.keys(r),o=0,i=n;o<i.length;o++){var a,s=i[o],c=u(r[s]);try{for(c.s();!(a=c.n()).done;){var f=a.value;this.append(s,f)}}catch(O){c.e(O)}finally{c.f()}}else// We don't worry about converting prop to ByteString here as append()
// will handle it.
if(null==t);else{if("object"!==typeof t)throw new TypeError("Provided initializer must be an object");var h=t[Symbol.iterator];if(null!=h){if("function"!==typeof h)throw new TypeError("Header pairs must be iterable");// sequence<sequence<ByteString>>
// Note: per spec we have to first exhaust the lists then process them
var d,y=[],p=u(t);try{for(p.s();!(d=p.n()).done;){var b=d.value;if("object"!==typeof b||"function"!==typeof b[Symbol.iterator])throw new TypeError("Each header pair must be iterable");y.push(Array.from(b))}}catch(O){p.e(O)}finally{p.f()}for(var m=0,v=y;m<v.length;m++){var g=v[m];if(2!==g.length)throw new TypeError("Each header pair must be a name/value tuple");this.append(g[0],g[1])}}else
// record<ByteString, ByteString>
for(var w=0,S=Object.keys(t);w<S.length;w++){var T=S[w],j=t[T];this.append(T,j)}}}
/**
   * Return combined header value given name
   *
   * @param   String  name  Header name
   * @return  Mixed
   */return h(e,[{key:"get",value:function(e){A(e="".concat(e));var t=L(this[_],e);return void 0===t?null:this[_][t].join(", ")}
/**
     * Iterate over all headers
     *
     * @param   Function  callback  Executed for each item with parameters (value, name, thisArg)
     * @param   Boolean   thisArg   `this` context for callback function
     * @return  Void
     */},{key:"forEach",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=U(this),n=0;n<r.length;){var o=r[n],i=o[0],a=o[1];e.call(t,a,i,this),r=U(this),n++}}
/**
     * Overwrite header values given name
     *
     * @param   String  name   Header name
     * @param   String  value  Header value
     * @return  Void
     */},{key:"set",value:function(e,t){e="".concat(e),t="".concat(t),A(e),C(t);var r=L(this[_],e);this[_][void 0!==r?r:e]=[t]}
/**
     * Append a value onto existing header
     *
     * @param   String  name   Header name
     * @param   String  value  Header value
     * @return  Void
     */},{key:"append",value:function(e,t){e="".concat(e),t="".concat(t),A(e),C(t);var r=L(this[_],e);void 0!==r?this[_][r].push(t):this[_][e]=[t]}
/**
     * Check for header name existence
     *
     * @param   String   name  Header name
     * @return  Boolean
     */},{key:"has",value:function(e){return A(e="".concat(e)),void 0!==L(this[_],e)}
/**
     * Delete all header values given name
     *
     * @param   String  name  Header name
     * @return  Void
     */},{key:"delete",value:function(e){A(e="".concat(e));var t=L(this[_],e);void 0!==t&&delete this[_][t]}
/**
     * Return raw headers (non-spec api)
     *
     * @return  Object
     */},{key:"raw",value:function(){return this[_]}
/**
     * Get an iterator on keys.
     *
     * @return  Iterator
     */},{key:"keys",value:function(){return H(this,"key")}
/**
     * Get an iterator on values.
     *
     * @return  Iterator
     */},{key:"values",value:function(){return H(this,"value")}
/**
     * Get an iterator on entries.
     *
     * This is the default iterator of the Headers object.
     *
     * @return  Iterator
     */},{key:Symbol.iterator,value:function(){return H(this,"key+value")}}]),e}();function U(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key+value",r=Object.keys(e[_]).sort();return r.map("key"===t?function(e){return e.toLowerCase()}:"value"===t?function(t){return e[_][t].join(", ")}:function(t){return[t.toLowerCase(),e[_][t].join(", ")]})}z.prototype.entries=z.prototype[Symbol.iterator],Object.defineProperty(z.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(z.prototype,{get:{enumerable:!0},forEach:{enumerable:!0},set:{enumerable:!0},append:{enumerable:!0},has:{enumerable:!0},delete:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0}});var R=Symbol("internal");function H(e,t){var r=Object.create(D);return r[R]={target:e,kind:t,index:0},r}var D=Object.setPrototypeOf({next:function(){
// istanbul ignore if
if(!this||Object.getPrototypeOf(this)!==D)throw new TypeError("Value of `this` is not a HeadersIterator");var e=this[R],t=e.target,r=e.kind,n=e.index,o=U(t,r);return n>=o.length?{value:void 0,done:!0}:(this[R].index=n+1,{value:o[n],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));
/**
 * Export the Headers object in a form that Node.js can consume.
 *
 * @param   Headers  headers
 * @return  Object
 */
function q(e){var t=Object.assign({__proto__:null},e[_]),r=L(e[_],"Host");// http.request() only supports string as Host header. This hack makes
// specifying custom Host header possible.
return void 0!==r&&(t[r]=t[r][0]),t}
/**
 * Create a Headers object from an object of headers, ignoring those that do
 * not conform to HTTP grammar productions.
 *
 * @param   Object  obj  Object of headers
 * @return  Headers
 */Object.defineProperty(D,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});var I=Symbol("Response internals"),F=o.STATUS_CODES,M=function(){function e(){l(this,e);var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};S.call(this,t,r);var n=r.status||200,o=new z(r.headers);if(null!=t&&!o.has("Content-Type")){var i=E(t);i&&o.append("Content-Type",i)}this[I]={url:r.url,status:n,statusText:r.statusText||F[n],headers:o,counter:r.counter}}return h(e,[{key:"url",get:function(){return this[I].url||""}},{key:"status",get:function(){return this[I].status}
/**
     * Convenience property representing if the request ended normally
     */},{key:"ok",get:function(){return this[I].status>=200&&this[I].status<300}},{key:"redirected",get:function(){return this[I].counter>0}},{key:"statusText",get:function(){return this[I].statusText}},{key:"headers",get:function(){return this[I].headers}
/**
     * Clone this response
     *
     * @return  Response
     */},{key:"clone",value:function(){return new e(k(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}]),e}();// fix an issue where "STATUS_CODES" aren't a named export for node <10
S.mixIn(M.prototype),Object.defineProperties(M.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(M.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});var N=Symbol("Request internals"),$=i.parse,G=i.format,V="destroy"in n.Readable.prototype;// fix an issue where "format", "parse" aren't a named export for node <10
/**
 * Check if a value is an instance of Request.
 *
 * @param   Mixed   input
 * @return  Boolean
 */
function K(e){return"object"===typeof e&&"object"===typeof e[N]}function Z(e){var t=e&&"object"===typeof e&&Object.getPrototypeOf(e);return!(!t||"AbortSignal"!==t.constructor.name)}
/**
 * Request class
 *
 * @param   Mixed   input  Url or Request instance
 * @param   Object  init   Custom options
 * @return  Void
 */var Y=function(){function e(t){l(this,e);var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};// normalize input
K(t)?r=$(t.url):(
// in order to support Node.js' Url objects; though WHATWG's URL objects
// will fall into this branch also (since their `toString()` will return
// `href` property anyway)
r=t&&t.href?$(t.href):$("".concat(t)),t={});var o=n.method||t.method||"GET";if(o=o.toUpperCase(),(null!=n.body||K(t)&&null!==t.body)&&("GET"===o||"HEAD"===o))throw new TypeError("Request with GET/HEAD method cannot have body");var i=null!=n.body?n.body:K(t)&&null!==t.body?k(t):null;S.call(this,i,{timeout:n.timeout||t.timeout||0,size:n.size||t.size||0});var a=new z(n.headers||t.headers||{});if(null!=i&&!a.has("Content-Type")){var s=E(i);s&&a.append("Content-Type",s)}var u=K(t)?t.signal:null;if("signal"in n&&(u=n.signal),null!=u&&!Z(u))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[N]={method:o,redirect:n.redirect||t.redirect||"follow",headers:a,parsedURL:r,signal:u},// node-fetch-only options
this.follow=void 0!==n.follow?n.follow:void 0!==t.follow?t.follow:20,this.compress=void 0!==n.compress?n.compress:void 0===t.compress||t.compress,this.counter=n.counter||t.counter||0,this.agent=n.agent||t.agent}return h(e,[{key:"method",get:function(){return this[N].method}},{key:"url",get:function(){return G(this[N].parsedURL)}},{key:"headers",get:function(){return this[N].headers}},{key:"redirect",get:function(){return this[N].redirect}},{key:"signal",get:function(){return this[N].signal}
/**
     * Clone this request
     *
     * @return  Request
     */},{key:"clone",value:function(){return new e(this)}}]),e}();
/**
 * abort-error.js
 *
 * AbortError interface for cancelled requests
 */
/**
 * Create AbortError instance
 *
 * @param   String      message      Error message for human
 * @return  AbortError
 */
function J(e){Error.call(this,e),this.type="aborted",this.message=e,// hide custom error implementation details from end-users
Error.captureStackTrace(this,this.constructor)}S.mixIn(Y.prototype),Object.defineProperty(Y.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(Y.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),J.prototype=Object.create(Error.prototype),J.prototype.constructor=J,J.prototype.name="AbortError";// fix an issue where "PassThrough", "resolve" aren't a named export for node <10
var W=n.PassThrough,Q=i.resolve;
/**
 * Fetch function
 *
 * @param   Mixed    url   Absolute url or Request instance
 * @param   Object   opts  Fetch options
 * @return  Promise
 */
function X(e,t){
// allow custom promise
if(!X.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");// wrap http.request into fetch
return S.Promise=X.Promise,new X.Promise((function(r,i){
// build request object
var c=new Y(e,t),l=
/**
 * Convert a Request to Node.js http request options.
 *
 * @param   Request  A Request instance
 * @return  Object   The options object to be passed to http.request
 */
function(e){var t=e[N].parsedURL,r=new z(e[N].headers);// Basic fetch
if(// fetch step 1.3
r.has("Accept")||r.set("Accept","*/*"),!t.protocol||!t.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(t.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(e.signal&&e.body instanceof n.Readable&&!V)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");// HTTP-network-or-cache fetch steps 2.4-2.7
var o=null;if(null==e.body&&/^(POST|PUT)$/i.test(e.method)&&(o="0"),null!=e.body){var i=P(e);"number"===typeof i&&(o=String(i))}o&&r.set("Content-Length",o),// HTTP-network-or-cache fetch step 2.11
r.has("User-Agent")||r.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),// HTTP-network-or-cache fetch step 2.15
e.compress&&!r.has("Accept-Encoding")&&r.set("Accept-Encoding","gzip,deflate");var a=e.agent;// HTTP-network fetch step 4.2
// chunked encoding is handled by Node.js
return"function"===typeof a&&(a=a(t)),r.has("Connection")||a||r.set("Connection","close"),Object.assign({},t,{method:e.method,headers:q(r),agent:a})}(c),f=("https:"===l.protocol?a:o).request,h=c.signal,d=null,y=function(){var e=new J("The user aborted a request.");i(e),c.body&&c.body instanceof n.Readable&&c.body.destroy(e),d&&d.body&&d.body.emit("error",e)};if(h&&h.aborted)y();else{var p,b=function(){y(),g()},m=f(l);// send request
h&&h.addEventListener("abort",b),c.timeout&&m.once("socket",(function(e){p=setTimeout((function(){i(new v("network timeout at: ".concat(c.url),"request-timeout")),g()}),c.timeout)})),m.on("error",(function(e){i(new v("request to ".concat(c.url," failed, reason: ").concat(e.message),"system",e)),g()})),m.on("response",(function(e){clearTimeout(p);var t=function(e){for(var t=new z,r=0,n=Object.keys(e);r<n.length;r++){var o=n[r];if(!B.test(o))if(Array.isArray(e[o])){var i,a=u(e[o]);try{for(a.s();!(i=a.n()).done;){var s=i.value;x.test(s)||(void 0===t[_][o]?t[_][o]=[s]:t[_][o].push(s))}}catch(c){a.e(c)}finally{a.f()}}else x.test(e[o])||(t[_][o]=[e[o]])}return t}(e.headers);// HTTP fetch step 5
if(X.isRedirect(e.statusCode)){
// HTTP fetch step 5.2
var n=t.get("Location"),o=null===n?null:Q(c.url,n);// HTTP fetch step 5.3
// HTTP fetch step 5.5
switch(c.redirect){case"error":return i(new v("uri requested responds with a redirect, redirect mode is set to error: ".concat(c.url),"no-redirect")),void g();case"manual":
// node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL.
if(null!==o)
// handle corrupted header
try{t.set("Location",o)}catch(w){
// istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request
i(w)}break;case"follow":
// HTTP-redirect fetch step 2
if(null===o)break;// HTTP-redirect fetch step 5
if(c.counter>=c.follow)return i(new v("maximum redirect reached at: ".concat(c.url),"max-redirect")),void g();// HTTP-redirect fetch step 6 (counter increment)
// Create a new Request object.
var a={headers:new z(c.headers),follow:c.follow,counter:c.counter+1,agent:c.agent,compress:c.compress,method:c.method,body:c.body,signal:c.signal,timeout:c.timeout,size:c.size};// HTTP-redirect fetch step 9
return 303!==e.statusCode&&c.body&&null===P(c)?(i(new v("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void g()):(// HTTP-redirect fetch step 11
303!==e.statusCode&&(301!==e.statusCode&&302!==e.statusCode||"POST"!==c.method)||(a.method="GET",a.body=void 0,a.headers.delete("content-length")),// HTTP-redirect fetch step 15
r(X(new Y(o,a))),void g())}}// prepare response
e.once("end",(function(){h&&h.removeEventListener("abort",b)}));var l=e.pipe(new W),f={url:c.url,status:e.statusCode,statusText:e.statusMessage,headers:t,size:c.size,timeout:c.timeout,counter:c.counter},y=t.get("Content-Encoding");// HTTP-network fetch step 12.1.1.4: handle content codings
// in following scenarios we ignore compression support
// 1. compression support is disabled
// 2. HEAD request
// 3. no Content-Encoding header
// 4. no content response (204)
// 5. content not modified response (304)
if(!c.compress||"HEAD"===c.method||null===y||204===e.statusCode||304===e.statusCode)return d=new M(l,f),void r(d);// For Node v6+
// Be less strict when decoding compressed responses, since sometimes
// servers send slightly invalid responses that are still accepted
// by common browsers.
// Always using Z_SYNC_FLUSH is what cURL does.
var m={flush:s.Z_SYNC_FLUSH,finishFlush:s.Z_SYNC_FLUSH};// for gzip
if("gzip"==y||"x-gzip"==y)return l=l.pipe(s.createGunzip(m)),d=new M(l,f),void r(d);// for deflate
if("deflate"!=y&&"x-deflate"!=y){// for br
if("br"==y&&"function"===typeof s.createBrotliDecompress)return l=l.pipe(s.createBrotliDecompress()),d=new M(l,f),void r(d);// otherwise, use response as-is
d=new M(l,f),r(d)}else{e.pipe(new W).once("data",(function(e){
// see http://stackoverflow.com/questions/37519828
l=8===(15&e[0])?l.pipe(s.createInflate()):l.pipe(s.createInflateRaw()),d=new M(l,f),r(d)}))}})),function(e,t){var r=t.body;null===r?
// body is null
e.end():O(r)?r.stream().pipe(e):Buffer.isBuffer(r)?(
// body is buffer
e.write(r),e.end()):
// body is stream
r.pipe(e)}(m,c)}function g(){m.abort(),h&&h.removeEventListener("abort",b),clearTimeout(p)}}))}
/**
 * Redirect code matching
 *
 * @param   Number   code  Status code
 * @return  Boolean
 */X.isRedirect=function(e){return 301===e||302===e||303===e||307===e||308===e},// expose Promise
X.Promise=global.Promise,
/* harmony default export */t.default=X}}]);
//# sourceMappingURL=7c2fe9ca71d2d4c839914525b72b580d6be96835-1fcf0d29.c4e8f950.chunk.js.map