This commit is contained in:
Iliyan Angelov
2025-09-14 23:24:25 +03:00
commit c67067a2a4
71311 changed files with 6800714 additions and 0 deletions

116
frontend/node_modules/@svgr/plugin-svgo/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,116 @@
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [5.5.0](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/compare/v5.4.0...v5.5.0) (2020-11-15)
### Features
* **svgo:** add .svgorc.js config file support ([#451](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/issues/451)) ([8049b1a](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/commit/8049b1a63603672096892b6ab3d303580c2f303f)), closes [#412](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/issues/412)
### Performance Improvements
* replace merge-deep with smaller deepmerge ([#463](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/issues/463)) ([1f015eb](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/commit/1f015eb16fca093a08b012236dc83623f7bcce55))
# [5.4.0](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/compare/v5.3.1...v5.4.0) (2020-04-27)
**Note:** Version bump only for package @svgr/plugin-svgo
# [5.3.0](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/compare/v5.2.0...v5.3.0) (2020-03-22)
### Bug Fixes
* **svgo:** support any SVGO config format ([#412](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/issues/412)) ([f2b2367](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/commit/f2b2367389fda20baba6e0a5e884e7f7fe29a3ed)), closes [#400](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/issues/400)
# [5.2.0](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/compare/v5.1.0...v5.2.0) (2020-02-23)
### Bug Fixes
* verify that `svgoConfig.plugins` is an array ([#397](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/issues/397)) ([88110b6](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/commit/88110b6eb4d93ded68ca2de05cc82654dfac977d))
# [5.1.0](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/compare/v5.0.1...v5.1.0) (2020-01-20)
### Bug Fixes
* fix merging svgo plugins in config ([#384](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/issues/384)) ([c9d2dfc](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/commit/c9d2dfcb8d4da55eb21a13507c87d9e549a86e7e))
## [5.0.1](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/compare/v5.0.0...v5.0.1) (2019-12-29)
### Bug Fixes
* fix engines in package.json ([a45d6fc](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/commit/a45d6fc8b43402bec60ed4e9273f90fdc65a23a7))
## [4.3.1](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/compare/v4.3.0...v4.3.1) (2019-07-01)
**Note:** Version bump only for package @svgr/plugin-svgo
# [4.2.0](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/compare/v4.1.0...v4.2.0) (2019-04-11)
### Bug Fixes
* keep viewBox when dimensions are removed ([#281](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/issues/281)) ([f476c8e](https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo/commit/f476c8e))
## [4.0.3](https://github.com/gregberge/svgr/compare/v4.0.2...v4.0.3) (2018-11-13)
### Bug Fixes
* upgrade dependencies ([7e2195f](https://github.com/gregberge/svgr/commit/7e2195f))
# [4.0.0](https://github.com/gregberge/svgr/compare/v3.1.0...v4.0.0) (2018-11-04)
### Features
* **svgo:** prefix ids by default ([06c338d](https://github.com/gregberge/svgr/commit/06c338d)), closes [#210](https://github.com/gregberge/svgr/issues/210)
* **v4:** new architecture ([ac8b8ca](https://github.com/gregberge/svgr/commit/ac8b8ca))
### BREAKING CHANGES
* **v4:** - `template` option must now returns a Babel AST
- `@svgr/core` does not include svgo & prettier by default

7
frontend/node_modules/@svgr/plugin-svgo/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,7 @@
Copyright 2017 Smooth Code
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

27
frontend/node_modules/@svgr/plugin-svgo/README.md generated vendored Normal file
View File

@@ -0,0 +1,27 @@
# @svgr/plugin-svgo
[![Build Status](https://img.shields.io/travis/smooth-code/svgr.svg)](https://travis-ci.org/smooth-code/svgr)
[![Version](https://img.shields.io/npm/v/@svgr/plugin-svgo.svg)](https://www.npmjs.com/package/@svgr/plugin-svgo)
[![MIT License](https://img.shields.io/npm/l/@svgr/plugin-svgo.svg)](https://github.com/smooth-code/svgr/blob/master/LICENSE)
Optimize SVG using SVGO.
## Install
```
npm install --save-dev @svgr/plugin-svgo
```
## Usage
**.svgrrc**
```json
{
"plugins": ["@svgr/plugin-svgo"]
}
```
## License
MIT

67
frontend/node_modules/@svgr/plugin-svgo/lib/config.js generated vendored Normal file
View File

@@ -0,0 +1,67 @@
"use strict";
exports.__esModule = true;
exports.getFilePath = getFilePath;
exports.getBaseSvgoConfig = getBaseSvgoConfig;
exports.getPlugins = getPlugins;
exports.mergeSvgoConfig = mergeSvgoConfig;
var _deepmerge = _interopRequireDefault(require("deepmerge"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function getFilePath(state) {
return state.filePath || process.cwd();
}
function getBaseSvgoConfig(config) {
const baseSvgoConfig = {
plugins: [{
prefixIds: true
}]
};
if (config.icon || config.dimensions === false) {
baseSvgoConfig.plugins.push({
removeViewBox: false
});
}
return baseSvgoConfig;
}
function getPlugins(config) {
if (!config || !config.plugins) {
return [];
}
if (!Array.isArray(config.plugins)) {
throw Error('`svgoConfig.plugins` must be an array');
}
return config.plugins;
}
function extractPlugins(config) {
if (!config) return [];
if (!config.plugins) return [];
if (!Array.isArray(config.plugins)) return [config.plugins];
return config.plugins;
}
function mergePlugins(configs) {
const plugins = configs.reduce((merged, config) => _deepmerge.default.all([merged, ...extractPlugins(config)]), {});
return Object.keys(plugins).reduce((array, key) => {
array.push({
[key]: plugins[key]
});
return array;
}, []);
}
function mergeSvgoConfig(...configs) {
const plugins = mergePlugins(configs);
return { ..._deepmerge.default.all(configs.filter(Boolean)),
plugins
};
}

111
frontend/node_modules/@svgr/plugin-svgo/lib/index.js generated vendored Normal file
View File

@@ -0,0 +1,111 @@
"use strict";
exports.__esModule = true;
exports.default = svgoPlugin;
var _svgo = _interopRequireDefault(require("svgo"));
var _cosmiconfig = require("cosmiconfig");
var _config = require("./config");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/* eslint-disable no-underscore-dangle */
const explorer = (0, _cosmiconfig.cosmiconfigSync)('svgo', {
searchPlaces: ['package.json', '.svgorc', '.svgorc.js', '.svgorc.json', '.svgorc.yaml', '.svgorc.yml', 'svgo.config.js', '.svgo.yml'],
transform: result => result && result.config,
cache: true
});
function encodeSVGDatauri(str, type) {
let prefix = 'data:image/svg+xml'; // base64
if (!type || type === 'base64') {
prefix += ';base64,';
if (Buffer.from) {
str = prefix + Buffer.from(str).toString('base64');
} else {
// eslint-disable-next-line
str = prefix + new Buffer(str).toString('base64');
} // URI encoded
} else if (type === 'enc') {
str = `${prefix},${encodeURIComponent(str)}`; // unencoded
} else if (type === 'unenc') {
str = `${prefix},${str}`;
}
return str;
} // See https://github.com/svg/svgo/blob/master/lib/svgo.js#L24
// _optimizeOnce is synchronous internally
function optimizeSync(svgstr, info) {
const {
config
} = this;
if (config.error) {
throw config.error;
}
const maxPassCount = config.multipass ? 10 : 1;
let counter = 0;
let prevResultSize = Number.POSITIVE_INFINITY;
let result;
const optimizeOnceCallback = svgjs => {
if (svgjs.error) {
throw svgjs.error;
} // eslint-disable-next-line no-plusplus
if (++counter < maxPassCount && svgjs.data.length < prevResultSize) {
prevResultSize = svgjs.data.length;
this._optimizeOnce(svgjs.data, info, optimizeOnceCallback);
} else {
if (config.datauri) {
svgjs.data = encodeSVGDatauri(svgjs.data, config.datauri);
}
if (info.path) {
svgjs.path = info.path;
}
result = svgjs;
}
};
this._optimizeOnce(svgstr, info, optimizeOnceCallback);
return result;
}
function createSvgo(config, rcConfig) {
const baseSvgoConfig = (0, _config.getBaseSvgoConfig)(config);
const mergedConfig = (0, _config.mergeSvgoConfig)(baseSvgoConfig, rcConfig, config.svgoConfig);
return new _svgo.default(mergedConfig);
}
function getInfo(state) {
return state.filePath ? {
input: 'file',
path: state.filePath
} : {
input: 'string'
};
}
function svgoPlugin(code, config, state) {
if (!config.svgo) return code;
const filePath = (0, _config.getFilePath)(state);
const svgoRcConfig = config.runtimeConfig ? explorer.search(filePath) : {};
const svgo = createSvgo(config, svgoRcConfig);
const {
data
} = optimizeSync.call(svgo, code, getInfo(state));
return data;
}

34
frontend/node_modules/@svgr/plugin-svgo/package.json generated vendored Normal file
View File

@@ -0,0 +1,34 @@
{
"name": "@svgr/plugin-svgo",
"description": "Optimize SVG",
"version": "5.5.0",
"main": "lib/index.js",
"repository": "https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo",
"author": "Greg Bergé <berge.greg@gmail.com>",
"publishConfig": {
"access": "public"
},
"keywords": [
"svgr-plugin"
],
"engines": {
"node": ">=10"
},
"homepage": "https://react-svgr.com",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/gregberge"
},
"license": "MIT",
"scripts": {
"prebuild": "rm -rf lib/",
"build": "babel --config-file ../../babel.config.js -d lib --ignore \"**/*.test.js\" src",
"prepublishOnly": "yarn run build"
},
"dependencies": {
"cosmiconfig": "^7.0.0",
"deepmerge": "^4.2.2",
"svgo": "^1.2.2"
},
"gitHead": "b5920550bd966f876cb65c5e23af180461e5aa23"
}