更新前端静态网页获取方式,放弃使用后端获取api

This commit is contained in:
2025-09-09 10:47:51 +08:00
parent 6889ca37e5
commit 44a4f1bae1
25558 changed files with 2463152 additions and 153 deletions

28
frontend/node_modules/filesize/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,28 @@
Copyright (c) 2022, Jason Mulligan
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of filesize nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

101
frontend/node_modules/filesize/README.md generated vendored Normal file
View File

@@ -0,0 +1,101 @@
# filesize.js
[![build status](https://secure.travis-ci.org/avoidwork/filesize.js.svg)](http://travis-ci.org/avoidwork/filesize.js) [![downloads](https://img.shields.io/npm/dt/filesize.svg)](https://www.npmjs.com/package/filesize) [![CDNJS version](https://img.shields.io/cdnjs/v/filesize.svg)](https://cdnjs.com/libraries/filesize)
filesize.js provides a simple way to get a human readable file size string from a number (float or integer) or string.
## Optional settings
`filesize()` accepts an optional descriptor Object as a second argument, so you can customize the output.
### base
_*(number)*_ Number base, default is `10`
### bits
_*(boolean)*_ Enables `bit` sizes, default is `false`
### exponent
_*(number)*_ Specifies the symbol via exponent, e.g. `2` is `MB` for base 2, default is `-1`
### fullform
_*(boolean)*_ Enables full form of unit of measure, default is `false`
### fullforms
_*(array)*_ Array of full form overrides, default is `[]`
### locale (overrides 'separator')
_*(string || boolean)*_ BCP 47 language tag to specify a locale, or `true` to use default locale, default is `""`
### localeOptions (overrides 'separator', requires string for 'locale' option)
_*(object)*_ Dictionary of options defined by ECMA-402 ([Number.prototype.toLocaleString](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toLocaleString)). Requires locale option to be explicitly passed as a string, otherwise is ignored.
### output
_*(string)*_ Output of function (`array`, `exponent`, `object`, or `string`), default is `string`
### pad
_*(boolean)*_ Decimal place end padding, default is `false`
### precision
_*(number)*_ Sets precision of numerical output, default is `0`
### round
_*(number)*_ Decimal place, default is `2`
### roundingMethod
_*(string)*_ Rounding method, can be `round`, `floor`, or `ceil`, default is `round`
### separator
_*(string)*_ Decimal separator character, default is `.`
### spacer
_*(string)*_ Character between the `result` and `symbol`, default is `" "`
### standard
_*(string)*_ Standard unit of measure, can be `iec` or `jedec`, default is `iec`; can be overruled by `base`
### symbols
_*(object)*_ Dictionary of IEC/JEDEC symbols to replace for localization, defaults to english if no match is found
### unix
_*(boolean)*_ Enables unix style human readable output, e.g `ls -lh`, default is `false`
## Examples
```javascript
filesize(500); // "500 B"
filesize(500, {bits: true}); // "4 kbit"
filesize(265318, {base: 2}); // "259.1 KiB"
filesize(265318); // "265.32 kB"
filesize(265318, {round: 0}); // "265 kB"
filesize(265318, {output: "array"}); // [265.32, "kB"]
filesize(265318, {output: "object"}); // {value: 265.32, symbol: "kB", exponent: 1, unit: "kB"}
filesize(1, {symbols: {B: "Б"}}); // "1 Б"
filesize(1024); // "1.02 kB"
filesize(1024, {exponent: 0}); // "1024 B"
filesize(1024, {output: "exponent"}); // 1
filesize(265318, {standard: "jedec"}); // "259.1 KB"
filesize(265318, {base: 2, fullform: true}); // "259.1 kibibytes"
filesize(12, {fullform: true, fullforms: ["байтов"]}); // "12 байтов"
filesize(265318, {separator: ","}); // "265,32 kB"
filesize(265318, {locale: "de"}); // "265,32 kB"
```
## Partial Application
`filesize.partial()` takes the second parameter of `filesize()` and returns a new function with the configuration applied
upon execution. This can be used to reduce `Object` creation if you call `filesize()` without caching the `descriptor`
in lexical scope.
```javascript
const size = filesize.partial({base: 2, standard: "jedec"});
size(265318); // "259.1 KB"
```
## How can I load filesize.js?
filesize.js supports AMD loaders (require.js, curl.js, etc.), node.js & npm (```npm install filesize```), or using a script tag.
An ES6 version is bundled with an npm install, but requires you load it with the full path, e.g. `require(path.join(__dirname, 'node_modules', 'filesize', 'lib', 'filesize.es6.js'))`.
## License
Copyright (c) 2022 Jason Mulligan
Licensed under the BSD-3 license.

131
frontend/node_modules/filesize/filesize.d.ts generated vendored Normal file
View File

@@ -0,0 +1,131 @@
// Type definitions for filesize 8.0.3
// Project: https://github.com/avoidwork/filesize.js, https://filesizejs.com
// Definitions by: Giedrius Grabauskas <https://github.com/GiedriusGrabauskas>
// Renaud Chaput <https://github.com/renchap>
// Roman Nuritdinov <https://github.com/Ky6uk>
// Sam Hulick <https://github.com/ffxsam>
// Tomoto S. Washio <https://github.com/tomoto>
declare var fileSize: Filesize.Filesize;
export = fileSize;
export as namespace filesize;
declare namespace Filesize {
interface SiJedecBits {
b?: string;
Kb?: string;
Mb?: string;
Gb?: string;
Tb?: string;
Pb?: string;
Eb?: string;
Zb?: string;
Yb?: string;
}
interface SiJedecBytes {
B?: string;
KB?: string;
MB?: string;
GB?: string;
TB?: string;
PB?: string;
EB?: string;
ZB?: string;
YB?: string;
}
type SiJedec = SiJedecBits & SiJedecBytes & { [name: string]: string };
interface Options {
/**
* Number base, default is 10
*/
base?: number;
/**
* Enables bit sizes, default is false
*/
bits?: boolean;
/**
* Specifies the SI suffix via exponent, e.g. 2 is MB for bytes, default is -1
*/
exponent?: number;
/**
* Enables full form of unit of measure, default is false
*/
fullform?: boolean;
/**
* Array of full form overrides, default is []
*/
fullforms?: string[];
/**
* BCP 47 language tag to specify a locale, or true to use default locale, default is ""
*/
locale?: string | boolean;
/**
* ECMA-402 number format option overrides, default is "{}"
*/
localeOptions?: Intl.NumberFormatOptions;
/**
* Output of function (array, exponent, object, or string), default is string
*/
output?: "array" | "exponent" | "object" | "string";
/**
* Decimal place end padding, default is false
*/
pad?: boolean;
/**
* Sets precision of numerical output, default is 0
*/
precision?: number;
/**
* Decimal place, default is 2
*/
round?: number;
/**
* Rounding method, can be round, floor, or ceil, default is round
*/
roundingMethod?: "round" | "floor" | "ceil";
/**
* Decimal separator character, default is `.`
*/
separator?: string;
/**
* Character between the result and suffix, default is ` `
*/
spacer?: string;
/**
* Standard unit of measure, can be iec or jedec, default is iec; can be overruled by base
*/
standard?: "iec" | "jedec";
/**
* Dictionary of SI/JEDEC symbols to replace for localization, defaults to english if no match is found
*/
symbols?: SiJedec;
/**
* Enables unix style human readable output, e.g ls -lh, default is false
*/
unix?: boolean;
}
// Result type inference from the output option
interface ResultTypeMap {
array: [number, string];
exponent: number;
object: {
value: number,
symbol: string,
exponent: number,
unit: string,
};
string: string;
}
type DefaultOutput<O extends Options> = Exclude<O["output"], keyof ResultTypeMap> extends never ? never : "string"
type CanonicalOutput<O extends Options> = Extract<O["output"], keyof ResultTypeMap> | DefaultOutput<O>
interface Filesize {
(bytes: number): string;
<O extends Options>(bytes: number, options: O): ResultTypeMap[CanonicalOutput<O>];
partial: <O extends Options>(options: O) => ((bytes: number) => ResultTypeMap[CanonicalOutput<O>]);
}
}

55
frontend/node_modules/filesize/package.json generated vendored Normal file
View File

@@ -0,0 +1,55 @@
{
"name": "filesize",
"description": "JavaScript library to generate a human readable String describing the file size",
"version": "8.0.7",
"homepage": "https://filesizejs.com",
"author": "Jason Mulligan <jason.mulligan@avoidwork.com>",
"repository": {
"type": "git",
"url": "git://github.com/avoidwork/filesize.js.git"
},
"bugs": {
"url": "https://github.com/avoidwork/filesize.js/issues"
},
"files": [
"lib",
"*.d.ts"
],
"license": "BSD-3-Clause",
"browser": "lib/filesize.min.js",
"main": "lib/filesize.js",
"module": "lib/filesize.esm.js",
"types": "filesize.d.ts",
"engines": {
"node": ">= 0.4.0"
},
"scripts": {
"build": "rollup -c",
"watch": "rollup -c -w",
"changelog": "auto-changelog -p",
"test": "npm run build && npm run lint && npm run test:unit && npm run test:type",
"test:unit": "nodeunit test/filesize_test.js",
"test:type": "tsc -p test",
"lint": "eslint test/*.js src/*.js"
},
"devDependencies": {
"@babel/core": "^7.16.0",
"@babel/preset-env": "^7.16.0",
"auto-changelog": "^2.3.0",
"eslint": "^8.1.0",
"nodeunit-x": "^0.15.0",
"rollup": "^2.58.3",
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-terser": "^7.0.2",
"typescript": "^3.9.0"
},
"keywords": [
"file",
"filesize",
"size",
"readable",
"file system",
"bytes",
"diff"
]
}