@microlink/mql 0.9.8 → 0.9.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mql.js +4 -9
- package/dist/mql.js.map +1 -1
- package/dist/mql.min.js +2 -2
- package/dist/mql.min.js.map +1 -1
- package/index.d.ts +138 -0
- package/package.json +9 -4
- package/src/factory.js +3 -8
package/dist/mql.js
CHANGED
|
@@ -305,12 +305,7 @@
|
|
|
305
305
|
PRO: 'https://pro.microlink.io'
|
|
306
306
|
};
|
|
307
307
|
|
|
308
|
-
const isObject = input => typeof input === 'object';
|
|
309
|
-
|
|
310
|
-
const pickBy = obj => {
|
|
311
|
-
Object.keys(obj).forEach(key => obj[key] == null && delete obj[key]);
|
|
312
|
-
return obj
|
|
313
|
-
};
|
|
308
|
+
const isObject = input => input !== null && typeof input === 'object';
|
|
314
309
|
|
|
315
310
|
const parseBody = (input, error, url) => {
|
|
316
311
|
try {
|
|
@@ -348,7 +343,7 @@
|
|
|
348
343
|
if (!isObject(rules)) return
|
|
349
344
|
const flatRules = flatten(rules);
|
|
350
345
|
return Object.keys(flatRules).reduce(
|
|
351
|
-
(acc, key) => ({ ...acc, [`data.${key}`]: flatRules[key] }),
|
|
346
|
+
(acc, key) => ({ ...acc, [`data.${key}`]: flatRules[key].toString() }),
|
|
352
347
|
{}
|
|
353
348
|
)
|
|
354
349
|
};
|
|
@@ -387,7 +382,7 @@
|
|
|
387
382
|
const apiUrl = `${apiEndpoint}?${stringify({
|
|
388
383
|
url,
|
|
389
384
|
...mapRules(data),
|
|
390
|
-
...flatten(
|
|
385
|
+
...flatten(opts)
|
|
391
386
|
})}`;
|
|
392
387
|
|
|
393
388
|
const headers = isPro ? { ...gotHeaders, 'x-api-key': apiKey } : { ...gotHeaders };
|
|
@@ -959,7 +954,7 @@
|
|
|
959
954
|
stringify,
|
|
960
955
|
got,
|
|
961
956
|
flatten,
|
|
962
|
-
VERSION: '0.9.
|
|
957
|
+
VERSION: '0.9.12'
|
|
963
958
|
});
|
|
964
959
|
|
|
965
960
|
return browser;
|
package/dist/mql.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mql.js","sources":["../node_modules/is-url-http/lightweight.js","../node_modules/flattie/dist/index.js","../node_modules/qss/dist/qss.m.js","../node_modules/mimic-fn/index.js","../node_modules/whoops/lib/helpers.js","../node_modules/whoops/lib/add-error-props.js","../node_modules/whoops/lib/create-extend-error.js","../node_modules/whoops/lib/create-error.js","../node_modules/whoops/lib/index.js","../src/factory.js","../src/ky.js","../src/browser.js"],"sourcesContent":["'use strict'\n\nconst URL = global.window ? window.URL : require('url').URL\nconst REGEX_HTTP_PROTOCOL = /^https?:\\/\\//i\n\nmodule.exports = url => {\n try {\n return REGEX_HTTP_PROTOCOL.test(new URL(url).href)\n } catch (err) {\n return false\n }\n}\n","function iter(output, nullish, sep, val, key) {\n\tvar k, pfx = key ? (key + sep) : key;\n\n\tif (val == null) {\n\t\tif (nullish) output[key] = val;\n\t} else if (typeof val != 'object') {\n\t\toutput[key] = val;\n\t} else if (Array.isArray(val)) {\n\t\tfor (k=0; k < val.length; k++) {\n\t\t\titer(output, nullish, sep, val[k], pfx + k);\n\t\t}\n\t} else {\n\t\tfor (k in val) {\n\t\t\titer(output, nullish, sep, val[k], pfx + k);\n\t\t}\n\t}\n}\n\nfunction flattie(input, glue, toNull) {\n\tvar output = {};\n\tif (typeof input == 'object') {\n\t\titer(output, !!toNull, glue || '.', input, '');\n\t}\n\treturn output;\n}\n\nexports.flattie = flattie;","export function encode(obj, pfx) {\n\tvar k, i, tmp, str='';\n\n\tfor (k in obj) {\n\t\tif ((tmp = obj[k]) !== void 0) {\n\t\t\tif (Array.isArray(tmp)) {\n\t\t\t\tfor (i=0; i < tmp.length; i++) {\n\t\t\t\t\tstr && (str += '&');\n\t\t\t\t\tstr += encodeURIComponent(k) + '=' + encodeURIComponent(tmp[i]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tstr && (str += '&');\n\t\t\t\tstr += encodeURIComponent(k) + '=' + encodeURIComponent(tmp);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn (pfx || '') + str;\n}\n\nfunction toValue(mix) {\n\tif (!mix) return '';\n\tvar str = decodeURIComponent(mix);\n\tif (str === 'false') return false;\n\tif (str === 'true') return true;\n\treturn (+str * 0 === 0) ? (+str) : str;\n}\n\nexport function decode(str) {\n\tvar tmp, k, out={}, arr=str.split('&');\n\n\twhile (tmp = arr.shift()) {\n\t\ttmp = tmp.split('=');\n\t\tk = tmp.shift();\n\t\tif (out[k] !== void 0) {\n\t\t\tout[k] = [].concat(out[k], toValue(tmp.shift()));\n\t\t} else {\n\t\t\tout[k] = toValue(tmp.shift());\n\t\t}\n\t}\n\n\treturn out;\n}\n","'use strict';\n\nconst copyProperty = (to, from, property, ignoreNonConfigurable) => {\n\t// `Function#length` should reflect the parameters of `to` not `from` since we keep its body.\n\t// `Function#prototype` is non-writable and non-configurable so can never be modified.\n\tif (property === 'length' || property === 'prototype') {\n\t\treturn;\n\t}\n\n\tconst toDescriptor = Object.getOwnPropertyDescriptor(to, property);\n\tconst fromDescriptor = Object.getOwnPropertyDescriptor(from, property);\n\n\tif (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) {\n\t\treturn;\n\t}\n\n\tObject.defineProperty(to, property, fromDescriptor);\n};\n\n// `Object.defineProperty()` throws if the property exists, is not configurable and either:\n// - one its descriptors is changed\n// - it is non-writable and its value is changed\nconst canCopyProperty = function (toDescriptor, fromDescriptor) {\n\treturn toDescriptor === undefined || toDescriptor.configurable || (\n\t\ttoDescriptor.writable === fromDescriptor.writable &&\n\t\ttoDescriptor.enumerable === fromDescriptor.enumerable &&\n\t\ttoDescriptor.configurable === fromDescriptor.configurable &&\n\t\t(toDescriptor.writable || toDescriptor.value === fromDescriptor.value)\n\t);\n};\n\nconst changePrototype = (to, from) => {\n\tconst fromPrototype = Object.getPrototypeOf(from);\n\tif (fromPrototype === Object.getPrototypeOf(to)) {\n\t\treturn;\n\t}\n\n\tObject.setPrototypeOf(to, fromPrototype);\n};\n\nconst wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/\\n${fromBody}`;\n\nconst toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, 'toString');\nconst toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, 'name');\n\n// We call `from.toString()` early (not lazily) to ensure `from` can be garbage collected.\n// We use `bind()` instead of a closure for the same reason.\n// Calling `from.toString()` early also allows caching it in case `to.toString()` is called several times.\nconst changeToString = (to, from, name) => {\n\tconst withName = name === '' ? '' : `with ${name.trim()}() `;\n\tconst newToString = wrappedToString.bind(null, withName, from.toString());\n\t// Ensure `to.toString.toString` is non-enumerable and has the same `same`\n\tObject.defineProperty(newToString, 'name', toStringName);\n\tObject.defineProperty(to, 'toString', {...toStringDescriptor, value: newToString});\n};\n\nconst mimicFn = (to, from, {ignoreNonConfigurable = false} = {}) => {\n\tconst {name} = to;\n\n\tfor (const property of Reflect.ownKeys(from)) {\n\t\tcopyProperty(to, from, property, ignoreNonConfigurable);\n\t}\n\n\tchangePrototype(to, from);\n\tchangeToString(to, from, name);\n\n\treturn to;\n};\n\nmodule.exports = mimicFn;\n","'use strict'\n\nmodule.exports = {\n isFunction: obj => typeof obj === 'function',\n isString: obj => typeof obj === 'string',\n composeErrorMessage: (code, description) => `${code}, ${description}`,\n inherits: (ctor, superCtor) => {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n}\n","'use strict'\n\nconst {isFunction, composeErrorMessage} = require('./helpers')\n\nfunction interfaceObject (error, ...props) {\n Object.assign(error, ...props)\n\n error.description = isFunction(error.message) ? error.message(error) : error.message\n\n error.message = error.code\n ? composeErrorMessage(error.code, error.description)\n : error.description\n}\n\nmodule.exports = interfaceObject\n","'use strict'\n\nconst cleanStack = require('clean-stack')\nconst mimicFn = require('mimic-fn')\n\nconst addErrorProps = require('./add-error-props')\nconst {isString} = require('./helpers')\n\nfunction createExtendError (ErrorClass, classProps) {\n function ExtendError (props) {\n const error = new ErrorClass()\n const errorProps = isString(props) ? {message: props} : props\n addErrorProps(error, classProps, errorProps)\n\n error.stack = cleanStack(error.stack)\n return error\n }\n\n ExtendError.prototype = ErrorClass.prototype\n mimicFn(ExtendError, ErrorClass)\n\n return ExtendError\n}\n\nmodule.exports = createExtendError\n","'use strict'\n\nconst {inherits} = require('./helpers')\nconst mimicFn = require('mimic-fn')\n\nconst REGEX_CLASS_NAME = /[^0-9a-zA-Z_$]/\n\nfunction createError (className) {\n if (typeof className !== 'string') {\n throw new TypeError('Expected className to be a string')\n }\n\n if (REGEX_CLASS_NAME.test(className)) {\n throw new Error('className contains invalid characters')\n }\n\n function ErrorClass () {\n Object.defineProperty(this, 'name', {\n configurable: true,\n value: className,\n writable: true\n })\n\n Error.captureStackTrace(this, this.constructor)\n }\n\n inherits(ErrorClass, Error)\n mimicFn(ErrorClass, Error)\n return ErrorClass\n}\n\nmodule.exports = createError\n","'use strict'\n\nconst createExtendError = require('./create-extend-error')\nconst createError = require('./create-error')\n\nconst createErrorClass = ErrorClass => (className, props) => {\n const errorClass = createError(className || ErrorClass.name)\n return createExtendError(errorClass, props)\n}\n\nmodule.exports = createErrorClass(Error)\nmodule.exports.type = createErrorClass(TypeError)\nmodule.exports.range = createErrorClass(RangeError)\nmodule.exports.eval = createErrorClass(EvalError)\nmodule.exports.syntax = createErrorClass(SyntaxError)\nmodule.exports.reference = createErrorClass(ReferenceError)\nmodule.exports.uri = createErrorClass(URIError)\n","const ENDPOINT = {\n FREE: 'https://api.microlink.io',\n PRO: 'https://pro.microlink.io'\n}\n\nconst isObject = input => typeof input === 'object'\n\nconst pickBy = obj => {\n Object.keys(obj).forEach(key => obj[key] == null && delete obj[key])\n return obj\n}\n\nconst parseBody = (input, error, url) => {\n try {\n return JSON.parse(input)\n } catch (_) {\n const message = input || error.message\n\n return {\n status: 'error',\n data: { url: message },\n more: 'https://microlink.io/efatal',\n code: 'EFATAL',\n message,\n url\n }\n }\n}\n\nconst factory = ({ VERSION, MicrolinkError, isUrlHttp, stringify, got, flatten }) => {\n const assertUrl = (url = '') => {\n if (!isUrlHttp(url)) {\n const message = `The \\`url\\` as \\`${url}\\` is not valid. Ensure it has protocol (http or https) and hostname.`\n throw new MicrolinkError({\n status: 'fail',\n data: { url: message },\n more: 'https://microlink.io/docs/api/api-parameters/url',\n code: 'EINVALURLCLIENT',\n message,\n url\n })\n }\n }\n\n const mapRules = rules => {\n if (!isObject(rules)) return\n const flatRules = flatten(rules)\n return Object.keys(flatRules).reduce(\n (acc, key) => ({ ...acc, [`data.${key}`]: flatRules[key] }),\n {}\n )\n }\n\n const fetchFromApi = async (apiUrl, opts = {}) => {\n try {\n const response = await got(apiUrl, opts)\n return opts.responseType === 'buffer'\n ? { body: response.body, response }\n : { ...response.body, response }\n } catch (err) {\n const { response = {} } = err\n const { statusCode, body: rawBody, headers, url: uri = apiUrl } = response\n\n const body =\n isObject(rawBody) && !Buffer.isBuffer(rawBody) ? rawBody : parseBody(rawBody, err, uri)\n\n throw MicrolinkError({\n ...body,\n message: body.message,\n url: uri,\n statusCode,\n headers\n })\n }\n }\n\n const getApiUrl = (\n url,\n { data, apiKey, endpoint, retry, cache, ...opts } = {},\n { responseType = 'json', headers: gotHeaders, ...gotOpts } = {}\n ) => {\n const isPro = !!apiKey\n const apiEndpoint = endpoint || ENDPOINT[isPro ? 'PRO' : 'FREE']\n\n const apiUrl = `${apiEndpoint}?${stringify({\n url,\n ...mapRules(data),\n ...flatten(pickBy(opts))\n })}`\n\n const headers = isPro ? { ...gotHeaders, 'x-api-key': apiKey } : { ...gotHeaders }\n return [apiUrl, { ...gotOpts, responseType, cache, retry, headers }]\n }\n\n const createMql = defaultOpts => async (url, opts, gotOpts) => {\n assertUrl(url)\n const [apiUrl, fetchOpts] = getApiUrl(url, opts, {\n ...defaultOpts,\n ...gotOpts\n })\n return fetchFromApi(apiUrl, fetchOpts)\n }\n\n const mql = createMql()\n mql.MicrolinkError = MicrolinkError\n mql.getApiUrl = getApiUrl\n mql.fetchFromApi = fetchFromApi\n mql.mapRules = mapRules\n mql.version = VERSION\n mql.stream = got.stream\n mql.buffer = createMql({ responseType: 'buffer' })\n\n return mql\n}\n\nmodule.exports = factory\n","(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ky = factory());\n}(this, (function () { 'use strict';\n\n\t/*! MIT License © Sindre Sorhus */\n\n\tconst isObject = value => value !== null && typeof value === 'object';\n\tconst supportsAbortController = typeof globalThis.AbortController === 'function';\n\tconst supportsStreams = typeof globalThis.ReadableStream === 'function';\n\tconst supportsFormData = typeof globalThis.FormData === 'function';\n\n\tconst mergeHeaders = (source1, source2) => {\n\t\tconst result = new globalThis.Headers(source1 || {});\n\t\tconst isHeadersInstance = source2 instanceof globalThis.Headers;\n\t\tconst source = new globalThis.Headers(source2 || {});\n\n\t\tfor (const [key, value] of source) {\n\t\t\tif ((isHeadersInstance && value === 'undefined') || value === undefined) {\n\t\t\t\tresult.delete(key);\n\t\t\t} else {\n\t\t\t\tresult.set(key, value);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\tconst deepMerge = (...sources) => {\n\t\tlet returnValue = {};\n\t\tlet headers = {};\n\n\t\tfor (const source of sources) {\n\t\t\tif (Array.isArray(source)) {\n\t\t\t\tif (!(Array.isArray(returnValue))) {\n\t\t\t\t\treturnValue = [];\n\t\t\t\t}\n\n\t\t\t\treturnValue = [...returnValue, ...source];\n\t\t\t} else if (isObject(source)) {\n\t\t\t\tfor (let [key, value] of Object.entries(source)) {\n\t\t\t\t\tif (isObject(value) && (key in returnValue)) {\n\t\t\t\t\t\tvalue = deepMerge(returnValue[key], value);\n\t\t\t\t\t}\n\n\t\t\t\t\treturnValue = {...returnValue, [key]: value};\n\t\t\t\t}\n\n\t\t\t\tif (isObject(source.headers)) {\n\t\t\t\t\theaders = mergeHeaders(headers, source.headers);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturnValue.headers = headers;\n\t\t}\n\n\t\treturn returnValue;\n\t};\n\n\tconst requestMethods = [\n\t\t'get',\n\t\t'post',\n\t\t'put',\n\t\t'patch',\n\t\t'head',\n\t\t'delete'\n\t];\n\n\tconst responseTypes = {\n\t\tjson: 'application/json',\n\t\ttext: 'text/*',\n\t\tformData: 'multipart/form-data',\n\t\tarrayBuffer: '*/*',\n\t\tblob: '*/*'\n\t};\n\n\tconst retryMethods = [\n\t\t'get',\n\t\t'put',\n\t\t'head',\n\t\t'delete',\n\t\t'options',\n\t\t'trace'\n\t];\n\n\tconst retryStatusCodes = [\n\t\t408,\n\t\t413,\n\t\t429,\n\t\t500,\n\t\t502,\n\t\t503,\n\t\t504\n\t];\n\n\tconst retryAfterStatusCodes = [\n\t\t413,\n\t\t429,\n\t\t503\n\t];\n\n\tconst stop = Symbol('stop');\n\n\tclass HTTPError extends Error {\n\t\tconstructor(response, request, options) {\n\t\t\t// Set the message to the status text, such as Unauthorized,\n\t\t\t// with some fallbacks. This message should never be undefined.\n\t\t\tsuper(\n\t\t\t\tresponse.statusText ||\n\t\t\t\tString(\n\t\t\t\t\t(response.status === 0 || response.status) ?\n\t\t\t\t\t\tresponse.status : 'Unknown response error'\n\t\t\t\t)\n\t\t\t);\n\t\t\tthis.name = 'HTTPError';\n\t\t\tthis.response = response;\n\t\t\tthis.request = request;\n\t\t\tthis.options = options;\n\t\t}\n\t}\n\n\tclass TimeoutError extends Error {\n\t\tconstructor(request) {\n\t\t\tsuper('Request timed out');\n\t\t\tthis.name = 'TimeoutError';\n\t\t\tthis.request = request;\n\t\t}\n\t}\n\n\tconst delay = ms => new Promise(resolve => setTimeout(resolve, ms));\n\n\t// `Promise.race()` workaround (#91)\n\tconst timeout = (request, abortController, options) =>\n\t\tnew Promise((resolve, reject) => {\n\t\t\tconst timeoutID = setTimeout(() => {\n\t\t\t\tif (abortController) {\n\t\t\t\t\tabortController.abort();\n\t\t\t\t}\n\n\t\t\t\treject(new TimeoutError(request));\n\t\t\t}, options.timeout);\n\n\t\t\t/* eslint-disable promise/prefer-await-to-then */\n\t\t\toptions.fetch(request)\n\t\t\t\t.then(resolve)\n\t\t\t\t.catch(reject)\n\t\t\t\t.then(() => {\n\t\t\t\t\tclearTimeout(timeoutID);\n\t\t\t\t});\n\t\t\t/* eslint-enable promise/prefer-await-to-then */\n\t\t});\n\n\tconst normalizeRequestMethod = input => requestMethods.includes(input) ? input.toUpperCase() : input;\n\n\tconst defaultRetryOptions = {\n\t\tlimit: 2,\n\t\tmethods: retryMethods,\n\t\tstatusCodes: retryStatusCodes,\n\t\tafterStatusCodes: retryAfterStatusCodes\n\t};\n\n\tconst normalizeRetryOptions = (retry = {}) => {\n\t\tif (typeof retry === 'number') {\n\t\t\treturn {\n\t\t\t\t...defaultRetryOptions,\n\t\t\t\tlimit: retry\n\t\t\t};\n\t\t}\n\n\t\tif (retry.methods && !Array.isArray(retry.methods)) {\n\t\t\tthrow new Error('retry.methods must be an array');\n\t\t}\n\n\t\tif (retry.statusCodes && !Array.isArray(retry.statusCodes)) {\n\t\t\tthrow new Error('retry.statusCodes must be an array');\n\t\t}\n\n\t\treturn {\n\t\t\t...defaultRetryOptions,\n\t\t\t...retry,\n\t\t\tafterStatusCodes: retryAfterStatusCodes\n\t\t};\n\t};\n\n\t// The maximum value of a 32bit int (see issue #117)\n\tconst maxSafeTimeout = 2147483647;\n\n\tclass Ky {\n\t\tconstructor(input, options = {}) {\n\t\t\tthis._retryCount = 0;\n\t\t\tthis._input = input;\n\t\t\tthis._options = {\n\t\t\t\t// TODO: credentials can be removed when the spec change is implemented in all browsers. Context: https://www.chromestatus.com/feature/4539473312350208\n\t\t\t\tcredentials: this._input.credentials || 'same-origin',\n\t\t\t\t...options,\n\t\t\t\theaders: mergeHeaders(this._input.headers, options.headers),\n\t\t\t\thooks: deepMerge({\n\t\t\t\t\tbeforeRequest: [],\n\t\t\t\t\tbeforeRetry: [],\n\t\t\t\t\tafterResponse: []\n\t\t\t\t}, options.hooks),\n\t\t\t\tmethod: normalizeRequestMethod(options.method || this._input.method),\n\t\t\t\tprefixUrl: String(options.prefixUrl || ''),\n\t\t\t\tretry: normalizeRetryOptions(options.retry),\n\t\t\t\tthrowHttpErrors: options.throwHttpErrors !== false,\n\t\t\t\ttimeout: typeof options.timeout === 'undefined' ? 10000 : options.timeout,\n\t\t\t\tfetch: options.fetch || globalThis.fetch.bind(globalThis)\n\t\t\t};\n\n\t\t\tif (typeof this._input !== 'string' && !(this._input instanceof URL || this._input instanceof globalThis.Request)) {\n\t\t\t\tthrow new TypeError('`input` must be a string, URL, or Request');\n\t\t\t}\n\n\t\t\tif (this._options.prefixUrl && typeof this._input === 'string') {\n\t\t\t\tif (this._input.startsWith('/')) {\n\t\t\t\t\tthrow new Error('`input` must not begin with a slash when using `prefixUrl`');\n\t\t\t\t}\n\n\t\t\t\tif (!this._options.prefixUrl.endsWith('/')) {\n\t\t\t\t\tthis._options.prefixUrl += '/';\n\t\t\t\t}\n\n\t\t\t\tthis._input = this._options.prefixUrl + this._input;\n\t\t\t}\n\n\t\t\tif (supportsAbortController) {\n\t\t\t\tthis.abortController = new globalThis.AbortController();\n\t\t\t\tif (this._options.signal) {\n\t\t\t\t\tthis._options.signal.addEventListener('abort', () => {\n\t\t\t\t\t\tthis.abortController.abort();\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tthis._options.signal = this.abortController.signal;\n\t\t\t}\n\n\t\t\tthis.request = new globalThis.Request(this._input, this._options);\n\n\t\t\tif (this._options.searchParams) {\n\t\t\t\tconst textSearchParams = typeof this._options.searchParams === 'string' ?\n\t\t\t\t\tthis._options.searchParams.replace(/^\\?/, '') :\n\t\t\t\t\tnew URLSearchParams(this._options.searchParams).toString();\n\t\t\t\tconst searchParams = '?' + textSearchParams;\n\t\t\t\tconst url = this.request.url.replace(/(?:\\?.*?)?(?=#|$)/, searchParams);\n\n\t\t\t\t// To provide correct form boundary, Content-Type header should be deleted each time when new Request instantiated from another one\n\t\t\t\tif (((supportsFormData && this._options.body instanceof globalThis.FormData) || this._options.body instanceof URLSearchParams) && !(this._options.headers && this._options.headers['content-type'])) {\n\t\t\t\t\tthis.request.headers.delete('content-type');\n\t\t\t\t}\n\n\t\t\t\tthis.request = new globalThis.Request(new globalThis.Request(url, this.request), this._options);\n\t\t\t}\n\n\t\t\tif (this._options.json !== undefined) {\n\t\t\t\tthis._options.body = JSON.stringify(this._options.json);\n\t\t\t\tthis.request.headers.set('content-type', 'application/json');\n\t\t\t\tthis.request = new globalThis.Request(this.request, {body: this._options.body});\n\t\t\t}\n\n\t\t\tconst fn = async () => {\n\t\t\t\tif (this._options.timeout > maxSafeTimeout) {\n\t\t\t\t\tthrow new RangeError(`The \\`timeout\\` option cannot be greater than ${maxSafeTimeout}`);\n\t\t\t\t}\n\n\t\t\t\tawait delay(1);\n\t\t\t\tlet response = await this._fetch();\n\n\t\t\t\tfor (const hook of this._options.hooks.afterResponse) {\n\t\t\t\t\t// eslint-disable-next-line no-await-in-loop\n\t\t\t\t\tconst modifiedResponse = await hook(\n\t\t\t\t\t\tthis.request,\n\t\t\t\t\t\tthis._options,\n\t\t\t\t\t\tthis._decorateResponse(response.clone())\n\t\t\t\t\t);\n\n\t\t\t\t\tif (modifiedResponse instanceof globalThis.Response) {\n\t\t\t\t\t\tresponse = modifiedResponse;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis._decorateResponse(response);\n\n\t\t\t\tif (!response.ok && this._options.throwHttpErrors) {\n\t\t\t\t\tthrow new HTTPError(response, this.request, this._options);\n\t\t\t\t}\n\n\t\t\t\t// If `onDownloadProgress` is passed, it uses the stream API internally\n\t\t\t\t/* istanbul ignore next */\n\t\t\t\tif (this._options.onDownloadProgress) {\n\t\t\t\t\tif (typeof this._options.onDownloadProgress !== 'function') {\n\t\t\t\t\t\tthrow new TypeError('The `onDownloadProgress` option must be a function');\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!supportsStreams) {\n\t\t\t\t\t\tthrow new Error('Streams are not supported in your environment. `ReadableStream` is missing.');\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this._stream(response.clone(), this._options.onDownloadProgress);\n\t\t\t\t}\n\n\t\t\t\treturn response;\n\t\t\t};\n\n\t\t\tconst isRetriableMethod = this._options.retry.methods.includes(this.request.method.toLowerCase());\n\t\t\tconst result = isRetriableMethod ? this._retry(fn) : fn();\n\n\t\t\tfor (const [type, mimeType] of Object.entries(responseTypes)) {\n\t\t\t\tresult[type] = async () => {\n\t\t\t\t\tthis.request.headers.set('accept', this.request.headers.get('accept') || mimeType);\n\n\t\t\t\t\tconst response = (await result).clone();\n\n\t\t\t\t\tif (type === 'json') {\n\t\t\t\t\t\tif (response.status === 204) {\n\t\t\t\t\t\t\treturn '';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (options.parseJson) {\n\t\t\t\t\t\t\treturn options.parseJson(await response.text());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn response[type]();\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\n\t\t_calculateRetryDelay(error) {\n\t\t\tthis._retryCount++;\n\n\t\t\tif (this._retryCount < this._options.retry.limit && !(error instanceof TimeoutError)) {\n\t\t\t\tif (error instanceof HTTPError) {\n\t\t\t\t\tif (!this._options.retry.statusCodes.includes(error.response.status)) {\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst retryAfter = error.response.headers.get('Retry-After');\n\t\t\t\t\tif (retryAfter && this._options.retry.afterStatusCodes.includes(error.response.status)) {\n\t\t\t\t\t\tlet after = Number(retryAfter);\n\t\t\t\t\t\tif (Number.isNaN(after)) {\n\t\t\t\t\t\t\tafter = Date.parse(retryAfter) - Date.now();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tafter *= 1000;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (typeof this._options.retry.maxRetryAfter !== 'undefined' && after > this._options.retry.maxRetryAfter) {\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn after;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (error.response.status === 413) {\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst BACKOFF_FACTOR = 0.3;\n\t\t\t\treturn BACKOFF_FACTOR * (2 ** (this._retryCount - 1)) * 1000;\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t}\n\n\t\t_decorateResponse(response) {\n\t\t\tif (this._options.parseJson) {\n\t\t\t\tresponse.json = async () => {\n\t\t\t\t\treturn this._options.parseJson(await response.text());\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn response;\n\t\t}\n\n\t\tasync _retry(fn) {\n\t\t\ttry {\n\t\t\t\treturn await fn();\n\t\t\t} catch (error) {\n\t\t\t\tconst ms = Math.min(this._calculateRetryDelay(error), maxSafeTimeout);\n\t\t\t\tif (ms !== 0 && this._retryCount > 0) {\n\t\t\t\t\tawait delay(ms);\n\n\t\t\t\t\tfor (const hook of this._options.hooks.beforeRetry) {\n\t\t\t\t\t\t// eslint-disable-next-line no-await-in-loop\n\t\t\t\t\t\tconst hookResult = await hook({\n\t\t\t\t\t\t\trequest: this.request,\n\t\t\t\t\t\t\toptions: this._options,\n\t\t\t\t\t\t\terror,\n\t\t\t\t\t\t\tretryCount: this._retryCount\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t// If `stop` is returned from the hook, the retry process is stopped\n\t\t\t\t\t\tif (hookResult === stop) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this._retry(fn);\n\t\t\t\t}\n\n\t\t\t\tif (this._options.throwHttpErrors) {\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync _fetch() {\n\t\t\tfor (const hook of this._options.hooks.beforeRequest) {\n\t\t\t\t// eslint-disable-next-line no-await-in-loop\n\t\t\t\tconst result = await hook(this.request, this._options);\n\n\t\t\t\tif (result instanceof Request) {\n\t\t\t\t\tthis.request = result;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (result instanceof Response) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this._options.timeout === false) {\n\t\t\t\treturn this._options.fetch(this.request.clone());\n\t\t\t}\n\n\t\t\treturn timeout(this.request.clone(), this.abortController, this._options);\n\t\t}\n\n\t\t/* istanbul ignore next */\n\t\t_stream(response, onDownloadProgress) {\n\t\t\tconst totalBytes = Number(response.headers.get('content-length')) || 0;\n\t\t\tlet transferredBytes = 0;\n\n\t\t\treturn new globalThis.Response(\n\t\t\t\tnew globalThis.ReadableStream({\n\t\t\t\t\tasync start(controller) {\n\t\t\t\t\t\tconst reader = response.body.getReader();\n\n\t\t\t\t\t\tif (onDownloadProgress) {\n\t\t\t\t\t\t\tonDownloadProgress({percent: 0, transferredBytes: 0, totalBytes}, new Uint8Array());\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tasync function read() {\n\t\t\t\t\t\t\tconst {done, value} = await reader.read();\n\t\t\t\t\t\t\tif (done) {\n\t\t\t\t\t\t\t\tcontroller.close();\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (onDownloadProgress) {\n\t\t\t\t\t\t\t\ttransferredBytes += value.byteLength;\n\t\t\t\t\t\t\t\tconst percent = totalBytes === 0 ? 0 : transferredBytes / totalBytes;\n\t\t\t\t\t\t\t\tonDownloadProgress({percent, transferredBytes, totalBytes}, value);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tcontroller.enqueue(value);\n\t\t\t\t\t\t\tawait read();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tawait read();\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t);\n\t\t}\n\t}\n\n\tconst validateAndMerge = (...sources) => {\n\t\tfor (const source of sources) {\n\t\t\tif ((!isObject(source) || Array.isArray(source)) && typeof source !== 'undefined') {\n\t\t\t\tthrow new TypeError('The `options` argument must be an object');\n\t\t\t}\n\t\t}\n\n\t\treturn deepMerge({}, ...sources);\n\t};\n\n\tconst createInstance = defaults => {\n\t\tconst ky = (input, options) => new Ky(input, validateAndMerge(defaults, options));\n\n\t\tfor (const method of requestMethods) {\n\t\t\tky[method] = (input, options) => new Ky(input, validateAndMerge(defaults, options, {method}));\n\t\t}\n\n\t\tky.HTTPError = HTTPError;\n\t\tky.TimeoutError = TimeoutError;\n\t\tky.create = newDefaults => createInstance(validateAndMerge(newDefaults));\n\t\tky.extend = newDefaults => createInstance(validateAndMerge(defaults, newDefaults));\n\t\tky.stop = stop;\n\n\t\treturn ky;\n\t};\n\n\tconst ky = createInstance();\n\n\treturn ky;\n\n})));\n","'use strict'\n\nconst isUrlHttp = require('is-url-http/lightweight')\nconst { flattie: flatten } = require('flattie')\nconst { encode: stringify } = require('qss')\nconst whoops = require('whoops')\n\nconst factory = require('./factory')\nconst ky = require('./ky')\n\nconst MicrolinkError = whoops('MicrolinkError')\n\nconst got = async (url, opts) => {\n try {\n if (opts.timeout === undefined) opts.timeout = false\n const response = await ky(url, opts)\n const body = await response.json()\n const { headers, status: statusCode, statusText: statusMessage } = response\n return { url: response.url, body, headers, statusCode, statusMessage }\n } catch (err) {\n if (err.response) {\n const { response } = err\n err.response = {\n ...response,\n headers: [...response.headers.entries()].reduce(\n (acc, [key, value]) => ({ ...acc, [key]: value }),\n {}\n ),\n statusCode: response.status,\n body: await response.text()\n }\n }\n throw err\n }\n}\n\nmodule.exports = factory({\n MicrolinkError,\n isUrlHttp,\n stringify,\n got,\n flatten,\n VERSION: '__MQL_VERSION__'\n})\n"],"names":["URL","global","require$$0","mimicFn","addErrorProps","require$$1","require$$2","require$$3","createExtendError","createError","libModule","factory","this","require$$4","require$$5"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;CAEA,MAAMA,KAAG,GAAGC,cAAM,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,GAAGC,8BAAc,CAAC,IAAG;CAC3D,MAAM,mBAAmB,GAAG,gBAAe;AAC3C;KACA,WAAc,GAAG,GAAG,IAAI;CACxB,EAAE,IAAI;CACN,IAAI,OAAO,mBAAmB,CAAC,IAAI,CAAC,IAAIF,KAAG,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;CACtD,GAAG,CAAC,OAAO,GAAG,EAAE;CAChB,IAAI,OAAO,KAAK;CAChB,GAAG;CACH;;;;CCXA,SAAS,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE;CAC9C,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,CAAC;AACtC;CACA,CAAC,IAAI,GAAG,IAAI,IAAI,EAAE;CAClB,EAAE,IAAI,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;CACjC,EAAE,MAAM,IAAI,OAAO,GAAG,IAAI,QAAQ,EAAE;CACpC,EAAE,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;CACpB,EAAE,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;CAChC,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CACjC,GAAG,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC,CAAC;CAC/C,GAAG;CACH,EAAE,MAAM;CACR,EAAE,KAAK,CAAC,IAAI,GAAG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I,EAAE,MAAM,QAAQ,CAAC,IAAI,EAAE;CACnC,QAAO;CACP,KAAK;CACL,IAAI,MAAM,GAAG;CACb,GAAG;CACH,EAAC;AACD;KACA,OAAc,GAAG,OAAO,CAAC;CACzB,EAAE,cAAc;CAChB,EAAE,SAAS;CACX,EAAE,SAAS;CACX,EAAE,GAAG;CACL,EAAE,OAAO;CACT,EAAE,OAAO,EAAE,OAAiB;CAC5B,CAAC;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"mql.js","sources":["../node_modules/is-url-http/lightweight.js","../node_modules/flattie/dist/index.js","../node_modules/qss/dist/qss.m.js","../node_modules/mimic-fn/index.js","../node_modules/whoops/lib/helpers.js","../node_modules/whoops/lib/add-error-props.js","../node_modules/whoops/lib/create-extend-error.js","../node_modules/whoops/lib/create-error.js","../node_modules/whoops/lib/index.js","../src/factory.js","../src/ky.js","../src/browser.js"],"sourcesContent":["'use strict'\n\nconst URL = global.window ? window.URL : require('url').URL\nconst REGEX_HTTP_PROTOCOL = /^https?:\\/\\//i\n\nmodule.exports = url => {\n try {\n return REGEX_HTTP_PROTOCOL.test(new URL(url).href)\n } catch (err) {\n return false\n }\n}\n","function iter(output, nullish, sep, val, key) {\n\tvar k, pfx = key ? (key + sep) : key;\n\n\tif (val == null) {\n\t\tif (nullish) output[key] = val;\n\t} else if (typeof val != 'object') {\n\t\toutput[key] = val;\n\t} else if (Array.isArray(val)) {\n\t\tfor (k=0; k < val.length; k++) {\n\t\t\titer(output, nullish, sep, val[k], pfx + k);\n\t\t}\n\t} else {\n\t\tfor (k in val) {\n\t\t\titer(output, nullish, sep, val[k], pfx + k);\n\t\t}\n\t}\n}\n\nfunction flattie(input, glue, toNull) {\n\tvar output = {};\n\tif (typeof input == 'object') {\n\t\titer(output, !!toNull, glue || '.', input, '');\n\t}\n\treturn output;\n}\n\nexports.flattie = flattie;","export function encode(obj, pfx) {\n\tvar k, i, tmp, str='';\n\n\tfor (k in obj) {\n\t\tif ((tmp = obj[k]) !== void 0) {\n\t\t\tif (Array.isArray(tmp)) {\n\t\t\t\tfor (i=0; i < tmp.length; i++) {\n\t\t\t\t\tstr && (str += '&');\n\t\t\t\t\tstr += encodeURIComponent(k) + '=' + encodeURIComponent(tmp[i]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tstr && (str += '&');\n\t\t\t\tstr += encodeURIComponent(k) + '=' + encodeURIComponent(tmp);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn (pfx || '') + str;\n}\n\nfunction toValue(mix) {\n\tif (!mix) return '';\n\tvar str = decodeURIComponent(mix);\n\tif (str === 'false') return false;\n\tif (str === 'true') return true;\n\treturn (+str * 0 === 0) ? (+str) : str;\n}\n\nexport function decode(str) {\n\tvar tmp, k, out={}, arr=str.split('&');\n\n\twhile (tmp = arr.shift()) {\n\t\ttmp = tmp.split('=');\n\t\tk = tmp.shift();\n\t\tif (out[k] !== void 0) {\n\t\t\tout[k] = [].concat(out[k], toValue(tmp.shift()));\n\t\t} else {\n\t\t\tout[k] = toValue(tmp.shift());\n\t\t}\n\t}\n\n\treturn out;\n}\n","'use strict';\n\nconst copyProperty = (to, from, property, ignoreNonConfigurable) => {\n\t// `Function#length` should reflect the parameters of `to` not `from` since we keep its body.\n\t// `Function#prototype` is non-writable and non-configurable so can never be modified.\n\tif (property === 'length' || property === 'prototype') {\n\t\treturn;\n\t}\n\n\tconst toDescriptor = Object.getOwnPropertyDescriptor(to, property);\n\tconst fromDescriptor = Object.getOwnPropertyDescriptor(from, property);\n\n\tif (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) {\n\t\treturn;\n\t}\n\n\tObject.defineProperty(to, property, fromDescriptor);\n};\n\n// `Object.defineProperty()` throws if the property exists, is not configurable and either:\n// - one its descriptors is changed\n// - it is non-writable and its value is changed\nconst canCopyProperty = function (toDescriptor, fromDescriptor) {\n\treturn toDescriptor === undefined || toDescriptor.configurable || (\n\t\ttoDescriptor.writable === fromDescriptor.writable &&\n\t\ttoDescriptor.enumerable === fromDescriptor.enumerable &&\n\t\ttoDescriptor.configurable === fromDescriptor.configurable &&\n\t\t(toDescriptor.writable || toDescriptor.value === fromDescriptor.value)\n\t);\n};\n\nconst changePrototype = (to, from) => {\n\tconst fromPrototype = Object.getPrototypeOf(from);\n\tif (fromPrototype === Object.getPrototypeOf(to)) {\n\t\treturn;\n\t}\n\n\tObject.setPrototypeOf(to, fromPrototype);\n};\n\nconst wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/\\n${fromBody}`;\n\nconst toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, 'toString');\nconst toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, 'name');\n\n// We call `from.toString()` early (not lazily) to ensure `from` can be garbage collected.\n// We use `bind()` instead of a closure for the same reason.\n// Calling `from.toString()` early also allows caching it in case `to.toString()` is called several times.\nconst changeToString = (to, from, name) => {\n\tconst withName = name === '' ? '' : `with ${name.trim()}() `;\n\tconst newToString = wrappedToString.bind(null, withName, from.toString());\n\t// Ensure `to.toString.toString` is non-enumerable and has the same `same`\n\tObject.defineProperty(newToString, 'name', toStringName);\n\tObject.defineProperty(to, 'toString', {...toStringDescriptor, value: newToString});\n};\n\nconst mimicFn = (to, from, {ignoreNonConfigurable = false} = {}) => {\n\tconst {name} = to;\n\n\tfor (const property of Reflect.ownKeys(from)) {\n\t\tcopyProperty(to, from, property, ignoreNonConfigurable);\n\t}\n\n\tchangePrototype(to, from);\n\tchangeToString(to, from, name);\n\n\treturn to;\n};\n\nmodule.exports = mimicFn;\n","'use strict'\n\nmodule.exports = {\n isFunction: obj => typeof obj === 'function',\n isString: obj => typeof obj === 'string',\n composeErrorMessage: (code, description) => `${code}, ${description}`,\n inherits: (ctor, superCtor) => {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n}\n","'use strict'\n\nconst {isFunction, composeErrorMessage} = require('./helpers')\n\nfunction interfaceObject (error, ...props) {\n Object.assign(error, ...props)\n\n error.description = isFunction(error.message) ? error.message(error) : error.message\n\n error.message = error.code\n ? composeErrorMessage(error.code, error.description)\n : error.description\n}\n\nmodule.exports = interfaceObject\n","'use strict'\n\nconst cleanStack = require('clean-stack')\nconst mimicFn = require('mimic-fn')\n\nconst addErrorProps = require('./add-error-props')\nconst {isString} = require('./helpers')\n\nfunction createExtendError (ErrorClass, classProps) {\n function ExtendError (props) {\n const error = new ErrorClass()\n const errorProps = isString(props) ? {message: props} : props\n addErrorProps(error, classProps, errorProps)\n\n error.stack = cleanStack(error.stack)\n return error\n }\n\n ExtendError.prototype = ErrorClass.prototype\n mimicFn(ExtendError, ErrorClass)\n\n return ExtendError\n}\n\nmodule.exports = createExtendError\n","'use strict'\n\nconst {inherits} = require('./helpers')\nconst mimicFn = require('mimic-fn')\n\nconst REGEX_CLASS_NAME = /[^0-9a-zA-Z_$]/\n\nfunction createError (className) {\n if (typeof className !== 'string') {\n throw new TypeError('Expected className to be a string')\n }\n\n if (REGEX_CLASS_NAME.test(className)) {\n throw new Error('className contains invalid characters')\n }\n\n function ErrorClass () {\n Object.defineProperty(this, 'name', {\n configurable: true,\n value: className,\n writable: true\n })\n\n Error.captureStackTrace(this, this.constructor)\n }\n\n inherits(ErrorClass, Error)\n mimicFn(ErrorClass, Error)\n return ErrorClass\n}\n\nmodule.exports = createError\n","'use strict'\n\nconst createExtendError = require('./create-extend-error')\nconst createError = require('./create-error')\n\nconst createErrorClass = ErrorClass => (className, props) => {\n const errorClass = createError(className || ErrorClass.name)\n return createExtendError(errorClass, props)\n}\n\nmodule.exports = createErrorClass(Error)\nmodule.exports.type = createErrorClass(TypeError)\nmodule.exports.range = createErrorClass(RangeError)\nmodule.exports.eval = createErrorClass(EvalError)\nmodule.exports.syntax = createErrorClass(SyntaxError)\nmodule.exports.reference = createErrorClass(ReferenceError)\nmodule.exports.uri = createErrorClass(URIError)\n","const ENDPOINT = {\n FREE: 'https://api.microlink.io',\n PRO: 'https://pro.microlink.io'\n}\n\nconst isObject = input => input !== null && typeof input === 'object'\n\nconst parseBody = (input, error, url) => {\n try {\n return JSON.parse(input)\n } catch (_) {\n const message = input || error.message\n\n return {\n status: 'error',\n data: { url: message },\n more: 'https://microlink.io/efatal',\n code: 'EFATAL',\n message,\n url\n }\n }\n}\n\nconst factory = ({ VERSION, MicrolinkError, isUrlHttp, stringify, got, flatten }) => {\n const assertUrl = (url = '') => {\n if (!isUrlHttp(url)) {\n const message = `The \\`url\\` as \\`${url}\\` is not valid. Ensure it has protocol (http or https) and hostname.`\n throw new MicrolinkError({\n status: 'fail',\n data: { url: message },\n more: 'https://microlink.io/docs/api/api-parameters/url',\n code: 'EINVALURLCLIENT',\n message,\n url\n })\n }\n }\n\n const mapRules = rules => {\n if (!isObject(rules)) return\n const flatRules = flatten(rules)\n return Object.keys(flatRules).reduce(\n (acc, key) => ({ ...acc, [`data.${key}`]: flatRules[key].toString() }),\n {}\n )\n }\n\n const fetchFromApi = async (apiUrl, opts = {}) => {\n try {\n const response = await got(apiUrl, opts)\n return opts.responseType === 'buffer'\n ? { body: response.body, response }\n : { ...response.body, response }\n } catch (err) {\n const { response = {} } = err\n const { statusCode, body: rawBody, headers, url: uri = apiUrl } = response\n\n const body =\n isObject(rawBody) && !Buffer.isBuffer(rawBody) ? rawBody : parseBody(rawBody, err, uri)\n\n throw MicrolinkError({\n ...body,\n message: body.message,\n url: uri,\n statusCode,\n headers\n })\n }\n }\n\n const getApiUrl = (\n url,\n { data, apiKey, endpoint, retry, cache, ...opts } = {},\n { responseType = 'json', headers: gotHeaders, ...gotOpts } = {}\n ) => {\n const isPro = !!apiKey\n const apiEndpoint = endpoint || ENDPOINT[isPro ? 'PRO' : 'FREE']\n\n const apiUrl = `${apiEndpoint}?${stringify({\n url,\n ...mapRules(data),\n ...flatten(opts)\n })}`\n\n const headers = isPro ? { ...gotHeaders, 'x-api-key': apiKey } : { ...gotHeaders }\n return [apiUrl, { ...gotOpts, responseType, cache, retry, headers }]\n }\n\n const createMql = defaultOpts => async (url, opts, gotOpts) => {\n assertUrl(url)\n const [apiUrl, fetchOpts] = getApiUrl(url, opts, {\n ...defaultOpts,\n ...gotOpts\n })\n return fetchFromApi(apiUrl, fetchOpts)\n }\n\n const mql = createMql()\n mql.MicrolinkError = MicrolinkError\n mql.getApiUrl = getApiUrl\n mql.fetchFromApi = fetchFromApi\n mql.mapRules = mapRules\n mql.version = VERSION\n mql.stream = got.stream\n mql.buffer = createMql({ responseType: 'buffer' })\n\n return mql\n}\n\nmodule.exports = factory\n","(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ky = factory());\n}(this, (function () { 'use strict';\n\n\t/*! MIT License © Sindre Sorhus */\n\n\tconst isObject = value => value !== null && typeof value === 'object';\n\tconst supportsAbortController = typeof globalThis.AbortController === 'function';\n\tconst supportsStreams = typeof globalThis.ReadableStream === 'function';\n\tconst supportsFormData = typeof globalThis.FormData === 'function';\n\n\tconst mergeHeaders = (source1, source2) => {\n\t\tconst result = new globalThis.Headers(source1 || {});\n\t\tconst isHeadersInstance = source2 instanceof globalThis.Headers;\n\t\tconst source = new globalThis.Headers(source2 || {});\n\n\t\tfor (const [key, value] of source) {\n\t\t\tif ((isHeadersInstance && value === 'undefined') || value === undefined) {\n\t\t\t\tresult.delete(key);\n\t\t\t} else {\n\t\t\t\tresult.set(key, value);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\tconst deepMerge = (...sources) => {\n\t\tlet returnValue = {};\n\t\tlet headers = {};\n\n\t\tfor (const source of sources) {\n\t\t\tif (Array.isArray(source)) {\n\t\t\t\tif (!(Array.isArray(returnValue))) {\n\t\t\t\t\treturnValue = [];\n\t\t\t\t}\n\n\t\t\t\treturnValue = [...returnValue, ...source];\n\t\t\t} else if (isObject(source)) {\n\t\t\t\tfor (let [key, value] of Object.entries(source)) {\n\t\t\t\t\tif (isObject(value) && (key in returnValue)) {\n\t\t\t\t\t\tvalue = deepMerge(returnValue[key], value);\n\t\t\t\t\t}\n\n\t\t\t\t\treturnValue = {...returnValue, [key]: value};\n\t\t\t\t}\n\n\t\t\t\tif (isObject(source.headers)) {\n\t\t\t\t\theaders = mergeHeaders(headers, source.headers);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturnValue.headers = headers;\n\t\t}\n\n\t\treturn returnValue;\n\t};\n\n\tconst requestMethods = [\n\t\t'get',\n\t\t'post',\n\t\t'put',\n\t\t'patch',\n\t\t'head',\n\t\t'delete'\n\t];\n\n\tconst responseTypes = {\n\t\tjson: 'application/json',\n\t\ttext: 'text/*',\n\t\tformData: 'multipart/form-data',\n\t\tarrayBuffer: '*/*',\n\t\tblob: '*/*'\n\t};\n\n\tconst retryMethods = [\n\t\t'get',\n\t\t'put',\n\t\t'head',\n\t\t'delete',\n\t\t'options',\n\t\t'trace'\n\t];\n\n\tconst retryStatusCodes = [\n\t\t408,\n\t\t413,\n\t\t429,\n\t\t500,\n\t\t502,\n\t\t503,\n\t\t504\n\t];\n\n\tconst retryAfterStatusCodes = [\n\t\t413,\n\t\t429,\n\t\t503\n\t];\n\n\tconst stop = Symbol('stop');\n\n\tclass HTTPError extends Error {\n\t\tconstructor(response, request, options) {\n\t\t\t// Set the message to the status text, such as Unauthorized,\n\t\t\t// with some fallbacks. This message should never be undefined.\n\t\t\tsuper(\n\t\t\t\tresponse.statusText ||\n\t\t\t\tString(\n\t\t\t\t\t(response.status === 0 || response.status) ?\n\t\t\t\t\t\tresponse.status : 'Unknown response error'\n\t\t\t\t)\n\t\t\t);\n\t\t\tthis.name = 'HTTPError';\n\t\t\tthis.response = response;\n\t\t\tthis.request = request;\n\t\t\tthis.options = options;\n\t\t}\n\t}\n\n\tclass TimeoutError extends Error {\n\t\tconstructor(request) {\n\t\t\tsuper('Request timed out');\n\t\t\tthis.name = 'TimeoutError';\n\t\t\tthis.request = request;\n\t\t}\n\t}\n\n\tconst delay = ms => new Promise(resolve => setTimeout(resolve, ms));\n\n\t// `Promise.race()` workaround (#91)\n\tconst timeout = (request, abortController, options) =>\n\t\tnew Promise((resolve, reject) => {\n\t\t\tconst timeoutID = setTimeout(() => {\n\t\t\t\tif (abortController) {\n\t\t\t\t\tabortController.abort();\n\t\t\t\t}\n\n\t\t\t\treject(new TimeoutError(request));\n\t\t\t}, options.timeout);\n\n\t\t\t/* eslint-disable promise/prefer-await-to-then */\n\t\t\toptions.fetch(request)\n\t\t\t\t.then(resolve)\n\t\t\t\t.catch(reject)\n\t\t\t\t.then(() => {\n\t\t\t\t\tclearTimeout(timeoutID);\n\t\t\t\t});\n\t\t\t/* eslint-enable promise/prefer-await-to-then */\n\t\t});\n\n\tconst normalizeRequestMethod = input => requestMethods.includes(input) ? input.toUpperCase() : input;\n\n\tconst defaultRetryOptions = {\n\t\tlimit: 2,\n\t\tmethods: retryMethods,\n\t\tstatusCodes: retryStatusCodes,\n\t\tafterStatusCodes: retryAfterStatusCodes\n\t};\n\n\tconst normalizeRetryOptions = (retry = {}) => {\n\t\tif (typeof retry === 'number') {\n\t\t\treturn {\n\t\t\t\t...defaultRetryOptions,\n\t\t\t\tlimit: retry\n\t\t\t};\n\t\t}\n\n\t\tif (retry.methods && !Array.isArray(retry.methods)) {\n\t\t\tthrow new Error('retry.methods must be an array');\n\t\t}\n\n\t\tif (retry.statusCodes && !Array.isArray(retry.statusCodes)) {\n\t\t\tthrow new Error('retry.statusCodes must be an array');\n\t\t}\n\n\t\treturn {\n\t\t\t...defaultRetryOptions,\n\t\t\t...retry,\n\t\t\tafterStatusCodes: retryAfterStatusCodes\n\t\t};\n\t};\n\n\t// The maximum value of a 32bit int (see issue #117)\n\tconst maxSafeTimeout = 2147483647;\n\n\tclass Ky {\n\t\tconstructor(input, options = {}) {\n\t\t\tthis._retryCount = 0;\n\t\t\tthis._input = input;\n\t\t\tthis._options = {\n\t\t\t\t// TODO: credentials can be removed when the spec change is implemented in all browsers. Context: https://www.chromestatus.com/feature/4539473312350208\n\t\t\t\tcredentials: this._input.credentials || 'same-origin',\n\t\t\t\t...options,\n\t\t\t\theaders: mergeHeaders(this._input.headers, options.headers),\n\t\t\t\thooks: deepMerge({\n\t\t\t\t\tbeforeRequest: [],\n\t\t\t\t\tbeforeRetry: [],\n\t\t\t\t\tafterResponse: []\n\t\t\t\t}, options.hooks),\n\t\t\t\tmethod: normalizeRequestMethod(options.method || this._input.method),\n\t\t\t\tprefixUrl: String(options.prefixUrl || ''),\n\t\t\t\tretry: normalizeRetryOptions(options.retry),\n\t\t\t\tthrowHttpErrors: options.throwHttpErrors !== false,\n\t\t\t\ttimeout: typeof options.timeout === 'undefined' ? 10000 : options.timeout,\n\t\t\t\tfetch: options.fetch || globalThis.fetch.bind(globalThis)\n\t\t\t};\n\n\t\t\tif (typeof this._input !== 'string' && !(this._input instanceof URL || this._input instanceof globalThis.Request)) {\n\t\t\t\tthrow new TypeError('`input` must be a string, URL, or Request');\n\t\t\t}\n\n\t\t\tif (this._options.prefixUrl && typeof this._input === 'string') {\n\t\t\t\tif (this._input.startsWith('/')) {\n\t\t\t\t\tthrow new Error('`input` must not begin with a slash when using `prefixUrl`');\n\t\t\t\t}\n\n\t\t\t\tif (!this._options.prefixUrl.endsWith('/')) {\n\t\t\t\t\tthis._options.prefixUrl += '/';\n\t\t\t\t}\n\n\t\t\t\tthis._input = this._options.prefixUrl + this._input;\n\t\t\t}\n\n\t\t\tif (supportsAbortController) {\n\t\t\t\tthis.abortController = new globalThis.AbortController();\n\t\t\t\tif (this._options.signal) {\n\t\t\t\t\tthis._options.signal.addEventListener('abort', () => {\n\t\t\t\t\t\tthis.abortController.abort();\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tthis._options.signal = this.abortController.signal;\n\t\t\t}\n\n\t\t\tthis.request = new globalThis.Request(this._input, this._options);\n\n\t\t\tif (this._options.searchParams) {\n\t\t\t\tconst textSearchParams = typeof this._options.searchParams === 'string' ?\n\t\t\t\t\tthis._options.searchParams.replace(/^\\?/, '') :\n\t\t\t\t\tnew URLSearchParams(this._options.searchParams).toString();\n\t\t\t\tconst searchParams = '?' + textSearchParams;\n\t\t\t\tconst url = this.request.url.replace(/(?:\\?.*?)?(?=#|$)/, searchParams);\n\n\t\t\t\t// To provide correct form boundary, Content-Type header should be deleted each time when new Request instantiated from another one\n\t\t\t\tif (((supportsFormData && this._options.body instanceof globalThis.FormData) || this._options.body instanceof URLSearchParams) && !(this._options.headers && this._options.headers['content-type'])) {\n\t\t\t\t\tthis.request.headers.delete('content-type');\n\t\t\t\t}\n\n\t\t\t\tthis.request = new globalThis.Request(new globalThis.Request(url, this.request), this._options);\n\t\t\t}\n\n\t\t\tif (this._options.json !== undefined) {\n\t\t\t\tthis._options.body = JSON.stringify(this._options.json);\n\t\t\t\tthis.request.headers.set('content-type', 'application/json');\n\t\t\t\tthis.request = new globalThis.Request(this.request, {body: this._options.body});\n\t\t\t}\n\n\t\t\tconst fn = async () => {\n\t\t\t\tif (this._options.timeout > maxSafeTimeout) {\n\t\t\t\t\tthrow new RangeError(`The \\`timeout\\` option cannot be greater than ${maxSafeTimeout}`);\n\t\t\t\t}\n\n\t\t\t\tawait delay(1);\n\t\t\t\tlet response = await this._fetch();\n\n\t\t\t\tfor (const hook of this._options.hooks.afterResponse) {\n\t\t\t\t\t// eslint-disable-next-line no-await-in-loop\n\t\t\t\t\tconst modifiedResponse = await hook(\n\t\t\t\t\t\tthis.request,\n\t\t\t\t\t\tthis._options,\n\t\t\t\t\t\tthis._decorateResponse(response.clone())\n\t\t\t\t\t);\n\n\t\t\t\t\tif (modifiedResponse instanceof globalThis.Response) {\n\t\t\t\t\t\tresponse = modifiedResponse;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis._decorateResponse(response);\n\n\t\t\t\tif (!response.ok && this._options.throwHttpErrors) {\n\t\t\t\t\tthrow new HTTPError(response, this.request, this._options);\n\t\t\t\t}\n\n\t\t\t\t// If `onDownloadProgress` is passed, it uses the stream API internally\n\t\t\t\t/* istanbul ignore next */\n\t\t\t\tif (this._options.onDownloadProgress) {\n\t\t\t\t\tif (typeof this._options.onDownloadProgress !== 'function') {\n\t\t\t\t\t\tthrow new TypeError('The `onDownloadProgress` option must be a function');\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!supportsStreams) {\n\t\t\t\t\t\tthrow new Error('Streams are not supported in your environment. `ReadableStream` is missing.');\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this._stream(response.clone(), this._options.onDownloadProgress);\n\t\t\t\t}\n\n\t\t\t\treturn response;\n\t\t\t};\n\n\t\t\tconst isRetriableMethod = this._options.retry.methods.includes(this.request.method.toLowerCase());\n\t\t\tconst result = isRetriableMethod ? this._retry(fn) : fn();\n\n\t\t\tfor (const [type, mimeType] of Object.entries(responseTypes)) {\n\t\t\t\tresult[type] = async () => {\n\t\t\t\t\tthis.request.headers.set('accept', this.request.headers.get('accept') || mimeType);\n\n\t\t\t\t\tconst response = (await result).clone();\n\n\t\t\t\t\tif (type === 'json') {\n\t\t\t\t\t\tif (response.status === 204) {\n\t\t\t\t\t\t\treturn '';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (options.parseJson) {\n\t\t\t\t\t\t\treturn options.parseJson(await response.text());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn response[type]();\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\n\t\t_calculateRetryDelay(error) {\n\t\t\tthis._retryCount++;\n\n\t\t\tif (this._retryCount < this._options.retry.limit && !(error instanceof TimeoutError)) {\n\t\t\t\tif (error instanceof HTTPError) {\n\t\t\t\t\tif (!this._options.retry.statusCodes.includes(error.response.status)) {\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst retryAfter = error.response.headers.get('Retry-After');\n\t\t\t\t\tif (retryAfter && this._options.retry.afterStatusCodes.includes(error.response.status)) {\n\t\t\t\t\t\tlet after = Number(retryAfter);\n\t\t\t\t\t\tif (Number.isNaN(after)) {\n\t\t\t\t\t\t\tafter = Date.parse(retryAfter) - Date.now();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tafter *= 1000;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (typeof this._options.retry.maxRetryAfter !== 'undefined' && after > this._options.retry.maxRetryAfter) {\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn after;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (error.response.status === 413) {\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst BACKOFF_FACTOR = 0.3;\n\t\t\t\treturn BACKOFF_FACTOR * (2 ** (this._retryCount - 1)) * 1000;\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t}\n\n\t\t_decorateResponse(response) {\n\t\t\tif (this._options.parseJson) {\n\t\t\t\tresponse.json = async () => {\n\t\t\t\t\treturn this._options.parseJson(await response.text());\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn response;\n\t\t}\n\n\t\tasync _retry(fn) {\n\t\t\ttry {\n\t\t\t\treturn await fn();\n\t\t\t} catch (error) {\n\t\t\t\tconst ms = Math.min(this._calculateRetryDelay(error), maxSafeTimeout);\n\t\t\t\tif (ms !== 0 && this._retryCount > 0) {\n\t\t\t\t\tawait delay(ms);\n\n\t\t\t\t\tfor (const hook of this._options.hooks.beforeRetry) {\n\t\t\t\t\t\t// eslint-disable-next-line no-await-in-loop\n\t\t\t\t\t\tconst hookResult = await hook({\n\t\t\t\t\t\t\trequest: this.request,\n\t\t\t\t\t\t\toptions: this._options,\n\t\t\t\t\t\t\terror,\n\t\t\t\t\t\t\tretryCount: this._retryCount\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t// If `stop` is returned from the hook, the retry process is stopped\n\t\t\t\t\t\tif (hookResult === stop) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this._retry(fn);\n\t\t\t\t}\n\n\t\t\t\tif (this._options.throwHttpErrors) {\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync _fetch() {\n\t\t\tfor (const hook of this._options.hooks.beforeRequest) {\n\t\t\t\t// eslint-disable-next-line no-await-in-loop\n\t\t\t\tconst result = await hook(this.request, this._options);\n\n\t\t\t\tif (result instanceof Request) {\n\t\t\t\t\tthis.request = result;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (result instanceof Response) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this._options.timeout === false) {\n\t\t\t\treturn this._options.fetch(this.request.clone());\n\t\t\t}\n\n\t\t\treturn timeout(this.request.clone(), this.abortController, this._options);\n\t\t}\n\n\t\t/* istanbul ignore next */\n\t\t_stream(response, onDownloadProgress) {\n\t\t\tconst totalBytes = Number(response.headers.get('content-length')) || 0;\n\t\t\tlet transferredBytes = 0;\n\n\t\t\treturn new globalThis.Response(\n\t\t\t\tnew globalThis.ReadableStream({\n\t\t\t\t\tasync start(controller) {\n\t\t\t\t\t\tconst reader = response.body.getReader();\n\n\t\t\t\t\t\tif (onDownloadProgress) {\n\t\t\t\t\t\t\tonDownloadProgress({percent: 0, transferredBytes: 0, totalBytes}, new Uint8Array());\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tasync function read() {\n\t\t\t\t\t\t\tconst {done, value} = await reader.read();\n\t\t\t\t\t\t\tif (done) {\n\t\t\t\t\t\t\t\tcontroller.close();\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (onDownloadProgress) {\n\t\t\t\t\t\t\t\ttransferredBytes += value.byteLength;\n\t\t\t\t\t\t\t\tconst percent = totalBytes === 0 ? 0 : transferredBytes / totalBytes;\n\t\t\t\t\t\t\t\tonDownloadProgress({percent, transferredBytes, totalBytes}, value);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tcontroller.enqueue(value);\n\t\t\t\t\t\t\tawait read();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tawait read();\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t);\n\t\t}\n\t}\n\n\tconst validateAndMerge = (...sources) => {\n\t\tfor (const source of sources) {\n\t\t\tif ((!isObject(source) || Array.isArray(source)) && typeof source !== 'undefined') {\n\t\t\t\tthrow new TypeError('The `options` argument must be an object');\n\t\t\t}\n\t\t}\n\n\t\treturn deepMerge({}, ...sources);\n\t};\n\n\tconst createInstance = defaults => {\n\t\tconst ky = (input, options) => new Ky(input, validateAndMerge(defaults, options));\n\n\t\tfor (const method of requestMethods) {\n\t\t\tky[method] = (input, options) => new Ky(input, validateAndMerge(defaults, options, {method}));\n\t\t}\n\n\t\tky.HTTPError = HTTPError;\n\t\tky.TimeoutError = TimeoutError;\n\t\tky.create = newDefaults => createInstance(validateAndMerge(newDefaults));\n\t\tky.extend = newDefaults => createInstance(validateAndMerge(defaults, newDefaults));\n\t\tky.stop = stop;\n\n\t\treturn ky;\n\t};\n\n\tconst ky = createInstance();\n\n\treturn ky;\n\n})));\n","'use strict'\n\nconst isUrlHttp = require('is-url-http/lightweight')\nconst { flattie: flatten } = require('flattie')\nconst { encode: stringify } = require('qss')\nconst whoops = require('whoops')\n\nconst factory = require('./factory')\nconst ky = require('./ky')\n\nconst MicrolinkError = whoops('MicrolinkError')\n\nconst got = async (url, opts) => {\n try {\n if (opts.timeout === undefined) opts.timeout = false\n const response = await ky(url, opts)\n const body = await response.json()\n const { headers, status: statusCode, statusText: statusMessage } = response\n return { url: response.url, body, headers, statusCode, statusMessage }\n } catch (err) {\n if (err.response) {\n const { response } = err\n err.response = {\n ...response,\n headers: [...response.headers.entries()].reduce(\n (acc, [key, value]) => ({ ...acc, [key]: value }),\n {}\n ),\n statusCode: response.status,\n body: await response.text()\n }\n }\n throw err\n }\n}\n\nmodule.exports = factory({\n MicrolinkError,\n isUrlHttp,\n stringify,\n got,\n flatten,\n VERSION: '__MQL_VERSION__'\n})\n"],"names":["URL","global","require$$0","mimicFn","addErrorProps","require$$1","require$$2","require$$3","createExtendError","createError","libModule","factory","this","require$$4","require$$5"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;CAEA,MAAMA,KAAG,GAAGC,cAAM,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,GAAGC,8BAAc,CAAC,IAAG;CAC3D,MAAM,mBAAmB,GAAG,gBAAe;AAC3C;KACA,WAAc,GAAG,GAAG,IAAI;CACxB,EAAE,IAAI;CACN,IAAI,OAAO,mBAAmB,CAAC,IAAI,CAAC,IAAIF,KAAG,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;CACtD,GAAG,CAAC,OAAO,GAAG,EAAE;CAChB,IAAI,OAAO,KAAK;CAChB,GAAG;CACH;;;;CCXA,SAAS,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE;CAC9C,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,CAAC;AACtC;CACA,CAAC,IAAI,GAAG,IAAI,IAAI,EAAE;CAClB,EAAE,IAAI,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;CACjC,EAAE,MAAM,IAAI,OAAO,GAAG,IAAI,QAAQ,EAAE;CACpC,EAAE,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;CACpB,EAAE,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;CAChC,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;CACjC,GAAG,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG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b,GAAG;CACH,EAAC;AACD;KACA,OAAc,GAAG,OAAO,CAAC;CACzB,EAAE,cAAc;CAChB,EAAE,SAAS;CACX,EAAE,SAAS;CACX,EAAE,GAAG;CACL,EAAE,OAAO;CACT,EAAE,OAAO,EAAE,QAAiB;CAC5B,CAAC;;;;;;;;"}
|
package/dist/mql.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("url")):"function"==typeof define&&define.amd?define(["url"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).mql=e(t.require$$0$1)}(this,(function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var r=e(t),o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(t){if(t.__esModule)return t;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(t).forEach((function(r){var o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:function(){return t[r]}})})),e}const n=o.window?window.URL:r.default.URL,i=/^https?:\/\//i;var a={};function u(t,e,r,o,s){var n,i=s?s+r:s;if(null==o)e&&(t[s]=o);else if("object"!=typeof o)t[s]=o;else if(Array.isArray(o))for(n=0;n<o.length;n++)u(t,e,r,o[n],i+n);else for(n in o)u(t,e,r,o[n],i+n)}function c(t){if(!t)return"";var e=decodeURIComponent(t);return"false"!==e&&("true"===e||(0*+e==0?+e:e))}a.flattie=function(t,e,r){var o={};return"object"==typeof t&&u(o,!!r,e||".",t,""),o};var p=s(Object.freeze({__proto__:null,encode:function(t,e){var r,o,s,n="";for(r in t)if(void 0!==(s=t[r]))if(Array.isArray(s))for(o=0;o<s.length;o++)n&&(n+="&"),n+=encodeURIComponent(r)+"="+encodeURIComponent(s[o]);else n&&(n+="&"),n+=encodeURIComponent(r)+"="+encodeURIComponent(s);return(e||"")+n},decode:function(t){for(var e,r,o={},s=t.split("&");e=s.shift();)void 0!==o[r=(e=e.split("=")).shift()]?o[r]=[].concat(o[r],c(e.shift())):o[r]=c(e.shift());return o}})),h={exports:{}},f=s(Object.freeze({__proto__:null,default:t=>t}));const l=(t,e,r,o)=>{if("length"===r||"prototype"===r)return;const s=Object.getOwnPropertyDescriptor(t,r),n=Object.getOwnPropertyDescriptor(e,r);!d(s,n)&&o||Object.defineProperty(t,r,n)},d=function(t,e){return void 0===t||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},y=(t,e)=>`/* Wrapped ${t}*/\n${e}`,b=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),m=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name");var g=(t,e,{ignoreNonConfigurable:r=!1}={})=>{const{name:o}=t;for(const o of Reflect.ownKeys(e))l(t,e,o,r);return((t,e)=>{const r=Object.getPrototypeOf(e);r!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,r)})(t,e),((t,e,r)=>{const o=""===r?"":`with ${r.trim()}() `,s=y.bind(null,o,e.toString());Object.defineProperty(s,"name",m),Object.defineProperty(t,"toString",{...b,value:s})})(t,e,o),t},w={isFunction:t=>"function"==typeof t,isString:t=>"string"==typeof t,composeErrorMessage:(t,e)=>`${t}, ${e}`,inherits:(t,e)=>{t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}};const{isFunction:_,composeErrorMessage:R}=w;const E=f,T=g,j=function(t,...e){Object.assign(t,...e),t.description=_(t.message)?t.message(t):t.message,t.message=t.code?R(t.code,t.description):t.description},{isString:
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("url")):"function"==typeof define&&define.amd?define(["url"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).mql=e(t.require$$0$1)}(this,(function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var r=e(t),o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(t){if(t.__esModule)return t;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(t).forEach((function(r){var o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:function(){return t[r]}})})),e}const n=o.window?window.URL:r.default.URL,i=/^https?:\/\//i;var a={};function u(t,e,r,o,s){var n,i=s?s+r:s;if(null==o)e&&(t[s]=o);else if("object"!=typeof o)t[s]=o;else if(Array.isArray(o))for(n=0;n<o.length;n++)u(t,e,r,o[n],i+n);else for(n in o)u(t,e,r,o[n],i+n)}function c(t){if(!t)return"";var e=decodeURIComponent(t);return"false"!==e&&("true"===e||(0*+e==0?+e:e))}a.flattie=function(t,e,r){var o={};return"object"==typeof t&&u(o,!!r,e||".",t,""),o};var p=s(Object.freeze({__proto__:null,encode:function(t,e){var r,o,s,n="";for(r in t)if(void 0!==(s=t[r]))if(Array.isArray(s))for(o=0;o<s.length;o++)n&&(n+="&"),n+=encodeURIComponent(r)+"="+encodeURIComponent(s[o]);else n&&(n+="&"),n+=encodeURIComponent(r)+"="+encodeURIComponent(s);return(e||"")+n},decode:function(t){for(var e,r,o={},s=t.split("&");e=s.shift();)void 0!==o[r=(e=e.split("=")).shift()]?o[r]=[].concat(o[r],c(e.shift())):o[r]=c(e.shift());return o}})),h={exports:{}},f=s(Object.freeze({__proto__:null,default:t=>t}));const l=(t,e,r,o)=>{if("length"===r||"prototype"===r)return;const s=Object.getOwnPropertyDescriptor(t,r),n=Object.getOwnPropertyDescriptor(e,r);!d(s,n)&&o||Object.defineProperty(t,r,n)},d=function(t,e){return void 0===t||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},y=(t,e)=>`/* Wrapped ${t}*/\n${e}`,b=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),m=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name");var g=(t,e,{ignoreNonConfigurable:r=!1}={})=>{const{name:o}=t;for(const o of Reflect.ownKeys(e))l(t,e,o,r);return((t,e)=>{const r=Object.getPrototypeOf(e);r!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,r)})(t,e),((t,e,r)=>{const o=""===r?"":`with ${r.trim()}() `,s=y.bind(null,o,e.toString());Object.defineProperty(s,"name",m),Object.defineProperty(t,"toString",{...b,value:s})})(t,e,o),t},w={isFunction:t=>"function"==typeof t,isString:t=>"string"==typeof t,composeErrorMessage:(t,e)=>`${t}, ${e}`,inherits:(t,e)=>{t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}};const{isFunction:_,composeErrorMessage:R}=w;const E=f,T=g,j=function(t,...e){Object.assign(t,...e),t.description=_(t.message)?t.message(t):t.message,t.message=t.code?R(t.code,t.description):t.description},{isString:x}=w;var v=function(t,e){function r(r){const o=new t,s=x(r)?{message:r}:r;return j(o,e,s),o.stack=E(o.stack),o}return r.prototype=t.prototype,T(r,t),r};const{inherits:O}=w,q=g,C=/[^0-9a-zA-Z_$]/;const P=v,A=function(t){if("string"!=typeof t)throw new TypeError("Expected className to be a string");if(C.test(t))throw new Error("className contains invalid characters");function e(){Object.defineProperty(this,"name",{configurable:!0,value:t,writable:!0}),Error.captureStackTrace(this,this.constructor)}return O(e,Error),q(e,Error),e},S=t=>(e,r)=>{const o=A(e||t.name);return P(o,r)};h.exports=S(Error),h.exports.type=S(TypeError),h.exports.range=S(RangeError),h.exports.eval=S(EvalError),h.exports.syntax=S(SyntaxError),h.exports.reference=S(ReferenceError),h.exports.uri=S(URIError);const U={FREE:"https://api.microlink.io",PRO:"https://pro.microlink.io"},k=t=>null!==t&&"object"==typeof t;var D=({VERSION:t,MicrolinkError:e,isUrlHttp:r,stringify:o,got:s,flatten:n})=>{const i=t=>{if(!k(t))return;const e=n(t);return Object.keys(e).reduce(((t,r)=>({...t,[`data.${r}`]:e[r].toString()})),{})},a=async(t,r={})=>{try{const e=await s(t,r);return"buffer"===r.responseType?{body:e.body,response:e}:{...e.body,response:e}}catch(r){const{response:o={}}=r,{statusCode:s,body:n,headers:i,url:a=t}=o,u=k(n)&&!Buffer.isBuffer(n)?n:((t,e,r)=>{try{return JSON.parse(t)}catch(o){const s=t||e.message;return{status:"error",data:{url:s},more:"https://microlink.io/efatal",code:"EFATAL",message:s,url:r}}})(n,r,a);throw e({...u,message:u.message,url:a,statusCode:s,headers:i})}},u=(t,{data:e,apiKey:r,endpoint:s,retry:a,cache:u,...c}={},{responseType:p="json",headers:h,...f}={})=>{const l=!!r;return[`${s||U[l?"PRO":"FREE"]}?${o({url:t,...i(e),...n(c)})}`,{...f,responseType:p,cache:u,retry:a,headers:l?{...h,"x-api-key":r}:{...h}}]},c=t=>async(o,s,n)=>{((t="")=>{if(!r(t)){const r=`The \`url\` as \`${t}\` is not valid. Ensure it has protocol (http or https) and hostname.`;throw new e({status:"fail",data:{url:r},more:"https://microlink.io/docs/api/api-parameters/url",code:"EINVALURLCLIENT",message:r,url:t})}})(o);const[i,c]=u(o,s,{...t,...n});return a(i,c)},p=c();return p.MicrolinkError=e,p.getApiUrl=u,p.fetchFromApi=a,p.mapRules=i,p.version=t,p.stream=s.stream,p.buffer=c({responseType:"buffer"}),p},$={exports:{}};!function(t,e){t.exports=function(){
|
|
2
2
|
/*! MIT License © Sindre Sorhus */
|
|
3
|
-
const t=t=>null!==t&&"object"==typeof t,e="function"==typeof globalThis.AbortController,r="function"==typeof globalThis.ReadableStream,o="function"==typeof globalThis.FormData,s=(t,e)=>{const r=new globalThis.Headers(t||{}),o=e instanceof globalThis.Headers,s=new globalThis.Headers(e||{});for(const[t,e]of s)o&&"undefined"===e||void 0===e?r.delete(t):r.set(t,e);return r},n=(...e)=>{let r={},o={};for(const i of e){if(Array.isArray(i))Array.isArray(r)||(r=[]),r=[...r,...i];else if(t(i)){for(let[e,o]of Object.entries(i))t(o)&&e in r&&(o=n(r[e],o)),r={...r,[e]:o};t(i.headers)&&(o=s(o,i.headers))}r.headers=o}return r},i=["get","post","put","patch","head","delete"],a={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},u=["get","put","head","delete","options","trace"],c=[408,413,429,500,502,503,504],p=[413,429,503],h=Symbol("stop");class f extends Error{constructor(t,e,r){super(t.statusText||String(0===t.status||t.status?t.status:"Unknown response error")),this.name="HTTPError",this.response=t,this.request=e,this.options=r}}class l extends Error{constructor(t){super("Request timed out"),this.name="TimeoutError",this.request=t}}const d=t=>new Promise((e=>setTimeout(e,t))),y=(t,e,r)=>new Promise(((o,s)=>{const n=setTimeout((()=>{e&&e.abort(),s(new l(t))}),r.timeout);r.fetch(t).then(o).catch(s).then((()=>{clearTimeout(n)}))})),b=t=>i.includes(t)?t.toUpperCase():t,m={limit:2,methods:u,statusCodes:c,afterStatusCodes:p},g=(t={})=>{if("number"==typeof t)return{...m,limit:t};if(t.methods&&!Array.isArray(t.methods))throw new Error("retry.methods must be an array");if(t.statusCodes&&!Array.isArray(t.statusCodes))throw new Error("retry.statusCodes must be an array");return{...m,...t,afterStatusCodes:p}},w=2147483647;class _{constructor(t,i={}){if(this._retryCount=0,this._input=t,this._options={credentials:this._input.credentials||"same-origin",...i,headers:s(this._input.headers,i.headers),hooks:n({beforeRequest:[],beforeRetry:[],afterResponse:[]},i.hooks),method:b(i.method||this._input.method),prefixUrl:String(i.prefixUrl||""),retry:g(i.retry),throwHttpErrors:!1!==i.throwHttpErrors,timeout:void 0===i.timeout?1e4:i.timeout,fetch:i.fetch||globalThis.fetch.bind(globalThis)},"string"!=typeof this._input&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&"string"==typeof this._input){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(e&&(this.abortController=new globalThis.AbortController,this._options.signal&&this._options.signal.addEventListener("abort",(()=>{this.abortController.abort()})),this._options.signal=this.abortController.signal),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){const t="?"+("string"==typeof this._options.searchParams?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),e=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,t);!(o&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)||this._options.headers&&this._options.headers["content-type"]||this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(e,this.request),this._options)}void 0!==this._options.json&&(this._options.body=JSON.stringify(this._options.json),this.request.headers.set("content-type","application/json"),this.request=new globalThis.Request(this.request,{body:this._options.body}));const u=async()=>{if(this._options.timeout>w)throw new RangeError(`The \`timeout\` option cannot be greater than ${w}`);await d(1);let t=await this._fetch();for(const e of this._options.hooks.afterResponse){const r=await e(this.request,this._options,this._decorateResponse(t.clone()));r instanceof globalThis.Response&&(t=r)}if(this._decorateResponse(t),!t.ok&&this._options.throwHttpErrors)throw new f(t,this.request,this._options);if(this._options.onDownloadProgress){if("function"!=typeof this._options.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!r)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return this._stream(t.clone(),this._options.onDownloadProgress)}return t},c=this._options.retry.methods.includes(this.request.method.toLowerCase())?this._retry(u):u();for(const[t,e]of Object.entries(a))c[t]=async()=>{this.request.headers.set("accept",this.request.headers.get("accept")||e);const r=(await c).clone();if("json"===t){if(204===r.status)return"";if(i.parseJson)return i.parseJson(await r.text())}return r[t]()};return c}_calculateRetryDelay(t){if(this._retryCount++,this._retryCount<this._options.retry.limit&&!(t instanceof l)){if(t instanceof f){if(!this._options.retry.statusCodes.includes(t.response.status))return 0;const e=t.response.headers.get("Retry-After");if(e&&this._options.retry.afterStatusCodes.includes(t.response.status)){let t=Number(e);return Number.isNaN(t)?t=Date.parse(e)-Date.now():t*=1e3,void 0!==this._options.retry.maxRetryAfter&&t>this._options.retry.maxRetryAfter?0:t}if(413===t.response.status)return 0}return.3*2**(this._retryCount-1)*1e3}return 0}_decorateResponse(t){return this._options.parseJson&&(t.json=async()=>this._options.parseJson(await t.text())),t}async _retry(t){try{return await t()}catch(e){const r=Math.min(this._calculateRetryDelay(e),w);if(0!==r&&this._retryCount>0){await d(r);for(const t of this._options.hooks.beforeRetry)if(await t({request:this.request,options:this._options,error:e,retryCount:this._retryCount})===h)return;return this._retry(t)}if(this._options.throwHttpErrors)throw e}}async _fetch(){for(const t of this._options.hooks.beforeRequest){const e=await t(this.request,this._options);if(e instanceof Request){this.request=e;break}if(e instanceof Response)return e}return!1===this._options.timeout?this._options.fetch(this.request.clone()):y(this.request.clone(),this.abortController,this._options)}_stream(t,e){const r=Number(t.headers.get("content-length"))||0;let o=0;return new globalThis.Response(new globalThis.ReadableStream({async start(s){const n=t.body.getReader();async function i(){const{done:t,value:a}=await n.read();t?s.close():(e&&(o+=a.byteLength,e({percent:0===r?0:o/r,transferredBytes:o,totalBytes:r},a)),s.enqueue(a),await i())}e&&e({percent:0,transferredBytes:0,totalBytes:r},new Uint8Array),await i()}}))}}const R=(...e)=>{for(const r of e)if((!t(r)||Array.isArray(r))&&void 0!==r)throw new TypeError("The `options` argument must be an object");return n({},...e)},E=t=>{const e=(e,r)=>new _(e,R(t,r));for(const r of i)e[r]=(e,o)=>new _(e,R(t,o,{method:r}));return e.HTTPError=f,e.TimeoutError=l,e.create=t=>E(R(t)),e.extend=e=>E(R(t,e)),e.stop=h,e};return E()}()}($);const N=t=>{try{return i.test(new n(t).href)}catch(t){return!1}},{flattie:L}=a,{encode:H}=p,F=h.exports,I=$.exports;return D({MicrolinkError:F("MicrolinkError"),isUrlHttp:N,stringify:H,got:async(t,e)=>{try{void 0===e.timeout&&(e.timeout=!1);const r=await I(t,e),o=await r.json(),{headers:s,status:n,statusText:i}=r;return{url:r.url,body:o,headers:s,statusCode:n,statusMessage:i}}catch(t){if(t.response){const{response:e}=t;t.response={...e,headers:[...e.headers.entries()].reduce(((t,[e,r])=>({...t,[e]:r})),{}),statusCode:e.status,body:await e.text()}}throw t}},flatten:L,VERSION:"0.9.
|
|
3
|
+
const t=t=>null!==t&&"object"==typeof t,e="function"==typeof globalThis.AbortController,r="function"==typeof globalThis.ReadableStream,o="function"==typeof globalThis.FormData,s=(t,e)=>{const r=new globalThis.Headers(t||{}),o=e instanceof globalThis.Headers,s=new globalThis.Headers(e||{});for(const[t,e]of s)o&&"undefined"===e||void 0===e?r.delete(t):r.set(t,e);return r},n=(...e)=>{let r={},o={};for(const i of e){if(Array.isArray(i))Array.isArray(r)||(r=[]),r=[...r,...i];else if(t(i)){for(let[e,o]of Object.entries(i))t(o)&&e in r&&(o=n(r[e],o)),r={...r,[e]:o};t(i.headers)&&(o=s(o,i.headers))}r.headers=o}return r},i=["get","post","put","patch","head","delete"],a={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},u=["get","put","head","delete","options","trace"],c=[408,413,429,500,502,503,504],p=[413,429,503],h=Symbol("stop");class f extends Error{constructor(t,e,r){super(t.statusText||String(0===t.status||t.status?t.status:"Unknown response error")),this.name="HTTPError",this.response=t,this.request=e,this.options=r}}class l extends Error{constructor(t){super("Request timed out"),this.name="TimeoutError",this.request=t}}const d=t=>new Promise((e=>setTimeout(e,t))),y=(t,e,r)=>new Promise(((o,s)=>{const n=setTimeout((()=>{e&&e.abort(),s(new l(t))}),r.timeout);r.fetch(t).then(o).catch(s).then((()=>{clearTimeout(n)}))})),b=t=>i.includes(t)?t.toUpperCase():t,m={limit:2,methods:u,statusCodes:c,afterStatusCodes:p},g=(t={})=>{if("number"==typeof t)return{...m,limit:t};if(t.methods&&!Array.isArray(t.methods))throw new Error("retry.methods must be an array");if(t.statusCodes&&!Array.isArray(t.statusCodes))throw new Error("retry.statusCodes must be an array");return{...m,...t,afterStatusCodes:p}},w=2147483647;class _{constructor(t,i={}){if(this._retryCount=0,this._input=t,this._options={credentials:this._input.credentials||"same-origin",...i,headers:s(this._input.headers,i.headers),hooks:n({beforeRequest:[],beforeRetry:[],afterResponse:[]},i.hooks),method:b(i.method||this._input.method),prefixUrl:String(i.prefixUrl||""),retry:g(i.retry),throwHttpErrors:!1!==i.throwHttpErrors,timeout:void 0===i.timeout?1e4:i.timeout,fetch:i.fetch||globalThis.fetch.bind(globalThis)},"string"!=typeof this._input&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&"string"==typeof this._input){if(this._input.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(e&&(this.abortController=new globalThis.AbortController,this._options.signal&&this._options.signal.addEventListener("abort",(()=>{this.abortController.abort()})),this._options.signal=this.abortController.signal),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){const t="?"+("string"==typeof this._options.searchParams?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString()),e=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,t);!(o&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)||this._options.headers&&this._options.headers["content-type"]||this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(e,this.request),this._options)}void 0!==this._options.json&&(this._options.body=JSON.stringify(this._options.json),this.request.headers.set("content-type","application/json"),this.request=new globalThis.Request(this.request,{body:this._options.body}));const u=async()=>{if(this._options.timeout>w)throw new RangeError(`The \`timeout\` option cannot be greater than ${w}`);await d(1);let t=await this._fetch();for(const e of this._options.hooks.afterResponse){const r=await e(this.request,this._options,this._decorateResponse(t.clone()));r instanceof globalThis.Response&&(t=r)}if(this._decorateResponse(t),!t.ok&&this._options.throwHttpErrors)throw new f(t,this.request,this._options);if(this._options.onDownloadProgress){if("function"!=typeof this._options.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!r)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");return this._stream(t.clone(),this._options.onDownloadProgress)}return t},c=this._options.retry.methods.includes(this.request.method.toLowerCase())?this._retry(u):u();for(const[t,e]of Object.entries(a))c[t]=async()=>{this.request.headers.set("accept",this.request.headers.get("accept")||e);const r=(await c).clone();if("json"===t){if(204===r.status)return"";if(i.parseJson)return i.parseJson(await r.text())}return r[t]()};return c}_calculateRetryDelay(t){if(this._retryCount++,this._retryCount<this._options.retry.limit&&!(t instanceof l)){if(t instanceof f){if(!this._options.retry.statusCodes.includes(t.response.status))return 0;const e=t.response.headers.get("Retry-After");if(e&&this._options.retry.afterStatusCodes.includes(t.response.status)){let t=Number(e);return Number.isNaN(t)?t=Date.parse(e)-Date.now():t*=1e3,void 0!==this._options.retry.maxRetryAfter&&t>this._options.retry.maxRetryAfter?0:t}if(413===t.response.status)return 0}return.3*2**(this._retryCount-1)*1e3}return 0}_decorateResponse(t){return this._options.parseJson&&(t.json=async()=>this._options.parseJson(await t.text())),t}async _retry(t){try{return await t()}catch(e){const r=Math.min(this._calculateRetryDelay(e),w);if(0!==r&&this._retryCount>0){await d(r);for(const t of this._options.hooks.beforeRetry)if(await t({request:this.request,options:this._options,error:e,retryCount:this._retryCount})===h)return;return this._retry(t)}if(this._options.throwHttpErrors)throw e}}async _fetch(){for(const t of this._options.hooks.beforeRequest){const e=await t(this.request,this._options);if(e instanceof Request){this.request=e;break}if(e instanceof Response)return e}return!1===this._options.timeout?this._options.fetch(this.request.clone()):y(this.request.clone(),this.abortController,this._options)}_stream(t,e){const r=Number(t.headers.get("content-length"))||0;let o=0;return new globalThis.Response(new globalThis.ReadableStream({async start(s){const n=t.body.getReader();async function i(){const{done:t,value:a}=await n.read();t?s.close():(e&&(o+=a.byteLength,e({percent:0===r?0:o/r,transferredBytes:o,totalBytes:r},a)),s.enqueue(a),await i())}e&&e({percent:0,transferredBytes:0,totalBytes:r},new Uint8Array),await i()}}))}}const R=(...e)=>{for(const r of e)if((!t(r)||Array.isArray(r))&&void 0!==r)throw new TypeError("The `options` argument must be an object");return n({},...e)},E=t=>{const e=(e,r)=>new _(e,R(t,r));for(const r of i)e[r]=(e,o)=>new _(e,R(t,o,{method:r}));return e.HTTPError=f,e.TimeoutError=l,e.create=t=>E(R(t)),e.extend=e=>E(R(t,e)),e.stop=h,e};return E()}()}($);const N=t=>{try{return i.test(new n(t).href)}catch(t){return!1}},{flattie:L}=a,{encode:H}=p,F=h.exports,I=$.exports;return D({MicrolinkError:F("MicrolinkError"),isUrlHttp:N,stringify:H,got:async(t,e)=>{try{void 0===e.timeout&&(e.timeout=!1);const r=await I(t,e),o=await r.json(),{headers:s,status:n,statusText:i}=r;return{url:r.url,body:o,headers:s,statusCode:n,statusMessage:i}}catch(t){if(t.response){const{response:e}=t;t.response={...e,headers:[...e.headers.entries()].reduce(((t,[e,r])=>({...t,[e]:r})),{}),statusCode:e.status,body:await e.text()}}throw t}},flatten:L,VERSION:"0.9.12"})}));
|
|
4
4
|
//# sourceMappingURL=mql.min.js.map
|
package/dist/mql.min.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mql.min.js","sources":["../node_modules/is-url-http/lightweight.js","../node_modules/flattie/dist/index.js","../node_modules/qss/dist/qss.m.js","../node_modules/mimic-fn/index.js","../node_modules/whoops/lib/helpers.js","../node_modules/whoops/lib/add-error-props.js","../node_modules/whoops/lib/create-extend-error.js","../node_modules/whoops/lib/create-error.js","../node_modules/whoops/lib/index.js","../src/factory.js","../src/ky.js","../src/browser.js"],"sourcesContent":["'use strict'\n\nconst URL = global.window ? window.URL : require('url').URL\nconst REGEX_HTTP_PROTOCOL = /^https?:\\/\\//i\n\nmodule.exports = url => {\n try {\n return REGEX_HTTP_PROTOCOL.test(new URL(url).href)\n } catch (err) {\n return false\n }\n}\n","function iter(output, nullish, sep, val, key) {\n\tvar k, pfx = key ? (key + sep) : key;\n\n\tif (val == null) {\n\t\tif (nullish) output[key] = val;\n\t} else if (typeof val != 'object') {\n\t\toutput[key] = val;\n\t} else if (Array.isArray(val)) {\n\t\tfor (k=0; k < val.length; k++) {\n\t\t\titer(output, nullish, sep, val[k], pfx + k);\n\t\t}\n\t} else {\n\t\tfor (k in val) {\n\t\t\titer(output, nullish, sep, val[k], pfx + k);\n\t\t}\n\t}\n}\n\nfunction flattie(input, glue, toNull) {\n\tvar output = {};\n\tif (typeof input == 'object') {\n\t\titer(output, !!toNull, glue || '.', input, '');\n\t}\n\treturn output;\n}\n\nexports.flattie = flattie;","export function encode(obj, pfx) {\n\tvar k, i, tmp, str='';\n\n\tfor (k in obj) {\n\t\tif ((tmp = obj[k]) !== void 0) {\n\t\t\tif (Array.isArray(tmp)) {\n\t\t\t\tfor (i=0; i < tmp.length; i++) {\n\t\t\t\t\tstr && (str += '&');\n\t\t\t\t\tstr += encodeURIComponent(k) + '=' + encodeURIComponent(tmp[i]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tstr && (str += '&');\n\t\t\t\tstr += encodeURIComponent(k) + '=' + encodeURIComponent(tmp);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn (pfx || '') + str;\n}\n\nfunction toValue(mix) {\n\tif (!mix) return '';\n\tvar str = decodeURIComponent(mix);\n\tif (str === 'false') return false;\n\tif (str === 'true') return true;\n\treturn (+str * 0 === 0) ? (+str) : str;\n}\n\nexport function decode(str) {\n\tvar tmp, k, out={}, arr=str.split('&');\n\n\twhile (tmp = arr.shift()) {\n\t\ttmp = tmp.split('=');\n\t\tk = tmp.shift();\n\t\tif (out[k] !== void 0) {\n\t\t\tout[k] = [].concat(out[k], toValue(tmp.shift()));\n\t\t} else {\n\t\t\tout[k] = toValue(tmp.shift());\n\t\t}\n\t}\n\n\treturn out;\n}\n","'use strict';\n\nconst copyProperty = (to, from, property, ignoreNonConfigurable) => {\n\t// `Function#length` should reflect the parameters of `to` not `from` since we keep its body.\n\t// `Function#prototype` is non-writable and non-configurable so can never be modified.\n\tif (property === 'length' || property === 'prototype') {\n\t\treturn;\n\t}\n\n\tconst toDescriptor = Object.getOwnPropertyDescriptor(to, property);\n\tconst fromDescriptor = Object.getOwnPropertyDescriptor(from, property);\n\n\tif (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) {\n\t\treturn;\n\t}\n\n\tObject.defineProperty(to, property, fromDescriptor);\n};\n\n// `Object.defineProperty()` throws if the property exists, is not configurable and either:\n// - one its descriptors is changed\n// - it is non-writable and its value is changed\nconst canCopyProperty = function (toDescriptor, fromDescriptor) {\n\treturn toDescriptor === undefined || toDescriptor.configurable || (\n\t\ttoDescriptor.writable === fromDescriptor.writable &&\n\t\ttoDescriptor.enumerable === fromDescriptor.enumerable &&\n\t\ttoDescriptor.configurable === fromDescriptor.configurable &&\n\t\t(toDescriptor.writable || toDescriptor.value === fromDescriptor.value)\n\t);\n};\n\nconst changePrototype = (to, from) => {\n\tconst fromPrototype = Object.getPrototypeOf(from);\n\tif (fromPrototype === Object.getPrototypeOf(to)) {\n\t\treturn;\n\t}\n\n\tObject.setPrototypeOf(to, fromPrototype);\n};\n\nconst wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/\\n${fromBody}`;\n\nconst toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, 'toString');\nconst toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, 'name');\n\n// We call `from.toString()` early (not lazily) to ensure `from` can be garbage collected.\n// We use `bind()` instead of a closure for the same reason.\n// Calling `from.toString()` early also allows caching it in case `to.toString()` is called several times.\nconst changeToString = (to, from, name) => {\n\tconst withName = name === '' ? '' : `with ${name.trim()}() `;\n\tconst newToString = wrappedToString.bind(null, withName, from.toString());\n\t// Ensure `to.toString.toString` is non-enumerable and has the same `same`\n\tObject.defineProperty(newToString, 'name', toStringName);\n\tObject.defineProperty(to, 'toString', {...toStringDescriptor, value: newToString});\n};\n\nconst mimicFn = (to, from, {ignoreNonConfigurable = false} = {}) => {\n\tconst {name} = to;\n\n\tfor (const property of Reflect.ownKeys(from)) {\n\t\tcopyProperty(to, from, property, ignoreNonConfigurable);\n\t}\n\n\tchangePrototype(to, from);\n\tchangeToString(to, from, name);\n\n\treturn to;\n};\n\nmodule.exports = mimicFn;\n","'use strict'\n\nmodule.exports = {\n isFunction: obj => typeof obj === 'function',\n isString: obj => typeof obj === 'string',\n composeErrorMessage: (code, description) => `${code}, ${description}`,\n inherits: (ctor, superCtor) => {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n}\n","'use strict'\n\nconst {isFunction, composeErrorMessage} = require('./helpers')\n\nfunction interfaceObject (error, ...props) {\n Object.assign(error, ...props)\n\n error.description = isFunction(error.message) ? error.message(error) : error.message\n\n error.message = error.code\n ? composeErrorMessage(error.code, error.description)\n : error.description\n}\n\nmodule.exports = interfaceObject\n","'use strict'\n\nconst cleanStack = require('clean-stack')\nconst mimicFn = require('mimic-fn')\n\nconst addErrorProps = require('./add-error-props')\nconst {isString} = require('./helpers')\n\nfunction createExtendError (ErrorClass, classProps) {\n function ExtendError (props) {\n const error = new ErrorClass()\n const errorProps = isString(props) ? {message: props} : props\n addErrorProps(error, classProps, errorProps)\n\n error.stack = cleanStack(error.stack)\n return error\n }\n\n ExtendError.prototype = ErrorClass.prototype\n mimicFn(ExtendError, ErrorClass)\n\n return ExtendError\n}\n\nmodule.exports = createExtendError\n","'use strict'\n\nconst {inherits} = require('./helpers')\nconst mimicFn = require('mimic-fn')\n\nconst REGEX_CLASS_NAME = /[^0-9a-zA-Z_$]/\n\nfunction createError (className) {\n if (typeof className !== 'string') {\n throw new TypeError('Expected className to be a string')\n }\n\n if (REGEX_CLASS_NAME.test(className)) {\n throw new Error('className contains invalid characters')\n }\n\n function ErrorClass () {\n Object.defineProperty(this, 'name', {\n configurable: true,\n value: className,\n writable: true\n })\n\n Error.captureStackTrace(this, this.constructor)\n }\n\n inherits(ErrorClass, Error)\n mimicFn(ErrorClass, Error)\n return ErrorClass\n}\n\nmodule.exports = createError\n","'use strict'\n\nconst createExtendError = require('./create-extend-error')\nconst createError = require('./create-error')\n\nconst createErrorClass = ErrorClass => (className, props) => {\n const errorClass = createError(className || ErrorClass.name)\n return createExtendError(errorClass, props)\n}\n\nmodule.exports = createErrorClass(Error)\nmodule.exports.type = createErrorClass(TypeError)\nmodule.exports.range = createErrorClass(RangeError)\nmodule.exports.eval = createErrorClass(EvalError)\nmodule.exports.syntax = createErrorClass(SyntaxError)\nmodule.exports.reference = createErrorClass(ReferenceError)\nmodule.exports.uri = createErrorClass(URIError)\n","const ENDPOINT = {\n FREE: 'https://api.microlink.io',\n PRO: 'https://pro.microlink.io'\n}\n\nconst isObject = input => typeof input === 'object'\n\nconst pickBy = obj => {\n Object.keys(obj).forEach(key => obj[key] == null && delete obj[key])\n return obj\n}\n\nconst parseBody = (input, error, url) => {\n try {\n return JSON.parse(input)\n } catch (_) {\n const message = input || error.message\n\n return {\n status: 'error',\n data: { url: message },\n more: 'https://microlink.io/efatal',\n code: 'EFATAL',\n message,\n url\n }\n }\n}\n\nconst factory = ({ VERSION, MicrolinkError, isUrlHttp, stringify, got, flatten }) => {\n const assertUrl = (url = '') => {\n if (!isUrlHttp(url)) {\n const message = `The \\`url\\` as \\`${url}\\` is not valid. Ensure it has protocol (http or https) and hostname.`\n throw new MicrolinkError({\n status: 'fail',\n data: { url: message },\n more: 'https://microlink.io/docs/api/api-parameters/url',\n code: 'EINVALURLCLIENT',\n message,\n url\n })\n }\n }\n\n const mapRules = rules => {\n if (!isObject(rules)) return\n const flatRules = flatten(rules)\n return Object.keys(flatRules).reduce(\n (acc, key) => ({ ...acc, [`data.${key}`]: flatRules[key] }),\n {}\n )\n }\n\n const fetchFromApi = async (apiUrl, opts = {}) => {\n try {\n const response = await got(apiUrl, opts)\n return opts.responseType === 'buffer'\n ? { body: response.body, response }\n : { ...response.body, response }\n } catch (err) {\n const { response = {} } = err\n const { statusCode, body: rawBody, headers, url: uri = apiUrl } = response\n\n const body =\n isObject(rawBody) && !Buffer.isBuffer(rawBody) ? rawBody : parseBody(rawBody, err, uri)\n\n throw MicrolinkError({\n ...body,\n message: body.message,\n url: uri,\n statusCode,\n headers\n })\n }\n }\n\n const getApiUrl = (\n url,\n { data, apiKey, endpoint, retry, cache, ...opts } = {},\n { responseType = 'json', headers: gotHeaders, ...gotOpts } = {}\n ) => {\n const isPro = !!apiKey\n const apiEndpoint = endpoint || ENDPOINT[isPro ? 'PRO' : 'FREE']\n\n const apiUrl = `${apiEndpoint}?${stringify({\n url,\n ...mapRules(data),\n ...flatten(pickBy(opts))\n })}`\n\n const headers = isPro ? { ...gotHeaders, 'x-api-key': apiKey } : { ...gotHeaders }\n return [apiUrl, { ...gotOpts, responseType, cache, retry, headers }]\n }\n\n const createMql = defaultOpts => async (url, opts, gotOpts) => {\n assertUrl(url)\n const [apiUrl, fetchOpts] = getApiUrl(url, opts, {\n ...defaultOpts,\n ...gotOpts\n })\n return fetchFromApi(apiUrl, fetchOpts)\n }\n\n const mql = createMql()\n mql.MicrolinkError = MicrolinkError\n mql.getApiUrl = getApiUrl\n mql.fetchFromApi = fetchFromApi\n mql.mapRules = mapRules\n mql.version = VERSION\n mql.stream = got.stream\n mql.buffer = createMql({ responseType: 'buffer' })\n\n return mql\n}\n\nmodule.exports = factory\n","(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ky = factory());\n}(this, (function () { 'use strict';\n\n\t/*! MIT License © Sindre Sorhus */\n\n\tconst isObject = value => value !== null && typeof value === 'object';\n\tconst supportsAbortController = typeof globalThis.AbortController === 'function';\n\tconst supportsStreams = typeof globalThis.ReadableStream === 'function';\n\tconst supportsFormData = typeof globalThis.FormData === 'function';\n\n\tconst mergeHeaders = (source1, source2) => {\n\t\tconst result = new globalThis.Headers(source1 || {});\n\t\tconst isHeadersInstance = source2 instanceof globalThis.Headers;\n\t\tconst source = new globalThis.Headers(source2 || {});\n\n\t\tfor (const [key, value] of source) {\n\t\t\tif ((isHeadersInstance && value === 'undefined') || value === undefined) {\n\t\t\t\tresult.delete(key);\n\t\t\t} else {\n\t\t\t\tresult.set(key, value);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\tconst deepMerge = (...sources) => {\n\t\tlet returnValue = {};\n\t\tlet headers = {};\n\n\t\tfor (const source of sources) {\n\t\t\tif (Array.isArray(source)) {\n\t\t\t\tif (!(Array.isArray(returnValue))) {\n\t\t\t\t\treturnValue = [];\n\t\t\t\t}\n\n\t\t\t\treturnValue = [...returnValue, ...source];\n\t\t\t} else if (isObject(source)) {\n\t\t\t\tfor (let [key, value] of Object.entries(source)) {\n\t\t\t\t\tif (isObject(value) && (key in returnValue)) {\n\t\t\t\t\t\tvalue = deepMerge(returnValue[key], value);\n\t\t\t\t\t}\n\n\t\t\t\t\treturnValue = {...returnValue, [key]: value};\n\t\t\t\t}\n\n\t\t\t\tif (isObject(source.headers)) {\n\t\t\t\t\theaders = mergeHeaders(headers, source.headers);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturnValue.headers = headers;\n\t\t}\n\n\t\treturn returnValue;\n\t};\n\n\tconst requestMethods = [\n\t\t'get',\n\t\t'post',\n\t\t'put',\n\t\t'patch',\n\t\t'head',\n\t\t'delete'\n\t];\n\n\tconst responseTypes = {\n\t\tjson: 'application/json',\n\t\ttext: 'text/*',\n\t\tformData: 'multipart/form-data',\n\t\tarrayBuffer: '*/*',\n\t\tblob: '*/*'\n\t};\n\n\tconst retryMethods = [\n\t\t'get',\n\t\t'put',\n\t\t'head',\n\t\t'delete',\n\t\t'options',\n\t\t'trace'\n\t];\n\n\tconst retryStatusCodes = [\n\t\t408,\n\t\t413,\n\t\t429,\n\t\t500,\n\t\t502,\n\t\t503,\n\t\t504\n\t];\n\n\tconst retryAfterStatusCodes = [\n\t\t413,\n\t\t429,\n\t\t503\n\t];\n\n\tconst stop = Symbol('stop');\n\n\tclass HTTPError extends Error {\n\t\tconstructor(response, request, options) {\n\t\t\t// Set the message to the status text, such as Unauthorized,\n\t\t\t// with some fallbacks. This message should never be undefined.\n\t\t\tsuper(\n\t\t\t\tresponse.statusText ||\n\t\t\t\tString(\n\t\t\t\t\t(response.status === 0 || response.status) ?\n\t\t\t\t\t\tresponse.status : 'Unknown response error'\n\t\t\t\t)\n\t\t\t);\n\t\t\tthis.name = 'HTTPError';\n\t\t\tthis.response = response;\n\t\t\tthis.request = request;\n\t\t\tthis.options = options;\n\t\t}\n\t}\n\n\tclass TimeoutError extends Error {\n\t\tconstructor(request) {\n\t\t\tsuper('Request timed out');\n\t\t\tthis.name = 'TimeoutError';\n\t\t\tthis.request = request;\n\t\t}\n\t}\n\n\tconst delay = ms => new Promise(resolve => setTimeout(resolve, ms));\n\n\t// `Promise.race()` workaround (#91)\n\tconst timeout = (request, abortController, options) =>\n\t\tnew Promise((resolve, reject) => {\n\t\t\tconst timeoutID = setTimeout(() => {\n\t\t\t\tif (abortController) {\n\t\t\t\t\tabortController.abort();\n\t\t\t\t}\n\n\t\t\t\treject(new TimeoutError(request));\n\t\t\t}, options.timeout);\n\n\t\t\t/* eslint-disable promise/prefer-await-to-then */\n\t\t\toptions.fetch(request)\n\t\t\t\t.then(resolve)\n\t\t\t\t.catch(reject)\n\t\t\t\t.then(() => {\n\t\t\t\t\tclearTimeout(timeoutID);\n\t\t\t\t});\n\t\t\t/* eslint-enable promise/prefer-await-to-then */\n\t\t});\n\n\tconst normalizeRequestMethod = input => requestMethods.includes(input) ? input.toUpperCase() : input;\n\n\tconst defaultRetryOptions = {\n\t\tlimit: 2,\n\t\tmethods: retryMethods,\n\t\tstatusCodes: retryStatusCodes,\n\t\tafterStatusCodes: retryAfterStatusCodes\n\t};\n\n\tconst normalizeRetryOptions = (retry = {}) => {\n\t\tif (typeof retry === 'number') {\n\t\t\treturn {\n\t\t\t\t...defaultRetryOptions,\n\t\t\t\tlimit: retry\n\t\t\t};\n\t\t}\n\n\t\tif (retry.methods && !Array.isArray(retry.methods)) {\n\t\t\tthrow new Error('retry.methods must be an array');\n\t\t}\n\n\t\tif (retry.statusCodes && !Array.isArray(retry.statusCodes)) {\n\t\t\tthrow new Error('retry.statusCodes must be an array');\n\t\t}\n\n\t\treturn {\n\t\t\t...defaultRetryOptions,\n\t\t\t...retry,\n\t\t\tafterStatusCodes: retryAfterStatusCodes\n\t\t};\n\t};\n\n\t// The maximum value of a 32bit int (see issue #117)\n\tconst maxSafeTimeout = 2147483647;\n\n\tclass Ky {\n\t\tconstructor(input, options = {}) {\n\t\t\tthis._retryCount = 0;\n\t\t\tthis._input = input;\n\t\t\tthis._options = {\n\t\t\t\t// TODO: credentials can be removed when the spec change is implemented in all browsers. Context: https://www.chromestatus.com/feature/4539473312350208\n\t\t\t\tcredentials: this._input.credentials || 'same-origin',\n\t\t\t\t...options,\n\t\t\t\theaders: mergeHeaders(this._input.headers, options.headers),\n\t\t\t\thooks: deepMerge({\n\t\t\t\t\tbeforeRequest: [],\n\t\t\t\t\tbeforeRetry: [],\n\t\t\t\t\tafterResponse: []\n\t\t\t\t}, options.hooks),\n\t\t\t\tmethod: normalizeRequestMethod(options.method || this._input.method),\n\t\t\t\tprefixUrl: String(options.prefixUrl || ''),\n\t\t\t\tretry: normalizeRetryOptions(options.retry),\n\t\t\t\tthrowHttpErrors: options.throwHttpErrors !== false,\n\t\t\t\ttimeout: typeof options.timeout === 'undefined' ? 10000 : options.timeout,\n\t\t\t\tfetch: options.fetch || globalThis.fetch.bind(globalThis)\n\t\t\t};\n\n\t\t\tif (typeof this._input !== 'string' && !(this._input instanceof URL || this._input instanceof globalThis.Request)) {\n\t\t\t\tthrow new TypeError('`input` must be a string, URL, or Request');\n\t\t\t}\n\n\t\t\tif (this._options.prefixUrl && typeof this._input === 'string') {\n\t\t\t\tif (this._input.startsWith('/')) {\n\t\t\t\t\tthrow new Error('`input` must not begin with a slash when using `prefixUrl`');\n\t\t\t\t}\n\n\t\t\t\tif (!this._options.prefixUrl.endsWith('/')) {\n\t\t\t\t\tthis._options.prefixUrl += '/';\n\t\t\t\t}\n\n\t\t\t\tthis._input = this._options.prefixUrl + this._input;\n\t\t\t}\n\n\t\t\tif (supportsAbortController) {\n\t\t\t\tthis.abortController = new globalThis.AbortController();\n\t\t\t\tif (this._options.signal) {\n\t\t\t\t\tthis._options.signal.addEventListener('abort', () => {\n\t\t\t\t\t\tthis.abortController.abort();\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tthis._options.signal = this.abortController.signal;\n\t\t\t}\n\n\t\t\tthis.request = new globalThis.Request(this._input, this._options);\n\n\t\t\tif (this._options.searchParams) {\n\t\t\t\tconst textSearchParams = typeof this._options.searchParams === 'string' ?\n\t\t\t\t\tthis._options.searchParams.replace(/^\\?/, '') :\n\t\t\t\t\tnew URLSearchParams(this._options.searchParams).toString();\n\t\t\t\tconst searchParams = '?' + textSearchParams;\n\t\t\t\tconst url = this.request.url.replace(/(?:\\?.*?)?(?=#|$)/, searchParams);\n\n\t\t\t\t// To provide correct form boundary, Content-Type header should be deleted each time when new Request instantiated from another one\n\t\t\t\tif (((supportsFormData && this._options.body instanceof globalThis.FormData) || this._options.body instanceof URLSearchParams) && !(this._options.headers && this._options.headers['content-type'])) {\n\t\t\t\t\tthis.request.headers.delete('content-type');\n\t\t\t\t}\n\n\t\t\t\tthis.request = new globalThis.Request(new globalThis.Request(url, this.request), this._options);\n\t\t\t}\n\n\t\t\tif (this._options.json !== undefined) {\n\t\t\t\tthis._options.body = JSON.stringify(this._options.json);\n\t\t\t\tthis.request.headers.set('content-type', 'application/json');\n\t\t\t\tthis.request = new globalThis.Request(this.request, {body: this._options.body});\n\t\t\t}\n\n\t\t\tconst fn = async () => {\n\t\t\t\tif (this._options.timeout > maxSafeTimeout) {\n\t\t\t\t\tthrow new RangeError(`The \\`timeout\\` option cannot be greater than ${maxSafeTimeout}`);\n\t\t\t\t}\n\n\t\t\t\tawait delay(1);\n\t\t\t\tlet response = await this._fetch();\n\n\t\t\t\tfor (const hook of this._options.hooks.afterResponse) {\n\t\t\t\t\t// eslint-disable-next-line no-await-in-loop\n\t\t\t\t\tconst modifiedResponse = await hook(\n\t\t\t\t\t\tthis.request,\n\t\t\t\t\t\tthis._options,\n\t\t\t\t\t\tthis._decorateResponse(response.clone())\n\t\t\t\t\t);\n\n\t\t\t\t\tif (modifiedResponse instanceof globalThis.Response) {\n\t\t\t\t\t\tresponse = modifiedResponse;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis._decorateResponse(response);\n\n\t\t\t\tif (!response.ok && this._options.throwHttpErrors) {\n\t\t\t\t\tthrow new HTTPError(response, this.request, this._options);\n\t\t\t\t}\n\n\t\t\t\t// If `onDownloadProgress` is passed, it uses the stream API internally\n\t\t\t\t/* istanbul ignore next */\n\t\t\t\tif (this._options.onDownloadProgress) {\n\t\t\t\t\tif (typeof this._options.onDownloadProgress !== 'function') {\n\t\t\t\t\t\tthrow new TypeError('The `onDownloadProgress` option must be a function');\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!supportsStreams) {\n\t\t\t\t\t\tthrow new Error('Streams are not supported in your environment. `ReadableStream` is missing.');\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this._stream(response.clone(), this._options.onDownloadProgress);\n\t\t\t\t}\n\n\t\t\t\treturn response;\n\t\t\t};\n\n\t\t\tconst isRetriableMethod = this._options.retry.methods.includes(this.request.method.toLowerCase());\n\t\t\tconst result = isRetriableMethod ? this._retry(fn) : fn();\n\n\t\t\tfor (const [type, mimeType] of Object.entries(responseTypes)) {\n\t\t\t\tresult[type] = async () => {\n\t\t\t\t\tthis.request.headers.set('accept', this.request.headers.get('accept') || mimeType);\n\n\t\t\t\t\tconst response = (await result).clone();\n\n\t\t\t\t\tif (type === 'json') {\n\t\t\t\t\t\tif (response.status === 204) {\n\t\t\t\t\t\t\treturn '';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (options.parseJson) {\n\t\t\t\t\t\t\treturn options.parseJson(await response.text());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn response[type]();\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\n\t\t_calculateRetryDelay(error) {\n\t\t\tthis._retryCount++;\n\n\t\t\tif (this._retryCount < this._options.retry.limit && !(error instanceof TimeoutError)) {\n\t\t\t\tif (error instanceof HTTPError) {\n\t\t\t\t\tif (!this._options.retry.statusCodes.includes(error.response.status)) {\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst retryAfter = error.response.headers.get('Retry-After');\n\t\t\t\t\tif (retryAfter && this._options.retry.afterStatusCodes.includes(error.response.status)) {\n\t\t\t\t\t\tlet after = Number(retryAfter);\n\t\t\t\t\t\tif (Number.isNaN(after)) {\n\t\t\t\t\t\t\tafter = Date.parse(retryAfter) - Date.now();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tafter *= 1000;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (typeof this._options.retry.maxRetryAfter !== 'undefined' && after > this._options.retry.maxRetryAfter) {\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn after;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (error.response.status === 413) {\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst BACKOFF_FACTOR = 0.3;\n\t\t\t\treturn BACKOFF_FACTOR * (2 ** (this._retryCount - 1)) * 1000;\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t}\n\n\t\t_decorateResponse(response) {\n\t\t\tif (this._options.parseJson) {\n\t\t\t\tresponse.json = async () => {\n\t\t\t\t\treturn this._options.parseJson(await response.text());\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn response;\n\t\t}\n\n\t\tasync _retry(fn) {\n\t\t\ttry {\n\t\t\t\treturn await fn();\n\t\t\t} catch (error) {\n\t\t\t\tconst ms = Math.min(this._calculateRetryDelay(error), maxSafeTimeout);\n\t\t\t\tif (ms !== 0 && this._retryCount > 0) {\n\t\t\t\t\tawait delay(ms);\n\n\t\t\t\t\tfor (const hook of this._options.hooks.beforeRetry) {\n\t\t\t\t\t\t// eslint-disable-next-line no-await-in-loop\n\t\t\t\t\t\tconst hookResult = await hook({\n\t\t\t\t\t\t\trequest: this.request,\n\t\t\t\t\t\t\toptions: this._options,\n\t\t\t\t\t\t\terror,\n\t\t\t\t\t\t\tretryCount: this._retryCount\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t// If `stop` is returned from the hook, the retry process is stopped\n\t\t\t\t\t\tif (hookResult === stop) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this._retry(fn);\n\t\t\t\t}\n\n\t\t\t\tif (this._options.throwHttpErrors) {\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync _fetch() {\n\t\t\tfor (const hook of this._options.hooks.beforeRequest) {\n\t\t\t\t// eslint-disable-next-line no-await-in-loop\n\t\t\t\tconst result = await hook(this.request, this._options);\n\n\t\t\t\tif (result instanceof Request) {\n\t\t\t\t\tthis.request = result;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (result instanceof Response) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this._options.timeout === false) {\n\t\t\t\treturn this._options.fetch(this.request.clone());\n\t\t\t}\n\n\t\t\treturn timeout(this.request.clone(), this.abortController, this._options);\n\t\t}\n\n\t\t/* istanbul ignore next */\n\t\t_stream(response, onDownloadProgress) {\n\t\t\tconst totalBytes = Number(response.headers.get('content-length')) || 0;\n\t\t\tlet transferredBytes = 0;\n\n\t\t\treturn new globalThis.Response(\n\t\t\t\tnew globalThis.ReadableStream({\n\t\t\t\t\tasync start(controller) {\n\t\t\t\t\t\tconst reader = response.body.getReader();\n\n\t\t\t\t\t\tif (onDownloadProgress) {\n\t\t\t\t\t\t\tonDownloadProgress({percent: 0, transferredBytes: 0, totalBytes}, new Uint8Array());\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tasync function read() {\n\t\t\t\t\t\t\tconst {done, value} = await reader.read();\n\t\t\t\t\t\t\tif (done) {\n\t\t\t\t\t\t\t\tcontroller.close();\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (onDownloadProgress) {\n\t\t\t\t\t\t\t\ttransferredBytes += value.byteLength;\n\t\t\t\t\t\t\t\tconst percent = totalBytes === 0 ? 0 : transferredBytes / totalBytes;\n\t\t\t\t\t\t\t\tonDownloadProgress({percent, transferredBytes, totalBytes}, value);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tcontroller.enqueue(value);\n\t\t\t\t\t\t\tawait read();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tawait read();\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t);\n\t\t}\n\t}\n\n\tconst validateAndMerge = (...sources) => {\n\t\tfor (const source of sources) {\n\t\t\tif ((!isObject(source) || Array.isArray(source)) && typeof source !== 'undefined') {\n\t\t\t\tthrow new TypeError('The `options` argument must be an object');\n\t\t\t}\n\t\t}\n\n\t\treturn deepMerge({}, ...sources);\n\t};\n\n\tconst createInstance = defaults => {\n\t\tconst ky = (input, options) => new Ky(input, validateAndMerge(defaults, options));\n\n\t\tfor (const method of requestMethods) {\n\t\t\tky[method] = (input, options) => new Ky(input, validateAndMerge(defaults, options, {method}));\n\t\t}\n\n\t\tky.HTTPError = HTTPError;\n\t\tky.TimeoutError = TimeoutError;\n\t\tky.create = newDefaults => createInstance(validateAndMerge(newDefaults));\n\t\tky.extend = newDefaults => createInstance(validateAndMerge(defaults, newDefaults));\n\t\tky.stop = stop;\n\n\t\treturn ky;\n\t};\n\n\tconst ky = createInstance();\n\n\treturn ky;\n\n})));\n","'use strict'\n\nconst isUrlHttp = require('is-url-http/lightweight')\nconst { flattie: flatten } = require('flattie')\nconst { encode: stringify } = require('qss')\nconst whoops = require('whoops')\n\nconst factory = require('./factory')\nconst ky = require('./ky')\n\nconst MicrolinkError = whoops('MicrolinkError')\n\nconst got = async (url, opts) => {\n try {\n if (opts.timeout === undefined) opts.timeout = false\n const response = await ky(url, opts)\n const body = await response.json()\n const { headers, status: statusCode, statusText: statusMessage } = response\n return { url: response.url, body, headers, statusCode, statusMessage }\n } catch (err) {\n if (err.response) {\n const { response } = err\n err.response = {\n ...response,\n headers: [...response.headers.entries()].reduce(\n (acc, [key, value]) => ({ ...acc, [key]: value }),\n {}\n ),\n statusCode: response.status,\n body: await response.text()\n }\n }\n throw err\n }\n}\n\nmodule.exports = factory({\n MicrolinkError,\n isUrlHttp,\n stringify,\n got,\n flatten,\n VERSION: '__MQL_VERSION__'\n})\n"],"names":["URL","global","window","require$$0","REGEX_HTTP_PROTOCOL","iter","output","nullish","sep","val","key","k","pfx","Array","isArray","length","toValue","mix","str","decodeURIComponent","input","glue","toNull","obj","i","tmp","encodeURIComponent","out","arr","split","shift","concat","copyProperty","to","from","property","ignoreNonConfigurable","toDescriptor","Object","getOwnPropertyDescriptor","fromDescriptor","canCopyProperty","defineProperty","undefined","configurable","writable","enumerable","value","wrappedToString","withName","fromBody","toStringDescriptor","Function","prototype","toStringName","toString","mimicFn_1","name","Reflect","ownKeys","fromPrototype","getPrototypeOf","setPrototypeOf","changePrototype","trim","newToString","bind","changeToString","helpers","isFunction","isString","composeErrorMessage","code","description","inherits","ctor","superCtor","super_","create","constructor","cleanStack","mimicFn","require$$1","addErrorProps","error","props","assign","message","require$$3","createExtendError_1","ErrorClass","classProps","ExtendError","errorProps","stack","REGEX_CLASS_NAME","createExtendError","createError","className","TypeError","test","Error","this","captureStackTrace","createErrorClass","errorClass","RangeError","EvalError","SyntaxError","ReferenceError","URIError","ENDPOINT","FREE","PRO","isObject","factory_1","VERSION","MicrolinkError","isUrlHttp","stringify","got","flatten","mapRules","rules","flatRules","keys","reduce","acc","[object Object]","fetchFromApi","async","apiUrl","opts","response","responseType","body","err","statusCode","rawBody","headers","url","uri","Buffer","isBuffer","JSON","parse","_","status","data","more","parseBody","getApiUrl","apiKey","endpoint","retry","cache","gotHeaders","gotOpts","isPro","forEach","x-api-key","createMql","defaultOpts","assertUrl","fetchOpts","mql","version","stream","buffer","module","supportsAbortController","globalThis","AbortController","supportsStreams","ReadableStream","supportsFormData","FormData","mergeHeaders","source1","source2","result","Headers","isHeadersInstance","source","delete","set","deepMerge","sources","returnValue","entries","requestMethods","responseTypes","json","text","formData","arrayBuffer","blob","retryMethods","retryStatusCodes","retryAfterStatusCodes","stop","Symbol","HTTPError","request","options","super","statusText","String","TimeoutError","delay","ms","Promise","resolve","setTimeout","timeout","abortController","reject","timeoutID","abort","fetch","then","catch","clearTimeout","normalizeRequestMethod","includes","toUpperCase","defaultRetryOptions","limit","methods","statusCodes","afterStatusCodes","normalizeRetryOptions","maxSafeTimeout","Ky","_retryCount","_input","_options","credentials","hooks","beforeRequest","beforeRetry","afterResponse","method","prefixUrl","throwHttpErrors","Request","startsWith","endsWith","signal","addEventListener","searchParams","replace","URLSearchParams","fn","_fetch","hook","modifiedResponse","_decorateResponse","clone","Response","ok","onDownloadProgress","_stream","toLowerCase","_retry","type","mimeType","get","parseJson","retryAfter","after","Number","isNaN","Date","now","maxRetryAfter","Math","min","_calculateRetryDelay","retryCount","totalBytes","transferredBytes","controller","reader","getReader","read","done","close","byteLength","percent","enqueue","Uint8Array","validateAndMerge","createInstance","defaults","ky","newDefaults","extend","factory","href","flattie","encode","require$$2","whoops","require$$5","require$$4","statusMessage"],"mappings":"svBAEA,MAAMA,EAAMC,EAAOC,OAASA,OAAOF,IAAMG,UAAeH,IAClDI,EAAsB,yBCH5B,SAASC,EAAKC,EAAQC,EAASC,EAAKC,EAAKC,GAC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AAOU,EAAKR,KACtB,SACuBzF,IAAjByF,EAAKkF,UAAuBlF,EAAKkF,SAAU,GAC/C,MAAMjF,QAAiBkK,EAAG3J,EAAKR,GACzBG,QAAaF,EAAS2D,QACtBrD,QAAEA,EAASQ,OAAQV,EAAYqE,WAAYoG,GAAkB7K,EACnE,MAAO,CAAEO,IAAKP,EAASO,IAAKL,KAAAA,EAAMI,QAAAA,EAASF,WAAAA,EAAYyK,cAAAA,GACvD,MAAO1K,GACP,GAAIA,EAAIH,SAAU,CAChB,MAAMA,SAAEA,GAAaG,EACrBA,EAAIH,SAAW,IACVA,EACHM,QAAS,IAAIN,EAASM,QAAQkD,WAAW/D,QACvC,CAACC,GAAMrH,EAAKqC,UAAiBgF,EAAKC,CAACtH,GAAMqC,KACzC,IAEF0F,WAAYJ,EAASc,OACrBZ,WAAYF,EAAS4D,QAGzB,MAAMzD,IASRf,QAAAA,EACAL,QAAS"}
|
|
1
|
+
{"version":3,"file":"mql.min.js","sources":["../node_modules/is-url-http/lightweight.js","../node_modules/flattie/dist/index.js","../node_modules/qss/dist/qss.m.js","../node_modules/mimic-fn/index.js","../node_modules/whoops/lib/helpers.js","../node_modules/whoops/lib/add-error-props.js","../node_modules/whoops/lib/create-extend-error.js","../node_modules/whoops/lib/create-error.js","../node_modules/whoops/lib/index.js","../src/factory.js","../src/ky.js","../src/browser.js"],"sourcesContent":["'use strict'\n\nconst URL = global.window ? window.URL : require('url').URL\nconst REGEX_HTTP_PROTOCOL = /^https?:\\/\\//i\n\nmodule.exports = url => {\n try {\n return REGEX_HTTP_PROTOCOL.test(new URL(url).href)\n } catch (err) {\n return false\n }\n}\n","function iter(output, nullish, sep, val, key) {\n\tvar k, pfx = key ? (key + sep) : key;\n\n\tif (val == null) {\n\t\tif (nullish) output[key] = val;\n\t} else if (typeof val != 'object') {\n\t\toutput[key] = val;\n\t} else if (Array.isArray(val)) {\n\t\tfor (k=0; k < val.length; k++) {\n\t\t\titer(output, nullish, sep, val[k], pfx + k);\n\t\t}\n\t} else {\n\t\tfor (k in val) {\n\t\t\titer(output, nullish, sep, val[k], pfx + k);\n\t\t}\n\t}\n}\n\nfunction flattie(input, glue, toNull) {\n\tvar output = {};\n\tif (typeof input == 'object') {\n\t\titer(output, !!toNull, glue || '.', input, '');\n\t}\n\treturn output;\n}\n\nexports.flattie = flattie;","export function encode(obj, pfx) {\n\tvar k, i, tmp, str='';\n\n\tfor (k in obj) {\n\t\tif ((tmp = obj[k]) !== void 0) {\n\t\t\tif (Array.isArray(tmp)) {\n\t\t\t\tfor (i=0; i < tmp.length; i++) {\n\t\t\t\t\tstr && (str += '&');\n\t\t\t\t\tstr += encodeURIComponent(k) + '=' + encodeURIComponent(tmp[i]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tstr && (str += '&');\n\t\t\t\tstr += encodeURIComponent(k) + '=' + encodeURIComponent(tmp);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn (pfx || '') + str;\n}\n\nfunction toValue(mix) {\n\tif (!mix) return '';\n\tvar str = decodeURIComponent(mix);\n\tif (str === 'false') return false;\n\tif (str === 'true') return true;\n\treturn (+str * 0 === 0) ? (+str) : str;\n}\n\nexport function decode(str) {\n\tvar tmp, k, out={}, arr=str.split('&');\n\n\twhile (tmp = arr.shift()) {\n\t\ttmp = tmp.split('=');\n\t\tk = tmp.shift();\n\t\tif (out[k] !== void 0) {\n\t\t\tout[k] = [].concat(out[k], toValue(tmp.shift()));\n\t\t} else {\n\t\t\tout[k] = toValue(tmp.shift());\n\t\t}\n\t}\n\n\treturn out;\n}\n","'use strict';\n\nconst copyProperty = (to, from, property, ignoreNonConfigurable) => {\n\t// `Function#length` should reflect the parameters of `to` not `from` since we keep its body.\n\t// `Function#prototype` is non-writable and non-configurable so can never be modified.\n\tif (property === 'length' || property === 'prototype') {\n\t\treturn;\n\t}\n\n\tconst toDescriptor = Object.getOwnPropertyDescriptor(to, property);\n\tconst fromDescriptor = Object.getOwnPropertyDescriptor(from, property);\n\n\tif (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) {\n\t\treturn;\n\t}\n\n\tObject.defineProperty(to, property, fromDescriptor);\n};\n\n// `Object.defineProperty()` throws if the property exists, is not configurable and either:\n// - one its descriptors is changed\n// - it is non-writable and its value is changed\nconst canCopyProperty = function (toDescriptor, fromDescriptor) {\n\treturn toDescriptor === undefined || toDescriptor.configurable || (\n\t\ttoDescriptor.writable === fromDescriptor.writable &&\n\t\ttoDescriptor.enumerable === fromDescriptor.enumerable &&\n\t\ttoDescriptor.configurable === fromDescriptor.configurable &&\n\t\t(toDescriptor.writable || toDescriptor.value === fromDescriptor.value)\n\t);\n};\n\nconst changePrototype = (to, from) => {\n\tconst fromPrototype = Object.getPrototypeOf(from);\n\tif (fromPrototype === Object.getPrototypeOf(to)) {\n\t\treturn;\n\t}\n\n\tObject.setPrototypeOf(to, fromPrototype);\n};\n\nconst wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/\\n${fromBody}`;\n\nconst toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, 'toString');\nconst toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, 'name');\n\n// We call `from.toString()` early (not lazily) to ensure `from` can be garbage collected.\n// We use `bind()` instead of a closure for the same reason.\n// Calling `from.toString()` early also allows caching it in case `to.toString()` is called several times.\nconst changeToString = (to, from, name) => {\n\tconst withName = name === '' ? '' : `with ${name.trim()}() `;\n\tconst newToString = wrappedToString.bind(null, withName, from.toString());\n\t// Ensure `to.toString.toString` is non-enumerable and has the same `same`\n\tObject.defineProperty(newToString, 'name', toStringName);\n\tObject.defineProperty(to, 'toString', {...toStringDescriptor, value: newToString});\n};\n\nconst mimicFn = (to, from, {ignoreNonConfigurable = false} = {}) => {\n\tconst {name} = to;\n\n\tfor (const property of Reflect.ownKeys(from)) {\n\t\tcopyProperty(to, from, property, ignoreNonConfigurable);\n\t}\n\n\tchangePrototype(to, from);\n\tchangeToString(to, from, name);\n\n\treturn to;\n};\n\nmodule.exports = mimicFn;\n","'use strict'\n\nmodule.exports = {\n isFunction: obj => typeof obj === 'function',\n isString: obj => typeof obj === 'string',\n composeErrorMessage: (code, description) => `${code}, ${description}`,\n inherits: (ctor, superCtor) => {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n}\n","'use strict'\n\nconst {isFunction, composeErrorMessage} = require('./helpers')\n\nfunction interfaceObject (error, ...props) {\n Object.assign(error, ...props)\n\n error.description = isFunction(error.message) ? error.message(error) : error.message\n\n error.message = error.code\n ? composeErrorMessage(error.code, error.description)\n : error.description\n}\n\nmodule.exports = interfaceObject\n","'use strict'\n\nconst cleanStack = require('clean-stack')\nconst mimicFn = require('mimic-fn')\n\nconst addErrorProps = require('./add-error-props')\nconst {isString} = require('./helpers')\n\nfunction createExtendError (ErrorClass, classProps) {\n function ExtendError (props) {\n const error = new ErrorClass()\n const errorProps = isString(props) ? {message: props} : props\n addErrorProps(error, classProps, errorProps)\n\n error.stack = cleanStack(error.stack)\n return error\n }\n\n ExtendError.prototype = ErrorClass.prototype\n mimicFn(ExtendError, ErrorClass)\n\n return ExtendError\n}\n\nmodule.exports = createExtendError\n","'use strict'\n\nconst {inherits} = require('./helpers')\nconst mimicFn = require('mimic-fn')\n\nconst REGEX_CLASS_NAME = /[^0-9a-zA-Z_$]/\n\nfunction createError (className) {\n if (typeof className !== 'string') {\n throw new TypeError('Expected className to be a string')\n }\n\n if (REGEX_CLASS_NAME.test(className)) {\n throw new Error('className contains invalid characters')\n }\n\n function ErrorClass () {\n Object.defineProperty(this, 'name', {\n configurable: true,\n value: className,\n writable: true\n })\n\n Error.captureStackTrace(this, this.constructor)\n }\n\n inherits(ErrorClass, Error)\n mimicFn(ErrorClass, Error)\n return ErrorClass\n}\n\nmodule.exports = createError\n","'use strict'\n\nconst createExtendError = require('./create-extend-error')\nconst createError = require('./create-error')\n\nconst createErrorClass = ErrorClass => (className, props) => {\n const errorClass = createError(className || ErrorClass.name)\n return createExtendError(errorClass, props)\n}\n\nmodule.exports = createErrorClass(Error)\nmodule.exports.type = createErrorClass(TypeError)\nmodule.exports.range = createErrorClass(RangeError)\nmodule.exports.eval = createErrorClass(EvalError)\nmodule.exports.syntax = createErrorClass(SyntaxError)\nmodule.exports.reference = createErrorClass(ReferenceError)\nmodule.exports.uri = createErrorClass(URIError)\n","const ENDPOINT = {\n FREE: 'https://api.microlink.io',\n PRO: 'https://pro.microlink.io'\n}\n\nconst isObject = input => input !== null && typeof input === 'object'\n\nconst parseBody = (input, error, url) => {\n try {\n return JSON.parse(input)\n } catch (_) {\n const message = input || error.message\n\n return {\n status: 'error',\n data: { url: message },\n more: 'https://microlink.io/efatal',\n code: 'EFATAL',\n message,\n url\n }\n }\n}\n\nconst factory = ({ VERSION, MicrolinkError, isUrlHttp, stringify, got, flatten }) => {\n const assertUrl = (url = '') => {\n if (!isUrlHttp(url)) {\n const message = `The \\`url\\` as \\`${url}\\` is not valid. Ensure it has protocol (http or https) and hostname.`\n throw new MicrolinkError({\n status: 'fail',\n data: { url: message },\n more: 'https://microlink.io/docs/api/api-parameters/url',\n code: 'EINVALURLCLIENT',\n message,\n url\n })\n }\n }\n\n const mapRules = rules => {\n if (!isObject(rules)) return\n const flatRules = flatten(rules)\n return Object.keys(flatRules).reduce(\n (acc, key) => ({ ...acc, [`data.${key}`]: flatRules[key].toString() }),\n {}\n )\n }\n\n const fetchFromApi = async (apiUrl, opts = {}) => {\n try {\n const response = await got(apiUrl, opts)\n return opts.responseType === 'buffer'\n ? { body: response.body, response }\n : { ...response.body, response }\n } catch (err) {\n const { response = {} } = err\n const { statusCode, body: rawBody, headers, url: uri = apiUrl } = response\n\n const body =\n isObject(rawBody) && !Buffer.isBuffer(rawBody) ? rawBody : parseBody(rawBody, err, uri)\n\n throw MicrolinkError({\n ...body,\n message: body.message,\n url: uri,\n statusCode,\n headers\n })\n }\n }\n\n const getApiUrl = (\n url,\n { data, apiKey, endpoint, retry, cache, ...opts } = {},\n { responseType = 'json', headers: gotHeaders, ...gotOpts } = {}\n ) => {\n const isPro = !!apiKey\n const apiEndpoint = endpoint || ENDPOINT[isPro ? 'PRO' : 'FREE']\n\n const apiUrl = `${apiEndpoint}?${stringify({\n url,\n ...mapRules(data),\n ...flatten(opts)\n })}`\n\n const headers = isPro ? { ...gotHeaders, 'x-api-key': apiKey } : { ...gotHeaders }\n return [apiUrl, { ...gotOpts, responseType, cache, retry, headers }]\n }\n\n const createMql = defaultOpts => async (url, opts, gotOpts) => {\n assertUrl(url)\n const [apiUrl, fetchOpts] = getApiUrl(url, opts, {\n ...defaultOpts,\n ...gotOpts\n })\n return fetchFromApi(apiUrl, fetchOpts)\n }\n\n const mql = createMql()\n mql.MicrolinkError = MicrolinkError\n mql.getApiUrl = getApiUrl\n mql.fetchFromApi = fetchFromApi\n mql.mapRules = mapRules\n mql.version = VERSION\n mql.stream = got.stream\n mql.buffer = createMql({ responseType: 'buffer' })\n\n return mql\n}\n\nmodule.exports = factory\n","(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ky = factory());\n}(this, (function () { 'use strict';\n\n\t/*! MIT License © Sindre Sorhus */\n\n\tconst isObject = value => value !== null && typeof value === 'object';\n\tconst supportsAbortController = typeof globalThis.AbortController === 'function';\n\tconst supportsStreams = typeof globalThis.ReadableStream === 'function';\n\tconst supportsFormData = typeof globalThis.FormData === 'function';\n\n\tconst mergeHeaders = (source1, source2) => {\n\t\tconst result = new globalThis.Headers(source1 || {});\n\t\tconst isHeadersInstance = source2 instanceof globalThis.Headers;\n\t\tconst source = new globalThis.Headers(source2 || {});\n\n\t\tfor (const [key, value] of source) {\n\t\t\tif ((isHeadersInstance && value === 'undefined') || value === undefined) {\n\t\t\t\tresult.delete(key);\n\t\t\t} else {\n\t\t\t\tresult.set(key, value);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\tconst deepMerge = (...sources) => {\n\t\tlet returnValue = {};\n\t\tlet headers = {};\n\n\t\tfor (const source of sources) {\n\t\t\tif (Array.isArray(source)) {\n\t\t\t\tif (!(Array.isArray(returnValue))) {\n\t\t\t\t\treturnValue = [];\n\t\t\t\t}\n\n\t\t\t\treturnValue = [...returnValue, ...source];\n\t\t\t} else if (isObject(source)) {\n\t\t\t\tfor (let [key, value] of Object.entries(source)) {\n\t\t\t\t\tif (isObject(value) && (key in returnValue)) {\n\t\t\t\t\t\tvalue = deepMerge(returnValue[key], value);\n\t\t\t\t\t}\n\n\t\t\t\t\treturnValue = {...returnValue, [key]: value};\n\t\t\t\t}\n\n\t\t\t\tif (isObject(source.headers)) {\n\t\t\t\t\theaders = mergeHeaders(headers, source.headers);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturnValue.headers = headers;\n\t\t}\n\n\t\treturn returnValue;\n\t};\n\n\tconst requestMethods = [\n\t\t'get',\n\t\t'post',\n\t\t'put',\n\t\t'patch',\n\t\t'head',\n\t\t'delete'\n\t];\n\n\tconst responseTypes = {\n\t\tjson: 'application/json',\n\t\ttext: 'text/*',\n\t\tformData: 'multipart/form-data',\n\t\tarrayBuffer: '*/*',\n\t\tblob: '*/*'\n\t};\n\n\tconst retryMethods = [\n\t\t'get',\n\t\t'put',\n\t\t'head',\n\t\t'delete',\n\t\t'options',\n\t\t'trace'\n\t];\n\n\tconst retryStatusCodes = [\n\t\t408,\n\t\t413,\n\t\t429,\n\t\t500,\n\t\t502,\n\t\t503,\n\t\t504\n\t];\n\n\tconst retryAfterStatusCodes = [\n\t\t413,\n\t\t429,\n\t\t503\n\t];\n\n\tconst stop = Symbol('stop');\n\n\tclass HTTPError extends Error {\n\t\tconstructor(response, request, options) {\n\t\t\t// Set the message to the status text, such as Unauthorized,\n\t\t\t// with some fallbacks. This message should never be undefined.\n\t\t\tsuper(\n\t\t\t\tresponse.statusText ||\n\t\t\t\tString(\n\t\t\t\t\t(response.status === 0 || response.status) ?\n\t\t\t\t\t\tresponse.status : 'Unknown response error'\n\t\t\t\t)\n\t\t\t);\n\t\t\tthis.name = 'HTTPError';\n\t\t\tthis.response = response;\n\t\t\tthis.request = request;\n\t\t\tthis.options = options;\n\t\t}\n\t}\n\n\tclass TimeoutError extends Error {\n\t\tconstructor(request) {\n\t\t\tsuper('Request timed out');\n\t\t\tthis.name = 'TimeoutError';\n\t\t\tthis.request = request;\n\t\t}\n\t}\n\n\tconst delay = ms => new Promise(resolve => setTimeout(resolve, ms));\n\n\t// `Promise.race()` workaround (#91)\n\tconst timeout = (request, abortController, options) =>\n\t\tnew Promise((resolve, reject) => {\n\t\t\tconst timeoutID = setTimeout(() => {\n\t\t\t\tif (abortController) {\n\t\t\t\t\tabortController.abort();\n\t\t\t\t}\n\n\t\t\t\treject(new TimeoutError(request));\n\t\t\t}, options.timeout);\n\n\t\t\t/* eslint-disable promise/prefer-await-to-then */\n\t\t\toptions.fetch(request)\n\t\t\t\t.then(resolve)\n\t\t\t\t.catch(reject)\n\t\t\t\t.then(() => {\n\t\t\t\t\tclearTimeout(timeoutID);\n\t\t\t\t});\n\t\t\t/* eslint-enable promise/prefer-await-to-then */\n\t\t});\n\n\tconst normalizeRequestMethod = input => requestMethods.includes(input) ? input.toUpperCase() : input;\n\n\tconst defaultRetryOptions = {\n\t\tlimit: 2,\n\t\tmethods: retryMethods,\n\t\tstatusCodes: retryStatusCodes,\n\t\tafterStatusCodes: retryAfterStatusCodes\n\t};\n\n\tconst normalizeRetryOptions = (retry = {}) => {\n\t\tif (typeof retry === 'number') {\n\t\t\treturn {\n\t\t\t\t...defaultRetryOptions,\n\t\t\t\tlimit: retry\n\t\t\t};\n\t\t}\n\n\t\tif (retry.methods && !Array.isArray(retry.methods)) {\n\t\t\tthrow new Error('retry.methods must be an array');\n\t\t}\n\n\t\tif (retry.statusCodes && !Array.isArray(retry.statusCodes)) {\n\t\t\tthrow new Error('retry.statusCodes must be an array');\n\t\t}\n\n\t\treturn {\n\t\t\t...defaultRetryOptions,\n\t\t\t...retry,\n\t\t\tafterStatusCodes: retryAfterStatusCodes\n\t\t};\n\t};\n\n\t// The maximum value of a 32bit int (see issue #117)\n\tconst maxSafeTimeout = 2147483647;\n\n\tclass Ky {\n\t\tconstructor(input, options = {}) {\n\t\t\tthis._retryCount = 0;\n\t\t\tthis._input = input;\n\t\t\tthis._options = {\n\t\t\t\t// TODO: credentials can be removed when the spec change is implemented in all browsers. Context: https://www.chromestatus.com/feature/4539473312350208\n\t\t\t\tcredentials: this._input.credentials || 'same-origin',\n\t\t\t\t...options,\n\t\t\t\theaders: mergeHeaders(this._input.headers, options.headers),\n\t\t\t\thooks: deepMerge({\n\t\t\t\t\tbeforeRequest: [],\n\t\t\t\t\tbeforeRetry: [],\n\t\t\t\t\tafterResponse: []\n\t\t\t\t}, options.hooks),\n\t\t\t\tmethod: normalizeRequestMethod(options.method || this._input.method),\n\t\t\t\tprefixUrl: String(options.prefixUrl || ''),\n\t\t\t\tretry: normalizeRetryOptions(options.retry),\n\t\t\t\tthrowHttpErrors: options.throwHttpErrors !== false,\n\t\t\t\ttimeout: typeof options.timeout === 'undefined' ? 10000 : options.timeout,\n\t\t\t\tfetch: options.fetch || globalThis.fetch.bind(globalThis)\n\t\t\t};\n\n\t\t\tif (typeof this._input !== 'string' && !(this._input instanceof URL || this._input instanceof globalThis.Request)) {\n\t\t\t\tthrow new TypeError('`input` must be a string, URL, or Request');\n\t\t\t}\n\n\t\t\tif (this._options.prefixUrl && typeof this._input === 'string') {\n\t\t\t\tif (this._input.startsWith('/')) {\n\t\t\t\t\tthrow new Error('`input` must not begin with a slash when using `prefixUrl`');\n\t\t\t\t}\n\n\t\t\t\tif (!this._options.prefixUrl.endsWith('/')) {\n\t\t\t\t\tthis._options.prefixUrl += '/';\n\t\t\t\t}\n\n\t\t\t\tthis._input = this._options.prefixUrl + this._input;\n\t\t\t}\n\n\t\t\tif (supportsAbortController) {\n\t\t\t\tthis.abortController = new globalThis.AbortController();\n\t\t\t\tif (this._options.signal) {\n\t\t\t\t\tthis._options.signal.addEventListener('abort', () => {\n\t\t\t\t\t\tthis.abortController.abort();\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tthis._options.signal = this.abortController.signal;\n\t\t\t}\n\n\t\t\tthis.request = new globalThis.Request(this._input, this._options);\n\n\t\t\tif (this._options.searchParams) {\n\t\t\t\tconst textSearchParams = typeof this._options.searchParams === 'string' ?\n\t\t\t\t\tthis._options.searchParams.replace(/^\\?/, '') :\n\t\t\t\t\tnew URLSearchParams(this._options.searchParams).toString();\n\t\t\t\tconst searchParams = '?' + textSearchParams;\n\t\t\t\tconst url = this.request.url.replace(/(?:\\?.*?)?(?=#|$)/, searchParams);\n\n\t\t\t\t// To provide correct form boundary, Content-Type header should be deleted each time when new Request instantiated from another one\n\t\t\t\tif (((supportsFormData && this._options.body instanceof globalThis.FormData) || this._options.body instanceof URLSearchParams) && !(this._options.headers && this._options.headers['content-type'])) {\n\t\t\t\t\tthis.request.headers.delete('content-type');\n\t\t\t\t}\n\n\t\t\t\tthis.request = new globalThis.Request(new globalThis.Request(url, this.request), this._options);\n\t\t\t}\n\n\t\t\tif (this._options.json !== undefined) {\n\t\t\t\tthis._options.body = JSON.stringify(this._options.json);\n\t\t\t\tthis.request.headers.set('content-type', 'application/json');\n\t\t\t\tthis.request = new globalThis.Request(this.request, {body: this._options.body});\n\t\t\t}\n\n\t\t\tconst fn = async () => {\n\t\t\t\tif (this._options.timeout > maxSafeTimeout) {\n\t\t\t\t\tthrow new RangeError(`The \\`timeout\\` option cannot be greater than ${maxSafeTimeout}`);\n\t\t\t\t}\n\n\t\t\t\tawait delay(1);\n\t\t\t\tlet response = await this._fetch();\n\n\t\t\t\tfor (const hook of this._options.hooks.afterResponse) {\n\t\t\t\t\t// eslint-disable-next-line no-await-in-loop\n\t\t\t\t\tconst modifiedResponse = await hook(\n\t\t\t\t\t\tthis.request,\n\t\t\t\t\t\tthis._options,\n\t\t\t\t\t\tthis._decorateResponse(response.clone())\n\t\t\t\t\t);\n\n\t\t\t\t\tif (modifiedResponse instanceof globalThis.Response) {\n\t\t\t\t\t\tresponse = modifiedResponse;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis._decorateResponse(response);\n\n\t\t\t\tif (!response.ok && this._options.throwHttpErrors) {\n\t\t\t\t\tthrow new HTTPError(response, this.request, this._options);\n\t\t\t\t}\n\n\t\t\t\t// If `onDownloadProgress` is passed, it uses the stream API internally\n\t\t\t\t/* istanbul ignore next */\n\t\t\t\tif (this._options.onDownloadProgress) {\n\t\t\t\t\tif (typeof this._options.onDownloadProgress !== 'function') {\n\t\t\t\t\t\tthrow new TypeError('The `onDownloadProgress` option must be a function');\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!supportsStreams) {\n\t\t\t\t\t\tthrow new Error('Streams are not supported in your environment. `ReadableStream` is missing.');\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this._stream(response.clone(), this._options.onDownloadProgress);\n\t\t\t\t}\n\n\t\t\t\treturn response;\n\t\t\t};\n\n\t\t\tconst isRetriableMethod = this._options.retry.methods.includes(this.request.method.toLowerCase());\n\t\t\tconst result = isRetriableMethod ? this._retry(fn) : fn();\n\n\t\t\tfor (const [type, mimeType] of Object.entries(responseTypes)) {\n\t\t\t\tresult[type] = async () => {\n\t\t\t\t\tthis.request.headers.set('accept', this.request.headers.get('accept') || mimeType);\n\n\t\t\t\t\tconst response = (await result).clone();\n\n\t\t\t\t\tif (type === 'json') {\n\t\t\t\t\t\tif (response.status === 204) {\n\t\t\t\t\t\t\treturn '';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (options.parseJson) {\n\t\t\t\t\t\t\treturn options.parseJson(await response.text());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn response[type]();\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\n\t\t_calculateRetryDelay(error) {\n\t\t\tthis._retryCount++;\n\n\t\t\tif (this._retryCount < this._options.retry.limit && !(error instanceof TimeoutError)) {\n\t\t\t\tif (error instanceof HTTPError) {\n\t\t\t\t\tif (!this._options.retry.statusCodes.includes(error.response.status)) {\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst retryAfter = error.response.headers.get('Retry-After');\n\t\t\t\t\tif (retryAfter && this._options.retry.afterStatusCodes.includes(error.response.status)) {\n\t\t\t\t\t\tlet after = Number(retryAfter);\n\t\t\t\t\t\tif (Number.isNaN(after)) {\n\t\t\t\t\t\t\tafter = Date.parse(retryAfter) - Date.now();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tafter *= 1000;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (typeof this._options.retry.maxRetryAfter !== 'undefined' && after > this._options.retry.maxRetryAfter) {\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn after;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (error.response.status === 413) {\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst BACKOFF_FACTOR = 0.3;\n\t\t\t\treturn BACKOFF_FACTOR * (2 ** (this._retryCount - 1)) * 1000;\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t}\n\n\t\t_decorateResponse(response) {\n\t\t\tif (this._options.parseJson) {\n\t\t\t\tresponse.json = async () => {\n\t\t\t\t\treturn this._options.parseJson(await response.text());\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn response;\n\t\t}\n\n\t\tasync _retry(fn) {\n\t\t\ttry {\n\t\t\t\treturn await fn();\n\t\t\t} catch (error) {\n\t\t\t\tconst ms = Math.min(this._calculateRetryDelay(error), maxSafeTimeout);\n\t\t\t\tif (ms !== 0 && this._retryCount > 0) {\n\t\t\t\t\tawait delay(ms);\n\n\t\t\t\t\tfor (const hook of this._options.hooks.beforeRetry) {\n\t\t\t\t\t\t// eslint-disable-next-line no-await-in-loop\n\t\t\t\t\t\tconst hookResult = await hook({\n\t\t\t\t\t\t\trequest: this.request,\n\t\t\t\t\t\t\toptions: this._options,\n\t\t\t\t\t\t\terror,\n\t\t\t\t\t\t\tretryCount: this._retryCount\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t// If `stop` is returned from the hook, the retry process is stopped\n\t\t\t\t\t\tif (hookResult === stop) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this._retry(fn);\n\t\t\t\t}\n\n\t\t\t\tif (this._options.throwHttpErrors) {\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tasync _fetch() {\n\t\t\tfor (const hook of this._options.hooks.beforeRequest) {\n\t\t\t\t// eslint-disable-next-line no-await-in-loop\n\t\t\t\tconst result = await hook(this.request, this._options);\n\n\t\t\t\tif (result instanceof Request) {\n\t\t\t\t\tthis.request = result;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (result instanceof Response) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this._options.timeout === false) {\n\t\t\t\treturn this._options.fetch(this.request.clone());\n\t\t\t}\n\n\t\t\treturn timeout(this.request.clone(), this.abortController, this._options);\n\t\t}\n\n\t\t/* istanbul ignore next */\n\t\t_stream(response, onDownloadProgress) {\n\t\t\tconst totalBytes = Number(response.headers.get('content-length')) || 0;\n\t\t\tlet transferredBytes = 0;\n\n\t\t\treturn new globalThis.Response(\n\t\t\t\tnew globalThis.ReadableStream({\n\t\t\t\t\tasync start(controller) {\n\t\t\t\t\t\tconst reader = response.body.getReader();\n\n\t\t\t\t\t\tif (onDownloadProgress) {\n\t\t\t\t\t\t\tonDownloadProgress({percent: 0, transferredBytes: 0, totalBytes}, new Uint8Array());\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tasync function read() {\n\t\t\t\t\t\t\tconst {done, value} = await reader.read();\n\t\t\t\t\t\t\tif (done) {\n\t\t\t\t\t\t\t\tcontroller.close();\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (onDownloadProgress) {\n\t\t\t\t\t\t\t\ttransferredBytes += value.byteLength;\n\t\t\t\t\t\t\t\tconst percent = totalBytes === 0 ? 0 : transferredBytes / totalBytes;\n\t\t\t\t\t\t\t\tonDownloadProgress({percent, transferredBytes, totalBytes}, value);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tcontroller.enqueue(value);\n\t\t\t\t\t\t\tawait read();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tawait read();\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t);\n\t\t}\n\t}\n\n\tconst validateAndMerge = (...sources) => {\n\t\tfor (const source of sources) {\n\t\t\tif ((!isObject(source) || Array.isArray(source)) && typeof source !== 'undefined') {\n\t\t\t\tthrow new TypeError('The `options` argument must be an object');\n\t\t\t}\n\t\t}\n\n\t\treturn deepMerge({}, ...sources);\n\t};\n\n\tconst createInstance = defaults => {\n\t\tconst ky = (input, options) => new Ky(input, validateAndMerge(defaults, options));\n\n\t\tfor (const method of requestMethods) {\n\t\t\tky[method] = (input, options) => new Ky(input, validateAndMerge(defaults, options, {method}));\n\t\t}\n\n\t\tky.HTTPError = HTTPError;\n\t\tky.TimeoutError = TimeoutError;\n\t\tky.create = newDefaults => createInstance(validateAndMerge(newDefaults));\n\t\tky.extend = newDefaults => createInstance(validateAndMerge(defaults, newDefaults));\n\t\tky.stop = stop;\n\n\t\treturn ky;\n\t};\n\n\tconst ky = createInstance();\n\n\treturn ky;\n\n})));\n","'use strict'\n\nconst isUrlHttp = require('is-url-http/lightweight')\nconst { flattie: flatten } = require('flattie')\nconst { encode: stringify } = require('qss')\nconst whoops = require('whoops')\n\nconst factory = require('./factory')\nconst ky = require('./ky')\n\nconst MicrolinkError = whoops('MicrolinkError')\n\nconst got = async (url, opts) => {\n try {\n if (opts.timeout === undefined) opts.timeout = false\n const response = await ky(url, opts)\n const body = await response.json()\n const { headers, status: statusCode, statusText: statusMessage } = response\n return { url: response.url, body, headers, statusCode, statusMessage }\n } catch (err) {\n if (err.response) {\n const { response } = err\n err.response = {\n ...response,\n headers: [...response.headers.entries()].reduce(\n (acc, [key, value]) => ({ ...acc, [key]: value }),\n {}\n ),\n statusCode: response.status,\n body: await response.text()\n }\n }\n throw err\n }\n}\n\nmodule.exports = factory({\n MicrolinkError,\n isUrlHttp,\n stringify,\n got,\n flatten,\n VERSION: '__MQL_VERSION__'\n})\n"],"names":["URL","global","window","require$$0","REGEX_HTTP_PROTOCOL","iter","output","nullish","sep","val","key","k","pfx","Array","isArray","length","toValue","mix","str","decodeURIComponent","input","glue","toNull","obj","i","tmp","encodeURIComponent","out","arr","split","shift","concat","copyProperty","to","from","property","ignoreNonConfigurable","toDescriptor","Object","getOwnPropertyDescriptor","fromDescriptor","canCopyProperty","defineProperty","undefined","configurable","writable","enumerable","value","wrappedToString","withName","fromBody","toStringDescriptor","Function","prototype","toStringName","toString","mimicFn_1","name","Reflect","ownKeys","fromPrototype","getPrototypeOf","setPrototypeOf","changePrototype","trim","newToString","bind","changeToString","helpers","isFunction","isString","composeErrorMessage","code","description","inherits","ctor","superCtor","super_","create","constructor","cleanStack","mimicFn","require$$1","addErrorProps","error","props","assign","message","require$$3","createExtendError_1","ErrorClass","classProps","ExtendError","errorProps","stack","REGEX_CLASS_NAME","createExtendError","createError","className","TypeError","test","Error","this","captureStackTrace","createErrorClass","errorClass","RangeError","EvalError","SyntaxError","ReferenceError","URIError","ENDPOINT","FREE","PRO","isObject","factory_1","VERSION","MicrolinkError","isUrlHttp","stringify","got","flatten","mapRules","rules","flatRules","keys","reduce","acc","[object Object]","fetchFromApi","async","apiUrl","opts","response","responseType","body","err","statusCode","rawBody","headers","url","uri","Buffer","isBuffer","JSON","parse","_","status","data","more","parseBody","getApiUrl","apiKey","endpoint","retry","cache","gotHeaders","gotOpts","isPro","x-api-key","createMql","defaultOpts","assertUrl","fetchOpts","mql","version","stream","buffer","module","supportsAbortController","globalThis","AbortController","supportsStreams","ReadableStream","supportsFormData","FormData","mergeHeaders","source1","source2","result","Headers","isHeadersInstance","source","delete","set","deepMerge","sources","returnValue","entries","requestMethods","responseTypes","json","text","formData","arrayBuffer","blob","retryMethods","retryStatusCodes","retryAfterStatusCodes","stop","Symbol","HTTPError","request","options","super","statusText","String","TimeoutError","delay","ms","Promise","resolve","setTimeout","timeout","abortController","reject","timeoutID","abort","fetch","then","catch","clearTimeout","normalizeRequestMethod","includes","toUpperCase","defaultRetryOptions","limit","methods","statusCodes","afterStatusCodes","normalizeRetryOptions","maxSafeTimeout","Ky","_retryCount","_input","_options","credentials","hooks","beforeRequest","beforeRetry","afterResponse","method","prefixUrl","throwHttpErrors","Request","startsWith","endsWith","signal","addEventListener","searchParams","replace","URLSearchParams","fn","_fetch","hook","modifiedResponse","_decorateResponse","clone","Response","ok","onDownloadProgress","_stream","toLowerCase","_retry","type","mimeType","get","parseJson","retryAfter","after","Number","isNaN","Date","now","maxRetryAfter","Math","min","_calculateRetryDelay","retryCount","totalBytes","transferredBytes","controller","reader","getReader","read","done","close","byteLength","percent","enqueue","Uint8Array","validateAndMerge","createInstance","defaults","ky","newDefaults","extend","factory","href","flattie","encode","require$$2","whoops","require$$5","require$$4","statusMessage"],"mappings":"svBAEA,MAAMA,EAAMC,EAAOC,OAASA,OAAOF,IAAMG,UAAeH,IAClDI,EAAsB,yBCH5B,SAASC,EAAKC,EAAQC,EAASC,EAAKC,EAAKC,GACxC,IAAIC,EAAGC,EAAMF,EAAOA,EAAMF,EAAOE,EAEjC,GAAW,MAAPD,EACCF,IAASD,EAAOI,GAAOD,QACrB,GAAkB,iBAAPA,EACjBH,EAAOI,GAAOD,OACR,GAAII,MAAMC,QAAQL,GACxB,IAAKE,EAAE,EAAGA,EAAIF,EAAIM,OAAQJ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AIA,EAAIH,SAAU,CAChB,MAAMA,SAAEA,GAAaG,EACrBA,EAAIH,SAAW,IACVA,EACHM,QAAS,IAAIN,EAASM,QAAQiD,WAAW9D,QACvC,CAACC,GAAMrH,EAAKqC,UAAiBgF,EAAKC,CAACtH,GAAMqC,KACzC,IAEF0F,WAAYJ,EAASc,OACrBZ,WAAYF,EAAS2D,QAGzB,MAAMxD,IASRf,QAAAA,EACAL,QAAS"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
|
|
3
|
+
declare module "@microlink/mql" {
|
|
4
|
+
export type WaitUntilEvent = "load" | "domcontentloaded" | "networkidle0" | "networkidle2";
|
|
5
|
+
|
|
6
|
+
export type ScreenshotOptions = Partial<{
|
|
7
|
+
background: string;
|
|
8
|
+
browser: "light" | "dark";
|
|
9
|
+
click: string | string[];
|
|
10
|
+
deviceScaleFactor: number;
|
|
11
|
+
disableAnimations: boolean;
|
|
12
|
+
emulation: string;
|
|
13
|
+
fullPage: boolean;
|
|
14
|
+
hasTouch: boolean;
|
|
15
|
+
height: number;
|
|
16
|
+
hide: string | string[];
|
|
17
|
+
isLandscape: boolean;
|
|
18
|
+
isMobile: boolean;
|
|
19
|
+
scrollTo: string;
|
|
20
|
+
type: "jpeg" | "png";
|
|
21
|
+
waitFor: number | string;
|
|
22
|
+
waitUntil: WaitUntilEvent | WaitUntilEvent[];
|
|
23
|
+
width: number;
|
|
24
|
+
}>;
|
|
25
|
+
|
|
26
|
+
export type MqlQueryResponseType =
|
|
27
|
+
| "author"
|
|
28
|
+
| "date"
|
|
29
|
+
| "description"
|
|
30
|
+
| "image"
|
|
31
|
+
| "title"
|
|
32
|
+
| "url"
|
|
33
|
+
| "lang"
|
|
34
|
+
| "publisher";
|
|
35
|
+
|
|
36
|
+
export type MqlQueryOptions = Partial<{
|
|
37
|
+
attr: string | string[];
|
|
38
|
+
selector: string | string[];
|
|
39
|
+
selectorAll: string | string[];
|
|
40
|
+
type: MqlQueryResponseType;
|
|
41
|
+
}>;
|
|
42
|
+
|
|
43
|
+
export interface MqlQuery {
|
|
44
|
+
[field: string]: MqlQueryOptions;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export type MicrolinkApiOptions = Partial<{
|
|
48
|
+
animations: boolean;
|
|
49
|
+
audio: boolean;
|
|
50
|
+
click: string | string[];
|
|
51
|
+
colorScheme: "dark" | "light";
|
|
52
|
+
codeScheme: string;
|
|
53
|
+
data: MqlQuery;
|
|
54
|
+
device: string;
|
|
55
|
+
embed: string;
|
|
56
|
+
filter: string;
|
|
57
|
+
force: boolean;
|
|
58
|
+
headers: object;
|
|
59
|
+
hide: string | string[];
|
|
60
|
+
iframe: boolean | object;
|
|
61
|
+
insights: boolean | object;
|
|
62
|
+
javascript: boolean;
|
|
63
|
+
mediatype: string;
|
|
64
|
+
meta: boolean;
|
|
65
|
+
modules: string | string[];
|
|
66
|
+
palette: boolean;
|
|
67
|
+
ping: boolean | object;
|
|
68
|
+
prerender: boolean | "auto";
|
|
69
|
+
proxy: string;
|
|
70
|
+
remove: string | string[];
|
|
71
|
+
retry: number;
|
|
72
|
+
screenshot: boolean | ScreenshotOptions;
|
|
73
|
+
scripts: string | string[];
|
|
74
|
+
scroll: string;
|
|
75
|
+
styles: string | string[];
|
|
76
|
+
timeout: number;
|
|
77
|
+
ttl: string | number;
|
|
78
|
+
url: string;
|
|
79
|
+
video: boolean;
|
|
80
|
+
viewport: object;
|
|
81
|
+
waitForSelector: string;
|
|
82
|
+
waitForTimeout: number;
|
|
83
|
+
waitUntil: string | string[];
|
|
84
|
+
}>;
|
|
85
|
+
|
|
86
|
+
export type MqlOptions = Partial<{
|
|
87
|
+
apiKey: string;
|
|
88
|
+
retry: number;
|
|
89
|
+
cache: Map<string, any>;
|
|
90
|
+
timeout: number;
|
|
91
|
+
}>;
|
|
92
|
+
|
|
93
|
+
export interface ImageInfo {
|
|
94
|
+
width: number;
|
|
95
|
+
height: number;
|
|
96
|
+
type: string;
|
|
97
|
+
url: string;
|
|
98
|
+
size: number;
|
|
99
|
+
size_pretty: string;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface PlayableMediaInfo extends ImageInfo {
|
|
103
|
+
duration: number;
|
|
104
|
+
duration_pretty: string;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export type MqlResponseData = Partial<{
|
|
108
|
+
author: string;
|
|
109
|
+
date: string;
|
|
110
|
+
description: string;
|
|
111
|
+
video: string;
|
|
112
|
+
lang: string;
|
|
113
|
+
publisher: string;
|
|
114
|
+
title: string;
|
|
115
|
+
url: string;
|
|
116
|
+
image: ImageInfo;
|
|
117
|
+
screenshot: ImageInfo;
|
|
118
|
+
logo: ImageInfo;
|
|
119
|
+
video: PlayableMediaInfo;
|
|
120
|
+
audio: PlayableMediaInfo;
|
|
121
|
+
}>;
|
|
122
|
+
|
|
123
|
+
export type MqlStatus = "success" | "fail";
|
|
124
|
+
|
|
125
|
+
export interface MqlResponse {
|
|
126
|
+
status: MqlStatus;
|
|
127
|
+
data: MqlResponseData;
|
|
128
|
+
response: Response;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
declare function mql(url: string, opts?: MqlOptions & MicrolinkApiOptions): Promise<MqlResponse>;
|
|
132
|
+
|
|
133
|
+
declare namespace mql {
|
|
134
|
+
export class MicrolinkError extends Error {}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export = mql;
|
|
138
|
+
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@microlink/mql",
|
|
3
3
|
"description": "Microlink Query Language. The official HTTP client to interact with Microlink API for Node.js, browsers & Deno.",
|
|
4
4
|
"homepage": "https://nicedoc.io/microlinkhq/mql",
|
|
5
|
-
"version": "0.9.
|
|
5
|
+
"version": "0.9.12",
|
|
6
6
|
"browser": "src/browser.js",
|
|
7
7
|
"main": "src/node.js",
|
|
8
8
|
"author": {
|
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
{
|
|
15
15
|
"name": "ndom91",
|
|
16
16
|
"email": "yo@ndo.dev"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "Dani de la Cruz",
|
|
20
|
+
"email": "5173869+delacruz-dev@users.noreply.github.com"
|
|
17
21
|
}
|
|
18
22
|
],
|
|
19
23
|
"repository": {
|
|
@@ -33,7 +37,7 @@
|
|
|
33
37
|
"dependencies": {
|
|
34
38
|
"flattie": "~1.1.0",
|
|
35
39
|
"got": "~11.8.2",
|
|
36
|
-
"is-url-http": "~2.2.
|
|
40
|
+
"is-url-http": "~2.2.4",
|
|
37
41
|
"qss": "~2.0.3",
|
|
38
42
|
"whoops": "~4.1.0"
|
|
39
43
|
},
|
|
@@ -56,7 +60,7 @@
|
|
|
56
60
|
"ky": "latest",
|
|
57
61
|
"lint-staged": "latest",
|
|
58
62
|
"meow": "latest",
|
|
59
|
-
"node-fetch": "
|
|
63
|
+
"node-fetch": "2",
|
|
60
64
|
"npm-check-updates": "latest",
|
|
61
65
|
"nyc": "latest",
|
|
62
66
|
"prettier-standard": "latest",
|
|
@@ -79,12 +83,13 @@
|
|
|
79
83
|
},
|
|
80
84
|
"files": [
|
|
81
85
|
"dist",
|
|
86
|
+
"index.d.ts",
|
|
82
87
|
"lightweight.js",
|
|
83
88
|
"src"
|
|
84
89
|
],
|
|
85
90
|
"scripts": {
|
|
86
91
|
"build": "rollup -c rollup.config.js",
|
|
87
|
-
"build:ky": "[
|
|
92
|
+
"build:ky": "[ -f src/ky.js ] || rollup node_modules/ky/index.js --format=umd --name=ky --file=src/ky.js",
|
|
88
93
|
"clean": "rm -rf node_modules",
|
|
89
94
|
"dev": "npm run build -- -w",
|
|
90
95
|
"lint": "standard",
|
package/src/factory.js
CHANGED
|
@@ -3,12 +3,7 @@ const ENDPOINT = {
|
|
|
3
3
|
PRO: 'https://pro.microlink.io'
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
const isObject = input => typeof input === 'object'
|
|
7
|
-
|
|
8
|
-
const pickBy = obj => {
|
|
9
|
-
Object.keys(obj).forEach(key => obj[key] == null && delete obj[key])
|
|
10
|
-
return obj
|
|
11
|
-
}
|
|
6
|
+
const isObject = input => input !== null && typeof input === 'object'
|
|
12
7
|
|
|
13
8
|
const parseBody = (input, error, url) => {
|
|
14
9
|
try {
|
|
@@ -46,7 +41,7 @@ const factory = ({ VERSION, MicrolinkError, isUrlHttp, stringify, got, flatten }
|
|
|
46
41
|
if (!isObject(rules)) return
|
|
47
42
|
const flatRules = flatten(rules)
|
|
48
43
|
return Object.keys(flatRules).reduce(
|
|
49
|
-
(acc, key) => ({ ...acc, [`data.${key}`]: flatRules[key] }),
|
|
44
|
+
(acc, key) => ({ ...acc, [`data.${key}`]: flatRules[key].toString() }),
|
|
50
45
|
{}
|
|
51
46
|
)
|
|
52
47
|
}
|
|
@@ -85,7 +80,7 @@ const factory = ({ VERSION, MicrolinkError, isUrlHttp, stringify, got, flatten }
|
|
|
85
80
|
const apiUrl = `${apiEndpoint}?${stringify({
|
|
86
81
|
url,
|
|
87
82
|
...mapRules(data),
|
|
88
|
-
...flatten(
|
|
83
|
+
...flatten(opts)
|
|
89
84
|
})}`
|
|
90
85
|
|
|
91
86
|
const headers = isPro ? { ...gotHeaders, 'x-api-key': apiKey } : { ...gotHeaders }
|