UNPKG

@stencil/core

Version:

A Compiler for Web Components and Progressive Web Apps

1 lines • 309 kB
!function(p,d){for(var a in d)p[a]=d[a]}(exports,function(p){var d={};function a(e){if(d[e])return d[e].exports;var m=d[e]={i:e,l:!1,exports:{}};return p[e].call(m.exports,m,m.exports,a),m.l=!0,m.exports}return a.m=p,a.c=d,a.d=function(p,d,e){a.o(p,d)||Object.defineProperty(p,d,{enumerable:!0,get:e})},a.r=function(p){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(p,"__esModule",{value:!0})},a.t=function(p,d){if(1&d&&(p=a(p)),8&d)return p;if(4&d&&"object"==typeof p&&p&&p.__esModule)return p;var e=Object.create(null);if(a.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:p}),2&d&&"string"!=typeof p)for(var m in p)a.d(e,m,function(d){return p[d]}.bind(null,m));return e},a.n=function(p){var d=p&&p.__esModule?function(){return p.default}:function(){return p};return a.d(d,"a",d),d},a.o=function(p,d){return Object.prototype.hasOwnProperty.call(p,d)},a.p="",a(a.s=8)}([function(p,d){p.exports=require("stream")},function(p,d,a){"use strict";const e=a(6),m=a(14),l={ftp:21,file:null,gopher:70,http:80,https:443,ws:80,wss:443},i=Symbol("failure");function t(p){return e.ucs2.decode(p).length}function s(p,d){const a=p[d];return isNaN(a)?void 0:String.fromCodePoint(a)}function o(p){return p>=48&&p<=57}function r(p){return p>=65&&p<=90||p>=97&&p<=122}function v(p){return o(p)||p>=65&&p<=70||p>=97&&p<=102}function n(p){return"."===p||"%2e"===p.toLowerCase()}function u(p){return 2===p.length&&r(p.codePointAt(0))&&(":"===p[1]||"|"===p[1])}function w(p){return void 0!==l[p]}function h(p){return w(p.scheme)}function f(p){let d=p.toString(16).toUpperCase();return 1===d.length&&(d="0"+d),"%"+d}function c(p){return p<=31||p>126}const _=new Set([32,34,35,60,62,63,96,123,125]);function N(p){return c(p)||_.has(p)}const V=new Set([47,58,59,61,64,91,92,93,94,124]);function D(p){return N(p)||V.has(p)}function S(p,d){const a=String.fromCodePoint(p);return d(p)?function(p){const d=new Buffer(p);let a="";for(let p=0;p<d.length;++p)a+=f(d[p]);return a}(a):a}function b(p){let d=10;if(p.length>=2&&"0"===p.charAt(0)&&"x"===p.charAt(1).toLowerCase()?(p=p.substring(2),d=16):p.length>=2&&"0"===p.charAt(0)&&(p=p.substring(1),d=8),""===p)return 0;return(10===d?/[^0-9]/:16===d?/[^0-9A-Fa-f]/:/[^0-7]/).test(p)?i:parseInt(p,d)}function g(p,d){if("["===p[0])return"]"!==p[p.length-1]?i:function(p){const d=[0,0,0,0,0,0,0,0];let a=0,m=null,l=0;if(58===(p=e.ucs2.decode(p))[l]){if(58!==p[l+1])return i;l+=2,++a,m=a}for(;l<p.length;){if(8===a)return i;if(58===p[l]){if(null!==m)return i;++l,++a,m=a;continue}let e=0,t=0;for(;t<4&&v(p[l]);)e=16*e+parseInt(s(p,l),16),++l,++t;if(46===p[l]){if(0===t)return i;if(l-=t,a>6)return i;let e=0;for(;void 0!==p[l];){let m=null;if(e>0){if(!(46===p[l]&&e<4))return i;++l}if(!o(p[l]))return i;for(;o(p[l]);){const d=parseInt(s(p,l));if(null===m)m=d;else{if(0===m)return i;m=10*m+d}if(m>255)return i;++l}d[a]=256*d[a]+m,++e,2!==e&&4!==e||++a}if(4!==e)return i;break}if(58===p[l]){if(++l,void 0===p[l])return i}else if(void 0!==p[l])return i;d[a]=e,++a}if(null!==m){let p=a-m;for(a=7;0!==a&&p>0;){const e=d[m+p-1];d[m+p-1]=d[a],d[a]=e,--a,--p}}else if(null===m&&8!==a)return i;return d}(p.substring(1,p.length-1));if(!d)return function(p){if(d=p,-1!==d.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/))return i;var d;let a="";const m=e.ucs2.decode(p);for(let p=0;p<m.length;++p)a+=S(m[p],c);return a}(p);const a=function(p){const d=new Buffer(p),a=[];for(let p=0;p<d.length;++p)37!==d[p]?a.push(d[p]):37===d[p]&&v(d[p+1])&&v(d[p+2])?(a.push(parseInt(d.slice(p+1,p+3).toString(),16)),p+=2):a.push(d[p]);return new Buffer(a).toString()}(p),l=m.toASCII(a,!1,m.PROCESSING_OPTIONS.NONTRANSITIONAL,!1);if(null===l)return i;if(-1!==l.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/))return i;const t=function(p){const d=p.split(".");if(""===d[d.length-1]&&d.length>1&&d.pop(),d.length>4)return p;const a=[];for(const e of d){if(""===e)return p;const d=b(e);if(d===i)return p;a.push(d)}for(let p=0;p<a.length-1;++p)if(a[p]>255)return i;if(a[a.length-1]>=Math.pow(256,5-a.length))return i;let e=a.pop(),m=0;for(const p of a)e+=p*Math.pow(256,3-m),++m;return e}(l);return"number"==typeof t||t===i?t:l}function T(p){return"number"==typeof p?function(p){let d="",a=p;for(let p=1;p<=4;++p)d=String(a%256)+d,4!==p&&(d="."+d),a=Math.floor(a/256);return d}(p):p instanceof Array?"["+function(p){let d="";const a=function(p){let d=null,a=1,e=null,m=0;for(let l=0;l<p.length;++l)0!==p[l]?(m>a&&(d=e,a=m),e=null,m=0):(null===e&&(e=l),++m);return m>a&&(d=e,a=m),{idx:d,len:a}}(p).idx;let e=!1;for(let m=0;m<=7;++m)e&&0===p[m]||(e&&(e=!1),a!==m?(d+=p[m].toString(16),7!==m&&(d+=":")):(d+=0===m?"::":":",e=!0));return d}(p)+"]":p}function y(p){const d=p.path;var a;0!==d.length&&("file"===p.scheme&&1===d.length&&(a=d[0],/^[A-Za-z]:$/.test(a))||d.pop())}function A(p){return""!==p.username||""!==p.password}function E(p,d,a,m,l){if(this.pointer=0,this.input=p,this.base=d||null,this.encodingOverride=a||"utf-8",this.stateOverride=l,this.url=m,this.failure=!1,this.parseError=!1,!this.url){this.url={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null,cannotBeABaseURL:!1};const p=function(p){return p.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g,"")}(this.input);p!==this.input&&(this.parseError=!0),this.input=p}const t=function(p){return p.replace(/\u0009|\u000A|\u000D/g,"")}(this.input);for(t!==this.input&&(this.parseError=!0),this.input=t,this.state=l||"scheme start",this.buffer="",this.atFlag=!1,this.arrFlag=!1,this.passwordTokenSeenFlag=!1,this.input=e.ucs2.decode(this.input);this.pointer<=this.input.length;++this.pointer){const p=this.input[this.pointer],d=isNaN(p)?void 0:String.fromCodePoint(p),a=this["parse "+this.state](p,d);if(!a)break;if(a===i){this.failure=!0;break}}}E.prototype["parse scheme start"]=function(p,d){if(r(p))this.buffer+=d.toLowerCase(),this.state="scheme";else{if(this.stateOverride)return this.parseError=!0,i;this.state="no scheme",--this.pointer}return!0},E.prototype["parse scheme"]=function(p,d){if(function(p){return r(p)||o(p)}(p)||43===p||45===p||46===p)this.buffer+=d.toLowerCase();else if(58===p){if(this.stateOverride){if(h(this.url)&&!w(this.buffer))return!1;if(!h(this.url)&&w(this.buffer))return!1;if((A(this.url)||null!==this.url.port)&&"file"===this.buffer)return!1;if("file"===this.url.scheme&&(""===this.url.host||null===this.url.host))return!1}if(this.url.scheme=this.buffer,this.buffer="",this.stateOverride)return!1;"file"===this.url.scheme?(47===this.input[this.pointer+1]&&47===this.input[this.pointer+2]||(this.parseError=!0),this.state="file"):h(this.url)&&null!==this.base&&this.base.scheme===this.url.scheme?this.state="special relative or authority":h(this.url)?this.state="special authority slashes":47===this.input[this.pointer+1]?(this.state="path or authority",++this.pointer):(this.url.cannotBeABaseURL=!0,this.url.path.push(""),this.state="cannot-be-a-base-URL path")}else{if(this.stateOverride)return this.parseError=!0,i;this.buffer="",this.state="no scheme",this.pointer=-1}return!0},E.prototype["parse no scheme"]=function(p){return null===this.base||this.base.cannotBeABaseURL&&35!==p?i:(this.base.cannotBeABaseURL&&35===p?(this.url.scheme=this.base.scheme,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.url.cannotBeABaseURL=!0,this.state="fragment"):"file"===this.base.scheme?(this.state="file",--this.pointer):(this.state="relative",--this.pointer),!0)},E.prototype["parse special relative or authority"]=function(p){return 47===p&&47===this.input[this.pointer+1]?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="relative",--this.pointer),!0},E.prototype["parse path or authority"]=function(p){return 47===p?this.state="authority":(this.state="path",--this.pointer),!0},E.prototype["parse relative"]=function(p){return this.url.scheme=this.base.scheme,isNaN(p)?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query):47===p?this.state="relative slash":63===p?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):35===p?(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):h(this.url)&&92===p?(this.parseError=!0,this.state="relative slash"):(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(0,this.base.path.length-1),this.state="path",--this.pointer),!0},E.prototype["parse relative slash"]=function(p){return!h(this.url)||47!==p&&92!==p?47===p?this.state="authority":(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.state="path",--this.pointer):(92===p&&(this.parseError=!0),this.state="special authority ignore slashes"),!0},E.prototype["parse special authority slashes"]=function(p){return 47===p&&47===this.input[this.pointer+1]?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="special authority ignore slashes",--this.pointer),!0},E.prototype["parse special authority ignore slashes"]=function(p){return 47!==p&&92!==p?(this.state="authority",--this.pointer):this.parseError=!0,!0},E.prototype["parse authority"]=function(p,d){if(64===p){this.parseError=!0,this.atFlag&&(this.buffer="%40"+this.buffer),this.atFlag=!0;const p=t(this.buffer);for(let d=0;d<p;++d){const p=this.buffer.codePointAt(d);if(58===p&&!this.passwordTokenSeenFlag){this.passwordTokenSeenFlag=!0;continue}const a=S(p,D);this.passwordTokenSeenFlag?this.url.password+=a:this.url.username+=a}this.buffer=""}else if(isNaN(p)||47===p||63===p||35===p||h(this.url)&&92===p){if(this.atFlag&&""===this.buffer)return this.parseError=!0,i;this.pointer-=t(this.buffer)+1,this.buffer="",this.state="host"}else this.buffer+=d;return!0},E.prototype["parse hostname"]=E.prototype["parse host"]=function(p,d){if(this.stateOverride&&"file"===this.url.scheme)--this.pointer,this.state="file host";else if(58!==p||this.arrFlag)if(isNaN(p)||47===p||63===p||35===p||h(this.url)&&92===p){if(--this.pointer,h(this.url)&&""===this.buffer)return this.parseError=!0,i;if(this.stateOverride&&""===this.buffer&&(A(this.url)||null!==this.url.port))return this.parseError=!0,!1;const p=g(this.buffer,h(this.url));if(p===i)return i;if(this.url.host=p,this.buffer="",this.state="path start",this.stateOverride)return!1}else 91===p?this.arrFlag=!0:93===p&&(this.arrFlag=!1),this.buffer+=d;else{if(""===this.buffer)return this.parseError=!0,i;const p=g(this.buffer,h(this.url));if(p===i)return i;if(this.url.host=p,this.buffer="",this.state="port","hostname"===this.stateOverride)return!1}return!0},E.prototype["parse port"]=function(p,d){if(o(p))this.buffer+=d;else{if(!(isNaN(p)||47===p||63===p||35===p||h(this.url)&&92===p||this.stateOverride))return this.parseError=!0,i;if(""!==this.buffer){const p=parseInt(this.buffer);if(p>Math.pow(2,16)-1)return this.parseError=!0,i;this.url.port=p===(a=this.url.scheme,l[a])?null:p,this.buffer=""}if(this.stateOverride)return!1;this.state="path start",--this.pointer}var a;return!0};const B=new Set([47,92,63,35]);E.prototype["parse file"]=function(p){var d,a;return this.url.scheme="file",47===p||92===p?(92===p&&(this.parseError=!0),this.state="file slash"):null!==this.base&&"file"===this.base.scheme?isNaN(p)?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query):63===p?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query="",this.state="query"):35===p?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):(this.input.length-this.pointer-1==0||(d=p,a=this.input[this.pointer+1],!r(d)||58!==a&&124!==a)||this.input.length-this.pointer-1>=2&&!B.has(this.input[this.pointer+2])?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),y(this.url)):this.parseError=!0,this.state="path",--this.pointer):(this.state="path",--this.pointer),!0},E.prototype["parse file slash"]=function(p){var d;return 47===p||92===p?(92===p&&(this.parseError=!0),this.state="file host"):(null!==this.base&&"file"===this.base.scheme&&(2===(d=this.base.path[0]).length&&r(d.codePointAt(0))&&":"===d[1]?this.url.path.push(this.base.path[0]):this.url.host=this.base.host),this.state="path",--this.pointer),!0},E.prototype["parse file host"]=function(p,d){if(isNaN(p)||47===p||92===p||63===p||35===p)if(--this.pointer,!this.stateOverride&&u(this.buffer))this.parseError=!0,this.state="path";else if(""===this.buffer){if(this.url.host="",this.stateOverride)return!1;this.state="path start"}else{let p=g(this.buffer,h(this.url));if(p===i)return i;if("localhost"===p&&(p=""),this.url.host=p,this.stateOverride)return!1;this.buffer="",this.state="path start"}else this.buffer+=d;return!0},E.prototype["parse path start"]=function(p){return h(this.url)?(92===p&&(this.parseError=!0),this.state="path",47!==p&&92!==p&&--this.pointer):this.stateOverride||63!==p?this.stateOverride||35!==p?void 0!==p&&(this.state="path",47!==p&&--this.pointer):(this.url.fragment="",this.state="fragment"):(this.url.query="",this.state="query"),!0},E.prototype["parse path"]=function(p){if(isNaN(p)||47===p||h(this.url)&&92===p||!this.stateOverride&&(63===p||35===p)){if(h(this.url)&&92===p&&(this.parseError=!0),".."===(d=(d=this.buffer).toLowerCase())||"%2e."===d||".%2e"===d||"%2e%2e"===d?(y(this.url),47===p||h(this.url)&&92===p||this.url.path.push("")):!n(this.buffer)||47===p||h(this.url)&&92===p?n(this.buffer)||("file"===this.url.scheme&&0===this.url.path.length&&u(this.buffer)&&(""!==this.url.host&&null!==this.url.host&&(this.parseError=!0,this.url.host=""),this.buffer=this.buffer[0]+":"),this.url.path.push(this.buffer)):this.url.path.push(""),this.buffer="","file"===this.url.scheme&&(void 0===p||63===p||35===p))for(;this.url.path.length>1&&""===this.url.path[0];)this.parseError=!0,this.url.path.shift();63===p&&(this.url.query="",this.state="query"),35===p&&(this.url.fragment="",this.state="fragment")}else 37!==p||v(this.input[this.pointer+1])&&v(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=S(p,N);var d;return!0},E.prototype["parse cannot-be-a-base-URL path"]=function(p){return 63===p?(this.url.query="",this.state="query"):35===p?(this.url.fragment="",this.state="fragment"):(isNaN(p)||37===p||(this.parseError=!0),37!==p||v(this.input[this.pointer+1])&&v(this.input[this.pointer+2])||(this.parseError=!0),isNaN(p)||(this.url.path[0]=this.url.path[0]+S(p,c))),!0},E.prototype["parse query"]=function(p,d){if(isNaN(p)||!this.stateOverride&&35===p){h(this.url)&&"ws"!==this.url.scheme&&"wss"!==this.url.scheme||(this.encodingOverride="utf-8");const d=new Buffer(this.buffer);for(let p=0;p<d.length;++p)d[p]<33||d[p]>126||34===d[p]||35===d[p]||60===d[p]||62===d[p]?this.url.query+=f(d[p]):this.url.query+=String.fromCodePoint(d[p]);this.buffer="",35===p&&(this.url.fragment="",this.state="fragment")}else 37!==p||v(this.input[this.pointer+1])&&v(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=d;return!0},E.prototype["parse fragment"]=function(p){return isNaN(p)||(0===p?this.parseError=!0:(37!==p||v(this.input[this.pointer+1])&&v(this.input[this.pointer+2])||(this.parseError=!0),this.url.fragment+=S(p,c))),!0},p.exports.serializeURL=function(p,d){let a=p.scheme+":";if(null!==p.host?(a+="//",""===p.username&&""===p.password||(a+=p.username,""!==p.password&&(a+=":"+p.password),a+="@"),a+=T(p.host),null!==p.port&&(a+=":"+p.port)):null===p.host&&"file"===p.scheme&&(a+="//"),p.cannotBeABaseURL)a+=p.path[0];else for(const d of p.path)a+="/"+d;return null!==p.query&&(a+="?"+p.query),d||null===p.fragment||(a+="#"+p.fragment),a},p.exports.serializeURLOrigin=function(d){switch(d.scheme){case"blob":try{return p.exports.serializeURLOrigin(p.exports.parseURL(d.path[0]))}catch(p){return"null"}case"ftp":case"gopher":case"http":case"https":case"ws":case"wss":return function(p){let d=p.scheme+"://";return d+=T(p.host),null!==p.port&&(d+=":"+p.port),d}({scheme:d.scheme,host:d.host,port:d.port});case"file":return"file://";default:return"null"}},p.exports.basicURLParse=function(p,d){void 0===d&&(d={});const a=new E(p,d.baseURL,d.encodingOverride,d.url,d.stateOverride);return a.failure?"failure":a.url},p.exports.setTheUsername=function(p,d){p.username="";const a=e.ucs2.decode(d);for(let d=0;d<a.length;++d)p.username+=S(a[d],D)},p.exports.setThePassword=function(p,d){p.password="";const a=e.ucs2.decode(d);for(let d=0;d<a.length;++d)p.password+=S(a[d],D)},p.exports.serializeHost=T,p.exports.cannotHaveAUsernamePasswordPort=function(p){return null===p.host||""===p.host||p.cannotBeABaseURL||"file"===p.scheme},p.exports.serializeInteger=function(p){return String(p)},p.exports.parseURL=function(d,a){return void 0===a&&(a={}),p.exports.basicURLParse(d,{baseURL:a.baseURL,encodingOverride:a.encodingOverride})}},function(p,d){p.exports=require("zlib")},function(p,d){p.exports=require("url")},function(p,d){p.exports=require("http")},function(p,d,a){"use strict";d.URL=a(10).interface,d.serializeURL=a(1).serializeURL,d.serializeURLOrigin=a(1).serializeURLOrigin,d.basicURLParse=a(1).basicURLParse,d.setTheUsername=a(1).setTheUsername,d.setThePassword=a(1).setThePassword,d.serializeHost=a(1).serializeHost,d.serializeInteger=a(1).serializeInteger,d.parseURL=a(1).parseURL},function(p,d){p.exports=require("punycode")},function(p,d){p.exports=require("https")},function(p,d,a){const e=a(9);d.fetch=e.default,d.Headers=e.Headers,d.Request=e.Request,d.Response=e.Response,d.FetchError=e.FetchError},function(p,d,a){"use strict";a.r(d),a.d(d,"Headers",(function(){return C})),a.d(d,"Request",(function(){return G})),a.d(d,"Response",(function(){return j})),a.d(d,"FetchError",(function(){return u}));var e=a(0),m=a(4),l=a(3),i=a(5),t=a(7),s=a(2);const o=e.Readable,r=Symbol("buffer"),v=Symbol("type");class n{constructor(){this[v]="";const p=arguments[0],d=arguments[1],a=[];let e=0;if(p){const d=p,m=Number(d.length);for(let p=0;p<m;p++){const m=d[p];let l;l=m instanceof Buffer?m:ArrayBuffer.isView(m)?Buffer.from(m.buffer,m.byteOffset,m.byteLength):m instanceof ArrayBuffer?Buffer.from(m):m instanceof n?m[r]:Buffer.from("string"==typeof m?m:String(m)),e+=l.length,a.push(l)}}this[r]=Buffer.concat(a);let m=d&&void 0!==d.type&&String(d.type).toLowerCase();m&&!/[^\u0020-\u007E]/.test(m)&&(this[v]=m)}get size(){return this[r].length}get type(){return this[v]}text(){return Promise.resolve(this[r].toString())}arrayBuffer(){const p=this[r],d=p.buffer.slice(p.byteOffset,p.byteOffset+p.byteLength);return Promise.resolve(d)}stream(){const p=new o;return p._read=function(){},p.push(this[r]),p.push(null),p}toString(){return"[object Blob]"}slice(){const p=this.size,d=arguments[0],a=arguments[1];let e,m;e=void 0===d?0:d<0?Math.max(p+d,0):Math.min(d,p),m=void 0===a?p:a<0?Math.max(p+a,0):Math.min(a,p);const l=Math.max(m-e,0),i=this[r].slice(e,e+l),t=new n([],{type:arguments[2]});return t[r]=i,t}}function u(p,d,a){Error.call(this,p),this.message=p,this.type=d,a&&(this.code=this.errno=a.code),Error.captureStackTrace(this,this.constructor)}let w;Object.defineProperties(n.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}}),Object.defineProperty(n.prototype,Symbol.toStringTag,{value:"Blob",writable:!1,enumerable:!1,configurable:!0}),u.prototype=Object.create(Error.prototype),u.prototype.constructor=u,u.prototype.name="FetchError";try{w=require("encoding").convert}catch(p){}const h=Symbol("Body internals"),f=e.PassThrough;function c(p){var d=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},m=a.size;let l=void 0===m?0:m;var i=a.timeout;let t=void 0===i?0:i;null==p?p=null:N(p)?p=Buffer.from(p.toString()):V(p)||Buffer.isBuffer(p)||("[object ArrayBuffer]"===Object.prototype.toString.call(p)?p=Buffer.from(p):ArrayBuffer.isView(p)?p=Buffer.from(p.buffer,p.byteOffset,p.byteLength):p instanceof e||(p=Buffer.from(String(p)))),this[h]={body:p,disturbed:!1,error:null},this.size=l,this.timeout=t,p instanceof e&&p.on("error",(function(p){const a="AbortError"===p.name?p:new u(`Invalid response body while trying to fetch ${d.url}: ${p.message}`,"system",p);d[h].error=a}))}function _(){var p=this;if(this[h].disturbed)return c.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[h].disturbed=!0,this[h].error)return c.Promise.reject(this[h].error);let d=this.body;if(null===d)return c.Promise.resolve(Buffer.alloc(0));if(V(d)&&(d=d.stream()),Buffer.isBuffer(d))return c.Promise.resolve(d);if(!(d instanceof e))return c.Promise.resolve(Buffer.alloc(0));let a=[],m=0,l=!1;return new c.Promise((function(e,i){let t;p.timeout&&(t=setTimeout((function(){l=!0,i(new u(`Response timeout while trying to fetch ${p.url} (over ${p.timeout}ms)`,"body-timeout"))}),p.timeout)),d.on("error",(function(d){"AbortError"===d.name?(l=!0,i(d)):i(new u(`Invalid response body while trying to fetch ${p.url}: ${d.message}`,"system",d))})),d.on("data",(function(d){if(!l&&null!==d){if(p.size&&m+d.length>p.size)return l=!0,void i(new u(`content size at ${p.url} over limit: ${p.size}`,"max-size"));m+=d.length,a.push(d)}})),d.on("end",(function(){if(!l){clearTimeout(t);try{e(Buffer.concat(a,m))}catch(d){i(new u(`Could not create Buffer from response body for ${p.url}: ${d.message}`,"system",d))}}}))}))}function N(p){return"object"==typeof p&&"function"==typeof p.append&&"function"==typeof p.delete&&"function"==typeof p.get&&"function"==typeof p.getAll&&"function"==typeof p.has&&"function"==typeof p.set&&("URLSearchParams"===p.constructor.name||"[object URLSearchParams]"===Object.prototype.toString.call(p)||"function"==typeof p.sort)}function V(p){return"object"==typeof p&&"function"==typeof p.arrayBuffer&&"string"==typeof p.type&&"function"==typeof p.stream&&"function"==typeof p.constructor&&"string"==typeof p.constructor.name&&/^(Blob|File)$/.test(p.constructor.name)&&/^(Blob|File)$/.test(p[Symbol.toStringTag])}function D(p){let d,a,m=p.body;if(p.bodyUsed)throw new Error("cannot clone body after it is used");return m instanceof e&&"function"!=typeof m.getBoundary&&(d=new f,a=new f,m.pipe(d),m.pipe(a),p[h].body=d,m=a),m}function S(p){return null===p?null:"string"==typeof p?"text/plain;charset=UTF-8":N(p)?"application/x-www-form-urlencoded;charset=UTF-8":V(p)?p.type||null:Buffer.isBuffer(p)||"[object ArrayBuffer]"===Object.prototype.toString.call(p)||ArrayBuffer.isView(p)?null:"function"==typeof p.getBoundary?`multipart/form-data;boundary=${p.getBoundary()}`:p instanceof e?null:"text/plain;charset=UTF-8"}function b(p){const d=p.body;return null===d?0:V(d)?d.size:Buffer.isBuffer(d)?d.length:d&&"function"==typeof d.getLengthSync&&(d._lengthRetrievers&&0==d._lengthRetrievers.length||d.hasKnownLength&&d.hasKnownLength())?d.getLengthSync():null}c.prototype={get body(){return this[h].body},get bodyUsed(){return this[h].disturbed},arrayBuffer(){return _.call(this).then((function(p){return p.buffer.slice(p.byteOffset,p.byteOffset+p.byteLength)}))},blob(){let p=this.headers&&this.headers.get("content-type")||"";return _.call(this).then((function(d){return Object.assign(new n([],{type:p.toLowerCase()}),{[r]:d})}))},json(){var p=this;return _.call(this).then((function(d){try{return JSON.parse(d.toString())}catch(d){return c.Promise.reject(new u(`invalid json response body at ${p.url} reason: ${d.message}`,"invalid-json"))}}))},text(){return _.call(this).then((function(p){return p.toString()}))},buffer(){return _.call(this)},textConverted(){var p=this;return _.call(this).then((function(d){return function(p,d){if("function"!=typeof w)throw new Error("The package `encoding` must be installed to use the textConverted() function");const a=d.get("content-type");let e,m,l="utf-8";a&&(e=/charset=([^;]*)/i.exec(a));m=p.slice(0,1024).toString(),!e&&m&&(e=/<meta.+?charset=(['"])(.+?)\1/i.exec(m));!e&&m&&(e=/<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(m),e||(e=/<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(m),e&&e.pop()),e&&(e=/charset=(.*)/i.exec(e.pop())));!e&&m&&(e=/<\?xml.+?encoding=(['"])(.+?)\1/i.exec(m));e&&(l=e.pop(),"gb2312"!==l&&"gbk"!==l||(l="gb18030"));return w(p,"UTF-8",l).toString()}(d,p.headers)}))}},Object.defineProperties(c.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}}),c.mixIn=function(p){for(const d of Object.getOwnPropertyNames(c.prototype))if(!(d in p)){const a=Object.getOwnPropertyDescriptor(c.prototype,d);Object.defineProperty(p,d,a)}},c.Promise=global.Promise;const g=/[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/,T=/[^\t\x20-\x7e\x80-\xff]/;function y(p){if(p=`${p}`,g.test(p)||""===p)throw new TypeError(`${p} is not a legal HTTP header name`)}function A(p){if(p=`${p}`,T.test(p))throw new TypeError(`${p} is not a legal HTTP header value`)}function E(p,d){d=d.toLowerCase();for(const a in p)if(a.toLowerCase()===d)return a}const B=Symbol("map");class C{constructor(){let p=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[B]=Object.create(null),p instanceof C){const d=p.raw(),a=Object.keys(d);for(const p of a)for(const a of d[p])this.append(p,a)}else if(null==p);else{if("object"!=typeof p)throw new TypeError("Provided initializer must be an object");{const d=p[Symbol.iterator];if(null!=d){if("function"!=typeof d)throw new TypeError("Header pairs must be iterable");const a=[];for(const d of p){if("object"!=typeof d||"function"!=typeof d[Symbol.iterator])throw new TypeError("Each header pair must be iterable");a.push(Array.from(d))}for(const p of a){if(2!==p.length)throw new TypeError("Each header pair must be a name/value tuple");this.append(p[0],p[1])}}else for(const d of Object.keys(p)){const a=p[d];this.append(d,a)}}}}get(p){y(p=`${p}`);const d=E(this[B],p);return void 0===d?null:this[B][d].join(", ")}forEach(p){let d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,a=F(this),e=0;for(;e<a.length;){var m=a[e];const l=m[0],i=m[1];p.call(d,i,l,this),a=F(this),e++}}set(p,d){d=`${d}`,y(p=`${p}`),A(d);const a=E(this[B],p);this[B][void 0!==a?a:p]=[d]}append(p,d){d=`${d}`,y(p=`${p}`),A(d);const a=E(this[B],p);void 0!==a?this[B][a].push(d):this[B][p]=[d]}has(p){return y(p=`${p}`),void 0!==E(this[B],p)}delete(p){y(p=`${p}`);const d=E(this[B],p);void 0!==d&&delete this[B][d]}raw(){return this[B]}keys(){return P(this,"key")}values(){return P(this,"value")}[Symbol.iterator](){return P(this,"key+value")}}function F(p){let d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key+value";const a=Object.keys(p[B]).sort();return a.map("key"===d?function(p){return p.toLowerCase()}:"value"===d?function(d){return p[B][d].join(", ")}:function(d){return[d.toLowerCase(),p[B][d].join(", ")]})}C.prototype.entries=C.prototype[Symbol.iterator],Object.defineProperty(C.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(C.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}});const O=Symbol("internal");function P(p,d){const a=Object.create(L);return a[O]={target:p,kind:d,index:0},a}const L=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==L)throw new TypeError("Value of `this` is not a HeadersIterator");var p=this[O];const d=p.target,a=p.kind,e=p.index,m=F(d,a);return e>=m.length?{value:void 0,done:!0}:(this[O].index=e+1,{value:m[e],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function U(p){const d=Object.assign({__proto__:null},p[B]),a=E(p[B],"Host");return void 0!==a&&(d[a]=d[a][0]),d}Object.defineProperty(L,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const R=Symbol("Response internals"),x=m.STATUS_CODES;class j{constructor(){let p=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c.call(this,p,d);const a=d.status||200,e=new C(d.headers);if(null!=p&&!e.has("Content-Type")){const d=S(p);d&&e.append("Content-Type",d)}this[R]={url:d.url,status:a,statusText:d.statusText||x[a],headers:e,counter:d.counter}}get url(){return this[R].url||""}get status(){return this[R].status}get ok(){return this[R].status>=200&&this[R].status<300}get redirected(){return this[R].counter>0}get statusText(){return this[R].statusText}get headers(){return this[R].headers}clone(){return new j(D(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}c.mixIn(j.prototype),Object.defineProperties(j.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(j.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const q=Symbol("Request internals"),z=l.URL||i.URL,I=l.parse,k=l.format;function $(p){return/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(p)&&(p=new z(p).toString()),I(p)}const M="destroy"in e.Readable.prototype;function H(p){return"object"==typeof p&&"object"==typeof p[q]}class G{constructor(p){let d,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};H(p)?d=$(p.url):(d=p&&p.href?$(p.href):$(`${p}`),p={});let e=a.method||p.method||"GET";if(e=e.toUpperCase(),(null!=a.body||H(p)&&null!==p.body)&&("GET"===e||"HEAD"===e))throw new TypeError("Request with GET/HEAD method cannot have body");let m=null!=a.body?a.body:H(p)&&null!==p.body?D(p):null;c.call(this,m,{timeout:a.timeout||p.timeout||0,size:a.size||p.size||0});const l=new C(a.headers||p.headers||{});if(null!=m&&!l.has("Content-Type")){const p=S(m);p&&l.append("Content-Type",p)}let i=H(p)?p.signal:null;if("signal"in a&&(i=a.signal),null!=i&&!function(p){const d=p&&"object"==typeof p&&Object.getPrototypeOf(p);return!(!d||"AbortSignal"!==d.constructor.name)}(i))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[q]={method:e,redirect:a.redirect||p.redirect||"follow",headers:l,parsedURL:d,signal:i},this.follow=void 0!==a.follow?a.follow:void 0!==p.follow?p.follow:20,this.compress=void 0!==a.compress?a.compress:void 0===p.compress||p.compress,this.counter=a.counter||p.counter||0,this.agent=a.agent||p.agent}get method(){return this[q].method}get url(){return k(this[q].parsedURL)}get headers(){return this[q].headers}get redirect(){return this[q].redirect}get signal(){return this[q].signal}clone(){return new G(this)}}function Z(p){Error.call(this,p),this.type="aborted",this.message=p,Error.captureStackTrace(this,this.constructor)}c.mixIn(G.prototype),Object.defineProperty(G.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(G.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),Z.prototype=Object.create(Error.prototype),Z.prototype.constructor=Z,Z.prototype.name="AbortError";const J=l.URL||i.URL,W=e.PassThrough;function K(p,d){if(!K.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return c.Promise=K.Promise,new K.Promise((function(a,l){const i=new G(p,d),o=function(p){const d=p[q].parsedURL,a=new C(p[q].headers);if(a.has("Accept")||a.set("Accept","*/*"),!d.protocol||!d.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(d.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(p.signal&&p.body instanceof e.Readable&&!M)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let m=null;if(null==p.body&&/^(POST|PUT)$/i.test(p.method)&&(m="0"),null!=p.body){const d=b(p);"number"==typeof d&&(m=String(d))}m&&a.set("Content-Length",m),a.has("User-Agent")||a.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),p.compress&&!a.has("Accept-Encoding")&&a.set("Accept-Encoding","gzip,deflate");let l=p.agent;return"function"==typeof l&&(l=l(d)),a.has("Connection")||l||a.set("Connection","close"),Object.assign({},d,{method:p.method,headers:U(a),agent:l})}(i),r=("https:"===o.protocol?t:m).request,v=i.signal;let n=null;const w=function(){let p=new Z("The user aborted a request.");l(p),i.body&&i.body instanceof e.Readable&&i.body.destroy(p),n&&n.body&&n.body.emit("error",p)};if(v&&v.aborted)return void w();const h=function(){w(),_()},f=r(o);let c;function _(){f.abort(),v&&v.removeEventListener("abort",h),clearTimeout(c)}v&&v.addEventListener("abort",h),i.timeout&&f.once("socket",(function(p){c=setTimeout((function(){l(new u(`network timeout at: ${i.url}`,"request-timeout")),_()}),i.timeout)})),f.on("error",(function(p){l(new u(`request to ${i.url} failed, reason: ${p.message}`,"system",p)),_()})),f.on("response",(function(p){clearTimeout(c);const d=function(p){const d=new C;for(const a of Object.keys(p))if(!g.test(a))if(Array.isArray(p[a]))for(const e of p[a])T.test(e)||(void 0===d[B][a]?d[B][a]=[e]:d[B][a].push(e));else T.test(p[a])||(d[B][a]=[p[a]]);return d}(p.headers);if(K.isRedirect(p.statusCode)){const e=d.get("Location");let m=null;try{m=null===e?null:new J(e,i.url).toString()}catch(p){if("manual"!==i.redirect)return l(new u(`uri requested responds with an invalid redirect URL: ${e}`,"invalid-redirect")),void _()}switch(i.redirect){case"error":return l(new u(`uri requested responds with a redirect, redirect mode is set to error: ${i.url}`,"no-redirect")),void _();case"manual":if(null!==m)try{d.set("Location",m)}catch(p){l(p)}break;case"follow":if(null===m)break;if(i.counter>=i.follow)return l(new u(`maximum redirect reached at: ${i.url}`,"max-redirect")),void _();const e={headers:new C(i.headers),follow:i.follow,counter:i.counter+1,agent:i.agent,compress:i.compress,method:i.method,body:i.body,signal:i.signal,timeout:i.timeout,size:i.size};if(!function(p,d){const a=new J(d).hostname,e=new J(p).hostname;return a===e||"."===a[a.length-e.length-1]&&a.endsWith(e)}(i.url,m))for(const p of["authorization","www-authenticate","cookie","cookie2"])e.headers.delete(p);return 303!==p.statusCode&&i.body&&null===b(i)?(l(new u("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void _()):(303!==p.statusCode&&(301!==p.statusCode&&302!==p.statusCode||"POST"!==i.method)||(e.method="GET",e.body=void 0,e.headers.delete("content-length")),a(K(new G(m,e))),void _())}}p.once("end",(function(){v&&v.removeEventListener("abort",h)}));let e=p.pipe(new W);const m={url:i.url,status:p.statusCode,statusText:p.statusMessage,headers:d,size:i.size,timeout:i.timeout,counter:i.counter},t=d.get("Content-Encoding");if(!i.compress||"HEAD"===i.method||null===t||204===p.statusCode||304===p.statusCode)return n=new j(e,m),void a(n);const o={flush:s.Z_SYNC_FLUSH,finishFlush:s.Z_SYNC_FLUSH};if("gzip"==t||"x-gzip"==t)return e=e.pipe(s.createGunzip(o)),n=new j(e,m),void a(n);if("deflate"!=t&&"x-deflate"!=t){if("br"==t&&"function"==typeof s.createBrotliDecompress)return e=e.pipe(s.createBrotliDecompress()),n=new j(e,m),void a(n);n=new j(e,m),a(n)}else{p.pipe(new W).once("data",(function(p){e=8==(15&p[0])?e.pipe(s.createInflate()):e.pipe(s.createInflateRaw()),n=new j(e,m),a(n)}))}})),function(p,d){const a=d.body;null===a?p.end():V(a)?a.stream().pipe(p):Buffer.isBuffer(a)?(p.write(a),p.end()):a.pipe(p)}(f,i)}))}K.isRedirect=function(p){return 301===p||302===p||303===p||307===p||308===p},K.Promise=global.Promise,d.default=K},function(p,d,a){"use strict";const e=a(11),m=a(12),l=a(13),i=m.implSymbol;function t(d){if(!this||this[i]||!(this instanceof t))throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function.");if(arguments.length<1)throw new TypeError("Failed to construct 'URL': 1 argument required, but only "+arguments.length+" present.");const a=[];for(let p=0;p<arguments.length&&p<2;++p)a[p]=arguments[p];a[0]=e.USVString(a[0]),void 0!==a[1]&&(a[1]=e.USVString(a[1])),p.exports.setup(this,a)}t.prototype.toJSON=function(){if(!this||!p.exports.is(this))throw new TypeError("Illegal invocation");const d=[];for(let p=0;p<arguments.length&&p<0;++p)d[p]=arguments[p];return this[i].toJSON.apply(this[i],d)},Object.defineProperty(t.prototype,"href",{get(){return this[i].href},set(p){p=e.USVString(p),this[i].href=p},enumerable:!0,configurable:!0}),t.prototype.toString=function(){if(!this||!p.exports.is(this))throw new TypeError("Illegal invocation");return this.href},Object.defineProperty(t.prototype,"origin",{get(){return this[i].origin},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"protocol",{get(){return this[i].protocol},set(p){p=e.USVString(p),this[i].protocol=p},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"username",{get(){return this[i].username},set(p){p=e.USVString(p),this[i].username=p},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"password",{get(){return this[i].password},set(p){p=e.USVString(p),this[i].password=p},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"host",{get(){return this[i].host},set(p){p=e.USVString(p),this[i].host=p},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hostname",{get(){return this[i].hostname},set(p){p=e.USVString(p),this[i].hostname=p},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"port",{get(){return this[i].port},set(p){p=e.USVString(p),this[i].port=p},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pathname",{get(){return this[i].pathname},set(p){p=e.USVString(p),this[i].pathname=p},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"search",{get(){return this[i].search},set(p){p=e.USVString(p),this[i].search=p},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hash",{get(){return this[i].hash},set(p){p=e.USVString(p),this[i].hash=p},enumerable:!0,configurable:!0}),p.exports={is:p=>!!p&&p[i]instanceof l.implementation,create(p,d){let a=Object.create(t.prototype);return this.setup(a,p,d),a},setup(p,d,a){a||(a={}),a.wrapper=p,p[i]=new l.implementation(d,a),p[i][m.wrapperSymbol]=p},interface:t,expose:{Window:{URL:t},Worker:{URL:t}}}},function(p,d,a){"use strict";var e={};function m(p){return p<0?-1:1}function l(p,d){d.unsigned||--p;const a=d.unsigned?0:-Math.pow(2,p),e=Math.pow(2,p)-1,l=d.moduloBitLength?Math.pow(2,d.moduloBitLength):Math.pow(2,p),i=d.moduloBitLength?Math.pow(2,d.moduloBitLength-1):Math.pow(2,p-1);return function(p,t){t||(t={});let s=+p;if(t.enforceRange){if(!Number.isFinite(s))throw new TypeError("Argument is not a finite number");if(s=m(s)*Math.floor(Math.abs(s)),s<a||s>e)throw new TypeError("Argument is not in byte range");return s}if(!isNaN(s)&&t.clamp)return s=function(p){return p%1==.5&&0==(1&p)?Math.floor(p):Math.round(p)}(s),s<a&&(s=a),s>e&&(s=e),s;if(!Number.isFinite(s)||0===s)return 0;if(s=m(s)*Math.floor(Math.abs(s)),s%=l,!d.unsigned&&s>=i)return s-l;if(d.unsigned)if(s<0)s+=l;else if(-0===s)return 0;return s}}p.exports=e,e.void=function(){},e.boolean=function(p){return!!p},e.byte=l(8,{unsigned:!1}),e.octet=l(8,{unsigned:!0}),e.short=l(16,{unsigned:!1}),e["unsigned short"]=l(16,{unsigned:!0}),e.long=l(32,{unsigned:!1}),e["unsigned long"]=l(32,{unsigned:!0}),e["long long"]=l(32,{unsigned:!1,moduloBitLength:64}),e["unsigned long long"]=l(32,{unsigned:!0,moduloBitLength:64}),e.double=function(p){const d=+p;if(!Number.isFinite(d))throw new TypeError("Argument is not a finite floating-point value");return d},e["unrestricted double"]=function(p){const d=+p;if(isNaN(d))throw new TypeError("Argument is NaN");return d},e.float=e.double,e["unrestricted float"]=e["unrestricted double"],e.DOMString=function(p,d){return d||(d={}),d.treatNullAsEmptyString&&null===p?"":String(p)},e.ByteString=function(p,d){const a=String(p);let e;for(let p=0;void 0!==(e=a.codePointAt(p));++p)if(e>255)throw new TypeError("Argument is not a valid bytestring");return a},e.USVString=function(p){const d=String(p),a=d.length,e=[];for(let p=0;p<a;++p){const m=d.charCodeAt(p);if(m<55296||m>57343)e.push(String.fromCodePoint(m));else if(56320<=m&&m<=57343)e.push(String.fromCodePoint(65533));else if(p===a-1)e.push(String.fromCodePoint(65533));else{const a=d.charCodeAt(p+1);if(56320<=a&&a<=57343){const d=1023&m,l=1023&a;e.push(String.fromCodePoint(65536+1024*d+l)),++p}else e.push(String.fromCodePoint(65533))}}return e.join("")},e.Date=function(p,d){if(!(p instanceof Date))throw new TypeError("Argument is not a Date object");if(!isNaN(p))return p},e.RegExp=function(p,d){return p instanceof RegExp||(p=new RegExp(p)),p}},function(p,d,a){"use strict";p.exports.mixin=function(p,d){const a=Object.getOwnPropertyNames(d);for(let e=0;e<a.length;++e)Object.defineProperty(p,a[e],Object.getOwnPropertyDescriptor(d,a[e]))},p.exports.wrapperSymbol=Symbol("wrapper"),p.exports.implSymbol=Symbol("impl"),p.exports.wrapperForImpl=function(d){return d[p.exports.wrapperSymbol]},p.exports.implForWrapper=function(d){return d[p.exports.implSymbol]}},function(p,d,a){"use strict";const e=a(1);d.implementation=class{constructor(p){const d=p[0],a=p[1];let m=null;if(void 0!==a&&(m=e.basicURLParse(a),"failure"===m))throw new TypeError("Invalid base URL");const l=e.basicURLParse(d,{baseURL:m});if("failure"===l)throw new TypeError("Invalid URL");this._url=l}get href(){return e.serializeURL(this._url)}set href(p){const d=e.basicURLParse(p);if("failure"===d)throw new TypeError("Invalid URL");this._url=d}get origin(){return e.serializeURLOrigin(this._url)}get protocol(){return this._url.scheme+":"}set protocol(p){e.basicURLParse(p+":",{url:this._url,stateOverride:"scheme start"})}get username(){return this._url.username}set username(p){e.cannotHaveAUsernamePasswordPort(this._url)||e.setTheUsername(this._url,p)}get password(){return this._url.password}set password(p){e.cannotHaveAUsernamePasswordPort(this._url)||e.setThePassword(this._url,p)}get host(){const p=this._url;return null===p.host?"":null===p.port?e.serializeHost(p.host):e.serializeHost(p.host)+":"+e.serializeInteger(p.port)}set host(p){this._url.cannotBeABaseURL||e.basicURLParse(p,{url:this._url,stateOverride:"host"})}get hostname(){return null===this._url.host?"":e.serializeHost(this._url.host)}set hostname(p){this._url.cannotBeABaseURL||e.basicURLParse(p,{url:this._url,stateOverride:"hostname"})}get port(){return null===this._url.port?"":e.serializeInteger(this._url.port)}set port(p){e.cannotHaveAUsernamePasswordPort(this._url)||(""===p?this._url.port=null:e.basicURLParse(p,{url:this._url,stateOverride:"port"}))}get pathname(){return this._url.cannotBeABaseURL?this._url.path[0]:0===this._url.path.length?"":"/"+this._url.path.join("/")}set pathname(p){this._url.cannotBeABaseURL||(this._url.path=[],e.basicURLParse(p,{url:this._url,stateOverride:"path start"}))}get search(){return null===this._url.query||""===this._url.query?"":"?"+this._url.query}set search(p){const d=this._url;if(""===p)return void(d.query=null);const a="?"===p[0]?p.substring(1):p;d.query="",e.basicURLParse(a,{url:d,stateOverride:"query"})}get hash(){return null===this._url.fragment||""===this._url.fragment?"":"#"+this._url.fragment}set hash(p){if(""===p)return void(this._url.fragment=null);const d="#"===p[0]?p.substring(1):p;this._url.fragment="",e.basicURLParse(d,{url:this._url,stateOverride:"fragment"})}toJSON(){return this.href}}},function(p,d,a){"use strict";var e=a(6),m=a(15),l={TRANSITIONAL:0,NONTRANSITIONAL:1};function i(p){return p.split("\0").map((function(p){return p.normalize("NFC")})).join("\0")}function t(p){for(var d=0,a=m.length-1;d<=a;){var e=Math.floor((d+a)/2),l=m[e];if(l[0][0]<=p&&l[0][1]>=p)return l;l[0][0]>p?a=e-1:d=e+1}return null}var s=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function o(p){return p.replace(s,"_").length}var r=/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2D]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDE2C-\uDE37\uDEDF-\uDEEA\uDF01-\uDF03\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDE30-\uDE40\uDEAB-\uDEB7]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD83A[\uDCD0-\uDCD6]|\uDB40[\uDD00-\uDDEF]/;function v(p,d){"xn--"===p.substr(0,4)&&(p=e.toUnicode(p));var a=!1;(i(p)!==p||"-"===p[3]&&"-"===p[4]||"-"===p[0]||"-"===p[p.length-1]||-1!==p.indexOf(".")||0===p.search(r))&&(a=!0);for(var m=o(p),s=0;s<m;++s){var v=t(p.codePointAt(s));if(n===l.TRANSITIONAL&&"valid"!==v[1]||n===l.NONTRANSITIONAL&&"valid"!==v[1]&&"deviation"!==v[1]){a=!0;break}}return{label:p,error:a}}function n(p,d,a){var e=function(p,d,a){for(var e=!1,m="",i=o(p),s=0;s<i;++s){var r=p.codePointAt(s),v=t(r);switch(v[1]){case"disallowed":e=!0,m+=String.fromCodePoint(r);break;case"ignored":break;case"mapped":m+=String.fromCodePoint.apply(String,v[2]);break;case"deviation":m+=a===l.TRANSITIONAL?String.fromCodePoint.apply(String,v[2]):String.fromCodePoint(r);break;case"valid":m+=String.fromCodePoint(r);break;case"disallowed_STD3_mapped":d?(e=!0,m+=String.fromCodePoint(r)):m+=String.fromCodePoint.apply(String,v[2]);break;case"disallowed_STD3_valid":d&&(e=!0),m+=String.fromCodePoint(r)}}return{string:m,error:e}}(p,d,a);e.string=i(e.string);for(var m=e.string.split("."),s=0;s<m.length;++s)try{var r=v(m[s]);m[s]=r.label,e.error=e.error||r.error}catch(p){e.error=!0}return{string:m.join("."),error:e.error}}p.exports.toASCII=function(p,d,a,m){var l=n(p,d,a),i=l.string.split(".");if(i=i.map((function(p){try{return e.toASCII(p)}catch(d){return l.error=!0,p}})),m){var t=i.slice(0,i.length-1).join(".").length;(t.length>253||0===t.length)&&(l.error=!0);for(var s=0;s<i.length;++s)if(i.length>63||0===i.length){l.error=!0;break}}return l.error?null:i.join(".")},p.exports.toUnicode=function(p,d){var a=n(p,d,l.NONTRANSITIONAL);return{domain:a.string,error:a.error}},p.exports.PROCESSING_OPTIONS=l},function(p){p.exports=JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45,46],"valid"],[[47,47],"disallowed_STD3_valid"],[[48,57],"valid"],[[58,64],"disallowed_STD3_valid"],[[65,65],"mapped",[97]],[[66,66],"mapped",[98]],[[67,67],"mapped",[99]],[[68,68],"mapped",[100]],[[69,69],"mapped",[101]],[[70,70],"mapped",[102]],[[71,71],"mapped",[103]],[[72,72],"mapped",[104]],[[73,73],"mapped",[105]],[[74,74],"mapped",[106]],[[75,75],"mapped",[107]],[[76,76],"mapped",[108]],[[77,77],"mapped",[109]],[[78,78],"mapped",[110]],[[79,79],"mapped",[111]],[[80,80],"mapped",[112]],[[81,81],"mapped",[113]],[[82,82],"mapped",[114]],[[83,83],"mapped",[115]],[[84,84],"mapped",[116]],[[85,85],"mapped",[117]],[[86,86],"mapped",[118]],[[87,87],"mapped",[119]],[[88,88],"mapped",[120]],[[89,89],"mapped",[121]],[[90,90],"mapped",[122]],[[91,96],"disallowed_STD3_valid"],[[97,122],"valid"],[[123,127],"disallowed_STD3_valid"],[[128,159],"disallowed"],[[160,160],"disallowed_STD3_mapped",[32]],[[161,167],"valid",[],"NV8"],[[168,168],"disallowed_STD3_mapped",[32,776]],