It appears you have a well-structured Git repository with various files, including SVG icons and HTML documents. Here's a brief overview:
This commit is contained in:
22
backend/node_modules/postcss-normalize-url/LICENSE-MIT
generated
vendored
Normal file
22
backend/node_modules/postcss-normalize-url/LICENSE-MIT
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
Copyright (c) Ben Briggs <beneb.info@gmail.com> (http://beneb.info)
|
||||
|
||||
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.
|
48
backend/node_modules/postcss-normalize-url/README.md
generated
vendored
Normal file
48
backend/node_modules/postcss-normalize-url/README.md
generated
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
# [postcss][postcss]-normalize-url
|
||||
|
||||
> [Normalize URLs](https://github.com/sindresorhus/normalize-url) with PostCSS.
|
||||
|
||||
## Install
|
||||
|
||||
With [npm](https://npmjs.org/package/postcss-normalize-url) do:
|
||||
|
||||
```
|
||||
npm install postcss-normalize-url --save
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
### Input
|
||||
|
||||
```css
|
||||
h1 {
|
||||
background: url("http://site.com:80/image.jpg")
|
||||
}
|
||||
```
|
||||
|
||||
### Output
|
||||
|
||||
```css
|
||||
h1 {
|
||||
background: url(http://site.com/image.jpg)
|
||||
}
|
||||
```
|
||||
|
||||
Note that this module will also try to normalize relative URLs, and is capable
|
||||
of stripping unnecessary quotes. For more examples, see the [tests](test/index.js).
|
||||
|
||||
## Usage
|
||||
|
||||
See the [PostCSS documentation](https://github.com/postcss/postcss#usage) for
|
||||
examples for your environment.
|
||||
|
||||
## Contributors
|
||||
|
||||
See [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/master/CONTRIBUTORS.md).
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Ben Briggs](http://beneb.info)
|
||||
|
||||
[docs]: https://github.com/sindresorhus/normalize-url#options
|
||||
[postcss]: https://github.com/postcss/postcss
|
44
backend/node_modules/postcss-normalize-url/package.json
generated
vendored
Normal file
44
backend/node_modules/postcss-normalize-url/package.json
generated
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
{
|
||||
"name": "postcss-normalize-url",
|
||||
"version": "7.0.1",
|
||||
"description": "Normalize URLs with PostCSS",
|
||||
"main": "src/index.js",
|
||||
"types": "types/index.d.ts",
|
||||
"files": [
|
||||
"src",
|
||||
"LICENSE-MIT",
|
||||
"types"
|
||||
],
|
||||
"keywords": [
|
||||
"css",
|
||||
"normalize",
|
||||
"optimise",
|
||||
"optimisation",
|
||||
"postcss",
|
||||
"postcss-plugin",
|
||||
"url"
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"postcss-value-parser": "^4.2.0"
|
||||
},
|
||||
"homepage": "https://github.com/cssnano/cssnano",
|
||||
"author": {
|
||||
"name": "Ben Briggs",
|
||||
"email": "beneb.info@gmail.com",
|
||||
"url": "http://beneb.info"
|
||||
},
|
||||
"repository": "cssnano/cssnano",
|
||||
"bugs": {
|
||||
"url": "https://github.com/cssnano/cssnano/issues"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.12.0 || ^20.9.0 || >=22.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"postcss": "^8.5.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"postcss": "^8.4.32"
|
||||
}
|
||||
}
|
151
backend/node_modules/postcss-normalize-url/src/index.js
generated
vendored
Normal file
151
backend/node_modules/postcss-normalize-url/src/index.js
generated
vendored
Normal file
@ -0,0 +1,151 @@
|
||||
'use strict';
|
||||
const path = require('path');
|
||||
const valueParser = require('postcss-value-parser');
|
||||
const normalize = require('./normalize.js');
|
||||
|
||||
const multiline = /\\[\r\n]/;
|
||||
// eslint-disable-next-line no-useless-escape
|
||||
const escapeChars = /([\s\(\)"'])/g;
|
||||
|
||||
// Scheme: https://tools.ietf.org/html/rfc3986#section-3.1
|
||||
// Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3
|
||||
const ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\d+\-.]*?:/;
|
||||
// Windows paths like `c:\`
|
||||
const WINDOWS_PATH_REGEX = /^[a-zA-Z]:\\/;
|
||||
|
||||
/**
|
||||
* Originally in sindresorhus/is-absolute-url
|
||||
*
|
||||
* @param {string} url
|
||||
*/
|
||||
function isAbsolute(url) {
|
||||
if (WINDOWS_PATH_REGEX.test(url)) {
|
||||
return false;
|
||||
}
|
||||
return ABSOLUTE_URL_REGEX.test(url);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} url
|
||||
* @return {string}
|
||||
*/
|
||||
function convert(url) {
|
||||
if (isAbsolute(url) || url.startsWith('//')) {
|
||||
let normalizedURL;
|
||||
|
||||
try {
|
||||
normalizedURL = normalize(url);
|
||||
} catch {
|
||||
normalizedURL = url;
|
||||
}
|
||||
|
||||
return normalizedURL;
|
||||
}
|
||||
|
||||
// `path.normalize` always returns backslashes on Windows, need replace in `/`
|
||||
return path.normalize(url).replace(new RegExp('\\' + path.sep, 'g'), '/');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import('postcss').AtRule} rule
|
||||
* @return {void}
|
||||
*/
|
||||
function transformNamespace(rule) {
|
||||
rule.params = valueParser(rule.params)
|
||||
.walk((node) => {
|
||||
if (
|
||||
node.type === 'function' &&
|
||||
node.value.toLowerCase() === 'url' &&
|
||||
node.nodes.length
|
||||
) {
|
||||
/** @type {valueParser.Node} */ (node).type = 'string';
|
||||
/** @type {any} */ (node).quote =
|
||||
node.nodes[0].type === 'string' ? node.nodes[0].quote : '"';
|
||||
node.value = node.nodes[0].value;
|
||||
}
|
||||
if (node.type === 'string') {
|
||||
node.value = node.value.trim();
|
||||
}
|
||||
return false;
|
||||
})
|
||||
.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import('postcss').Declaration} decl
|
||||
* @return {void}
|
||||
*/
|
||||
function transformDecl(decl) {
|
||||
decl.value = valueParser(decl.value)
|
||||
.walk((node) => {
|
||||
if (node.type !== 'function' || node.value.toLowerCase() !== 'url') {
|
||||
return false;
|
||||
}
|
||||
|
||||
node.before = node.after = '';
|
||||
|
||||
if (!node.nodes.length) {
|
||||
return false;
|
||||
}
|
||||
let url = node.nodes[0];
|
||||
let escaped;
|
||||
|
||||
url.value = url.value.trim().replace(multiline, '');
|
||||
|
||||
// Skip empty URLs
|
||||
// Empty URL function equals request to current stylesheet where it is declared
|
||||
if (url.value.length === 0) {
|
||||
/** @type {any} */ (url).quote = '';
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (/^data:(.*)?,/i.test(url.value)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!/^.+-extension:\//i.test(url.value)) {
|
||||
url.value = convert(url.value);
|
||||
}
|
||||
|
||||
if (escapeChars.test(url.value) && url.type === 'string') {
|
||||
escaped = url.value.replace(escapeChars, '\\$1');
|
||||
|
||||
if (escaped.length < url.value.length + 2) {
|
||||
url.value = escaped;
|
||||
/** @type {valueParser.Node} */ (url).type = 'word';
|
||||
}
|
||||
} else {
|
||||
url.type = 'word';
|
||||
}
|
||||
|
||||
return false;
|
||||
})
|
||||
.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* @type {import('postcss').PluginCreator<void>}
|
||||
* @return {import('postcss').Plugin}
|
||||
*/
|
||||
function pluginCreator() {
|
||||
return {
|
||||
postcssPlugin: 'postcss-normalize-url',
|
||||
|
||||
OnceExit(css) {
|
||||
css.walk((node) => {
|
||||
if (node.type === 'decl') {
|
||||
return transformDecl(node);
|
||||
} else if (
|
||||
node.type === 'atrule' &&
|
||||
node.name.toLowerCase() === 'namespace'
|
||||
) {
|
||||
return transformNamespace(node);
|
||||
}
|
||||
});
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
pluginCreator.postcss = true;
|
||||
module.exports = pluginCreator;
|
153
backend/node_modules/postcss-normalize-url/src/normalize.js
generated
vendored
Normal file
153
backend/node_modules/postcss-normalize-url/src/normalize.js
generated
vendored
Normal file
@ -0,0 +1,153 @@
|
||||
'use strict';
|
||||
/* Derived from normalize-url https://github.com/sindresorhus/normalize-url/main/index.js by Sindre Sorhus */
|
||||
|
||||
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs
|
||||
const DATA_URL_DEFAULT_MIME_TYPE = 'text/plain';
|
||||
const DATA_URL_DEFAULT_CHARSET = 'us-ascii';
|
||||
|
||||
const supportedProtocols = new Set(['https:', 'http:', 'file:']);
|
||||
|
||||
/**
|
||||
* @param {string} urlString
|
||||
* @return {boolean} */
|
||||
function hasCustomProtocol(urlString) {
|
||||
try {
|
||||
const { protocol } = new URL(urlString);
|
||||
return protocol.endsWith(':') && !supportedProtocols.has(protocol);
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} urlString
|
||||
* @return {string} */
|
||||
function normalizeDataURL(urlString) {
|
||||
const match = /^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(
|
||||
urlString
|
||||
);
|
||||
|
||||
if (!match) {
|
||||
throw new Error(`Invalid URL: ${urlString}`);
|
||||
}
|
||||
|
||||
let { type, data, hash } =
|
||||
/** @type {{type: string, data: string, hash: string}} */ (match.groups);
|
||||
const mediaType = type.split(';');
|
||||
|
||||
let isBase64 = false;
|
||||
if (mediaType[mediaType.length - 1] === 'base64') {
|
||||
mediaType.pop();
|
||||
isBase64 = true;
|
||||
}
|
||||
|
||||
// Lowercase MIME type
|
||||
const mimeType = mediaType.shift()?.toLowerCase() ?? '';
|
||||
const attributes = mediaType
|
||||
.map(
|
||||
/** @type {(string: string) => string} */ (attribute) => {
|
||||
let [key, value = ''] = attribute
|
||||
.split('=')
|
||||
.map(
|
||||
/** @type {(string: string) => string} */ (string) => string.trim()
|
||||
);
|
||||
|
||||
// Lowercase `charset`
|
||||
if (key === 'charset') {
|
||||
value = value.toLowerCase();
|
||||
|
||||
if (value === DATA_URL_DEFAULT_CHARSET) {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
return `${key}${value ? `=${value}` : ''}`;
|
||||
}
|
||||
)
|
||||
.filter(Boolean);
|
||||
|
||||
const normalizedMediaType = [...attributes];
|
||||
|
||||
if (isBase64) {
|
||||
normalizedMediaType.push('base64');
|
||||
}
|
||||
|
||||
if (
|
||||
normalizedMediaType.length > 0 ||
|
||||
(mimeType && mimeType !== DATA_URL_DEFAULT_MIME_TYPE)
|
||||
) {
|
||||
normalizedMediaType.unshift(mimeType);
|
||||
}
|
||||
|
||||
return `data:${normalizedMediaType.join(';')},${
|
||||
isBase64 ? data.trim() : data
|
||||
}${hash ? `#${hash}` : ''}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} urlString
|
||||
* @return {string}
|
||||
*/
|
||||
function normalizeUrl(urlString) {
|
||||
urlString = urlString.trim();
|
||||
|
||||
// Data URL
|
||||
if (/^data:/i.test(urlString)) {
|
||||
return normalizeDataURL(urlString);
|
||||
}
|
||||
|
||||
if (hasCustomProtocol(urlString)) {
|
||||
return urlString;
|
||||
}
|
||||
|
||||
const hasRelativeProtocol = urlString.startsWith('//');
|
||||
const isRelativeUrl = !hasRelativeProtocol && /^\.*\//.test(urlString);
|
||||
|
||||
// Prepend protocol
|
||||
if (!isRelativeUrl) {
|
||||
urlString = urlString.replace(/^(?!(?:\w+:)?\/\/)|^\/\//, 'http:');
|
||||
}
|
||||
|
||||
const urlObject = new URL(urlString);
|
||||
|
||||
// Remove duplicate slashes if not preceded by a protocol
|
||||
if (urlObject.pathname) {
|
||||
urlObject.pathname = urlObject.pathname.replace(
|
||||
/(?<!\b[a-z][a-z\d+\-.]{1,50}:)\/{2,}/g,
|
||||
'/'
|
||||
);
|
||||
}
|
||||
|
||||
// Decode URI octets
|
||||
if (urlObject.pathname) {
|
||||
try {
|
||||
urlObject.pathname = decodeURI(urlObject.pathname);
|
||||
} catch {
|
||||
/* Do nothing */
|
||||
}
|
||||
}
|
||||
|
||||
if (urlObject.hostname) {
|
||||
// Remove trailing dot
|
||||
urlObject.hostname = urlObject.hostname.replace(/\.$/, '');
|
||||
}
|
||||
|
||||
urlObject.pathname = urlObject.pathname.replace(/\/$/, '');
|
||||
|
||||
// Take advantage of many of the Node `url` normalizations
|
||||
urlString = urlObject.toString();
|
||||
|
||||
// Remove ending `/`
|
||||
if (urlObject.pathname === '/' && urlObject.hash === '') {
|
||||
urlString = urlString.replace(/\/$/, '');
|
||||
}
|
||||
|
||||
// Restore relative protocol
|
||||
if (hasRelativeProtocol) {
|
||||
urlString = urlString.replace(/^http:\/\//, '//');
|
||||
}
|
||||
|
||||
return urlString;
|
||||
}
|
||||
|
||||
module.exports = normalizeUrl;
|
10
backend/node_modules/postcss-normalize-url/types/index.d.ts
generated
vendored
Normal file
10
backend/node_modules/postcss-normalize-url/types/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
export = pluginCreator;
|
||||
/**
|
||||
* @type {import('postcss').PluginCreator<void>}
|
||||
* @return {import('postcss').Plugin}
|
||||
*/
|
||||
declare function pluginCreator(): import("postcss").Plugin;
|
||||
declare namespace pluginCreator {
|
||||
let postcss: true;
|
||||
}
|
||||
//# sourceMappingURL=index.d.ts.map
|
1
backend/node_modules/postcss-normalize-url/types/index.d.ts.map
generated
vendored
Normal file
1
backend/node_modules/postcss-normalize-url/types/index.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":";AA8HA;;;GAGG;AACH,kCAFY,OAAO,SAAS,EAAE,MAAM,CAmBnC"}
|
7
backend/node_modules/postcss-normalize-url/types/normalize.d.ts
generated
vendored
Normal file
7
backend/node_modules/postcss-normalize-url/types/normalize.d.ts
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
export = normalizeUrl;
|
||||
/**
|
||||
* @param {string} urlString
|
||||
* @return {string}
|
||||
*/
|
||||
declare function normalizeUrl(urlString: string): string;
|
||||
//# sourceMappingURL=normalize.d.ts.map
|
1
backend/node_modules/postcss-normalize-url/types/normalize.d.ts.map
generated
vendored
Normal file
1
backend/node_modules/postcss-normalize-url/types/normalize.d.ts.map
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../src/normalize.js"],"names":[],"mappings":";AAsFA;;;GAGG;AACH,yCAHW,MAAM,GACL,MAAM,CA8DjB"}
|
Reference in New Issue
Block a user