From 417f46044b784d6b8669688e6409109816cca224 Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Fri, 29 Mar 2019 19:14:20 +0100 Subject: [PATCH] chore(release): 0.3.2 --- CHANGELOG.md | 5 +++++ package.json | 2 +- src/umd.min.js | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45599bb..9f5de1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [0.3.2](https://github.com/microlinkhq/mql/compare/v0.3.1...v0.3.2) (2019-03-29) + + + ## [0.3.1](https://github.com/microlinkhq/mql/compare/v0.3.0...v0.3.1) (2019-03-29) diff --git a/package.json b/package.json index 982fca9..3cbbcaf 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@microlink/mql", "description": "Microlink Query Language", "homepage": "https://nicedoc.io/microlinkhq/mql", - "version": "0.3.1", + "version": "0.3.2", "browser": "src/browser.js", "main": "src/node.js", "bin": { diff --git a/src/umd.min.js b/src/umd.min.js index bdfb98d..cfa44ba 100644 --- a/src/umd.min.js +++ b/src/umd.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).mql=e()}(this,function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e,r,n,o,a,i){try{var s=t[a](i),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,o)}function r(t){return function(){var r=this,n=arguments;return new Promise(function(o,a){var i=t.apply(r,n);function s(t){e(i,o,a,s,u,"next",t)}function u(t){e(i,o,a,s,u,"throw",t)}s(void 0)})}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var r=0;r=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function p(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function y(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,o=!1,a=void 0;try{for(var i,s=t[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(t){o=!0,a=t}finally{try{n||null==s.return||s.return()}finally{if(o)throw a}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function m(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),c=a.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:C(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),m}}}function w(t,e,r,n){var o=e&&e.prototype instanceof j?e:j,a=Object.create(o.prototype),i=new L(n||[]);return a._invoke=function(t,e,r){var n=f;return function(o,a){if(n===p)throw new Error("Generator is already running");if(n===y){if("throw"===o)throw a;return P()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var s=R(i,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var u=x(t,e,r);if("normal"===u.type){if(n=r.done?y:l,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=y,r.method="throw",r.arg=u.arg)}}}(t,r,i),a}function x(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}function j(){}function O(){}function _(){}function E(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function k(e){var r;this._invoke=function(n,o){function i(){return new Promise(function(r,i){!function r(n,o,i,s){var u=x(e[n],e,o);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"===t(h)&&a.call(h,"__await")?Promise.resolve(h.__await).then(function(t){r("next",t,i,s)},function(t){r("throw",t,i,s)}):Promise.resolve(h).then(function(t){c.value=t,i(c)},function(t){return r("throw",t,i,s)})}s(u.arg)}(n,o,r,i)})}return r=r?r.then(i,i):i()}}function R(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,R(t,e),"throw"===e.method))return m;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=x(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,m;var a=o.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,m):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function C(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r=0,x=w&&g.regeneratorRuntime;g.regeneratorRuntime=void 0;var j=b;if(w)g.regeneratorRuntime=x;else try{delete g.regeneratorRuntime}catch(t){g.regeneratorRuntime=void 0}var O=j;var _=2147483647,E=36,k=1,R=26,A=38,S=700,L=72,C=128,P="-",U=/[^\x20-\x7E]/,T=/[\x2E\u3002\uFF0E\uFF61]/g,I={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},q=E-k,N=Math.floor,F=String.fromCharCode;function D(t){throw new RangeError(I[t])}function H(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function G(t,e,r){var n=0;for(t=r?N(t/S):t>>1,t+=N(t/e);t>q*R>>1;n+=E)t=N(t/q);return N(n+(q+1)*t/(t+A))}function M(t){return function(t,e){var r=t.split("@"),n="";r.length>1&&(n=r[0]+"@",t=r[1]);var o=function(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}((t=t.replace(T,".")).split("."),e).join(".");return n+o}(t,function(t){return U.test(t)?"xn--"+function(t){var e,r,n,o,a,i,s,u,c,h,f,l,p,y,m,v=[];for(l=(t=function(t){for(var e,r,n=[],o=0,a=t.length;o=55296&&e<=56319&&o=e&&fN((_-r)/(p=n+1))&&D("overflow"),r+=(s-e)*p,e=s,i=0;i_&&D("overflow"),f==e){for(u=r,c=E;!(u<(h=c<=a?k:c>=a+R?R:c-a));c+=E)m=u-h,y=E-h,v.push(F(H(h+m%y,0))),u=N(m/y);v.push(F(H(u,0))),a=G(r,p,n==o),r=0,++n}++r,++e}return v.join("")}(t):t})}global.setTimeout,global.clearTimeout;var z=global.performance||{};z.now||z.mozNow||z.msNow||z.oNow||z.webkitNow;function $(t){return null===t}function B(t){return"string"==typeof t}function K(e){return"object"===t(e)&&null!==e}function W(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Y=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function Z(e){switch(t(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}}function J(t,e){if(t.map)return t.map(e);for(var r=[],n=0;n0&&s>i&&(s=i);for(var u=0;u=0?(c=p.substr(0,y),h=p.substr(y+1)):(c=p,h=""),f=decodeURIComponent(c),l=decodeURIComponent(h),W(o,f)?Y(o[f])?o[f].push(l):o[f]=[o[f],l]:o[f]=l}return o}var X={parse:yt,resolve:function(t,e){return yt(t,!1,!0).resolve(e)},resolveObject:function(t,e){return t?yt(t,!1,!0).resolveObject(e):e},format:function(t){B(t)&&(t=mt({},t));return vt(t)},Url:tt};function tt(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var et=/^([a-z0-9.+-]+:)/i,rt=/:[0-9]*$/,nt=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,ot=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),at=["'"].concat(ot),it=["%","/","?",";","#"].concat(at),st=["/","?","#"],ut=255,ct=/^[+a-z0-9A-Z_-]{0,63}$/,ht=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,ft={javascript:!0,"javascript:":!0},lt={javascript:!0,"javascript:":!0},pt={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function yt(t,e,r){if(t&&K(t)&&t instanceof tt)return t;var n=new tt;return n.parse(t,e,r),n}function mt(e,r,n,o){if(!B(r))throw new TypeError("Parameter 'url' must be a string, not "+t(r));var a=r.indexOf("?"),i=-1!==a&&a127?O+="x":O+=j[_];if(!O.match(ct)){var k=x.slice(0,h),R=x.slice(h+1),A=j.match(ht);A&&(k.push(A[1]),R.unshift(A[2])),R.length&&(u="/"+R.join(".")+u),e.hostname=k.join(".");break}}}}e.hostname.length>ut?e.hostname="":e.hostname=e.hostname.toLowerCase(),w||(e.hostname=M(e.hostname)),p=e.port?":"+e.port:"";var S=e.hostname||"";e.host=S+p,e.href+=e.host,w&&(e.hostname=e.hostname.substr(1,e.hostname.length-2),"/"!==u[0]&&(u="/"+u))}if(!ft[m])for(h=0,l=at.length;h0)&&n.host.split("@"))&&(n.auth=m.shift(),n.host=n.hostname=m.shift())),n.search=t.search,n.query=t.query,$(n.pathname)&&$(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!w.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var j=w.slice(-1)[0],O=(n.host||t.host||w.length>1)&&("."===j||".."===j)||""===j,_=0,E=w.length;E>=0;E--)"."===(j=w[E])?w.splice(E,1):".."===j?(w.splice(E,1),_++):_&&(w.splice(E,1),_--);if(!b&&!g)for(;_--;_)w.unshift("..");!b||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),O&&"/"!==w.join("/").substr(-1)&&w.push("");var k=""===w[0]||w[0]&&"/"===w[0].charAt(0);return x&&(n.hostname=n.host=k?"":w.length?w.shift():"",(m=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=m.shift(),n.host=n.hostname=m.shift())),(b=b||n.host&&w.length)&&!k&&w.unshift(""),w.length?n.pathname=w.join("/"):(n.pathname=null,n.path=null),$(n.pathname)&&$(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},tt.prototype.parseHost=function(){return dt(this)};var bt=v.window?window.URL:X.URL,gt=/^https?:\/\//i,wt=function(t){return"undefined"!=typeof self&&self&&t in self?self[t]:"undefined"!=typeof window&&window&&t in window?window[t]:"undefined"!=typeof global&&global&&t in global?global[t]:"undefined"!=typeof globalThis&&globalThis?globalThis[t]:void 0},xt=wt("document"),jt=wt("Headers"),Ot=wt("Response"),_t=wt("fetch"),Et=wt("AbortController"),kt=function(e){return null!==e&&"object"===t(e)},Rt="function"==typeof wt("AbortController"),At=function t(){for(var e={},r=arguments.length,n=new Array(r),o=0;o0)){t.next=13;break}return t.next=12,qt(r);case 12:return t.abrupt("return",this._retry(e));case 13:if(!this._throwHttpErrors){t.next=15;break}throw t.t0;case 15:case"end":return t.stop()}},t,this,[[0,6]])}));return function(e){return t.apply(this,arguments)}}()},{key:"_fetch",value:function(){var t=r(O.mark(function t(){var e,r,n,o,a,i;return O.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:e=!0,r=!1,n=void 0,t.prev=3,o=this._hooks.beforeRequest[Symbol.iterator]();case 5:if(e=(a=o.next()).done){t.next=12;break}return i=a.value,t.next=9,i(this._options);case 9:e=!0,t.next=5;break;case 12:t.next=18;break;case 14:t.prev=14,t.t0=t.catch(3),r=!0,n=t.t0;case 18:t.prev=18,t.prev=19,e||null==o.return||o.return();case 21:if(t.prev=21,!r){t.next=24;break}throw n;case 24:return t.finish(21);case 25:return t.finish(18);case 26:return t.abrupt("return",Nt(_t(this._input,this._options),this._timeout,this.abortController));case 27:case"end":return t.stop()}},t,this,[[3,14,18,26],[19,,21,25]])}));return function(){return t.apply(this,arguments)}}()}])&&o(e.prototype,a),s&&o(e,s),t}(),Ht=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!kt(e)||Array.isArray(e))throw new TypeError("The `defaultOptions` argument must be an object");for(var r=function(t,r){return new Dt(t,At({},e,r))},n=function(){var t=St[o];r[t]=function(r,n){return new Dt(r,At({},e,n,{method:t}))}},o=0;o0&&(c=s(u.shift()),h=s(u[0]))}f[c]=t(e[i],r)});return a},require("./factory")({MicrolinkError:require("whoops")("MicrolinkError"),isUrlHttp:function(t){try{return new bt(t)&>.test(t)}catch(t){return!1}},stringify:function(t,e){var r,n,o,a="";for(r in t)if(void 0!==(o=t[r]))if(Array.isArray(o))for(n=0;n=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function p(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function y(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,o=!1,a=void 0;try{for(var i,s=t[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(t){o=!0,a=t}finally{try{n||null==s.return||s.return()}finally{if(o)throw a}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function m(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=a.call(i,"catchLoc"),c=a.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:C(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),m}}}function w(t,e,r,n){var o=e&&e.prototype instanceof j?e:j,a=Object.create(o.prototype),i=new L(n||[]);return a._invoke=function(t,e,r){var n=f;return function(o,a){if(n===p)throw new Error("Generator is already running");if(n===y){if("throw"===o)throw a;return P()}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var s=R(i,r);if(s){if(s===m)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var u=x(t,e,r);if("normal"===u.type){if(n=r.done?y:l,u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=y,r.method="throw",r.arg=u.arg)}}}(t,r,i),a}function x(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}function j(){}function O(){}function _(){}function E(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function k(e){var r;this._invoke=function(n,o){function i(){return new Promise(function(r,i){!function r(n,o,i,s){var u=x(e[n],e,o);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"===t(h)&&a.call(h,"__await")?Promise.resolve(h.__await).then(function(t){r("next",t,i,s)},function(t){r("throw",t,i,s)}):Promise.resolve(h).then(function(t){c.value=t,i(c)},function(t){return r("throw",t,i,s)})}s(u.arg)}(n,o,r,i)})}return r=r?r.then(i,i):i()}}function R(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,R(t,e),"throw"===e.method))return m;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var o=x(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,m;var a=o.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,m):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function C(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r=0,x=w&&g.regeneratorRuntime;g.regeneratorRuntime=void 0;var j=b;if(w)g.regeneratorRuntime=x;else try{delete g.regeneratorRuntime}catch(t){g.regeneratorRuntime=void 0}var O=j;var _=2147483647,E=36,k=1,R=26,A=38,S=700,L=72,C=128,P="-",U=/[^\x20-\x7E]/,T=/[\x2E\u3002\uFF0E\uFF61]/g,I={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},q=E-k,N=Math.floor,F=String.fromCharCode;function D(t){throw new RangeError(I[t])}function H(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function G(t,e,r){var n=0;for(t=r?N(t/S):t>>1,t+=N(t/e);t>q*R>>1;n+=E)t=N(t/q);return N(n+(q+1)*t/(t+A))}function M(t){return function(t,e){var r=t.split("@"),n="";r.length>1&&(n=r[0]+"@",t=r[1]);var o=function(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}((t=t.replace(T,".")).split("."),e).join(".");return n+o}(t,function(t){return U.test(t)?"xn--"+function(t){var e,r,n,o,a,i,s,u,c,h,f,l,p,y,m,v=[];for(l=(t=function(t){for(var e,r,n=[],o=0,a=t.length;o=55296&&e<=56319&&o=e&&fN((_-r)/(p=n+1))&&D("overflow"),r+=(s-e)*p,e=s,i=0;i_&&D("overflow"),f==e){for(u=r,c=E;!(u<(h=c<=a?k:c>=a+R?R:c-a));c+=E)m=u-h,y=E-h,v.push(F(H(h+m%y,0))),u=N(m/y);v.push(F(H(u,0))),a=G(r,p,n==o),r=0,++n}++r,++e}return v.join("")}(t):t})}global.setTimeout,global.clearTimeout;var z=global.performance||{};z.now||z.mozNow||z.msNow||z.oNow||z.webkitNow;function $(t){return null===t}function B(t){return"string"==typeof t}function K(e){return"object"===t(e)&&null!==e}function W(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Y=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function Z(e){switch(t(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}}function J(t,e){if(t.map)return t.map(e);for(var r=[],n=0;n0&&s>i&&(s=i);for(var u=0;u=0?(c=p.substr(0,y),h=p.substr(y+1)):(c=p,h=""),f=decodeURIComponent(c),l=decodeURIComponent(h),W(o,f)?Y(o[f])?o[f].push(l):o[f]=[o[f],l]:o[f]=l}return o}var X={parse:yt,resolve:function(t,e){return yt(t,!1,!0).resolve(e)},resolveObject:function(t,e){return t?yt(t,!1,!0).resolveObject(e):e},format:function(t){B(t)&&(t=mt({},t));return vt(t)},Url:tt};function tt(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var et=/^([a-z0-9.+-]+:)/i,rt=/:[0-9]*$/,nt=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,ot=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),at=["'"].concat(ot),it=["%","/","?",";","#"].concat(at),st=["/","?","#"],ut=255,ct=/^[+a-z0-9A-Z_-]{0,63}$/,ht=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,ft={javascript:!0,"javascript:":!0},lt={javascript:!0,"javascript:":!0},pt={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function yt(t,e,r){if(t&&K(t)&&t instanceof tt)return t;var n=new tt;return n.parse(t,e,r),n}function mt(e,r,n,o){if(!B(r))throw new TypeError("Parameter 'url' must be a string, not "+t(r));var a=r.indexOf("?"),i=-1!==a&&a127?O+="x":O+=j[_];if(!O.match(ct)){var k=x.slice(0,h),R=x.slice(h+1),A=j.match(ht);A&&(k.push(A[1]),R.unshift(A[2])),R.length&&(u="/"+R.join(".")+u),e.hostname=k.join(".");break}}}}e.hostname.length>ut?e.hostname="":e.hostname=e.hostname.toLowerCase(),w||(e.hostname=M(e.hostname)),p=e.port?":"+e.port:"";var S=e.hostname||"";e.host=S+p,e.href+=e.host,w&&(e.hostname=e.hostname.substr(1,e.hostname.length-2),"/"!==u[0]&&(u="/"+u))}if(!ft[m])for(h=0,l=at.length;h0)&&n.host.split("@"))&&(n.auth=m.shift(),n.host=n.hostname=m.shift())),n.search=t.search,n.query=t.query,$(n.pathname)&&$(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!w.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var j=w.slice(-1)[0],O=(n.host||t.host||w.length>1)&&("."===j||".."===j)||""===j,_=0,E=w.length;E>=0;E--)"."===(j=w[E])?w.splice(E,1):".."===j?(w.splice(E,1),_++):_&&(w.splice(E,1),_--);if(!b&&!g)for(;_--;_)w.unshift("..");!b||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),O&&"/"!==w.join("/").substr(-1)&&w.push("");var k=""===w[0]||w[0]&&"/"===w[0].charAt(0);return x&&(n.hostname=n.host=k?"":w.length?w.shift():"",(m=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=m.shift(),n.host=n.hostname=m.shift())),(b=b||n.host&&w.length)&&!k&&w.unshift(""),w.length?n.pathname=w.join("/"):(n.pathname=null,n.path=null),$(n.pathname)&&$(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},tt.prototype.parseHost=function(){return dt(this)};var bt=v.window?window.URL:X.URL,gt=/^https?:\/\//i,wt=function(t){return"undefined"!=typeof self&&self&&t in self?self[t]:"undefined"!=typeof window&&window&&t in window?window[t]:"undefined"!=typeof global&&global&&t in global?global[t]:"undefined"!=typeof globalThis&&globalThis?globalThis[t]:void 0},xt=wt("document"),jt=wt("Headers"),Ot=wt("Response"),_t=wt("fetch"),Et=wt("AbortController"),kt=function(e){return null!==e&&"object"===t(e)},Rt="function"==typeof wt("AbortController"),At=function t(){for(var e={},r=arguments.length,n=new Array(r),o=0;o0)){t.next=13;break}return t.next=12,qt(r);case 12:return t.abrupt("return",this._retry(e));case 13:if(!this._throwHttpErrors){t.next=15;break}throw t.t0;case 15:case"end":return t.stop()}},t,this,[[0,6]])}));return function(e){return t.apply(this,arguments)}}()},{key:"_fetch",value:function(){var t=r(O.mark(function t(){var e,r,n,o,a,i;return O.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:e=!0,r=!1,n=void 0,t.prev=3,o=this._hooks.beforeRequest[Symbol.iterator]();case 5:if(e=(a=o.next()).done){t.next=12;break}return i=a.value,t.next=9,i(this._options);case 9:e=!0,t.next=5;break;case 12:t.next=18;break;case 14:t.prev=14,t.t0=t.catch(3),r=!0,n=t.t0;case 18:t.prev=18,t.prev=19,e||null==o.return||o.return();case 21:if(t.prev=21,!r){t.next=24;break}throw n;case 24:return t.finish(21);case 25:return t.finish(18);case 26:return t.abrupt("return",Nt(_t(this._input,this._options),this._timeout,this.abortController));case 27:case"end":return t.stop()}},t,this,[[3,14,18,26],[19,,21,25]])}));return function(){return t.apply(this,arguments)}}()}])&&o(e.prototype,a),s&&o(e,s),t}(),Ht=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!kt(e)||Array.isArray(e))throw new TypeError("The `defaultOptions` argument must be an object");for(var r=function(t,r){return new Dt(t,At({},e,r))},n=St,o=function(){var t=n[a];r[t]=function(r,n){return new Dt(r,At({},e,n,{method:t}))}},a=0;a0&&(c=s(u.shift()),h=s(u[0]))}f[c]=t(e[i],r)});return a},require("./factory")({MicrolinkError:require("whoops")("MicrolinkError"),isUrlHttp:function(t){try{return new bt(t)&>.test(t)}catch(t){return!1}},stringify:function(t,e){var r,n,o,a="";for(r in t)if(void 0!==(o=t[r]))if(Array.isArray(o))for(n=0;n