diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index db6ff55d..ee838dc3 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -30,11 +30,13 @@ the following locations: 6. Additional information you deem important: **ENHANCEMENT** + 1. Describe the enhancement you are requesting. Enhancements include: + - tests - code refactor - documentation - research - tooling -2. Indicate the importance of this enhancement to you (must-have, should-have, nice-to-have). \ No newline at end of file +2. Indicate the importance of this enhancement to you (must-have, should-have, nice-to-have). diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 70627d5a..764a06ce 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,6 +4,7 @@ Please review the [CONTRIBUTING.md](./CONTRIBUTING.md) file for detailed contrib ### What does this do? ### Which issue(s) does this PR fix/relate to? + Put here `Resolves #XXX` to auto-close the issue that your PR fixes (if such) ### List any changes that modify/break current functionality @@ -12,4 +13,4 @@ Put here `Resolves #XXX` to auto-close the issue that your PR fixes (if such) ### Did you document any new/modified functionality? -### Notes \ No newline at end of file +### Notes diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..66417969 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,31 @@ +name: Testing + +on: + push: + branches: + - main + pull_request: + branches: + - main +jobs: + build: + name: Testing + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 14 + + - name: Install dependencies + run: npm install + + - name: Run Jest tests + run: npm test + + - name: Lint with ESLint + run: npm run lint diff --git a/.gitignore b/.gitignore index 761ac79d..58b38dae 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,9 @@ # See http://help.github.com/ignore-files/ for more about ignoring files. # compiled output -/dist /tmp /out-tsc +dist/ # Runtime data pids diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..51e3286f --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +# Ignore artifacts: +node_modules diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/.prettierrc @@ -0,0 +1 @@ +{} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..7d997bcf --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,37 @@ +{ + "configurations": [ + { + "name": "Launch via NPM", + "request": "launch", + "runtimeArgs": [ + "run-script", + "debug" + ], + "runtimeExecutable": "npm", + "skipFiles": [ + "/**" + ], + "type": "node" + }, + { + "type": "node", + "name": "vscode-jest-tests.v2", + "request": "launch", + "args": [ + "test", + "--", + "--runInBand", + "--watchAll=false", + "--testNamePattern", + "${jest.testNamePattern}", + "--runTestsByPath", + "${jest.testFile}" + ], + "cwd": "/mnt/c/Users/user/Desktop/ULTRAVIOLET/sdk-js", + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen", + "disableOptimisticBPs": true, + "runtimeExecutable": "npm" + } + ] +} \ No newline at end of file diff --git a/README.md b/README.md index 399fdc42..0f2f6649 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,9 @@ Thank you for your interest in Mainflux and the desire to contribute! 2. Checkout the [contribution guide](CONTRIBUTING.md) to learn more about our style and conventions. 3. Make your changes compatible to our workflow. +## Getting Started +The node module can be used from `index.js` and examples are located in `examples` directory. To use on the browser use `bundle.js` and examples are in `example/client`. + ## Community - [Google group](https://groups.google.com/forum/#!forum/mainflux) diff --git a/bundle.js b/bundle.js new file mode 100644 index 00000000..1c50fbb2 --- /dev/null +++ b/bundle.js @@ -0,0 +1,9041 @@ +require = (function () { + function r(e, n, t) { + function o(i, f) { + if (!n[i]) { + if (!e[i]) { + var c = "function" == typeof require && require; + if (!f && c) return c(i, !0); + if (u) return u(i, !0); + var a = new Error("Cannot find module '" + i + "'"); + throw ((a.code = "MODULE_NOT_FOUND"), a); + } + var p = (n[i] = { exports: {} }); + e[i][0].call( + p.exports, + function (r) { + var n = e[i][1][r]; + return o(n || r); + }, + p, + p.exports, + r, + e, + n, + t, + ); + } + return n[i].exports; + } + for ( + var u = "function" == typeof require && require, i = 0; + i < t.length; + i++ + ) + o(t[i]); + return o; + } + return r; +})()( + { + 1: [ + function (require, module, exports) { + "use strict"; + + var _axios = _interopRequireDefault(require("axios")); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + class Bootstrap { + //Bootstraps API Client + /** + * @class Bootstrap + * Bootstrap is used to manage bootstrap configurations. + * It is used to create, update, view and remove bootstrap configurations. + * It is also used to bootstrap a thing. + * @param {string} bootstraps_url - The url of the bootstraps service. + * @param {string} content_type - The content type of the request. + * @param {string} bootstrapsEndpoint - The endpoint of the bootstraps service which is + * configs. + * @returns {Bootstrap} - Returns a Bootstrap object. + * + */ + constructor(bootstraps_url) { + this.bootstraps_url = bootstraps_url; + this.content_type = "application/json"; + this.bootstrapsEndpoint = "configs"; + } + Create(config, token) { + //Create a bootstrap configuration + /** + * @method Create - Create a new bootstrap configuration. + * Some of the key data needed include the external_key and external_id which must be + * specific to the thing provided with the thing_id. Mind that every configuration + * must have a specific thing_id. + * @param {object} config - The configuration object. + * @param {string} token - The token to be used for authentication. + * @example + * const config = { + * "external_id": "345", + * "external_key": "012", + * "thing_id": "3d49a42f-63fd-491b-9784-adf4b64ef347", + * "name": "thing_name" + * } + */ + const options = { + method: "post", + maxBodyLength: Infinity, + url: `${this.bootstraps_url}/things/${this.bootstrapsEndpoint}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(config), + }; + return _axios.default + .request(options) + .then((_response) => { + return "Configuration added"; + }) + .catch((error) => { + return error.response.data; + }); + } + Whitelist(config, token) { + //Update a bootstrap configuration + /** + * @method Whitelist - Allows a logged in user to update a bootstrap configuration. + * This changes the status of the config to whitelisted. + * @param {object} config - The configuration object. + * @param {string} token - The token to be used for authentication. + * @example + * const config = { + * "external_id": "345", + * "external_key": "012", + * "thing_id": "3d49a42f-63fd-491b-9784-adf4b64ef347", + * "name": "thing_name" + * } + */ + const options = { + method: "put", + maxBodyLength: Infinity, + url: `${this.bootstraps_url}/things/state/${config["thing_id"]}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(config), + }; + return _axios.default + .request(options) + .then((_response) => { + return "Configuration updated"; + }) + .catch((error) => { + return error.response.data; + }); + } + Update(config, token) { + //Update a bootstrap configuration + /** + * @method Update - Allows a logged in user to update a bootstrap configuration. + * This can change the name of the config and metadata. + * @param {object} config - The configuration object. + * @param {string} token - The token to be used for authentication. + * @example + * const config = { + * "external_id": "345", + * "external_key": "012", + * "thing_id": "3d49a42f-63fd-491b-9784-adf4b64ef347", + * "name": "thing_name" + * } + */ + const options = { + method: "put", + maxBodyLength: Infinity, + url: `${this.bootstraps_url}/things/configs/${config["thing_id"]}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(config), + }; + return _axios.default + .request(options) + .then((_response) => { + return "Configuration updated"; + }) + .catch((error) => { + return error.response.data; + }); + } + View(thing_id, token) { + //View a bootstrap configuration + /** + * @method View - Allows a logged in user to view a bootstrap configuration. + * Once provided with the thing_id and a valid token, it returns the configuration object. + * @param {string} thing_id - The thing_id of the configuration to be viewed. + * @param {string} token - The token to be used for authentication. + */ + const options = { + method: "get", + maxBodyLength: Infinity, + url: `${this.bootstraps_url}/things/${this.bootstrapsEndpoint}/${thing_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + UpdateCerts(config_id, client_cert, client_key, ca, token) { + //Update certs of a bootstrap configuration + /** + * @method UpdateCerts - Allows a logged in user to update the certs of a bootstrap configuration. + * Update is performed by replacing the current certificate data with values provided in a request payload. + * @param {string} config_id - The config_id of the configuration to be updated. This can also mean the thing_id. + * @param {string} client_cert - The client certificate to be used. + * @param {string} client_key - The client key to be used. + * @param {string} ca - The certificate authority to be used. + * @param {string} token - The token to be used for authentication. + * + */ + const payload = { + client_cert: client_cert, + client_key: client_key, + ca_cert: ca, + }; + const options = { + method: "patch", + maxBodyLength: Infinity, + url: `${this.bootstraps_url}/configs/certs/${config_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(payload), + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + Remove(config_id, token) { + //Remove a bootstrap configuration + /** + * @method Remove - Allows a logged in user to delete a bootstrap configuration. + * @param {string} config_id - The config_id of the configuration to be deleted. + * This can also mean the thing_id. + * @param {string} token - The token to be used for authentication. + * + */ + const options = { + method: "delete", + maxBodyLength: Infinity, + url: `${this.bootstraps_url}/things/${this.bootstrapsEndpoint}/${config_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return _axios.default + .request(options) + .then((_response) => { + return "Configuration removed"; + }) + .catch((error) => { + return error.response.data; + }); + } + Bootstrap(external_id, external_key) { + //Retrive a bootstrap configuration + /** + * @method Bootstrap - Retrieves a configuration with given external ID and encrypted external key. + * @param {string} external_id - The external ID of the configuration to be retrieved. + * @param {string} external_key - The encrypted external key of the configuration to be retrieved. + * @return {object} - Returns a config object. + */ + const options = { + method: "get", + maxBodyLength: Infinity, + url: `${this.bootstraps_url}/things/bootstrap/${external_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Thing ${external_key}`, + }, + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + } + module.exports = Bootstrap; + }, + { axios: 8 }, + ], + 2: [ + function (require, module, exports) { + "use strict"; + + var _axios = _interopRequireDefault(require("axios")); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + // import Errors from "./errors.js"; + + class Certs { + //Certs API Client + /** + *@class Certs - Certs is used to manage certificates. + *It is used to issue, view and revoke certificates. + * @param {string} certs_url - The url of the certs service. + * @param {string} content_type - The content type of the request. + * @param {string} certsEndpoint - The endpoint of the certs service which is certs. + * @returns {Certs} - Returns a Certs object. + */ + constructor(certs_url) { + this.certs_url = certs_url; + this.content_type = "application/json"; + this.certsEndpoint = "certs"; + } + Issue(thing_id, valid, token) { + //Issue a certificate + /** + * @method Issue - Issue a certificate to a thing. + * Requires a thing_id and a valid time in hours as well as a token. + * @param {string} thing_id - The thing_id of the thing to be issued a certificate. + * @param {number} valid - The time in hours for which the certificate is valid. + * @example + * const certs = { + * "cert_serial": "22:16:df:60:c2:99:bc:c4:9b:1d:fd:71:5e:e9:07:d9:1b:3c:85:1d", + * "client_cert": "-----BEGIN CERTIFICATE-----\nMIIEATCCAumgAwIBAgIUIhbfYMKZvMSbHf1xXukH2Rs8hR0wDQYJKoZIhvcNAQEL1k\n-----END CERTIFICATE-----", + * "client_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEoQIBAAKCAQEAy9gF84a5s6jlX6hkAPXrLYqvdhe6uygdr6eHfd5erdcdxfgc\n-----END RSA PRIVATE KEY-----", + * "expiration": "2023-09-20T10:02:48Z", + * "thing_id": "3d49a42f-63fd-491b-9784-adf4b64ef347" + * } + */ + const payload = { + thing_id: thing_id, + ttl: valid, + }; + const options = { + method: "post", + maxBodyLength: Infinity, + url: `${this.certs_url}/${this.certsEndpoint}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(payload), + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + ViewByThing(thing_id, token) { + //View certificates by thing_id + /** + * @method ViewByThing - Allows a logged in user to view a certificate serial once they + * provide a valid connected thing-id and token. + * @param {string} thing_id - The thing_id of the thing whose certificate is to be viewed. + * @param {string} token - The token to be used for authentication. + * + */ + const options = { + method: "get", + maxBodyLength: Infinity, + url: `${this.certs_url}/serials/${thing_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + ViewBySerial(cert_id, token) { + //View certificate by cert_id + /** + * @method ViewBySerial - Allows a logged in user to view a certificate once they + * provide a valid cert-id and token. + * @param {string} cert_id - The cert_id of the certificate to be viewed. + * @param {string} token - The token to be used for authentication. + * + */ + const options = { + method: "get", + maxBodyLength: Infinity, + url: `${this.certs_url}/${this.certsEndpoint}/${cert_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + Revoke(thing_id, token) { + //Revoke a certificate + /** + * @method Revoke - Allows a logged in user to delete a certificate once they + * provide a valid thing-id and token. + * @param {string} thing_id - The thing_id of the certificate to be revoked. + * @param {string} token - The token to be used for authentication. + */ + const options = { + method: "delete", + maxBodyLength: Infinity, + url: `${this.certs_url}/${this.certsEndpoint}/${thing_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return _axios.default + .request(options) + .then((_response) => { + return "DELETED"; + }) + .catch((error) => { + return error.response.data; + }); + } + } + module.exports = Certs; + }, + { axios: 8 }, + ], + 3: [ + function (require, module, exports) { + "use strict"; + + var _axios = _interopRequireDefault(require("axios")); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + // import fetch from "node-fetch"; + + class Channels { + //Channels API client + /** + * @class Channels - + * Channels API is used for managing Channels. It is used for creating new + * channels, retrieving them, updating them and disabling them + * @param {string} channels_url - URL to the Channels service + * @param {string} content_type - Content type for the requests which is an application + * json + * @param {string} channelsEndpoint - Endpoint for the channels' service. + * @returns {Object} -Channels object + * + */ + constructor(channels_url) { + this.channels_url = channels_url; + this.content_type = "application/json"; + this.channelsEndpoint = "channels"; + } + Create(channel, token) { + //Creates a new channel + /** + * @method Create - Creates new channels when provided with a channel object + * with viable fresh information and a valid token. + * @param {Object} channel - Channel Object with a name and id. + * @param {String} token - An access token that is valid. + * @returns {Object} - User object. + * @example + * const channel = { + * "name": "channelName", + * "description": "long channel description", + * "parent_id": "bb7edb32-2eac-4aad-aebe-ed96fe073879", + * "metadata": { + * "domain": "example.com" + * }, + * "status": "enabled", + * "owner_id": "bb7edb32-2eac-4aad-aebe-ed96fe073879" + * } + * + */ + const options = { + method: "post", + maxBodyLength: Infinity, + url: `${this.channels_url}/${this.channelsEndpoint}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(channel), + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + CreateBulk(channels, token) { + //Creates multiple channels. + /** + * @method Create_bulk - Creates multiple channels when provided with a channel object + * with viable fresh information and a valid token. + * @param {List} channels - Channel Object with a name and id. + * @param {String} token - An access token that is valid. + * @returns {Object} - User object. + * @example + * const channels = [ + * { "name": "channelA", "id": "bb7edb32-2eac-4aad-aebe-ed96fe073879" }, + * { "name": "channelB", "id": "290b0f49-7a57-4b8c-9e4e-fbf17c6ab7d9" } + * ] + */ + const options = { + method: "post", + maxBodyLength: Infinity, + url: `${this.channels_url}/${this.channelsEndpoint}/bulk`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(channels), + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + Get(channel_id, token) { + //Retrieves channel with specified id. + /** + * @method Get - Retrieves channel with specified id and a valid token. + * @param {String} channel_id - Channel id. + * @param {String} token - An access token that is valid. + * @returns {Object} - Channel object. + */ + const options = { + method: "get", + maxBodyLength: Infinity, + url: `${this.channels_url}/${this.channelsEndpoint}/${channel_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + GetByThing(channel_id, query_params, token) { + //Retrieves list of things connected to specified channel with pagination metadata. + /** + * @method GetByThing - Retrieves list of things connected to specified channel with pagination metadata. + * @param {String} channel_id - Channel id. + * @param {Object} query_params - Query parameters for the request. + * @param {String} token - An access token that is valid. + * @returns {List} - Things list. + */ + const options = { + method: "get", + maxBodyLength: Infinity, + url: `${this.channels_url}/${ + this.channelsEndpoint + }/${channel_id}/things?${new URLSearchParams( + query_params, + ).toString()}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + GetAll(query_params, token) { + //Provides a list of all channels with pagination metadata. + /** + * @method GetAll - Provides a list of all channels with pagination metadata. + * @param {Object} query_params - Query parameters for the request. + * @param {String} token - An access token that is valid. + * @returns {Object} - Channel Object. + */ + const options = { + method: "get", + maxBodyLength: Infinity, + url: `${this.channels_url}/${ + this.channelsEndpoint + }?${new URLSearchParams(query_params).toString()}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + Update(channel, token) { + //Updates channel with specified id. + /** + * @method Update - Updates channel with specified id. + * @param {Object} channel - Channel object with new information. + * @param {String} token - An access token that is valid. + * @returns {Object} - Channel Object. + */ + const options = { + method: "put", + maxBodyLength: Infinity, + url: `${this.channels_url}/${this.channelsEndpoint}/${channel["id"]}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(channel), + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + Disable(channel, token) { + //Disables channel with specified id. + /** + * @method Disable - Disables channel with specified id. + * @param {Object} channel - Channel object with new information. + * @param {String} token - An access token that is valid. + * @returns {Object} - Channel Object. + */ + const options = { + method: "post", + maxBodyLength: Infinity, + url: `${this.channels_url}/${this.channelsEndpoint}/${channel["id"]}/disable`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + } + + // export default Channels; + module.exports = Channels; + }, + { axios: 8 }, + ], + 4: [ + function (require, module, exports) { + "use strict"; + + var _axios = _interopRequireDefault(require("axios")); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + // import Errors from "./errors.js"; + + class Groups { + //Groups API client. + /** + * @class Groups - + * Groups API client is used for managing groups. It is used for + * creating, updating, deleting, and retrieving groups. + * @param {string} groups_url - The URL of the Groups service. + * @param {string} content_type - The content type of the request. + * @param {string} groupsEndpoint - The endpoint of the Groups service. + * @returns {Groups} - Returns a Groups object. + */ + constructor(groups_url) { + this.groups_url = groups_url; + this.content_type = "application/json"; + this.groupsEndpoint = "groups"; + } + // groupError = new Errors; + + Create(group, token) { + // Create a new group. + /** + * @method Create - Creates a new group once the user is authenticated. + * and a valid token is provided. The group's parent or child status in the + * heirarchy can also be established. + * @param {object} group - The group object to be created. + * @param {string} token - The user's token. + * @example + * const group = { + * "name": "groupName", + * "description": "long group description", + * "parent_id": "bb7edb32-2eac-4aad-aebe-ed96fe073879", + * "metadata": { + * "domain": "example.com" + * }, + * "status": "enabled", + * "owner_id": "bb7edb32-2eac-4aad-aebe-ed96fe073879" + * } + */ + const options = { + method: "post", + maxBodyLength: Infinity, + url: `${this.groups_url}/${this.groupsEndpoint}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(group), + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + Get(group_id, token) { + //Get a group. + /** + * @method Get - Provide a group's information once given the group ID and a valid token. + * @param {string} group_id - The group's ID. + * @param {string} token - The user's access token. + * @returns {object} - Returns a group object. + * @example + * const group_id = "bb7edb32-2eac-4aad-aebe-ed96fe073879" + * + */ + const options = { + method: "get", + maxBodyLength: Infinity, + url: `${this.groups_url}/${this.groupsEndpoint}/${group_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + GetAll(query_params, token) { + //Get all groups. + /** + * @method Get_all - Provides a list of all the groups in the database once given a valid token. + * @param {string} token - The user's access token. + * @param {Object} query_params - Query parameters. + * @returns {object} - Returns a list of all the groups in the database. + * @example + * const query_params = { + * "offset": 0, + * "limit": 10 + * } + * + */ + const options = { + method: "get", + maxBodyLength: Infinity, + url: `${this.groups_url}/${ + this.groupsEndpoint + }?${new URLSearchParams(query_params).toString()}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + Update(group, token) { + //Updates a group's information such a name and metadata. + /** + * @method Update - Updates a group's information such a name and metadata when given a + * valid token and group ID. + * @param {object} group - The group object to be updated. + * @param {string} token - The user's access token. + * @returns {object} - Returns the updated group object. + * @example + * const group = { + * "id": "bb7edb32-2eac-4aad-aebe-ed96fe073879", + * "name": "groupName" + * } + * + */ + const options = { + method: "put", + maxBodyLength: Infinity, + url: `${this.groups_url}/${this.groupsEndpoint}/${group["id"]}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(group), + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + Children(group_id, query_params, token) { + //Get a group's children. + /** + * @method Children - Provides a list of a groups' children. + * @param {string} group_id - The group's ID. + * @param {string} token - The user's access token. + * @param {object} query_params - The query parameters such as offset and limit. + * @returns {object} - Returns a list of a group's children. + * + */ + const options = { + method: "get", + maxBodyLength: Infinity, + url: `${this.groups_url}/${ + this.groupsEndpoint + }/${group_id}/children?${new URLSearchParams( + query_params, + ).toString()}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + Parents(group, query_params, token) { + //Get a group's parents. + /** + * @method Parents - Provides a list of a groups' parents when provided with + * a valid token and group ID. + * @param {string} group_id - The group's ID. + * @param {string} token - The user's access token. + * @param {object} query_params - The query parameters such as offset and limit. + * @returns {object} - Returns a list of a group's parents. + * + */ + const options = { + method: "get", + maxBodyLength: Infinity, + url: `${this.groups_url}/${this.groupsEndpoint}/${ + group["id"] + }/parents?${new URLSearchParams(query_params).toString()}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + Assign(group_id, member_id, member_type, token) { + //Assign a member to a group. + /** + * @method Assign -Assigns a user to a group when given a valid token, group ID, + * member ID, and member type. This allows the user to perform + * some action on the group. + * @param {string} group_id - The group's ID. + * @param {string} member_id - The member's ID. + * @param {Array} member_type - The member's actions that they can perform over the group. + * @param {string} token - The user's access token. + * @returns {string} - "Policy created". + * + */ + const payload = { + object: group_id, + subject: member_id, + actions: member_type, + }; + const options = { + method: "post", + maxBodyLength: Infinity, + url: `${this.groups_url}/policies`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(payload), + }; + return _axios.default + .request(options) + .then((_response) => { + return "Policy created"; + }) + .catch((error) => { + return error.response.data; + }); + } + Unassign(members_ids, group_id, token) { + //Unassign a member from a group. + /** + * @method Unassign - Deletes a user's policy over a group through unassigning them. + * Requires a valid token, ID's of members of the group and the group ID. + * @param {Array} members_ids - The members' IDs. + * @param {string} group_id - The group's ID. + * @param {string} token - The user's access token. + * @returns {string} - "Policy deleted" + */ + const payload = { + object: group_id, + subject: members_ids, + }; + const options = { + method: "delete", + maxBodyLength: Infinity, + url: `${this.groups_url}/policies/${members_ids}/${group_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(payload), + }; + return _axios.default + .request(options) + .then((response) => { + return "Policy deleted"; + }) + .catch((error) => { + return error.response.data; + }); + } + Disable(group_id, token) { + //Disable a group. + /** + * @method Disable - Deletes a group when given a valid token and group ID. + * @param {string} group_id - The group's ID. + * @param {string} token - The user's access token. + * @returns {object} - Returns a group object with the status reading 'Disabled'. + * + */ + const options = { + method: "post", + maxBodyLength: Infinity, + url: `${this.groups_url}/${this.groupsEndpoint}/${group_id}/disable`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + Members(group_id, query_params, token) { + //Retrieves a list of the members of a group. + /** + * @method Members - Retrieves a list of the members of a group. + * @param {string} group_id - The group's ID. + * @param {string} token - The user's access token. + * @param {object} query_params - The query parameters such as offset and limit. + * @returns {list} - Returns a list of the members of a group. + * + */ + const options = { + method: "get", + maxBodyLength: Infinity, + url: `${this.groups_url}/${ + this.groupsEndpoint + }/${group_id}/members?${new URLSearchParams( + query_params, + ).toString()}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + } + module.exports = Groups; + }, + { axios: 8 }, + ], + 5: [ + function (require, module, exports) { + "use strict"; + + var _axios = _interopRequireDefault(require("axios")); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + class Messages { + //Messages API Client + /** + * @method Messages - Messages is used to manage messages. + * It provides methods for sending and reading messages. + * @param {string} readers_url - The url of the readers service. + * @param {string} httpadapter_url - The URL of the Mainflux Messages adapter. + * @param {string} content_type - The content type of the request. + * @returns {Messages} - Returns a Messages object. + */ + constructor(readers_url, httpadapter_url) { + this.readers_url = readers_url; + this.httpadapter_url = httpadapter_url; + this.content_type = "application/json"; + } + Send(channel_id, msg, thing_key) { + //Send a message + /** + * @method Send- Sends message to a given channel via HTTP protocol. Message is sent + * through a writer add-on such as timescale. Message is sent to a + * http port specific to the writer add-on. The thing and channel must be + * created before sending the message and connected. + * @param {string} channel_id - The channel_id of the channel to send the message to. + * @param {string} msg -message to send to the channel that should be in encoded into + * bytes format for example: + * [{"bn":"demo", "bu":"V", "n":"voltage", "u":"V", "v":5}] + * @param {string} thing_key - The secret of the thing sending the message. + */ + const chan_name_parts = channel_id.split(".", 2); + const chan_id = chan_name_parts[0]; + let subtopic = ""; + if (chan_name_parts.length == 2) { + subtopic = chan_name_parts[1].replace(".", "/", -1); + } + const options = { + method: "post", + maxBodyLength: Infinity, + url: `${this.httpadapter_url}/http/channels/${chan_id}/messages/subtopic`, + headers: { + "Content-Type": this.content_type, + Authorization: `Thing ${thing_key}`, + }, + data: new TextEncoder().encode(msg), + }; + return _axios.default + .request(options) + .then((_response) => { + return "Message Sent!"; + }) + .catch((error) => { + return error.response.data; + }); + } + Read(channel_id, token) { + //Read messages + /** + * + * @method Read - Read messages from a given channel. Messages are read from a reader + * add-on such as timescale. Messages are read from a http port specific to the reader + * @param {string} channel_id - The channel_id of the channel to read the message from. + * @param {string} token - The token to be used for authentication. + */ + const chan_name_parts = channel_id.split(".", 2); + const chan_id = chan_name_parts[0]; + let subtopic = ""; + if (chan_name_parts.length == 2) { + subtopic = chan_name_parts[1].replace(".", "/", -1); + } + const options = { + method: "get", + maxBodyLength: Infinity, + url: `${this.readers_url}/channels/${chan_id}/messages`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + params: { + subtopic: subtopic, + }, + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + } + module.exports = Messages; + }, + { axios: 8 }, + ], + 6: [ + function (require, module, exports) { + "use strict"; + + var _axios = _interopRequireDefault(require("axios")); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + // import fetch from "node-fetch"; + + class Things { + // Things service client. + /** + * @class Things - + * Things API is used for creating and managing things. + * It is used for creating, updating, deleting and retrieving things. + * @param {string} things_url - Things service URL. + * @param {string} content_type - Content type. + * @param {string} thingsEndpoint - Things endpoint. + * @returns {Object} - Things service client. + */ + constructor(things_url) { + this.things_url = things_url; + this.content_type = "application/json"; + this.thingsEndpoint = "things"; + } + Create(thing, token) { + //Creates a new thing. + /** + * @method Create - Creates a new thing when provided with + * the things information and a valid token. + * @param {Object} thing - Thing object. + * @param {string} token - User token. + * @returns {Object} - Thing object. + * @example + * const thing = { + * "name": "string", + * "tags": [ + * "tag1", + * "tag2" + * ], + * "credentials": { + * "identity": "thingidentity", + * "secret": "bb7edb32-2eac-4aad-aebe-ed96fe073879" + * }, + * "owner": "bb7edb32-2eac-4aad-aebe-ed96fe073879", + * "metadata": { + * "domain": "example.com" + * }, + * "status": "enabled" + * } + */ + + const options = { + method: "post", + maxBodyLength: Infinity, + url: `${this.things_url}/${this.thingsEndpoint}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(thing), + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + CreateBulk(things, token) { + //Creates multiple things. + /** + * @method Create_bulk - Creates multiple things when provided with a valid + * token and an array of things information such as names. + * @param {list} things - An array of things information. + * @param {string} token - User token. + * @returns {list} - Things list. + * @example + * const things = [ + * { + * "name": "thing1" + * }, + * { + * "name": "thing2" + * } + * ] + */ + const options = { + method: "post", + maxBodyLength: Infinity, + url: `${this.things_url}/${this.thingsEndpoint}/bulk`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(things), + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + Get(thing_id, token) { + //Retrieves thing information. + /** + * @method Get - Retrieves thing information when provided with a valid token + * and thing ID. + * @param {string} thing_id - Thing ID. + * @param {string} token - User token. + * @returns {Object} - Thing object. + * @example + * const thing_id = "bb7edb32-2eac-4aad-aebe-ed96fe073879" + * + */ + + const options = { + method: "get", + maxBodyLength: Infinity, + url: `${this.things_url}/${this.thingsEndpoint}/${thing_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + GetByChannel(thing_id, query_params, token) { + //Retrieves list of channels connected to specified thing with pagination metadata. + /** + * @method GetByChannel - Retrieves list of channels connected to specified thing + * with pagination metadata. + * @param {string} thing_id - Thing ID. + * @param {Object} query_params - Query parameters such as offset and limit. + * @returns {Object} - Channels list. + */ + const options = { + method: "get", + maxBodyLength: Infinity, + url: `${this.things_url}/${ + this.thingsEndpoint + }/${thing_id}/channels?${new URLSearchParams( + query_params, + ).toString()}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + GetAll(query_params, token) { + //Retrieves list of things with pagination metadata. + /** + * @method GetAll - Retrieves list of things with pagination metadata when provided with a + * valid token and correct query parameters such as offset and limit. + * @param {Object} query_params - Query parameters. + * @param {string} token - User token. + * @returns {Object} - Things list. + */ + const options = { + method: "get", + maxBodyLength: Infinity, + url: `${this.things_url}/${ + this.thingsEndpoint + }?${new URLSearchParams(query_params).toString()}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + "Access-Control-Allow-Origin": "*", + }, + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + Disable(thing_id, token) { + //Disables thing. + /** + * @method Disable - Deletes a thing when provided with a valid token and thing ID. + * @param {string} thing_id - Thing ID. + * @param {string} token - User token. + * @returns {Object} - Thing object with statys disabled. + */ + const options = { + method: "post", + maxBodyLength: Infinity, + url: `${this.things_url}/${this.thingsEndpoint}/${thing_id}/disable`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + Update(thing_id, thing, token) { + //Updates thing. + /** + * @method Update - Updates thing when provided with a valid token, + * thing ID and thing object. + * @param {string} thing_id - Thing ID. + * @param {Object} thing - Thing object. + * @param {string} token - User token. + * @returns {Object} - Thing object. + * @example + * const thing = { + * "name": "thing3", + * "tags": [ + * "tag1" + * ], + * "credentials": { + * "identity": "thingidentity", + * "secret":"12345678" + * }, + * "owner": "bb7edb32-2eac-4aad-aebe-ed96fe073879", + * "id": "bb7edb32-2eac-4aad-aebe-ed96fe073879", + * } + */ + const options = { + method: "patch", + maxBodyLength: Infinity, + url: `${this.things_url}/${this.thingsEndpoint}/${thing_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(thing), + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + UpdateThingSecret(thing_id, thing, token) { + //Updates thing secret. + /** + * @method UpdateThingSecret - Updates thing secret when provided with a valid token, + * thing ID and thing object. + * @param {string} thing_id - Thing ID. + * @param {Object} thing - Thing object. + * @param {string} token - User token. + * @returns {Object} - Thing object. + * @example + * const thing = { + * "name": "thing3", + * "tags": [ + * "tag1" + * ], + * "credentials": { + * "identity": "thingidentity", + * "secret":"56788912" + * }, + * "owner": "bb7edb32-2eac-4aad-aebe-ed96fe073879", + * "id": "bb7edb32-2eac-4aad-aebe-ed96fe073879", + * } + */ + const options = { + method: "patch", + maxBodyLength: Infinity, + url: `${this.things_url}/${this.thingsEndpoint}/${thing_id}/secret`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(thing), + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + UpdateThingTags(thing_id, thing, token) { + //Updates thing tags. + /** + * @method UpdateThingTags - Updates thing tags when provided with a valid token, + * thing ID and thing object. + * + * @param {string} thing_id - Thing ID. + * @param {Object} thing - Thing object. + * @param {string} token - User token. + * @returns {Object} - Thing object. + * @example + * const thing = { + * "name": "thing3", + * "tags": [ + * "tag1" + * ], + * "credentials": { + * "identity": "thingidentity", + * "secret":"56788912" + * }, + * "owner": "bb7edb32-2eac-4aad-aebe-ed96fe073879", + * "id": "bb7edb32-2eac-4aad-aebe-ed96fe073879", + * } + */ + const options = { + method: "patch", + maxBodyLength: Infinity, + url: `${this.things_url}/${this.thingsEndpoint}/${thing_id}/tags`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(thing), + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + UpdateThingOwner(thing_id, thing, token) { + //Updates thing owner. + /** + * @method UpdateThingOwner - Updates thing owner when provided with a valid token, + * thing ID and thing object. + * @param {string} thing_id - Thing ID. + * @param {Object} thing - Thing object. + * @param {string} token - User token. + * @returns {Object} - Thing object. + * @example + * const thing = { + * "name": "thing3", + * "tags": [ + * "tag1" + * ], + * "credentials": { + * "identity": "thingidentity", + * "secret":"56788912" + * }, + * "owner": "bb7edb32-2eac-4aad-aebe-ed96fe073879", + * "id": "bb7edb32-2eac-4aad-aebe-ed96fe073879", + * } + */ + const options = { + method: "patch", + maxBodyLength: Infinity, + url: `${this.things_url}/${this.thingsEndpoint}/${thing_id}/owner`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(thing), + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + Connect(thing_id, channel_id, action, token) { + //Connects thing to channel. + /** + * @method Connect - Connects thing to channel when provided with a valid token, + * channel id and a thing id. The thing must have an action that it can perform over + * the channel. + * @param {string} thing_id - Thing ID. + * @param {string} channel_id - Channel ID. + * @param {list} action - Action for example: ["m_read", "m_write"]. + * @param {string} token - User token. + * + */ + + const payload = { + subject: thing_id, + object: channel_id, + action: action, + }; + const options = { + method: "post", + maxBodyLength: Infinity, + url: `${this.things_url}/policies`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(payload), + }; + return _axios.default + .request(options) + .then((_response) => { + return "Policy created."; + }) + .catch((error) => { + return error.response.data; + }); + } + Connects(thing_ids, channel_ids, actions, token) { + //Connects multiple things to multiple channels. + /** + * @method Connects - Connects multiple things to multiple channels when provided with a valid token, + * arrays of channel ids, thing ids and actions. + * @param {list} thing_ids - Array of thing IDs. + * @param {list} channel_ids - Array of channel IDs. + * @param {list} actions - Array of actions for example: ["m_read", "m_write"]. + * @param {string} token - User token. + * @returns {Object} - Policy object. + * + */ + + const payload = { + subjects: thing_ids, + objects: channel_ids, + actions: actions, + }; + const options = { + method: "post", + maxBodyLength: Infinity, + url: `${this.things_url}/connect`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(payload), + }; + return _axios.default + .request(options) + .then((_response) => { + return "Policy created."; + }) + .catch((error) => { + return error.response.data; + }); + } + Disconnect(thing_id, channel_id, token) { + //Disconnects thing from channel. + /** + * @method Disconnect - Disconnects thing from channel when provided with a valid token, + * channel id and a thing id. + * @param {list} thing_id - Thing ID. + * @param {list} channel_id - Channel ID. + * @param {string} token - User token. + * + */ + const payload = { + subjects: thing_id, + objects: channel_id, + }; + const options = { + method: "post", + maxBodyLength: Infinity, + url: `${this.things_url}/disconnect`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(payload), + }; + return _axios.default + .request(options) + .then((_response) => { + return "Policy deleted."; + }) + .catch((error) => { + return error.response.data; + }); + } + IdentifyThing(thing_key) { + //Validates thing's key and returns it's ID if key is valid + /** + * @method IdentifyThing - Validates thing's key and returns it's ID if key is valid. The method + * does not require a token. + * @param {string} thing_key - Thing secret. + * @returns {Object} - Thing object. + * + */ + const options = { + method: "post", + maxBodyLength: Infinity, + url: `${this.things_url}/identify`, + headers: { + "Content-Type": this.content_type, + Authorization: `Thing ${thing_key}`, + }, + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + AuthoriseThing(thing_id, channel_id, action, entity_type, token) { + //Authorises thing + /** + * @method AuthoriseThing - Authorises a thing to perform an action on a channel + * when provided with a valid token, thing ID, channel ID, action and entity type. + * @param {string} thing_id - Thing ID. + * @param {string} channel_id - Channel ID. + * @param {string} action - Action for example: ["m_read", "m_write"]. + * @param {string} entity_type - Type of the thing class for example: "client" + * @param {string} token - User token. + * @return {Object} - True if thing is authorised, false if not. + */ + const access_request = { + subject: thing_id, + object: channel_id, + action: action, + entity_type: entity_type, + }; + const options = { + method: "post", + maxBodyLength: Infinity, + url: `${this.things_url}/channels/object/access`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(access_request), + }; + return _axios.default + .request(options) + .then((_response) => { + return true; + }) + .catch((_error) => { + return false; + }); + } + } + module.exports = Things; + }, + { axios: 8 }, + ], + 7: [ + function (require, module, exports) { + "use strict"; + + var _axios = _interopRequireDefault(require("axios")); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + class Users { + // Users API client + /** + * @class Users - + * Users API is used for creating and managing users. + * It is used for creating new users, logging in, refreshing tokens, + * getting user information, updating user information, disabling + * and enabling users. + * @param {String} users_url - URL to the Users service. + * @param {String} content_type - Content type for the requests. + * @param {String} usersEndpoint - Endpoint for the users service. + * @returns {Object} - Users object. + */ + constructor(users_url) { + this.users_url = users_url; + this.content_type = "application/json"; + this.usersEndpoint = "users"; + } + Create(user, token) { + // Creates a new user + /** + * @method Create - Creates a new user. + * @param {Object} user - User object. + * @param {String} token - Access token. + * @returns {Object} - User object. + * @example + * const user = { + * "credentials": { + * "identity": "admin@example.com", + * "password": "12345678" + * } + * } + * + */ + + const options = { + method: "post", + maxBodyLength: Infinity, + url: `${this.users_url}/${this.usersEndpoint}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(user), + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + Login(user) { + // Issue Access and Refresh Token used for authenticating into the system + /** + * @method Login - Issue Access and Refresh Token used for authenticating into the system. + * @param {Object} user - User object. + * @returns {Object} - Access and Refresh Token. + * @example + * const user = { + * "credentials": { + * "identity": "admin@example.com", + * "password": "12345678" + * } + * } + */ + + const options = { + method: "post", + maxBodyLength: Infinity, + url: `${this.users_url}/${this.usersEndpoint}/tokens/issue`, + headers: { + "Content-Type": this.content_type, + }, + data: JSON.stringify(user), + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error; + }); + } + RefreshToken(user, refresh_token) { + //provides a new access token and refresh token. + /** + * @method Refresh_token - Provides a new access token and refresh token. + * @param {Object} user - User object. + * @param {String} refresh_token - Refresh token. + * @returns {Object} - Access and Refresh Token. + * @example + * const user = { + * "identity": "c52d-3b0d-43b9-8c3e-275c087d875af" + * } + * + */ + + const options = { + method: "post", + maxBodyLength: Infinity, + url: `${this.users_url}/${this.usersEndpoint}/tokens/refresh`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${refresh_token}`, + }, + data: JSON.stringify(user), + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error; + }); + } + Update(user, token) { + // Update a user + /** + * @method Update - Update a user. Updates a user's name and metadata. + * @param {Object} user - User object. + * @param {String} token - Access token. + * @returns {Object} - User object. + * @example + * const user = { + * "id": "c52d-3b0d-43b9-8c3e-275c087d875af", + * "name": "John Doe" + * } + * + */ + const options = { + method: "patch", + url: `${this.users_url}/${this.usersEndpoint}/${user["id"]}`, + maxBodyLength: Infinity, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(user), + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + UpdateUserIdentity(user, token) { + // Update a user identity + /** + * @method UpdateUserIdentity - Update a user identity for a currently logged in user. + * The user Identity is updated using authorization user_token + * @param {Object} user - User object. + * @param {String} token - Access token. + * @returns {Object} - User object. + * @example + * const user = { + * "id": "c52d-3b0d-43b9-8c3e-275c087d875af", + * "credentials": { + * "identity": "fkatwigs@email.com" + * } + * + * } + */ + const options = { + method: "patch", + url: `${this.users_url}/${this.usersEndpoint}/${user["id"]}/identity`, + maxBodyLength: Infinity, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(user), + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + UpdateUserTags(user, token) { + // Update a user's tags. + /** + * Updates tags of the user with provided ID. Tags is updated using + * authorization user_tokeN. + * @method UpdateUserTags - Update a user's tags. + * @param {Object} user - User object. + * @param{String} token - Access token. + * @returns {Object} - User object. + * @example + * const user = { + * "name": "example", + * "id": "886b4266-77d1-4258-abae-2931fb4f16de" + * "tags": [ + * "back", + * "end" + * ] + * "metadata": { + * "foo": "bar" + * } + * } + * + */ + const options = { + method: "patch", + url: `${this.users_url}/${this.usersEndpoint}/${user["id"]}/tags`, + maxBodyLength: Infinity, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(user), + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + UpdateUserOwner(user, token) { + // Update a user's owner. + /** + * Updates owner of the user with provided ID. The owner is updated using + * authorization user_tokeN. + * @method UpdateUserOwner - Update a user's owner. + * @param {Object} user - User object. + * @param{String} token - Access token. + * @returns {Object} - User object. + * @example + * const user = { + * "name": "example", + * "id": "886b4266-77d1-4258-abae-2931fb4f16de" + * "tags": [ + * "back", + * "end" + * ] + * "metadata": { + * "foo": "bar" + * } + * "owner":"886b4266-77d1-4258-abae-2931fb4f16de" + * } + * + */ + const options = { + method: "patch", + url: `${this.users_url}/${this.usersEndpoint}/${user["id"]}/owner`, + maxBodyLength: Infinity, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(user), + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + UpdateUserPassword(old_secret, new_secret, token) { + // Update a user's password. + /** + * Updates password of the user with provided valid token. + * + * @method UpdateUserPassword - Update a user's password. + * @param {String} old_secret - Old password. + * @param {String} new_secret - New password. + * @param {String} token - Access token. + * @returns {Object} - User object. + * + */ + const secret = { + old_secret: old_secret, + new_secret: new_secret, + }; + const options = { + method: "patch", + url: `${this.users_url}/${this.usersEndpoint}/secret`, + maxBodyLength: Infinity, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(secret), + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + Get(user_id, token) { + // Get a user + /** + * Provides information about the user with provided ID. The user is + * retrieved using authorization user_token. + * @method Get - Get a user. + * @param {String} user_id - User ID. + * @param {String} token - Access token. + * @returns {Object} - User object. + * @example + * const user_id = "886b4266-77d1-4258-abae-2931fb4f16de" + * + */ + const options = { + method: "get", + maxBodyLength: Infinity, + url: `${this.users_url}/${this.usersEndpoint}/${user_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + GetAll(query_params, token) { + // Gets all users with pagination. + /** + * Provides information about all users. The users are retrieved using + * authorization user_token. + * + * @method Get_all - Gets all users with pagination. + * @param {Object} query_params - Query parameters. + * @param {String} token - Access token. + * @returns {Object} - User object. + * @example + * const query_params = { + * "offset": 0, + * "limit": 10 + * } + * + */ + const options = { + method: "get", + maxBodyLength: Infinity, + url: `${this.users_url}/${ + this.usersEndpoint + }?${new URLSearchParams(query_params).toString()}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + // return fetch(url , options) + // .then((response) => { + // if (!response.ok) { + // return this.userError.HandleError(this.userError.errors, response.status); + // // throw new Error(`HTTP error! Status: ${response.status}`); + // } + // return response.json(); + // }) + // .catch((error) => { + // console.error('Fetch error:', error); + // }); + } + + Disable(user, token) { + // Disable a user + /** + * Disables a user with provided ID and valid token. + * @method Disable - Disable a user. + * @param {Object} user - User object. + * @param {String} token - Access token. + * @returns {Object} - User object. + * @example + * const user = { + * "id": "c52d-3b0d-43b9-8c3e-275c087d875af", + * "status": "disabled" + * } + */ + const options = { + method: "post", + maxBodyLength: Infinity, + url: `${this.users_url}/${this.usersEndpoint}/${user["id"]}/disable`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(user), + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + Enable(user, token) { + // Enable a user. + /** + * Enables a previously disabled user when provided with token and valid ID. + * @method Enable - Enable a user. + * @params {Object} user - User object. + * @param {String} token - Access token. + * @returns {Object} - User object. + * @example + * const user = { + * "id": "c52d-3b0d-43b9-8c3e-275c087d875af", + * "status": "enabled" + * } + * + */ + const options = { + method: "post", + maxBodyLength: Infinity, + url: `${this.users_url}/${this.usersEndpoint}/${user["id"]}/enable`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(user), + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + Memberships(member_id, query_params, token) { + // Get memberships of a user. + /** + * Gets the various groups a user belongs to. + * @method Memberships - Get memberships of a user. + * @param {String} member_id - Member ID. + * @param {Object} query_params - Query parameters for example offset and limit. + * @param {String} token - Access token. + * @returns {Object} - User object. + */ + const options = { + method: "get", + maxBodyLength: Infinity, + url: `${this.users_url}/${ + this.usersEndpoint + }/${member_id}/memberships?${new URLSearchParams( + query_params, + ).toString()}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + params: query_params, + }; + return _axios.default + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + AuthoriseUser(user_id, group_id, action, entity_type, token) { + //Authorises user to perform an action on an entity + /** + * Authorises user to perform an action on an entity. The user needs to be a member of the + * group to be able to have authority over it. + * @method AuthoriseUser - Authorises user to perform an action on an entity. + * @param {String} user_id - User ID which is the Subject. + * @param {String} group_id - Group ID which is the Object. + * @return {Boolean} - Returns true if the user is authorised to perform the action. + */ + const access_request = { + subject: user_id, + object: group_id, + action: action, + entity_type: entity_type, + }; + const options = { + method: "post", + maxBodyLength: Infinity, + url: `${this.users_url}/authorize`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(access_request), + }; + return _axios.default + .request(options) + .then((_response) => { + return true; + }) + .catch((_error) => { + return false; + }); + } + } + module.exports = Users; + }, + { axios: 8 }, + ], + 8: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.all = + exports.VERSION = + exports.HttpStatusCode = + exports.CanceledError = + exports.CancelToken = + exports.Cancel = + exports.AxiosHeaders = + exports.AxiosError = + exports.Axios = + void 0; + Object.defineProperty(exports, "default", { + enumerable: true, + get: function () { + return _axios.default; + }, + }); + exports.toFormData = + exports.spread = + exports.mergeConfig = + exports.isCancel = + exports.isAxiosError = + exports.getAdapter = + exports.formToJSON = + void 0; + var _axios = _interopRequireDefault(require("./lib/axios.js")); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + // This module is intended to unwrap Axios default export as named. + // Keep top-level export same with static properties + // so that it can keep same with es module or cjs + const { + Axios, + AxiosError, + CanceledError, + isCancel, + CancelToken, + VERSION, + all, + Cancel, + isAxiosError, + spread, + toFormData, + AxiosHeaders, + HttpStatusCode, + formToJSON, + getAdapter, + mergeConfig, + } = _axios.default; + exports.mergeConfig = mergeConfig; + exports.getAdapter = getAdapter; + exports.formToJSON = formToJSON; + exports.HttpStatusCode = HttpStatusCode; + exports.AxiosHeaders = AxiosHeaders; + exports.toFormData = toFormData; + exports.spread = spread; + exports.isAxiosError = isAxiosError; + exports.Cancel = Cancel; + exports.all = all; + exports.VERSION = VERSION; + exports.CancelToken = CancelToken; + exports.isCancel = isCancel; + exports.CanceledError = CanceledError; + exports.AxiosError = AxiosError; + exports.Axios = Axios; + }, + { "./lib/axios.js": 11 }, + ], + 9: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = void 0; + var _utils = _interopRequireDefault(require("../utils.js")); + var _http = _interopRequireDefault(require("./http.js")); + var _xhr = _interopRequireDefault(require("./xhr.js")); + var _AxiosError = _interopRequireDefault( + require("../core/AxiosError.js"), + ); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + const knownAdapters = { + http: _http.default, + xhr: _xhr.default, + }; + _utils.default.forEach(knownAdapters, (fn, value) => { + if (fn) { + try { + Object.defineProperty(fn, "name", { + value, + }); + } catch (e) { + // eslint-disable-next-line no-empty + } + Object.defineProperty(fn, "adapterName", { + value, + }); + } + }); + const renderReason = (reason) => `- ${reason}`; + const isResolvedHandle = (adapter) => + _utils.default.isFunction(adapter) || + adapter === null || + adapter === false; + var _default = (exports.default = { + getAdapter: (adapters) => { + adapters = _utils.default.isArray(adapters) ? adapters : [adapters]; + const { length } = adapters; + let nameOrAdapter; + let adapter; + const rejectedReasons = {}; + for (let i = 0; i < length; i++) { + nameOrAdapter = adapters[i]; + let id; + adapter = nameOrAdapter; + if (!isResolvedHandle(nameOrAdapter)) { + adapter = + knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; + if (adapter === undefined) { + throw new _AxiosError.default(`Unknown adapter '${id}'`); + } + } + if (adapter) { + break; + } + rejectedReasons[id || "#" + i] = adapter; + } + if (!adapter) { + const reasons = Object.entries(rejectedReasons).map( + ([id, state]) => + `adapter ${id} ` + + (state === false + ? "is not supported by the environment" + : "is not available in the build"), + ); + let s = length + ? reasons.length > 1 + ? "since :\n" + reasons.map(renderReason).join("\n") + : " " + renderReason(reasons[0]) + : "as no adapter specified"; + throw new _AxiosError.default( + `There is no suitable adapter to dispatch the request ` + s, + "ERR_NOT_SUPPORT", + ); + } + return adapter; + }, + adapters: knownAdapters, + }); + }, + { + "../core/AxiosError.js": 16, + "../utils.js": 50, + "./http.js": 37, + "./xhr.js": 10, + }, + ], + 10: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = void 0; + var _utils = _interopRequireDefault(require("./../utils.js")); + var _settle = _interopRequireDefault(require("./../core/settle.js")); + var _cookies = _interopRequireDefault( + require("./../helpers/cookies.js"), + ); + var _buildURL = _interopRequireDefault( + require("./../helpers/buildURL.js"), + ); + var _buildFullPath = _interopRequireDefault( + require("../core/buildFullPath.js"), + ); + var _isURLSameOrigin = _interopRequireDefault( + require("./../helpers/isURLSameOrigin.js"), + ); + var _transitional = _interopRequireDefault( + require("../defaults/transitional.js"), + ); + var _AxiosError = _interopRequireDefault( + require("../core/AxiosError.js"), + ); + var _CanceledError = _interopRequireDefault( + require("../cancel/CanceledError.js"), + ); + var _parseProtocol = _interopRequireDefault( + require("../helpers/parseProtocol.js"), + ); + var _index = _interopRequireDefault(require("../platform/index.js")); + var _AxiosHeaders = _interopRequireDefault( + require("../core/AxiosHeaders.js"), + ); + var _speedometer2 = _interopRequireDefault( + require("../helpers/speedometer.js"), + ); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + function progressEventReducer(listener, isDownloadStream) { + let bytesNotified = 0; + const _speedometer = (0, _speedometer2.default)(50, 250); + return (e) => { + const loaded = e.loaded; + const total = e.lengthComputable ? e.total : undefined; + const progressBytes = loaded - bytesNotified; + const rate = _speedometer(progressBytes); + const inRange = loaded <= total; + bytesNotified = loaded; + const data = { + loaded, + total, + progress: total ? loaded / total : undefined, + bytes: progressBytes, + rate: rate ? rate : undefined, + estimated: + rate && total && inRange ? (total - loaded) / rate : undefined, + event: e, + }; + data[isDownloadStream ? "download" : "upload"] = true; + listener(data); + }; + } + const isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined"; + var _default = (exports.default = + isXHRAdapterSupported && + function (config) { + return new Promise(function dispatchXhrRequest(resolve, reject) { + let requestData = config.data; + const requestHeaders = _AxiosHeaders.default + .from(config.headers) + .normalize(); + const responseType = config.responseType; + let onCanceled; + function done() { + if (config.cancelToken) { + config.cancelToken.unsubscribe(onCanceled); + } + if (config.signal) { + config.signal.removeEventListener("abort", onCanceled); + } + } + let contentType; + if (_utils.default.isFormData(requestData)) { + if ( + _index.default.isStandardBrowserEnv || + _index.default.isStandardBrowserWebWorkerEnv + ) { + requestHeaders.setContentType(false); // Let the browser set it + } else if ( + !requestHeaders.getContentType(/^\s*multipart\/form-data/) + ) { + requestHeaders.setContentType("multipart/form-data"); // mobile/desktop app frameworks + } else if ( + _utils.default.isString( + (contentType = requestHeaders.getContentType()), + ) + ) { + // fix semicolon duplication issue for ReactNative FormData implementation + requestHeaders.setContentType( + contentType.replace(/^\s*(multipart\/form-data);+/, "$1"), + ); + } + } + let request = new XMLHttpRequest(); + + // HTTP basic authentication + if (config.auth) { + const username = config.auth.username || ""; + const password = config.auth.password + ? unescape(encodeURIComponent(config.auth.password)) + : ""; + requestHeaders.set( + "Authorization", + "Basic " + btoa(username + ":" + password), + ); + } + const fullPath = (0, _buildFullPath.default)( + config.baseURL, + config.url, + ); + request.open( + config.method.toUpperCase(), + (0, _buildURL.default)( + fullPath, + config.params, + config.paramsSerializer, + ), + true, + ); + + // Set the request timeout in MS + request.timeout = config.timeout; + function onloadend() { + if (!request) { + return; + } + // Prepare the response + const responseHeaders = _AxiosHeaders.default.from( + "getAllResponseHeaders" in request && + request.getAllResponseHeaders(), + ); + const responseData = + !responseType || + responseType === "text" || + responseType === "json" + ? request.responseText + : request.response; + const response = { + data: responseData, + status: request.status, + statusText: request.statusText, + headers: responseHeaders, + config, + request, + }; + (0, _settle.default)( + function _resolve(value) { + resolve(value); + done(); + }, + function _reject(err) { + reject(err); + done(); + }, + response, + ); + + // Clean up request + request = null; + } + if ("onloadend" in request) { + // Use onloadend if available + request.onloadend = onloadend; + } else { + // Listen for ready state to emulate onloadend + request.onreadystatechange = function handleLoad() { + if (!request || request.readyState !== 4) { + return; + } + + // The request errored out and we didn't get a response, this will be + // handled by onerror instead + // With one exception: request that using file: protocol, most browsers + // will return status as 0 even though it's a successful request + if ( + request.status === 0 && + !( + request.responseURL && + request.responseURL.indexOf("file:") === 0 + ) + ) { + return; + } + // readystate handler is calling before onerror or ontimeout handlers, + // so we should call onloadend on the next 'tick' + setTimeout(onloadend); + }; + } + + // Handle browser request cancellation (as opposed to a manual cancellation) + request.onabort = function handleAbort() { + if (!request) { + return; + } + reject( + new _AxiosError.default( + "Request aborted", + _AxiosError.default.ECONNABORTED, + config, + request, + ), + ); + + // Clean up request + request = null; + }; + + // Handle low level network errors + request.onerror = function handleError() { + // Real errors are hidden from us by the browser + // onerror should only fire if it's a network error + reject( + new _AxiosError.default( + "Network Error", + _AxiosError.default.ERR_NETWORK, + config, + request, + ), + ); + + // Clean up request + request = null; + }; + + // Handle timeout + request.ontimeout = function handleTimeout() { + let timeoutErrorMessage = config.timeout + ? "timeout of " + config.timeout + "ms exceeded" + : "timeout exceeded"; + const transitional = + config.transitional || _transitional.default; + if (config.timeoutErrorMessage) { + timeoutErrorMessage = config.timeoutErrorMessage; + } + reject( + new _AxiosError.default( + timeoutErrorMessage, + transitional.clarifyTimeoutError + ? _AxiosError.default.ETIMEDOUT + : _AxiosError.default.ECONNABORTED, + config, + request, + ), + ); + + // Clean up request + request = null; + }; + + // Add xsrf header + // This is only done if running in a standard browser environment. + // Specifically not if we're in a web worker, or react-native. + if (_index.default.isStandardBrowserEnv) { + // Add xsrf header + const xsrfValue = + (config.withCredentials || + (0, _isURLSameOrigin.default)(fullPath)) && + config.xsrfCookieName && + _cookies.default.read(config.xsrfCookieName); + if (xsrfValue) { + requestHeaders.set(config.xsrfHeaderName, xsrfValue); + } + } + + // Remove Content-Type if data is undefined + requestData === undefined && requestHeaders.setContentType(null); + + // Add headers to the request + if ("setRequestHeader" in request) { + _utils.default.forEach( + requestHeaders.toJSON(), + function setRequestHeader(val, key) { + request.setRequestHeader(key, val); + }, + ); + } + + // Add withCredentials to request if needed + if (!_utils.default.isUndefined(config.withCredentials)) { + request.withCredentials = !!config.withCredentials; + } + + // Add responseType to request if needed + if (responseType && responseType !== "json") { + request.responseType = config.responseType; + } + + // Handle progress if needed + if (typeof config.onDownloadProgress === "function") { + request.addEventListener( + "progress", + progressEventReducer(config.onDownloadProgress, true), + ); + } + + // Not all browsers support upload events + if ( + typeof config.onUploadProgress === "function" && + request.upload + ) { + request.upload.addEventListener( + "progress", + progressEventReducer(config.onUploadProgress), + ); + } + if (config.cancelToken || config.signal) { + // Handle cancellation + // eslint-disable-next-line func-names + onCanceled = (cancel) => { + if (!request) { + return; + } + reject( + !cancel || cancel.type + ? new _CanceledError.default(null, config, request) + : cancel, + ); + request.abort(); + request = null; + }; + config.cancelToken && config.cancelToken.subscribe(onCanceled); + if (config.signal) { + config.signal.aborted + ? onCanceled() + : config.signal.addEventListener("abort", onCanceled); + } + } + const protocol = (0, _parseProtocol.default)(fullPath); + if ( + protocol && + _index.default.protocols.indexOf(protocol) === -1 + ) { + reject( + new _AxiosError.default( + "Unsupported protocol " + protocol + ":", + _AxiosError.default.ERR_BAD_REQUEST, + config, + ), + ); + return; + } + + // Send the request + request.send(requestData || null); + }); + }); + }, + { + "../cancel/CanceledError.js": 13, + "../core/AxiosError.js": 16, + "../core/AxiosHeaders.js": 17, + "../core/buildFullPath.js": 19, + "../defaults/transitional.js": 25, + "../helpers/parseProtocol.js": 39, + "../helpers/speedometer.js": 40, + "../platform/index.js": 49, + "./../core/settle.js": 22, + "./../helpers/buildURL.js": 30, + "./../helpers/cookies.js": 32, + "./../helpers/isURLSameOrigin.js": 36, + "./../utils.js": 50, + }, + ], + 11: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = void 0; + var _utils = _interopRequireDefault(require("./utils.js")); + var _bind = _interopRequireDefault(require("./helpers/bind.js")); + var _Axios = _interopRequireDefault(require("./core/Axios.js")); + var _mergeConfig = _interopRequireDefault( + require("./core/mergeConfig.js"), + ); + var _index = _interopRequireDefault(require("./defaults/index.js")); + var _formDataToJSON = _interopRequireDefault( + require("./helpers/formDataToJSON.js"), + ); + var _CanceledError = _interopRequireDefault( + require("./cancel/CanceledError.js"), + ); + var _CancelToken = _interopRequireDefault( + require("./cancel/CancelToken.js"), + ); + var _isCancel = _interopRequireDefault(require("./cancel/isCancel.js")); + var _data = require("./env/data.js"); + var _toFormData = _interopRequireDefault( + require("./helpers/toFormData.js"), + ); + var _AxiosError = _interopRequireDefault( + require("./core/AxiosError.js"), + ); + var _spread = _interopRequireDefault(require("./helpers/spread.js")); + var _isAxiosError = _interopRequireDefault( + require("./helpers/isAxiosError.js"), + ); + var _AxiosHeaders = _interopRequireDefault( + require("./core/AxiosHeaders.js"), + ); + var _adapters = _interopRequireDefault( + require("./adapters/adapters.js"), + ); + var _HttpStatusCode = _interopRequireDefault( + require("./helpers/HttpStatusCode.js"), + ); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + /** + * Create an instance of Axios + * + * @param {Object} defaultConfig The default config for the instance + * + * @returns {Axios} A new instance of Axios + */ + function createInstance(defaultConfig) { + const context = new _Axios.default(defaultConfig); + const instance = (0, _bind.default)( + _Axios.default.prototype.request, + context, + ); + + // Copy axios.prototype to instance + _utils.default.extend(instance, _Axios.default.prototype, context, { + allOwnKeys: true, + }); + + // Copy context to instance + _utils.default.extend(instance, context, null, { + allOwnKeys: true, + }); + + // Factory for creating new instances + instance.create = function create(instanceConfig) { + return createInstance( + (0, _mergeConfig.default)(defaultConfig, instanceConfig), + ); + }; + return instance; + } + + // Create the default instance to be exported + const axios = createInstance(_index.default); + + // Expose Axios class to allow class inheritance + axios.Axios = _Axios.default; + + // Expose Cancel & CancelToken + axios.CanceledError = _CanceledError.default; + axios.CancelToken = _CancelToken.default; + axios.isCancel = _isCancel.default; + axios.VERSION = _data.VERSION; + axios.toFormData = _toFormData.default; + + // Expose AxiosError class + axios.AxiosError = _AxiosError.default; + + // alias for CanceledError for backward compatibility + axios.Cancel = axios.CanceledError; + + // Expose all/spread + axios.all = function all(promises) { + return Promise.all(promises); + }; + axios.spread = _spread.default; + + // Expose isAxiosError + axios.isAxiosError = _isAxiosError.default; + + // Expose mergeConfig + axios.mergeConfig = _mergeConfig.default; + axios.AxiosHeaders = _AxiosHeaders.default; + axios.formToJSON = (thing) => + (0, _formDataToJSON.default)( + _utils.default.isHTMLForm(thing) ? new FormData(thing) : thing, + ); + axios.getAdapter = _adapters.default.getAdapter; + axios.HttpStatusCode = _HttpStatusCode.default; + axios.default = axios; + + // this module should only have a default export + var _default = (exports.default = axios); + }, + { + "./adapters/adapters.js": 9, + "./cancel/CancelToken.js": 12, + "./cancel/CanceledError.js": 13, + "./cancel/isCancel.js": 14, + "./core/Axios.js": 15, + "./core/AxiosError.js": 16, + "./core/AxiosHeaders.js": 17, + "./core/mergeConfig.js": 21, + "./defaults/index.js": 24, + "./env/data.js": 26, + "./helpers/HttpStatusCode.js": 28, + "./helpers/bind.js": 29, + "./helpers/formDataToJSON.js": 33, + "./helpers/isAxiosError.js": 35, + "./helpers/spread.js": 41, + "./helpers/toFormData.js": 42, + "./utils.js": 50, + }, + ], + 12: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = void 0; + var _CanceledError = _interopRequireDefault( + require("./CanceledError.js"), + ); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + /** + * A `CancelToken` is an object that can be used to request cancellation of an operation. + * + * @param {Function} executor The executor function. + * + * @returns {CancelToken} + */ + class CancelToken { + constructor(executor) { + if (typeof executor !== "function") { + throw new TypeError("executor must be a function."); + } + let resolvePromise; + this.promise = new Promise(function promiseExecutor(resolve) { + resolvePromise = resolve; + }); + const token = this; + + // eslint-disable-next-line func-names + this.promise.then((cancel) => { + if (!token._listeners) return; + let i = token._listeners.length; + while (i-- > 0) { + token._listeners[i](cancel); + } + token._listeners = null; + }); + + // eslint-disable-next-line func-names + this.promise.then = (onfulfilled) => { + let _resolve; + // eslint-disable-next-line func-names + const promise = new Promise((resolve) => { + token.subscribe(resolve); + _resolve = resolve; + }).then(onfulfilled); + promise.cancel = function reject() { + token.unsubscribe(_resolve); + }; + return promise; + }; + executor(function cancel(message, config, request) { + if (token.reason) { + // Cancellation has already been requested + return; + } + token.reason = new _CanceledError.default( + message, + config, + request, + ); + resolvePromise(token.reason); + }); + } + + /** + * Throws a `CanceledError` if cancellation has been requested. + */ + throwIfRequested() { + if (this.reason) { + throw this.reason; + } + } + + /** + * Subscribe to the cancel signal + */ + + subscribe(listener) { + if (this.reason) { + listener(this.reason); + return; + } + if (this._listeners) { + this._listeners.push(listener); + } else { + this._listeners = [listener]; + } + } + + /** + * Unsubscribe from the cancel signal + */ + + unsubscribe(listener) { + if (!this._listeners) { + return; + } + const index = this._listeners.indexOf(listener); + if (index !== -1) { + this._listeners.splice(index, 1); + } + } + + /** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ + static source() { + let cancel; + const token = new CancelToken(function executor(c) { + cancel = c; + }); + return { + token, + cancel, + }; + } + } + var _default = (exports.default = CancelToken); + }, + { "./CanceledError.js": 13 }, + ], + 13: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = void 0; + var _AxiosError = _interopRequireDefault( + require("../core/AxiosError.js"), + ); + var _utils = _interopRequireDefault(require("../utils.js")); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + /** + * A `CanceledError` is an object that is thrown when an operation is canceled. + * + * @param {string=} message The message. + * @param {Object=} config The config. + * @param {Object=} request The request. + * + * @returns {CanceledError} The created error. + */ + function CanceledError(message, config, request) { + // eslint-disable-next-line no-eq-null,eqeqeq + _AxiosError.default.call( + this, + message == null ? "canceled" : message, + _AxiosError.default.ERR_CANCELED, + config, + request, + ); + this.name = "CanceledError"; + } + _utils.default.inherits(CanceledError, _AxiosError.default, { + __CANCEL__: true, + }); + var _default = (exports.default = CanceledError); + }, + { "../core/AxiosError.js": 16, "../utils.js": 50 }, + ], + 14: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = isCancel; + function isCancel(value) { + return !!(value && value.__CANCEL__); + } + }, + {}, + ], + 15: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = void 0; + var _utils = _interopRequireDefault(require("./../utils.js")); + var _buildURL = _interopRequireDefault( + require("../helpers/buildURL.js"), + ); + var _InterceptorManager = _interopRequireDefault( + require("./InterceptorManager.js"), + ); + var _dispatchRequest = _interopRequireDefault( + require("./dispatchRequest.js"), + ); + var _mergeConfig = _interopRequireDefault(require("./mergeConfig.js")); + var _buildFullPath = _interopRequireDefault( + require("./buildFullPath.js"), + ); + var _validator = _interopRequireDefault( + require("../helpers/validator.js"), + ); + var _AxiosHeaders = _interopRequireDefault( + require("./AxiosHeaders.js"), + ); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + const validators = _validator.default.validators; + + /** + * Create a new instance of Axios + * + * @param {Object} instanceConfig The default config for the instance + * + * @return {Axios} A new instance of Axios + */ + class Axios { + constructor(instanceConfig) { + this.defaults = instanceConfig; + this.interceptors = { + request: new _InterceptorManager.default(), + response: new _InterceptorManager.default(), + }; + } + + /** + * Dispatch a request + * + * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) + * @param {?Object} config + * + * @returns {Promise} The Promise to be fulfilled + */ + request(configOrUrl, config) { + /*eslint no-param-reassign:0*/ + // Allow for axios('example/url'[, config]) a la fetch API + if (typeof configOrUrl === "string") { + config = config || {}; + config.url = configOrUrl; + } else { + config = configOrUrl || {}; + } + config = (0, _mergeConfig.default)(this.defaults, config); + const { transitional, paramsSerializer, headers } = config; + if (transitional !== undefined) { + _validator.default.assertOptions( + transitional, + { + silentJSONParsing: validators.transitional( + validators.boolean, + ), + forcedJSONParsing: validators.transitional( + validators.boolean, + ), + clarifyTimeoutError: validators.transitional( + validators.boolean, + ), + }, + false, + ); + } + if (paramsSerializer != null) { + if (_utils.default.isFunction(paramsSerializer)) { + config.paramsSerializer = { + serialize: paramsSerializer, + }; + } else { + _validator.default.assertOptions( + paramsSerializer, + { + encode: validators.function, + serialize: validators.function, + }, + true, + ); + } + } + + // Set config.method + config.method = ( + config.method || + this.defaults.method || + "get" + ).toLowerCase(); + + // Flatten headers + let contextHeaders = + headers && + _utils.default.merge(headers.common, headers[config.method]); + headers && + _utils.default.forEach( + ["delete", "get", "head", "post", "put", "patch", "common"], + (method) => { + delete headers[method]; + }, + ); + config.headers = _AxiosHeaders.default.concat( + contextHeaders, + headers, + ); + + // filter out skipped interceptors + const requestInterceptorChain = []; + let synchronousRequestInterceptors = true; + this.interceptors.request.forEach( + function unshiftRequestInterceptors(interceptor) { + if ( + typeof interceptor.runWhen === "function" && + interceptor.runWhen(config) === false + ) { + return; + } + synchronousRequestInterceptors = + synchronousRequestInterceptors && interceptor.synchronous; + requestInterceptorChain.unshift( + interceptor.fulfilled, + interceptor.rejected, + ); + }, + ); + const responseInterceptorChain = []; + this.interceptors.response.forEach( + function pushResponseInterceptors(interceptor) { + responseInterceptorChain.push( + interceptor.fulfilled, + interceptor.rejected, + ); + }, + ); + let promise; + let i = 0; + let len; + if (!synchronousRequestInterceptors) { + const chain = [_dispatchRequest.default.bind(this), undefined]; + chain.unshift.apply(chain, requestInterceptorChain); + chain.push.apply(chain, responseInterceptorChain); + len = chain.length; + promise = Promise.resolve(config); + while (i < len) { + promise = promise.then(chain[i++], chain[i++]); + } + return promise; + } + len = requestInterceptorChain.length; + let newConfig = config; + i = 0; + while (i < len) { + const onFulfilled = requestInterceptorChain[i++]; + const onRejected = requestInterceptorChain[i++]; + try { + newConfig = onFulfilled(newConfig); + } catch (error) { + onRejected.call(this, error); + break; + } + } + try { + promise = _dispatchRequest.default.call(this, newConfig); + } catch (error) { + return Promise.reject(error); + } + i = 0; + len = responseInterceptorChain.length; + while (i < len) { + promise = promise.then( + responseInterceptorChain[i++], + responseInterceptorChain[i++], + ); + } + return promise; + } + getUri(config) { + config = (0, _mergeConfig.default)(this.defaults, config); + const fullPath = (0, _buildFullPath.default)( + config.baseURL, + config.url, + ); + return (0, _buildURL.default)( + fullPath, + config.params, + config.paramsSerializer, + ); + } + } + + // Provide aliases for supported request methods + _utils.default.forEach( + ["delete", "get", "head", "options"], + function forEachMethodNoData(method) { + /*eslint func-names:0*/ + Axios.prototype[method] = function (url, config) { + return this.request( + (0, _mergeConfig.default)(config || {}, { + method, + url, + data: (config || {}).data, + }), + ); + }; + }, + ); + _utils.default.forEach( + ["post", "put", "patch"], + function forEachMethodWithData(method) { + /*eslint func-names:0*/ + + function generateHTTPMethod(isForm) { + return function httpMethod(url, data, config) { + return this.request( + (0, _mergeConfig.default)(config || {}, { + method, + headers: isForm + ? { + "Content-Type": "multipart/form-data", + } + : {}, + url, + data, + }), + ); + }; + } + Axios.prototype[method] = generateHTTPMethod(); + Axios.prototype[method + "Form"] = generateHTTPMethod(true); + }, + ); + var _default = (exports.default = Axios); + }, + { + "../helpers/buildURL.js": 30, + "../helpers/validator.js": 44, + "./../utils.js": 50, + "./AxiosHeaders.js": 17, + "./InterceptorManager.js": 18, + "./buildFullPath.js": 19, + "./dispatchRequest.js": 20, + "./mergeConfig.js": 21, + }, + ], + 16: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = void 0; + var _utils = _interopRequireDefault(require("../utils.js")); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + /** + * Create an Error with the specified message, config, error code, request and response. + * + * @param {string} message The error message. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [config] The config. + * @param {Object} [request] The request. + * @param {Object} [response] The response. + * + * @returns {Error} The created error. + */ + function AxiosError(message, code, config, request, response) { + Error.call(this); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } else { + this.stack = new Error().stack; + } + this.message = message; + this.name = "AxiosError"; + code && (this.code = code); + config && (this.config = config); + request && (this.request = request); + response && (this.response = response); + } + _utils.default.inherits(AxiosError, Error, { + toJSON: function toJSON() { + return { + // Standard + message: this.message, + name: this.name, + // Microsoft + description: this.description, + number: this.number, + // Mozilla + fileName: this.fileName, + lineNumber: this.lineNumber, + columnNumber: this.columnNumber, + stack: this.stack, + // Axios + config: _utils.default.toJSONObject(this.config), + code: this.code, + status: + this.response && this.response.status + ? this.response.status + : null, + }; + }, + }); + const prototype = AxiosError.prototype; + const descriptors = {}; + [ + "ERR_BAD_OPTION_VALUE", + "ERR_BAD_OPTION", + "ECONNABORTED", + "ETIMEDOUT", + "ERR_NETWORK", + "ERR_FR_TOO_MANY_REDIRECTS", + "ERR_DEPRECATED", + "ERR_BAD_RESPONSE", + "ERR_BAD_REQUEST", + "ERR_CANCELED", + "ERR_NOT_SUPPORT", + "ERR_INVALID_URL", + // eslint-disable-next-line func-names + ].forEach((code) => { + descriptors[code] = { + value: code, + }; + }); + Object.defineProperties(AxiosError, descriptors); + Object.defineProperty(prototype, "isAxiosError", { + value: true, + }); + + // eslint-disable-next-line func-names + AxiosError.from = ( + error, + code, + config, + request, + response, + customProps, + ) => { + const axiosError = Object.create(prototype); + _utils.default.toFlatObject( + error, + axiosError, + function filter(obj) { + return obj !== Error.prototype; + }, + (prop) => { + return prop !== "isAxiosError"; + }, + ); + AxiosError.call( + axiosError, + error.message, + code, + config, + request, + response, + ); + axiosError.cause = error; + axiosError.name = error.name; + customProps && Object.assign(axiosError, customProps); + return axiosError; + }; + var _default = (exports.default = AxiosError); + }, + { "../utils.js": 50 }, + ], + 17: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = void 0; + var _utils = _interopRequireDefault(require("../utils.js")); + var _parseHeaders = _interopRequireDefault( + require("../helpers/parseHeaders.js"), + ); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + const $internals = Symbol("internals"); + function normalizeHeader(header) { + return header && String(header).trim().toLowerCase(); + } + function normalizeValue(value) { + if (value === false || value == null) { + return value; + } + return _utils.default.isArray(value) + ? value.map(normalizeValue) + : String(value); + } + function parseTokens(str) { + const tokens = Object.create(null); + const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; + let match; + while ((match = tokensRE.exec(str))) { + tokens[match[1]] = match[2]; + } + return tokens; + } + const isValidHeaderName = (str) => + /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); + function matchHeaderValue( + context, + value, + header, + filter, + isHeaderNameFilter, + ) { + if (_utils.default.isFunction(filter)) { + return filter.call(this, value, header); + } + if (isHeaderNameFilter) { + value = header; + } + if (!_utils.default.isString(value)) return; + if (_utils.default.isString(filter)) { + return value.indexOf(filter) !== -1; + } + if (_utils.default.isRegExp(filter)) { + return filter.test(value); + } + } + function formatHeader(header) { + return header + .trim() + .toLowerCase() + .replace(/([a-z\d])(\w*)/g, (w, char, str) => { + return char.toUpperCase() + str; + }); + } + function buildAccessors(obj, header) { + const accessorName = _utils.default.toCamelCase(" " + header); + ["get", "set", "has"].forEach((methodName) => { + Object.defineProperty(obj, methodName + accessorName, { + value: function (arg1, arg2, arg3) { + return this[methodName].call(this, header, arg1, arg2, arg3); + }, + configurable: true, + }); + }); + } + class AxiosHeaders { + constructor(headers) { + headers && this.set(headers); + } + set(header, valueOrRewrite, rewrite) { + const self = this; + function setHeader(_value, _header, _rewrite) { + const lHeader = normalizeHeader(_header); + if (!lHeader) { + throw new Error("header name must be a non-empty string"); + } + const key = _utils.default.findKey(self, lHeader); + if ( + !key || + self[key] === undefined || + _rewrite === true || + (_rewrite === undefined && self[key] !== false) + ) { + self[key || _header] = normalizeValue(_value); + } + } + const setHeaders = (headers, _rewrite) => + _utils.default.forEach(headers, (_value, _header) => + setHeader(_value, _header, _rewrite), + ); + if ( + _utils.default.isPlainObject(header) || + header instanceof this.constructor + ) { + setHeaders(header, valueOrRewrite); + } else if ( + _utils.default.isString(header) && + (header = header.trim()) && + !isValidHeaderName(header) + ) { + setHeaders((0, _parseHeaders.default)(header), valueOrRewrite); + } else { + header != null && setHeader(valueOrRewrite, header, rewrite); + } + return this; + } + get(header, parser) { + header = normalizeHeader(header); + if (header) { + const key = _utils.default.findKey(this, header); + if (key) { + const value = this[key]; + if (!parser) { + return value; + } + if (parser === true) { + return parseTokens(value); + } + if (_utils.default.isFunction(parser)) { + return parser.call(this, value, key); + } + if (_utils.default.isRegExp(parser)) { + return parser.exec(value); + } + throw new TypeError("parser must be boolean|regexp|function"); + } + } + } + has(header, matcher) { + header = normalizeHeader(header); + if (header) { + const key = _utils.default.findKey(this, header); + return !!( + key && + this[key] !== undefined && + (!matcher || matchHeaderValue(this, this[key], key, matcher)) + ); + } + return false; + } + delete(header, matcher) { + const self = this; + let deleted = false; + function deleteHeader(_header) { + _header = normalizeHeader(_header); + if (_header) { + const key = _utils.default.findKey(self, _header); + if ( + key && + (!matcher || matchHeaderValue(self, self[key], key, matcher)) + ) { + delete self[key]; + deleted = true; + } + } + } + if (_utils.default.isArray(header)) { + header.forEach(deleteHeader); + } else { + deleteHeader(header); + } + return deleted; + } + clear(matcher) { + const keys = Object.keys(this); + let i = keys.length; + let deleted = false; + while (i--) { + const key = keys[i]; + if ( + !matcher || + matchHeaderValue(this, this[key], key, matcher, true) + ) { + delete this[key]; + deleted = true; + } + } + return deleted; + } + normalize(format) { + const self = this; + const headers = {}; + _utils.default.forEach(this, (value, header) => { + const key = _utils.default.findKey(headers, header); + if (key) { + self[key] = normalizeValue(value); + delete self[header]; + return; + } + const normalized = format + ? formatHeader(header) + : String(header).trim(); + if (normalized !== header) { + delete self[header]; + } + self[normalized] = normalizeValue(value); + headers[normalized] = true; + }); + return this; + } + concat(...targets) { + return this.constructor.concat(this, ...targets); + } + toJSON(asStrings) { + const obj = Object.create(null); + _utils.default.forEach(this, (value, header) => { + value != null && + value !== false && + (obj[header] = + asStrings && _utils.default.isArray(value) + ? value.join(", ") + : value); + }); + return obj; + } + [Symbol.iterator]() { + return Object.entries(this.toJSON())[Symbol.iterator](); + } + toString() { + return Object.entries(this.toJSON()) + .map(([header, value]) => header + ": " + value) + .join("\n"); + } + get [Symbol.toStringTag]() { + return "AxiosHeaders"; + } + static from(thing) { + return thing instanceof this ? thing : new this(thing); + } + static concat(first, ...targets) { + const computed = new this(first); + targets.forEach((target) => computed.set(target)); + return computed; + } + static accessor(header) { + const internals = + (this[$internals] = + this[$internals] = + { + accessors: {}, + }); + const accessors = internals.accessors; + const prototype = this.prototype; + function defineAccessor(_header) { + const lHeader = normalizeHeader(_header); + if (!accessors[lHeader]) { + buildAccessors(prototype, _header); + accessors[lHeader] = true; + } + } + _utils.default.isArray(header) + ? header.forEach(defineAccessor) + : defineAccessor(header); + return this; + } + } + AxiosHeaders.accessor([ + "Content-Type", + "Content-Length", + "Accept", + "Accept-Encoding", + "User-Agent", + "Authorization", + ]); + + // reserved names hotfix + _utils.default.reduceDescriptors( + AxiosHeaders.prototype, + ({ value }, key) => { + let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set` + return { + get: () => value, + set(headerValue) { + this[mapped] = headerValue; + }, + }; + }, + ); + _utils.default.freezeMethods(AxiosHeaders); + var _default = (exports.default = AxiosHeaders); + }, + { "../helpers/parseHeaders.js": 38, "../utils.js": 50 }, + ], + 18: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = void 0; + var _utils = _interopRequireDefault(require("./../utils.js")); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + class InterceptorManager { + constructor() { + this.handlers = []; + } + + /** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * + * @return {Number} An ID used to remove interceptor later + */ + use(fulfilled, rejected, options) { + this.handlers.push({ + fulfilled, + rejected, + synchronous: options ? options.synchronous : false, + runWhen: options ? options.runWhen : null, + }); + return this.handlers.length - 1; + } + + /** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + * + * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise + */ + eject(id) { + if (this.handlers[id]) { + this.handlers[id] = null; + } + } + + /** + * Clear all interceptors from the stack + * + * @returns {void} + */ + clear() { + if (this.handlers) { + this.handlers = []; + } + } + + /** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + * + * @returns {void} + */ + forEach(fn) { + _utils.default.forEach(this.handlers, function forEachHandler(h) { + if (h !== null) { + fn(h); + } + }); + } + } + var _default = (exports.default = InterceptorManager); + }, + { "./../utils.js": 50 }, + ], + 19: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = buildFullPath; + var _isAbsoluteURL = _interopRequireDefault( + require("../helpers/isAbsoluteURL.js"), + ); + var _combineURLs = _interopRequireDefault( + require("../helpers/combineURLs.js"), + ); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + /** + * Creates a new URL by combining the baseURL with the requestedURL, + * only when the requestedURL is not already an absolute URL. + * If the requestURL is absolute, this function returns the requestedURL untouched. + * + * @param {string} baseURL The base URL + * @param {string} requestedURL Absolute or relative URL to combine + * + * @returns {string} The combined full path + */ + function buildFullPath(baseURL, requestedURL) { + if (baseURL && !(0, _isAbsoluteURL.default)(requestedURL)) { + return (0, _combineURLs.default)(baseURL, requestedURL); + } + return requestedURL; + } + }, + { "../helpers/combineURLs.js": 31, "../helpers/isAbsoluteURL.js": 34 }, + ], + 20: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = dispatchRequest; + var _transformData = _interopRequireDefault( + require("./transformData.js"), + ); + var _isCancel = _interopRequireDefault( + require("../cancel/isCancel.js"), + ); + var _index = _interopRequireDefault(require("../defaults/index.js")); + var _CanceledError = _interopRequireDefault( + require("../cancel/CanceledError.js"), + ); + var _AxiosHeaders = _interopRequireDefault( + require("../core/AxiosHeaders.js"), + ); + var _adapters = _interopRequireDefault( + require("../adapters/adapters.js"), + ); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + /** + * Throws a `CanceledError` if cancellation has been requested. + * + * @param {Object} config The config that is to be used for the request + * + * @returns {void} + */ + function throwIfCancellationRequested(config) { + if (config.cancelToken) { + config.cancelToken.throwIfRequested(); + } + if (config.signal && config.signal.aborted) { + throw new _CanceledError.default(null, config); + } + } + + /** + * Dispatch a request to the server using the configured adapter. + * + * @param {object} config The config that is to be used for the request + * + * @returns {Promise} The Promise to be fulfilled + */ + function dispatchRequest(config) { + throwIfCancellationRequested(config); + config.headers = _AxiosHeaders.default.from(config.headers); + + // Transform request data + config.data = _transformData.default.call( + config, + config.transformRequest, + ); + if (["post", "put", "patch"].indexOf(config.method) !== -1) { + config.headers.setContentType( + "application/x-www-form-urlencoded", + false, + ); + } + const adapter = _adapters.default.getAdapter( + config.adapter || _index.default.adapter, + ); + return adapter(config).then( + function onAdapterResolution(response) { + throwIfCancellationRequested(config); + + // Transform response data + response.data = _transformData.default.call( + config, + config.transformResponse, + response, + ); + response.headers = _AxiosHeaders.default.from(response.headers); + return response; + }, + function onAdapterRejection(reason) { + if (!(0, _isCancel.default)(reason)) { + throwIfCancellationRequested(config); + + // Transform response data + if (reason && reason.response) { + reason.response.data = _transformData.default.call( + config, + config.transformResponse, + reason.response, + ); + reason.response.headers = _AxiosHeaders.default.from( + reason.response.headers, + ); + } + } + return Promise.reject(reason); + }, + ); + } + }, + { + "../adapters/adapters.js": 9, + "../cancel/CanceledError.js": 13, + "../cancel/isCancel.js": 14, + "../core/AxiosHeaders.js": 17, + "../defaults/index.js": 24, + "./transformData.js": 23, + }, + ], + 21: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = mergeConfig; + var _utils = _interopRequireDefault(require("../utils.js")); + var _AxiosHeaders = _interopRequireDefault( + require("./AxiosHeaders.js"), + ); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + const headersToObject = (thing) => + thing instanceof _AxiosHeaders.default ? thing.toJSON() : thing; + + /** + * Config-specific merge-function which creates a new config-object + * by merging two configuration objects together. + * + * @param {Object} config1 + * @param {Object} config2 + * + * @returns {Object} New object resulting from merging config2 to config1 + */ + function mergeConfig(config1, config2) { + // eslint-disable-next-line no-param-reassign + config2 = config2 || {}; + const config = {}; + function getMergedValue(target, source, caseless) { + if ( + _utils.default.isPlainObject(target) && + _utils.default.isPlainObject(source) + ) { + return _utils.default.merge.call( + { + caseless, + }, + target, + source, + ); + } else if (_utils.default.isPlainObject(source)) { + return _utils.default.merge({}, source); + } else if (_utils.default.isArray(source)) { + return source.slice(); + } + return source; + } + + // eslint-disable-next-line consistent-return + function mergeDeepProperties(a, b, caseless) { + if (!_utils.default.isUndefined(b)) { + return getMergedValue(a, b, caseless); + } else if (!_utils.default.isUndefined(a)) { + return getMergedValue(undefined, a, caseless); + } + } + + // eslint-disable-next-line consistent-return + function valueFromConfig2(a, b) { + if (!_utils.default.isUndefined(b)) { + return getMergedValue(undefined, b); + } + } + + // eslint-disable-next-line consistent-return + function defaultToConfig2(a, b) { + if (!_utils.default.isUndefined(b)) { + return getMergedValue(undefined, b); + } else if (!_utils.default.isUndefined(a)) { + return getMergedValue(undefined, a); + } + } + + // eslint-disable-next-line consistent-return + function mergeDirectKeys(a, b, prop) { + if (prop in config2) { + return getMergedValue(a, b); + } else if (prop in config1) { + return getMergedValue(undefined, a); + } + } + const mergeMap = { + url: valueFromConfig2, + method: valueFromConfig2, + data: valueFromConfig2, + baseURL: defaultToConfig2, + transformRequest: defaultToConfig2, + transformResponse: defaultToConfig2, + paramsSerializer: defaultToConfig2, + timeout: defaultToConfig2, + timeoutMessage: defaultToConfig2, + withCredentials: defaultToConfig2, + adapter: defaultToConfig2, + responseType: defaultToConfig2, + xsrfCookieName: defaultToConfig2, + xsrfHeaderName: defaultToConfig2, + onUploadProgress: defaultToConfig2, + onDownloadProgress: defaultToConfig2, + decompress: defaultToConfig2, + maxContentLength: defaultToConfig2, + maxBodyLength: defaultToConfig2, + beforeRedirect: defaultToConfig2, + transport: defaultToConfig2, + httpAgent: defaultToConfig2, + httpsAgent: defaultToConfig2, + cancelToken: defaultToConfig2, + socketPath: defaultToConfig2, + responseEncoding: defaultToConfig2, + validateStatus: mergeDirectKeys, + headers: (a, b) => + mergeDeepProperties(headersToObject(a), headersToObject(b), true), + }; + _utils.default.forEach( + Object.keys(Object.assign({}, config1, config2)), + function computeConfigValue(prop) { + const merge = mergeMap[prop] || mergeDeepProperties; + const configValue = merge(config1[prop], config2[prop], prop); + (_utils.default.isUndefined(configValue) && + merge !== mergeDirectKeys) || + (config[prop] = configValue); + }, + ); + return config; + } + }, + { "../utils.js": 50, "./AxiosHeaders.js": 17 }, + ], + 22: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = settle; + var _AxiosError = _interopRequireDefault(require("./AxiosError.js")); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + /** + * Resolve or reject a Promise based on response status. + * + * @param {Function} resolve A function that resolves the promise. + * @param {Function} reject A function that rejects the promise. + * @param {object} response The response. + * + * @returns {object} The response. + */ + function settle(resolve, reject, response) { + const validateStatus = response.config.validateStatus; + if ( + !response.status || + !validateStatus || + validateStatus(response.status) + ) { + resolve(response); + } else { + reject( + new _AxiosError.default( + "Request failed with status code " + response.status, + [ + _AxiosError.default.ERR_BAD_REQUEST, + _AxiosError.default.ERR_BAD_RESPONSE, + ][Math.floor(response.status / 100) - 4], + response.config, + response.request, + response, + ), + ); + } + } + }, + { "./AxiosError.js": 16 }, + ], + 23: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = transformData; + var _utils = _interopRequireDefault(require("./../utils.js")); + var _index = _interopRequireDefault(require("../defaults/index.js")); + var _AxiosHeaders = _interopRequireDefault( + require("../core/AxiosHeaders.js"), + ); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + /** + * Transform the data for a request or a response + * + * @param {Array|Function} fns A single function or Array of functions + * @param {?Object} response The response object + * + * @returns {*} The resulting transformed data + */ + function transformData(fns, response) { + const config = this || _index.default; + const context = response || config; + const headers = _AxiosHeaders.default.from(context.headers); + let data = context.data; + _utils.default.forEach(fns, function transform(fn) { + data = fn.call( + config, + data, + headers.normalize(), + response ? response.status : undefined, + ); + }); + headers.normalize(); + return data; + } + }, + { + "../core/AxiosHeaders.js": 17, + "../defaults/index.js": 24, + "./../utils.js": 50, + }, + ], + 24: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = void 0; + var _utils = _interopRequireDefault(require("../utils.js")); + var _AxiosError = _interopRequireDefault( + require("../core/AxiosError.js"), + ); + var _transitional = _interopRequireDefault( + require("./transitional.js"), + ); + var _toFormData = _interopRequireDefault( + require("../helpers/toFormData.js"), + ); + var _toURLEncodedForm = _interopRequireDefault( + require("../helpers/toURLEncodedForm.js"), + ); + var _index = _interopRequireDefault(require("../platform/index.js")); + var _formDataToJSON = _interopRequireDefault( + require("../helpers/formDataToJSON.js"), + ); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + /** + * It takes a string, tries to parse it, and if it fails, it returns the stringified version + * of the input + * + * @param {any} rawValue - The value to be stringified. + * @param {Function} parser - A function that parses a string into a JavaScript object. + * @param {Function} encoder - A function that takes a value and returns a string. + * + * @returns {string} A stringified version of the rawValue. + */ + function stringifySafely(rawValue, parser, encoder) { + if (_utils.default.isString(rawValue)) { + try { + (parser || JSON.parse)(rawValue); + return _utils.default.trim(rawValue); + } catch (e) { + if (e.name !== "SyntaxError") { + throw e; + } + } + } + return (encoder || JSON.stringify)(rawValue); + } + const defaults = { + transitional: _transitional.default, + adapter: ["xhr", "http"], + transformRequest: [ + function transformRequest(data, headers) { + const contentType = headers.getContentType() || ""; + const hasJSONContentType = + contentType.indexOf("application/json") > -1; + const isObjectPayload = _utils.default.isObject(data); + if (isObjectPayload && _utils.default.isHTMLForm(data)) { + data = new FormData(data); + } + const isFormData = _utils.default.isFormData(data); + if (isFormData) { + if (!hasJSONContentType) { + return data; + } + return hasJSONContentType + ? JSON.stringify((0, _formDataToJSON.default)(data)) + : data; + } + if ( + _utils.default.isArrayBuffer(data) || + _utils.default.isBuffer(data) || + _utils.default.isStream(data) || + _utils.default.isFile(data) || + _utils.default.isBlob(data) + ) { + return data; + } + if (_utils.default.isArrayBufferView(data)) { + return data.buffer; + } + if (_utils.default.isURLSearchParams(data)) { + headers.setContentType( + "application/x-www-form-urlencoded;charset=utf-8", + false, + ); + return data.toString(); + } + let isFileList; + if (isObjectPayload) { + if ( + contentType.indexOf("application/x-www-form-urlencoded") > -1 + ) { + return (0, _toURLEncodedForm.default)( + data, + this.formSerializer, + ).toString(); + } + if ( + (isFileList = _utils.default.isFileList(data)) || + contentType.indexOf("multipart/form-data") > -1 + ) { + const _FormData = this.env && this.env.FormData; + return (0, _toFormData.default)( + isFileList + ? { + "files[]": data, + } + : data, + _FormData && new _FormData(), + this.formSerializer, + ); + } + } + if (isObjectPayload || hasJSONContentType) { + headers.setContentType("application/json", false); + return stringifySafely(data); + } + return data; + }, + ], + transformResponse: [ + function transformResponse(data) { + const transitional = this.transitional || defaults.transitional; + const forcedJSONParsing = + transitional && transitional.forcedJSONParsing; + const JSONRequested = this.responseType === "json"; + if ( + data && + _utils.default.isString(data) && + ((forcedJSONParsing && !this.responseType) || JSONRequested) + ) { + const silentJSONParsing = + transitional && transitional.silentJSONParsing; + const strictJSONParsing = !silentJSONParsing && JSONRequested; + try { + return JSON.parse(data); + } catch (e) { + if (strictJSONParsing) { + if (e.name === "SyntaxError") { + throw _AxiosError.default.from( + e, + _AxiosError.default.ERR_BAD_RESPONSE, + this, + null, + this.response, + ); + } + throw e; + } + } + } + return data; + }, + ], + /** + * A timeout in milliseconds to abort a request. If set to 0 (default) a + * timeout is not created. + */ + timeout: 0, + xsrfCookieName: "XSRF-TOKEN", + xsrfHeaderName: "X-XSRF-TOKEN", + maxContentLength: -1, + maxBodyLength: -1, + env: { + FormData: _index.default.classes.FormData, + Blob: _index.default.classes.Blob, + }, + validateStatus: function validateStatus(status) { + return status >= 200 && status < 300; + }, + headers: { + common: { + Accept: "application/json, text/plain, */*", + "Content-Type": undefined, + }, + }, + }; + _utils.default.forEach( + ["delete", "get", "head", "post", "put", "patch"], + (method) => { + defaults.headers[method] = {}; + }, + ); + var _default = (exports.default = defaults); + }, + { + "../core/AxiosError.js": 16, + "../helpers/formDataToJSON.js": 33, + "../helpers/toFormData.js": 42, + "../helpers/toURLEncodedForm.js": 43, + "../platform/index.js": 49, + "../utils.js": 50, + "./transitional.js": 25, + }, + ], + 25: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = void 0; + var _default = (exports.default = { + silentJSONParsing: true, + forcedJSONParsing: true, + clarifyTimeoutError: false, + }); + }, + {}, + ], + 26: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.VERSION = void 0; + const VERSION = (exports.VERSION = "1.5.1"); + }, + {}, + ], + 27: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = void 0; + var _toFormData = _interopRequireDefault(require("./toFormData.js")); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + /** + * It encodes a string by replacing all characters that are not in the unreserved set with + * their percent-encoded equivalents + * + * @param {string} str - The string to encode. + * + * @returns {string} The encoded string. + */ + function encode(str) { + const charMap = { + "!": "%21", + "'": "%27", + "(": "%28", + ")": "%29", + "~": "%7E", + "%20": "+", + "%00": "\x00", + }; + return encodeURIComponent(str).replace( + /[!'()~]|%20|%00/g, + function replacer(match) { + return charMap[match]; + }, + ); + } + + /** + * It takes a params object and converts it to a FormData object + * + * @param {Object} params - The parameters to be converted to a FormData object. + * @param {Object} options - The options object passed to the Axios constructor. + * + * @returns {void} + */ + function AxiosURLSearchParams(params, options) { + this._pairs = []; + params && (0, _toFormData.default)(params, this, options); + } + const prototype = AxiosURLSearchParams.prototype; + prototype.append = function append(name, value) { + this._pairs.push([name, value]); + }; + prototype.toString = function toString(encoder) { + const _encode = encoder + ? function (value) { + return encoder.call(this, value, encode); + } + : encode; + return this._pairs + .map(function each(pair) { + return _encode(pair[0]) + "=" + _encode(pair[1]); + }, "") + .join("&"); + }; + var _default = (exports.default = AxiosURLSearchParams); + }, + { "./toFormData.js": 42 }, + ], + 28: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = void 0; + const HttpStatusCode = { + Continue: 100, + SwitchingProtocols: 101, + Processing: 102, + EarlyHints: 103, + Ok: 200, + Created: 201, + Accepted: 202, + NonAuthoritativeInformation: 203, + NoContent: 204, + ResetContent: 205, + PartialContent: 206, + MultiStatus: 207, + AlreadyReported: 208, + ImUsed: 226, + MultipleChoices: 300, + MovedPermanently: 301, + Found: 302, + SeeOther: 303, + NotModified: 304, + UseProxy: 305, + Unused: 306, + TemporaryRedirect: 307, + PermanentRedirect: 308, + BadRequest: 400, + Unauthorized: 401, + PaymentRequired: 402, + Forbidden: 403, + NotFound: 404, + MethodNotAllowed: 405, + NotAcceptable: 406, + ProxyAuthenticationRequired: 407, + RequestTimeout: 408, + Conflict: 409, + Gone: 410, + LengthRequired: 411, + PreconditionFailed: 412, + PayloadTooLarge: 413, + UriTooLong: 414, + UnsupportedMediaType: 415, + RangeNotSatisfiable: 416, + ExpectationFailed: 417, + ImATeapot: 418, + MisdirectedRequest: 421, + UnprocessableEntity: 422, + Locked: 423, + FailedDependency: 424, + TooEarly: 425, + UpgradeRequired: 426, + PreconditionRequired: 428, + TooManyRequests: 429, + RequestHeaderFieldsTooLarge: 431, + UnavailableForLegalReasons: 451, + InternalServerError: 500, + NotImplemented: 501, + BadGateway: 502, + ServiceUnavailable: 503, + GatewayTimeout: 504, + HttpVersionNotSupported: 505, + VariantAlsoNegotiates: 506, + InsufficientStorage: 507, + LoopDetected: 508, + NotExtended: 510, + NetworkAuthenticationRequired: 511, + }; + Object.entries(HttpStatusCode).forEach(([key, value]) => { + HttpStatusCode[value] = key; + }); + var _default = (exports.default = HttpStatusCode); + }, + {}, + ], + 29: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = bind; + function bind(fn, thisArg) { + return function wrap() { + return fn.apply(thisArg, arguments); + }; + } + }, + {}, + ], + 30: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = buildURL; + var _utils = _interopRequireDefault(require("../utils.js")); + var _AxiosURLSearchParams = _interopRequireDefault( + require("../helpers/AxiosURLSearchParams.js"), + ); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + /** + * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their + * URI encoded counterparts + * + * @param {string} val The value to be encoded. + * + * @returns {string} The encoded value. + */ + function encode(val) { + return encodeURIComponent(val) + .replace(/%3A/gi, ":") + .replace(/%24/g, "$") + .replace(/%2C/gi, ",") + .replace(/%20/g, "+") + .replace(/%5B/gi, "[") + .replace(/%5D/gi, "]"); + } + + /** + * Build a URL by appending params to the end + * + * @param {string} url The base of the url (e.g., http://www.google.com) + * @param {object} [params] The params to be appended + * @param {?object} options + * + * @returns {string} The formatted url + */ + function buildURL(url, params, options) { + /*eslint no-param-reassign:0*/ + if (!params) { + return url; + } + const _encode = (options && options.encode) || encode; + const serializeFn = options && options.serialize; + let serializedParams; + if (serializeFn) { + serializedParams = serializeFn(params, options); + } else { + serializedParams = _utils.default.isURLSearchParams(params) + ? params.toString() + : new _AxiosURLSearchParams.default(params, options).toString( + _encode, + ); + } + if (serializedParams) { + const hashmarkIndex = url.indexOf("#"); + if (hashmarkIndex !== -1) { + url = url.slice(0, hashmarkIndex); + } + url += (url.indexOf("?") === -1 ? "?" : "&") + serializedParams; + } + return url; + } + }, + { "../helpers/AxiosURLSearchParams.js": 27, "../utils.js": 50 }, + ], + 31: [ + function (require, module, exports) { + "use strict"; + + /** + * Creates a new URL by combining the specified URLs + * + * @param {string} baseURL The base URL + * @param {string} relativeURL The relative URL + * + * @returns {string} The combined URL + */ + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = combineURLs; + function combineURLs(baseURL, relativeURL) { + return relativeURL + ? baseURL.replace(/\/+$/, "") + + "/" + + relativeURL.replace(/^\/+/, "") + : baseURL; + } + }, + {}, + ], + 32: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = void 0; + var _utils = _interopRequireDefault(require("./../utils.js")); + var _index = _interopRequireDefault(require("../platform/index.js")); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var _default = (exports.default = _index.default.isStandardBrowserEnv + ? // Standard browser envs support document.cookie + (function standardBrowserEnv() { + return { + write: function write( + name, + value, + expires, + path, + domain, + secure, + ) { + const cookie = []; + cookie.push(name + "=" + encodeURIComponent(value)); + if (_utils.default.isNumber(expires)) { + cookie.push("expires=" + new Date(expires).toGMTString()); + } + if (_utils.default.isString(path)) { + cookie.push("path=" + path); + } + if (_utils.default.isString(domain)) { + cookie.push("domain=" + domain); + } + if (secure === true) { + cookie.push("secure"); + } + document.cookie = cookie.join("; "); + }, + read: function read(name) { + const match = document.cookie.match( + new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"), + ); + return match ? decodeURIComponent(match[3]) : null; + }, + remove: function remove(name) { + this.write(name, "", Date.now() - 86400000); + }, + }; + })() + : // Non standard browser env (web workers, react-native) lack needed support. + (function nonStandardBrowserEnv() { + return { + write: function write() {}, + read: function read() { + return null; + }, + remove: function remove() {}, + }; + })()); + }, + { "../platform/index.js": 49, "./../utils.js": 50 }, + ], + 33: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = void 0; + var _utils = _interopRequireDefault(require("../utils.js")); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + /** + * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z'] + * + * @param {string} name - The name of the property to get. + * + * @returns An array of strings. + */ + function parsePropPath(name) { + // foo[x][y][z] + // foo.x.y.z + // foo-x-y-z + // foo x y z + return _utils.default.matchAll(/\w+|\[(\w*)]/g, name).map((match) => { + return match[0] === "[]" ? "" : match[1] || match[0]; + }); + } + + /** + * Convert an array to an object. + * + * @param {Array} arr - The array to convert to an object. + * + * @returns An object with the same keys and values as the array. + */ + function arrayToObject(arr) { + const obj = {}; + const keys = Object.keys(arr); + let i; + const len = keys.length; + let key; + for (i = 0; i < len; i++) { + key = keys[i]; + obj[key] = arr[key]; + } + return obj; + } + + /** + * It takes a FormData object and returns a JavaScript object + * + * @param {string} formData The FormData object to convert to JSON. + * + * @returns {Object | null} The converted object. + */ + function formDataToJSON(formData) { + function buildPath(path, value, target, index) { + let name = path[index++]; + const isNumericKey = Number.isFinite(+name); + const isLast = index >= path.length; + name = + !name && _utils.default.isArray(target) ? target.length : name; + if (isLast) { + if (_utils.default.hasOwnProp(target, name)) { + target[name] = [target[name], value]; + } else { + target[name] = value; + } + return !isNumericKey; + } + if (!target[name] || !_utils.default.isObject(target[name])) { + target[name] = []; + } + const result = buildPath(path, value, target[name], index); + if (result && _utils.default.isArray(target[name])) { + target[name] = arrayToObject(target[name]); + } + return !isNumericKey; + } + if ( + _utils.default.isFormData(formData) && + _utils.default.isFunction(formData.entries) + ) { + const obj = {}; + _utils.default.forEachEntry(formData, (name, value) => { + buildPath(parsePropPath(name), value, obj, 0); + }); + return obj; + } + return null; + } + var _default = (exports.default = formDataToJSON); + }, + { "../utils.js": 50 }, + ], + 34: [ + function (require, module, exports) { + "use strict"; + + /** + * Determines whether the specified URL is absolute + * + * @param {string} url The URL to test + * + * @returns {boolean} True if the specified URL is absolute, otherwise false + */ + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = isAbsoluteURL; + function isAbsoluteURL(url) { + // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). + // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed + // by any combination of letters, digits, plus, period, or hyphen. + return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); + } + }, + {}, + ], + 35: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = isAxiosError; + var _utils = _interopRequireDefault(require("./../utils.js")); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + /** + * Determines whether the payload is an error thrown by Axios + * + * @param {*} payload The value to test + * + * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false + */ + function isAxiosError(payload) { + return ( + _utils.default.isObject(payload) && payload.isAxiosError === true + ); + } + }, + { "./../utils.js": 50 }, + ], + 36: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = void 0; + var _utils = _interopRequireDefault(require("./../utils.js")); + var _index = _interopRequireDefault(require("../platform/index.js")); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var _default = (exports.default = _index.default.isStandardBrowserEnv + ? // Standard browser envs have full support of the APIs needed to test + // whether the request URL is of the same origin as current location. + (function standardBrowserEnv() { + const msie = /(msie|trident)/i.test(navigator.userAgent); + const urlParsingNode = document.createElement("a"); + let originURL; + + /** + * Parse a URL to discover it's components + * + * @param {String} url The URL to be parsed + * @returns {Object} + */ + function resolveURL(url) { + let href = url; + if (msie) { + // IE needs attribute set twice to normalize properties + urlParsingNode.setAttribute("href", href); + href = urlParsingNode.href; + } + urlParsingNode.setAttribute("href", href); + + // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils + return { + href: urlParsingNode.href, + protocol: urlParsingNode.protocol + ? urlParsingNode.protocol.replace(/:$/, "") + : "", + host: urlParsingNode.host, + search: urlParsingNode.search + ? urlParsingNode.search.replace(/^\?/, "") + : "", + hash: urlParsingNode.hash + ? urlParsingNode.hash.replace(/^#/, "") + : "", + hostname: urlParsingNode.hostname, + port: urlParsingNode.port, + pathname: + urlParsingNode.pathname.charAt(0) === "/" + ? urlParsingNode.pathname + : "/" + urlParsingNode.pathname, + }; + } + originURL = resolveURL(window.location.href); + + /** + * Determine if a URL shares the same origin as the current location + * + * @param {String} requestURL The URL to test + * @returns {boolean} True if URL shares the same origin, otherwise false + */ + return function isURLSameOrigin(requestURL) { + const parsed = _utils.default.isString(requestURL) + ? resolveURL(requestURL) + : requestURL; + return ( + parsed.protocol === originURL.protocol && + parsed.host === originURL.host + ); + }; + })() + : // Non standard browser envs (web workers, react-native) lack needed support. + (function nonStandardBrowserEnv() { + return function isURLSameOrigin() { + return true; + }; + })()); + }, + { "../platform/index.js": 49, "./../utils.js": 50 }, + ], + 37: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = void 0; + // eslint-disable-next-line strict + var _default = (exports.default = null); + }, + {}, + ], + 38: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = void 0; + var _utils = _interopRequireDefault(require("./../utils.js")); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + // RawAxiosHeaders whose duplicates are ignored by node + // c.f. https://nodejs.org/api/http.html#http_message_headers + const ignoreDuplicateOf = _utils.default.toObjectSet([ + "age", + "authorization", + "content-length", + "content-type", + "etag", + "expires", + "from", + "host", + "if-modified-since", + "if-unmodified-since", + "last-modified", + "location", + "max-forwards", + "proxy-authorization", + "referer", + "retry-after", + "user-agent", + ]); + + /** + * Parse headers into an object + * + * ``` + * Date: Wed, 27 Aug 2014 08:58:49 GMT + * Content-Type: application/json + * Connection: keep-alive + * Transfer-Encoding: chunked + * ``` + * + * @param {String} rawHeaders Headers needing to be parsed + * + * @returns {Object} Headers parsed into an object + */ + var _default = (rawHeaders) => { + const parsed = {}; + let key; + let val; + let i; + rawHeaders && + rawHeaders.split("\n").forEach(function parser(line) { + i = line.indexOf(":"); + key = line.substring(0, i).trim().toLowerCase(); + val = line.substring(i + 1).trim(); + if (!key || (parsed[key] && ignoreDuplicateOf[key])) { + return; + } + if (key === "set-cookie") { + if (parsed[key]) { + parsed[key].push(val); + } else { + parsed[key] = [val]; + } + } else { + parsed[key] = parsed[key] ? parsed[key] + ", " + val : val; + } + }); + return parsed; + }; + exports.default = _default; + }, + { "./../utils.js": 50 }, + ], + 39: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = parseProtocol; + function parseProtocol(url) { + const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url); + return (match && match[1]) || ""; + } + }, + {}, + ], + 40: [ + function (require, module, exports) { + "use strict"; + + /** + * Calculate data maxRate + * @param {Number} [samplesCount= 10] + * @param {Number} [min= 1000] + * @returns {Function} + */ + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = void 0; + function speedometer(samplesCount, min) { + samplesCount = samplesCount || 10; + const bytes = new Array(samplesCount); + const timestamps = new Array(samplesCount); + let head = 0; + let tail = 0; + let firstSampleTS; + min = min !== undefined ? min : 1000; + return function push(chunkLength) { + const now = Date.now(); + const startedAt = timestamps[tail]; + if (!firstSampleTS) { + firstSampleTS = now; + } + bytes[head] = chunkLength; + timestamps[head] = now; + let i = tail; + let bytesCount = 0; + while (i !== head) { + bytesCount += bytes[i++]; + i = i % samplesCount; + } + head = (head + 1) % samplesCount; + if (head === tail) { + tail = (tail + 1) % samplesCount; + } + if (now - firstSampleTS < min) { + return; + } + const passed = startedAt && now - startedAt; + return passed + ? Math.round((bytesCount * 1000) / passed) + : undefined; + }; + } + var _default = (exports.default = speedometer); + }, + {}, + ], + 41: [ + function (require, module, exports) { + "use strict"; + + /** + * Syntactic sugar for invoking a function and expanding an array for arguments. + * + * Common use case would be to use `Function.prototype.apply`. + * + * ```js + * function f(x, y, z) {} + * var args = [1, 2, 3]; + * f.apply(null, args); + * ``` + * + * With `spread` this example can be re-written. + * + * ```js + * spread(function(x, y, z) {})([1, 2, 3]); + * ``` + * + * @param {Function} callback + * + * @returns {Function} + */ + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = spread; + function spread(callback) { + return function wrap(arr) { + return callback.apply(null, arr); + }; + } + }, + {}, + ], + 42: [ + function (require, module, exports) { + (function (Buffer) { + (function () { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = void 0; + var _utils = _interopRequireDefault(require("../utils.js")); + var _AxiosError = _interopRequireDefault( + require("../core/AxiosError.js"), + ); + var _FormData = _interopRequireDefault( + require("../platform/node/classes/FormData.js"), + ); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + // temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored + + /** + * Determines if the given thing is a array or js object. + * + * @param {string} thing - The object or array to be visited. + * + * @returns {boolean} + */ + function isVisitable(thing) { + return ( + _utils.default.isPlainObject(thing) || + _utils.default.isArray(thing) + ); + } + + /** + * It removes the brackets from the end of a string + * + * @param {string} key - The key of the parameter. + * + * @returns {string} the key without the brackets. + */ + function removeBrackets(key) { + return _utils.default.endsWith(key, "[]") + ? key.slice(0, -2) + : key; + } + + /** + * It takes a path, a key, and a boolean, and returns a string + * + * @param {string} path - The path to the current key. + * @param {string} key - The key of the current object being iterated over. + * @param {string} dots - If true, the key will be rendered with dots instead of brackets. + * + * @returns {string} The path to the current key. + */ + function renderKey(path, key, dots) { + if (!path) return key; + return path + .concat(key) + .map(function each(token, i) { + // eslint-disable-next-line no-param-reassign + token = removeBrackets(token); + return !dots && i ? "[" + token + "]" : token; + }) + .join(dots ? "." : ""); + } + + /** + * If the array is an array and none of its elements are visitable, then it's a flat array. + * + * @param {Array} arr - The array to check + * + * @returns {boolean} + */ + function isFlatArray(arr) { + return _utils.default.isArray(arr) && !arr.some(isVisitable); + } + const predicates = _utils.default.toFlatObject( + _utils.default, + {}, + null, + function filter(prop) { + return /^is[A-Z]/.test(prop); + }, + ); + + /** + * Convert a data object to FormData + * + * @param {Object} obj + * @param {?Object} [formData] + * @param {?Object} [options] + * @param {Function} [options.visitor] + * @param {Boolean} [options.metaTokens = true] + * @param {Boolean} [options.dots = false] + * @param {?Boolean} [options.indexes = false] + * + * @returns {Object} + **/ + + /** + * It converts an object into a FormData object + * + * @param {Object} obj - The object to convert to form data. + * @param {string} formData - The FormData object to append to. + * @param {Object} options + * + * @returns + */ + function toFormData(obj, formData, options) { + if (!_utils.default.isObject(obj)) { + throw new TypeError("target must be an object"); + } + + // eslint-disable-next-line no-param-reassign + formData = formData || new (_FormData.default || FormData)(); + + // eslint-disable-next-line no-param-reassign + options = _utils.default.toFlatObject( + options, + { + metaTokens: true, + dots: false, + indexes: false, + }, + false, + function defined(option, source) { + // eslint-disable-next-line no-eq-null,eqeqeq + return !_utils.default.isUndefined(source[option]); + }, + ); + const metaTokens = options.metaTokens; + // eslint-disable-next-line no-use-before-define + const visitor = options.visitor || defaultVisitor; + const dots = options.dots; + const indexes = options.indexes; + const _Blob = + options.Blob || (typeof Blob !== "undefined" && Blob); + const useBlob = + _Blob && _utils.default.isSpecCompliantForm(formData); + if (!_utils.default.isFunction(visitor)) { + throw new TypeError("visitor must be a function"); + } + function convertValue(value) { + if (value === null) return ""; + if (_utils.default.isDate(value)) { + return value.toISOString(); + } + if (!useBlob && _utils.default.isBlob(value)) { + throw new _AxiosError.default( + "Blob is not supported. Use a Buffer instead.", + ); + } + if ( + _utils.default.isArrayBuffer(value) || + _utils.default.isTypedArray(value) + ) { + return useBlob && typeof Blob === "function" + ? new Blob([value]) + : Buffer.from(value); + } + return value; + } + + /** + * Default visitor. + * + * @param {*} value + * @param {String|Number} key + * @param {Array} path + * @this {FormData} + * + * @returns {boolean} return true to visit the each prop of the value recursively + */ + function defaultVisitor(value, key, path) { + let arr = value; + if (value && !path && typeof value === "object") { + if (_utils.default.endsWith(key, "{}")) { + // eslint-disable-next-line no-param-reassign + key = metaTokens ? key : key.slice(0, -2); + // eslint-disable-next-line no-param-reassign + value = JSON.stringify(value); + } else if ( + (_utils.default.isArray(value) && isFlatArray(value)) || + ((_utils.default.isFileList(value) || + _utils.default.endsWith(key, "[]")) && + (arr = _utils.default.toArray(value))) + ) { + // eslint-disable-next-line no-param-reassign + key = removeBrackets(key); + arr.forEach(function each(el, index) { + !(_utils.default.isUndefined(el) || el === null) && + formData.append( + // eslint-disable-next-line no-nested-ternary + indexes === true + ? renderKey([key], index, dots) + : indexes === null + ? key + : key + "[]", + convertValue(el), + ); + }); + return false; + } + } + if (isVisitable(value)) { + return true; + } + formData.append( + renderKey(path, key, dots), + convertValue(value), + ); + return false; + } + const stack = []; + const exposedHelpers = Object.assign(predicates, { + defaultVisitor, + convertValue, + isVisitable, + }); + function build(value, path) { + if (_utils.default.isUndefined(value)) return; + if (stack.indexOf(value) !== -1) { + throw Error( + "Circular reference detected in " + path.join("."), + ); + } + stack.push(value); + _utils.default.forEach(value, function each(el, key) { + const result = + !(_utils.default.isUndefined(el) || el === null) && + visitor.call( + formData, + el, + _utils.default.isString(key) ? key.trim() : key, + path, + exposedHelpers, + ); + if (result === true) { + build(el, path ? path.concat(key) : [key]); + } + }); + stack.pop(); + } + if (!_utils.default.isObject(obj)) { + throw new TypeError("data must be an object"); + } + build(obj); + return formData; + } + var _default = (exports.default = toFormData); + }).call(this); + }).call(this, require("buffer").Buffer); + }, + { + "../core/AxiosError.js": 16, + "../platform/node/classes/FormData.js": 37, + "../utils.js": 50, + buffer: 52, + }, + ], + 43: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = toURLEncodedForm; + var _utils = _interopRequireDefault(require("../utils.js")); + var _toFormData = _interopRequireDefault(require("./toFormData.js")); + var _index = _interopRequireDefault(require("../platform/index.js")); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + function toURLEncodedForm(data, options) { + return (0, _toFormData.default)( + data, + new _index.default.classes.URLSearchParams(), + Object.assign( + { + visitor: function (value, key, path, helpers) { + if (_index.default.isNode && _utils.default.isBuffer(value)) { + this.append(key, value.toString("base64")); + return false; + } + return helpers.defaultVisitor.apply(this, arguments); + }, + }, + options, + ), + ); + } + }, + { "../platform/index.js": 49, "../utils.js": 50, "./toFormData.js": 42 }, + ], + 44: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = void 0; + var _data = require("../env/data.js"); + var _AxiosError = _interopRequireDefault( + require("../core/AxiosError.js"), + ); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + const validators = {}; + + // eslint-disable-next-line func-names + ["object", "boolean", "number", "function", "string", "symbol"].forEach( + (type, i) => { + validators[type] = function validator(thing) { + return typeof thing === type || "a" + (i < 1 ? "n " : " ") + type; + }; + }, + ); + const deprecatedWarnings = {}; + + /** + * Transitional option validator + * + * @param {function|boolean?} validator - set to false if the transitional option has been removed + * @param {string?} version - deprecated version / removed since version + * @param {string?} message - some message with additional info + * + * @returns {function} + */ + validators.transitional = function transitional( + validator, + version, + message, + ) { + function formatMessage(opt, desc) { + return ( + "[Axios v" + + _data.VERSION + + "] Transitional option '" + + opt + + "'" + + desc + + (message ? ". " + message : "") + ); + } + + // eslint-disable-next-line func-names + return (value, opt, opts) => { + if (validator === false) { + throw new _AxiosError.default( + formatMessage( + opt, + " has been removed" + (version ? " in " + version : ""), + ), + _AxiosError.default.ERR_DEPRECATED, + ); + } + if (version && !deprecatedWarnings[opt]) { + deprecatedWarnings[opt] = true; + // eslint-disable-next-line no-console + console.warn( + formatMessage( + opt, + " has been deprecated since v" + + version + + " and will be removed in the near future", + ), + ); + } + return validator ? validator(value, opt, opts) : true; + }; + }; + + /** + * Assert object's properties type + * + * @param {object} options + * @param {object} schema + * @param {boolean?} allowUnknown + * + * @returns {object} + */ + + function assertOptions(options, schema, allowUnknown) { + if (typeof options !== "object") { + throw new _AxiosError.default( + "options must be an object", + _AxiosError.default.ERR_BAD_OPTION_VALUE, + ); + } + const keys = Object.keys(options); + let i = keys.length; + while (i-- > 0) { + const opt = keys[i]; + const validator = schema[opt]; + if (validator) { + const value = options[opt]; + const result = + value === undefined || validator(value, opt, options); + if (result !== true) { + throw new _AxiosError.default( + "option " + opt + " must be " + result, + _AxiosError.default.ERR_BAD_OPTION_VALUE, + ); + } + continue; + } + if (allowUnknown !== true) { + throw new _AxiosError.default( + "Unknown option " + opt, + _AxiosError.default.ERR_BAD_OPTION, + ); + } + } + } + var _default = (exports.default = { + assertOptions, + validators, + }); + }, + { "../core/AxiosError.js": 16, "../env/data.js": 26 }, + ], + 45: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = void 0; + var _default = (exports.default = + typeof Blob !== "undefined" ? Blob : null); + }, + {}, + ], + 46: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = void 0; + var _default = (exports.default = + typeof FormData !== "undefined" ? FormData : null); + }, + {}, + ], + 47: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = void 0; + var _AxiosURLSearchParams = _interopRequireDefault( + require("../../../helpers/AxiosURLSearchParams.js"), + ); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + var _default = (exports.default = + typeof URLSearchParams !== "undefined" + ? URLSearchParams + : _AxiosURLSearchParams.default); + }, + { "../../../helpers/AxiosURLSearchParams.js": 27 }, + ], + 48: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = void 0; + var _URLSearchParams = _interopRequireDefault( + require("./classes/URLSearchParams.js"), + ); + var _FormData = _interopRequireDefault( + require("./classes/FormData.js"), + ); + var _Blob = _interopRequireDefault(require("./classes/Blob.js")); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + /** + * Determine if we're running in a standard browser environment + * + * This allows axios to run in a web worker, and react-native. + * Both environments support XMLHttpRequest, but not fully standard globals. + * + * web workers: + * typeof window -> undefined + * typeof document -> undefined + * + * react-native: + * navigator.product -> 'ReactNative' + * nativescript + * navigator.product -> 'NativeScript' or 'NS' + * + * @returns {boolean} + */ + const isStandardBrowserEnv = (() => { + let product; + if ( + typeof navigator !== "undefined" && + ((product = navigator.product) === "ReactNative" || + product === "NativeScript" || + product === "NS") + ) { + return false; + } + return ( + typeof window !== "undefined" && typeof document !== "undefined" + ); + })(); + + /** + * Determine if we're running in a standard browser webWorker environment + * + * Although the `isStandardBrowserEnv` method indicates that + * `allows axios to run in a web worker`, the WebWorker will still be + * filtered out due to its judgment standard + * `typeof window !== 'undefined' && typeof document !== 'undefined'`. + * This leads to a problem when axios post `FormData` in webWorker + */ + const isStandardBrowserWebWorkerEnv = (() => { + return ( + typeof WorkerGlobalScope !== "undefined" && + // eslint-disable-next-line no-undef + self instanceof WorkerGlobalScope && + typeof self.importScripts === "function" + ); + })(); + var _default = (exports.default = { + isBrowser: true, + classes: { + URLSearchParams: _URLSearchParams.default, + FormData: _FormData.default, + Blob: _Blob.default, + }, + isStandardBrowserEnv, + isStandardBrowserWebWorkerEnv, + protocols: ["http", "https", "file", "blob", "url", "data"], + }); + }, + { + "./classes/Blob.js": 45, + "./classes/FormData.js": 46, + "./classes/URLSearchParams.js": 47, + }, + ], + 49: [ + function (require, module, exports) { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + Object.defineProperty(exports, "default", { + enumerable: true, + get: function () { + return _index.default; + }, + }); + var _index = _interopRequireDefault(require("./node/index.js")); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + }, + { "./node/index.js": 48 }, + ], + 50: [ + function (require, module, exports) { + (function (global) { + (function () { + "use strict"; + + Object.defineProperty(exports, "__esModule", { + value: true, + }); + exports.default = void 0; + var _bind = _interopRequireDefault(require("./helpers/bind.js")); + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + // utils is a library of generic helper functions non-specific to axios + + const { toString } = Object.prototype; + const { getPrototypeOf } = Object; + const kindOf = ((cache) => (thing) => { + const str = toString.call(thing); + return ( + cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()) + ); + })(Object.create(null)); + const kindOfTest = (type) => { + type = type.toLowerCase(); + return (thing) => kindOf(thing) === type; + }; + const typeOfTest = (type) => (thing) => typeof thing === type; + + /** + * Determine if a value is an Array + * + * @param {Object} val The value to test + * + * @returns {boolean} True if value is an Array, otherwise false + */ + const { isArray } = Array; + + /** + * Determine if a value is undefined + * + * @param {*} val The value to test + * + * @returns {boolean} True if the value is undefined, otherwise false + */ + const isUndefined = typeOfTest("undefined"); + + /** + * Determine if a value is a Buffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Buffer, otherwise false + */ + function isBuffer(val) { + return ( + val !== null && + !isUndefined(val) && + val.constructor !== null && + !isUndefined(val.constructor) && + isFunction(val.constructor.isBuffer) && + val.constructor.isBuffer(val) + ); + } + + /** + * Determine if a value is an ArrayBuffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is an ArrayBuffer, otherwise false + */ + const isArrayBuffer = kindOfTest("ArrayBuffer"); + + /** + * Determine if a value is a view on an ArrayBuffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false + */ + function isArrayBufferView(val) { + let result; + if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) { + result = ArrayBuffer.isView(val); + } else { + result = val && val.buffer && isArrayBuffer(val.buffer); + } + return result; + } + + /** + * Determine if a value is a String + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a String, otherwise false + */ + const isString = typeOfTest("string"); + + /** + * Determine if a value is a Function + * + * @param {*} val The value to test + * @returns {boolean} True if value is a Function, otherwise false + */ + const isFunction = typeOfTest("function"); + + /** + * Determine if a value is a Number + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Number, otherwise false + */ + const isNumber = typeOfTest("number"); + + /** + * Determine if a value is an Object + * + * @param {*} thing The value to test + * + * @returns {boolean} True if value is an Object, otherwise false + */ + const isObject = (thing) => + thing !== null && typeof thing === "object"; + + /** + * Determine if a value is a Boolean + * + * @param {*} thing The value to test + * @returns {boolean} True if value is a Boolean, otherwise false + */ + const isBoolean = (thing) => thing === true || thing === false; + + /** + * Determine if a value is a plain Object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a plain Object, otherwise false + */ + const isPlainObject = (val) => { + if (kindOf(val) !== "object") { + return false; + } + const prototype = getPrototypeOf(val); + return ( + (prototype === null || + prototype === Object.prototype || + Object.getPrototypeOf(prototype) === null) && + !(Symbol.toStringTag in val) && + !(Symbol.iterator in val) + ); + }; + + /** + * Determine if a value is a Date + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Date, otherwise false + */ + const isDate = kindOfTest("Date"); + + /** + * Determine if a value is a File + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a File, otherwise false + */ + const isFile = kindOfTest("File"); + + /** + * Determine if a value is a Blob + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Blob, otherwise false + */ + const isBlob = kindOfTest("Blob"); + + /** + * Determine if a value is a FileList + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a File, otherwise false + */ + const isFileList = kindOfTest("FileList"); + + /** + * Determine if a value is a Stream + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Stream, otherwise false + */ + const isStream = (val) => isObject(val) && isFunction(val.pipe); + + /** + * Determine if a value is a FormData + * + * @param {*} thing The value to test + * + * @returns {boolean} True if value is an FormData, otherwise false + */ + const isFormData = (thing) => { + let kind; + return ( + thing && + ((typeof FormData === "function" && + thing instanceof FormData) || + (isFunction(thing.append) && + ((kind = kindOf(thing)) === "formdata" || + // detect form-data instance + (kind === "object" && + isFunction(thing.toString) && + thing.toString() === "[object FormData]")))) + ); + }; + + /** + * Determine if a value is a URLSearchParams object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a URLSearchParams object, otherwise false + */ + const isURLSearchParams = kindOfTest("URLSearchParams"); + + /** + * Trim excess whitespace off the beginning and end of a string + * + * @param {String} str The String to trim + * + * @returns {String} The String freed of excess whitespace + */ + const trim = (str) => + str.trim + ? str.trim() + : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); + + /** + * Iterate over an Array or an Object invoking a function for each item. + * + * If `obj` is an Array callback will be called passing + * the value, index, and complete array for each item. + * + * If 'obj' is an Object callback will be called passing + * the value, key, and complete object for each property. + * + * @param {Object|Array} obj The object to iterate + * @param {Function} fn The callback to invoke for each item + * + * @param {Boolean} [allOwnKeys = false] + * @returns {any} + */ + function forEach(obj, fn, { allOwnKeys = false } = {}) { + // Don't bother if no value provided + if (obj === null || typeof obj === "undefined") { + return; + } + let i; + let l; + + // Force an array if not already something iterable + if (typeof obj !== "object") { + /*eslint no-param-reassign:0*/ + obj = [obj]; + } + if (isArray(obj)) { + // Iterate over array values + for (i = 0, l = obj.length; i < l; i++) { + fn.call(null, obj[i], i, obj); + } + } else { + // Iterate over object keys + const keys = allOwnKeys + ? Object.getOwnPropertyNames(obj) + : Object.keys(obj); + const len = keys.length; + let key; + for (i = 0; i < len; i++) { + key = keys[i]; + fn.call(null, obj[key], key, obj); + } + } + } + function findKey(obj, key) { + key = key.toLowerCase(); + const keys = Object.keys(obj); + let i = keys.length; + let _key; + while (i-- > 0) { + _key = keys[i]; + if (key === _key.toLowerCase()) { + return _key; + } + } + return null; + } + const _global = (() => { + /*eslint no-undef:0*/ + if (typeof globalThis !== "undefined") return globalThis; + return typeof self !== "undefined" + ? self + : typeof window !== "undefined" + ? window + : global; + })(); + const isContextDefined = (context) => + !isUndefined(context) && context !== _global; + + /** + * Accepts varargs expecting each argument to be an object, then + * immutably merges the properties of each object and returns result. + * + * When multiple objects contain the same key the later object in + * the arguments list will take precedence. + * + * Example: + * + * ```js + * var result = merge({foo: 123}, {foo: 456}); + * console.log(result.foo); // outputs 456 + * ``` + * + * @param {Object} obj1 Object to merge + * + * @returns {Object} Result of all merge properties + */ + function merge /* obj1, obj2, obj3, ... */() { + const { caseless } = (isContextDefined(this) && this) || {}; + const result = {}; + const assignValue = (val, key) => { + const targetKey = (caseless && findKey(result, key)) || key; + if (isPlainObject(result[targetKey]) && isPlainObject(val)) { + result[targetKey] = merge(result[targetKey], val); + } else if (isPlainObject(val)) { + result[targetKey] = merge({}, val); + } else if (isArray(val)) { + result[targetKey] = val.slice(); + } else { + result[targetKey] = val; + } + }; + for (let i = 0, l = arguments.length; i < l; i++) { + arguments[i] && forEach(arguments[i], assignValue); + } + return result; + } + + /** + * Extends object a by mutably adding to it the properties of object b. + * + * @param {Object} a The object to be extended + * @param {Object} b The object to copy properties from + * @param {Object} thisArg The object to bind function to + * + * @param {Boolean} [allOwnKeys] + * @returns {Object} The resulting value of object a + */ + const extend = (a, b, thisArg, { allOwnKeys } = {}) => { + forEach( + b, + (val, key) => { + if (thisArg && isFunction(val)) { + a[key] = (0, _bind.default)(val, thisArg); + } else { + a[key] = val; + } + }, + { + allOwnKeys, + }, + ); + return a; + }; + + /** + * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) + * + * @param {string} content with BOM + * + * @returns {string} content value without BOM + */ + const stripBOM = (content) => { + if (content.charCodeAt(0) === 0xfeff) { + content = content.slice(1); + } + return content; + }; + + /** + * Inherit the prototype methods from one constructor into another + * @param {function} constructor + * @param {function} superConstructor + * @param {object} [props] + * @param {object} [descriptors] + * + * @returns {void} + */ + const inherits = ( + constructor, + superConstructor, + props, + descriptors, + ) => { + constructor.prototype = Object.create( + superConstructor.prototype, + descriptors, + ); + constructor.prototype.constructor = constructor; + Object.defineProperty(constructor, "super", { + value: superConstructor.prototype, + }); + props && Object.assign(constructor.prototype, props); + }; + + /** + * Resolve object with deep prototype chain to a flat object + * @param {Object} sourceObj source object + * @param {Object} [destObj] + * @param {Function|Boolean} [filter] + * @param {Function} [propFilter] + * + * @returns {Object} + */ + const toFlatObject = (sourceObj, destObj, filter, propFilter) => { + let props; + let i; + let prop; + const merged = {}; + destObj = destObj || {}; + // eslint-disable-next-line no-eq-null,eqeqeq + if (sourceObj == null) return destObj; + do { + props = Object.getOwnPropertyNames(sourceObj); + i = props.length; + while (i-- > 0) { + prop = props[i]; + if ( + (!propFilter || propFilter(prop, sourceObj, destObj)) && + !merged[prop] + ) { + destObj[prop] = sourceObj[prop]; + merged[prop] = true; + } + } + sourceObj = filter !== false && getPrototypeOf(sourceObj); + } while ( + sourceObj && + (!filter || filter(sourceObj, destObj)) && + sourceObj !== Object.prototype + ); + return destObj; + }; + + /** + * Determines whether a string ends with the characters of a specified string + * + * @param {String} str + * @param {String} searchString + * @param {Number} [position= 0] + * + * @returns {boolean} + */ + const endsWith = (str, searchString, position) => { + str = String(str); + if (position === undefined || position > str.length) { + position = str.length; + } + position -= searchString.length; + const lastIndex = str.indexOf(searchString, position); + return lastIndex !== -1 && lastIndex === position; + }; + + /** + * Returns new array from array like object or null if failed + * + * @param {*} [thing] + * + * @returns {?Array} + */ + const toArray = (thing) => { + if (!thing) return null; + if (isArray(thing)) return thing; + let i = thing.length; + if (!isNumber(i)) return null; + const arr = new Array(i); + while (i-- > 0) { + arr[i] = thing[i]; + } + return arr; + }; + + /** + * Checking if the Uint8Array exists and if it does, it returns a function that checks if the + * thing passed in is an instance of Uint8Array + * + * @param {TypedArray} + * + * @returns {Array} + */ + // eslint-disable-next-line func-names + const isTypedArray = ((TypedArray) => { + // eslint-disable-next-line func-names + return (thing) => { + return TypedArray && thing instanceof TypedArray; + }; + })(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array)); + + /** + * For each entry in the object, call the function with the key and value. + * + * @param {Object} obj - The object to iterate over. + * @param {Function} fn - The function to call for each entry. + * + * @returns {void} + */ + const forEachEntry = (obj, fn) => { + const generator = obj && obj[Symbol.iterator]; + const iterator = generator.call(obj); + let result; + while ((result = iterator.next()) && !result.done) { + const pair = result.value; + fn.call(obj, pair[0], pair[1]); + } + }; + + /** + * It takes a regular expression and a string, and returns an array of all the matches + * + * @param {string} regExp - The regular expression to match against. + * @param {string} str - The string to search. + * + * @returns {Array} + */ + const matchAll = (regExp, str) => { + let matches; + const arr = []; + while ((matches = regExp.exec(str)) !== null) { + arr.push(matches); + } + return arr; + }; + + /* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */ + const isHTMLForm = kindOfTest("HTMLFormElement"); + const toCamelCase = (str) => { + return str + .toLowerCase() + .replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) { + return p1.toUpperCase() + p2; + }); + }; + + /* Creating a function that will check if an object has a property. */ + const hasOwnProperty = ( + ({ hasOwnProperty }) => + (obj, prop) => + hasOwnProperty.call(obj, prop) + )(Object.prototype); + + /** + * Determine if a value is a RegExp object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a RegExp object, otherwise false + */ + const isRegExp = kindOfTest("RegExp"); + const reduceDescriptors = (obj, reducer) => { + const descriptors = Object.getOwnPropertyDescriptors(obj); + const reducedDescriptors = {}; + forEach(descriptors, (descriptor, name) => { + let ret; + if ((ret = reducer(descriptor, name, obj)) !== false) { + reducedDescriptors[name] = ret || descriptor; + } + }); + Object.defineProperties(obj, reducedDescriptors); + }; + + /** + * Makes all methods read-only + * @param {Object} obj + */ + + const freezeMethods = (obj) => { + reduceDescriptors(obj, (descriptor, name) => { + // skip restricted props in strict mode + if ( + isFunction(obj) && + ["arguments", "caller", "callee"].indexOf(name) !== -1 + ) { + return false; + } + const value = obj[name]; + if (!isFunction(value)) return; + descriptor.enumerable = false; + if ("writable" in descriptor) { + descriptor.writable = false; + return; + } + if (!descriptor.set) { + descriptor.set = () => { + throw Error( + "Can not rewrite read-only method '" + name + "'", + ); + }; + } + }); + }; + const toObjectSet = (arrayOrString, delimiter) => { + const obj = {}; + const define = (arr) => { + arr.forEach((value) => { + obj[value] = true; + }); + }; + isArray(arrayOrString) + ? define(arrayOrString) + : define(String(arrayOrString).split(delimiter)); + return obj; + }; + const noop = () => {}; + const toFiniteNumber = (value, defaultValue) => { + value = +value; + return Number.isFinite(value) ? value : defaultValue; + }; + const ALPHA = "abcdefghijklmnopqrstuvwxyz"; + const DIGIT = "0123456789"; + const ALPHABET = { + DIGIT, + ALPHA, + ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT, + }; + const generateString = ( + size = 16, + alphabet = ALPHABET.ALPHA_DIGIT, + ) => { + let str = ""; + const { length } = alphabet; + while (size--) { + str += alphabet[(Math.random() * length) | 0]; + } + return str; + }; + + /** + * If the thing is a FormData object, return true, otherwise return false. + * + * @param {unknown} thing - The thing to check. + * + * @returns {boolean} + */ + function isSpecCompliantForm(thing) { + return !!( + thing && + isFunction(thing.append) && + thing[Symbol.toStringTag] === "FormData" && + thing[Symbol.iterator] + ); + } + const toJSONObject = (obj) => { + const stack = new Array(10); + const visit = (source, i) => { + if (isObject(source)) { + if (stack.indexOf(source) >= 0) { + return; + } + if (!("toJSON" in source)) { + stack[i] = source; + const target = isArray(source) ? [] : {}; + forEach(source, (value, key) => { + const reducedValue = visit(value, i + 1); + !isUndefined(reducedValue) && + (target[key] = reducedValue); + }); + stack[i] = undefined; + return target; + } + } + return source; + }; + return visit(obj, 0); + }; + const isAsyncFn = kindOfTest("AsyncFunction"); + const isThenable = (thing) => + thing && + (isObject(thing) || isFunction(thing)) && + isFunction(thing.then) && + isFunction(thing.catch); + var _default = (exports.default = { + isArray, + isArrayBuffer, + isBuffer, + isFormData, + isArrayBufferView, + isString, + isNumber, + isBoolean, + isObject, + isPlainObject, + isUndefined, + isDate, + isFile, + isBlob, + isRegExp, + isFunction, + isStream, + isURLSearchParams, + isTypedArray, + isFileList, + forEach, + merge, + extend, + trim, + stripBOM, + inherits, + toFlatObject, + kindOf, + kindOfTest, + endsWith, + toArray, + forEachEntry, + matchAll, + isHTMLForm, + hasOwnProperty, + hasOwnProp: hasOwnProperty, + // an alias to avoid ESLint no-prototype-builtins detection + reduceDescriptors, + freezeMethods, + toObjectSet, + toCamelCase, + noop, + toFiniteNumber, + findKey, + global: _global, + isContextDefined, + ALPHABET, + generateString, + isSpecCompliantForm, + toJSONObject, + isAsyncFn, + isThenable, + }); + }).call(this); + }).call( + this, + typeof global !== "undefined" + ? global + : typeof self !== "undefined" + ? self + : typeof window !== "undefined" + ? window + : {}, + ); + }, + { "./helpers/bind.js": 29 }, + ], + 51: [ + function (require, module, exports) { + "use strict"; + + exports.byteLength = byteLength; + exports.toByteArray = toByteArray; + exports.fromByteArray = fromByteArray; + + var lookup = []; + var revLookup = []; + var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array; + + var code = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i]; + revLookup[code.charCodeAt(i)] = i; + } + + // Support decoding URL-safe base64 strings, as Node.js does. + // See: https://en.wikipedia.org/wiki/Base64#URL_applications + revLookup["-".charCodeAt(0)] = 62; + revLookup["_".charCodeAt(0)] = 63; + + function getLens(b64) { + var len = b64.length; + + if (len % 4 > 0) { + throw new Error("Invalid string. Length must be a multiple of 4"); + } + + // Trim off extra bytes after placeholder bytes are found + // See: https://github.com/beatgammit/base64-js/issues/42 + var validLen = b64.indexOf("="); + if (validLen === -1) validLen = len; + + var placeHoldersLen = validLen === len ? 0 : 4 - (validLen % 4); + + return [validLen, placeHoldersLen]; + } + + // base64 is 4/3 + up to two characters of the original data + function byteLength(b64) { + var lens = getLens(b64); + var validLen = lens[0]; + var placeHoldersLen = lens[1]; + return ((validLen + placeHoldersLen) * 3) / 4 - placeHoldersLen; + } + + function _byteLength(b64, validLen, placeHoldersLen) { + return ((validLen + placeHoldersLen) * 3) / 4 - placeHoldersLen; + } + + function toByteArray(b64) { + var tmp; + var lens = getLens(b64); + var validLen = lens[0]; + var placeHoldersLen = lens[1]; + + var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)); + + var curByte = 0; + + // if there are placeholders, only get up to the last complete 4 chars + var len = placeHoldersLen > 0 ? validLen - 4 : validLen; + + var i; + for (i = 0; i < len; i += 4) { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)]; + arr[curByte++] = (tmp >> 16) & 0xff; + arr[curByte++] = (tmp >> 8) & 0xff; + arr[curByte++] = tmp & 0xff; + } + + if (placeHoldersLen === 2) { + tmp = + (revLookup[b64.charCodeAt(i)] << 2) | + (revLookup[b64.charCodeAt(i + 1)] >> 4); + arr[curByte++] = tmp & 0xff; + } + + if (placeHoldersLen === 1) { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2); + arr[curByte++] = (tmp >> 8) & 0xff; + arr[curByte++] = tmp & 0xff; + } + + return arr; + } + + function tripletToBase64(num) { + return ( + lookup[(num >> 18) & 0x3f] + + lookup[(num >> 12) & 0x3f] + + lookup[(num >> 6) & 0x3f] + + lookup[num & 0x3f] + ); + } + + function encodeChunk(uint8, start, end) { + var tmp; + var output = []; + for (var i = start; i < end; i += 3) { + tmp = + ((uint8[i] << 16) & 0xff0000) + + ((uint8[i + 1] << 8) & 0xff00) + + (uint8[i + 2] & 0xff); + output.push(tripletToBase64(tmp)); + } + return output.join(""); + } + + function fromByteArray(uint8) { + var tmp; + var len = uint8.length; + var extraBytes = len % 3; // if we have 1 byte left, pad 2 bytes + var parts = []; + var maxChunkLength = 16383; // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for ( + var i = 0, len2 = len - extraBytes; + i < len2; + i += maxChunkLength + ) { + parts.push( + encodeChunk( + uint8, + i, + i + maxChunkLength > len2 ? len2 : i + maxChunkLength, + ), + ); + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1]; + parts.push(lookup[tmp >> 2] + lookup[(tmp << 4) & 0x3f] + "=="); + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1]; + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3f] + + lookup[(tmp << 2) & 0x3f] + + "=", + ); + } + + return parts.join(""); + } + }, + {}, + ], + 52: [ + function (require, module, exports) { + (function (Buffer) { + (function () { + /*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ + /* eslint-disable no-proto */ + + "use strict"; + + var base64 = require("base64-js"); + var ieee754 = require("ieee754"); + + exports.Buffer = Buffer; + exports.SlowBuffer = SlowBuffer; + exports.INSPECT_MAX_BYTES = 50; + + var K_MAX_LENGTH = 0x7fffffff; + exports.kMaxLength = K_MAX_LENGTH; + + /** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Print warning and recommend using `buffer` v4.x which has an Object + * implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * We report that the browser does not support typed arrays if the are not subclassable + * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array` + * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support + * for __proto__ and has a buggy typed array implementation. + */ + Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport(); + + if ( + !Buffer.TYPED_ARRAY_SUPPORT && + typeof console !== "undefined" && + typeof console.error === "function" + ) { + console.error( + "This browser lacks typed array (Uint8Array) support which is required by " + + "`buffer` v5.x. Use `buffer` v4.x if you require old browser support.", + ); + } + + function typedArraySupport() { + // Can typed array instances can be augmented? + try { + var arr = new Uint8Array(1); + arr.__proto__ = { + __proto__: Uint8Array.prototype, + foo: function () { + return 42; + }, + }; + return arr.foo() === 42; + } catch (e) { + return false; + } + } + + Object.defineProperty(Buffer.prototype, "parent", { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined; + return this.buffer; + }, + }); + + Object.defineProperty(Buffer.prototype, "offset", { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined; + return this.byteOffset; + }, + }); + + function createBuffer(length) { + if (length > K_MAX_LENGTH) { + throw new RangeError( + 'The value "' + length + '" is invalid for option "size"', + ); + } + // Return an augmented `Uint8Array` instance + var buf = new Uint8Array(length); + buf.__proto__ = Buffer.prototype; + return buf; + } + + /** + * The Buffer constructor returns instances of `Uint8Array` that have their + * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of + * `Uint8Array`, so the returned instances will have all the node `Buffer` methods + * and the `Uint8Array` methods. Square bracket notation works as expected -- it + * returns a single octet. + * + * The `Uint8Array` prototype remains unmodified. + */ + + function Buffer(arg, encodingOrOffset, length) { + // Common case. + if (typeof arg === "number") { + if (typeof encodingOrOffset === "string") { + throw new TypeError( + 'The "string" argument must be of type string. Received type number', + ); + } + return allocUnsafe(arg); + } + return from(arg, encodingOrOffset, length); + } + + // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 + if ( + typeof Symbol !== "undefined" && + Symbol.species != null && + Buffer[Symbol.species] === Buffer + ) { + Object.defineProperty(Buffer, Symbol.species, { + value: null, + configurable: true, + enumerable: false, + writable: false, + }); + } + + Buffer.poolSize = 8192; // not used by this implementation + + function from(value, encodingOrOffset, length) { + if (typeof value === "string") { + return fromString(value, encodingOrOffset); + } + + if (ArrayBuffer.isView(value)) { + return fromArrayLike(value); + } + + if (value == null) { + throw TypeError( + "The first argument must be one of type string, Buffer, ArrayBuffer, Array, " + + "or Array-like Object. Received type " + + typeof value, + ); + } + + if ( + isInstance(value, ArrayBuffer) || + (value && isInstance(value.buffer, ArrayBuffer)) + ) { + return fromArrayBuffer(value, encodingOrOffset, length); + } + + if (typeof value === "number") { + throw new TypeError( + 'The "value" argument must not be of type number. Received type number', + ); + } + + var valueOf = value.valueOf && value.valueOf(); + if (valueOf != null && valueOf !== value) { + return Buffer.from(valueOf, encodingOrOffset, length); + } + + var b = fromObject(value); + if (b) return b; + + if ( + typeof Symbol !== "undefined" && + Symbol.toPrimitive != null && + typeof value[Symbol.toPrimitive] === "function" + ) { + return Buffer.from( + value[Symbol.toPrimitive]("string"), + encodingOrOffset, + length, + ); + } + + throw new TypeError( + "The first argument must be one of type string, Buffer, ArrayBuffer, Array, " + + "or Array-like Object. Received type " + + typeof value, + ); + } + + /** + * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError + * if value is a number. + * Buffer.from(str[, encoding]) + * Buffer.from(array) + * Buffer.from(buffer) + * Buffer.from(arrayBuffer[, byteOffset[, length]]) + **/ + Buffer.from = function (value, encodingOrOffset, length) { + return from(value, encodingOrOffset, length); + }; + + // Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: + // https://github.com/feross/buffer/pull/148 + Buffer.prototype.__proto__ = Uint8Array.prototype; + Buffer.__proto__ = Uint8Array; + + function assertSize(size) { + if (typeof size !== "number") { + throw new TypeError('"size" argument must be of type number'); + } else if (size < 0) { + throw new RangeError( + 'The value "' + size + '" is invalid for option "size"', + ); + } + } + + function alloc(size, fill, encoding) { + assertSize(size); + if (size <= 0) { + return createBuffer(size); + } + if (fill !== undefined) { + // Only pay attention to encoding if it's a string. This + // prevents accidentally sending in a number that would + // be interpretted as a start offset. + return typeof encoding === "string" + ? createBuffer(size).fill(fill, encoding) + : createBuffer(size).fill(fill); + } + return createBuffer(size); + } + + /** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ + Buffer.alloc = function (size, fill, encoding) { + return alloc(size, fill, encoding); + }; + + function allocUnsafe(size) { + assertSize(size); + return createBuffer(size < 0 ? 0 : checked(size) | 0); + } + + /** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ + Buffer.allocUnsafe = function (size) { + return allocUnsafe(size); + }; + /** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ + Buffer.allocUnsafeSlow = function (size) { + return allocUnsafe(size); + }; + + function fromString(string, encoding) { + if (typeof encoding !== "string" || encoding === "") { + encoding = "utf8"; + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError("Unknown encoding: " + encoding); + } + + var length = byteLength(string, encoding) | 0; + var buf = createBuffer(length); + + var actual = buf.write(string, encoding); + + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + buf = buf.slice(0, actual); + } + + return buf; + } + + function fromArrayLike(array) { + var length = array.length < 0 ? 0 : checked(array.length) | 0; + var buf = createBuffer(length); + for (var i = 0; i < length; i += 1) { + buf[i] = array[i] & 255; + } + return buf; + } + + function fromArrayBuffer(array, byteOffset, length) { + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('"offset" is outside of buffer bounds'); + } + + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('"length" is outside of buffer bounds'); + } + + var buf; + if (byteOffset === undefined && length === undefined) { + buf = new Uint8Array(array); + } else if (length === undefined) { + buf = new Uint8Array(array, byteOffset); + } else { + buf = new Uint8Array(array, byteOffset, length); + } + + // Return an augmented `Uint8Array` instance + buf.__proto__ = Buffer.prototype; + return buf; + } + + function fromObject(obj) { + if (Buffer.isBuffer(obj)) { + var len = checked(obj.length) | 0; + var buf = createBuffer(len); + + if (buf.length === 0) { + return buf; + } + + obj.copy(buf, 0, 0, len); + return buf; + } + + if (obj.length !== undefined) { + if (typeof obj.length !== "number" || numberIsNaN(obj.length)) { + return createBuffer(0); + } + return fromArrayLike(obj); + } + + if (obj.type === "Buffer" && Array.isArray(obj.data)) { + return fromArrayLike(obj.data); + } + } + + function checked(length) { + // Note: cannot use `length < K_MAX_LENGTH` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= K_MAX_LENGTH) { + throw new RangeError( + "Attempt to allocate Buffer larger than maximum " + + "size: 0x" + + K_MAX_LENGTH.toString(16) + + " bytes", + ); + } + return length | 0; + } + + function SlowBuffer(length) { + if (+length != length) { + // eslint-disable-line eqeqeq + length = 0; + } + return Buffer.alloc(+length); + } + + Buffer.isBuffer = function isBuffer(b) { + return ( + b != null && b._isBuffer === true && b !== Buffer.prototype + ); // so Buffer.isBuffer(Buffer.prototype) will be false + }; + + Buffer.compare = function compare(a, b) { + if (isInstance(a, Uint8Array)) + a = Buffer.from(a, a.offset, a.byteLength); + if (isInstance(b, Uint8Array)) + b = Buffer.from(b, b.offset, b.byteLength); + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError( + 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array', + ); + } + + if (a === b) return 0; + + var x = a.length; + var y = b.length; + + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i]; + y = b[i]; + break; + } + } + + if (x < y) return -1; + if (y < x) return 1; + return 0; + }; + + Buffer.isEncoding = function isEncoding(encoding) { + switch (String(encoding).toLowerCase()) { + case "hex": + case "utf8": + case "utf-8": + case "ascii": + case "latin1": + case "binary": + case "base64": + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return true; + default: + return false; + } + }; + + Buffer.concat = function concat(list, length) { + if (!Array.isArray(list)) { + throw new TypeError( + '"list" argument must be an Array of Buffers', + ); + } + + if (list.length === 0) { + return Buffer.alloc(0); + } + + var i; + if (length === undefined) { + length = 0; + for (i = 0; i < list.length; ++i) { + length += list[i].length; + } + } + + var buffer = Buffer.allocUnsafe(length); + var pos = 0; + for (i = 0; i < list.length; ++i) { + var buf = list[i]; + if (isInstance(buf, Uint8Array)) { + buf = Buffer.from(buf); + } + if (!Buffer.isBuffer(buf)) { + throw new TypeError( + '"list" argument must be an Array of Buffers', + ); + } + buf.copy(buffer, pos); + pos += buf.length; + } + return buffer; + }; + + function byteLength(string, encoding) { + if (Buffer.isBuffer(string)) { + return string.length; + } + if ( + ArrayBuffer.isView(string) || + isInstance(string, ArrayBuffer) + ) { + return string.byteLength; + } + if (typeof string !== "string") { + throw new TypeError( + 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + + "Received type " + + typeof string, + ); + } + + var len = string.length; + var mustMatch = arguments.length > 2 && arguments[2] === true; + if (!mustMatch && len === 0) return 0; + + // Use a for loop to avoid recursion + var loweredCase = false; + for (;;) { + switch (encoding) { + case "ascii": + case "latin1": + case "binary": + return len; + case "utf8": + case "utf-8": + return utf8ToBytes(string).length; + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return len * 2; + case "hex": + return len >>> 1; + case "base64": + return base64ToBytes(string).length; + default: + if (loweredCase) { + return mustMatch ? -1 : utf8ToBytes(string).length; // assume utf8 + } + encoding = ("" + encoding).toLowerCase(); + loweredCase = true; + } + } + } + Buffer.byteLength = byteLength; + + function slowToString(encoding, start, end) { + var loweredCase = false; + + // No need to verify that "this.length <= MAX_UINT32" since it's a read-only + // property of a typed array. + + // This behaves neither like String nor Uint8Array in that we set start/end + // to their upper/lower bounds if the value passed is out of range. + // undefined is handled specially as per ECMA-262 6th Edition, + // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. + if (start === undefined || start < 0) { + start = 0; + } + // Return early if start > this.length. Done here to prevent potential uint32 + // coercion fail below. + if (start > this.length) { + return ""; + } + + if (end === undefined || end > this.length) { + end = this.length; + } + + if (end <= 0) { + return ""; + } + + // Force coersion to uint32. This will also coerce falsey/NaN values to 0. + end >>>= 0; + start >>>= 0; + + if (end <= start) { + return ""; + } + + if (!encoding) encoding = "utf8"; + + while (true) { + switch (encoding) { + case "hex": + return hexSlice(this, start, end); + + case "utf8": + case "utf-8": + return utf8Slice(this, start, end); + + case "ascii": + return asciiSlice(this, start, end); + + case "latin1": + case "binary": + return latin1Slice(this, start, end); + + case "base64": + return base64Slice(this, start, end); + + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return utf16leSlice(this, start, end); + + default: + if (loweredCase) + throw new TypeError("Unknown encoding: " + encoding); + encoding = (encoding + "").toLowerCase(); + loweredCase = true; + } + } + } + + // This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package) + // to detect a Buffer instance. It's not possible to use `instanceof Buffer` + // reliably in a browserify context because there could be multiple different + // copies of the 'buffer' package in use. This method works even for Buffer + // instances that were created from another copy of the `buffer` package. + // See: https://github.com/feross/buffer/issues/154 + Buffer.prototype._isBuffer = true; + + function swap(b, n, m) { + var i = b[n]; + b[n] = b[m]; + b[m] = i; + } + + Buffer.prototype.swap16 = function swap16() { + var len = this.length; + if (len % 2 !== 0) { + throw new RangeError( + "Buffer size must be a multiple of 16-bits", + ); + } + for (var i = 0; i < len; i += 2) { + swap(this, i, i + 1); + } + return this; + }; + + Buffer.prototype.swap32 = function swap32() { + var len = this.length; + if (len % 4 !== 0) { + throw new RangeError( + "Buffer size must be a multiple of 32-bits", + ); + } + for (var i = 0; i < len; i += 4) { + swap(this, i, i + 3); + swap(this, i + 1, i + 2); + } + return this; + }; + + Buffer.prototype.swap64 = function swap64() { + var len = this.length; + if (len % 8 !== 0) { + throw new RangeError( + "Buffer size must be a multiple of 64-bits", + ); + } + for (var i = 0; i < len; i += 8) { + swap(this, i, i + 7); + swap(this, i + 1, i + 6); + swap(this, i + 2, i + 5); + swap(this, i + 3, i + 4); + } + return this; + }; + + Buffer.prototype.toString = function toString() { + var length = this.length; + if (length === 0) return ""; + if (arguments.length === 0) return utf8Slice(this, 0, length); + return slowToString.apply(this, arguments); + }; + + Buffer.prototype.toLocaleString = Buffer.prototype.toString; + + Buffer.prototype.equals = function equals(b) { + if (!Buffer.isBuffer(b)) + throw new TypeError("Argument must be a Buffer"); + if (this === b) return true; + return Buffer.compare(this, b) === 0; + }; + + Buffer.prototype.inspect = function inspect() { + var str = ""; + var max = exports.INSPECT_MAX_BYTES; + str = this.toString("hex", 0, max) + .replace(/(.{2})/g, "$1 ") + .trim(); + if (this.length > max) str += " ... "; + return ""; + }; + + Buffer.prototype.compare = function compare( + target, + start, + end, + thisStart, + thisEnd, + ) { + if (isInstance(target, Uint8Array)) { + target = Buffer.from(target, target.offset, target.byteLength); + } + if (!Buffer.isBuffer(target)) { + throw new TypeError( + 'The "target" argument must be one of type Buffer or Uint8Array. ' + + "Received type " + + typeof target, + ); + } + + if (start === undefined) { + start = 0; + } + if (end === undefined) { + end = target ? target.length : 0; + } + if (thisStart === undefined) { + thisStart = 0; + } + if (thisEnd === undefined) { + thisEnd = this.length; + } + + if ( + start < 0 || + end > target.length || + thisStart < 0 || + thisEnd > this.length + ) { + throw new RangeError("out of range index"); + } + + if (thisStart >= thisEnd && start >= end) { + return 0; + } + if (thisStart >= thisEnd) { + return -1; + } + if (start >= end) { + return 1; + } + + start >>>= 0; + end >>>= 0; + thisStart >>>= 0; + thisEnd >>>= 0; + + if (this === target) return 0; + + var x = thisEnd - thisStart; + var y = end - start; + var len = Math.min(x, y); + + var thisCopy = this.slice(thisStart, thisEnd); + var targetCopy = target.slice(start, end); + + for (var i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i]; + y = targetCopy[i]; + break; + } + } + + if (x < y) return -1; + if (y < x) return 1; + return 0; + }; + + // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, + // OR the last index of `val` in `buffer` at offset <= `byteOffset`. + // + // Arguments: + // - buffer - a Buffer to search + // - val - a string, Buffer, or number + // - byteOffset - an index into `buffer`; will be clamped to an int32 + // - encoding - an optional encoding, relevant is val is a string + // - dir - true for indexOf, false for lastIndexOf + function bidirectionalIndexOf( + buffer, + val, + byteOffset, + encoding, + dir, + ) { + // Empty buffer means no match + if (buffer.length === 0) return -1; + + // Normalize byteOffset + if (typeof byteOffset === "string") { + encoding = byteOffset; + byteOffset = 0; + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff; + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000; + } + byteOffset = +byteOffset; // Coerce to Number. + if (numberIsNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : buffer.length - 1; + } + + // Normalize byteOffset: negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = buffer.length + byteOffset; + if (byteOffset >= buffer.length) { + if (dir) return -1; + else byteOffset = buffer.length - 1; + } else if (byteOffset < 0) { + if (dir) byteOffset = 0; + else return -1; + } + + // Normalize val + if (typeof val === "string") { + val = Buffer.from(val, encoding); + } + + // Finally, search either indexOf (if dir is true) or lastIndexOf + if (Buffer.isBuffer(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1; + } + return arrayIndexOf(buffer, val, byteOffset, encoding, dir); + } else if (typeof val === "number") { + val = val & 0xff; // Search for a byte value [0-255] + if (typeof Uint8Array.prototype.indexOf === "function") { + if (dir) { + return Uint8Array.prototype.indexOf.call( + buffer, + val, + byteOffset, + ); + } else { + return Uint8Array.prototype.lastIndexOf.call( + buffer, + val, + byteOffset, + ); + } + } + return arrayIndexOf(buffer, [val], byteOffset, encoding, dir); + } + + throw new TypeError("val must be string, number or Buffer"); + } + + function arrayIndexOf(arr, val, byteOffset, encoding, dir) { + var indexSize = 1; + var arrLength = arr.length; + var valLength = val.length; + + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase(); + if ( + encoding === "ucs2" || + encoding === "ucs-2" || + encoding === "utf16le" || + encoding === "utf-16le" + ) { + if (arr.length < 2 || val.length < 2) { + return -1; + } + indexSize = 2; + arrLength /= 2; + valLength /= 2; + byteOffset /= 2; + } + } + + function read(buf, i) { + if (indexSize === 1) { + return buf[i]; + } else { + return buf.readUInt16BE(i * indexSize); + } + } + + var i; + if (dir) { + var foundIndex = -1; + for (i = byteOffset; i < arrLength; i++) { + if ( + read(arr, i) === + read(val, foundIndex === -1 ? 0 : i - foundIndex) + ) { + if (foundIndex === -1) foundIndex = i; + if (i - foundIndex + 1 === valLength) + return foundIndex * indexSize; + } else { + if (foundIndex !== -1) i -= i - foundIndex; + foundIndex = -1; + } + } + } else { + if (byteOffset + valLength > arrLength) + byteOffset = arrLength - valLength; + for (i = byteOffset; i >= 0; i--) { + var found = true; + for (var j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false; + break; + } + } + if (found) return i; + } + } + + return -1; + } + + Buffer.prototype.includes = function includes( + val, + byteOffset, + encoding, + ) { + return this.indexOf(val, byteOffset, encoding) !== -1; + }; + + Buffer.prototype.indexOf = function indexOf( + val, + byteOffset, + encoding, + ) { + return bidirectionalIndexOf( + this, + val, + byteOffset, + encoding, + true, + ); + }; + + Buffer.prototype.lastIndexOf = function lastIndexOf( + val, + byteOffset, + encoding, + ) { + return bidirectionalIndexOf( + this, + val, + byteOffset, + encoding, + false, + ); + }; + + function hexWrite(buf, string, offset, length) { + offset = Number(offset) || 0; + var remaining = buf.length - offset; + if (!length) { + length = remaining; + } else { + length = Number(length); + if (length > remaining) { + length = remaining; + } + } + + var strLen = string.length; + + if (length > strLen / 2) { + length = strLen / 2; + } + for (var i = 0; i < length; ++i) { + var parsed = parseInt(string.substr(i * 2, 2), 16); + if (numberIsNaN(parsed)) return i; + buf[offset + i] = parsed; + } + return i; + } + + function utf8Write(buf, string, offset, length) { + return blitBuffer( + utf8ToBytes(string, buf.length - offset), + buf, + offset, + length, + ); + } + + function asciiWrite(buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length); + } + + function latin1Write(buf, string, offset, length) { + return asciiWrite(buf, string, offset, length); + } + + function base64Write(buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length); + } + + function ucs2Write(buf, string, offset, length) { + return blitBuffer( + utf16leToBytes(string, buf.length - offset), + buf, + offset, + length, + ); + } + + Buffer.prototype.write = function write( + string, + offset, + length, + encoding, + ) { + // Buffer#write(string) + if (offset === undefined) { + encoding = "utf8"; + length = this.length; + offset = 0; + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === "string") { + encoding = offset; + length = this.length; + offset = 0; + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset >>> 0; + if (isFinite(length)) { + length = length >>> 0; + if (encoding === undefined) encoding = "utf8"; + } else { + encoding = length; + length = undefined; + } + } else { + throw new Error( + "Buffer.write(string, encoding, offset[, length]) is no longer supported", + ); + } + + var remaining = this.length - offset; + if (length === undefined || length > remaining) + length = remaining; + + if ( + (string.length > 0 && (length < 0 || offset < 0)) || + offset > this.length + ) { + throw new RangeError("Attempt to write outside buffer bounds"); + } + + if (!encoding) encoding = "utf8"; + + var loweredCase = false; + for (;;) { + switch (encoding) { + case "hex": + return hexWrite(this, string, offset, length); + + case "utf8": + case "utf-8": + return utf8Write(this, string, offset, length); + + case "ascii": + return asciiWrite(this, string, offset, length); + + case "latin1": + case "binary": + return latin1Write(this, string, offset, length); + + case "base64": + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length); + + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return ucs2Write(this, string, offset, length); + + default: + if (loweredCase) + throw new TypeError("Unknown encoding: " + encoding); + encoding = ("" + encoding).toLowerCase(); + loweredCase = true; + } + } + }; + + Buffer.prototype.toJSON = function toJSON() { + return { + type: "Buffer", + data: Array.prototype.slice.call(this._arr || this, 0), + }; + }; + + function base64Slice(buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf); + } else { + return base64.fromByteArray(buf.slice(start, end)); + } + } + + function utf8Slice(buf, start, end) { + end = Math.min(buf.length, end); + var res = []; + + var i = start; + while (i < end) { + var firstByte = buf[i]; + var codePoint = null; + var bytesPerSequence = + firstByte > 0xef + ? 4 + : firstByte > 0xdf + ? 3 + : firstByte > 0xbf + ? 2 + : 1; + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint; + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte; + } + break; + case 2: + secondByte = buf[i + 1]; + if ((secondByte & 0xc0) === 0x80) { + tempCodePoint = + ((firstByte & 0x1f) << 0x6) | (secondByte & 0x3f); + if (tempCodePoint > 0x7f) { + codePoint = tempCodePoint; + } + } + break; + case 3: + secondByte = buf[i + 1]; + thirdByte = buf[i + 2]; + if ( + (secondByte & 0xc0) === 0x80 && + (thirdByte & 0xc0) === 0x80 + ) { + tempCodePoint = + ((firstByte & 0xf) << 0xc) | + ((secondByte & 0x3f) << 0x6) | + (thirdByte & 0x3f); + if ( + tempCodePoint > 0x7ff && + (tempCodePoint < 0xd800 || tempCodePoint > 0xdfff) + ) { + codePoint = tempCodePoint; + } + } + break; + case 4: + secondByte = buf[i + 1]; + thirdByte = buf[i + 2]; + fourthByte = buf[i + 3]; + if ( + (secondByte & 0xc0) === 0x80 && + (thirdByte & 0xc0) === 0x80 && + (fourthByte & 0xc0) === 0x80 + ) { + tempCodePoint = + ((firstByte & 0xf) << 0x12) | + ((secondByte & 0x3f) << 0xc) | + ((thirdByte & 0x3f) << 0x6) | + (fourthByte & 0x3f); + if ( + tempCodePoint > 0xffff && + tempCodePoint < 0x110000 + ) { + codePoint = tempCodePoint; + } + } + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xfffd; + bytesPerSequence = 1; + } else if (codePoint > 0xffff) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000; + res.push(((codePoint >>> 10) & 0x3ff) | 0xd800); + codePoint = 0xdc00 | (codePoint & 0x3ff); + } + + res.push(codePoint); + i += bytesPerSequence; + } + + return decodeCodePointsArray(res); + } + + // Based on http://stackoverflow.com/a/22747272/680742, the browser with + // the lowest limit is Chrome, with 0x10000 args. + // We go 1 magnitude less, for safety + var MAX_ARGUMENTS_LENGTH = 0x1000; + + function decodeCodePointsArray(codePoints) { + var len = codePoints.length; + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints); // avoid extra slice() + } + + // Decode in chunks to avoid "call stack size exceeded". + var res = ""; + var i = 0; + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, (i += MAX_ARGUMENTS_LENGTH)), + ); + } + return res; + } + + function asciiSlice(buf, start, end) { + var ret = ""; + end = Math.min(buf.length, end); + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7f); + } + return ret; + } + + function latin1Slice(buf, start, end) { + var ret = ""; + end = Math.min(buf.length, end); + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]); + } + return ret; + } + + function hexSlice(buf, start, end) { + var len = buf.length; + + if (!start || start < 0) start = 0; + if (!end || end < 0 || end > len) end = len; + + var out = ""; + for (var i = start; i < end; ++i) { + out += toHex(buf[i]); + } + return out; + } + + function utf16leSlice(buf, start, end) { + var bytes = buf.slice(start, end); + var res = ""; + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256); + } + return res; + } + + Buffer.prototype.slice = function slice(start, end) { + var len = this.length; + start = ~~start; + end = end === undefined ? len : ~~end; + + if (start < 0) { + start += len; + if (start < 0) start = 0; + } else if (start > len) { + start = len; + } + + if (end < 0) { + end += len; + if (end < 0) end = 0; + } else if (end > len) { + end = len; + } + + if (end < start) end = start; + + var newBuf = this.subarray(start, end); + // Return an augmented `Uint8Array` instance + newBuf.__proto__ = Buffer.prototype; + return newBuf; + }; + + /* + * Need to make sure that buffer isn't trying to write out of bounds. + */ + function checkOffset(offset, ext, length) { + if (offset % 1 !== 0 || offset < 0) + throw new RangeError("offset is not uint"); + if (offset + ext > length) + throw new RangeError("Trying to access beyond buffer length"); + } + + Buffer.prototype.readUIntLE = function readUIntLE( + offset, + byteLength, + noAssert, + ) { + offset = offset >>> 0; + byteLength = byteLength >>> 0; + if (!noAssert) checkOffset(offset, byteLength, this.length); + + var val = this[offset]; + var mul = 1; + var i = 0; + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul; + } + + return val; + }; + + Buffer.prototype.readUIntBE = function readUIntBE( + offset, + byteLength, + noAssert, + ) { + offset = offset >>> 0; + byteLength = byteLength >>> 0; + if (!noAssert) { + checkOffset(offset, byteLength, this.length); + } + + var val = this[offset + --byteLength]; + var mul = 1; + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul; + } + + return val; + }; + + Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) checkOffset(offset, 1, this.length); + return this[offset]; + }; + + Buffer.prototype.readUInt16LE = function readUInt16LE( + offset, + noAssert, + ) { + offset = offset >>> 0; + if (!noAssert) checkOffset(offset, 2, this.length); + return this[offset] | (this[offset + 1] << 8); + }; + + Buffer.prototype.readUInt16BE = function readUInt16BE( + offset, + noAssert, + ) { + offset = offset >>> 0; + if (!noAssert) checkOffset(offset, 2, this.length); + return (this[offset] << 8) | this[offset + 1]; + }; + + Buffer.prototype.readUInt32LE = function readUInt32LE( + offset, + noAssert, + ) { + offset = offset >>> 0; + if (!noAssert) checkOffset(offset, 4, this.length); + + return ( + (this[offset] | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + this[offset + 3] * 0x1000000 + ); + }; + + Buffer.prototype.readUInt32BE = function readUInt32BE( + offset, + noAssert, + ) { + offset = offset >>> 0; + if (!noAssert) checkOffset(offset, 4, this.length); + + return ( + this[offset] * 0x1000000 + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) + ); + }; + + Buffer.prototype.readIntLE = function readIntLE( + offset, + byteLength, + noAssert, + ) { + offset = offset >>> 0; + byteLength = byteLength >>> 0; + if (!noAssert) checkOffset(offset, byteLength, this.length); + + var val = this[offset]; + var mul = 1; + var i = 0; + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul; + } + mul *= 0x80; + + if (val >= mul) val -= Math.pow(2, 8 * byteLength); + + return val; + }; + + Buffer.prototype.readIntBE = function readIntBE( + offset, + byteLength, + noAssert, + ) { + offset = offset >>> 0; + byteLength = byteLength >>> 0; + if (!noAssert) checkOffset(offset, byteLength, this.length); + + var i = byteLength; + var mul = 1; + var val = this[offset + --i]; + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul; + } + mul *= 0x80; + + if (val >= mul) val -= Math.pow(2, 8 * byteLength); + + return val; + }; + + Buffer.prototype.readInt8 = function readInt8(offset, noAssert) { + offset = offset >>> 0; + if (!noAssert) checkOffset(offset, 1, this.length); + if (!(this[offset] & 0x80)) return this[offset]; + return (0xff - this[offset] + 1) * -1; + }; + + Buffer.prototype.readInt16LE = function readInt16LE( + offset, + noAssert, + ) { + offset = offset >>> 0; + if (!noAssert) checkOffset(offset, 2, this.length); + var val = this[offset] | (this[offset + 1] << 8); + return val & 0x8000 ? val | 0xffff0000 : val; + }; + + Buffer.prototype.readInt16BE = function readInt16BE( + offset, + noAssert, + ) { + offset = offset >>> 0; + if (!noAssert) checkOffset(offset, 2, this.length); + var val = this[offset + 1] | (this[offset] << 8); + return val & 0x8000 ? val | 0xffff0000 : val; + }; + + Buffer.prototype.readInt32LE = function readInt32LE( + offset, + noAssert, + ) { + offset = offset >>> 0; + if (!noAssert) checkOffset(offset, 4, this.length); + + return ( + this[offset] | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) + ); + }; + + Buffer.prototype.readInt32BE = function readInt32BE( + offset, + noAssert, + ) { + offset = offset >>> 0; + if (!noAssert) checkOffset(offset, 4, this.length); + + return ( + (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3] + ); + }; + + Buffer.prototype.readFloatLE = function readFloatLE( + offset, + noAssert, + ) { + offset = offset >>> 0; + if (!noAssert) checkOffset(offset, 4, this.length); + return ieee754.read(this, offset, true, 23, 4); + }; + + Buffer.prototype.readFloatBE = function readFloatBE( + offset, + noAssert, + ) { + offset = offset >>> 0; + if (!noAssert) checkOffset(offset, 4, this.length); + return ieee754.read(this, offset, false, 23, 4); + }; + + Buffer.prototype.readDoubleLE = function readDoubleLE( + offset, + noAssert, + ) { + offset = offset >>> 0; + if (!noAssert) checkOffset(offset, 8, this.length); + return ieee754.read(this, offset, true, 52, 8); + }; + + Buffer.prototype.readDoubleBE = function readDoubleBE( + offset, + noAssert, + ) { + offset = offset >>> 0; + if (!noAssert) checkOffset(offset, 8, this.length); + return ieee754.read(this, offset, false, 52, 8); + }; + + function checkInt(buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) + throw new TypeError( + '"buffer" argument must be a Buffer instance', + ); + if (value > max || value < min) + throw new RangeError('"value" argument is out of bounds'); + if (offset + ext > buf.length) + throw new RangeError("Index out of range"); + } + + Buffer.prototype.writeUIntLE = function writeUIntLE( + value, + offset, + byteLength, + noAssert, + ) { + value = +value; + offset = offset >>> 0; + byteLength = byteLength >>> 0; + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1; + checkInt(this, value, offset, byteLength, maxBytes, 0); + } + + var mul = 1; + var i = 0; + this[offset] = value & 0xff; + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xff; + } + + return offset + byteLength; + }; + + Buffer.prototype.writeUIntBE = function writeUIntBE( + value, + offset, + byteLength, + noAssert, + ) { + value = +value; + offset = offset >>> 0; + byteLength = byteLength >>> 0; + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1; + checkInt(this, value, offset, byteLength, maxBytes, 0); + } + + var i = byteLength - 1; + var mul = 1; + this[offset + i] = value & 0xff; + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xff; + } + + return offset + byteLength; + }; + + Buffer.prototype.writeUInt8 = function writeUInt8( + value, + offset, + noAssert, + ) { + value = +value; + offset = offset >>> 0; + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0); + this[offset] = value & 0xff; + return offset + 1; + }; + + Buffer.prototype.writeUInt16LE = function writeUInt16LE( + value, + offset, + noAssert, + ) { + value = +value; + offset = offset >>> 0; + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); + this[offset] = value & 0xff; + this[offset + 1] = value >>> 8; + return offset + 2; + }; + + Buffer.prototype.writeUInt16BE = function writeUInt16BE( + value, + offset, + noAssert, + ) { + value = +value; + offset = offset >>> 0; + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); + this[offset] = value >>> 8; + this[offset + 1] = value & 0xff; + return offset + 2; + }; + + Buffer.prototype.writeUInt32LE = function writeUInt32LE( + value, + offset, + noAssert, + ) { + value = +value; + offset = offset >>> 0; + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); + this[offset + 3] = value >>> 24; + this[offset + 2] = value >>> 16; + this[offset + 1] = value >>> 8; + this[offset] = value & 0xff; + return offset + 4; + }; + + Buffer.prototype.writeUInt32BE = function writeUInt32BE( + value, + offset, + noAssert, + ) { + value = +value; + offset = offset >>> 0; + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); + this[offset] = value >>> 24; + this[offset + 1] = value >>> 16; + this[offset + 2] = value >>> 8; + this[offset + 3] = value & 0xff; + return offset + 4; + }; + + Buffer.prototype.writeIntLE = function writeIntLE( + value, + offset, + byteLength, + noAssert, + ) { + value = +value; + offset = offset >>> 0; + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1); + + checkInt(this, value, offset, byteLength, limit - 1, -limit); + } + + var i = 0; + var mul = 1; + var sub = 0; + this[offset] = value & 0xff; + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1; + } + this[offset + i] = (((value / mul) >> 0) - sub) & 0xff; + } + + return offset + byteLength; + }; + + Buffer.prototype.writeIntBE = function writeIntBE( + value, + offset, + byteLength, + noAssert, + ) { + value = +value; + offset = offset >>> 0; + if (!noAssert) { + var limit = Math.pow(2, 8 * byteLength - 1); + + checkInt(this, value, offset, byteLength, limit - 1, -limit); + } + + var i = byteLength - 1; + var mul = 1; + var sub = 0; + this[offset + i] = value & 0xff; + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1; + } + this[offset + i] = (((value / mul) >> 0) - sub) & 0xff; + } + + return offset + byteLength; + }; + + Buffer.prototype.writeInt8 = function writeInt8( + value, + offset, + noAssert, + ) { + value = +value; + offset = offset >>> 0; + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80); + if (value < 0) value = 0xff + value + 1; + this[offset] = value & 0xff; + return offset + 1; + }; + + Buffer.prototype.writeInt16LE = function writeInt16LE( + value, + offset, + noAssert, + ) { + value = +value; + offset = offset >>> 0; + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); + this[offset] = value & 0xff; + this[offset + 1] = value >>> 8; + return offset + 2; + }; + + Buffer.prototype.writeInt16BE = function writeInt16BE( + value, + offset, + noAssert, + ) { + value = +value; + offset = offset >>> 0; + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); + this[offset] = value >>> 8; + this[offset + 1] = value & 0xff; + return offset + 2; + }; + + Buffer.prototype.writeInt32LE = function writeInt32LE( + value, + offset, + noAssert, + ) { + value = +value; + offset = offset >>> 0; + if (!noAssert) + checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); + this[offset] = value & 0xff; + this[offset + 1] = value >>> 8; + this[offset + 2] = value >>> 16; + this[offset + 3] = value >>> 24; + return offset + 4; + }; + + Buffer.prototype.writeInt32BE = function writeInt32BE( + value, + offset, + noAssert, + ) { + value = +value; + offset = offset >>> 0; + if (!noAssert) + checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); + if (value < 0) value = 0xffffffff + value + 1; + this[offset] = value >>> 24; + this[offset + 1] = value >>> 16; + this[offset + 2] = value >>> 8; + this[offset + 3] = value & 0xff; + return offset + 4; + }; + + function checkIEEE754(buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) + throw new RangeError("Index out of range"); + if (offset < 0) throw new RangeError("Index out of range"); + } + + function writeFloat(buf, value, offset, littleEndian, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) { + checkIEEE754( + buf, + value, + offset, + 4, + 3.4028234663852886e38, + -3.4028234663852886e38, + ); + } + ieee754.write(buf, value, offset, littleEndian, 23, 4); + return offset + 4; + } + + Buffer.prototype.writeFloatLE = function writeFloatLE( + value, + offset, + noAssert, + ) { + return writeFloat(this, value, offset, true, noAssert); + }; + + Buffer.prototype.writeFloatBE = function writeFloatBE( + value, + offset, + noAssert, + ) { + return writeFloat(this, value, offset, false, noAssert); + }; + + function writeDouble(buf, value, offset, littleEndian, noAssert) { + value = +value; + offset = offset >>> 0; + if (!noAssert) { + checkIEEE754( + buf, + value, + offset, + 8, + 1.7976931348623157e308, + -1.7976931348623157e308, + ); + } + ieee754.write(buf, value, offset, littleEndian, 52, 8); + return offset + 8; + } + + Buffer.prototype.writeDoubleLE = function writeDoubleLE( + value, + offset, + noAssert, + ) { + return writeDouble(this, value, offset, true, noAssert); + }; + + Buffer.prototype.writeDoubleBE = function writeDoubleBE( + value, + offset, + noAssert, + ) { + return writeDouble(this, value, offset, false, noAssert); + }; + + // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) + Buffer.prototype.copy = function copy( + target, + targetStart, + start, + end, + ) { + if (!Buffer.isBuffer(target)) + throw new TypeError("argument should be a Buffer"); + if (!start) start = 0; + if (!end && end !== 0) end = this.length; + if (targetStart >= target.length) targetStart = target.length; + if (!targetStart) targetStart = 0; + if (end > 0 && end < start) end = start; + + // Copy 0 bytes; we're done + if (end === start) return 0; + if (target.length === 0 || this.length === 0) return 0; + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError("targetStart out of bounds"); + } + if (start < 0 || start >= this.length) + throw new RangeError("Index out of range"); + if (end < 0) throw new RangeError("sourceEnd out of bounds"); + + // Are we oob? + if (end > this.length) end = this.length; + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start; + } + + var len = end - start; + + if ( + this === target && + typeof Uint8Array.prototype.copyWithin === "function" + ) { + // Use built-in when available, missing from IE11 + this.copyWithin(targetStart, start, end); + } else if ( + this === target && + start < targetStart && + targetStart < end + ) { + // descending copy from end + for (var i = len - 1; i >= 0; --i) { + target[i + targetStart] = this[i + start]; + } + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, end), + targetStart, + ); + } + + return len; + }; + + // Usage: + // buffer.fill(number[, offset[, end]]) + // buffer.fill(buffer[, offset[, end]]) + // buffer.fill(string[, offset[, end]][, encoding]) + Buffer.prototype.fill = function fill(val, start, end, encoding) { + // Handle string cases: + if (typeof val === "string") { + if (typeof start === "string") { + encoding = start; + start = 0; + end = this.length; + } else if (typeof end === "string") { + encoding = end; + end = this.length; + } + if (encoding !== undefined && typeof encoding !== "string") { + throw new TypeError("encoding must be a string"); + } + if ( + typeof encoding === "string" && + !Buffer.isEncoding(encoding) + ) { + throw new TypeError("Unknown encoding: " + encoding); + } + if (val.length === 1) { + var code = val.charCodeAt(0); + if ( + (encoding === "utf8" && code < 128) || + encoding === "latin1" + ) { + // Fast path: If `val` fits into a single byte, use that numeric value. + val = code; + } + } + } else if (typeof val === "number") { + val = val & 255; + } + + // Invalid ranges are not set to a default, so can range check early. + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError("Out of range index"); + } + + if (end <= start) { + return this; + } + + start = start >>> 0; + end = end === undefined ? this.length : end >>> 0; + + if (!val) val = 0; + + var i; + if (typeof val === "number") { + for (i = start; i < end; ++i) { + this[i] = val; + } + } else { + var bytes = Buffer.isBuffer(val) + ? val + : Buffer.from(val, encoding); + var len = bytes.length; + if (len === 0) { + throw new TypeError( + 'The value "' + val + '" is invalid for argument "value"', + ); + } + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len]; + } + } + + return this; + }; + + // HELPER FUNCTIONS + // ================ + + var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g; + + function base64clean(str) { + // Node takes equal signs as end of the Base64 encoding + str = str.split("=")[0]; + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = str.trim().replace(INVALID_BASE64_RE, ""); + // Node converts strings with length < 2 to '' + if (str.length < 2) return ""; + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + "="; + } + return str; + } + + function toHex(n) { + if (n < 16) return "0" + n.toString(16); + return n.toString(16); + } + + function utf8ToBytes(string, units) { + units = units || Infinity; + var codePoint; + var length = string.length; + var leadSurrogate = null; + var bytes = []; + + for (var i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i); + + // is surrogate component + if (codePoint > 0xd7ff && codePoint < 0xe000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xdbff) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xef, 0xbf, 0xbd); + continue; + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xef, 0xbf, 0xbd); + continue; + } + + // valid lead + leadSurrogate = codePoint; + + continue; + } + + // 2 leads in a row + if (codePoint < 0xdc00) { + if ((units -= 3) > -1) bytes.push(0xef, 0xbf, 0xbd); + leadSurrogate = codePoint; + continue; + } + + // valid surrogate pair + codePoint = + (((leadSurrogate - 0xd800) << 10) | (codePoint - 0xdc00)) + + 0x10000; + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xef, 0xbf, 0xbd); + } + + leadSurrogate = null; + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break; + bytes.push(codePoint); + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break; + bytes.push( + (codePoint >> 0x6) | 0xc0, + (codePoint & 0x3f) | 0x80, + ); + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break; + bytes.push( + (codePoint >> 0xc) | 0xe0, + ((codePoint >> 0x6) & 0x3f) | 0x80, + (codePoint & 0x3f) | 0x80, + ); + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break; + bytes.push( + (codePoint >> 0x12) | 0xf0, + ((codePoint >> 0xc) & 0x3f) | 0x80, + ((codePoint >> 0x6) & 0x3f) | 0x80, + (codePoint & 0x3f) | 0x80, + ); + } else { + throw new Error("Invalid code point"); + } + } + + return bytes; + } + + function asciiToBytes(str) { + var byteArray = []; + for (var i = 0; i < str.length; ++i) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xff); + } + return byteArray; + } + + function utf16leToBytes(str, units) { + var c, hi, lo; + var byteArray = []; + for (var i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break; + + c = str.charCodeAt(i); + hi = c >> 8; + lo = c % 256; + byteArray.push(lo); + byteArray.push(hi); + } + + return byteArray; + } + + function base64ToBytes(str) { + return base64.toByteArray(base64clean(str)); + } + + function blitBuffer(src, dst, offset, length) { + for (var i = 0; i < length; ++i) { + if (i + offset >= dst.length || i >= src.length) break; + dst[i + offset] = src[i]; + } + return i; + } + + // ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass + // the `instanceof` check but they should be treated as of that type. + // See: https://github.com/feross/buffer/issues/166 + function isInstance(obj, type) { + return ( + obj instanceof type || + (obj != null && + obj.constructor != null && + obj.constructor.name != null && + obj.constructor.name === type.name) + ); + } + function numberIsNaN(obj) { + // For IE11 support + return obj !== obj; // eslint-disable-line no-self-compare + } + }).call(this); + }).call(this, require("buffer").Buffer); + }, + { "base64-js": 51, buffer: 52, ieee754: 53 }, + ], + 53: [ + function (require, module, exports) { + /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ + exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m; + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var nBits = -7; + var i = isLE ? nBytes - 1 : 0; + var d = isLE ? -1 : 1; + var s = buffer[offset + i]; + + i += d; + + e = s & ((1 << -nBits) - 1); + s >>= -nBits; + nBits += eLen; + for ( + ; + nBits > 0; + e = e * 256 + buffer[offset + i], i += d, nBits -= 8 + ) {} + + m = e & ((1 << -nBits) - 1); + e >>= -nBits; + nBits += mLen; + for ( + ; + nBits > 0; + m = m * 256 + buffer[offset + i], i += d, nBits -= 8 + ) {} + + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : (s ? -1 : 1) * Infinity; + } else { + m = m + Math.pow(2, mLen); + e = e - eBias; + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen); + }; + + exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c; + var eLen = nBytes * 8 - mLen - 1; + var eMax = (1 << eLen) - 1; + var eBias = eMax >> 1; + var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0; + var i = isLE ? 0 : nBytes - 1; + var d = isLE ? 1 : -1; + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0; + + value = Math.abs(value); + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0; + e = eMax; + } else { + e = Math.floor(Math.log(value) / Math.LN2); + if (value * (c = Math.pow(2, -e)) < 1) { + e--; + c *= 2; + } + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * Math.pow(2, 1 - eBias); + } + if (value * c >= 2) { + e++; + c /= 2; + } + + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen); + e = e + eBias; + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); + e = 0; + } + } + + for ( + ; + mLen >= 8; + buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8 + ) {} + + e = (e << mLen) | m; + eLen += mLen; + for ( + ; + eLen > 0; + buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8 + ) {} + + buffer[offset + i - d] |= s * 128; + }; + }, + {}, + ], + mfsdk: [ + function (require, module, exports) { + const Users = require("./users"); + const Things = require("./things"); + const Groups = require("./groups"); + const Channels = require("./channels"); + const Certs = require("./certs"); + const Bootstrap = require("./bootstrap"); + const Messages = require("./messages"); + + const defaultUrl = "http://localhost"; + + class SDK { + constructor({ + usersUrl = defaultUrl, + thingsUrl = defaultUrl, + groupsUrl = defaultUrl, + channelsUrl = defaultUrl, + certsUrl = defaultUrl, + bootstrapsUrl = defaultUrl, + readersUrl = defaultUrl, + httpadapterUrl = defaultUrl, + } = {}) { + this.users = new Users(usersUrl); + this.things = new Things(thingsUrl); + this.groups = new Groups(groupsUrl); + this.channels = new Channels(channelsUrl); + this.certs = new Certs(certsUrl); + this.bootstrap = new Bootstrap(bootstrapsUrl); + this.messages = new Messages(readersUrl, httpadapterUrl); + } + } + + // module.exports = SDK; + // Export the SDK class for use in a web browser + if ( + typeof module !== "undefined" && + typeof module.exports !== "undefined" + ) { + module.exports = SDK; // For Node.js + } else { + window.SDK = SDK; // For browsers + } + }, + { + "./bootstrap": 1, + "./certs": 2, + "./channels": 3, + "./groups": 4, + "./messages": 5, + "./things": 6, + "./users": 7, + }, + ], + }, + {}, + [], +); diff --git a/config.toml b/config.toml new file mode 100644 index 00000000..a3722080 --- /dev/null +++ b/config.toml @@ -0,0 +1,16 @@ +raw_output = "" +user_token = "" + +[filter] + limit = "" + offset = "" + topic = "" + +[remotes] + bootstrap_url = "http://localhost:9013" + certs_url = "http://localhost:9019" + http_adapter_url = "http://localhost/http:9016" + reader_url = "http://localhost:9011" + things_url = "http://localhost:9000" + tls_verification = false + users_url = "http://localhost:9002" diff --git a/examples/client/listThings.html b/examples/client/listThings.html new file mode 100644 index 00000000..1b92593f --- /dev/null +++ b/examples/client/listThings.html @@ -0,0 +1,35 @@ + + + + List Things Console + + +

List things Console

+ + + + + + diff --git a/examples/examples.js b/examples/examples.js new file mode 100644 index 00000000..aafe6fcc --- /dev/null +++ b/examples/examples.js @@ -0,0 +1,975 @@ +// Import the SDK class from the mainflux-sdk package +const SDK = require("../mainflux/sdk"); + +const defaultUrl = "http://localhost"; + +const mySdk = new SDK({ + usersUrl: defaultUrl + ":9002", + groupsUrl: defaultUrl + ":9002", + thingsUrl: defaultUrl + ":9000", + channelsUrl: defaultUrl + ":9000", + httpadapterUrl: defaultUrl, + readersUrl: defaultUrl + ":9011", + certsUrl: defaultUrl + ":9019", + bootstrapsUrl: defaultUrl + ":9013", +}); + +//Things.js examples. + +try { + mySdk.things.Create( + { "name": "" }, + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.things.Get( + "", + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.things.CreateBulk( + [{ "name": "" }, { "name": "" }], + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.things.GetAll( + { "offset": 0, "limit": 10 }, + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} +catch (error) { + console.error(error.message); +} + +try { + mySdk.things.Disable( + "", + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} +catch (error) { + console.error(error.message); +} + +try { + mySdk.things.Update( + "", + { "name": "" }, + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} +catch (error) { + console.error(error.message); +} + +try { + mySdk.things.UpdateThingSecret( + "", + { "secret": "" }, + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} +catch (error) { + console.error(error.message); +} + +try { + mySdk.things.UpdateThingTags( + "", + { "tags": ["stheno", "euryale"] }, + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} +catch (error) { + console.error(error.message); +} + +try { + mySdk.things.UpdateThingOwner( + "", + { "owner": "" }, + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} +catch (error) { + console.error(error.message); +} + +try { + mySdk.things.Connect( + "", + "", + ["action"], + "token" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} +catch (error) { + console.error(error.message); +} + +try { + mySdk.things.Disconnect( + [""], + [""], + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} +catch (error) { + console.error(error.message); +} + +try { + mySdk.things.Connects( + ["", ""], + ["", ""], + ["", "", ""], + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} +catch (error) { + console.error(error.message); +} + +try { + mySdk.things.GetByChannel( + "", + { "offset": 0, "limit": 5 }, + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} +catch (error) { + console.error(error.message); +} + +try { + mySdk.things.IdentifyThing({ + "secret": "" + }) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} +catch (error) { + console.error(error.message); +} + +try { + mySdk.things.AuthoriseThing( + "", + "", + "", + "", + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} +catch (error) { + console.error(error.message); +} + +//Users.js + +try { + mySdk.users.Create( + { "name": "", "credentials": { "identity": "", "secret": "" } }, + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.users.Get( + "", + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.users.Login( + { "identity": "", "secret": "" } + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.users.RefreshToken( + "", + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.users.Update( + { "id": "", "name": "" }, + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.users.UpdateUserIdentity( + { "id": "", "identity": "" }, + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.users.UpdateUserTags( + { "id": "", "tags": ["foo", "bar"] }, + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.users.UpdateUserOwner( + { "id": "", "owner": "" }, + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.users.Disable( + { "id": "" }, + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.users.Enable( + { "id": "" }, + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.users.GetAll( + { "offset": 0, "limit": 10 }, + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.users.UpdateUserPassword( + "", "", + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.users.Memberships( + "", + { query_params }, + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.users.AuthoriseUser( + "", + "", + "", + "", + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +//Groups.js + +try { + mySdk.groups.Create( + { "name": "hatshepsut" }, + "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2OTczODcxNjgsImlhdCI6MTY5NzM4NjI2OCwiaWRlbnRpdHkiOiJhZG1pbkBleGFtcGxlLmNvbSIsImlzcyI6ImNsaWVudHMuYXV0aCIsInN1YiI6IjViNDA3MTgzLTEwNGYtNDc2NC04MDYyLTg3ZGQ2MTM5MTA0NiIsInR5cGUiOiJhY2Nlc3MifQ.kPctWq5eR1UdK1bEERlY42O2oqW1TNdA-N4IYQ24lLxdZ6HOGU7vR9FgtXdH0S2XXcSJR3flq8lmsPOB_s9zAA" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.groups.Get( + "", + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.groups.GetAll( + { "offset": 0, "limit": 10 }, + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.groups.Update( + "", + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.groups.Children( + "", + { "offset": 0, "limit": 2, "tree": true }, + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.groups.Parents( + "", + { "offset": 0, "limit": 5 }, + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.groups.Assign( + "", + "", + [""], + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.groups.Unassign( + "", + "", + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.groups.Disable( + "", + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.groups.Members( + "", + { "offset": 0, "limit": 10 }, + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +//Channels.js + +try { + mySdk.channels.Create( + { "name": "" }, + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} +catch (error) { + console.error(error.message); +} + +try { + mySdk.channels.Get( + "", + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} +catch (error) { + console.error(error.message); +} + +try { + mySdk.channels.CreateBulk( + [{ "name": "" }, { "name": "" }], + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} +catch (error) { + console.error(error.message); +} + +try { + mySdk.channels.GetAll( + { "offset": 0, "limit": 10}, + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} +catch (error) { + console.error(error.message); +} + +try { + mySdk.channels.Update( + "", + { "name": "" }, + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} +catch (error) { + console.error(error.message); +} + +try { + mySdk.channels.Disable( + { "id": "" }, + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} +catch (error) { + console.error(error.message); +} + +try { + mySdk.channels.GetByThing( + "", + { "offset": 0, "limit": 5 }, + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} +catch (error) { + console.error(error.message); +} + +//Certs.js + +try { + mySdk.certs.Issue( + "", + "", + "" + ) + .then(result => { + console.log(result); + }) + .catch(error => { + console.error(error); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.certs.ViewByThing( + "", + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.certs.ViewBySerial( + "", + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.certs.Revoke( + "", + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +// Bootstrap.js + +try { + mySdk.bootstrap.Create( + { + "external_id": "", + "external_key": "", + "thing_id": "", + "name": "" + }, + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.bootstrap.Whitelist( + { + "external_id": "", + "external_key": "", + "thing_id": "", + "name": "" + + }, + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +try { + mySdk.bootstrap.Update( + { + "thing_id": "", + "name": "" + }, + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch { + console.error(error.message); +} + +try { + mySdk.bootstrap.View( + "", + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch { + console.error(error.message); +} + +try { + mySdk.bootstrap.UpdateCerts( + "", + "", + "", + "", + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch { + console.error(error.message); +} + +try { + mySdk.bootstrap.Remove( + "", + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch { + console.error(error.message); +} + +try { + mySdk.bootstrap.Bootstrap( + "", + "" + ) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch { + console.error(error.message); +} + +//Messages.js + +try { +mySdk.messages.Send( + "", + '', + "" +) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} + +try { +mySdk.messages.Read( + "", + "" +) + .then(response => { + console.log(response); + }) + .catch(error => { + console.error(error.response.data); + }); +} catch (error) { + console.error(error.message); +} diff --git a/index.js b/index.js new file mode 100644 index 00000000..956b79cd --- /dev/null +++ b/index.js @@ -0,0 +1,3 @@ +const sdk = require("./mainflux/sdk"); + +module.exports = sdk; diff --git a/mainflux/bootstrap.js b/mainflux/bootstrap.js new file mode 100644 index 00000000..704e74c0 --- /dev/null +++ b/mainflux/bootstrap.js @@ -0,0 +1,350 @@ +const axios = require("axios"); + +class Bootstrap { + //Bootstraps API Client + /** + * @class Bootstrap + * Bootstrap is used to manage bootstrap configurations. + * It is used to create, update, view and remove bootstrap configurations. + * It is also used to bootstrap a thing. + * @param {string} bootstraps_url - The url of the bootstraps service. + * @param {string} content_type - The content type of the request. + * @param {string} bootstrapsEndpoint - The endpoint of the bootstraps service which is + * configs. + * @returns {Bootstrap} - Returns a Bootstrap object. + * + */ + constructor(bootstraps_url) { + this.bootstraps_url = bootstraps_url; + this.content_type = "application/json"; + this.bootstrapsEndpoint = "configs"; + } + + Create(config, token) { + //Create a bootstrap configuration + /** + * @class Bootstrap + * Bootstrap is used to manage bootstrap configurations. + * It is used to create, update, view and remove bootstrap configurations. + * It is also used to bootstrap a thing. + * @param {string} bootstraps_url - The url of the bootstraps service. + * @returns {Bootstrap} - Returns a Bootstrap object. + * + */ + const options = { + method: "post", + maxBodyLength: Infinity, + url: `${this.bootstraps_url}/things/${this.bootstrapsEndpoint}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(config), + }; + return axios + .request(options) + .then((_response) => { + return "Configuration added"; + }) + .catch((error) => { + return error.response.data; + }); + } + + ValidateConfigAndToken(config, token){ + //Validate config + if (typeof config !== "object" || config === null) { + throw new Error('Invalid config parameter. Expected an object.'); + } + + // Validate token + if (typeof token !== "string" || token === null) { + throw new Error('Invalid token parameter. Expected a string.'); + } + } + + Create(config, token){ + //Create a bootstrap configuration + /** + * @method Create - Create a new bootstrap configuration. + * Some of the key data needed include the external_key and external_id which must be + * specific to the thing provided with the thing_id. Mind that every configuration + * must have a specific thing_id. + * @param {object} config - The configuration object. + * @param {string} token - The token to be used for authentication. + * @example + * const config = { + * "external_id": "345", + * "external_key": "012", + * "thing_id": "3d49a42f-63fd-491b-9784-adf4b64ef347", + * "name": "thing_name" + * } + */ + + this.ValidateConfigAndToken(config, token); + + const options = { + method: "post", + maxBodyLength: 2000, + url: `${this.bootstraps_url}/things/${this.bootstrapsEndpoint}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(config), + }; + return axios.request(options) + .then((_response) => { + return "Configuration added"; + }) + .catch((error) => { + return error.response.data; + }) + } + + Whitelist(config, token){ + //Update a bootstrap configuration + /** + * @method Whitelist - Allows a logged in user to update a bootstrap configuration. + * This changes the status of the config to whitelisted. + * @param {object} config - The configuration object. + * @param {string} token - The token to be used for authentication. + * @example + * const config = { + * "external_id": "345", + * "external_key": "012", + * "thing_id": "3d49a42f-63fd-491b-9784-adf4b64ef347", + * "name": "thing_name" + * } + */ + + this.ValidateConfigAndToken(config, token); + + const options = { + method: "put", + maxBodyLength: 2000, + url: `${this.bootstraps_url}/things/state/${config["thing_id"]}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(config), + }; + return axios.request(options) + .then((_response) => { + return "Configuration updated"; + }) + .catch((error) => { + return error.response.data; + }) + } + + Update(config, token){ + //Update a bootstrap configuration + /** + * @method Update - Allows a logged in user to update a bootstrap configuration. + * This can change the name of the config and metadata. + * @param {object} config - The configuration object. + * @param {string} token - The token to be used for authentication. + * @example + * const config = { + * "external_id": "345", + * "external_key": "012", + * "thing_id": "3d49a42f-63fd-491b-9784-adf4b64ef347", + * "name": "thing_name" + * } + */ + + this.ValidateConfigAndToken(config, token); + + const options = { + method: "put", + maxBodyLength: 2000, + url: `${this.bootstraps_url}/things/configs/${config["thing_id"]}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(config), + }; + return axios.request(options) + .then((_response) => { + return "Configuration updated"; + }) + .catch((error) => { + return error.response.data; + }) + } + + View(thing_id, token){ + //View a bootstrap configuration + /** + * @method View - Allows a logged in user to view a bootstrap configuration. + * Once provided with the thing_id and a valid token, it returns the configuration object. + * @param {string} thing_id - The thing_id of the configuration to be viewed. + * @param {string} token - The token to be used for authentication. + */ + + if (typeof thing_id !== "string" || thing_id === null) { + throw new Error('Invalid thing_id parameter. Expected a string.'); + } + + this.ValidateConfigAndToken({}, token); + + const options = { + method: "get", + maxBodyLength: 2000, + url: `${this.bootstraps_url}/things/${this.bootstrapsEndpoint}/${thing_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + } + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }) + } + + UpdateCerts(config_id,client_cert,client_key, ca, token){ + //Update certs of a bootstrap configuration + /** + * @method UpdateCerts - Allows a logged in user to update the certs of a bootstrap configuration. + * Update is performed by replacing the current certificate data with values provided in a request payload. + * @param {string} config_id - The config_id of the configuration to be updated. This can also mean the thing_id. + * @param {string} client_cert - The client certificate to be used. + * @param {string} client_key - The client key to be used. + * @param {string} ca - The certificate authority to be used. + * @param {string} token - The token to be used for authentication. + * + */ + + if (typeof config_id !== "string" || + typeof client_cert !== "string" || + typeof client_key !== "string" || + typeof ca !== "string" || + typeof token !== "string" ) { + throw new Error('Invalid parameter types. Expected strings for config_id, client_cert, client_key, ca and token.'); + }; + + const payload = { + "client_cert": client_cert, + "client_key": client_key, + "ca_cert": ca, + } + const options = { + method: "patch", + maxBodyLength: 2000, + url: `${this.bootstraps_url}/configs/certs/${config_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(payload), + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }) + } + + Remove(config_id, token){ + //Remove a bootstrap configuration + /** + * @method Remove - Allows a logged in user to delete a bootstrap configuration. + * @param {string} config_id - The config_id of the configuration to be deleted. + * This can also mean the thing_id. + * @param {string} token - The token to be used for authentication. + * + */ + + if (typeof config_id !== "string" || config_id === null) { + throw new Error('Invalid config_id parameter. Expected a string.'); + } + + this.ValidateConfigAndToken({}, token); + + const options = { + method: "delete", + maxBodyLength: 2000, + url: `${this.bootstraps_url}/things/${this.bootstrapsEndpoint}/${config_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return axios.request(options) + .then((_response) => { + return "Configuration removed"; + }) + .catch((error) => { + return error.response.data; + }) + } + + Bootstrap(external_id, external_key){ + //Retrive a bootstrap configuration + /** + * @method Bootstrap - Retrieves a configuration with given external ID and encrypted external key. + * @param {string} external_id - The external ID of the configuration to be retrieved. + * @param {string} external_key - The encrypted external key of the configuration to be retrieved. + * @return {object} - Returns a config object. + */ + + if (typeof external_id !== "string" || typeof external_key !== "string") { + throw new Error('Invalid type of parameters. Expected strings for external_key and external_id.'); + } + + const options = { + method: "get", + maxBodyLength: 2000, + url: `${this.bootstraps_url}/things/bootstrap/${external_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Thing ${external_key}`, + }, + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }) + } + + Bootstrap(external_id, external_key) { + //Retrive a bootstrap configuration + /** + * @method Bootstrap - Retrieves a configuration with given external ID and encrypted external key. + * @param {string} external_id - The external ID of the configuration to be retrieved. + * @param {string} external_key - The encrypted external key of the configuration to be retrieved. + * @return {object} - Returns a config object. + */ + const options = { + method: "get", + maxBodyLength: Infinity, + url: `${this.bootstraps_url}/things/bootstrap/${external_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Thing ${external_key}`, + }, + }; + return axios + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } +} + +module.exports = Bootstrap; diff --git a/mainflux/certs.js b/mainflux/certs.js new file mode 100644 index 00000000..97acae0a --- /dev/null +++ b/mainflux/certs.js @@ -0,0 +1,204 @@ +// import Errors from "./errors.js"; + +const axios = require("axios"); + +class Certs { + //Certs API Client + /** + *@class Certs - Certs is used to manage certificates. + *It is used to issue, view and revoke certificates. + * @param {string} certs_url - The url of the certs service. + * @param {string} content_type - The content type of the request. + * @param {string} certsEndpoint - The endpoint of the certs service which is certs. + * @returns {Certs} - Returns a Certs object. + */ + constructor(certs_url) { + this.certs_url = certs_url; + this.content_type = "application/json"; + this.certsEndpoint = "certs"; + } + + Issue(thing_id, valid, token) { + //Issue a certificate + /** + *@class Certs - Certs is used to manage certificates. + *It is used to issue, view and revoke certificates. + * @param {string} certs_url - The url of the certs service. + * @returns {Certs} - Returns a Certs object. + */ + constructor(certs_url) { + this.certs_url = certs_url; + this.content_type = "application/json"; + this.certsEndpoint = "certs"; + } + ValidateThingIDAndToken(thing_id, token) { + if (typeof thing_id !== "string" || thing_id === null) { + throw new Error('Invalid thing_id parameter. Expected a string.'); + } + if (typeof token !== "string" || token === null) { + throw new Error('Invalid token parameter. Expected a string.'); + } + } + + Issue(thing_id , valid, token) { + //Issue a certificate + /** + * @method Issue - Issue a certificate to a thing. + * Requires a thing_id and a valid time in hours as well as a token. + * @param {string} thing_id - The thing_id of the thing to be issued a certificate. + * @param {string} valid - The time in hours for which the certificate is valid such as '10h' + * @example + * const certs = { + * "cert_serial": "22:16:df:60:c2:99:bc:c4:9b:1d:fd:71:5e:e9:07:d9:1b:3c:85:1d", + * "client_cert": "-----BEGIN CERTIFICATE-----\nMIIEATCCAumgAwIBAgIUIhbfYMKZvMSbHf1xXukH2Rs8hR0wDQYJKoZIhvcNAQEL1k\n-----END CERTIFICATE-----", + * "client_key": "-----BEGIN RSA PRIVATE KEY-----\nMIIEoQIBAAKCAQEAy9gF84a5s6jlX6hkAPXrLYqvdhe6uygdr6eHfd5erdcdxfgc\n-----END RSA PRIVATE KEY-----", + * "expiration": "2023-09-20T10:02:48Z", + * "thing_id": "3d49a42f-63fd-491b-9784-adf4b64ef347" + * } + */ + + this.ValidateThingIDAndToken(thing_id, token); + + const payload= {"thing_id": thing_id, "ttl": valid}; + const options = { + method: "post", + maxBodyLength: 2000, + url: `${this.certs_url}/${this.certsEndpoint}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(payload), + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }) + } + + ViewByThing(thing_id, token) { + + //View certificates by thing_id + /** + * @method ViewByThing - Allows a logged in user to view a certificate serial once they + * provide a valid connected thing-id and token. + * @param {string} thing_id - The thing_id of the thing whose certificate is to be viewed. + * @param {string} token - The token to be used for authentication. + * + */ + + this.ValidateThingIDAndToken(thing_id, token); + + const options = { + method: "get", + maxBodyLength: 2000, + url: `${this.certs_url}/serials/${thing_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }) + } + + ViewBySerial(cert_id, token) { + //View certificate by cert_id + /** + * @method ViewBySerial - Allows a logged in user to view a certificate once they + * provide a valid cert-id and token. + * @param {string} cert_id - The cert_id of the certificate to be viewed. + * @param {string} token - The token to be used for authentication. + * + */ + + if (typeof cert_id !== "string" || cert_id === null) { + throw new Error('Invalid cert_id parameter. Expected a string.'); + } + + this.ValidateThingIDAndToken('', token); + + const options = { + method: "get", + maxBodyLength: 2000, + url: `${this.certs_url}/${this.certsEndpoint}/${cert_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }) + } + + Revoke(thing_id, token) { + //Revoke a certificate + /** + * @method Revoke - Allows a logged in user to delete a certificate once they + * provide a valid thing-id and token. + * @param {string} thing_id - The thing_id of the certificate to be revoked. + * @param {string} token - The token to be used for authentication. + */ + + this.ValidateThingIDAndToken(thing_id, token); + + const options = { + method: "delete", + maxBodyLength: 2000, + url: `${this.certs_url}/${this.certsEndpoint}/${thing_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return axios.request(options) + .then((_response) => { + return "DELETED"; + }) + .catch((error) => { + return error.response.data; + }) + } + + Revoke(thing_id, token) { + //Revoke a certificate + /** + * @method Revoke - Allows a logged in user to delete a certificate once they + * provide a valid thing-id and token. + * @param {string} thing_id - The thing_id of the certificate to be revoked. + * @param {string} token - The token to be used for authentication. + */ + const options = { + method: "delete", + maxBodyLength: Infinity, + url: `${this.certs_url}/${this.certsEndpoint}/${thing_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return axios + .request(options) + .then((_response) => { + return "DELETED"; + }) + .catch((error) => { + return error.response.data; + }); + } +} + +module.exports = Certs; diff --git a/mainflux/channels.js b/mainflux/channels.js new file mode 100644 index 00000000..efcc7146 --- /dev/null +++ b/mainflux/channels.js @@ -0,0 +1,322 @@ +// import fetch from "node-fetch"; +const axios = require("axios"); + +class Channels { + //Channels API client + /** + * @class Channels - + * Channels API is used for managing Channels. It is used for creating new + * channels, retrieving them, updating them and disabling them + * @param {string} channels_url - URL to the Channels service + * @param {string} content_type - Content type for the requests which is an application + * json + * @param {string} channelsEndpoint - Endpoint for the channels' service. + * @returns {Object} -Channels object + * + */ + constructor(channels_url) { + this.channels_url = channels_url; + this.content_type = "application/json"; + this.channelsEndpoint = "channels"; + } + + Create(channel, token) { + //Creates a new channel + /** + * @class Channels - + * Channels API is used for managing Channels. It is used for creating new + * channels, retrieving them, updating them and disabling them + * @param {string} channels_url - URL to the Channels service. + * @returns {Object} -Channels object + * + */ + constructor(channels_url) { + this.channels_url = channels_url; + this.content_type = "application/json"; + this.channelsEndpoint = "channels"; + } + ValidateChannelChannelIDAndToken(channel, channel_id, token) { + //Validate channel + if (typeof channel !== "object" || channel === null) { + throw new Error('Invalid channel parameter. Expected an object.'); + } + + // Validate channel_id + if (typeof channel_id !== "string" || channel_id === null) { + throw new Error('Invalid channel_id parameter. Expected a string.'); + } + + // Validate token + if (typeof token !== "string" || token === null) { + throw new Error('Invalid token parameter. Expected a string.'); + } + }; + + Create(channel, token) { + //Creates a new channel + /** + * @method Create - Creates new channels when provided with a channel object + * with viable fresh information and a valid token. + * @param {Object} channel - Channel Object with a name and id. + * @param {String} token - An access token that is valid. + * @returns {Object} - User object. + * @example + * const channel = { + * "name": "channelName", + * "description": "long channel description", + * "parent_id": "bb7edb32-2eac-4aad-aebe-ed96fe073879", + * "metadata": { + * "domain": "example.com" + * }, + * "status": "enabled", + * "owner_id": "bb7edb32-2eac-4aad-aebe-ed96fe073879" + * } + * + */ + + this.ValidateChannelChannelIDAndToken(channel, '', token); + + const options = { + method: "post", + maxBodyLength: 2000, + url: `${this.channels_url}/${this.channelsEndpoint}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(channel), + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }) + } + + CreateBulk(channels, token) { + //Creates multiple channels. + /** + * @method Create_bulk - Creates multiple channels when provided with a channel object + * with viable fresh information and a valid token. + * @param {List} channels - Channel Object with a name and id. + * @param {String} token - An access token that is valid. + * @returns {Object} - User object. + * @example + * const channels = [ + * { "name": "channelA", "id": "bb7edb32-2eac-4aad-aebe-ed96fe073879" }, + * { "name": "channelB", "id": "290b0f49-7a57-4b8c-9e4e-fbf17c6ab7d9" } + * ] + */ + + if (!Array.isArray(channels)) { + throw new Error('Invalid parameter. Expected an array for the "channels" parameter.'); + } + + this.ValidateChannelChannelIDAndToken({}, '', token); + + const options = { + method: "post", + maxBodyLength: 2000, + url: `${this.channels_url}/${this.channelsEndpoint}/bulk`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(channels), + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }) + } + + Get(channel_id, token) { + //Retrieves channel with specified id. + /** + * @method Get - Retrieves channel with specified id and a valid token. + * @param {String} channel_id - Channel id. + * @param {String} token - An access token that is valid. + * @returns {Object} - Channel object. + */ + + this.ValidateChannelChannelIDAndToken({}, channel_id, token); + + const options = { + method: "get", + maxBodyLength: 2000, + url: `${this.channels_url}/${this.channelsEndpoint}/${channel_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }) + } + + GetByThing(channel_id, query_params, token) { + //Retrieves list of things connected to specified channel with pagination metadata. + /** + * @method GetByThing - Retrieves list of things connected to specified channel with pagination metadata. + * @param {String} channel_id - Channel id. + * @param {Object} query_params - Query parameters for the request. + * @param {String} token - An access token that is valid. + * @returns {List} - Things list. + */ + + if (typeof query_params !== 'object' || query_params === null || Array.isArray(query_params)) { + throw new Error('Invalid query parameters. Expected an object.'); + }; + + this.ValidateChannelChannelIDAndToken({}, channel_id, token); + + const options = { + method: "get", + maxBodyLength: 2000, + url: `${this.channels_url}/${this.channelsEndpoint}/${channel_id}/things?${new URLSearchParams(query_params).toString()}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }) + } + + GetAll(query_params, token) { + //Provides a list of all channels with pagination metadata. + /** + * @method GetAll - Provides a list of all channels with pagination metadata. + * @param {Object} query_params - Query parameters for the request. + * @param {String} token - An access token that is valid. + * @returns {Object} - Channel Object. + */ + + if (typeof query_params !== 'object' || query_params === null || Array.isArray(query_params)) { + throw new Error('Invalid query parameters. Expected an object.'); + }; + + this.ValidateChannelChannelIDAndToken({}, '', token); + + const options = { + method: "get", + maxBodyLength: 2000, + url: `${this.channels_url}/${this.channelsEndpoint}?${new URLSearchParams(query_params).toString()}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }) + } + + Update(channel_id, channel, token) { + //Updates channel with specified id. + /** + * @method Update - Updates channel with specified id. + * @param {Object} channel - Channel object with new information. + * @param {String} token - An access token that is valid. + * @returns {Object} - Channel Object. + */ + + this.ValidateChannelChannelIDAndToken(channel, channel_id, token); + + const options = { + method: "put", + maxBodyLength: 2000, + url: `${this.channels_url}/${this.channelsEndpoint}/${channel_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(channel), + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }) + } + + Disable(channel_id, token) { + //Disables channel with specified id. + /** + * @method Disable - Disables channel with specified id. + * @param {Object} channel - Channel object with new information. + * @param {String} token - An access token that is valid. + * @returns {Object} - Channel Object. + */ + + this.ValidateChannelChannelIDAndToken({}, channel_id, token); + + const options = { + method: "post", + maxBodyLength: 2000, + url: `${this.channels_url}/${this.channelsEndpoint}/${channel_id}/disable`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }) + } + + Disable(channel, token) { + //Disables channel with specified id. + /** + * @method Disable - Disables channel with specified id. + * @param {Object} channel - Channel object with new information. + * @param {String} token - An access token that is valid. + * @returns {Object} - Channel Object. + */ + const options = { + method: "post", + maxBodyLength: Infinity, + url: `${this.channels_url}/${this.channelsEndpoint}/${channel["id"]}/disable`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return axios + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } +} + +// export default Channels; +module.exports = Channels; diff --git a/mainflux/errors.js b/mainflux/errors.js new file mode 100644 index 00000000..5349706d --- /dev/null +++ b/mainflux/errors.js @@ -0,0 +1,285 @@ +class Errors { + HandleError(error_dict, status_code) { + if (error_dict.hasOwnProperty(status_code)) { + return error_dict[status_code]; + } else { + return errors[status_code]; + } + } + + errors = { + 400: "Failed due to malformed JSON.", + 401: "Missing or invalid access token provided.", + 403: "Missing or invalid access token provided.", + 404: "A non-existent entity request.", + 409: "Entity already exists.", + 415: "Missing or invalid content type.", + 422: "Database can't process the request.", + 500: "Unexpected server-side error occurred.", + }; + + users = { + get : { + 401: "Missing or invalid access token provided.", + 404: "A non-existent entity request.", + 400: "Failed due to malformed query parameters.", + }, + create: { + 409: "Entity already exists.", + 401: "Missing or invalid access token provided.", + }, + login: { + 404: "A non-existent entity request.", + }, + refreshtoken: { + 404: "A non-existent entity request.", + }, + update: { + 404: "Failed due to a non-existing user.", + 401: "Missing or invalid access token provided.", + 400: "Failed due to malformed JSON.", + }, + updateusertags:{ + 401: "Missing or invalid access token provided.", + 400: "Failed due to malformed JSON.", + }, + updateuserpassword:{ + 500: "Unexpected server-side error occurred.", + 401: "Missing or invalid access token provided.", + 400: "Failed due to malformed JSON.", + }, + updateuseridentity:{ + 401: "Missing or invalid access token provided.", + 400: "Failed due to malformed JSON.", + }, + updateuserowner:{ + 401: "Missing or invalid access token provided.", + 400: "Failed due to malformed JSON.", + 404: "A non-existent entity request.", + }, + getall: { + 400: "Failed due to malformed query parameters.", + 500: "Unexpected serverside error occurred.", + 401: "Missing or invalid access token provided.", + }, + disable: { + 401: "Missing or invalid access token provided.", + }, + enable: { + 401: "Missing or invalid access token provided.", + }, + memberships:{ + 401: "Missing or invalid access token provided.", + 400: "Failed due to malformed query parameters.", + }, + authoriseuser: { + 401: "Failed to perform authorisation.", + 400: "Failed due to malformed JSON.", + }, + } + + groups= { + get : { + 401: "Missing or invalid access token provided.", + 404: "A non-existent entity request.", + 400: "Failed due to malformed query parameters.", + }, + create : { + 401: "Missing or invalid access token provided.", + 404: "A non-existent entity request.", + 400: "Failed due to malformed query parameters.", + }, + children : { + 401: "Missing or invalid access token provided.", + }, + parents : { + 401: "Missing or invalid access token provided.", + }, + update : { + 401: "Missing or invalid access token provided.", + }, + assign : { + 500: "Unexpected server-side error occurred.", + }, + unassign : { + 401: "Missing or invalid access token provided.", + 500: "Unexpected server-side error occurred.", + }, + disable: { + 401: "Missing or invalid access token provided.", + }, + members:{ + 401: "Missing or invalid access token provided.", + }, + + } + + things ={ + create : { + 409: "Entity already exists.", + 401: "Missing or invalid access token provided.", + }, + createbulk : { + 400: "Failed due to malformed JSON.", + 401: "Missing or invalid access token provided.", + }, + getbychannel : { + 401: "Missing or invalid access token provided.", + 400: "Failed due to malformed query parameters.", + }, + disable : { + 400: "Failed due to malformed JSON.", + 401: "Missing or invalid access token provided.", + }, + connect : { + 400: "Failed due to malformed JSON.", + 401: "Missing or invalid access token provided.", + }, + disconnect : { + 400: "Failed due to malformed JSON.", + 401: "Missing or invalid access token provided.", + }, + update : { + 401: "Missing or invalid access token provided.", + 400: "Failed due to malformed JSON.", + 404: "Failed due to a non-existing thing.", + }, + updatethingsecret : { + 401: "Missing or invalid access token provided.", + 400: "Failed due to malformed JSON.", + 404: "Failed due to a non-existing thing.", + }, + updatethingtags : { + 401: "Missing or invalid access token provided.", + 400: "Failed due to malformed JSON.", + 404: "Failed due to a non-existing thing.", + }, + updatethingowner : { + 401: "Missing or invalid access token provided.", + 400: "Failed due to malformed JSON.", + 404: "Failed due to a non-existing thing.", + }, + connects : { + 401: "Missing or invalid access token provided.", + 400: "Failed due to malformed JSON.", + }, + authorisething : { + 401: "Missing or invalid access token provided.", + 400: "Failed due to malformed JSON.", + }, + identifything : { + 415: "Missing or invalid content type.", + }, + get :{ + 401: "Missing or invalid access token provided.", + }, + get_all :{ + 400: "Failed due to malformed query parameters.", + 500: "Unexpected serverside error occurred.", + 401: "Missing or invalid access token provided.", + } + } + + certs ={ + issue : { + 500: "Unexpected server-side error occurred.", + 401: "Missing or invalid access token provided.", + 400: "Failed due to malformed JSON.", + }, + view_by_serial :{ + 500: "Unexpected server-side error occurred.", + 404: "Failed to retrieve corresponding certificate.", + 401: "Missing or invalid access token provided.", + }, + view_by_thing :{ + 500: "Unexpected server-side error occurred.", + 404: "Failed to revoke corresponding certificate.", + 401: "Missing or invalid access token provided.", + }, + revoke : { + 500: "Unexpected server-side error occurred.", + 404: "Failed to revoke corresponding certificate.", + 401: "Missing or invalid access token provided.", + } + } + + channels = { + create : { + 401: "Missing or invalid access token provided.", + 409: "Entity already exists.", + }, + get : { + 401: "Missing or invalid access token provided.", + }, + getall : { + 401: "Missing or invalid access token provided.", + 400: "Failed due to malformed query parameters.", + }, + createbulk : { + 401: "Missing or invalid access token provided.", + 400: "Failed due to malformed JSON.", + }, + getbything : { + 401: "Missing or invalid access token provided.", + 400: "Failed due to malformed query parameters.", + }, + update : { + 401: "Missing or invalid access token provided.", + 400: "Failed due to malformed JSON.", + 404: "Failed due to a non-existing channel.", + }, + disable : { + 401: "Missing or invalid access token provided.", + 400: "Failed due to malformed JSON.", + 404: "Failed due to a non-existing channel.", + }, + } + + messages = { + send : { + 400 : "Message discarded due to its malformed content.", + 401 : "Missing or invalid access token provided.", + 404 : "Message discarded due to invalid channel id.", + }, + read : { + 401 : "Missing or invalid access token provided.", + 400 : "Failed due to malformed query parameters.", + } + } + + bootstraps = { + create : { + 401 : "Missing or invalid access token provided.", + 400 : "Failed due to malformed JSON.", + }, + whitelist : { + 401 : "Missing or invalid access token provided.", + 404 : "A non-existent entity request.", + 400 : "Failed due to malformed query parameters.", + }, + update : { + 401 : "Missing or invalid access token provided.", + 404 : " Config does not exist.", + 400 : "Failed due to malformed JSON.", + }, + remove : { + 401 : "Missing or invalid access token provided.", + 400 : "Failed due to malformed config ID", + }, + view : { + 401 : "Missing or invalid access token provided.", + 400 : "Failed due to malformed query parameters.", + }, + updatecerts : { + 401 : "Missing or invalid access token provided.", + 404 : "Config does not exist", + 400 : "Failed due to malformed JSON.", + }, + bootstrap : { + 401 : "Missing or invalid external key provided.", + 400 : "Failed due to malformed JSON.", + }, + } +} + +module.exports = Errors; diff --git a/mainflux/groups.js b/mainflux/groups.js new file mode 100644 index 00000000..797db8fe --- /dev/null +++ b/mainflux/groups.js @@ -0,0 +1,441 @@ +// import Errors from "./errors.js"; +const axios = require("axios"); + +class Groups { + //Groups API client. + /** + * @class Groups - + * Groups API client is used for managing groups. It is used for + * creating, updating, deleting, and retrieving groups. + * @param {string} groups_url - The URL of the Groups service. + * @param {string} content_type - The content type of the request. + * @param {string} groupsEndpoint - The endpoint of the Groups service. + * @returns {Groups} - Returns a Groups object. + */ + constructor(groups_url) { + this.groups_url = groups_url; + this.content_type = "application/json"; + this.groupsEndpoint = "groups"; + } + // groupError = new Errors; + + Create(group, token) { + // Create a new group. + /** + * @class Groups - + * Groups API client is used for managing groups. It is used for + * creating, updating, deleting, and retrieving groups. + * @param {string} groups_url - The URL of the Groups service. + * @returns {Groups} - Returns a Groups object. + */ + constructor(groups_url) { + this.groups_url = groups_url; + this.content_type = "application/json"; + this.groupsEndpoint = "groups"; + } + // groupError = new Errors; + //Validation function + + ValidateGroupAndToken(group, token) { + if (typeof group !== 'object' || group === null || Array.isArray(group)) { + throw new Error('Invalid group parameter. Expected an object.'); + } + + if (typeof token !== 'string') { + throw new Error('Invalid token parameter. Expected a string.'); + } + } + + Create(group, token) { + // Create a new group. + /** + * @method Create - Creates a new group once the user is authenticated. + * and a valid token is provided. The group's parent or child status in the + * heirarchy can also be established. + * @param {object} group - The group object to be created. + * @param {string} token - The user's token. + * @example + * const group = { + * "name": "groupName", + * "description": "long group description", + * "parent_id": "bb7edb32-2eac-4aad-aebe-ed96fe073879", + * "metadata": { + * "domain": "example.com" + * }, + * "status": "enabled", + * "owner_id": "bb7edb32-2eac-4aad-aebe-ed96fe073879" + * } + */ + + this.ValidateGroupAndToken(group, token); + + const options = { + method: "post", + maxBodyLength: 2000, + url: `${this.groups_url}/${this.groupsEndpoint}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(group), + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + + Get(group_id, token) { + //Get a group. + /** + * @method Get - Provide a group's information once given the group ID and a valid token. + * @param {string} group_id - The group's ID. + * @param {string} token - The user's access token. + * @returns {object} - Returns a group object. + * @example + * const group_id = "bb7edb32-2eac-4aad-aebe-ed96fe073879" + * + */ + + if (typeof group_id !== 'string' || group_id === null) { + throw new Error('Invalid group_id parameter. Expected a string.'); + }; + + this.ValidateGroupAndToken({}, token); + + const options = { + method: "get", + maxBodyLength: 2000, + url: `${this.groups_url}/${this.groupsEndpoint}/${group_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }) + } + + GetAll(query_params, token) { + //Get all groups. + /** + * @method Get_all - Provides a list of all the groups in the database once given a valid token. + * @param {string} token - The user's access token. + * @param {Object} query_params - Query parameters. + * @returns {object} - Returns a list of all the groups in the database. + * @example + * const query_params = { + * "offset": 0, + * "limit": 10 + * } + * + */ + + if (typeof query_params !== 'object' || query_params === null || Array.isArray(query_params)) { + throw new Error('Invalid query parameters. Expected an object.'); + }; + + this.ValidateGroupAndToken({}, token); + + const options = { + method: "get", + maxBodyLength: 2000, + url: `${this.groups_url}/${this.groupsEndpoint}?${new URLSearchParams(query_params).toString()}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }) + } + + Update(group_id, group, token) { + //Updates a group's information such a name and metadata. + /** + * @method Update - Updates a group's information such a name and metadata when given a + * valid token and group ID. + * @param {object} group - The group object to be updated. + * @param {string} token - The user's access token. + * @returns {object} - Returns the updated group object. + * @example + * const group = { + * "id": "bb7edb32-2eac-4aad-aebe-ed96fe073879", + * "name": "groupName" + * } + * + */ + + if (typeof group_id !== 'string' || group_id === null) { + throw new Error('Invalid group_id parameter. Expected a string.'); + }; + + this.ValidateGroupAndToken(group, token); + + const options = { + method: "put", + maxBodyLength: 2000, + url: `${this.groups_url}/${this.groupsEndpoint}/${group_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(group), + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }) + } + + Children(group_id, query_params, token) { + //Get a group's children. + /** + * @method Children - Provides a list of a groups' children. + * @param {string} group_id - The group's ID. + * @param {string} token - The user's access token. + * @param {object} query_params - The query parameters such as offset and limit. + * @returns {object} - Returns a list of a group's children. + * + */ + + if (typeof group_id !== 'string' || group_id === null) { + throw new Error('Invalid group_id parameter. Expected a string.'); + }; + + if (typeof query_params !== 'object' || query_params === null || Array.isArray(query_params)) { + throw new Error('Invalid query parameters. Expected an object.'); + }; + + this.ValidateGroupAndToken({}, token); + + const options = { + method: "get", + maxBodyLength: 2000, + url: `${this.groups_url}/${this.groupsEndpoint}/${group_id}/children?${new URLSearchParams(query_params).toString()}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }) + } + + Parents(group_id, query_params, token) { + //Get a group's parents. + /** + * @method Parents - Provides a list of a groups' parents when provided with + * a valid token and group ID. + * @param {string} group_id - The group's ID. + * @param {string} token - The user's access token. + * @param {object} query_params - The query parameters such as offset and limit. + * @returns {object} - Returns a list of a group's parents. + * + */ + + if (typeof group_id !== 'string' || group_id === null) { + throw new Error('Invalid group_id parameter. Expected a string.'); + }; + + if (typeof query_params !== 'object' || query_params === null || Array.isArray(query_params)) { + throw new Error('Invalid query parameters. Expected an object.'); + }; + + this.ValidateGroupAndToken({}, token); + + const options = { + method: "get", + maxBodyLength: 2000, + url: `${this.groups_url}/${this.groupsEndpoint}/${group_id}/parents?${new URLSearchParams(query_params).toString()}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }) + } + + Assign(group_id, member_id, member_type, token) { + //Assign a member to a group. + /** + * @method Assign -Assigns a user to a group when given a valid token, group ID, + * member ID, and member type. This allows the user to perform + * some action on the group. + * @param {string} group_id - The group's ID. + * @param {string} member_id - The member's ID. + * @param {Array} member_type - The member's actions that they can perform over the group. + * @param {string} token - The user's access token. + * @returns {string} - "Policy created". + * + */ + + if (typeof group_id !== 'string' || typeof member_id !== 'string' ) { + throw new Error('Invalid parameters. Expected strings for group_id and member_id.'); + }; + + if (!Array.isArray(member_type)) { + throw new Error('Invalid parameter. Expected an array for member_type.'); + }; + + this.ValidateGroupAndToken({}, token); + + const payload = { "object": group_id, "subject": member_id, "actions": member_type }; + const options = { + method: "post", + maxBodyLength: 2000, + url: `${this.groups_url}/policies`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(payload), + }; + return axios.request(options) + .then((_response) => { + return "Policy created"; + }) + .catch((error) => { + return error.response.data; + }) + } + + Unassign(member_id, group_id, token) { + //Unassign a member from a group. + /** + * @method Unassign - Deletes a user's policy over a group through unassigning them. + * Requires a valid token, ID's of members of the group and the group ID. + * @param {String} member_id - The member's ID. + * @param {string} group_id - The group's ID. + * @param {string} token - The user's access token. + * @returns {string} - "Policy deleted" + */ + + if (typeof group_id !== 'string' || typeof member_id !== 'string' ) { + throw new Error('Invalid parameters. Expected strings for group_id and member_id.'); + } + + this.ValidateGroupAndToken({}, token); + + const payload = { "object": group_id, "subject": member_id }; + const options = { + method: "delete", + maxBodyLength: 2000, + url: `${this.groups_url}/policies/${member_id}/${group_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(payload), + }; + return axios.request(options) + .then((_response) => { + return "Policy deleted"; + }) + .catch((error) => { + return error.response.data; + }) + } + + Disable(group_id, token) { + //Disable a group. + /** + * @method Disable - Deletes a group when given a valid token and group ID. + * @param {string} group_id - The group's ID. + * @param {string} token - The user's access token. + * @returns {object} - Returns a group object with the status reading 'Disabled'. + * + */ + + if (typeof group_id !== 'string' || group_id === null) { + throw new Error('Invalid group_id parameter. Expected a string.'); + }; + + this.ValidateGroupAndToken({}, token); + + const options = { + method: "post", + maxBodyLength: 2000, + url: `${this.groups_url}/${this.groupsEndpoint}/${group_id}/disable`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }) + } + + Members(group_id, query_params, token) { + //Retrieves a list of the members of a group. + /** + * @method Members - Retrieves a list of the members of a group. + * @param {string} group_id - The group's ID. + * @param {string} token - The user's access token. + * @param {object} query_params - The query parameters such as offset and limit. + * @returns {list} - Returns a list of the members of a group. + * + */ + + if (typeof group_id !== 'string' || group_id === null) { + throw new Error('Invalid group_id parameter. Expected a string.'); + }; + + if (typeof query_params !== 'object' || query_params === null || Array.isArray(query_params)) { + throw new Error('Invalid query parameters. Expected an object.'); + } + + this.ValidateGroupAndToken({}, token); + + const options = { + method: "get", + maxBodyLength: 2000, + url: `${this.groups_url}/${this.groupsEndpoint}/${group_id}/members?${new URLSearchParams(query_params).toString()}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }) + } +} + +module.exports = Groups; diff --git a/mainflux/messages.js b/mainflux/messages.js new file mode 100644 index 00000000..d198f0d0 --- /dev/null +++ b/mainflux/messages.js @@ -0,0 +1,143 @@ +const axios = require("axios"); + +class Messages { + //Messages API Client + /** + * @method Messages - Messages is used to manage messages. + * It provides methods for sending and reading messages. + * @param {string} readers_url - The url of the readers service. + * @param {string} httpadapter_url - The URL of the Mainflux Messages adapter. + * @param {string} content_type - The content type of the request. + * @returns {Messages} - Returns a Messages object. + */ + constructor(readers_url, httpadapter_url) { + this.readers_url = readers_url; + this.httpadapter_url = httpadapter_url; + this.content_type = "application/json"; + } + + Send(channel_id, msg, thing_key) { + //Send a message + /** + * @method Messages - Messages is used to manage messages. + * It provides methods for sending and reading messages. + * @param {string} readers_url - The url of the readers service. + * @returns {Messages} - Returns a Messages object. + */ + const chan_name_parts = channel_id.split(".", 2); + const chan_id = chan_name_parts[0]; + let subtopic = ""; + + if (chan_name_parts.length == 2) { + subtopic = chan_name_parts[1].replace(".", "/", -1); + } + + Send(channel_id, msg, thing_key){ + //Send a message + /** + * @method Send- Sends message to a given channel via HTTP protocol. Message is sent + * through a writer add-on such as timescale. Message is sent to a + * http port specific to the writer add-on. The thing and channel must be + * created before sending the message and connected. + * @param {string} channel_id - The channel_id of the channel to send the message to. + * @param {string} msg -message to send to the channel that should be in encoded into + * bytes format for example: + * [{"bn":"demo", "bu":"V", "n":"voltage", "u":"V", "v":5}] + * @param {string} thing_key - The secret of the thing sending the message. + */ + + if (typeof channel_id !== "string" || channel_id === null) { + throw new Error('Invalid channel_id parameter. Expected a string.'); + } + + if (typeof thing_key !== "string" || thing_key === null) { + throw new Error('Invalid thing_key parameter. Expected a string.'); + } + + if (!Array.isArray(msg)) { + throw new Error('Invalid msg parameter. Expected an array.'); + } + + const chan_name_parts = channel_id.split(".", 2); + const chan_id = chan_name_parts[0]; + let subtopic = ""; + + Read(channel_id, token) { + //Read messages + /** + * + * @method Read - Read messages from a given channel. Messages are read from a reader + * add-on such as timescale. Messages are read from a http port specific to the reader + * @param {string} channel_id - The channel_id of the channel to read the message from. + * @param {string} token - The token to be used for authentication. + */ + const chan_name_parts = channel_id.split(".", 2); + const chan_id = chan_name_parts[0]; + let subtopic = ""; + + const options = { + method: "post", + maxBodyLength: 2000, + url: `${this.httpadapter_url}/http/channels/${chan_id}/messages/${subtopic}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Thing ${thing_key}`, + }, + data: new TextEncoder().encode(msg), + }; + return axios.request(options) + .then((_response) => { + return "Message Sent!"; + }) + .catch((error) => { + return error.response.data; + }) + } + + Read(channel_id, token){ + //Read messages + /** + * + * @method Read - Read messages from a given channel. Messages are read from a reader + * add-on such as timescale. Messages are read from a http port specific to the reader + * @param {string} channel_id - The channel_id of the channel to read the message from. + * @param {string} token - The token to be used for authentication. + */ + + if (typeof channel_id !== "string" || channel_id === null) { + throw new Error('Invalid channel_id parameter. Expected a string.'); + } + + if (typeof token !== "string" || token === null) { + throw new Error('Invalid token parameter. Expected a string.'); + } + + const chan_name_parts = channel_id.split(".", 2); + const chan_id = chan_name_parts[0]; + let subtopic = ""; + + if (chan_name_parts.length == 2) { + subtopic = chan_name_parts[1].replace(".", "/", -1); + } + + const options = { + method: "get", + maxBodyLength: 2000, + url: `${this.readers_url}/channels/${chan_id}/messages`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + params: {"subtopic": subtopic}, + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }) + } +} + +module.exports = Messages; diff --git a/mainflux/sdk.js b/mainflux/sdk.js new file mode 100644 index 00000000..a95c59aa --- /dev/null +++ b/mainflux/sdk.js @@ -0,0 +1,38 @@ +const Users = require("./users"); +const Things = require("./things"); +const Groups = require("./groups"); +const Channels = require("./channels"); +const Certs = require("./certs"); +const Bootstrap = require("./bootstrap"); +const Messages = require("./messages"); + +const defaultUrl = "http://localhost"; + +class SDK { + constructor({ + usersUrl = defaultUrl, + thingsUrl = defaultUrl, + groupsUrl = defaultUrl, + channelsUrl = defaultUrl, + certsUrl = defaultUrl, + bootstrapsUrl = defaultUrl, + readersUrl = defaultUrl, + httpadapterUrl = defaultUrl, + } = {}) { + this.users = new Users(usersUrl); + this.things = new Things(thingsUrl); + this.groups = new Groups(groupsUrl); + this.channels = new Channels(channelsUrl); + this.certs = new Certs(certsUrl); + this.bootstrap = new Bootstrap(bootstrapsUrl); + this.messages = new Messages(readersUrl, httpadapterUrl); + } +} + +// module.exports = SDK; +// Export the SDK class for use in a web browser +if (typeof module !== "undefined" && typeof module.exports !== "undefined") { + module.exports = SDK; // For Node.js +} else { + window.SDK = SDK; // For browsers +} diff --git a/mainflux/things.js b/mainflux/things.js new file mode 100644 index 00000000..e6d94e5f --- /dev/null +++ b/mainflux/things.js @@ -0,0 +1,650 @@ +const axios = require("axios"); + +class Things { + // Things service client. + /** + * @class Things - + * Things API is used for creating and managing things. + * It is used for creating, updating, deleting and retrieving things. + * @param {string} things_url - Things service URL. + * @returns {Object} - Things service client. + */ + constructor(things_url) { + this.things_url = things_url; + this.content_type = "application/json"; + this.thingsEndpoint = "things"; + } + + ValidateThingIdThingAndToken(thing_id, thing, token) { + // Validate thing_id + if (typeof thing_id !== 'string' || thing_id === null) { + throw new Error('Invalid parameter. Expected a string for the "thing_id" parameter.'); + } + + // Validate thing + if (typeof thing !== 'object' || thing === null || Array.isArray(thing)) { + throw new Error('Invalid parameter. Expected an object for the "thing" parameter.'); + } + + // Validate token + if (typeof token !== 'string' || token === null) { + throw new Error('Invalid parameter. Expected a string for the "token" parameter.'); + } + } + + Create(thing, token) { + //Creates a new thing. + /** + * @method Create - Creates a new thing when provided with + * the things information and a valid token. + * @param {Object} thing - Thing object. + * @param {string} token - User token. + * @returns {Object} - Thing object. + * @example + * const thing = { + * "name": "string", + * "tags": [ + * "tag1", + * "tag2" + * ], + * "credentials": { + * "identity": "thingidentity", + * "secret": "bb7edb32-2eac-4aad-aebe-ed96fe073879" + * }, + * "owner": "bb7edb32-2eac-4aad-aebe-ed96fe073879", + * "metadata": { + * "domain": "example.com" + * }, + * "status": "enabled" + * } + */ + + this.ValidateThingIdThingAndToken('', thing, token); + + const options = { + method: "post", + maxBodyLength: 2000, + url: `${this.things_url}/${this.thingsEndpoint}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(thing), + }; + return axios + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + + CreateBulk(things, token) { + //Creates multiple things. + /** + * @method Create_bulk - Creates multiple things when provided with a valid + * token and an array of things information such as names. + * @param {list} things - An array of things information. + * @param {string} token - User token. + * @returns {list} - Things list. + * @example + * const things = [ + * { + * "name": "thing1" + * }, + * { + * "name": "thing2" + * } + * ] + */ + + if (!Array.isArray(things)) { + throw new Error('Invalid parameter. Expected an array for the "things" parameter.'); + } + + this.ValidateThingIdThingAndToken('', {}, token); + + const options = { + method: "post", + maxBodyLength: 2000, + url: `${this.things_url}/${this.thingsEndpoint}/bulk`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(things), + }; + return axios + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + + Get(thing_id, token) { + //Retrieves thing information. + /** + * @method Get - Retrieves thing information when provided with a valid token + * and thing ID. + * @param {string} thing_id - Thing ID. + * @param {string} token - User token. + * @returns {Object} - Thing object. + * @example + * const thing_id = "bb7edb32-2eac-4aad-aebe-ed96fe073879" + * + */ + + this.ValidateThingIdThingAndToken(thing_id, {}, token); + + const options = { + method: "get", + maxBodyLength: 2000, + url: `${this.things_url}/${this.thingsEndpoint}/${thing_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return axios + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + + GetByChannel(thing_id, query_params, token) { + //Retrieves list of channels connected to specified thing with pagination metadata. + /** + * @method GetByChannel - Retrieves list of channels connected to specified thing + * with pagination metadata. + * @param {string} thing_id - Thing ID. + * @param {Object} query_params - Query parameters such as offset and limit. + * @returns {Object} - Channels list. + */ + + if (typeof query_params !== 'object' || query_params === null || Array.isArray(query_params)) { + throw new Error('Invalid query parameters. Expected an object.'); + }; + + this.ValidateThingIdThingAndToken(thing_id, {}, token); + + const options = { + method: "get", + maxBodyLength: 2000, + url: `${this.things_url}/${this.thingsEndpoint}/${thing_id}/channels?${new URLSearchParams(query_params).toString()}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return axios + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + + GetAll(query_params, token) { + //Retrieves list of things with pagination metadata. + /** + * @method GetAll - Retrieves list of things with pagination metadata when provided with a + * valid token and correct query parameters such as offset and limit. + * @param {Object} query_params - Query parameters. + * @param {string} token - User token. + * @returns {Object} - Things list. + */ + + if (typeof query_params !== 'object' || query_params === null || Array.isArray(query_params)) { + throw new Error('Invalid query parameters. Expected an object.'); + }; + + this.ValidateThingIdThingAndToken('', {}, token); + + const options = { + method: "get", + maxBodyLength: 2000, + url: `${this.things_url}/${this.thingsEndpoint}?${new URLSearchParams(query_params).toString()}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return axios + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + + Disable(thing_id, token) { + //Disables thing. + /** + * @method Disable - Deletes a thing when provided with a valid token and thing ID. + * @param {string} thing_id - Thing ID. + * @param {string} token - User token. + * @returns {Object} - Thing object with statys disabled. + */ + + this.ValidateThingIdThingAndToken(thing_id, {}, token); + + const options = { + method: "post", + maxBodyLength: 2000, + url: `${this.things_url}/${this.thingsEndpoint}/${thing_id}/disable`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return axios + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + + Update(thing_id, thing, token) { + //Updates thing. + /** + * @method Update - Updates thing when provided with a valid token, + * thing ID and thing object. + * @param {string} thing_id - Thing ID. + * @param {Object} thing - Thing object. + * @param {string} token - User token. + * @returns {Object} - Thing object. + * @example + * const thing = { + * "name": "thing3", + * "tags": [ + * "tag1" + * ], + * "credentials": { + * "identity": "thingidentity", + * "secret":"12345678" + * }, + * "owner": "bb7edb32-2eac-4aad-aebe-ed96fe073879", + * "id": "bb7edb32-2eac-4aad-aebe-ed96fe073879", + * } + */ + + this.ValidateThingIdThingAndToken(thing_id, thing, token); + + const options = { + method: "patch", + maxBodyLength: 2000, + url: `${this.things_url}/${this.thingsEndpoint}/${thing_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(thing), + }; + return axios + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + + UpdateThingSecret(thing_id, thing, token) { + //Updates thing secret. + /** + * @method UpdateThingSecret - Updates thing secret when provided with a valid token, + * thing ID and thing object. + * @param {string} thing_id - Thing ID. + * @param {Object} thing - Thing object. + * @param {string} token - User token. + * @returns {Object} - Thing object. + * @example + * const thing = { + * "name": "thing3", + * "tags": [ + * "tag1" + * ], + * "credentials": { + * "identity": "thingidentity", + * "secret":"56788912" + * }, + * "owner": "bb7edb32-2eac-4aad-aebe-ed96fe073879", + * "id": "bb7edb32-2eac-4aad-aebe-ed96fe073879", + * } + */ + + this.ValidateThingIdThingAndToken(thing_id, thing, token); + + const options = { + method: "patch", + maxBodyLength: 2000, + url: `${this.things_url}/${this.thingsEndpoint}/${thing_id}/secret`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(thing), + }; + return axios + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + + UpdateThingTags(thing_id, thing, token) { + //Updates thing tags. + /** + * @method UpdateThingTags - Updates thing tags when provided with a valid token, + * thing ID and thing object. + * + * @param {string} thing_id - Thing ID. + * @param {Object} thing - Thing object. + * @param {string} token - User token. + * @returns {Object} - Thing object. + * @example + * const thing = { + * "name": "thing3", + * "tags": [ + * "tag1" + * ], + * "credentials": { + * "identity": "thingidentity", + * "secret":"56788912" + * }, + * "owner": "bb7edb32-2eac-4aad-aebe-ed96fe073879", + * "id": "bb7edb32-2eac-4aad-aebe-ed96fe073879", + * } + */ + + this.ValidateThingIdThingAndToken(thing_id, thing, token); + + const options = { + method: "patch", + maxBodyLength: 2000, + url: `${this.things_url}/${this.thingsEndpoint}/${thing_id}/tags`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(thing), + }; + return axios + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + + UpdateThingOwner(thing_id, thing, token) { + //Updates thing owner. + /** + * @method UpdateThingOwner - Updates thing owner when provided with a valid token, + * thing ID and thing object. + * @param {string} thing_id - Thing ID. + * @param {Object} thing - Thing object. + * @param {string} token - User token. + * @returns {Object} - Thing object. + * @example + * const thing = { + * "name": "thing3", + * "tags": [ + * "tag1" + * ], + * "credentials": { + * "identity": "thingidentity", + * "secret":"56788912" + * }, + * "owner": "bb7edb32-2eac-4aad-aebe-ed96fe073879", + * "id": "bb7edb32-2eac-4aad-aebe-ed96fe073879", + * } + */ + + this.ValidateThingIdThingAndToken(thing_id, thing, token); + + const options = { + method: "patch", + maxBodyLength: 2000, + url: `${this.things_url}/${this.thingsEndpoint}/${thing_id}/owner`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(thing), + }; + return axios + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + + Connect(thing_id, channel_id, action, token) { + //Connects thing to channel. + /** + * @method Connect - Connects thing to channel when provided with a valid token, + * channel id and a thing id. The thing must have an action that it can perform over + * the channel. + * @param {string} thing_id - Thing ID. + * @param {string} channel_id - Channel ID. + * @param {list} action - Action for example: ["m_read", "m_write"]. + * @param {string} token - User token. + * + */ + if (typeof channel_id !== 'string' || channel_id === null) { + throw new Error('Invalid channel_id parameter. Expected a string.'); + }; + + if (!Array.isArray(action)) { + throw new Error('Invalid parameter. Expected an array for action.'); + }; + + this.ValidateThingIdThingAndToken(thing_id, {}, token); + + const payload = { subject: thing_id, object: channel_id, action: action }; + const options = { + method: "post", + maxBodyLength: 2000, + url: `${this.things_url}/policies`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(payload), + }; + return axios + .request(options) + .then((_response) => { + return "Policy created."; + }) + .catch((error) => { + return error.response.data; + }); + } + + Connects(thing_ids, channel_ids, actions, token) { + //Connects multiple things to multiple channels. + /** + * @method Connects - Connects multiple things to multiple channels when provided with a valid token, + * arrays of channel ids, thing ids and actions. + * @param {list} thing_ids - Array of thing IDs. + * @param {list} channel_ids - Array of channel IDs. + * @param {list} actions - Array of actions for example: ["m_read", "m_write"]. + * @param {string} token - User token. + * @returns {Object} - Policy object. + * + */ + + if (!Array.isArray(thing_ids) || !Array.isArray(channel_ids) || !Array.isArray(actions)) { + throw new Error('Invalid parameters. Expected arrays for actions, things_ids and channel_ids.'); + }; + + this.ValidateThingIdThingAndToken('', {}, token); + + const payload = { "subjects": thing_ids, "objects": channel_ids, "actions": actions } + const options = { + method: "post", + maxBodyLength: 2000, + url: `${this.things_url}/connect`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(payload), + }; + return axios + .request(options) + .then((_response) => { + return "Policy created."; + }) + .catch((error) => { + return error.response.data; + }); + } + + Disconnect(thing_id, channel_id, token) { + //Disconnects thing from channel. + /** + * @method Disconnect - Disconnects thing from channel when provided with a valid token, + * channel id and a thing id. + * @param {list} thing_id - Thing ID. + * @param {list} channel_id - Channel ID. + * @param {string} token - User token. + * + */ + + if (typeof channel_id !== 'string' || channel_id === null) { + throw new Error('Invalid channel_id parameter. Expected a string.'); + }; + + this.ValidateThingIdThingAndToken(thing_id, {}, token); + + const payload = { "subjects": thing_id, "objects": channel_id } + const options = { + method: "post", + maxBodyLength: 2000, + url: `${this.things_url}/disconnect`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(payload), + }; + return axios + .request(options) + .then((_response) => { + return "Policy deleted."; + }) + .catch((error) => { + return error.response.data; + }); + } + + IdentifyThing(thing_key) { + //Validates thing's key and returns it's ID if key is valid + /** + * @method IdentifyThing - Validates thing's key and returns it's ID if key is valid. The method + * does not require a token. + * @param {string} thing_key - Thing secret. + * @returns {Object} - Thing object. + * + */ + + if (typeof thing_key !== 'string' || thing_key === null) { + throw new Error('Invalid thing_key parameter. Expected a string.'); + }; + + const options = { + method: "post", + maxBodyLength: 2000, + url: `${this.things_url}/identify`, + headers: { + "Content-Type": this.content_type, + Authorization: `Thing ${thing_key}`, + }, + }; + return axios + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + + AuthoriseThing(thing_id, channel_id, action, entity_type, token) { + //Authorises thing + /** + * @method AuthoriseThing - Authorises a thing to perform an action on a channel + * when provided with a valid token, thing ID, channel ID, action and entity type. + * @param {string} thing_id - Thing ID. + * @param {string} channel_id - Channel ID. + * @param {string} action - Action for example: ["m_read", "m_write"]. + * @param {string} entity_type - Type of the thing class for example: "client" + * @param {string} token - User token. + * @return {Object} - True if thing is authorised, false if not. + */ + + if ( + typeof thing_id !== 'string' || + typeof channel_id !== 'string' || + typeof action !== 'string' || + typeof entity_type !== 'string' || + typeof token !== 'string') { + throw new Error('Invalid parameter types. Expected strings for thing_id, channel_id, action, entity_type, and token.'); + }; + const access_request = { + subject: thing_id, + object: channel_id, + action: action, + entity_type: entity_type, + }; + const options = { + method: "post", + maxBodyLength: 2000, + url: `${this.things_url}/channels/object/access`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(access_request), + }; + return axios + .request(options) + .then((_response) => { + return true; + }) + .catch((_error) => { + return false; + }); + } +} + +module.exports = Things; diff --git a/mainflux/users.js b/mainflux/users.js new file mode 100644 index 00000000..2e9e67a8 --- /dev/null +++ b/mainflux/users.js @@ -0,0 +1,653 @@ +const axios = require("axios"); + +class Users { + // Users API client + /** + * @class Users - + * Users API is used for creating and managing users. + * It is used for creating new users, logging in, refreshing tokens, + * getting user information, updating user information, disabling + * and enabling users. + * @param {String} users_url - URL to the Users service. + * @param {String} content_type - Content type for the requests. + * @param {String} usersEndpoint - Endpoint for the users service. + * @returns {Object} - Users object. + */ + constructor(users_url) { + this.users_url = users_url; + this.content_type = "application/json"; + this.usersEndpoint = "users"; + } + + Create(user, token) { + // Creates a new user + /** + * @class Users - + * Users API is used for creating and managing users. + * It is used for creating new users, logging in, refreshing tokens, + * getting user information, updating user information, disabling + * and enabling users. + * @param {String} users_url - URL to the Users service. + * @returns {Object} - Users object. + */ + + // Validation function + ValidateUserAndToken(user, token) { + if (typeof user !== 'object' || user === null || Array.isArray(user)) { + throw new Error('Invalid user parameter. Expected an object.'); + } + + if (typeof token !== 'string') { + throw new Error('Invalid token parameter. Expected a string.'); + } + } + + Create(user, token) { + // Creates a new user + /** + * @method Create - Creates a new user. + * @param {Object} user - User object. + * @param {String} token - Access token. + * @returns {Object} - User object. + * @example + * const user = { + * "credentials": { + * "identity": "admin@example.com", + * "password": "12345678" + * } + * } + * + */ + + this.ValidateUserAndToken(user, token); + + const options = { + method: "post", + maxBodyLength: 2000, + url: `${this.users_url}/${this.usersEndpoint}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(user), + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }) + } + + const options = { + method: "post", + maxBodyLength: Infinity, + url: `${this.users_url}/${this.usersEndpoint}/tokens/issue`, + headers: { + "Content-Type": this.content_type, + }, + data: JSON.stringify(user), + }; + return axios + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error; + }); + } + + this.ValidateUserAndToken(user); + + const options = { + method: "post", + maxBodyLength: 2000, + url: `${this.users_url}/${this.usersEndpoint}/tokens/issue`, + headers: { + "Content-Type": this.content_type, + }, + data: JSON.stringify(user), + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error; + }); + } + + RefreshToken(user, refresh_token) { + //provides a new access token and refresh token. + /** + * @method Refresh_token - Provides a new access token and refresh token. + * @param {Object} user - User object. + * @param {String} refresh_token - Refresh token. + * @returns {Object} - Access and Refresh Token. + * @example + * const user = { + * "identity": "c52d-3b0d-43b9-8c3e-275c087d875af" + * } + * + */ + if (typeof user !== 'object' || user === null || Array.isArray(user)) { + throw new Error('Invalid user parameter. Expected an object.'); + }; + + if (typeof refresh_token !== 'string') { + throw new Error('Invalid token parameter. Expected a string.'); + }; + + const options = { + method: "post", + maxBodyLength: 2000, + url: `${this.users_url}/${this.usersEndpoint}/tokens/refresh`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${refresh_token}`, + }, + data: JSON.stringify(user), + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error; + }); + } + + Update(user, token) { + // Update a user + /** + * @method Update - Update a user. Updates a user's name and metadata. + * @param {Object} user - User object. + * @param {String} token - Access token. + * @returns {Object} - User object. + * @example + * const user = { + * "id": "c52d-3b0d-43b9-8c3e-275c087d875af", + * "name": "John Doe" + * } + * + */ + + this.ValidateUserAndToken(user, token); + + const options = { + method: "patch", + url: `${this.users_url}/${this.usersEndpoint}/${user["id"]}`, + maxBodyLength: 2000, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(user), + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + + UpdateUserIdentity(user, token) { + // Update a user identity + /** + * @method UpdateUserIdentity - Update a user identity for a currently logged in user. + * The user Identity is updated using authorization user_token + * @param {Object} user - User object. + * @param {String} token - Access token. + * @returns {Object} - User object. + * @example + * const user = { + * "id": "c52d-3b0d-43b9-8c3e-275c087d875af", + * "credentials": { + * "identity": "fkatwigs@email.com" + * } + * + * } + */ + + this.ValidateUserAndToken(user, token); + + const options = { + method: "patch", + url: `${this.users_url}/${this.usersEndpoint}/${user["id"]}/identity`, + maxBodyLength: 2000, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(user), + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + + UpdateUserTags(user, token) { + // Update a user's tags. + /** + * Updates tags of the user with provided ID. Tags is updated using + * authorization user_tokeN. + * @method UpdateUserTags - Update a user's tags. + * @param {Object} user - User object. + * @param{String} token - Access token. + * @returns {Object} - User object. + * @example + * const user = { + * "name": "example", + * "id": "886b4266-77d1-4258-abae-2931fb4f16de" + * "tags": [ + * "back", + * "end" + * ] + * "metadata": { + * "foo": "bar" + * } + * } + * + */ + + this.ValidateUserAndToken(user, token); + + const options = { + method: "patch", + url: `${this.users_url}/${this.usersEndpoint}/${user["id"]}/tags`, + maxBodyLength: 2000, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(user), + }; + + UpdateUserOwner(user, token) { + // Update a user's owner. + /** + * Updates owner of the user with provided ID. The owner is updated using + * authorization user_tokeN. + * @method UpdateUserOwner - Update a user's owner. + * @param {Object} user - User object. + * @param{String} token - Access token. + * @returns {Object} - User object. + * @example + * const user = { + * "name": "example", + * "id": "886b4266-77d1-4258-abae-2931fb4f16de" + * "tags": [ + * "back", + * "end" + * ] + * "metadata": { + * "foo": "bar" + * } + * "owner":"886b4266-77d1-4258-abae-2931fb4f16de" + * } + * + */ + const options = { + method: "patch", + url: `${this.users_url}/${this.usersEndpoint}/${user["id"]}/owner`, + maxBodyLength: Infinity, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(user), + }; + return axios + .request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + + UpdateUserOwner(user, token) { + // Update a user's owner. + /** + * Updates owner of the user with provided ID. The owner is updated using + * authorization user_tokeN. + * @method UpdateUserOwner - Update a user's owner. + * @param {Object} user - User object. + * @param{String} token - Access token. + * @returns {Object} - User object. + * @example + * const user = { + * "name": "example", + * "id": "886b4266-77d1-4258-abae-2931fb4f16de" + * "tags": [ + * "back", + * "end" + * ] + * "metadata": { + * "foo": "bar" + * } + * "owner":"886b4266-77d1-4258-abae-2931fb4f16de" + * } + * + */ + + this.ValidateUserAndToken(user, token); + + const options = { + method: "patch", + url: `${this.users_url}/${this.usersEndpoint}/${user["id"]}/owner`, + maxBodyLength: 2000, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(user), + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + + UpdateUserPassword(old_secret, new_secret, token) { + // Update a user's password. + /** + * Updates password of the user with provided valid token. + * + * @method UpdateUserPassword - Update a user's password. + * @param {String} old_secret - Old password. + * @param {String} new_secret - New password. + * @param {String} token - Access token. + * @returns {Object} - User object. + * + */ + + if (typeof old_secret !== 'string' || typeof new_secret !== 'string' || typeof token !== 'string') { + throw new Error('Invalid parameter types. Expected strings for old_secret, new_secret, and token.'); + }; + + const secret = { old_secret: old_secret, new_secret: new_secret } + const options = { + method: "patch", + url: `${this.users_url}/${this.usersEndpoint}/secret`, + maxBodyLength: 2000, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(secret), + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + + Get(user_id, token) { + // Get a user + /** + * Provides information about the user with provided ID. The user is + * retrieved using authorization user_token. + * @method Get - Get a user. + * @param {String} user_id - User ID. + * @param {String} token - Access token. + * @returns {Object} - User object. + * @example + * const user_id = "886b4266-77d1-4258-abae-2931fb4f16de" + * + */ + + if (typeof user_id !== 'string' || user_id === null) { + throw new Error('Invalid user_id parameter. Expected a string.'); + }; + + this.ValidateUserAndToken({}, token); + + const options = { + method: "get", + maxBodyLength: 2000, + url: `${this.users_url}/${this.usersEndpoint}/${user_id}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + + GetAll(query_params, token) { + // Gets all users with pagination. + /** + * Provides information about all users. The users are retrieved using + * authorization user_token. + * + * @method Get_all - Gets all users with pagination. + * @param {Object} query_params - Query parameters. + * @param {String} token - Access token. + * @returns {Object} - User object. + * @example + * const query_params = { + * "offset": 0, + * "limit": 10 + * } + * + */ + + if (typeof query_params !== 'object' || query_params === null || Array.isArray(query_params)) { + throw new Error('Invalid query parameters. Expected an object.'); + }; + + this.ValidateUserAndToken({}, token); + + const options = { + method: "get", + maxBodyLength: 2000, + url: `${this.users_url}/${this.usersEndpoint}?${new URLSearchParams(query_params).toString()}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + } + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + // return fetch(url , options) + // .then((response) => { + // if (!response.ok) { + // return this.userError.HandleError(this.userError.errors, response.status); + // // throw new Error(`HTTP error! Status: ${response.status}`); + // } + // return response.json(); + // }) + // .catch((error) => { + // console.error('Fetch error:', error); + // }); + } + + Disable(user, token) { + // Disable a user + /** + * Disables a user with provided ID and valid token. + * @method Disable - Disable a user. + * @param {Object} user - User object. + * @param {String} token - Access token. + * @returns {Object} - User object. + * @example + * const user = { + * "id": "c52d-3b0d-43b9-8c3e-275c087d875af", + * "status": "disabled" + * } + */ + + this.ValidateUserAndToken(user, token); + + const options = { + method: "post", + maxBodyLength: 2000, + url: `${this.users_url}/${this.usersEndpoint}/${user["id"]}/disable`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(user), + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + + Enable(user, token) { + // Enable a user. + /** + * Enables a previously disabled user when provided with token and valid ID. + * @method Enable - Enable a user. + * @params {Object} user - User object. + * @param {String} token - Access token. + * @returns {Object} - User object. + * @example + * const user = { + * "id": "c52d-3b0d-43b9-8c3e-275c087d875af", + * "status": "enabled" + * } + * + */ + + this.ValidateUserAndToken(user, token); + + const options = { + method: "post", + maxBodyLength: 2000, + url: `${this.users_url}/${this.usersEndpoint}/${user["id"]}/enable`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(user), + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + + Memberships(member_id, query_params, token) { + // Get memberships of a user. + /** + * Gets the various groups a user belongs to. + * @method Memberships - Get memberships of a user. + * @param {String} member_id - Member ID. + * @param {Object} query_params - Query parameters for example offset and limit. + * @param {String} token - Access token. + * @returns {Object} - User object. + */ + + if (typeof query_params !== 'object' || query_params === null || Array.isArray(query_params)) { + throw new Error('Invalid query parameters. Expected an object.'); + }; + + if (typeof member_id !== 'string' || member_id === null) { + throw new Error('Invalid member_id parameter. Expected a string.'); + } + + this.ValidateUserAndToken({}, token); + + const options = { + method: "get", + maxBodyLength: 2000, + url: `${this.users_url}/${this.usersEndpoint}/${member_id}/memberships?${new URLSearchParams(query_params).toString()}`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + params: query_params, + }; + return axios.request(options) + .then((response) => { + return response.data; + }) + .catch((error) => { + return error.response.data; + }); + } + + AuthoriseUser(user_id, group_id, action, entity_type, token) { + //Authorises user to perform an action on an entity + /** + * Authorises user to perform an action on an entity. The user needs to be a member of the + * group to be able to have authority over it. + * @method AuthoriseUser - Authorises user to perform an action on an entity. + * @param {String} user_id - User ID which is the Subject. + * @param {String} group_id - Group ID which is the Object. + * @param {String} action - Action to be performed on the entity. + * @param {String} entity_type - Type of entity eg client. + * @return {Boolean} - Returns true if the user is authorised to perform the action. + */ + + if ( + typeof user_id !== 'string' || + typeof group_id !== 'string' || + typeof action !== 'string' || + typeof entity_type !== 'string' || + typeof token !== 'string') { + throw new Error('Invalid parameter types. Expected strings for user_id, group_id, action, entity_type, and token.'); + }; + + const access_request = { + "subject": user_id, + "object": group_id, + "action": action, + "entity_type": entity_type + } + const options = { + method: "post", + maxBodyLength: 2000, + url: `${this.users_url}/authorize`, + headers: { + "Content-Type": this.content_type, + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(access_request), + }; + return axios.request(options) + .then((_response) => { + return true; + }) + .catch((_error) => { + return false; + }); + } +} + +module.exports = Users; diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..447199cd --- /dev/null +++ b/package-lock.json @@ -0,0 +1,9941 @@ +{ + "name": "mainflux-sdk", + "version": "0.14.33", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "mainflux-sdk", + "version": "0.14.33", + "license": "Apache-2.0", + "dependencies": { + "axios": "^1.5.1", + "browser-resolve": "^2.0.0", + "mainflux-sdk": "^0.14.26", + "node-fetch": "^3.3.2" + }, + "devDependencies": { + "esmify": "^2.1.1", + "jest": "^29.7.0", + "jest-fetch-mock": "^3.0.3", + "jsdoc": "^4.0.2", + "prettier": "3.0.3", + "rollup": "^4.0.2", + "rollup-plugin-commonjs": "^10.1.0", + "rollup-plugin-node-resolve": "^5.2.0", + "webpack": "^5.88.2", + "webpack-cli": "^5.1.4" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", + "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/code-frame/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/code-frame/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/code-frame/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.20.tgz", + "integrity": "sha512-BQYjKbpXjoXwFW5jGqiizJQQT/aC7pFm9Ok1OWssonuguICi264lbgMzRp2ZMmRSlfkX6DsWDDcsrctK8Rwfiw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.20.tgz", + "integrity": "sha512-Y6jd1ahLubuYweD/zJH+vvOY141v4f9igNQAQ+MBgq9JlHS2iTsZKn1aMsb3vGccZsXI16VzTBw52Xx0DWmtnA==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.22.15", + "@babel/helper-compilation-targets": "^7.22.15", + "@babel/helper-module-transforms": "^7.22.20", + "@babel/helpers": "^7.22.15", + "@babel/parser": "^7.22.16", + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.22.20", + "@babel/types": "^7.22.19", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + }, + "node_modules/@babel/generator": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.15.tgz", + "integrity": "sha512-Zu9oWARBqeVOW0dZOjXc3JObrzuqothQ3y/n1kUtrjCoCPLkXUwMvOo/F/TCfoHMbWIFlWwpZtkZVb9ga4U2pA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.15", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz", + "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.22.9", + "@babel/helper-validator-option": "^7.22.15", + "browserslist": "^4.21.9", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", + "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "dev": true, + "dependencies": { + "@babel/template": "^7.22.5", + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", + "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.15" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.0.tgz", + "integrity": "sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-module-imports": "^7.22.15", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.20" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", + "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", + "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz", + "integrity": "sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.15.tgz", + "integrity": "sha512-7pAjK0aSdxOwR+CcYAqgWOGy5dcfvzsTIfFTb2odQqW47MDfv14UaJDY6eng8ylM2EaeKXdxaSWESbkmaQHTmw==", + "dev": true, + "dependencies": { + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.22.15", + "@babel/types": "^7.22.15" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.13.tgz", + "integrity": "sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.22.5", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/parser": { + "version": "7.22.16", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.16.tgz", + "integrity": "sha512-+gPfKv8UWeKKeJTUxe59+OobVcrYHETCsORl61EmSkmgymguYk/X5bp7GuUIXaFsc6y++v8ZxPsLSSuujqDphA==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz", + "integrity": "sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz", + "integrity": "sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-commonjs": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.23.0.tgz", + "integrity": "sha512-32Xzss14/UVc7k9g775yMIvkVK8xwKE0DPdP5JTapr3+Z9w4tzeOuLNY6BXDQR6BdnzIlXnCGAzsk/ICHBLVWQ==", + "dev": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.23.0", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-simple-access": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.20.tgz", + "integrity": "sha512-eU260mPZbU7mZ0N+X10pxXhQFMGTeLb9eFS0mxehS8HZp9o1uSnFeWQuG1UPrlxgA7QoUzFhOnilHDp0AXCyHw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.22.15", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.22.16", + "@babel/types": "^7.22.19", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.22.19", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.19.tgz", + "integrity": "sha512-P7LAw/LbojPzkgp5oznjE6tQEIWbp4PkkfrZDINTro9zgBRtI324/EYsiSI7lhPbpIQ+DCeR2NNmMWANGGfZsg==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.19", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "node_modules/@discoveryjs/json-ext": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", + "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/console": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/core": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/environment": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", + "dev": true, + "dependencies": { + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "dev": true, + "dependencies": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.6.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/fake-timers": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/globals": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/reporters": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", + "dev": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/source-map": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-result": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-sequencer": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", + "dev": true, + "dependencies": { + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz", + "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", + "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@jsdoc/salty": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.5.tgz", + "integrity": "sha512-TfRP53RqunNe2HBobVBJ0VLhK1HbfvBYeTC1ahnN64PWvyYyGebmMiPkuwvD9fpw2ZbkoPb8Q7mwy0aR8Z9rvw==", + "dev": true, + "dependencies": { + "lodash": "^4.17.21" + }, + "engines": { + "node": ">=v12.0.0" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.0.2.tgz", + "integrity": "sha512-xDvk1pT4vaPU2BOLy0MqHMdYZyntqpaBf8RhBiezlqG9OjY8F50TyctHo8znigYKd+QCFhCmlmXHOL/LoaOl3w==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.0.2.tgz", + "integrity": "sha512-lqCglytY3E6raze27DD9VQJWohbwCxzqs9aSHcj5X/8hJpzZfNdbsr4Ja9Hqp6iPyF53+5PtPx0pKRlkSvlHZg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.0.2.tgz", + "integrity": "sha512-nkBKItS6E6CCzvRwgiKad+j+1ibmL7SIInj7oqMWmdkCjiSX6VeVZw2mLlRKIUL+JjsBgpATTfo7BiAXc1v0jA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.0.2.tgz", + "integrity": "sha512-vX2C8xvWPIbpEgQht95+dY6BReKAvtDgPDGi0XN0kWJKkm4WdNmq5dnwscv/zxvi+n6jUTBhs6GtpkkWT4q8Gg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.0.2.tgz", + "integrity": "sha512-DVFIfcHOjgmeHOAqji4xNz2wczt1Bmzy9MwBZKBa83SjBVO/i38VHDR+9ixo8QpBOiEagmNw12DucG+v55tCrg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.0.2.tgz", + "integrity": "sha512-GCK/a9ItUxPI0V5hQEJjH4JtOJO90GF2Hja7TO+EZ8rmkGvEi8/ZDMhXmcuDpQT7/PWrTT9RvnG8snMd5SrhBQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.0.2.tgz", + "integrity": "sha512-cLuBp7rOjIB1R2j/VazjCmHC7liWUur2e9mFflLJBAWCkrZ+X0+QwHLvOQakIwDymungzAKv6W9kHZnTp/Mqrg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.0.2.tgz", + "integrity": "sha512-Zqw4iVnJr2naoyQus0yLy7sLtisCQcpdMKUCeXPBjkJtpiflRime/TMojbnl8O3oxUAj92mxr+t7im/RbgA20w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.0.2.tgz", + "integrity": "sha512-jJRU9TyUD/iMqjf8aLAp7XiN3pIj5v6Qcu+cdzBfVTKDD0Fvua4oUoK8eVJ9ZuKBEQKt3WdlcwJXFkpmMLk6kg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.0.2.tgz", + "integrity": "sha512-ZkS2NixCxHKC4zbOnw64ztEGGDVIYP6nKkGBfOAxEPW71Sji9v8z3yaHNuae/JHPwXA+14oDefnOuVfxl59SmQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.0.2.tgz", + "integrity": "sha512-3SKjj+tvnZ0oZq2BKB+fI+DqYI83VrRzk7eed8tJkxeZ4zxJZcLSE8YDQLYGq1tZAnAX+H076RHHB4gTZXsQzw==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.0.2.tgz", + "integrity": "sha512-MBdJIOxRauKkry7t2q+rTHa3aWjVez2eioWg+etRVS3dE4tChhmt5oqZYr48R6bPmcwEhxQr96gVRfeQrLbqng==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true + }, + "node_modules/@sinonjs/commons": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", + "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^3.0.0" + } + }, + "node_modules/@types/babel__core": { + "version": "7.20.1", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.1.tgz", + "integrity": "sha512-aACu/U/omhdk15O4Nfb+fHgH/z3QsfQzpnvRZhYhThms83ZnAOZz7zZAWO7mn2yyNQaA4xTO8GLK3uqFU4bYYw==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.6.4", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", + "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", + "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.20.1", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.1.tgz", + "integrity": "sha512-MitHFXnhtgwsGZWtT68URpOvLN4EREih1u3QtQiN4VdAxWKRVvGCSvw/Qth0M0Qq3pJpnGOu5JaM/ydK7OGbqg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.20.7" + } + }, + "node_modules/@types/eslint": { + "version": "8.44.3", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.3.tgz", + "integrity": "sha512-iM/WfkwAhwmPff3wZuPLYiHX18HI24jU8k1ZSH7P8FHwxTjZ2P6CoX2wnF43oprR+YXJM6UUxATkNvyv/JHd+g==", + "dev": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint-scope": { + "version": "3.7.5", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.5.tgz", + "integrity": "sha512-JNvhIEyxVW6EoMIFIvj93ZOywYFatlpu9deeH6eSx6PE3WHYvHaQtmHmQeNw7aA81bYGBPPQqdtBm6b1SsQMmA==", + "dev": true, + "dependencies": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.2.tgz", + "integrity": "sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA==", + "dev": true + }, + "node_modules/@types/graceful-fs": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz", + "integrity": "sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", + "dev": true + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", + "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.13", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.13.tgz", + "integrity": "sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==", + "dev": true + }, + "node_modules/@types/linkify-it": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.3.tgz", + "integrity": "sha512-pTjcqY9E4nOI55Wgpz7eiI8+LzdYnw3qxXCfHyBDdPbYvbyLgWLJGh8EdPvqawwMK1Uo1794AUkkR38Fr0g+2g==", + "dev": true + }, + "node_modules/@types/markdown-it": { + "version": "12.2.3", + "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-12.2.3.tgz", + "integrity": "sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ==", + "dev": true, + "dependencies": { + "@types/linkify-it": "*", + "@types/mdurl": "*" + } + }, + "node_modules/@types/mdurl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.3.tgz", + "integrity": "sha512-T5k6kTXak79gwmIOaDF2UUQXFbnBE0zBUzF20pz7wDYu0RQMzWg+Ml/Pz50214NsFHBITkoi5VtdjFZnJ2ijjA==", + "dev": true + }, + "node_modules/@types/node": { + "version": "20.6.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.0.tgz", + "integrity": "sha512-najjVq5KN2vsH2U/xyh2opaSEz6cZMR2SetLIlxlj08nOcmPOemJmUK2o4kUzfLqfrWE0PIrNeE16XhYDd3nqg==", + "dev": true + }, + "node_modules/@types/resolve": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz", + "integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/stack-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", + "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", + "dev": true + }, + "node_modules/@types/yargs": { + "version": "17.0.24", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.24.tgz", + "integrity": "sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", + "dev": true + }, + "node_modules/@webassemblyjs/ast": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", + "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", + "dev": true, + "dependencies": { + "@webassemblyjs/helper-numbers": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", + "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", + "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", + "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-numbers": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", + "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", + "dev": true, + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", + "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", + "dev": true + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", + "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/wasm-gen": "1.11.6" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", + "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", + "dev": true, + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", + "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", + "dev": true, + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", + "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", + "dev": true + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", + "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/helper-wasm-section": "1.11.6", + "@webassemblyjs/wasm-gen": "1.11.6", + "@webassemblyjs/wasm-opt": "1.11.6", + "@webassemblyjs/wasm-parser": "1.11.6", + "@webassemblyjs/wast-printer": "1.11.6" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", + "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", + "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/wasm-gen": "1.11.6", + "@webassemblyjs/wasm-parser": "1.11.6" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", + "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", + "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", + "dev": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.6", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webpack-cli/configtest": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", + "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", + "dev": true, + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "webpack": "5.x.x", + "webpack-cli": "5.x.x" + } + }, + "node_modules/@webpack-cli/info": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", + "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", + "dev": true, + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "webpack": "5.x.x", + "webpack-cli": "5.x.x" + } + }, + "node_modules/@webpack-cli/serve": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", + "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", + "dev": true, + "engines": { + "node": ">=14.15.0" + }, + "peerDependencies": { + "webpack": "5.x.x", + "webpack-cli": "5.x.x" + }, + "peerDependenciesMeta": { + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true + }, + "node_modules/acorn": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-import-assertions": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", + "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", + "dev": true, + "peerDependencies": { + "acorn": "^8" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "node_modules/axios": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.1.tgz", + "integrity": "sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==", + "dependencies": { + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha512-XqYMR2dfdGMW+hd0IUZ2PwK+fGeFkOxZJ0wY+JaQAHzt1Zx8LcvpiZD2NiGkEG8qx0CfkAOr5xt76d1e8vG90g==", + "dev": true, + "dependencies": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + } + }, + "node_modules/babel-code-frame/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-code-frame/node_modules/ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-code-frame/node_modules/chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "dev": true, + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-code-frame/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/babel-code-frame/node_modules/js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha512-RjTcuD4xjtthQkaWH7dFlH85L+QaVtSoOyGdZ3g6HFhS9dFNDfLyqgm2NFe2X6cQpeFmt0452FJjFG5UameExg==", + "dev": true + }, + "node_modules/babel-code-frame/node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-code-frame/node_modules/supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/babel-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", + "dev": true, + "dependencies": { + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" + } + }, + "node_modules/babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha512-Bl3ZiA+LjqaMtNYopA9TYE9HP1tQ+E5dLxE0XrAzcIJeK2UqF0/EaqXwBn9esd4UmTfEab+P+UYQ1GnioFIb/w==", + "dev": true, + "dependencies": { + "babel-runtime": "^6.22.0" + } + }, + "node_modules/babel-plugin-import-to-require": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-import-to-require/-/babel-plugin-import-to-require-1.0.0.tgz", + "integrity": "sha512-dc843CwrFivjO8AVgxcHvxl0cb7J7Ed8ZGFP8+PjH3X1CnyzYtAU1WL1349m9Wc/+oqk4ETx2+cIEO2jlp3XyQ==", + "dev": true, + "dependencies": { + "babel-template": "^6.26.0" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-jest-hoist": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", + "dev": true, + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "dev": true, + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/babel-preset-jest": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "dev": true, + "dependencies": { + "babel-plugin-jest-hoist": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==", + "dev": true, + "dependencies": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "node_modules/babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha512-PCOcLFW7/eazGUKIoqH97sO9A2UYMahsn/yRQ7uOk37iutwjq7ODtcTNF+iFDSHNfkctqsLRjLP7URnOx0T1fg==", + "dev": true, + "dependencies": { + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" + } + }, + "node_modules/babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha512-iSxeXx7apsjCHe9c7n8VtRXGzI2Bk1rBSOJgCCjfyXb6v1aCqE1KSEpq/8SXuVN8Ka/Rh1WDTF0MDzkvTA4MIA==", + "dev": true, + "dependencies": { + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" + } + }, + "node_modules/babel-traverse/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/babel-traverse/node_modules/globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babel-traverse/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha512-zhe3V/26rCWsEZK8kZN+HaQj5yQ1CilTObixFzKW1UWjqG7618Twz6YEsCnjfg5gBcJh02DrpCkS9h98ZqDY+g==", + "dev": true, + "dependencies": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + } + }, + "node_modules/babel-types/node_modules/to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha512-lxrWP8ejsq+7E3nNjwYmUBMAgjMTZoTI+sdBOpvNyijeDLa29LUn9QaoXAHv4+Z578hbmHHJKZknzxVtvo77og==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true, + "bin": { + "babylon": "bin/babylon.js" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-resolve": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-2.0.0.tgz", + "integrity": "sha512-7sWsQlYL2rGLy2IWm8WL8DCTJvYLc/qlOnsakDac87SOoCd16WLsaAMdCiAqsTNHIe+SXfaqyxyo6THoWqs8WQ==", + "dependencies": { + "resolve": "^1.17.0" + } + }, + "node_modules/browserslist": { + "version": "4.21.10", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz", + "integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001517", + "electron-to-chromium": "^1.4.477", + "node-releases": "^2.0.13", + "update-browserslist-db": "^1.0.11" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/builtin-modules": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", + "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cached-path-relative": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.1.0.tgz", + "integrity": "sha512-WF0LihfemtesFcJgO7xfOoOcnWzY/QHR4qeDqV44jPU3HTI54+LnfXK3SA27AVVGCdZFgjjFFaqUA9Jx7dMJZA==", + "dev": true + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001534", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001534.tgz", + "integrity": "sha512-vlPVrhsCS7XaSh2VvWluIQEzVhefrUQcEsQWSS5A5V+dM07uv1qHeQzAOTGIMy9i3e9bH15+muvI/UHojVgS/Q==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, + "node_modules/catharsis": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz", + "integrity": "sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==", + "dev": true, + "dependencies": { + "lodash": "^4.17.15" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "dev": true, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/ci-info": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } + }, + "node_modules/cjs-module-lexer": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", + "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", + "dev": true + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true, + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/collect-v8-coverage": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "dev": true + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "engines": [ + "node >= 0.8" + ], + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/core-js": { + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", + "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.", + "dev": true, + "hasInstallScript": true + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/cross-fetch": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", + "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", + "dev": true, + "dependencies": { + "node-fetch": "^2.6.12" + } + }, + "node_modules/cross-fetch/node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dev": true, + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", + "engines": { + "node": ">= 12" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/dedent": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", + "integrity": "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==", + "dev": true, + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==", + "dev": true, + "dependencies": { + "readable-stream": "^2.0.2" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.4.519", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.519.tgz", + "integrity": "sha512-kqs9oGYL4UFVkLKhqCTgBCYZv+wZ374yABDMqlDda9HvlkQxvSr7kgf4hfWVjMieDbX+1MwPHFBsOGCMIBaFKg==", + "dev": true + }, + "node_modules/emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/enhanced-resolve": { + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", + "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/entities": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", + "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", + "dev": true, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/envinfo": { + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.10.0.tgz", + "integrity": "sha512-ZtUjZO6l5mwTHvc1L9+1q5p/R3wTopcfqMW8r5t8SJSKqeVI/LtajORwRFEKpEFuekjD0VBjwu1HMxL4UalIRw==", + "dev": true, + "bin": { + "envinfo": "dist/cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-module-lexer": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.1.tgz", + "integrity": "sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q==", + "dev": true + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/esmify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/esmify/-/esmify-2.1.1.tgz", + "integrity": "sha512-GyOVgjG7sNyYB5Mbo15Ll4aGrcXZzZ3LI22rbLOjCI7L/wYelzQpBHRZkZkqbPNZ/QIRilcaHqzgNCLcEsi1lQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.2.2", + "@babel/plugin-syntax-async-generators": "^7.2.0", + "@babel/plugin-syntax-dynamic-import": "^7.2.0", + "@babel/plugin-syntax-object-rest-spread": "^7.2.0", + "@babel/plugin-transform-modules-commonjs": "^7.2.0", + "babel-plugin-import-to-require": "^1.0.0", + "cached-path-relative": "^1.0.2", + "concat-stream": "^1.6.2", + "duplexer2": "^0.1.4", + "through2": "^2.0.5" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", + "dev": true, + "dependencies": { + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fastest-levenshtein": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", + "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", + "dev": true, + "engines": { + "node": ">= 4.9.1" + } + }, + "node_modules/fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "dependencies": { + "bser": "2.1.1" + } + }, + "node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "dependencies": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-ansi/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/import-local": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "dev": true, + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/interpret": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", + "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", + "dev": true, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dev": true, + "dependencies": { + "loose-envify": "^1.0.0" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "node_modules/is-core-module": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", + "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", + "dev": true + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-reference": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", + "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", + "dev": true, + "dependencies": { + "@types/estree": "*" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.0.tgz", + "integrity": "sha512-x58orMzEVfzPUKqlbLd1hXCnySCxKdDKa6Rjg97CwuLLRI4g3FHTdnExu1OqffVFay6zeMW+T6/DowFLndWnIw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", + "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", + "dev": true, + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", + "import-local": "^3.0.2", + "jest-cli": "^29.7.0" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-changed-files": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", + "dev": true, + "dependencies": { + "execa": "^5.0.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^1.0.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-cli": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", + "dev": true, + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "create-jest": "^29.7.0", + "exit": "^0.1.2", + "import-local": "^3.0.2", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-config": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-docblock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", + "dev": true, + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-each": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-environment-node": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-fetch-mock": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/jest-fetch-mock/-/jest-fetch-mock-3.0.3.tgz", + "integrity": "sha512-Ux1nWprtLrdrH4XwE7O7InRY6psIi3GOsqNESJgMJ+M5cv4A8Lh7SN9d2V2kKRZ8ebAfcd1LNyZguAOb6JiDqw==", + "dev": true, + "dependencies": { + "cross-fetch": "^3.0.4", + "promise-polyfill": "^8.1.3" + } + }, + "node_modules/jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-haste-map": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "node_modules/jest-leak-detector": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-message-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-mock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true, + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve-dependencies": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", + "dev": true, + "dependencies": { + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runtime": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "natural-compare": "^1.4.0", + "pretty-format": "^29.7.0", + "semver": "^7.5.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jest-snapshot/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jest-snapshot/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/jest-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "leven": "^3.1.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-watcher": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", + "dev": true, + "dependencies": { + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "dev": true, + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/js2xmlparser": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.2.tgz", + "integrity": "sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA==", + "dev": true, + "dependencies": { + "xmlcreate": "^2.0.4" + } + }, + "node_modules/jsdoc": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.2.tgz", + "integrity": "sha512-e8cIg2z62InH7azBBi3EsSEqrKx+nUtAS5bBcYTSpZFA+vhNPyhv8PTFZ0WsjOPDj04/dOLlm08EDcQJDqaGQg==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.20.15", + "@jsdoc/salty": "^0.2.1", + "@types/markdown-it": "^12.2.3", + "bluebird": "^3.7.2", + "catharsis": "^0.9.0", + "escape-string-regexp": "^2.0.0", + "js2xmlparser": "^4.0.2", + "klaw": "^3.0.0", + "markdown-it": "^12.3.2", + "markdown-it-anchor": "^8.4.1", + "marked": "^4.0.10", + "mkdirp": "^1.0.4", + "requizzle": "^0.2.3", + "strip-json-comments": "^3.1.0", + "underscore": "~1.13.2" + }, + "bin": { + "jsdoc": "jsdoc.js" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/klaw": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", + "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.9" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "node_modules/linkify-it": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", + "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", + "dev": true, + "dependencies": { + "uc.micro": "^1.0.1" + } + }, + "node_modules/loader-runner": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "dev": true, + "engines": { + "node": ">=6.11.5" + } + }, + "node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/magic-string": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", + "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", + "dev": true, + "dependencies": { + "sourcemap-codec": "^1.4.8" + } + }, + "node_modules/mainflux-sdk": { + "version": "0.14.33", + "resolved": "https://registry.npmjs.org/mainflux-sdk/-/mainflux-sdk-0.14.33.tgz", + "integrity": "sha512-2v1ByIqB9/+K+0Y2zz99UNYquWMn9t9r1490fd6SNFRy9TtO61KoObOA5Igl94ZKz0cjngYFr55irUbxqgQuHA==", + "dependencies": { + "axios": "^1.5.0", + "node-fetch": "^3.3.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-dir/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "dependencies": { + "tmpl": "1.0.5" + } + }, + "node_modules/markdown-it": { + "version": "12.3.2", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz", + "integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1", + "entities": "~2.1.0", + "linkify-it": "^3.0.1", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" + }, + "bin": { + "markdown-it": "bin/markdown-it.js" + } + }, + "node_modules/markdown-it-anchor": { + "version": "8.6.7", + "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz", + "integrity": "sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA==", + "dev": true, + "peerDependencies": { + "@types/markdown-it": "*", + "markdown-it": "*" + } + }, + "node_modules/markdown-it/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/marked": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", + "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", + "dev": true, + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", + "dev": true + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "engines": { + "node": ">=10.5.0" + } + }, + "node_modules/node-fetch": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", + "dependencies": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" + } + }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true + }, + "node_modules/node-releases": { + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", + "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", + "dev": true + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-locate/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pirates": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/prettier": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", + "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "node_modules/promise-polyfill": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-8.3.0.tgz", + "integrity": "sha512-H5oELycFml5yto/atYqmjyigJoAo3+OXwolYiH7OfQuYlAqhxNvTfiNMbV9hsC6Yp83yE5r2KTVmtrG6R9i6Pg==", + "dev": true + }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, + "node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/pure-rand": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.3.tgz", + "integrity": "sha512-KddyFewCsO0j3+np81IQ+SweXLDnDQTs5s67BOnrYmYe/yNmUhttQyGsYzy8yUnoljGAQ9sl38YB4vH8ur7Y+w==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ] + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readable-stream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/rechoir": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", + "dev": true, + "dependencies": { + "resolve": "^1.20.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/requizzle": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.4.tgz", + "integrity": "sha512-JRrFk1D4OQ4SqovXOgdav+K8EAhSB/LJZqCz8tbX0KObcdeM15Ss59ozWMBWmmINMagCwmqn4ZNryUGpBsl6Jw==", + "dev": true, + "dependencies": { + "lodash": "^4.17.21" + } + }, + "node_modules/resolve": { + "version": "1.22.4", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", + "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve.exports": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/rollup": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.0.2.tgz", + "integrity": "sha512-MCScu4usMPCeVFaiLcgMDaBQeYi1z6vpWxz0r0hq0Hv77Y2YuOTZldkuNJ54BdYBH3e+nkrk6j0Rre/NLDBYzg==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.0.2", + "@rollup/rollup-android-arm64": "4.0.2", + "@rollup/rollup-darwin-arm64": "4.0.2", + "@rollup/rollup-darwin-x64": "4.0.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.0.2", + "@rollup/rollup-linux-arm64-gnu": "4.0.2", + "@rollup/rollup-linux-arm64-musl": "4.0.2", + "@rollup/rollup-linux-x64-gnu": "4.0.2", + "@rollup/rollup-linux-x64-musl": "4.0.2", + "@rollup/rollup-win32-arm64-msvc": "4.0.2", + "@rollup/rollup-win32-ia32-msvc": "4.0.2", + "@rollup/rollup-win32-x64-msvc": "4.0.2", + "fsevents": "~2.3.2" + } + }, + "node_modules/rollup-plugin-commonjs": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-10.1.0.tgz", + "integrity": "sha512-jlXbjZSQg8EIeAAvepNwhJj++qJWNJw1Cl0YnOqKtP5Djx+fFGkp3WRh+W0ASCaFG5w1jhmzDxgu3SJuVxPF4Q==", + "deprecated": "This package has been deprecated and is no longer maintained. Please use @rollup/plugin-commonjs.", + "dev": true, + "dependencies": { + "estree-walker": "^0.6.1", + "is-reference": "^1.1.2", + "magic-string": "^0.25.2", + "resolve": "^1.11.0", + "rollup-pluginutils": "^2.8.1" + }, + "peerDependencies": { + "rollup": ">=1.12.0" + } + }, + "node_modules/rollup-plugin-node-resolve": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-5.2.0.tgz", + "integrity": "sha512-jUlyaDXts7TW2CqQ4GaO5VJ4PwwaV8VUGA7+km3n6k6xtOEacf61u0VXwN80phY/evMcaS+9eIeJ9MOyDxt5Zw==", + "deprecated": "This package has been deprecated and is no longer maintained. Please use @rollup/plugin-node-resolve.", + "dev": true, + "dependencies": { + "@types/resolve": "0.0.8", + "builtin-modules": "^3.1.0", + "is-module": "^1.0.0", + "resolve": "^1.11.1", + "rollup-pluginutils": "^2.8.1" + }, + "peerDependencies": { + "rollup": ">=1.11.0" + } + }, + "node_modules/rollup-pluginutils": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", + "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", + "dev": true, + "dependencies": { + "estree-walker": "^0.6.1" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/schema-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", + "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "deprecated": "Please use @jridgewell/sourcemap-codec instead", + "dev": true + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string_decoder/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/terser": { + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.21.0.tgz", + "integrity": "sha512-WtnFKrxu9kaoXuiZFSGrcAvvBqAdmKx0SFNmVNYdJamMu9yyN3I/QF0FbH4QcqJQ+y1CJnzxGIKH0cSj+FGYRw==", + "dev": true, + "dependencies": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser-webpack-plugin": { + "version": "5.3.9", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", + "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.17", + "jest-worker": "^27.4.5", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.1", + "terser": "^5.16.8" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "uglify-js": { + "optional": true + } + } + }, + "node_modules/terser-webpack-plugin/node_modules/jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/terser-webpack-plugin/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/terser/node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "dependencies": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "node_modules/tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", + "dev": true + }, + "node_modules/uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", + "dev": true + }, + "node_modules/underscore": { + "version": "1.13.6", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", + "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", + "dev": true + }, + "node_modules/update-browserslist-db": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", + "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/v8-to-istanbul": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz", + "integrity": "sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/v8-to-istanbul/node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + }, + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "dependencies": { + "makeerror": "1.0.12" + } + }, + "node_modules/watchpack": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "dev": true, + "dependencies": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/web-streams-polyfill": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", + "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true + }, + "node_modules/webpack": { + "version": "5.88.2", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.88.2.tgz", + "integrity": "sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ==", + "dev": true, + "dependencies": { + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^1.0.0", + "@webassemblyjs/ast": "^1.11.5", + "@webassemblyjs/wasm-edit": "^1.11.5", + "@webassemblyjs/wasm-parser": "^1.11.5", + "acorn": "^8.7.1", + "acorn-import-assertions": "^1.9.0", + "browserslist": "^4.14.5", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.15.0", + "es-module-lexer": "^1.2.1", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.9", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.2.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.3.7", + "watchpack": "^2.4.0", + "webpack-sources": "^3.2.3" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-cli": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz", + "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", + "dev": true, + "dependencies": { + "@discoveryjs/json-ext": "^0.5.0", + "@webpack-cli/configtest": "^2.1.1", + "@webpack-cli/info": "^2.0.2", + "@webpack-cli/serve": "^2.0.5", + "colorette": "^2.0.14", + "commander": "^10.0.1", + "cross-spawn": "^7.0.3", + "envinfo": "^7.7.3", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^3.1.1", + "rechoir": "^0.8.0", + "webpack-merge": "^5.7.3" + }, + "bin": { + "webpack-cli": "bin/cli.js" + }, + "engines": { + "node": ">=14.15.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "5.x.x" + }, + "peerDependenciesMeta": { + "@webpack-cli/generators": { + "optional": true + }, + "webpack-bundle-analyzer": { + "optional": true + }, + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/webpack-cli/node_modules/commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "dev": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/webpack-merge": { + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.9.0.tgz", + "integrity": "sha512-6NbRQw4+Sy50vYNTw7EyOn41OZItPiXB8GNv3INSoe3PSFaHJEz3SHTrYVaRm2LilNGnFUzh0FAwqPEmU/CwDg==", + "dev": true, + "dependencies": { + "clone-deep": "^4.0.1", + "wildcard": "^2.0.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/webpack-sources": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "dev": true, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wildcard": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", + "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", + "dev": true + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/xmlcreate": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.4.tgz", + "integrity": "sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==", + "dev": true + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, + "engines": { + "node": ">=0.4" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + }, + "dependencies": { + "@ampproject/remapping": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", + "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "dev": true, + "requires": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@babel/code-frame": { + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "dev": true, + "requires": { + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@babel/compat-data": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.20.tgz", + "integrity": "sha512-BQYjKbpXjoXwFW5jGqiizJQQT/aC7pFm9Ok1OWssonuguICi264lbgMzRp2ZMmRSlfkX6DsWDDcsrctK8Rwfiw==", + "dev": true + }, + "@babel/core": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.20.tgz", + "integrity": "sha512-Y6jd1ahLubuYweD/zJH+vvOY141v4f9igNQAQ+MBgq9JlHS2iTsZKn1aMsb3vGccZsXI16VzTBw52Xx0DWmtnA==", + "dev": true, + "requires": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.22.15", + "@babel/helper-compilation-targets": "^7.22.15", + "@babel/helper-module-transforms": "^7.22.20", + "@babel/helpers": "^7.22.15", + "@babel/parser": "^7.22.16", + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.22.20", + "@babel/types": "^7.22.19", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "dependencies": { + "convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + } + } + }, + "@babel/generator": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.15.tgz", + "integrity": "sha512-Zu9oWARBqeVOW0dZOjXc3JObrzuqothQ3y/n1kUtrjCoCPLkXUwMvOo/F/TCfoHMbWIFlWwpZtkZVb9ga4U2pA==", + "dev": true, + "requires": { + "@babel/types": "^7.22.15", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + } + }, + "@babel/helper-compilation-targets": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz", + "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.22.9", + "@babel/helper-validator-option": "^7.22.15", + "browserslist": "^4.21.9", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + } + }, + "@babel/helper-environment-visitor": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "dev": true + }, + "@babel/helper-function-name": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz", + "integrity": "sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==", + "dev": true, + "requires": { + "@babel/template": "^7.22.5", + "@babel/types": "^7.22.5" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "dev": true, + "requires": { + "@babel/types": "^7.22.5" + } + }, + "@babel/helper-module-imports": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", + "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", + "dev": true, + "requires": { + "@babel/types": "^7.22.15" + } + }, + "@babel/helper-module-transforms": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.0.tgz", + "integrity": "sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw==", + "dev": true, + "requires": { + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-module-imports": "^7.22.15", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.20" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", + "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", + "dev": true + }, + "@babel/helper-simple-access": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", + "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", + "dev": true, + "requires": { + "@babel/types": "^7.22.5" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "dev": true, + "requires": { + "@babel/types": "^7.22.5" + } + }, + "@babel/helper-string-parser": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "dev": true + }, + "@babel/helper-validator-identifier": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "dev": true + }, + "@babel/helper-validator-option": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz", + "integrity": "sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==", + "dev": true + }, + "@babel/helpers": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.15.tgz", + "integrity": "sha512-7pAjK0aSdxOwR+CcYAqgWOGy5dcfvzsTIfFTb2odQqW47MDfv14UaJDY6eng8ylM2EaeKXdxaSWESbkmaQHTmw==", + "dev": true, + "requires": { + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.22.15", + "@babel/types": "^7.22.15" + } + }, + "@babel/highlight": { + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.13.tgz", + "integrity": "sha512-C/BaXcnnvBCmHTpz/VGZ8jgtE2aYlW4hxDhseJAWZb7gqGM/qtCK6iZUb0TyKFf7BOUsBH7Q7fkRsDRhg1XklQ==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.22.5", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@babel/parser": { + "version": "7.22.16", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.16.tgz", + "integrity": "sha512-+gPfKv8UWeKKeJTUxe59+OobVcrYHETCsORl61EmSkmgymguYk/X5bp7GuUIXaFsc6y++v8ZxPsLSSuujqDphA==", + "dev": true + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-jsx": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz", + "integrity": "sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-typescript": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz", + "integrity": "sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.22.5" + } + }, + "@babel/plugin-transform-modules-commonjs": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.23.0.tgz", + "integrity": "sha512-32Xzss14/UVc7k9g775yMIvkVK8xwKE0DPdP5JTapr3+Z9w4tzeOuLNY6BXDQR6BdnzIlXnCGAzsk/ICHBLVWQ==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.23.0", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/helper-simple-access": "^7.22.5" + } + }, + "@babel/template": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" + } + }, + "@babel/traverse": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.20.tgz", + "integrity": "sha512-eU260mPZbU7mZ0N+X10pxXhQFMGTeLb9eFS0mxehS8HZp9o1uSnFeWQuG1UPrlxgA7QoUzFhOnilHDp0AXCyHw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.22.15", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.22.16", + "@babel/types": "^7.22.19", + "debug": "^4.1.0", + "globals": "^11.1.0" + } + }, + "@babel/types": { + "version": "7.22.19", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.19.tgz", + "integrity": "sha512-P7LAw/LbojPzkgp5oznjE6tQEIWbp4PkkfrZDINTro9zgBRtI324/EYsiSI7lhPbpIQ+DCeR2NNmMWANGGfZsg==", + "dev": true, + "requires": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.19", + "to-fast-properties": "^2.0.0" + } + }, + "@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "@discoveryjs/json-ext": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", + "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "dev": true + }, + "@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + } + }, + "@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true + }, + "@jest/console": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", + "dev": true, + "requires": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0" + } + }, + "@jest/core": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", + "dev": true, + "requires": { + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "@jest/environment": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", + "dev": true, + "requires": { + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" + } + }, + "@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "dev": true, + "requires": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + } + }, + "@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dev": true, + "requires": { + "jest-get-type": "^29.6.3" + } + }, + "@jest/fake-timers": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", + "dev": true, + "requires": { + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + } + }, + "@jest/globals": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", + "dev": true, + "requires": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" + } + }, + "@jest/reporters": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", + "dev": true, + "requires": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + } + }, + "@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "requires": { + "@sinclair/typebox": "^0.27.8" + } + }, + "@jest/source-map": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + } + }, + "@jest/test-result": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", + "dev": true, + "requires": { + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + } + }, + "@jest/test-sequencer": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", + "dev": true, + "requires": { + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" + } + }, + "@jest/transform": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + } + }, + "@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + } + }, + "@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true + }, + "@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true + }, + "@jridgewell/source-map": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz", + "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==", + "dev": true, + "requires": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.19", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", + "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "@jsdoc/salty": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.5.tgz", + "integrity": "sha512-TfRP53RqunNe2HBobVBJ0VLhK1HbfvBYeTC1ahnN64PWvyYyGebmMiPkuwvD9fpw2ZbkoPb8Q7mwy0aR8Z9rvw==", + "dev": true, + "requires": { + "lodash": "^4.17.21" + } + }, + "@rollup/rollup-android-arm-eabi": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.0.2.tgz", + "integrity": "sha512-xDvk1pT4vaPU2BOLy0MqHMdYZyntqpaBf8RhBiezlqG9OjY8F50TyctHo8znigYKd+QCFhCmlmXHOL/LoaOl3w==", + "dev": true, + "optional": true + }, + "@rollup/rollup-android-arm64": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.0.2.tgz", + "integrity": "sha512-lqCglytY3E6raze27DD9VQJWohbwCxzqs9aSHcj5X/8hJpzZfNdbsr4Ja9Hqp6iPyF53+5PtPx0pKRlkSvlHZg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-darwin-arm64": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.0.2.tgz", + "integrity": "sha512-nkBKItS6E6CCzvRwgiKad+j+1ibmL7SIInj7oqMWmdkCjiSX6VeVZw2mLlRKIUL+JjsBgpATTfo7BiAXc1v0jA==", + "dev": true, + "optional": true + }, + "@rollup/rollup-darwin-x64": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.0.2.tgz", + "integrity": "sha512-vX2C8xvWPIbpEgQht95+dY6BReKAvtDgPDGi0XN0kWJKkm4WdNmq5dnwscv/zxvi+n6jUTBhs6GtpkkWT4q8Gg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.0.2.tgz", + "integrity": "sha512-DVFIfcHOjgmeHOAqji4xNz2wczt1Bmzy9MwBZKBa83SjBVO/i38VHDR+9ixo8QpBOiEagmNw12DucG+v55tCrg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-arm64-gnu": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.0.2.tgz", + "integrity": "sha512-GCK/a9ItUxPI0V5hQEJjH4JtOJO90GF2Hja7TO+EZ8rmkGvEi8/ZDMhXmcuDpQT7/PWrTT9RvnG8snMd5SrhBQ==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-arm64-musl": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.0.2.tgz", + "integrity": "sha512-cLuBp7rOjIB1R2j/VazjCmHC7liWUur2e9mFflLJBAWCkrZ+X0+QwHLvOQakIwDymungzAKv6W9kHZnTp/Mqrg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-x64-gnu": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.0.2.tgz", + "integrity": "sha512-Zqw4iVnJr2naoyQus0yLy7sLtisCQcpdMKUCeXPBjkJtpiflRime/TMojbnl8O3oxUAj92mxr+t7im/RbgA20w==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-x64-musl": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.0.2.tgz", + "integrity": "sha512-jJRU9TyUD/iMqjf8aLAp7XiN3pIj5v6Qcu+cdzBfVTKDD0Fvua4oUoK8eVJ9ZuKBEQKt3WdlcwJXFkpmMLk6kg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-win32-arm64-msvc": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.0.2.tgz", + "integrity": "sha512-ZkS2NixCxHKC4zbOnw64ztEGGDVIYP6nKkGBfOAxEPW71Sji9v8z3yaHNuae/JHPwXA+14oDefnOuVfxl59SmQ==", + "dev": true, + "optional": true + }, + "@rollup/rollup-win32-ia32-msvc": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.0.2.tgz", + "integrity": "sha512-3SKjj+tvnZ0oZq2BKB+fI+DqYI83VrRzk7eed8tJkxeZ4zxJZcLSE8YDQLYGq1tZAnAX+H076RHHB4gTZXsQzw==", + "dev": true, + "optional": true + }, + "@rollup/rollup-win32-x64-msvc": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.0.2.tgz", + "integrity": "sha512-MBdJIOxRauKkry7t2q+rTHa3aWjVez2eioWg+etRVS3dE4tChhmt5oqZYr48R6bPmcwEhxQr96gVRfeQrLbqng==", + "dev": true, + "optional": true + }, + "@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", + "dev": true + }, + "@sinonjs/commons": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", + "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "dev": true, + "requires": { + "@sinonjs/commons": "^3.0.0" + } + }, + "@types/babel__core": { + "version": "7.20.1", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.1.tgz", + "integrity": "sha512-aACu/U/omhdk15O4Nfb+fHgH/z3QsfQzpnvRZhYhThms83ZnAOZz7zZAWO7mn2yyNQaA4xTO8GLK3uqFU4bYYw==", + "dev": true, + "requires": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "@types/babel__generator": { + "version": "7.6.4", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", + "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@types/babel__template": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", + "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", + "dev": true, + "requires": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@types/babel__traverse": { + "version": "7.20.1", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.1.tgz", + "integrity": "sha512-MitHFXnhtgwsGZWtT68URpOvLN4EREih1u3QtQiN4VdAxWKRVvGCSvw/Qth0M0Qq3pJpnGOu5JaM/ydK7OGbqg==", + "dev": true, + "requires": { + "@babel/types": "^7.20.7" + } + }, + "@types/eslint": { + "version": "8.44.3", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.3.tgz", + "integrity": "sha512-iM/WfkwAhwmPff3wZuPLYiHX18HI24jU8k1ZSH7P8FHwxTjZ2P6CoX2wnF43oprR+YXJM6UUxATkNvyv/JHd+g==", + "dev": true, + "requires": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "@types/eslint-scope": { + "version": "3.7.5", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.5.tgz", + "integrity": "sha512-JNvhIEyxVW6EoMIFIvj93ZOywYFatlpu9deeH6eSx6PE3WHYvHaQtmHmQeNw7aA81bYGBPPQqdtBm6b1SsQMmA==", + "dev": true, + "requires": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "@types/estree": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.2.tgz", + "integrity": "sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA==", + "dev": true + }, + "@types/graceful-fs": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz", + "integrity": "sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/istanbul-lib-coverage": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", + "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", + "dev": true + }, + "@types/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "*" + } + }, + "@types/istanbul-reports": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", + "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "dev": true, + "requires": { + "@types/istanbul-lib-report": "*" + } + }, + "@types/json-schema": { + "version": "7.0.13", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.13.tgz", + "integrity": "sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==", + "dev": true + }, + "@types/linkify-it": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-3.0.3.tgz", + "integrity": "sha512-pTjcqY9E4nOI55Wgpz7eiI8+LzdYnw3qxXCfHyBDdPbYvbyLgWLJGh8EdPvqawwMK1Uo1794AUkkR38Fr0g+2g==", + "dev": true + }, + "@types/markdown-it": { + "version": "12.2.3", + "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-12.2.3.tgz", + "integrity": "sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ==", + "dev": true, + "requires": { + "@types/linkify-it": "*", + "@types/mdurl": "*" + } + }, + "@types/mdurl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-1.0.3.tgz", + "integrity": "sha512-T5k6kTXak79gwmIOaDF2UUQXFbnBE0zBUzF20pz7wDYu0RQMzWg+Ml/Pz50214NsFHBITkoi5VtdjFZnJ2ijjA==", + "dev": true + }, + "@types/node": { + "version": "20.6.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.0.tgz", + "integrity": "sha512-najjVq5KN2vsH2U/xyh2opaSEz6cZMR2SetLIlxlj08nOcmPOemJmUK2o4kUzfLqfrWE0PIrNeE16XhYDd3nqg==", + "dev": true + }, + "@types/resolve": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz", + "integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/stack-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", + "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", + "dev": true + }, + "@types/yargs": { + "version": "17.0.24", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.24.tgz", + "integrity": "sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "@types/yargs-parser": { + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", + "dev": true + }, + "@webassemblyjs/ast": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", + "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", + "dev": true, + "requires": { + "@webassemblyjs/helper-numbers": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6" + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", + "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", + "dev": true + }, + "@webassemblyjs/helper-api-error": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", + "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", + "dev": true + }, + "@webassemblyjs/helper-buffer": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", + "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", + "dev": true + }, + "@webassemblyjs/helper-numbers": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", + "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", + "dev": true, + "requires": { + "@webassemblyjs/floating-point-hex-parser": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", + "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", + "dev": true + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", + "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/wasm-gen": "1.11.6" + } + }, + "@webassemblyjs/ieee754": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", + "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", + "dev": true, + "requires": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "@webassemblyjs/leb128": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", + "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", + "dev": true, + "requires": { + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/utf8": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", + "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", + "dev": true + }, + "@webassemblyjs/wasm-edit": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", + "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/helper-wasm-section": "1.11.6", + "@webassemblyjs/wasm-gen": "1.11.6", + "@webassemblyjs/wasm-opt": "1.11.6", + "@webassemblyjs/wasm-parser": "1.11.6", + "@webassemblyjs/wast-printer": "1.11.6" + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", + "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", + "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/wasm-gen": "1.11.6", + "@webassemblyjs/wasm-parser": "1.11.6" + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", + "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", + "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.6", + "@xtuc/long": "4.2.2" + } + }, + "@webpack-cli/configtest": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", + "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", + "dev": true, + "requires": {} + }, + "@webpack-cli/info": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", + "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", + "dev": true, + "requires": {} + }, + "@webpack-cli/serve": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", + "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", + "dev": true, + "requires": {} + }, + "@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true + }, + "@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true + }, + "acorn": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "dev": true + }, + "acorn-import-assertions": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", + "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", + "dev": true, + "requires": {} + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "requires": {} + }, + "ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "requires": { + "type-fest": "^0.21.3" + } + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "axios": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.1.tgz", + "integrity": "sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==", + "requires": { + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "babel-code-frame": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", + "integrity": "sha512-XqYMR2dfdGMW+hd0IUZ2PwK+fGeFkOxZJ0wY+JaQAHzt1Zx8LcvpiZD2NiGkEG8qx0CfkAOr5xt76d1e8vG90g==", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "esutils": "^2.0.2", + "js-tokens": "^3.0.2" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + }, + "js-tokens": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", + "integrity": "sha512-RjTcuD4xjtthQkaWH7dFlH85L+QaVtSoOyGdZ3g6HFhS9dFNDfLyqgm2NFe2X6cQpeFmt0452FJjFG5UameExg==", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "dev": true + } + } + }, + "babel-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", + "dev": true, + "requires": { + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" + } + }, + "babel-messages": { + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", + "integrity": "sha512-Bl3ZiA+LjqaMtNYopA9TYE9HP1tQ+E5dLxE0XrAzcIJeK2UqF0/EaqXwBn9esd4UmTfEab+P+UYQ1GnioFIb/w==", + "dev": true, + "requires": { + "babel-runtime": "^6.22.0" + } + }, + "babel-plugin-import-to-require": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-import-to-require/-/babel-plugin-import-to-require-1.0.0.tgz", + "integrity": "sha512-dc843CwrFivjO8AVgxcHvxl0cb7J7Ed8ZGFP8+PjH3X1CnyzYtAU1WL1349m9Wc/+oqk4ETx2+cIEO2jlp3XyQ==", + "dev": true, + "requires": { + "babel-template": "^6.26.0" + } + }, + "babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" + }, + "dependencies": { + "istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "requires": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + } + } + } + }, + "babel-plugin-jest-hoist": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", + "dev": true, + "requires": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + } + }, + "babel-preset-current-node-syntax": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "dev": true, + "requires": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + } + }, + "babel-preset-jest": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "dev": true, + "requires": { + "babel-plugin-jest-hoist": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0" + } + }, + "babel-runtime": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", + "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==", + "dev": true, + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "babel-template": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", + "integrity": "sha512-PCOcLFW7/eazGUKIoqH97sO9A2UYMahsn/yRQ7uOk37iutwjq7ODtcTNF+iFDSHNfkctqsLRjLP7URnOx0T1fg==", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "babel-traverse": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "lodash": "^4.17.4" + } + }, + "babel-traverse": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", + "integrity": "sha512-iSxeXx7apsjCHe9c7n8VtRXGzI2Bk1rBSOJgCCjfyXb6v1aCqE1KSEpq/8SXuVN8Ka/Rh1WDTF0MDzkvTA4MIA==", + "dev": true, + "requires": { + "babel-code-frame": "^6.26.0", + "babel-messages": "^6.23.0", + "babel-runtime": "^6.26.0", + "babel-types": "^6.26.0", + "babylon": "^6.18.0", + "debug": "^2.6.8", + "globals": "^9.18.0", + "invariant": "^2.2.2", + "lodash": "^4.17.4" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "globals": { + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", + "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", + "dev": true + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + } + } + }, + "babel-types": { + "version": "6.26.0", + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", + "integrity": "sha512-zhe3V/26rCWsEZK8kZN+HaQj5yQ1CilTObixFzKW1UWjqG7618Twz6YEsCnjfg5gBcJh02DrpCkS9h98ZqDY+g==", + "dev": true, + "requires": { + "babel-runtime": "^6.26.0", + "esutils": "^2.0.2", + "lodash": "^4.17.4", + "to-fast-properties": "^1.0.3" + }, + "dependencies": { + "to-fast-properties": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", + "integrity": "sha512-lxrWP8ejsq+7E3nNjwYmUBMAgjMTZoTI+sdBOpvNyijeDLa29LUn9QaoXAHv4+Z578hbmHHJKZknzxVtvo77og==", + "dev": true + } + } + }, + "babylon": { + "version": "6.18.0", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", + "dev": true + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "browser-resolve": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-2.0.0.tgz", + "integrity": "sha512-7sWsQlYL2rGLy2IWm8WL8DCTJvYLc/qlOnsakDac87SOoCd16WLsaAMdCiAqsTNHIe+SXfaqyxyo6THoWqs8WQ==", + "requires": { + "resolve": "^1.17.0" + } + }, + "browserslist": { + "version": "4.21.10", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz", + "integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001517", + "electron-to-chromium": "^1.4.477", + "node-releases": "^2.0.13", + "update-browserslist-db": "^1.0.11" + } + }, + "bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "requires": { + "node-int64": "^0.4.0" + } + }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "builtin-modules": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", + "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", + "dev": true + }, + "cached-path-relative": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.1.0.tgz", + "integrity": "sha512-WF0LihfemtesFcJgO7xfOoOcnWzY/QHR4qeDqV44jPU3HTI54+LnfXK3SA27AVVGCdZFgjjFFaqUA9Jx7dMJZA==", + "dev": true + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "caniuse-lite": { + "version": "1.0.30001534", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001534.tgz", + "integrity": "sha512-vlPVrhsCS7XaSh2VvWluIQEzVhefrUQcEsQWSS5A5V+dM07uv1qHeQzAOTGIMy9i3e9bH15+muvI/UHojVgS/Q==", + "dev": true + }, + "catharsis": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz", + "integrity": "sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==", + "dev": true, + "requires": { + "lodash": "^4.17.15" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true + }, + "chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "dev": true + }, + "ci-info": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", + "dev": true + }, + "cjs-module-lexer": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", + "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==", + "dev": true + }, + "cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + } + }, + "clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true + }, + "collect-v8-coverage": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "dev": true + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "core-js": { + "version": "2.6.12", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", + "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", + "dev": true + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, + "create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", + "dev": true, + "requires": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + } + }, + "cross-fetch": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", + "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", + "dev": true, + "requires": { + "node-fetch": "^2.6.12" + }, + "dependencies": { + "node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dev": true, + "requires": { + "whatwg-url": "^5.0.0" + } + } + } + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==" + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "dedent": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", + "integrity": "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==", + "dev": true, + "requires": {} + }, + "deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" + }, + "detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true + }, + "diff-sequences": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", + "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==", + "dev": true + }, + "duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==", + "dev": true, + "requires": { + "readable-stream": "^2.0.2" + } + }, + "electron-to-chromium": { + "version": "1.4.519", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.519.tgz", + "integrity": "sha512-kqs9oGYL4UFVkLKhqCTgBCYZv+wZ374yABDMqlDda9HvlkQxvSr7kgf4hfWVjMieDbX+1MwPHFBsOGCMIBaFKg==", + "dev": true + }, + "emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "enhanced-resolve": { + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", + "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + } + }, + "entities": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", + "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", + "dev": true + }, + "envinfo": { + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.10.0.tgz", + "integrity": "sha512-ZtUjZO6l5mwTHvc1L9+1q5p/R3wTopcfqMW8r5t8SJSKqeVI/LtajORwRFEKpEFuekjD0VBjwu1HMxL4UalIRw==", + "dev": true + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-module-lexer": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.1.tgz", + "integrity": "sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q==", + "dev": true + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, + "escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "esmify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/esmify/-/esmify-2.1.1.tgz", + "integrity": "sha512-GyOVgjG7sNyYB5Mbo15Ll4aGrcXZzZ3LI22rbLOjCI7L/wYelzQpBHRZkZkqbPNZ/QIRilcaHqzgNCLcEsi1lQ==", + "dev": true, + "requires": { + "@babel/core": "^7.2.2", + "@babel/plugin-syntax-async-generators": "^7.2.0", + "@babel/plugin-syntax-dynamic-import": "^7.2.0", + "@babel/plugin-syntax-object-rest-spread": "^7.2.0", + "@babel/plugin-transform-modules-commonjs": "^7.2.0", + "babel-plugin-import-to-require": "^1.0.0", + "cached-path-relative": "^1.0.2", + "concat-stream": "^1.6.2", + "duplexer2": "^0.1.4", + "through2": "^2.0.5" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + } + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true + }, + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true + }, + "expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", + "dev": true, + "requires": { + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fastest-levenshtein": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", + "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", + "dev": true + }, + "fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "requires": { + "bser": "2.1.1" + } + }, + "fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "requires": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "follow-redirects": { + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" + }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "requires": { + "fetch-blob": "^3.1.2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true + } + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true + }, + "import-local": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", + "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "dev": true, + "requires": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "interpret": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", + "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", + "dev": true + }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "is-core-module": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", + "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", + "requires": { + "has": "^1.0.3" + } + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true + }, + "is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", + "dev": true + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-reference": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", + "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", + "dev": true, + "requires": { + "@types/estree": "*" + } + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", + "dev": true + }, + "istanbul-lib-coverage": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "dev": true + }, + "istanbul-lib-instrument": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.0.tgz", + "integrity": "sha512-x58orMzEVfzPUKqlbLd1hXCnySCxKdDKa6Rjg97CwuLLRI4g3FHTdnExu1OqffVFay6zeMW+T6/DowFLndWnIw==", + "dev": true, + "requires": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + } + }, + "istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + } + }, + "istanbul-reports": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", + "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", + "dev": true, + "requires": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + } + }, + "jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", + "dev": true, + "requires": { + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", + "import-local": "^3.0.2", + "jest-cli": "^29.7.0" + } + }, + "jest-changed-files": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", + "dev": true, + "requires": { + "execa": "^5.0.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + } + }, + "jest-circus": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", + "dev": true, + "requires": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^1.0.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + } + }, + "jest-cli": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", + "dev": true, + "requires": { + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "create-jest": "^29.7.0", + "exit": "^0.1.2", + "import-local": "^3.0.2", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" + } + }, + "jest-config": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + } + }, + "jest-diff": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", + "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + } + }, + "jest-docblock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", + "dev": true, + "requires": { + "detect-newline": "^3.0.0" + } + }, + "jest-each": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", + "dev": true, + "requires": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" + } + }, + "jest-environment-node": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", + "dev": true, + "requires": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + } + }, + "jest-fetch-mock": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/jest-fetch-mock/-/jest-fetch-mock-3.0.3.tgz", + "integrity": "sha512-Ux1nWprtLrdrH4XwE7O7InRY6psIi3GOsqNESJgMJ+M5cv4A8Lh7SN9d2V2kKRZ8ebAfcd1LNyZguAOb6JiDqw==", + "dev": true, + "requires": { + "cross-fetch": "^3.0.4", + "promise-polyfill": "^8.1.3" + } + }, + "jest-get-type": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz", + "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==", + "dev": true + }, + "jest-haste-map": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", + "dev": true, + "requires": { + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "fsevents": "^2.3.2", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + } + }, + "jest-leak-detector": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", + "dev": true, + "requires": { + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + } + }, + "jest-matcher-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + } + }, + "jest-message-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + } + }, + "jest-mock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", + "dev": true, + "requires": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" + } + }, + "jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true, + "requires": {} + }, + "jest-regex-util": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", + "dev": true + }, + "jest-resolve": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + } + }, + "jest-resolve-dependencies": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", + "dev": true, + "requires": { + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" + } + }, + "jest-runner": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", + "dev": true, + "requires": { + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + } + }, + "jest-runtime": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "requires": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + } + }, + "jest-snapshot": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", + "dev": true, + "requires": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "natural-compare": "^1.4.0", + "pretty-format": "^29.7.0", + "semver": "^7.5.3" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "jest-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "dev": true, + "requires": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" + } + }, + "jest-validate": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", + "dev": true, + "requires": { + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "leven": "^3.1.0", + "pretty-format": "^29.7.0" + }, + "dependencies": { + "camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true + } + } + }, + "jest-watcher": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", + "dev": true, + "requires": { + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", + "string-length": "^4.0.1" + } + }, + "jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "dev": true, + "requires": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "dependencies": { + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "js2xmlparser": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.2.tgz", + "integrity": "sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA==", + "dev": true, + "requires": { + "xmlcreate": "^2.0.4" + } + }, + "jsdoc": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.2.tgz", + "integrity": "sha512-e8cIg2z62InH7azBBi3EsSEqrKx+nUtAS5bBcYTSpZFA+vhNPyhv8PTFZ0WsjOPDj04/dOLlm08EDcQJDqaGQg==", + "dev": true, + "requires": { + "@babel/parser": "^7.20.15", + "@jsdoc/salty": "^0.2.1", + "@types/markdown-it": "^12.2.3", + "bluebird": "^3.7.2", + "catharsis": "^0.9.0", + "escape-string-regexp": "^2.0.0", + "js2xmlparser": "^4.0.2", + "klaw": "^3.0.0", + "markdown-it": "^12.3.2", + "markdown-it-anchor": "^8.4.1", + "marked": "^4.0.10", + "mkdirp": "^1.0.4", + "requizzle": "^0.2.3", + "strip-json-comments": "^3.1.0", + "underscore": "~1.13.2" + } + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, + "klaw": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", + "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.9" + } + }, + "kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true + }, + "leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true + }, + "lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, + "linkify-it": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", + "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", + "dev": true, + "requires": { + "uc.micro": "^1.0.1" + } + }, + "loader-runner": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "dev": true + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "magic-string": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", + "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", + "dev": true, + "requires": { + "sourcemap-codec": "^1.4.8" + } + }, + "mainflux-sdk": { + "version": "0.14.33", + "resolved": "https://registry.npmjs.org/mainflux-sdk/-/mainflux-sdk-0.14.33.tgz", + "integrity": "sha512-2v1ByIqB9/+K+0Y2zz99UNYquWMn9t9r1490fd6SNFRy9TtO61KoObOA5Igl94ZKz0cjngYFr55irUbxqgQuHA==", + "requires": { + "axios": "^1.5.0", + "node-fetch": "^3.3.2" + } + }, + "make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "requires": { + "semver": "^7.5.3" + }, + "dependencies": { + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "dev": true, + "requires": { + "tmpl": "1.0.5" + } + }, + "markdown-it": { + "version": "12.3.2", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz", + "integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==", + "dev": true, + "requires": { + "argparse": "^2.0.1", + "entities": "~2.1.0", + "linkify-it": "^3.0.1", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" + }, + "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + } + } + }, + "markdown-it-anchor": { + "version": "8.6.7", + "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz", + "integrity": "sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA==", + "dev": true, + "requires": {} + }, + "marked": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", + "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", + "dev": true + }, + "mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", + "dev": true + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "requires": { + "mime-db": "1.52.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==" + }, + "node-fetch": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", + "requires": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + } + }, + "node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true + }, + "node-releases": { + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", + "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", + "dev": true + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + }, + "dependencies": { + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + } + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, + "pirates": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", + "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", + "dev": true + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + }, + "prettier": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", + "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "dev": true + }, + "pretty-format": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", + "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==", + "dev": true, + "requires": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "promise-polyfill": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/promise-polyfill/-/promise-polyfill-8.3.0.tgz", + "integrity": "sha512-H5oELycFml5yto/atYqmjyigJoAo3+OXwolYiH7OfQuYlAqhxNvTfiNMbV9hsC6Yp83yE5r2KTVmtrG6R9i6Pg==", + "dev": true + }, + "prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "requires": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + } + }, + "proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, + "punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "dev": true + }, + "pure-rand": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.3.tgz", + "integrity": "sha512-KddyFewCsO0j3+np81IQ+SweXLDnDQTs5s67BOnrYmYe/yNmUhttQyGsYzy8yUnoljGAQ9sl38YB4vH8ur7Y+w==", + "dev": true + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "react-is": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", + "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "dev": true + }, + "readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + }, + "rechoir": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", + "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", + "dev": true, + "requires": { + "resolve": "^1.20.0" + } + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "dev": true + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true + }, + "requizzle": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.4.tgz", + "integrity": "sha512-JRrFk1D4OQ4SqovXOgdav+K8EAhSB/LJZqCz8tbX0KObcdeM15Ss59ozWMBWmmINMagCwmqn4ZNryUGpBsl6Jw==", + "dev": true, + "requires": { + "lodash": "^4.17.21" + } + }, + "resolve": { + "version": "1.22.4", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", + "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==", + "requires": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "requires": { + "resolve-from": "^5.0.0" + } + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + }, + "resolve.exports": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", + "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", + "dev": true + }, + "rollup": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.0.2.tgz", + "integrity": "sha512-MCScu4usMPCeVFaiLcgMDaBQeYi1z6vpWxz0r0hq0Hv77Y2YuOTZldkuNJ54BdYBH3e+nkrk6j0Rre/NLDBYzg==", + "dev": true, + "requires": { + "@rollup/rollup-android-arm-eabi": "4.0.2", + "@rollup/rollup-android-arm64": "4.0.2", + "@rollup/rollup-darwin-arm64": "4.0.2", + "@rollup/rollup-darwin-x64": "4.0.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.0.2", + "@rollup/rollup-linux-arm64-gnu": "4.0.2", + "@rollup/rollup-linux-arm64-musl": "4.0.2", + "@rollup/rollup-linux-x64-gnu": "4.0.2", + "@rollup/rollup-linux-x64-musl": "4.0.2", + "@rollup/rollup-win32-arm64-msvc": "4.0.2", + "@rollup/rollup-win32-ia32-msvc": "4.0.2", + "@rollup/rollup-win32-x64-msvc": "4.0.2", + "fsevents": "~2.3.2" + } + }, + "rollup-plugin-commonjs": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-10.1.0.tgz", + "integrity": "sha512-jlXbjZSQg8EIeAAvepNwhJj++qJWNJw1Cl0YnOqKtP5Djx+fFGkp3WRh+W0ASCaFG5w1jhmzDxgu3SJuVxPF4Q==", + "dev": true, + "requires": { + "estree-walker": "^0.6.1", + "is-reference": "^1.1.2", + "magic-string": "^0.25.2", + "resolve": "^1.11.0", + "rollup-pluginutils": "^2.8.1" + } + }, + "rollup-plugin-node-resolve": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-5.2.0.tgz", + "integrity": "sha512-jUlyaDXts7TW2CqQ4GaO5VJ4PwwaV8VUGA7+km3n6k6xtOEacf61u0VXwN80phY/evMcaS+9eIeJ9MOyDxt5Zw==", + "dev": true, + "requires": { + "@types/resolve": "0.0.8", + "builtin-modules": "^3.1.0", + "is-module": "^1.0.0", + "resolve": "^1.11.1", + "rollup-pluginutils": "^2.8.1" + } + }, + "rollup-pluginutils": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", + "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", + "dev": true, + "requires": { + "estree-walker": "^0.6.1" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + }, + "schema-utils": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + }, + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true + }, + "serialize-javascript": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", + "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "sourcemap-codec": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", + "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", + "dev": true + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "requires": { + "escape-string-regexp": "^2.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + } + } + }, + "string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "requires": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + } + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, + "strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" + }, + "tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true + }, + "terser": { + "version": "5.21.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.21.0.tgz", + "integrity": "sha512-WtnFKrxu9kaoXuiZFSGrcAvvBqAdmKx0SFNmVNYdJamMu9yyN3I/QF0FbH4QcqJQ+y1CJnzxGIKH0cSj+FGYRw==", + "dev": true, + "requires": { + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", + "commander": "^2.20.0", + "source-map-support": "~0.5.20" + }, + "dependencies": { + "source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + } + } + }, + "terser-webpack-plugin": { + "version": "5.3.9", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", + "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.17", + "jest-worker": "^27.4.5", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.1", + "terser": "^5.16.8" + }, + "dependencies": { + "jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + } + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, + "test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "requires": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + } + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", + "dev": true + }, + "uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", + "dev": true + }, + "underscore": { + "version": "1.13.6", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", + "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", + "dev": true + }, + "update-browserslist-db": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", + "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "dev": true, + "requires": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + } + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "v8-to-istanbul": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz", + "integrity": "sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0" + }, + "dependencies": { + "convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + } + } + }, + "walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "requires": { + "makeerror": "1.0.12" + } + }, + "watchpack": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "dev": true, + "requires": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + } + }, + "web-streams-polyfill": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", + "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==" + }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true + }, + "webpack": { + "version": "5.88.2", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.88.2.tgz", + "integrity": "sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ==", + "dev": true, + "requires": { + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^1.0.0", + "@webassemblyjs/ast": "^1.11.5", + "@webassemblyjs/wasm-edit": "^1.11.5", + "@webassemblyjs/wasm-parser": "^1.11.5", + "acorn": "^8.7.1", + "acorn-import-assertions": "^1.9.0", + "browserslist": "^4.14.5", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.15.0", + "es-module-lexer": "^1.2.1", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.9", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.2.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.3.7", + "watchpack": "^2.4.0", + "webpack-sources": "^3.2.3" + } + }, + "webpack-cli": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz", + "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", + "dev": true, + "requires": { + "@discoveryjs/json-ext": "^0.5.0", + "@webpack-cli/configtest": "^2.1.1", + "@webpack-cli/info": "^2.0.2", + "@webpack-cli/serve": "^2.0.5", + "colorette": "^2.0.14", + "commander": "^10.0.1", + "cross-spawn": "^7.0.3", + "envinfo": "^7.7.3", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^3.1.1", + "rechoir": "^0.8.0", + "webpack-merge": "^5.7.3" + }, + "dependencies": { + "commander": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "dev": true + } + } + }, + "webpack-merge": { + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.9.0.tgz", + "integrity": "sha512-6NbRQw4+Sy50vYNTw7EyOn41OZItPiXB8GNv3INSoe3PSFaHJEz3SHTrYVaRm2LilNGnFUzh0FAwqPEmU/CwDg==", + "dev": true, + "requires": { + "clone-deep": "^4.0.1", + "wildcard": "^2.0.0" + } + }, + "webpack-sources": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "dev": true + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "wildcard": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", + "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", + "dev": true + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + } + }, + "xmlcreate": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.4.tgz", + "integrity": "sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==", + "dev": true + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "requires": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + } + }, + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 00000000..58963f25 --- /dev/null +++ b/package.json @@ -0,0 +1,52 @@ +{ + "name": "mainflux-sdk", + "version": "0.14.33", + "description": "Official Mainflux Javascript sdk", + "main": "index.js", + "engines": { + "node": ">=18.0.0" + }, + "files": [ + "index.js", + "mainflux", + "LICENSE" + ], + "scripts": { + "test": "jest", + "replace-axios-import": "find mainflux -type f -name \"*.js\" -exec sed -i 's/const axios = require(\"axios\");/import axios from \"axios\";/g' {} +", + "restore-axios-import": "find mainflux -type f -name \"*.js\" -exec sed -i 's/import axios from \"axios\";/const axios = require(\"axios\");/g' {} +", + "bundle": "npm run replace-axios-import && browserify -r ./mainflux/sdk.js:mfsdk -o bundle.js -p esmify && npm run restore-axios-import", + "format": "prettier . --write" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/mainflux/sdk-js.git" + }, + "keywords": [ + "Mainflux", + "mainflux", + "Main-Flux" + ], + "author": "Nataly Musilah", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/mainflux/sdk-js/issues" + }, + "homepage": "https://github.com/mainflux/sdk-js#readme", + "dependencies": { + "axios": "^1.5.1", + "browser-resolve": "^2.0.0", + "mainflux-sdk": "^0.14.26", + "node-fetch": "^3.3.2" + }, + "devDependencies": { + "esmify": "^2.1.1", + "jest": "^29.7.0", + "jest-fetch-mock": "^3.0.3", + "jsdoc": "^4.0.2", + "prettier": "3.0.3", + "rollup": "^4.0.2", + "rollup-plugin-commonjs": "^10.1.0", + "rollup-plugin-node-resolve": "^5.2.0" + } +} diff --git a/tests/bootstraps.test.js b/tests/bootstraps.test.js new file mode 100644 index 00000000..f2fddaac --- /dev/null +++ b/tests/bootstraps.test.js @@ -0,0 +1,282 @@ +const axios = require("axios"); +const mfsdk = require("mainflux-sdk"); + +jest.mock("axios"); + +describe("Bootstraps", () => { + const bootstraps_url = "http://localhost:9019"; + const config = { + external_id: "012", + external_key: "345", + thing_id: "77cbb344-7c41-47f3-a53a-a3d435b67207", + name: "percius", + }; + const thing_id = "77cbb344-7c41-47f3-a53a-a3d435b67207"; + const token = "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9"; + const client_cert = "888888"; + const client_key = "999999"; + const external_key = "012"; + const external_id = "345"; + const ca = "777777"; + const config_id = thing_id; + + test("Create should add a config and return success", () => { + axios.request.mockResolvedValueOnce({ data: "Configuration added" }); + + const expectedUrl = `${bootstraps_url}/things/configs`; + + const sdk = new mfsdk({ bootstrapsUrl: bootstraps_url }); + return sdk.bootstrap.Create(config, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + method: "post", + maxBodyLength: Infinity, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(config), + }); + expect(result).toEqual("Configuration added"); + }); + }); + + test("Whitelist should update a config and return success", () => { + axios.request.mockResolvedValueOnce({ data: "Configuration updated" }); + + const expectedUrl = `${bootstraps_url}/things/state/${config["thing_id"]}`; + + const sdk = new mfsdk({ bootstrapsUrl: bootstraps_url }); + return sdk.bootstrap.Whitelist(config, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + method: "put", + maxBodyLength: Infinity, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(config), + }); + expect(result).toEqual("Configuration updated"); + }); + }); + + test("Update should update a config and return success", () => { + axios.request.mockResolvedValueOnce({ data: "Configuration updated" }); + + const expectedUrl = `${bootstraps_url}/things/configs/${config["thing_id"]}`; + + const sdk = new mfsdk({ bootstrapsUrl: bootstraps_url }); + return sdk.bootstrap.Update(config, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + method: "put", + maxBodyLength: Infinity, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(config), + }); + expect(result).toEqual("Configuration updated"); + }); + }); + + test("View should get a config and return success", () => { + axios.request.mockResolvedValueOnce({ data: config }); + + const expectedUrl = `${bootstraps_url}/things/configs/${thing_id}`; + + const sdk = new mfsdk({ bootstrapsUrl: bootstraps_url }); + return sdk.bootstrap.View(thing_id, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + method: "get", + maxBodyLength: Infinity, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + }); + expect(result).toEqual(config); + }); + }); + + test("UpdateCerts should update a config and return success", () => { + axios.request.mockResolvedValueOnce({ data: config }); + + const expectedUrl = `${bootstraps_url}/configs/certs/${config_id}`; + const payload = { + client_cert: client_cert, + client_key: client_key, + ca_cert: ca, + }; + const sdk = new mfsdk({ bootstrapsUrl: bootstraps_url }); + return sdk.bootstrap + .UpdateCerts(config_id, client_cert, client_key, ca, token) + .then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + method: "patch", + maxBodyLength: Infinity, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(payload), + }); + expect(result).toEqual(config); + }); + }); + + test("Remove should delete a config and return success", () => { + axios.request.mockResolvedValueOnce({ data: "Configuration removed" }); + + const expectedUrl = `${bootstraps_url}/things/configs/${config_id}`; + + const sdk = new mfsdk({bootstrapsUrl : bootstraps_url}); + return sdk.bootstrap.Create(config, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + method: 'post', + maxBodyLength: 2000, + url: expectedUrl, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(config), + }); + expect(result).toEqual('Configuration added'); + }); + }); + }); + + test("Bootstrap should retrieve a config and return success", () => { + axios.request.mockResolvedValueOnce({ data: config }); + + const expectedUrl = `${bootstraps_url}/things/bootstrap/${external_id}`; + + const sdk = new mfsdk({bootstrapsUrl : bootstraps_url}); + return sdk.bootstrap.Whitelist(config, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + method: 'put', + maxBodyLength: 2000, + url: expectedUrl, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(config), + }); + expect(result).toEqual('Configuration updated'); + }); + }); + + test( 'Update should update a config and return success', ()=>{ + axios.request.mockResolvedValueOnce({data: 'Configuration updated'}); + + const expectedUrl = `${bootstraps_url}/things/configs/${config["thing_id"]}`; + + const sdk = new mfsdk({bootstrapsUrl : bootstraps_url}); + return sdk.bootstrap.Update(config, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + method: 'put', + maxBodyLength: 2000, + url: expectedUrl, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(config), + }); + expect(result).toEqual('Configuration updated'); + }); + }); + + test( 'View should get a config and return success', ()=>{ + axios.request.mockResolvedValueOnce({data: config}); + + const expectedUrl = `${bootstraps_url}/things/configs/${thing_id}`; + + const sdk = new mfsdk({bootstrapsUrl : bootstraps_url}); + return sdk.bootstrap.View(thing_id, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + method: 'get', + maxBodyLength: 2000, + url: expectedUrl, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + }); + expect(result).toEqual(config); + }); + }); + + test( 'UpdateCerts should update a config and return success', ()=>{ + axios.request.mockResolvedValueOnce({data: config}); + + const expectedUrl = `${bootstraps_url}/configs/certs/${config_id}`; + const payload = { + "client_cert": client_cert, + "client_key": client_key, + "ca_cert": ca, + }; + const sdk = new mfsdk({bootstrapsUrl : bootstraps_url}); + return sdk.bootstrap.UpdateCerts(config_id,client_cert,client_key, ca, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + method: 'patch', + maxBodyLength: 2000, + url: expectedUrl, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(payload), + }); + expect(result).toEqual(config); + }); + }); + + test( 'Remove should delete a config and return success', ()=>{ + axios.request.mockResolvedValueOnce({data: 'Configuration removed'}); + + const expectedUrl = `${bootstraps_url}/things/configs/${config_id}`; + + const sdk = new mfsdk({bootstrapsUrl : bootstraps_url}); + return sdk.bootstrap.Remove(config_id, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + method: 'delete', + maxBodyLength: 2000, + url: expectedUrl, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + }); + expect(result).toEqual('Configuration removed'); + }); + }); + + test( 'Bootstrap should retrieve a config and return success', ()=>{ + axios.request.mockResolvedValueOnce({data: config}); + + const expectedUrl = `${bootstraps_url}/things/bootstrap/${external_id}`; + + const sdk = new mfsdk({bootstrapsUrl : bootstraps_url}); + return sdk.bootstrap.Bootstrap(external_id, external_key).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + method: 'get', + maxBodyLength: 2000, + url: expectedUrl, + headers: { + 'Content-Type': 'application/json', + Authorization: `Thing ${external_key}`, + }, + }); + expect(result).toEqual(config); + }); + }); + +}); diff --git a/tests/certs.test.js b/tests/certs.test.js new file mode 100644 index 00000000..8e79cafb --- /dev/null +++ b/tests/certs.test.js @@ -0,0 +1,108 @@ +const axios = require("axios"); +const mfsdk = require("mainflux-sdk"); + +jest.mock("axios"); + +describe("Certs", () => { + const certs_url = "http://localhost"; + const certs = { + cert_serial: "22:16:df:60:c2:99:bc:c4:9b:1d:fd:71:5e:e9:07:d9:1b:3c:85:1d", + client_cert: + "-----BEGIN CERTIFICATE-----\nMIIEATCCAumgAwIBAgIUIhbfYMKZvMSbHf1xXukH2Rs8hR0wDQYJKoZIhvcNAQEL1k\n-----END CERTIFICATE-----", + client_key: + "-----BEGIN RSA PRIVATE KEY-----\nMIIEoQIBAAKCAQEAy9gF84a5s6jlX6hkAPXrLYqvdhe6uygdr6eHfd5erdcdxfgc\n-----END RSA PRIVATE KEY-----", + expiration: "2023-09-20T10:02:48Z", + thing_id: "3d49a42f-63fd-491b-9784-adf4b64ef347", + }; + const cert_id = "22:16:df:60:c2:99:bc:c4:9b:1d:fd:71:5e:e9:07:d9:1b:3c:85:1d"; + const thing_id = "3d49a42f-63fd-491b-9784-adf4b64ef347"; + const token = "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9"; + const valid = "10h"; + const cert_serial = [ + "22:16:df:60:c2:99:bc:c4:9b:1d:fd:71:5e:e9:07:d9:1b:3c:85:1d", + ]; + test("Issue should add a cert and return success", () => { + axios.request.mockResolvedValueOnce({ data: certs }); + + const expectedUrl = `${certs_url}/certs`; + const payload = {"thing_id": thing_id, "ttl": valid} + const sdk = new mfsdk({certsUrl : certs_url}); + return sdk.certs.Issue(thing_id, valid, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + method: 'post', + maxBodyLength: 2000, + url: expectedUrl, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(payload), + }); + expect(result).toEqual(certs); + }); + }); + }); + + test("ViewByThing should retrieve cert and return success", () => { + axios.request.mockResolvedValueOnce({ data: cert_serial }); + + const expectedUrl = `${certs_url}/serials/${thing_id}`; + + const sdk = new mfsdk({certsUrl : certs_url}); + return sdk.certs.ViewByThing(thing_id, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + maxBodyLength: 2000, + method: 'get', + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + }); + expect(result).toEqual(cert_serial); + }); + }); + }); + + test("ViewBySerial should retrieve cert and return success", () => { + axios.request.mockResolvedValueOnce({ data: certs }); + + const expectedUrl = `${certs_url}/certs/${cert_id}`; + + const sdk = new mfsdk({certsUrl : certs_url}); + return sdk.certs.ViewBySerial(cert_id, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + method: 'get', + maxBodyLength: 2000, + url: expectedUrl, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + }); + expect(result).toEqual(certs); + }); + }); + }); + + test("Revoke should delete cert and return success", () => { + axios.request.mockResolvedValueOnce("DELETED"); + + const expectedUrl = `${certs_url}/certs/${thing_id}`; + + const sdk = new mfsdk({certsUrl : certs_url}); + return sdk.certs.Revoke(thing_id, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + method: 'delete', + maxBodyLength: 2000, + url: expectedUrl, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + }); + expect(result).toEqual("DELETED"); + }); + }); + }); +}); diff --git a/tests/channels.test.js b/tests/channels.test.js new file mode 100644 index 00000000..6931d50a --- /dev/null +++ b/tests/channels.test.js @@ -0,0 +1,526 @@ +const axios = require("axios"); +const mfsdk = require("mainflux-sdk"); + +jest.mock("axios"); + +describe("Channels", () => { + const channels_url = "http://localhost"; + const channel = { + name: "channelName", + description: "long channel description", + parent_id: "bb7edb32-2eac-4aad-aebe-ed96fe073879", + metadata: { + domain: "example.com", + }, + status: "enabled", + owner_id: "bb7edb32-2eac-4aad-aebe-ed96fe073879", + }; + const channel_id = "290b0f49-7a57-4b8c-9e4e-fbf17c6ab7d9"; + const token = + "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2NjU3OTMwNjksImlhdCI6"; + const query_params = { + offset: 0, + limit: 10, + }; + const channels = [ + { name: "channelA", id: "bb7edb32-2eac-4aad-aebe-ed96fe073879" }, + { name: "channelB", id: "bb7edb32-2eac-4aad-aebe-ed96fe073879" }, + ]; + const things = [ + { name: "thing1", id: "bb7edb32-2eac-4aad-aebe-ed96fe073879" }, + { name: "thing2", id: "bb7edb32-2eac-4aad-aebe-ed96fe073879" }, + ]; + + test("Create should create a channel and return success", () => { + axios.request.mockResolvedValueOnce({ data: channel }); + + const expectedUrl = `${channels_url}/channels`; + + const sdk = new mfsdk({ channelsUrl: channels_url }); + return sdk.channels.Create(channel, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: "post", + maxBodyLength: Infinity, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(channel), + }); + expect(result).toEqual(channel); + }); + }); + + test("Create should handle a conflict error", () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${channels_url}/channels`; + + const expectedUrl = `${channels_url}/channels`; + + const sdk = new mfsdk({ channelsUrl: channels_url }); + return sdk.channels.Create(channel, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'post', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(channel), + }); + expect(result).toEqual(channel); + }); + }); + + test('Create should handle a conflict error', () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${channels_url}/channels`; + + const sdk = new mfsdk({ channelsUrl: channels_url }); + return sdk.channels.Create(channel, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'post', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(channel), + }); + console.log(result); + }); + }); + + test('Get should retrieve a channel and return success', () => { + axios.request.mockResolvedValueOnce({ data: channel }); + + const expectedUrl = `${channels_url}/channels/${channel_id}`; + + const sdk = new mfsdk({ channelsUrl: channels_url }); + return sdk.channels.Get(channel_id, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'get', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + }); + expect(result).toEqual(channel); + }); + }); + + test('Get should handle a conflict error', () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${channels_url}/channels/${channel_id}`; + const sdk = new mfsdk({ channelsUrl: channels_url }); + return sdk.channels.Get(channel_id, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'get', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + }); + console.log(result); + }); + }); + + test('Get_by_thing should retrieve things a channel is connected to and return success', () => { + axios.request.mockResolvedValueOnce({ data: things }); + + const expectedUrl = `${channels_url}/channels/${channel_id}/things?${new URLSearchParams(query_params).toString()}`; + + const sdk = new mfsdk({ channelsUrl: channels_url }); + return sdk.channels.GetByThing(channel_id, query_params, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'get', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + }); + expect(result).toEqual(things); + }); + }); + + test('Get by thing should handle a conflict error', () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${channels_url}/channels/${channel_id}/things?${new URLSearchParams(query_params).toString()}`; + + const sdk = new mfsdk({ channelsUrl: channels_url }); + return sdk.channels.GetByThing(channel_id, query_params, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'get', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + }); + console.log(result); + }); + }); + + test('Get all should retrieve all channels and return success', () => { + axios.request.mockResolvedValueOnce({ data: channels }); + + const expectedUrl = `${channels_url}/channels?${new URLSearchParams(query_params).toString()}`; + + const sdk = new mfsdk({ channelsUrl: channels_url }); + return sdk.channels.GetAll(query_params, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'get', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + }); + expect(result).toEqual(channels); + }); + }); + + test('GetAll should handle a conflict error', () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${channels_url}/channels?${new URLSearchParams(query_params).toString()}`; + + const sdk = new mfsdk({ channelsUrl: channels_url }); + return sdk.channels.GetAll(query_params, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'get', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + }); + console.log(result); + }); + }); + + test("Get should retrieve a channel and return success", () => { + axios.request.mockResolvedValueOnce({ data: channel }); + + const expectedUrl = `${channels_url}/channels/${channel_id}`; + + const sdk = new mfsdk({ channelsUrl: channels_url }); + return sdk.channels.CreateBulk(channels, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'post', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(channels), + }); + expect(result).toEqual(channels); + }); + }); + }); + + test("Get should handle a conflict error", () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const sdk = new mfsdk({ channelsUrl: channels_url }); + return sdk.channels.CreateBulk(channels, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'post', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(channels), + }); + console.log(result); + }); + }); + }); + + test("Get_by_thing should retrieve things a channel is connected to and return success", () => { + axios.request.mockResolvedValueOnce({ data: things }); + + const expectedUrl = `${channels_url}/channels/${channel_id}`; + + const sdk = new mfsdk({ channelsUrl: channels_url }); + return sdk.channels.Update(channel_id,channel, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'put', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(channel), + }); + console.log(result); + }); + expect(result).toEqual(things); + }); + }); + + test("Get by thing should handle a conflict error", () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${channels_url}/channels/${channel_id}`; + + const sdk = new mfsdk({ channelsUrl: channels_url }); + return sdk.channels.Update(channel_id, channel, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'put', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(channel), + }); + expect(result).toEqual(channel); + }); + console.log(result); + }); + }); + + test("Get all should retrieve all channels and return success", () => { + axios.request.mockResolvedValueOnce({ data: channels }); + + const expectedUrl = `${channels_url}/channels?${new URLSearchParams( + query_params, + ).toString()}`; + + const sdk = new mfsdk({ channelsUrl: channels_url }); + return sdk.channels.GetAll(query_params, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: "get", + maxBodyLength: Infinity, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + }); + expect(result).toEqual(channels); + }); + }); + + test("GetAll should handle a conflict error", () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${channels_url}/channels/${channel_id}/disable`; + + const sdk = new mfsdk({ channelsUrl: channels_url }); + return sdk.channels.Disable(channel_id, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'post', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + }); + expect(result).toEqual(channel); + }); + }); + }); + + test("CreateBulk should create multiple channels and return success", () => { + axios.request.mockResolvedValueOnce({ data: channels }); + + const expectedUrl = `${channels_url}/channels/${channel_id}/disable`; + + const sdk = new mfsdk({ channelsUrl: channels_url }); + return sdk.channels.Disable(channel_id, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'post', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + }); + console.log(result); + }); + }); + }); + + test("CreateBulk should handle a conflict error", () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + const expectedUrl = `${channels_url}/channels/bulk`; + + const sdk = new mfsdk({ channelsUrl: channels_url }); + return sdk.channels.CreateBulk(channels, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: "post", + maxBodyLength: Infinity, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(channels), + }); + console.log(result); + }); + }); + + test("Update should handle a conflict error", () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${channels_url}/channels/${channel["id"]}`; + + const sdk = new mfsdk({ channelsUrl: channels_url }); + return sdk.channels.Update(channel, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: "put", + maxBodyLength: Infinity, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(channel), + }); + console.log(result); + }); + }); + + test("Update should update a channel and return success", () => { + axios.request.mockResolvedValueOnce({ data: channel }); + + const expectedUrl = `${channels_url}/channels/${channel["id"]}`; + + const sdk = new mfsdk({ channelsUrl: channels_url }); + return sdk.channels.Update(channel, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: "put", + maxBodyLength: Infinity, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(channel), + }); + expect(result).toEqual(channel); + }); + }); + + test("Disable should delete a channel and return success", () => { + axios.request.mockResolvedValueOnce({ data: channel }); + + const expectedUrl = `${channels_url}/channels/${channel["id"]}/disable`; + + const sdk = new mfsdk({ channelsUrl: channels_url }); + return sdk.channels.Disable(channel, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: "post", + maxBodyLength: Infinity, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + }); + expect(result).toEqual(channel); + }); + }); + + test("Disable should handle a conflict error", () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${channels_url}/channels/${channel["id"]}/disable`; + + const sdk = new mfsdk({ channelsUrl: channels_url }); + return sdk.channels.Disable(channel, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: "post", + maxBodyLength: Infinity, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + }); + console.log(result); + }); + }); +}); diff --git a/tests/groups.test.js b/tests/groups.test.js new file mode 100644 index 00000000..ffda7039 --- /dev/null +++ b/tests/groups.test.js @@ -0,0 +1,630 @@ +const axios = require("axios"); +const mfsdk = require("mainflux-sdk"); + +jest.mock("axios"); + +describe("Groups", () => { + const groups_url = "http://localhost"; + const group = { + name: "group_test", + id: "290b0f49-7a57-4b8c-9e4e-fbf17c6ab7d9", + parent_id: "290b0f49-7a57-4b8c-9e4e-fbf17c6ab7d9", + status: "enabled", + owner_id: "bb7edb32-2eac-4aad-aebe-ed96fe073879", + }; + const group_id = "290b0f49-7a57-4b8c-9e4e-fbf17c6ab7d9"; + const token = + "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2NjU3OTMwNjksImlhdCI6"; + const query_params = { + offset: 0, + limit: 10, + }; + const groups = [ + { name: "groupA", id: "bb7edb32-2eac-4aad-aebe-ed96fe073879" }, + { name: "groupB", id: "bb7edb32-2eac-4aad-aebe-ed96fe073879" }, + ]; + const member_id = "bb7edb32-2eac-4aad-aebe-ed96fe073879"; + const member_type = "m_read"; + const members_ids = [ + "bb7edb32-2eac-4aad-aebe-ed96fe073879", + "bb7edb32-2eac-4aad-aebe-ed96fe073879", + ]; + + test("Create should create a group and return success", () => { + axios.request.mockResolvedValueOnce({ data: group }); + + const expectedUrl = `${groups_url}/groups`; + + const sdk = new mfsdk({ groupsUrl: groups_url }); + return sdk.groups.Create(group, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: "post", + maxBodyLength: Infinity, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(group), + }); + expect(result).toEqual(group); + }); + }); + + test("Create should handle a conflict error", () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${groups_url}/groups`; + + const sdk = new mfsdk({ groupsUrl: groups_url }); + return sdk.groups.Create(group, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: "post", + maxBodyLength: Infinity, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(group), + }); + console.log(result); + }); + }); + + test("Get should retrieve a group and return success", () => { + axios.request.mockResolvedValueOnce({ data: group }); + + const expectedUrl = `${groups_url}/groups/${group_id}`; + + const sdk = new mfsdk({ groupsUrl: groups_url }); + return sdk.groups.Get(group_id, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: "get", + maxBodyLength: Infinity, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + }); + expect(result).toEqual(group); + }); + }); + + test("Get should handle a conflict error", () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${groups_url}/groups/${group_id}`; + + test('Create should create a group and return success', () => { + axios.request.mockResolvedValueOnce({ data: group }); + + const expectedUrl = `${groups_url}/groups`; + + const sdk = new mfsdk({ groupsUrl: groups_url }); + return sdk.groups.Create(group, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'post', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(group), + }); + expect(result).toEqual(group); + }); + }); + }); + + test("Get all should retrieve all groups and return success", () => { + axios.request.mockResolvedValueOnce({ data: groups }); + + const expectedUrl = `${groups_url}/groups?${new URLSearchParams( + query_params, + ).toString()}`; + + const sdk = new mfsdk({ groupsUrl: groups_url }); + return sdk.groups.Create(group, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'post', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(group), + }); + console.log(result); + }); + }); + }); + + test("Get all should handle a conflict error", () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${groups_url}/groups?${new URLSearchParams( + query_params, + ).toString()}`; + + const sdk = new mfsdk({ groupsUrl: groups_url }); + return sdk.groups.Get(group_id, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'get', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + }); + expect(result).toEqual(group); + }); + }); + }); + + test("Update should update a group and return success", () => { + axios.request.mockResolvedValueOnce({ data: group }); + + const expectedUrl = `${groups_url}/groups/${group_id}`; + + const sdk = new mfsdk({ groupsUrl: groups_url }); + return sdk.groups.Get(group_id, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'get', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + }); + console.log(result); + }); + }); + }); + + test("Update should handle a conflict error", () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${groups_url}/groups/${group_id}`; + + const expectedUrl = `${groups_url}/groups?${new URLSearchParams(query_params).toString()}`; + + const sdk = new mfsdk({ groupsUrl: groups_url }); + return sdk.groups.GetAll(query_params, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'get', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + }); + expect(result).toEqual(groups); + }); + }); + }); + + test("Children should retrieve all of a groups children and return success", () => { + axios.request.mockResolvedValueOnce({ data: groups }); + + const expectedUrl = `${groups_url}/groups/${group_id}/children?${new URLSearchParams( + query_params, + ).toString()}`; + + const sdk = new mfsdk({ groupsUrl: groups_url }); + return sdk.groups.GetAll(query_params, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'get', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + }); + console.log(result); + }); + }); + }); + + test("Children should handle a conflict error", () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${groups_url}/groups/${group_id}/children?${new URLSearchParams( + query_params, + ).toString()}`; + + const sdk = new mfsdk({ groupsUrl: groups_url }); + return sdk.groups.Update(group_id, group, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'put', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(group), + }); + expect(result).toEqual(group); + }); + }); + }); + + test("Parents should retrieve all of a groups children and return success", () => { + axios.request.mockResolvedValueOnce({ data: groups }); + + const expectedUrl = `${groups_url}/groups/${ + group["id"] + }/parents?${new URLSearchParams(query_params).toString()}`; + + const sdk = new mfsdk({ groupsUrl: groups_url }); + return sdk.groups.Update(group_id, group, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'put', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(group), + }); + console.log(result); + }); + }); + }); + + test("Parents should handle a conflict error", () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${groups_url}/groups/${ + group["id"] + }/parents?${new URLSearchParams(query_params).toString()}`; + + const sdk = new mfsdk({ groupsUrl: groups_url }); + return sdk.groups.Children(group_id, query_params, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'get', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + }); + expect(result).toEqual(groups); + }); + }); + }); + + test("Assign should assign a group and return success", () => { + axios.request.mockResolvedValueOnce("Policy created"); + + const expectedUrl = `${groups_url}/policies`; + const payload = { + object: group_id, + subject: member_id, + actions: member_type, + }; + + const sdk = new mfsdk({ groupsUrl: groups_url }); + return sdk.groups.Children(group_id, query_params, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'get', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + }); + console.log(result); + }); + expect(result).toEqual("Policy created"); + }); + }); + + test("Assign should handle a conflict error", () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${groups_url}/groups/${group_id}/parents?${new URLSearchParams(query_params).toString()}`; + + const sdk = new mfsdk({ groupsUrl: groups_url }); + return sdk.groups.Parents(group_id, query_params, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'get', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + }); + expect(result).toEqual(groups); + }); + console.log(result); + }); + }); + + test("Unassign should unassign a group and return success", () => { + axios.request.mockResolvedValueOnce("Policy deleted"); + + const expectedUrl = `${groups_url}/policies/${members_ids}/${group_id}`; + const payload = { object: group_id, subject: members_ids }; + + const sdk = new mfsdk({ groupsUrl: groups_url }); + return sdk.groups.Unassign(members_ids, group_id, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: "delete", + maxBodyLength: Infinity, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(payload), + }); + expect(result).toEqual("Policy deleted"); + }); + }); + + test("Unassign should handle a conflict error", () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${groups_url}/groups/${group_id}/parents?${new URLSearchParams(query_params).toString()}`; + + const sdk = new mfsdk({ groupsUrl: groups_url }); + return sdk.groups.Parents(group_id, query_params, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'get', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + }); + console.log(result); + }); + }); + }); + + test("Disable should delete a group and return success", () => { + axios.request.mockResolvedValueOnce({ data: group }); + + const expectedUrl = `${groups_url}/groups/${group_id}/disable`; + + const sdk = new mfsdk({ groupsUrl: groups_url }); + return sdk.groups.Assign(group_id, member_id, member_type, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'post', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(payload), + }); + expect(result).toEqual("Policy created"); + }); + }); + }); + + test("Disable should handle a conflict error", () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${groups_url}/groups/${group_id}/disable`; + + const sdk = new mfsdk({ groupsUrl: groups_url }); + return sdk.groups.Assign(group_id, member_id, member_type, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'post', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(payload), + }); + console.log(result); + }); + }); + }); + + test("Members should provide members of a group and return success", () => { + axios.request.mockResolvedValueOnce({ data: group }); + + const expectedUrl = `${groups_url}/policies/${member_id}/${group_id}`; + const payload = { "object": group_id, "subject": member_id }; + + const sdk = new mfsdk({ groupsUrl: groups_url }); + return sdk.groups.Unassign(member_id, group_id, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'delete', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(payload), + }); + expect(result).toEqual("Policy deleted"); + }); + }); + }); + + test("Members should handle a conflict error", () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${groups_url}/policies/${member_id}/${group_id}`; + const payload = { "object": group_id, "subject": member_id }; + + const sdk = new mfsdk({ groupsUrl: groups_url }); + return sdk.groups.Unassign(member_id, group_id, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'delete', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(payload), + }); + console.log(result); + }); + }); + + test('Disable should delete a group and return success', () => { + axios.request.mockResolvedValueOnce({ data: group }); + + const expectedUrl = `${groups_url}/groups/${group_id}/disable`; + + const sdk = new mfsdk({ groupsUrl: groups_url }); + return sdk.groups.Disable(group_id, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'post', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + }); + expect(result).toEqual(group); + }); + }); + + test('Disable should handle a conflict error', () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${groups_url}/groups/${group_id}/disable`; + + const sdk = new mfsdk({ groupsUrl: groups_url }); + return sdk.groups.Disable(group_id, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'post', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + }); + console.log(result); + }); + }); + + test('Members should provide members of a group and return success', () => { + axios.request.mockResolvedValueOnce({ data: group }); + + const expectedUrl = `${groups_url}/groups/${group_id}/members?${new URLSearchParams(query_params).toString()}`; + + const sdk = new mfsdk({ groupsUrl: groups_url }); + return sdk.groups.Members(group_id, query_params, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'get', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + }); + expect(result).toEqual(group); + }); + }); + + test('Members should handle a conflict error', () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${groups_url}/groups/${group_id}/members?${new URLSearchParams(query_params).toString()}`; + + const sdk = new mfsdk({ groupsUrl: groups_url }); + return sdk.groups.Members(group_id, query_params, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'get', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + }); + console.log(result); + // expect(result.error.status).toBe(1); + // expect(result.error.message).toBe('Missing or invalid access token provided.'); + }); + }); + }); +}); diff --git a/tests/messages.test.js b/tests/messages.test.js new file mode 100644 index 00000000..e951e12c --- /dev/null +++ b/tests/messages.test.js @@ -0,0 +1,70 @@ +const axios = require("axios"); +const mfsdk = require("mainflux-sdk"); + +jest.mock("axios"); + +describe("Messages", () => { + const httpadapter_url = "http://localhost"; + const readers_url = "http://localhost"; + const channel_id = "2b86beba-83dd-4b39-8165-4dda4e6eb4ad"; + const msg = '[{"bn":"demo", "bu":"V", "n":"voltage", "u":"V", "v":5}]'; + const token = "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9"; + const thing_key = "fc68b31b-d7fd-4879-b3a7-0baf4580c5b1"; + + const httpadapter_url = 'http://localhost'; + const readers_url = 'http://localhost'; + const channel_id = "2b86beba-83dd-4b39-8165-4dda4e6eb4ad"; + const msg = '[{"bn":"demo", "bu":"V", "n":"voltage", "u":"V", "v":5}]'; + const token = "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9"; + const thing_key = "fc68b31b-d7fd-4879-b3a7-0baf4580c5b1"; + const chan_name_parts = channel_id.split(".", 2); + const chan_id = chan_name_parts[0]; + let subtopic = ""; + + if (chan_name_parts.length == 2) { + subtopic = chan_name_parts[1].replace(".", "/", -1); + } + + const expectedUrl = `${httpadapter_url}/http/channels/${channel_id}/messages/subtopic`; + + const expectedUrl = `${httpadapter_url}/http/channels/${chan_id}/messages/${subtopic}`; + + const sdk = new mfsdk({ httpadapterUrl: httpadapter_url }); + return sdk.messages.Send(channel_id, msg, thing_key).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'post', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Thing ${thing_key}`, + }, + data: new TextEncoder().encode(msg), + }); + expect(result).toEqual('Message Sent!'); + }); + }); + }); + + test("Read should read a message and return success", () => { + axios.request.mockResolvedValueOnce({ data: msg }); + + const expectedUrl = `${readers_url}/channels/${chan_id}/messages`; + + const sdk = new mfsdk({ readersUrl: readers_url }); + return sdk.messages.Read(channel_id, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'get', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + params: {"subtopic": subtopic}, + }); + expect(result).toEqual(msg); + }); + }); + }); +}); diff --git a/tests/things.test.js b/tests/things.test.js new file mode 100644 index 00000000..7fb1824e --- /dev/null +++ b/tests/things.test.js @@ -0,0 +1,787 @@ +const axios = require("axios"); +const mfsdk = require("mainflux-sdk"); + +jest.mock("axios"); + +describe("Things", () => { + const things_url = "http://localhost:9000"; + const thing = { + name: "thingName", + tags: ["tag1", "tag2"], + credentials: { + identity: "thingidentity", + secret: "bb7edb32-2eac-4aad-aebe-ed96fe073879", + }, + owner: "bb7edb32-2eac-4aad-aebe-ed96fe073879", + metadata: { + domain: "example.com", + }, + status: "enabled", + }; + const thing_id = "bb7edb32-2eac-4aad-aebe-ed96fe073879"; + const channel_id = "bb7edb32-2eac-4aad-aebe-ed96fe073879"; + const thing_ids = [ + "6cba4ea5-5820-4419-b389-86984309ad35", + "2bb290ff-0cb1-4f06-9da3-aff91c1d039", + ]; + const channel_ids = [ + "2bb290ff-0cb1-4f06-9da3-aff91c1d039", + "6cba4ea5-5820-4419-b389-86984309ad35", + ]; + const actions = ["m_read", "m_write"]; + const thing_key = "12345678"; + const action = ["m_read", "m_write"]; + const channels = [ + { name: "channel1", id: "bb7edb32-2eac-4aad-aebe-ed96fe073879" }, + { name: "channel2", id: "bb7edb32-2eac-4aad-aebe-ed96fe073879" }, + ]; + const entity_type = "group"; + const token = + "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2NjU3OTMwNjksImlhdCI6"; + const things = [ + { name: "thing1", id: "bb7edb32-2eac-4aad-aebe-ed96fe073879" }, + { name: "thing2", id: "bb7edb32-2eac-4aad-aebe-ed96fe073879" }, + ]; + const query_params = { + offset: 0, + limit: 10, + }; + + test("Create should create a thing and return success", () => { + axios.request.mockResolvedValue({ data: thing }); + + const expectedUrl = `${things_url}/things`; + + const sdk = new mfsdk({ thingsUrl: things_url }); + return sdk.things.Create(thing, token).then((result) => { + expect(result).toEqual(thing); + expect(axios.request).toHaveBeenCalledWith({ + method: "post", + maxBodyLength: Infinity, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(thing), + }); + }); + }); + + test("Create should handle a conflict error", () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValue(errorResponse); + + const expectedUrl = `${things_url}/things`; + + const sdk = new mfsdk({ thingsUrl: things_url }); + return sdk.things.Create(thing, token).catch((result) => { + expect(axios.request).toHaveBeenCalledWith({ + method: "post", + maxBodyLength: Infinity, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(thing), + }); + console.log(result); + }); + }); + + test("CreateBulk should create multiple things and return success", () => { + axios.request.mockResolvedValue({ data: things }); + + const expectedUrl = `${things_url}/things/bulk`; + + const sdk = new mfsdk({ thingsUrl: things_url }); + return sdk.things.CreateBulk(things, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + method: "post", + maxBodyLength: Infinity, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(things), + }); + expect(result).toEqual(things); + }); + }); + + test("Update should update a thing and return success", () => { + axios.request.mockResolvedValue({ data: thing }); + + const expectedUrl = `${things_url}/things/${thing_id}`; + + const sdk = new mfsdk({ thingsUrl: things_url }); + return sdk.things.Update(thing_id, thing, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + method: "patch", + maxBodyLength: Infinity, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(thing), + }); + expect(result).toEqual(thing); + }); + }); + + test("Get should give a thing and return success", () => { + axios.request.mockResolvedValue({ data: thing }); + + const expectedUrl = `${things_url}/things/${thing_id}`; + + const sdk = new mfsdk({ thingsUrl: things_url }); + return sdk.things.Get(thing_id, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + method: "get", + maxBodyLength: Infinity, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + }); + expect(result).toEqual(thing); + }); + }); + + test("Get by channel return a channel a thing is connected and return success", () => { + axios.request.mockResolvedValue({ data: channels }); + + const expectedUrl = `${things_url}/things/${thing_id}/channels?${new URLSearchParams( + query_params, + ).toString()}`; + + const sdk = new mfsdk({ thingsUrl: things_url }); + return sdk.things + .GetByChannel(thing_id, query_params, token) + .then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + method: "get", + maxBodyLength: Infinity, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + }); + expect(result).toEqual(channels); + }); + }); + + test("GetAll should return all things and return success", () => { + axios.request.mockResolvedValue({ data: things }); + + const expectedUrl = `${things_url}/things?${new URLSearchParams( + query_params, + ).toString()}`; + + const sdk = new mfsdk({ thingsUrl: things_url }); + return sdk.things.GetAll(query_params, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + method: "get", + maxBodyLength: Infinity, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + }); + expect(result).toEqual(things); + }); + }); + + test("Disable should delete a thing and return success", () => { + axios.request.mockResolvedValue({ data: thing }); + + const expectedUrl = `${things_url}/things/${thing_id}/disable`; + + const sdk = new mfsdk({ thingsUrl: things_url }); + return sdk.things.Disable(thing_id, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + method: "post", + maxBodyLength: Infinity, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + }); + expect(result).toEqual(thing); + }); + }); + + test("Update should update a thing and return success", () => { + axios.request.mockResolvedValue({ data: thing }); + + const expectedUrl = `${things_url}/things/${thing_id}`; + + const sdk = new mfsdk({ thingsUrl: things_url }); + return sdk.things.Update(thing_id, thing, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + method: "patch", + maxBodyLength: Infinity, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(thing), + }); + expect(result).toEqual(thing); + }); + }); + + test("Update thing secret should update a thing secret and return success", () => { + axios.request.mockResolvedValue({ data: thing }); + + const expectedUrl = `${things_url}/things/${thing_id}/secret`; + + const sdk = new mfsdk({ thingsUrl: things_url }); + return sdk.things + .UpdateThingSecret(thing_id, thing, token) + .then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + method: "patch", + maxBodyLength: Infinity, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(thing), + }); + expect(result).toEqual(thing); + }); + }); + + test("Update thing tags should update a thing tags and return success", () => { + axios.request.mockResolvedValue({ data: thing }); + + const expectedUrl = `${things_url}/things/${thing_id}/tags`; + + const sdk = new mfsdk({ thingsUrl: things_url }); + return sdk.things.UpdateThingTags(thing_id, thing, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + method: "patch", + maxBodyLength: Infinity, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(thing), + }); + expect(result).toEqual(thing); + }); + }); + + test("Update thing owner should update a thing owner and return success", () => { + axios.request.mockResolvedValue({ data: thing }); + + const expectedUrl = `${things_url}/things/${thing_id}/owner`; + + const sdk = new mfsdk({ thingsUrl: things_url }); + return sdk.things + .UpdateThingOwner(thing_id, thing, token) + .then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + method: "patch", + maxBodyLength: Infinity, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(thing), + }); + expect(result).toEqual(thing); + }); + }); + + test("Update should update a thing and return success", () => { + axios.request.mockResolvedValue({ data: thing }); + + const expectedUrl = `${things_url}/things/${thing_id}`; + + const sdk = new mfsdk({ thingsUrl: things_url }); + return sdk.things.Update(thing_id, thing, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + method: "patch", + maxBodyLength: Infinity, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(thing), + }); + expect(result).toEqual(thing); + }); + }); + + test("Connect should connect a thing and return success", () => { + axios.request.mockResolvedValue("Policy created."); + + const expectedUrl = `${things_url}/policies`; + const payload = { subject: thing_id, object: channel_id, action: action }; + + const sdk = new mfsdk({ thingsUrl: things_url }); + return sdk.things + .Connect(thing_id, channel_id, action, token) + .then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + method: "post", + maxBodyLength: Infinity, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(payload), + }); + expect(result).toEqual("Policy created."); + }); + }); + + test("Connects should connect things and return success", () => { + axios.request.mockResolvedValue("Policy created."); + + const expectedUrl = `${things_url}/connect`; + const payload = { + subjects: thing_ids, + objects: channel_ids, + actions: actions, + }; + + + test('Create should create a thing and return success', ()=>{ + axios.request.mockResolvedValue({ data: thing}); + + const expectedUrl = `${things_url}/things`; + + const sdk = new mfsdk({thingsUrl: things_url}); + return sdk.things.Create(thing, token).then(result => { + + expect(result).toEqual(thing); + expect(axios.request).toHaveBeenCalledWith({ + method: "post", + maxBodyLength: 2000, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(thing), + }); + }); + expect(result).toEqual("Policy created."); + }); + }); + + test("Disconnect should disconnect things and return success", () => { + axios.request.mockResolvedValue("Policy deleted."); + + const expectedUrl = `${things_url}/disconnect`; + const payload = { subjects: thing_id, objects: channel_id }; + + const sdk = new mfsdk({ thingsUrl: things_url }); + return sdk.things.Disconnect(thing_id, channel_id, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + method: "post", + maxBodyLength: Infinity, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(payload), + }); + expect(result).toEqual("Policy deleted."); + }); + }); + + test("Identify thing should identify a thing and return success", () => { + axios.request.mockResolvedValue({ data: thing }); + + const expectedUrl = `${things_url}/identify`; + + const sdk = new mfsdk({thingsUrl: things_url}); + return sdk.things.Create(thing, token).catch(result => { + expect(axios.request).toHaveBeenCalledWith({ + method: "post", + maxBodyLength: 2000, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(thing), + }); + console.log(result); + }); + + }); + + test('CreateBulk should create multiple things and return success', ()=>{ + axios.request.mockResolvedValue({ data: things}); + + const expectedUrl = `${things_url}/things/bulk`; + + const sdk = new mfsdk({thingsUrl: things_url}); + return sdk.things.CreateBulk(things, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + method: "post", + maxBodyLength: 2000, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(things), + }); + expect(result).toEqual(things); + }); + }); + + test('Update should update a thing and return success', ()=>{ + axios.request.mockResolvedValue({ data: thing}); + + const expectedUrl = `${things_url}/things/${thing_id}`; + + const sdk = new mfsdk({thingsUrl: things_url}); + return sdk.things.Update(thing_id, thing, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + method: "patch", + maxBodyLength: 2000, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(thing), + }); + expect(result).toEqual(thing); + }); + }); + + test('Get should give a thing and return success', ()=>{ + axios.request.mockResolvedValue({ data: thing}); + + const expectedUrl = `${things_url}/things/${thing_id}`; + + const sdk = new mfsdk({thingsUrl: things_url}); + return sdk.things.Get(thing_id, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + method: "get", + maxBodyLength: 2000, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + }); + expect(result).toEqual(thing); + }); + }); + + test('Get by channel return a channel a thing is connected and return success', ()=>{ + axios.request.mockResolvedValue({ data: channels}); + + const expectedUrl = `${things_url}/things/${thing_id}/channels?${new URLSearchParams(query_params).toString()}`; + + const sdk = new mfsdk({thingsUrl: things_url}); + return sdk.things.GetByChannel(thing_id, query_params, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + method: "get", + maxBodyLength: 2000, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + }); + expect(result).toEqual(channels); + }); + }); + + test('GetAll should return all things and return success', ()=>{ + axios.request.mockResolvedValue({ data: things}); + + const expectedUrl = `${things_url}/things?${new URLSearchParams(query_params).toString()}`; + + const sdk = new mfsdk({thingsUrl: things_url}); + return sdk.things.GetAll(query_params, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + method: "get", + maxBodyLength: 2000, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + }); + expect(result).toEqual(things); + }); + }); + + test('Disable should delete a thing and return success', ()=>{ + axios.request.mockResolvedValue({ data: thing}); + + const expectedUrl = `${things_url}/things/${thing_id}/disable`; + + const sdk = new mfsdk({thingsUrl: things_url}); + return sdk.things.Disable(thing_id, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + method: "post", + maxBodyLength: 2000, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + }); + expect(result).toEqual(thing); + }); + }); + + test('Update should handle a conflict error', ()=>{ + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValue(errorResponse); + + const expectedUrl = `${things_url}/things/${thing_id}`; + + const sdk = new mfsdk({thingsUrl: things_url}); + return sdk.things.Update(thing_id, thing, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + method: "patch", + maxBodyLength: 2000, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(thing), + }); + console.log(result); + }); + }); + + test('Update thing secret should update a thing secret and return success', ()=>{ + axios.request.mockResolvedValue({ data: thing}); + + const expectedUrl = `${things_url}/things/${thing_id}/secret`; + + const sdk = new mfsdk({thingsUrl: things_url}); + return sdk.things.UpdateThingSecret(thing_id, thing, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + method: "patch", + maxBodyLength: 2000, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(thing), + }); + expect(result).toEqual(thing); + }); + }); + + test('Update thing tags should update a thing tags and return success', ()=>{ + axios.request.mockResolvedValue({ data: thing}); + + const expectedUrl = `${things_url}/things/${thing_id}/tags`; + + const sdk = new mfsdk({thingsUrl: things_url}); + return sdk.things.UpdateThingTags(thing_id, thing, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + method: "patch", + maxBodyLength: 2000, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(thing), + }); + expect(result).toEqual(thing); + }); + }); + + test('Update thing owner should update a thing owner and return success', ()=>{ + axios.request.mockResolvedValue({ data: thing}); + + const expectedUrl = `${things_url}/things/${thing_id}/owner`; + + const sdk = new mfsdk({thingsUrl: things_url}); + return sdk.things.UpdateThingOwner(thing_id, thing, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + method: "patch", + maxBodyLength: 2000, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(thing), + }); + expect(result).toEqual(thing); + }); + }); + + test('Update thing secret should handle a conflict error', ()=>{ + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValue(errorResponse); + + const expectedUrl = `${things_url}/things/${thing_id}/secret`; + + const sdk = new mfsdk({thingsUrl: things_url}); + return sdk.things.UpdateThingSecret(thing_id, thing, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + method: "patch", + maxBodyLength: 2000, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(thing), + }); + console.log(result); + }); + }); + + test('Connect should connect a thing and return success', ()=>{ + axios.request.mockResolvedValue("Policy created."); + + const expectedUrl = `${things_url}/policies`; + const payload = { "subject": thing_id, "object": channel_id, "action": action }; + + const sdk = new mfsdk({thingsUrl: things_url}); + return sdk.things.Connect(thing_id, channel_id, action, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + method: "post", + maxBodyLength: 2000, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(payload), + }); + expect(result).toEqual("Policy created."); + }); + }); + + test('Connects should connect things and return success', ()=>{ + axios.request.mockResolvedValue("Policy created."); + + const expectedUrl = `${things_url}/connect`; + const payload = { "subjects": thing_ids, "objects": channel_ids, "actions": actions }; + + const sdk = new mfsdk({thingsUrl: things_url}); + return sdk.things.Connects(thing_ids, channel_ids, actions, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + method: "post", + maxBodyLength: 2000, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(payload), + }); + expect(result).toEqual("Policy created."); + }); + }); + + test('Disconnect should disconnect things and return success', ()=>{ + axios.request.mockResolvedValue("Policy deleted."); + + const expectedUrl = `${things_url}/disconnect`; + const payload = { "subjects": thing_id, "objects": channel_id }; + + const sdk = new mfsdk({thingsUrl: things_url}); + return sdk.things.Disconnect(thing_id, channel_id, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + method: "post", + maxBodyLength: 2000, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(payload), + }); + expect(result).toEqual("Policy deleted."); + }); + }); + + test('Identify thing should identify a thing and return success', ()=>{ + axios.request.mockResolvedValue({ data: thing}); + + const expectedUrl = `${things_url}/identify`; + + const sdk = new mfsdk({thingsUrl: things_url}); + return sdk.things.IdentifyThing(thing_key).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + method: "post", + maxBodyLength: 2000, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Thing ${thing_key}`, + }, + }); + expect(result).toEqual(thing); + }); + }); + + test('Authorise thing should authorise a thing and return success', ()=>{ + axios.request.mockResolvedValue({ data: true}); + + const expectedUrl = `${things_url}/channels/object/access`; + const access_request = { + "subject": thing_id, + "object": channel_id, + "action": action, + "entity_type": entity_type + }; + + const sdk = new mfsdk({thingsUrl: things_url}); + return sdk.things.AuthoriseThing(thing_id, channel_id, action, entity_type, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + method: "post", + maxBodyLength: 2000, + url: expectedUrl, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(access_request), + }); + expect(result).toEqual(true); + }); + }); + +}); diff --git a/tests/users.test.js b/tests/users.test.js new file mode 100644 index 00000000..4b718266 --- /dev/null +++ b/tests/users.test.js @@ -0,0 +1,564 @@ +const axios = require("axios"); +const mfsdk = require("mainflux-sdk"); + +jest.mock("axios"); + +describe("Users", () => { + const users_url = "http://localhost"; + const user = { + id: "886b4266-77d1-4258-abae-2931fb4f16de", + name: "fkatwigs", + tags: ["holy", "terrain"], + owner: "natra@email.com", + credentials: { + identity: "fkatwigs@email.com", + secret: "12345678", + }, + created_at: "2023-09-07T13:17:27.880558Z", + updated_at: "2023-09-12T13:38:23.86436Z", + updated_by: "a725e26d-dc1f-4452-80dc-41fc654aa38b", + status: "enabled", + }; + const user_id = "886b4266-77d1-4258-abae-2931fb4f16de"; + const token = "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9"; + const old_secret = "12345678"; + const new_secret = "87654321"; + const payload = { + old_secret: old_secret, + new_secret: new_secret, + }; + const access_request = { + subject: user_id, + object: "886b4266-77d1-4258-abae-2931fb4f16de", + action: "m_read", + entity_type: "client", + }; + const group_id = "886b4266-77d1-4258-abae-2931fb4f16de"; + const action = "m_read"; + const entity_type = "client"; + + test("Create should create a user and return success", () => { + axios.request.mockResolvedValueOnce({ data: user }); + + const expectedUrl = `${users_url}/users`; + + const sdk = new mfsdk({ usersUrl: users_url }); + return sdk.users.Create(user, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'post', + maxBodyLength: 2000, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(user), + }); + expect(result).toEqual(user); + }); + }); + + test("Create should handle a conflict error", () => { + const errorResponse = { + response: { + status: 409, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${users_url}/users`; + + const sdk = new mfsdk({ usersUrl: users_url }); + return sdk.users.Create(user, token).catch((result) => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: "post", + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(user), + }); + expect(result.error.status).toBe(1); + expect(result.error.message).toBe( + "Failed due to using an existing identity.", + ); + }); + }); + + test("Login should create a token for a user and return success", () => { + axios.request.mockResolvedValueOnce({ data: user }); + + const expectedUrl = `${users_url}/users/tokens/issue`; + + const sdk = new mfsdk({ usersUrl: users_url }); + return sdk.users.Login(user).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'post', + maxBodyLength: 2000, + headers: { + "Content-Type": "application/json", + }, + data: JSON.stringify(user), + }); + expect(result).toEqual(user); + }); + }); + + test("Login should handle a conflict error", () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${users_url}/users/tokens/issue`; + + const sdk = new mfsdk({ usersUrl: users_url }); + return sdk.users.Login(user).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'post', + maxBodyLength: 2000, + headers: { + "Content-Type": "application/json", + }, + data: JSON.stringify(user), + }); + console.log(result); + }); + }); + + test("Get should get a user and return success", () => { + axios.request.mockResolvedValueOnce({ data: user }); + + const expectedUrl = `${users_url}/users/${user_id}`; + + const sdk = new mfsdk({ usersUrl: users_url }); + return sdk.users.Get(user_id, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'get', + maxBodyLength: 2000, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + }); + expect(result).toEqual(user); + }); + }); + + test("Get should handle a conflict error", () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${users_url}/users/${user_id}`; + + const sdk = new mfsdk({ usersUrl: users_url }); + return sdk.users.Get(user_id, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'get', + maxBodyLength: 2000, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + }); + console.log(result); + }); + }); + + test("Update should update a user and return success", () => { + axios.request.mockResolvedValueOnce({ data: user }); + + const expectedUrl = `${users_url}/users/${user_id}`; + + const sdk = new mfsdk({ usersUrl: users_url }); + return sdk.users.Update(user, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'patch', + maxBodyLength: 2000, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(user), + }); + expect(result).toEqual(user); + }); + }); + + test("Update should handle a conflict error", () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${users_url}/users/${user_id}`; + + const sdk = new mfsdk({ usersUrl: users_url }); + return sdk.users.Update(user, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'patch', + maxBodyLength: 2000, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(user), + }); + console.log(result); + }); + }); + + test("UpdateUserIdentity should update a user identity and return success", () => { + axios.request.mockResolvedValueOnce({ data: user }); + + const expectedUrl = `${users_url}/users/${user_id}/identity`; + + const sdk = new mfsdk({ usersUrl: users_url }); + return sdk.users.UpdateUserIdentity(user, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'patch', + maxBodyLength: 2000, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(user), + }); + expect(result).toEqual(user); + }); + }); + + test("UpdateUserIdentity should should handle a conflict error", () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${users_url}/users/${user_id}/identity`; + + const sdk = new mfsdk({ usersUrl: users_url }); + return sdk.users.UpdateUserIdentity(user, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'patch', + maxBodyLength: 2000, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(user), + }); + console.log(result); + }); + }); + + test("UpdateUserTags should update a users tags and return success", () => { + axios.request.mockResolvedValueOnce({ data: user }); + + const expectedUrl = `${users_url}/users/${user_id}/tags`; + + const sdk = new mfsdk({ usersUrl: users_url }); + return sdk.users.UpdateUserTags(user, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'patch', + maxBodyLength: 2000, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(user), + }); + expect(result).toEqual(user); + }); + }); + + test("UpdateUserTags should handle a conflict error", () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${users_url}/users/${user_id}/tags`; + + const sdk = new mfsdk({ usersUrl: users_url }); + return sdk.users.UpdateUserTags(user, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'patch', + maxBodyLength: 2000, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(user), + }); + console.log(result); + }); + }); + + test("UpdateUserOwner should update a user owner and return success", () => { + axios.request.mockResolvedValueOnce({ data: user }); + + const expectedUrl = `${users_url}/users/${user_id}/owner`; + + const sdk = new mfsdk({ usersUrl: users_url }); + return sdk.users.UpdateUserOwner(user, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'patch', + maxBodyLength: 2000, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(user), + }); + expect(result).toEqual(user); + }); + }); + + test("UpdateUserOwner should handle a conflict error", () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${users_url}/users/${user_id}/owner`; + + const sdk = new mfsdk({ usersUrl: users_url }); + return sdk.users.UpdateUserOwner(user, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'patch', + maxBodyLength: 2000, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(user), + }); + console.log(result); + }); + }); + + test("UpdateUserPassword should update a user password and return success", () => { + axios.request.mockResolvedValueOnce({ data: user }); + + const expectedUrl = `${users_url}/users/secret`; + + const sdk = new mfsdk({ usersUrl: users_url }); + const secret = { + old_secret: old_secret, + new_secret: new_secret, + }; + return sdk.users.UpdateUserPassword(old_secret, new_secret, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'patch', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(secret), + }); + }); + + test("UpdateUserPassword should handle a conflict error", () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${users_url}/users/secret`; + const secret = { + old_secret: old_secret, + new_secret: new_secret, + }; + const sdk = new mfsdk({ usersUrl: users_url }); + return sdk.users.UpdateUserPassword(old_secret, new_secret, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'patch', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(secret), + }); + }); + + test("Disable should disable user and return success", () => { + axios.request.mockResolvedValueOnce({ data: user }); + + const expectedUrl = `${users_url}/users/${user_id}/disable`; + + const sdk = new mfsdk({ usersUrl: users_url }); + return sdk.users.Disable(user, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'post', + maxBodyLength: 2000, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(user), + }); + expect(result).toEqual(user); + }); + }); + + test("Disable should handle a conflict error", () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${users_url}/users/${user_id}/disable`; + + const sdk = new mfsdk({ usersUrl: users_url }); + return sdk.users.Disable(user, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'post', + maxBodyLength: 2000, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(user), + }); + console.log(result); + }); + }); + + test("Enable should enable user and return success", () => { + axios.request.mockResolvedValueOnce({ data: user }); + + const expectedUrl = `${users_url}/users/${user_id}/enable`; + + const sdk = new mfsdk({ usersUrl: users_url }); + return sdk.users.Enable(user, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'post', + maxBodyLength: 2000, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(user), + }); + expect(result).toEqual(user); + }); + }); + + test("Enable should handle a conflict error", () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${users_url}/users/${user_id}/enable`; + + const sdk = new mfsdk({ usersUrl: users_url }); + return sdk.users.Enable(user, token).then((result) => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'post', + maxBodyLength: 2000, + headers: { + "Content-Type": "application/json", + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(user), + }); + console.log(result); + }); + }); + + test("Authorise User should authorise a user and return success", () => { + axios.request.mockResolvedValueOnce({ data: true }); + + const expectedUrl = `${users_url}/authorize`; + + const sdk = new mfsdk({ usersUrl: users_url }); + const access_request = { + "subject": user_id, + "object": group_id, + "action": action, + "entity_type": entity_type + } + return sdk.users.AuthoriseUser(user_id, group_id, action, entity_type, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'post', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(access_request), + }); + }); + + test("Authorise User should handle a conflict error", () => { + const errorResponse = { + response: { + status: 401, + }, + }; + axios.request.mockRejectedValueOnce(errorResponse); + + const expectedUrl = `${users_url}/authorize`; + const access_request = { + subject: user_id, + object: group_id, + action: action, + entity_type: entity_type, + }; + const sdk = new mfsdk({ usersUrl: users_url }); + return sdk.users.AuthoriseUser(user_id, group_id, action, entity_type, token).then(result => { + expect(axios.request).toHaveBeenCalledWith({ + url: expectedUrl, + method: 'post', + maxBodyLength: 2000, + headers: { + 'Content-Type': 'application/json', + Authorization: `Bearer ${token}`, + }, + data: JSON.stringify(access_request), + }); + }); +});