Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@microlink/mql

Package Overview
Dependencies
Maintainers
1
Versions
202
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microlink/mql - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

4

CHANGELOG.md

@@ -5,5 +5,7 @@ # Changelog

## [0.4.0](https://github.com/microlinkhq/mql/compare/v1.0.17...v0.4.0) (2019-08-23)
### [0.4.1](https://github.com/microlinkhq/mql/compare/v0.4.0...v0.4.1) (2019-08-24)
## [0.4.0](https://github.com/microlinkhq/mql/compare/v0.3.16...v0.4.0) (2019-08-24)
### Bug Fixes

@@ -10,0 +12,0 @@

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("url"),require("stream"),require("http"),require("https"),require("zlib")):"function"==typeof define&&define.amd?define(["url","stream","http","https","zlib"],t):(e=e||self).mql=t(e.Url,e.Stream,e.http,e.https,e.zlib)}(this,function(e,t,r,o,n){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t,r=r&&r.hasOwnProperty("default")?r.default:r,o=o&&o.hasOwnProperty("default")?o.default:o,n=n&&n.hasOwnProperty("default")?n.default:n;var s=Object.freeze({default:e=>e});const i=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};var a=i,l=i;a.default=l;var c={isFunction:e=>"function"==typeof e,isString:e=>"string"==typeof e,composeErrorMessage:(e,t)=>`${e}, ${t}`,inherits:(e,t)=>{e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}};const{isFunction:u,composeErrorMessage:f}=c;var p=function(e,...t){Object.assign(e,...t),e.description=u(e.message)?e.message(e):e.message,e.message=e.code?f(e.code,e.description):e.description},d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function h(e){return e&&e.default||e}var b=h(s);const{isString:m}=c;var y=function(e,t){function r(r){const o=new e,n=m(r)?{message:r}:r;return p(o,t,n),o.stack=b(o.stack),o}return r.prototype=e.prototype,a(r,e),r};const{inherits:g}=c,w=/[^0-9a-zA-Z_$]/;var v=function(e){if("string"!=typeof e)throw new TypeError("Expected className to be a string");if(w.test(e))throw new Error("className contains invalid characters");function t(){Object.defineProperty(this,"name",{configurable:!0,value:e,writable:!0}),Error.captureStackTrace(this,this.constructor)}return g(t,Error),a(t,Error),t};const k=e=>(t,r)=>{const o=v(t||e.name);return y(o,r)};var j=k(Error),x=k(TypeError),E=k(RangeError),T=k(EvalError),O=k(SyntaxError),S=k(ReferenceError),P=k(URIError);function $(e){if(!e)return"";var t=decodeURIComponent(e);return"false"!==t&&("true"===t||(0*+t==0?+t:t))}j.type=x,j.range=E,j.eval=T,j.syntax=O,j.reference=S,j.uri=P;var R=Object.freeze({encode:function(e,t){var r,o,n,s="";for(r in e)if(void 0!==(n=e[r]))if(Array.isArray(n))for(o=0;o<n.length;o++)s&&(s+="&"),s+=encodeURIComponent(r)+"="+encodeURIComponent(n[o]);else s&&(s+="&"),s+=encodeURIComponent(r)+"="+encodeURIComponent(n);return(t||"")+s},decode:function(e){for(var t,r,o={},n=e.split("&");t=n.shift();)void 0!==o[r=(t=t.split("=")).shift()]?o[r]=[].concat(o[r],$(t.shift())):o[r]=$(t.shift());return o}});const _=e=>e&&e.includeBoundaries?"(?:(?<=\\s|^)(?=[a-fA-F\\d:])|(?<=[a-fA-F\\d:])(?=\\s|$))":"",z="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",B="[a-fA-F\\d]{1,4}",A=`\n(\n(?:${B}:){7}(?:${B}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:${B}:){6}(?:${z}|:${B}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:${B}:){5}(?::${z}|(:${B}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:${B}:){4}(?:(:${B}){0,1}:${z}|(:${B}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:${B}:){3}(?:(:${B}){0,2}:${z}|(:${B}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:${B}:){2}(?:(:${B}){0,3}:${z}|(:${B}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:${B}:){1}(?:(:${B}){0,4}:${z}|(:${B}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::((?::${B}){0,5}:${z}|(?::${B}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(%[0-9a-zA-Z]{1,})? // %eth0 %1\n`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),C=e=>e&&e.exact?new RegExp(`(?:^${z}$)|(?:^${A}$)`):new RegExp(`(?:${_(e)}${z}${_(e)})|(?:${_(e)}${A}${_(e)})`,"g");C.v4=e=>e&&e.exact?new RegExp(`^${z}$`):new RegExp(`${_(e)}${z}${_(e)}`,"g"),C.v6=e=>e&&e.exact?new RegExp(`^${A}$`):new RegExp(`${_(e)}${A}${_(e)}`,"g");var U=C,L=["aaa","aarp","abarth","abb","abbott","abbvie","abc","able","abogado","abudhabi","ac","academy","accenture","accountant","accountants","aco","active","actor","ad","adac","ads","adult","ae","aeg","aero","aetna","af","afamilycompany","afl","africa","ag","agakhan","agency","ai","aig","aigo","airbus","airforce","airtel","akdn","al","alfaromeo","alibaba","alipay","allfinanz","allstate","ally","alsace","alstom","am","americanexpress","americanfamily","amex","amfam","amica","amsterdam","analytics","android","anquan","anz","ao","aol","apartments","app","apple","aq","aquarelle","ar","arab","aramco","archi","army","arpa","art","arte","as","asda","asia","associates","at","athleta","attorney","au","auction","audi","audible","audio","auspost","author","auto","autos","avianca","aw","aws","ax","axa","az","azure","ba","baby","baidu","banamex","bananarepublic","band","bank","bar","barcelona","barclaycard","barclays","barefoot","bargains","baseball","basketball","bauhaus","bayern","bb","bbc","bbt","bbva","bcg","bcn","bd","be","beats","beauty","beer","bentley","berlin","best","bestbuy","bet","bf","bg","bh","bharti","bi","bible","bid","bike","bing","bingo","bio","biz","bj","black","blackfriday","blanco","blockbuster","blog","bloomberg","blue","bm","bms","bmw","bn","bnl","bnpparibas","bo","boats","boehringer","bofa","bom","bond","boo","book","booking","bosch","bostik","boston","bot","boutique","box","br","bradesco","bridgestone","broadway","broker","brother","brussels","bs","bt","budapest","bugatti","build","builders","business","buy","buzz","bv","bw","by","bz","bzh","ca","cab","cafe","cal","call","calvinklein","cam","camera","camp","cancerresearch","canon","capetown","capital","capitalone","car","caravan","cards","care","career","careers","cars","cartier","casa","case","caseih","cash","casino","cat","catering","catholic","cba","cbn","cbre","cbs","cc","cd","ceb","center","ceo","cern","cf","cfa","cfd","cg","ch","chanel","channel","chase","chat","cheap","chintai","christmas","chrome","chrysler","church","ci","cipriani","circle","cisco","citadel","citi","citic","city","cityeats","ck","cl","claims","cleaning","click","clinic","clinique","clothing","cloud","club","clubmed","cm","cn","co","coach","codes","coffee","college","cologne","com","comcast","commbank","community","company","compare","computer","comsec","condos","construction","consulting","contact","contractors","cooking","cookingchannel","cool","coop","corsica","country","coupon","coupons","courses","cr","credit","creditcard","creditunion","cricket","crown","crs","cruise","cruises","csc","cu","cuisinella","cv","cw","cx","cy","cymru","cyou","cz","dabur","dad","dance","data","date","dating","datsun","day","dclk","dds","de","deal","dealer","deals","degree","delivery","dell","deloitte","delta","democrat","dental","dentist","desi","design","dev","dhl","diamonds","diet","digital","direct","directory","discount","discover","dish","diy","dj","dk","dm","dnp","do","docs","doctor","dodge","dog","doha","domains","dot","download","drive","dtv","dubai","duck","dunlop","duns","dupont","durban","dvag","dvr","dz","earth","eat","ec","eco","edeka","edu","education","ee","eg","email","emerck","energy","engineer","engineering","enterprises","epost","epson","equipment","er","ericsson","erni","es","esq","estate","esurance","et","etisalat","eu","eurovision","eus","events","everbank","exchange","expert","exposed","express","extraspace","fage","fail","fairwinds","faith","family","fan","fans","farm","farmers","fashion","fast","fedex","feedback","ferrari","ferrero","fi","fiat","fidelity","fido","film","final","finance","financial","fire","firestone","firmdale","fish","fishing","fit","fitness","fj","fk","flickr","flights","flir","florist","flowers","fly","fm","fo","foo","food","foodnetwork","football","ford","forex","forsale","forum","foundation","fox","fr","free","fresenius","frl","frogans","frontdoor","frontier","ftr","fujitsu","fujixerox","fun","fund","furniture","futbol","fyi","ga","gal","gallery","gallo","gallup","game","games","gap","garden","gb","gbiz","gd","gdn","ge","gea","gent","genting","george","gf","gg","ggee","gh","gi","gift","gifts","gives","giving","gl","glade","glass","gle","global","globo","gm","gmail","gmbh","gmo","gmx","gn","godaddy","gold","goldpoint","golf","goo","goodhands","goodyear","goog","google","gop","got","gov","gp","gq","gr","grainger","graphics","gratis","green","gripe","grocery","group","gs","gt","gu","guardian","gucci","guge","guide","guitars","guru","gw","gy","hair","hamburg","hangout","haus","hbo","hdfc","hdfcbank","health","healthcare","help","helsinki","here","hermes","hgtv","hiphop","hisamitsu","hitachi","hiv","hk","hkt","hm","hn","hockey","holdings","holiday","homedepot","homegoods","homes","homesense","honda","honeywell","horse","hospital","host","hosting","hot","hoteles","hotels","hotmail","house","how","hr","hsbc","ht","hu","hughes","hyatt","hyundai","ibm","icbc","ice","icu","id","ie","ieee","ifm","ikano","il","im","imamat","imdb","immo","immobilien","in","industries","infiniti","info","ing","ink","institute","insurance","insure","int","intel","international","intuit","investments","io","ipiranga","iq","ir","irish","is","iselect","ismaili","ist","istanbul","it","itau","itv","iveco","iwc","jaguar","java","jcb","jcp","je","jeep","jetzt","jewelry","jio","jlc","jll","jm","jmp","jnj","jo","jobs","joburg","jot","joy","jp","jpmorgan","jprs","juegos","juniper","kaufen","kddi","ke","kerryhotels","kerrylogistics","kerryproperties","kfh","kg","kh","ki","kia","kim","kinder","kindle","kitchen","kiwi","km","kn","koeln","komatsu","kosher","kp","kpmg","kpn","kr","krd","kred","kuokgroup","kw","ky","kyoto","kz","la","lacaixa","ladbrokes","lamborghini","lamer","lancaster","lancia","lancome","land","landrover","lanxess","lasalle","lat","latino","latrobe","law","lawyer","lb","lc","lds","lease","leclerc","lefrak","legal","lego","lexus","lgbt","li","liaison","lidl","life","lifeinsurance","lifestyle","lighting","like","lilly","limited","limo","lincoln","linde","link","lipsy","live","living","lixil","lk","llc","loan","loans","locker","locus","loft","lol","london","lotte","lotto","love","lpl","lplfinancial","lr","ls","lt","ltd","ltda","lu","lundbeck","lupin","luxe","luxury","lv","ly","ma","macys","madrid","maif","maison","makeup","man","management","mango","map","market","marketing","markets","marriott","marshalls","maserati","mattel","mba","mc","mckinsey","md","me","med","media","meet","melbourne","meme","memorial","men","menu","meo","merckmsd","metlife","mg","mh","miami","microsoft","mil","mini","mint","mit","mitsubishi","mk","ml","mlb","mls","mm","mma","mn","mo","mobi","mobile","mobily","moda","moe","moi","mom","monash","money","monster","mopar","mormon","mortgage","moscow","moto","motorcycles","mov","movie","movistar","mp","mq","mr","ms","msd","mt","mtn","mtr","mu","museum","mutual","mv","mw","mx","my","mz","na","nab","nadex","nagoya","name","nationwide","natura","navy","nba","nc","ne","nec","net","netbank","netflix","network","neustar","new","newholland","news","next","nextdirect","nexus","nf","nfl","ng","ngo","nhk","ni","nico","nike","nikon","ninja","nissan","nissay","nl","no","nokia","northwesternmutual","norton","now","nowruz","nowtv","np","nr","nra","nrw","ntt","nu","nyc","nz","obi","observer","off","office","okinawa","olayan","olayangroup","oldnavy","ollo","om","omega","one","ong","onl","online","onyourside","ooo","open","oracle","orange","org","organic","origins","osaka","otsuka","ott","ovh","pa","page","panasonic","panerai","paris","pars","partners","parts","party","passagens","pay","pccw","pe","pet","pf","pfizer","pg","ph","pharmacy","phd","philips","phone","photo","photography","photos","physio","piaget","pics","pictet","pictures","pid","pin","ping","pink","pioneer","pizza","pk","pl","place","play","playstation","plumbing","plus","pm","pn","pnc","pohl","poker","politie","porn","post","pr","pramerica","praxi","press","prime","pro","prod","productions","prof","progressive","promo","properties","property","protection","pru","prudential","ps","pt","pub","pw","pwc","py","qa","qpon","quebec","quest","qvc","racing","radio","raid","re","read","realestate","realtor","realty","recipes","red","redstone","redumbrella","rehab","reise","reisen","reit","reliance","ren","rent","rentals","repair","report","republican","rest","restaurant","review","reviews","rexroth","rich","richardli","ricoh","rightathome","ril","rio","rip","rmit","ro","rocher","rocks","rodeo","rogers","room","rs","rsvp","ru","rugby","ruhr","run","rw","rwe","ryukyu","sa","saarland","safe","safety","sakura","sale","salon","samsclub","samsung","sandvik","sandvikcoromant","sanofi","sap","sapo","sarl","sas","save","saxo","sb","sbi","sbs","sc","sca","scb","schaeffler","schmidt","scholarships","school","schule","schwarz","science","scjohnson","scor","scot","sd","se","search","seat","secure","security","seek","select","sener","services","ses","seven","sew","sex","sexy","sfr","sg","sh","shangrila","sharp","shaw","shell","shia","shiksha","shoes","shop","shopping","shouji","show","showtime","shriram","si","silk","sina","singles","site","sj","sk","ski","skin","sky","skype","sl","sling","sm","smart","smile","sn","sncf","so","soccer","social","softbank","software","sohu","solar","solutions","song","sony","soy","space","spiegel","sport","spot","spreadbetting","sr","srl","srt","st","stada","staples","star","starhub","statebank","statefarm","statoil","stc","stcgroup","stockholm","storage","store","stream","studio","study","style","su","sucks","supplies","supply","support","surf","surgery","suzuki","sv","swatch","swiftcover","swiss","sx","sy","sydney","symantec","systems","sz","tab","taipei","talk","taobao","target","tatamotors","tatar","tattoo","tax","taxi","tc","tci","td","tdk","team","tech","technology","tel","telecity","telefonica","temasek","tennis","teva","tf","tg","th","thd","theater","theatre","tiaa","tickets","tienda","tiffany","tips","tires","tirol","tj","tjmaxx","tjx","tk","tkmaxx","tl","tm","tmall","tn","to","today","tokyo","tools","top","toray","toshiba","total","tours","town","toyota","toys","tr","trade","trading","training","travel","travelchannel","travelers","travelersinsurance","trust","trv","tt","tube","tui","tunes","tushu","tv","tvs","tw","tz","ua","ubank","ubs","uconnect","ug","uk","unicom","university","uno","uol","ups","us","uy","uz","va","vacations","vana","vanguard","vc","ve","vegas","ventures","verisign","versicherung","vet","vg","vi","viajes","video","vig","viking","villas","vin","vip","virgin","visa","vision","vista","vistaprint","viva","vivo","vlaanderen","vn","vodka","volkswagen","volvo","vote","voting","voto","voyage","vu","vuelos","wales","walmart","walter","wang","wanggou","warman","watch","watches","weather","weatherchannel","webcam","weber","website","wed","wedding","weibo","weir","wf","whoswho","wien","wiki","williamhill","win","windows","wine","winners","wme","wolterskluwer","woodside","work","works","world","wow","ws","wtc","wtf","xbox","xerox","xfinity","xihuan","xin","कॉम","セール","佛山","ಭಾರತ","慈善","集团","在线","한국","ଭାରତ","大众汽车","点看","คอม","ভাৰত","ভারত","八卦","موقع","বাংলা","公益","公司","香格里拉","网站","移动","我爱你","москва","қаз","католик","онлайн","сайт","联通","срб","бг","бел","קום","时尚","微博","淡马锡","ファッション","орг","नेट","ストア","삼성","சிங்கப்பூர்","商标","商店","商城","дети","мкд","ею","ポイント","新闻","工行","家電","كوم","中文网","中信","中国","中國","娱乐","谷歌","భారత్","ලංකා","電訊盈科","购物","クラウド","ભારત","通販","भारतम्","भारत","भारोत","网店","संगठन","餐厅","网络","ком","укр","香港","诺基亚","食品","飞利浦","台湾","台灣","手表","手机","мон","الجزائر","عمان","ارامكو","ایران","العليان","اتصالات","امارات","بازار","پاکستان","الاردن","موبايلي","بارت","بھارت","المغرب","ابوظبي","السعودية","ڀارت","كاثوليك","سودان","همراه","عراق","مليسيا","澳門","닷컴","政府","شبكة","بيتك","عرب","გე","机构","组织机构","健康","ไทย","سورية","招聘","рус","рф","珠宝","تونس","大拿","みんな","グーグル","ελ","世界","書籍","ഭാരതം","ਭਾਰਤ","网址","닷넷","コム","天主教","游戏","vermögensberater","vermögensberatung","企业","信息","嘉里大酒店","嘉里","مصر","قطر","广东","இலங்கை","இந்தியா","հայ","新加坡","فلسطين","政务","xperia","xxx","xyz","yachts","yahoo","yamaxun","yandex","ye","yodobashi","yoga","yokohama","you","youtube","yt","yun","za","zappos","zara","zero","zip","zippo","zm","zone","zuerich","zw"];const q=d.window?window.URL:e.URL,H=(e=>{const t=`(?:${`(?:(?:[a-z]+:)?//)${(e={strict:!0,...e}).strict?"":"?"}`}|www\\.)(?:\\S+(?::\\S*)?@)?(?:localhost|${U.v4().source}|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*${`(?:\\.${e.strict?"(?:[a-z\\u00a1-\\uffff]{2,})":`(?:${L.sort((e,t)=>t.length-e.length).join("|")})`})\\.?`})(?::\\d{2,5})?(?:[/?#][^\\s"]*)?`;return e.exact?new RegExp(`(?:^${t}$)`,"i"):new RegExp(t,"ig")})({exact:!0}),I=/^https?:\/\//i;const D=t.Readable,N=Symbol("buffer"),M=Symbol("type");class F{constructor(){this[M]="";const e=arguments[0],t=arguments[1],r=[];let o=0;if(e){const t=e,n=Number(t.length);for(let e=0;e<n;e++){const n=t[e];let s;o+=(s=n instanceof Buffer?n:ArrayBuffer.isView(n)?Buffer.from(n.buffer,n.byteOffset,n.byteLength):n instanceof ArrayBuffer?Buffer.from(n):n instanceof F?n[N]:Buffer.from("string"==typeof n?n:String(n))).length,r.push(s)}}this[N]=Buffer.concat(r);let n=t&&void 0!==t.type&&String(t.type).toLowerCase();n&&!/[^\u0020-\u007E]/.test(n)&&(this[M]=n)}get size(){return this[N].length}get type(){return this[M]}text(){return Promise.resolve(this[N].toString())}arrayBuffer(){const e=this[N],t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return Promise.resolve(t)}stream(){const e=new D;return e._read=function(){},e.push(this[N]),e.push(null),e}toString(){return"[object Blob]"}slice(){const e=this.size,t=arguments[0],r=arguments[1];let o,n;o=void 0===t?0:t<0?Math.max(e+t,0):Math.min(t,e),n=void 0===r?e:r<0?Math.max(e+r,0):Math.min(r,e);const s=Math.max(n-o,0),i=this[N].slice(o,o+s),a=new F([],{type:arguments[2]});return a[N]=i,a}}function V(e,t,r){Error.call(this,e),this.message=e,this.type=t,r&&(this.code=this.errno=r.code),Error.captureStackTrace(this,this.constructor)}let G;Object.defineProperties(F.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}}),Object.defineProperty(F.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{G=require("encoding").convert}catch(e){}const W=Symbol("Body internals"),Z=t.PassThrough;function K(e){var r=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=o.size;let s=void 0===n?0:n;var i=o.timeout;let a=void 0===i?0:i;null==e?e=null:Y(e)?e=Buffer.from(e.toString()):Q(e)||Buffer.isBuffer(e)||("[object ArrayBuffer]"===Object.prototype.toString.call(e)?e=Buffer.from(e):ArrayBuffer.isView(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):e instanceof t||(e=Buffer.from(String(e)))),this[W]={body:e,disturbed:!1,error:null},this.size=s,this.timeout=a,e instanceof t&&e.on("error",function(e){const t="AbortError"===e.name?e:new V(`Invalid response body while trying to fetch ${r.url}: ${e.message}`,"system",e);r[W].error=t})}function J(){var e=this;if(this[W].disturbed)return K.Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[W].disturbed=!0,this[W].error)return K.Promise.reject(this[W].error);let r=this.body;if(null===r)return K.Promise.resolve(Buffer.alloc(0));if(Q(r)&&(r=r.stream()),Buffer.isBuffer(r))return K.Promise.resolve(r);if(!(r instanceof t))return K.Promise.resolve(Buffer.alloc(0));let o=[],n=0,s=!1;return new K.Promise(function(t,i){let a;e.timeout&&(a=setTimeout(function(){s=!0,i(new V(`Response timeout while trying to fetch ${e.url} (over ${e.timeout}ms)`,"body-timeout"))},e.timeout)),r.on("error",function(t){"AbortError"===t.name?(s=!0,i(t)):i(new V(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t))}),r.on("data",function(t){if(!s&&null!==t){if(e.size&&n+t.length>e.size)return s=!0,void i(new V(`content size at ${e.url} over limit: ${e.size}`,"max-size"));n+=t.length,o.push(t)}}),r.on("end",function(){if(!s){clearTimeout(a);try{t(Buffer.concat(o,n))}catch(t){i(new V(`Could not create Buffer from response body for ${e.url}: ${t.message}`,"system",t))}}})})}function Y(e){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)}function Q(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])}function X(e){let r,o,n=e.body;if(e.bodyUsed)throw new Error("cannot clone body after it is used");return n instanceof t&&"function"!=typeof n.getBoundary&&(r=new Z,o=new Z,n.pipe(r),n.pipe(o),e[W].body=r,n=o),n}function ee(e){return null===e?null:"string"==typeof e?"text/plain;charset=UTF-8":Y(e)?"application/x-www-form-urlencoded;charset=UTF-8":Q(e)?e.type||null:Buffer.isBuffer(e)?null:"[object ArrayBuffer]"===Object.prototype.toString.call(e)?null:ArrayBuffer.isView(e)?null:"function"==typeof e.getBoundary?`multipart/form-data;boundary=${e.getBoundary()}`:e instanceof t?null:"text/plain;charset=UTF-8"}function te(e){const t=e.body;return null===t?0:Q(t)?t.size:Buffer.isBuffer(t)?t.length:t&&"function"==typeof t.getLengthSync&&(t._lengthRetrievers&&0==t._lengthRetrievers.length||t.hasKnownLength&&t.hasKnownLength())?t.getLengthSync():null}K.prototype={get body(){return this[W].body},get bodyUsed(){return this[W].disturbed},arrayBuffer(){return J.call(this).then(function(e){return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)})},blob(){let e=this.headers&&this.headers.get("content-type")||"";return J.call(this).then(function(t){return Object.assign(new F([],{type:e.toLowerCase()}),{[N]:t})})},json(){var e=this;return J.call(this).then(function(t){try{return JSON.parse(t.toString())}catch(t){return K.Promise.reject(new V(`invalid json response body at ${e.url} reason: ${t.message}`,"invalid-json"))}})},text(){return J.call(this).then(function(e){return e.toString()})},buffer(){return J.call(this)},textConverted(){var e=this;return J.call(this).then(function(t){return function(e,t){if("function"!=typeof G)throw new Error("The package `encoding` must be installed to use the textConverted() function");const r=t.get("content-type");let o,n,s="utf-8";r&&(o=/charset=([^;]*)/i.exec(r));n=e.slice(0,1024).toString(),!o&&n&&(o=/<meta.+?charset=(['"])(.+?)\1/i.exec(n));!o&&n&&(o=/<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(n))&&(o=/charset=(.*)/i.exec(o.pop()));!o&&n&&(o=/<\?xml.+?encoding=(['"])(.+?)\1/i.exec(n));o&&("gb2312"!==(s=o.pop())&&"gbk"!==s||(s="gb18030"));return G(e,"UTF-8",s).toString()}(t,e.headers)})}},Object.defineProperties(K.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}}),K.mixIn=function(e){for(const t of Object.getOwnPropertyNames(K.prototype))if(!(t in e)){const r=Object.getOwnPropertyDescriptor(K.prototype,t);Object.defineProperty(e,t,r)}},K.Promise=global.Promise;const re=/[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/,oe=/[^\t\x20-\x7e\x80-\xff]/;function ne(e){if(e=`${e}`,re.test(e)||""===e)throw new TypeError(`${e} is not a legal HTTP header name`)}function se(e){if(e=`${e}`,oe.test(e))throw new TypeError(`${e} is not a legal HTTP header value`)}function ie(e,t){t=t.toLowerCase();for(const r in e)if(r.toLowerCase()===t)return r}const ae=Symbol("map");class le{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;if(this[ae]=Object.create(null),e instanceof le){const t=e.raw(),r=Object.keys(t);for(const e of r)for(const r of t[e])this.append(e,r)}else if(null==e);else{if("object"!=typeof e)throw new TypeError("Provided initializer must be an object");{const t=e[Symbol.iterator];if(null!=t){if("function"!=typeof t)throw new TypeError("Header pairs must be iterable");const r=[];for(const t of e){if("object"!=typeof t||"function"!=typeof t[Symbol.iterator])throw new TypeError("Each header pair must be iterable");r.push(Array.from(t))}for(const e of r){if(2!==e.length)throw new TypeError("Each header pair must be a name/value tuple");this.append(e[0],e[1])}}else for(const t of Object.keys(e)){const r=e[t];this.append(t,r)}}}}get(e){ne(e=`${e}`);const t=ie(this[ae],e);return void 0===t?null:this[ae][t].join(", ")}forEach(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=ce(this),o=0;for(;o<r.length;){var n=r[o];const s=n[0],i=n[1];e.call(t,i,s,this),r=ce(this),o++}}set(e,t){t=`${t}`,ne(e=`${e}`),se(t);const r=ie(this[ae],e);this[ae][void 0!==r?r:e]=[t]}append(e,t){t=`${t}`,ne(e=`${e}`),se(t);const r=ie(this[ae],e);void 0!==r?this[ae][r].push(t):this[ae][e]=[t]}has(e){return ne(e=`${e}`),void 0!==ie(this[ae],e)}delete(e){ne(e=`${e}`);const t=ie(this[ae],e);void 0!==t&&delete this[ae][t]}raw(){return this[ae]}keys(){return fe(this,"key")}values(){return fe(this,"value")}[Symbol.iterator](){return fe(this,"key+value")}}function ce(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key+value";return Object.keys(e[ae]).sort().map("key"===t?function(e){return e.toLowerCase()}:"value"===t?function(t){return e[ae][t].join(", ")}:function(t){return[t.toLowerCase(),e[ae][t].join(", ")]})}le.prototype.entries=le.prototype[Symbol.iterator],Object.defineProperty(le.prototype,Symbol.toStringTag,{value:"Headers",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(le.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 ue=Symbol("internal");function fe(e,t){const r=Object.create(pe);return r[ue]={target:e,kind:t,index:0},r}const pe=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==pe)throw new TypeError("Value of `this` is not a HeadersIterator");var e=this[ue];const t=e.target,r=e.kind,o=e.index,n=ce(t,r);return o>=n.length?{value:void 0,done:!0}:(this[ue].index=o+1,{value:n[o],done:!1})}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));function de(e){const t=Object.assign({__proto__:null},e[ae]),r=ie(e[ae],"Host");return void 0!==r&&(t[r]=t[r][0]),t}Object.defineProperty(pe,Symbol.toStringTag,{value:"HeadersIterator",writable:!1,enumerable:!1,configurable:!0});const he=Symbol("Response internals"),be=r.STATUS_CODES;class me{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};K.call(this,e,t);const r=t.status||200,o=new le(t.headers);if(null!=e&&!o.has("Content-Type")){const t=ee(e);t&&o.append("Content-Type",t)}this[he]={url:t.url,status:r,statusText:t.statusText||be[r],headers:o,counter:t.counter}}get url(){return this[he].url||""}get status(){return this[he].status}get ok(){return this[he].status>=200&&this[he].status<300}get redirected(){return this[he].counter>0}get statusText(){return this[he].statusText}get headers(){return this[he].headers}clone(){return new me(X(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}K.mixIn(me.prototype),Object.defineProperties(me.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}}),Object.defineProperty(me.prototype,Symbol.toStringTag,{value:"Response",writable:!1,enumerable:!1,configurable:!0});const ye=Symbol("Request internals"),ge=e.parse,we=e.format,ve="destroy"in t.Readable.prototype;function ke(e){return"object"==typeof e&&"object"==typeof e[ye]}class je{constructor(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ke(e)?t=ge(e.url):(t=e&&e.href?ge(e.href):ge(`${e}`),e={});let o=r.method||e.method||"GET";if(o=o.toUpperCase(),(null!=r.body||ke(e)&&null!==e.body)&&("GET"===o||"HEAD"===o))throw new TypeError("Request with GET/HEAD method cannot have body");let n=null!=r.body?r.body:ke(e)&&null!==e.body?X(e):null;K.call(this,n,{timeout:r.timeout||e.timeout||0,size:r.size||e.size||0});const s=new le(r.headers||e.headers||{});if(null!=n&&!s.has("Content-Type")){const e=ee(n);e&&s.append("Content-Type",e)}let i=ke(e)?e.signal:null;if("signal"in r&&(i=r.signal),null!=i&&!function(e){const t=e&&"object"==typeof e&&Object.getPrototypeOf(e);return!(!t||"AbortSignal"!==t.constructor.name)}(i))throw new TypeError("Expected signal to be an instanceof AbortSignal");this[ye]={method:o,redirect:r.redirect||e.redirect||"follow",headers:s,parsedURL:t,signal:i},this.follow=void 0!==r.follow?r.follow:void 0!==e.follow?e.follow:20,this.compress=void 0!==r.compress?r.compress:void 0===e.compress||e.compress,this.counter=r.counter||e.counter||0,this.agent=r.agent||e.agent}get method(){return this[ye].method}get url(){return we(this[ye].parsedURL)}get headers(){return this[ye].headers}get redirect(){return this[ye].redirect}get signal(){return this[ye].signal}clone(){return new je(this)}}function xe(e){Error.call(this,e),this.type="aborted",this.message=e,Error.captureStackTrace(this,this.constructor)}K.mixIn(je.prototype),Object.defineProperty(je.prototype,Symbol.toStringTag,{value:"Request",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperties(je.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}}),xe.prototype=Object.create(Error.prototype),xe.prototype.constructor=xe,xe.prototype.name="AbortError";const Ee=t.PassThrough,Te=e.resolve;function Oe(e,s){if(!Oe.Promise)throw new Error("native promise missing, set fetch.Promise to your favorite alternative");return K.Promise=Oe.Promise,new Oe.Promise(function(i,a){const l=new je(e,s),c=function(e){const r=e[ye].parsedURL,o=new le(e[ye].headers);if(o.has("Accept")||o.set("Accept","*/*"),!r.protocol||!r.hostname)throw new TypeError("Only absolute URLs are supported");if(!/^https?:$/.test(r.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(e.signal&&e.body instanceof t.Readable&&!ve)throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");let n=null;if(null==e.body&&/^(POST|PUT)$/i.test(e.method)&&(n="0"),null!=e.body){const t=te(e);"number"==typeof t&&(n=String(t))}n&&o.set("Content-Length",n),o.has("User-Agent")||o.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"),e.compress&&!o.has("Accept-Encoding")&&o.set("Accept-Encoding","gzip,deflate");let s=e.agent;return"function"==typeof s&&(s=s(r)),o.has("Connection")||s||o.set("Connection","close"),Object.assign({},r,{method:e.method,headers:de(o),agent:s})}(l),u=("https:"===c.protocol?o:r).request,f=l.signal;let p=null;const d=function(){let e=new xe("The user aborted a request.");a(e),l.body&&l.body instanceof t.Readable&&l.body.destroy(e),p&&p.body&&p.body.emit("error",e)};if(f&&f.aborted)return void d();const h=function(){d(),y()},b=u(c);let m;function y(){b.abort(),f&&f.removeEventListener("abort",h),clearTimeout(m)}f&&f.addEventListener("abort",h),l.timeout&&b.once("socket",function(e){m=setTimeout(function(){a(new V(`network timeout at: ${l.url}`,"request-timeout")),y()},l.timeout)}),b.on("error",function(e){a(new V(`request to ${l.url} failed, reason: ${e.message}`,"system",e)),y()}),b.on("response",function(e){clearTimeout(m);const t=function(e){const t=new le;for(const r of Object.keys(e))if(!re.test(r))if(Array.isArray(e[r]))for(const o of e[r])oe.test(o)||(void 0===t[ae][r]?t[ae][r]=[o]:t[ae][r].push(o));else oe.test(e[r])||(t[ae][r]=[e[r]]);return t}(e.headers);if(Oe.isRedirect(e.statusCode)){const r=t.get("Location"),o=null===r?null:Te(l.url,r);switch(l.redirect){case"error":return a(new V(`redirect mode is set to error: ${l.url}`,"no-redirect")),void y();case"manual":if(null!==o)try{t.set("Location",o)}catch(e){a(e)}break;case"follow":if(null===o)break;if(l.counter>=l.follow)return a(new V(`maximum redirect reached at: ${l.url}`,"max-redirect")),void y();const r={headers:new le(l.headers),follow:l.follow,counter:l.counter+1,agent:l.agent,compress:l.compress,method:l.method,body:l.body,signal:l.signal,timeout:l.timeout};return 303!==e.statusCode&&l.body&&null===te(l)?(a(new V("Cannot follow redirect with body being a readable stream","unsupported-redirect")),void y()):(303!==e.statusCode&&(301!==e.statusCode&&302!==e.statusCode||"POST"!==l.method)||(r.method="GET",r.body=void 0,r.headers.delete("content-length")),i(Oe(new je(o,r))),void y())}}e.once("end",function(){f&&f.removeEventListener("abort",h)});let r=e.pipe(new Ee);const o={url:l.url,status:e.statusCode,statusText:e.statusMessage,headers:t,size:l.size,timeout:l.timeout,counter:l.counter},s=t.get("Content-Encoding");if(!l.compress||"HEAD"===l.method||null===s||204===e.statusCode||304===e.statusCode)return p=new me(r,o),void i(p);const c={flush:n.Z_SYNC_FLUSH,finishFlush:n.Z_SYNC_FLUSH};if("gzip"==s||"x-gzip"==s)return r=r.pipe(n.createGunzip(c)),p=new me(r,o),void i(p);if("deflate"!=s&&"x-deflate"!=s){if("br"==s&&"function"==typeof n.createBrotliDecompress)return r=r.pipe(n.createBrotliDecompress()),p=new me(r,o),void i(p);p=new me(r,o),i(p)}else{e.pipe(new Ee).once("data",function(e){r=8==(15&e[0])?r.pipe(n.createInflate()):r.pipe(n.createInflateRaw()),p=new me(r,o),i(p)})}}),function(e,t){const r=t.body;null===r?e.end():Q(r)?r.stream().pipe(e):Buffer.isBuffer(r)?(e.write(r),e.end()):r.pipe(e)}(b,l)})}Oe.isRedirect=function(e){return 301===e||302===e||303===e||307===e||308===e},Oe.Promise=global.Promise;var Se=Object.freeze({default:Oe,Headers:le,Request:je,Response:me,FetchError:V});const Pe=new WeakMap,$e=new WeakMap;function Re(e){const t=Pe.get(e);return console.assert(null!=t,"'this' is expected an Event object, but got",e),t}function _e(e){null==e.passiveListener?e.event.cancelable&&(e.canceled=!0,"function"==typeof e.event.preventDefault&&e.event.preventDefault()):"undefined"!=typeof console&&"function"==typeof console.error&&console.error("Unable to preventDefault inside passive event listener invocation.",e.passiveListener)}function ze(e,t){Pe.set(this,{eventTarget:e,event:t,eventPhase:2,currentTarget:e,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:t.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});const r=Object.keys(t);for(let e=0;e<r.length;++e){const t=r[e];t in this||Object.defineProperty(this,t,Be(t))}}function Be(e){return{get(){return Re(this).event[e]},set(t){Re(this).event[e]=t},configurable:!0,enumerable:!0}}function Ae(e){return{value(){const t=Re(this).event;return t[e].apply(t,arguments)},configurable:!0,enumerable:!0}}function Ce(e){if(null==e||e===Object.prototype)return ze;let t=$e.get(e);return null==t&&(t=function(e,t){const r=Object.keys(t);if(0===r.length)return e;function o(t,r){e.call(this,t,r)}o.prototype=Object.create(e.prototype,{constructor:{value:o,configurable:!0,writable:!0}});for(let n=0;n<r.length;++n){const s=r[n];if(!(s in e.prototype)){const e="function"==typeof Object.getOwnPropertyDescriptor(t,s).value;Object.defineProperty(o.prototype,s,e?Ae(s):Be(s))}}return o}(Ce(Object.getPrototypeOf(e)),e),$e.set(e,t)),t}function Ue(e){return Re(e).immediateStopped}function Le(e,t){Re(e).passiveListener=t}ze.prototype={get type(){return Re(this).event.type},get target(){return Re(this).eventTarget},get currentTarget(){return Re(this).currentTarget},composedPath(){const e=Re(this).currentTarget;return null==e?[]:[e]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return Re(this).eventPhase},stopPropagation(){const e=Re(this);e.stopped=!0,"function"==typeof e.event.stopPropagation&&e.event.stopPropagation()},stopImmediatePropagation(){const e=Re(this);e.stopped=!0,e.immediateStopped=!0,"function"==typeof e.event.stopImmediatePropagation&&e.event.stopImmediatePropagation()},get bubbles(){return Boolean(Re(this).event.bubbles)},get cancelable(){return Boolean(Re(this).event.cancelable)},preventDefault(){_e(Re(this))},get defaultPrevented(){return Re(this).canceled},get composed(){return Boolean(Re(this).event.composed)},get timeStamp(){return Re(this).timeStamp},get srcElement(){return Re(this).eventTarget},get cancelBubble(){return Re(this).stopped},set cancelBubble(e){if(!e)return;const t=Re(this);t.stopped=!0,"boolean"==typeof t.event.cancelBubble&&(t.event.cancelBubble=!0)},get returnValue(){return!Re(this).canceled},set returnValue(e){e||_e(Re(this))},initEvent(){}},Object.defineProperty(ze.prototype,"constructor",{value:ze,configurable:!0,writable:!0}),"undefined"!=typeof window&&void 0!==window.Event&&(Object.setPrototypeOf(ze.prototype,window.Event.prototype),$e.set(window.Event.prototype,ze));const qe=new WeakMap,He=3;function Ie(e){return null!==e&&"object"==typeof e}function De(e){const t=qe.get(e);if(null==t)throw new TypeError("'this' is expected an EventTarget object, but got another value.");return t}function Ne(e,t){Object.defineProperty(e,`on${t}`,function(e){return{get(){let t=De(this).get(e);for(;null!=t;){if(t.listenerType===He)return t.listener;t=t.next}return null},set(t){"function"==typeof t||Ie(t)||(t=null);const r=De(this);let o=null,n=r.get(e);for(;null!=n;)n.listenerType===He?null!==o?o.next=n.next:null!==n.next?r.set(e,n.next):r.delete(e):o=n,n=n.next;if(null!==t){const n={listener:t,listenerType:He,passive:!1,once:!1,next:null};null===o?r.set(e,n):o.next=n}},configurable:!0,enumerable:!0}}(t))}function Me(e){function t(){Fe.call(this)}t.prototype=Object.create(Fe.prototype,{constructor:{value:t,configurable:!0,writable:!0}});for(let r=0;r<e.length;++r)Ne(t.prototype,e[r]);return t}function Fe(){if(!(this instanceof Fe)){if(1===arguments.length&&Array.isArray(arguments[0]))return Me(arguments[0]);if(arguments.length>0){const e=new Array(arguments.length);for(let t=0;t<arguments.length;++t)e[t]=arguments[t];return Me(e)}throw new TypeError("Cannot call a class as a function")}qe.set(this,new Map)}Fe.prototype={addEventListener(e,t,r){if(null==t)return;if("function"!=typeof t&&!Ie(t))throw new TypeError("'listener' should be a function or an object.");const o=De(this),n=Ie(r),s=(n?Boolean(r.capture):Boolean(r))?1:2,i={listener:t,listenerType:s,passive:n&&Boolean(r.passive),once:n&&Boolean(r.once),next:null};let a=o.get(e);if(void 0===a)return void o.set(e,i);let l=null;for(;null!=a;){if(a.listener===t&&a.listenerType===s)return;l=a,a=a.next}l.next=i},removeEventListener(e,t,r){if(null==t)return;const o=De(this),n=(Ie(r)?Boolean(r.capture):Boolean(r))?1:2;let s=null,i=o.get(e);for(;null!=i;){if(i.listener===t&&i.listenerType===n)return void(null!==s?s.next=i.next:null!==i.next?o.set(e,i.next):o.delete(e));s=i,i=i.next}},dispatchEvent(e){if(null==e||"string"!=typeof e.type)throw new TypeError('"event.type" should be a string.');const t=De(this),r=e.type;let o=t.get(r);if(null==o)return!0;const n=function(e,t){return new(Ce(Object.getPrototypeOf(t)))(e,t)}(this,e);let s=null;for(;null!=o;){if(o.once?null!==s?s.next=o.next:null!==o.next?t.set(r,o.next):t.delete(r):s=o,Le(n,o.passive?o.listener:null),"function"==typeof o.listener)try{o.listener.call(this,n)}catch(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e)}else o.listenerType!==He&&"function"==typeof o.listener.handleEvent&&o.listener.handleEvent(n);if(Ue(n))break;o=o.next}return Le(n,null),function(e,t){Re(e).eventPhase=t}(n,0),function(e,t){Re(e).currentTarget=t}(n,null),!n.defaultPrevented}},Object.defineProperty(Fe.prototype,"constructor",{value:Fe,configurable:!0,writable:!0}),"undefined"!=typeof window&&void 0!==window.EventTarget&&Object.setPrototypeOf(Fe.prototype,window.EventTarget.prototype);class Ve extends Fe{constructor(){throw super(),new TypeError("AbortSignal cannot be constructed directly")}get aborted(){const e=Ge.get(this);if("boolean"!=typeof e)throw new TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${null===this?"null":typeof this}`);return e}}Ne(Ve.prototype,"abort");const Ge=new WeakMap;Object.defineProperties(Ve.prototype,{aborted:{enumerable:!0}}),"function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(Ve.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortSignal"});class We{constructor(){Ze.set(this,function(){const e=Object.create(Ve.prototype);return Fe.call(e),Ge.set(e,!1),e}())}get signal(){return Ke(this)}abort(){var e;e=Ke(this),!1===Ge.get(e)&&(Ge.set(e,!0),e.dispatchEvent({type:"abort"}))}}const Ze=new WeakMap;function Ke(e){const t=Ze.get(e);if(null==t)throw new TypeError(`Expected 'this' to be an 'AbortController' object, but got ${null===e?"null":typeof e}`);return t}Object.defineProperties(We.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}}),"function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag&&Object.defineProperty(We.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortController"});var Je,Ye=Object.freeze({default:We,AbortController:We,AbortSignal:Ve}),Qe=function(e,t){return e(t={exports:{}},t.exports),t.exports}(function(e,t){!function(e){const t=e=>"undefined"!=typeof self&&self&&e in self?self[e]:"undefined"!=typeof window&&window&&e in window?window[e]:void 0!==d&&d&&e in d?d[e]:"undefined"!=typeof globalThis&&globalThis?globalThis[e]:void 0,r=t("document"),o=t("Headers"),n=t("Request"),s=t("Response"),i=t("ReadableStream"),a=t("fetch"),l=t("AbortController"),c=t("FormData"),u=e=>null!==e&&"object"==typeof e,f="function"==typeof l,p="function"==typeof i,h="function"==typeof c,b=(...e)=>{let t={};for(const r of e)if(Array.isArray(r))Array.isArray(t)||(t=[]),t=[...t,...r];else if(u(r))for(let[e,o]of Object.entries(r))u(o)&&Reflect.has(t,e)&&(o=b(t[e],o)),t={...t,[e]:o};return t},m=["get","post","put","patch","head","delete"],y={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},g=new Set(["get","put","head","delete","options","trace"]),w=new Set([408,413,429,500,502,503,504]),v=new Set([413,429,503]);class k extends Error{constructor(e){super(e.statusText),this.name="HTTPError",this.response=e}}class j extends Error{constructor(){super("Request timed out"),this.name="TimeoutError"}}const x=(e,t,r)=>(r>2147483647&&t(new RangeError("The `timeout` option cannot be greater than 2147483647")),setTimeout(e,r)),E=e=>new Promise((t,r)=>x(t,r,e)),T=(e,t,r)=>new Promise((o,n)=>{const s=x(()=>{f&&r.abort(),n(new j)},n,t);e.then(o).catch(n).then(()=>{clearTimeout(s)})}),O=e=>m.includes(e)?e.toUpperCase():e;class S{constructor(e,{timeout:t=1e4,hooks:i,throwHttpErrors:a=!0,searchParams:u,json:d,...m}){if(this._retryCount=0,this._options={method:"get",credentials:"same-origin",retry:2,...m},e instanceof n)this._input=e,this._options={...this._options,method:m.method||e.method,headers:m.headers||e.headers,body:m.body||e.body,credentials:m.credentials||e.credentials};else{if(this._input=String(e||""),this._options.prefixUrl=String(this._options.prefixUrl||""),this._options.prefixUrl&&this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");if(this._options.prefixUrl&&!this._options.prefixUrl.endsWith("/")&&(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input,u){const e=new URL(this._input,r&&r.baseURI);if("string"==typeof u||URLSearchParams&&u instanceof URLSearchParams)e.search=u;else{if(!Object.values(u).every(e=>"number"==typeof e||"string"==typeof e))throw new Error("The `searchParams` option must be either a string, `URLSearchParams` instance or an object with string and number values");e.search=new URLSearchParams(u).toString()}this._input=e.toString()}}f&&(this.abortController=new l,this._options.signal&&this._options.signal.addEventListener("abort",()=>{this.abortController.abort()}),this._options.signal=this.abortController.signal),this._options.method=O(this._options.method),this._timeout=t,this._hooks=b({beforeRequest:[],afterResponse:[]},i),this._throwHttpErrors=a;const w=new o(this._options.headers||{});if((h&&this._options.body instanceof c||this._options.body instanceof URLSearchParams)&&w.has("content-type"))throw new Error(`The \`content-type\` header cannot be used with a ${this._options.body.constructor.name} body. It will be set automatically.`);if(d){if(this._options.body)throw new Error("The `json` option cannot be used with the `body` option");w.set("content-type","application/json"),this._options.body=JSON.stringify(d)}this._options.headers=w;const v=async()=>{await E(1);let e=await this._fetch();for(const t of this._hooks.afterResponse){const r=await t(e.clone());r instanceof s&&(e=r)}if(!e.ok&&this._throwHttpErrors)throw new k(e);if(this._options.onDownloadProgress){if("function"!=typeof this._options.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!p)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return this._stream(e.clone(),this._options.onDownloadProgress)}return e},j=g.has(this._options.method.toLowerCase())?this._retry(v):v();for(const[e,t]of Object.entries(y))j[e]=async()=>(w.set("accept",t),(await j).clone()[e]());return j}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount<this._options.retry&&!(e instanceof j)){if(e instanceof k){if(!w.has(e.response.status))return 0;const t=e.response.headers.get("Retry-After");if(t&&v.has(e.response.status)){let e=Number(t);return Number.isNaN(e)?e=Date.parse(t)-Date.now():e*=1e3,e}if(413===e.response.status)return 0}return.3*2**(this._retryCount-1)*1e3}return 0}async _retry(e){try{return await e()}catch(t){const r=this._calculateRetryDelay(t);if(0!==r&&this._retryCount>0)return await E(r),this._retry(e);if(this._throwHttpErrors)throw t}}async _fetch(){for(const e of this._hooks.beforeRequest)await e(this._options);return!1===this._timeout?a(this._input,this._options):T(a(this._input,this._options),this._timeout,this.abortController)}_stream(e,t){const r=Number(e.headers.get("content-length"))||0;let o=0;return new s(new i({start(n){const s=e.body.getReader();t&&t({percent:0,transferredBytes:0,totalBytes:r},new Uint8Array),async function e(){const{done:i,value:a}=await s.read();i?n.close():(t&&(o+=a.byteLength,t({percent:0===r?0:o/r,transferredBytes:o,totalBytes:r},a)),n.enqueue(a),e())}()}}))}}const P=(...e)=>{for(const t of e)if((!u(t)||Array.isArray(t))&&void 0!==t)throw new TypeError("The `options` argument must be an object");return b({},...e)},$=e=>{const t=(t,r)=>new S(t,P(e,r));for(const r of m)t[r]=(t,o)=>new S(t,P(e,o,{method:r}));return t.create=e=>$(P(e)),t.extend=t=>$(P(e,t)),t};var R=$();e.HTTPError=k,e.TimeoutError=j,e.default=R,Object.defineProperty(e,"__esModule",{value:!0})}(t)});(Je=Qe)&&Je.__esModule&&Object.prototype.hasOwnProperty.call(Je,"default")&&Je.default;var Xe=h(Se),et=h(Ye);const{URL:tt,URLSearchParams:rt}=e;d.URL||(d.URL=tt),d.URLSearchParams||(d.URLSearchParams=rt),d.fetch||(d.fetch=Xe),d.Headers||(d.Headers=Xe.Headers),d.Request||(d.Request=Xe.Request),d.Response||(d.Response=Xe.Response),d.AbortController||(d.AbortController=et);const{default:ot,HTTPError:nt,TimeoutError:st}=Qe;var it=ot,at=ot,lt=nt,ct=st;it.default=at,it.HTTPError=lt,it.TimeoutError=ct;var ut=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},ft=pt;function pt(e,t){var r=(t=t||{}).delimiter||".",o=t.maxDepth,n={};return function e(s,i,a){a=a||1,Object.keys(s).forEach(function(l){var c=s[l],u=t.safe&&Array.isArray(c),f=Object.prototype.toString.call(c),p=ut(c),d=i?i+r+l:l;if(!u&&!p&&("[object Object]"===f||"[object Array]"===f)&&Object.keys(c).length&&(!t.maxDepth||a<o))return e(c,d,a+1);n[d]=c})}(e),n}pt.flatten=pt,pt.unflatten=function e(t,r){r=r||{};var o=r.delimiter||".";var n=r.overwrite||!1;var s={};var i=ut(t);if(i||"[object Object]"!==Object.prototype.toString.call(t))return t;function a(e){var t=Number(e);return isNaN(t)||-1!==e.indexOf(".")||r.object?e:t}var l=Object.keys(t).sort(function(e,t){return e.length-t.length});l.forEach(function(i){for(var l=i.split(o),c=a(l.shift()),u=a(l[0]),f=s;void 0!==u;){var p=Object.prototype.toString.call(f[c]),d="[object Object]"===p||"[object Array]"===p;if(!n&&!d&&void 0!==f[c])return;(n&&!d||!n&&null==f[c])&&(f[c]="number"!=typeof u||r.object?{}:[]),f=f[c],l.length>0&&(c=a(l.shift()),u=a(l[0]))}f[c]=e(t[i],r)});return s};const dt={FREE:"https://api.microlink.io",PRO:"https://pro.microlink.io"};var ht=function({VERSION:e,MicrolinkError:t,isUrlHttp:r,stringify:o,got:n,flatten:s}){const i=(e={})=>{const t=s(e);return Object.keys(t).reduce((e,r)=>({...e,[`data.${r}`]:t[r]}),{})},a=(e,{rules:t,apiKey:r,endpoint:n,...s}={})=>{const a=!!r;return[`${n||dt[a?"PRO":"FREE"]}?${o({url:e,...i(t),...s})}`,{headers:a?{"x-api-key":r}:{}}]},l=async(e,{encoding:o="utf8",cache:s=!1,retry:i=2,timeout:l=3e4,json:c=!0,...u}={})=>{((e="")=>{if(!r(e)){const r=`The \`url\` as \`${e}\` is not valid. Ensure it has protocol (http or https) and hostname.`;throw new t({url:e,data:{url:r},status:"fail",code:"EINVALURLCLIENT",message:r,more:"https://microlink.io/docs/api/api-parameters/url"})}})(e);const[f,{headers:p}]=a(e,u);return(async(e,r,o)=>{try{const s=await n(r,o),{body:i}=s;return{...i,response:s}}catch(r){if("TimeoutError"===r.name){const r=`The \`url\` as \`${e}\` reached timeout after ${o.retry.maxRetryAfter}ms.`;throw new t({url:e,data:{url:r},status:"fail",code:"ETIMEOUTCLIENT",message:r,more:"https://microlink.io/docs/api/api-parameters/url"})}const n=r.body?"string"==typeof r.body||Buffer.isBuffer(r.body)?JSON.parse(r.body):r.body:{message:r.message,status:"fail"},s=n.data?n.data[Object.keys(n.data)[0]]:n.message,{statusCode:i=500}=r;throw t({...n,message:s,url:e,statusCode:i})}})(e,f,{encoding:o,cache:s,retry:i,timeout:l,headers:p,json:c})};return l.MicrolinkError=t,l.apiUrl=a,l.mapRules=i,l.version=e,l.stream=n.stream,l},bt=h(R);const mt=j("MicrolinkError"),{encode:yt}=bt,{default:gt}=it;return ht({MicrolinkError:mt,isUrlHttp:e=>{try{return new q(e)&&I.test(e)&&H.test(e)}catch(e){return!1}},stringify:yt,got:async(e,{json:t,headers:r,cache:o,...n})=>{try{const t=await gt(e,n),r=await t.json(),{headers:o,status:s,statusText:i}=t;return{url:t.url,body:r,headers:o,statusCode:s,statusMessage:i}}catch(e){throw e.response&&(e.body=await e.response.json(),e.statusCode=e.response.status,e.headers=e.response.headers),e}},flatten:ft,VERSION:"0.4.0"})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("url")):"function"==typeof define&&define.amd?define(["url"],t):(e=e||self).mql=t(e.url)}(this,function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var t=Object.freeze({default:e=>e});const r=(e,t)=>{for(const r of Reflect.ownKeys(t))Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e};var o=r,a=r;o.default=a;var s={isFunction:e=>"function"==typeof e,isString:e=>"string"==typeof e,composeErrorMessage:(e,t)=>`${e}, ${t}`,inherits:(e,t)=>{e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}};const{isFunction:n,composeErrorMessage:i}=s;var c=function(e,...t){Object.assign(e,...t),e.description=n(e.message)?e.message(e):e.message,e.message=e.code?i(e.code,e.description):e.description},l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function u(e){return e&&e.default||e}var d=u(t);const{isString:p}=s;var h=function(e,t){function r(r){const o=new e,a=p(r)?{message:r}:r;return c(o,t,a),o.stack=d(o.stack),o}return r.prototype=e.prototype,o(r,e),r};const{inherits:f}=s,m=/[^0-9a-zA-Z_$]/;var g=function(e){if("string"!=typeof e)throw new TypeError("Expected className to be a string");if(m.test(e))throw new Error("className contains invalid characters");function t(){Object.defineProperty(this,"name",{configurable:!0,value:e,writable:!0}),Error.captureStackTrace(this,this.constructor)}return f(t,Error),o(t,Error),t};const b=e=>(t,r)=>{const o=g(t||e.name);return h(o,r)};var y=b(Error),w=b(TypeError),v=b(RangeError),k=b(EvalError),x=b(SyntaxError),j=b(ReferenceError),_=b(URIError);function $(e){if(!e)return"";var t=decodeURIComponent(e);return"false"!==t&&("true"===t||(0*+t==0?+t:t))}y.type=w,y.range=v,y.eval=k,y.syntax=x,y.reference=j,y.uri=_;var E=Object.freeze({encode:function(e,t){var r,o,a,s="";for(r in e)if(void 0!==(a=e[r]))if(Array.isArray(a))for(o=0;o<a.length;o++)s&&(s+="&"),s+=encodeURIComponent(r)+"="+encodeURIComponent(a[o]);else s&&(s+="&"),s+=encodeURIComponent(r)+"="+encodeURIComponent(a);return(t||"")+s},decode:function(e){for(var t,r,o={},a=e.split("&");t=a.shift();)void 0!==o[r=(t=t.split("=")).shift()]?o[r]=[].concat(o[r],$(t.shift())):o[r]=$(t.shift());return o}});const R=e=>e&&e.includeBoundaries?"(?:(?<=\\s|^)(?=[a-fA-F\\d:])|(?<=[a-fA-F\\d:])(?=\\s|$))":"",z="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",O="[a-fA-F\\d]{1,4}",T=`\n(\n(?:${O}:){7}(?:${O}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:${O}:){6}(?:${z}|:${O}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:${O}:){5}(?::${z}|(:${O}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:${O}:){4}(?:(:${O}){0,1}:${z}|(:${O}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:${O}:){3}(?:(:${O}){0,2}:${z}|(:${O}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:${O}:){2}(?:(:${O}){0,3}:${z}|(:${O}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:${O}:){1}(?:(:${O}){0,4}:${z}|(:${O}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::((?::${O}){0,5}:${z}|(?::${O}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(%[0-9a-zA-Z]{1,})? // %eth0 %1\n`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),U=e=>e&&e.exact?new RegExp(`(?:^${z}$)|(?:^${T}$)`):new RegExp(`(?:${R(e)}${z}${R(e)})|(?:${R(e)}${T}${R(e)})`,"g");U.v4=e=>e&&e.exact?new RegExp(`^${z}$`):new RegExp(`${R(e)}${z}${R(e)}`,"g"),U.v6=e=>e&&e.exact?new RegExp(`^${T}$`):new RegExp(`${R(e)}${T}${R(e)}`,"g");var S=U,C=["aaa","aarp","abarth","abb","abbott","abbvie","abc","able","abogado","abudhabi","ac","academy","accenture","accountant","accountants","aco","active","actor","ad","adac","ads","adult","ae","aeg","aero","aetna","af","afamilycompany","afl","africa","ag","agakhan","agency","ai","aig","aigo","airbus","airforce","airtel","akdn","al","alfaromeo","alibaba","alipay","allfinanz","allstate","ally","alsace","alstom","am","americanexpress","americanfamily","amex","amfam","amica","amsterdam","analytics","android","anquan","anz","ao","aol","apartments","app","apple","aq","aquarelle","ar","arab","aramco","archi","army","arpa","art","arte","as","asda","asia","associates","at","athleta","attorney","au","auction","audi","audible","audio","auspost","author","auto","autos","avianca","aw","aws","ax","axa","az","azure","ba","baby","baidu","banamex","bananarepublic","band","bank","bar","barcelona","barclaycard","barclays","barefoot","bargains","baseball","basketball","bauhaus","bayern","bb","bbc","bbt","bbva","bcg","bcn","bd","be","beats","beauty","beer","bentley","berlin","best","bestbuy","bet","bf","bg","bh","bharti","bi","bible","bid","bike","bing","bingo","bio","biz","bj","black","blackfriday","blanco","blockbuster","blog","bloomberg","blue","bm","bms","bmw","bn","bnl","bnpparibas","bo","boats","boehringer","bofa","bom","bond","boo","book","booking","bosch","bostik","boston","bot","boutique","box","br","bradesco","bridgestone","broadway","broker","brother","brussels","bs","bt","budapest","bugatti","build","builders","business","buy","buzz","bv","bw","by","bz","bzh","ca","cab","cafe","cal","call","calvinklein","cam","camera","camp","cancerresearch","canon","capetown","capital","capitalone","car","caravan","cards","care","career","careers","cars","cartier","casa","case","caseih","cash","casino","cat","catering","catholic","cba","cbn","cbre","cbs","cc","cd","ceb","center","ceo","cern","cf","cfa","cfd","cg","ch","chanel","channel","chase","chat","cheap","chintai","christmas","chrome","chrysler","church","ci","cipriani","circle","cisco","citadel","citi","citic","city","cityeats","ck","cl","claims","cleaning","click","clinic","clinique","clothing","cloud","club","clubmed","cm","cn","co","coach","codes","coffee","college","cologne","com","comcast","commbank","community","company","compare","computer","comsec","condos","construction","consulting","contact","contractors","cooking","cookingchannel","cool","coop","corsica","country","coupon","coupons","courses","cr","credit","creditcard","creditunion","cricket","crown","crs","cruise","cruises","csc","cu","cuisinella","cv","cw","cx","cy","cymru","cyou","cz","dabur","dad","dance","data","date","dating","datsun","day","dclk","dds","de","deal","dealer","deals","degree","delivery","dell","deloitte","delta","democrat","dental","dentist","desi","design","dev","dhl","diamonds","diet","digital","direct","directory","discount","discover","dish","diy","dj","dk","dm","dnp","do","docs","doctor","dodge","dog","doha","domains","dot","download","drive","dtv","dubai","duck","dunlop","duns","dupont","durban","dvag","dvr","dz","earth","eat","ec","eco","edeka","edu","education","ee","eg","email","emerck","energy","engineer","engineering","enterprises","epost","epson","equipment","er","ericsson","erni","es","esq","estate","esurance","et","etisalat","eu","eurovision","eus","events","everbank","exchange","expert","exposed","express","extraspace","fage","fail","fairwinds","faith","family","fan","fans","farm","farmers","fashion","fast","fedex","feedback","ferrari","ferrero","fi","fiat","fidelity","fido","film","final","finance","financial","fire","firestone","firmdale","fish","fishing","fit","fitness","fj","fk","flickr","flights","flir","florist","flowers","fly","fm","fo","foo","food","foodnetwork","football","ford","forex","forsale","forum","foundation","fox","fr","free","fresenius","frl","frogans","frontdoor","frontier","ftr","fujitsu","fujixerox","fun","fund","furniture","futbol","fyi","ga","gal","gallery","gallo","gallup","game","games","gap","garden","gb","gbiz","gd","gdn","ge","gea","gent","genting","george","gf","gg","ggee","gh","gi","gift","gifts","gives","giving","gl","glade","glass","gle","global","globo","gm","gmail","gmbh","gmo","gmx","gn","godaddy","gold","goldpoint","golf","goo","goodhands","goodyear","goog","google","gop","got","gov","gp","gq","gr","grainger","graphics","gratis","green","gripe","grocery","group","gs","gt","gu","guardian","gucci","guge","guide","guitars","guru","gw","gy","hair","hamburg","hangout","haus","hbo","hdfc","hdfcbank","health","healthcare","help","helsinki","here","hermes","hgtv","hiphop","hisamitsu","hitachi","hiv","hk","hkt","hm","hn","hockey","holdings","holiday","homedepot","homegoods","homes","homesense","honda","honeywell","horse","hospital","host","hosting","hot","hoteles","hotels","hotmail","house","how","hr","hsbc","ht","hu","hughes","hyatt","hyundai","ibm","icbc","ice","icu","id","ie","ieee","ifm","ikano","il","im","imamat","imdb","immo","immobilien","in","industries","infiniti","info","ing","ink","institute","insurance","insure","int","intel","international","intuit","investments","io","ipiranga","iq","ir","irish","is","iselect","ismaili","ist","istanbul","it","itau","itv","iveco","iwc","jaguar","java","jcb","jcp","je","jeep","jetzt","jewelry","jio","jlc","jll","jm","jmp","jnj","jo","jobs","joburg","jot","joy","jp","jpmorgan","jprs","juegos","juniper","kaufen","kddi","ke","kerryhotels","kerrylogistics","kerryproperties","kfh","kg","kh","ki","kia","kim","kinder","kindle","kitchen","kiwi","km","kn","koeln","komatsu","kosher","kp","kpmg","kpn","kr","krd","kred","kuokgroup","kw","ky","kyoto","kz","la","lacaixa","ladbrokes","lamborghini","lamer","lancaster","lancia","lancome","land","landrover","lanxess","lasalle","lat","latino","latrobe","law","lawyer","lb","lc","lds","lease","leclerc","lefrak","legal","lego","lexus","lgbt","li","liaison","lidl","life","lifeinsurance","lifestyle","lighting","like","lilly","limited","limo","lincoln","linde","link","lipsy","live","living","lixil","lk","llc","loan","loans","locker","locus","loft","lol","london","lotte","lotto","love","lpl","lplfinancial","lr","ls","lt","ltd","ltda","lu","lundbeck","lupin","luxe","luxury","lv","ly","ma","macys","madrid","maif","maison","makeup","man","management","mango","map","market","marketing","markets","marriott","marshalls","maserati","mattel","mba","mc","mckinsey","md","me","med","media","meet","melbourne","meme","memorial","men","menu","meo","merckmsd","metlife","mg","mh","miami","microsoft","mil","mini","mint","mit","mitsubishi","mk","ml","mlb","mls","mm","mma","mn","mo","mobi","mobile","mobily","moda","moe","moi","mom","monash","money","monster","mopar","mormon","mortgage","moscow","moto","motorcycles","mov","movie","movistar","mp","mq","mr","ms","msd","mt","mtn","mtr","mu","museum","mutual","mv","mw","mx","my","mz","na","nab","nadex","nagoya","name","nationwide","natura","navy","nba","nc","ne","nec","net","netbank","netflix","network","neustar","new","newholland","news","next","nextdirect","nexus","nf","nfl","ng","ngo","nhk","ni","nico","nike","nikon","ninja","nissan","nissay","nl","no","nokia","northwesternmutual","norton","now","nowruz","nowtv","np","nr","nra","nrw","ntt","nu","nyc","nz","obi","observer","off","office","okinawa","olayan","olayangroup","oldnavy","ollo","om","omega","one","ong","onl","online","onyourside","ooo","open","oracle","orange","org","organic","origins","osaka","otsuka","ott","ovh","pa","page","panasonic","panerai","paris","pars","partners","parts","party","passagens","pay","pccw","pe","pet","pf","pfizer","pg","ph","pharmacy","phd","philips","phone","photo","photography","photos","physio","piaget","pics","pictet","pictures","pid","pin","ping","pink","pioneer","pizza","pk","pl","place","play","playstation","plumbing","plus","pm","pn","pnc","pohl","poker","politie","porn","post","pr","pramerica","praxi","press","prime","pro","prod","productions","prof","progressive","promo","properties","property","protection","pru","prudential","ps","pt","pub","pw","pwc","py","qa","qpon","quebec","quest","qvc","racing","radio","raid","re","read","realestate","realtor","realty","recipes","red","redstone","redumbrella","rehab","reise","reisen","reit","reliance","ren","rent","rentals","repair","report","republican","rest","restaurant","review","reviews","rexroth","rich","richardli","ricoh","rightathome","ril","rio","rip","rmit","ro","rocher","rocks","rodeo","rogers","room","rs","rsvp","ru","rugby","ruhr","run","rw","rwe","ryukyu","sa","saarland","safe","safety","sakura","sale","salon","samsclub","samsung","sandvik","sandvikcoromant","sanofi","sap","sapo","sarl","sas","save","saxo","sb","sbi","sbs","sc","sca","scb","schaeffler","schmidt","scholarships","school","schule","schwarz","science","scjohnson","scor","scot","sd","se","search","seat","secure","security","seek","select","sener","services","ses","seven","sew","sex","sexy","sfr","sg","sh","shangrila","sharp","shaw","shell","shia","shiksha","shoes","shop","shopping","shouji","show","showtime","shriram","si","silk","sina","singles","site","sj","sk","ski","skin","sky","skype","sl","sling","sm","smart","smile","sn","sncf","so","soccer","social","softbank","software","sohu","solar","solutions","song","sony","soy","space","spiegel","sport","spot","spreadbetting","sr","srl","srt","st","stada","staples","star","starhub","statebank","statefarm","statoil","stc","stcgroup","stockholm","storage","store","stream","studio","study","style","su","sucks","supplies","supply","support","surf","surgery","suzuki","sv","swatch","swiftcover","swiss","sx","sy","sydney","symantec","systems","sz","tab","taipei","talk","taobao","target","tatamotors","tatar","tattoo","tax","taxi","tc","tci","td","tdk","team","tech","technology","tel","telecity","telefonica","temasek","tennis","teva","tf","tg","th","thd","theater","theatre","tiaa","tickets","tienda","tiffany","tips","tires","tirol","tj","tjmaxx","tjx","tk","tkmaxx","tl","tm","tmall","tn","to","today","tokyo","tools","top","toray","toshiba","total","tours","town","toyota","toys","tr","trade","trading","training","travel","travelchannel","travelers","travelersinsurance","trust","trv","tt","tube","tui","tunes","tushu","tv","tvs","tw","tz","ua","ubank","ubs","uconnect","ug","uk","unicom","university","uno","uol","ups","us","uy","uz","va","vacations","vana","vanguard","vc","ve","vegas","ventures","verisign","versicherung","vet","vg","vi","viajes","video","vig","viking","villas","vin","vip","virgin","visa","vision","vista","vistaprint","viva","vivo","vlaanderen","vn","vodka","volkswagen","volvo","vote","voting","voto","voyage","vu","vuelos","wales","walmart","walter","wang","wanggou","warman","watch","watches","weather","weatherchannel","webcam","weber","website","wed","wedding","weibo","weir","wf","whoswho","wien","wiki","williamhill","win","windows","wine","winners","wme","wolterskluwer","woodside","work","works","world","wow","ws","wtc","wtf","xbox","xerox","xfinity","xihuan","xin","कॉम","セール","佛山","ಭಾರತ","慈善","集团","在线","한국","ଭାରତ","大众汽车","点看","คอม","ভাৰত","ভারত","八卦","موقع","বাংলা","公益","公司","香格里拉","网站","移动","我爱你","москва","қаз","католик","онлайн","сайт","联通","срб","бг","бел","קום","时尚","微博","淡马锡","ファッション","орг","नेट","ストア","삼성","சிங்கப்பூர்","商标","商店","商城","дети","мкд","ею","ポイント","新闻","工行","家電","كوم","中文网","中信","中国","中國","娱乐","谷歌","భారత్","ලංකා","電訊盈科","购物","クラウド","ભારત","通販","भारतम्","भारत","भारोत","网店","संगठन","餐厅","网络","ком","укр","香港","诺基亚","食品","飞利浦","台湾","台灣","手表","手机","мон","الجزائر","عمان","ارامكو","ایران","العليان","اتصالات","امارات","بازار","پاکستان","الاردن","موبايلي","بارت","بھارت","المغرب","ابوظبي","السعودية","ڀارت","كاثوليك","سودان","همراه","عراق","مليسيا","澳門","닷컴","政府","شبكة","بيتك","عرب","გე","机构","组织机构","健康","ไทย","سورية","招聘","рус","рф","珠宝","تونس","大拿","みんな","グーグル","ελ","世界","書籍","ഭാരതം","ਭਾਰਤ","网址","닷넷","コム","天主教","游戏","vermögensberater","vermögensberatung","企业","信息","嘉里大酒店","嘉里","مصر","قطر","广东","இலங்கை","இந்தியா","հայ","新加坡","فلسطين","政务","xperia","xxx","xyz","yachts","yahoo","yamaxun","yandex","ye","yodobashi","yoga","yokohama","you","youtube","yt","yun","za","zappos","zara","zero","zip","zippo","zm","zone","zuerich","zw"];const P=l.window?window.URL:e.URL,q=(e=>{const t=`(?:${`(?:(?:[a-z]+:)?//)${(e={strict:!0,...e}).strict?"":"?"}`}|www\\.)(?:\\S+(?::\\S*)?@)?(?:localhost|${S.v4().source}|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*${`(?:\\.${e.strict?"(?:[a-z\\u00a1-\\uffff]{2,})":`(?:${C.sort((e,t)=>t.length-e.length).join("|")})`})\\.?`})(?::\\d{2,5})?(?:[/?#][^\\s"]*)?`;return e.exact?new RegExp(`(?:^${t}$)`,"i"):new RegExp(t,"ig")})({exact:!0}),A=/^https?:\/\//i;var N,L=function(e,t){return e(t={exports:{}},t.exports),t.exports}(function(e,t){!function(e){const t=e=>"undefined"!=typeof self&&self&&e in self?self[e]:"undefined"!=typeof window&&window&&e in window?window[e]:void 0!==l&&l&&e in l?l[e]:"undefined"!=typeof globalThis&&globalThis?globalThis[e]:void 0,r=t("document"),o=t("Headers"),a=t("Request"),s=t("Response"),n=t("ReadableStream"),i=t("fetch"),c=t("AbortController"),u=t("FormData"),d=e=>null!==e&&"object"==typeof e,p="function"==typeof c,h="function"==typeof n,f="function"==typeof u,m=(...e)=>{let t={};for(const r of e)if(Array.isArray(r))Array.isArray(t)||(t=[]),t=[...t,...r];else if(d(r))for(let[e,o]of Object.entries(r))d(o)&&Reflect.has(t,e)&&(o=m(t[e],o)),t={...t,[e]:o};return t},g=["get","post","put","patch","head","delete"],b={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},y=new Set(["get","put","head","delete","options","trace"]),w=new Set([408,413,429,500,502,503,504]),v=new Set([413,429,503]);class k extends Error{constructor(e){super(e.statusText),this.name="HTTPError",this.response=e}}class x extends Error{constructor(){super("Request timed out"),this.name="TimeoutError"}}const j=(e,t,r)=>(r>2147483647&&t(new RangeError("The `timeout` option cannot be greater than 2147483647")),setTimeout(e,r)),_=e=>new Promise((t,r)=>j(t,r,e)),$=(e,t,r)=>new Promise((o,a)=>{const s=j(()=>{p&&r.abort(),a(new x)},a,t);e.then(o).catch(a).then(()=>{clearTimeout(s)})}),E=e=>g.includes(e)?e.toUpperCase():e;class R{constructor(e,{timeout:t=1e4,hooks:n,throwHttpErrors:i=!0,searchParams:l,json:d,...g}){if(this._retryCount=0,this._options={method:"get",credentials:"same-origin",retry:2,...g},e instanceof a)this._input=e,this._options={...this._options,method:g.method||e.method,headers:g.headers||e.headers,body:g.body||e.body,credentials:g.credentials||e.credentials};else{if(this._input=String(e||""),this._options.prefixUrl=String(this._options.prefixUrl||""),this._options.prefixUrl&&this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");if(this._options.prefixUrl&&!this._options.prefixUrl.endsWith("/")&&(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input,l){const e=new URL(this._input,r&&r.baseURI);if("string"==typeof l||URLSearchParams&&l instanceof URLSearchParams)e.search=l;else{if(!Object.values(l).every(e=>"number"==typeof e||"string"==typeof e))throw new Error("The `searchParams` option must be either a string, `URLSearchParams` instance or an object with string and number values");e.search=new URLSearchParams(l).toString()}this._input=e.toString()}}p&&(this.abortController=new c,this._options.signal&&this._options.signal.addEventListener("abort",()=>{this.abortController.abort()}),this._options.signal=this.abortController.signal),this._options.method=E(this._options.method),this._timeout=t,this._hooks=m({beforeRequest:[],afterResponse:[]},n),this._throwHttpErrors=i;const w=new o(this._options.headers||{});if((f&&this._options.body instanceof u||this._options.body instanceof URLSearchParams)&&w.has("content-type"))throw new Error(`The \`content-type\` header cannot be used with a ${this._options.body.constructor.name} body. It will be set automatically.`);if(d){if(this._options.body)throw new Error("The `json` option cannot be used with the `body` option");w.set("content-type","application/json"),this._options.body=JSON.stringify(d)}this._options.headers=w;const v=async()=>{await _(1);let e=await this._fetch();for(const t of this._hooks.afterResponse){const r=await t(e.clone());r instanceof s&&(e=r)}if(!e.ok&&this._throwHttpErrors)throw new k(e);if(this._options.onDownloadProgress){if("function"!=typeof this._options.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!h)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return this._stream(e.clone(),this._options.onDownloadProgress)}return e},x=y.has(this._options.method.toLowerCase())?this._retry(v):v();for(const[e,t]of Object.entries(b))x[e]=async()=>(w.set("accept",t),(await x).clone()[e]());return x}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount<this._options.retry&&!(e instanceof x)){if(e instanceof k){if(!w.has(e.response.status))return 0;const t=e.response.headers.get("Retry-After");if(t&&v.has(e.response.status)){let e=Number(t);return Number.isNaN(e)?e=Date.parse(t)-Date.now():e*=1e3,e}if(413===e.response.status)return 0}return.3*2**(this._retryCount-1)*1e3}return 0}async _retry(e){try{return await e()}catch(t){const r=this._calculateRetryDelay(t);if(0!==r&&this._retryCount>0)return await _(r),this._retry(e);if(this._throwHttpErrors)throw t}}async _fetch(){for(const e of this._hooks.beforeRequest)await e(this._options);return!1===this._timeout?i(this._input,this._options):$(i(this._input,this._options),this._timeout,this.abortController)}_stream(e,t){const r=Number(e.headers.get("content-length"))||0;let o=0;return new s(new n({start(a){const s=e.body.getReader();t&&t({percent:0,transferredBytes:0,totalBytes:r},new Uint8Array),async function e(){const{done:n,value:i}=await s.read();n?a.close():(t&&(o+=i.byteLength,t({percent:0===r?0:o/r,transferredBytes:o,totalBytes:r},i)),a.enqueue(i),e())}()}}))}}const z=(...e)=>{for(const t of e)if((!d(t)||Array.isArray(t))&&void 0!==t)throw new TypeError("The `options` argument must be an object");return m({},...e)},O=e=>{const t=(t,r)=>new R(t,z(e,r));for(const r of g)t[r]=(t,o)=>new R(t,z(e,o,{method:r}));return t.create=e=>O(z(e)),t.extend=t=>O(z(e,t)),t};var T=O();e.HTTPError=k,e.TimeoutError=x,e.default=T,Object.defineProperty(e,"__esModule",{value:!0})}(t)});(N=L)&&N.__esModule&&Object.prototype.hasOwnProperty.call(N,"default")&&N.default;var I=L,D=function(e){return null!=e&&null!=e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},B=M;function M(e,t){var r=(t=t||{}).delimiter||".",o=t.maxDepth,a={};return function e(s,n,i){i=i||1,Object.keys(s).forEach(function(c){var l=s[c],u=t.safe&&Array.isArray(l),d=Object.prototype.toString.call(l),p=D(l),h=n?n+r+c:c;if(!u&&!p&&("[object Object]"===d||"[object Array]"===d)&&Object.keys(l).length&&(!t.maxDepth||i<o))return e(l,h,i+1);a[h]=l})}(e),a}M.flatten=M,M.unflatten=function e(t,r){r=r||{};var o=r.delimiter||".";var a=r.overwrite||!1;var s={};var n=D(t);if(n||"[object Object]"!==Object.prototype.toString.call(t))return t;function i(e){var t=Number(e);return isNaN(t)||-1!==e.indexOf(".")||r.object?e:t}var c=Object.keys(t).sort(function(e,t){return e.length-t.length});c.forEach(function(n){for(var c=n.split(o),l=i(c.shift()),u=i(c[0]),d=s;void 0!==u;){var p=Object.prototype.toString.call(d[l]),h="[object Object]"===p||"[object Array]"===p;if(!a&&!h&&void 0!==d[l])return;(a&&!h||!a&&null==d[l])&&(d[l]="number"!=typeof u||r.object?{}:[]),d=d[l],c.length>0&&(l=i(c.shift()),u=i(c[0]))}d[l]=e(t[n],r)});return s};const H={FREE:"https://api.microlink.io",PRO:"https://pro.microlink.io"};var F=function({VERSION:e,MicrolinkError:t,isUrlHttp:r,stringify:o,got:a,flatten:s}){const n=(e={})=>{const t=s(e);return Object.keys(t).reduce((e,r)=>({...e,[`data.${r}`]:t[r]}),{})},i=(e,{rules:t,apiKey:r,endpoint:a,...s}={})=>{const i=!!r;return[`${a||H[i?"PRO":"FREE"]}?${o({url:e,...n(t),...s})}`,{headers:i?{"x-api-key":r}:{}}]},c=async(e,{encoding:o="utf8",cache:s=!1,retry:n=2,timeout:c=3e4,json:l=!0,...u}={})=>{((e="")=>{if(!r(e)){const r=`The \`url\` as \`${e}\` is not valid. Ensure it has protocol (http or https) and hostname.`;throw new t({url:e,data:{url:r},status:"fail",code:"EINVALURLCLIENT",message:r,more:"https://microlink.io/docs/api/api-parameters/url"})}})(e);const[d,{headers:p}]=i(e,u);return(async(e,r,o)=>{try{const s=await a(r,o),{body:n}=s;return{...n,response:s}}catch(r){if("TimeoutError"===r.name){const r=`The \`url\` as \`${e}\` reached timeout after ${o.retry.maxRetryAfter}ms.`;throw new t({url:e,data:{url:r},status:"fail",code:"ETIMEOUTCLIENT",message:r,more:"https://microlink.io/docs/api/api-parameters/url"})}const a=r.body?"string"==typeof r.body||Buffer.isBuffer(r.body)?JSON.parse(r.body):r.body:{message:r.message,status:"fail"},s=a.data?a.data[Object.keys(a.data)[0]]:a.message,{statusCode:n=500}=r;throw t({...a,message:s,url:e,statusCode:n})}})(e,d,{encoding:o,cache:s,retry:n,timeout:c,headers:p,json:l})};return c.MicrolinkError=t,c.apiUrl=i,c.mapRules=n,c.version=e,c.stream=a.stream,c},V=u(E);const J=y("MicrolinkError"),{encode:K}=V,{default:W}=I;return F({MicrolinkError:J,isUrlHttp:e=>{try{return new P(e)&&A.test(e)&&q.test(e)}catch(e){return!1}},stringify:K,got:async(e,{json:t,headers:r,cache:o,...a})=>{try{const t=await W(e,a),r=await t.json(),{headers:o,status:s,statusText:n}=t;return{url:t.url,body:r,headers:o,statusCode:s,statusMessage:n}}catch(e){throw e.response&&(e.body=await e.response.json(),e.statusCode=e.response.status,e.headers=e.response.headers),e}},flatten:B,VERSION:"0.4.1"})});
//# sourceMappingURL=mql.min.js.map

@@ -5,3 +5,3 @@ {

"homepage": "https://nicedoc.io/microlinkhq/mql",
"version": "0.4.0",
"version": "0.4.1",
"browser": "src/browser.js",

@@ -8,0 +8,0 @@ "main": "src/node.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc